@openhands/agent-canvas 1.15.0 → 1.17.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-DrjNsPOH.js} +1 -1
- package/build/assets/active-backend-context-rZiLJRUc.js +2 -0
- package/build/assets/{agent-context-settings-D3PjSTU1.js → agent-context-settings-CJUrcBut.js} +1 -1
- package/build/assets/agent-profiles-service.api-Biieml2L.js +1 -0
- package/build/assets/agent-profiles-settings-x6RvPsq7.js +1 -0
- package/build/assets/agent-server-client-options-BikiNwTa.js +1 -0
- package/build/assets/agent-server-conversation-service.api-DYFsNHKf.js +88 -0
- package/build/assets/agent-settings-BJyovpJ_.js +1 -0
- package/build/assets/agent-settings-CpY3zObk.js +2 -0
- package/build/assets/alert-banner-vARz1idS.js +1 -0
- package/build/assets/{api-error-message-BJyfWp6p.js → api-error-message-Ve79qDcN.js} +1 -1
- package/build/assets/api-key-entry-screen-CsMuBhoP.js +1 -0
- package/build/assets/{app-settings-CbHqzQus.js → app-settings-BaJ7nfHt.js} +1 -1
- package/build/assets/automation-detail-CVoGDrKq.js +3 -0
- package/build/assets/{automation-export-BRopEHMu.js → automation-export-DxY47m3T.js} +1 -1
- package/build/assets/automation-git-sync-CRMP9Bbm.js +1 -0
- package/build/assets/automation-setup-route-072beLz1.js +3 -0
- package/build/assets/{automation-templates-C_0FZgLG.js → automation-templates-4C4PM8K7.js} +1 -1
- package/build/assets/automations-list-xuqTSQL4.js +1 -0
- package/build/assets/{back-nav-button-Dm9tIjVf.js → back-nav-button-B8tH0BEp.js} +1 -1
- package/build/assets/backend-form-modal-0aJmWdsa.js +1 -0
- package/build/assets/{backend-synced-settings-badge-3fOwg6Bd.js → backend-synced-settings-badge-B7rKWBir.js} +1 -1
- package/build/assets/{badge-D4SqUCsR.js → badge-CcGx2TaV.js} +1 -1
- package/build/assets/{base-modal-C7_BDl_U.js → base-modal-DTULovNc.js} +1 -1
- package/build/assets/bot-CLMxGFaq.js +1 -0
- package/build/assets/{brand-button-Dxv6PDeN.js → brand-button-DxPO4Lf8.js} +1 -1
- package/build/assets/browser-C-_qBasq.js +46 -0
- package/build/assets/{browser-tab-BAl4ckJE.js → browser-tab-DZanIw5m.js} +1 -1
- package/build/assets/canvas-extension-page-o_cWgE9B.js +1 -0
- package/build/assets/canvas-extensions-DSgNlCha.js +1 -0
- package/build/assets/canvas-extensions-runtime-DdnkgJXV.js +1 -0
- package/build/assets/{chat-send-button-DWwR2cgI.js → chat-send-button-B3SFSIg5.js} +1 -1
- package/build/assets/check-fDEfgSzj.js +1 -0
- package/build/assets/chevron-down-CFrWHqu8.js +1 -0
- package/build/assets/chevron-right-C5roOrJu.js +1 -0
- package/build/assets/circle-check-ClTzJTdb.js +1 -0
- package/build/assets/{circle-plus-check-toggle-CBh_qomE.js → circle-plus-check-toggle-Fr-h-mbL.js} +1 -1
- package/build/assets/{cloud-funnel-analytics-287iIERo.js → cloud-funnel-analytics-BQanUEEC.js} +1 -1
- package/build/assets/{cog-C4rrw-ZK.js → cog-VBlRo6iw.js} +1 -1
- package/build/assets/command-menu-BT3Ia5Ru.js +1 -0
- package/build/assets/commits-tab-2jhtaohl.js +1 -0
- package/build/assets/{condenser-settings-BcNmYR4s.js → condenser-settings-eVKFMvap.js} +1 -1
- package/build/assets/confirmation-modal-gIFHeZt6.js +1 -0
- package/build/assets/{context-menu-list-item-lVYETtY5.js → context-menu-list-item-DDROe12Z.js} +1 -1
- package/build/assets/conversation-BnjJSFf5.js +93 -0
- package/build/assets/conversation-DZ578rOX.js +1 -0
- package/build/assets/conversation-panel-DZ578rOX.js +1 -0
- package/build/assets/conversation-state-store-D1_G_9I-.js +1 -0
- package/build/assets/{conversation-store-Ca3ghXap.js → conversation-store-DVVfkCsk.js} +1 -1
- package/build/assets/{conversation-tab-empty-state-HJtkmHZj.js → conversation-tab-empty-state-DKlzAz5c.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-Cjkswvnj.js → copy-to-clipboard-button-B3w0X7WH.js} +1 -1
- package/build/assets/{device-verify-EZhHhBT7.js → device-verify-BfkCzyFB.js} +1 -1
- package/build/assets/{dropdown-classes-DJe-E6MC.js → dropdown-classes-B9kJVDIk.js} +1 -1
- package/build/assets/edit-automation-modal-BwhJ39JT.js +1 -0
- package/build/assets/empty-state-RZz0OfnY.js +1 -0
- package/build/assets/{entry.client-C7Bi2tkU.js → entry.client-Ds8LVp-E.js} +2 -2
- package/build/assets/enum-filter-dropdown-C4pW0ORd.js +1 -0
- package/build/assets/{environment-switch-overlay-CEKrFiMw.js → environment-switch-overlay-P2ZAuzov.js} +1 -1
- package/build/assets/{error-state-BALXiBNy.js → error-state-B_5cgNPJ.js} +1 -1
- package/build/assets/extensions-hub-DsaUr4ca.js +1 -0
- package/build/assets/extensions-navigation-CRMZd-FE.js +1 -0
- package/build/assets/external-link-DQtv7eTh.js +1 -0
- package/build/assets/files-tab-CCgAcVdc.js +1 -0
- package/build/assets/{form-control-classes-CGw40z5h.js → form-control-classes-B-z85REi.js} +1 -1
- package/build/assets/format-model-name-CasAP3nd.js +1 -0
- package/build/assets/get-git-path-EHrSDxTM.js +1 -0
- package/build/assets/git-repo-dropdown-D2WEQ97X.js +1 -0
- package/build/assets/{git-repo-dropdown-ai8qaNkD.js → git-repo-dropdown-DVeCUUXG.js} +1 -1
- package/build/assets/{highlighted-source-view-C3sxykQi.js → highlighted-source-view-DjHO3SdW.js} +1 -1
- package/build/assets/home-BorS_vdS.js +1 -0
- package/build/assets/home-aIMbHw5M.js +1 -0
- package/build/assets/home-automation-run-tooltip-CpHNFiFl.js +1 -0
- package/build/assets/home-store-DyXz0w6d.js +1 -0
- package/build/assets/hooks-service-C6dpRtZM.js +1 -0
- package/build/assets/index-home-zKFuKK2B.js +1 -0
- package/build/assets/info-CTIdjttz.js +1 -0
- package/build/assets/install-server-modal-DUiZMc8u.js +1 -0
- package/build/assets/kebab-menu-item-content-mm04SBD3.js +1 -0
- package/build/assets/{key-Cn5za3rg.js → key-CfXbJa8w.js} +1 -1
- package/build/assets/{launch-C1ieiOGe.js → launch-BSIf9KEg.js} +1 -1
- package/build/assets/list-filter-CNpqTWVY.js +1 -0
- package/build/assets/{list-todo-Cuu-STFc.js → list-todo-ByXMdY4W.js} +1 -1
- package/build/assets/llm-not-configured-banner-z_QRSeV0.js +27 -0
- package/build/assets/llm-settings-B-5AHMiX.js +1 -0
- package/build/assets/llm-settings-B3SjHDmA.js +1 -0
- package/build/assets/llm-subscription-service-aDNBQ7Gq.js +1 -0
- package/build/assets/loader-circle-Dex47vVW.js +1 -0
- package/build/assets/{loading-spinner-0L3ZTToZ.js → loading-spinner-DfHI77BA.js} +1 -1
- package/build/assets/manage-backends-modal-q1NdFisr.js +1 -0
- package/build/assets/manifest-8920b615.js +1 -0
- package/build/assets/{manifest-subpage-layout-BGhiUQbA.js → manifest-subpage-layout-BQQy5ipR.js} +1 -1
- package/build/assets/{map-provider-B9LTm23I.js → map-provider-DXvssjw9.js} +1 -1
- package/build/assets/markdown-renderer-rivLvYh-.js +8 -0
- package/build/assets/{mcp-CKbR4Vft.js → mcp-CEXDhQWn.js} +1 -1
- package/build/assets/{mcp-marketplace-utils-C13fFccR.js → mcp-marketplace-utils-Cn_NIMWM.js} +1 -1
- package/build/assets/mcp-page-LGYIICMG.js +9 -0
- package/build/assets/messages-DUSeANAh.js +41 -0
- package/build/assets/{modal-body-CMOc2tLl.js → modal-body-DJw4xBki.js} +1 -1
- package/build/assets/{modal-classes-BAb4Y_BG.js → modal-classes-Dg0ngBPO.js} +1 -1
- package/build/assets/{modal-close-button-CkJ0Ktjj.js → modal-close-button-B9j4nasm.js} +1 -1
- package/build/assets/{mouse-pointer-click-CsgRs_-r.js → mouse-pointer-click-DEhsSUpu.js} +1 -1
- package/build/assets/onboarding-BjFebfs5.js +1 -0
- package/build/assets/onboarding-modal-DDTjOpyd.js +1 -0
- package/build/assets/organization-service.api-Cyg1Tn03.js +1 -0
- package/build/assets/pencil-D5c47kyN.js +1 -0
- package/build/assets/pin-C7vMagvf.js +1 -0
- package/build/assets/planner-tab-D8f2Y3rn.js +1 -0
- package/build/assets/plug-CeaqeF6u.js +1 -0
- package/build/assets/plugins-management-service-Bh_pBuf-.js +1 -0
- package/build/assets/plus-B3wvU06-.js +1 -0
- package/build/assets/profiles-service.api-BbOK0EkF.js +1 -0
- package/build/assets/providers-2gIIkz2N.js +1 -0
- package/build/assets/proxy-CBgMd2zf.js +1 -0
- package/build/assets/{puzzle-A9pGxxai.js → puzzle-DdAqbUrb.js} +1 -1
- package/build/assets/recommended-automations-launcher-YLAQTp4s.js +1 -0
- package/build/assets/refresh-cw-DEQdPCpH.js +1 -0
- package/build/assets/root-Bye_XmEL.js +2 -0
- package/build/assets/root-Cnwwzgo0.css +1 -0
- package/build/assets/root-layout-CSAwxBGM.js +2 -0
- package/build/assets/schema-field-CK0xYNbO.js +1 -0
- package/build/assets/scroll-fade-state-Dt_fx2kf.js +1 -0
- package/build/assets/sdk-section-page-Da73Rs_o.js +1 -0
- package/build/assets/secret-form-CB2VwYYg.js +1 -0
- package/build/assets/secrets-service-Cr8g8xuv.js +1 -0
- package/build/assets/{secrets-settings-BizaTEr1.js → secrets-settings-Bh0udeKv.js} +1 -1
- package/build/assets/settings-CKqk8ZnH.js +1 -0
- package/build/assets/settings-DmyIgRxO.js +1 -0
- package/build/assets/{settings-dropdown-input-tM0A0ipy.js → settings-dropdown-input-DVpyD87C.js} +1 -1
- package/build/assets/settings-index-BSJUFmjE.js +1 -0
- package/build/assets/{settings-input-C03KUoSC.js → settings-input-C0dd8Utu.js} +1 -1
- package/build/assets/{settings-list-classes-BJ0g8rWj.js → settings-list-classes-Ds4jPBHK.js} +1 -1
- package/build/assets/{settings-modal-AzEF1QPP.js → settings-modal-yStgEh2o.js} +1 -1
- package/build/assets/settings-service.api-9_xdv_mh.js +1 -0
- package/build/assets/{settings-switch-CQE0EGC-.js → settings-switch-B78Khmyz.js} +1 -1
- package/build/assets/{settings-utils-ClYOkbbI.js → settings-utils-8GIIgOQL.js} +1 -1
- package/build/assets/shared-conversation-DM96X4KV.js +1 -0
- package/build/assets/shield-check-DO7wa_eu.js +1 -0
- package/build/assets/{sidebar-layout-D3hE08wK.js → sidebar-layout-EPfWxk11.js} +1 -1
- package/build/assets/sidebar-mobile-menu-toggle-D5GR5xT9.js +1 -0
- package/build/assets/sidebar-nav-link-_t4_Ef-9.js +1 -0
- package/build/assets/{sidebar-onboarding-checklist-storage-3qYflszY.js → sidebar-onboarding-checklist-storage-DbDX-Wvj.js} +1 -1
- package/build/assets/sidebar-store-CSDFK0W5.js +1 -0
- package/build/assets/{skill-card-pill-row-CFxjoqxn.js → skill-card-pill-row-989y15jV.js} +1 -1
- package/build/assets/skill-enablement-DXeaImBz.js +1 -0
- package/build/assets/skill-filter-BBeZ4JEP.js +2 -0
- package/build/assets/{skill-icon-badge-CPQJ6A-I.js → skill-icon-badge-BDhQ-tQ0.js} +1 -1
- package/build/assets/skill-scope-Dz3kPH3P.js +1 -0
- package/build/assets/skills-plugins-e3CYGdUJ.js +1 -0
- package/build/assets/skills-settings-3e-FuHw_.js +1 -0
- package/build/assets/styled-tooltip-Pd22BIvr.js +1 -0
- package/build/assets/{task-list-tab-04GNQuii.js → task-list-tab-3Jg8ywch.js} +1 -1
- package/build/assets/{terminal-Cj0iHIW7.js → terminal-onXx0_Qz.js} +1 -1
- package/build/assets/toggle-switch-lwQtxDcm.js +1 -0
- package/build/assets/trash-2-ZhKuTLiz.js +1 -0
- package/build/assets/trash-B6OIe4yX.js +1 -0
- package/build/assets/triangle-alert-BajLPpQg.js +1 -0
- package/build/assets/{typography-SgFy466J.js → typography-HLLg_FAn.js} +1 -1
- package/build/assets/usage-tab-Cm-9j3UK.js +1 -0
- package/build/assets/use-acp-credential-form-BARcvjYE.js +1 -0
- package/build/assets/use-activate-agent-profile-BLKML6vQ.js +1 -0
- package/build/assets/use-agent-profiles-1P91KSXz.js +1 -0
- package/build/assets/{use-automation-health-BxXdzZMP.js → use-automation-health-BZkQNEA8.js} +1 -1
- package/build/assets/use-automation-permissions-B_RpvL-s.js +1 -0
- package/build/assets/{use-automations-zYb0dUny.js → use-automations-Cg0PDIZr.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-BWMahtUh.js → use-can-manage-org-profiles-BbN6KfDr.js} +1 -1
- package/build/assets/use-canvas-extensions-CFUpHat6.js +1 -0
- package/build/assets/{use-cloud-current-user-id-CPHMDG-C.js → use-cloud-current-user-id-Dk0rjr63.js} +1 -1
- package/build/assets/use-config-DpafU_QP.js +1 -0
- package/build/assets/use-create-conversation-1YgmAHt-.js +1 -0
- package/build/assets/use-create-secret-D8p9ybQj.js +1 -0
- package/build/assets/{use-get-secrets-BT4ihRwj.js → use-get-secrets-CQ4b0qK8.js} +1 -1
- package/build/assets/use-is-authed-BRPjCRKM.js +1 -0
- package/build/assets/{use-launch-skill-in-chat-BYjYihBP.js → use-launch-skill-in-chat-DeYa1tFM.js} +1 -1
- package/build/assets/use-llm-configured-DGm8FiRR.js +1 -0
- package/build/assets/use-llm-profiles-BTTtpW4z.js +1 -0
- package/build/assets/use-manifest-capabilities-AOWGcu0j.js +1 -0
- package/build/assets/use-onboarding-completion-CoINurkm.js +1 -0
- package/build/assets/use-pinned-home-route-D6krwXjy.js +1 -0
- package/build/assets/use-plugins-marketplace-mLsIDhBv.js +1 -0
- package/build/assets/use-save-agent-profile-CxyO9YG-.js +1 -0
- package/build/assets/{use-save-settings-CUZW6yXP.js → use-save-settings-3U5K9-8x.js} +1 -1
- package/build/assets/use-settings-Dn00UISA.js +1 -0
- package/build/assets/use-settings-nav-items-vrjxTqcu.js +16 -0
- package/build/assets/use-tracking-B9prBsrq.js +3 -0
- package/build/assets/{use-user-conversation-DT0_QCnL.js → use-user-conversation-ZWlXtbZb.js} +1 -1
- package/build/assets/{useInfiniteQuery-CgeUQPfs.js → useInfiniteQuery-BzrRqjLg.js} +1 -1
- package/build/assets/{useMutation-DFnzkf6f.js → useMutation-CJuK90oc.js} +1 -1
- package/build/assets/{useQueries-BhbrGEf1.js → useQueries-CykmpT-a.js} +1 -1
- package/build/assets/{useQuery-BXWbZBZl.js → useQuery-S6j94er1.js} +1 -1
- package/build/assets/utils-BOco8mxR.js +1 -0
- package/build/assets/{vendor~conversation-panel~conversation-CTvDDiXg.js → vendor~conversation-panel~conversation-4eJ0tml3.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~b0x1wrp2-Z0lly3FE.js +2 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js +185 -0
- 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-DnDoaYNi.js} +1 -1
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-BTyukeM-.js → vendor~index-home~home~conversation-panel~conversation-CSFLzmTN.js} +1 -1
- package/build/assets/vendor~root-layout-n8XCEXG8.js +1 -0
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-BYAWJwQX.js → vendor~root-layout~conversation-panel~conversation-3Idg1_U3.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-DkPlXWl9.js} +1 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-DgQ564nC.js +1 -0
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-CxhwKuAd.js +1 -0
- 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~inibp4qe-CnsDDzeE.js} +2 -2
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js +1 -0
- 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-BPjI-atc.js} +125 -15
- 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-u2POabjH.js} +1 -1
- package/build/assets/{wrench-hi7Q13dF.js → wrench-CkgI4rxA.js} +1 -1
- package/build/assets/x-By6qCmtY.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +94 -25
- package/build/locales/ca/openhands.json +94 -25
- package/build/locales/de/openhands.json +94 -25
- package/build/locales/en/openhands.json +94 -25
- package/build/locales/es/openhands.json +94 -25
- package/build/locales/fr/openhands.json +94 -25
- package/build/locales/it/openhands.json +94 -25
- package/build/locales/ja/openhands.json +94 -25
- package/build/locales/ko-KR/openhands.json +94 -25
- package/build/locales/no/openhands.json +94 -25
- package/build/locales/pt/openhands.json +94 -25
- package/build/locales/tr/openhands.json +94 -25
- package/build/locales/uk/openhands.json +94 -25
- package/build/locales/zh-CN/openhands.json +94 -25
- package/build/locales/zh-TW/openhands.json +94 -25
- 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.d.ts +72 -12
- package/dist/api/agent-server-adapter.js +249 -145
- 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 +32 -0
- package/dist/api/agent-server-config.js +21 -5
- package/dist/api/agent-server-config.js.map +1 -1
- package/dist/api/automation-service/automation-service.api.cjs +1 -1
- package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
- package/dist/api/automation-service/automation-service.api.d.ts +2 -2
- package/dist/api/automation-service/automation-service.api.js +7 -7
- package/dist/api/automation-service/automation-service.api.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/cloud/provider-connections-service.api.cjs +2 -0
- package/dist/api/cloud/provider-connections-service.api.cjs.map +1 -0
- package/dist/api/cloud/provider-connections-service.api.d.ts +5 -0
- package/dist/api/cloud/provider-connections-service.api.js +50 -0
- package/dist/api/cloud/provider-connections-service.api.js.map +1 -0
- package/dist/api/cloud/skills-service.api.cjs +1 -1
- package/dist/api/cloud/skills-service.api.cjs.map +1 -1
- package/dist/api/cloud/skills-service.api.d.ts +10 -0
- package/dist/api/cloud/skills-service.api.js +11 -1
- package/dist/api/cloud/skills-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-metadata-store.cjs +1 -1
- package/dist/api/conversation-metadata-store.cjs.map +1 -1
- package/dist/api/conversation-metadata-store.d.ts +24 -0
- package/dist/api/conversation-metadata-store.js +10 -2
- package/dist/api/conversation-metadata-store.js.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +31 -0
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +188 -128
- 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/hooks-service.cjs +2 -0
- package/dist/api/hooks-service.cjs.map +1 -0
- package/dist/api/hooks-service.d.ts +13 -0
- package/dist/api/hooks-service.js +20 -0
- package/dist/api/hooks-service.js.map +1 -0
- package/dist/api/provider-connections-service/provider-connections-service.api.cjs +1 -1
- package/dist/api/provider-connections-service/provider-connections-service.api.cjs.map +1 -1
- package/dist/api/provider-connections-service/provider-connections-service.api.js +25 -16
- package/dist/api/provider-connections-service/provider-connections-service.api.js.map +1 -1
- 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 +5 -2
- package/dist/api/settings-service/settings-service.api.js +20 -11
- package/dist/api/settings-service/settings-service.api.js.map +1 -1
- package/dist/api/skills-service.cjs +1 -1
- package/dist/api/skills-service.cjs.map +1 -1
- package/dist/api/skills-service.d.ts +7 -0
- package/dist/api/skills-service.js +11 -8
- package/dist/api/skills-service.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/critic-result-display.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/critic-result-display.js +5 -5
- 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/conversation-events/chat/event-message-components/finish-event-message.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.js +2 -1
- package/dist/components/conversation-events/chat/event-message-components/finish-event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js +28 -28
- package/dist/components/conversation-events/chat/event-message-components/generic-event-message-wrapper.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.js +2 -1
- package/dist/components/conversation-events/chat/event-message-components/thought-event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.d.ts +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js +37 -37
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message.cjs +2 -2
- package/dist/components/conversation-events/chat/event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message.js +79 -70
- package/dist/components/conversation-events/chat/event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/messages.cjs +1 -1
- package/dist/components/conversation-events/chat/messages.cjs.map +1 -1
- package/dist/components/conversation-events/chat/messages.js +28 -27
- package/dist/components/conversation-events/chat/messages.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 +118 -102
- package/dist/components/features/automations/automation-card.js.map +1 -1
- package/dist/components/features/automations/automation-list-row.cjs +1 -1
- package/dist/components/features/automations/automation-list-row.cjs.map +1 -1
- package/dist/components/features/automations/automation-list-row.js +88 -77
- package/dist/components/features/automations/automation-list-row.js.map +1 -1
- package/dist/components/features/automations/detail/detail-header.d.ts +3 -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/automations/detail/run-status-badge.cjs +1 -1
- package/dist/components/features/automations/detail/run-status-badge.cjs.map +1 -1
- package/dist/components/features/automations/detail/run-status-badge.d.ts +2 -2
- package/dist/components/features/automations/detail/run-status-badge.js +82 -53
- package/dist/components/features/automations/detail/run-status-badge.js.map +1 -1
- package/dist/components/features/automations/kebab-menu.cjs +1 -1
- package/dist/components/features/automations/kebab-menu.cjs.map +1 -1
- package/dist/components/features/automations/kebab-menu.js +9 -5
- package/dist/components/features/automations/kebab-menu.js.map +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.cjs +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.cjs.map +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.js +12 -12
- package/dist/components/features/automations/recommended-automations-launcher.js.map +1 -1
- package/dist/components/features/automations/recommended-automations-section.cjs +1 -1
- package/dist/components/features/automations/recommended-automations-section.js +9 -9
- 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/backends/backend-selector.cjs +1 -1
- package/dist/components/features/backends/backend-selector.cjs.map +1 -1
- package/dist/components/features/backends/backend-selector.js +133 -122
- package/dist/components/features/backends/backend-selector.js.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.js +29 -29
- package/dist/components/features/backends/manage-backends-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/change-agent-button.cjs +1 -1
- package/dist/components/features/chat/change-agent-button.js +4 -4
- 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 +107 -104
- 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/chat-message.cjs +1 -1
- package/dist/components/features/chat/chat-message.cjs.map +1 -1
- package/dist/components/features/chat/chat-message.d.ts +2 -1
- package/dist/components/features/chat/chat-message.js +88 -79
- package/dist/components/features/chat/chat-message.js.map +1 -1
- package/dist/components/features/chat/components/context-window-meter.cjs +1 -1
- package/dist/components/features/chat/components/context-window-meter.js +4 -4
- package/dist/components/features/chat/confirmation-mode-enabled.cjs +1 -1
- package/dist/components/features/chat/confirmation-mode-enabled.js +4 -4
- package/dist/components/features/chat/generic-event-message.cjs +1 -1
- package/dist/components/features/chat/generic-event-message.cjs.map +1 -1
- package/dist/components/features/chat/generic-event-message.d.ts +2 -1
- package/dist/components/features/chat/generic-event-message.js +41 -22
- package/dist/components/features/chat/generic-event-message.js.map +1 -1
- package/dist/components/features/chat/interactive-chat-box.cjs +1 -1
- package/dist/components/features/chat/interactive-chat-box.cjs.map +1 -1
- package/dist/components/features/chat/interactive-chat-box.js +20 -19
- package/dist/components/features/chat/interactive-chat-box.js.map +1 -1
- 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-git-section.cjs +1 -1
- package/dist/components/features/conversation/conversation-overview-git-section.js +4 -4
- 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-context-menu.cjs +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.js +77 -78
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs-context-menu.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 +96 -96
- 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/advanced-conversation-options-modal.cjs +2 -0
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.cjs.map +1 -0
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.d.ts +21 -0
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.js +239 -0
- package/dist/components/features/conversation-panel/advanced-conversation-options-modal.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.cjs +2 -0
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.cjs.map +1 -0
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.d.ts +28 -0
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.js +69 -0
- package/dist/components/features/conversation-panel/conversation-active-tag-filters.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js +19 -18
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-actions.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js +91 -80
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-context-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-preview.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.d.ts +7 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js +87 -81
- package/dist/components/features/conversation-panel/conversation-card/conversation-card.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-chips.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.d.ts +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js +2 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-tag-display.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-layouts-menu.cjs +2 -0
- package/dist/components/features/conversation-panel/conversation-layouts-menu.cjs.map +1 -0
- package/dist/components/features/conversation-panel/conversation-layouts-menu.d.ts +29 -0
- package/dist/components/features/conversation-panel/conversation-layouts-menu.js +177 -0
- package/dist/components/features/conversation-panel/conversation-layouts-menu.js.map +1 -0
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.d.ts +37 -0
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js +85 -45
- package/dist/components/features/conversation-panel/conversation-panel-list-helpers.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +296 -290
- package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.cjs +2 -0
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.cjs.map +1 -0
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.d.ts +22 -0
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.js +153 -0
- package/dist/components/features/conversation-panel/edit-conversation-tags-modal.js.map +1 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.cjs +2 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.cjs.map +1 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.d.ts +6 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.js +65 -0
- package/dist/components/features/conversation-panel/hide-older-conversations-row.js.map +1 -0
- package/dist/components/features/conversation-panel/menu-row.cjs +1 -1
- package/dist/components/features/conversation-panel/menu-row.cjs.map +1 -1
- package/dist/components/features/conversation-panel/menu-row.d.ts +11 -1
- package/dist/components/features/conversation-panel/menu-row.js +27 -16
- package/dist/components/features/conversation-panel/menu-row.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/automation-health-indicator.cjs +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.js +1 -1
- package/dist/components/features/home/featured-automations/automation-health-indicator.js.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.d.ts +4 -3
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js +22 -25
- package/dist/components/features/home/featured-automations/automation-run-activity-metrics.js.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.d.ts +1 -1
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js +15 -15
- package/dist/components/features/home/featured-automations/automation-run-activity-sparkline.js.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-health.cjs +1 -1
- package/dist/components/features/home/featured-automations/automation-run-health.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/automation-run-health.d.ts +5 -3
- package/dist/components/features/home/featured-automations/automation-run-health.js +30 -23
- package/dist/components/features/home/featured-automations/automation-run-health.js.map +1 -1
- package/dist/components/features/home/featured-automations/home-automation-activity.d.ts +3 -2
- 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.d.ts +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +59 -37
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -1
- package/dist/components/features/manifest/manifest-form-field.d.ts +3 -1
- package/dist/components/features/manifest/manifest-review-step.d.ts +3 -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/cloud-settings-link.cjs +1 -1
- package/dist/components/features/settings/cloud-settings-link.cjs.map +1 -1
- package/dist/components/features/settings/cloud-settings-link.js +5 -3
- package/dist/components/features/settings/cloud-settings-link.js.map +1 -1
- package/dist/components/features/settings/integrations-settings-link.cjs +1 -1
- package/dist/components/features/settings/integrations-settings-link.cjs.map +1 -1
- package/dist/components/features/settings/integrations-settings-link.d.ts +3 -1
- package/dist/components/features/settings/integrations-settings-link.js +20 -17
- package/dist/components/features/settings/integrations-settings-link.js.map +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +2 -1
- package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +2 -2
- 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.cjs.map +1 -1
- package/dist/components/features/settings/sdk-settings/sdk-section-page.d.ts +8 -7
- package/dist/components/features/settings/sdk-settings/sdk-section-page.js +172 -142
- package/dist/components/features/settings/sdk-settings/sdk-section-page.js.map +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.cjs +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.cjs.map +1 -1
- package/dist/components/features/settings/secrets-settings/secret-form.js +38 -25
- package/dist/components/features/settings/secrets-settings/secret-form.js.map +1 -1
- package/dist/components/features/settings/settings-dropdown-input.cjs +1 -1
- package/dist/components/features/settings/settings-dropdown-input.js +6 -6
- 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.d.ts +3 -1
- package/dist/components/features/sidebar/sidebar-rail-body.js +98 -58
- 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 +44 -43
- package/dist/components/features/sidebar/sidebar.js.map +1 -1
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.cjs +1 -1
- package/dist/components/features/sidebar/use-sidebar-onboarding-checklist.js +3 -3
- 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/buttons/styled-tooltip.cjs +1 -1
- package/dist/components/shared/buttons/styled-tooltip.cjs.map +1 -1
- package/dist/components/shared/buttons/styled-tooltip.d.ts +2 -1
- package/dist/components/shared/buttons/styled-tooltip.js +2 -1
- package/dist/components/shared/buttons/styled-tooltip.js.map +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.cjs +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.cjs.map +1 -1
- package/dist/components/shared/filters/enum-filter-dropdown.d.ts +5 -1
- package/dist/components/shared/filters/enum-filter-dropdown.js +14 -14
- package/dist/components/shared/filters/enum-filter-dropdown.js.map +1 -1
- package/dist/components/shared/modals/confirmation-modal.cjs +1 -1
- package/dist/components/shared/modals/confirmation-modal.cjs.map +1 -1
- package/dist/components/shared/modals/confirmation-modal.d.ts +2 -1
- package/dist/components/shared/modals/confirmation-modal.js +8 -8
- package/dist/components/shared/modals/confirmation-modal.js.map +1 -1
- package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
- package/dist/components/shared/modals/settings/model-selector.js +27 -27
- 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/constants/settings-nav.d.ts +8 -0
- package/dist/contexts/conversation-websocket-context.cjs +3 -3
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.d.ts +5 -0
- package/dist/contexts/conversation-websocket-context.js +194 -198
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/contexts/websocket-provider-wrapper.cjs +1 -1
- package/dist/contexts/websocket-provider-wrapper.cjs.map +1 -1
- package/dist/contexts/websocket-provider-wrapper.js +31 -15
- package/dist/contexts/websocket-provider-wrapper.js.map +1 -1
- package/dist/extensions/canvas-extension-module-loader.d.ts +11 -0
- package/dist/hooks/chat/record-model-switch-message.cjs +1 -1
- package/dist/hooks/chat/record-model-switch-message.cjs.map +1 -1
- package/dist/hooks/chat/record-model-switch-message.d.ts +31 -0
- package/dist/hooks/chat/record-model-switch-message.js +25 -12
- package/dist/hooks/chat/record-model-switch-message.js.map +1 -1
- package/dist/hooks/chat/use-plan-mode-interceptor.cjs +2 -0
- package/dist/hooks/chat/use-plan-mode-interceptor.cjs.map +1 -0
- package/dist/hooks/chat/use-plan-mode-interceptor.d.ts +16 -0
- package/dist/hooks/chat/use-plan-mode-interceptor.js +43 -0
- package/dist/hooks/chat/use-plan-mode-interceptor.js.map +1 -0
- package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.js +5 -1
- package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
- package/dist/hooks/mutation/use-manage-canvas-extensions.d.ts +12 -0
- package/dist/hooks/mutation/use-read-conversation-file.cjs +1 -1
- package/dist/hooks/mutation/use-read-conversation-file.cjs.map +1 -1
- package/dist/hooks/mutation/use-read-conversation-file.js +11 -4
- package/dist/hooks/mutation/use-read-conversation-file.js.map +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs +1 -1
- package/dist/hooks/mutation/use-save-settings.js +3 -3
- package/dist/hooks/mutation/use-switch-llm-profile.cjs +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile.cjs.map +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile.js +13 -25
- package/dist/hooks/mutation/use-switch-llm-profile.js.map +1 -1
- package/dist/hooks/mutation/use-update-conversation-tags.cjs +2 -0
- package/dist/hooks/mutation/use-update-conversation-tags.cjs.map +1 -0
- package/dist/hooks/mutation/use-update-conversation-tags.d.ts +8 -0
- package/dist/hooks/mutation/use-update-conversation-tags.js +45 -0
- package/dist/hooks/mutation/use-update-conversation-tags.js.map +1 -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 +1 -1
- package/dist/hooks/query/query-keys.cjs.map +1 -1
- package/dist/hooks/query/query-keys.d.ts +10 -0
- package/dist/hooks/query/query-keys.js +2 -2
- 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-automation-sdk-version.cjs +1 -1
- package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -1
- package/dist/hooks/query/use-automation-sdk-version.d.ts +0 -1
- package/dist/hooks/query/use-automation-sdk-version.js +30 -55
- package/dist/hooks/query/use-automation-sdk-version.js.map +1 -1
- 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-conversation-skills.cjs +1 -1
- package/dist/hooks/query/use-conversation-skills.cjs.map +1 -1
- package/dist/hooks/query/use-conversation-skills.d.ts +14 -5
- package/dist/hooks/query/use-conversation-skills.js +20 -4
- package/dist/hooks/query/use-conversation-skills.js.map +1 -1
- 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-provider-connections.cjs +1 -1
- package/dist/hooks/query/use-provider-connections.cjs.map +1 -1
- package/dist/hooks/query/use-provider-connections.d.ts +6 -3
- package/dist/hooks/query/use-provider-connections.js +7 -3
- package/dist/hooks/query/use-provider-connections.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-sub-conversations.cjs +1 -1
- package/dist/hooks/query/use-sub-conversations.cjs.map +1 -1
- package/dist/hooks/query/use-sub-conversations.js +16 -16
- package/dist/hooks/query/use-sub-conversations.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-acp-model-context.cjs +1 -1
- package/dist/hooks/use-acp-model-context.js +3 -3
- package/dist/hooks/use-agent-state.cjs +1 -1
- package/dist/hooks/use-agent-state.cjs.map +1 -1
- package/dist/hooks/use-agent-state.d.ts +17 -1
- package/dist/hooks/use-agent-state.js +19 -9
- package/dist/hooks/use-agent-state.js.map +1 -1
- package/dist/hooks/use-automation-permissions.cjs +2 -0
- package/dist/hooks/use-automation-permissions.cjs.map +1 -0
- package/dist/hooks/use-automation-permissions.d.ts +43 -0
- package/dist/hooks/use-automation-permissions.js +52 -0
- package/dist/hooks/use-automation-permissions.js.map +1 -0
- package/dist/hooks/use-chat-input-model-state.cjs +1 -1
- package/dist/hooks/use-chat-input-model-state.js +3 -3
- 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-handle-plan-click.cjs +1 -1
- package/dist/hooks/use-handle-plan-click.cjs.map +1 -1
- package/dist/hooks/use-handle-plan-click.d.ts +3 -1
- package/dist/hooks/use-handle-plan-click.js +85 -26
- package/dist/hooks/use-handle-plan-click.js.map +1 -1
- package/dist/hooks/use-home-automation-actions.cjs +1 -1
- package/dist/hooks/use-home-automation-actions.cjs.map +1 -1
- package/dist/hooks/use-home-automation-actions.js +1 -0
- package/dist/hooks/use-home-automation-actions.js.map +1 -1
- package/dist/hooks/use-llm-configured.cjs +1 -1
- package/dist/hooks/use-llm-configured.js +3 -3
- package/dist/hooks/use-manifest-preflight.d.ts +1 -1
- 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/hooks/use-unified-websocket-status.cjs +1 -1
- package/dist/hooks/use-unified-websocket-status.cjs.map +1 -1
- package/dist/hooks/use-unified-websocket-status.d.ts +7 -0
- package/dist/hooks/use-unified-websocket-status.js +5 -1
- package/dist/hooks/use-unified-websocket-status.js.map +1 -1
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +83 -14
- 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 +1575 -402
- 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 +94 -25
- package/dist/locales/ca/openhands.json +94 -25
- package/dist/locales/de/openhands.json +94 -25
- package/dist/locales/en/openhands.json +94 -25
- package/dist/locales/es/openhands.json +94 -25
- package/dist/locales/fr/openhands.json +94 -25
- package/dist/locales/it/openhands.json +94 -25
- package/dist/locales/ja/openhands.json +94 -25
- package/dist/locales/ko-KR/openhands.json +94 -25
- package/dist/locales/no/openhands.json +94 -25
- package/dist/locales/pt/openhands.json +94 -25
- package/dist/locales/tr/openhands.json +94 -25
- package/dist/locales/uk/openhands.json +94 -25
- package/dist/locales/zh-CN/openhands.json +94 -25
- package/dist/locales/zh-TW/openhands.json +94 -25
- package/dist/manifests/automation-insights.cjs.map +1 -1
- package/dist/manifests/automation-insights.d.ts +10 -2
- package/dist/manifests/automation-insights.js.map +1 -1
- 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/manifests/automation-setup.cjs +1 -1
- package/dist/manifests/automation-setup.cjs.map +1 -1
- package/dist/manifests/automation-setup.d.ts +9 -16
- package/dist/manifests/automation-setup.js +17 -7
- package/dist/manifests/automation-setup.js.map +1 -1
- package/dist/manifests/manifest-actions.d.ts +1 -1
- package/dist/manifests/manifest-capabilities.d.ts +3 -1
- package/dist/manifests/manifest-local-validation.cjs +2 -0
- package/dist/manifests/manifest-local-validation.cjs.map +1 -0
- package/dist/manifests/manifest-local-validation.d.ts +15 -11
- package/dist/manifests/manifest-local-validation.js +8 -0
- package/dist/manifests/manifest-local-validation.js.map +1 -0
- package/dist/manifests/manifest-template.cjs +2 -0
- package/dist/manifests/manifest-template.cjs.map +1 -0
- package/dist/manifests/manifest-template.d.ts +4 -4
- package/dist/manifests/manifest-template.js +12 -0
- package/dist/manifests/manifest-template.js.map +1 -0
- package/dist/manifests/manifest-validation.cjs +1 -1
- package/dist/manifests/manifest-validation.cjs.map +1 -1
- package/dist/manifests/manifest-validation.js +106 -28
- package/dist/manifests/manifest-validation.js.map +1 -1
- package/dist/manifests/types.cjs.map +1 -1
- package/dist/manifests/types.d.ts +39 -4
- package/dist/manifests/types.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/custom-automation/manifest.cjs +8 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.js +221 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/custom-automation/manifest.js.map +1 -0
- 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 +2 -2
- 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 +6 -1
- 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 +2 -2
- 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 +6 -1
- 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 +28 -14
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.js +2 -1
- package/dist/node_modules/@openhands/extensions/automations/interface.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 +59 -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/@tanstack/react-query/build/modern/QueryClientProvider.cjs +1 -1
- package/dist/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js +1 -1
- 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/circle-question-mark.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-question-mark.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/node_modules/lucide-react/dist/esm/icons/shrink.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shrink.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shrink.js +23 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/shrink.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js +43 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/sliders-horizontal.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tags.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tags.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tags.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/tags.js.map +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +5 -5
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +12 -0
- package/dist/routes/app-settings.cjs +1 -1
- package/dist/routes/app-settings.cjs.map +1 -1
- package/dist/routes/app-settings.js +11 -11
- 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.d.ts +3 -1
- package/dist/routes/llm-settings.js +100 -91
- package/dist/routes/llm-settings.js.map +1 -1
- package/dist/routes/planner-tab.cjs +1 -1
- package/dist/routes/planner-tab.cjs.map +1 -1
- package/dist/routes/planner-tab.js +44 -28
- package/dist/routes/planner-tab.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/services/telemetry.cjs +1 -1
- package/dist/services/telemetry.cjs.map +1 -1
- package/dist/services/telemetry.d.ts +5 -0
- package/dist/services/telemetry.js +122 -115
- package/dist/services/telemetry.js.map +1 -1
- package/dist/stores/conversation-panel-preferences-store.cjs +1 -1
- package/dist/stores/conversation-panel-preferences-store.cjs.map +1 -1
- package/dist/stores/conversation-panel-preferences-store.d.ts +32 -5
- package/dist/stores/conversation-panel-preferences-store.js +29 -12
- package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
- package/dist/stores/conversation-state-store.cjs +1 -1
- package/dist/stores/conversation-state-store.cjs.map +1 -1
- package/dist/stores/conversation-state-store.d.ts +9 -3
- package/dist/stores/conversation-state-store.js +6 -3
- package/dist/stores/conversation-state-store.js.map +1 -1
- package/dist/stores/conversation-store.cjs +1 -1
- package/dist/stores/conversation-store.cjs.map +1 -1
- package/dist/stores/conversation-store.d.ts +2 -0
- package/dist/stores/conversation-store.js +3 -0
- package/dist/stores/conversation-store.js.map +1 -1
- package/dist/stores/model-store.cjs +1 -1
- package/dist/stores/model-store.cjs.map +1 -1
- package/dist/stores/model-store.d.ts +7 -0
- package/dist/stores/model-store.js +4 -0
- package/dist/stores/model-store.js.map +1 -1
- package/dist/types/automation.cjs.map +1 -1
- package/dist/types/automation.d.ts +66 -1
- 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/context-menu.d.ts +1 -1
- 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/ui/toggle-switch.cjs +1 -1
- package/dist/ui/toggle-switch.cjs.map +1 -1
- package/dist/ui/toggle-switch.d.ts +4 -1
- package/dist/ui/toggle-switch.js +4 -3
- package/dist/ui/toggle-switch.js.map +1 -1
- package/dist/utils/acp-auth-display.d.ts +35 -0
- package/dist/utils/automation-catalog.cjs +1 -1
- package/dist/utils/automation-catalog.cjs.map +1 -1
- package/dist/utils/automation-catalog.d.ts +12 -1
- package/dist/utils/automation-catalog.js +42 -12
- package/dist/utils/automation-catalog.js.map +1 -1
- package/dist/utils/automation-run-display.cjs +2 -0
- package/dist/utils/automation-run-display.cjs.map +1 -0
- package/dist/utils/automation-run-display.d.ts +20 -0
- package/dist/utils/automation-run-display.js +85 -0
- package/dist/utils/automation-run-display.js.map +1 -0
- package/dist/utils/automation-schedule.cjs +1 -1
- package/dist/utils/automation-schedule.cjs.map +1 -1
- package/dist/utils/automation-schedule.d.ts +16 -0
- package/dist/utils/automation-schedule.js +2 -0
- package/dist/utils/automation-schedule.js.map +1 -1
- package/dist/utils/cache-utils.cjs +1 -1
- package/dist/utils/cache-utils.js +5 -5
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.cjs.map +1 -1
- package/dist/utils/constants.d.ts +4 -0
- package/dist/utils/constants.js +23 -3
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/format-event-timestamp.cjs +2 -0
- package/dist/utils/format-event-timestamp.cjs.map +1 -0
- package/dist/utils/format-event-timestamp.d.ts +1 -0
- package/dist/utils/format-event-timestamp.js +13 -0
- package/dist/utils/format-event-timestamp.js.map +1 -0
- package/dist/utils/format-model-name.cjs +1 -1
- package/dist/utils/format-model-name.cjs.map +1 -1
- package/dist/utils/format-model-name.d.ts +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/git-diff-stats.cjs +2 -2
- package/dist/utils/git-diff-stats.cjs.map +1 -1
- package/dist/utils/git-diff-stats.d.ts +4 -0
- package/dist/utils/git-diff-stats.js +12 -2
- package/dist/utils/git-diff-stats.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/plan-file.cjs +4 -0
- package/dist/utils/plan-file.cjs.map +1 -0
- package/dist/utils/plan-file.d.ts +18 -0
- package/dist/utils/plan-file.js +58 -0
- package/dist/utils/plan-file.js.map +1 -0
- package/dist/utils/recommended-automation-rail.cjs +1 -1
- package/dist/utils/recommended-automation-rail.cjs.map +1 -1
- package/dist/utils/recommended-automation-rail.js +1 -0
- package/dist/utils/recommended-automation-rail.js.map +1 -1
- package/dist/utils/scroll-fade-state.cjs +1 -1
- package/dist/utils/scroll-fade-state.cjs.map +1 -1
- package/dist/utils/scroll-fade-state.d.ts +6 -0
- package/dist/utils/scroll-fade-state.js +8 -1
- package/dist/utils/scroll-fade-state.js.map +1 -1
- package/dist/utils/sdk-settings-schema.cjs +1 -1
- package/dist/utils/sdk-settings-schema.cjs.map +1 -1
- package/dist/utils/sdk-settings-schema.d.ts +1 -0
- package/dist/utils/sdk-settings-schema.js +25 -22
- package/dist/utils/sdk-settings-schema.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/utils.cjs +1 -1
- package/dist/utils/utils.cjs.map +1 -1
- package/dist/utils/utils.js +11 -11
- package/dist/utils/utils.js.map +1 -1
- 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 +5 -5
- 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 +83 -2
- package/scripts/ingress.mjs +27 -1
- package/scripts/static-server.mjs +107 -2
- package/tools/canvas_ui_tool.py +19 -0
- package/build/assets/active-backend-context-DKFSMbn3.js +0 -2
- package/build/assets/agent-profiles-settings-D4cY5U2T.js +0 -1
- 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-git-sync-CzyS4cn1.js +0 -1
- 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/bot-C-0Wu7vQ.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/commits-tab-DZtJgaDM.js +0 -1
- package/build/assets/confirmation-modal-Bk4JRcCM.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/edit-automation-modal-D-urtv8n.js +0 -1
- package/build/assets/empty-state-CvaVahVr.js +0 -1
- package/build/assets/enum-filter-dropdown-DliX_Lo0.js +0 -1
- package/build/assets/extensions-hub-CFduxBnk.js +0 -1
- package/build/assets/extensions-navigation-BeC224yX.js +0 -1
- package/build/assets/external-link-DFpYunfj.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/mcp-page-Bm4K2NQq.js +0 -9
- 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/organization-service.api-C8XpQ0pM.js +0 -1
- package/build/assets/pencil-Clh1Wjvh.js +0 -1
- package/build/assets/planner-tab-DQvDU3ap.js +0 -1
- package/build/assets/plug-BuQhHSSG.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/refresh-cw-Bh69DyYO.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/scroll-fade-state-Dw-i4SGq.js +0 -1
- package/build/assets/sdk-section-page-HTffvm7Q.js +0 -1
- package/build/assets/secret-form-HTUbYw5o.js +0 -1
- package/build/assets/secrets-service-BTor9uAU.js +0 -1
- package/build/assets/settings-BlmrkwRi.js +0 -1
- package/build/assets/settings-DcNPxz0v.js +0 -1
- package/build/assets/settings-index-CKq0b0Vg.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/shield-check-CFDViW82.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-BOtyJHwE.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/styled-tooltip-Dl06rkpY.js +0 -1
- package/build/assets/toggle-switch-Fd_QGz0r.js +0 -1
- package/build/assets/trash-2-Dl8_RGz0.js +0 -1
- package/build/assets/trash-_RMt7Ayc.js +0 -1
- package/build/assets/triangle-alert-SM-q4NU_.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-activate-agent-profile-B2NS8nA5.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-conversation-DwN5vv2f.js +0 -1
- package/build/assets/use-create-secret-BSxJMxHp.js +0 -1
- package/build/assets/use-has-permission-B3C8rQmR.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-settings-C5VhGpqd.js +0 -1
- package/build/assets/use-settings-nav-items-DHaUu1Dg.js +0 -16
- package/build/assets/use-tracking-D5t9otIF.js +0 -3
- package/build/assets/utils-DaCIEEQP.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-ZixYGy6E.js +0 -186
- package/build/assets/vendor~index-home~home~conversation-panel~conversation~alert-banner-B3qC_oj8.js +0 -1
- package/build/assets/vendor~root-layout-BlUaZ18v.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/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz-MAyNb.js +0 -1
- package/build/assets/x-DkgltWa0.js +0 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs +0 -2
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.cjs.map +0 -1
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.d.ts +0 -35
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js +0 -247
- package/dist/components/features/conversation-panel/conversation-panel-filter-menu.js.map +0 -1
- package/dist/components/features/tips/random-tip.d.ts +0 -2
- package/dist/hooks/query/use-skills.cjs +0 -2
- package/dist/hooks/query/use-skills.cjs.map +0 -1
- package/dist/hooks/query/use-skills.d.ts +0 -7
- package/dist/hooks/query/use-skills.js +0 -13
- package/dist/hooks/query/use-skills.js.map +0 -1
- package/dist/hooks/use-has-permission.cjs +0 -2
- package/dist/hooks/use-has-permission.cjs.map +0 -1
- package/dist/hooks/use-has-permission.d.ts +0 -1
- package/dist/hooks/use-has-permission.js +0 -8
- package/dist/hooks/use-has-permission.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.cjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.cjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.js +0 -14
- package/dist/node_modules/lucide-react/dist/esm/icons/eye.js.map +0 -1
- 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~ox0jfsa0-cHFhpUBq.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-DnDoaYNi.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{t as a}from"./useMutation-CJuK90oc.js";import{V as o,ct as s,dt as c,n as l,st as u}from"./active-backend-context-rZiLJRUc.js";import{K as d,t as f}from"./utils-BOco8mxR.js";import{c as p,d as m,n as h}from"./agent-server-client-options-BikiNwTa.js";import{t as ee}from"./bot-CLMxGFaq.js";import{m as g}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-Z0lly3FE.js";import{c as _,i as v,l as y,m as b,p as te,r as x,t as S,u as C}from"./settings-service.api-9_xdv_mh.js";import{n as w}from"./use-settings-Dn00UISA.js";import{t as ne}from"./modal-backdrop-BSzNhM4r.js";import{n as re}from"./modal-classes-Dg0ngBPO.js";import{t as ie}from"./brand-button-DxPO4Lf8.js";import{t as T}from"./styled-tooltip-Pd22BIvr.js";import{t as ae}from"./modal-close-button-B9j4nasm.js";import{t as E}from"./settings-input-C0dd8Utu.js";import{t as D}from"./secrets-service-Cr8g8xuv.js";import{c as oe,i as se,s as O,t as k}from"./mcp-marketplace-utils-Cn_NIMWM.js";import{t as A}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-CxhwKuAd.js";var j=e(t()),M=n(),N=e=>(0,M.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,M.jsx)(`path`,{d:`M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z`,fill:`currentColor`})});function P({fieldKey:e,checked:t,onToggle:n}){let{t:r}=i(`openhands`);return(0,M.jsxs)(`label`,{"data-testid":`mcp-install-save-secret-${e}`,className:f(`flex items-center gap-2 px-3 py-2 mt-0.5 rounded-lg border cursor-pointer transition-colors`,t?`border-green-500/35 bg-green-500/10`:`border-[var(--oh-border)] bg-transparent hover:bg-white/[0.03]`),children:[(0,M.jsx)(`input`,{className:`sr-only`,id:`mcp-save-secret-checkbox-${e}`,type:`checkbox`,checked:t,onChange:e=>n(e.target.checked)}),(0,M.jsx)(`span`,{"aria-hidden":`true`,className:f(`relative inline-flex h-[22px] w-[40px] shrink-0 items-center rounded-full border transition-colors duration-200`,t?`border-green-500 bg-green-500`:`border-[var(--oh-border)] bg-surface-raised`),children:(0,M.jsx)(`span`,{className:f(`inline-block size-4 rounded-full transition-transform duration-200`,t?`translate-x-[21px] bg-white`:`translate-x-[2px] bg-[var(--oh-muted)]`)})}),(0,M.jsx)(`span`,{className:`text-sm`,children:r(d.MCP$ALSO_SAVE_AS_SECRET)}),(0,M.jsx)(`code`,{className:f(`ml-auto text-[11px] font-mono tracking-tight border rounded px-1.5 py-0.5`,t?`text-green-500 border-green-500/35 bg-white/[0.04]`:`text-tertiary-alt border-[var(--oh-border)]`),children:e}),(0,M.jsx)(T,{content:r(d.MCP$SAVE_AS_SECRET_TOOLTIP),placement:`top`,children:(0,M.jsx)(`button`,{type:`button`,"aria-label":r(d.MCP$SAVE_AS_SECRET_TOOLTIP),className:`flex items-center justify-center size-[15px] shrink-0 rounded-full border border-[var(--oh-muted)] text-tertiary-alt text-[9px] font-bold cursor-help`,onClick:e=>e.preventDefault(),children:`?`})})]})}var F={xs:`h-4 w-4 rounded [&>svg]:h-2.5 [&>svg]:w-2.5`,sm:`h-5 w-5 rounded-md [&>svg]:h-3 [&>svg]:w-3`,base:`h-7 w-7 rounded-lg [&>svg]:h-3.5 [&>svg]:w-3.5`,md:`h-10 w-10 rounded-lg [&>svg]:h-5 [&>svg]:w-5`},I={slack:N};function ce({entry:e,size:t=`md`,className:n,fallback:r,testId:i}){let a=e?I[e.id]:void 0;return(0,M.jsx)(`span`,{"aria-hidden":`true`,title:e?.name,"data-testid":i,className:f(`inline-flex shrink-0 items-center justify-center overflow-hidden`,`border border-white/10 shadow-[inset_0_1px_0_rgba(255,255,255,0.18)]`,F[t],n),style:{backgroundColor:e?.iconBg??`var(--oh-color-tertiary)`,color:e?.iconColor??`#FFFFFF`},children:a?(0,M.jsx)(a,{}):e?.logoUrl?(0,M.jsx)(`img`,{src:e.logoUrl,alt:`${e.name} logo`,className:`h-full w-full object-contain p-[22%]`,onError:e=>{let t=e.currentTarget;t.style.display=`none`}}):r??(0,M.jsx)(ee,{className:`h-5 w-5`,strokeWidth:2.25})})}var le=new Set([`invalid_auth`,`not_authed`,`account_inactive`,`token_revoked`,`token_expired`]),L=e=>e.is_error?e.text||`tool call failed`:null,ue={github:{toolCall:{name:`get_me`,arguments:{}},interpret:L},linear:{toolCall:{name:`list_teams`,arguments:{}},interpret:L},slack:{toolCall:{name:`slack_list_channels`,arguments:{limit:1}},interpret:e=>{if(e.is_error)return e.text||`tool call failed`;try{let t=JSON.parse(e.text);if(t?.ok===!1&&le.has(t.error))return String(t.error)}catch{}return null}}};function R(e){let t=k(e,O(A));return t?ue[t.id]:void 0}var de=4,fe=/token|key|secret|auth/i,pe=[/\bgh[pousr]_[A-Za-z0-9]{16,}\b/g,/\bgithub_pat_[A-Za-z0-9_]{20,}\b/g,/\bxox[a-z](?:-[A-Za-z0-9]+)+/g,/\blin_api_[A-Za-z0-9]{10,}\b/g,/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{5,}\.[A-Za-z0-9_-]{5,}\b/g],me=/\bBearer\s+[A-Za-z0-9._~+/=-]{8,}/gi;function z(e,t){typeof t==`string`&&(t.length<de||t!==`**********`&&e.add(t))}function B(e,t){for(let n of Object.values(t??{}))z(e,n)}function he(e,t){if(t)try{let n=new URL(t);z(e,n.username),z(e,n.password),z(e,decodeURIComponent(n.username)),z(e,decodeURIComponent(n.password)),n.searchParams.forEach((t,n)=>{fe.test(n)&&z(e,t)})}catch{}}function ge(e,t){if(t)switch(t.strategy){case`api_key`:case`bearer`:z(e,t.value);break;case`basic`:z(e,t.username),z(e,t.password);break;case`header`:B(e,t.headers);break;case`oauth2`:z(e,t.authentication?.client_secret),B(e,t.state?.tokens);break;default:break}}function _e(e){let t=new Set;return B(t,e.env),B(t,e.headers),ge(t,e.auth),he(t,e.url),[...t].sort((e,t)=>t.length-e.length)}function V(e,...t){if(!e)return e;let n=e;for(let e of t)if(e)for(let t of _e(e))n=n.split(t).join(x);n=n.replace(me,`Bearer ${x}`);for(let e of pe)n=n.replace(e,x);return n}var H=e=>!!e&&typeof e==`object`&&!Array.isArray(e),ve=e=>{if(!H(e))return;let t=Object.entries(e).filter(e=>typeof e[1]==`string`);return t.length>0?Object.fromEntries(t):void 0},ye=e=>!!e&&Object.values(e).some(e=>e===`**********`);function be(e,t){if(!H(e))return e;let n=H(t)?t:{},r={...e};for(let[t,i]of Object.entries(e))if(i===`**********`){let e=n[t];typeof e==`string`&&e!==`**********`&&(r[t]=e)}else H(i)&&(r[t]=be(i,n[t]));return r}var xe=(e,t)=>t[e.id];async function Se(e){let t=(await S.fetchSettingsFromApi(`encrypted`)).agent_settings?.mcp_config;if(H(t))return xe(e,t)}async function Ce(e){let t=e.type===`stdio`&&ye(e.env),n=(e.type===`sse`||e.type===`shttp`)&&_(e.auth),r=(e.type===`sse`||e.type===`shttp`)&&ye(e.headers);if(!t&&!n&&!r)return e;try{let i=await Se(e);if(!i)return e;if(t){let t=ve(i.env)??{},n=Object.fromEntries(Object.entries(e.env??{}).map(([e,n])=>[e,n===`**********`&&typeof t[e]==`string`?t[e]:n]));return{...e,env:n}}let a={...e};if(n&&b(i.auth)&&(a.auth=be(e.auth,i.auth)),r){let t=ve(i.headers)??{};a.headers=Object.fromEntries(Object.entries(e.headers??{}).map(([e,n])=>[e,n===`**********`&&typeof t[e]==`string`?t[e]:n]))}return a}catch{return e}}var we=120;function Te(e){return e.type===`stdio`?{type:`stdio`,command:e.command,...e.args?.length&&{args:e.args},...e.env&&Object.keys(e.env).length>0&&{env:e.env}}:{type:e.type===`sse`?`sse`:`http`,url:e.url,...e.headers&&Object.keys(e.headers).length>0&&{headers:e.headers},...e.auth?{auth:e.auth}:{}}}function Ee(e){return e.auth?.strategy===`oauth2`?we:e.timeout}async function De(e){let t=R(e),n=await Ce(e),r=Te(n),i=Ee(e);return{request:{server:r,...e.name?{name:e.name}:{},...i===void 0?{}:{timeout:i},...t?{tool_call:t.toolCall}:{}},substituted:n}}function Oe(e,t){return e.ok?e.tool_result?{...e,tool_result:{...e.tool_result,text:V(e.tool_result.text,...t)}}:e:{...e,error:V(e.error,...t)}}function ke(e,t,n){let r=Oe(e,n);if(r.ok&&t&&r.tool_result&&r.tools.includes(t.toolCall.name)){let e=t.interpret(r.tool_result);if(e)return{ok:!1,error:e,error_kind:`credentials`}}return r}function Ae(){if(p().backend.kind===`local`){let{host:e,apiKey:t}=h();return{host:e,...t?{apiKey:t}:{}}}let e=m().find(e=>e.kind===`local`&&e.host);if(e)return{host:e.host.replace(/\/+$/,``),...e.apiKey?{apiKey:e.apiKey}:{}};throw Error(`OAuth authorization requires a reachable local backend.`)}function U(){let{host:e,apiKey:t}=Ae();return new g({host:e,...t?{apiKey:t}:{},timeout:125e3})}function je(e){return e.status===`succeeded`?{ok:!0,tools:e.tools??[],...e.tool_result!==void 0&&{tool_result:e.tool_result},...e.oauth_state!==void 0&&{oauth_state:e.oauth_state}}:{ok:!1,error:e.error||`OAuth authorization did not complete`,error_kind:e.error_kind||`unknown`}}var Me=e=>new Promise(t=>{window.setTimeout(t,e)}),W=class e{static async testServer(e){if(p().backend.kind===`cloud`)return{ok:!0,tools:[]};let t=R(e),{host:n,apiKey:r}=h(),i=new g({host:n,...r?{apiKey:r}:{}});try{let{request:n,substituted:r}=await De(e);return ke(await i.testServer(n),t,[r,e])}finally{i.close()}}static async startOAuth(t){let n=U();try{return await e.startOAuthWithClient(n,t)}finally{n.close()}}static async getOAuthStatus(t){let n=U();try{return await e.getOAuthStatusWithClient(n,t)}finally{n.close()}}static async submitOAuthCallback(t,n){let r=U();try{return await e.submitOAuthCallbackWithClient(r,t,n)}finally{r.close()}}static async authorizeOAuth(t){let n=R(t),r=e=>ke(e,n,[t]),i=window.open(`about:blank`,`_blank`),a=U();try{let n=await e.startOAuthWithClient(a,t);if(!n.ok||!n.job_id||!n.authorization_url)return i?.close(),r({ok:!1,error:n.error||`Could not start OAuth authorization`,error_kind:n.error_kind||`unknown`});let o=await e.getOAuthStatusWithClient(a,n.job_id);for(let t=0;t<20;t+=1){if(o.status===`succeeded`||o.status===`failed`)return i?.close(),r(je(o));if(o.callback_ready)break;await Me(250),o=await e.getOAuthStatusWithClient(a,n.job_id)}i&&(i.location.href=n.authorization_url);for(let t=0;t<we;t+=1)if(await Me(1e3),o=await e.getOAuthStatusWithClient(a,n.job_id),o.status===`succeeded`||o.status===`failed`)return i?.close(),r(je(o));return{ok:!1,error:`OAuth authorization timed out`,error_kind:`timeout`}}finally{a.close()}}static async startOAuthWithClient(e,t){let{request:n}=await De(t);return e.startOAuth(n)}static async getOAuthStatusWithClient(e,t){return await e.getOAuthStatus(t)}static async submitOAuthCallbackWithClient(e,t,n){return await e.submitOAuthCallback(t,{callback_url:n})}},G=e=>Object.keys(e??{}).sort();function K(e){return e.type===`stdio`?JSON.stringify({type:e.type,name:e.name??``,command:e.command??``,args:e.args??[],envKeys:G(e.env)}):JSON.stringify({type:e.type,name:e.name??``,url:e.url??``,headerKeys:G(e.headers),authStrategy:e.auth?.strategy??``,authHeaderName:e.auth?.strategy===`api_key`?e.auth.header_name??``:``,authHeaderKeys:e.auth?.strategy===`header`?G(e.auth.headers):[]})}var q={},J=new Set,Ne=1;function Y(e){q=e,J.forEach(e=>e())}function Pe(){return q}function Fe(e){return J.add(e),()=>{J.delete(e)}}function Ie(e){let t=Ne;return Ne+=1,Y({...q,[e]:{status:`checking`,checkId:t}}),t}function X(e,t,n){let r=q[e];r?.status!==`checking`||r.checkId!==t||Y({...q,[e]:n})}function Le(e,t){Y({...q,[e]:t})}function Re(e){if(!(e in q))return;let{[e]:t,...n}=q;Y(n)}var ze=/\b(401|403)\b|unauthorized|forbidden|invalid[ _-]?(token|credentials?|api[ _-]?key)/i;function Be(e,t){return{status:`failed`,kind:`unknown`,error:V(t instanceof Error?t.message:String(t),e),checkedAt:Date.now()}}function Z(e,t){let n=Date.now();if(!t.ok)return{status:`failed`,kind:(t.error_kind===`connection`||t.error_kind===`unknown`)&&ze.test(t.error)?`credentials`:t.error_kind,error:t.error,checkedAt:n};let r=R(e);return{status:`healthy`,verification:r&&t.tools.includes(r.toolCall.name)&&t.tool_result&&!t.tool_result.is_error?`verified`:`connectivity-only`,toolCount:t.tools.length,checkedAt:n}}async function Ve(e){let t=K(e),n=Ie(t),r;try{r=Z(e,await W.testServer(e))}catch(t){r=Be(e,t)}X(t,n,r)}async function He(e){let t=K(e),n=Ie(t);try{let r=await W.authorizeOAuth(e);return X(t,n,Z(e,r)),r}catch(r){return X(t,n,Be(e,r)),null}}function Ue(e,t,n){let r=K(e);n.some(e=>K(e)===r)||Le(r,Z(e,t))}function We(){let e=r(),{data:t}=w();return a({mutationFn:async e=>{if(!t)throw Error(`MCP settings are still loading. Please try again.`);let n=v(t.mcp_config??y(t.agent_settings?.mcp_config),e.name,e.type);await S.createMcpServer(n,C(e))},onSuccess:()=>{e.invalidateQueries({queryKey:o.personal()})}})}function Ge(){return a({mutationFn:e=>W.testServer(e)})}function Ke(e){return e.length<=3?e.join(`, `):`${e.slice(0,3).join(`, `)} … (+${e.length-3})`}function qe(){let{t:e}=i(`openhands`),t=r();return(0,j.useCallback)((n,r,i)=>{let a=n.filter(e=>i[e.key]&&(r[e.key]??``).trim());return a.length===0?Promise.resolve():Promise.allSettled(a.map(e=>D.createSecret(e.key,r[e.key].trim(),e.label))).then(n=>{let r=a.filter((e,t)=>n[t].status===`fulfilled`).map(e=>e.key),i=a.filter((e,t)=>n[t].status===`rejected`).map(e=>e.key);r.length>0&&(t.invalidateQueries({queryKey:[`secrets-search`]}),t.invalidateQueries({queryKey:[`secrets`]}),s(e(d.MCP$SECRETS_SAVED,{keys:Ke(r)}))),i.length>0&&u(e(d.MCP$SECRETS_SAVE_FAILED,{keys:Ke(i)}))})},[e,t])}function Je(e,t,n){switch(t){case`timeout`:return e(d.MCP$TEST_ERROR_TIMEOUT);case`connection`:return e(d.MCP$TEST_ERROR_CONNECTION);case`credentials`:return e(d.MCP$TEST_ERROR_CREDENTIALS,{error:n});default:return e(d.MCP$TEST_ERROR_UNKNOWN,{error:n})}}function Q(e){let t=/\[([^\]]+)\]\(([^)]+)\)/g,n=[],r=0;for(let i of e.matchAll(t))i.index>r&&n.push(e.slice(r,i.index)),n.push((0,M.jsx)(`a`,{href:/^https?:\/\//i.test(i[2])?i[2]:`#`,target:`_blank`,rel:`noreferrer`,className:`underline hover:text-white transition-colors`,children:i[1]},i.index)),r=i.index+i[0].length;return r<e.length&&n.push(e.slice(r)),n}function Ye(e){return e?.transport.kind!==`shttp`&&e?.transport.kind!==`sse`?!1:[`api_key`,`bearer`].includes(e.auth.strategy)}function Xe(e){return!!e&&e.auth.strategy===`oauth2`}function Ze(e){return e.transport.kind===`stdio`?e.auth.apiKeyOptional??!1:e.auth.apiKeyOptional??e.transport.apiKeyOptional??!1}function $(e){return e?.transport.kind!==`shttp`&&e?.transport.kind!==`sse`?[]:e.transport.headerFields??[]}function Qe(e){let t={},n={},r=se(e),i=r?.transport;if(i?.kind===`stdio`){for(let e of i.envFields??[])t[e.key]=``,n[e.key]=e.type===`password`;for(let e of i.argFields??[])t[e.key]=``}else if(i?.kind===`shttp`||i?.kind===`sse`){t.url=i.url;for(let e of $(r))t[e.key]=``,n[e.key]=e.type===`password`;Ye(r)&&(t.api_key=``,r?.auth.credentialSecretName&&(n.api_key=r.auth.saveCredentialAsSecretByDefault??!1))}return{values:t,errors:{},savedAsSecret:n}}function $e({entry:e,existingServers:t,onClose:n,onSuccess:r}){let{t:a}=i(`openhands`),{mutate:o,isPending:u}=We(),{mutate:f,isPending:p}=Ge(),m=qe(),{backend:h}=l(),ee=h.kind===`cloud`,[g,_]=j.useState(()=>Qe(e)),v=j.useRef(g);v.current=g;let[y,b]=j.useState(null),[x,S]=j.useState(!1),[C,w]=j.useState(!1),T=se(e),D=T?.transport,O=p||C||u||x,k=(e,t)=>{_(n=>({...n,values:{...n.values,[e]:t},errors:{...n.errors,[e]:null}})),b(null)},A=(e,t)=>{_(n=>({...n,savedAsSecret:{...n.savedAsSecret,[e]:t}}))},N=()=>{let e=T?.auth.credentialSecretName,t=v.current.values.api_key?.trim();return!e||!t||!v.current.savedAsSecret.api_key?Promise.resolve():m([{key:e,label:T.auth.credentialLabel??e,type:`password`,required:!0}],{[e]:t},{[e]:!0})},F=()=>D?.kind===`stdio`?m(D.envFields??[],v.current.values,v.current.savedAsSecret):D?.kind===`shttp`||D?.kind===`sse`?Promise.all([N(),m($(T),v.current.values,v.current.savedAsSecret)]).then(()=>void 0):Promise.resolve(),I=i=>{if(i.auth?.strategy===`oauth2`){w(!0),W.authorizeOAuth(i).then(l=>{if(!l.ok){b(Je(a,l.error_kind,l.error));return}let u=l.oauth_state?{...i,auth:{...i.auth,state:l.oauth_state}}:i;o(u,{onSuccess:()=>{ee||Ue(u,l,t),s(a(d.MCP$INSTALL_SUCCESS)),S(!0),(async()=>{try{await F()}finally{r?.(e),n()}})()},onError:e=>{b(c(e)||a(d.ERROR$GENERIC))}})}).catch(e=>{b(c(e)||a(d.ERROR$GENERIC))}).finally(()=>w(!1));return}f(i,{onSuccess:l=>{if(!l.ok){b(Je(a,l.error_kind,l.error));return}let u=l.oauth_state&&i.auth?.strategy===`oauth2`?{...i,auth:{...i.auth,state:l.oauth_state}}:i;o(u,{onSuccess:()=>{ee||Ue(u,l,t),s(a(d.MCP$INSTALL_SUCCESS)),S(!0),(async()=>{try{await F()}finally{r?.(e),n()}})()},onError:e=>{b(c(e)||a(d.ERROR$GENERIC))}})},onError:e=>{b(c(e)||a(d.ERROR$GENERIC))}})},le=()=>{if(D?.kind!==`shttp`&&D?.kind!==`sse`||!T)return;let t=g.values.api_key?.trim()??``,n=D.urlEditable?g.values.url?.trim()??``:D.url,r=Xe(T),i=Ye(T),o=$(T),s={};if(!n)s.url=a(d.SETTINGS$MCP_ERROR_URL_REQUIRED);else try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(s.url=a(d.SETTINGS$MCP_ERROR_URL_INVALID_PROTOCOL))}catch{s.url=a(d.SETTINGS$MCP_ERROR_URL_INVALID)}for(let e of o)e.required&&!(g.values[e.key]??``).trim()&&(s[e.key]=a(d.MCP$ERROR_FIELD_REQUIRED));if(!r&&i&&!Ze(T)&&!t&&(s.api_key=a(d.MCP$ERROR_FIELD_REQUIRED)),Object.values(s).some(Boolean)){_(e=>({...e,errors:s}));return}let c=r?oe(T):void 0,l=Object.fromEntries(o.map(e=>[e.key,g.values[e.key]?.trim()??``]).filter(([,e])=>e)),u=Object.keys(l).length>0,f;r?f={strategy:`oauth2`,...c&&{authentication:c}}:i&&t?f=T.auth.strategy===`api_key`?{strategy:`api_key`,value:t,...T.auth.apiKeyHeaderName&&{header_name:T.auth.apiKeyHeaderName}}:{strategy:`bearer`,value:t}:u&&(f={strategy:`header`,headers:l}),I({id:``,type:D.kind,name:te(e.id),url:n,...f&&{auth:f},...u&&f?.strategy!==`header`&&{headers:l}})},L=()=>{if(D?.kind!==`stdio`)return;let e=D,t={};for(let n of e.envFields??[])n.required&&!(g.values[n.key]??``).trim()&&(t[n.key]=a(d.MCP$ERROR_FIELD_REQUIRED));for(let n of e.argFields??[])n.required&&!(g.values[n.key]??``).trim()&&(t[n.key]=a(d.MCP$ERROR_FIELD_REQUIRED));if(Object.values(t).some(Boolean)){_(e=>({...e,errors:t}));return}let n={};for(let t of e.envFields??[]){let e=g.values[t.key]?.trim();e&&(n[t.key]=e)}let r=[];for(let t of e.argFields??[]){let e=g.values[t.key]?.trim();if(e)for(let t of e.split(/\s+/))t&&r.push(t)}I({id:``,type:`stdio`,name:e.serverName,command:e.command,args:[...e.args,...r],...Object.keys(n).length>0&&{env:n}})};return(0,M.jsx)(ne,{onClose:n,"aria-label":e.name,children:(0,M.jsxs)(`form`,{"data-testid":`mcp-install-modal`,"data-marketplace-id":e.id,onSubmit:e=>(e.preventDefault(),b(null),D?.kind===`shttp`||D?.kind===`sse`?le():L()),className:`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[85vh] overflow-y-auto custom-scrollbar`,children:[(0,M.jsx)(ae,{onClose:n,testId:`mcp-install-modal-close`,disabled:O}),(0,M.jsxs)(`div`,{className:`flex items-start gap-3 pr-6`,children:[(0,M.jsx)(ce,{entry:e}),(0,M.jsxs)(`div`,{className:`flex flex-col flex-1`,children:[(0,M.jsx)(`h2`,{className:re,children:e.name}),(0,M.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:e.description})]})]}),e.installHint&&(0,M.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:e.installHint}),e.docsUrl&&(0,M.jsx)(`a`,{href:e.docsUrl,target:`_blank`,rel:`noreferrer`,className:`text-xs text-[var(--oh-muted)] hover:text-white hover:underline self-start transition-colors`,children:a(d.MCP$VIEW_DOCS)}),(0,M.jsx)(`div`,{className:`flex flex-col gap-3`,children:(()=>{if(D?.kind===`shttp`||D?.kind===`sse`){let e=Xe(T),t=Ye(T),n=T?Ze(T):!1,r=T?.auth.credentialSecretName,i=$(T);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(E,{testId:`mcp-install-field-url`,name:`url`,type:`url`,label:a(d.SETTINGS$MCP_URL),value:g.values.url??D.url,onChange:e=>k(`url`,e),isDisabled:!D.urlEditable,className:`w-full`}),g.errors.url&&(0,M.jsx)(`p`,{className:`text-xs text-red-500`,children:g.errors.url}),i.map(e=>(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(E,{testId:`mcp-install-field-${e.key}`,name:e.key,type:e.type===`password`?`password`:`text`,label:e.label,value:g.values[e.key]??``,onChange:t=>k(e.key,t),placeholder:e.placeholder,required:e.required,showOptionalTag:!e.required,className:`w-full`}),e.helperText&&(0,M.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Q(e.helperText)}),g.errors[e.key]&&(0,M.jsx)(`p`,{className:`text-xs text-red-500`,children:g.errors[e.key]}),e.key in g.savedAsSecret&&(0,M.jsx)(P,{fieldKey:e.key,checked:g.savedAsSecret[e.key]??!1,onToggle:t=>A(e.key,t)})]},e.key)),e?(0,M.jsxs)(`div`,{"data-testid":`mcp-install-oauth-info`,className:`flex flex-col gap-2 p-3 rounded-lg border border-[var(--oh-border)] bg-base-tertiary`,children:[(0,M.jsx)(`p`,{className:`text-sm text-secondary-light`,children:a(d.MCP$OAUTH_CONNECT_INFO)}),(0,M.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:a(d.MCP$OAUTH_CONNECT_HINT)})]}):t?(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(E,{testId:`mcp-install-field-api_key`,name:`api_key`,type:`password`,label:T?.auth.credentialLabel??a(d.SETTINGS$MCP_API_KEY),value:g.values.api_key??``,onChange:e=>k(`api_key`,e),placeholder:T?.auth.credentialPlaceholder??a(d.SETTINGS$MCP_API_KEY_PLACEHOLDER),showOptionalTag:n,required:!n,className:`w-full`}),T?.auth.credentialHelp&&(0,M.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Q(T.auth.credentialHelp)}),g.errors.api_key&&(0,M.jsx)(`p`,{className:`text-xs text-red-500`,children:g.errors.api_key}),r&&(0,M.jsx)(P,{fieldKey:r,checked:g.savedAsSecret.api_key??!1,onToggle:e=>A(`api_key`,e)})]}):null]})}if(D?.kind!==`stdio`)return null;let e=D;return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(E,{testId:`mcp-install-field-command-readonly`,name:`command-readonly`,type:`text`,label:a(d.MCP$COMMAND_LABEL),value:`${e.command} ${e.args.join(` `)}`.trim(),onChange:()=>{},isDisabled:!0,className:`w-full`}),(e.envFields??[]).map(e=>(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(E,{testId:`mcp-install-field-${e.key}`,name:e.key,type:e.type===`password`?`password`:`text`,label:e.label,value:g.values[e.key]??``,onChange:t=>k(e.key,t),placeholder:e.placeholder,required:e.required,showOptionalTag:!e.required,className:`w-full`}),e.helperText&&(0,M.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Q(e.helperText)}),g.errors[e.key]&&(0,M.jsx)(`p`,{className:`text-xs text-red-500`,children:g.errors[e.key]}),e.key in g.savedAsSecret&&(0,M.jsx)(P,{fieldKey:e.key,checked:g.savedAsSecret[e.key],onToggle:t=>A(e.key,t)})]},e.key)),(e.argFields??[]).map(e=>(0,M.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,M.jsx)(E,{testId:`mcp-install-field-${e.key}`,name:e.key,type:e.type===`password`?`password`:`text`,label:e.label,value:g.values[e.key]??``,onChange:t=>k(e.key,t),placeholder:e.placeholder,required:e.required,showOptionalTag:!e.required,className:`w-full`}),e.helperText&&(0,M.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Q(e.helperText)}),g.errors[e.key]&&(0,M.jsx)(`p`,{className:`text-xs text-red-500`,children:g.errors[e.key]})]},e.key))]})})()}),y&&(0,M.jsx)(`p`,{"data-testid":`mcp-install-modal-error`,className:`text-sm text-red-500 whitespace-pre-wrap`,children:y}),(0,M.jsxs)(`div`,{className:`flex justify-end gap-2 mt-2`,children:[(0,M.jsx)(ie,{type:`button`,variant:`secondary`,onClick:n,testId:`mcp-install-cancel`,isDisabled:O,children:a(d.BUTTON$CANCEL)}),(0,M.jsx)(ie,{type:`submit`,variant:`primary`,isDisabled:O,testId:`mcp-install-submit`,children:a(p||C?d.MCP$VERIFYING:u||x?d.SETTINGS$SAVING:d.MCP$INSTALL_BUTTON)})]})]})})}export{Ve as a,Re as c,K as d,W as f,We as i,Pe as l,N as m,Je as n,He as o,ce as p,Ge as r,Ue as s,$e as t,Fe as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,i as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js";import{K as a,t as o}from"./utils-BOco8mxR.js";import{c as s}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BPjI-atc.js";import{t as c}from"./loader-circle-Dex47vVW.js";import{t as l}from"./styled-tooltip-Pd22BIvr.js";import{u}from"./dropdown-classes-B9kJVDIk.js";import{n as d}from"./use-automation-health-BZkQNEA8.js";import{t as f}from"./automation-C_eCrGyP.js";var p=i(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);e();var m=n(),ee=e=>(0,m.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,m.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 00-2.455 2.456z`})}),te=[`success`,`partial_success`,`blocked`,`failed`,`unknown`];function h(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function g(e){return typeof e==`string`&&te.includes(e)}function _(e){return typeof e==`string`&&e.trim()||null}var v=new Set([`status`,`outcome_summary`]);function y(e){return e.run_metadata?.finish_tool_response??null}function b(e){let t=_(e);if(t)return t;if(typeof e==`number`||typeof e==`boolean`)return String(e);if(e==null)return null;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function x(e){if(e==null)return null;if(!h(e))return e;let t=Object.entries(e).filter(([e])=>!v.has(e));return t.length>0?Object.fromEntries(t):`status`in e&&!g(e.status)?{status:e.status}:null}function S(e){let t=y(e);if(!h(t))return null;let n=_(t.outcome_summary);return typeof t.status!=`string`&&!n?null:{status:g(t.status)?t.status:`unknown`,outcomeSummary:n}}function C(e){let t=y(e),n=x(t),r=b(n),i=S(e),a=_(e.error_detail);return e.status===f.COMPLETED?{badgeStatus:i?.status??(t===null?`success`:`unknown`),summary:i?.outcomeSummary??null,taskOutcome:i,customTaskMetadata:n,customTaskMetadataText:r}:{badgeStatus:e.status,summary:a,taskOutcome:i,customTaskMetadata:n,customTaskMetadataText:r}}function w(e){switch(e){case f.COMPLETED:case`success`:return a.AUTOMATIONS$DETAIL$SUCCESSFUL;case f.FAILED:case`failed`:return a.AUTOMATIONS$DETAIL$FAILED;case f.PENDING:return a.AUTOMATIONS$DETAIL$PENDING;case f.RUNNING:return a.AUTOMATIONS$DETAIL$RUNNING;case f.CANCELLED:return a.AUTOMATIONS$DETAIL$CANCELLED;case f.SKIPPED:return a.AUTOMATIONS$DETAIL$SKIPPED;case`blocked`:return a.AUTOMATIONS$DETAIL$BLOCKED;case`partial_success`:return a.AUTOMATIONS$DETAIL$PARTIAL;case`unknown`:return a.AUTOMATIONS$DETAIL$NEEDS_REVIEW;default:return a.FEATURED_AUTOMATIONS$STATUS_UNKNOWN}}var T=/^(\d+)$/;function E(e,t,n){let r=e.match(T);if(!r)return null;let i=Number(r[1]);return Number.isNaN(i)||i<t||i>n?null:i}function ne(e){let t=(e??``).trim();if(!t)return{kind:`custom`,raw:``};let n=t.split(/\s+/);if(n.length!==5)return{kind:`custom`,raw:t};let[r,i,a,o,s]=n,c=E(r,0,59),l=E(i,0,23);if(c===null||l===null)return{kind:`custom`,raw:t};if(a!==`*`||o!==`*`)return{kind:`custom`,raw:t,hour:l,minute:c};if(s===`*`||s===`0-6`)return{kind:`daily`,hour:l,minute:c};if(s===`1-5`)return{kind:`weekdays`,hour:l,minute:c};let u=E(s,0,6);return u===null?{kind:`custom`,raw:t,hour:l,minute:c}:{kind:`weekly`,hour:l,minute:c,weekday:u}}function re(e){let{kind:t,hour:n,minute:r,weekday:i}=e;switch(t){case`daily`:return`${r} ${n} * * *`;case`weekdays`:return`${r} ${n} * * 1-5`;case`weekly`:return`${r} ${n} * * ${i??1}`;default:return t}}function D(e,t){return`${String(e).padStart(2,`0`)}:${String(t).padStart(2,`0`)}`}function O(e){let t=e.match(/^(\d{1,2}):(\d{2})$/);if(!t)return null;let n=Number(t[1]),r=Number(t[2]);return Number.isNaN(n)||Number.isNaN(r)||n<0||n>23||r<0||r>59?null:{hour:n,minute:r}}function k(e){return e?Array.isArray(e)?e.join(`, `):e:`—`}var A=`*/10 * * * *`,j=new Set([`@yearly`,`@annually`,`@monthly`,`@weekly`,`@daily`,`@midnight`,`@hourly`]),M=5,N=7,P=[[0,59],[0,23],[1,31],[1,12],[0,7]],F=2,I=3,L=[0,31,29,31,30,31,30,31,31,30,31,30,31],R=`JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC`,z=`SUN|MON|TUE|WED|THU|FRI|SAT`,B=/^(\*|\d+(?:-\d+)?)(?:\/(\d+))?$/,V=[null,null,/^(?:\?|L|\d+W)$/i,RegExp(`^(?:${R})(?:-(?:${R}))?(?:/\\d+)?$`,`i`),RegExp(`^(?:(?:${z}|\\d+)(?:-(?:${z}|\\d+))?(?:/\\d+)?(?:#\\d+)?|\\?)$`,`i`)];function H(e,[t,n],r){let i=new Set;for(let a of e.split(`,`)){let e=a.match(B);if(!e)return r?.test(a)?{kind:`unmodelled`}:{kind:`invalid`};let[,o,s]=e,c=s===void 0?1:Number(s);if(c<1)return{kind:`invalid`};if(o===`*`){for(let e=t;e<=n;e+=c)i.add(e);continue}let[l,u]=o.split(`-`),d=E(l,t,n);if(d===null)return{kind:`invalid`};if(u===void 0){i.add(d);continue}let f=E(u,t,n);if(f===null)return{kind:`invalid`};if(f<d)return{kind:`unmodelled`};for(let e=d;e<=f;e+=c)i.add(e)}return{kind:`values`,values:[...i]}}function ie(e){let t=e.trim();if(!t)return{errorKey:a.AUTOMATIONS$ERROR_CRON_INVALID};if(t.startsWith(`@`))return j.has(t.toLowerCase())?{schedule:t}:{errorKey:a.AUTOMATIONS$ERROR_CRON_INVALID};let n=t.split(/\s+/);if(n.length<M||n.length>N)return{errorKey:a.AUTOMATIONS$ERROR_CRON_INVALID};let r=P.map((e,t)=>H(n[t],e,V[t]));if(r.some(e=>e.kind===`invalid`))return{errorKey:a.AUTOMATIONS$ERROR_CRON_INVALID};let i=r[F],o=r[I];return i.kind===`values`&&o.kind===`values`&&!o.values.some(e=>i.values.some(t=>t<=L[e]))?{errorKey:a.AUTOMATIONS$ERROR_CRON_UNREACHABLE}:{schedule:t}}function U(e,t){return new Date(e).toLocaleDateString(t,{year:`numeric`,month:`short`,day:`numeric`})}function W(e){if(!e)return!0;let t=new Date(e).getTime();return Number.isNaN(t)||t===0}function G(e,t,n){let r=Date.now()-new Date(e).getTime(),i=Math.floor(r/6e4),o=Math.floor(r/36e5),s=Math.floor(r/864e5);return i<1?n(a.AUTOMATIONS$DETAIL$TIME_JUST_NOW):i<60?n(a.AUTOMATIONS$DETAIL$TIME_MINUTES_AGO,{count:i}):o<24?n(a.AUTOMATIONS$DETAIL$TIME_HOURS_AGO,{count:o}):s===1?n(a.AUTOMATIONS$DETAIL$TIME_YESTERDAY):s<7?n(a.AUTOMATIONS$DETAIL$TIME_DAYS_AGO,{count:s}):U(e,t)}function K(e){return e===f.FAILED||e===f.PENDING||e===f.RUNNING}function q(e){return e===f.PENDING||e===f.RUNNING}var J={queued:a.AUTOMATIONS$DETAIL$PHASE_QUEUED,sandbox_provisioning:a.AUTOMATIONS$DETAIL$PHASE_SANDBOX_PROVISIONING,bundle_upload:a.AUTOMATIONS$DETAIL$PHASE_BUNDLE_UPLOAD,entrypoint_start:a.AUTOMATIONS$DETAIL$PHASE_ENTRYPOINT_START,preparing:a.AUTOMATIONS$DETAIL$PHASE_PREPARING,running_agent:a.AUTOMATIONS$DETAIL$PHASE_RUNNING_AGENT};function Y(e,t,n){let r=t&&Object.hasOwn(J,t)?J[t]:void 0;return r?e(r):n?.trim()||t?.trim()||null}function ae(e,t,n){return!e||W(e)?null:G(e,t,n)}function X({status:e,code:t,label:n,updatedAt:i}){let{t:a,i18n:o}=r(`openhands`),s=Y(a,t,n);return s?{text:s,age:q(e)?ae(i,o.language,a):null}:null}function oe({status:e,code:n,label:r,updatedAt:i,wide:a=!1}){let s=X({status:e,code:n,label:r,updatedAt:i});if(!s)return null;let{text:c,age:l}=s;return(0,m.jsx)(t,{content:(0,m.jsxs)(m.Fragment,{children:[c,l?(0,m.jsx)(`span`,{className:`mt-1 block text-muted`,children:l}):null]}),placement:`top`,closeDelay:100,disableAnimation:!1,classNames:{content:`max-w-xs whitespace-pre-wrap break-words rounded-xl border border-[var(--oh-border)] bg-base-secondary px-3 py-2 text-left text-xs text-white shadow-xl`},children:(0,m.jsxs)(`span`,{className:`flex min-w-0 cursor-default items-center gap-1`,children:[(0,m.jsx)(`span`,{"data-testid":`run-phase`,className:o(`min-w-0 truncate text-xs text-muted`,a?`max-w-[28rem]`:`max-w-[12rem]`),children:c}),l?(0,m.jsxs)(`span`,{"data-testid":`run-phase-age`,className:`shrink-0 whitespace-nowrap text-xs text-muted`,children:[`· `,l]}):null]})})}var Z=e=>(0,m.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,m.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})}),se=e=>(0,m.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:(0,m.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z`})}),Q={[f.COMPLETED]:{style:`bg-[var(--oh-success)]/10 text-[var(--oh-success)]`,iconTone:`text-[var(--oh-success)]`},success:{style:`bg-[var(--oh-success)]/10 text-[var(--oh-success)]`,iconTone:`text-[var(--oh-success)]`},[f.FAILED]:{style:`bg-[var(--oh-danger)]/10 text-danger`,iconTone:`text-danger`},failed:{style:`bg-[var(--oh-danger)]/10 text-danger`,iconTone:`text-danger`},blocked:{style:`bg-[var(--oh-warning)]/10 text-[var(--oh-warning)]`,iconTone:`text-[var(--oh-warning)]`},partial_success:{style:`bg-[var(--oh-warning)]/10 text-[var(--oh-warning)]`,iconTone:`text-[var(--oh-warning)]`},unknown:{style:`bg-[var(--oh-warning)]/10 text-[var(--oh-warning)]`,iconTone:`text-[var(--oh-warning)]`},[f.PENDING]:{style:`bg-surface-raised text-muted`,iconTone:`text-muted`},[f.RUNNING]:{style:`bg-surface-raised text-muted`,iconTone:`text-muted`},[f.CANCELLED]:{style:`bg-surface-raised text-muted`,iconTone:`text-muted`},[f.SKIPPED]:{style:`bg-surface-raised text-muted`,iconTone:`text-muted`}};function $({status:e,compact:t=!1}){let n=t?`size-3`:`size-3.5`;switch(e){case f.COMPLETED:case`success`:return(0,m.jsx)(Z,{"data-testid":`run-status-icon-completed`,className:n});case f.FAILED:case`failed`:return(0,m.jsx)(se,{"data-testid":`run-status-icon-failed`,className:n});case f.RUNNING:return(0,m.jsx)(c,{"data-testid":`run-status-icon-running`,className:o(n,`animate-spin motion-reduce:animate-none`),"aria-hidden":`true`});case`blocked`:case`partial_success`:return(0,m.jsx)(s,{"data-testid":`run-status-icon-warning`,className:n,"aria-hidden":`true`});case`unknown`:return(0,m.jsx)(p,{"data-testid":`run-status-icon-needs-review`,className:n,"aria-hidden":`true`});default:return(0,m.jsx)(d,{"data-testid":`run-status-icon-pending`,className:n})}}function ce({status:e,iconOnly:t=!1,showLabel:n=!1,compact:i=!1}){let{t:a}=r(`openhands`),s=Q[e]??Q[f.PENDING],c=a(w(e));return t?n?(0,m.jsxs)(`span`,{"data-testid":`run-status-badge-icon`,className:o(`inline-flex min-w-0 shrink-0 items-center gap-1.5 text-xs font-medium`,s.iconTone),children:[(0,m.jsx)($,{status:e,compact:i}),(0,m.jsx)(`span`,{className:`truncate`,children:c})]}):(0,m.jsx)(l,{content:c,placement:`top`,children:(0,m.jsx)(`span`,{role:`img`,"aria-label":c,"data-testid":`run-status-badge-icon`,className:o(`inline-flex shrink-0 cursor-default items-center justify-center`,s.iconTone),children:(0,m.jsx)($,{status:e,compact:i})})}):(0,m.jsxs)(`span`,{className:o(`inline-flex items-center rounded-full font-medium`,i?`gap-1 pl-1 pr-1.5 py-0 text-[10px] leading-4`:`gap-1.5 pl-2 pr-2.5 py-1 text-xs`,s.style),children:[(0,m.jsx)($,{status:e,compact:i}),c]})}var le=e=>(0,m.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,m.jsx)(`path`,{d:`M8.4 3.9c-1.1-.66-2.5.13-2.5 1.4v13.4c0 1.27 1.4 2.06 2.5 1.4l11.2-6.7c1.06-.64 1.06-2.16 0-2.8L8.4 3.9Z`,fill:`currentColor`})}),ue=e=>(0,m.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,m.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M5.636 5.636a9 9 0 1012.728 0M12 3v9`})});function de({icon:e,label:t}){return(0,m.jsxs)(`span`,{className:`flex min-w-0 w-full items-center gap-2`,children:[(0,m.jsx)(`span`,{className:o(`[&_svg]:size-4`,u),"aria-hidden":!0,children:e}),(0,m.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t})]})}export{O as _,Z as a,C as b,X as c,W as d,A as f,ne as g,D as h,ce as i,U as l,k as m,ue as n,oe as o,re as p,le as r,K as s,de as t,G as u,ie as v,ee as x,w as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{
|
|
1
|
+
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{i as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js";import{t as r}from"./useQuery-S6j94er1.js";import{A as i}from"./active-backend-context-rZiLJRUc.js";var a=n(`circle-arrow-up`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]]),o=`https://registry.npmjs.org/@openhands/agent-canvas/latest`,s=`https://github.com/OpenHands/OpenHands/releases`,c={npm:`npm install -g @openhands/agent-canvas@latest`,docker:`docker pull ghcr.io/openhands/agent-canvas:latest`};async function l(e){let t=await fetch(o,{signal:e,headers:{Accept:`application/json`}});if(!t.ok)throw Error(`npm registry responded ${t.status}`);let n=(await t.json())?.version;if(typeof n!=`string`||!n.trim())throw Error(`npm registry response missing version`);return n.trim()}function u({enabled:e=!0}={}){return r({queryKey:i.latestVersion,queryFn:({signal:e})=>l(e),enabled:e,retry:!1,refetchOnWindowFocus:!1,staleTime:1e3*60*60,meta:{disableToast:!0}})}e();var d=t(),f=e=>(0,d.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,d.jsx)(`path`,{fill:`currentColor`,d:`M21.81 10.25c-.06-.04-.56-.43-1.64-.43c-.28 0-.56.03-.84.08c-.21-1.4-1.38-2.11-1.43-2.14l-.29-.17l-.18.27c-.24.36-.43.77-.51 1.19c-.2.8-.08 1.56.33 2.21c-.49.28-1.29.35-1.46.35H2.62c-.34 0-.62.28-.62.63c0 1.15.18 2.3.58 3.38c.45 1.19 1.13 2.07 2 2.61c.98.6 2.59.94 4.42.94c.79 0 1.61-.07 2.42-.22c1.12-.2 2.2-.59 3.19-1.16A8.3 8.3 0 0 0 16.78 16c1.05-1.17 1.67-2.5 2.12-3.65h.19c1.14 0 1.85-.46 2.24-.85c.26-.24.45-.53.59-.87l.08-.24zm-17.96.99h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H3.85c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.43 0h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H6.28c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.47 0h1.75c.1 0 .17-.07.17-.16V9.5c0-.08-.06-.16-.17-.16H8.75c-.08 0-.15.07-.15.16v1.58c0 .09.06.16.15.16m2.44 0h1.77c.08 0 .15-.07.15-.16V9.5c0-.08-.06-.16-.15-.16h-1.77c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16M6.28 9h1.76c.08 0 .16-.09.16-.18V7.25c0-.09-.07-.16-.16-.16H6.28c-.09 0-.16.06-.16.16v1.57c.01.09.07.18.16.18m2.47 0h1.75c.1 0 .17-.09.17-.18V7.25c0-.09-.06-.16-.17-.16H8.75c-.08 0-.15.06-.15.16v1.57c0 .09.06.18.15.18m2.44 0h1.77c.08 0 .15-.09.15-.18V7.25c0-.09-.07-.16-.15-.16h-1.77c-.08 0-.15.06-.15.16v1.57c0 .09.07.18.15.18m0-2.28h1.77c.08 0 .15-.07.15-.16V5c0-.1-.07-.17-.15-.17h-1.77c-.08 0-.15.06-.15.17v1.56c0 .08.07.16.15.16m2.46 4.52h1.76c.09 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16h-1.76c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16`})}),p=e=>(0,d.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,d.jsx)(`path`,{fill:`currentColor`,d:`M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z`})}),m=e=>(0,d.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,d.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M17.0265 1.63647C18.2362 1.88301 19.3557 2.45458 20.2649 3.28974C21.1741 4.12489 21.8384 5.19205 22.1865 6.37647C22.509 7.46247 22.557 8.61147 22.326 9.72147C21.9921 11.2422 21.1518 12.6046 19.9428 13.5856C18.7337 14.5666 17.2274 15.1081 15.6705 15.1215C15.0135 15.1215 14.3595 15.027 13.731 14.8365L12.531 16.2435L11.9625 16.506H10.5V18.756L9.75 19.506H7.5V21.756L6.75 22.506H2.25L1.5 21.756V18.2955L1.719 17.766L9.18 10.305C8.96826 9.62297 8.86698 8.91148 8.88 8.19747C8.89367 7.19853 9.12754 6.2149 9.56495 5.3167C10.0024 4.4185 10.6325 3.62786 11.4105 3.00113C12.1885 2.3744 13.0952 1.92702 14.0659 1.69088C15.0367 1.45473 16.0475 1.43565 17.0265 1.63497V1.63647ZM19.0035 12.4365C19.9458 11.6734 20.6011 10.6131 20.862 9.42897L20.868 9.43647C21.0538 8.57068 21.0204 7.67216 20.7707 6.82258C20.521 5.97299 20.063 5.19926 19.4383 4.57169C18.8135 3.94412 18.0419 3.4826 17.1934 3.22908C16.345 2.97555 15.4466 2.93804 14.58 3.11997C13.4112 3.3794 12.3627 4.0224 11.6016 4.94661C10.8405 5.87082 10.4105 7.02309 10.38 8.21997C10.365 8.90397 10.485 9.58197 10.7385 10.215L10.5735 11.0295L3 18.606V21.006H6V18.756L6.75 18.006H9V15.756L9.75 15.006H11.6175L12.9315 13.482L13.773 13.272C14.3796 13.509 15.0253 13.6301 15.6765 13.629C16.8885 13.6197 18.0615 13.1992 19.0035 12.4365ZM17.7465 8.33847C17.8648 8.17505 17.9489 7.98945 17.9937 7.79277C18.0386 7.59609 18.0434 7.39239 18.0077 7.19384C17.972 6.99528 17.8967 6.80597 17.7861 6.63721C17.6756 6.46845 17.5322 6.32373 17.3644 6.21169C17.1967 6.09965 17.008 6.0226 16.8098 5.98514C16.6116 5.94769 16.4078 5.95061 16.2108 5.99372C16.0137 6.03683 15.8273 6.11925 15.6629 6.23605C15.4984 6.35285 15.3592 6.50162 15.2535 6.67347C15.0503 7.00406 14.983 7.40054 15.066 7.77963C15.1489 8.15872 15.3755 8.49093 15.6982 8.70645C16.0209 8.92198 16.4146 9.00405 16.7966 8.93543C17.1785 8.86682 17.519 8.65285 17.7465 8.33847Z`,fill:`currentColor`})});export{s as a,u as i,p as n,c as o,f as r,a as s,m as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{H as r,R as i,U as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{H as r,R as i,U as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{t as o}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{K as s,t as c}from"./utils-BOco8mxR.js";import{t as l}from"./modal-backdrop-BSzNhM4r.js";import{r as u,t as d}from"./modal-body-DJw4xBki.js";import{t as f}from"./brand-button-DxPO4Lf8.js";import{t as p}from"./modal-close-button-B9j4nasm.js";import{t as m}from"./settings-input-C0dd8Utu.js";import{n as h}from"./use-create-conversation-1YgmAHt-.js";import{r as g}from"./typography-HLLg_FAn.js";import{n as _,t as v}from"./vendor~launch-CHwEQG6e.js";var y=e(t(),1),b=n();function x({pluginIndex:e,paramKey:t,paramValue:n,onParameterChange:r}){let i=`plugin-${e}-param-${t}`;return typeof n==`boolean`?(0,b.jsxs)(`label`,{htmlFor:i,className:`flex w-full cursor-pointer items-center gap-2.5`,children:[(0,b.jsx)(`input`,{id:i,"data-testid":i,type:`checkbox`,checked:n,onChange:n=>r(e,t,n.target.checked),className:`h-4 w-4 shrink-0 rounded`}),(0,b.jsx)(`span`,{className:`text-sm`,children:t})]}):typeof n==`number`?(0,b.jsx)(m,{testId:i,name:`plugin-${e}-param-${t}`,type:`number`,label:t,value:String(n),className:`w-full`,onChange:n=>r(e,t,n===``?0:parseFloat(n)||0)}):(0,b.jsx)(m,{testId:i,name:`plugin-${e}-param-${t}`,type:`text`,label:t,value:String(n??``),className:`w-full`,onChange:n=>r(e,t,n)})}function S({plugin:e,originalIndex:t,isExpanded:n,onToggle:r,getPluginDisplayName:i,onParameterChange:a}){let{t:c}=o(`openhands`);return e.parameters&&Object.keys(e.parameters).length>0?(0,b.jsxs)(`div`,{className:`rounded-lg border border-[var(--oh-border)] bg-tertiary`,children:[(0,b.jsxs)(`button`,{type:`button`,onClick:r,className:`flex w-full items-center justify-between px-4 py-3 text-left hover:bg-base-tertiary rounded-t-lg cursor-pointer`,"data-testid":`plugin-section-${t}`,children:[(0,b.jsx)(g.Text,{className:`text-base font-normal`,children:i(e)}),n?(0,b.jsx)(v,{className:`h-5 w-5 text-white`}):(0,b.jsx)(_,{className:`h-5 w-5 text-white`})]}),n&&(0,b.jsxs)(`div`,{className:`border-t border-[var(--oh-border-subtle)] px-4 pb-3`,children:[e.ref&&(0,b.jsxs)(`div`,{className:`mb-2 text-sm text-white`,children:[c(s.LAUNCH$PLUGIN_REF),` `,e.ref]}),e.repo_path&&(0,b.jsxs)(`div`,{className:`mb-2 text-sm text-white`,children:[c(s.LAUNCH$PLUGIN_PATH),` `,e.repo_path]}),(0,b.jsx)(`div`,{className:`flex flex-col gap-4`,children:Object.entries(e.parameters||{}).map(([e,n])=>(0,b.jsx)(x,{pluginIndex:t,paramKey:e,paramValue:n,onParameterChange:a},e))})]})]}):null}function C({plugins:e,message:t,isLoading:n=!1,onStartConversation:r,onClose:i}){let{t:a}=o(`openhands`),[m,h]=y.useState(e),[_,v]=y.useState(()=>{let t={};return e.forEach((e,n)=>{e.parameters&&Object.keys(e.parameters).length>0&&(t[n]=!0)}),t}),[x,C]=y.useState(!1),w=m.filter(e=>e.parameters&&Object.keys(e.parameters).length>0),T=m.filter(e=>!e.parameters||Object.keys(e.parameters).length===0),E=e=>{v(t=>({...t,[e]:!t[e]}))},D=(e,t,n)=>{h(r=>{let i=[...r],a={...i[e]};return a.parameters={...a.parameters,[t]:n},i[e]=a,i})},O=e=>{let{source:t,repo_path:n}=e;if(n){let e=n.split(`/`);return e[e.length-1]}if(t.startsWith(`github:`))return t.replace(`github:`,``);if(t.includes(`/`)){let e=t.split(`/`);return e[e.length-1].replace(`.git`,``)}return t},k=e=>{let{source:t}=e;return t.startsWith(`github:`)?t.replace(`github:`,``):t.includes(`github.com/`)&&t.split(`github.com/`)[1]?.replace(`.git`,``)||t},A=()=>{let e=m.map(e=>k(e));return[...new Set(e)]},j=()=>{r(m,t)},M=m.length===1?O(m[0]):a(s.LAUNCH$MODAL_TITLE_GENERIC);return(0,b.jsx)(l,{onClose:i,children:(0,b.jsxs)(`div`,{"data-testid":`plugin-launch-modal`,className:c(`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)] max-h-[80vh]`,u(`md`),d),children:[(0,b.jsx)(p,{onClose:i,testId:`close-button`}),(0,b.jsxs)(g.H2,{className:`pr-6`,children:[a(s.LAUNCH$MODAL_TITLE),` `,M]}),t&&(0,b.jsx)(`p`,{className:`text-sm text-white`,children:t}),(0,b.jsxs)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar`,children:[w.length>0&&(0,b.jsx)(`div`,{className:`space-y-3`,children:m.map((e,t)=>(0,b.jsx)(S,{plugin:e,originalIndex:t,isExpanded:!!_[t],onToggle:()=>E(t),getPluginDisplayName:O,onParameterChange:D},`plugin-${t}`))}),T.length>0&&(0,b.jsxs)(`div`,{className:c(w.length>0&&`mt-4`),children:[(0,b.jsx)(g.H3,{className:`mb-2 text-white`,children:w.length>0?a(s.LAUNCH$ADDITIONAL_PLUGINS):a(s.LAUNCH$PLUGINS)}),(0,b.jsx)(`div`,{className:`space-y-2`,children:T.map((e,t)=>(0,b.jsxs)(`div`,{className:`rounded-md bg-tertiary px-3 py-2 text-sm`,children:[(0,b.jsx)(`div`,{className:`font-medium`,children:O(e)}),(0,b.jsxs)(`div`,{className:`text-xs text-white mt-1`,children:[k(e),e.repo_path&&(0,b.jsxs)(`span`,{className:`ml-1`,children:[`/ `,e.repo_path]}),e.ref&&(0,b.jsxs)(`span`,{className:`ml-2`,children:[`@ `,e.ref]})]})]},`simple-plugin-${t}`))})]})]}),(0,b.jsxs)(`div`,{className:`pt-4 border-t border-[var(--oh-border-subtle)]`,children:[(0,b.jsxs)(`div`,{className:`flex items-start gap-3 mb-4`,children:[(0,b.jsx)(`input`,{id:`trust-checkbox`,"data-testid":`trust-checkbox`,type:`checkbox`,checked:x,onChange:e=>C(e.target.checked),className:`mt-1 h-4 w-4 flex-shrink-0`}),(0,b.jsx)(`label`,{htmlFor:`trust-checkbox`,className:`text-sm text-white`,children:a(s.LAUNCH$TRUST_SKILL_CHECKBOX,{sources:A().join(`, `),interpolation:{escapeValue:!1}})})]}),(0,b.jsx)(`div`,{className:`flex w-full justify-end mt-8`,children:(0,b.jsx)(f,{testId:`start-conversation-button`,type:`button`,variant:`primary`,onClick:j,isDisabled:n||!x,className:`px-4`,children:a(n?s.LAUNCH$STARTING:s.LAUNCH$START_CONVERSATION)})})]})]})})}function w(e){if(e)return e.replace(/<[^>]*>/g,``).slice(0,500)||void 0}function T(e){let t=e.get(`plugins`);if(t)try{let n=atob(t),r=JSON.parse(n);if(!Array.isArray(r))return{plugins:[],error:`invalid_format`};let i=[];for(let e of r){if(typeof e!=`object`||!e||typeof e.source!=`string`)return{plugins:[],error:`invalid_format`};i.push({source:e.source,ref:e.ref??null,repo_path:e.repo_path??null,parameters:e.parameters??null})}return i.length===0?{plugins:[],error:`no_plugins`}:{plugins:i,message:w(e.get(`message`))}}catch{return{plugins:[],error:`invalid_format`}}let n=e.get(`plugin_source`);return n?{plugins:[{source:n,ref:e.get(`plugin_ref`)??null,repo_path:e.get(`plugin_repo_path`)??null,parameters:null}],message:w(e.get(`message`))}:{plugins:[],error:`no_plugins`}}function E({errorType:e,onGoHome:t,onTryAgain:n}){let{t:r}=o(`openhands`),i={no_plugins:r(s.LAUNCH$ERROR_NO_PLUGINS),invalid_format:r(s.LAUNCH$ERROR_INVALID_FORMAT),creation_failed:r(s.LAUNCH$ERROR_CREATION_FAILED)};return(0,b.jsx)(`div`,{className:`flex h-full items-center justify-center`,"data-testid":`launch-error`,children:(0,b.jsxs)(`div`,{className:`max-w-md rounded-lg bg-[var(--oh-surface)] p-6 text-center`,children:[(0,b.jsx)(`h2`,{className:`mb-4 text-xl font-medium text-red-400`,children:r(s.LAUNCH$ERROR_TITLE)}),(0,b.jsx)(`p`,{className:`mb-6 text-[var(--oh-text-tertiary)]`,children:i[e]}),(0,b.jsxs)(`div`,{className:`flex justify-center gap-3`,children:[(0,b.jsx)(`button`,{type:`button`,onClick:t,className:`rounded-md bg-tertiary px-4 py-2 text-sm text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,"data-testid":`go-home-button`,children:r(s.LAUNCH$GO_HOME)}),n&&(0,b.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-md bg-blue-600 px-4 py-2 text-sm text-white hover:bg-blue-700`,"data-testid":`try-again-button`,children:r(s.LAUNCH$TRY_AGAIN)})]})]})})}var D=a(function(){let[e]=r(),t=i(),{t:n}=o(`openhands`),a=h(),[c,l]=y.useState(null),u=y.useMemo(()=>T(e),[e]),d=async(e,r)=>{l(null);try{t(`/conversations/${(await a.mutateAsync({plugins:e,query:r,entryPoint:`launch_deeplink`})).conversation_id}`)}catch{l(n(s.LAUNCH$ERROR_CREATION_UNKNOWN))}},f=()=>{t(`/conversations`)};return u.error?(0,b.jsx)(E,{errorType:u.error,onGoHome:f}):c?(0,b.jsx)(E,{errorType:`creation_failed`,onGoHome:f,onTryAgain:()=>{l(null),window.location.reload()}}):(0,b.jsx)(`div`,{className:`h-full`,"data-testid":`launch-route`,children:(0,b.jsx)(C,{plugins:u.plugins,message:u.message,isLoading:a.isPending,onStartConversation:d,onClose:f})})});export{D as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js";var t=e(`list-filter`,[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{i as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BfkNGovw.js";var t=e(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]);export{t};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,bt as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{r as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-DnDoaYNi.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-CV850oio.js";import{t as o}from"./useInfiniteQuery-BzrRqjLg.js";import{t as s}from"./useMutation-CJuK90oc.js";import{t as c}from"./useQuery-S6j94er1.js";import{a as l}from"./recommended-automations-launcher-YLAQTp4s.js";import{I as u,M as d,N as f,O as p,P as m,V as h,ct as g,dt as _,gt as v,k as y,n as b,pt as x,st as S,vt as C}from"./active-backend-context-rZiLJRUc.js";import{B as w,K as T,N as E,P as D,R as O,S as k,_ as A,b as j,c as ee,d as M,f as te,g as N,i as ne,k as P,n as re,o as ie,s as ae,t as F,v as oe,w as se,y as ce}from"./utils-BOco8mxR.js";import{E as I}from"./agent-server-client-options-BikiNwTa.js";import{t as le}from"./chat-send-button-B3SFSIg5.js";import{t as ue}from"./check-fDEfgSzj.js";import{t as L}from"./chevron-down-CFrWHqu8.js";import{t as de}from"./chevron-right-C5roOrJu.js";import{t as R}from"./circle-check-ClTzJTdb.js";import{a as fe,i as pe,n as me,r as he,t as ge}from"./vendor~index-home~home~conversation-panel~conversation-CSFLzmTN.js";import{i as _e,r as ve}from"./vendor~root-layout~index-home~home~conversation-panel~conversation-DgQ564nC.js";import{t as ye}from"./cloud-funnel-analytics-BQanUEEC.js";import{t as z}from"./loader-circle-Dex47vVW.js";import{t as be}from"./plus-B3wvU06-.js";import{t as xe}from"./refresh-cw-DEQdPCpH.js";import{n as B,t as V}from"./context-menu-list-item-DDROe12Z.js";import{t as Se}from"./loading-spinner-DfHI77BA.js";import{t as Ce}from"./settings-service.api-9_xdv_mh.js";import{n as H}from"./use-settings-Dn00UISA.js";import{t as we}from"./modal-backdrop-BSzNhM4r.js";import{n as Te}from"./modal-body-DJw4xBki.js";import{r as U}from"./base-modal-DTULovNc.js";import{_ as Ee,n as De,s as Oe,t as ke}from"./form-control-classes-B-z85REi.js";import{t as Ae}from"./brand-button-DxPO4Lf8.js";import{n as je}from"./navigation-context-CQZwH_tC.js";import{t as Me}from"./navigation-link-Bxo3-4vo.js";import{t as Ne}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-CjECvSl5.js";import{t as Pe}from"./styled-tooltip-Pd22BIvr.js";import{c as Fe,i as Ie,r as Le,u as Re}from"./dropdown-classes-B9kJVDIk.js";import{r as ze}from"./settings-dropdown-input-DVpyD87C.js";import{t as Be}from"./dist-Bl64nBZL.js";import{a as Ve,c as He,d as Ue,f as We,i as Ge,l as Ke,m as qe,n as Je,o as Ye,p as Xe,r as Ze,t as Qe,u as $e}from"./use-llm-configured-DGm8FiRR.js";import{_ as et,c as tt,i as nt,o as rt,r as it,t as W}from"./conversation-store-DVVfkCsk.js";import{t as at}from"./modal-close-button-B9j4nasm.js";import{E as ot,O as st,_ as ct,k as lt,o as ut,t as G}from"./agent-server-conversation-service.api-DYFsNHKf.js";import{t as dt}from"./profiles-service.api-BbOK0EkF.js";import{f as ft,o as pt,s as mt,u as ht}from"./acp-providers-DrjNsPOH.js";import{c as gt,d as _t,l as vt,m as yt,o as bt,p as xt}from"./conversation-state-store-D1_G_9I-.js";import{t as St}from"./use-click-outside-element-W6Os4Nlb.js";import{t as Ct}from"./use-llm-profiles-BTTtpW4z.js";import{t as wt}from"./agent-profiles-service.api-Biieml2L.js";import{t as Tt}from"./use-agent-profiles-1P91KSXz.js";import{a as Et,i as Dt,n as Ot,o as kt,r as At,t as jt}from"./use-create-conversation-1YgmAHt-.js";import{a as Mt,r as Nt,t as Pt}from"./use-can-manage-org-profiles-BbN6KfDr.js";import{t as Ft}from"./skills-B0IliMxw.js";import{r as It}from"./format-model-name-CasAP3nd.js";import{c as Lt}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-DXqM7vqB.js";import{a as Rt,n as zt,s as Bt}from"./home-store-DyXz0w6d.js";import{t as Vt}from"./checkmark-XZyokq_Y.js";import{n as Ht,r as K}from"./typography-HLLg_FAn.js";import{n as Ut,t as Wt}from"./use-activate-agent-profile-BLKML6vQ.js";import{$ as Gt,D as Kt,J as qt,R as Jt,T as Yt,a as Xt,c as Zt,d as Qt,f as $t,g as en,l as tn,nt as nn,o as rn,rt as q,t as an,tt as J,y as on}from"./markdown-renderer-rivLvYh-.js";import{i as sn,o as cn,r as ln,t as un}from"./skill-scope-Dz3kPH3P.js";import{t as dn}from"./syntax-highlighter-BGDg_7w9.js";import{n as fn,t as pn}from"./link-external-BNZzCM1I.js";import{t as mn}from"./merge-agent-profile-save-input-WcFmQVKK.js";import{t as hn}from"./settings-gear-DaJj6Pde.js";import{t as gn}from"./u-robot-BvAOA2ZD.js";import{a as _n,i as vn,n as yn,o as bn,r as xn,s as Sn}from"./git-repo-dropdown-DVeCUUXG.js";var Y=e(t(),1),Cn={"image/png":`png`,"image/jpeg":`jpg`,"image/jpg":`jpg`,"image/gif":`gif`,"image/webp":`webp`,"image/bmp":`bmp`};function wn(e){if(e.name.trim())return e;let t=Cn[e.type]??(e.type.startsWith(`image/`)?`png`:`bin`);return new File([e],`pasted-image-${Date.now()}.${t}`,{type:e.type,lastModified:e.lastModified})}function Tn(e,t){let n=new Set(t),r=[],i=[];for(let t of e)n.has(t.name)?i.push(t):r.push(t);return{imagesToEmbed:r,imagesAsFiles:i}}function En(e){let t=Array.from(e.files);if(t.length>0)return t.map(wn);let n=[];for(let t=0;t<e.items.length;t+=1){let r=e.items[t];if(r.kind!==`file`)continue;let i=r.getAsFile();i&&n.push(wn(i))}return n}var Dn=e=>e?(e.innerText||e.textContent||``).trim()===``:!0,On=e=>{e&&Dn(e)&&(e.innerHTML=``,e.textContent=``)},X=e=>e?.innerText||``,kn=e=>{e&&(e.textContent=``)},An=e=>{e&&(e.value=``)},jn=e=>{if(!e)return;let t=window.getSelection();if(!t||t.rangeCount===0)return;let n=t.getRangeAt(0);if(!n.getBoundingClientRect||!e.getBoundingClientRect)return;let r=n.getBoundingClientRect(),i=e.getBoundingClientRect();r.bottom>i.bottom&&(e.scrollTop=e.scrollHeight-e.clientHeight)},Mn=e=>{if(!e)return;e.focus();let t=window.getSelection();if(!t)return;let n=document.createRange();n.selectNodeContents(e),n.collapse(!1),t.removeAllRanges(),t.addRange(n),jn(e)},Nn=e=>e.startsWith(`task-`),Pn=500,Fn=`oh:home-prompt-draft`,In=(e,t)=>{let{state:n,setDraftMessage:r}=tt(e??``),i=(0,Y.useRef)(null),a=(0,Y.useRef)(!1),[o,s]=(0,Y.useState)(!1),c=(0,Y.useRef)(e),l=(0,Y.useRef)(!0),u=(0,Y.useRef)(``);(0,Y.useEffect)(()=>{if(!e)return;let n=c.current,r=l.current;c.current=e,l.current=!1,i.current&&=(clearTimeout(i.current),null);let o=t.current;if(!r&&n&&n!==e){let t=Nn(n),r=!Nn(e);if(t&&r&&o){let t=X(o).trim();if(t){rt(e,{draftMessage:t}),a.current=!0,s(!0);return}}}o&&(o.textContent=``),a.current=!1,s(!1)},[e,t]),(0,Y.useEffect)(()=>{if(a.current)return;let n=t.current;if(!n)return;if(!e){try{let e=sessionStorage.getItem(Fn);if(e&&X(n).trim()===``){n.textContent=e;let t=window.getSelection(),r=document.createRange();r.selectNodeContents(n),r.collapse(!1),t?.removeAllRanges(),t?.addRange(r),u.current=e}}catch{}a.current=!0,s(!0);return}let{draftMessage:r}=nt(e);r&&X(n).trim()===``&&(n.textContent=r,Mn(n)),a.current=!0,s(!0)},[t,e]);let d=(0,Y.useCallback)(()=>{if(i.current&&clearTimeout(i.current),!e){let e=t.current;if(e){let t=X(e).trim();u.current=t;try{t?sessionStorage.setItem(Fn,t):sessionStorage.removeItem(Fn)}catch{}}return}let a=e;i.current=setTimeout(()=>{if(a!==c.current)return;let e=t.current;if(!e)return;let i=X(e).trim();i!==(n.draftMessage||``)&&r(i||null)},Pn)},[t,n.draftMessage,r,e]),f=(0,Y.useCallback)(()=>{if(i.current&&=(clearTimeout(i.current),null),!e){try{sessionStorage.removeItem(Fn)}catch{}return}r(null)},[e,r]);return(0,Y.useEffect)(()=>()=>{if(i.current&&clearTimeout(i.current),!c.current){let e=u.current;try{e?sessionStorage.getItem(`oh:home-prompt-draft`)!==null&&sessionStorage.setItem(Fn,e):sessionStorage.removeItem(Fn)}catch{}}},[]),{saveDraft:d,clearDraft:f,isRestored:o,hasDraft:!!n.draftMessage}},Ln=()=>{let e=(0,Y.useRef)(null),{conversationId:t}=q(),{messageToSend:n,messageRestoreIfEmpty:r,hasRightPanelToggled:i,setMessageToSend:a,clearMessageRestoreIfEmpty:o,setIsRightPanelShown:s}=W(),{saveDraft:c,clearDraft:l}=In(t,e),u=t?n:null;return(0,Y.useEffect)(()=>{!t||!r||(X(e.current).trim().length===0&&a(r.text),o())},[t,r,a,o]),(0,Y.useEffect)(()=>{t&&e.current&&(a(X(e.current)),s(i))},[t,i,a,s]),{chatInputRef:e,messageToSend:u,checkIsContentEmpty:(0,Y.useCallback)(()=>Dn(e.current),[]),clearEmptyContentHandler:(0,Y.useCallback)(()=>{On(e.current)},[]),getCurrentMessage:(0,Y.useCallback)(()=>X(e.current),[]),saveDraft:c,clearDraft:l}},Rn=e=>{let t=(0,Y.useRef)(null),n=(0,Y.useRef)(null),[r,i]=(0,Y.useState)(!1),a=(0,Y.useCallback)((t,n)=>{e&&t.length>0&&e(t,n)},[e]);return(0,Y.useEffect)(()=>{let e=e=>{let t=e.detail.files;t&&t.length>0&&a(t,{fromPaste:!0})};return document.addEventListener(`pasteFiles`,e),()=>{document.removeEventListener(`pasteFiles`,e)}},[a]),{fileInputRef:t,chatContainerRef:n,isDragOver:r,handleFileIconClick:(0,Y.useCallback)(e=>{!e&&t.current&&t.current.click()},[]),handleFileInputChange:(0,Y.useCallback)(e=>{a(Array.from(e.target.files||[]))},[a]),handleDragOver:(0,Y.useCallback)((e,t)=>{t||(e.preventDefault(),i(!0))},[]),handleDragLeave:(0,Y.useCallback)((e,t)=>{t||n.current?.contains(e.relatedTarget)||(e.preventDefault(),i(!1))},[]),handleDrop:(0,Y.useCallback)((e,t)=>{t||(e.preventDefault(),i(!1),a(Array.from(e.dataTransfer.files)))},[a])}},zn=2,Bn=120,Vn=()=>{let e=document.getElementById(`resize-grip`)?.parentElement??null;return e?e.getBoundingClientRect().bottom>=window.innerHeight-Bn:!0},Hn=({elementRef:e,minHeight:t,maxHeight:n,onGripDragStart:r,onGripDragEnd:i,onHeightChange:a,onReachedMinHeight:o})=>{let s=e=>`touches`in e&&e.touches.length>0?e.touches[0].clientY:e.clientY,c=(e,t)=>{let n=document.getElementById(`resize-grip`);n&&(n.addEventListener(`touchmove`,e,{passive:!1,capture:!0}),n.addEventListener(`touchend`,t,{capture:!0}))},l=(e,t)=>{document.addEventListener(`mousemove`,e),document.addEventListener(`mouseup`,t)},u=u=>{let d=A(),f=e.current?.offsetHeight||t,p=!1,m=i=>{if(i.preventDefault(),!p){let e=s(i);if(Math.abs(e-u)<zn)return;p=!0,r?.()}let c=s(i)-u,l=Math.max(t,Math.min(n,f-c)),d=e.current;if(!d)return;d.style.height=`${l}px`;let m=d.scrollHeight>l||l>=n;d.style.overflowY=m?`auto`:`hidden`,a&&a(l),o&&Math.abs(l-t)<=1.5&&o()},h=()=>{if(p&&i?.(),d){let e=document.getElementById(`resize-grip`);if(!e)return;e.removeEventListener(`mousemove`,m),e.removeEventListener(`mouseup`,h),e.removeEventListener(`touchmove`,m),e.removeEventListener(`touchend`,h)}else document.removeEventListener(`mousemove`,m),document.removeEventListener(`mouseup`,h),document.removeEventListener(`touchmove`,m),document.removeEventListener(`touchend`,h)};d?c(m,h):l(m,h)};return{handleGripMouseDown:e=>{e.preventDefault(),Vn()&&u(e.clientY)},handleGripTouchStart:e=>{e.preventDefault(),Vn()&&u(e.touches[0].clientY)}}},Un=20,Wn=120,Gn=20,Kn=50,qn=()=>({hasUserResizedRef:(0,Y.useRef)(!1),manualHeightRef:(0,Y.useRef)(null)}),Jn=(e,t,n)=>{let{minHeight:r,maxHeight:i}=n,a=Math.max(r,Math.min(t,i));return e.style.setProperty(`height`,`${a}px`),e.style.setProperty(`overflow-y`,a>=i?`auto`:`hidden`),a},Yn=(e,t,n=Kn)=>e>t+n,Xn=(e,t)=>{let n=N(e,t),r=n;e.style.setProperty(`height`,`auto`);let i=e.scrollHeight;return j(e,n),{currentHeight:r,currentStyleHeight:n,contentHeight:i}},Zn=(e,t)=>{let{finalHeight:n,overflowY:r}=t,i=e;i.style.height=`${n}px`,i.style.overflowY=r},Qn=(e,t)=>{t&&t(e)},$n=(e,t={})=>{let n=(0,Y.useRef)(null),{minHeight:r=Un,maxHeight:i=Wn,enableManualResize:a=!1,value:o,onValueApplied:s,onGripDragStart:c,onGripDragEnd:l,onHeightChange:u}=t,d={minHeight:r,maxHeight:i},{hasUserResizedRef:f,manualHeightRef:p}=qn(),m=()=>{f.current=!1,p.current=null},h=(0,Y.useCallback)(e=>{u?.(e),f.current&&(p.current=e)},[u]),g=(0,Y.useCallback)(()=>{f.current=!0,c?.()},[c]),_=(0,Y.useCallback)(()=>{let t=e.current;if(t){let e=N(t,r);Math.abs(e-r)<=1.5&&(f.current=!1,p.current=null)}l?.()},[r,l]),{handleGripMouseDown:v,handleGripTouchStart:y}=Hn({elementRef:e,minHeight:r,maxHeight:i,onGripDragStart:a?g:void 0,onGripDragEnd:a?_:void 0,onHeightChange:h}),b=(0,Y.useCallback)((e,t,n)=>{if(f.current&&t>r){Zn(e,{finalHeight:t,overflowY:`hidden`}),Qn(t,u);return}let i=Math.max(n,r);Zn(e,{finalHeight:i,overflowY:`hidden`}),Qn(i,u)},[r,u]),x=(0,Y.useCallback)((e,t,n)=>{if(!Yn(t,n)){let t=Math.max(n,r);Zn(e,{finalHeight:t,overflowY:`hidden`}),Qn(t,u);return}Zn(e,{finalHeight:t,overflowY:`auto`}),Qn(t,u)},[r,u]),S=(0,Y.useCallback)(e=>{Zn(e,{finalHeight:i,overflowY:`auto`}),Qn(i,u)},[i,u]),C=(0,Y.useCallback)(()=>{let t=e.current;if(!t)return;if((t.textContent??``).trim().length===0&&f.current&&p.current&&p.current>r+1.5){j(t,p.current),t.style.overflowY=`hidden`,Qn(p.current,u);return}let{currentHeight:n,contentHeight:a}=Xn(t,r);if(a<=n){b(t,n,a);return}if(a<=i){x(t,n,a);return}S(t)},[e,r,i,u,b,x,S]),w=(0,Y.useCallback)(()=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>{n.current=null,C()})},[C]);return(0,Y.useEffect)(()=>{if(o===void 0)return;let t=0,n=()=>{let t=e.current;return t?(t.textContent=o.text,w(),Mn(t),s?.(),!0):!1};return n()||(t=requestAnimationFrame(()=>{n()})),()=>{t&&cancelAnimationFrame(t)}},[o,w,s]),(0,Y.useEffect)(()=>{w()},[w]),{smartResize:w,handleGripMouseDown:v,handleGripTouchStart:y,increaseHeightForEmptyContent:()=>{let t=e.current;if(!t)return;let n=N(t,r),a=Math.min(n+Gn,i);if(a>n){let e=Jn(t,a,d);Qn(e,u),f.current=!0,p.current=e}},resetManualResize:m}},er=(e,t)=>{let[n,r]=(0,Y.useState)(!1),[i,a]=(0,Y.useState)(!1),[o,s]=(0,Y.useState)(!0),{setShouldHideSuggestions:c,clearMessageToSend:l}=W(),u=(0,Y.useRef)(null),d=(0,Y.useRef)(!1);(0,Y.useEffect)(()=>{let e=()=>s(Vn());return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let f=(0,Y.useCallback)(()=>{a(!0)},[]),p=(0,Y.useCallback)(()=>{a(!1),d.current=!0},[]),m=(0,Y.useCallback)(e=>{if(o){if(d.current){d.current=!1,e.preventDefault(),e.stopPropagation();return}e.stopPropagation(),r(e=>!e)}},[o]),{smartResize:h,handleGripMouseDown:g,handleGripTouchStart:_,increaseHeightForEmptyContent:v,resetManualResize:y}=$n(e,{minHeight:20,maxHeight:400,onHeightChange:(0,Y.useCallback)(e=>{c(e>D.HEIGHT_THRESHOLD)},[c]),onGripDragStart:f,onGripDragEnd:p,value:t??void 0,onValueApplied:l,enableManualResize:!0});return{gripRef:u,isGripVisible:n,isGripDragging:i,canResize:o,handleTopEdgeClick:m,smartResize:h,handleGripMouseDown:g,handleGripTouchStart:_,increaseHeightForEmptyContent:v,resetManualResize:y}},tr=(e,t,n,r,i,a,o)=>({handleInput:(0,Y.useCallback)(()=>{t(),e.current&&On(e.current),jn(e.current)},[t,e]),handlePaste:(0,Y.useCallback)(e=>{e.preventDefault();let n=En(e.clipboardData);if(n.length>0){let e=new CustomEvent(`pasteFiles`,{detail:{files:n}});document.dispatchEvent(e);return}let r=e.clipboardData.getData(`text/plain`);r&&(document.execCommand(`insertText`,!1,r),setTimeout(t,0))},[t]),handleKeyDown:(0,Y.useCallback)((e,t,i)=>{if(e.key===`Enter`&&!e.nativeEvent.isComposing){if(r()){e.preventDefault(),n();return}!oe()&&!e.shiftKey&&!t&&(e.preventDefault(),i())}},[r,n]),handleBlur:(0,Y.useCallback)(()=>{e.current&&On(e.current),o&&o()},[e,o]),handleFocus:(0,Y.useCallback)(()=>{a&&a()},[a])}),nr=(e,t,n,r,i)=>({handleSubmit:(0,Y.useCallback)(()=>{let a=e.current?.innerText||``,o=a.trim(),{images:s,files:c}=W.getState(),l=s.length>0||c.length>0;!o&&!l||(r(a),kn(e.current),An(t.current),n(),i?.())},[e,t,n,r,i]),handleStop:(0,Y.useCallback)(e=>{e&&e()},[])}),rr=()=>{let e=b().backend.kind===`cloud`,{conversationId:t}=q(),{data:n}=J(),r=n?.selected_workspace??void 0,i=e?t:null;return c({queryKey:i?[`conversation`,i,`skills`]:[`skills`,r??null],queryFn:()=>i?cn.getConversationSkills(i):cn.getSkills(r),enabled:!i||n?.sandbox_status===`RUNNING`,staleTime:1e3*60*10,refetchOnWindowFocus:!1})};function ir(e){let t=window.getSelection();if(!t||t.rangeCount===0)return-1;let n=t.getRangeAt(0),r=n.cloneRange();return r.selectNodeContents(e),r.setEnd(n.startContainer,n.startOffset),r.toString().length}var ar=e=>{let{data:t,isLoading:n}=rr(),r=b().backend.kind===`cloud`,{data:i,isLoading:a}=Ct(),[o,s]=(0,Y.useState)(!1),[c,l]=(0,Y.useState)(``),[u,d]=(0,Y.useState)(`command`),[f,p]=(0,Y.useState)(0),m=(0,Y.useMemo)(()=>{let e=E.filter(e=>e.command===`/new`?r:!0);return n||!t||t.forEach(t=>{let n=(t.triggers||[]).filter(e=>e.startsWith(`/`));n.length>0?n.forEach(n=>{e.push({skill:t,command:n})}):t.type===`agentskills`&&e.push({skill:t,command:`/${t.name}`})}),e},[t,n,r]),h=(0,Y.useMemo)(()=>(i?.profiles??[]).map(e=>{let t=`${w} ${e.name}`;return{command:t,skill:{name:e.name,type:`agentskills`,source:null,content:e.model?`Switch to ${It(e.model)}`:`Switch to this LLM profile`,triggers:[t]}}}),[i?.profiles]),g=(0,Y.useMemo)(()=>{let e=u===`model-profile`?h:m;if(!c)return e;let t=c.toLowerCase();return e.filter(e=>e.command.toLowerCase().includes(t)||e.skill.name.toLowerCase().includes(t)||e.skill.content?.toLowerCase().includes(t))},[u,h,m,c]),_=(0,Y.useRef)(o);_.current=o;let v=(0,Y.useRef)(g);v.current=g;let y=(0,Y.useRef)(f);y.current=f,(0,Y.useEffect)(()=>{p(0)},[c]);let x=(0,Y.useRef)(null),S=(0,Y.useCallback)(()=>{let t=e.current;if(!t)return null;let n=(t.innerText||``).replace(/[\n\r]+$/,``),r=ir(t);if(r<0)return null;let i=n.slice(0,r),a=i.match(/(^|\s)(\/model(?:\s+\S*)?)$/);if(a){let e=a[2],t=i.length-e.length,o=n.slice(r).match(/^\S*/),s=r+(o?o[0].length:0);return{kind:`model-profile`,text:e.replace(/^\/model(?:\s+)?/,``),start:t,end:s}}let o=i.match(/(^|\s)(\/\S*)$/);if(!o)return null;let s=o[2],c=i.length-s.length,l=n.slice(r).match(/^\S*/),u=r+(l?l[0].length:0);return{kind:`command`,text:s.slice(1),start:c,end:u}},[e]),C=(0,Y.useCallback)(()=>{let e=S(),t=e?.kind===`model-profile`?h.length>0||a:m.length>0;e!==null&&t?(d(e.kind),l(e.text),x.current={start:e.start,end:e.end},s(!0)):(s(!1),l(``),d(`command`),x.current=null)},[S,a,h.length,m.length]),T=(0,Y.useCallback)(t=>{let n=e.current;if(!n)return;let r=x.current,i=(n.innerText||``).replace(/[\n\r]+$/,``),a=`${t.command} `;if(r){n.textContent=i.slice(0,r.start)+a+i.slice(r.end);let e=r.start+a.length,t=n.firstChild;if(t){let n=document.createRange(),r=window.getSelection(),i=Math.min(e,t.textContent.length);n.setStart(t,i),n.collapse(!0),r?.removeAllRanges(),r?.addRange(n)}}else{n.textContent=a;let e=document.createRange(),t=window.getSelection();e.selectNodeContents(n),e.collapse(!1),t?.removeAllRanges(),t?.addRange(e)}s(!1),l(``),d(`command`),p(0),x.current=null,n.dispatchEvent(new InputEvent(`input`,{bubbles:!0})),n.focus()},[e]);return{isMenuOpen:o,filteredItems:g,selectedIndex:f,updateSlashMenu:C,selectItem:T,handleSlashKeyDown:(0,Y.useCallback)(e=>{let t=v.current;if(!_.current||t.length===0)return!1;switch(e.key){case`ArrowDown`:return e.preventDefault(),p(e=>e<t.length-1?e+1:0),!0;case`ArrowUp`:return e.preventDefault(),p(e=>e>0?e-1:t.length-1),!0;case`Enter`:case`Tab`:{let n=t[y.current];return n?(e.preventDefault(),T(n),!0):!1}case`Escape`:return e.preventDefault(),s(!1),!0;case`ArrowLeft`:case`ArrowRight`:case`Home`:case`End`:return s(!1),!1;default:return!1}},[T]),closeMenu:(0,Y.useCallback)(()=>s(!1),[])}},Z=r();function or({gripRef:e,isGripVisible:t,isGripDragging:n,canResize:r,handleTopEdgeClick:i,handleGripMouseDown:a,handleGripTouchStart:o}){return(0,Z.jsxs)(`div`,{className:F(`absolute top-0 left-0 w-full h-3 z-20 group`,!r&&`pointer-events-none`),id:`resize-grip`,onClick:r?i:void 0,children:[r&&(0,Z.jsx)(`div`,{className:`absolute inset-0 z-[1] cursor-ns-resize select-none`,onMouseDown:a,onTouchStart:o,"aria-hidden":!0}),(0,Z.jsx)(`div`,{ref:e,className:F(`pointer-events-none absolute top-0 left-0 w-full h-px bg-white z-[2] transition-opacity duration-200`,!r&&`opacity-0`,r&&(t||n?`opacity-100`:`opacity-0 group-hover:opacity-100`))})]})}var sr=e=>(0,Z.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,Z.jsx)(`path`,{d:`M15.5 10C16.3284 10 17 9.32843 17 8.5C17 7.67157 16.3284 7 15.5 7C14.6716 7 14 7.67157 14 8.5C14 9.32843 14.6716 10 15.5 10Z`,fill:`currentColor`}),(0,Z.jsx)(`path`,{d:`M3 5C3 3.89543 3.89543 3 5 3H19C20.1046 3 21 3.89543 21 5V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5ZM19 5H5V12.9194L8.37534 10.2191C8.74056 9.92696 9.25951 9.92696 9.62473 10.2191L13.9258 13.66L15.2929 12.2929C15.6835 11.9024 16.3166 11.9024 16.7071 12.2929L19 14.5857V5ZM5 19H19V17.4142L16 14.4142L14.7071 15.7071C14.3468 16.0674 13.7732 16.0992 13.3753 15.7809L9.00004 12.2806L5 15.4807V19Z`,fill:`currentColor`})]}),cr=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:17,height:17,viewBox:`0 0 17 17`,fill:`none`,...e,children:(0,Z.jsx)(`path`,{d:`M14.2541 0.99075C15.0629 0.811957 15.8642 1.32275 16.0432 2.13138C16.222 2.94015 15.7113 3.74145 14.9026 3.92044C10.5163 4.8902 8.31751 8.22203 8.09593 11.8745L10.343 9.62942C10.863 9.10947 11.7057 9.10867 12.2258 9.62845C12.7459 10.1486 12.7459 10.9921 12.2258 11.5122L7.52073 16.2173C7.03316 16.7049 6.26163 16.7357 5.73851 16.3091L5.63694 16.2173L0.93089 11.5122C0.411068 10.9922 0.411047 10.1485 0.93089 9.62845C1.45095 9.10851 2.29457 9.10859 2.81468 9.62845L5.09691 11.9107C5.32362 7.06867 8.20704 2.32786 14.2541 0.99075Z`,fill:`currentColor`})});function lr(){let{t:e}=a(`openhands`);return(0,Z.jsx)(`div`,{className:`drag-over`,children:(0,Z.jsxs)(`div`,{className:`drag-over-content-wrapper`,children:[(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(sr,{width:36,height:36,className:`rotate-[-27deg] absolute top-[-40px] left-[-10px]`}),(0,Z.jsx)(cr,{width:16,height:16,className:`absolute top-[-16px] left-[-20px]`})]}),(0,Z.jsx)(`div`,{className:`drag-over-content`,children:(0,Z.jsx)(`p`,{children:e(T.COMMON$DROP_YOUR_FILES_HERE)})})]})})}function ur({onClick:e}){return(0,Z.jsx)(`button`,{type:`button`,onClick:e,className:F(`z-10 flex w-4 h-4 rounded-full items-center justify-center bg-[var(--oh-surface)] hover:bg-[var(--oh-muted)] cursor-pointer absolute top-1 right-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200`,A()&&`opacity-100`),children:(0,Z.jsx)(He,{width:10,height:10,color:`#ffffff`})})}function dr({file:e,onRemove:t,isLoading:n=!1}){let r=ee(e.name);return(0,Z.jsxs)(`div`,{className:`group flex gap-2 rounded-lg bg-[var(--oh-interactive-hover)] max-w-[160px] px-3 py-1 relative`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-col justify-center gap-0.25`,children:[(0,Z.jsx)(ur,{onClick:t}),(0,Z.jsx)(`div`,{className:`flex items-center gap-2 w-full`,children:(0,Z.jsx)(`span`,{className:F(`text-sm font-normal leading-5 flex-1 max-w-[136px] truncate`,n?`max-w-[108px] text-[var(--oh-muted)]`:`text-white`),children:e.name})}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(dn,{width:12,height:12,color:`var(--oh-muted)`}),(0,Z.jsx)(`span`,{className:`text-[9px] font-normal leading-5 text-[var(--oh-muted)]`,children:r})]})]}),n&&(0,Z.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,Z.jsx)(z,{className:`animate-spin w-5 h-5`,color:`white`})})]})}function fr({active:e,onToggle:t}){let{t:n}=a(`openhands`),r=n(T.CHAT_INTERFACE$UPLOAD_IMAGES_AS_FILES),i=n(T.CHAT_INTERFACE$DO_NOT_UPLOAD_AS_FILE),o=e?i:r;return(0,Z.jsx)(`div`,{className:`absolute bottom-2 left-1 z-10 h-4 w-4`,children:(0,Z.jsx)(Pe,{content:o,placement:`bottom`,offset:10,shouldFlip:!1,tooltipClassName:`bg-white text-black text-xs font-medium leading-5`,children:(0,Z.jsx)(`button`,{type:`button`,"aria-label":o,"aria-pressed":e,onClick:e=>{e.stopPropagation(),t()},className:F(`flex h-4 w-4 items-center justify-center rounded-full bg-[var(--oh-surface)] text-[var(--oh-foreground)] transition-colors cursor-pointer hover:bg-[var(--oh-muted)]`),children:e?(0,Z.jsx)(ue,{width:10,height:10,strokeWidth:2.5,"aria-hidden":!0}):(0,Z.jsx)(pe,{width:10,height:10,strokeWidth:2.5,"aria-hidden":!0})})})})}function pr({image:e,onRemove:t,isLoading:n=!1,showUploadAsFileToggle:r=!1,uploadAsFileActive:i=!1,onToggleUploadAsFile:a}){let[o,s]=Y.useState(``);return Y.useEffect(()=>{let t=URL.createObjectURL(e);return s(t),()=>{URL.revokeObjectURL(t)}},[e]),(0,Z.jsxs)(`div`,{className:`group relative flex h-[49px] w-[51px] min-h-[49px] min-w-[51px] items-center justify-center rounded-lg bg-[var(--oh-interactive-hover)]`,children:[n?(0,Z.jsx)(z,{className:`animate-spin w-5 h-5`,color:`white`}):o&&(0,Z.jsx)(`img`,{src:o,alt:e.name,className:`h-full w-full rounded-lg object-cover`}),(0,Z.jsx)(ur,{onClick:t}),r&&a&&(0,Z.jsx)(fr,{active:i,onToggle:a})]})}function mr(){let{images:e,files:t,loadingFiles:n,loadingImages:r,imagesMarkedUploadAsFile:i,removeFile:a,removeImage:o,toggleImageUploadAsFile:s}=W(),c=e=>{a(e)},l=e=>{o(e)};return e.length===0&&t.length===0&&n.length===0&&r.length===0?null:(0,Z.jsx)(`div`,{className:`flex w-full flex-col gap-2 pb-4`,children:(0,Z.jsxs)(`div`,{className:`flex w-full items-center gap-4 overflow-x-auto custom-scrollbar`,children:[t.map((e,t)=>(0,Z.jsx)(dr,{file:e,onRemove:()=>c(t),isLoading:n.includes(e.name)},`file-${t}-${e.name}`)),n.map((e,t)=>(0,Z.jsx)(dr,{file:new File([],e),onRemove:()=>{},isLoading:!0},`loading-file-${t}-${e}`)),e.map((e,t)=>(0,Z.jsx)(pr,{image:e,onRemove:()=>l(t),isLoading:r.includes(e.name),showUploadAsFileToggle:!0,uploadAsFileActive:i.includes(e.name),onToggleUploadAsFile:()=>s(e.name)},`image-${t}-${e.name}`)),r.map((e,t)=>(0,Z.jsx)(pr,{image:new File([],e),onRemove:()=>{},isLoading:!0,showUploadAsFileToggle:!0,uploadAsFileActive:i.includes(e),onToggleUploadAsFile:()=>s(e)},`loading-image-${t}-${e}`))]})})}function hr({chatInputRef:e,disabled:t=!1,onInput:n,onPaste:r,onKeyDown:i,onFocus:o,onBlur:s}){let{t:c}=a(`openhands`),l=W(e=>e.conversationMode)===`plan`;return Y.useEffect(()=>{t||Mn(e.current)},[]),(0,Z.jsx)(`div`,{className:`box-border content-stretch flex flex-row items-center justify-start min-h-6 p-0 relative shrink-0 flex-1`,"data-name":`Text & caret`,children:(0,Z.jsx)(`div`,{className:`basis-0 flex flex-col font-normal grow justify-center leading-[0] min-h-px min-w-px overflow-ellipsis overflow-hidden relative shrink-0 text-[var(--oh-text-tertiary)] text-[16px] text-left`,children:(0,Z.jsx)(`div`,{ref:e,className:F(`chat-input bg-transparent text-white text-[16px] font-normal leading-[20px] outline-none resize-none custom-scrollbar min-h-[20px] max-h-[400px] [text-overflow:inherit] [text-wrap-mode:inherit] [white-space-collapse:inherit] block whitespace-pre-wrap`,t&&`cursor-not-allowed opacity-50`),contentEditable:!t,"data-placeholder":c(l?T.COMMON$LET_S_WORK_ON_A_PLAN:T.SUGGESTIONS$WHAT_TO_BUILD),"data-testid":`chat-input`,onInput:n,onPaste:r,onKeyDown:i,onFocus:o,onBlur:s})})})}function gr({chatInputRef:e,isNewConversationPending:t=!1,onInput:n,onPaste:r,onKeyDown:i,onFocus:a,onBlur:o}){return(0,Z.jsx)(`div`,{className:`box-border content-stretch flex flex-row items-end justify-between p-0 relative shrink-0 w-full pb-[18px] gap-2`,children:(0,Z.jsx)(`div`,{className:`basis-0 box-border content-stretch flex flex-row gap-4 grow items-end justify-start min-h-px min-w-px p-0 relative shrink-0`,children:(0,Z.jsx)(hr,{chatInputRef:e,disabled:t,onInput:n,onPaste:r,onKeyDown:i,onFocus:a,onBlur:o})})})}var _r=e(n(),1),vr=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Z.jsx)(`path`,{d:`M9 6C9.55228 6 10 6.44772 10 7V17C10 17.5523 9.55228 18 9 18C8.44772 18 8 17.5523 8 17V7C8 6.44772 8.44772 6 9 6ZM15 6C15.5523 6 16 6.44772 16 7V17C16 17.5523 15.5523 18 15 18C14.4477 18 14 17.5523 14 17V7C14 6.44772 14.4477 6 15 6Z`,fill:`currentColor`})});function yr({handleStop:e}){return(0,Z.jsx)(`button`,{type:`button`,onClick:e,"data-testid":`stop-button`,className:`cursor-pointer`,children:(0,Z.jsx)(vr,{className:`block max-w-none w-4 h-4 text-current`})})}var br=e=>(0,Z.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Z.jsx)(`path`,{d:`M15 11H13V7C13 6.73478 12.8946 6.48043 12.7071 6.29289C12.5196 6.10536 12.2652 6 12 6C11.7348 6 11.4804 6.10536 11.2929 6.29289C11.1054 6.48043 11 6.73478 11 7V12C11 12.2652 11.1054 12.5196 11.2929 12.7071C11.4804 12.8946 11.7348 13 12 13H15C15.2652 13 15.5196 12.8946 15.7071 12.7071C15.8946 12.5196 16 12.2652 16 12C16 11.7348 15.8946 11.4804 15.7071 11.2929C15.5196 11.1054 15.2652 11 15 11ZM12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17317C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8079C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C22 10.6868 21.7413 9.38642 21.2388 8.17317C20.7363 6.95991 19.9997 5.85752 19.0711 4.92893C18.1425 4.00035 17.0401 3.26375 15.8268 2.7612C14.6136 2.25866 13.3132 2 12 2ZM12 20C10.4178 20 8.87104 19.5308 7.55544 18.6518C6.23985 17.7727 5.21447 16.5233 4.60897 15.0615C4.00347 13.5997 3.84504 11.9911 4.15372 10.4393C4.4624 8.88743 5.22433 7.46197 6.34315 6.34315C7.46197 5.22433 8.88743 4.4624 10.4393 4.15372C11.9911 3.84504 13.5997 4.00346 15.0615 4.60896C16.5233 5.21447 17.7727 6.23984 18.6518 7.55544C19.5308 8.87103 20 10.4177 20 12C20 14.1217 19.1572 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20Z`,fill:`currentColor`})}),xr=e=>(0,Z.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Z.jsx)(`path`,{d:`M8 8.37911C8 7.31633 9.15785 6.65415 10.0798 7.18966L16.3139 10.8105C17.2287 11.3419 17.2287 12.6581 16.3139 13.1895L10.0798 16.8103C9.15785 17.3459 8 16.6837 8 15.6209V8.37911Z`,fill:`currentColor`})});function Sr({onAgentResumed:e,disabled:t=!1}){return(0,Z.jsx)(`button`,{type:`button`,onClick:e,"data-testid":`play-button`,disabled:t,className:F(`cursor-pointer`,t&&`cursor-not-allowed`),children:(0,Z.jsx)(xr,{className:`block max-w-none w-4 h-4 text-current`})})}function Cr(){return(0,Z.jsx)(`div`,{"data-testid":`agent-loading-spinner`,children:(0,Z.jsx)(z,{className:`animate-spin w-4 h-4 text-current`})})}function wr(){let e=Zt();return e?e.connectionState:`CLOSED`}function Tr(){let e=Zt();return e?e.mainConnectionState:`CLOSED`}var Er=et()((e,t)=>({byTaskId:{},setPendingTaskAttachments:(t,n)=>e(e=>({byTaskId:{...e.byTaskId,[t]:n}})),consumePendingTaskAttachments:n=>{let r=t().byTaskId[n];return r?(e(e=>{let{[n]:t,...r}=e.byTaskId;return{byTaskId:r}}),r):null}}));function Dr(e,t){Er.getState().setPendingTaskAttachments(e,t)}function Or(e){return Er.getState().consumePendingTaskAttachments(e)}var kr=e=>new Promise((t,n)=>{let r=new FileReader;r.onloadend=()=>{t(r.result)},r.onerror=n,r.readAsDataURL(e)}),Ar=3*1024*1024,jr=3*1024*1024;function Mr(e){let t=e.filter(e=>e.size>Ar);if(t.length>0){let e=t.map(e=>e.name);return{isValid:!1,errorMessage:`Files exceeding 3MB are not allowed: ${e.join(`, `)}`,oversizedFiles:e}}return{isValid:!0}}function Nr(e,t=[]){let n=t.reduce((e,t)=>e+t.size,0)+e.reduce((e,t)=>e+t.size,0);return n>jr?{isValid:!1,errorMessage:`Total file size would be ${(n/(1024*1024)).toFixed(1)}MB, exceeding the 3MB limit. Please select fewer or smaller files.`}:{isValid:!0}}function Pr(e,t=[]){let n=Mr(e);return n.isValid?Nr(e,t):n}async function Fr(e){let{conversationId:t,content:n,images:r,files:i,imagesMarkedUploadAsFile:a,t:o}=e,{imagesToEmbed:s,imagesAsFiles:c}=Tn(r,a),l=[...i,...c],u=Pr([...s,...l]);if(!u.isValid)throw Error(u.errorMessage??`Invalid attachments`);let d=await Promise.all(s.map(e=>kr(e))),f=await gt(t),{skipped_files:p,uploaded_files:m}=l.length>0?await vt(t,l):{skipped_files:[],uploaded_files:[]};p.forEach(e=>S(e.reason));let h=`${o(T.CHAT_INTERFACE$AUGMENTED_PROMPT_FILES_TITLE)}: ${m.join(`
|
|
2
|
+
|
|
3
|
+
`)}`,g=m.length>0?`${n}\n\n${h}`:n,_=new Date().toISOString(),v={role:`user`,content:[{type:`text`,text:g}]};return d.length>0&&v.content.push({type:`image`,image_urls:d}),await G.sendMessage(t,v,f),{text:n,content:g,imageUrls:d,fileUrls:m,timestamp:_}}async function Ir(e,t){let n=Or(e);if(n)try{await C(),await Fr({conversationId:t,content:n.content,images:n.images,files:n.files,imagesMarkedUploadAsFile:n.imagesMarkedUploadAsFile,t:v.getFixedT(null,x)})}catch(e){throw S(e instanceof Error?e.message:null),e}}var Lr=new Map,Rr=null;function zr(e,t){Lr.set(e,t)}function Br(e){Lr.delete(e)}function Vr(e,t){Rr={fromConversationId:e,toConversationId:t}}function Hr(e){if(Rr?.toConversationId!==e)return null;let t=Rr;return Rr=null,t}function Ur(e,t){return t===e?!0:Lr.get(e)===t}var Wr=(e,t)=>{let n=e.request.plugins?.map(lt);if(!n?.length)return;let r=ot(t);st(t,{...r,selected_repository:r?.selected_repository??e.request.selected_repository??null,selected_branch:r?.selected_branch??e.request.selected_branch??null,git_provider:r?.git_provider??e.request.git_provider??null,plugins:n})},Gr=()=>{let{conversationId:e}=q(),t=!!e&&e.startsWith(`task-`),n=t?e.replace(`task-`,``):null,r=c({queryKey:[`start-task`,n],queryFn:async()=>n?G.getStartTask(n):null,enabled:!!n,refetchInterval:e=>{let t=e.state.data;return!t||t.status===`READY`||t.status===`ERROR`?!1:3e3},retry:!1});return{isTask:t,taskId:n,conversationId:t?null:e??null,task:r.data,taskStatus:r.data?.status,taskDetail:r.data?.detail,taskError:r.error,isLoadingTask:r.isLoading,repositoryInfo:{selectedRepository:r.data?.request?.selected_repository,selectedBranch:r.data?.request?.selected_branch,gitProvider:r.data?.request?.git_provider}}},Kr=()=>{let e=Gr(),{task:t,taskId:n}=e,{conversationId:r}=q(),{navigate:i}=je(),a=Xe(),o=(0,Y.useRef)(null);return(0,Y.useLayoutEffect)(()=>{if(!r)return;let e=Hr(r);e&&(Yt.getState().reassignPendingMessages(e.fromConversationId,e.toConversationId),Br(e.toConversationId))},[r]),(0,Y.useEffect)(()=>{let e=t?.app_conversation_id;!n||t?.status!==`READY`||!e||o.current===n||(o.current=n,ye(n,e),Wr(t,e),(async()=>{await Ir(n,e);let t=`task-${n}`;zr(e,t),Vr(t,e);let r=it(n);r&&rt(e,{draftMessage:r}),i(a(`/conversations/${e}`),{replace:!0})})())},[a,t,n,i]),e},qr=(e,t)=>{let n=c({queryKey:[`sub-conversation-task`,e],queryFn:async()=>e?G.getStartTask(e):null,enabled:!!e&&!!t,refetchInterval:e=>{let t=e.state.data;return!t||t.status===`READY`||t.status===`ERROR`?!1:3e3},retry:!1});return{task:n.data,taskStatus:n.data?.status,taskDetail:n.data?.detail,taskError:n.error,isLoadingTask:n.isLoading,subConversationId:n.data?.app_conversation_id}},Jr=`/assets/notification-Cyeyy5ud.mp3`,Yr=[P.AWAITING_USER_INPUT,P.FINISHED,P.AWAITING_USER_CONFIRMATION];function Xr(e){let{data:t}=H(),n=(0,Y.useRef)(void 0),r=(0,Y.useRef)(void 0);(0,Y.useEffect)(()=>{typeof window<`u`&&!n.current&&(n.current=new Audio(Jr),n.current.volume=.5)},[]);let i=t?.enable_sound_notifications??!1;(0,Y.useEffect)(()=>{r.current!==e&&(r.current=e,Yr.includes(e)&&i&&n.current&&(n.current.currentTime=0,n.current.play().catch(()=>{})))},[e,i])}function Zr({className:e=``,handleStop:t,handleResumeAgent:n,disabled:r=!1,isPausing:i=!1}){let{t:o}=a(`openhands`),{setShouldShownAgentLoading:s}=W(),{curAgentState:c,executionStatus:l}=Gt();Xr(c);let u=wr(),{data:d}=J(),{taskStatus:f}=Gr(),{subConversationTaskId:p}=W(),{taskStatus:m}=qr(p,d?.id||null),h=k(u,l??null,f,m),g=c===P.INIT||c===P.LOADING||u===`CONNECTING`&&f!==`ERROR`||ce(f)||ce(m),_=g||i,v=c===P.ERROR||c===P.RATE_LIMITED||u===`CLOSED`||f===`ERROR`,y=!v&&c===P.RUNNING,b=!v&&(c===P.STOPPED||c===P.PAUSED),x=!_&&(y||b),S=h===T.CHAT_INTERFACE$AGENT_FINISHED_MESSAGE,C=h===T.AGENT_STATUS$WAITING_FOR_TASK,w=S||C,[E,D]=(0,Y.useState)(!0),[O,A]=(0,Y.useState)(!1);return(0,Y.useEffect)(()=>{s(!!g)},[g,s]),(0,Y.useEffect)(()=>{if(!w){D(!0),A(!1);return}D(!0),A(!1);let e=window.setTimeout(()=>{A(!0)},1e3),t=window.setTimeout(()=>{D(!1)},1500);return()=>{window.clearTimeout(e),window.clearTimeout(t)}},[w]),w&&!E?null:(0,Z.jsxs)(`div`,{className:F(`flex items-center gap-1 min-w-0`,w&&`transition-opacity duration-500`,O&&`opacity-0`,e),children:[(0,Z.jsx)(`span`,{className:`text-[11px] text-[var(--oh-muted)] font-normal leading-5 min-w-0 max-w-full truncate`,title:o(h),children:o(h)}),(0,Z.jsxs)(`div`,{className:F(`box-border content-stretch flex flex-row gap-[3px] items-center justify-center overflow-clip px-0.5 py-1 relative rounded-[100px] shrink-0 size-6 transition-all duration-200 active:scale-95 bg-transparent text-[var(--oh-muted)] hover:bg-white/10 hover:text-white`,x?`cursor-pointer`:`cursor-default`),children:[_&&(0,Z.jsx)(Cr,{}),!_&&y&&(0,Z.jsx)(yr,{handleStop:t}),!_&&b&&(0,Z.jsx)(Sr,{onAgentResumed:n,disabled:r}),!_&&v&&(0,Z.jsx)(Ye,{className:`w-4 h-4 text-current`,"data-testid":`circle-error-icon`}),!_&&!y&&!b&&!v&&(w?(0,Z.jsx)(R,{className:`w-4 h-4 text-current`}):(0,Z.jsx)(br,{className:`w-4 h-4 text-current`}))]})]})}function Qr(e){return(0,Z.jsx)(`svg`,{viewBox:`0 0 257 183`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,...e,children:(0,Z.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M151.663 5.36257C158.763 -1.73743 170.363 -1.83743 177.563 5.36257L250.663 78.4626C257.763 85.5626 257.863 97.1626 250.663 104.363L177.563 177.463C170.363 184.563 158.863 184.563 151.663 177.463C144.563 170.263 144.563 158.763 151.663 151.563L211.863 91.3626L151.663 31.1626C144.563 24.1626 144.563 12.5626 151.663 5.36257ZM104.463 5.36257C97.3626 -1.73743 85.7626 -1.83743 78.5626 5.36257L5.36257 78.4626C-1.73743 85.5626 -1.83743 97.1626 5.36257 104.363L78.4626 177.463C85.6626 184.563 97.1626 184.563 104.363 177.463C111.463 170.263 111.463 158.763 104.363 151.563L44.1626 91.4626L104.363 31.2626C111.563 24.1626 111.563 12.5626 104.463 5.36257Z`,fill:`currentColor`})})}function $r({icon:e,text:t,className:n,iconClassName:r,isActive:i=!1}){return(0,Z.jsxs)(`div`,{className:F(`flex min-w-0 items-center`,Fe,n),children:[(0,Z.jsx)(e,{className:F(`h-4 w-4`,Re,r)}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 leading-5`,children:t}),i&&(0,Z.jsx)(Vt,{width:14,height:14,className:`shrink-0`,"aria-hidden":!0})]})}function ei({icon:e,title:t,description:n,className:r,iconClassName:i,isActive:a=!1}){return(0,Z.jsxs)(`div`,{className:F(`flex min-w-0 w-full flex-col justify-center gap-1`,r),children:[(0,Z.jsx)($r,{icon:e,text:t,className:`px-0`,iconClassName:i,isActive:a}),(0,Z.jsx)(K.Text,{className:`text-[var(--oh-muted)] text-[10px] font-normal whitespace-pre-wrap break-words`,children:n})]})}function ti({activeMode:e,onClose:t,onCodeClick:n,onPlanClick:r}){let{t:i}=a(`openhands`),o=St(t);return(0,Z.jsxs)(B,{ref:o,testId:`change-agent-context-menu`,position:`top`,alignment:`left`,className:`min-h-fit mb-2 min-w-[195px] max-w-[195px]`,children:[(0,Z.jsx)(V,{testId:`code-option`,onClick:e=>{e.preventDefault(),e.stopPropagation(),n?.(e),t()},className:F(e===`code`&&`bg-[var(--oh-interactive-hover)]`),children:(0,Z.jsx)(ei,{icon:fn,title:i(T.COMMON$CODE),description:i(T.COMMON$CODE_AGENT_DESCRIPTION),isActive:e===`code`})}),(0,Z.jsx)(V,{testId:`plan-option`,onClick:e=>{e.preventDefault(),e.stopPropagation(),r?.(e),t()},className:F(e===`plan`&&`bg-[var(--oh-interactive-hover)]`),children:(0,Z.jsx)(ei,{icon:rn,title:i(T.COMMON$PLAN),description:i(T.COMMON$PLAN_AGENT_DESCRIPTION),isActive:e===`plan`})})]})}var ni=1e3*60*5,ri=1e3*60*15,ii=e=>{let t=e||[],n=b();return c({queryKey:[...f.subConversations,t,n.backend.id,n.orgId],queryFn:async()=>t.length===0?[]:G.batchGetAppConversations(t),enabled:t.length>0,staleTime:ni,gcTime:ri,retry:!1})};function ai(e){let t=i();return s({mutationKey:u.create,mutationFn:e=>G.createLocalPlanningConversation(e.parentConversationId,e.initialMessage),onSuccess:(n,r)=>{e.onCreated(n.id),_t(t,r.parentConversationId),t.invalidateQueries({queryKey:f.subConversations}),e.onInitialized()},onError:e.onFailed})}function oi(e){let t=nt(e.conversationId);t.subConversationTaskId&&!e.subConversationTaskId&&e.setSubConversationTaskId(t.subConversationTaskId);let n=e.serverPlanningConversationId??ot(e.conversationId)?.local_planning_conversation_id??null;n&&n!==e.localPlanningConversationId&&e.setLocalPlanningConversationId(n)}var si=()=>{let{t:e}=a(`openhands`),{backend:t}=b(),{setConversationMode:n,setSubConversationTaskId:r,subConversationTaskId:i,setLocalPlanningConversationId:o,localPlanningConversationId:s}=W(),{data:c}=J(),{mutate:l,isPending:u}=Ot(),{mutate:d,isPending:f}=ai({onCreated:o,onInitialized:()=>{g(e(T.PLANNING_AGENTT$PLANNING_AGENT_INITIALIZED))},onFailed:()=>{n(`code`),S(e(T.CONVERSATION$ERROR_STARTING_CONVERSATION))}}),p=t.kind!==`cloud`,{data:m}=ii(p?c?.sub_conversation_ids:void 0),h=p?ut(m,c?.id):null;(0,Y.useEffect)(()=>{c?.id&&oi({conversationId:c.id,serverPlanningConversationId:h,subConversationTaskId:i,localPlanningConversationId:s,setSubConversationTaskId:r,setLocalPlanningConversationId:o})},[c?.id,h,s,o,i,r]);let _=!!(c?.sub_conversation_ids&&c.sub_conversation_ids.length>0||i),v=p?!!(s||h):_;return{handlePlanClick:(0,Y.useCallback)((i,a)=>{if(i?.preventDefault(),i?.stopPropagation(),n(`plan`),t.kind!==`cloud`){if(!c?.id||s||h||f)return;d({parentConversationId:c.id,initialMessage:a});return}_||!c?.id||l({parentConversationId:c.id,agentType:`plan`,entryPoint:`plan_sub_conversation`,...a?{query:a}:{}},{onSuccess:t=>{g(e(T.PLANNING_AGENTT$PLANNING_AGENT_INITIALIZED)),t.task_id&&(r(t.task_id),rt(c.id,{subConversationTaskId:t.task_id}))}})},[t.kind,c,l,d,_,f,s,h,n,r,e]),hasPlanner:v,isCreatingConversation:u||f}};function ci(){let[e,t]=(0,Y.useState)(!1),{conversationMode:n,setConversationMode:r,subConversationTaskId:o}=W(),{conversationId:s}=q(),c=!s,l=wr()===`OPEN`,{curAgentState:u}=Gt(),{t:d}=a(`openhands`),f=u===P.RUNNING,{data:p}=J(),m=i(),h=(0,Y.useRef)(null),{taskStatus:g,subConversationId:_}=qr(o,p?.id||null);(0,Y.useEffect)(()=>{g===`READY`&&_&&p?.id&&o&&h.current!==o&&(h.current=o,m.invalidateQueries({queryKey:[`user`,`conversation`,p.id]}))},[g,_,p?.id,o,m]);let{handlePlanClick:v,isCreatingConversation:y}=si();(0,Y.useEffect)(()=>{(f||!l)&&e&&t(!1)},[f,e,l]);let b=c||f||y||!l;(0,Y.useEffect)(()=>{if(b)return;let e=e=>{if(e.shiftKey&&e.key===`Tab`){e.preventDefault(),e.stopPropagation();let t=n===`code`?`plan`:`code`;t===`plan`?v(e):r(t)}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[b,n,r,v]);let x=n=>{n.preventDefault(),n.stopPropagation(),t(!e)},S=e=>{e.preventDefault(),e.stopPropagation(),r(`code`)},C=n===`code`,w=(0,Y.useMemo)(()=>d(C?T.COMMON$CODE:T.COMMON$PLAN),[C,d]),E=(0,Y.useMemo)(()=>C?(0,Z.jsx)(Qr,{className:`h-[11px] w-[11px] shrink-0`}):(0,Z.jsx)(rn,{width:18,height:18,color:`currentColor`}),[C]),D=(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsxs)(`button`,{type:`button`,onClick:x,disabled:b,className:F(`flex items-center rounded-[100px]`,Ee,C?`border border-transparent text-[var(--oh-muted)]`:`border border-[#597FF4] bg-[#4A67BD]`,!b&&C&&F(`cursor-pointer`,`hover:text-white hover:bg-white/10`),!b&&!C&&`cursor-pointer text-white hover:bg-[#597FF4]`,b&&F(`opacity-50 cursor-not-allowed`,C&&`border-transparent`)),children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-1 pl-1.5`,children:[E,(0,Z.jsx)(K.Text,{className:`text-2.75 not-italic font-normal leading-5`,children:w})]}),(0,Z.jsx)(ze,{isOpen:e})]}),e&&(0,Z.jsx)(ti,{activeMode:n,onClose:()=>t(!1),onCodeClick:S,onPlanClick:v})]});return c?(0,Z.jsx)(Pe,{content:d(T.CHANGE_AGENT$SWITCH_AFTER_CONVERSATION),placement:`top`,children:D}):D}var li=`/settings/agents`,ui=`/settings/llm`;function di(){let{t:e}=a(`openhands`),{backend:t}=b(),{data:n}=J(),{data:r}=H(),i=Je(),o=n?.agent_kind===`acp`,s=!n&&(i??r?.agent_settings?.agent_kind)===`acp`,c=o||s;return{isActiveAcpConversation:o,isHomeAcp:s,isAcpContext:c,destinationPath:c?li:ui,destinationLabel:e(c?T.SETTINGS$NAV_AGENT:t.kind===`cloud`?T.SETTINGS$LLM_SETTINGS:T.SETTINGS$LLM_PROFILES)}}function fi(e,t,n){return[...p.all,e,t,`detail`,n]}function pi(){let{backend:e,orgId:t}=b(),{conversationId:n}=q(),{activeProfile:r}=Ze(),i=r?.agent_kind===`acp`?r.name:null,{data:a}=c({queryKey:fi(e.id,t,i??``),queryFn:()=>wt.getProfile(i),enabled:!n&&i!=null,...d,...y,meta:{disableToast:!0}}),o=a?.profile;return o?.agent_kind===`acp`?o:null}function mi(){let{data:e}=J(),{data:t}=H(),{conversationId:n}=q(),{backend:r}=b(),i=Pt(),a=pi(),{isActiveAcpConversation:o,isHomeAcp:s,isAcpContext:c,destinationPath:l,destinationLabel:u}=di(),d=typeof t?.agent_settings?.acp_server==`string`?t.agent_settings.acp_server:null,f=o?e?.acp_server:s?a?.acp_server??d:null,p=c?mt(f):void 0,m=typeof t?.agent_settings?.acp_model==`string`?t.agent_settings.acp_model:null,h=s&&a?a.acp_model:m,g=null;g=o?e?.llm_model??ft({configured:h,providerDefault:pt(f)}):s?ft({configured:h,providerDefault:pt(f)}):e?.llm_model??t?.llm_model??null;let _=g&&c?ht(f,g)??g:g,v=p?.available_models??[],y=!s||r.kind!==`cloud`||i,x=c&&v.length>0&&y;return{isAcpContext:c,displayModel:_,currentModelId:g,availableAcpModels:v,showAcpPicker:x,switchConversationId:o?n??null:null,destinationPath:l,destinationLabel:u}}var hi=()=>{let e=i(),{backend:t,orgId:n}=b();return s({mutationFn:async({conversationId:r,model:i})=>{if(r){await G.switchAcpModel(r,i);return}let a=await e.ensureQueryData({queryKey:[...p.all,t.id,n],queryFn:wt.listProfiles,...y}),o=a.profiles?.find(e=>e.id!=null&&e.id===a.active_agent_profile_id);if(o?.agent_kind===`acp`){let r=await e.ensureQueryData({queryKey:fi(t.id,n,o.name),queryFn:()=>wt.getProfile(o.name),...y});await wt.saveProfile(o.name,mn(r.profile,{agent_kind:`acp`,acp_model:i}));return}await Ce.saveSettings({agent_settings_diff:{acp_model:i}})},onSuccess:(t,{conversationId:n})=>{n?_t(e,n):(Ce.invalidateCache(),e.invalidateQueries({queryKey:h.personal()}),e.invalidateQueries({queryKey:p.all}))}})},gi=10,_i=22;function vi(e,t=gi){return e.length<=t?e:`${e.slice(0,t)}…`}function yi({model:e,onClose:t,dividerInset:n,settingsLinkClassName:r,settingsIconClassName:i}){let{t:o}=a(`openhands`),s=hi(),c=e.showAcpPicker||!!e.displayModel,l=n=>{n!==e.currentModelId&&s.mutate({conversationId:e.switchConversationId,model:n}),t()};return(0,Z.jsxs)(Z.Fragment,{children:[e.showAcpPicker?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`li`,{role:`presentation`,className:`px-2 pt-1 pb-0.5`,children:(0,Z.jsx)(K.Text,{className:`text-[11px] font-medium text-[var(--oh-text-dim)] uppercase tracking-wide leading-4`,children:o(T.MODEL$AVAILABLE_MODELS)})}),e.availableAcpModels.map(t=>{let n=t.id===e.currentModelId;return(0,Z.jsxs)(V,{testId:`chat-input-acp-model-option-${t.id}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),l(t.id)},className:F(`flex items-center gap-2`,n&&`bg-[var(--oh-interactive-hover)]`),children:[(0,Z.jsx)(`span`,{className:`flex-1 truncate text-sm leading-5`,title:t.label,children:t.label}),n&&(0,Z.jsx)(Vt,{width:14,height:14,className:`shrink-0`,"aria-hidden":!0})]},t.id)})]}):e.displayModel?(0,Z.jsx)(`li`,{className:`text-sm`,children:(0,Z.jsx)(`div`,{className:`p-2 leading-5 text-[var(--oh-foreground)] break-all`,children:e.displayModel})}):null,c&&(0,Z.jsx)(qe,{inset:n}),(0,Z.jsx)(`li`,{className:`text-sm`,children:(0,Z.jsxs)(Me,{to:e.destinationPath,onClick:t,className:F(`flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] transition-colors`,r),children:[(0,Z.jsx)(hn,{width:16,height:16,className:F(`shrink-0`,i),"aria-hidden":!0}),(0,Z.jsx)(`span`,{children:e.destinationLabel})]})})]})}function bi(){let e=mi(),[t,n]=Y.useState(!1),r=Y.useRef(null),i=St(()=>n(!1),r);if(!e.displayModel)return null;let a=vi(e.displayModel,e.isAcpContext?_i:gi);return(0,Z.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,Z.jsxs)(`button`,{ref:r,type:`button`,className:De,title:e.displayModel,"data-testid":`chat-input-llm-model`,"aria-expanded":t,"aria-haspopup":`dialog`,onClick:e=>{e.preventDefault(),e.stopPropagation(),n(e=>!e)},children:[(0,Z.jsx)(`span`,{children:a}),(0,Z.jsx)(ze,{isOpen:t})]}),t&&(0,Z.jsx)(B,{ref:i,testId:`chat-input-llm-model-popover`,position:`top`,alignment:`left`,spacing:`none`,className:`z-[60] mb-2 min-w-[200px] max-w-[320px] max-h-[60vh] overflow-y-auto`,children:(0,Z.jsx)(yi,{model:e,onClose:()=>n(!1)})})]})}var xi=[`switch-llm-profile`],Si=()=>{let e=i(),{t}=a();return s({mutationKey:xi,mutationFn:({conversationId:e,profileName:t})=>G.switchProfile(e,t),meta:{disableToast:!0},onMutate:({conversationId:e})=>({anchorEventId:e?$t():null}),onError:(e,{profileName:n})=>{let r=t(T.MODEL$SWITCH_FAILED,{name:n});S(_(e)||r)},onSuccess:(t,{conversationId:n,profileName:r},i)=>{e.invalidateQueries({queryKey:m.all}),n?(_t(e,n),tn(n,r,i?.anchorEventId??null),Qt(n,r)):(Ce.invalidateCache(),e.invalidateQueries({queryKey:h.personal()}))}})};function Ci(){let{mutate:e,isPending:t}=Si();return{switchAndLog:(0,Y.useCallback)((t,n)=>{e({conversationId:t,profileName:n})},[e]),isPending:t}}function wi(){let{conversationId:e}=q(),{data:t}=J(),{data:n,isLoading:r}=Ct(),i=Pt(),{switchAndLog:a}=Ci(),o=l({mutationKey:xi})>0,s=on(t=>e?t.activeProfileByConversation[e]:void 0),c=n?.profiles??[],u=t?.llm_model??null,d=t?.active_profile??null,f=d&&c.some(e=>e.name===d)?d:null,p=s??f??(u?c.find(e=>e.model===u)?.name??null:n?.active_profile??null),m=c.find(e=>e.name===p)?.model??u??null,h=!(e?.startsWith(`task-`)??!1)&&(!!e||i);return{profiles:c,currentProfileName:p,currentProfileModel:m,isLoading:r,isSwitching:o,canSwitchProfile:h,selectProfile:(0,Y.useCallback)(t=>{!h||t===p||a(e,t)},[h,e,p,a])}}var Ti=18;function Ei(e){return e.length<=Ti?e:`${e.slice(0,Ti)}…`}function Di({onClose:e,dividerInset:t,settingsLinkClassName:n,settingsIconClassName:r}){let{t:i}=a(`openhands`),{profiles:o,currentProfileName:s,currentProfileModel:c,canSwitchProfile:l,selectProfile:u}=wi(),d=l&&o.length>0,f=l?null:s,p=t=>{u(t),e()};return(0,Z.jsxs)(Z.Fragment,{children:[d&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`li`,{role:`presentation`,className:`px-2 pt-1 pb-0.5`,children:(0,Z.jsx)(K.Text,{className:`text-[11px] font-medium text-[var(--oh-text-dim)] uppercase tracking-wide leading-4`,children:i(T.SETTINGS$AVAILABLE_PROFILES)})}),o.map(t=>{let n=t.name===s,r=It(t.model);return(0,Z.jsxs)(V,{testId:`chat-input-llm-profile-option-${t.name}`,onClick:r=>{if(r.preventDefault(),r.stopPropagation(),n){e();return}p(t.name)},className:F(`flex flex-col items-stretch gap-0.5`,n&&`bg-[var(--oh-interactive-hover)]`),children:[(0,Z.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`flex-1 truncate text-sm leading-5`,title:t.model??t.name,children:t.name}),n&&(0,Z.jsx)(Vt,{width:14,height:14,className:`shrink-0`,"aria-hidden":!0})]}),r&&(0,Z.jsx)(`span`,{className:`block truncate text-xs leading-4 text-[var(--oh-muted)]`,children:r})]},t.name)})]}),f&&(0,Z.jsx)(`li`,{className:`text-sm`,"data-testid":`chat-input-llm-profile-current`,children:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-0.5 p-2 leading-5 text-[var(--oh-foreground)]`,children:[(0,Z.jsx)(`span`,{className:`truncate`,title:f,children:f}),c&&(0,Z.jsx)(`span`,{className:`truncate text-xs leading-4 text-[var(--oh-muted)]`,children:It(c)})]})}),(d||f)&&(0,Z.jsx)(qe,{inset:t}),(0,Z.jsx)(`li`,{className:`text-sm`,children:(0,Z.jsxs)(Me,{to:`/settings/llm`,onClick:e,className:F(`flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] transition-colors`,n),children:[(0,Z.jsx)(hn,{width:16,height:16,className:F(`shrink-0`,r),"aria-hidden":!0}),(0,Z.jsx)(`span`,{children:i(T.SETTINGS$LLM_PROFILES)})]})})]})}function Oi(){let{t:e}=a(`openhands`),{profiles:t,currentProfileName:n,isLoading:r,isSwitching:i}=wi(),[o,s]=Y.useState(!1),c=Y.useRef(null),l=St(()=>s(!1),c);if(r||t.length===0)return null;let u=n??e(T.LLM$SELECT_MODEL_PLACEHOLDER);return(0,Z.jsxs)(`div`,{className:`relative min-w-0`,children:[(0,Z.jsxs)(`button`,{ref:c,type:`button`,className:F(De,`max-w-[200px]`),title:n??void 0,"data-testid":`chat-input-llm-profile`,"aria-expanded":o,"aria-haspopup":`dialog`,disabled:i,"aria-busy":i,onClick:e=>{e.preventDefault(),e.stopPropagation(),s(e=>!e)},children:[(0,Z.jsx)(`span`,{className:`truncate`,children:Ei(u)}),(0,Z.jsx)(ze,{isOpen:o})]}),o&&(0,Z.jsx)(B,{ref:l,testId:`chat-input-llm-profile-popover`,position:`top`,alignment:`left`,spacing:`none`,className:`z-[60] mb-2 min-w-[200px] max-w-[320px] max-h-[60vh] overflow-y-auto`,children:(0,Z.jsx)(Di,{onClose:()=>s(!1)})})]})}function ki({isLoadingHistory:e,hasUserEvents:t,hasPendingUserMessages:n,hasSubstantiveAgentActions:r,hasModelEntries:i}){return e||t||n||r||i}function Ai({isAcp:e}){return e?`model`:`llm-profile`}var ji=()=>{let e=i(),{t}=a();return s({mutationFn:e=>G.updateConversationPublicFlag(e.conversationId,e.isPublic),onMutate:async t=>{let n=[`user`,`conversation`,t.conversationId];await e.cancelQueries({queryKey:n});let r=e.getQueriesData({queryKey:n});return e.setQueriesData({queryKey:n},e=>e&&typeof e==`object`?{...e,public:t.isPublic}:e),{previousEntries:r}},onError:(n,r,i)=>{i?.previousEntries?.forEach(([t,n])=>{e.setQueryData(t,n)}),S(t(T.CONVERSATION$FAILED_TO_UPDATE_PUBLIC_SHARING))},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,r.conversationId]}),e.invalidateQueries({queryKey:[`user`,`conversations`]})}})},Mi=`<secret-hidden>`;function Ni(e){let t=/(<CUSTOM_SECRETS>)([\s\S]*?)(<\/CUSTOM_SECRETS>|$)/gi,n=/^(\s*[^=:\n]+?\s*[:=]\s*)(.+?)\s*$/gm;return e.replace(t,(e,t,r,i)=>`${t}${r.replace(n,(e,t,n)=>n===Mi?e:`${t}${Mi}`)}${i}`)}function Pi(e){let t=e.find(qt);if(!t)return null;let n=t.dynamic_context?.text;return{content:n?`${t.system_prompt.text.trimEnd()}\n\n${Ni(n)}`:t.system_prompt.text,tools:t.tools??null,openhands_version:null,agent_class:null}}function Fi({conversationId:e,executionStatus:t,showOptions:n=!1,onContextMenuToggle:r}){let{t:i}=a(),{conversationId:o,navigate:s}=je(),{backend:c}=b(),l=Kt(e=>e.events),{mutate:u}=We(),{mutate:d}=Ue(),{mutate:f}=ji(),{data:p}=J(),[m,h]=Y.useState(!1),[_,v]=Y.useState(!1),[y,x]=Y.useState(!1),[S,C]=Y.useState(!1),[w,E]=Y.useState(!1),[D,O]=Y.useState(!1),{mutateAsync:k}=Ve(),{navigateToTab:A}=Xt(),j=Pi(l),ee=e=>{e.preventDefault(),e.stopPropagation(),E(!0),r?.(!1)},M=e=>{e.preventDefault(),e.stopPropagation(),O(!0),r?.(!1)},te=()=>{e&&u({conversationId:e},{onSuccess:()=>{e===o&&s(`/conversations`)}}),E(!1)},N=()=>{e&&d({conversationId:e}),O(!1)},ne=e=>{e.preventDefault(),e.stopPropagation(),r?.(!1)},P=async t=>{t.preventDefault(),t.stopPropagation(),e&&await k(e),r?.(!1)},re=e=>{e.stopPropagation(),A(`usage`),r?.(!1)},ie=e=>{e.stopPropagation(),h(!0),r?.(!1)},ae=e=>{e.stopPropagation(),v(!0),r?.(!1)},F=e=>{e.stopPropagation(),x(!0),r?.(!1)},oe=e=>{e.stopPropagation(),C(!0),r?.(!1)},ce=t=>{e&&p&&f({conversationId:e,isPublic:t??!p.public})},I=Y.useMemo(()=>e?`${c.kind===`cloud`?c.host.replace(/\/+$/,``):window.location.origin}/shared/conversations/${e}`:``,[e,c.kind,c.host]);return{handleDelete:ee,handleStop:M,handleEdit:ne,handleDownloadConversation:P,handleDisplayCost:re,handleShowAgentTools:ie,handleShowSkills:ae,handleShowPlugins:F,handleShowHooks:oe,handleTogglePublic:ce,handleCopyShareLink:e=>{if(e.preventDefault(),e.stopPropagation(),!I){r?.(!1);return}navigator.clipboard.writeText(I),g(i(T.CONVERSATION$LINK_COPIED))},shareUrl:I,handleConfirmDelete:te,handleConfirmStop:N,systemModalVisible:m,setSystemModalVisible:h,skillsModalVisible:_,setSkillsModalVisible:v,pluginsModalVisible:y,setPluginsModalVisible:x,hooksModalVisible:S,setHooksModalVisible:C,confirmDeleteModalVisible:w,setConfirmDeleteModalVisible:E,confirmStopModalVisible:D,setConfirmStopModalVisible:O,systemMessage:j,shouldShowStop:se(t),shouldShowDownloadConversation:!!(e&&n),shouldShowDisplayCost:n,shouldShowAgentTools:!!(n&&j),shouldShowSkills:!!(n&&e),shouldShowPlugins:!!(n&&e&&(ot(e)?.plugins?.length??0)>0),shouldShowHooks:!!(n&&e&&se(t))}}var Ii=e=>(0,Z.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Z.jsx)(`path`,{d:`M17 6.05994C16.3065 6.0604 15.6345 6.30114 15.0985 6.74118C14.5625 7.18123 14.1954 7.7934 14.0599 8.47355C13.9243 9.1537 14.0286 9.85981 14.355 10.4717C14.6813 11.0837 15.2097 11.5636 15.85 11.8299C15.6978 12.1949 15.4408 12.5065 15.1115 12.7254C14.7822 12.9444 14.3954 13.0608 14 13.0599H10C9.29505 13.0629 8.604 13.2564 8.00001 13.6199V7.87994C8.66722 7.64405 9.22956 7.17987 9.58764 6.56946C9.94571 5.95905 10.0765 5.2417 9.9568 4.54421C9.83713 3.84671 9.47473 3.21398 8.93367 2.75784C8.3926 2.30169 7.70769 2.05151 7.00001 2.05151C6.29232 2.05151 5.60741 2.30169 5.06635 2.75784C4.52528 3.21398 4.16288 3.84671 4.04321 4.54421C3.92354 5.2417 4.0543 5.95905 4.41237 6.56946C4.77045 7.17987 5.33279 7.64405 6.00001 7.87994V16.2399C5.34099 16.4769 4.78566 16.937 4.43026 17.5405C4.07485 18.1439 3.94176 18.8527 4.05406 19.544C4.16635 20.2352 4.51695 20.8654 5.0451 21.3254C5.57325 21.7853 6.24567 22.0459 6.94581 22.0621C7.64596 22.0783 8.32971 21.8491 8.87857 21.4141C9.42744 20.9791 9.80683 20.3658 9.95099 19.6805C10.0952 18.9951 9.995 18.281 9.6679 17.6617C9.34079 17.0425 8.80735 16.5572 8.16001 16.2899C8.31158 15.9266 8.56704 15.616 8.89436 15.3972C9.22168 15.1784 9.60629 15.0611 10 15.0599H14C14.9148 15.0598 15.802 14.746 16.5135 14.171C17.225 13.5959 17.7179 12.7944 17.91 11.8999C18.5786 11.6728 19.1456 11.217 19.5113 10.613C19.8769 10.0089 20.0178 9.29524 19.9091 8.59754C19.8004 7.89984 19.449 7.26285 18.9169 6.79869C18.3848 6.33452 17.706 6.07292 17 6.05994ZM7.00001 4.05994C7.19779 4.05994 7.39113 4.11859 7.55558 4.22847C7.72003 4.33835 7.8482 4.49453 7.92389 4.67726C7.99957 4.85998 8.01938 5.06105 7.98079 5.25503C7.94221 5.44901 7.84697 5.6272 7.70711 5.76705C7.56726 5.9069 7.38908 6.00214 7.1951 6.04073C7.00112 6.07931 6.80005 6.05951 6.61732 5.98382C6.4346 5.90813 6.27842 5.77996 6.16854 5.61551C6.05866 5.45106 6.00001 5.25772 6.00001 5.05994C6.00001 4.79472 6.10536 4.54037 6.2929 4.35283C6.48044 4.1653 6.73479 4.05994 7.00001 4.05994ZM7.00001 20.0599C6.80222 20.0599 6.60889 20.0013 6.44444 19.8914C6.27999 19.7815 6.15181 19.6254 6.07613 19.4426C6.00044 19.2599 5.98064 19.0588 6.01922 18.8649C6.05781 18.6709 6.15305 18.4927 6.2929 18.3528C6.43275 18.213 6.61093 18.1177 6.80492 18.0792C6.9989 18.0406 7.19996 18.0604 7.38269 18.1361C7.56542 18.2117 7.72159 18.3399 7.83148 18.5044C7.94136 18.6688 8.00001 18.8622 8.00001 19.0599C8.00001 19.3252 7.89465 19.5795 7.70711 19.767C7.51958 19.9546 7.26522 20.0599 7.00001 20.0599ZM17 10.0599C16.8022 10.0599 16.6089 10.0013 16.4444 9.89141C16.28 9.78153 16.1518 9.62535 16.0761 9.44262C16.0004 9.2599 15.9806 9.05883 16.0192 8.86485C16.0578 8.67087 16.153 8.49269 16.2929 8.35283C16.4328 8.21298 16.6109 8.11774 16.8049 8.07916C16.9989 8.04057 17.2 8.06037 17.3827 8.13606C17.5654 8.21175 17.7216 8.33992 17.8315 8.50437C17.9414 8.66882 18 8.86216 18 9.05994C18 9.32516 17.8947 9.57951 17.7071 9.76705C17.5196 9.95458 17.2652 10.0599 17 10.0599Z`,fill:`currentColor`})}),Li=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Z.jsx)(`path`,{d:`M17 22H5C4.20435 22 3.44129 21.6839 2.87868 21.1213C2.31607 20.5587 2 19.7956 2 19V8.99997C2 8.20432 2.31607 7.44125 2.87868 6.87864C3.44129 6.31604 4.20435 5.99997 5 5.99997H6C6.01682 5.1526 6.30235 4.33248 6.81541 3.65789C7.32848 2.98331 8.04255 2.48911 8.85464 2.2466C9.66673 2.00408 10.5349 2.02578 11.3338 2.30856C12.1328 2.59134 12.8213 3.12059 13.3 3.81997C13.7484 4.45911 13.9925 5.21923 14 5.99997H17C17.2652 5.99997 17.5196 6.10532 17.7071 6.29286C17.8946 6.48039 18 6.73475 18 6.99997V9.99997C18.8474 10.0168 19.6675 10.3023 20.3421 10.8154C21.0167 11.3284 21.5109 12.0425 21.7534 12.8546C21.9959 13.6667 21.9742 14.5348 21.6914 15.3338C21.4086 16.1328 20.8794 16.8212 20.18 17.3C19.5409 17.7484 18.7807 17.9925 18 18V21C18 21.2652 17.8946 21.5195 17.7071 21.7071C17.5196 21.8946 17.2652 22 17 22ZM5 7.99997C4.73478 7.99997 4.48043 8.10532 4.29289 8.29286C4.10536 8.48039 4 8.73475 4 8.99997V19C4 19.2652 4.10536 19.5195 4.29289 19.7071C4.48043 19.8946 4.73478 20 5 20H16V16.82C15.9991 16.6596 16.0368 16.5014 16.1099 16.3587C16.183 16.216 16.2894 16.093 16.42 16C16.5502 15.9071 16.7008 15.8468 16.8592 15.8242C17.0175 15.8016 17.179 15.8173 17.33 15.87C17.615 15.9862 17.9254 16.0262 18.2305 15.9858C18.5357 15.9455 18.825 15.8263 19.07 15.64C19.3139 15.4913 19.523 15.292 19.6834 15.0557C19.8439 14.8194 19.9518 14.5515 20 14.27C20.0386 13.986 20.0157 13.6971 19.9329 13.4228C19.85 13.1485 19.7092 12.8951 19.52 12.68C19.2641 12.3691 18.9155 12.1481 18.5252 12.0491C18.1349 11.9502 17.7231 11.9785 17.35 12.13C17.199 12.1827 17.0375 12.1983 16.8792 12.1757C16.7208 12.1531 16.5702 12.0928 16.44 12C16.3094 11.907 16.203 11.7839 16.1299 11.6412C16.0568 11.4985 16.0191 11.3403 16.02 11.18V7.99997H12.82C12.6557 8.00928 12.4915 7.97788 12.3422 7.90855C12.1929 7.83922 12.0631 7.7341 11.9641 7.60253C11.8652 7.47096 11.8003 7.317 11.7752 7.15432C11.75 6.99164 11.7654 6.82526 11.82 6.66997C11.9363 6.38497 11.9762 6.07459 11.9359 5.76945C11.8955 5.46431 11.7763 5.17496 11.59 4.92997C11.4424 4.67913 11.2402 4.46473 10.9984 4.30266C10.7566 4.14058 10.4815 4.03499 10.1934 3.99369C9.90527 3.95239 9.61155 3.97645 9.33399 4.06409C9.05644 4.15173 8.80216 4.3007 8.59 4.49997C8.39298 4.69538 8.23877 4.92966 8.1372 5.1879C8.03562 5.44614 7.9889 5.72269 8 5.99997C8.00232 6.22934 8.04637 6.45637 8.13 6.66997C8.18287 6.82118 8.19863 6.98289 8.17597 7.14147C8.1533 7.30005 8.09287 7.45087 7.99976 7.58122C7.90665 7.71158 7.78358 7.81765 7.64093 7.89053C7.49827 7.9634 7.34019 8.00093 7.18 7.99997H5Z`,fill:`currentColor`})}),Ri=e=>(0,Z.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...e,children:[(0,Z.jsx)(`path`,{d:`m17.586 11.414-5.93 5.93a1 1 0 0 1-8-8l3.137-3.137a.707.707 0 0 1 1.207.5V10`}),(0,Z.jsx)(`path`,{d:`M20.414 8.586 22 7`}),(0,Z.jsx)(`circle`,{cx:19,cy:10,r:2})]}),zi=e=>(0,Z.jsxs)(`svg`,{width:29,height:28,viewBox:`0 0 29 28`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,Z.jsx)(`path`,{d:`M14.5 18.375C12.085 18.375 10.125 16.415 10.125 14C10.125 11.585 12.085 9.625 14.5 9.625C16.915 9.625 18.875 11.585 18.875 14C18.875 16.415 16.915 18.375 14.5 18.375ZM14.5 11.375C13.0533 11.375 11.875 12.5533 11.875 14C11.875 15.4467 13.0533 16.625 14.5 16.625C15.9467 16.625 17.125 15.4467 17.125 14C17.125 12.5533 15.9467 11.375 14.5 11.375Z`,fill:`currentColor`}),(0,Z.jsx)(`path`,{d:`M18.245 25.8883C18 25.8883 17.755 25.8533 17.51 25.795C16.7867 25.5967 16.18 25.1417 15.795 24.5L15.655 24.2667C14.9667 23.0767 14.0217 23.0767 13.3333 24.2667L13.205 24.4883C12.82 25.1417 12.2133 25.6083 11.49 25.795C10.755 25.9933 9.99668 25.8883 9.35501 25.5033L7.34834 24.3483C6.63668 23.94 6.12334 23.275 5.90168 22.47C5.69168 21.665 5.79668 20.8367 6.20501 20.125C6.54334 19.53 6.63668 18.9933 6.43834 18.655C6.24001 18.3167 5.73834 18.1183 5.05001 18.1183C3.34668 18.1183 1.95834 16.73 1.95834 15.0267V12.9733C1.95834 11.27 3.34668 9.88168 5.05001 9.88168C5.73834 9.88168 6.24001 9.68334 6.43834 9.34501C6.63668 9.00668 6.55501 8.47001 6.20501 7.87501C5.79668 7.16334 5.69168 6.32334 5.90168 5.53001C6.11168 4.72501 6.62501 4.06001 7.34834 3.65168L9.36668 2.49668C10.685 1.71501 12.4233 2.17001 13.2167 3.51168L13.3567 3.74501C14.045 4.93501 14.99 4.93501 15.6783 3.74501L15.8067 3.52334C16.6 2.17001 18.3383 1.71501 19.6683 2.50834L21.675 3.66334C22.3867 4.07168 22.9 4.73668 23.1217 5.54168C23.3317 6.34668 23.2267 7.17501 22.8183 7.88668C22.48 8.48168 22.3867 9.01834 22.585 9.35668C22.7833 9.69501 23.285 9.89334 23.9733 9.89334C25.6767 9.89334 27.065 11.2817 27.065 12.985V15.0383C27.065 16.7417 25.6767 18.13 23.9733 18.13C23.285 18.13 22.7833 18.3283 22.585 18.6667C22.3867 19.005 22.4683 19.5417 22.8183 20.1367C23.2267 20.8483 23.3433 21.6883 23.1217 22.4817C22.9117 23.2867 22.3983 23.9517 21.675 24.36L19.6567 25.515C19.2133 25.76 18.735 25.8883 18.245 25.8883ZM14.5 21.5717C15.5383 21.5717 16.5067 22.225 17.1717 23.38L17.3 23.6017C17.44 23.8467 17.6733 24.0217 17.9533 24.0917C18.2333 24.1617 18.5133 24.1267 18.7467 23.9867L20.765 22.82C21.0683 22.645 21.3017 22.3533 21.395 22.0033C21.4883 21.6533 21.4417 21.2917 21.2667 20.9883C20.6017 19.845 20.52 18.6667 21.0333 17.7683C21.5467 16.87 22.6083 16.3567 23.9383 16.3567C24.685 16.3567 25.28 15.7617 25.28 15.015V12.9617C25.28 12.2267 24.685 11.62 23.9383 11.62C22.6083 11.62 21.5467 11.1067 21.0333 10.2083C20.52 9.31001 20.6017 8.13168 21.2667 6.98834C21.4417 6.68501 21.4883 6.32334 21.395 5.97334C21.3017 5.62334 21.08 5.34334 20.7767 5.15668L18.7583 4.00168C18.2567 3.69834 17.5917 3.87334 17.2883 4.38668L17.16 4.60834C16.495 5.76334 15.5267 6.41668 14.4883 6.41668C13.45 6.41668 12.4817 5.76334 11.8167 4.60834L11.6883 4.37501C11.3967 3.88501 10.7433 3.71001 10.2417 4.00168L8.22334 5.16834C7.92001 5.34334 7.68668 5.63501 7.59334 5.98501C7.50001 6.33501 7.54668 6.69668 7.72168 7.00001C8.38668 8.14334 8.46834 9.32168 7.95501 10.22C7.44168 11.1183 6.38001 11.6317 5.05001 11.6317C4.30334 11.6317 3.70834 12.2267 3.70834 12.9733V15.0267C3.70834 15.7617 4.30334 16.3683 5.05001 16.3683C6.38001 16.3683 7.44168 16.8817 7.95501 17.78C8.46834 18.6783 8.38668 19.8567 7.72168 21C7.54668 21.3033 7.50001 21.665 7.59334 22.015C7.68668 22.365 7.90834 22.645 8.21168 22.8317L10.23 23.9867C10.475 24.1383 10.7667 24.1733 11.035 24.1033C11.315 24.0333 11.5483 23.8467 11.7 23.6017L11.8283 23.38C12.4933 22.2367 13.4617 21.5717 14.5 21.5717Z`,fill:`currentColor`})]}),Bi=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Z.jsx)(`path`,{d:`M18.2099 13.1289L9.98776 20.3232C9.01788 21.1719 7.5 20.4831 7.5 19.1943L7.5 4.80565C7.5 3.51691 9.01788 2.82815 9.98775 3.67678L18.2099 10.8711C18.8929 11.4688 18.8929 12.5312 18.2099 13.1289Z`,fill:`currentColor`})});function Q({icon:e,text:t,rightIcon:n,className:r}){return(0,Z.jsxs)(`div`,{className:F(`flex min-w-0 w-full items-center justify-between`,Fe,r),children:[(0,Z.jsxs)(`div`,{className:F(`flex min-w-0 items-center`,Fe),children:[(0,Z.jsx)(`span`,{className:Re,"aria-hidden":!0,children:e}),(0,Z.jsx)(`span`,{className:`text-sm font-normal leading-5`,children:t})]}),n?(0,Z.jsx)(`span`,{className:Re,"aria-hidden":!0,children:n}):null]})}var Vi=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Z.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M20.781 10.5L13.281 3H12.2205L4.72049 10.5L5.78099 11.5605L12 5.3415V21H13.5V5.34L19.719 11.5605L20.781 10.5Z`,fill:`currentColor`})}),Hi=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Z.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M4.72049 13.5L12.2205 21H13.281L20.781 13.5L19.7205 12.4395L13.5 18.6585V3H12V18.66L5.78099 12.438L4.72049 13.5Z`,fill:`currentcolor`})}),Ui=e=>(0,Z.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 12 14`,fill:`none`,...e,children:[(0,Z.jsx)(`path`,{d:`M9.79249 10.1936C10.2876 10.1936 10.6902 10.5962 10.6902 11.0913C10.6902 11.5864 10.2876 11.989 9.79249 11.989C9.29739 11.989 8.89478 11.5864 8.89478 11.0913C8.89478 10.5962 9.29739 10.1936 9.79249 10.1936ZM9.79249 9.10547C8.69891 9.10547 7.80664 9.99774 7.80664 11.0913C7.80664 12.1849 8.69891 13.0772 9.79249 13.0772C10.8861 13.0772 11.7783 12.1849 11.7783 11.0913C11.7783 9.99774 10.8861 9.10547 9.79249 9.10547Z`,fill:`currentColor`}),(0,Z.jsx)(`path`,{d:`M2.23585 10.1936C2.73095 10.1936 3.13356 10.5962 3.13356 11.0913C3.13356 11.5864 2.73095 11.989 2.23585 11.989C1.74075 11.989 1.33814 11.5864 1.33814 11.0913C1.33814 10.5962 1.74075 10.1936 2.23585 10.1936ZM2.23585 9.10547C1.14227 9.10547 0.25 9.99774 0.25 11.0913C0.25 12.1849 1.14227 13.0772 2.23585 13.0772C3.32943 13.0772 4.2217 12.1849 4.2217 11.0913C4.2217 9.99774 3.32943 9.10547 2.23585 9.10547Z`,fill:`currentColor`}),(0,Z.jsx)(`path`,{d:`M2.23585 2.16846C2.73095 2.16846 3.13356 2.57107 3.13356 3.06617C3.13356 3.56128 2.73095 3.96389 2.23585 3.96389C1.74075 3.96389 1.33814 3.56128 1.33814 3.06617C1.33814 2.57107 1.74075 2.16846 2.23585 2.16846ZM2.23585 1.08032C1.14227 1.08032 0.25 1.97259 0.25 3.06617C0.25 4.15975 1.14227 5.05202 2.23585 5.05202C3.32943 5.05202 4.2217 4.15975 4.2217 3.06617C4.2217 1.97259 3.32943 1.08032 2.23585 1.08032Z`,fill:`currentColor`}),(0,Z.jsx)(`path`,{d:`M2.23633 9.17627V4.55713`,stroke:`currentColor`,strokeMiterlimit:10}),(0,Z.jsx)(`path`,{d:`M9.79304 9.17605V4.33928C9.79304 3.63743 9.22176 3.06616 8.51992 3.06616H7.38281`,stroke:`currentColor`,strokeMiterlimit:10}),(0,Z.jsx)(`path`,{d:`M7.38191 5.21531L5.23828 3.06624L7.38191 0.922607V5.21531Z`,fill:`currentColor`})]}),Wi=`!w-auto whitespace-nowrap`;function Gi({onClose:e}){let{t}=a(`openhands`),{setMessageToSend:n}=W(),{data:r}=J(),i=r?.git_provider;return(0,Z.jsxs)(B,{testId:`git-tools-submenu`,className:`w-max`,children:[(0,Z.jsx)(V,{testId:`git-pull-button`,onClick:()=>{n(M()),e()},className:Wi,children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(Hi,{width:16,height:16}),text:t(T.COMMON$GIT_PULL)})}),(0,Z.jsx)(V,{testId:`git-push-button`,onClick:()=>{n(te(i)),e()},className:Wi,children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(Vi,{width:16,height:16}),text:t(T.COMMON$GIT_PUSH)})}),(0,Z.jsx)(V,{testId:`create-pr-button`,onClick:()=>{n(ae(i)),e()},className:Wi,children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(Ui,{width:16,height:16}),text:t(T.COMMON$CREATE_PR)})}),(0,Z.jsx)(V,{testId:`create-new-branch-button`,onClick:()=>{n(ie()),e()},className:Wi,children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(Ii,{width:16,height:16}),text:t(T.COMMON$CREATE_NEW_BRANCH)})})]})}var Ki=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:25,viewBox:`0 0 24 25`,fill:`none`,...e,children:(0,Z.jsx)(`path`,{d:`M15.29 10.79L12.51 13.57C12.3436 13.5257 12.1723 13.5022 12 13.5C11.4696 13.5 10.9609 13.7107 10.5858 14.0858C10.2107 14.4609 10 14.9696 10 15.5C10.0023 15.6722 10.0258 15.8435 10.07 16.01L9.29003 16.79C9.1963 16.883 9.12191 16.9936 9.07114 17.1154C9.02037 17.2373 8.99423 17.368 8.99423 17.5C8.99423 17.632 9.02037 17.7627 9.07114 17.8846C9.12191 18.0064 9.1963 18.117 9.29003 18.21C9.38299 18.3037 9.49359 18.3781 9.61545 18.4289C9.73731 18.4797 9.86802 18.5058 10 18.5058C10.132 18.5058 10.2627 18.4797 10.3846 18.4289C10.5065 18.3781 10.6171 18.3037 10.71 18.21L11.49 17.43C11.6565 17.4743 11.8278 17.4978 12 17.5C12.5305 17.5 13.0392 17.2893 13.4142 16.9142C13.7893 16.5391 14 16.0304 14 15.5C13.9978 15.3278 13.9743 15.1565 13.93 14.99L16.71 12.21C16.8983 12.0217 17.0041 11.7663 17.0041 11.5C17.0041 11.2337 16.8983 10.9783 16.71 10.79C16.5217 10.6017 16.2663 10.4959 16 10.4959C15.7337 10.4959 15.4783 10.6017 15.29 10.79ZM12 4.5C10.6868 4.5 9.38645 4.75866 8.1732 5.2612C6.95994 5.76375 5.85755 6.50035 4.92896 7.42893C3.0536 9.3043 2.00003 11.8478 2.00003 14.5C1.99511 16.4806 2.58375 18.4172 3.69003 20.06C3.83855 20.2801 4.06844 20.4322 4.32911 20.4829C4.58979 20.5335 4.8599 20.4785 5.08003 20.33C5.30016 20.1815 5.45227 19.9516 5.50291 19.6909C5.55354 19.4302 5.49855 19.1601 5.35003 18.94C4.54455 17.7355 4.08131 16.3349 4.00978 14.8877C3.93826 13.4405 4.26113 12.001 4.94392 10.723C5.62671 9.44501 6.64378 8.37643 7.88653 7.63139C9.12928 6.88634 10.5511 6.49281 12 6.49281C13.449 6.49281 14.8708 6.88634 16.1135 7.63139C17.3563 8.37643 18.3734 9.44501 19.0561 10.723C19.7389 12.001 20.0618 13.4405 19.9903 14.8877C19.9188 16.3349 19.4555 17.7355 18.65 18.94C18.5763 19.0489 18.5248 19.1714 18.4985 19.3002C18.4722 19.4291 18.4716 19.5619 18.4966 19.691C18.5217 19.8201 18.572 19.943 18.6447 20.0527C18.7173 20.1623 18.8109 20.2566 18.92 20.33C19.0856 20.4412 19.2806 20.5004 19.48 20.5C19.6438 20.5002 19.8052 20.4603 19.9499 20.3835C20.0946 20.3068 20.2183 20.1957 20.31 20.06C21.4163 18.4172 22.005 16.4806 22 14.5C22 11.8478 20.9465 9.3043 19.0711 7.42893C17.1957 5.55357 14.6522 4.5 12 4.5Z`,fill:`currentColor`})}),qi=e=>(0,Z.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 20 21`,fill:`none`,...e,children:[(0,Z.jsx)(`path`,{d:`M15.9532 15.8037C16.7679 15.8037 17.4304 16.4662 17.4304 17.2809C17.4304 18.0955 16.7679 18.758 15.9532 18.758C15.1385 18.758 14.4761 18.0955 14.4761 17.2809C14.4761 16.4662 15.1385 15.8037 15.9532 15.8037ZM15.9532 14.0132C14.1538 14.0132 12.6855 15.4814 12.6855 17.2809C12.6855 19.0803 14.1538 20.5485 15.9532 20.5485C17.7527 20.5485 19.2209 19.0803 19.2209 17.2809C19.2209 15.4814 17.7527 14.0132 15.9532 14.0132Z`,fill:`currentColor`}),(0,Z.jsx)(`path`,{d:`M3.51768 15.8037C4.33236 15.8037 4.99485 16.4662 4.99485 17.2809C4.99485 18.0955 4.33236 18.758 3.51768 18.758C2.703 18.758 2.04051 18.0955 2.04051 17.2809C2.04051 16.4662 2.703 15.8037 3.51768 15.8037ZM3.51768 14.0132C1.71822 14.0132 0.25 15.4814 0.25 17.2809C0.25 19.0803 1.71822 20.5485 3.51768 20.5485C5.31714 20.5485 6.78536 19.0803 6.78536 17.2809C6.78536 15.4814 5.31714 14.0132 3.51768 14.0132Z`,fill:`currentColor`}),(0,Z.jsx)(`path`,{d:`M3.51768 2.59862C4.33236 2.59862 4.99485 3.2611 4.99485 4.07579C4.99485 4.89047 4.33236 5.55296 3.51768 5.55296C2.703 5.55296 2.04051 4.89047 2.04051 4.07579C2.04051 3.2611 2.703 2.59862 3.51768 2.59862ZM3.51768 0.808105C1.71822 0.808105 0.25 2.27632 0.25 4.07579C0.25 5.87525 1.71822 7.34347 3.51768 7.34347C5.31714 7.34347 6.78536 5.87525 6.78536 4.07579C6.78536 2.27632 5.31714 0.808105 3.51768 0.808105Z`,fill:`currentColor`}),(0,Z.jsx)(`path`,{d:`M3.51758 14.1295V6.52881`,stroke:`currentColor`,strokeWidth:2,strokeMiterlimit:10}),(0,Z.jsx)(`path`,{d:`M15.9523 14.1294V6.17058C15.9523 5.0157 15.0123 4.07568 13.8574 4.07568H11.9863`,stroke:`currentColor`,strokeWidth:2,strokeMiterlimit:10}),(0,Z.jsx)(`path`,{d:`M11.9863 7.6119L8.45898 4.07565L11.9863 0.54834V7.6119Z`,fill:`currentColor`})]}),Ji=e=>(0,Z.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,Z.jsx)(`path`,{d:`M4 4C4 2.89543 4.89543 2 6 2H14C14.2652 2 14.5196 2.10536 14.7071 2.29289L19.7071 7.29289C19.8946 7.48043 20 7.73478 20 8V20C20 21.1046 19.1046 22 18 22H6C4.89543 22 4 21.1046 4 20V4ZM17.5858 8L14 4.41421V8H17.5858ZM12 4L6 4V20H18V10H13C12.4477 10 12 9.55228 12 9V4ZM8 13C8 12.4477 8.44772 12 9 12H15C15.5523 12 16 12.4477 16 13C16 13.5523 15.5523 14 15 14H9C8.44772 14 8 13.5523 8 13ZM8 17C8 16.4477 8.44772 16 9 16H15C15.5523 16 16 16.4477 16 17C16 17.5523 15.5523 18 15 18H9C8.44772 18 8 17.5523 8 17Z`,fill:`currentColor`})}),Yi=e=>(0,Z.jsx)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,Z.jsx)(`path`,{d:`M2.71996 7.64998C2.91552 7.7074 3.10351 7.78797 3.27996 7.88998C3.89978 8.25991 4.60814 8.45523 5.32996 8.45523C6.05178 8.45523 6.76015 8.25991 7.37996 7.88998C7.77042 7.66914 8.21137 7.55307 8.65996 7.55307C9.10855 7.55307 9.5495 7.66914 9.93996 7.88998C10.5673 8.24867 11.2773 8.43735 12 8.43735C12.7226 8.43735 13.4327 8.24867 14.06 7.88998C14.4504 7.66914 14.8914 7.55307 15.34 7.55307C15.7885 7.55307 16.2295 7.66914 16.62 7.88998C17.2537 8.25217 17.97 8.44503 18.7 8.44998C19.4051 8.44852 20.0966 8.25492 20.7 7.88998C20.8764 7.78797 21.0644 7.7074 21.26 7.64998C21.5146 7.57572 21.7292 7.40336 21.8568 7.17081C21.9843 6.93827 22.0142 6.66459 21.94 6.40998C21.8657 6.15537 21.6933 5.94069 21.4608 5.81317C21.2282 5.68564 20.9546 5.65572 20.7 5.72998C20.3494 5.83818 20.0135 5.98932 19.7 6.17998C19.3814 6.36627 19.019 6.46446 18.65 6.46446C18.2809 6.46446 17.9185 6.36627 17.6 6.17998C16.9066 5.79105 16.1249 5.58679 15.33 5.58679C14.535 5.58679 13.7533 5.79105 13.06 6.17998C12.738 6.36703 12.3723 6.46556 12 6.46556C11.6276 6.46556 11.2619 6.36703 10.94 6.17998C10.2466 5.79105 9.46495 5.58679 8.66996 5.58679C7.87497 5.58679 7.09332 5.79105 6.39996 6.17998C6.08139 6.36627 5.719 6.46446 5.34996 6.46446C4.98092 6.46446 4.61853 6.36627 4.29996 6.17998C3.98645 5.98932 3.65057 5.83818 3.29996 5.72998C3.04535 5.65572 2.77167 5.68564 2.53913 5.81317C2.30658 5.94069 2.13422 6.15537 2.05996 6.40998C1.9857 6.66459 2.01562 6.93827 2.14315 7.17081C2.27067 7.40336 2.48535 7.57572 2.73996 7.64998H2.71996ZM20.72 15.73C20.3694 15.8382 20.0335 15.9893 19.72 16.18C19.4014 16.3663 19.039 16.4645 18.67 16.4645C18.3009 16.4645 17.9385 16.3663 17.62 16.18C16.9266 15.7911 16.1449 15.5868 15.35 15.5868C14.555 15.5868 13.7733 15.7911 13.08 16.18C12.758 16.367 12.3923 16.4656 12.02 16.4656C11.6476 16.4656 11.2819 16.367 10.96 16.18C10.2666 15.7911 9.48495 15.5868 8.68996 15.5868C7.89497 15.5868 7.11332 15.7911 6.41996 16.18C6.10139 16.3663 5.739 16.4645 5.36996 16.4645C5.00092 16.4645 4.63853 16.3663 4.31996 16.18C4.00645 15.9893 3.67057 15.8382 3.31996 15.73C3.19389 15.6932 3.06182 15.6816 2.93127 15.6959C2.80073 15.7102 2.67427 15.75 2.55913 15.8132C2.44398 15.8763 2.3424 15.9615 2.26019 16.0639C2.17797 16.1663 2.11673 16.2839 2.07996 16.41C2.04319 16.536 2.03161 16.6681 2.04589 16.7987C2.06016 16.9292 2.1 17.0557 2.16315 17.1708C2.22629 17.286 2.3115 17.3875 2.4139 17.4698C2.5163 17.552 2.63389 17.6132 2.75996 17.65C2.95552 17.7074 3.14351 17.788 3.31996 17.89C3.93978 18.2599 4.64814 18.4552 5.36996 18.4552C6.09178 18.4552 6.80015 18.2599 7.41996 17.89C7.81042 17.6691 8.25137 17.5531 8.69996 17.5531C9.14855 17.5531 9.5895 17.6691 9.97996 17.89C10.6073 18.2487 11.3173 18.4374 12.04 18.4374C12.7626 18.4374 13.4727 18.2487 14.1 17.89C14.4904 17.6691 14.9314 17.5531 15.38 17.5531C15.8285 17.5531 16.2695 17.6691 16.66 17.89C17.2937 18.2522 18.01 18.445 18.74 18.45C19.4451 18.4485 20.1366 18.2549 20.74 17.89C20.9164 17.788 21.1044 17.7074 21.3 17.65C21.5546 17.5757 21.7692 17.4034 21.8968 17.1708C22.0243 16.9383 22.0542 16.6646 21.98 16.41C21.9057 16.1554 21.7333 15.9407 21.5008 15.8132C21.2682 15.6856 20.9946 15.6557 20.74 15.73H20.72ZM20.72 10.73C20.3694 10.8382 20.0335 10.9893 19.72 11.18C19.4014 11.3663 19.039 11.4645 18.67 11.4645C18.3009 11.4645 17.9385 11.3663 17.62 11.18C16.9266 10.7911 16.1449 10.5868 15.35 10.5868C14.555 10.5868 13.7733 10.7911 13.08 11.18C12.758 11.367 12.3923 11.4656 12.02 11.4656C11.6476 11.4656 11.2819 11.367 10.96 11.18C10.2666 10.7911 9.48495 10.5868 8.68996 10.5868C7.89497 10.5868 7.11332 10.7911 6.41996 11.18C6.10139 11.3663 5.739 11.4645 5.36996 11.4645C5.00092 11.4645 4.63853 11.3663 4.31996 11.18C4.00645 10.9893 3.67057 10.8382 3.31996 10.73C3.18902 10.6805 3.04917 10.6591 2.90944 10.6672C2.76971 10.6752 2.63322 10.7125 2.5088 10.7766C2.38438 10.8406 2.2748 10.9301 2.18715 11.0393C2.0995 11.1484 2.03573 11.2747 1.99996 11.41C1.96319 11.536 1.95161 11.6681 1.96589 11.7987C1.98016 11.9292 2.02 12.0557 2.08315 12.1708C2.14629 12.286 2.2315 12.3875 2.3339 12.4698C2.4363 12.552 2.55389 12.6132 2.67996 12.65C2.87552 12.7074 3.06351 12.788 3.23996 12.89C3.85978 13.2599 4.56814 13.4552 5.28996 13.4552C6.01178 13.4552 6.72015 13.2599 7.33996 12.89C7.73042 12.6691 8.17137 12.5531 8.61996 12.5531C9.06855 12.5531 9.5095 12.6691 9.89996 12.89C10.5273 13.2487 11.2373 13.4374 11.96 13.4374C12.6826 13.4374 13.3927 13.2487 14.02 12.89C14.4104 12.6691 14.8514 12.5531 15.3 12.5531C15.7485 12.5531 16.1895 12.6691 16.58 12.89C17.2137 13.2522 17.93 13.445 18.66 13.45C19.3651 13.4485 20.0566 13.2549 20.66 12.89C20.8364 12.788 21.0244 12.7074 21.22 12.65C21.4746 12.5757 21.6892 12.4034 21.8168 12.1708C21.9443 11.9383 21.9742 11.6646 21.9 11.41C21.8257 11.1554 21.6533 10.9407 21.4208 10.8132C21.1882 10.6856 20.9146 10.6557 20.66 10.73H20.72Z`,fill:`currentColor`})}),Xi=`INCREASE_TEST_COVERAGE`,Zi=`I want to increase the test coverage of the repository in the current directory.
|
|
4
|
+
|
|
5
|
+
Please investigate the repo to figure out what language is being used, and where tests are located, if there are any.
|
|
6
|
+
|
|
7
|
+
If there are no tests already in the repo, add a very basic test, using typical testing strategies for the language involved.
|
|
8
|
+
|
|
9
|
+
If there are existing tests, find a function or method which lacks adequate unit tests, and add unit tests for it. Be sure to respect the projects existing test structures.
|
|
10
|
+
|
|
11
|
+
Make sure the tests pass before you finish.`,Qi=`AUTO_MERGE_PRS`,$i=`Please add a GitHub action to this repository which automatically merges pull requests from Dependabot so long as the tests are passing.`,ea=`FIX_README`,ta=`Please look at the README and make the following improvements, if they make sense:
|
|
12
|
+
* correct any typos that you find
|
|
13
|
+
* add missing language annotations on codeblocks
|
|
14
|
+
* if there are references to other files or other sections of the README, turn them into links
|
|
15
|
+
* make sure the readme has an h1 title towards the top
|
|
16
|
+
* make sure any existing sections in the readme are appropriately separated with headings
|
|
17
|
+
|
|
18
|
+
If there are no obvious ways to improve the README, make at least one small change to make the wording clearer or friendlier`,na=`CLEAN_DEPENDENCIES`,ra=`Examine the dependencies of the current codebase. Make sure you can run the code and any tests.
|
|
19
|
+
|
|
20
|
+
Then run any commands necessary to update all dependencies to the latest versions, and make sure the code continues to run correctly and the tests pass. If changes need to be made to the codebase, go ahead and make those changes. You can look up documentation for new versions using the browser if you need to.
|
|
21
|
+
|
|
22
|
+
If a particular dependency update is causing trouble (e.g. breaking changes that you can't fix), you can revert it and send a message to the user explaining why.
|
|
23
|
+
|
|
24
|
+
Additionally, if you're able to prune any dependencies that are obviously unused, please do so. You may use third party tools to check for unused dependencies.`,ia=`ADD_DOCS`,aa=`Investigate the documentation in the root of the current repo. Please add a CODE_OF_CONDUCT.md and CONTRIBUTORS.md with good defaults if they are not present. Use information in the README to inform the CONTRIBUTORS doc. If there is no LICENSE currently in the repo, please add the Apache 2.0 license. Add links to all these documents into the README`,oa=`ADD_DOCKERFILE`,sa=`Investigate the current repo to understand the installation instructions. Then create a Dockerfile that runs the application, using best practices like arguments and multi-stage builds wherever appropriate.
|
|
25
|
+
|
|
26
|
+
If there is an existing Dockerfile, and there are ways to improve it according to best practices, do so.`,ca={[Xi]:Zi,[Qi]:$i,[ea]:ta,[na]:ra,[ia]:aa,[oa]:sa},la=`!w-auto whitespace-nowrap`;function ua({onClose:e}){let{t}=a(`openhands`),{setMessageToSend:n}=W();return(0,Z.jsxs)(B,{testId:`macros-submenu`,className:`overflow-visible`,children:[(0,Z.jsx)(V,{testId:`increase-test-coverage-button`,onClick:()=>{n(ca.INCREASE_TEST_COVERAGE),e()},className:la,children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(Ki,{width:16,height:16}),text:t(T.INCREASE_TEST_COVERAGE)})}),(0,Z.jsx)(V,{testId:`fix-readme-button`,onClick:()=>{n(ca.FIX_README),e()},className:la,children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(Ji,{width:16,height:16}),text:t(T.FIX_README)})}),(0,Z.jsx)(V,{testId:`auto-merge-prs-button`,onClick:()=>{n(ca.AUTO_MERGE_PRS),e()},className:la,children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(qi,{width:16,height:16}),text:t(T.AUTO_MERGE_PRS)})}),(0,Z.jsx)(V,{testId:`clean-dependencies-button`,onClick:()=>{n(ca.CLEAN_DEPENDENCIES),e()},className:la,children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(Yi,{width:16,height:16}),text:t(T.CLEAN_DEPENDENCIES)})})]})}function da(){let{conversationId:e,navigate:t}=je(),{data:n,isLoading:r}=J(),{data:i,isLoading:a}=Tt(),o=Ot(),s=Ut(),c=l({mutationKey:Wt}),u=l({mutationKey:jt}),d=e?.startsWith(`task-`)??!1,f=d||c>0||u>0,p=i?.profiles??[],m=!!e,h=m?n?.launched_agent_profile?.agent_profile_id??i?.active_agent_profile_id??null:i?.active_agent_profile_id??null,g=p.find(e=>e.id!=null&&e.id===h)?.name??null,_=(0,Y.useCallback)(r=>{if(d||!r.id||r.id===h)return;if(!m){s.mutate(r.id);return}let i=e?ot(e):null,a={agentProfileId:r.id,entryPoint:`blank_conversation_profile_picker`};n?.selected_repository&&(a.repository={name:n.selected_repository,gitProvider:n.git_provider??`github`,branch:n.selected_branch??void 0}),n?.selected_workspace&&(a.workingDir=n.selected_workspace,a.workspaceMode=i?.workspace_mode??`local_repo`),i?.plugins?.length&&(a.plugins=i.plugins),o.mutateAsync(a).then(e=>t(`/conversations/${e.conversation_id}`)).catch(()=>{})},[s,n,e,o,h,m,d,t]);return{profiles:p,currentProfileId:h,currentProfileName:g,isInConversation:m,isLoading:a||d||m&&r,isSwitching:f,selectProfile:_}}function fa({onClose:e,dividerInset:t,settingsLinkClassName:n,settingsIconClassName:r}){let{t:i}=a(`openhands`),{profiles:o,currentProfileId:s,isInConversation:c,isSwitching:l,selectProfile:u}=da(),d=t=>{u(t),e()};return(0,Z.jsxs)(Z.Fragment,{children:[o.length>0&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`li`,{role:`presentation`,className:`px-2 pt-1 pb-0.5`,children:(0,Z.jsx)(K.Text,{className:`text-[11px] font-medium text-[var(--oh-text-dim)] uppercase tracking-wide leading-4`,children:i(T.SETTINGS$AVAILABLE_PROFILES)})}),o.map(t=>{let n=t.id!=null&&t.id===s;return(0,Z.jsxs)(V,{testId:`chat-input-agent-profile-option-${t.name}`,isDisabled:l,onClick:r=>{if(r.preventDefault(),r.stopPropagation(),n){e();return}d(t)},className:F(`flex items-center gap-2`,n&&`bg-[var(--oh-interactive-hover)]`),children:[(0,Z.jsx)(`span`,{className:`flex-1 truncate text-sm leading-5`,title:t.name,children:t.name}),n&&(0,Z.jsx)(Vt,{width:14,height:14,className:`shrink-0`,"aria-hidden":!0})]},t.id??t.name)}),c&&(0,Z.jsx)(`li`,{role:`presentation`,className:`px-2 pt-0.5 pb-1`,children:(0,Z.jsx)(K.Text,{className:`text-[11px] text-[var(--oh-text-dim)] leading-4`,children:i(T.CHAT$START_NEW_WITH_PROFILE_HINT)})})]}),o.length>0&&(0,Z.jsx)(qe,{inset:t}),(0,Z.jsx)(`li`,{className:`text-sm`,children:(0,Z.jsxs)(Me,{to:`/settings/agents`,onClick:e,className:F(`flex h-[30px] items-center gap-2 rounded p-2 leading-5 text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] transition-colors`,n),children:[(0,Z.jsx)(hn,{width:16,height:16,className:F(`shrink-0`,r),"aria-hidden":!0}),(0,Z.jsx)(`span`,{children:i(T.CHAT$MANAGE_AGENT_PROFILES)})]})})]})}function pa({isDisabled:e,children:t,placement:n=`right`}){let{t:r}=a(`openhands`);return e?(0,Z.jsx)(Pe,{content:r(T.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES),placement:n,tooltipClassName:`bg-white text-black text-xs font-medium leading-5`,children:(0,Z.jsx)(`span`,{className:`block w-full`,children:t})}):t}function ma(){let{data:e}=J();return $e(e?.sandbox_status)}function ha({onClose:e,onShowSkills:t,onShowPlugins:n,onShowHooks:r,onShowAgentTools:i,shouldShowAgentTools:o=!0,shouldShowHooks:s=!1,shouldShowPlugins:c=!1,showAgentProfileSwitch:l=!1,footerAction:u}){let{t:d}=a(`openhands`),{data:f}=J(),{providers:p}=Bt(),m=ma(),[h,g]=(0,Y.useState)(null),_=!!f?.selected_repository,v=p.length>0,y=_&&v,b=e=>{m||g(h===e?null:e)},x=()=>{g(null),e()};return(0,Z.jsxs)(B,{ref:St(x),testId:`tools-context-menu`,position:`top`,alignment:`left`,className:`left-[-16px] mb-2 bottom-full overflow-visible min-w-[200px]`,children:[l&&(0,Z.jsxs)(`div`,{className:`relative group/agent-profile`,children:[(0,Z.jsx)(V,{testId:`switch-agent-profile-button`,onClick:()=>b(`agent-profile`),children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(gn,{width:16,height:16,"aria-hidden":!0}),text:d(T.CHAT$SWITCH_AGENT_PROFILE),rightIcon:(0,Z.jsx)(Bi,{width:10,height:10})})}),(0,Z.jsx)(`div`,{className:F(`absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]`,`group-hover/agent-profile:opacity-100 group-hover/agent-profile:visible group-hover/agent-profile:pointer-events-auto`,`hover:opacity-100 hover:visible hover:pointer-events-auto`,h===`agent-profile`&&`opacity-100 visible pointer-events-auto`),children:(0,Z.jsx)(B,{testId:`agent-profile-submenu`,className:`min-w-[220px] max-w-[320px] max-h-[60vh] overflow-y-auto gap-0`,children:(0,Z.jsx)(fa,{onClose:x,dividerInset:`menu`})})})]}),y&&(0,Z.jsxs)(`div`,{className:`relative group/git`,children:[(0,Z.jsx)(pa,{isDisabled:m,children:(0,Z.jsx)(V,{testId:`git-tools-button`,onClick:()=>b(`git`),isDisabled:m,children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(Ii,{width:16,height:16}),text:d(T.COMMON$GIT_TOOLS),rightIcon:(0,Z.jsx)(Bi,{width:10,height:10})})})}),!m&&(0,Z.jsx)(`div`,{className:F(`absolute left-full top-[-6px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]`,`group-hover/git:opacity-100 group-hover/git:visible group-hover/git:pointer-events-auto`,`hover:opacity-100 hover:visible hover:pointer-events-auto`,h===`git`&&`opacity-100 visible pointer-events-auto`),children:(0,Z.jsx)(Gi,{onClose:x})})]}),(0,Z.jsxs)(`div`,{className:`relative group/macros`,children:[(0,Z.jsx)(pa,{isDisabled:m,children:(0,Z.jsx)(V,{testId:`macros-button`,onClick:()=>b(`macros`),isDisabled:m,children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(zi,{width:16,height:16}),text:d(T.COMMON$MACROS),rightIcon:(0,Z.jsx)(Bi,{width:10,height:10})})})}),!m&&(0,Z.jsx)(`div`,{className:F(`absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]`,`group-hover/macros:opacity-100 group-hover/macros:visible group-hover/macros:pointer-events-auto`,`hover:opacity-100 hover:visible hover:pointer-events-auto`,h===`macros`&&`opacity-100 visible pointer-events-auto`),children:(0,Z.jsx)(ua,{onClose:x})})]}),o&&(0,Z.jsx)(qe,{inset:`menu`}),(0,Z.jsx)(pa,{isDisabled:m,children:(0,Z.jsx)(V,{testId:`show-skills-button`,onClick:t,isDisabled:m,children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(Ft,{width:16,height:16,className:`stroke-[1.75]`,"aria-hidden":!0}),text:d(T.CONVERSATION$SHOW_SKILLS)})})}),c&&(0,Z.jsx)(pa,{isDisabled:m,children:(0,Z.jsx)(V,{testId:`show-plugins-button`,onClick:n,isDisabled:m,children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(Li,{width:16,height:16,"aria-hidden":!0}),text:d(T.CONVERSATION$SHOW_PLUGINS)})})}),s&&(0,Z.jsx)(pa,{isDisabled:m,children:(0,Z.jsx)(V,{testId:`show-hooks-button`,onClick:r,isDisabled:m,children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(Ri,{width:16,height:16,"aria-hidden":!0}),text:d(T.CONVERSATION$SHOW_HOOKS)})})}),o&&(0,Z.jsx)(pa,{isDisabled:m,children:(0,Z.jsx)(V,{testId:`show-agent-tools-button`,onClick:i,isDisabled:m,children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(Ke,{width:16,height:16}),text:d(T.BUTTON$SHOW_AGENT_TOOLS_AND_METADATA)})})}),u&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(qe,{}),(0,Z.jsx)(V,{testId:u.testId,onClick:e=>{e.preventDefault(),e.stopPropagation(),u.onClick(),x()},children:(0,Z.jsx)(Q,{icon:u.icon,text:u.label})})]})]})}function ga({agentClass:e,openhandsVersion:t,onClose:n}){let{t:r}=a(`openhands`);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(at,{onClose:n,testId:`close-system-message-modal`}),(0,Z.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col gap-2 pr-6`,children:[(0,Z.jsx)(U,{title:r(T.SYSTEM_MESSAGE_MODAL$TITLE)}),(e||t)&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[e&&(0,Z.jsxs)(`div`,{className:`text-sm`,children:[(0,Z.jsx)(K.Text,{className:`font-semibold text-[var(--oh-text-tertiary)]`,children:r(T.SYSTEM_MESSAGE_MODAL$AGENT_CLASS)}),` `,(0,Z.jsx)(K.Text,{className:`font-medium text-content-2`,children:e})]}),t&&(0,Z.jsxs)(`div`,{className:`text-sm`,children:[(0,Z.jsx)(K.Text,{className:`font-semibold text-[var(--oh-text-tertiary)]`,children:r(T.SYSTEM_MESSAGE_MODAL$OPENHANDS_VERSION)}),` `,(0,Z.jsx)(K.Text,{className:`text-content-2`,children:t})]})]})]})]})}function _a({isActive:e,children:t,onClick:n,className:r,disabled:i=!1}){return(0,Z.jsx)(`button`,{type:`button`,disabled:i,className:F(`px-4 py-2 font-normal border-b-2 transition-colors`,e?`border-foreground text-foreground`:`border-transparent text-[var(--oh-muted)] hover:text-[var(--oh-foreground)]`,i&&`opacity-50 cursor-not-allowed`,r),onClick:n,"aria-selected":e,role:`tab`,children:t})}function va({activeTab:e,onTabChange:t,hasTools:n}){let{t:r}=a(`openhands`);return(0,Z.jsxs)(`div`,{className:`mb-2 flex border-b border-[var(--oh-border)]`,role:`tablist`,children:[(0,Z.jsx)(_a,{isActive:e===`system`,onClick:()=>t(`system`),children:r(T.SYSTEM_MESSAGE_MODAL$SYSTEM_MESSAGE_TAB)}),n&&(0,Z.jsx)(_a,{isActive:e===`tools`,onClick:()=>t(`tools`),children:r(T.SYSTEM_MESSAGE_MODAL$TOOLS_TAB)})]})}var ya=Be(`whitespace-pre-wrap`,{variants:{size:{default:`text-sm`,small:`text-xs`},font:{default:``,mono:`font-mono`},lineHeight:{default:``,relaxed:`leading-relaxed`},background:{default:``,dark:`bg-base`},textColor:{default:``,light:`text-[var(--oh-text-tertiary)]`},padding:{default:``,medium:`p-3`,large:`px-5`},borderRadius:{default:``,medium:`rounded-md`},shadow:{default:``,inner:`shadow-inner`},maxHeight:{default:``,small:`max-h-[400px]`,large:`max-h-[60vh]`},overflow:{default:``,auto:`overflow-auto`}},defaultVariants:{size:`default`,font:`default`,lineHeight:`default`,background:`default`,textColor:`default`,padding:`default`,borderRadius:`default`,shadow:`default`,maxHeight:`default`,overflow:`default`}});function ba({size:e,font:t,lineHeight:n,background:r,textColor:i,padding:a,borderRadius:o,shadow:s,maxHeight:c,overflow:l,className:u,testId:d,children:f}){return(0,Z.jsx)(`pre`,{"data-testid":d,className:F(ya({size:e,font:t,lineHeight:n,background:r,textColor:i,padding:a,borderRadius:o,shadow:s,maxHeight:c,overflow:l}),u),children:f})}function xa({content:e}){return(0,Z.jsx)(ba,{size:`small`,font:`mono`,lineHeight:`relaxed`,padding:`medium`,className:`text-[var(--oh-text-tertiary)]`,children:e})}function Sa({parameters:e}){let{t}=a(`openhands`);return(0,Z.jsxs)(`div`,{className:`mt-2`,"data-testid":`tool-parameters`,children:[(0,Z.jsx)(K.Text,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)]`,children:t(T.SYSTEM_MESSAGE_MODAL$PARAMETERS)}),(0,Z.jsx)(`div`,{className:`text-sm mt-2 p-3 bg-base rounded-md overflow-auto text-[var(--oh-text-tertiary)] max-h-[400px] border border-[var(--oh-border)]`,children:(0,Z.jsx)(ge,{name:!1,src:e,theme:O})})]})}function Ca({title:e,isExpanded:t,onClick:n,className:r}){return(0,Z.jsxs)(`button`,{type:`button`,"data-testid":`toggle-button`,onClick:n,className:F(`w-full py-3 px-3 text-left flex items-center justify-between hover:bg-tertiary transition-colors`,r),children:[(0,Z.jsx)(`div`,{className:`flex items-center`,children:(0,Z.jsx)(K.Text,{className:`font-bold text-content-2`,children:e})}),(0,Z.jsx)(K.Text,{className:`text-[var(--oh-text-tertiary)]`,children:t?(0,Z.jsx)(L,{size:18}):(0,Z.jsx)(de,{size:18})})]})}function wa({tool:e,index:t,isExpanded:n,onToggle:r}){let i=e,a=i.function||i,o=i.title||i.annotations?.title||a.name||i.type===`function`&&i.function?.name||``,s=i.description||a.description||i.type===`function`&&i.function?.description||``,c=a.parameters||i.type===`function`&&i.function?.parameters||i.parameters||null;return(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(Ca,{title:String(o),isExpanded:n,onClick:()=>r(t)}),n&&(0,Z.jsxs)(`div`,{className:`px-3 pb-3 pt-1 border-t border-[var(--oh-border)]`,children:[(0,Z.jsx)(`div`,{className:`mt-2 mb-3 text-sm text-[var(--oh-text-tertiary)] leading-relaxed`,children:(0,Z.jsx)(an,{children:String(s)})}),c&&(0,Z.jsx)(Sa,{parameters:c})]})]})}function Ta({tools:e,expandedTools:t,onToggleTool:n}){return(0,Z.jsx)(`div`,{className:`divide-y divide-[var(--oh-border)]`,children:e.map((e,r)=>(0,Z.jsx)(wa,{tool:e,index:r,isExpanded:t[r]||!1,onToggle:n},r))})}function Ea(){let{t:e}=a(`openhands`);return(0,Z.jsx)(`div`,{className:`flex items-center justify-center h-full p-4`,children:(0,Z.jsx)(K.Text,{className:`text-[var(--oh-muted)]`,children:e(T.SYSTEM_MESSAGE_MODAL$NO_TOOLS)})})}function Da({activeTab:e,systemMessage:t,expandedTools:n,onToggleTool:r}){return e===`system`?(0,Z.jsx)(xa,{content:t.content}):e===`tools`?t.tools&&t.tools.length>0?(0,Z.jsx)(Ta,{tools:t.tools,expandedTools:n,onToggleTool:r}):(0,Z.jsx)(Ea,{}):null}function Oa({isOpen:e,onClose:t,systemMessage:n}){let[r,i]=(0,Y.useState)(`system`),[a,o]=(0,Y.useState)({});return n?e&&(0,Z.jsx)(we,{onClose:t,children:(0,Z.jsxs)(Te,{width:`lg`,className:`relative max-h-[80vh] flex flex-col items-start border border-[var(--oh-border)]`,testID:`system-message-modal`,children:[(0,Z.jsx)(ga,{agentClass:n.agent_class,openhandsVersion:n.openhands_version,onClose:t}),(0,Z.jsxs)(`div`,{className:`w-full`,children:[(0,Z.jsx)(va,{activeTab:r,onTabChange:i,hasTools:!!(n.tools&&n.tools.length>0)}),(0,Z.jsx)(`div`,{className:`h-[60vh] overflow-auto rounded-md border border-[var(--oh-border)] bg-surface-raised custom-scrollbar-always`,children:(0,Z.jsx)(Da,{activeTab:r,systemMessage:n,expandedTools:a,onToggleTool:e=>{o(t=>({...t,[e]:!t[e]}))}})})]})]})}):null}var ka=`rounded-md p-1 text-white hover:bg-tertiary cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed`;function Aa({isLoading:e,isRefetching:t,onRefresh:n,onClose:r}){let{t:i}=a(`openhands`),o=i(T.BUTTON$REFRESH);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(at,{onClose:r,testId:`close-skills-modal`}),(0,Z.jsxs)(`div`,{className:`flex w-full items-start justify-between gap-4 pr-10`,children:[(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[(0,Z.jsx)(U,{title:i(T.SKILLS_MODAL$TITLE)}),(0,Z.jsx)(K.Text,{className:`text-sm text-[var(--oh-muted)]`,children:i(T.SKILLS_MODAL$WARNING)})]}),(0,Z.jsx)(Pe,{content:o,placement:`bottom`,children:(0,Z.jsx)(`button`,{type:`button`,"data-testid":`refresh-skills`,onClick:n,disabled:e||t,"aria-label":o,className:ka,children:(0,Z.jsx)(xe,{size:18,className:F(t&&`animate-spin`),"aria-hidden":!0})})})]})]})}function ja({title:e,count:t,children:n}){return(0,Z.jsxs)(`section`,{className:`w-full`,children:[(0,Z.jsx)(`div`,{className:`sticky top-0 z-10 border-b border-[var(--oh-border)] bg-surface-raised px-3 py-2`,children:(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,Z.jsx)(K.Text,{className:`text-xs font-medium tracking-[0.01em] text-tertiary-light`,children:e}),(0,Z.jsx)(`span`,{className:`inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-[11px] font-medium leading-4 border border-[var(--oh-border)] bg-[var(--oh-surface)] text-tertiary-light`,children:t})]})}),(0,Z.jsx)(`div`,{className:`divide-y divide-[var(--oh-border)]`,children:n})]})}function Ma(){return(0,Z.jsx)(`div`,{className:`flex justify-center items-center py-8`,children:(0,Z.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-white`})})}function Na({isError:e}){let{t}=a(`openhands`);return(0,Z.jsx)(`div`,{className:`flex items-center justify-center h-full p-4`,children:(0,Z.jsx)(K.Text,{className:`text-[var(--oh-muted)]`,children:t(e?T.COMMON$FETCH_ERROR:T.CONVERSATION$NO_SKILLS)})})}function Pa({triggers:e}){let{t}=a(`openhands`);return!e||e.length===0?null:(0,Z.jsxs)(`div`,{className:`mt-2 mb-3`,children:[(0,Z.jsx)(K.Text,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)] mb-2`,children:t(T.COMMON$TRIGGERS)}),(0,Z.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-1`,children:e.map(e=>(0,Z.jsx)(`span`,{className:`inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium leading-4 border border-[var(--oh-border)] bg-[var(--oh-surface)] text-tertiary-light`,children:e},e))})]})}function Fa({content:e}){let{t}=a(`openhands`);return(0,Z.jsxs)(`div`,{className:`mt-2`,children:[(0,Z.jsx)(K.Text,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)] mb-2`,children:t(T.COMMON$CONTENT)}),(0,Z.jsx)(ba,{size:`small`,font:`mono`,lineHeight:`relaxed`,padding:`medium`,borderRadius:`medium`,maxHeight:`small`,overflow:`auto`,className:`mt-2 border border-[var(--oh-border)] bg-base text-[var(--oh-text-tertiary)]`,children:e||t(T.SKILLS_MODAL$NO_CONTENT)})]})}var Ia={knowledge:`Knowledge`,repo:`Repository`,agentskills:`AgentSkills`},La=`inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-[11px] font-medium leading-4 border border-[var(--oh-border)] bg-[var(--oh-surface)] text-tertiary-light`;function Ra({skill:e,isExpanded:t,onToggle:n}){return(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>n(e.name),className:`w-full py-3 px-3 text-left flex items-center justify-between hover:bg-tertiary transition-colors`,children:[(0,Z.jsx)(`div`,{className:`flex items-center`,children:(0,Z.jsx)(K.Text,{className:`font-bold text-content-2`,children:e.name})}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:La,children:Ia[e.type]}),(0,Z.jsx)(K.Text,{className:`text-[var(--oh-text-tertiary)]`,children:t?(0,Z.jsx)(L,{size:18}):(0,Z.jsx)(de,{size:18})})]})]}),t&&(0,Z.jsxs)(`div`,{className:`px-3 pb-3 pt-1 border-t border-[var(--oh-border)]`,children:[(0,Z.jsx)(Pa,{triggers:e.triggers??[]}),(0,Z.jsx)(Fa,{content:e.content??``})]})]})}var za={project:T.SKILLS_MODAL$SECTION_PROJECT,personal:T.SKILLS_MODAL$SECTION_USER,public:T.SKILLS_MODAL$SECTION_PUBLIC};function Ba({onClose:e}){let{t}=a(`openhands`),n=I(),[r,i]=(0,Y.useState)({}),{data:o,isLoading:s,isError:c,refetch:l,isRefetching:u}=rr(),d=sn(),f=(0,Y.useMemo)(()=>(o??[]).filter(d),[o,d]),p=(0,Y.useMemo)(()=>ln(f,n),[f,n]),m=e=>{i(t=>({...t,[e]:!t[e]}))};return(0,Z.jsx)(we,{onClose:e,children:(0,Z.jsxs)(Te,{width:`lg`,className:`relative max-h-[80vh] flex flex-col items-start border border-[var(--oh-border)]`,testID:`skills-modal`,children:[(0,Z.jsx)(Aa,{isLoading:s,isRefetching:u,onRefresh:l,onClose:e}),(0,Z.jsx)(`div`,{className:`w-full h-[60vh] overflow-auto rounded-md border border-[var(--oh-border)] bg-surface-raised custom-scrollbar-always`,children:s?(0,Z.jsx)(Ma,{}):c||!o||f.length===0?(0,Z.jsx)(Na,{isError:c}):p&&(0,Z.jsx)(`div`,{className:`divide-y divide-[var(--oh-border)]`,children:un.map(e=>{let n=p[e];return n.length===0?null:(0,Z.jsx)(ja,{title:t(za[e]),count:n.length,children:n.map(t=>(0,Z.jsx)(Ra,{skill:t,isExpanded:r[t.name]||!1,onToggle:m},`${e}-${t.name}`))},e)})})})]})})}function Va(){let{conversationId:e}=q();return(0,Y.useMemo)(()=>e?ot(e)?.plugins??[]:[],[e])}function Ha({onClose:e}){let{t}=a(`openhands`),n=Va();return(0,Z.jsx)(we,{onClose:e,children:(0,Z.jsxs)(Te,{width:`lg`,className:`relative flex max-h-[80vh] flex-col items-start border border-[var(--oh-border)]`,testID:`plugins-modal`,children:[(0,Z.jsx)(at,{onClose:e,testId:`close-plugins-modal`}),(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-2 pr-10`,children:[(0,Z.jsx)(U,{title:t(T.PLUGINS_MODAL$TITLE)}),(0,Z.jsx)(K.Text,{className:`text-sm text-[var(--oh-muted)]`,children:t(T.PLUGINS_MODAL$DESCRIPTION)})]}),(0,Z.jsx)(`div`,{className:`w-full overflow-auto rounded-md border border-[var(--oh-border)] bg-surface-raised custom-scrollbar-always`,children:n.length===0?(0,Z.jsx)(`div`,{className:`flex items-center justify-center p-6`,children:(0,Z.jsx)(K.Text,{className:`text-[var(--oh-muted)]`,children:t(T.PLUGINS_MODAL$EMPTY)})}):(0,Z.jsx)(`ul`,{className:`divide-y divide-[var(--oh-border)]`,children:n.map(e=>(0,Z.jsxs)(`li`,{"data-testid":`active-plugin-${At(e)}`,className:`flex flex-col gap-1 p-4`,children:[(0,Z.jsx)(K.Text,{className:`font-semibold text-white`,children:At(e)}),(0,Z.jsx)(K.Text,{className:`text-xs text-tertiary-alt`,children:Et(e)?t(T.PLUGINS_MODAL$SOURCE_LOCAL):Dt(e)})]},kt(e)))})})]})})}var Ua=()=>{let{conversationId:e}=nn(),{curAgentState:t}=Gt();return c({queryKey:[`conversation`,e,`hooks`],queryFn:async()=>{if(!e)throw Error(`No conversation ID provided`);let{hooks:t}=await G.getHooks(e);return t},enabled:!!e&&t!==P.LOADING&&t!==P.INIT,staleTime:1e3*60*5,gcTime:1e3*60*15})},Wa=`rounded-md p-1 text-white hover:bg-tertiary cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed`;function Ga({isLoading:e,isRefetching:t,onRefresh:n,onClose:r}){let{t:i}=a(`openhands`),o=i(T.BUTTON$REFRESH);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(at,{onClose:r,testId:`close-hooks-modal`}),(0,Z.jsxs)(`div`,{className:`flex w-full items-start justify-between gap-4 pr-10`,children:[(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[(0,Z.jsx)(U,{title:i(T.HOOKS_MODAL$TITLE)}),(0,Z.jsx)(K.Text,{className:`text-sm text-[var(--oh-muted)]`,children:i(T.HOOKS_MODAL$WARNING)})]}),(0,Z.jsx)(Pe,{content:o,placement:`bottom`,children:(0,Z.jsx)(`button`,{type:`button`,"data-testid":`refresh-hooks`,onClick:n,disabled:e||t,"aria-label":o,className:Wa,children:(0,Z.jsx)(xe,{size:18,className:F(t&&`animate-spin`),"aria-hidden":!0})})})]})]})}function Ka(){return(0,Z.jsx)(`div`,{className:`flex justify-center items-center py-8`,children:(0,Z.jsx)(`div`,{className:`animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-white`})})}function qa({isError:e}){let{t}=a(`openhands`);return(0,Z.jsx)(`div`,{className:`flex items-center justify-center h-full p-4`,children:(0,Z.jsx)(K.Text,{className:`text-[var(--oh-muted)]`,children:t(e?T.COMMON$FETCH_ERROR:T.CONVERSATION$NO_HOOKS)})})}var Ja=`inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium leading-4 border border-[var(--oh-border)] bg-[var(--oh-surface)] text-tertiary-light`;function Ya({matcher:e}){let{t}=a(`openhands`);return(0,Z.jsxs)(`div`,{className:`py-3`,children:[(0,Z.jsxs)(`div`,{className:`mb-2`,children:[(0,Z.jsx)(K.Text,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)]`,children:t(T.HOOKS_MODAL$MATCHER)}),(0,Z.jsx)(`span`,{className:`ml-2 ${Ja}`,children:e.matcher})]}),(0,Z.jsxs)(`div`,{className:`mt-2`,children:[(0,Z.jsx)(K.Text,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)] mb-2`,children:t(T.HOOKS_MODAL$COMMANDS)}),(e.hooks??[]).map((e,n)=>(0,Z.jsxs)(`div`,{className:`mt-2`,children:[(0,Z.jsx)(ba,{size:`small`,font:`mono`,lineHeight:`relaxed`,padding:`medium`,borderRadius:`medium`,maxHeight:`small`,overflow:`auto`,className:`border border-[var(--oh-border)] bg-base text-[var(--oh-text-tertiary)]`,children:e.command}),(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-2 text-xs text-[var(--oh-muted)]`,children:[(0,Z.jsx)(`span`,{className:Ja,children:t(T.HOOKS_MODAL$TYPE,{type:e.type})}),(0,Z.jsx)(`span`,{className:Ja,children:t(T.HOOKS_MODAL$TIMEOUT,{timeout:e.timeout})}),e.async?(0,Z.jsx)(`span`,{className:Ja,children:t(T.HOOKS_MODAL$ASYNC)}):null]})]},`${e.command}-${n}`))]})]})}var Xa={pre_tool_use:T.HOOKS_MODAL$EVENT_PRE_TOOL_USE,post_tool_use:T.HOOKS_MODAL$EVENT_POST_TOOL_USE,user_prompt_submit:T.HOOKS_MODAL$EVENT_USER_PROMPT_SUBMIT,session_start:T.HOOKS_MODAL$EVENT_SESSION_START,session_end:T.HOOKS_MODAL$EVENT_SESSION_END,stop:T.HOOKS_MODAL$EVENT_STOP},Za=`inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-[11px] font-medium leading-4 border border-[var(--oh-border)] bg-[var(--oh-surface)] text-tertiary-light`,Qa=`HOOKS_MODAL$HOOK_COUNT`;function $a({hookEvent:e,isExpanded:t,onToggle:n}){let{t:r}=a(`openhands`),i=Xa[e.event_type],o=i?r(i):e.event_type,s=e.matchers.reduce((e,t)=>e+(t.hooks??[]).length,0);return(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>n(e.event_type),className:`w-full py-3 px-3 text-left flex items-center justify-between hover:bg-tertiary transition-colors`,children:[(0,Z.jsx)(`div`,{className:`flex items-center`,children:(0,Z.jsx)(K.Text,{className:`font-bold text-content-2`,children:o})}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:Za,children:r(Qa,{count:s})}),(0,Z.jsx)(K.Text,{className:`text-[var(--oh-text-tertiary)]`,children:t?(0,Z.jsx)(L,{size:18}):(0,Z.jsx)(de,{size:18})})]})]}),t&&(0,Z.jsx)(`div`,{className:`border-t border-[var(--oh-border)] px-3 pt-3 pb-3`,children:(0,Z.jsx)(`div`,{className:`divide-y divide-[var(--oh-border)]`,children:e.matchers.map((t,n)=>(0,Z.jsx)(Ya,{matcher:t},`${e.event_type}-${t.matcher}-${n}`))})})]})}function eo({testId:e=`runtime-waiting`,messageKey:t=T.DIFF_VIEWER$WAITING_FOR_RUNTIME,className:n}){let{t:r}=a(`openhands`);return(0,Z.jsxs)(`div`,{"data-testid":e,className:F(`flex h-full w-full flex-col items-center justify-center gap-3 py-8 text-center`,n),children:[(0,Z.jsx)(Se,{size:`small`}),(0,Z.jsx)(K.Text,{className:`text-sm text-[var(--oh-muted)]`,children:r(t)})]})}function to({onClose:e}){let{curAgentState:t}=Gt(),[n,r]=(0,Y.useState)({}),{data:i,isLoading:a,isError:o,refetch:s,isRefetching:c}=Ua(),l=e=>{r(t=>({...t,[e]:!t[e]}))},u=![P.LOADING,P.INIT].includes(t);return(0,Z.jsx)(we,{onClose:e,children:(0,Z.jsxs)(Te,{width:`lg`,className:`relative max-h-[80vh] flex flex-col items-start border border-[var(--oh-border)]`,testID:`hooks-modal`,children:[(0,Z.jsx)(Ga,{isLoading:a,isRefetching:c,onRefresh:s,onClose:e}),(0,Z.jsx)(`div`,{className:`w-full h-[60vh] overflow-auto rounded-md border border-[var(--oh-border)] bg-surface-raised custom-scrollbar-always`,children:u?a?(0,Z.jsx)(Ka,{}):o||!i||i.length===0?(0,Z.jsx)(qa,{isError:o}):(0,Z.jsx)(`div`,{className:`divide-y divide-[var(--oh-border)]`,children:i.map(e=>(0,Z.jsx)($a,{hookEvent:e,isExpanded:n[e.event_type]||!1,onToggle:l},e.event_type))}):(0,Z.jsx)(eo,{testId:`hooks-runtime-waiting`})})]})})}function no({handleFileIconClick:e,disabled:t=!1,showAgentProfileSwitch:n=!1}){let{t:r}=a(`openhands`),{conversationId:i}=q(),{data:o}=J(),[s,c]=Y.useState(!1),{handleShowAgentTools:l,handleShowSkills:u,handleShowPlugins:d,handleShowHooks:f,systemModalVisible:p,setSystemModalVisible:m,skillsModalVisible:h,setSkillsModalVisible:g,pluginsModalVisible:_,setPluginsModalVisible:v,hooksModalVisible:y,setHooksModalVisible:b,systemMessage:x,shouldShowAgentTools:S,shouldShowHooks:C,shouldShowPlugins:w}=Fi({conversationId:i??void 0,executionStatus:o?.execution_status,showOptions:!0,onContextMenuToggle:c});return(0,Z.jsxs)(`div`,{className:`relative`,children:[(0,Z.jsx)(`button`,{type:`button`,className:F(ke,`relative shrink-0 size-6`,t?`cursor-not-allowed text-[var(--oh-text-subtle)]`:void 0,s&&!t&&`text-white bg-white/10`),"aria-label":r(T.CHAT_INTERFACE$PLUS_MENU),"aria-expanded":s,"aria-haspopup":`menu`,"data-testid":`chat-plus-button`,onClick:e=>{e.preventDefault(),e.stopPropagation(),!t&&c(e=>!e)},disabled:t,children:(0,Z.jsx)(`span`,{className:`flex h-full w-full items-center justify-center`,children:(0,Z.jsx)(be,{className:`h-[13px] w-[13px] shrink-0`,strokeWidth:2})})}),s&&(0,Z.jsx)(ha,{onClose:()=>c(!1),showAgentProfileSwitch:n,onShowSkills:u,onShowPlugins:d,onShowHooks:f,onShowAgentTools:l,shouldShowAgentTools:S,shouldShowHooks:C,shouldShowPlugins:w,footerAction:{testId:`add-files-and-images-button`,icon:(0,Z.jsx)(me,{className:`h-4 w-4 shrink-0`,strokeWidth:2,"aria-hidden":!0}),label:r(T.CHAT_INTERFACE$ADD_FILES_AND_IMAGES),onClick:e}}),(0,Z.jsx)(Oa,{isOpen:p,onClose:()=>m(!1),systemMessage:x||null}),h&&(0,Z.jsx)(Ba,{onClose:()=>g(!1)}),_&&(0,Z.jsx)(Ha,{onClose:()=>v(!1)}),y&&(0,Z.jsx)(to,{onClose:()=>b(!1)})]})}var ro=(e,t,n,r=!0)=>{let i=c({queryKey:[`conversation-metrics`,e,t,n],queryFn:async()=>{if(!e)throw Error(`Conversation ID is required`);return ct(await G.getRuntimeConversation(e,t,n))},enabled:r&&!!e,staleTime:1e3*30,gcTime:1e3*60*5,refetchInterval:1e3*30,retry:!1});return{data:i.data,isLoading:i.isLoading,error:i.error}};function io(e){let t=e?.context_window??0;return t<=0?null:{perTurnToken:e?.per_turn_token??0,contextWindow:t}}function ao(){let e=en(e=>e.usage),{data:t}=J(),{data:n}=ro(t?.id,t?.conversation_url,t?.session_api_key,!!t?.id);return(0,Y.useMemo)(()=>io(e)||io(n?.accumulated_token_usage??null),[e,n])}var oo=()=>{let e=i();return s({mutationFn:e=>G.condenseConversation(e.conversationId,e.conversationUrl,e.sessionApiKey),onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:[`conversation-metrics`,r.conversationId]})}})},so=2500,co=9e4;function lo(e,t,n){return{beforeToken:e,afterToken:t,savedToken:Math.max(0,e-t),outcome:n}}function uo({beforeToken:e,baselineEventIds:t,onComplete:n,timeoutMs:r=co}){let i=(0,Y.useRef)(n);i.current=n,(0,Y.useEffect)(()=>{if(e===null)return;let n=!1,a=!1,o,s=t?new Set(t):new Set(Kt.getState().eventIds),c=()=>en.getState().usage?.per_turn_token??e,l=(t,r)=>{n||(n=!0,i.current(lo(e,t,r)))},u=()=>{let t=c();return a&&t<e?(l(t,`compacted`),!0):!1},d=()=>{clearTimeout(o),o=setTimeout(()=>{l(c(),`no_change`)},so)},f=()=>{for(let e of Kt.getState().events){let t=`id`in e?e.id:void 0;if(t!==void 0){if(s.has(t))continue;s.add(t)}if(Jt(e)){a=!0,u()||d();return}}};f();let p=Kt.subscribe(()=>{n||f()}),m=en.subscribe(()=>{n||u()&&clearTimeout(o)}),h=setTimeout(()=>{l(c(),a?`no_change`:`timeout`)},r);return()=>{n=!0,p(),m(),clearTimeout(o),clearTimeout(h)}},[e,t,r])}function fo(e){if(e>=1e6){let t=e/1e6;return t>=10&&Number.isInteger(t)?`${t.toFixed(0)}M`:`${t.toFixed(1)}M`}if(e>=1e3){let t=e/1e3;return Number.isInteger(t)?`${t.toFixed(0)}k`:`${t.toFixed(1)}k`}return e.toLocaleString()}function po(e,t){return t<=0?0:Math.min(100,e/t*100)}function mo(e=0){let{t}=a(`openhands`),n=i(),{data:r}=J(),{curAgentState:o}=Gt(),{mutate:s,isPending:c}=oo(),[l,u]=Y.useState(null),d=Y.useRef(null),f=o===P.RUNNING||o===P.LOADING,p=c||l!==null,m=!r?.id||f||p,h=t(T.CONVERSATION$COMPACT_CONTEXT_DESCRIPTION),v=Y.useEffectEvent(e=>{if(u(null),d.current=null,r?.id&&n.invalidateQueries({queryKey:[`conversation-metrics`,r.id]}),e.outcome===`timeout`){S(t(T.CONVERSATION$COMPACT_CONTEXT_FAILED));return}if(e.savedToken>0){g(t(T.CONVERSATION$COMPACT_CONTEXT_COMPLETE,{saved:fo(e.savedToken),before:fo(e.beforeToken),after:fo(e.afterToken)}));return}g(t(T.CONVERSATION$COMPACT_CONTEXT_COMPLETE_NO_CHANGE))});return uo({beforeToken:l,baselineEventIds:l===null?null:d.current,onComplete:v}),{handleCompact:()=>{if(!r?.id||p)return;let n=en.getState().usage?.per_turn_token??e;d.current=new Set(Kt.getState().eventIds),s({conversationId:r.id,conversationUrl:r.conversation_url,sessionApiKey:r.session_api_key},{onSuccess:()=>{u(n),g(t(T.CONVERSATION$COMPACT_CONTEXT_STARTED))},onError:e=>{u(null),d.current=null,S(_(e)||t(T.CONVERSATION$COMPACT_CONTEXT_FAILED))}})},isCompacting:p,isDisabled:m,description:h}}function ho(e){return e>90?`danger`:e>70?`warning`:`neutral`}function go({perTurnToken:e,contextWindow:t}){let{t:n}=a(`openhands`),r=t<=0,i=po(e,t),o=ho(i),s=o===`warning`,c=o===`danger`,l=Math.round(i),u=Math.max(0,100-l),d=r?n(T.CONVERSATION$CONTEXT_WINDOW_UNKNOWN):`${l}% ${n(T.CONVERSATION$USED)} (${u}% ${n(T.CONVERSATION$LEFT)})`;return(0,Z.jsxs)(`div`,{"data-testid":`context-meter`,className:`flex flex-col gap-2`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,Z.jsx)(`span`,{className:`font-semibold`,children:n(T.CONVERSATION$CONTEXT_WINDOW)}),(0,Z.jsx)(`span`,{className:F(`shrink-0 text-xs`,c?`text-red-500`:s?`text-amber-500`:`text-[var(--oh-muted)]`),children:d})]}),(0,Z.jsx)(`div`,{className:`relative h-1.5 w-full rounded-full bg-tertiary`,children:(0,Z.jsx)(`div`,{"data-testid":`context-meter-bar`,className:F(`absolute inset-y-0 left-0 rounded-full transition-all duration-300`,c?`bg-red-500`:s?`bg-amber-500`:`bg-foreground`),style:{width:`${i}%`}})}),(0,Z.jsx)(`div`,{className:`flex justify-end`,children:(0,Z.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:r?e.toLocaleString():`${e.toLocaleString()} / ${t.toLocaleString()}`})})]})}var $=16,_o=2,vo=`color-mix(in srgb, var(--oh-foreground) ${.42*100}%, transparent)`,yo={neutral:`var(--oh-foreground)`,warning:`#f59e0b`,danger:`#ef4444`};function bo({percentage:e,className:t}){let n=($-_o)/2,r=2*Math.PI*n,i=Math.min(100,Math.max(0,e)),a=r-i/100*r,o=ho(i);return(0,Z.jsxs)(`svg`,{width:$,height:$,viewBox:`0 0 ${$} ${$}`,className:F(`shrink-0`,t),"aria-hidden":!0,children:[(0,Z.jsx)(`circle`,{cx:$/2,cy:$/2,r:n,fill:`none`,style:{stroke:vo},strokeWidth:_o,"data-testid":`context-window-ring-track`}),(0,Z.jsx)(`circle`,{cx:$/2,cy:$/2,r:n,fill:`none`,stroke:yo[o],strokeWidth:_o,strokeLinecap:`round`,strokeDasharray:r,strokeDashoffset:a,transform:`rotate(-90 ${$/2} ${$/2})`,className:`transition-[stroke-dashoffset,stroke] duration-300`,"data-testid":`context-window-ring-arc`})]})}var xo={neutral:`bg-foreground`,warning:`bg-amber-500`,danger:`bg-red-500`},So={neutral:`text-[var(--oh-muted)]`,warning:`text-amber-500`,danger:`text-red-500`};function Co(){let{t:e}=a(`openhands`),t=ao(),{navigateToTab:n}=Xt(),[r,i]=Y.useState(!1),o=Y.useRef(null),s=St(()=>i(!1),o),{handleCompact:c,isCompacting:l,isDisabled:u}=mo(t?.perTurnToken??0);if(!t)return null;let d=po(t.perTurnToken,t.contextWindow),f=Math.round(d),p=Math.max(0,100-f),m=`${f}% ${e(T.CONVERSATION$USED)} (${p}% ${e(T.CONVERSATION$LEFT)})`,h=`${fo(t.perTurnToken)} / ${fo(t.contextWindow)}`,g=ho(d),_=()=>{i(!1),n(`usage`)};return(0,Z.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,Z.jsx)(Pe,{content:e(T.CHAT_INTERFACE$SHOW_CONTEXT),placement:`top`,children:(0,Z.jsx)(`button`,{ref:o,type:`button`,className:F(ke,`size-8`),"aria-label":`${e(T.CHAT_INTERFACE$CONTEXT_WINDOW_METER_LABEL)}: ${m}`,"aria-expanded":r,"aria-haspopup":`dialog`,"data-testid":`context-window-meter`,onClick:e=>{e.preventDefault(),e.stopPropagation(),i(e=>!e)},children:(0,Z.jsx)(bo,{percentage:d})})}),r&&(0,Z.jsxs)(`div`,{ref:s,"data-testid":`context-window-meter-popover`,className:F(`absolute bottom-full right-0 z-[60] mb-2 w-[280px]`,`flex flex-col gap-0.5 rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 shadow-lg`),children:[(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 px-2 py-1.5`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-sm`,children:[(0,Z.jsx)(`span`,{className:`font-semibold text-[var(--oh-foreground)]`,children:e(T.CONVERSATION$CONTEXT_WINDOW)}),(0,Z.jsx)(`span`,{className:F(`shrink-0 text-xs`,So[g]),children:m})]}),(0,Z.jsx)(`button`,{type:`button`,"data-testid":`context-window-meter-bar-button`,className:`relative h-1.5 w-full rounded-full cursor-pointer`,style:{backgroundColor:vo},"aria-label":e(T.COMMON$USAGE),onClick:e=>{e.preventDefault(),e.stopPropagation(),_()},children:(0,Z.jsx)(`span`,{className:F(`absolute inset-y-0 left-0 rounded-full transition-all duration-300`,xo[g]),style:{width:`${Math.min(100,d)}%`}})}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,Z.jsxs)(`button`,{type:`button`,"data-testid":`context-window-compact-button`,disabled:u,"aria-busy":l,"aria-label":e(T.CONVERSATION$COMPACT_CONTEXT),className:F(`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs`,`text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]`,`transition-colors disabled:cursor-not-allowed disabled:opacity-50`),onClick:e=>{e.preventDefault(),e.stopPropagation(),c()},children:[l?(0,Z.jsx)(z,{className:`size-3 animate-spin`,"aria-hidden":!0}):(0,Z.jsx)(he,{className:`size-3`,"aria-hidden":!0}),(0,Z.jsx)(`span`,{children:e(T.CONVERSATION$COMPACT_CONTEXT)})]}),(0,Z.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:h})]})]}),(0,Z.jsx)(qe,{inset:`menu`}),(0,Z.jsx)(V,{testId:`context-window-plan-usage`,onClick:e=>{e.preventDefault(),e.stopPropagation(),_()},children:(0,Z.jsx)(Mt,{icon:(0,Z.jsx)(ve,{size:16}),text:e(T.COMMON$USAGE)})})]})]})}var wo=()=>{let e=i();return s({mutationFn:e=>xt(e.conversationId),onMutate:async()=>(await e.cancelQueries({queryKey:[`user`,`conversations`]}),{previousConversations:e.getQueryData([`user`,`conversations`])}),onError:(t,n,r)=>{r?.previousConversations&&e.setQueryData([`user`,`conversations`],r.previousConversations)},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,r.conversationId]}),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`v1-batch-get-app-conversations`]})}})},To=()=>{let e=i();return s({mutationFn:e=>yt(e.conversationId),onMutate:async()=>(await e.cancelQueries({queryKey:[`user`,`conversations`]}),{previousConversations:e.getQueryData([`user`,`conversations`])}),onError:(t,n,r)=>{r?.previousConversations&&e.setQueryData([`user`,`conversations`],r.previousConversations)},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,r.conversationId]}),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`v1-batch-get-app-conversations`]}),e.invalidateQueries({queryKey:[`unified`,`vscode_url`]})}})};function Eo({disabled:e,canSubmit:t=!0,hasStartedConversation:n,onAddFileClick:r=()=>{},showButton:i=!0,buttonClassName:o=``,handleSubmit:s=()=>{}}){let{t:c}=a(`openhands`),l=Ue(),u=wo(),d=To(),{conversationId:f}=q(),{backend:p}=b(),m=p.kind===`cloud`,h=mi(),g=!f||n===!1,_=Tt({enabled:g}),v=g&&!(f?.startsWith(`task-`)??!1)&&(_.data?.profiles?.length??0)>0,y=m&&!h.isAcpContext,x=wr(),{curAgentState:S}=Gt(),{conversationMode:C,setConversationMode:w}=W(),{handlePlanClick:E,isCreatingConversation:D}=si(),O=Y.useRef(null),k=Y.useRef(null),A=Y.useRef(null),j=Y.useRef(null),ee=Y.useRef(null),M=Y.useRef(null),[te,N]=Y.useState(1/0),[ne,re]=Y.useState(0),[ie,ae]=Y.useState(32),[oe,se]=Y.useState(96),[ce,I]=Y.useState(120),[ue,L]=Y.useState(!1),[de,R]=Y.useState(null),[pe,me]=Y.useState();Y.useEffect(()=>{let e=O.current,t=k.current,n=A.current,r=j.current,i=ee.current;if(!e||!t||!n||!i||y&&!r||typeof ResizeObserver>`u`)return;let a=()=>{let a=e.getBoundingClientRect().width,o=t.getBoundingClientRect().width,s=n.getBoundingClientRect().width,c=i.getBoundingClientRect().width;if(a>0&&N(a),o>0&&re(o),s>0&&ae(s),c>0&&I(c),r){let e=r.getBoundingClientRect().width;e>0&&se(e)}},o=new ResizeObserver(()=>{a()});return o.observe(e),o.observe(t),o.observe(n),o.observe(i),r&&o.observe(r),a(),()=>o.disconnect()},[y]);let he=()=>{f&&u.mutate({conversationId:f})},ge=()=>{f&&d.mutate({conversationId:f})},_e=l.isPending||u.isPending,ve=Y.useCallback(e=>{let t=e,n={showCodeInline:!1,showModelInline:!1};return y&&t>=oe&&(n.showCodeInline=!0,t-=oe+12),t>=ce&&(n.showModelInline=!0),n},[y,oe,ce]),ye=te-ne-8-ie-12,z=ve(ye),be=(!y||z.showCodeInline)&&z.showModelInline?z:ve(ye-28-12),xe=y?be.showCodeInline:!1,Se=be.showModelInline,Ce=te>=360,H=y&&!xe||!Se;Y.useEffect(()=>{H||(L(!1),R(null))},[H]);let we=St(()=>{L(!1),R(null)}),Te=S===P.RUNNING||D||x!==`OPEN`,U=()=>{R(null),L(!1)},De=Ai({isAcp:h.isAcpContext}),Oe=F(`group`,Ee),Ae=F(`text-[var(--oh-muted)] group-hover:text-[var(--oh-foreground)]`,Ee);Y.useLayoutEffect(()=>{if(!ue||!M.current)return;let e=M.current,t=()=>{let t=e.getBoundingClientRect();me({position:`fixed`,top:t.top-8,left:t.left,transform:`translateY(-100%)`,zIndex:9999})};return t(),window.addEventListener(`resize`,t),window.addEventListener(`scroll`,t,!0),()=>{window.removeEventListener(`resize`,t),window.removeEventListener(`scroll`,t,!0)}},[ue]);let je=(0,Z.jsxs)(B,{ref:we,testId:`chat-input-overflow-menu`,position:`top`,alignment:`left`,className:`!static !top-auto !bottom-auto !left-auto !right-auto !mt-0 overflow-visible min-w-[200px]`,children:[y&&!xe&&(0,Z.jsxs)(`div`,{className:`relative group/overflow-agent`,children:[(0,Z.jsx)(V,{testId:`overflow-agent-button`,onClick:()=>R(e=>e===`agent`?null:`agent`),isDisabled:Te,children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(Qr,{className:`h-[11px] w-[11px]`}),text:c(C===`code`?T.COMMON$CODE:T.COMMON$PLAN),rightIcon:(0,Z.jsx)(Bi,{width:10,height:10})})}),!Te&&(0,Z.jsx)(`div`,{className:F(`absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]`,`group-hover/overflow-agent:opacity-100 group-hover/overflow-agent:visible group-hover/overflow-agent:pointer-events-auto`,`hover:opacity-100 hover:visible hover:pointer-events-auto`,de===`agent`&&`opacity-100 visible pointer-events-auto`),children:(0,Z.jsxs)(B,{testId:`overflow-agent-submenu`,className:`overflow-visible min-w-[195px]`,children:[(0,Z.jsx)(V,{testId:`overflow-agent-code`,onClick:e=>{e.preventDefault(),e.stopPropagation(),w(`code`),U()},children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(Qr,{className:`h-[11px] w-[11px]`}),text:c(T.COMMON$CODE)})}),(0,Z.jsx)(V,{testId:`overflow-agent-plan`,onClick:e=>{E(e),U()},children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(rn,{width:16,height:16,color:`currentColor`}),text:c(T.COMMON$PLAN)})})]})})]}),!Se&&(0,Z.jsxs)(`div`,{className:`relative group/overflow-model`,children:[(0,Z.jsx)(V,{testId:`overflow-model-button`,onClick:()=>R(e=>e===`model`?null:`model`),children:(0,Z.jsx)(Q,{icon:(0,Z.jsx)(fe,{width:16,height:16,strokeWidth:2,"aria-hidden":!0}),text:c(T.SETTINGS$AGENT_MODEL),rightIcon:(0,Z.jsx)(Bi,{width:10,height:10})})}),(0,Z.jsx)(`div`,{className:F(`absolute left-full top-[-4px] z-60 opacity-0 invisible pointer-events-none transition-all duration-200 ml-[1px]`,`group-hover/overflow-model:opacity-100 group-hover/overflow-model:visible group-hover/overflow-model:pointer-events-auto`,`hover:opacity-100 hover:visible hover:pointer-events-auto`,de===`model`&&`opacity-100 visible pointer-events-auto`),children:(0,Z.jsx)(B,{testId:`overflow-model-submenu`,className:`min-w-[220px] max-w-[320px] max-h-[60vh] overflow-y-auto gap-0`,children:De===`model`?(0,Z.jsx)(yi,{model:h,onClose:U,dividerInset:`menu`,settingsLinkClassName:Oe,settingsIconClassName:Ae}):(0,Z.jsx)(Di,{onClose:U,dividerInset:`menu`,settingsLinkClassName:Oe,settingsIconClassName:Ae})})})]})]});return(0,Z.jsxs)(`div`,{ref:O,className:`w-full min-w-0 flex items-center justify-between gap-2`,children:[(0,Z.jsx)(`div`,{className:`flex min-w-0 items-center gap-1`,children:(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,Z.jsx)(`div`,{ref:A,className:F(!1),children:(0,Z.jsx)(no,{disabled:e,handleFileIconClick:r,showAgentProfileSwitch:v})}),y&&(0,Z.jsx)(`div`,{ref:j,className:F(!xe&&`hidden`),children:(0,Z.jsx)(ci,{})}),(0,Z.jsx)(`div`,{ref:ee,className:F(!Se&&`hidden`),children:De===`model`?(0,Z.jsx)(bi,{}):(0,Z.jsx)(Oi,{})}),H&&(0,Z.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,Z.jsx)(`button`,{ref:M,type:`button`,className:F(ke,`size-6`),"aria-label":c(T.CHAT_INTERFACE$MORE_INPUT_ACTIONS),"aria-expanded":ue,"aria-haspopup":`menu`,onClick:e=>{e.preventDefault(),e.stopPropagation(),L(e=>!e)},children:(0,Z.jsx)(Nt,{width:16,height:16,color:`currentColor`})}),ue&&typeof document<`u`&&pe&&_r.createPortal((0,Z.jsx)(`div`,{style:pe,children:je}),document.body)]})]})}),(0,Z.jsxs)(`div`,{ref:k,className:`ml-auto flex shrink-0 items-center gap-2`,children:[Ce&&f&&(0,Z.jsx)(Zr,{handleStop:he,handleResumeAgent:ge,disabled:e,isPausing:_e}),(0,Z.jsx)(Co,{}),i&&(0,Z.jsx)(le,{buttonClassName:o,handleSubmit:s,disabled:e||!t})]})]})}function Do(e){return e.replace(/!\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/\*{3}(.+?)\*{3}/g,`$1`).replace(/\*{2}(.+?)\*{2}/g,`$1`).replace(/\*(.+?)\*/g,`$1`).replace(/_{3}(.+?)_{3}/g,`$1`).replace(/_{2}(.+?)_{2}/g,`$1`).replace(/_(.+?)_/g,`$1`).replace(/`(.+?)`/g,`$1`).replace(/~~(.+?)~~/g,`$1`)}function Oo(e){let t=e,n=e.match(/^---\s*\n([\s\S]*?)\n---/);if(n){let r=n[1].match(/^description:\s*(.+)$/m);if(r){let e=r[1].trim();return(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))&&(e=e.slice(1,-1)),Do(e)}t=e.slice(n[0].length)}let r=t.split(`
|
|
27
|
+
`).map(e=>e.trim()).find(e=>e.length>0&&!e.startsWith(`#`)&&e!==`---`);if(!r)return null;let i=Do(r);return i.match(/^[^.!?\n]*[.!?]/)?.[0]||i}function ko({item:e,isSelected:t,onSelect:n,ref:r}){let i=(0,Y.useMemo)(()=>`description`in e.skill&&e.skill.description?Do(e.skill.description):`content`in e.skill&&e.skill.content?Oo(e.skill.content):null,[e.skill]);return(0,Z.jsxs)(`button`,{role:`option`,"aria-selected":t,ref:r,type:`button`,className:F(`w-full px-3 py-2.5 text-left`,Le,t?`bg-tertiary`:`hover:bg-[var(--oh-surface-raised)]`),onMouseDown:t=>{t.preventDefault(),n(e)},children:[(0,Z.jsx)(Ht,{className:`font-normal`,children:e.command}),i&&(0,Z.jsx)(Ht,{className:`text-xs text-[var(--oh-muted)] mt-0.5 truncate block`,children:i})]})}function Ao({items:e,selectedIndex:t,onSelect:n}){let{t:r}=a(`openhands`),i=(0,Y.useRef)([]);return(0,Y.useEffect)(()=>{i.current=i.current.slice(0,e.length)},[e.length]),(0,Y.useEffect)(()=>{let e=i.current[t];e&&e.scrollIntoView({block:`nearest`})},[t]),e.length===0?null:(0,Z.jsxs)(`div`,{role:`listbox`,"aria-label":r(T.CHAT_INTERFACE$COMMANDS),className:`absolute bottom-full left-0 w-full mb-1 bg-[var(--oh-surface)] border border-[var(--oh-border-subtle)] rounded-lg shadow-lg max-h-[300px] overflow-y-auto custom-scrollbar z-50`,"data-testid":`slash-command-menu`,children:[(0,Z.jsx)(`div`,{className:`px-3 py-2 text-xs text-[var(--oh-muted)] border-b border-[var(--oh-border-subtle)]`,children:r(T.CHAT_INTERFACE$COMMANDS)}),(0,Z.jsx)(`div`,{className:Ie,children:e.map((e,r)=>(0,Z.jsx)(ko,{item:e,isSelected:r===t,onSelect:n,ref:e=>{i.current[r]=e}},e.command))})]})}function jo({chatContainerRef:e,isDragOver:t,disabled:n,canSubmit:r,hasStartedConversation:i,isNewConversationPending:a=!1,showButton:o,buttonClassName:s,chatInputRef:c,handleFileIconClick:l,handleSubmit:u,onDragOver:d,onDragLeave:f,onDrop:p,onInput:m,onPaste:h,onKeyDown:g,onFocus:_,onBlur:v,isSlashMenuOpen:y=!1,slashItems:b=[],slashSelectedIndex:x=0,onSlashSelect:S}){return(0,Z.jsxs)(`div`,{ref:e,className:F(`bg-[var(--oh-surface)] box-border content-stretch flex flex-col items-start justify-center p-4 relative rounded-[15px] w-full`,W(e=>e.conversationMode)===`plan`&&`border border-[#597FF4]`),onDragOver:e=>d(e,n),onDragLeave:e=>f(e,n),onDrop:e=>p(e,n),children:[t&&(0,Z.jsx)(lr,{}),(0,Z.jsx)(mr,{}),(0,Z.jsxs)(`div`,{className:`relative w-full`,children:[y&&S&&(0,Z.jsx)(Ao,{items:b,selectedIndex:x,onSelect:S}),(0,Z.jsx)(gr,{chatInputRef:c,isNewConversationPending:a,onInput:m,onPaste:h,onKeyDown:g,onFocus:_,onBlur:v})]}),(0,Z.jsx)(Eo,{disabled:n,canSubmit:r,hasStartedConversation:i,onAddFileClick:()=>l(n),showButton:o,buttonClassName:s,handleSubmit:u})]})}function Mo({fileInputRef:e,onChange:t}){return(0,Z.jsx)(`input`,{type:`file`,ref:e,multiple:!0,accept:`*/*`,className:`hidden`,onChange:t,"data-testid":`upload-image-input`})}function No({disabled:e=!1,isNewConversationPending:t=!1,hasStartedConversation:n,showButton:r=!0,onSubmit:i,onFocus:a,onBlur:o,onFilesPaste:s,className:c=``,buttonClassName:l=``}){let[u,d]=Y.useState(!1),{submittedMessage:f,clearAllFiles:p,setShouldHideSuggestions:m,setSubmittedMessage:h,images:g,files:_}=W(),v=e,y=(0,Y.useRef)(i);(0,Y.useEffect)(()=>{y.current=i},[i]),(0,Y.useEffect)(()=>{!f||e||(y.current(f),h(null))},[f,e,h]);let{chatInputRef:b,messageToSend:x,checkIsContentEmpty:S,clearEmptyContentHandler:C,saveDraft:w}=Ln(),T=Y.useCallback(()=>{let e=b.current?.innerText??``,t=g.length>0||_.length>0;d(e.trim().length>0||t)},[b,g,_]),{fileInputRef:E,chatContainerRef:D,isDragOver:O,handleFileIconClick:k,handleFileInputChange:A,handleDragOver:j,handleDragLeave:ee,handleDrop:M}=Rn(s),{gripRef:te,isGripVisible:N,isGripDragging:ne,canResize:P,handleTopEdgeClick:re,smartResize:ie,handleGripMouseDown:ae,handleGripTouchStart:oe,increaseHeightForEmptyContent:se,resetManualResize:ce}=er(b,x),{handleSubmit:I}=nr(b,E,ie,i,ce),le=Y.useCallback(()=>{I(),T()},[I,T]),{handleInput:ue,handlePaste:L,handleKeyDown:de,handleBlur:R,handleFocus:fe}=tr(b,ie,se,S,C,a,o),{isMenuOpen:pe,filteredItems:me,selectedIndex:he,updateSlashMenu:ge,selectItem:_e,handleSlashKeyDown:ve,closeMenu:ye}=ar(b);return(0,Y.useEffect)(()=>()=>{m(!1),p()},[m,p]),(0,Y.useEffect)(()=>{T()},[T,g.length,_.length]),(0,Z.jsxs)(`div`,{className:F(`w-full`,c),children:[(0,Z.jsx)(Mo,{fileInputRef:E,onChange:A}),(0,Z.jsxs)(`div`,{className:`relative w-full`,children:[(0,Z.jsx)(or,{gripRef:te,isGripVisible:N,isGripDragging:ne,canResize:P,handleTopEdgeClick:re,handleGripMouseDown:ae,handleGripTouchStart:oe}),(0,Z.jsx)(jo,{chatContainerRef:D,isDragOver:O,disabled:v,canSubmit:u,hasStartedConversation:n,isNewConversationPending:t,showButton:r,buttonClassName:l,chatInputRef:b,handleFileIconClick:k,handleSubmit:le,onDragOver:j,onDragLeave:ee,onDrop:M,onInput:()=>{ue(),ge(),w(),T()},onPaste:L,onKeyDown:e=>{ve(e)||de(e,v,le)},onFocus:fe,onBlur:()=>{R(),ye(),T()},isSlashMenuOpen:pe,slashItems:me,slashSelectedIndex:he,onSlashSelect:_e})]})]})}var Po=`${w} `,Fo=(e,t)=>{let n=on(e=>e.show),r=i(),{switchAndLog:o}=Ci(),{backend:s,orgId:c}=b(),{t:l}=a();return(0,Y.useCallback)(i=>{let a=i.trim();if(!(a===`/model`||a.startsWith(Po))){t(i);return}let u=a.slice(w.length).trim();if(u){o(e??null,u);return}if(!e)return;let d=$t();r.fetchQuery({queryKey:[...m.all,s.id,c],queryFn:dt.listProfiles,staleTime:0}).then(({profiles:t})=>n(e,d,t)).catch(e=>{let t=l(T.MODEL$LIST_FAILED);S(e instanceof Error&&e.message?e.message:t)})},[e,t,n,r,o,s.id,c,l])},Io=e=>e.type.startsWith(`image/`),Lo=async e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{t()},r.onerror=()=>{n(Error(`Failed to read file: ${e.name}`))},r.onabort=()=>{n(Error(`File reading was aborted: ${e.name}`))},r.readAsArrayBuffer(e)}),Ro=async e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{t()},r.onerror=()=>{n(Error(`Failed to read image: ${e.name}`))},r.onabort=()=>{n(Error(`Image reading was aborted: ${e.name}`))},r.readAsDataURL(e)}),zo=async e=>{let t=await Promise.allSettled(e.map(async e=>(await Lo(e),e))),n=[],r=[];return t.forEach((t,i)=>{t.status===`fulfilled`?n.push(t.value):r.push({file:e[i],error:t.reason})}),{successful:n,failed:r}},Bo=async e=>{let t=await Promise.allSettled(e.map(async e=>(await Ro(e),e))),n=[],r=[];return t.forEach((t,i)=>{t.status===`fulfilled`?n.push(t.value):r.push({file:e[i],error:t.reason})}),{successful:n,failed:r}};function Vo(){let{images:e,files:t,addImages:n,addFiles:r,addFileLoading:i,removeFileLoading:a,addImageLoading:o,removeImageLoading:s,markImagesAsPasted:c}=W();return{handleUpload:(0,Y.useCallback)(async(l,u)=>{let d=Pr(l,[...e,...t]);if(!d.isValid){S(`Error: ${d.errorMessage}`);return}let f=l.filter(e=>!Io(e)),p=l.filter(e=>Io(e));p.length>0&&c(p.map(e=>e.name)),f.forEach(e=>i(e.name)),p.forEach(e=>o(e.name));try{let[e,t]=await Promise.all([zo(f),Bo(p)]);e.successful.length>0&&(r(e.successful),e.successful.forEach(e=>a(e.name))),t.successful.length>0&&(n(t.successful),t.successful.forEach(e=>s(e.name))),e.failed.forEach(({file:e,error:t})=>{a(e.name),S(`Failed to process file ${e.name}: ${t.message}`)}),t.failed.forEach(({file:e,error:t})=>{s(e.name),S(`Failed to process image ${e.name}: ${t.message}`)})}catch{f.forEach(e=>a(e.name)),p.forEach(e=>s(e.name)),S(`An unexpected error occurred while processing files`)}},[e,t,n,r,i,a,o,s,c])}}function Ho({hasSelection:e,testId:t=`dropdown-loading`}){return(0,Z.jsx)(`div`,{className:F(`absolute top-1/2 transform -translate-y-1/2`,e?`right-11`:`right-6`),children:(0,Z.jsx)(`div`,{className:`animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full`,"data-testid":t})})}function Uo({providers:e,value:t,placeholder:n,className:r,errorMessage:i,disabled:o=!1,isLoading:s=!1,onChange:c,inputClassName:l,toggleButtonClassName:u,itemClassName:d}){let{t:f}=a(`openhands`),[p,m]=(0,Y.useState)(``),[h,g]=(0,Y.useState)(t||null),_=e=>{switch(e){case`github`:return`GitHub`;case`gitlab`:return`GitLab`;case`bitbucket`:return`Bitbucket`;case`bitbucket_data_center`:return`Bitbucket Data Center`;case`azure_devops`:return`Azure DevOps`;default:return e.charAt(0).toUpperCase()+e.slice(1)}},v=(0,Y.useMemo)(()=>h&&p===_(h)||!p?.trim()?e:e.filter(e=>_(e).toLowerCase().includes(p.toLowerCase())),[e,p,h]),{isOpen:y,getToggleButtonProps:b,getMenuProps:x,getInputProps:S,highlightedIndex:C,getItemProps:w,selectedItem:E}=Ne({items:v,itemToString:e=>e?_(e):``,selectedItem:h,onSelectedItemChange:({selectedItem:e})=>{g(e||null),c?.(e||null)},onInputValueChange:({inputValue:e})=>{m(e||``)},inputValue:p});(0,Y.useEffect)(()=>{t!==h&&g(t||null)},[t,h]),(0,Y.useEffect)(()=>{E&&!y?m(_(E)):E||m(``)},[E,y]);let D=(e,t,n,r,i)=>(0,Z.jsx)(_n,{item:e,index:t,isSelected:e===r,getItemProps:i,getDisplayText:_,getItemKey:e=>e,isProviderDropdown:!0,itemClassName:d},e),O=e=>(0,Z.jsx)(vn,{inputValue:e,searchMessage:`No providers found`,emptyMessage:`No providers available`,testId:`git-provider-dropdown-empty`});return(0,Z.jsxs)(`div`,{className:F(`relative`,r),children:[(0,Z.jsxs)(`div`,{className:`group relative text-[var(--oh-muted)] hover:text-white`,children:[E&&(0,Z.jsx)(`div`,{className:`absolute left-2 top-1/2 transform -translate-y-1/2 z-10`,children:(0,Z.jsx)(Ge,{gitProvider:E,className:`min-w-[14px] min-h-[14px] w-[14px] h-[14px]`})}),(0,Z.jsx)(`input`,{...S({disabled:o,placeholder:n??f(T.COMMON$SELECT_PROVIDER_PLACEHOLDER),readOnly:!0,className:F(`w-29.5 h-6 py-0 border border-[var(--oh-border-input)] rounded shadow-none h-6 min-h-6 max-h-6 `,`text-inherit bg-tertiary placeholder:text-[var(--oh-muted)]`,`focus:outline-none focus:ring-0 focus:border-[var(--oh-border-input)]`,`disabled:bg-tertiary disabled:cursor-not-allowed disabled:opacity-60`,`pl-1.5 pr-[1px] cursor-pointer text-xs font-normal leading-5`,E&&`pl-6`,l)}),"data-testid":`git-provider-dropdown`}),(0,Z.jsx)(`div`,{className:`absolute right-0 top-1/2 transform -translate-y-1/2 flex items-center gap-1`,children:(0,Z.jsx)(bn,{isOpen:y,disabled:o,getToggleButtonProps:b,iconClassName:u})}),s&&(0,Z.jsx)(Ho,{hasSelection:!!E})]}),(0,Z.jsx)(xn,{isOpen:y,filteredItems:v,inputValue:p,highlightedIndex:C,selectedItem:E,getMenuProps:x,getItemProps:w,renderItem:D,renderEmptyState:O,itemKey:e=>e}),(0,Z.jsx)(yn,{isError:!!i,message:i})]})}var Wo=(e,t=30,n)=>o({queryKey:[`repository`,e,`branches`,`paginated`,t,n],queryFn:async({pageParam:r})=>!e||!n?{items:[],next_page_id:null}:Rt.getRepositoryBranches(e,n,``,r??void 0,t),enabled:!!e&&!!n,staleTime:1e3*60*5,getNextPageParam:e=>e.next_page_id?e.next_page_id:void 0,initialPageParam:null});function Go(e,t,n=30,r){return c({queryKey:[`repository`,e,`branches`,`search`,t,n,r],queryFn:async()=>!e||!t||!r?[]:(await Rt.searchRepositoryBranches(e,r,t,void 0,n)).items,enabled:!!e&&!!t&&!!r,staleTime:1e3*60*5,gcTime:1e3*60*15})}function Ko(e,t,n,r,i,a){let{data:o,fetchNextPage:s,hasNextPage:c,isLoading:l,isFetchingNextPage:u,isError:d}=Wo(e,30,t),{data:f,isLoading:p}=Go(e,r,30,t),m=(0,Y.useMemo)(()=>o?.pages?.flatMap(e=>e.items)||[],[o]),h=(0,Y.useMemo)(()=>n?m.find(e=>e.name===n):null,[m,n]),{data:g,isLoading:_}=Go(e,n&&!h&&m.length>0&&!r?n:``,30,t);return{branches:(0,Y.useMemo)(()=>{let e=r&&f&&i!==a?.name,t=e?f:m;if(n){let r=e?t.find(e=>e.name===n):h;if(!r&&g&&g.length>0)r=g.find(e=>e.name===n),r&&(t=[r,...t]);else if(r){let e=t.filter(e=>e.name!==n);t=[r,...e]}}return t},[r,f,m,a,i,n,h,g]),allBranches:m,fetchNextPage:s,hasNextPage:c,isLoading:l||_,isFetchingNextPage:u,isError:d,isSearchLoading:p}}function qo({isOpen:e,filteredBranches:t,inputValue:n,highlightedIndex:r,selectedItem:i,getMenuProps:a,getItemProps:o,onScroll:s,menuRef:c}){return(0,Z.jsx)(`div`,{"data-testid":`git-branch-dropdown-menu`,children:(0,Z.jsx)(xn,{isOpen:e,filteredItems:t,inputValue:n,highlightedIndex:r,selectedItem:i,getMenuProps:a,getItemProps:o,onScroll:s,menuRef:c,renderItem:(e,t,n,r,i)=>(0,Z.jsx)(_n,{item:e,index:t,isSelected:r?.name===e.name,getItemProps:i,getDisplayText:e=>e.name,getItemKey:e=>e.name},e.name),renderEmptyState:e=>(0,Z.jsx)(`li`,{className:`px-3 py-2`,children:(0,Z.jsx)(vn,{inputValue:e,searchMessage:`No branches found`,emptyMessage:`No branches available`,testId:`git-branch-dropdown-empty`})}),itemKey:e=>e.name})})}function Jo({repository:e,provider:t,selectedBranch:n,onBranchSelect:r,defaultBranch:i,placeholder:o,disabled:s=!1,className:c}){let{t:l}=a(`openhands`),[u,d]=(0,Y.useState)(``),[f,p]=(0,Y.useState)(!1),m=zt(u,300),h=(0,Y.useRef)(null),g=(0,Y.useMemo)(()=>m.trim().length>0?m.trim():``,[m]),{branches:_,isLoading:v,isError:y,fetchNextPage:b,hasNextPage:x,isFetchingNextPage:S,isSearchLoading:C}=Ko(e,t,i||null,g,u,n),w=y?Error(`Failed to load branches`):null,E=(0,Y.useCallback)(()=>{d(``),r(null),p(!0)},[r]),D=(0,Y.useCallback)(e=>{r(e),d(``)},[r]),O=(0,Y.useCallback)(e=>{let{scrollTop:t,scrollHeight:n,clientHeight:r}=e.currentTarget;n-t<=r*1.5&&x&&!S&&b()},[x,S,b]),{isOpen:k,selectedItem:A,highlightedIndex:j,getInputProps:ee,getItemProps:M,getMenuProps:te,getToggleButtonProps:N}=Ne({items:_,selectedItem:n,itemToString:e=>e?.name||``,onSelectedItemChange:({selectedItem:e})=>{D(e||null)},inputValue:u,stateReducer:(e,t)=>t.type===Ne.stateChangeTypes.InputClick&&e.isOpen?{...t.changes,isOpen:!0}:t.changes});(0,Y.useEffect)(()=>{e&&(r(null),p(!1))},[e,r]),(0,Y.useEffect)(()=>{if(e&&i&&!n&&!f&&_.length>0&&!v){let e=_.find(e=>e.name===i);e&&r(e)}},[e,i,n,f,_,r,v]),(0,Y.useEffect)(()=>{d(``)},[e]),(0,Y.useEffect)(()=>{n&&!k?d(n.name):!n&&!k&&d(``)},[n,k]);let ne=v||C||S;return(0,Z.jsxs)(`div`,{className:F(`relative`,c),children:[(0,Z.jsxs)(`div`,{className:`group relative text-[var(--oh-muted)] hover:text-white`,children:[(0,Z.jsx)(`div`,{className:`absolute left-2 top-1/2 transform -translate-y-1/2 z-10`,children:ne?(0,Z.jsx)(`div`,{className:`animate-spin h-4 w-4 border-2 border-transparent border-t-white rounded-full`}):(0,Z.jsx)(Ii,{width:16,height:16})}),(0,Z.jsx)(`input`,{...ee({disabled:s||!e,placeholder:o??l(T.COMMON$SELECT_BRANCH_PLACEHOLDER),className:F(Oe,`text-inherit shadow-none pl-7 pr-16 text-sm font-normal leading-5`,`placeholder:text-[var(--oh-muted)]`,`disabled:cursor-not-allowed disabled:opacity-60`),onChange:e=>{d(e.target.value)}}),"data-testid":`git-branch-dropdown-input`}),(0,Z.jsxs)(`div`,{className:`absolute right-1 top-1/2 transform -translate-y-1/2 flex items-center`,children:[n&&(0,Z.jsx)(Sn,{disabled:s,onClear:E}),(0,Z.jsx)(bn,{isOpen:k,disabled:s||!e,getToggleButtonProps:N})]})]}),(0,Z.jsx)(qo,{isOpen:k,filteredBranches:_,inputValue:u,highlightedIndex:j,selectedItem:A,getMenuProps:te,getItemProps:M,onScroll:O,menuRef:h}),(0,Z.jsx)(yn,{isError:!!w})]})}function Yo({className:e}){return(0,Z.jsx)(`div`,{className:F(`w-3 h-3 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-300 absolute right-0 top-1/2 -translate-y-1/2 h-full w-10.5 pr-2.5 justify-end git-external-link-icon`,e),children:(0,Z.jsx)(pn,{width:12,height:12,color:`white`})})}function Xo({selectedRepository:e,gitProvider:t,workspaceName:n,emptyStateLabel:r,onClick:i,disabled:o}){let{t:s}=a(`openhands`),{data:c}=H(),l=!!e&&!!t,u=t?c?.provider_tokens_set[t]:null,d=l?ne(t,e,u):void 0,f=!e&&!n,p=e||n||s(T.COMMON$CONNECT_REPO);return l?(0,Z.jsxs)(`a`,{href:d,target:`_blank`,rel:`noopener noreferrer`,className:F(`group flex flex-row items-center justify-between gap-2 pl-2.5 pr-2.5 py-1 rounded-[100px] flex-1 truncate relative`,`border border-[var(--oh-border)] bg-transparent hover:border-[var(--oh-border-subtle)] cursor-pointer`),children:[(0,Z.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center flex-shrink-0`,children:(0,Z.jsx)(Ge,{gitProvider:t,className:`w-3 h-3 inline-flex`})}),(0,Z.jsx)(`div`,{className:`font-normal text-white text-sm leading-5 truncate flex-1 min-w-0`,title:p,children:p}),(0,Z.jsx)(Yo,{})]}):(0,Z.jsxs)(`button`,{type:`button`,onClick:i,disabled:o,className:F(`group flex flex-row items-center justify-between gap-2 pl-2.5 pr-2.5 py-1 rounded-[100px] truncate relative`,`border border-[rgba(71,74,84,0.50)] bg-transparent`,o?`cursor-not-allowed opacity-50`:`cursor-pointer hover:border-[var(--oh-border-subtle)]`),children:[(0,Z.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center flex-shrink-0 text-white`,children:f?(0,Z.jsx)(_e,{className:`w-3 h-3`,strokeWidth:2,"aria-hidden":!0,"data-testid":`git-control-bar-connect-repo-icon`}):(0,Z.jsx)(bt,{width:12,height:12,color:`white`})}),(0,Z.jsx)(`div`,{className:`font-normal text-white text-sm leading-5 truncate flex-1 min-w-0`,title:p,children:p})]})}function Zo({selectedBranch:e,selectedRepository:t,gitProvider:n}){let{t:r}=a(`openhands`),{data:i}=H(),o=n?i?.provider_tokens_set[n]:null,s=!!e&&!!t&&!!n,c=s?re(n,t,e,o):void 0,l=e||r(T.COMMON$NO_BRANCH);return(0,Z.jsxs)(`a`,{href:s?c:void 0,target:`_blank`,rel:`noopener noreferrer`,className:F(`group flex flex-row items-center justify-between gap-2 pl-2.5 pr-2.5 py-1 rounded-[100px] w-fit flex-shrink-0 max-w-[200px] truncate relative`,s?`border border-[var(--oh-border)] bg-transparent hover:border-[var(--oh-border-subtle)] cursor-pointer`:`border border-[rgba(71,74,84,0.50)] bg-transparent cursor-not-allowed min-w-[108px]`),children:[(0,Z.jsx)(`div`,{className:`w-3 h-3 flex items-center justify-center flex-shrink-0`,children:(0,Z.jsx)(Ii,{width:12,height:12,color:`white`})}),(0,Z.jsx)(`div`,{className:`font-normal text-white text-sm leading-5 truncate`,title:l,children:l}),s&&(0,Z.jsx)(Yo,{})]})}function Qo(){let{t:e}=a(`openhands`),{navigate:t}=je(),{isConfigured:n,isLoading:r}=Qe();return r||n?null:(0,Z.jsxs)(`div`,{"data-testid":`home-llm-not-configured-banner`,role:`alert`,className:`mt-3 flex w-full flex-col gap-3 rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] px-4 py-3 text-[var(--oh-foreground)] sm:flex-row sm:items-center sm:justify-between sm:py-4`,children:[(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-start sm:items-center`,children:[(0,Z.jsx)(`div`,{className:`flex-shrink-0`,children:(0,Z.jsx)(Lt,{className:`align-middle text-yellow-400`})}),(0,Z.jsx)(K.Text,{className:`ml-3 text-sm font-medium`,children:e(T.HOME$LLM_NOT_CONFIGURED_MESSAGE)})]}),(0,Z.jsx)(Ae,{testId:`home-llm-not-configured-action`,type:`button`,variant:`primary`,className:`w-fit shrink-0 self-start whitespace-nowrap sm:self-auto`,onClick:()=>t(`/settings/llm`),children:e(T.HOME$LLM_NOT_CONFIGURED_ACTION)})]})}export{Ii as A,Pr as B,Ki as C,Q as D,Vi as E,qr as F,rr as G,Dr as H,Gr as I,Fn as K,Kr as L,ki as M,si as N,Ri as O,ii as P,Ur as R,qi as S,Hi as T,Tr as U,kr as V,wr as W,ma as _,Uo as a,Yi as b,No as c,po as d,ro as f,Oa as g,Ba as h,Jo as i,Fi as j,Li as k,go as l,eo as m,Zo as n,Vo as o,to as p,Tn as q,Xo as r,Fo as s,Qo as t,mo as u,pa as v,Ui as w,Ji as x,ca as y,Fr as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./llm-settings-B3SjHDmA.js";export{e as default};
|