@openhands/agent-canvas 1.15.0 → 1.16.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 +15 -1
- package/README.windows.md +2 -2
- package/build/assets/{acp-providers-BKvmTf82.js → acp-providers-CX3Lh9gj.js} +1 -1
- package/build/assets/active-backend-context-CrHTlgvN.js +2 -0
- package/build/assets/{agent-context-settings-D3PjSTU1.js → agent-context-settings-DSZlXrLj.js} +1 -1
- package/build/assets/{agent-profiles-settings-D4cY5U2T.js → agent-profiles-settings-Dzgb7G9z.js} +1 -1
- package/build/assets/agent-server-conversation-service.api-tnqNjbpE.js +86 -0
- package/build/assets/agent-settings-DLtsqaOs.js +2 -0
- package/build/assets/agent-settings-fFvR-XC2.js +1 -0
- package/build/assets/alert-banner-HP6mX-Vr.js +1 -0
- package/build/assets/{api-error-message-BJyfWp6p.js → api-error-message-B-XdSk3b.js} +1 -1
- package/build/assets/api-key-entry-screen-qTzrmJcr.js +1 -0
- package/build/assets/{app-settings-CbHqzQus.js → app-settings-dbnneVaV.js} +1 -1
- package/build/assets/automation-detail-BmwlCUAB.js +3 -0
- package/build/assets/{automation-export-BRopEHMu.js → automation-export-D3a3of4G.js} +1 -1
- package/build/assets/{automation-git-sync-CzyS4cn1.js → automation-git-sync-CprN5DcU.js} +1 -1
- package/build/assets/automation-setup-route-C40kXjMY.js +1 -0
- package/build/assets/{automation-templates-C_0FZgLG.js → automation-templates-BRppNh99.js} +1 -1
- package/build/assets/automations-list-DuNcRawl.js +1 -0
- package/build/assets/{back-nav-button-Dm9tIjVf.js → back-nav-button-Cjl_hoxq.js} +1 -1
- package/build/assets/backend-form-modal-lhGwzXFI.js +1 -0
- package/build/assets/{backend-synced-settings-badge-3fOwg6Bd.js → backend-synced-settings-badge-DPkz30BE.js} +1 -1
- package/build/assets/{badge-D4SqUCsR.js → badge-BU3S0VtE.js} +1 -1
- package/build/assets/{base-modal-C7_BDl_U.js → base-modal-D_L0oEbG.js} +1 -1
- package/build/assets/{bot-C-0Wu7vQ.js → bot-dMYHVfYM.js} +1 -1
- package/build/assets/{brand-button-Dxv6PDeN.js → brand-button-BAfk4wGP.js} +1 -1
- package/build/assets/browser-DSAo0tz1.js +46 -0
- package/build/assets/{browser-tab-BAl4ckJE.js → browser-tab-C9vy56R5.js} +1 -1
- package/build/assets/canvas-extension-page-dx1gFrfW.js +1 -0
- package/build/assets/canvas-extensions-8A-XhpgP.js +1 -0
- package/build/assets/canvas-extensions-runtime-2_x5Ezmi.js +1 -0
- package/build/assets/{chat-send-button-DWwR2cgI.js → chat-send-button-MUQqCZCS.js} +1 -1
- package/build/assets/check-CS0vmpQQ.js +1 -0
- package/build/assets/chevron-down-e1QBpjVy.js +1 -0
- package/build/assets/chevron-right-ZG4R5G4Q.js +1 -0
- package/build/assets/circle-check-DzWLNsbE.js +1 -0
- package/build/assets/{circle-plus-check-toggle-CBh_qomE.js → circle-plus-check-toggle-BO_kFZt3.js} +1 -1
- package/build/assets/{cloud-funnel-analytics-287iIERo.js → cloud-funnel-analytics-CztBCCPp.js} +1 -1
- package/build/assets/{cog-C4rrw-ZK.js → cog-D-MPQW6G.js} +1 -1
- package/build/assets/command-menu--UIlGL72.js +1 -0
- package/build/assets/{commits-tab-DZtJgaDM.js → commits-tab-AnZwLvh-.js} +1 -1
- package/build/assets/{condenser-settings-BcNmYR4s.js → condenser-settings-DmEOje-7.js} +1 -1
- package/build/assets/{confirmation-modal-Bk4JRcCM.js → confirmation-modal-Dv1ktp8K.js} +1 -1
- package/build/assets/{context-menu-list-item-lVYETtY5.js → context-menu-list-item-I86vKcmM.js} +1 -1
- package/build/assets/conversation-BbGrAO4Z.js +93 -0
- package/build/assets/conversation-mYT6NAoj.js +1 -0
- package/build/assets/conversation-panel-mYT6NAoj.js +1 -0
- package/build/assets/conversation-state-store-B0ImPLHO.js +1 -0
- package/build/assets/{conversation-tab-empty-state-HJtkmHZj.js → conversation-tab-empty-state-FIbh_lc8.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-Cjkswvnj.js → copy-to-clipboard-button-Ca8iSkkA.js} +1 -1
- package/build/assets/{device-verify-EZhHhBT7.js → device-verify-Bhn2e_Ye.js} +1 -1
- package/build/assets/{dropdown-classes-DJe-E6MC.js → dropdown-classes-Bc1djN0-.js} +1 -1
- package/build/assets/{edit-automation-modal-D-urtv8n.js → edit-automation-modal-DadGbJ2u.js} +1 -1
- package/build/assets/empty-state-BoGVDecT.js +1 -0
- package/build/assets/{entry.client-C7Bi2tkU.js → entry.client-CqyPPjOq.js} +2 -2
- package/build/assets/{enum-filter-dropdown-DliX_Lo0.js → enum-filter-dropdown-Bgca129f.js} +1 -1
- package/build/assets/{environment-switch-overlay-CEKrFiMw.js → environment-switch-overlay-BmBRT7gv.js} +1 -1
- package/build/assets/{error-state-BALXiBNy.js → error-state-Body8Ngd.js} +1 -1
- package/build/assets/extensions-hub-CcDqq_vR.js +1 -0
- package/build/assets/extensions-navigation-Cr4yzYk4.js +1 -0
- package/build/assets/{external-link-DFpYunfj.js → external-link-DKUlnCQV.js} +1 -1
- package/build/assets/files-tab-D4o2VyE_.js +1 -0
- package/build/assets/{form-control-classes-CGw40z5h.js → form-control-classes-Bkh5FGrD.js} +1 -1
- package/build/assets/format-model-name-CasAP3nd.js +1 -0
- package/build/assets/get-git-path-ChKDVHZp.js +1 -0
- package/build/assets/{git-repo-dropdown-ai8qaNkD.js → git-repo-dropdown-4ROKl2cB.js} +1 -1
- package/build/assets/git-repo-dropdown-BkqzkMmM.js +1 -0
- package/build/assets/{highlighted-source-view-C3sxykQi.js → highlighted-source-view-BFRxGT_Q.js} +1 -1
- package/build/assets/home-ChpSuepX.js +1 -0
- package/build/assets/home-DIsB440S.js +1 -0
- package/build/assets/home-automation-run-tooltip-BVNDWjAH.js +1 -0
- package/build/assets/home-store-CY9Ej0ux.js +1 -0
- package/build/assets/index-home-BdlrFIif.js +1 -0
- package/build/assets/info-B6RQawoW.js +1 -0
- package/build/assets/install-server-modal-Dpy89p4g.js +1 -0
- package/build/assets/kebab-menu-item-content-D8hSNGmm.js +1 -0
- package/build/assets/{key-Cn5za3rg.js → key-BmVyxs-2.js} +1 -1
- package/build/assets/{launch-C1ieiOGe.js → launch-IrTDEFCs.js} +1 -1
- package/build/assets/list-filter-DsEK7NFC.js +1 -0
- package/build/assets/{list-todo-Cuu-STFc.js → list-todo-apgLVjMw.js} +1 -1
- package/build/assets/llm-not-configured-banner-CIFABh3K.js +27 -0
- package/build/assets/llm-settings-B9juXhIa.js +1 -0
- package/build/assets/llm-settings-De1d5dfr.js +1 -0
- package/build/assets/llm-subscription-service-BpJ0ouQo.js +1 -0
- package/build/assets/loader-circle-CC1au6hc.js +1 -0
- package/build/assets/{loading-spinner-0L3ZTToZ.js → loading-spinner-BY9N3pOe.js} +1 -1
- package/build/assets/manage-backends-modal-BrPV3oB-.js +1 -0
- package/build/assets/manifest-80fb1c29.js +1 -0
- package/build/assets/{manifest-subpage-layout-BGhiUQbA.js → manifest-subpage-layout-CAOYzrYp.js} +1 -1
- package/build/assets/{map-provider-B9LTm23I.js → map-provider-Cu3Zgumb.js} +1 -1
- package/build/assets/markdown-renderer-BzTlxI8x.js +8 -0
- package/build/assets/{mcp-CKbR4Vft.js → mcp-BTs_SXfZ.js} +1 -1
- package/build/assets/{mcp-marketplace-utils-C13fFccR.js → mcp-marketplace-utils-AIBzzHTO.js} +1 -1
- package/build/assets/{mcp-page-Bm4K2NQq.js → mcp-page-BEBYqH_K.js} +2 -2
- package/build/assets/messages-DKV9cRc2.js +41 -0
- package/build/assets/{modal-body-CMOc2tLl.js → modal-body-BxZjsju9.js} +1 -1
- package/build/assets/{modal-classes-BAb4Y_BG.js → modal-classes-C8eycCwG.js} +1 -1
- package/build/assets/{modal-close-button-CkJ0Ktjj.js → modal-close-button-DDzdRvCs.js} +1 -1
- package/build/assets/{mouse-pointer-click-CsgRs_-r.js → mouse-pointer-click-Co2uyaPA.js} +1 -1
- package/build/assets/onboarding-DV_OXoeP.js +1 -0
- package/build/assets/onboarding-modal-rkyBYkeQ.js +1 -0
- package/build/assets/{organization-service.api-C8XpQ0pM.js → organization-service.api-DrYNkEN_.js} +1 -1
- package/build/assets/{pencil-Clh1Wjvh.js → pencil-47jAZH_V.js} +1 -1
- package/build/assets/pin-By41Vl5J.js +1 -0
- package/build/assets/{planner-tab-DQvDU3ap.js → planner-tab-C9uZmhme.js} +1 -1
- package/build/assets/{plug-BuQhHSSG.js → plug-CG5HFcNG.js} +1 -1
- package/build/assets/plugins-management-service-BMJgC3Ga.js +1 -0
- package/build/assets/plus-C7Slq-0I.js +1 -0
- package/build/assets/profiles-service.api-ChoKrL0l.js +1 -0
- package/build/assets/providers-BhMcY5nv.js +1 -0
- package/build/assets/proxy-9Fe1v5na.js +1 -0
- package/build/assets/{puzzle-A9pGxxai.js → puzzle-JM_QaRm0.js} +1 -1
- package/build/assets/recommended-automations-launcher-6ABrI9Cy.js +1 -0
- package/build/assets/{refresh-cw-Bh69DyYO.js → refresh-cw-3q3Frrii.js} +1 -1
- package/build/assets/root-Dc8YmC9F.js +2 -0
- package/build/assets/root-VDaypvK4.css +1 -0
- package/build/assets/root-layout-CXkhSPYh.js +2 -0
- package/build/assets/schema-field-D-y9-LDb.js +1 -0
- package/build/assets/{sdk-section-page-HTffvm7Q.js → sdk-section-page-BlFiizlG.js} +1 -1
- package/build/assets/{secret-form-HTUbYw5o.js → secret-form-BB7the8W.js} +1 -1
- package/build/assets/secrets-service-ByZVENbp.js +1 -0
- package/build/assets/{secrets-settings-BizaTEr1.js → secrets-settings-B_GpxKW2.js} +1 -1
- package/build/assets/{settings-BlmrkwRi.js → settings-C0EWuBtA.js} +1 -1
- package/build/assets/settings-CKqk8ZnH.js +1 -0
- package/build/assets/{settings-dropdown-input-tM0A0ipy.js → settings-dropdown-input-BcwylHs2.js} +1 -1
- package/build/assets/{settings-index-CKq0b0Vg.js → settings-index-5w5UW2K3.js} +1 -1
- package/build/assets/{settings-input-C03KUoSC.js → settings-input-Db-1g8Ql.js} +1 -1
- package/build/assets/{settings-list-classes-BJ0g8rWj.js → settings-list-classes-BzeSZbF2.js} +1 -1
- package/build/assets/{settings-modal-AzEF1QPP.js → settings-modal-DfJ3tcJQ.js} +1 -1
- package/build/assets/settings-service.api-DJ1r62Zr.js +1 -0
- package/build/assets/{settings-switch-CQE0EGC-.js → settings-switch-CS-dJDmA.js} +1 -1
- package/build/assets/{settings-utils-ClYOkbbI.js → settings-utils-UYpEdPuD.js} +1 -1
- package/build/assets/shared-conversation-CA5ISEDy.js +1 -0
- package/build/assets/{shield-check-CFDViW82.js → shield-check-D2aCRd16.js} +1 -1
- package/build/assets/{sidebar-layout-D3hE08wK.js → sidebar-layout-D6fS8-Gl.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-BOtyJHwE.js → sidebar-mobile-menu-toggle-C_fb0Jki.js} +1 -1
- package/build/assets/sidebar-nav-link-DQQcMf1A.js +1 -0
- package/build/assets/{sidebar-onboarding-checklist-storage-3qYflszY.js → sidebar-onboarding-checklist-storage-BBkeI6Bp.js} +1 -1
- package/build/assets/sidebar-store-DGqHkVLw.js +1 -0
- package/build/assets/{skill-card-pill-row-CFxjoqxn.js → skill-card-pill-row-B27-xyig.js} +1 -1
- package/build/assets/skill-enablement-DXeaImBz.js +1 -0
- package/build/assets/skill-filter-w__3UCEE.js +2 -0
- package/build/assets/{skill-icon-badge-CPQJ6A-I.js → skill-icon-badge-RQkq8wvl.js} +1 -1
- package/build/assets/skill-scope-B42H-XOc.js +1 -0
- package/build/assets/skills-plugins-tgF8EiXC.js +1 -0
- package/build/assets/skills-settings-BgJ9PaOe.js +1 -0
- package/build/assets/{styled-tooltip-Dl06rkpY.js → styled-tooltip-C4jf5Fv9.js} +1 -1
- package/build/assets/{task-list-tab-04GNQuii.js → task-list-tab-C5zcaktH.js} +1 -1
- package/build/assets/{terminal-Cj0iHIW7.js → terminal-CNElN42a.js} +2 -2
- package/build/assets/{toggle-switch-Fd_QGz0r.js → toggle-switch-ChOLXv2n.js} +1 -1
- package/build/assets/{trash-2-Dl8_RGz0.js → trash-2-D7K26eDO.js} +1 -1
- package/build/assets/{trash-_RMt7Ayc.js → trash-D-HYiVYM.js} +1 -1
- package/build/assets/{triangle-alert-SM-q4NU_.js → triangle-alert-CtdXWHUI.js} +1 -1
- package/build/assets/{typography-SgFy466J.js → typography-v1KN0tzi.js} +1 -1
- package/build/assets/usage-tab-CVDffLPt.js +1 -0
- package/build/assets/use-acp-credential-form-XIQmpX6M.js +1 -0
- package/build/assets/{use-activate-agent-profile-B2NS8nA5.js → use-activate-agent-profile-BLfmvDiG.js} +1 -1
- package/build/assets/use-agent-profiles-Bd9Bvvp1.js +1 -0
- package/build/assets/{use-automation-health-BxXdzZMP.js → use-automation-health-E6NZi9rb.js} +1 -1
- package/build/assets/{use-automations-zYb0dUny.js → use-automations-xijQKIl9.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-BWMahtUh.js → use-can-manage-org-profiles-CrJP5262.js} +1 -1
- package/build/assets/use-canvas-extensions-Bi693ujJ.js +1 -0
- package/build/assets/{use-cloud-current-user-id-CPHMDG-C.js → use-cloud-current-user-id-CDfAHpPX.js} +1 -1
- package/build/assets/use-config-A9QovgXO.js +1 -0
- package/build/assets/{use-create-conversation-DwN5vv2f.js → use-create-conversation-Dx3l7mFZ.js} +1 -1
- package/build/assets/use-create-secret-B9cUFWRG.js +1 -0
- package/build/assets/{use-get-secrets-BT4ihRwj.js → use-get-secrets-K3jmk-LH.js} +1 -1
- package/build/assets/use-is-authed-nTBcM7dE.js +1 -0
- package/build/assets/use-llm-configured-BV9nZ1_j.js +1 -0
- package/build/assets/use-llm-profiles-BO-P4Oyo.js +1 -0
- package/build/assets/use-manifest-capabilities-Cw_flwEz.js +1 -0
- package/build/assets/use-onboarding-completion-D8U7k4Qb.js +1 -0
- package/build/assets/use-pinned-home-route-CckOZrmb.js +1 -0
- package/build/assets/use-plugins-marketplace-7i94Zu3Z.js +1 -0
- package/build/assets/use-save-agent-profile-BUjSsDXK.js +1 -0
- package/build/assets/{use-save-settings-CUZW6yXP.js → use-save-settings-DYqkKv7T.js} +1 -1
- package/build/assets/{use-settings-C5VhGpqd.js → use-settings-DSXLbvBl.js} +1 -1
- package/build/assets/{use-settings-nav-items-DHaUu1Dg.js → use-settings-nav-items-CwRw-CmX.js} +1 -1
- package/build/assets/use-tracking-D53y3TH9.js +3 -0
- package/build/assets/{use-user-conversation-DT0_QCnL.js → use-user-conversation-B9Gebw_g.js} +1 -1
- package/build/assets/{useInfiniteQuery-CgeUQPfs.js → useInfiniteQuery-C926xzY4.js} +1 -1
- package/build/assets/{useMutation-DFnzkf6f.js → useMutation-B-qc391N.js} +1 -1
- package/build/assets/{useQueries-BhbrGEf1.js → useQueries-DlbhlH9I.js} +1 -1
- package/build/assets/{useQuery-BXWbZBZl.js → useQuery-BSTgq1rl.js} +1 -1
- package/build/assets/utils-CN5ZfZy1.js +1 -0
- package/build/assets/{vendor~conversation-panel~conversation-CTvDDiXg.js → vendor~conversation-panel~conversation-C8Fn4XOf.js} +1 -1
- package/build/assets/{vendor~entry.client-BFE7Llz9.js → vendor~entry.client-CoCfUXUF.js} +1 -1
- package/build/assets/{vendor~entry.client-BaKt_PIp.js → vendor~entry.client-DA2izTjq.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js} +1 -1
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-BTyukeM-.js → vendor~index-home~home~conversation-panel~conversation-hWywRBaR.js} +1 -1
- package/build/assets/{vendor~root-layout-BlUaZ18v.js → vendor~root-layout-C9Ju9DQg.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-BYAWJwQX.js → vendor~root-layout~conversation-panel~conversation-BMbMgaGu.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-CHaLEBVR.js → vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-BWir3rJs.js} +1 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-j5MFqfSy.js +1 -0
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-cDuKr-WD.js +1 -0
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-Dtu7BpYk.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~nj1hli3r-DP9wmsjo.js} +2 -2
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-DonTKfQD.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-CUmIwQCN.js} +117 -13
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-BgxDvUcf.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C7HiY4Ae.js} +42 -3
- package/build/assets/{verification-settings-Bj6bo097.js → verification-settings-gw_q6vkL.js} +1 -1
- package/build/assets/{wrench-hi7Q13dF.js → wrench-CUEI1krB.js} +1 -1
- package/build/assets/{x-DkgltWa0.js → x-DJdhbdmt.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +32 -16
- package/build/locales/ca/openhands.json +32 -16
- package/build/locales/de/openhands.json +32 -16
- package/build/locales/en/openhands.json +32 -16
- package/build/locales/es/openhands.json +32 -16
- package/build/locales/fr/openhands.json +32 -16
- package/build/locales/it/openhands.json +32 -16
- package/build/locales/ja/openhands.json +32 -16
- package/build/locales/ko-KR/openhands.json +32 -16
- package/build/locales/no/openhands.json +32 -16
- package/build/locales/pt/openhands.json +32 -16
- package/build/locales/tr/openhands.json +32 -16
- package/build/locales/uk/openhands.json +32 -16
- package/build/locales/zh-CN/openhands.json +32 -16
- package/build/locales/zh-TW/openhands.json +32 -16
- package/config/defaults.json +9 -5
- package/dist/api/agent-profiles-service/profile-field-support.d.ts +26 -0
- package/dist/api/agent-server-adapter.cjs +3 -3
- package/dist/api/agent-server-adapter.cjs.map +1 -1
- package/dist/api/agent-server-adapter.js +118 -116
- package/dist/api/agent-server-adapter.js.map +1 -1
- package/dist/api/agent-server-compatibility.cjs +1 -1
- package/dist/api/agent-server-compatibility.cjs.map +1 -1
- package/dist/api/agent-server-compatibility.d.ts +21 -0
- package/dist/api/agent-server-compatibility.js +52 -38
- package/dist/api/agent-server-compatibility.js.map +1 -1
- package/dist/api/agent-server-config.cjs +1 -1
- package/dist/api/agent-server-config.cjs.map +1 -1
- package/dist/api/agent-server-config.d.ts +26 -0
- package/dist/api/agent-server-config.js +18 -5
- package/dist/api/agent-server-config.js.map +1 -1
- package/dist/api/canvas-extensions-service.cjs +1 -0
- package/dist/api/canvas-extensions-service.d.ts +22 -0
- package/dist/api/canvas-extensions-service.js +4 -0
- package/dist/api/cloud/conversation-service.api.cjs +1 -1
- package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
- package/dist/api/cloud/conversation-service.api.d.ts +6 -0
- package/dist/api/cloud/conversation-service.api.js +14 -6
- package/dist/api/cloud/conversation-service.api.js.map +1 -1
- package/dist/api/conversation-file-upload.api.cjs +1 -1
- package/dist/api/conversation-file-upload.api.js +10 -10
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +11 -0
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +129 -118
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/event-service/event-service.api.cjs +1 -1
- package/dist/api/event-service/event-service.api.js +12 -12
- package/dist/api/git-service/agent-server-git-service.api.cjs +1 -1
- package/dist/api/git-service/agent-server-git-service.api.js +8 -8
- package/dist/api/runtime-service/agent-server-runtime-service.cjs +1 -1
- package/dist/api/runtime-service/agent-server-runtime-service.js +8 -8
- package/dist/api/settings-service/settings-service.api.cjs +1 -1
- package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
- package/dist/api/settings-service/settings-service.api.d.ts +3 -2
- package/dist/api/settings-service/settings-service.api.js +2 -1
- package/dist/api/settings-service/settings-service.api.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/event-group.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/event-group.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/event-group.js +40 -36
- package/dist/components/conversation-events/chat/event-message-components/event-group.js.map +1 -1
- package/dist/components/features/automations/automation-card.cjs +1 -1
- package/dist/components/features/automations/automation-card.cjs.map +1 -1
- package/dist/components/features/automations/automation-card.js +114 -104
- package/dist/components/features/automations/automation-card.js.map +1 -1
- package/dist/components/features/automations/detail/run-phase.cjs +2 -0
- package/dist/components/features/automations/detail/run-phase.cjs.map +1 -0
- package/dist/components/features/automations/detail/run-phase.d.ts +89 -0
- package/dist/components/features/automations/detail/run-phase.js +72 -0
- package/dist/components/features/automations/detail/run-phase.js.map +1 -0
- package/dist/components/features/backends/backend-form-modal.cjs +1 -1
- package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
- package/dist/components/features/backends/backend-form-modal.js +5 -11
- package/dist/components/features/backends/backend-form-modal.js.map +1 -1
- package/dist/components/features/canvas-extensions/add-canvas-extension-modal.d.ts +6 -0
- package/dist/components/features/canvas-extensions/canvas-extension-card.d.ts +9 -0
- package/dist/components/features/canvas-extensions/canvas-extensions-runtime.cjs +2 -0
- package/dist/components/features/canvas-extensions/canvas-extensions-runtime.cjs.map +1 -0
- package/dist/components/features/canvas-extensions/canvas-extensions-runtime.d.ts +23 -0
- package/dist/components/features/canvas-extensions/canvas-extensions-runtime.js +19 -0
- package/dist/components/features/canvas-extensions/canvas-extensions-runtime.js.map +1 -0
- package/dist/components/features/chat/chat-interface.cjs +2 -2
- package/dist/components/features/chat/chat-interface.cjs.map +1 -1
- package/dist/components/features/chat/chat-interface.js +171 -168
- package/dist/components/features/chat/chat-interface.js.map +1 -1
- package/dist/components/features/chat/chat-markdown-path-code.cjs +3 -0
- package/dist/components/features/chat/chat-markdown-path-code.cjs.map +1 -0
- package/dist/components/features/chat/chat-markdown-path-code.d.ts +27 -0
- package/dist/components/features/chat/chat-markdown-path-code.js +72 -0
- package/dist/components/features/chat/chat-markdown-path-code.js.map +1 -0
- package/dist/components/features/chat/path-component.cjs +1 -1
- package/dist/components/features/chat/path-component.cjs.map +1 -1
- package/dist/components/features/chat/path-component.d.ts +8 -2
- package/dist/components/features/chat/path-component.js +33 -21
- package/dist/components/features/chat/path-component.js.map +1 -1
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs +1 -1
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.cjs.map +1 -1
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js +38 -43
- package/dist/components/features/chat/tool-visualizers/file-editor/file-editor.js.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.cjs.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.d.ts +8 -5
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js +22 -16
- package/dist/components/features/chat/tool-visualizers/primitives/file-path-chip.js.map +1 -1
- package/dist/components/features/chat/user-message-body.cjs +1 -1
- package/dist/components/features/chat/user-message-body.cjs.map +1 -1
- package/dist/components/features/chat/user-message-body.d.ts +4 -0
- package/dist/components/features/chat/user-message-body.js +30 -24
- package/dist/components/features/chat/user-message-body.js.map +1 -1
- package/dist/components/features/conversation/conversation-overview-skills-panel.cjs +1 -1
- package/dist/components/features/conversation/conversation-overview-skills-panel.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-overview-skills-panel.js +63 -81
- package/dist/components/features/conversation/conversation-overview-skills-panel.js.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js +50 -50
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.js.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.d.ts +1 -1
- package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.js +3 -3
- package/dist/components/features/conversation/conversation-tabs/drawer-vscode-link.js.map +1 -1
- package/dist/components/features/conversation-panel/skills-modal.cjs +1 -1
- package/dist/components/features/conversation-panel/skills-modal.cjs.map +1 -1
- package/dist/components/features/conversation-panel/skills-modal.js +29 -28
- package/dist/components/features/conversation-panel/skills-modal.js.map +1 -1
- package/dist/components/features/files-tab/file-content-viewer.cjs +1 -1
- package/dist/components/features/files-tab/file-content-viewer.js +5 -5
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +51 -29
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -1
- package/dist/components/features/onboarding/onboarding-host.d.ts +3 -4
- package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +5 -9
- package/dist/components/features/settings/acp-auth-status-banner.d.ts +23 -6
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +1 -0
- package/dist/components/features/settings/llm-profiles/provider-connection-modal.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/provider-connection-modal.js +3 -0
- package/dist/components/features/settings/sdk-settings/field-help.cjs +1 -1
- package/dist/components/features/settings/sdk-settings/field-help.cjs.map +1 -1
- package/dist/components/features/settings/sdk-settings/field-help.d.ts +1 -1
- package/dist/components/features/settings/sdk-settings/field-help.js +1 -1
- package/dist/components/features/settings/sdk-settings/field-help.js.map +1 -1
- package/dist/components/features/settings/sdk-settings/sdk-section-page.cjs +1 -1
- package/dist/components/features/settings/sdk-settings/sdk-section-page.js +6 -6
- package/dist/components/features/settings/sdk-settings/sdk-section-page.js.map +1 -1
- package/dist/components/features/sidebar/sidebar-nav-link.cjs +1 -1
- package/dist/components/features/sidebar/sidebar-nav-link.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar-nav-link.d.ts +10 -1
- package/dist/components/features/sidebar/sidebar-nav-link.js +54 -36
- package/dist/components/features/sidebar/sidebar-nav-link.js.map +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.js +143 -120
- package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
- package/dist/components/features/sidebar/sidebar.cjs +1 -1
- package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar.js +1 -1
- package/dist/components/features/sidebar/sidebar.js.map +1 -1
- package/dist/components/features/skills/build-skill-pills.cjs +1 -1
- package/dist/components/features/skills/build-skill-pills.cjs.map +1 -1
- package/dist/components/features/skills/build-skill-pills.js +60 -52
- package/dist/components/features/skills/build-skill-pills.js.map +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
- package/dist/components/features/skills/extensions-navigation.js +54 -43
- package/dist/components/features/skills/extensions-navigation.js.map +1 -1
- package/dist/components/features/skills/skill-filter.cjs +1 -1
- package/dist/components/features/skills/skill-filter.cjs.map +1 -1
- package/dist/components/features/skills/skill-filter.d.ts +8 -3
- package/dist/components/features/skills/skill-filter.js +69 -52
- package/dist/components/features/skills/skill-filter.js.map +1 -1
- package/dist/components/shared/modals/settings/settings-form.cjs +1 -1
- package/dist/components/shared/modals/settings/settings-form.js +8 -8
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +9 -5
- package/dist/config/defaults.js.map +1 -1
- package/dist/contexts/conversation-websocket-context.cjs +3 -3
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.js +5 -5
- package/dist/extensions/canvas-extension-module-loader.d.ts +11 -0
- package/dist/hooks/mutation/use-manage-canvas-extensions.d.ts +12 -0
- package/dist/hooks/query/concurrency-limiter.cjs +2 -0
- package/dist/hooks/query/concurrency-limiter.cjs.map +1 -0
- package/dist/hooks/query/concurrency-limiter.d.ts +22 -0
- package/dist/hooks/query/concurrency-limiter.js +29 -0
- package/dist/hooks/query/concurrency-limiter.js.map +1 -0
- package/dist/hooks/query/query-keys.cjs.map +1 -1
- package/dist/hooks/query/query-keys.d.ts +4 -0
- package/dist/hooks/query/query-keys.js.map +1 -1
- package/dist/hooks/query/use-active-conversation.cjs +1 -1
- package/dist/hooks/query/use-active-conversation.js +4 -4
- package/dist/hooks/query/use-automations.cjs.map +1 -1
- package/dist/hooks/query/use-automations.js.map +1 -1
- package/dist/hooks/query/use-backends-health.cjs +1 -1
- package/dist/hooks/query/use-backends-health.cjs.map +1 -1
- package/dist/hooks/query/use-backends-health.d.ts +1 -1
- package/dist/hooks/query/use-backends-health.js +50 -64
- package/dist/hooks/query/use-backends-health.js.map +1 -1
- package/dist/hooks/query/use-canvas-extensions.cjs +1 -0
- package/dist/hooks/query/use-canvas-extensions.d.ts +5 -0
- package/dist/hooks/query/use-canvas-extensions.js +3 -0
- package/dist/hooks/query/use-commit-changes.cjs +1 -1
- package/dist/hooks/query/use-commit-changes.js +4 -4
- package/dist/hooks/query/use-latest-automation-runs.cjs +1 -1
- package/dist/hooks/query/use-latest-automation-runs.js +1 -0
- package/dist/hooks/query/use-paginated-conversations.cjs +1 -1
- package/dist/hooks/query/use-paginated-conversations.cjs.map +1 -1
- package/dist/hooks/query/use-paginated-conversations.js +19 -16
- package/dist/hooks/query/use-paginated-conversations.js.map +1 -1
- package/dist/hooks/query/use-search-providers.cjs +1 -1
- package/dist/hooks/query/use-search-providers.cjs.map +1 -1
- package/dist/hooks/query/use-search-providers.js +17 -10
- package/dist/hooks/query/use-search-providers.js.map +1 -1
- package/dist/hooks/query/use-unified-get-git-changes.cjs +1 -1
- package/dist/hooks/query/use-unified-get-git-changes.js +4 -4
- package/dist/hooks/query/use-unified-git-commits.cjs +1 -1
- package/dist/hooks/query/use-unified-git-commits.js +4 -4
- package/dist/hooks/query/use-unified-git-diff.cjs +1 -1
- package/dist/hooks/query/use-unified-git-diff.js +4 -4
- package/dist/hooks/query/use-unified-vscode-url.cjs +1 -1
- package/dist/hooks/query/use-unified-vscode-url.cjs.map +1 -1
- package/dist/hooks/query/use-unified-vscode-url.d.ts +1 -0
- package/dist/hooks/query/use-unified-vscode-url.js +40 -26
- package/dist/hooks/query/use-unified-vscode-url.js.map +1 -1
- package/dist/hooks/query/use-workspace-file-content.cjs +1 -1
- package/dist/hooks/query/use-workspace-file-content.js +5 -5
- package/dist/hooks/query/use-workspace-files.cjs +1 -1
- package/dist/hooks/query/use-workspace-files.js +6 -6
- package/dist/hooks/use-acp-credential-form.d.ts +6 -0
- package/dist/hooks/use-conversation-overview-git-diff-stats.cjs +1 -1
- package/dist/hooks/use-conversation-overview-git-diff-stats.js +4 -4
- package/dist/hooks/use-pinned-home-route.cjs +2 -0
- package/dist/hooks/use-pinned-home-route.cjs.map +1 -0
- package/dist/hooks/use-pinned-home-route.d.ts +33 -0
- package/dist/hooks/use-pinned-home-route.js +34 -0
- package/dist/hooks/use-pinned-home-route.js.map +1 -0
- package/dist/hooks/use-skill-enablement.cjs +2 -0
- package/dist/hooks/use-skill-enablement.cjs.map +1 -0
- package/dist/hooks/use-skill-enablement.d.ts +14 -0
- package/dist/hooks/use-skill-enablement.js +80 -0
- package/dist/hooks/use-skill-enablement.js.map +1 -0
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +29 -13
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +3 -3
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +538 -266
- package/dist/i18n/translation.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +15 -14
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +1 -0
- package/dist/locales/ar/openhands.json +32 -16
- package/dist/locales/ca/openhands.json +32 -16
- package/dist/locales/de/openhands.json +32 -16
- package/dist/locales/en/openhands.json +32 -16
- package/dist/locales/es/openhands.json +32 -16
- package/dist/locales/fr/openhands.json +32 -16
- package/dist/locales/it/openhands.json +32 -16
- package/dist/locales/ja/openhands.json +32 -16
- package/dist/locales/ko-KR/openhands.json +32 -16
- package/dist/locales/no/openhands.json +32 -16
- package/dist/locales/pt/openhands.json +32 -16
- package/dist/locales/tr/openhands.json +32 -16
- package/dist/locales/uk/openhands.json +32 -16
- package/dist/locales/zh-CN/openhands.json +32 -16
- package/dist/locales/zh-TW/openhands.json +32 -16
- package/dist/manifests/automation-interface.cjs +1 -1
- package/dist/manifests/automation-interface.cjs.map +1 -1
- package/dist/manifests/automation-interface.d.ts +6 -0
- package/dist/manifests/automation-interface.js +11 -8
- package/dist/manifests/automation-interface.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/bundle-index.cjs +45 -4
- package/dist/node_modules/@openhands/extensions/automations/bundle-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/bundle-index.js +1 -1
- package/dist/node_modules/@openhands/extensions/automations/bundle-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.js +5 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js +5 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js +5 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js +5 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-bitbucket-pr/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-bitbucket-pr/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-bitbucket-pr/manifest.js +21 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-bitbucket-pr/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-gitlab-mr/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-gitlab-mr/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-gitlab-mr/manifest.js +21 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-gitlab-mr/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-bitbucket-pr/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-bitbucket-pr/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-bitbucket-pr/manifest.js +21 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-bitbucket-pr/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-github-pr/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-github-pr/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-github-pr/manifest.js +21 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-github-pr/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-gitlab-mr/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-gitlab-mr/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-gitlab-mr/manifest.js +21 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-issue-to-gitlab-mr/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.js +5 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/news-digest/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs +30 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js +65 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +21 -9
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js +2 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js +40 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js +74 -72
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.cjs +42 -3
- package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js +22 -3
- package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-conversation.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-conversation.js +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.js +8 -7
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/index.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/index.js +2 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/blocks.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/blocks.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/blocks.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/blocks.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/panels-top-left.js.map +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +3 -3
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +10 -0
- package/dist/routes/app-settings.cjs +1 -1
- package/dist/routes/app-settings.cjs.map +1 -1
- package/dist/routes/app-settings.js +7 -7
- package/dist/routes/files-tab.cjs +1 -1
- package/dist/routes/files-tab.cjs.map +1 -1
- package/dist/routes/files-tab.js +14 -14
- package/dist/routes/files-tab.js.map +1 -1
- package/dist/routes/llm-settings.cjs +1 -1
- package/dist/routes/llm-settings.cjs.map +1 -1
- package/dist/routes/llm-settings.js +122 -114
- package/dist/routes/llm-settings.js.map +1 -1
- package/dist/services/canvas-ui.cjs +1 -1
- package/dist/services/canvas-ui.cjs.map +1 -1
- package/dist/services/canvas-ui.d.ts +5 -0
- package/dist/services/canvas-ui.js +24 -10
- package/dist/services/canvas-ui.js.map +1 -1
- package/dist/services/settings.cjs +1 -1
- package/dist/services/settings.cjs.map +1 -1
- package/dist/services/settings.js +3 -2
- package/dist/services/settings.js.map +1 -1
- package/dist/types/automation.cjs.map +1 -1
- package/dist/types/automation.d.ts +20 -0
- package/dist/types/automation.js.map +1 -1
- package/dist/types/canvas-extension.cjs +2 -0
- package/dist/types/canvas-extension.cjs.map +1 -0
- package/dist/types/canvas-extension.d.ts +77 -0
- package/dist/types/canvas-extension.js +6 -0
- package/dist/types/canvas-extension.js.map +1 -0
- package/dist/types/settings.d.ts +7 -0
- package/dist/ui/help-link.cjs +1 -1
- package/dist/ui/help-link.cjs.map +1 -1
- package/dist/ui/help-link.d.ts +6 -1
- package/dist/ui/help-link.js +32 -18
- package/dist/ui/help-link.js.map +1 -1
- package/dist/utils/acp-auth-display.d.ts +35 -0
- package/dist/utils/cache-utils.cjs +1 -1
- package/dist/utils/cache-utils.js +5 -5
- package/dist/utils/format-model-name.cjs +1 -1
- package/dist/utils/format-model-name.cjs.map +1 -1
- package/dist/utils/format-model-name.d.ts +7 -3
- package/dist/utils/format-model-name.js +6 -11
- package/dist/utils/format-model-name.js.map +1 -1
- package/dist/utils/format-relative-time.cjs +1 -1
- package/dist/utils/format-relative-time.cjs.map +1 -1
- package/dist/utils/format-relative-time.d.ts +7 -0
- package/dist/utils/format-relative-time.js +7 -2
- package/dist/utils/format-relative-time.js.map +1 -1
- package/dist/utils/path-utils.cjs +1 -1
- package/dist/utils/path-utils.cjs.map +1 -1
- package/dist/utils/path-utils.d.ts +15 -3
- package/dist/utils/path-utils.js +29 -3
- package/dist/utils/path-utils.js.map +1 -1
- package/dist/utils/skill-enablement.cjs +2 -0
- package/dist/utils/skill-enablement.cjs.map +1 -0
- package/dist/utils/skill-enablement.d.ts +51 -0
- package/dist/utils/skill-enablement.js +31 -0
- package/dist/utils/skill-enablement.js.map +1 -0
- package/dist/utils/vscode-origin.cjs +2 -0
- package/dist/utils/vscode-origin.cjs.map +1 -0
- package/dist/utils/vscode-origin.d.ts +55 -0
- package/dist/utils/vscode-origin.js +27 -0
- package/dist/utils/vscode-origin.js.map +1 -0
- package/dist/utils/workspace-mode.d.ts +4 -0
- package/package.json +3 -3
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/check-translation-completeness.cjs +1 -0
- package/scripts/dev-extra-backend.mjs +28 -9
- package/scripts/dev-safe.mjs +81 -8
- package/scripts/dev-static.mjs +35 -37
- package/scripts/dev-with-automation.mjs +82 -1
- package/scripts/ingress.mjs +27 -1
- package/scripts/static-server.mjs +74 -1
- package/tools/canvas_ui_tool.py +19 -0
- package/build/assets/active-backend-context-DKFSMbn3.js +0 -2
- package/build/assets/agent-server-conversation-service.api-DozDKIW_.js +0 -86
- package/build/assets/agent-settings-351vXWc9.js +0 -2
- package/build/assets/agent-settings-Ce7BDZ6I.js +0 -1
- package/build/assets/alert-banner-Kyy1YWZU.js +0 -1
- package/build/assets/api-key-entry-screen-INIxqAMs.js +0 -1
- package/build/assets/automation-detail-DXDhUwPq.js +0 -3
- package/build/assets/automation-setup-route-FRr05f_g.js +0 -1
- package/build/assets/automations-list-CERuQWE6.js +0 -1
- package/build/assets/backend-form-modal-DK78-jn1.js +0 -1
- package/build/assets/browser-11etCQ04.js +0 -7
- package/build/assets/check-Cf2YoT90.js +0 -1
- package/build/assets/chevron-down-C3OQ-ehx.js +0 -1
- package/build/assets/chevron-right-CN1uUiJ1.js +0 -1
- package/build/assets/circle-check-g5yeGMd-.js +0 -1
- package/build/assets/command-menu-BZQ8S3Ke.js +0 -1
- package/build/assets/conversation-CchMzpGl.js +0 -1
- package/build/assets/conversation-Dpzftz57.js +0 -93
- package/build/assets/conversation-panel-CchMzpGl.js +0 -1
- package/build/assets/conversation-state-store-a9d2fxRc.js +0 -1
- package/build/assets/empty-state-CvaVahVr.js +0 -1
- package/build/assets/extensions-hub-CFduxBnk.js +0 -1
- package/build/assets/extensions-navigation-BeC224yX.js +0 -1
- package/build/assets/files-tab-CL3J9b3p.js +0 -1
- package/build/assets/format-model-name-BNPKVsIq.js +0 -1
- package/build/assets/get-git-path-DlAJa_i6.js +0 -1
- package/build/assets/git-repo-dropdown-DGMEhz7d.js +0 -1
- package/build/assets/home-BCGlNJCA.js +0 -1
- package/build/assets/home-DB1pRqTC.js +0 -1
- package/build/assets/home-automation-run-tooltip-CooFQRIG.js +0 -1
- package/build/assets/home-store-Dl1dPE58.js +0 -1
- package/build/assets/index-home-DB1pRqTC.js +0 -1
- package/build/assets/info-uYSVzX86.js +0 -1
- package/build/assets/install-server-modal-BbJdhzet.js +0 -1
- package/build/assets/kebab-menu-item-content-BYokkRHi.js +0 -1
- package/build/assets/list-filter-OFkpRrmi.js +0 -1
- package/build/assets/llm-not-configured-banner-BqqYnJ1t.js +0 -27
- package/build/assets/llm-settings-CnDbbmVW.js +0 -1
- package/build/assets/llm-settings-S8Yjg__1.js +0 -1
- package/build/assets/llm-subscription-service-BpPfzW4x.js +0 -1
- package/build/assets/loader-circle-nvrwthvj.js +0 -1
- package/build/assets/manage-backends-modal-BCUPswyl.js +0 -1
- package/build/assets/manifest-58597dde.js +0 -1
- package/build/assets/markdown-renderer-Cb2sBWtV.js +0 -8
- package/build/assets/messages-BTN5thLe.js +0 -40
- package/build/assets/onboarding-Cx_kaiD1.js +0 -1
- package/build/assets/onboarding-modal-vMwn7ihv.js +0 -1
- package/build/assets/plugins-management-service-BjYeF0b0.js +0 -1
- package/build/assets/plus-CEKne-Yp.js +0 -1
- package/build/assets/profiles-service.api-QB-T_u-g.js +0 -1
- package/build/assets/providers-FfSZ5TXP.js +0 -1
- package/build/assets/proxy-tcFL2yTQ.js +0 -1
- package/build/assets/recommended-automations-launcher-Bw8uC4V6.js +0 -1
- package/build/assets/root-BLeQfBEq.css +0 -1
- package/build/assets/root-ZKKYPR1Z.js +0 -2
- package/build/assets/root-layout-luJoE9IG.js +0 -2
- package/build/assets/schema-field-Csw5fhtN.js +0 -1
- package/build/assets/secrets-service-BTor9uAU.js +0 -1
- package/build/assets/settings-DcNPxz0v.js +0 -1
- package/build/assets/settings-service.api-B2agVfjL.js +0 -1
- package/build/assets/shared-conversation-B55pCyBG.js +0 -1
- package/build/assets/sidebar-nav-link-CPzhyHQg.js +0 -1
- package/build/assets/sidebar-store-DtpU7zaI.js +0 -1
- package/build/assets/skill-filter-CWZ5kjcg.js +0 -2
- package/build/assets/skill-scope-CV1dkAbW.js +0 -1
- package/build/assets/skills-plugins-DGHULTq6.js +0 -1
- package/build/assets/skills-settings-CM1lFv3e.js +0 -1
- package/build/assets/usage-tab-BcfWV6db.js +0 -1
- package/build/assets/use-acp-credential-form-BsSW5NHG.js +0 -1
- package/build/assets/use-agent-profiles-DWBPC0Si.js +0 -1
- package/build/assets/use-config-Bft35DOK.js +0 -1
- package/build/assets/use-create-secret-BSxJMxHp.js +0 -1
- package/build/assets/use-is-authed-CFGkY3-Z.js +0 -1
- package/build/assets/use-llm-configured-BI6obxsc.js +0 -1
- package/build/assets/use-llm-profiles-djGAhTWL.js +0 -1
- package/build/assets/use-manifest-capabilities-3z0-1G59.js +0 -1
- package/build/assets/use-onboarding-completion-BXpyUSsJ.js +0 -1
- package/build/assets/use-plugins-marketplace-DI4_pK56.js +0 -1
- package/build/assets/use-save-agent-profile-DdBSTdpN.js +0 -1
- package/build/assets/use-tracking-D5t9otIF.js +0 -3
- package/build/assets/utils-DaCIEEQP.js +0 -1
- package/build/assets/vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js +0 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-B2OLKL7N.js +0 -1
- package/dist/components/features/tips/random-tip.d.ts +0 -2
- package/dist/utils/tips.d.ts +0 -7
- package/dist/utils/workspace-relative-path.cjs +0 -2
- package/dist/utils/workspace-relative-path.cjs.map +0 -1
- package/dist/utils/workspace-relative-path.d.ts +0 -10
- package/dist/utils/workspace-relative-path.js +0 -22
- package/dist/utils/workspace-relative-path.js.map +0 -1
- /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew3u153i-rfV8mQ9m.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-rfV8mQ9m.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/manage-backends-modal-BCUPswyl.js","assets/rolldown-runtime-Cyuzqnbw.js","assets/vendor-styling-Ck5D_A2Q.js","assets/active-backend-context-DKFSMbn3.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew3u153i-rfV8mQ9m.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js","assets/utils-DaCIEEQP.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js","assets/useQuery-BXWbZBZl.js","assets/backend-form-modal-DK78-jn1.js","assets/chevron-down-C3OQ-ehx.js","assets/cloud-funnel-analytics-287iIERo.js","assets/info-uYSVzX86.js","assets/use-tracking-D5t9otIF.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-DonTKfQD.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-BgxDvUcf.js","assets/bot-C-0Wu7vQ.js","assets/proxy-tcFL2yTQ.js","assets/use-onboarding-completion-BXpyUSsJ.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-Dtu7BpYk.js","assets/useQueries-BhbrGEf1.js","assets/organization-service.api-C8XpQ0pM.js","assets/brand-button-Dxv6PDeN.js","assets/form-control-classes-CGw40z5h.js","assets/settings-input-C03KUoSC.js","assets/modal-backdrop-BSzNhM4r.js","assets/modal-body-CMOc2tLl.js","assets/modal-close-button-CkJ0Ktjj.js","assets/navigation-context-CQZwH_tC.js","assets/modal-classes-BAb4Y_BG.js","assets/pencil-Clh1Wjvh.js","assets/plus-CEKne-Yp.js","assets/refresh-cw-Bh69DyYO.js","assets/trash-2-Dl8_RGz0.js","assets/confirmation-modal-Bk4JRcCM.js","assets/use-cloud-current-user-id-CPHMDG-C.js","assets/api-key-entry-screen-INIxqAMs.js","assets/onboarding-modal-vMwn7ihv.js","assets/recommended-automations-launcher-Bw8uC4V6.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-B2OLKL7N.js","assets/conversation-store-Ca3ghXap.js","assets/secrets-service-BTor9uAU.js","assets/settings-service.api-B2agVfjL.js","assets/settings-DcNPxz0v.js","assets/install-server-modal-BbJdhzet.js","assets/useMutation-DFnzkf6f.js","assets/styled-tooltip-Dl06rkpY.js","assets/use-settings-C5VhGpqd.js","assets/mcp-marketplace-utils-C13fFccR.js","assets/skill-card-pill-row-CFxjoqxn.js","assets/extension-module-card-classes-DpeaYhYo.js","assets/circle-plus-check-toggle-CBh_qomE.js","assets/checkmark-XZyokq_Y.js","assets/x-mark-BopmFoBq.js","assets/use-create-conversation-DwN5vv2f.js","assets/agent-server-conversation-service.api-DozDKIW_.js","assets/profiles-service.api-QB-T_u-g.js","assets/llm-subscription-service-BpPfzW4x.js","assets/llm-subscription-DTqtBCWz.js","assets/acp-providers-BKvmTf82.js","assets/use-agent-profiles-DWBPC0Si.js","assets/plugins-management-service-BjYeF0b0.js","assets/use-llm-profiles-djGAhTWL.js","assets/use-create-secret-BSxJMxHp.js","assets/use-automations-zYb0dUny.js","assets/automation-C_eCrGyP.js","assets/scroll-fade-state-Dw-i4SGq.js","assets/chat-send-button-DWwR2cgI.js","assets/check-Cf2YoT90.js","assets/circle-check-g5yeGMd-.js","assets/loader-circle-nvrwthvj.js","assets/llm-settings-CnDbbmVW.js","assets/back-nav-button-Dm9tIjVf.js","assets/navigation-link-Bxo3-4vo.js","assets/map-provider-B9LTm23I.js","assets/external-link-DFpYunfj.js","assets/triangle-alert-SM-q4NU_.js","assets/use-can-manage-org-profiles-BWMahtUh.js","assets/dropdown-classes-DJe-E6MC.js","assets/badge-D4SqUCsR.js","assets/base-modal-C7_BDl_U.js","assets/sdk-section-page-HTffvm7Q.js","assets/switch-skeleton-DwOoCqaL.js","assets/schema-field-Csw5fhtN.js","assets/dist-Bl64nBZL.js","assets/settings-dropdown-input-tM0A0ipy.js","assets/settings-switch-CQE0EGC-.js","assets/toggle-switch-Fd_QGz0r.js","assets/use-is-authed-CFGkY3-Z.js","assets/typography-SgFy466J.js","assets/use-save-settings-CUZW6yXP.js","assets/copy-to-clipboard-button-Cjkswvnj.js","assets/copy-Drmhc2jD.js","assets/loading-spinner-0L3ZTToZ.js","assets/settings-section-header-context-BOJ_Fbak.js","assets/u-check-circle-BKn1spCL.js","assets/u-edit-DAkcF52u.js","assets/api-error-message-BJyfWp6p.js","assets/format-model-name-BNPKVsIq.js","assets/settings-list-classes-BJ0g8rWj.js","assets/use-acp-credential-form-BsSW5NHG.js","assets/use-get-secrets-BT4ihRwj.js","assets/openhands-logo-BS-Epajy.js","assets/sidebar-onboarding-checklist-storage-3qYflszY.js","assets/use-activate-agent-profile-B2NS8nA5.js","assets/use-save-agent-profile-DdBSTdpN.js","assets/terminal-BUpID2wS.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,xt as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{F as i,R as a,U as o,_ as s,g as c,l,p as u,u as d,z as f}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{n as p}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew3u153i-rfV8mQ9m.js";import{t as m}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js";import{M as h,w as g}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js";import{t as _}from"./useQuery-BXWbZBZl.js";import{r as v}from"./providers-FfSZ5TXP.js";import{Ct as y,Et as ee,Ht as b,J as x,Jt as S,K as te,L as C,St as w,Tt as T,V as E,_ as ne,jt as re,lt as D,n as O,r as k}from"./active-backend-context-DKFSMbn3.js";import{W as A}from"./utils-DaCIEEQP.js";import{n as j,o as M,r as N,t as P}from"./use-onboarding-completion-BXpyUSsJ.js";import{t as F}from"./loading-spinner-0L3ZTToZ.js";import{t as I}from"./use-config-Bft35DOK.js";import{n as L}from"./use-settings-C5VhGpqd.js";import{t as R}from"./use-save-settings-CUZW6yXP.js";import{t as z}from"./modal-backdrop-BSzNhM4r.js";import{n as B}from"./modal-body-CMOc2tLl.js";import{n as V,r as H}from"./base-modal-C7_BDl_U.js";import{t as U}from"./brand-button-Dxv6PDeN.js";import{t as W}from"./navigation-context-CQZwH_tC.js";import{i as G,n as K}from"./color-themes-DTj5Ylbr.js";var q=e(t(),1),ie=`/api/authenticate`,J=`/login`,Y=`returnTo`,ae=new Set([`localhost`,`127.0.0.1`,`::1`]);function oe(){return typeof window>`u`?`/`:`${window.location.pathname}${window.location.search}${window.location.hash}`}function se(){return typeof window>`u`?!1:ae.has(window.location.hostname)}function ce(){return w()===`cookie`&&!se()}async function le(){try{return await h.post(ie,null,{withCredentials:!0}),!0}catch(e){if(h.isAxiosError(e)&&e.response?.status===401)return!1;throw e}}function ue(e=oe()){return`${J}?${new URLSearchParams({[Y]:e}).toString()}`}function de(){typeof window>`u`||window.location.assign(ue())}var X=r();function fe({backend:e,onChoice:t}){let{t:n,ready:r}=m(b),i=M([e])[e.id]?.isConnected===!0,{data:a,isSuccess:o}=L(),{mutateAsync:s,isPending:c}=R(),[l,u]=q.useState(!1),[d,f]=q.useState(!1);q.useEffect(()=>{f(!1)},[e.id]);let p=i&&o&&a?.user_consents_to_analytics===null&&!d;return q.useEffect(()=>{if(r&&p){let e=setTimeout(()=>u(!0),50);return()=>clearTimeout(e)}u(!1)},[r,p]),!p||!l?null:(0,X.jsx)(z,{elevated:!0,"aria-label":n(A.TELEMETRY$CONSENT_TITLE),children:(0,X.jsx)(`form`,{"data-testid":`telemetry-consent-form`,onSubmit:async e=>{e.preventDefault();let n=new FormData(e.currentTarget).get(`analytics`)===`on`;try{await s({user_consents_to_analytics:n})}catch{return}f(!0),await ne(n?`granted`:`denied`),t?.(n)},className:`flex flex-col gap-2`,children:(0,X.jsxs)(B,{className:`border border-[var(--oh-border)]`,children:[(0,X.jsx)(H,{title:n(A.TELEMETRY$CONSENT_TITLE)}),(0,X.jsx)(V,{children:n(A.TELEMETRY$CONSENT_DESCRIPTION)}),(0,X.jsx)(`p`,{className:`text-xs text-neutral-400`,children:n(A.TELEMETRY$BACKEND_SCOPE,{name:e.name,host:e.host})}),(0,X.jsxs)(`label`,{className:`flex gap-2 items-center self-start text-sm cursor-pointer`,children:[(0,X.jsx)(`input`,{name:`analytics`,type:`checkbox`,defaultChecked:!0,className:`w-4 h-4 cursor-pointer`}),n(A.TELEMETRY$SEND_ANONYMOUS_DATA)]}),(0,X.jsx)(U,{testId:`confirm-telemetry-preferences`,type:`submit`,variant:`primary`,className:`w-full`,isDisabled:c,children:n(A.TELEMETRY$CONFIRM_PREFERENCES)})]})})})}function Z({onChoice:e}){let{backend:t}=O();return y()!==null||t.kind!==`local`?null:(0,X.jsx)(fe,{backend:t,onChoice:e})}function pe(){return q.useEffect(()=>{K(G())},[]),null}var me=q.lazy(()=>n(()=>import(`./manage-backends-modal-BCUPswyl.js`).then(e=>e.n).then(e=>({default:e.ManageBackendsModal})),__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]))),Q=q.lazy(()=>n(()=>import(`./api-key-entry-screen-INIxqAMs.js`),__vite__mapDeps([37,1,2,3,4,5,6,7,8,10,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]))),he=q.lazy(()=>n(()=>import(`./onboarding-modal-vMwn7ihv.js`).then(e=>e.n).then(e=>({default:e.OnboardingModal})),__vite__mapDeps([38,1,2,3,4,5,6,7,15,8,39,40,41,14,16,17,18,42,43,44,45,46,23,24,25,47,26,28,48,9,49,30,50,51,52,53,54,29,55,56,20,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,10,11,12,13,19,21,22,27,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107]))),ge=q.lazy(()=>n(()=>import(`./backend-form-modal-DK78-jn1.js`).then(e=>e.i).then(e=>({default:e.BackendFormModal})),__vite__mapDeps([10,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30])));function _e({children:e}){return(0,X.jsxs)(`html`,{lang:`en`,children:[(0,X.jsxs)(`head`,{children:[(0,X.jsx)(`meta`,{charSet:`utf-8`}),(0,X.jsx)(`meta`,{name:`viewport`,content:`width=device-width, initial-scale=1`}),(0,X.jsx)(d,{}),(0,X.jsx)(l,{})]}),(0,X.jsxs)(`body`,{"data-agent-server-ui":``,className:`m-0`,children:[(0,X.jsxs)(v,{contentClassName:`min-h-screen`,children:[(0,X.jsx)(pe,{}),e,(0,X.jsx)(g,{toastOptions:re}),(0,X.jsx)(`div`,{id:`modal-portal-exit`})]}),(0,X.jsx)(s,{}),(0,X.jsx)(c,{})]})]})}function $(){return(0,X.jsx)(`main`,{className:`min-h-screen bg-base px-6 py-10 text-white`,children:(0,X.jsx)(`div`,{className:`mx-auto flex min-h-screen max-w-6xl items-center justify-center`,children:(0,X.jsx)(`div`,{className:`rounded-3xl border border-white/10 bg-base/80 px-8 py-10 shadow-2xl`,children:(0,X.jsx)(F,{size:`large`})})})})}function ve(){let e=p(),t=q.useCallback(()=>{D()&&(E(),e.invalidateQueries({queryKey:C.WEB_CLIENT_CONFIG}))},[e]);return(0,X.jsx)(`main`,{"data-testid":`agent-server-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,X.jsx)(q.Suspense,{fallback:null,children:(0,X.jsx)(me,{onClose:t,recoveryMode:!0})})})}function ye({onClose:e}){let t=i(),n=a(),r=f(),o=t.pathname.match(/^\/conversations\/([^/]+)/)?.[1]??null,s=q.useMemo(()=>({currentPath:t.pathname,conversationId:o,isNavigating:!!r.location,navigate:(e,t)=>n(e,t)}),[o,t.pathname,n,r.location]);return y()===null?(0,X.jsx)(`main`,{"data-testid":`first-run-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,X.jsx)(W,{value:s,children:(0,X.jsx)(q.Suspense,{fallback:(0,X.jsx)($,{}),children:(0,X.jsx)(he,{onClose:e})})})}):(0,X.jsx)(`main`,{"data-testid":`first-run-onboarding-screen`,className:`min-h-screen bg-base`,children:(0,X.jsx)(q.Suspense,{fallback:(0,X.jsx)($,{}),children:(0,X.jsx)(ge,{mode:`add`,onClose:e,source:`manage_backends_modal`,hideCloseButton:!0})})})}var be=()=>[{rel:`icon`,type:`image/svg+xml`,href:S(`/favicon.svg`)}],xe=()=>[{title:`OpenHands`},{name:`description`,content:`Let's Start Building!`}],Se=o(function(){let e=T(),t=!!D()?.apiKey,n=e&&!t,{active:r}=k(),i=y(),a=w(),o=i!==null,s=o&&r.backend.kind===`cloud`&&ee(r.backend.host,i),{isCompleted:c,markCompleted:l}=P(),d=ce(),f=o?!d&&(!s||a!==`cookie`&&!c):!c,p=_({queryKey:C.MAIN_APP_COOKIE_AUTH,queryFn:le,enabled:d&&!f,retry:!1,staleTime:1e3*60*5,meta:{disableToast:!0}}),m=d&&!f&&p.isPending&&!p.isError,h=d&&p.data===!1,g=!d||p.data===!0||p.isError;q.useEffect(()=>{h&&de()},[h]);let v=I({enabled:!n&&!f&&g}),b=M(r.backend.kind===`cloud`&&g?[r.backend]:[])[r.backend.id],S=r.backend.kind===`cloud`&&b?.isConnected===!1&&N(b.lastError),E=r.backend.kind===`cloud`&&b?.disabled===!0&&j(b.lastError);return f?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ye,{onClose:l}),(0,X.jsx)(Z,{})]}):m||h?(0,X.jsx)($,{}):n||te(v.error)?(0,X.jsx)(q.Suspense,{fallback:(0,X.jsx)($,{}),children:(0,X.jsx)(Q,{})}):v.isPending||v.isLoading?(0,X.jsx)($,{}):S||E||x(v.error)?(0,X.jsx)(ve,{}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(u,{}),(0,X.jsx)(Z,{})]})});export{_e as Layout,Se as default,be as links,xe as meta};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/settings-modal-AzEF1QPP.js","assets/rolldown-runtime-Cyuzqnbw.js","assets/vendor-styling-Ck5D_A2Q.js","assets/active-backend-context-DKFSMbn3.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew3u153i-rfV8mQ9m.js","assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js","assets/utils-DaCIEEQP.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js","assets/llm-settings-CnDbbmVW.js","assets/useMutation-DFnzkf6f.js","assets/useQuery-BXWbZBZl.js","assets/back-nav-button-Dm9tIjVf.js","assets/navigation-link-Bxo3-4vo.js","assets/navigation-context-CQZwH_tC.js","assets/form-control-classes-CGw40z5h.js","assets/map-provider-B9LTm23I.js","assets/external-link-DFpYunfj.js","assets/info-uYSVzX86.js","assets/triangle-alert-SM-q4NU_.js","assets/proxy-tcFL2yTQ.js","assets/profiles-service.api-QB-T_u-g.js","assets/settings-service.api-B2agVfjL.js","assets/settings-DcNPxz0v.js","assets/llm-subscription-service-BpPfzW4x.js","assets/llm-subscription-DTqtBCWz.js","assets/use-can-manage-org-profiles-BWMahtUh.js","assets/organization-service.api-C8XpQ0pM.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-Dtu7BpYk.js","assets/dropdown-classes-DJe-E6MC.js","assets/badge-D4SqUCsR.js","assets/settings-input-C03KUoSC.js","assets/base-modal-C7_BDl_U.js","assets/modal-body-CMOc2tLl.js","assets/modal-classes-BAb4Y_BG.js","assets/modal-backdrop-BSzNhM4r.js","assets/brand-button-Dxv6PDeN.js","assets/sdk-section-page-HTffvm7Q.js","assets/switch-skeleton-DwOoCqaL.js","assets/schema-field-Csw5fhtN.js","assets/dist-Bl64nBZL.js","assets/settings-dropdown-input-tM0A0ipy.js","assets/settings-switch-CQE0EGC-.js","assets/toggle-switch-Fd_QGz0r.js","assets/use-is-authed-CFGkY3-Z.js","assets/typography-SgFy466J.js","assets/use-save-settings-CUZW6yXP.js","assets/use-tracking-D5t9otIF.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-DonTKfQD.js","assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-BgxDvUcf.js","assets/bot-C-0Wu7vQ.js","assets/use-settings-C5VhGpqd.js","assets/extension-module-card-classes-DpeaYhYo.js","assets/copy-to-clipboard-button-Cjkswvnj.js","assets/checkmark-XZyokq_Y.js","assets/copy-Drmhc2jD.js","assets/loading-spinner-0L3ZTToZ.js","assets/settings-section-header-context-BOJ_Fbak.js","assets/use-llm-profiles-djGAhTWL.js","assets/u-check-circle-BKn1spCL.js","assets/u-edit-DAkcF52u.js","assets/api-error-message-BJyfWp6p.js","assets/format-model-name-BNPKVsIq.js","assets/settings-list-classes-BJ0g8rWj.js","assets/settings-utils-ClYOkbbI.js","assets/manage-backends-modal-BCUPswyl.js","assets/backend-form-modal-DK78-jn1.js","assets/chevron-down-C3OQ-ehx.js","assets/cloud-funnel-analytics-287iIERo.js","assets/use-onboarding-completion-BXpyUSsJ.js","assets/useQueries-BhbrGEf1.js","assets/modal-close-button-CkJ0Ktjj.js","assets/pencil-Clh1Wjvh.js","assets/plus-CEKne-Yp.js","assets/refresh-cw-Bh69DyYO.js","assets/trash-2-Dl8_RGz0.js","assets/confirmation-modal-Bk4JRcCM.js","assets/use-cloud-current-user-id-CPHMDG-C.js","assets/environment-switch-overlay-CEKrFiMw.js","assets/environment-switch-store-DVQZLFbj.js","assets/alert-banner-Kyy1YWZU.js","assets/vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js","assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-DXqM7vqB.js","assets/iconBase-C2sR-uAp.js","assets/close-ScPlnwyq.js","assets/command-menu-BZQ8S3Ke.js","assets/wrench-hi7Q13dF.js","assets/sidebar-store-DtpU7zaI.js","assets/conversation-store-Ca3ghXap.js","assets/list-todo-Cuu-STFc.js","assets/x-DkgltWa0.js","assets/shield-check-CFDViW82.js","assets/context-menu-list-item-lVYETtY5.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as e,r as t}from"./rolldown-runtime-Cyuzqnbw.js";import{St as n,bt as r,i,xt as a,yt as o}from"./vendor-styling-Ck5D_A2Q.js";import{B as s,F as c,I as l,L as u,O as d,R as f,U as p,V as m,W as h,p as g,z as _}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{t as v}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js";import{t as y}from"./useInfiniteQuery-CgeUQPfs.js";import{t as b}from"./useQuery-BXWbZBZl.js";import{i as x}from"./recommended-automations-launcher-Bw8uC4V6.js";import{t as S}from"./vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-CHaLEBVR.js";import{Ct as C,E as w,Gt as T,H as E,Mt as D,Nt as O,_ as k,d as A,ft as j,g as M,i as N,l as P,n as F,r as I,u as ee,v as L,y as te}from"./active-backend-context-DKFSMbn3.js";import{C as R,D as z,E as B,W as V,t as H,w as U}from"./utils-DaCIEEQP.js";import{A as ne,C as re,D as ie,E as W,O as ae,S as oe,T as se,_ as ce,a as le,b as ue,c as de,d as fe,f as pe,g as me,h as he,i as ge,j as _e,k as ve,l as ye,m as be,n as xe,o as Se,p as Ce,r as we,s as Te,t as Ee,u as De,v as Oe,w as ke,x as Ae,y as je}from"./vendor~root-layout-BlUaZ18v.js";import{t as Me}from"./bot-C-0Wu7vQ.js";import{t as Ne}from"./check-Cf2YoT90.js";import{t as Pe}from"./chevron-down-C3OQ-ehx.js";import{n as Fe,r as Ie,t as Le}from"./vendor~root-layout~conversation-panel~conversation-BYAWJwQX.js";import{t as Re}from"./chevron-right-CN1uUiJ1.js";import{a as ze,i as Be,n as Ve,o as He,r as Ue,s as We,t as G}from"./key-Cn5za3rg.js";import{t as Ge}from"./circle-check-g5yeGMd-.js";import{r as Ke}from"./map-provider-B9LTm23I.js";import{t as qe}from"./external-link-DFpYunfj.js";import{_ as Je,a as Ye,c as Xe,d as Ze,f as Qe,g as $e,h as et,i as tt,l as nt,m as rt,o as it,p as at,s as ot,t as st,u as ct}from"./use-llm-configured-BI6obxsc.js";import{a as lt,c as ut,d as dt,f as ft,i as pt,l as mt,m as K,n as ht,o as gt,p as _t,r as vt,s as yt,t as bt,u as q}from"./onboarding-Cx_kaiD1.js";import{n as xt,r as St,t as Ct}from"./wrench-hi7Q13dF.js";import{a as wt,i as Tt,n as Et,r as Dt,t as Ot}from"./sidebar-store-DtpU7zaI.js";import{t as kt}from"./list-filter-OFkpRrmi.js";import{o as At,r as jt}from"./backend-form-modal-DK78-jn1.js";import{t as Mt}from"./mouse-pointer-click-CsgRs_-r.js";import{t as Nt}from"./plug-BuQhHSSG.js";import{t as Pt}from"./plus-CEKne-Yp.js";import{t as Ft}from"./refresh-cw-Bh69DyYO.js";import{n as It,t as Lt}from"./x-DkgltWa0.js";import{a as Rt}from"./llm-settings-CnDbbmVW.js";import{t as zt}from"./trash-2-Dl8_RGz0.js";import{n as Bt,r as Vt,t as J}from"./context-menu-list-item-lVYETtY5.js";import{o as Ht,t as Ut}from"./use-onboarding-completion-BXpyUSsJ.js";import{t as Wt}from"./loading-spinner-0L3ZTToZ.js";import{t as Gt}from"./use-config-Bft35DOK.js";import{A as Kt,E as qt,n as Jt,t as Yt,y as Xt}from"./use-tracking-D5t9otIF.js";import{l as Zt}from"./settings-service.api-B2agVfjL.js";import{n as Qt,t as $t}from"./use-settings-C5VhGpqd.js";import{t as en}from"./use-save-settings-CUZW6yXP.js";import{t as tn}from"./modal-backdrop-BSzNhM4r.js";import{n as nn}from"./modal-body-CMOc2tLl.js";import{i as rn,n as an,r as on}from"./base-modal-C7_BDl_U.js";import{_ as sn,c as cn}from"./form-control-classes-CGw40z5h.js";import{t as ln}from"./brand-button-Dxv6PDeN.js";import{n as un,t as dn}from"./navigation-context-CQZwH_tC.js";import{t as fn}from"./openhands-logo-BS-Epajy.js";import{t as pn}from"./navigation-link-Bxo3-4vo.js";import{a as mn,d as hn,f as gn,i as _n,l as vn,n as yn,r as bn,u as xn}from"./sidebar-layout-D3hE08wK.js";import{n as Sn,t as Cn}from"./sidebar-nav-link-CPzhyHQg.js";import{t as wn}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js";import{t as Tn}from"./styled-tooltip-Dl06rkpY.js";import{a as En,d as Dn,f as On,i as kn,l as An,n as jn,o as Mn,r as Nn,u as Pn}from"./dropdown-classes-DJe-E6MC.js";import{i as Fn,n as In}from"./settings-dropdown-input-tM0A0ipy.js";import{n as Ln,t as Rn}from"./use-cloud-current-user-id-CPHMDG-C.js";import{s as zn}from"./environment-switch-store-DVQZLFbj.js";import{_ as Bn,g as Vn,m as Hn,t as Un}from"./conversation-store-Ca3ghXap.js";import{t as Wn}from"./modal-close-button-CkJ0Ktjj.js";import{t as Gn}from"./manage-backends-modal-BCUPswyl.js";import{i as Kn,r as qn,t as Jn}from"./agent-server-conversation-service.api-DozDKIW_.js";import{c as Yn,d as Xn,u as Zn}from"./acp-providers-BKvmTf82.js";import{t as Qn}from"./use-is-authed-CFGkY3-Z.js";import{a as $n,i as er,n as tr,t as nr}from"./conversation-state-store-a9d2fxRc.js";import{a as rr,c as ir,d as ar,i as or,l as sr,o as cr,r as lr,s as ur,t as dr,u as fr}from"./sidebar-mobile-menu-toggle-BOtyJHwE.js";import{t as pr}from"./use-click-outside-element-W6Os4Nlb.js";import{t as mr}from"./use-llm-profiles-djGAhTWL.js";import{n as hr}from"./use-create-conversation-DwN5vv2f.js";import{t as gr}from"./format-time-delta-BIR5Os7T.js";import{r as _r,t as vr}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-DOuig0C0.js";import{a as yr,i as br,n as xr}from"./use-can-manage-org-profiles-BWMahtUh.js";import{t as Sr}from"./u-edit-DAkcF52u.js";import{t as Cr}from"./skills-B0IliMxw.js";import{i as wr}from"./format-model-name-BNPKVsIq.js";import{r as Tr}from"./onboarding-modal-vMwn7ihv.js";import{a as Er,o as Dr,t as Or}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-DXqM7vqB.js";import{m as kr}from"./install-server-modal-BbJdhzet.js";import{c as Ar,i as jr,n as Mr,r as Nr,s as Pr,t as Fr}from"./home-store-Dl1dPE58.js";import{t as Ir}from"./search-BatSpWed.js";import{_ as Lr,a as Rr,b as zr,c as Br,d as Vr,f as Hr,g as Ur,h as Wr,i as Gr,l as Kr,m as qr,n as Jr,o as Yr,p as Xr,s as Zr,t as Qr,u as $r,v as ei,y as ti}from"./sidebar-onboarding-checklist-storage-3qYflszY.js";import{n as ni,t as ri}from"./use-automation-health-BxXdzZMP.js";import{t as ii}from"./server-process-C9RKzd1x.js";import{t as ai}from"./use-automations-zYb0dUny.js";import{t as oi}from"./use-user-conversation-DT0_QCnL.js";var Y=e(n(),1),X=o(),si=46,ci=30;function li({className:e,logoClassName:t,logoWidth:n=si,logoHeight:r=ci}={}){let{t:i}=v(`openhands`);return(0,X.jsx)(pn,{to:`/conversations`,"aria-label":i(V.BRANDING$OPENHANDS_LOGO),className:H(e),children:(0,X.jsx)(fn,{width:n,height:r,className:H(`shrink-0`,t)})})}function ui(){return(0,X.jsx)(`div`,{className:`animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full`,"data-testid":`dropdown-loading`})}function di({onClear:e}){return(0,X.jsx)(`button`,{type:`button`,"data-testid":`dropdown-clear`,onClick:e,"aria-label":`Clear selection`,className:`text-white hover:text-[var(--oh-text-tertiary)]`,children:(0,X.jsx)(Lt,{size:14})})}function fi({isOpen:e,isDisabled:t,getToggleButtonProps:n}){return(0,X.jsx)(`button`,{type:`button`,"data-testid":`dropdown-trigger`,...n({disabled:t,className:H(Fn,`text-current`,e&&`rotate-180`,t&&`cursor-not-allowed`)}),children:(0,X.jsx)(In,{})})}function pi({isOpen:e,filteredOptions:t,selectedItem:n,emptyMessage:r,getMenuProps:i,getItemProps:a,footer:o,openUpward:s=!1,fitContent:c=!1}){return(0,X.jsxs)(`div`,{className:H(`absolute z-50 overflow-hidden text-white`,c?`min-w-full w-max`:`w-full`,s?`bottom-full mb-1`:`mt-1`,`bg-tertiary rounded-[6px] context-menu-box-shadow p-1`,`max-h-60 overflow-auto`,!e&&`hidden`),children:[(0,X.jsxs)(`ul`,{...i({className:H(`p-0`,kn)}),children:[e&&t.length===0&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[var(--oh-muted)] italic`,children:r}),e&&t.map((e,t)=>(0,X.jsxs)(`li`,{...a({item:e,index:t,className:H(Mn,`focus:outline-none`,n?.value===e.value&&`bg-[var(--oh-interactive-selected)] text-white`)}),children:[e.prefix?(0,X.jsx)(`span`,{className:Pn,children:e.prefix}):null,(0,X.jsx)(`span`,{className:`min-w-0 truncate`,children:e.label})]},e.value))]}),e&&o?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(rt,{inset:`menu`}),(0,X.jsx)(`div`,{className:`p-0`,children:o})]}):null]})}function mi({placeholder:e,isDisabled:t,getInputProps:n,italicPlaceholder:r=!0,fitContent:i=!1}){return(0,X.jsx)(`input`,{...n({placeholder:e,disabled:t,className:H(`outline-none bg-transparent text-white not-italic`,i?`w-auto field-sizing-content whitespace-nowrap text-sm`:`flex-1 min-w-0`,r&&`placeholder:italic placeholder:text-tertiary-alt`,!r&&`placeholder:text-tertiary-alt`,cn,`px-0 not-italic text-inherit`)})})}var hi={position:`absolute`,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,border:0};function gi({options:e,emptyMessage:t=`No options`,clearable:n=!1,loading:r=!1,disabled:i=!1,placeholder:a,defaultValue:o,onChange:s,testId:c,className:l,footer:u,openUpward:d=!1,hideTrigger:f=!1,defaultOpen:p=!1,openOnHover:m=!1,italicPlaceholder:h=!0,fitContent:g=!1}){let _=Y.useRef(null),[v,y]=(0,Y.useState)(o?.label??``),[b,x]=(0,Y.useState)(``);Y.useEffect(()=>()=>{_.current&&=(clearTimeout(_.current),null)},[]);let S=e.filter(e=>e.label.toLowerCase().includes(b.toLowerCase())),{isOpen:C,selectedItem:w,selectItem:T,openMenu:E,closeMenu:D,getToggleButtonProps:O,getMenuProps:k,getItemProps:A,getInputProps:j}=wn({items:S,itemToString:e=>e?.label??``,inputValue:v,stateReducer:(e,t)=>t.type===wn.stateChangeTypes.InputClick&&e.isOpen?{...t.changes,isOpen:!0}:t.changes,initialIsOpen:p,onInputValueChange:({inputValue:e})=>{y(e??``),x(e??``)},defaultSelectedItem:o,onSelectedItemChange:({selectedItem:e})=>{s?.(e??null)},onIsOpenChange:({isOpen:e,selectedItem:t})=>{e?(y(``),x(``)):(y(t?.label??``),x(``))}}),M=r||i,N=w?e.find(e=>e.value===w.value)??w:null,P=e=>j({...e,onChange:e=>{y(e.target.value),x(e.target.value)}});return(0,X.jsxs)(`div`,{className:H(`relative`,g?`inline-block w-auto`:`w-full`),"data-testid":c,onMouseEnter:m?()=>{_.current&&=(clearTimeout(_.current),null),E()}:void 0,onMouseLeave:m?()=>{_.current&&clearTimeout(_.current),_.current=setTimeout(()=>D(),150)}:void 0,children:[f?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`input`,{...P({"aria-label":a??`Filter options`,tabIndex:-1}),style:hi}),(0,X.jsx)(`button`,{type:`button`,...O({tabIndex:-1}),style:hi,"aria-hidden":!0})]}):(0,X.jsxs)(`div`,{className:H(On,g?`w-auto`:`w-full`,M&&`cursor-not-allowed opacity-60`,l),children:[N?.prefix?(0,X.jsx)(`span`,{className:`flex items-center shrink-0`,children:N.prefix}):null,(0,X.jsx)(mi,{placeholder:a,isDisabled:M,getInputProps:P,italicPlaceholder:h,fitContent:g}),r&&(0,X.jsx)(ui,{}),n&&w&&(0,X.jsx)(di,{onClear:()=>T(null)}),(0,X.jsx)(fi,{isOpen:C,isDisabled:M,getToggleButtonProps:O})]}),(0,X.jsx)(pi,{isOpen:C,filteredOptions:S,selectedItem:w,emptyMessage:t,getMenuProps:k,getItemProps:A,footer:u,openUpward:d,fitContent:g})]})}var _i=t({AddBackendModal:()=>vi});function vi({onClose:e}){return(0,X.jsx)(jt,{mode:`add`,onClose:e})}var yi=`::`;function bi(e,t){return t?`${e}${yi}${t}`:e}function xi(e){let[t,n]=e.split(yi);return{backendId:t,orgId:n??null}}function Si(e){return(0,X.jsx)(At,{isConnected:e?.isConnected??null})}function Ci(){return(0,X.jsx)(At,{isConnected:`unavailable`})}function wi(e,t,n,r,i){let a=[],o=e.filter(e=>e.kind===`local`),s=e.filter(e=>e.kind===`cloud`);for(let e of o)a.push({value:bi(e.id,null),label:e.name,prefix:Si(i[e.id])});for(let e of s){let o=n[e.id],s=Si(i[e.id]);if(!o||o.orgs.length===0)a.push({value:bi(e.id,null),label:e.name,prefix:s});else{let n=r[e.id]?.userId??null;for(let r of o.orgs){let i=n&&n===r.id?t:r.name;a.push({value:bi(e.id,r.id),label:`${e.name} – ${i}`,prefix:s})}}}return a}function Ti({openUpward:e=!1,hideTrigger:t=!1,defaultOpen:n=!1,onSelectOption:r,onOpenAddBackend:i,onOpenManageBackends:a,sidebarCollapsed:o=!1}={}){let{t:s}=v(`openhands`),{backends:c,active:u,setActive:d}=I(),p=Ln(),m=Rn(),h=Ht(c),g=f(),_=l(`/settings`),y=l(`/settings/*`),b=l(`/conversations/:conversationId`),x=l(`/automations/:automationId`),[S,w]=Y.useState(!1),[T,E]=Y.useState(!1),D=s(V.BACKEND$PERSONAL_WORKSPACE),O=Y.useMemo(()=>wi(c,D,p,m,h),[c,D,p,m,h]),k=j(u.backend),A=s(V.BACKEND$NO_BACKEND_AVAILABLE),M=bi(u.backend.id,u.orgId),N=k?void 0:O.find(e=>e.value===M),P=!!(_||y),F=s(V.SIDEBAR$SETTINGS),ee=Un(e=>e.isRightPanelShown),L=!o||b&&ee?`top`:`left`,te=Object.values(p).some(e=>e.isLoading);Y.useEffect(()=>{if(k||u.backend.kind!==`cloud`||u.orgId)return;let{backend:e}=u,t=p[e.id];if(!t||t.orgs.length===0)return;let n=t.currentOrgId?t.orgs.find(e=>e.id===t.currentOrgId):void 0,r=m[e.id]?.userId??null,i=r?t.orgs.find(e=>e.id===r):void 0,a=n??i??t.orgs[0];a&&d(e.id,a.id)},[u,p,m,d,k]);let R=Y.useCallback(()=>{if(i){i(),r?.();return}w(!0)},[i,r]),z=Y.useCallback(()=>{if(a){a(),r?.();return}E(!0)},[a,r]),B=C()!==null,U=Y.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),ne=Y.useCallback(e=>{U(e),R()},[R,U]),re=Y.useCallback(e=>{U(e),R()},[R,U]),ie=Y.useCallback(e=>{U(e),z()},[z,U]),W=Y.useCallback(e=>{U(e),z()},[z,U]),ae=(0,X.jsxs)(`div`,{className:kn,children:[B?null:(0,X.jsxs)(`button`,{type:`button`,"data-testid":`add-backend-menu-item`,onMouseDown:U,onTouchStart:U,onTouchEnd:re,onClick:ne,className:H(jn,`cursor-pointer rounded-md`),children:[(0,X.jsx)(`span`,{className:Pn,"aria-hidden":!0,children:(0,X.jsx)(Pt,{width:16,height:16})}),s(V.BACKEND$ADD)]}),(0,X.jsxs)(`button`,{type:`button`,"data-testid":`manage-backends-menu-item`,onMouseDown:U,onTouchStart:U,onTouchEnd:W,onClick:ie,className:H(jn,`cursor-pointer rounded-md`),children:[(0,X.jsx)(`span`,{className:Pn,"aria-hidden":!0,children:(0,X.jsx)(Dt,{width:16,height:16})}),s(B?V.BACKEND$RECONNECT_CLOUD:V.BACKEND$MANAGE)]})]}),oe=Y.useCallback(async e=>{if(e===M)return;let{backendId:t,orgId:n}=xi(e),i=c.find(e=>e.id===t);i&&(zn(O.find(t=>t.value===e)?.label??i.name),await new Promise(e=>{setTimeout(e,400)}),b?g(`/conversations`):x&&g(`/automations`),d(i.id,n),r?.())},[M,c,b,x,g,O,d,s,r]);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 w-full`,children:[(0,X.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,X.jsx)(gi,{testId:`backend-selector`,defaultValue:N??{value:M,label:k?A:u.backend.name,prefix:k?Ci():Si(h[u.backend.id])},footer:ae,openUpward:e,hideTrigger:t,defaultOpen:n,openOnHover:!t,onChange:e=>{e&&oe(e.value)},placeholder:k?A:u.backend.name,loading:te,options:O,className:`h-10 px-2 py-0 bg-transparent border-transparent hover:bg-[var(--oh-surface-raised)] focus-within:bg-[var(--oh-surface-raised)] focus-within:border-transparent focus-within:ring-0`},`${M}-${N?.label??``}`)}),t?null:(0,X.jsx)(Tn,{content:F,placement:L,offset:10,children:(0,X.jsx)(pn,{to:`/settings`,"data-testid":`backend-selector-settings-link`,"data-active":P,"aria-label":F,className:H(P?`inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md bg-tertiary text-white font-normal cursor-pointer`:`inline-flex items-center justify-center shrink-0 w-9 h-9 rounded-md text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)] cursor-pointer`,sn),children:(0,X.jsx)(Dt,{width:16,height:16})})})]}),S?(0,X.jsx)(vi,{onClose:()=>w(!1)}):null,T?(0,X.jsx)(Gn,{onClose:()=>E(!1)}):null]})}var Ei=`command-menu-trigger`,Di=18;function Oi({collapsed:e}){let{t}=v(`openhands`),n=Et(e=>e.open),r=t(V.COMMAND_MENU$OPEN_LABEL),i=(0,X.jsxs)(`button`,{type:`button`,"data-testid":Ei,"aria-label":r,onClick:n,className:H(gn({collapsed:e}),e?`cursor-pointer`:`group justify-between border border-[var(--oh-border-subtle)] bg-[var(--oh-surface)]/50 hover:border-[var(--oh-border)] hover:bg-[var(--oh-surface-raised)]`),children:[(0,X.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[e?(0,X.jsx)(Sn,{active:!1,children:(0,X.jsx)(It,{width:Di,height:Di})}):(0,X.jsx)(`span`,{className:H(mn,`text-[var(--oh-muted)] group-hover:text-white`),"aria-hidden":`true`,children:(0,X.jsx)(It,{width:Di,height:Di})}),(0,X.jsx)(`span`,{className:xn(e),children:r})]}),e?null:(0,X.jsx)(`kbd`,{className:`rounded-md border border-[var(--oh-border)] bg-black/20 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.12em] text-[var(--oh-text-dim)]`,children:t(V.COMMAND_MENU$SHORTCUT)})]});return e?(0,X.jsx)(Tn,{content:r,placement:`right`,children:i}):i}var ki=2e3,Ai=[`npm`,`docker`];function ji(e){return e===`npm`?V.SETTINGS$VERSION_NPM_RECOMMENDED:V.SETTINGS$VERSION_DOCKER}function Mi({tab:e}){return e===`npm`?(0,X.jsx)(Ve,{className:`size-4 shrink-0`,"aria-hidden":!0}):(0,X.jsx)(Ue,{className:`size-5 shrink-0`,"aria-hidden":!0})}function Ni({installedVersion:e,latestVersion:t,updateAvailable:n,isChecking:r,onCheckForUpdates:i,onClose:a}){let{t:o}=v(`openhands`),[s,c]=Y.useState(`npm`),[l,u]=Y.useState(!1),d=Y.useRef(null),f=s===`npm`?He.npm:He.docker;Y.useEffect(()=>()=>{d.current!==null&&window.clearTimeout(d.current)},[]),Y.useEffect(()=>{u(!1),d.current!==null&&(window.clearTimeout(d.current),d.current=null)},[s]);let p=Y.useCallback(()=>{navigator.clipboard?.writeText(f),u(!0),d.current!==null&&window.clearTimeout(d.current),d.current=window.setTimeout(()=>{u(!1),d.current=null},ki)},[f]);return(0,X.jsx)(tn,{onClose:a,"aria-label":o(V.SETTINGS$VERSION_MODAL_ARIA_LABEL),children:(0,X.jsxs)(`section`,{className:`relative flex w-[520px] max-w-[90vw] flex-col gap-5 rounded-xl border border-[var(--oh-border)] bg-base-secondary p-6 shadow-xl`,children:[(0,X.jsx)(Wn,{onClose:a,testId:`agent-canvas-version-modal-close`}),(0,X.jsxs)(`header`,{className:`flex items-center gap-3 pr-8`,children:[n?(0,X.jsx)(We,{className:`size-7 shrink-0 text-[#3B82F6]`,"aria-hidden":!0}):(0,X.jsx)(Ge,{className:`size-7 shrink-0 text-[var(--oh-status-success)]`,"aria-hidden":!0}),(0,X.jsx)(`h2`,{className:`text-base font-semibold leading-6 text-white`,children:o(n?V.SETTINGS$VERSION_UPDATE_AVAILABLE:V.SETTINGS$VERSION_UP_TO_DATE_TITLE)}),n&&t?(0,X.jsx)(`span`,{className:`rounded-full bg-[#1E3A5F] px-2 py-0.5 text-xs font-semibold text-[#3B82F6]`,children:t}):null]}),(0,X.jsx)(`div`,{className:`flex flex-col gap-1`,children:n&&t?(0,X.jsxs)(`p`,{className:`text-sm text-[var(--oh-text)]`,children:[o(V.SETTINGS$VERSION_UPDATE_MESSAGE,{installed:e,latest:t}),` `,(0,X.jsxs)(`a`,{href:ze,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 whitespace-nowrap font-medium text-white hover:text-[var(--oh-text)]`,children:[o(V.SETTINGS$VERSION_RELEASE_NOTES),(0,X.jsx)(qe,{className:`size-4 shrink-0`,"aria-hidden":!0})]})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`p`,{className:`text-sm text-[var(--oh-text)]`,children:o(V.SETTINGS$VERSION_INSTALLED,{version:e})}),t?(0,X.jsxs)(`p`,{className:`whitespace-nowrap text-sm text-[var(--oh-status-success)]`,children:[o(V.SETTINGS$VERSION_LATEST_MESSAGE),` `,(0,X.jsxs)(`a`,{href:ze,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 font-medium text-white hover:text-[var(--oh-text)]`,children:[o(V.SETTINGS$VERSION_RELEASE_NOTES),(0,X.jsx)(qe,{className:`size-4 shrink-0`,"aria-hidden":!0})]})]}):(0,X.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:o(V.SETTINGS$VERSION_CHECK_UNAVAILABLE)})]})}),n?(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`div`,{className:`flex justify-center`,children:Ai.map(e=>(0,X.jsxs)(`button`,{type:`button`,onClick:()=>c(e),className:H(`inline-flex items-center gap-1.5 px-3 pb-2 text-sm font-medium`,s===e?`border-b border-white text-white`:`text-[var(--oh-muted)] hover:text-white`),children:[(0,X.jsx)(Mi,{tab:e}),o(ji(e))]},e))}),(0,X.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-deep)] px-4 py-3`,children:[(0,X.jsx)(`code`,{className:`min-w-0 flex-1 overflow-visible whitespace-nowrap font-mono text-sm text-white`,children:f}),(0,X.jsx)(`button`,{type:`button`,onClick:p,"aria-label":o(l?V.BUTTON$COPIED:V.SETTINGS$VERSION_COPY_COMMAND),disabled:l,className:`shrink-0 text-[var(--oh-muted)] hover:text-white disabled:hover:text-[var(--oh-muted)]`,children:l?(0,X.jsx)(Ne,{className:`size-4 text-[var(--oh-status-success)]`,"aria-hidden":!0}):(0,X.jsx)(Ke,{className:`size-4`,"aria-hidden":!0})})]})]}):null,n?null:(0,X.jsx)(`div`,{className:`flex flex-wrap gap-x-8 gap-y-3`,children:(0,X.jsxs)(`button`,{type:`button`,onClick:i,className:`inline-flex items-center gap-2 text-sm font-medium text-white hover:text-[var(--oh-text)] disabled:cursor-wait disabled:text-[var(--oh-muted)]`,disabled:r,children:[o(V.SETTINGS$VERSION_CHECK_FOR_UPDATES),(0,X.jsx)(Ft,{className:H(`size-4 shrink-0`,r&&`animate-spin`),"aria-hidden":!0})]})})]})})}function Pi({className:e,hideWhenUpToDate:t=!1}){let{t:n}=v(`openhands`),[r,i]=Y.useState(!1),a=C()!==null,o=Be({enabled:!a});if(a)return null;let s=w,c=o.data??null,l=(c===null?null:E(c,s))===1;return t&&!l?null:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`button`,{type:`button`,"data-testid":`agent-canvas-version-tile`,onClick:()=>i(!0),"aria-label":n(V.SETTINGS$VERSION_TILE_ARIA_LABEL),className:H(`flex w-full items-center gap-3 rounded-md border border-[var(--oh-border)] bg-base-secondary px-3 py-2 text-left hover:bg-[var(--oh-surface-raised)]`,e),children:[(0,X.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,X.jsx)(`span`,{className:`block truncate text-sm font-semibold leading-5 text-white`,children:n(l?V.SETTINGS$VERSION_TILE_NEW_VERSION:V.SETTINGS$VERSION_PRODUCT_NAME)}),(0,X.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5 truncate text-xs leading-5`,children:[(0,X.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:n(V.SETTINGS$APP_UPDATE_VERSION_LABEL)}),(0,X.jsx)(`span`,{className:`truncate text-white`,children:l&&c?c:s})]})]}),l?(0,X.jsx)(We,{className:`size-5 shrink-0 text-[#3B82F6]`,"aria-hidden":!0}):(0,X.jsx)(Ge,{className:`size-5 shrink-0 text-[var(--oh-status-success)]`,"aria-hidden":!0})]}),r?(0,X.jsx)(Ni,{installedVersion:s,latestVersion:c,updateAvailable:l,isChecking:o.isFetching,onCheckForUpdates:()=>{o.refetch()},onClose:()=>i(!1)}):null]})}var Fi=(e=20)=>{let{data:t}=Qn(),n=F(),r=!j(n.backend);return y({queryKey:[`user`,`conversations`,`paginated`,e,n.backend.id,n.orgId],queryFn:async({pageParam:t})=>await Jn.searchConversations(e,t),enabled:!!t&&r,getNextPageParam:e=>e.next_page_id,initialPageParam:void 0,refetchInterval:3e4,meta:{backendId:n.backend.id}})},Ii=(e=10)=>b({queryKey:[`start-tasks`,`search`,e],queryFn:()=>[],select:e=>e.filter(e=>e.status!==`READY`&&e.status!==`ERROR`)});function Li({onConfirm:e,onCancel:t,conversationTitle:n}){let{t:r}=v(`openhands`),i=n!=null&&n!==``?(0,X.jsx)(S,{ns:`openhands`,i18nKey:V.CONVERSATION$ARCHIVE_WARNING_WITH_TITLE,values:{title:n},components:{title:(0,X.jsx)(`span`,{className:`text-white`})}}):r(V.CONVERSATION$ARCHIVE_WARNING);return(0,X.jsx)(tn,{onClose:t,children:(0,X.jsxs)(nn,{className:`items-start border border-[var(--oh-border)]`,children:[(0,X.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,X.jsx)(on,{title:r(V.CONVERSATION$CONFIRM_ARCHIVE)}),(0,X.jsx)(an,{children:i})]}),(0,X.jsxs)(`div`,{className:`flex justify-end gap-2 w-full`,onClick:e=>e.stopPropagation(),children:[(0,X.jsx)(ln,{type:`button`,variant:`secondary`,onClick:t,testId:`cancel-button`,children:r(V.BUTTON$CANCEL)}),(0,X.jsx)(ln,{type:`button`,variant:`primary`,onClick:e,testId:`confirm-button`,children:r(V.ACTION$CONFIRM_ARCHIVE)})]})]})})}function Ri({onConfirm:e,onClose:t,onCancel:n}){let{t:r}=v(`openhands`);return(0,X.jsx)(tn,{onClose:n,children:(0,X.jsxs)(nn,{testID:`confirm-new-conversation-modal`,children:[(0,X.jsx)(on,{title:r(V.CONVERSATION$EXIT_WARNING)}),(0,X.jsxs)(`div`,{className:`flex w-full justify-end gap-2`,children:[(0,X.jsx)(rn,{text:r(V.BUTTON$CANCEL),onClick:t,className:`bg-tertiary`}),(0,X.jsx)(rn,{text:r(V.ACTION$CONFIRM),onClick:e,className:`bg-[#C63143]`})]})]})})}var zi=[`[@media(hover:hover)_and_(pointer:fine)]:pointer-events-none`,`[@media(hover:hover)_and_(pointer:fine)]:invisible`,`[@media(hover:hover)_and_(pointer:fine)]:opacity-0`,`[@media(hover:hover)_and_(pointer:fine)]:group-hover:pointer-events-auto`,`[@media(hover:hover)_and_(pointer:fine)]:group-hover:visible`,`[@media(hover:hover)_and_(pointer:fine)]:group-hover:opacity-100`,`[@media(hover:hover)_and_(pointer:fine)]:group-focus-within:pointer-events-auto`,`[@media(hover:hover)_and_(pointer:fine)]:group-focus-within:visible`,`[@media(hover:hover)_and_(pointer:fine)]:group-focus-within:opacity-100`],Bi=[`[@media(hover:hover)_and_(pointer:fine)]:opacity-100`,`[@media(hover:hover)_and_(pointer:fine)]:group-hover:opacity-0`,`[@media(hover:hover)_and_(pointer:fine)]:group-focus-within:opacity-0`],Vi=[`[@media(hover:hover)_and_(pointer:fine)]:min-w-0`,`[@media(hover:hover)_and_(pointer:fine)]:group-hover:min-w-[3.75rem]`,`[@media(hover:hover)_and_(pointer:fine)]:group-focus-within:min-w-[3.75rem]`],Hi=[`[@media(hover:hover)_and_(pointer:fine)]:flex`,`[@media(hover:hover)_and_(pointer:fine)]:group-hover:hidden`,`[@media(hover:hover)_and_(pointer:fine)]:group-focus-within:hidden`];function Ui(e=!1){return e?`pointer-events-auto visible opacity-100`:H(`pointer-events-auto visible opacity-100`,...zi)}function Wi(e=!1){return e?`opacity-0`:H(`opacity-0`,...Bi)}function Gi(e=!1){return e?`min-w-[3.75rem]`:H(`min-w-[3.75rem]`,...Vi)}function Ki(e=!1){return e?`hidden`:H(`hidden`,...Hi)}function qi({titleMode:e,title:t,onSave:n,isConversationArchived:r}){return e===`edit`?(0,X.jsx)(`input`,{autoFocus:!0,"data-testid":`conversation-card-title`,onClick:e=>{e.preventDefault(),e.stopPropagation()},onBlur:e=>{n(e.currentTarget?.value?.trim?.()??``)},onKeyUp:e=>{e.nativeEvent.isComposing||e.key===`Enter`&&e.currentTarget.blur()},type:`text`,defaultValue:t,className:`text-sm leading-6 font-semibold bg-transparent w-full`}):(0,X.jsx)(`p`,{"data-testid":`conversation-card-title`,className:H(`text-xs leading-6 font-semibold bg-transparent truncate overflow-hidden`,r&&`opacity-60`),children:t})}var Ji=e=>{switch(e){case z.FINISHED:return`check`;case z.RUNNING:return`working`;case z.IDLE:case z.WAITING_FOR_CONFIRMATION:return`active`;case z.PAUSED:return`paused`;case z.ERROR:case z.STUCK:return`error`;default:return`unknown`}},Yi=(e,t)=>{if(t)return`COMMON$ARCHIVED`;switch(e){case`check`:return`COMMON$FINISHED`;case`working`:case`active`:return`COMMON$WORKING`;case`paused`:return`COMMON$PAUSED`;case`error`:return`COMMON$ERROR`;default:return`COMMON$STOPPED`}};function Xi(e){switch(e){case`check`:return(0,X.jsx)(`svg`,{"data-testid":`conversation-status-check`,viewBox:`0 0 12 12`,className:`w-2.5 h-2.5 stroke-[var(--oh-status-success)]`,fill:`none`,strokeWidth:2.25,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,X.jsx)(`path`,{d:`M2.5 6.5 5 9l4.5-5.5`})});case`working`:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-working`,className:`w-1.5 h-1.5 rounded-full animate-pulse bg-[var(--oh-status-success)]`});case`active`:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-active`,className:`w-1.5 h-1.5 rounded-full bg-[var(--oh-status-success)]`});case`paused`:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-paused`,className:`w-1.5 h-1.5 rounded-full bg-[var(--oh-muted)]`});case`error`:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-error`,className:`w-1.5 h-1.5 rounded-full bg-[var(--oh-status-error)]`});default:return(0,X.jsx)(`span`,{"data-testid":`conversation-status-unknown`,className:`w-1.5 h-1.5 rounded-full bg-[var(--oh-color-tertiary)]`})}}function Zi({executionStatus:e,sandboxStatus:t,showTooltip:n=!0}){let{t:r}=v(`openhands`),i=t===`MISSING`,a=t===`ERROR`?`error`:i?`paused`:Ji(e),o=r(Yi(a,i)),s=(0,X.jsx)(`div`,{className:`w-2.5 h-2.5 flex items-center justify-center shrink-0`,children:i?(0,X.jsx)(vr,{"data-testid":`conversation-status-archived`,size:10,className:`shrink-0 text-[var(--oh-muted)] opacity-60`,"aria-hidden":!0}):Xi(a)});return n?(0,X.jsx)(Tn,{content:o,placement:`right`,showArrow:!0,tooltipClassName:`bg-base text-white text-xs shadow-lg`,children:s}):s}function Qi({title:e,titleMode:t,onTitleSave:n,executionStatus:r,sandboxStatus:i}){let a=ct(i);return(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0 overflow-hidden`,children:[r!==void 0&&(0,X.jsx)(`div`,{className:`flex w-[18px] shrink-0 items-center justify-center`,children:(0,X.jsx)(Zi,{executionStatus:r,sandboxStatus:i,showTooltip:!1})}),(0,X.jsx)(qi,{title:e,titleMode:t,onSave:n,isConversationArchived:a})]})}var $i=e(r(),1);function ea({onClose:e,onDelete:t,onArchive:n,onUnarchive:r,onStop:i,onEdit:a,onDisplayCost:o,onShowAgentTools:s,onShowSkills:c,onDownloadViaVSCode:l,onDownloadConversation:u,position:d=`bottom`,floatingStyle:f,ignoreOutsideClickRef:p}){let{t:m}=v(`openhands`),{backend:h}=F(),g=pr(e,p),_=h.kind===`cloud`?V.COMMON$CLOSE_CONVERSATION_STOP_RUNTIME:V.COMMON$STOP_CONVERSATION,y=(0,Y.useCallback)((e,t,n)=>{let r=e.filter(e=>e!=null);return r.length>0?n?(0,X.jsx)(Y.Fragment,{children:r},t):(0,X.jsxs)(Y.Fragment,{children:[r,(0,X.jsx)(rt,{inset:`menu`})]},t):null},[]),b=f!=null;return(0,X.jsxs)(Bt,{ref:g,testId:`context-menu`,style:b?f:void 0,theme:b?`popover`:`default`,position:b?`none`:d,alignment:b?`none`:`right`,spacing:b?`none`:`default`,className:b?`mt-0 min-w-[200px] w-max max-w-[min(280px,100vw-16px)]`:`z-[200] mt-0`,children:[y([a&&(0,X.jsx)(J,{testId:`edit-button`,onClick:a,children:(0,X.jsx)(yr,{icon:(0,X.jsx)(Sr,{width:16,height:16}),text:m(V.BUTTON$RENAME)})},`edit-button`)],`edit-section`),y([s&&(0,X.jsx)(J,{testId:`show-agent-tools-button`,onClick:s,children:(0,X.jsx)(yr,{icon:(0,X.jsx)(nt,{width:16,height:16}),text:m(V.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)})},`show-agent-tools-button`),c&&(0,X.jsx)(J,{testId:`show-skills-button`,onClick:c,children:(0,X.jsx)(yr,{icon:(0,X.jsx)(Cr,{width:16,height:16,className:`stroke-[1.75]`,"aria-hidden":!0}),text:m(V.CONVERSATION$SHOW_SKILLS)})},`show-skills-button`)],`tools-section`),y([i&&(0,X.jsx)(J,{testId:`stop-button`,onClick:i,children:(0,X.jsx)(yr,{icon:(0,X.jsx)(Xe,{width:16,height:16}),text:m(_)})},`stop-button`),l&&(0,X.jsx)(J,{testId:`download-vscode-button`,onClick:l,children:(0,X.jsx)(yr,{icon:(0,X.jsx)(ur,{width:16,height:16}),text:m(V.BUTTON$DOWNLOAD_VIA_VSCODE)})},`download-vscode-button`),u&&(0,X.jsx)(J,{testId:`download-trajectory-button`,onClick:u,children:(0,X.jsx)(yr,{icon:(0,X.jsx)(ur,{width:16,height:16}),text:m(V.BUTTON$DOWNLOAD_CONVERSATION_DATA)})},`download-trajectory-button`)],`control-section`),y([o&&(0,X.jsx)(J,{testId:`display-cost-button`,onClick:o,children:(0,X.jsx)(yr,{icon:(0,X.jsx)($e,{size:16}),text:m(V.BUTTON$DISPLAY_COST)})},`display-cost-button`),n&&(0,X.jsx)(J,{testId:`archive-button`,onClick:n,children:(0,X.jsx)(yr,{icon:(0,X.jsx)(ne,{className:`h-4 w-4`,"aria-hidden":!0}),text:m(V.COMMON$ARCHIVE_CONVERSATION)})},`archive-button`),r&&(0,X.jsx)(J,{testId:`unarchive-button`,onClick:r,children:(0,X.jsx)(yr,{icon:(0,X.jsx)(_e,{className:`h-4 w-4`,"aria-hidden":!0}),text:m(V.COMMON$UNARCHIVE_CONVERSATION)})},`unarchive-button`),t&&(0,X.jsx)(J,{testId:`delete-button`,onClick:t,children:(0,X.jsx)(yr,{icon:(0,X.jsx)(br,{width:16,height:16}),text:m(V.COMMON$DELETE_CONVERSATION)})},`delete-button`)],`info-section`,!0)]})}function ta({contextMenuOpen:e,onContextMenuToggle:t,onDelete:n,onArchive:r,onUnarchive:i,onStop:a,onEdit:o,onDownloadViaVSCode:s,onDownloadConversation:c,executionStatus:l,conversationId:u,showOptions:d}){let{t:f}=v(`openhands`),p=B(l),m=U(l),h=(0,Y.useRef)(null),[,g]=(0,Y.useReducer)(e=>e+1,0);(0,Y.useLayoutEffect)(()=>{if(!e)return;g();let t=0,n=()=>{t||=window.requestAnimationFrame(()=>{t=0,g()})};return window.addEventListener(`resize`,n),window.addEventListener(`scroll`,n,!0),()=>{t&&window.cancelAnimationFrame(t),window.removeEventListener(`resize`,n),window.removeEventListener(`scroll`,n,!0)}},[e]);let _=(()=>{if(!e||!h.current)return;let t=h.current.getBoundingClientRect(),n=Number(window.innerWidth)||0,r=Number(window.innerHeight)||0,i=Number(t.bottom)||0,a=Number(t.right)||0;return{position:`fixed`,top:i+320+8>r?Math.max(8,t.top-320-4):i+4,right:Math.max(8,n-a),zIndex:1e5}})(),y=typeof document<`u`?document.body:null;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(xr,{ref:h,onClick:n=>{n.preventDefault(),n.stopPropagation(),t(!e)},ariaLabel:f(V.COMMON$MORE_OPTIONS),className:H(p&&`opacity-60`)}),e&&_&&y?(0,$i.createPortal)((0,X.jsx)(ea,{ignoreOutsideClickRef:h,floatingStyle:_,onClose:()=>t(!1),onDelete:n,onArchive:r,onUnarchive:i,onStop:m?a:void 0,onEdit:o,onDownloadViaVSCode:u&&d?s:void 0,onDownloadConversation:u?c:void 0,position:`bottom`}),y):null]})}var na=`inline-flex max-w-full min-w-0 shrink-0 items-center gap-0.5 rounded-sm bg-[var(--oh-surface-raised)] px-1 py-px text-[10px] leading-4 text-[var(--oh-muted)]`,ra=`inline-flex h-4 w-3 shrink-0 items-center justify-center [&_svg]:block`,ia=`h-3 w-3`,aa=H(na,`shrink`),oa={bitbucket:Or,bitbucket_data_center:Or,github:Er,gitlab:Dr};function sa({selectedRepository:e}){let t=e.git_provider?oa[e.git_provider]:null,n=e.selected_repository,r=e.selected_branch;return(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1 overflow-hidden`,children:[n?(0,X.jsxs)(`span`,{"data-testid":`conversation-card-selected-repository`,title:n,className:aa,children:[(t||e.git_provider===`azure_devops`)&&(0,X.jsx)(`span`,{className:`inline-flex h-4 w-3 shrink-0 items-center justify-center [&_svg]:block`,"aria-hidden":!0,children:t?(0,X.jsx)(t,{className:`h-3 w-3`}):(0,X.jsx)(ot,{className:`h-3 w-3`})}),(0,X.jsx)(`span`,{className:`truncate leading-4`,children:n})]}):null,r?(0,X.jsxs)(`span`,{"data-testid":`conversation-card-selected-branch`,title:r,className:aa,children:[(0,X.jsx)(`span`,{className:ra,"aria-hidden":!0,children:(0,X.jsx)(_r,{className:ia})}),(0,X.jsx)(`span`,{className:`truncate leading-4`,children:r})]}):null]})}function ca({workspaceWorkingDir:e}){let{t}=v(`openhands`),n=e?tr(e).trim():``;return n?(0,X.jsxs)(`span`,{"data-testid":`conversation-card-workspace-folder`,className:na,title:e??void 0,children:[(0,X.jsx)(`span`,{className:ra,"aria-hidden":!0,children:(0,X.jsx)(K,{className:ia})}),(0,X.jsx)(`span`,{className:`truncate leading-4`,children:n})]}):(0,X.jsxs)(`span`,{"data-testid":`conversation-card-no-repository`,className:na,children:[(0,X.jsx)(`span`,{className:ra,"aria-hidden":!0,children:(0,X.jsx)(er,{className:ia})}),(0,X.jsx)(`span`,{className:`truncate leading-4`,children:t(V.COMMON$NO_REPOSITORY)})]})}function la(e){switch(e.trim().toLowerCase()){case`git_provider`:return`git`;case`repo_name`:case`repo`:case`repository`:return`repo`;case`selected_branch`:case`branch`:return`branch`;case`archiveworkspacepath`:case`workspace`:case`working_dir`:return`workspace`;case`appmode`:case`app_mode`:case`mode`:return`app_mode`;case`worktools`:case`work_tools`:case`tools`:return`work_tools`;case`workwsid`:case`work_wsid`:case`wsid`:case`workspace_id`:return`work_wsid`;default:return`other`}}function ua(e){let t=e.trim();if(!t)return t;let n=t.replace(/[_-]+/g,` `).replace(/\s+/g,` `);return n.charAt(0).toUpperCase()+n.slice(1)}function da(e,t){switch(la(e)){case`git`:return t(V.CONVERSATION_PANEL$PREVIEW_GIT);case`repo`:return t(V.CONVERSATION_PANEL$PREVIEW_REPO);case`branch`:return t(V.CONVERSATION_PANEL$PREVIEW_BRANCH);case`workspace`:return t(V.CONVERSATION_PANEL$PREVIEW_WORKSPACE);case`app_mode`:return t(V.CONVERSATION_PANEL$PREVIEW_APP_MODE);case`work_tools`:return t(V.CONVERSATION_PANEL$PREVIEW_WORK_TOOLS);case`work_wsid`:return t(V.CONVERSATION_PANEL$PREVIEW_WORK_WSID);default:return ua(e)}}function fa(e,t,n){return`${da(e,n)}: ${t}`}function pa(e,t=14){let n=Array.from(e);return n.length<=t?e:t<=1?`…`:`${n.slice(0,t-1).join(``)}…`}function ma(e,t,n={}){let r=n.gapPx??4,i=n.overflowWidthPx??36;if(e.length===0)return 0;if(t<=0)return e.length;let a=0;for(let n=0;n<e.length;n+=1){let o=e[n],s=n>0?r:0,c=e.length-n-1>0?i+r:0;if(a+s+o+c>t)return n;a+=s+o}return e.length}var ha=new Set([`origin`,`source`,`git_provider`]),ga=new Set([`appmode`,`app_mode`,`mode`]),_a={origin:xe,source:pe,git_provider:Er,owner:se,user:se,author:se,assignee:se,env:oe,environment:oe,repo:Fe,repository:Fe,repo_name:Fe,branch:et,selected_branch:et,archiveworkspacepath:K,workspace:K,working_dir:K,team:we,org:ie,organization:ie,channel:he,email:fe,automation:Vt,webhook:Ee,agent:Me,project:Te,ticket:ge,issue:ge,pr:St,pull_request:St,priority:Oe,status:be,id:Tt,integration:Nt,appmode:Ce,app_mode:Ce,mode:Ce,worktools:Ct,work_tools:Ct,tools:Ct,workwsid:ce,work_wsid:ce,wsid:ce,workspace_id:ce},va={slack:kr,discord:ye,github:Er,gitlab:Dr,bitbucket:Or,bitbucket_data_center:Or,azure_devops:et,email:fe,mail:fe,api:Nt,webhook:Ee,automation:Vt,review:St,linear:Te,web:Ae,ui:Ae,canvas:Ae},ya={work:ae,personal:wt,home:wt,private:wt};function ba(e,t){let n=e.trim().toLowerCase(),r=t.trim().toLowerCase();return ha.has(n)?va[r]??_a[n]??le:ga.has(n)?ya[r]??_a[n]??Ce:_a[n]??le}function xa({icon:e,keyName:t,testId:n}){return(0,X.jsx)(`span`,{className:ra,"aria-hidden":!0,children:(0,X.jsx)(e,{"data-testid":n,"data-tag-key":t,"aria-hidden":!0,className:ia})})}function Sa({icon:e,keyName:t,value:n,iconTestId:r}){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(xa,{icon:e,keyName:t,testId:r}),(0,X.jsx)(`span`,{className:`truncate leading-4`,children:pa(n)})]})}function Ca({tags:e}){let{t}=v(`openhands`),n=Y.useRef(null),r=Y.useRef(null),i=Y.useRef(null),a=Y.useRef(null),[o,s]=Y.useState(e.length),[c,l]=Y.useState(!1),[u,d]=Y.useState(null),f=Y.useCallback(()=>{let e=n.current,t=r.current;!e||!t||s(ma(Array.from(t.children).map(e=>e.offsetWidth),e.clientWidth))},[]),p=Y.useCallback(()=>{let e=i.current;if(!e)return;let t=e.getBoundingClientRect(),n=t.left;n+256>window.innerWidth-8&&(n=Math.max(8,window.innerWidth-8-256)),d({top:t.bottom+4,left:n})},[]),m=e.map(([e,t])=>`${e}=${t}`).join(``),h=Y.useRef(null);if(Y.useLayoutEffect(()=>{h.current!==m&&(h.current=m,l(!1),f())},[m,f]),Y.useEffect(()=>{let e=n.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>f());return t.observe(e),()=>t.disconnect()},[f]),Y.useLayoutEffect(()=>{if(!c){d(null);return}return p(),window.addEventListener(`resize`,p),window.addEventListener(`scroll`,p,!0),()=>{window.removeEventListener(`resize`,p),window.removeEventListener(`scroll`,p,!0)}},[c,p]),Y.useEffect(()=>{if(!c)return;let e=e=>{let t=e.target;i.current?.contains(t)||a.current?.contains(t)||l(!1)},t=e=>{e.key===`Escape`&&l(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[c]),e.length===0)return null;let g=Math.max(0,e.length-o),_=e.slice(0,o),y=e.slice(o),b=e=>{e.stopPropagation()};return(0,X.jsxs)(`div`,{"data-testid":`conversation-card-tag-chips`,className:`relative min-w-0 w-full`,children:[(0,X.jsx)(`div`,{ref:r,"aria-hidden":!0,className:`pointer-events-none fixed top-0 -left-[10000px] z-[-1] flex flex-nowrap items-center gap-1 opacity-0`,children:e.map(([e,t])=>(0,X.jsx)(`span`,{className:na,children:(0,X.jsx)(Sa,{icon:ba(e,t),keyName:e,value:t})},e))}),(0,X.jsxs)(`div`,{ref:n,"data-testid":`conversation-card-tag-row`,className:`flex w-full min-w-0 max-w-full flex-nowrap items-center gap-1 overflow-hidden`,children:[_.map(([e,n])=>(0,X.jsx)(`span`,{"data-testid":`conversation-card-tag-chip`,title:fa(e,n,t),className:na,children:(0,X.jsx)(Sa,{icon:ba(e,n),keyName:e,value:n,iconTestId:`conversation-card-tag-chip-icon`})},e)),g>0?(0,X.jsxs)(`button`,{ref:i,type:`button`,"data-testid":`conversation-card-tag-overflow`,"aria-expanded":c,"aria-haspopup":`dialog`,"aria-label":t(V.CONVERSATION$TAGS_OVERFLOW_ARIA,{count:g}),onMouseDown:b,onClick:e=>{e.preventDefault(),e.stopPropagation(),l(e=>!e)},className:H(na,`shrink-0 self-center hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--foreground)]`),children:[(0,X.jsx)(`span`,{className:`inline-flex h-4 w-0 shrink-0`,"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`leading-4`,children:`+${g}`})]}):null]}),c&&u&&typeof document<`u`&&(0,$i.createPortal)((0,X.jsx)(`div`,{ref:a,role:`dialog`,"data-testid":`conversation-card-tag-overflow-popover`,className:H(`z-[9999] min-w-[10rem] max-w-[16rem]`,`rounded-md border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface)] p-2 shadow-lg`),style:{position:`fixed`,top:u.top,left:u.left},onMouseDown:b,onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,X.jsx)(`dl`,{className:`m-0 flex flex-col gap-1`,children:y.map(([e,n])=>(0,X.jsxs)(`div`,{"data-testid":`conversation-card-tag-overflow-row`,className:`grid grid-cols-[minmax(0,auto)_minmax(0,1fr)] gap-x-2 text-[10px] leading-4`,children:[(0,X.jsxs)(`dt`,{className:`m-0 inline-flex min-w-0 items-center gap-1 whitespace-normal break-words text-[var(--oh-muted)]`,children:[(0,X.jsx)(xa,{icon:ba(e,n)}),(0,X.jsx)(`span`,{className:`min-w-0 whitespace-normal break-words leading-4`,children:da(e,t)})]}),(0,X.jsx)(`dd`,{className:`m-0 whitespace-normal break-words text-left leading-4 text-[var(--foreground)]`,title:n,children:n})]},e))})}),document.body)]})}function wa({selectedRepository:e,lastUpdatedAt:t,createdAt:n,executionStatus:r,workspaceWorkingDir:i,showRepositoryMetadata:a=!0,showTimestamp:o=!0,llmModel:s,showAgentChip:c=!1,agentKind:l=null,acpServer:u=null,tags:d=null,showTags:f=!1,isArchived:p=!1}){let{t:m}=v(`openhands`),h=B(r),g=null;if(c)if(l===`acp`){let e=Yn(u)??m(V.CONVERSATION$ACP_AGENT_GENERIC),t=Zn(u,s),n=t??e;g={kind:Xn(u),text:n,tooltip:t?`${e} · ${t}`:e}}else s&&(g={kind:`openhands`,text:wr(s)??s,tooltip:s});let _=r===void 0?void 0:`pl-[26px]`,y=f?Kn(d):[];return(0,X.jsxs)(`div`,{className:H(`flex flex-col gap-0.5 mt-0.5 w-full min-w-0`,h&&`opacity-60`),children:[(0,X.jsxs)(`div`,{className:H(`flex flex-row items-center gap-2 w-full min-w-0`,a&&_),children:[a&&(e?.selected_repository?(0,X.jsx)(sa,{selectedRepository:e}):(0,X.jsx)(ca,{workspaceWorkingDir:i})),(0,X.jsx)(`div`,{className:`flex items-center gap-2 shrink-0 ml-auto`,children:o&&(n??t)&&(0,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)] text-right`,children:(0,X.jsx)(`time`,{children:`${gr(t??n)} ${m(V.CONVERSATION$AGO)}`})})})]}),g?(0,X.jsx)(`div`,{className:_,children:(0,X.jsxs)(`span`,{"data-testid":`conversation-card-agent-chip`,className:na,title:g.tooltip,children:[(0,X.jsx)(`span`,{className:`inline-flex h-4 shrink-0 items-center justify-center [&_svg]:block`,"aria-hidden":!0,children:(0,X.jsx)(Tr,{kind:g.kind,size:12})}),(0,X.jsx)(`span`,{className:`truncate leading-4`,children:g.text})]})}):null,p?(0,X.jsx)(`div`,{className:_,children:(0,X.jsx)(`span`,{"data-testid":`conversation-card-archived-chip`,className:na,children:m(V.COMMON$ARCHIVED)})}):null,y.length>0?(0,X.jsx)(`div`,{className:_,children:(0,X.jsx)(Ca,{tags:y})}):null]})}function Ta(){let{t:e}=v(`openhands`);return(0,X.jsxs)(`span`,{"data-testid":`error-badge`,className:`flex items-center gap-1 px-1.5 py-0.5 bg-[var(--oh-status-error)] text-white text-xs font-medium rounded-full`,children:[(0,X.jsx)(it,{className:`text-white w-3 h-3`}),(0,X.jsx)(`span`,{children:e(V.COMMON$ERROR)})]})}function Ea({onClick:e,onDelete:t,onArchive:n,onUnarchive:r,onStop:i,onChangeTitle:a,showOptions:o,title:s,selectedRepository:c,lastUpdatedAt:l,createdAt:u,conversationId:d,executionStatus:f,sandboxStatus:p,contextMenuOpen:m=!1,onContextMenuToggle:h,isActive:g=!1,workspaceWorkingDir:_,showRepositoryMetadata:y=!0,llmModel:b=null,showLlmProfiles:x=!1,agentKind:S=null,acpServer:C=null,tags:w=null,showTags:T=!1,isArchived:E=!1,isPinned:D=!1,onTogglePin:O,alwaysShowPinIcon:k=!1}){let{t:A}=v(`openhands`),{trackDownloadVsCodeButtonClicked:j}=Yt(),[M,N]=Y.useState(`view`),{mutateAsync:P}=Ye(),F=e=>{e!==``&&e!==s&&a?.(e),N(`view`)},I=e=>{e.preventDefault(),e.stopPropagation(),t?.(),h?.(!1)},ee=e=>{e.preventDefault(),e.stopPropagation(),n?.(),h?.(!1)},L=e=>{e.preventDefault(),e.stopPropagation(),r?.(),h?.(!1)},te=e=>{e.preventDefault(),e.stopPropagation(),i?.(),h?.(!1)},R=e=>{e.preventDefault(),e.stopPropagation(),N(`edit`),h?.(!1)},z=async e=>{if(e.preventDefault(),e.stopPropagation(),j(),d)try{let e=await $n.getVSCodeUrl(d);if(e.vscode_url){let t=ir(e.vscode_url);t&&window.open(t,`_blank`)}}catch{}h?.(!1)},B=async e=>{e.preventDefault(),e.stopPropagation(),d&&await P(d),h?.(!1)},U=e=>{e.preventDefault(),e.stopPropagation(),O?.()},ne=()=>(0,X.jsx)(`button`,{type:`button`,"data-testid":d?`conversation-pin-toggle-${d}`:`conversation-pin-toggle`,"aria-pressed":D,"aria-label":A(D?V.CONVERSATION_PANEL$UNPIN_CONVERSATION:V.CONVERSATION_PANEL$PIN_CONVERSATION),onClick:U,className:H(`flex shrink-0 cursor-pointer items-center justify-center rounded-md p-1`,`text-[var(--oh-muted)] hover:bg-white/10 hover:text-white`),children:(0,X.jsx)(_t,{className:H(`h-3.5 w-3.5`,D&&`fill-current`),"aria-hidden":!0})}),re=!!(t||n||r||a||o),ie=re||!!O,W=k&&D&&!!O,ae=y||E||x&&(S===`acp`||!!b)||T&&Kn(w).length>0;return(0,X.jsxs)(`div`,{"data-testid":`conversation-card`,"data-context-menu-open":m.toString(),"data-active":g?`true`:`false`,onClick:e,className:H(`group relative h-auto w-full cursor-pointer rounded-md py-1 pl-2 pr-1 transition-colors`,!m&&`hover:bg-[var(--oh-surface)]`,(g||m)&&`bg-[var(--oh-surface)]`),children:[(0,X.jsxs)(`div`,{className:`flex items-center w-full min-w-0`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0 overflow-hidden`,children:[(0,X.jsx)(Qi,{title:s,titleMode:M,onTitleSave:F,executionStatus:f,sandboxStatus:p}),p===`ERROR`&&(0,X.jsx)(Ta,{})]}),(0,X.jsxs)(`div`,{className:H(`relative ml-auto pl-2 flex items-center justify-end shrink-0`,W?`min-w-[3.75rem]`:ie&&Gi(m)),children:[!W&&(u??l)&&(0,X.jsx)(`p`,{className:H(`text-xs text-[var(--oh-muted)] text-right whitespace-nowrap transition-opacity -translate-x-1.5`,ie&&Wi(m)),children:(0,X.jsx)(`time`,{children:gr(l??u)})}),ie?(0,X.jsxs)(`div`,{className:H(`absolute right-0 top-1/2 flex -translate-y-1/2 items-center gap-0.5 transition-opacity`,W?`pointer-events-auto visible opacity-100`:Ui(m)),children:[O?ne():null,W&&(u??l)&&re?(0,X.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,X.jsx)(`div`,{className:Ui(m),children:(0,X.jsx)(ta,{contextMenuOpen:m,onContextMenuToggle:h||(()=>{}),onDelete:t&&I,onArchive:n&&ee,onUnarchive:r&&L,onStop:i&&te,onEdit:a&&R,onDownloadViaVSCode:z,onDownloadConversation:B,executionStatus:f,conversationId:d,showOptions:o})}),(0,X.jsx)(`p`,{className:H(`pointer-events-none absolute inset-0 items-center justify-end`,`text-xs text-[var(--oh-muted)] whitespace-nowrap -translate-x-1.5`,Ki(m)),children:(0,X.jsx)(`time`,{children:gr(l??u)})})]}):null,!W&&re?(0,X.jsx)(ta,{contextMenuOpen:m,onContextMenuToggle:h||(()=>{}),onDelete:t&&I,onArchive:n&&ee,onUnarchive:r&&L,onStop:i&&te,onEdit:a&&R,onDownloadViaVSCode:z,onDownloadConversation:B,executionStatus:f,conversationId:d,showOptions:o}):null]}):null]})]}),ae&&(0,X.jsx)(wa,{selectedRepository:c,lastUpdatedAt:l,createdAt:u,executionStatus:f,workspaceWorkingDir:_,showRepositoryMetadata:y,showTimestamp:!1,llmModel:b,showAgentChip:x,agentKind:S,acpServer:C,tags:w,showTags:T,isArchived:E})]})}var Da={bitbucket:Or,bitbucket_data_center:Or,github:Er,gitlab:Dr};function Oa({label:e,children:t}){return(0,X.jsxs)(`div`,{className:`flex items-start gap-2 text-xs leading-4`,children:[(0,X.jsx)(`span`,{className:`w-20 shrink-0 whitespace-normal break-words text-[var(--oh-muted)]`,children:e}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 overflow-visible whitespace-normal break-words text-[var(--oh-foreground)]`,children:t})]})}function ka({icon:e,children:t,testId:n,tagKey:r}){return(0,X.jsxs)(`span`,{"data-testid":n,"data-tag-key":r,className:`inline-flex min-w-0 max-w-full items-start gap-1.5`,children:[e?(0,X.jsx)(`span`,{className:`inline-flex h-4 min-w-3 shrink-0 items-center justify-center [&_svg]:block`,children:e}):null,(0,X.jsx)(`span`,{className:`min-w-0 flex-1 whitespace-normal break-all`,children:t})]})}function Aa({title:e,executionStatus:t,sandboxStatus:n,selectedRepository:r,workspaceWorkingDir:i,llmModel:a,agentKind:o=null,acpServer:s=null,createdAt:c,tags:l=null}){let{t:u}=v(`openhands`),d=r?.selected_repository??null,f=r?.selected_branch??null,p=r?.git_provider??null,m=p?Da[p]:null,h=c?new Date(c).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`}):null,g=Kn(l);return(0,X.jsxs)(`div`,{"data-testid":`conversation-card-preview`,className:`flex w-[280px] max-w-[min(280px,90vw)] flex-col gap-3 overflow-visible p-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-start gap-2`,children:[t===void 0?null:(0,X.jsx)(`span`,{className:`inline-flex h-5 w-2.5 shrink-0 items-center justify-center`,children:(0,X.jsx)(Zi,{executionStatus:t,sandboxStatus:n,showTooltip:!1})}),(0,X.jsx)(`span`,{className:`break-words text-sm font-medium leading-5 text-white`,children:e})]}),(0,X.jsxs)(`dl`,{className:`flex flex-col gap-1.5`,children:[d?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Oa,{label:u(V.CONVERSATION_PANEL$PREVIEW_REPO),children:(0,X.jsx)(ka,{icon:m?(0,X.jsx)(m,{size:12}):p===`azure_devops`?(0,X.jsx)(ot,{className:`h-3 w-3`}):void 0,children:d})}),f?(0,X.jsx)(Oa,{label:u(V.CONVERSATION_PANEL$PREVIEW_BRANCH),children:(0,X.jsx)(ka,{icon:(0,X.jsx)(_r,{size:11}),children:f})}):null]}):i?(0,X.jsx)(Oa,{label:u(V.CONVERSATION_PANEL$PREVIEW_DIRECTORY),children:(0,X.jsx)(ka,{icon:(0,X.jsx)(K,{size:12}),children:i})}):null,a?(0,X.jsx)(Oa,{label:u(V.CONVERSATION_PANEL$PREVIEW_MODEL),children:(0,X.jsx)(ka,{testId:`conversation-card-preview-model`,icon:(0,X.jsx)(Tr,{kind:o===`acp`?Xn(s):`openhands`,size:12}),children:a})}):null,g.map(([e,t])=>{let n=ba(e,t);return(0,X.jsx)(Oa,{label:da(e,u),children:(0,X.jsx)(ka,{testId:`conversation-card-preview-tag-row`,tagKey:e,icon:(0,X.jsx)(n,{"aria-hidden":!0,className:`h-3 w-3`}),children:t})},e)}),h?(0,X.jsx)(Oa,{label:u(V.CONVERSATION$CREATED),children:h}):null]})]})}function ja({taskStatus:e}){return(0,X.jsx)(`div`,{className:H(`w-2 h-2 rounded-full flex-shrink-0`,(()=>{switch(e){case`READY`:return`bg-green-500`;case`ERROR`:return`bg-red-500`;case`WORKING`:case`WAITING_FOR_SANDBOX`:case`PREPARING_REPOSITORY`:case`RUNNING_SETUP_SCRIPT`:case`SETTING_UP_GIT_HOOKS`:case`SETTING_UP_SKILLS`:case`STARTING_CONVERSATION`:return`bg-yellow-500 animate-pulse`;default:return`bg-[var(--oh-interactive-selected)]`}})()),"aria-label":`Task status: ${e}`})}function Ma({taskStatus:e}){let{t}=v(`openhands`);return e===`WORKING`?null:(0,X.jsx)(`span`,{className:H(`text-xs font-medium px-2 py-0.5 rounded border flex-shrink-0`,(()=>{switch(e){case`READY`:return`bg-green-500/10 text-green-400 border-green-500/20`;case`ERROR`:return`bg-red-500/10 text-red-400 border-red-500/20`;default:return`bg-yellow-500/10 text-yellow-400 border-yellow-500/20`}})()),children:t(R(e))})}function Na({title:e,taskStatus:t}){return(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0 overflow-hidden mr-2`,children:[(0,X.jsx)(`div`,{className:`flex items-center`,children:(0,X.jsx)(ja,{taskStatus:t})}),(0,X.jsx)(`h3`,{className:`text-sm font-medium text-content-2 truncate flex-1`,children:e}),(0,X.jsx)(Ma,{taskStatus:t})]})}function Pa({selectedRepository:e,createdAt:t,detail:n}){let{t:r}=v(`openhands`);return(0,X.jsxs)(`div`,{className:H(`flex flex-col gap-1 mt-1`),children:[(0,X.jsxs)(`div`,{className:`flex flex-row justify-between items-center`,children:[e?(0,X.jsx)(sa,{selectedRepository:e}):(0,X.jsx)(ca,{}),t&&(0,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)] flex-1 text-right`,children:(0,X.jsx)(`time`,{children:`${gr(t)} ${r(V.CONVERSATION$AGO)}`})})]}),n&&(0,X.jsx)(`div`,{className:`text-xs text-[var(--oh-text-subtle)] truncate`,children:n})]})}function Fa({task:e,onClick:t}){let{t:n}=v(`openhands`),r=e.request.title||e.detail||n(V.CONVERSATION$STARTING_CONVERSATION),i=e.request.selected_repository?{selected_repository:e.request.selected_repository,selected_branch:e.request.selected_branch||null,git_provider:e.request.git_provider||null}:null;return(0,X.jsxs)(`div`,{"data-testid":`start-task-card`,onClick:t,className:H(`relative h-auto w-full p-3.5 border-b border-[var(--oh-border)] cursor-pointer`,`hover:bg-tertiary`),children:[(0,X.jsx)(`div`,{className:`flex items-center justify-between w-full`,children:(0,X.jsx)(Na,{title:r,taskStatus:e.status})}),(0,X.jsx)(Pa,{selectedRepository:i,createdAt:e.created_at,detail:e.detail})]})}function Ia({compact:e=!1}){return e?(0,X.jsx)(`div`,{"data-testid":`conversation-card-skeleton-compact`,className:`skeleton-stagger flex flex-col items-center gap-1.5 py-1`,"aria-hidden":!0,children:[0,1,2].map(e=>(0,X.jsx)(`div`,{className:`h-1.5 w-7 shrink-0 skeleton`},`conversation-skeleton-compact-${e}`))}):(0,X.jsx)(`div`,{"data-testid":`conversation-card-skeleton`,className:`skeleton-stagger flex flex-col gap-1.5 py-0.5`,"aria-hidden":!0,children:[0,1,2].map(e=>(0,X.jsx)(`div`,{className:`h-6 min-h-6 w-full skeleton`},`conversation-skeleton-row-${e}`))})}function La({conversationId:e,title:t,selectedRepository:n,executionStatus:r,sandboxStatus:a,lastUpdatedAt:o,createdAt:s,workspaceWorkingDir:c,isActive:l=!1,onClose:u,showRepositoryMetadata:d=!0,llmModel:f=null,showLlmProfiles:p=!1,agentKind:m=null,acpServer:h=null,tags:g=null,showTags:_=!1}){let{t:y}=v(`openhands`),b=at();return(0,X.jsx)(i,{content:(0,X.jsxs)(`div`,{className:`w-[260px] p-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,X.jsx)(Zi,{executionStatus:r,sandboxStatus:a,showTooltip:!1}),(0,X.jsx)(`span`,{className:`text-sm font-medium text-white truncate`,title:t,children:t||y(V.CONVERSATION$UNTITLED)})]}),(0,X.jsx)(wa,{selectedRepository:n,lastUpdatedAt:o,createdAt:s,executionStatus:r,workspaceWorkingDir:c,showRepositoryMetadata:d,llmModel:f,showAgentChip:p,agentKind:m,acpServer:h,tags:g,showTags:_})]}),placement:`right`,closeDelay:100,className:`bg-[var(--oh-surface)] text-white border border-[var(--oh-border-subtle)] shadow-xl p-0`,disableAnimation:!1,children:(0,X.jsx)(pn,{to:b(`/conversations/${e}`),onClick:u,"data-testid":`compact-conversation-row`,"data-conversation-id":e,"aria-label":t||e,className:({isActive:e})=>H(`flex items-center justify-center w-10 h-9 mx-auto rounded-md`,`transition-colors cursor-pointer`,e||l?`bg-tertiary`:`hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(Zi,{executionStatus:r,sandboxStatus:a,showTooltip:!1})})})}var Ra={showOlderConversations:!0,showArchivedConversations:!1,showRepoBranchMetadata:!1,showLlmProfiles:!1,showTagsMetadata:!1,showHoverMetadata:!0,organizeMode:`chronological`,conversationSort:`updated`,threadScope:`all`,automationFilterMode:`all`,selectedAutomationNames:[],groupFolderOrder:[]},Z=Bn()(Vn(e=>({...Ra,setShowOlderConversations:t=>e(()=>({showOlderConversations:t})),toggleShowOlderConversations:()=>e(e=>({showOlderConversations:!e.showOlderConversations})),setShowArchivedConversations:t=>e(()=>({showArchivedConversations:t})),toggleShowArchivedConversations:()=>e(e=>({showArchivedConversations:!e.showArchivedConversations})),setShowRepoBranchMetadata:t=>e(()=>({showRepoBranchMetadata:t})),toggleShowRepoBranchMetadata:()=>e(e=>({showRepoBranchMetadata:!e.showRepoBranchMetadata})),setShowLlmProfiles:t=>e(()=>({showLlmProfiles:t})),toggleShowLlmProfiles:()=>e(e=>({showLlmProfiles:!e.showLlmProfiles})),setShowTagsMetadata:t=>e(()=>({showTagsMetadata:t})),toggleShowTagsMetadata:()=>e(e=>({showTagsMetadata:!e.showTagsMetadata})),setShowHoverMetadata:t=>e(()=>({showHoverMetadata:t})),toggleShowHoverMetadata:()=>e(e=>({showHoverMetadata:!e.showHoverMetadata})),setOrganizeMode:t=>e(()=>({organizeMode:t})),setConversationSort:t=>e(()=>({conversationSort:t})),setThreadScope:t=>e(()=>({threadScope:t})),setAutomationFilterMode:t=>e(()=>({automationFilterMode:t})),toggleAutomationName:t=>e(e=>({selectedAutomationNames:e.selectedAutomationNames.includes(t)?e.selectedAutomationNames.filter(e=>e!==t):[...e.selectedAutomationNames,t]})),setGroupFolderOrder:t=>e(()=>({groupFolderOrder:[...t]}))}),{name:`conversation-panel-preferences`,storage:Hn(()=>localStorage),partialize:e=>({showOlderConversations:e.showOlderConversations,showArchivedConversations:e.showArchivedConversations,showRepoBranchMetadata:e.showRepoBranchMetadata,showLlmProfiles:e.showLlmProfiles,showTagsMetadata:e.showTagsMetadata,showHoverMetadata:e.showHoverMetadata,organizeMode:e.organizeMode,conversationSort:e.conversationSort,threadScope:e.threadScope,automationFilterMode:e.automationFilterMode,selectedAutomationNames:e.selectedAutomationNames,groupFolderOrder:e.groupFolderOrder})}));function za(e,t,n){if(!t)return[...e];let r=e.filter(e=>t.has(e.id));if(n!=null&&!r.some(e=>e.id===n)){let t=e.find(e=>e.id===n);t&&r.push(t)}return r}function Ba(e,t){let n=t.limit??5,r=za(e,t.discoveryConversationIds,t.activeConversationId),i;if(r.length<=n)i=r;else{let e=t.activeConversationId==null?-1:r.findIndex(e=>e.id===t.activeConversationId);i=e>=n?[...r.slice(0,n-1),r[e]]:r.slice(0,n)}let a=i.length<e.length;return t.expanded?{visibleConversations:[...e],isPreviewTruncated:a,isShowingAll:!0}:{visibleConversations:i,isPreviewTruncated:a,isShowingAll:!a}}function Va(e,t){let n=new Map(t.map(e=>[e.id,e]));return e.map(e=>n.get(e)).filter(e=>e!=null)}function Ha(e,t){if(t.length===0)return[...e];let n=new Set(t);return e.filter(e=>!n.has(e.id))}var Ua=`__unnamed__`;function Wa(e){if(e.trigger===`automation`)return!0;let t=e.tags;return t?qn.some(e=>!!t[e]):!1}function Ga(e){return e.tags?.automationname?.trim()||`__unnamed__`}function Ka(e){let t=new Set,n=!1;for(let r of e){if(!Wa(r))continue;let e=Ga(r);e===`__unnamed__`?n=!0:t.add(e)}let r=[...t].sort((e,t)=>e.localeCompare(t));return n&&r.push(Ua),r}function qa(e,t,n,r){if(t===`all`)return[...e];if(t===`hide-automations`)return e.filter(e=>!Wa(e));let i=new Set(r),a=n.filter(e=>i.has(e)),o=a.length>0?new Set(a):null;return e.filter(e=>Wa(e)?o===null||o.has(Ga(e)):!1)}function Ja(e,t,n){if(t===`local`)return e===`__none_workspace`?{}:e.startsWith(`ws:`)?{workingDir:e.slice(3)}:{};if(e===`__none_repo`)return{};if(e.startsWith(`repo:`)){let t=e.slice(5),r=n[0];return{repository:{name:t,gitProvider:r?.git_provider??`github`,branch:r?.selected_branch??`main`}}}return{}}function Ya(e){if(!e)return 0;let t=Date.parse(e);return Number.isFinite(t)?t:0}function Xa(e,t){let n=t===`created`?`created_at`:`updated_at`;return[...e].sort((e,t)=>Ya(t[n])-Ya(e[n]))}function Za(e){let t=e.selected_workspace?.trim().replace(/\/+$/,``);if(!t)return{id:`__none_workspace`,label:``};let n=t.split(`/`).filter(Boolean).pop()??t;return{id:`ws:${t}`,label:n}}function Qa(e){let t=e.selected_repository?.trim().replace(/\/+$/,``);if(!t)return{id:`__none_repo`,label:``};let n=t.split(`/`).filter(Boolean),r=n.length?(n[n.length-1]??t).replace(/\.git$/,``):t.replace(/\.git$/,``);return{id:`repo:${t}`,label:r}}function $a(e,t){return t===`local`?Za(e):Qa(e)}function eo(e,t,n,r){let i=e.map(e=>({conversationId:e.id,groupId:$a(e,n).id,page:t.get(e.id)??0})),a=new Map;for(let{groupId:e,page:t}of i){let n=a.get(e);(n===void 0||t<n)&&a.set(e,t)}let o=new Set;for(let{conversationId:e,groupId:t,page:n}of i)n===a.get(t)&&o.add(e);let s=r?.forceIncludeConversationId;return s!=null&&e.some(e=>e.id===s)&&o.add(s),o}function to(e,t,n,r,i){let a=new Map;if(t===`local`&&i)for(let e of i){let t=e.path.trim().replace(/\/+$/,``);t&&a.set(`ws:${t}`,{label:e.name,conversations:[]})}for(let n of e){let{id:e,label:i}=$a(n,t),o=e===`__none_workspace`?r.emptyWorkspace:e===`__none_repo`?r.emptyRepository:i,s=a.get(e);s?s.conversations.push(n):a.set(e,{label:o,conversations:[n]})}let o=[...a.entries()].map(([e,r])=>{let i=Xa(r.conversations,n);return{id:e,label:r.label,conversations:i,launch:Ja(e,t,i)}}),s=e=>e.conversations.reduce((e,t)=>Math.max(e,Ya(n===`created`?t.created_at:t.updated_at)),0);return o.sort((e,t)=>s(t)-s(e)),o}function no(e,t){if(t.length===0)return[...e];let n=new Map(e.map(e=>[e.id,e])),r=[],i=new Set;for(let e of t){let t=n.get(e);t&&(r.push(t),i.add(e))}for(let t of e)i.has(t.id)||r.push(t);return r}function ro(e,t,n,r,i=`after`){if(n===r)return[...e];let a=no(t.map(e=>({id:e})),e).map(e=>e.id),o=a.indexOf(n),s=a.indexOf(r);if(o<0||s<0)return[...e];let c=[...a];c.splice(o,1);let l=c.indexOf(r),u=i===`before`?l:l+1;return c.splice(u,0,n),c}var io=`px-2 pb-1 pt-1`,ao=`text-[11px] font-semibold uppercase tracking-wide text-[var(--oh-muted)]`;function oo({children:e,suffix:t}){return t==null?(0,X.jsx)(`div`,{role:`presentation`,className:H(io,ao),children:e}):(0,X.jsxs)(`div`,{role:`presentation`,className:H(`flex items-baseline justify-between gap-2`,io),children:[(0,X.jsx)(`span`,{className:H(`min-w-0 truncate text-left`,ao),children:e}),t]})}function Q({icon:e,label:t,selected:n,onClick:r,testId:i,disabled:a}){return(0,X.jsxs)(`button`,{type:`button`,role:n===void 0?`menuitem`:`menuitemradio`,"aria-checked":n===void 0?void 0:!!n,"data-testid":i,disabled:a,onClick:r,className:H(`group`,Mn,`text-[var(--oh-foreground)] disabled:opacity-50`),children:[(0,X.jsx)(e,{className:H(`h-3.5 w-3.5`,An),"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t}),n?(0,X.jsx)(Ne,{className:`ml-auto h-3.5 w-3.5 shrink-0 text-white`,"aria-hidden":!0}):null]})}var so=e=>e.length>0?e.charAt(0).toUpperCase()+e.slice(1):e;function co({filterMenuOpen:e,setFilterMenuOpen:t,menuRef:n,backendKind:r,organizeMode:i,setOrganizeMode:a,conversationSort:o,setConversationSort:s,threadScope:c,setThreadScope:l,automationFilterMode:u,setAutomationFilterMode:d,selectedAutomationNames:f,onToggleAutomationName:p,automationNameFacets:m,showOlderConversations:h,showArchivedConversations:g,toggleShowArchivedConversations:_,toggleShowOlderConversations:y,showRepoBranchMetadata:b,toggleShowRepoBranchMetadata:x,showLlmProfiles:S,toggleShowLlmProfiles:C,showTagsMetadata:w,toggleShowTagsMetadata:T,showHoverMetadata:E,toggleShowHoverMetadata:D,totalConversationsCount:O,onRequestDeleteAll:k}){let{t:A}=v(`openhands`),j=A(r===`local`?V.CONVERSATION_PANEL$BY_WORKSPACE:V.CONVERSATION_PANEL$BY_REPOSITORY),M=Y.useRef(null),N=Y.useRef(null),P=Y.useRef(e);return Y.useEffect(()=>{e?(N.current?.querySelector(`[role="menuitem"], [role="menuitemradio"]`))?.focus():P.current&&M.current?.focus(),P.current=e},[e]),(0,X.jsxs)(`div`,{ref:n,className:`relative shrink-0 pr-0.5`,children:[(0,X.jsxs)(`button`,{ref:M,type:`button`,"data-testid":`older-conversations-filter-toggle`,"aria-label":A(V.CONVERSATION_PANEL$FILTER_LABEL),"aria-haspopup":`menu`,"aria-expanded":e,onClick:()=>t(!e),className:H(`relative inline-flex h-7 w-7 items-center justify-center rounded-md text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`,Nn),children:[(0,X.jsx)(kt,{className:`lucide lucide-list-filter shrink-0`,width:14,height:14,strokeWidth:2,"aria-hidden":!0}),u===`all`?null:(0,X.jsx)(`span`,{"aria-hidden":!0,"data-testid":`automation-filter-active-indicator`,className:`absolute right-0.5 top-0.5 h-1.5 w-1.5 rounded-full bg-[var(--oh-accent)]`})]}),e?(0,X.jsxs)(`div`,{ref:N,role:`menu`,"aria-orientation":`vertical`,"aria-label":A(V.CONVERSATION_PANEL$FILTER_LABEL),tabIndex:-1,"data-testid":`older-conversations-filter-menu`,onKeyDown:e=>{if(e.key===`Escape`){e.preventDefault(),t(!1);return}if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;let n=N.current;if(!n)return;let r=Array.from(n.querySelectorAll(`[role="menuitem"], [role="menuitemradio"]`)).filter(e=>!e.disabled);if(r.length===0)return;let i=r.indexOf(document.activeElement),a=e.key===`ArrowDown`?1:-1,o=((i===-1?0:i)+a+r.length)%r.length;e.preventDefault(),r[o]?.focus()},className:H(`absolute right-0 top-full z-50 mt-0 w-64 rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 text-[var(--oh-foreground)] shadow-lg`,kn,Dn),children:[(0,X.jsx)(oo,{children:A(V.CONVERSATION_PANEL$ORGANIZE)}),(0,X.jsx)(Q,{icon:K,label:j,selected:i===`grouped`,onClick:()=>{a(`grouped`),t(!1)}}),(0,X.jsx)(Q,{icon:ke,label:A(V.CONVERSATION_PANEL$CHRONOLOGICAL),selected:i===`chronological`,onClick:()=>{a(`chronological`),t(!1)}}),(0,X.jsx)(q,{}),(0,X.jsx)(oo,{children:A(V.CONVERSATION_PANEL$SORT_BY)}),(0,X.jsx)(Q,{icon:W,label:A(V.CONVERSATION_PANEL$SORT_CREATED),selected:o===`created`,onClick:()=>{s(`created`),t(!1)}}),(0,X.jsx)(Q,{icon:re,label:A(V.CONVERSATION_PANEL$SORT_UPDATED),selected:o===`updated`,onClick:()=>{s(`updated`),t(!1)}}),(0,X.jsx)(q,{}),(0,X.jsx)(oo,{children:A(V.CONVERSATION_PANEL$SHOW)}),(0,X.jsx)(Q,{icon:De,label:A(V.CONVERSATION_PANEL$ALL_THREADS),selected:c===`all`,onClick:()=>{l(`all`),t(!1)}}),(0,X.jsx)(Q,{icon:Se,label:A(V.CONVERSATION_PANEL$RELEVANT_THREADS),selected:c===`relevant`,onClick:()=>{l(`relevant`),t(!1)}}),(0,X.jsx)(Q,{icon:ne,label:A(V.CONVERSATION_PANEL$SHOW_ARCHIVED),selected:g,testId:`toggle-show-archived`,onClick:()=>{_(),t(!1)}}),(0,X.jsx)(q,{}),(0,X.jsx)(oo,{children:A(V.CONVERSATION_PANEL$AUTOMATIONS)}),(0,X.jsx)(Q,{icon:De,label:A(V.CONVERSATION_PANEL$AUTOMATIONS_ALL),selected:u===`all`,testId:`automation-filter-all`,onClick:()=>{d(`all`),t(!1)}}),(0,X.jsx)(Q,{icon:ue,label:A(V.CONVERSATION_PANEL$AUTOMATIONS_HIDE),selected:u===`hide-automations`,testId:`automation-filter-hide`,onClick:()=>{d(`hide-automations`),t(!1)}}),(0,X.jsx)(Q,{icon:xt,label:A(V.CONVERSATION_PANEL$AUTOMATIONS_ONLY),selected:u===`only-automations`,testId:`automation-filter-only`,onClick:()=>{d(`only-automations`),t(!1)}}),u===`only-automations`?m.map(e=>(0,X.jsx)(Q,{icon:le,label:e===`__unnamed__`?A(V.CONVERSATION_PANEL$AUTOMATION_UNNAMED):e,selected:f.includes(e),testId:`automation-name-filter-${e}`,onClick:()=>p(e)},e)):null,(0,X.jsx)(q,{}),(0,X.jsx)(oo,{children:A(V.CONVERSATION_PANEL$METADATA)}),(0,X.jsx)(Q,{icon:et,label:A(V.CONVERSATION_PANEL$REPO_BRANCH),selected:b,testId:`toggle-repo-branch-metadata`,onClick:()=>{x(),t(!1)}}),(0,X.jsx)(Q,{icon:Me,label:A(V.CONVERSATION_PANEL$LLM_MODEL),selected:S,testId:`toggle-llm-profiles`,onClick:()=>{C(),t(!1)}}),(0,X.jsx)(Q,{icon:le,label:A(V.CONVERSATION_PANEL$TAGS),selected:w,testId:`toggle-tags-metadata`,onClick:()=>{T(),t(!1)}}),(0,X.jsx)(Q,{icon:Mt,label:A(V.CONVERSATION_PANEL$HOVER_METADATA),selected:E,testId:`toggle-hover-metadata`,onClick:()=>{D(),t(!1)}}),(0,X.jsx)(q,{}),(0,X.jsx)(oo,{suffix:(0,X.jsx)(`span`,{className:`shrink-0 text-right text-[10px] font-medium normal-case tracking-normal text-[var(--oh-muted)]/70`,children:A(V.CONVERSATION_PANEL$OLDER_OVER_ONE_HOUR)}),children:A(V.CONVERSATION_PANEL$OLDER_SECTION)}),(0,X.jsx)(Q,{testId:`toggle-older-conversations`,icon:h?ue:je,label:so(A(h?V.CONVERSATION$HIDE:V.CONVERSATION$SHOW_ALL)),onClick:()=>{y(),t(!1)}}),(0,X.jsx)(q,{}),(0,X.jsx)(Q,{testId:`delete-all-conversations`,icon:zt,label:so(A(V.CONVERSATION$DELETE_ALL)),disabled:O===0,onClick:()=>{O!==0&&(k(),t(!1))}})]}):null]})}var lo=H(`z-50 flex flex-col rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 text-white shadow-lg`,En);function uo(e,t){let{open:n,enabled:r,targetWidth:i=256}=t,[a,o]=Y.useState(null),s=Y.useCallback(()=>{let t=e.current;if(!t)return;let n=t.getBoundingClientRect(),r=Math.min(i,window.innerWidth-16),a=n.right-r;a<8&&(a=8),a+r>window.innerWidth-8&&(a=Math.max(8,window.innerWidth-8-r)),o({top:n.bottom+4,left:a,width:r})},[e,i]);return Y.useLayoutEffect(()=>{if(!n||!r){o(null);return}return s(),window.addEventListener(`resize`,s),window.addEventListener(`scroll`,s,!0),()=>{window.removeEventListener(`resize`,s),window.removeEventListener(`scroll`,s,!0)}},[n,r,s]),a}function fo({trigger:e,className:t,popoverClassName:n,popoverTestId:r=`new-conversation-popover`,useFixedPlacement:i=!1}){let{t:a}=v(`openhands`),{navigate:o}=un(),[s,c]=Y.useState(!1),l=Y.useRef(null),u=Y.useRef(null),d=uo(u,{open:s,enabled:i}),{data:f,error:p}=ft(),m=f?.workspaceParents??[],{mutate:h}=yt(),{mutate:g}=ut(),{mutate:_}=gt(),{mutate:y}=mt(),{workspaces:b}=dt(),S=lt(p,a),[C,w]=Y.useState(!1),[T,E]=Y.useState(!1),{mutate:D,isPending:O}=hr(),k=x(),A=O||k;Y.useEffect(()=>{if(!s||C||T)return;let e=e=>{l.current&&!l.current.contains(e.target)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[s,C,T]),Y.useEffect(()=>{if(!s||C||T)return;let e=e=>{e.key===`Escape`&&c(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[s,C,T]);let j=e=>{A||D({workingDir:e,entryPoint:`sidebar_local_menu`},{onSuccess:e=>{c(!1),o(`/conversations/${e.conversation_id}`)}})},M=Mn,N=Y.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),P=Y.useCallback(()=>{c(e=>!e)},[]),F=s&&(!i||d!==null),I=!!S,ee=i&&d?{position:`fixed`,top:d.top,left:d.left,width:d.width}:void 0,L=(0,X.jsx)(`button`,{type:`button`,"data-testid":`add-workspaces-button`,disabled:I,onMouseDown:N,onClick:e=>{e.preventDefault(),e.stopPropagation(),!I&&w(!0)},className:M,children:a(V.HOME$ADD_WORKSPACES)}),te=S?(0,X.jsx)(Tn,{content:S,placement:`top`,children:(0,X.jsx)(`span`,{className:`block`,children:L})}):L;return(0,X.jsxs)(`div`,{className:H(!i&&`relative`,t),ref:l,children:[(0,X.jsx)(`span`,{ref:u,className:`inline-flex`,children:e({onClick:P,"aria-expanded":s,"aria-haspopup":`menu`,disabled:A})}),F&&(0,X.jsxs)(`div`,{"data-testid":r,className:H(lo,!i&&H(`absolute top-full mt-0`,n)),style:ee,children:[(0,X.jsxs)(`ul`,{className:H(`max-h-[40vh] overflow-y-auto sm:max-h-[280px]`,kn),children:[(0,X.jsx)(`li`,{children:(0,X.jsx)(`button`,{type:`button`,disabled:A,"data-testid":`launch-no-workspace`,onClick:()=>j(),className:M,children:(0,X.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:a(V.HOME$NO_WORKSPACE_OPTION)})})}),b.map(e=>(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,disabled:A,"data-testid":`launch-workspace`,"data-workspace-path":e.path,onClick:()=>j(e.path),className:M,children:[(0,X.jsx)(`span`,{className:Pn,"aria-hidden":!0,children:(0,X.jsx)(Ar,{width:14,height:14})}),(0,X.jsx)(`span`,{className:`truncate`,children:e.name})]})},e.id))]}),(0,X.jsxs)(`div`,{className:H(`flex flex-col`,kn),"data-testid":`new-conversation-menu-footer`,children:[(0,X.jsx)(rt,{inset:`menu`,testId:`new-conversation-menu-footer-divider`}),te,(b.length>0||m.length>0)&&(0,X.jsx)(`button`,{type:`button`,"data-testid":`manage-workspaces-button`,onMouseDown:N,onClick:e=>{e.preventDefault(),e.stopPropagation(),E(!0)},className:M,children:a(V.HOME$MANAGE_WORKSPACES)})]})]}),(0,X.jsx)(pt,{isOpen:C,onClose:()=>w(!1),onAdd:e=>h(e),onAddParent:e=>_(e)}),(0,X.jsx)(vt,{isOpen:T,workspaces:b,workspaceParents:m,onClose:()=>E(!1),onRemove:e=>g(e),onRemoveParent:e=>y(e)})]})}function po({repo:e,disabled:t,onSelect:n,itemClass:r}){return(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,disabled:t,"data-testid":`launch-repository`,"data-repo-name":e.full_name,onClick:()=>n(e),className:r,children:[(0,X.jsx)(`span`,{className:Pn,"aria-hidden":!0,children:(0,X.jsx)(Ar,{width:14,height:14})}),(0,X.jsx)(`span`,{className:`truncate`,children:e.full_name})]})})}function mo({trigger:e,className:t,popoverClassName:n,popoverTestId:r=`new-conversation-popover`,useFixedPlacement:i=!1}){let{t:a}=v(`openhands`),{navigate:o}=un(),{providers:s}=Pr(),{lastSelectedProvider:c,setLastSelectedProvider:l}=Fr(),[u,d]=Y.useState(!1),f=Y.useRef(null),p=Y.useRef(null),m=uo(p,{open:u,enabled:i}),[h,g]=Y.useState(c??null),[_,y]=Y.useState(``),b=Mr(_,300);Y.useEffect(()=>{if(s.length===0){h!==null&&g(null);return}h&&s.includes(h)||g(c&&s.includes(c)?c:s[0])},[s,h,c]);let{data:S,isLoading:C,isError:w,hasNextPage:T,isFetchingNextPage:E,fetchNextPage:D}=jr({provider:h}),{data:O,isLoading:k}=Nr(b,h),A=Y.useMemo(()=>S?.pages.flatMap(e=>e.items)??[],[S]),j=b?O??[]:A,{mutate:M,isPending:N}=hr(),P=x(),F=N||P;Y.useEffect(()=>{if(!u)return;let e=e=>{f.current&&!f.current.contains(e.target)&&d(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[u]),Y.useEffect(()=>{if(!u)return;let e=e=>{e.key===`Escape`&&d(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[u]);let I=e=>{F||M({repository:{name:e.full_name,gitProvider:e.git_provider,branch:e.main_branch??`main`},entryPoint:`sidebar_cloud_menu`},{onSuccess:e=>{d(!1),o(`/conversations/${e.conversation_id}`)}})},ee=e=>{g(e),l(e),y(``)},L=Mn;Y.useEffect(()=>{u&&(b||!T||E||C||j.length===0||j.length>=10||D())},[u,b,T,E,C,j.length,D]);let te=b?k:C,R=!b&&T&&j.length>0,z=Y.useCallback(()=>{d(e=>!e)},[]),B=u&&(!i||m!==null),U=i&&m?{position:`fixed`,top:m.top,left:m.left,width:m.width}:void 0;return(0,X.jsxs)(`div`,{className:H(!i&&`relative`,t),ref:f,children:[(0,X.jsx)(`span`,{ref:p,className:`inline-flex`,children:e({onClick:z,"aria-expanded":u,"aria-haspopup":`menu`,disabled:F})}),B&&(0,X.jsxs)(`div`,{"data-testid":r,className:H(lo,!i&&H(`absolute top-full mt-0`,n)),style:U,children:[s.length>1&&(0,X.jsx)(`div`,{className:`flex items-center gap-1 px-1 py-1`,"data-testid":`cloud-provider-tabs`,children:s.map(e=>{let t=e===h;return(0,X.jsxs)(`button`,{type:`button`,"data-testid":`cloud-provider-tab-${e}`,onClick:()=>ee(e),className:H(`flex items-center gap-1 rounded border px-2 py-1 text-xs`,`transition-none`,t?`border-[var(--oh-border-subtle)] bg-[var(--oh-interactive-hover)] text-white`:`border-transparent text-[var(--oh-text-secondary)] hover:text-white`),children:[(0,X.jsx)(tt,{gitProvider:e}),(0,X.jsx)(`span`,{className:`capitalize`,children:e})]},e)})}),(0,X.jsx)(`div`,{className:`px-2`,children:(0,X.jsxs)(`div`,{className:`relative`,children:[(0,X.jsx)(Ir,{width:16,height:16,"aria-hidden":!0,className:`pointer-events-none absolute left-0 top-1/2 -translate-y-1/2 text-[var(--oh-muted)]`}),(0,X.jsx)(`input`,{type:`text`,"data-testid":`cloud-repo-search-input`,value:_,onChange:e=>y(e.target.value),placeholder:a(V.COMMON$SEARCH_REPOSITORIES),disabled:!h,className:H(`w-full border-0 bg-transparent py-1.5 pl-6 pr-0 text-sm text-white`,`outline-none placeholder:text-[var(--oh-muted)]`,`focus:outline-none focus:ring-0`,`disabled:cursor-not-allowed disabled:opacity-60`)})]})}),(0,X.jsx)(rt,{inset:`menu`}),(0,X.jsxs)(`ul`,{className:H(`max-h-[40vh] overflow-y-auto custom-scrollbar-always sm:max-h-[280px]`,kn),children:[te&&j.length===0&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[var(--oh-muted)] italic`,"data-testid":`cloud-repo-loading`,children:a(V.HOME$LOADING_REPOSITORIES)}),w&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[#F87171]`,"data-testid":`cloud-repo-error`,children:a(V.HOME$FAILED_TO_LOAD_REPOSITORIES)}),!te&&!w&&j.length===0&&!!h&&(0,X.jsx)(`li`,{className:`px-2 py-2 text-sm text-[var(--oh-muted)] italic`,"data-testid":`cloud-repo-empty`,children:a(V.GITHUB$NO_RESULTS)}),j.map(e=>(0,X.jsx)(po,{repo:e,disabled:F,onSelect:I,itemClass:L},`${e.git_provider}:${e.id}`)),R&&(0,X.jsx)(`li`,{children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`cloud-repo-load-more`,disabled:E,onClick:()=>D(),className:L,children:(0,X.jsx)(`span`,{className:`text-[var(--oh-text-secondary)]`,children:a(E?V.HOME$LOADING_MORE_REPOSITORIES:V.CONVERSATION$LOAD_MORE)})})})]})]})]})}var ho=H(`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md`,`text-[var(--oh-muted)] transition-colors`,`hover:bg-[var(--oh-surface-raised)] hover:text-white`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--oh-border)]`,`disabled:cursor-not-allowed disabled:opacity-50`);function go({backendKind:e}){let{t}=v(`openhands`),n=t(V.CONVERSATION_PANEL$NEW_THREAD_FOLDER_ARIA),r=(0,X.jsx)(me,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0,strokeWidth:2});return e===`local`?(0,X.jsx)(fo,{useFixedPlacement:!0,popoverTestId:`conversation-panel-new-thread-popover`,popoverClassName:``,trigger:({onClick:e,"aria-expanded":t,disabled:i,"aria-haspopup":a})=>(0,X.jsx)(`button`,{type:`button`,className:ho,"aria-label":n,"aria-expanded":t,"aria-haspopup":a,disabled:i,"data-testid":`conversation-panel-new-thread-picker`,onClick:e,children:r})}):(0,X.jsx)(mo,{useFixedPlacement:!0,popoverTestId:`conversation-panel-new-thread-popover`,popoverClassName:``,trigger:({onClick:e,"aria-expanded":t,disabled:i,"aria-haspopup":a})=>(0,X.jsx)(`button`,{type:`button`,className:ho,"aria-label":n,"aria-expanded":t,"aria-haspopup":a,disabled:i,"data-testid":`conversation-panel-new-thread-picker`,onClick:e,children:r})})}function _o({group:e,expanded:t,previewExpanded:n,isDragging:r,dropIndicatorPosition:i,animateLayout:a,isCreatingConversationFlow:o,activeConversationId:s,discoveryConversationIds:c,onToggleExpanded:l,onDragStart:u,onDragEnd:d,onDragOver:f,onDragLeave:p,onDrop:m,onTogglePreviewExpanded:h,onLaunchFromGroup:g,renderConversationCard:_}){let{t:y}=v(`openhands`),b=(0,Y.useRef)(null),x=`thread-folder-${e.id.replace(/[^a-zA-Z0-9_-]/g,`-`)}`,S=e.id.replace(/[^a-zA-Z0-9_-]/g,`-`),{visibleConversations:C,isPreviewTruncated:w,isShowingAll:T}=Ba(e.conversations,{expanded:n,activeConversationId:s,discoveryConversationIds:c??void 0});return(0,X.jsxs)(Le.section,{ref:b,layout:a?`position`:!1,transition:{type:`spring`,stiffness:600,damping:45},"aria-labelledby":x,"data-testid":`thread-folder-${S}`,onDragOver:f,onDragLeave:p,onDrop:m,className:`relative rounded-md`,children:[i?(0,X.jsx)(`div`,{"aria-hidden":!0,"data-testid":`thread-folder-drop-indicator-${S}`,className:H(`pointer-events-none absolute inset-x-0 z-10 h-0.5 rounded-full bg-[var(--oh-accent)]`,i===`before`?`-top-0.5`:`-bottom-0.5`)}):null,(0,X.jsxs)(`div`,{className:H(r&&`opacity-0`),children:[(0,X.jsxs)(`div`,{className:H(`flex h-8 w-full min-w-0 items-center gap-0.5 rounded-md pl-2 pr-1 text-sm font-normal`,`text-[var(--oh-muted)] transition-colors hover:bg-[var(--oh-surface-raised)] hover:text-white`),children:[(0,X.jsxs)(`button`,{type:`button`,draggable:!0,id:x,"aria-expanded":t,"aria-controls":`thread-folder-content-${S}`,"data-testid":`thread-folder-drag-${S}`,"aria-label":y(t?V.CONVERSATION_PANEL$COLLAPSE_FOLDER:V.CONVERSATION_PANEL$EXPAND_FOLDER,{label:e.label}),onClick:l,onDragStart:t=>{t.stopPropagation();let{dataTransfer:n}=t;if(n){n.effectAllowed=`move`,n.setData(`text/plain`,e.id);let r=b.current;if(r&&typeof n.setDragImage==`function`){let e=r.getBoundingClientRect(),i=r.cloneNode(!0);i.style.position=`fixed`,i.style.top=`0`,i.style.left=`-9999px`,i.style.width=`${e.width}px`,i.style.margin=`0`,i.style.pointerEvents=`none`,i.style.borderRadius=`0.5rem`,i.style.padding=`0.25rem`,i.style.backgroundColor=`var(--oh-surface-raised)`,i.style.boxShadow=`0 8px 24px rgba(0, 0, 0, 0.35)`,document.body.appendChild(i),n.setDragImage(i,t.clientX-e.left,t.clientY-e.top),window.setTimeout(()=>i.remove(),0)}}u()},onDragEnd:e=>{e.stopPropagation(),d()},className:H(`group/folder flex min-h-8 min-w-0 flex-1 cursor-grab items-center gap-2 rounded-md py-1 text-left text-inherit outline-none active:cursor-grabbing`,`focus-visible:ring-1 focus-visible:ring-[var(--oh-border)]`),children:[(0,X.jsx)(K,{className:H(`h-4 w-4 shrink-0`,t?`hidden group-hover/folder:block`:`block group-hover/folder:hidden`),"aria-hidden":!0}),(0,X.jsx)(Je,{className:H(`h-4 w-4 shrink-0`,t?`block group-hover/folder:hidden`:`hidden group-hover/folder:block`),"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`truncate`,children:e.label})]}),(0,X.jsx)(`button`,{type:`button`,className:H(`inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-md`,`text-inherit transition-colors`,`hover:bg-white/10 hover:text-white`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[var(--oh-border)]`,`disabled:cursor-not-allowed disabled:opacity-50`),disabled:o,"aria-label":y(V.CONVERSATION_PANEL$ADD_CONVERSATION_TO_GROUP,{label:e.label}),"data-testid":`add-conversation-to-group-${S}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),g()},children:(0,X.jsx)(Pt,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0,strokeWidth:2})})]}),t?(0,X.jsxs)(`div`,{id:`thread-folder-content-${S}`,className:`mt-0.5 space-y-0.5`,children:[C.map(_),w?(0,X.jsx)(`div`,{className:`pl-2`,children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`thread-folder-view-more-${S}`,onClick:h,className:`cursor-pointer text-xs text-[var(--oh-text-dim)] hover:text-white`,children:y(T?V.CONVERSATION_PANEL$LESS:V.CONVERSATION_PANEL$MORE)})}):null]}):null]})]})}function vo({groups:e,groupIds:t,groupFolderOrder:n,setGroupFolderOrder:r,collapsedGroupIds:i,expandedGroupPreviewIds:a,discoveryConversationIds:o,onToggleGroupCollapsed:s,onToggleGroupPreviewExpanded:c,isCreatingConversationFlow:l,activeConversationId:u,onLaunchFromGroup:d,renderConversationCard:f}){let{t:p}=v(`openhands`),[m,h]=(0,Y.useState)(null),[g,_]=(0,Y.useState)(null),[y,b]=(0,Y.useState)(null),[x,S]=(0,Y.useState)(!1),C=(0,Y.useRef)(null);(0,Y.useEffect)(()=>()=>{C.current&&clearTimeout(C.current)},[]);let w=(0,Y.useCallback)(()=>{C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{S(!1),C.current=null},300)},[]),T=(0,Y.useCallback)(()=>{h(null),_(null),b(null)},[]),E=(0,Y.useCallback)(e=>{let t=e.currentTarget.getBoundingClientRect();return e.clientY<t.top+t.height/2?`before`:`after`},[]),D=(0,Y.useCallback)((e,i)=>{if(!m||m===e){T(),w();return}r(ro(n,t,m,e,i)),T(),w()},[m,n,t,T,r,w]);return(0,X.jsx)(`nav`,{"aria-label":p(V.SIDEBAR$CONVERSATIONS),className:`space-y-1 md:space-y-0.5 pb-1`,children:e.map(e=>(0,X.jsx)(_o,{group:e,expanded:!i.has(e.id),previewExpanded:a.has(e.id),isDragging:m===e.id,dropIndicatorPosition:g===e.id&&m!==e.id?y:null,animateLayout:x,isCreatingConversationFlow:l,activeConversationId:u,discoveryConversationIds:o,onToggleExpanded:()=>s(e.id),onDragStart:()=>{S(!0),h(e.id)},onDragEnd:()=>{T(),w()},onDragOver:t=>{t.preventDefault();let{dataTransfer:n}=t;n&&(n.dropEffect=`move`),_(e.id),b(E(t))},onDragLeave:()=>{_(t=>t===e.id?null:t)},onDrop:t=>{t.preventDefault(),D(e.id,E(t))},onTogglePreviewExpanded:()=>c(e.id),onLaunchFromGroup:()=>d(e.launch),renderConversationCard:f},e.id))})}function yo({pinnedConversations:e,isPreviewExpanded:t,onTogglePreviewExpanded:n,activeConversationId:r,showDivider:i=!1,renderConversationCard:a}){let{t:o}=v(`openhands`),{visibleConversations:s,isPreviewTruncated:c,isShowingAll:l}=Ba(e,{limit:5,expanded:t,activeConversationId:r});return(0,X.jsxs)(`section`,{"data-testid":`conversation-panel-pinned-section`,className:H(`pt-1`,i?`mb-2 border-b border-[var(--oh-border-subtle)] pb-2`:`pb-2`),children:[(0,X.jsxs)(`h3`,{className:`flex items-center gap-1.5 py-1.5 pl-2 text-sm font-normal text-[var(--oh-muted)]`,children:[(0,X.jsx)(_t,{className:`h-3.5 w-3.5 shrink-0`,"aria-hidden":!0}),o(V.CONVERSATION_PANEL$PINNED)]}),(0,X.jsx)(`div`,{className:`space-y-0.5`,children:s.map(a)}),c?(0,X.jsx)(`div`,{className:`pl-2 pt-0.5`,children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`conversation-panel-pinned-view-more`,onClick:n,className:`cursor-pointer text-xs text-[var(--oh-text-dim)] hover:text-white`,children:o(l?V.CONVERSATION_PANEL$LESS:V.CONVERSATION_PANEL$MORE)})}):null]})}var bo=`archived-conversations`,xo={archivesByBackendId:{}};function So(e,t){return e[t]??[]}var Co=Bn()(Vn((e,t)=>({...xo,archiveConversation:(n,r)=>{let i=So(t().archivesByBackendId,n);i.includes(r)||e(e=>({archivesByBackendId:{...e.archivesByBackendId,[n]:[r,...i]}}))},removeArchivedConversation:(n,r)=>{let i=So(t().archivesByBackendId,n);i.includes(r)&&e(e=>({archivesByBackendId:{...e.archivesByBackendId,[n]:i.filter(e=>e!==r)}}))},isArchived:(e,n)=>So(t().archivesByBackendId,e).includes(n)}),{name:bo,storage:Hn(()=>localStorage),partialize:e=>({archivesByBackendId:e.archivesByBackendId})})),wo={pinsByBackendId:{}};function To(e,t){return e[t]??[]}var Eo=Bn()(Vn((e,t)=>({...wo,pinConversation:(n,r)=>{let i=To(t().pinsByBackendId,n);i.includes(r)||e(e=>({pinsByBackendId:{...e.pinsByBackendId,[n]:[r,...i]}}))},unpinConversation:(n,r)=>{let i=To(t().pinsByBackendId,n);i.includes(r)&&e(e=>({pinsByBackendId:{...e.pinsByBackendId,[n]:i.filter(e=>e!==r)}}))},togglePin:(e,n)=>{To(t().pinsByBackendId,e).includes(n)?t().unpinConversation(e,n):t().pinConversation(e,n)},pruneMissingConversations:(n,r)=>{let i=new Set(r),a=To(t().pinsByBackendId,n),o=a.filter(e=>i.has(e));o.length!==a.length&&e(e=>({pinsByBackendId:{...e.pinsByBackendId,[n]:o}}))}}),{name:`pinned-conversations`,storage:Hn(()=>localStorage),partialize:e=>({pinsByBackendId:e.pinsByBackendId})})),Do=()=>{},Oo=[],ko=3600*1e3,Ao=e=>{let t=Date.now()-ko,n=[],r=[];for(let i of e){let e=i.updated_at?Date.parse(i.updated_at):NaN;Number.isFinite(e)&&e<t?r.push(i):n.push(i)}return{recent:n,older:r}};function jo({onClose:e,compact:t=!1}){let{t:n}=v(`openhands`),{conversationId:r,navigate:a}=un(),{backend:o}=F(),s=at(),c=pr(e??Do),[l,u]=Y.useState(!1),[d,f]=Y.useState(!1),[p,m]=Y.useState(!1),[h,g]=Y.useState(!1),[_,y]=Y.useState(!1),b=Z(e=>e.showOlderConversations),S=Z(e=>e.showArchivedConversations),C=Z(e=>e.toggleShowArchivedConversations),w=Z(e=>e.toggleShowOlderConversations),T=Z(e=>e.showRepoBranchMetadata),E=Z(e=>e.toggleShowRepoBranchMetadata),k=Z(e=>e.showLlmProfiles),A=Z(e=>e.toggleShowLlmProfiles),j=Z(e=>e.showTagsMetadata),M=Z(e=>e.toggleShowTagsMetadata),N=Z(e=>e.showHoverMetadata),P=Z(e=>e.toggleShowHoverMetadata),I=Z(e=>e.organizeMode),ee=Z(e=>e.setOrganizeMode),L=Z(e=>e.conversationSort),te=Z(e=>e.setConversationSort),R=Z(e=>e.threadScope),z=Z(e=>e.setThreadScope),B=Z(e=>e.automationFilterMode),ne=Z(e=>e.setAutomationFilterMode),re=Z(e=>e.selectedAutomationNames),ie=Z(e=>e.toggleAutomationName),W=Z(e=>e.groupFolderOrder),ae=Z(e=>e.setGroupFolderOrder),[oe,se]=Y.useState(!1),[ce,le]=Y.useState(!1),ue=pr(()=>{se(!1)}),[de,fe]=Y.useState(()=>new Set),[pe,me]=Y.useState(()=>new Set),[he,ge]=Y.useState(!1),_e=Eo(e=>e.pinsByBackendId[o.id]??Oo),ve=Eo(e=>e.togglePin),ye=Eo(e=>e.unpinConversation),be=Eo(e=>e.pruneMissingConversations),xe=Co(e=>e.archivesByBackendId[o.id]??Oo),Se=Co(e=>e.archiveConversation),Ce=Y.useMemo(()=>new Set(xe),[xe]),we=Co(e=>e.removeArchivedConversation),Te=Y.useCallback(e=>{fe(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),Ee=Y.useCallback(e=>{me(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);Y.useEffect(()=>{I!==`grouped`&&(fe(new Set),me(new Set))},[I]);let De=Y.useRef(null),[Oe,ke]=Y.useState(null),[Ae,je]=Y.useState(null),[Me,Ne]=Y.useState(null),{data:Pe,isLoading:Fe,isFetched:Ie,hasNextPage:Le,isFetching:Re,isFetchingNextPage:ze,fetchNextPage:Be}=Fi(),{workspaces:Ve}=dt(),{data:He}=Ii(),Ue=Y.useMemo(()=>{let e=Pe?.pages.flatMap(e=>e.items)??[],t=new Set;return e.filter(e=>t.has(e.id)?!1:(t.add(e.id),!0))},[Pe]),We=Y.useMemo(()=>{let e=new Map;return Pe?.pages.forEach((t,n)=>{t.items.forEach(t=>{e.has(t.id)||e.set(t.id,n)})}),e},[Pe]),G=Y.useMemo(()=>S?Ue:Ue.filter(e=>!Ce.has(e.id)),[Ue,Ce,S]),Ge=Y.useMemo(()=>Ka(G),[G]),Ke=Y.useMemo(()=>{if(t||I!==`grouped`||o.kind!==`local`)return[];let e=e=>e.trim().replace(/\/+$/,``),n=new Map;for(let t of Ve){let r=e(t.path);r&&n.set(r,t)}for(let t of G){let r=t.selected_workspace?e(t.selected_workspace):``;if(r&&!n.has(r)){let e=r.split(`/`).filter(Boolean).pop()??r;n.set(r,{id:r,name:e,path:r})}}return Array.from(n.values())},[o.kind,t,G,Ve,I]),qe=Y.useMemo(()=>qa(G,B,re,Ge),[B,Ge,G,re]),Je=Y.useMemo(()=>Va(_e,G),[G,_e]);Y.useEffect(()=>{if(!Ie)return;let e=Pe?.pages.flatMap(e=>e.items.map(e=>e.id))??[];be(o.id,e)},[o.id,Pe,Ie,be]),Y.useEffect(()=>{_e.length===0&&ge(!1)},[_e.length]);let Ye=Y.useMemo(()=>{let e=R===`relevant`?qe.filter(e=>U(e.execution_status)):qe;return t?e:Ha(e,_e)},[qe,t,_e,R]),{recent:Xe,older:$e}=Y.useMemo(()=>Ao(Ye),[Ye]),et=Y.useMemo(()=>Xa(b?[...Xe,...$e]:Xe,L),[Xe,$e,b,L]),tt=Y.useMemo(()=>({emptyWorkspace:n(V.CONVERSATION_PANEL$NO_WORKSPACE),emptyRepository:n(V.CONVERSATION_PANEL$NO_REPOSITORY)}),[n]),nt=Y.useMemo(()=>t||I!==`grouped`?null:[...Xe,...b?$e:[]],[t,$e,I,Xe,b]),rt=Y.useMemo(()=>nt?to(nt,o.kind,L,tt,Ke):null,[o.kind,L,tt,nt,Ke]),it=Y.useMemo(()=>nt?eo(nt,We,o.kind,{forceIncludeConversationId:r}):null,[o.kind,We,r,nt]),ot=Y.useMemo(()=>rt?no(rt,W):null,[rt,W]),st=Y.useMemo(()=>rt?.map(e=>e.id)??[],[rt]),ct=Y.useMemo(()=>Xa(Xe.filter(e=>U(e.execution_status)),L),[L,Xe]),lt=et.length,ut=ot?.length??0,ft=I===`grouped`&&!t?ut===0:lt===0,pt=ft&&B!==`all`&&G.length>0&&qe.length===0,mt=I===`grouped`&&!t?ut:lt,K=Pe?.pages.length??0,[ht,gt]=Y.useState(null),[_t,vt]=Y.useState(null),yt=Y.useRef(mt);yt.current=mt;let bt=Y.useRef(K);bt.current=K;let q=Y.useCallback(()=>{gt(null),vt(null)},[]),xt=Y.useCallback(()=>{Le&&(gt(yt.current),vt(bt.current))},[Le]);Y.useEffect(()=>{if(ht!==null){if(mt>ht){q();return}if(I===`grouped`&&!t&&_t!=null&&K>=_t+3){q();return}if(!(Re||ze)){if(!Le){q();return}Be()}}},[q,t,ht,_t,mt,K,I,Le,Re,ze,Be]);let St=ht!==null||ze,{mutate:Ct,mutateAsync:wt}=Qe(),{mutate:Tt}=Ze(),{mutate:Et}=sr(),Dt=$e.length>0&&!b,Ot=!!Le&&!Dt&&!t,{mutate:kt}=hr(),At=x(),jt=Y.useCallback(e=>{At||kt({workingDir:e.workingDir,repository:e.repository,entryPoint:`sidebar_relaunch_project`},{onSuccess:e=>{a(`/conversations/${e.conversation_id}`)}})},[kt,At,a]),Mt=Y.useCallback((e,t)=>{u(!0),ke(e),je(t)},[]),Nt=Y.useCallback((e,t)=>{f(!0),ke(e),je(t)},[]),Pt=Y.useCallback(e=>{we(o.id,e)},[o.id,we]),Ft=Y.useCallback(e=>{m(!0),ke(e)},[]),It=Y.useCallback((e,t)=>{Et({conversationId:e,newTitle:t},{onSuccess:()=>{O(n(V.CONVERSATION$TITLE_UPDATED))}})},[n,Et]),Lt=()=>{if(Oe){let e=Oe;Ct({conversationId:e},{onSuccess:()=>{we(o.id,e),e===r&&a(`/conversations`)}})}},Rt=()=>{Oe&&(Se(o.id,Oe),ye(o.id,Oe),Oe===r&&a(`/conversations`))},zt=()=>{Oe&&Tt({conversationId:Oe})},Bt=async()=>{let e=Ue.map(e=>e.id),t=await Promise.allSettled(e.map(e=>wt({conversationId:e}))),n=t.flatMap((t,n)=>t.status===`fulfilled`?[e[n]]:[]),i=t.length-n.length;for(let e of n)we(o.id,e);r!==null&&n.includes(r)&&a(`/conversations`),i>0&&D(`${i} conversation${i===1?``:`s`} could not be deleted.`)},Vt=Y.useCallback((n,a)=>{let c=_e.includes(n.id),l=Ce.has(n.id);return t?(0,X.jsx)(La,{conversationId:n.id,title:n.title??``,selectedRepository:{selected_repository:n.selected_repository,selected_branch:n.selected_branch,git_provider:n.git_provider},executionStatus:n.execution_status,sandboxStatus:n.sandbox_status,lastUpdatedAt:n.updated_at,createdAt:n.created_at,workspaceWorkingDir:n.selected_workspace??n.workspace?.working_dir,isActive:n.id===r,onClose:e,showRepositoryMetadata:T,llmModel:n.llm_model,showLlmProfiles:k,agentKind:n.agent_kind,acpServer:n.acp_server,tags:n.tags,showTags:j},n.id):(0,X.jsx)(i,{placement:`right-start`,delay:1e3,closeDelay:100,isDisabled:!N||Me===n.id,disableAnimation:!1,className:`max-w-none overflow-visible rounded-xl border border-[var(--oh-border)] bg-base-secondary p-0 text-white shadow-xl`,content:(0,X.jsx)(Aa,{title:n.title??``,executionStatus:n.execution_status,sandboxStatus:n.sandbox_status,selectedRepository:{selected_repository:n.selected_repository,selected_branch:n.selected_branch,git_provider:n.git_provider},workspaceWorkingDir:n.selected_workspace??n.workspace?.working_dir,llmModel:n.llm_model,agentKind:n.agent_kind,acpServer:n.acp_server,createdAt:n.created_at,tags:n.tags}),children:(0,X.jsx)(pn,{to:s(`/conversations/${n.id}`),onClick:e,className:H(`block rounded-md transition-colors`,Me!==n.id&&`hover:bg-[var(--oh-surface)]`,(n.id===r||Me===n.id)&&`bg-[var(--oh-surface)]`),children:(0,X.jsx)(Ea,{onDelete:()=>Mt(n.id,n.title??``),onArchive:l?void 0:()=>Nt(n.id,n.title??``),onUnarchive:l?()=>Pt(n.id):void 0,onStop:()=>Ft(n.id),onChangeTitle:e=>It(n.id,e),title:n.title??``,selectedRepository:{selected_repository:n.selected_repository,selected_branch:n.selected_branch,git_provider:n.git_provider},lastUpdatedAt:n.updated_at,createdAt:n.created_at,executionStatus:n.execution_status,sandboxStatus:n.sandbox_status,conversationId:n.id,contextMenuOpen:Me===n.id,onContextMenuToggle:e=>Ne(e?n.id:null),isActive:n.id===r,workspaceWorkingDir:n.selected_workspace??n.workspace?.working_dir,showRepositoryMetadata:T,llmModel:n.llm_model,showLlmProfiles:k,agentKind:n.agent_kind,acpServer:n.acp_server,tags:n.tags,showTags:j,isArchived:l,isPinned:c,onTogglePin:()=>ve(o.id,n.id),alwaysShowPinIcon:c&&!a?.inPinnedSection})})},n.id)},[o.id,Ce,t,r,Nt,It,Mt,Ft,Pt,e,Me,_e,T,k,j,N,ve]),J=Fe||!Ie,Ht=!t&&!J&&Je.length>0,Ut=I===`grouped`&&!t&&ot!=null&&ot.length>0,Wt=Ie&&!Fe&&!t&&ft&&!Ht&&!He?.length&&!Ut;return(0,X.jsxs)(`div`,{ref:c,"data-testid":`conversation-panel`,className:`flex h-full min-h-0 w-full flex-col`,children:[!t&&(0,X.jsx)(`div`,{className:H(`-ml-2.5 w-[calc(100%+0.625rem)] max-w-none box-border border-b`,ce?`border-[var(--oh-border)]`:`border-transparent`),children:(0,X.jsxs)(`div`,{"data-testid":`older-conversations-summary`,className:`flex min-w-0 flex-nowrap items-center gap-x-2 py-2 pl-4 pr-2.5 text-[var(--oh-muted)]`,children:[(0,X.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-[var(--oh-muted)]`,children:n(V.SIDEBAR$CONVERSATIONS)}),(0,X.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,X.jsx)(go,{backendKind:o.kind}),(0,X.jsx)(co,{filterMenuOpen:oe,setFilterMenuOpen:se,menuRef:ue,backendKind:o.kind,organizeMode:I,setOrganizeMode:ee,conversationSort:L,setConversationSort:te,threadScope:R,setThreadScope:z,automationFilterMode:B,setAutomationFilterMode:ne,selectedAutomationNames:re,onToggleAutomationName:ie,automationNameFacets:Ge,showOlderConversations:b,showArchivedConversations:S,toggleShowArchivedConversations:C,toggleShowOlderConversations:w,showRepoBranchMetadata:T,toggleShowRepoBranchMetadata:E,showLlmProfiles:k,toggleShowLlmProfiles:A,showTagsMetadata:j,toggleShowTagsMetadata:M,showHoverMetadata:N,toggleShowHoverMetadata:P,totalConversationsCount:Ue.length,onRequestDeleteAll:()=>y(!0)})]})]})}),(0,X.jsxs)(`div`,{ref:De,"data-testid":`conversation-panel-list-scroll`,onScroll:e=>{le(e.currentTarget.scrollTop>0)},className:H(`flex min-h-0 flex-1 flex-col overflow-y-auto overflow-x-hidden overscroll-contain custom-scrollbar-always`,!t&&`conversation-panel-list-scroll`),children:[J&&(0,X.jsx)(Ia,{compact:t}),!t&&Wt&&(0,X.jsx)(`div`,{"data-testid":`conversation-panel-empty-state`,className:`flex min-h-0 flex-1 flex-col items-center justify-center px-4 py-8`,children:(0,X.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)]`,children:n(pt?V.CONVERSATION_PANEL$NO_AUTOMATION_MATCHES:V.CONVERSATION$NO_CONVERSATIONS)})}),Ht?(0,X.jsx)(yo,{pinnedConversations:Je,isPreviewExpanded:he,onTogglePreviewExpanded:()=>ge(e=>!e),activeConversationId:r,showDivider:!t&&I===`chronological`,renderConversationCard:e=>Vt(e,{inPinnedSection:!0})}):null,!t&&He?.map(t=>(0,X.jsx)(pn,{to:s(`/conversations/task-${t.id}`),onClick:e,className:`block`,children:(0,X.jsx)(Fa,{task:t})},t.id)),!J&&t?ct.map(e=>Vt(e)):null,!J&&!t&&I===`grouped`&&ot&&ot.length>0?(0,X.jsx)(vo,{groups:ot,groupIds:st,groupFolderOrder:W,setGroupFolderOrder:ae,collapsedGroupIds:de,expandedGroupPreviewIds:pe,discoveryConversationIds:it,onToggleGroupCollapsed:Te,onToggleGroupPreviewExpanded:Ee,isCreatingConversationFlow:At,activeConversationId:r,onLaunchFromGroup:jt,renderConversationCard:e=>Vt(e)}):null,!J&&!t&&I===`chronological`?(0,X.jsx)(`div`,{className:`space-y-0.5`,children:et.map(e=>Vt(e))}):null,Ot&&(St?(0,X.jsx)(`div`,{className:`py-1`,children:(0,X.jsx)(Ia,{compact:t})}):(0,X.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,X.jsx)(`button`,{type:`button`,"data-testid":`load-more-conversations`,onClick:xt,className:`text-xs text-[var(--oh-muted)] hover:text-white`,children:n(V.CONVERSATION$LOAD_MORE)})}))]}),l&&(0,X.jsx)(ar,{onConfirm:()=>{Lt(),u(!1),je(null)},onCancel:()=>{u(!1),je(null)},conversationTitle:Ae??void 0}),d&&(0,X.jsx)(Li,{onConfirm:()=>{Rt(),f(!1),je(null)},onCancel:()=>{f(!1),je(null)},conversationTitle:Ae??void 0}),_&&(0,X.jsx)(ar,{title:n(V.CONVERSATION$CONFIRM_DELETE_ALL_TITLE),description:n(V.CONVERSATION$CONFIRM_DELETE_ALL_DESC,{count:Ue.length}),onConfirm:async()=>{await Bt(),y(!1)},onCancel:()=>y(!1)}),p&&(0,X.jsx)(fr,{onConfirm:()=>{zt(),m(!1)},onCancel:()=>m(!1)}),h&&(0,X.jsx)(Ri,{onConfirm:()=>{e?.()},onClose:()=>g(!1),onCancel:()=>g(!1)})]})}function Mo({collapsed:e}){return e?null:(0,X.jsx)(`div`,{className:`flex flex-col flex-1 min-h-0`,children:(0,X.jsx)(`div`,{className:`flex min-h-0 w-full flex-1 flex-col`,children:(0,X.jsx)(jo,{})})})}var $=18;function No(){return(0,X.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:$,height:$,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,X.jsx)(`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`}),(0,X.jsx)(`path`,{d:`m7 16.5-4.74-2.85`}),(0,X.jsx)(`path`,{d:`m7 16.5 5-3`}),(0,X.jsx)(`path`,{d:`M7 16.5v5.17`}),(0,X.jsx)(`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`}),(0,X.jsx)(`path`,{d:`m17 16.5-5-3`}),(0,X.jsx)(`path`,{d:`m17 16.5 4.74-2.85`}),(0,X.jsx)(`path`,{d:`m17 16.5v5.17`}),(0,X.jsx)(`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`}),(0,X.jsx)(`path`,{d:`M12 8 7.26 5.15`}),(0,X.jsx)(`path`,{d:`m12 8 4.74-2.85`}),(0,X.jsx)(`path`,{d:`M12 13.5V8`})]})}function Po({id:e,className:t}){let n=H(`shrink-0 text-white`,t),r=`sidebar-onboarding-checklist-icon-${e}`;switch(e){case`configure-llm`:return(0,X.jsx)(`span`,{"data-testid":r,className:`inline-flex shrink-0`,children:(0,X.jsx)(G,{width:$,height:$,className:n,"aria-hidden":!0})});case`start-conversation`:return(0,X.jsx)(`span`,{"data-testid":r,className:`inline-flex shrink-0`,children:(0,X.jsx)(Pt,{size:$,strokeWidth:2,className:n,"aria-hidden":!0})});case`schedule-task`:return(0,X.jsx)(`span`,{"data-testid":r,className:`inline-flex shrink-0`,children:(0,X.jsx)(ni,{width:$,height:$,className:n,"aria-hidden":!0})});case`customize-agent`:return(0,X.jsx)(`span`,{"data-testid":r,className:H(`inline-flex shrink-0`,n),children:(0,X.jsx)(No,{})});case`connect-mcp`:return(0,X.jsx)(`span`,{"data-testid":r,className:`inline-flex shrink-0`,children:(0,X.jsx)(ii,{width:$,height:$,className:n,"aria-hidden":!0})});case`join-slack`:return(0,X.jsx)(`span`,{"data-testid":r,className:`inline-flex shrink-0`,children:(0,X.jsx)(kr,{width:$,height:$,className:n,"aria-hidden":!0})});default:return e}}var Fo=H(`inline-flex shrink-0 items-center rounded-md bg-white px-2.5 py-1`,`text-xs font-medium text-black transition-colors hover:bg-white/90`);function Io({id:e,onActionClick:t,onDocsClick:n}){let{t:r}=v(`openhands`),i=Wr[e],a=Hr[e],o=Vr[e],s=qr[e],c=ei(e);return(0,X.jsxs)(`div`,{className:`flex w-[280px] flex-col gap-2.5 p-3`,"data-testid":`sidebar-onboarding-checklist-preview-${e}`,children:[(0,X.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,X.jsx)(`span`,{className:`mt-0.5 inline-flex shrink-0 items-center justify-center`,children:(0,X.jsx)(Po,{id:e})}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 text-sm font-medium text-white`,children:r(i)})]}),(0,X.jsx)(`p`,{className:`text-xs leading-relaxed text-[var(--oh-muted)]`,children:r(a)}),(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,X.jsxs)(`a`,{href:s,target:`_blank`,rel:`noreferrer`,"data-testid":`sidebar-onboarding-checklist-preview-docs-${e}`,className:`inline-flex min-w-0 items-center gap-2 text-xs text-[var(--oh-muted)] transition-colors hover:text-white hover:underline`,onClick:n,children:[(0,X.jsx)(ve,{className:`size-3.5 shrink-0`,"aria-hidden":!0}),r(V.SIDEBAR$ONBOARDING_CHECKLIST_DOCS_LINK)]}),c.kind===`external`?(0,X.jsx)(`a`,{href:c.href,target:`_blank`,rel:`noreferrer`,"data-testid":`sidebar-onboarding-checklist-preview-action-${e}`,className:Fo,onClick:t,children:r(o)}):(0,X.jsx)(pn,{to:c.href,"data-testid":`sidebar-onboarding-checklist-preview-action-${e}`,className:Fo,onClick:t,children:r(o)})]})]})}function Lo(e){return e?.profiles.some(e=>e.api_key_set===!0)??!1}function Ro(e){let t=e?.agent_settings?.llm,n=typeof t?.model==`string`&&t.model.length>0,r=e?.llm_api_key_set===!0||e?.llm_api_key_is_set===!0||t?.auth_type===`subscription`;return n&&r}function zo(e,t,n,r,i){return!!(Lo(r)||t||Ro(e))}function Bo(e){return Object.keys(Zt(e)).length>0}function Vo(){let{isCompleted:e}=Ut(),{currentPath:t}=un(),n=(0,Y.useSyncExternalStore)(Yr,Qr,()=>!1),[r,i]=(0,Y.useState)(Gr),[a,o]=(0,Y.useState)(Jr),[s,c]=(0,Y.useState)(Rr),{data:l}=Qt(),{isConfigured:u,isLoading:d}=st(),{data:f,isLoading:p}=mr(),{data:m}=Fi(1),{data:h}=ri(),{data:g}=ai({limit:1,offset:0,enabled:h?.status===`ok`});(0,Y.useEffect)(()=>{ti(t)&&(a||(Zr(!0),o(!0)))},[t,a]);let _=(0,Y.useMemo)(()=>{let e=(m?.pages[0]?.items.length??0)>0,t=(g?.total??0)>0;return{"configure-llm":zo(l,u,d,f,p),"connect-mcp":Bo(l?.agent_settings?.mcp_config),"start-conversation":e,"schedule-task":t,"customize-agent":a,"join-slack":s}},[g?.total,m?.pages,a,s,u,d,p,f,l,l?.agent_settings?.mcp_config]),v=(0,Y.useMemo)(()=>Ur.map(e=>({id:e,isComplete:_[e]})),[_]),y=v.filter(e=>e.isComplete).length,b=y===v.length,x=e&&!n&&!b;return{items:v,completedCount:y,totalCount:v.length,isVisible:x,isMinimized:r,dismiss:()=>{Br(!0)},toggleMinimized:()=>{i(e=>{let t=!e;return Kr(t),t})},markJoinSlackComplete:()=>{s||($r(!0),c(!0))}}}var Ho=`rounded-xl border border-[var(--oh-border)] bg-base-secondary p-0 text-white shadow-xl`,Uo=H(`flex min-w-0 w-full items-center gap-2.5 rounded-md px-2.5 py-1.5 text-sm`,`transition-colors hover:bg-[var(--oh-surface)]`);function Wo({isComplete:e}){return(0,X.jsx)(`span`,{"aria-hidden":!0,className:H(`inline-flex size-4 shrink-0 items-center justify-center rounded-full border`,e?`border-primary bg-primary text-[var(--oh-color-base)]`:`border-[var(--oh-border)] bg-transparent`),children:e?(0,X.jsx)(Ne,{className:`size-2.5`,strokeWidth:3}):null})}function Go({id:e,isComplete:t,onActivate:n}){let{t:r}=v(`openhands`),{trackOnboardingLinkClicked:a}=Yt(),o=Wr[e],s=ei(e),c=Lr[e],l=()=>{a({linkId:c,destinationType:Xr[e],surface:`landing_checklist`,checklistItem:c,isExternal:s.kind===`external`}),n?.()},u=()=>{a({linkId:`open_docs`,destinationType:`documentation`,surface:`landing_checklist`,checklistItem:c,isExternal:!0})},d=H(Uo,t?`text-muted`:`text-content`),f=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Wo,{isComplete:t}),(0,X.jsx)(`span`,{className:H(`min-w-0 flex-1 truncate`,t&&`line-through`),children:r(o)})]});return(0,X.jsx)(`li`,{children:(0,X.jsx)(i,{placement:`right-start`,delay:0,closeDelay:100,disableAnimation:!1,className:Ho,content:(0,X.jsx)(Io,{id:e,onActionClick:l,onDocsClick:u}),children:s.kind===`external`?(0,X.jsx)(`a`,{href:s.href,target:`_blank`,rel:`noreferrer`,"data-testid":`sidebar-onboarding-checklist-item-${e}`,className:d,onClick:l,children:f}):(0,X.jsx)(pn,{to:s.href,"data-testid":`sidebar-onboarding-checklist-item-${e}`,className:d,onClick:l,children:f})})})}function Ko({collapsed:e}){let{t}=v(`openhands`),{items:n,completedCount:r,isVisible:i,isMinimized:a,toggleMinimized:o,markJoinSlackComplete:s}=Vo();return e||!i?null:(0,X.jsxs)(`div`,{"data-testid":`sidebar-onboarding-checklist`,"data-minimized":a?`true`:`false`,className:H(`w-full shrink-0 overflow-hidden rounded-xl border border-[var(--oh-border)]`,`bg-[var(--oh-surface-raised)] shadow-sm`),children:[(0,X.jsx)(`div`,{className:H(`px-1`,a?`py-1`:`pt-2 pb-1`),children:(0,X.jsxs)(`div`,{className:H(`relative flex w-full items-center gap-0.5 rounded-md px-1.5`,`transition-colors hover:bg-[var(--oh-surface)]`,a?`py-1`:`py-1.5`),children:[(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-onboarding-checklist-toggle`,"aria-expanded":!a,"aria-label":t(a?V.SIDEBAR$ONBOARDING_CHECKLIST_EXPAND:V.SIDEBAR$ONBOARDING_CHECKLIST_COLLAPSE),onClick:o,className:`absolute inset-0 z-0 cursor-pointer rounded-md`}),(0,X.jsx)(`div`,{className:`relative z-10 min-w-0 flex-1 px-0.5 pointer-events-none`,children:(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-0.5`,children:[(0,X.jsx)(`span`,{className:`text-sm font-semibold text-content`,children:t(V.SIDEBAR$ONBOARDING_CHECKLIST_TITLE)}),(0,X.jsx)(`span`,{className:`text-xs text-muted`,children:t(V.SIDEBAR$ONBOARDING_CHECKLIST_PROGRESS,{completed:r})})]})}),(0,X.jsx)(`span`,{"data-testid":`sidebar-onboarding-checklist-chevron`,"aria-hidden":!0,className:H(`relative z-10 inline-flex size-7 shrink-0 items-center justify-center`,`pointer-events-none text-[var(--oh-muted)]`),children:(0,X.jsx)(Pe,{className:H(`size-4 transition-transform motion-reduce:transition-none`,a&&`-rotate-90`)})})]})}),a?null:(0,X.jsx)(`ul`,{className:`flex flex-col gap-0.5 px-2.5 pb-2`,children:n.map(e=>(0,X.jsx)(Go,{id:e.id,isComplete:e.isComplete,onActivate:zr(e.id)?s:void 0},e.id))})]})}var qo=e=>(0,X.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 20 20`,fill:`none`,...e,children:[(0,X.jsx)(`mask`,{id:`mask0_18339_1445`,style:{maskType:`luminance`},maskUnits:`userSpaceOnUse`,x:1,y:1,width:18,height:18,children:(0,X.jsx)(`path`,{d:`M19 1H1V19H19V1Z`,fill:`white`})}),(0,X.jsxs)(`g`,{mask:`url(#mask0_18339_1445)`,children:[(0,X.jsx)(`path`,{d:`M10 18.1818V16.5454`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M10 1.81836V3.45472`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M1.81824 10H3.4546`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M18.1818 10H16.5454`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M5.93359 17.1019L6.74359 15.6782`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M14.0663 2.89844L13.2563 4.32208`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M2.89819 5.93359L4.32183 6.74359`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M17.1019 14.0663L15.6782 13.2563`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M5.92542 2.90625L6.7436 4.3217`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M14.0909 17.0854L13.2727 15.6699`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M17.0855 5.90918L15.67 6.72736`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M2.91455 14.0911L4.33001 13.2729`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M10 16.5455C13.615 16.5455 16.5455 13.615 16.5455 10C16.5455 6.38509 13.615 3.45459 10 3.45459C6.38509 3.45459 3.45459 6.38509 3.45459 10C3.45459 13.615 6.38509 16.5455 10 16.5455Z`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,X.jsx)(`path`,{d:`M12.5854 9.77916L8.80545 7.59461C8.63363 7.49643 8.41272 7.61916 8.41272 7.81552V12.1846C8.41272 12.381 8.62545 12.5119 8.80545 12.4055L12.5854 10.221C12.7573 10.1228 12.7573 9.86916 12.5854 9.77098V9.77916Z`,fill:`currentColor`,stroke:`currentColor`,strokeWidth:1.67,strokeLinecap:`round`,strokeLinejoin:`round`})]})]}),Jo=18,Yo=34,Xo=Math.round(Yo*30/46);function Zo({collapsed:e,showCollapseToggle:t,showMobileCloseButton:n=!1,onCloseMobile:r,collapseToggleLabel:i,onCollapse:a,onExpand:o,showCollapsedExpandButton:s,isExtensionsActive:c,currentPath:l,activeBackendHealth:u,collapsedBackendPopoverOpen:d,setCollapsedBackendPopoverOpen:f,collapsedBackendPopoverRef:p,collapsedBackendCloseTimer:m,onOpenAddBackend:h,onOpenManageBackends:g}){let{t:_}=v(`openhands`),y=m;return(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,X.jsxs)(`div`,{className:vn(e),children:[(0,X.jsxs)(`div`,{className:H(e&&t?yn:`flex min-w-0 shrink-0 items-center`),children:[(0,X.jsx)(`div`,{className:H(e&&t&&`flex h-full w-full items-center justify-start pl-2.5 transition-opacity duration-150`,e&&s&&`opacity-0`),children:(0,X.jsx)(li,{logoWidth:Yo,logoHeight:Xo,logoClassName:`max-w-none`,className:H(mn,`overflow-visible`)})}),e&&t?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-collapse-toggle`,"aria-pressed":e,"aria-label":i,onClick:o,className:H(bn,s?`opacity-100 pointer-events-auto`:`opacity-0 pointer-events-none`),children:(0,X.jsx)(Re,{width:14,height:14})}):null]}),!e&&t?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-collapse-toggle`,"aria-pressed":e,"aria-label":i,onClick:a,className:H(`hidden md:inline-flex ml-auto`,_n,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(Ie,{width:14,height:14})}):null,!e&&n?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-mobile-drawer-close`,onClick:r,"aria-label":_(V.SIDEBAR$CLOSE_MENU),className:H(`inline-flex ml-auto`,_n,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`),children:(0,X.jsx)(Ie,{width:14,height:14})}):null]}),(0,X.jsxs)(`nav`,{className:hn(e),children:[(0,X.jsx)(Oi,{collapsed:e}),(0,X.jsx)(Cn,{to:`/conversations`,end:!0,label:_(V.SIDEBAR$NEW_CHAT),testId:`sidebar-conversations-link`,collapsed:e,icon:(0,X.jsx)(Pt,{width:Jo,height:Jo})}),(0,X.jsx)(Cn,{to:`/customize`,label:_(V.NAV$CUSTOMIZE),testId:`sidebar-skills-link`,collapsed:e,forceActive:c,icon:(0,X.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:Jo,height:Jo,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,X.jsx)(`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`}),(0,X.jsx)(`path`,{d:`m7 16.5-4.74-2.85`}),(0,X.jsx)(`path`,{d:`m7 16.5 5-3`}),(0,X.jsx)(`path`,{d:`M7 16.5v5.17`}),(0,X.jsx)(`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`}),(0,X.jsx)(`path`,{d:`m17 16.5-5-3`}),(0,X.jsx)(`path`,{d:`m17 16.5 4.74-2.85`}),(0,X.jsx)(`path`,{d:`m17 16.5v5.17`}),(0,X.jsx)(`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`}),(0,X.jsx)(`path`,{d:`M12 8 7.26 5.15`}),(0,X.jsx)(`path`,{d:`m12 8 4.74-2.85`}),(0,X.jsx)(`path`,{d:`M12 13.5V8`})]})}),Kt()&&(0,X.jsx)(Cn,{to:Xt(),label:qt().sidebarLabel,testId:`sidebar-automations-link`,collapsed:e,icon:(0,X.jsx)(qo,{width:Jo,height:Jo})})]}),(0,X.jsx)(Mo,{collapsed:e}),e&&t?(0,X.jsxs)(`nav`,{className:H(hn(e),`mt-auto pb-2 cursor-pointer`),children:[(0,X.jsx)(Tn,{content:_(V.SIDEBAR$SETTINGS),placement:`right`,children:(0,X.jsxs)(pn,{to:`/settings`,"data-testid":`collapsed-settings-link`,"aria-label":_(V.SIDEBAR$SETTINGS),className:gn({collapsed:!0}),children:[(0,X.jsx)(Sn,{active:l.startsWith(`/settings`),children:(0,X.jsx)(Dt,{width:Jo,height:Jo})}),(0,X.jsx)(`span`,{className:xn(!0),children:_(V.SIDEBAR$SETTINGS)})]})}),(0,X.jsxs)(`div`,{className:`relative`,ref:p,onMouseEnter:()=>{y.current&&=(clearTimeout(y.current),null),f(!0)},onMouseLeave:()=>{y.current=setTimeout(()=>f(!1),150)},children:[(0,X.jsxs)(`button`,{type:`button`,"data-testid":`collapsed-backend-selector-link`,"aria-label":_(V.BACKEND$MANAGE),"aria-expanded":d,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onMouseUp:e=>e.stopPropagation(),className:H(gn({collapsed:!0}),`relative`),children:[(0,X.jsx)(Sn,{active:d,children:(0,X.jsxs)(`span`,{className:`relative inline-flex size-[18px] shrink-0 items-center justify-center`,children:[(0,X.jsx)(At,{isConnected:u?.isConnected??null,className:`absolute -left-0.5 -top-0.5 z-[1] pointer-events-none`}),(0,X.jsx)(de,{width:Jo,height:Jo})]})}),(0,X.jsx)(`span`,{className:xn(!0),children:_(V.BACKEND$MANAGE)})]}),d?(0,X.jsx)(`div`,{className:`absolute bottom-[-4px] left-full pl-2.5 z-40 w-[272px]`,onClick:e=>e.stopPropagation(),children:(0,X.jsx)(Ti,{sidebarCollapsed:e,hideTrigger:!0,defaultOpen:!0,openUpward:!0,onSelectOption:()=>f(!1),onOpenAddBackend:h,onOpenManageBackends:g})}):null]})]}):null,e?null:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`div`,{className:`mb-2 shrink-0 pr-2.5`,children:(0,X.jsx)(Ko,{collapsed:e})}),(0,X.jsxs)(`div`,{className:H(`flex flex-col items-stretch max-w-none box-border shrink-0 gap-2`,`-ml-2.5 w-[calc(100%+0.625rem)] border-t border-[var(--oh-border)] pt-2 px-2.5`),children:[(0,X.jsx)(Pi,{hideWhenUpToDate:!0}),(0,X.jsx)(Ti,{sidebarCollapsed:e,openUpward:!0})]})]})]})}var Qo=Y.lazy(()=>a(()=>import(`./settings-modal-AzEF1QPP.js`).then(e=>({default:e.SettingsModal})),__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]))),$o=Y.lazy(()=>a(()=>Promise.resolve().then(()=>_i).then(e=>({default:e.AddBackendModal})),void 0)),es=Y.lazy(()=>a(()=>import(`./manage-backends-modal-BCUPswyl.js`).then(e=>e.n).then(e=>({default:e.ManageBackendsModal})),__vite__mapDeps([65,1,2,3,4,5,6,7,8,11,66,67,68,18,47,48,49,50,20,69,28,70,27,36,15,31,35,33,71,14,34,72,73,74,75,76,77]))),ts=250;function ns(){let{t:e}=v(`openhands`),{currentPath:t}=un(),{data:n}=Gt(),{data:r,error:i,isError:a,isFetching:o}=Qt(),{backends:s,active:c}=I(),l=Ht(s)[c.backend.id],u=Ot(e=>e.collapsed),d=Ot(e=>e.setCollapsed),[f,p]=Y.useState(!1),[m,h]=Y.useState(!1),g=Y.useRef(null),[_,y]=Y.useState(!1),[b,x]=Y.useState(!1),[S,C]=Y.useState(!1),w=Y.useRef(!1),[,T]=Y.useReducer(e=>e+1,0),{isOpen:E,close:O}=cr(),[k,A]=Y.useState(!1),[j,M]=Y.useState(!1),N=pr(()=>h(!1)),P=$t(i);Y.useEffect(()=>{O()},[t,O]),Y.useEffect(()=>{if(E){A(!0);let e=requestAnimationFrame(()=>{M(!0)});return()=>cancelAnimationFrame(e)}M(!1);let e=window.setTimeout(()=>{A(!1)},ts);return()=>window.clearTimeout(e)},[E]),Y.useEffect(()=>{if(!E)return;let e=e=>{e.key===`Escape`&&O()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[E,O]),Y.useEffect(()=>{t===`/settings`?p(!1):!o&&a&&P!==404?D(e(V.SETTINGS$FETCH_ERROR)):P===404&&!n?.feature_flags?.hide_llm_settings&&p(!0)},[t,o,a,P,n?.feature_flags?.hide_llm_settings,e]);let F=e(u?V.SIDEBAR$EXPAND:V.SIDEBAR$COLLAPSE),ee=Y.useCallback(e=>{if(!u)return;let t=e.target;t instanceof HTMLElement&&(t.closest(`a,button,input,textarea,select,[role='button'],[role='link']`)||d(!1))},[u,d]),L={collapseToggleLabel:F,onCollapse:Y.useCallback(()=>{C(!1),w.current=!0,T(),d(!0),window.setTimeout(()=>{w.current=!1,T()},250)},[d]),onExpand:()=>d(!1),showCollapsedExpandButton:u&&S&&!w.current,isExtensionsActive:t===`/customize`||t.startsWith(`/skills`)||t===`/plugins`||t===`/mcp`,currentPath:t,activeBackendHealth:l,collapsedBackendPopoverOpen:m,setCollapsedBackendPopoverOpen:h,collapsedBackendPopoverRef:N,collapsedBackendCloseTimer:g,onOpenAddBackend:()=>y(!0),onOpenManageBackends:()=>x(!0)};return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`aside`,{"aria-label":e(V.SIDEBAR$NAVIGATION_LABEL),"data-collapsed":u?`true`:`false`,onClick:ee,onMouseEnter:()=>{u&&C(!0)},onMouseLeave:()=>{C(!1)},className:H(`max-md:hidden flex bg-base flex-col min-h-0 transition-[width,min-width] duration-200`,`md:border-r md:border-[var(--oh-border)] md:h-full`,u?`md:w-[60px] md:min-w-[60px] md:px-2.5`:`md:w-[300px] md:min-w-[300px] pb-2 md:pl-2.5 md:pr-0`,t===`/`&&`md:pb-3`),children:(0,X.jsx)(Zo,{collapsed:u,showCollapseToggle:!0,...L})}),k?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`div`,{className:H(`fixed inset-0 z-40 bg-black/50 md:hidden`,`transition-opacity ease-in-out motion-reduce:transition-none`,j?`opacity-100`:`pointer-events-none opacity-0`),style:{transitionDuration:`${ts}ms`},onClick:O,"aria-hidden":!j}),(0,X.jsx)(`aside`,{"aria-label":e(V.SIDEBAR$NAVIGATION_LABEL),"data-testid":`sidebar-mobile-drawer`,"aria-hidden":!j,className:H(`fixed inset-y-0 left-0 z-50 flex min-h-0 w-[min(300px,85vw)] flex-col bg-base`,`border-r border-[var(--oh-border)] pb-2 pl-2.5 pr-0 md:hidden`,`transition-transform ease-in-out motion-reduce:transition-none`,j?`translate-x-0`:`-translate-x-full`),style:{transitionDuration:`${ts}ms`},children:(0,X.jsx)(Zo,{collapsed:!1,showCollapseToggle:!1,showMobileCloseButton:!0,onCloseMobile:O,...L})})]}):null,f&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(Qo,{settings:r,onClose:()=>p(!1)})}),_&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)($o,{onClose:()=>y(!1)})}),b&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(es,{onClose:()=>x(!1)})})]})}var rs=`/settings`,is=`/customize`,as=[`/skills`,`/mcp`,`/plugins`];function os(e){return e===rs?{mode:`menu`}:e.startsWith(`${rs}/`)&&e.length>9?{mode:`back`,backTo:rs,backLabelKey:V.SETTINGS$TITLE}:e===is?{mode:`menu`}:as.some(t=>e===t||e.startsWith(`${t}/`))?{mode:`back`,backTo:is,backLabelKey:V.NAV$CUSTOMIZE}:{mode:`menu`}}function ss(){let{t:e}=v(`openhands`),{currentPath:t,navigate:n}=un(),r=os(t);return(0,X.jsxs)(`header`,{className:`flex md:hidden h-12 shrink-0 items-center gap-2 px-2.5`,"aria-label":e(V.SIDEBAR$NAVIGATION_LABEL),children:[(0,X.jsx)(dr,{}),r.mode===`back`&&r.backTo?(0,X.jsx)(`button`,{type:`button`,"data-testid":`sidebar-mobile-back-button`,onClick:()=>n(r.backTo),"aria-label":e(r.backLabelKey??V.COMMON$BACK),className:lr,children:(0,X.jsx)(Ie,{size:20,className:or,"aria-hidden":!0,strokeWidth:2})}):null]})}function cs(){let{backend:e}=F(),t=e.kind===`local`,{data:n}=mr(),{mutate:r,isPending:i}=Rt(),a=(0,Y.useRef)(null);(0,Y.useEffect)(()=>{a.current=null},[e.id]),(0,Y.useEffect)(()=>{if(!t||i||!n)return;let{profiles:e,active_profile:o}=n,s=o!=null&&e.some(e=>e.name===o);if(e.length===0||s){a.current=null;return}let c=e.find(e=>e.api_key_set)??e[0];a.current!==c.name&&(a.current=c.name,r(c.name))},[t,n,i,r])}var ls=()=>{let{backend:e}=F(),{data:t}=Qt(),{mutate:n,isPending:r}=en(`personal`,{retry:2}),i=Y.useSyncExternalStore(te,P,()=>null),a=Y.useRef(null);Y.useEffect(()=>{if(t!==void 0){if(i!==null){if((t.user_consents_to_analytics===!0?`granted`:t.user_consents_to_analytics===!1?`denied`:null)===i){a.current=null,e.kind===`cloud`&&N(i);return}if(e.kind!==`cloud`)return;let o=`${e.id}:${i}`;if(r||a.current===o)return;a.current=o,n({user_consents_to_analytics:i===`granted`});return}t.user_consents_to_analytics!==null&&k(t.user_consents_to_analytics===!0?`granted`:`denied`,{syncToCloud:!1})}},[e.id,e.kind,r,i,n,t])};function us(){let{backend:e}=F(),t=Y.useSyncExternalStore(te,A,()=>`pending`),n=Y.useRef(null);Y.useEffect(()=>{let r=t===`pending`?ee():null;if(e.kind!==`local`||t===`pending`&&!r)return;let i=t===`granted`?`granted`:`denied`,a=t===`pending`?r:``,o=`${e.id}:${e.host}:${e.apiKey??``}:${i}:${a}`;n.current!==o&&(n.current=o,Jt.syncTelemetryConsent(i).catch(()=>{}))},[e.apiKey,e.host,e.id,e.kind,t])}var ds=`agent_canvas_cloud_cookie_backend_added`,fs=new Set;function ps(e,t){return`${ds}:${e}:${t}`}function ms(e,t){let n=ps(e,t);if(typeof window>`u`)return!0;try{return window.sessionStorage.getItem(n)===`true`||fs.has(n)}catch{return fs.has(n)}}function hs(e,t){let n=ps(e,t);if(!(typeof window>`u`))try{window.sessionStorage.setItem(n,`true`)}catch{fs.add(n)}}var gs=()=>{let{backend:e,orgId:t}=F(),{data:n}=Qt(),{trackBackendAdded:r}=Yt(),i=Y.useRef(r),a=Rn(),o=e.kind===`cloud`?a[e.id]:void 0,s=o?.isLoading??!0,c=o?.userId??null,l=(n?.email||n?.git_user_email)?.trim()||void 0;Y.useEffect(()=>{i.current=r},[r]),Y.useEffect(()=>{if(e.kind!==`cloud`){M(null);return}if(!s){if(!c){M(null),L(null);return}M({userId:c,email:l,orgId:t}),L(c,l?{email:l}:{}),e.authMode===`cookie`&&l&&!ms(e.id,c)&&(i.current({backendKind:`cloud`,connectionMethod:`cloud_cookie`,hasApiKey:!1,source:`cloud_auto_connect`}),hs(e.id,c))}},[e.authMode,e.connectionRevision,e.id,e.kind,l,s,t,c])};function _s(e){switch(e){case z.RUNNING:return`🟢`;case z.FINISHED:case z.IDLE:case z.WAITING_FOR_CONFIRMATION:return`✅`;case z.PAUSED:return`⚪`;case z.ERROR:case z.STUCK:return`🔴`;default:return null}}var vs=`OpenHands`,ys=()=>{let{conversationId:e}=s(),{data:t}=oi(e??null),n=nr(e=>e.execution_status),r=t?.title,i=e&&r?`${r} | ${vs}`:vs;if(!e)return i;let a=_s(n??t?.execution_status??null);return a?`${a} ${i}`:i};function bs({children:e}){let{pathname:t}=c(),n=f(),r=_(),i=u(),a=Y.useMemo(()=>{for(let e=i.length-1;e>=0;--e){let t=i[e]?.params?.conversationId;if(t)return t}return null},[i]);return(0,X.jsx)(dn,{value:Y.useMemo(()=>({currentPath:t,conversationId:a,isNavigating:!!r.location,navigate:(e,t)=>n(e,t)}),[t,a,r.location,n]),children:e})}var xs=Y.lazy(()=>a(()=>import(`./environment-switch-overlay-CEKrFiMw.js`),__vite__mapDeps([78,1,2,8,5,6,79,7]))),Ss=Y.lazy(()=>a(()=>import(`./alert-banner-Kyy1YWZU.js`).then(e=>({default:e.AlertBanner})),__vite__mapDeps([80,1,2,8,5,6,81,82,83,7,14,84,45,40]))),Cs=Y.lazy(()=>a(()=>import(`./command-menu-BZQ8S3Ke.js`).then(e=>({default:e.CommandMenu})),__vite__mapDeps([85,1,2,48,4,5,8,6,50,86,87,88,89,90,91,92,40,7,29,15,47,3,49,20,14]))),ws=h(function(){let e=m(),{t}=v(`openhands`);return d(e)?(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h1`,{children:e.status}),(0,X.jsx)(`p`,{children:e.statusText}),(0,X.jsx)(`pre`,{children:e.data instanceof Object?JSON.stringify(e.data):e.data})]}):e instanceof Error?(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h1`,{children:t(V.ERROR$GENERIC)}),(0,X.jsx)(`pre`,{children:e.message})]}):(0,X.jsx)(`div`,{children:(0,X.jsx)(`h1`,{children:t(V.ERROR$UNKNOWN)})})}),Ts=p(function(){let e=c(),t=ys(),{data:n}=Qt(),r=Gt();if(us(),ls(),gs(),cs(),Y.useEffect(()=>{n?.language&&T.changeLanguage(n.language)},[n?.language]),r.isLoading)return(0,X.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-base`,children:(0,X.jsx)(Wt,{size:`large`})});let i=/^\/conversations\/[^/]+/.test(e.pathname),a=ht(e.search);return(0,X.jsx)(bs,{children:(0,X.jsxs)(rr,{children:[(0,X.jsxs)(`div`,{"data-testid":`root-layout`,className:`h-screen lg:min-w-5xl flex flex-col md:flex-row bg-base overflow-hidden p-0`,children:[(0,X.jsx)(`title`,{children:t}),(0,X.jsx)(ns,{}),(0,X.jsxs)(`div`,{className:`flex min-h-0 flex-col w-full min-w-0 h-full gap-3`,children:[i?null:(0,X.jsx)(ss,{}),r.data&&(r.data.maintenance_start_time||r.data.faulty_models&&r.data.faulty_models.length>0||r.data.error_message)&&(0,X.jsx)(Y.Suspense,{fallback:null,children:(0,X.jsx)(Ss,{maintenanceStartTime:r.data.maintenance_start_time,faultyModels:r.data.faulty_models,errorMessage:r.data.error_message,updatedAt:r.data.updated_at})}),(0,X.jsx)(`div`,{id:`root-outlet`,className:`relative flex-1 overflow-auto px-0 custom-scrollbar`,children:(0,X.jsx)(g,{})})]})]}),(0,X.jsxs)(Y.Suspense,{fallback:null,children:[(0,X.jsx)(xs,{}),(0,X.jsx)(Cs,{})]}),a?(0,X.jsx)(bt,{}):null]})})});export{ws as ErrorBoundary,Ts as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js";import{t as i}from"./useQuery-BXWbZBZl.js";import{ft as a,n as o}from"./active-backend-context-DKFSMbn3.js";import{t as s}from"./utils-DaCIEEQP.js";import{t as c}from"./settings-service.api-B2agVfjL.js";import{h as l,l as u}from"./form-control-classes-CGw40z5h.js";import{t as d}from"./settings-dropdown-input-tM0A0ipy.js";import{t as f}from"./dist-Bl64nBZL.js";import{n as p,t as m}from"./settings-input-C03KUoSC.js";import{a as h,i as ee,n as te}from"./llm-subscription-DTqtBCWz.js";import{t as ne}from"./use-is-authed-CFGkY3-Z.js";import{r as g}from"./typography-SgFy466J.js";import{t as _}from"./settings-switch-CQE0EGC-.js";var v=e(t(),1),y=n(),b=f(``,{variants:{size:{default:`text-xs`,settings:`text-sm text-[var(--oh-muted)] font-normal leading-5.5`},linkColor:{default:``,white:`text-white`}},defaultVariants:{size:`default`,linkColor:`default`}});function x({testId:e,text:t,linkText:n,href:r,suffix:i,size:a,linkColor:o,className:c,linkTextClassName:l,suffixClassName:u}){return(0,y.jsxs)(`p`,{"data-testid":e,className:s(b({size:a}),c),children:[t,` `,(0,y.jsx)(`a`,{href:r,rel:`noreferrer noopener`,target:`_blank`,className:s(`underline underline-offset-2`,b({size:a,linkColor:o}),l),children:n}),i&&(0,y.jsx)(`span`,{className:u,children:i})]})}var S=`llm`;function C(e){if(!e?.sections)return e;let t=!1,n=e.sections.map(e=>{if(e.key!==S)return e;let n=new Set(e.fields.map(e=>e.key)),r=ee.filter(e=>!n.has(e.key));return r.length===0?e:(t=!0,{...e,fields:[...e.fields,...r]})});return t?{...e,sections:n}:e}var w=(e,t)=>{let{data:n}=ne(),{backend:r,orgId:s}=o(),l=!a(r),{data:u,error:d,isLoading:f,isFetching:p}=i({queryKey:[`settings-schema`,e,r.id,s,r.kind,r.host,r.apiKey],queryFn:e===`conversation`?c.getConversationSettingsSchema:c.getSettingsSchema,retry:!1,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,enabled:!t&&!!n&&l,meta:{disableToast:!0}}),m=(0,v.useMemo)(()=>e===`agent`?C(t):t,[t,e]),h=(0,v.useMemo)(()=>e===`agent`?C(u):u,[u,e]);return t?{data:m,error:null,isLoading:!1,isFetching:!1}:{data:h,error:d,isLoading:f,isFetching:p}},T=e=>w(`agent`,e),re=e=>w(`conversation`,e);function E(e,t){return`SCHEMA$${e.replace(/\./g,`$`).toUpperCase()}$${t}`}var D=e=>!!e?.includes(`$`),O={tool_concurrency_limit:{constraints:{min:1,step:1}},"llm.top_p":{constraints:{min:0,max:1,step:.01}},"llm.temperature":{constraints:{min:0,max:2,step:.1}}};function k(e){return O[e]?.constraints}function A(e,t,n,r){if(D(r))return e(r);let i=E(t,n);return e(i,{defaultValue:``})||(r&&console.warn(`[i18n] Missing translation for key "${i}", falling back to: "${r}"`),r??null)}function j(e,t,n){return A(e,t,`LABEL`,n)??``}function M(e,t,n){return A(e,t,`DESCRIPTION`,n)}function ie(e,t,n,r){if(D(r))return e(r);let i=`SCHEMA$${t.replace(/\./g,`$`).toUpperCase()}$CHOICE$${String(n).toUpperCase()}`;return e(i,{defaultValue:``})||(console.warn(`[i18n] Missing translation for key "${i}", falling back to: "${r}"`),r)}var ae=new Set([`llm.model`,`llm.api_key`,`llm.base_url`,te,h]),oe={basic:new Set([`critical`]),advanced:new Set([`critical`,`major`]),all:new Set([`critical`,`major`,`minor`])};function N(e){return!!e&&Array.isArray(e.sections)}function P(e){return N(e)?e.sections.flatMap(e=>e.fields):[]}function F(e,t){if(!e)return;let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r}function I(e,t,n){let r=t.split(`.`),i=e;for(let e=0;e<r.length-1;e+=1){let t=r[e];(i[t]==null||typeof i[t]!=`object`||Array.isArray(i[t]))&&(i[t]={}),i=i[t]}i[r[r.length-1]]=n}function L(e,t,n=`agent_settings`){return F(e[n],t)??null}function R(e,t){return L(e,t,`agent_settings`)}function z(e){return e.choices.length>0}function B(e){return e.prominence===`critical`}function V(e){return e.prominence===`minor`}function H(e,t){let n=t??e.default;return z(e)?n==null?``:String(n):e.value_type===`boolean`?!!(n??!1):n==null?``:e.value_type===`array`||e.value_type===`object`?JSON.stringify(n,null,2):String(n)}function U(e,t){if(t===void 0)return null;if(e.value_type===`boolean`){if(typeof t==`string`){if(t===`true`)return!0;if(t===`false`)return!1}return t===null?null:!!t}if(e.value_type===`integer`||e.value_type===`number`){if(t===``||t===null)return null;let e=typeof t==`number`?t:Number(String(t));return Number.isNaN(e)?null:e}if(e.value_type===`array`||e.value_type===`object`){if(t===null||e.value_type===`object`&&typeof t==`object`&&!Array.isArray(t)&&Object.keys(t).length===0)return null;if(typeof t==`string`){let n=t.trim();if(!n)return null;try{let t=JSON.parse(n);return e.value_type===`object`&&typeof t==`object`&&t&&!Array.isArray(t)&&Object.keys(t).length===0?null:JSON.stringify(t)}catch{return n}}return JSON.stringify(t)}return t===null?null:String(t)}function W(e,t,n=`agent_settings`){let r=t??(n===`conversation_settings`?e.conversation_settings_schema:e.agent_settings_schema);return r?Object.fromEntries(P(r).map(t=>[t.key,H(t,L(e,t.key,n))])):{}}function G(e,t,n=`agent_settings`){let r=t??(n===`conversation_settings`?e.conversation_settings_schema:e.agent_settings_schema);if(!r)return`basic`;let i=!1,a=!1;for(let t of P(r))B(t)||U(t,L(e,t.key,n)??t.default??null)!==U(t,t.default??null)&&(V(t)?i=!0:a=!0);return i?`all`:a?`advanced`:`basic`}function K(e,t){return e.depends_on.every(e=>t[e]===!0)}function q(e){if(typeof e==`boolean`)return e;let t=e.trim().toLowerCase();if(!t)return null;if(t===`true`)return!0;if(t===`false`)return!1;throw Error(`Expected a boolean value, received: ${e}`)}function J(e,t){if(e.value_type===`boolean`)return q(t);if(e.value_type===`integer`||e.value_type===`number`){let n=String(t).trim();if(!n)return null;let r=Number(n);if(Number.isNaN(r))throw Error(`Expected a numeric value, received: ${n}`);if(e.value_type===`integer`&&!Number.isInteger(r))throw Error(`Expected an integer value, received: ${n}`);let i=k(e.key);if(i?.min!=null&&r<i.min)throw Error(`${e.label} must be at least ${i.min}`);if(i?.max!=null&&r>i.max)throw Error(`${e.label} must be at most ${i.max}`);return r}if(e.value_type===`array`||e.value_type===`object`){let n=String(t).trim();if(!n)return null;let r;try{r=JSON.parse(n)}catch{throw Error(`Invalid JSON for ${e.label}`)}if(e.value_type===`array`){if(!Array.isArray(r))throw Error(`${e.label} must be a JSON array`);return r}if(r===null||Array.isArray(r)||typeof r!=`object`)throw Error(`${e.label} must be a JSON object`);return r}let n=String(t);return n===``&&!e.secret?null:n}function Y(e,t,n){let r={};for(let i of P(e))n[i.key]&&I(r,i.key,J(i,t[i.key]));return r}function X(e,t){return oe[t].has(e.prominence)}function se(e,t,n,r){let i=Y(e,t,n);for(let t of P(e))X(t,r)||I(i,t.key,t.default??null);return i}function Z(e,t,n,r=ae){return N(e)?e.sections.map(e=>({...e,fields:e.fields.filter(e=>!r.has(e.key)&&X(e,n)&&K(e,t))})).filter(e=>e.fields.length>0):[]}function ce(e){return e?P(e).some(e=>e.prominence===`critical`):!1}function le(e){return e?P(e).some(e=>e.prominence===`major`):!1}function ue(e){return e?P(e).some(e=>e.prominence===`minor`):!1}var de={"llm.api_key":{textKey:`SCHEMA$LLM$API_KEY$HELP_TEXT`,linkTextKey:`SCHEMA$LLM$API_KEY$HELP_LINK_TEXT`,href:`https://docs.openhands.dev/usage/local-setup#getting-an-api-key`},"verification.critic_api_key":{textKey:`SCHEMA$VERIFICATION$CRITIC_API_KEY$HELP_TEXT`,linkTextKey:`SETTINGS$NAV_API_KEYS`,suffixKey:`SCHEMA$VERIFICATION$CRITIC_API_KEY$HELP_SUFFIX`,href:`https://app.all-hands.dev/settings/api-keys`,hideDescription:!0}};function Q({field:e}){let{t}=r(`openhands`),n=de[e.key],i=M(t,e.key,e.description);return(0,y.jsxs)(y.Fragment,{children:[i&&!n?.hideDescription?(0,y.jsx)(g.Paragraph,{className:`text-tertiary-alt text-xs leading-5`,children:i}):null,n?(0,y.jsx)(x,{testId:`help-link-${e.key}`,text:t(n.textKey),linkText:t(n.linkTextKey),href:n.href,suffix:n.suffixKey?` ${t(n.suffixKey)}`:void 0,size:`settings`,linkColor:`white`}):null]})}var fe=new Set([`verification.critic_api_key`]);function $(e){return e.choices.length>0}function pe(e){return e.value_type===`boolean`&&!$(e)}function me(e){return e.value_type===`array`||e.value_type===`object`}function he(e){return e.key.endsWith(`url`)||e.key.endsWith(`_url`)}function ge(e){return e.secret?`password`:e.value_type===`integer`||e.value_type===`number`?`number`:e.value_type===`string`&&he(e)?`url`:`text`}function _e({field:e,value:t,isDisabled:n,onChange:i}){let{t:a}=r(`openhands`),o=j(a,e.key,e.label),c=k(e.key);return pe(e)?(0,y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,y.jsx)(_,{testId:`sdk-settings-${e.key}`,isToggled:!!t,isDisabled:n,onToggle:i,children:o}),(0,y.jsx)(`div`,{className:l,children:(0,y.jsx)(Q,{field:e})})]}):$(e)?(0,y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,y.jsx)(d,{testId:`sdk-settings-${e.key}`,name:e.key,label:o,items:e.choices.map(t=>({key:String(t.value),label:ie(a,e.key,t.value,t.label)})),selectedKey:t===``?void 0:String(t),isClearable:!e.required,required:e.required,showOptionalTag:!e.required,isDisabled:n,onSelectionChange:e=>i(String(e??``))}),(0,y.jsx)(Q,{field:e})]}):me(e)?(0,y.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full`,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:`text-sm`,children:o}),e.required?null:(0,y.jsx)(p,{})]}),(0,y.jsx)(`textarea`,{"data-testid":`sdk-settings-${e.key}`,name:e.key,value:String(t??``),required:e.required,disabled:n,onChange:e=>i(e.target.value),className:s(u,`min-h-32 font-mono placeholder:italic`,`disabled:bg-[var(--oh-surface-raised)] disabled:border-[var(--oh-border-subtle)]`)}),(0,y.jsx)(Q,{field:e})]}):(0,y.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,y.jsx)(m,{testId:`sdk-settings-${e.key}`,name:e.key,label:o,type:ge(e),value:String(t??``),required:e.required,showOptionalTag:!e.required,isDisabled:n,onChange:i,className:`w-full`,min:c?.min,max:c?.max,step:c?.step}),(0,y.jsx)(Q,{field:e})]})}export{T as _,se as a,Z as c,ue as d,G as f,j as g,M as h,Y as i,le as l,H as m,_e as n,J as o,N as p,W as r,R as s,fe as t,ce as u,re as v,x as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Cyuzqnbw.js";import{f as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js";import{$ as n,X as r,ct as i}from"./active-backend-context-DKFSMbn3.js";import{t as a}from"./proxy-tcFL2yTQ.js";async function o(e,t=3,n=500){for(let r=0;r<t;r+=1)try{return await e()}catch(e){if(r>=t-1)throw e;let i=n*2**r;await new Promise(e=>{setTimeout(e,i)})}throw Error(`Retry attempts exhausted`)}var s=100;function c(){let e=i().backend;if(e.kind!==`cloud`)throw Error(`Cloud secrets call requires a cloud backend.`);return e}async function l(){let e=c(),t=[],n=null;do{let r=new URLSearchParams({limit:String(s)});n&&r.set(`page_id`,n);let i=await a({backend:e,method:`GET`,path:`/api/v1/secrets/search?${r.toString()}`});t.push(...i.items??[]),n=i.next_page_id}while(n);return t}async function u({name:e,value:t,description:n,previousName:r}){let i=c();r!==void 0&&await o(()=>a({backend:i,method:`PUT`,path:`/api/v1/secrets/${encodeURIComponent(r)}`,body:{name:e,description:n}})),t!==void 0&&await o(()=>a({backend:i,method:`POST`,path:`/api/v1/secrets`,body:{name:e,value:t,description:n}}))}async function d(e){await a({backend:c(),method:`DELETE`,path:`/api/v1/secrets/${encodeURIComponent(e)}`})}var f=e({SecretsService:()=>m});async function p(){return i().backend.kind===`cloud`?o(()=>l()):(await o(()=>new t(n()).listSecrets())).secrets.map(e=>({name:e.name,description:e.description}))}var m=class{static async getSecrets(){try{return await p()}catch(e){return console.error(`Failed to fetch secrets after retries:`,e),[]}}static async getSecretsOrThrow(){return p()}static async createSecret(e,r,a){if(i().backend.kind===`cloud`){await u({name:e,value:r,description:a});return}await o(()=>new t(n()).upsertSecret({name:e,value:r,description:a}))}static async updateSecret(e,r,a,s){if(i().backend.kind===`cloud`){await u({name:r,value:s,description:a,previousName:e});return}let c=new t(n()),l=s??await o(()=>c.getSecret(e));await o(()=>c.upsertSecret({name:r,value:l,description:a})),r!==e&&await this.deleteSecret(e)}static async deleteSecret(e){try{if(i().backend.kind===`cloud`){await o(()=>d(e));return}await o(()=>new t(n()).deleteSecret(e))}catch(e){if(r(e,404)||e&&typeof e==`object`&&`response`in e&&e.response?.status===404)return;throw e}}};export{f as n,m as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={llm_model:`openhands/kimi-k3`,llm_base_url:``,agent:`CodeActAgent`,language:`en`,llm_api_key:null,llm_api_key_set:!1,search_api_key_set:!1,confirmation_mode:!1,security_analyzer:`llm`,max_iterations:null,remote_runtime_resource_factor:1,provider_tokens_set:{},enable_default_condenser:!0,condenser_max_size:240,enable_sound_notifications:!1,user_consents_to_analytics:null,enable_proactive_conversation_starters:!1,enable_solvability_analysis:!1,search_api_key:``,is_new_user:!0,disabled_skills:[],mcp_config:{},max_budget_per_task:null,email:``,email_verified:!0,git_user_name:`openhands`,git_user_email:`openhands@all-hands.dev`,title_llm_profile:null,agent_settings_schema:null,agent_settings:{schema_version:6,agent_kind:`openhands`,agent:`CodeActAgent`,llm:{model:`openhands/kimi-k3`},condenser:{enabled:!0,max_size:240},verification:{critic_enabled:!1,enable_iterative_refinement:!1},enable_sub_agents:!1,mcp_config:{}},conversation_settings_schema:null,conversation_settings:{schema_version:1,confirmation_mode:!1,security_analyzer:`llm`}};export{e as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js";import{$ as t,ct as n}from"./active-backend-context-DKFSMbn3.js";import{t as r}from"./proxy-tcFL2yTQ.js";import{t as i}from"./settings-DcNPxz0v.js";var a=[`none`,`api_key`,`bearer`,`basic`,`header`,`oauth2`],o=e=>!!e&&typeof e==`object`&&!Array.isArray(e),s=e=>o(e)&&typeof e.strategy==`string`&&a.includes(e.strategy),c=/^[a-zA-Z0-9_-]+$/;function l(e){return c.test(e)}function u(e,t=`mcp`){return e.trim().replace(/[^a-zA-Z0-9_-]+/g,`_`).replace(/_+/g,`_`).replace(/^_+|_+$/g,``)||t}var d=`**********`,f=e=>!!e&&typeof e==`object`&&!Array.isArray(e);function p(e){if(!f(e))return null;let t=e.mcpServers;return f(t)&&!(`url`in t)&&!(`command`in t)?t:e}function m(e){if(!f(e))return;let t=Object.entries(e).filter(e=>typeof e[1]==`string`);return t.length>0?Object.fromEntries(t):void 0}function h(e){return e===`**********`?!0:Array.isArray(e)?e.some(h):f(e)?Object.values(e).some(h):!1}var g=e=>e.enabled===!1?!1:void 0,_=e=>{if(e===`stdio`||e===`sse`||e===`streamable-http`)return e;if(e===`http`||e===`shttp`||e===void 0)return`http`};function v(e){let t=p(e);if(!t)return{};let n={};for(let[e,r]of Object.entries(t)){if(!f(r))continue;if(typeof r.command==`string`){n[e]={transport:`stdio`,command:r.command,...Array.isArray(r.args)&&r.args.every(e=>typeof e==`string`)&&{args:r.args},...m(r.env)&&{env:m(r.env)},...typeof r.cwd==`string`&&{cwd:r.cwd},...typeof r.description==`string`&&{description:r.description},...typeof r.icon==`string`&&{icon:r.icon},...typeof r.timeout==`number`&&{timeout:r.timeout},...r.enabled===!1&&{enabled:!1}};continue}if(typeof r.url!=`string`)continue;let t=_(r.transport);!t||t===`stdio`||(n[e]={transport:t,url:r.url,...m(r.headers)&&{headers:m(r.headers)},...s(r.auth)&&{auth:r.auth},...typeof r.description==`string`&&{description:r.description},...typeof r.icon==`string`&&{icon:r.icon},...typeof r.timeout==`number`&&{timeout:r.timeout},...typeof r.sse_read_timeout==`number`&&{sse_read_timeout:r.sse_read_timeout},...typeof r.keep_alive==`boolean`&&{keep_alive:r.keep_alive},...r.enabled===!1&&{enabled:!1}})}return n}function ee(e){return e.type===`stdio`?{transport:`stdio`,command:e.command,...e.args?.length?{args:e.args}:{},...e.env&&Object.keys(e.env).length>0?{env:e.env}:{},...e.enabled===!1&&{enabled:!1}}:{transport:e.type===`sse`?`sse`:`http`,url:e.url,...e.headers&&Object.keys(e.headers).length>0?{headers:e.headers}:{},...e.auth?{auth:e.auth}:{},...e.type===`shttp`&&e.timeout!==void 0?{timeout:e.timeout}:{},...e.enabled===!1&&{enabled:!1}}}var y=(e,t)=>t.enabled===!1?{enabled:!1}:g(e)===!1?{enabled:!0}:{},b=(e,t)=>{if(!t)return e?null:void 0;let n={};for(let[e,r]of Object.entries(t))r!==`**********`&&(n[e]=r);for(let r of Object.keys(e??{}))r in t||(n[r]=null);return Object.keys(n).length>0?n:void 0},x=[`client_auth_method`,`scopes`,`client_id`,`client_secret`],S=(e,t)=>{if(t===`**********`||t===void 0)return;if(t===null)return null;if(Array.isArray(t))return h(t)||JSON.stringify(e)===JSON.stringify(t)?void 0:t;if(!f(t))return Object.is(e,t)?void 0:t;let n=f(e)?e:{},r={};for(let[e,i]of Object.entries(t)){let t=S(n[e],i);t!==void 0&&(r[e]=t)}return Object.keys(r).length>0?r:void 0},C=(e,t)=>{if(t===void 0)return;if(t===null)return null;let n=S(e,t),r=f(n)?{...n}:{},i=f(e)?e:{};for(let e of x)e in i&&!(e in t)&&(r[e]=null);if(Object.keys(r).length!==0)return{type:`oauth`,...r}},w=(e,t)=>{if(!e||e.strategy===t.strategy)return t;let n={...t};for(let t of Object.keys(e))t!==`strategy`&&!(t in n)&&(n[t]=null);return n},T=`Removing an individual header from header authentication is not supported yet. Replace the credential or clear authentication, then re-enter the headers you want to keep.`,E=(e,t)=>{let n=b(e?.strategy===`header`?e.headers:void 0,t.headers);if(n){if(Object.values(n).some(e=>e===null))throw Error(T);return{strategy:`header`,headers:n}}},D=(e,t)=>{let n=e?.strategy===`oauth2`?e:void 0,r=C(n?.authentication,t.authentication),i=S(n?.state,t.state);if(!(n&&r===void 0&&i===void 0))return w(e,{strategy:`oauth2`,...r!==void 0&&{authentication:r},...i!==void 0&&{state:i}})};function O(e,t){let n=y(e,t);if(t.type===`stdio`){let r=b(e.transport===`stdio`?e.env:void 0,t.env);return{transport:`stdio`,command:t.command,...t.args?.length?{args:t.args}:e.transport===`stdio`&&e.args?{args:null}:{},...r===void 0?{}:{env:r},...n}}let r=e.transport===`stdio`?void 0:e,i={transport:t.type===`sse`?`sse`:`http`,url:t.url,...n};if(t.type===`shttp`&&(t.timeout===void 0?r?.timeout!==void 0&&(i.timeout=null):i.timeout=t.timeout),t.auth)if(t.auth.strategy===`oauth2`){let e=D(r?.auth,t.auth);e!==void 0&&(i.auth=e)}else if(t.auth.strategy===`header`&&r?.auth?.strategy===`header`){let e=E(r.auth,t.auth);e!==void 0&&(i.auth=e)}else h(t.auth)||(i.auth=w(r?.auth,t.auth));else r?.auth&&(i.auth=null);return i}var k=(e,t)=>{let n=(e,t)=>{let r=f(e)?{...e}:{};if(!f(t))return r;for(let[e,i]of Object.entries(t))i===null?delete r[e]:f(i)?r[e]=n(r[e],i):r[e]=i;return r};return n(e,t)},A=`Replace or clear the stored credential before renaming this MCP server.`;function te(e,t,n,r){if(h(n.transport===`stdio`?n.env:{auth:n.auth,headers:n.headers}))throw Error(A);let i=k(n,O(n,r));return{[e]:null,[t]:i}}function ne(e,t,n){let r=u(t||n);if(!(r in e))return r;let i=1;for(;`${r}_${i}`in e;)i+=1;return`${r}_${i}`}function j(){let e=n().backend;if(e.kind!==`cloud`)throw Error(`Cloud settings call requires a cloud backend.`);return e}function M(e){if(e.agent_settings&&Object.keys(e.agent_settings).length>0)return e.agent_settings;let t={},n={};typeof e.llm_model==`string`&&(n.model=e.llm_model),typeof e.llm_base_url==`string`&&(n.base_url=e.llm_base_url),typeof e.llm_api_key==`string`&&(n.api_key=e.llm_api_key),Object.keys(n).length>0&&(t.llm=n);let r={};return typeof e.enable_default_condenser==`boolean`&&(r.enabled=e.enable_default_condenser),typeof e.condenser_max_size==`number`&&(r.max_size=e.condenser_max_size),Object.keys(r).length>0&&(t.condenser=r),typeof e.agent==`string`&&(t.agent=e.agent),e.mcp_config&&Object.keys(e.mcp_config).length>0&&(t.mcp_config=e.mcp_config),t}function N(e){if(e.conversation_settings&&Object.keys(e.conversation_settings).length>0)return e.conversation_settings;let t={};return typeof e.confirmation_mode==`boolean`&&(t.confirmation_mode=e.confirmation_mode),(typeof e.security_analyzer==`string`||e.security_analyzer===null)&&(t.security_analyzer=e.security_analyzer),typeof e.max_iterations==`number`&&(t.max_iterations=e.max_iterations),t}async function P(){let e=await r({backend:j(),method:`GET`,path:`/api/v1/settings`});return{...e,agent_settings:M(e),conversation_settings:N(e),llm_api_key_set:!!e.llm_api_key_set,search_api_key_set:!!e.search_api_key_set,provider_tokens_set:e.provider_tokens_set}}async function F(e){let t=j(),n={};if(e.agent_settings_diff){let t={...e.agent_settings_diff};t.agent_context===null&&delete t.agent_context,Object.keys(t).length>0&&(n.agent_settings_diff=t)}if(e.conversation_settings_diff&&Object.keys(e.conversation_settings_diff).length>0&&(n.conversation_settings_diff=e.conversation_settings_diff),e.app_preferences)for(let[t,r]of Object.entries(e.app_preferences))r!==void 0&&(n[t]=r);await r({backend:t,method:`POST`,path:`/api/v1/settings`,body:n})}async function I(){return r({backend:j(),method:`GET`,path:`/api/v1/settings/agent-schema`})}async function L(){return r({backend:j(),method:`GET`,path:`/api/v1/settings/conversation-schema`})}var R=[`language`,`user_consents_to_analytics`,`enable_sound_notifications`,`git_user_name`,`git_user_email`,`title_llm_profile`,`disabled_skills`],z=new Set(R),B=e=>z.has(e),V=e=>{let t={},n={};for(let[r,i]of Object.entries(e))B(r)?t[r]=i:n[r]=i;return{extracted:t,rest:n}},H=e=>JSON.parse(JSON.stringify(e)),U=(e,t)=>({...e??{},...t??{}});async function W(e,t=3,n=500){for(let r=0;r<t;r+=1)try{return await e()}catch(e){if(r>=t-1)throw e;let i=n*2**r;await new Promise(e=>{setTimeout(e,i)})}throw Error(`Retry attempts exhausted`)}var G={redacted:null,encrypted:null,timestamp:0},K=300*1e3,q=()=>Date.now()-G.timestamp<K,J=()=>{G={redacted:null,encrypted:null,timestamp:0}},Y=e=>!!e&&typeof e==`object`&&!Array.isArray(e),X=(e,t)=>`Basic ${btoa(`${e}:${t}`)}`,re=e=>{switch(e.strategy){case`none`:return{};case`api_key`:{if(typeof e.value!=`string`||!e.value)return null;let t=typeof e.header_name==`string`&&e.header_name?e.header_name:`Authorization`,n=t===`Authorization`?`Bearer ${e.value}`:e.value;return{[t]:n}}case`bearer`:return typeof e.value!=`string`||!e.value?null:{Authorization:`Bearer ${e.value}`};case`basic`:return typeof e.username!=`string`||typeof e.password!=`string`?null:{Authorization:X(e.username,e.password)};case`header`:return m(e.headers)??{};case`oauth2`:{let t=Y(e.state)?e.state.tokens:void 0;return!Y(t)||typeof t.access_token!=`string`?null:{Authorization:`Bearer ${t.access_token}`}}default:return null}},Z=async e=>{if(!Y(e))return e;let t=Y(e.mcpServers),r=t?e.mcpServers:e,i=Object.values(r).some(e=>Y(e)&&Y(e.auth)&&e.auth!==null)&&n().backend.kind===`cloud`,a=new Map;if(i)try{let e=await P(),t=Y(e.mcp_config)?e.mcp_config:{};for(let[e,n]of Object.entries(t))if(Y(n)){let t=m(n.headers);t&&a.set(e,t)}}catch{}let o=Object.fromEntries(Object.entries(r).map(([e,t])=>{if(!Y(t))return[e,t];if(t.auth===null){let n={...t,headers:null};return delete n.auth,[e,n]}if(!Y(t.auth))return[e,t];let n=re(t.auth);if(n===null)return[e,t];let r={...t},i={...m(t.headers)??{},...n},o=a.get(e);if(o)for(let e of Object.keys(o))e in i||(i[e]=null);return delete r.auth,Object.keys(i).length>0?r.headers=i:delete r.headers,[e,r]}));return t?{...e,mcpServers:o}:o},Q=e=>{let t={agent_settings:e.agent_settings??{},conversation_settings:e.conversation_settings??{},llm_api_key_set:e.llm_api_key_is_set},n=e.misc_settings?.app_preferences;if(n)for(let e of R){let r=n[e];r!==void 0&&(t[e]=r)}return t},$=e=>{let t=U(i.agent_settings??{},e.agent_settings??{}),n=U(i.conversation_settings??{},e.conversation_settings??{}),r={...H(i),...e,provider_tokens_set:{...i.provider_tokens_set??{},...e.provider_tokens_set??{}},agent_settings:t,conversation_settings:n},a=t.llm,o=t.condenser;return typeof t.agent==`string`&&(r.agent=t.agent),typeof a?.model==`string`&&a.model.length>0&&(r.llm_model=a.model),typeof a?.base_url==`string`&&(r.llm_base_url=a.base_url),typeof o?.enabled==`boolean`&&(r.enable_default_condenser=o.enabled),typeof o?.max_size==`number`&&(r.condenser_max_size=o.max_size),typeof n.confirmation_mode==`boolean`&&(r.confirmation_mode=n.confirmation_mode),(typeof n.security_analyzer==`string`||n.security_analyzer===null)&&(r.security_analyzer=n.security_analyzer),typeof n.max_iterations==`number`&&(r.max_iterations=n.max_iterations),r.search_api_key_set=!!r.search_api_key,r},ie=class r{static async fetchSettingsFromApi(n){return W(()=>new e(t()).getSettings({exposeSecrets:n}))}static async getSettings(){if(n().backend.kind===`cloud`)try{return $(await W(()=>P()))}catch(e){return console.warn(`Failed to fetch cloud settings, using defaults:`,e),$({})}if(q()&&G.redacted)return $(Q(G.redacted));try{let e=await this.fetchSettingsFromApi();return G.redacted=e,G.timestamp=Date.now(),$(Q(e))}catch(e){return console.warn(`Failed to fetch settings from API, using defaults:`,e),$({})}}static async getSettingsForConversation(){if(q()&&G.encrypted)return{agentSettings:G.encrypted.agent_settings,conversationSettings:G.encrypted.conversation_settings,secretsEncrypted:!0};let e=await this.fetchSettingsFromApi(`encrypted`);return G.encrypted=e,G.timestamp||=Date.now(),{agentSettings:e.agent_settings,conversationSettings:e.conversation_settings,secretsEncrypted:!0}}static async getSettingsSchema(){return n().backend.kind===`cloud`?await I():await new e(t()).getAgentSchema()}static async getConversationSettingsSchema(){return n().backend.kind===`cloud`?await L():await new e(t()).getConversationSchema()}static async patchMcpConfig(r){if(n().backend.kind===`cloud`){let e=await Z(r);await W(()=>F({agent_settings_diff:{mcp_config:e}}))}else await W(()=>new e(t()).updateSettings({agent_settings_diff:{mcp_config:r}}));return J(),!0}static async patchMcpServer(i,a){return n().backend.kind===`cloud`?r.patchMcpConfig({[i]:a}):(await W(()=>new e(t()).patchMcpServer(i,a)),J(),!0)}static async createMcpServer(i,a){return n().backend.kind===`cloud`?r.patchMcpConfig({[i]:a}):(await W(()=>new e(t()).createMcpServer(i,a)),J(),!0)}static async deleteMcpServer(i){return n().backend.kind===`cloud`?r.patchMcpConfig({[i]:null}):(await W(()=>new e(t()).deleteMcpServer(i)),J(),!0)}static async saveSettings(r){let{extracted:i,rest:a}=V(r),o=Object.keys(i).length>0,s={},c=a.agent_settings_diff;c&&Object.keys(c).length>0&&(s.agent_settings_diff=c);let l=a.conversation_settings_diff;if(l&&Object.keys(l).length>0&&(s.conversation_settings_diff=l),o&&(s.misc_settings_diff={app_preferences:i}),n().backend.kind===`cloud`){if(!(s.agent_settings_diff||s.conversation_settings_diff||o))return!0;let e={};s.agent_settings_diff&&(e.agent_settings_diff={...s.agent_settings_diff},`mcp_config`in e.agent_settings_diff&&(e.agent_settings_diff.mcp_config=await Z(e.agent_settings_diff.mcp_config))),s.conversation_settings_diff&&(e.conversation_settings_diff=s.conversation_settings_diff),o&&(e.app_preferences=i),await W(()=>F(e))}else{if(!(s.agent_settings_diff||s.conversation_settings_diff||s.misc_settings_diff))return!0;await W(()=>new e(t()).updateSettings(s))}return J(),!0}static invalidateCache(){J()}};export{O as a,h as c,c as d,l as f,ne as i,v as l,s as m,A as n,te as o,u as p,d as r,g as s,ie as t,ee as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{B as r,U as i,c as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{t as o}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js";import{t as s}from"./useInfiniteQuery-CgeUQPfs.js";import{c}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js";import{t as l}from"./useQuery-BXWbZBZl.js";import{$ as u}from"./active-backend-context-DKFSMbn3.js";import{W as d}from"./utils-DaCIEEQP.js";import{t as f}from"./messages-BTN5thLe.js";import{t as p}from"./loading-spinner-0L3ZTToZ.js";import{t as m}from"./openhands-logo-BS-Epajy.js";import{C as h,d as g}from"./markdown-renderer-Cb2sBWtV.js";var _=e(t(),1),v=e=>l({queryKey:[`shared-conversation`,e],queryFn:()=>{if(!e)throw Error(`Conversation ID is required`);return new c(u()).getSharedConversation(e)},enabled:!!e,retry:!1}),y=e=>s({queryKey:[`shared-conversation-events`,e],queryFn:({pageParam:t})=>{if(!e)throw Error(`Conversation ID is required`);return new c(u()).searchSharedEvents({conversationId:e,limit:100,pageId:t})},initialPageParam:void 0,getNextPageParam:e=>e.next_page_id??void 0,enabled:!!e,retry:!1}),b=({hasNextPage:e,isFetchingNextPage:t,fetchNextPage:n,threshold:r=100})=>{let i=(0,_.useRef)(null),a=(0,_.useCallback)(()=>{if(!i.current||t||!e)return;let{scrollTop:a,scrollHeight:o,clientHeight:s}=i.current;a+s>=o-r&&n()},[e,t,n,r]);return(0,_.useEffect)(()=>{let e=i.current;if(e)return e.addEventListener(`scroll`,a),()=>{e.removeEventListener(`scroll`,a)}},[a]),i},x=n(),S=i(function(){let{t:e}=o(`openhands`),{conversationId:t}=r(),{data:n,isLoading:i,error:s}=v(t),{data:c,isLoading:l,error:u,hasNextPage:S,fetchNextPage:C,isFetchingNextPage:w}=y(t),T=i||l,E=s||u,D=_.useMemo(()=>c?.pages?c.pages.flatMap(e=>e.items):[],[c?.pages]),O=_.useMemo(()=>D.reduce((e,t)=>h(t,e),[]).filter(g),[D]),k=b({hasNextPage:!!S,isFetchingNextPage:w,fetchNextPage:C});return T?(0,x.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-base`,children:(0,x.jsx)(p,{size:`large`})}):E||!n?(0,x.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-base`,children:(0,x.jsx)(`div`,{className:`text-white`,children:e(d.CONVERSATION$NOT_FOUND)})}):(0,x.jsxs)(`div`,{className:`h-screen bg-base text-white flex flex-col`,children:[(0,x.jsx)(`div`,{className:`border-b border-[var(--oh-border-subtle)] p-4 flex-shrink-0`,children:(0,x.jsxs)(`div`,{className:`max-w-4xl mx-auto flex items-start gap-4`,children:[(0,x.jsx)(a,{to:`/conversations`,className:`flex-shrink-0`,"aria-label":e(d.BRANDING$OPENHANDS_LOGO),children:(0,x.jsx)(m,{width:46,height:30})}),(0,x.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,x.jsx)(`h1`,{className:`text-xl font-medium mb-2`,children:n?.title||e(d.CONVERSATION$SHARED_CONVERSATION)}),n?.selected_branch&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(d.CONVERSATION$BRANCH),`: `,n.selected_branch]}),n?.selected_repository&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(d.CONVERSATION$REPOSITORY),`:`,` `,n.selected_repository]}),n?.llm_model&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(d.LLM$MODEL),`: `,n.llm_model]})]})]})}),(0,x.jsx)(`div`,{ref:k,className:`flex-1 overflow-y-auto custom-scrollbar-always px-4 pt-4 gap-2`,children:(0,x.jsxs)(`div`,{className:`max-w-4xl mx-auto p-4 border border-[var(--oh-border-subtle)] rounded`,children:[O.length>0?(0,x.jsx)(f,{messages:O,allEvents:D}):(0,x.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,x.jsx)(`div`,{className:`text-center text-[var(--oh-muted)] py-8`,children:e(d.CONVERSATION$NO_HISTORY_AVAILABLE)})}),w&&(0,x.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,x.jsx)(p,{size:`small`})})]})})]})});export{S as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./utils-DaCIEEQP.js";import{n as r}from"./navigation-context-CQZwH_tC.js";import{t as i}from"./navigation-link-Bxo3-4vo.js";import{a,c as o,f as s,o as c,s as l,t as u,u as d}from"./sidebar-layout-D3hE08wK.js";import{t as f}from"./styled-tooltip-Dl06rkpY.js";e();var p=t();function m({active:e,className:t,children:r}){return(0,p.jsxs)(`span`,{className:n(u,t),children:[(0,p.jsx)(`span`,{"aria-hidden":!0,className:l(e)}),(0,p.jsx)(`span`,{className:o(e),children:r})]})}function h(e,t,n){return t===`/`||n?e===t:e===t||e.startsWith(`${t}/`)}function g({to:e,label:t,end:o=!1,indent:l=!1,testId:u,disabled:g=!1,icon:_,collapsed:v=!1,hoverContent:y,forceActive:b=!1}){let{currentPath:x}=r(),S=b||h(x,e,o),C=(0,p.jsxs)(i,{to:e,end:o,"data-testid":u,tabIndex:g?-1:0,"aria-label":v?t:void 0,"aria-disabled":g||void 0,onClick:e=>{g&&e.preventDefault()},className:n(s({indent:l,collapsed:v}),!v&&(S?c.active:c.idle),g&&`opacity-50`,g&&`pointer-events-none`),children:[_?v?(0,p.jsx)(m,{active:S,children:_}):(0,p.jsx)(`span`,{className:a,children:_}):null,(0,p.jsx)(`span`,{className:d(v),children:t})]});return v?(0,p.jsx)(f,{content:y??t,placement:`right`,tooltipClassName:y?`p-0 bg-tertiary text-white`:void 0,children:C}):C}export{m as n,g as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js";import{_ as t,g as n,m as r}from"./conversation-store-Ca3ghXap.js";var i=e(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),a=e(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),o=e(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),s=t(e=>({isOpen:!1,open:()=>e({isOpen:!0}),close:()=>e({isOpen:!1}),toggle:()=>e(e=>({isOpen:!e.isOpen}))})),c=`openhands-sidebar`,l=`openhands-sidebar-collapsed`,u=t()(n(e=>({collapsed:!1,setCollapsed:t=>e(e=>({collapsed:typeof t==`function`?t(e.collapsed):t})),toggleCollapsed:()=>e(e=>({collapsed:!e.collapsed}))}),{name:c,storage:r(()=>localStorage),partialize:e=>({collapsed:e.collapsed})}));if(typeof window<`u`)try{let e=window.localStorage.getItem(l);window.localStorage.getItem(c)===null&&(e===`true`||e===`false`)&&u.setState({collapsed:e===`true`}),e!==null&&window.localStorage.removeItem(l)}catch{}export{i as a,a as i,s as n,o as r,u as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js";import{D as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js";import{t as a}from"./vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-CHaLEBVR.js";import{W as o,t as s}from"./utils-DaCIEEQP.js";import{t as c}from"./bot-C-0Wu7vQ.js";import{t as l}from"./check-Cf2YoT90.js";import{n as u,r as d,t as f}from"./wrench-hi7Q13dF.js";import{t as p}from"./list-filter-OFkpRrmi.js";import{t as ee}from"./plug-BuQhHSSG.js";import{n as te,t as ne}from"./x-DkgltWa0.js";import{t as re}from"./shield-check-CFDViW82.js";import{n as ie}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-BgxDvUcf.js";import{t as m}from"./modal-backdrop-BSzNhM4r.js";import{n as ae,t as oe}from"./modal-body-CMOc2tLl.js";import{n as h}from"./modal-classes-BAb4Y_BG.js";import{t as g}from"./brand-button-Dxv6PDeN.js";import{t as _}from"./modal-close-button-CkJ0Ktjj.js";import{t as v}from"./checkmark-XZyokq_Y.js";import{t as y}from"./copy-Drmhc2jD.js";import{a as se,r as b}from"./extension-module-card-classes-DpeaYhYo.js";import{t as x}from"./settings-switch-CQE0EGC-.js";import{n as S,t as C}from"./skill-card-pill-row-CFxjoqxn.js";import{n as ce}from"./circle-plus-check-toggle-CBh_qomE.js";import{n as le,t as w}from"./skill-scope-CV1dkAbW.js";import{n as ue,t as de}from"./use-launch-skill-in-chat-BYjYihBP.js";import{t as T}from"./skill-icon-badge-CPQJ6A-I.js";var fe=i(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 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.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),pe=i(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),me=i(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),E=e(t(),1),D=/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;function he(e){let t=e.match(/^description:\s*\|\s*\r?\n((?:[ \t].*(?:\r?\n|$))+)/m);if(t)return t[1].replace(/^[ \t]+/gm,``).trim();let n=e.match(/^description:\s*['"](.+?)['"]\s*$/m);if(n)return n[1].trim();let r=e.match(/^description:\s*(.+)\s*$/m);return r?r[1].trim():null}function ge(e){let t=e.match(D);return t?e.slice(t[0].length).trim():e.trim()}function _e(e){let t=e.replace(/^#+\s+[^\n]+\n+/,``).trim();return t.split(/\n\s*\n/).map(e=>e.replace(/\s+/g,` `).trim()).find(e=>e.length>0)??t.replace(/\s+/g,` `).trim()}function O(e){let t=e.description?.trim();if(t)return t;let n=e.content?.trim();if(!n)return``;let r=n.match(D);if(r){let e=he(r[1]);if(e)return e}return _e(ge(n))}var k=n(),ve=`inline-flex shrink-0 items-center whitespace-nowrap rounded-full border border-text-secondary/35 bg-text-secondary/12 px-2 py-0.5 text-[11px] font-medium leading-4 text-tertiary-light`,ye={agentskills:{labelKey:o.SETTINGS$SKILLS_TYPE_AGENTSKILLS},knowledge:{labelKey:o.SETTINGS$SKILLS_TYPE_KNOWLEDGE},repo:{labelKey:o.SETTINGS$SKILLS_TYPE_REPO}};function A({type:e}){let{t}=r(`openhands`),n=ye[e];return(0,k.jsx)(`span`,{"data-testid":`skill-type-badge-${e}`,className:ve,children:t(n.labelKey)})}var j=[`automations`,`environment`,`code-hosting`,`agent-authoring`,`code-quality`,`integrations`,`writing`,`design`,`other`],M={automations:o.SETTINGS$SKILLS_CATEGORY_AUTOMATIONS,environment:o.SETTINGS$SKILLS_CATEGORY_ENVIRONMENT,"code-hosting":o.SETTINGS$SKILLS_CATEGORY_CODE_HOSTING,"agent-authoring":o.SETTINGS$SKILLS_CATEGORY_AGENT_AUTHORING,"code-quality":o.SETTINGS$SKILLS_CATEGORY_CODE_QUALITY,integrations:o.SETTINGS$SKILLS_CATEGORY_INTEGRATIONS,writing:o.SETTINGS$SKILLS_CATEGORY_WRITING,design:o.SETTINGS$SKILLS_CATEGORY_DESIGN,other:o.SETTINGS$SKILLS_CATEGORY_OTHER},N={automations:u,environment:f,"code-hosting":d,"agent-authoring":c,"code-quality":re,integrations:ee,writing:me,design:pe,other:fe},P=`other`,be=new Set(ie);function F(e){let t=e.category;return t&&be.has(t)?t:P}function I(e,t,n){if(e)return`${e}-${t}-${n}`}function L(e,t,n={}){let{variant:r=`card`,testIdPrefix:i}=n,a=F(e),c=[{id:`type-${e.type}`,node:(0,k.jsx)(A,{type:e.type})}];if(a!==`other`&&c.push({id:`category-${a}`,node:(0,k.jsx)(`span`,{"data-testid":I(i,e.name,`category`)??`skill-category-${e.name}`,className:C,children:t(M[a])})}),e.version&&c.push({id:`version-${e.version}`,node:(0,k.jsx)(`span`,{"data-testid":I(i,e.name,`version`)??`skill-version-${e.name}`,className:C,children:t(o.SETTINGS$SKILLS_VERSION,{version:e.version})})}),r===`detail`&&e.license&&c.push({id:`license-${e.license}`,node:(0,k.jsx)(`span`,{"data-testid":I(i,e.name,`license`),className:C,children:e.license})}),r===`detail`&&e.compatibility&&c.push({id:`compatibility-${e.compatibility}`,node:(0,k.jsx)(`span`,{"data-testid":I(i,e.name,`compatibility`),className:C,children:e.compatibility})}),e.disable_model_invocation&&c.push({id:`disable-model-invocation`,node:(0,k.jsxs)(`span`,{"data-testid":I(i,e.name,`disable-model-invocation`)??`skill-disable-model-invocation-${e.name}`,className:`inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-full border border-[rgba(248,113,113,0.35)] bg-[rgba(248,113,113,0.12)] px-2 py-0.5 text-[11px] font-medium leading-4 text-[#fca5a5]`,children:[(0,k.jsx)(`span`,{className:`size-1.5 rounded-full bg-[#fca5a5]`}),t(o.SETTINGS$SKILLS_DISABLE_MODEL_INVOCATION)]})}),r===`detail`&&e.allowed_tools)for(let t of e.allowed_tools)c.push({id:`allowed-tool-${t}`,node:(0,k.jsx)(`span`,{"data-testid":I(i,e.name,`tool-${t}`),className:s(C,`font-mono`),children:t})});if(r===`detail`&&e.metadata)for(let[t,n]of Object.entries(e.metadata))c.push({id:`metadata-${t}`,node:(0,k.jsxs)(`span`,{"data-testid":I(i,e.name,`metadata-${t}`),className:C,children:[(0,k.jsxs)(`span`,{className:`font-mono text-[10px] text-tertiary-light`,children:[t,`:`]}),` `,n]})});for(let t of e.triggers??[])c.push({id:`trigger-${t}`,node:(0,k.jsx)(`span`,{"data-testid":I(i,e.name,`trigger-${t}`),className:C,children:t})});return c}function R(e){let t=e?.trim();return t?!!(/^https?:\/\//i.test(t)||t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`~`)||/^[A-Za-z]:[\\/]/.test(t)||t.includes(`/`)||t.includes(`\\`)):!1}function xe({skill:e,enabled:t,onOpen:n,onToggle:i}){let{t:a}=r(`openhands`),[c,l]=E.useState(!1),u=O(e),d=E.useMemo(()=>L(e,a),[e,a]),f=R(e.source);return E.useEffect(()=>{if(!c)return;let e=setTimeout(()=>l(!1),2e3);return()=>clearTimeout(e)},[c]),(0,k.jsx)(`div`,{"data-testid":`skill-card-${e.name}`,role:`button`,tabIndex:0,onClick:n,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),n())},className:s(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,se,b),children:(0,k.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,k.jsx)(T,{skillName:e.name}),(0,k.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,k.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,k.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,k.jsx)(`h3`,{"data-testid":`skill-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,k.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,k.jsx)(`p`,{"data-testid":`skill-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),f?(0,k.jsx)(`button`,{type:`button`,"data-testid":`skill-copy-source-${e.name}`,"aria-label":a(c?o.BUTTON$COPIED:o.SETTINGS$SKILLS_COPY_PATH),disabled:c,onClick:async t=>{t.stopPropagation(),e.source&&(await navigator.clipboard.writeText(e.source),l(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:c?(0,k.jsx)(v,{width:12,height:12}):(0,k.jsx)(y,{width:12,height:12})}):null]}):null]}),(0,k.jsx)(ce,{testId:`skill-toggle-${e.name}`,isSelected:t,onToggle:i,disableTooltipKey:o.COMMON$DISABLE})]}),u?(0,k.jsx)(`div`,{"data-testid":`skill-description-${e.name}`,className:`min-w-0`,children:(0,k.jsx)(`p`,{className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:u})}):null,d.length>0?(0,k.jsx)(S,{pills:d,testId:`skill-triggers-${e.name}`}):null]})]})})}var Se=`https://docs.openhands.dev/overview/skills/adding#adding-new-skills`,z=`/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview`;function Ce(e){return e.name===`add-skill`?z:`/${e.name} `}function we({testId:e,label:t,value:n}){return(0,k.jsxs)(`label`,{className:`flex min-w-0 w-full flex-col gap-2.5`,children:[(0,k.jsx)(`span`,{className:`text-sm`,children:t}),(0,k.jsx)(`textarea`,{"data-testid":e,readOnly:!0,value:n,rows:Math.min(12,Math.max(4,n.split(`
|
|
2
|
-
`).length)),className:s(`bg-[var(--oh-surface-raised)] border border-[var(--oh-border-subtle)] w-full min-w-0 rounded-sm p-2 text-sm`,`cursor-not-allowed resize-none custom-scrollbar`)})]})}function Te({skill:e,enabled:t,onToggle:n,onClose:i}){let{t:a}=r(`openhands`),s=de(),[c,l]=E.useState(!1),u=E.useMemo(()=>Ce(e),[e]),d=O(e),f=E.useMemo(()=>L(e,a,{variant:`detail`,testIdPrefix:`skill-modal-pill`}),[e,a]),p=R(e.source);return E.useEffect(()=>{if(!c)return;let e=setTimeout(()=>l(!1),2e3);return()=>clearTimeout(e)},[c]),(0,k.jsx)(m,{onClose:i,"aria-label":e.name,children:(0,k.jsxs)(`div`,{"data-testid":`skill-detail-modal`,"data-skill-name":e.name,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col overflow-hidden rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,k.jsx)(_,{onClose:i,testId:`skill-detail-modal-close`}),(0,k.jsxs)(`header`,{className:`flex flex-shrink-0 items-start gap-3 pb-4 pl-6 pr-12 pt-6`,children:[(0,k.jsx)(T,{skillName:e.name}),(0,k.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,k.jsx)(`h2`,{"data-testid":`skill-modal-name-${e.name}`,className:h,children:e.name}),e.source?(0,k.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,k.jsx)(`p`,{"data-testid":`skill-modal-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),p?(0,k.jsx)(`button`,{type:`button`,"data-testid":`skill-modal-copy-source-${e.name}`,"aria-label":a(c?o.BUTTON$COPIED:o.SETTINGS$SKILLS_COPY_PATH),disabled:c,onClick:async()=>{e.source&&(await navigator.clipboard.writeText(e.source),l(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:c?(0,k.jsx)(v,{width:12,height:12}):(0,k.jsx)(y,{width:12,height:12})}):null]}):null]})]}),(0,k.jsxs)(`div`,{"data-testid":`skill-detail-modal-content`,className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto overscroll-contain px-6 custom-scrollbar-always`,children:[(0,k.jsx)(`div`,{"data-testid":`skill-modal-enable-row-${e.name}`,className:`flex w-full items-center rounded-lg border border-[var(--oh-border)] bg-[rgba(255,255,255,0.04)] px-3 py-2.5`,children:(0,k.jsx)(x,{testId:`skill-modal-toggle-${e.name}`,isToggled:t,onToggle:n,togglePosition:`right`,children:a(t?o.SETTINGS$SKILLS_ENABLED:o.SETTINGS$SKILLS_DISABLED)})}),d?(0,k.jsx)(`p`,{"data-testid":`skill-modal-description-${e.name}`,className:`break-words whitespace-pre-line text-xs text-tertiary-light`,children:d}):null,f.length>0?(0,k.jsx)(S,{pills:f,testId:`skill-modal-pills-${e.name}`}):null,e.content?(0,k.jsx)(we,{testId:`skill-modal-field-content-${e.name}`,label:a(o.SETTINGS$SKILLS_CONTENT),value:e.content}):null]}),(0,k.jsxs)(`footer`,{"data-testid":`skill-detail-modal-actions`,className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:[(0,k.jsx)(g,{type:`button`,variant:`secondary`,onClick:i,testId:`skill-detail-close`,children:a(o.BUTTON$CLOSE)}),(0,k.jsx)(g,{type:`button`,variant:`primary`,isDisabled:!t,onClick:()=>s(u,i),testId:`skill-detail-use-skill-${e.name}`,startContent:(0,k.jsx)(ue,{className:`size-4`,"aria-hidden":!0}),children:a(o.SETTINGS$SKILLS_USE_SKILL_BUTTON)})]})]})})}var Ee=[o.SETTINGS$SKILLS_ADD_MODAL_STEP_1,o.SETTINGS$SKILLS_ADD_MODAL_STEP_2,o.SETTINGS$SKILLS_ADD_MODAL_STEP_3,o.SETTINGS$SKILLS_ADD_MODAL_STEP_4,o.SETTINGS$SKILLS_ADD_MODAL_STEP_5],B={cmd:(0,k.jsx)(V,{}),path:(0,k.jsx)(V,{}),env:(0,k.jsx)(V,{})};function V({children:e}){return(0,k.jsx)(`code`,{className:s(`mx-0.5 inline-block rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] px-1.5 py-0.5 align-baseline font-mono text-[11px] text-white`),children:e})}function De(){let{t:e}=r(`openhands`),[t,n]=E.useState(!1);return E.useEffect(()=>{if(!t)return;let e=setTimeout(()=>n(!1),2e3);return()=>clearTimeout(e)},[t]),(0,k.jsxs)(`div`,{className:`relative`,children:[(0,k.jsx)(`pre`,{"data-testid":`add-skill-modal-example`,className:s(`overflow-x-auto rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] p-2 pr-10 text-xs text-white`),children:z}),(0,k.jsx)(`button`,{type:`button`,"data-testid":`add-skill-modal-example-copy`,"aria-label":e(t?o.BUTTON$COPIED:o.BUTTON$COPY),disabled:t,onClick:async()=>{await navigator.clipboard.writeText(z),n(!0)},className:s(`absolute right-2 top-2 cursor-pointer rounded-sm border border-[var(--oh-border-subtle)]`,`bg-base-secondary p-1 text-tertiary-alt transition-colors`,`hover:bg-[var(--oh-surface)] hover:text-white disabled:cursor-default [&_path]:fill-current`),children:t?(0,k.jsx)(v,{width:14,height:14}):(0,k.jsx)(y,{width:14,height:14})})]})}function H({i18nKey:e}){return(0,k.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:(0,k.jsx)(a,{ns:`openhands`,i18nKey:e,components:B})})}function Oe({onClose:e}){let{t}=r(`openhands`);return(0,k.jsx)(m,{onClose:e,"aria-label":t(o.SETTINGS$SKILLS_ADD_MODAL_TITLE),children:(0,k.jsxs)(`div`,{"data-testid":`add-skill-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,k.jsx)(_,{onClose:e,testId:`add-skill-modal-close`}),(0,k.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,k.jsx)(`h2`,{className:s(`pr-6`,h),children:t(o.SETTINGS$SKILLS_ADD_MODAL_TITLE)}),(0,k.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_INTRO)})]}),(0,k.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,k.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,k.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_CHAT_TITLE)}),(0,k.jsx)(H,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_CHAT_BODY}),(0,k.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_EXAMPLE_LABEL)}),(0,k.jsx)(De,{}),(0,k.jsx)(`ol`,{className:`list-decimal space-y-1 pl-4 text-xs leading-relaxed text-tertiary-light`,children:Ee.map(e=>(0,k.jsx)(`li`,{children:e===o.SETTINGS$SKILLS_ADD_MODAL_STEP_3?(0,k.jsx)(a,{ns:`openhands`,i18nKey:e,components:B}):t(e)},e))})]}),(0,k.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,k.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS_TITLE)}),(0,k.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS)})]}),(0,k.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,k.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_STORAGE_TITLE)}),(0,k.jsx)(H,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_STORAGE_BODY})]}),(0,k.jsx)(H,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_PRIVATE_REPOS}),(0,k.jsx)(`a`,{href:Se,target:`_blank`,rel:`noreferrer`,"data-testid":`add-skill-modal-docs-link`,className:`self-start text-xs text-[var(--oh-muted)] transition-colors hover:text-white hover:underline`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_VIEW_DOCS)})]}),(0,k.jsx)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:(0,k.jsx)(g,{type:`button`,variant:`secondary`,onClick:e,testId:`add-skill-modal-dismiss`,children:t(o.BUTTON$CLOSE)})})]})})}function ke({search:e,onSearchChange:t,activeFilterCount:n,onOpenFilters:i}){let{t:a}=r(`openhands`);return(0,k.jsxs)(`div`,{"data-testid":`skills-toolbar`,className:`flex items-stretch gap-2`,children:[(0,k.jsxs)(`div`,{className:s(`relative flex flex-1 min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`),children:[(0,k.jsx)(te,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,k.jsx)(`input`,{"data-testid":`skills-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:a(o.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),"aria-label":a(o.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),className:s(`flex-1 min-w-0 bg-transparent border-0 outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),e?(0,k.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":a(o.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,k.jsx)(ne,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,k.jsxs)(`button`,{type:`button`,"data-testid":`skills-filters-button`,onClick:i,className:s(`flex shrink-0 items-center gap-2 rounded-lg px-3 py-2 text-sm md:hidden`,`border border-[var(--oh-border)] bg-base-secondary text-white`,`cursor-pointer hover:bg-[var(--oh-interactive-hover)]`),children:[(0,k.jsx)(p,{className:`size-4 shrink-0`,"aria-hidden":!0}),a(o.SETTINGS$SKILLS_FILTERS_BUTTON),n>0?(0,k.jsx)(`span`,{className:`rounded-full bg-white px-1.5 text-[11px] font-medium text-black`,children:n}):null]})]})}function Ae({labelKey:e,count:t,checked:n,disabled:i,icon:a,testId:o,onToggle:c}){let{t:u}=r(`openhands`),d=u(e);return(0,k.jsxs)(`button`,{type:`button`,role:`checkbox`,"aria-checked":n,"data-testid":o,disabled:i,onClick:c,className:s(`flex w-full items-center gap-2 rounded-md px-1.5 py-1 text-left text-sm`,i?`cursor-default text-tertiary-alt/40`:`cursor-pointer hover:bg-[var(--oh-surface-raised)] hover:text-white`,n?`text-white`:`text-tertiary-light`),children:[(0,k.jsx)(`span`,{"aria-hidden":!0,className:s(`flex size-3.5 shrink-0 items-center justify-center rounded-[3px] border`,n?`border-white bg-white text-black`:`border-[var(--oh-border)]`),children:n?(0,k.jsx)(l,{className:`size-2.5`,strokeWidth:3}):null}),a?(0,k.jsx)(a,{className:`size-3.5 shrink-0`,"aria-hidden":!0}):null,(0,k.jsx)(`span`,{title:d,className:`min-w-0 flex-1 truncate`,children:d}),(0,k.jsx)(`span`,{className:`shrink-0 text-xs text-tertiary-alt`,children:t})]})}function je(e,t){if(e===`category`)return N[t]}function U({groups:e,onToggle:t,className:n}){let{t:i}=r(`openhands`);return e.length===0?null:(0,k.jsx)(`div`,{"data-testid":`skill-facet-rail`,className:s(`flex min-w-0 flex-col gap-5`,n),children:e.map(e=>{let n=`skill-facet-group-${e.id}-title`;return(0,k.jsxs)(`div`,{"data-testid":`skill-facet-group-${e.id}`,role:`group`,"aria-labelledby":n,className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(`span`,{id:n,className:`px-1 text-[11px] font-semibold uppercase tracking-wider text-tertiary-alt`,children:i(e.labelKey)}),e.rows.map(n=>(0,k.jsx)(Ae,{testId:`skill-facet-${e.id}-${n.value}`,labelKey:n.labelKey,count:n.count,checked:n.checked,disabled:n.disabled,icon:je(e.id,n.value),onToggle:()=>t(e.id,n.value)},n.value))]},e.id)})})}function Me({groups:e,activeCount:t,onToggle:n,onClearAll:i,onClose:a}){let{t:c}=r(`openhands`);return(0,k.jsx)(m,{onClose:a,"aria-label":c(o.SETTINGS$SKILLS_FILTERS_MODAL_TITLE),children:(0,k.jsxs)(ae,{testID:`skill-filters-modal`,className:s(`items-stretch`,oe),children:[(0,k.jsx)(`h3`,{className:`text-lg font-semibold text-foreground`,children:c(o.SETTINGS$SKILLS_FILTERS_MODAL_TITLE)}),(0,k.jsx)(`div`,{className:`max-h-[60vh] overflow-y-auto custom-scrollbar-always`,children:(0,k.jsx)(U,{groups:e,onToggle:n})}),(0,k.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[t>0?(0,k.jsx)(g,{type:`button`,variant:`secondary`,testId:`skill-filters-modal-clear`,onClick:i,children:c(o.SETTINGS$SKILLS_CLEAR_FILTERS)}):null,(0,k.jsx)(g,{type:`button`,variant:`primary`,testId:`skill-filters-modal-done`,onClick:a,children:c(o.BUTTON$CLOSE)})]})]})})}var Ne=`source`,Pe=`category`,Fe=`type`,Ie=`state`,W=[`enabled`,`disabled`],G=[`agentskills`,`knowledge`,`repo`],K={query:``,sources:new Set,categories:new Set,types:new Set,states:new Set};function q(e,t){return e.map(e=>({value:e,labelKey:t[e]}))}function J(e,t){return new Set(e.filter(e=>t.has(e)))}var Le={project:o.SETTINGS$SKILLS_SOURCE_PROJECT,personal:o.SETTINGS$SKILLS_SOURCE_PERSONAL,public:o.SETTINGS$SKILLS_SOURCE_PUBLIC},Re={agentskills:o.SETTINGS$SKILLS_TYPE_AGENTSKILLS,knowledge:o.SETTINGS$SKILLS_TYPE_KNOWLEDGE,repo:o.SETTINGS$SKILLS_TYPE_REPO},ze={enabled:o.SETTINGS$SKILLS_ENABLED,disabled:o.SETTINGS$SKILLS_DISABLED},Y=[{id:`state`,labelKey:o.SETTINGS$SKILLS_FACET_STATE,param:Ie,values:q(W,ze),valueOf:(e,t)=>t.has(e.name)?`disabled`:`enabled`,selected:e=>e.states,withSelected:(e,t)=>({...e,states:J(W,t)})},{id:`source`,labelKey:o.SETTINGS$SKILLS_FACET_SOURCE,param:Ne,values:q(w,Le),valueOf:e=>le(e),selected:e=>e.sources,withSelected:(e,t)=>({...e,sources:J(w,t)})},{id:`category`,labelKey:o.SETTINGS$SKILLS_FACET_CATEGORY,param:Pe,values:q(j,M),valueOf:e=>F(e),selected:e=>e.categories,withSelected:(e,t)=>({...e,categories:J(j,t)})},{id:`type`,labelKey:o.SETTINGS$SKILLS_FACET_TYPE,param:Fe,values:q(G,Re),valueOf:e=>e.type,selected:e=>e.types,withSelected:(e,t)=>({...e,types:J(G,t)})}];function Be(e){let t=Y.find(t=>t.id===e);if(!t)throw Error(`Unknown skill facet group: ${e}`);return t}function X(e,t){let n=new Set(t.values.map(({value:e})=>e));return new Set(e.map(e=>e.trim()).filter(e=>n.has(e)))}function Ve(e){return Y.reduce((t,n)=>n.withSelected(t,X(e.getAll(n.param),n)),{...K,query:e.get(`q`)??``})}function He(e){let t=new URLSearchParams;e.query&&t.set(`q`,e.query);for(let n of Y){let r=n.selected(e);for(let{value:e}of n.values)r.has(e)&&t.append(n.param,e)}return t}function Z(e,t){let n=t.trim();if(!n)return!0;let r=[e.name,O(e),e.description??``,e.content??``,e.license??``,e.compatibility??``,...e.triggers??[],...e.allowed_tools??[]],i=n.toLowerCase();return r.some(e=>e.toLowerCase().includes(i))}function Q(e,t,n,r){return Y.every(i=>{if(i.id===r)return!0;let a=i.selected(n);return a.size===0?!0:a.has(i.valueOf(e,t))})}function Ue(e,t,n){return e.filter(e=>Z(e,n.query)&&Q(e,t,n))}function $(e,t,n){let r={};for(let i of e){let e=t.valueOf(i,n);r[e]=(r[e]??0)+1}return r}function We(e,t,n,r,i){let a=$(t,e,r),o=e.values.filter(({value:e})=>(a[e]??0)>0),s=e.selected(i);if(o.length<2&&s.size===0)return null;let c=e.values.filter(({value:e})=>(a[e]??0)>0||s.has(e)),l=$(n.filter(t=>Q(t,r,i,e.id)),e,r);return{id:e.id,labelKey:e.labelKey,rows:c.map(({value:e,labelKey:t})=>{let n=l[e]??0,r=s.has(e);return{value:e,labelKey:t,count:n,checked:r,disabled:n===0&&!r}})}}function Ge(e,t,n){let r=e.filter(e=>Z(e,n.query));return Y.map(i=>We(i,e,r,t,n)).filter(e=>e!==null)}function Ke(e,t,n){let r=Be(t);if(!r.values.some(e=>e.value===n))return e;let i=new Set(r.selected(e));return i.has(n)?i.delete(n):i.add(n),r.withSelected(e,i)}function qe(e){return{...K,query:e.query}}function Je(e){return Y.reduce((t,n)=>t+n.selected(e).size,0)}export{Je as a,Ke as c,ke as d,Oe as f,qe as i,Me as l,xe as m,Ue as n,Ve as o,Te as p,Ge as r,He as s,K as t,U as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js";import{t}from"./useQuery-BXWbZBZl.js";import{$ as n,ct as r,xt as i}from"./active-backend-context-DKFSMbn3.js";import{t as a}from"./proxy-tcFL2yTQ.js";import{t as o}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-BgxDvUcf.js";var s=100;function c(){let e=r().backend;if(e.kind!==`cloud`)throw Error(`Cloud skills call requires a cloud backend.`);return e}async function l(){let e=c(),t=[],n=null;do{let r=new URLSearchParams({limit:String(s)});n&&r.set(`page_id`,n);let i=await a({backend:e,method:`GET`,path:`/api/v1/skills/search?${r.toString()}`});t.push(...i.items??[]),n=i.next_page_id}while(n);return t}function u(e){return{name:e.name,type:`knowledge`,source:`public`,description:e.description,triggers:e.triggers,category:e.category,content:e.content,license:e.license??null,compatibility:e.compatibility??null}}var d=o.map(u),f=class{static async getSkills(t){if(r().backend.kind===`cloud`)return l();let a=[];try{a=(await new e(n()).getSkills({load_public:!1,load_user:!0,load_project:!0,load_org:!1,project_dir:t??i()})).skills??[]}catch{}return[...a,...d]}},p=e=>t({queryKey:[`skills`,e??null],queryFn:()=>f.getSkills(e),staleTime:1e3*60*10,refetchOnWindowFocus:!1}),m=[`project`,`personal`,`public`],h=[`/.agents/skills/`,`/.openhands/skills/`,`/.openhands/microagents/`];function g(e){return e.replace(/\\/g,`/`)}function _(e){let t=g(e).toLowerCase();return t===`public`?!0:t.includes(`public-skills`)||t.includes(`/.openhands/cache/skills/`)}function v(e){let t=g(e);return/^\/Users\/[^/]+\/\.(agents|openhands)\//.test(t)||/^\/home\/[^/]+\/\.(agents|openhands)\//.test(t)?!0:h.some(e=>{let n=t.indexOf(e);if(n===-1)return!1;let r=t.slice(0,n);return/^\/Users\/[^/]+$/.test(r)||/^\/home\/[^/]+$/.test(r)})}function y(e,t){let n=g(e);if(!h.some(e=>n.includes(e))||v(e))return!1;if(t){let e=g(t).replace(/\/$/,``);if(n.startsWith(e))return!0}return!0}function b(e,t){let n=e.source?.trim();if(!n)return e.type===`repo`?`project`:`public`;let r=n.toLowerCase();return _(n)?`public`:r===`user`||r===`global`?`personal`:r===`project`||r===`repo`||r===`sandbox`?`project`:v(n)?`personal`:y(n,t)?`project`:`public`}function x(e,t){let n={project:[],personal:[],public:[]};for(let r of e)n[b(r,t)].push(r);for(let e of m)n[e].sort((e,t)=>e.name.localeCompare(t.name));return n}export{p as i,b as n,x as r,m as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{U as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew3u153i-rfV8mQ9m.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js";import{t as o}from"./useMutation-DFnzkf6f.js";import{t as s}from"./useQuery-BXWbZBZl.js";import{F as c,It as l,Mt as u,Nt as d,n as f}from"./active-backend-context-DKFSMbn3.js";import{W as p,t as m}from"./utils-DaCIEEQP.js";import{n as h,t as g}from"./x-DkgltWa0.js";import{t as _}from"./loading-spinner-0L3ZTToZ.js";import{t as v}from"./modal-backdrop-BSzNhM4r.js";import{n as y}from"./modal-classes-BAb4Y_BG.js";import{t as b}from"./brand-button-Dxv6PDeN.js";import{n as x}from"./navigation-context-CQZwH_tC.js";import{t as S}from"./modal-close-button-CkJ0Ktjj.js";import{t as C}from"./settings-input-C03KUoSC.js";import{t as w}from"./plugins-management-service-BjYeF0b0.js";import{a as T,i as E,r as D}from"./extension-module-card-classes-DpeaYhYo.js";import{t as O}from"./settings-switch-CQE0EGC-.js";import{n as k}from"./circle-plus-check-toggle-CBh_qomE.js";import{n as A,t as j}from"./use-plugins-marketplace-DI4_pK56.js";import{t as M}from"./skill-icon-badge-CPQJ6A-I.js";import{n as ee}from"./extensions-navigation-BeC224yX.js";import{n as N}from"./settings-like-page-layout-classes-Cw4Yzv_P.js";import{n as P,t as F}from"./highlighted-source-view-C3sxykQi.js";var I=e(t(),1),L=n();function R({plugin:e,isBusy:t=!1,isDisabled:n=!1,onOpen:r,onInstall:i,onToggle:o}){let{t:s}=a(`openhands`);return(0,L.jsxs)(`div`,{"data-testid":`plugin-card-${e.name}`,role:`button`,tabIndex:0,onClick:r,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r())},className:m(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,T,D),children:[(0,L.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`h3`,{"data-testid":`plugin-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,L.jsx)(`p`,{"data-testid":`plugin-source-${e.name}`,className:`mt-0.5 min-w-0 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}):null]}),e.installed?(0,L.jsx)(k,{testId:`plugin-toggle-${e.name}`,isSelected:e.enabled,isDisabled:n||t,onToggle:o,disableTooltipKey:p.COMMON$DISABLE}):e.isLocal?(0,L.jsx)(`span`,{"data-testid":`plugin-local-badge-${e.name}`,className:m(E,`flex-shrink-0`),children:s(p.SETTINGS$PLUGINS_FILTER_LOCAL)}):(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-install-${e.name}`,isDisabled:n||t,className:`flex-shrink-0 whitespace-nowrap`,onClick:e=>{e?.stopPropagation(),i()},children:s(t?p.SETTINGS$PLUGINS_INSTALLING:p.SETTINGS$PLUGINS_INSTALL)})]}),e.description?(0,L.jsx)(`p`,{"data-testid":`plugin-description-${e.name}`,className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:e.description}):null,(e.installed||e.isLocal)&&e.version?(0,L.jsx)(`span`,{"data-testid":`plugin-version-${e.name}`,className:m(E,`self-start`),children:s(p.SETTINGS$SKILLS_VERSION,{version:e.version})}):null]})}var z=[{value:`all`,labelKey:p.SETTINGS$PLUGINS_FILTER_ALL},{value:`installed`,labelKey:p.SETTINGS$PLUGINS_FILTER_INSTALLED},{value:`available`,labelKey:p.SETTINGS$PLUGINS_FILTER_AVAILABLE},{value:`local`,labelKey:p.SETTINGS$PLUGINS_FILTER_LOCAL}];function B({search:e,onSearchChange:t,statusFilter:n,onStatusFilterChange:r}){let{t:i}=a(`openhands`);return(0,L.jsxs)(`div`,{"data-testid":`plugins-toolbar`,className:`flex items-stretch gap-2`,children:[(0,L.jsxs)(`div`,{className:m(`relative flex flex-1 min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`),children:[(0,L.jsx)(h,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,L.jsx)(`input`,{"data-testid":`plugins-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:i(p.SETTINGS$PLUGINS_SEARCH_PLACEHOLDER),"aria-label":i(p.SETTINGS$PLUGINS_SEARCH_PLACEHOLDER),className:m(`flex-1 min-w-0 bg-transparent border-0 outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),e?(0,L.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":i(p.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,L.jsx)(g,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,L.jsx)(`div`,{"data-testid":`plugins-status-filter`,className:`flex shrink-0 items-center gap-1 rounded-lg border border-[var(--oh-border)] bg-base-secondary p-1`,children:z.map(e=>(0,L.jsx)(`button`,{type:`button`,"data-testid":`plugins-filter-${e.value}`,"aria-pressed":n===e.value,onClick:()=>r(e.value),className:m(`cursor-pointer rounded-md px-3 py-1 text-xs transition-colors`,n===e.value?`bg-surface-raised text-white`:`text-tertiary-alt hover:text-white`),children:i(e.labelKey)},e.value))})]})}var V=(e,t)=>s({queryKey:[`plugin-file-content`,e,t],queryFn:()=>{if(!e||!t)throw Error(`No file selected`);return A.getPluginFileContent(e,t)},enabled:!!(e&&t),retry:!1,staleTime:1e3*60*10,refetchOnWindowFocus:!1});function H({basePath:e,files:t}){let{t:n}=a(`openhands`),[r,i]=I.useState(null),o=r&&t.includes(r)?r:null,{data:s,isLoading:c,isError:l}=V(o?e:null,o);return(0,L.jsxs)(`section`,{"data-testid":`plugin-files-section`,className:`flex min-w-0 flex-col gap-2`,children:[(0,L.jsx)(`h3`,{className:`text-sm font-medium text-white`,children:n(p.COMMON$FILES)}),(0,L.jsxs)(`div`,{className:`min-w-0 rounded-lg border border-[var(--oh-border)] bg-[rgba(255,255,255,0.04)]`,children:[(0,L.jsx)(`div`,{className:`max-h-48 overflow-y-auto custom-scrollbar`,children:(0,L.jsx)(P,{paths:t,selectedPath:o,onSelectFile:e=>i(t=>t===e?null:e)})}),o?(0,L.jsxs)(`div`,{"data-testid":`plugin-file-content`,className:`flex h-60 min-w-0 flex-col border-t border-[var(--oh-border)]`,children:[(0,L.jsx)(`p`,{className:`truncate px-3 py-2 text-xs text-tertiary-alt`,title:o,children:o}),(0,L.jsx)(`div`,{className:`min-h-0 flex-1`,children:c?(0,L.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,L.jsx)(_,{size:`small`})}):l?(0,L.jsx)(`p`,{className:`px-3 py-2 text-xs text-tertiary-light`,children:n(p.FILES$LOAD_ERROR)}):s?.kind===`binary`?(0,L.jsx)(`p`,{className:`px-3 py-2 text-xs text-tertiary-light`,children:n(p.FILES$BINARY_FALLBACK)}):(0,L.jsx)(F,{path:o,text:s?.text??``})})]}):null]})]})}function U({plugin:e,isBusy:t=!1,isDisabled:n=!1,onToggle:r,onInstall:i,onUninstall:o,onRefresh:s,onClose:c,onStartConversation:l}){let{t:u}=a(`openhands`),d=n||t;return(0,L.jsx)(v,{onClose:c,"aria-label":e.name,children:(0,L.jsxs)(`div`,{"data-testid":`plugin-detail-modal`,"data-plugin-name":e.name,className:`relative flex w-[640px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,L.jsx)(S,{onClose:c,testId:`plugin-detail-modal-close`}),(0,L.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,L.jsx)(`h2`,{className:m(`pr-6`,y),children:e.name}),e.source?(0,L.jsx)(`p`,{className:`mt-1 break-all text-xs text-tertiary-alt`,children:e.source}):null]}),(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[e.description?(0,L.jsx)(`p`,{className:`text-sm leading-relaxed text-tertiary-light`,children:e.description}):null,(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[e.isLocal?(0,L.jsx)(`span`,{className:E,children:u(p.SETTINGS$PLUGINS_FILTER_LOCAL)}):null,e.version?(0,L.jsx)(`span`,{className:E,children:u(p.SETTINGS$SKILLS_VERSION,{version:e.version})}):null,e.ref?(0,L.jsxs)(`span`,{className:E,children:[u(p.SETTINGS$PLUGINS_REF_LABEL),` `,e.ref]}):null,e.repoPath?(0,L.jsxs)(`span`,{className:E,children:[u(p.SETTINGS$PLUGINS_REPO_PATH_LABEL),` `,e.repoPath]}):null]}),e.installed?(0,L.jsx)(O,{testId:`plugin-modal-toggle-${e.name}`,isToggled:e.enabled,onToggle:r,isDisabled:d,togglePosition:`right`,children:u(e.enabled?p.SETTINGS$SKILLS_ENABLED:p.SETTINGS$SKILLS_DISABLED)}):null,e.skills?.length?(0,L.jsxs)(`section`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,L.jsx)(`h3`,{className:`text-sm font-medium text-white`,children:u(p.SETTINGS$PLUGINS_SKILLS_IN_BUNDLE)}),(0,L.jsx)(`ul`,{className:`flex min-w-0 flex-col gap-2`,children:e.skills.map(e=>(0,L.jsxs)(`li`,{"data-testid":`plugin-bundled-skill-${e.name}`,className:`flex items-start gap-3 rounded-lg border border-[var(--oh-border)] bg-[rgba(255,255,255,0.04)] px-3 py-2.5`,children:[(0,L.jsx)(M,{skillName:e.name}),(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`p`,{className:`truncate text-sm font-semibold text-white`,children:e.name}),e.description?(0,L.jsx)(`p`,{className:`mt-0.5 break-words text-xs leading-relaxed text-tertiary-light`,children:e.description}):null]})]},e.name))})]}):null,e.path&&e.files?.length?(0,L.jsx)(H,{basePath:e.path,files:e.files}):null]}),(0,L.jsxs)(`footer`,{className:`flex flex-shrink-0 flex-wrap justify-end gap-2 px-6 pb-6 pt-4`,children:[e.installed?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-detail-refresh-${e.name}`,isDisabled:d,onClick:s,children:u(p.SETTINGS$PLUGINS_REFRESH)}),(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-detail-uninstall-${e.name}`,isDisabled:d,onClick:o,children:u(p.SETTINGS$PLUGINS_UNINSTALL)})]}):e.isLocal?null:(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-detail-install-${e.name}`,isDisabled:d,onClick:i,children:u(t?p.SETTINGS$PLUGINS_INSTALLING:p.SETTINGS$PLUGINS_INSTALL)}),e.source&&l?(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-detail-start-conversation-${e.name}`,onClick:l,children:u(p.COMMON$START_CONVERSATION)}):null,(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-detail-modal-dismiss`,onClick:c,children:u(p.BUTTON$CLOSE)})]})]})})}function W(){let e=i(),{t}=a(`openhands`);return o({mutationFn:e=>w.installPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:c.installed}),e.invalidateQueries({queryKey:c.marketplace}),d(t(p.SETTINGS$PLUGINS_INSTALL_SUCCESS))},onError:e=>{u(l(e)||t(p.ERROR$GENERIC))}})}function G({onClose:e,onInstalled:t}){let{t:n}=a(`openhands`),r=W(),[i,o]=I.useState(``),[s,c]=I.useState(``),[l,u]=I.useState(``),d=i.trim(),f=d.length>0&&!r.isPending;return(0,L.jsx)(v,{onClose:e,"aria-label":n(p.SETTINGS$PLUGINS_ADD_MODAL_TITLE),children:(0,L.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),f&&r.mutate({source:d,ref:s.trim()||null,repo_path:l.trim()||null},{onSuccess:()=>{t?.(),e()}})},"data-testid":`add-plugin-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,L.jsx)(S,{onClose:e,testId:`add-plugin-modal-close`}),(0,L.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,L.jsx)(`h2`,{className:m(`pr-6`,y),children:n(p.SETTINGS$PLUGINS_ADD_MODAL_TITLE)}),(0,L.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:n(p.SETTINGS$PLUGINS_ADD_MODAL_INTRO)})]}),(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,L.jsx)(C,{testId:`add-plugin-source-input`,label:n(p.SETTINGS$PLUGINS_SOURCE_LABEL),type:`text`,value:i,onChange:o,placeholder:n(p.SETTINGS$PLUGINS_SOURCE_PLACEHOLDER),showRequiredTag:!0}),(0,L.jsx)(C,{testId:`add-plugin-ref-input`,label:n(p.SETTINGS$PLUGINS_REF_LABEL),type:`text`,value:s,onChange:c,showOptionalTag:!0}),(0,L.jsx)(C,{testId:`add-plugin-repo-path-input`,label:n(p.SETTINGS$PLUGINS_REPO_PATH_LABEL),type:`text`,value:l,onChange:u,showOptionalTag:!0})]}),(0,L.jsxs)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:[(0,L.jsx)(b,{type:`button`,variant:`secondary`,onClick:e,testId:`add-plugin-modal-dismiss`,children:n(p.BUTTON$CLOSE)}),(0,L.jsx)(b,{type:`submit`,variant:`primary`,testId:`add-plugin-submit`,isDisabled:!f,children:n(r.isPending?p.SETTINGS$PLUGINS_INSTALLING:p.SETTINGS$PLUGINS_INSTALL)})]})]})})}function K(e,t,n=void 0){let r=new Map;for(let t of e??[])r.set(t.name,{name:t.name,description:t.description,source:t.source,ref:t.ref??null,repoPath:t.repo_path??null,installed:t.installed,enabled:!1,version:null,inCatalog:!0,isLocal:!1,path:t.path??null,skills:t.skills??null,files:t.files??null});for(let e of t??[]){let t=r.get(e.name),n=e.skills!=null||e.files!=null;r.set(e.name,{name:e.name,description:t?.description??e.description??null,source:e.source??t?.source??null,ref:e.resolved_ref??t?.ref??null,repoPath:e.repo_path??t?.repoPath??null,installed:!0,enabled:e.enabled,version:e.version??null,inCatalog:t?.inCatalog??!1,isLocal:!1,path:n?e.install_path:t?.path??null,skills:n?e.skills??null:t?.skills??null,files:n?e.files??null:t?.files??null})}for(let e of n??[])r.has(e.name)||r.set(e.name,{name:e.name,description:e.description||null,source:null,ref:null,repoPath:null,installed:!1,enabled:!1,version:e.version||null,inCatalog:!1,isLocal:!0,path:e.path??null,skills:e.skills??null,files:e.files??null});let i=e=>e.installed?0:e.isLocal?1:2;return Array.from(r.values()).sort((e,t)=>{let n=i(e)-i(t);return n===0?e.name.localeCompare(t.name):n})}function q(e,t){let n=t.trim().toLowerCase();return n?[e.name,e.description??``,e.source??``,e.repoPath??``,e.ref??``].some(e=>e.toLowerCase().includes(n)):!0}function J(e,t){return t===`installed`?e.installed:t===`available`?!e.installed&&!e.isLocal:t===`local`?e.isLocal:!0}var Y=()=>s({queryKey:c.installed,queryFn:()=>w.listInstalledPlugins(),staleTime:1e3*60*10,refetchOnWindowFocus:!1}),X=()=>s({queryKey:c.local,queryFn:()=>A.getLocalPlugins(),staleTime:1e3*60*10,refetchOnWindowFocus:!1});function Z(){let e=i(),{t}=a(`openhands`);return o({mutationFn:({name:e,enabled:t})=>w.setPluginEnabled(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:c.installed})},onError:e=>{u(l(e)||t(p.ERROR$GENERIC))}})}function Q(){let e=i(),{t}=a(`openhands`);return o({mutationFn:e=>w.uninstallPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:c.installed}),e.invalidateQueries({queryKey:c.marketplace}),d(t(p.SETTINGS$PLUGINS_UNINSTALL_SUCCESS))},onError:e=>{u(l(e)||t(p.ERROR$GENERIC))}})}function te(){let e=i(),{t}=a(`openhands`);return o({mutationFn:e=>w.refreshPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:c.installed}),d(t(p.SETTINGS$PLUGINS_REFRESH_SUCCESS))},onError:e=>{u(l(e)||t(p.ERROR$GENERIC))}})}function ne(e){let t=btoa(JSON.stringify(e));return`/launch?${new URLSearchParams({plugins:t}).toString()}`}var $=r(function(){let{t:e}=a(`openhands`),{backend:t}=f(),{navigate:n}=x(),r=t.kind===`local`,{data:i,isLoading:o}=j(),{data:s,isLoading:c}=Y(),{data:l,isLoading:u}=X(),d=W(),h=Z(),g=Q(),_=te(),[v,y]=I.useState(``),[S,C]=I.useState(`all`),[w,T]=I.useState(null),[E,D]=I.useState(!1),O=I.useMemo(()=>K(i,s,l),[i,s,l]),k=I.useMemo(()=>O.filter(e=>J(e,S)&&q(e,v)),[O,S,v]),A=w?O.find(e=>e.name===w)??null:null,M=o||c||u,P=(h.isPending?h.variables?.name:void 0)??(g.isPending?g.variables:void 0)??(_.isPending?_.variables:void 0)??null,F=e=>P===e.name||d.isPending&&d.variables?.source===e.source,z=e=>{e.source&&d.mutate({source:e.source,ref:e.ref,repo_path:e.repoPath})},V=(e,t)=>{h.mutate({name:e.name,enabled:t})},H=e=>{g.mutate(e.name,{onSuccess:()=>T(null)})},$=e=>{_.mutate(e.name)},re=e=>{e.source&&n(ne([{source:e.source,ref:e.ref,repo_path:e.repoPath}]))};return(0,L.jsxs)(`div`,{"data-testid":`skills-plugins-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,L.jsx)(ee,{}),(0,L.jsx)(`main`,{className:m(N,`h-full`),children:(0,L.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,L.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,L.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(p.SETTINGS$PLUGINS_TITLE)}),(0,L.jsx)(`div`,{"data-testid":`plugins-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(p.SETTINGS$PLUGINS_PAGE_DESCRIPTION)})]}),(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugins-add-plugin-button`,isDisabled:!r,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>D(!0),children:e(p.SETTINGS$PLUGINS_ADD_BUTTON)})]}),M&&(0,L.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,L.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}),!M&&O.length===0&&(0,L.jsx)(`div`,{"data-testid":`plugins-empty`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,L.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(p.SETTINGS$PLUGINS_NO_PLUGINS)})}),!M&&O.length>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(B,{search:v,onSearchChange:y,statusFilter:S,onStatusFilterChange:C}),k.length===0?(0,L.jsx)(`div`,{"data-testid":`plugins-no-match`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,L.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(p.SETTINGS$PLUGINS_NO_MATCH)})}):(0,L.jsx)(`section`,{className:m(`flex min-w-0 flex-col gap-3`,`@container min-w-0 w-full`),children:(0,L.jsx)(`div`,{className:`grid min-w-0 grid-cols-1 gap-3 @min-[600px]:grid-cols-2`,children:k.map(e=>(0,L.jsx)(R,{plugin:e,isBusy:F(e),isDisabled:!r,onOpen:()=>T(e.name),onInstall:()=>z(e),onToggle:t=>V(e,t)},e.name))})})]}),A&&(0,L.jsx)(U,{plugin:A,isBusy:F(A),isDisabled:!r,onToggle:e=>V(A,e),onInstall:()=>z(A),onUninstall:()=>H(A),onRefresh:()=>$(A),onStartConversation:()=>re(A),onClose:()=>T(null)}),E&&(0,L.jsx)(G,{onClose:()=>D(!1)})]})})]})});export{$ as default};
|