@openhands/agent-canvas 1.16.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 +1 -1
- package/README.windows.md +2 -2
- package/build/assets/{acp-providers-CX3Lh9gj.js → acp-providers-DrjNsPOH.js} +1 -1
- package/build/assets/active-backend-context-rZiLJRUc.js +2 -0
- package/build/assets/{agent-context-settings-DSZlXrLj.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-HP6mX-Vr.js → alert-banner-vARz1idS.js} +1 -1
- package/build/assets/{api-error-message-B-XdSk3b.js → api-error-message-Ve79qDcN.js} +1 -1
- package/build/assets/api-key-entry-screen-CsMuBhoP.js +1 -0
- package/build/assets/{app-settings-dbnneVaV.js → app-settings-BaJ7nfHt.js} +1 -1
- package/build/assets/automation-detail-CVoGDrKq.js +3 -0
- package/build/assets/{automation-export-D3a3of4G.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-BRppNh99.js → automation-templates-4C4PM8K7.js} +1 -1
- package/build/assets/automations-list-xuqTSQL4.js +1 -0
- package/build/assets/{back-nav-button-Cjl_hoxq.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-DPkz30BE.js → backend-synced-settings-badge-B7rKWBir.js} +1 -1
- package/build/assets/{badge-BU3S0VtE.js → badge-CcGx2TaV.js} +1 -1
- package/build/assets/{base-modal-D_L0oEbG.js → base-modal-DTULovNc.js} +1 -1
- package/build/assets/bot-CLMxGFaq.js +1 -0
- package/build/assets/{brand-button-BAfk4wGP.js → brand-button-DxPO4Lf8.js} +1 -1
- package/build/assets/{browser-DSAo0tz1.js → browser-C-_qBasq.js} +2 -2
- package/build/assets/{browser-tab-C9vy56R5.js → browser-tab-DZanIw5m.js} +1 -1
- package/build/assets/{canvas-extension-page-dx1gFrfW.js → canvas-extension-page-o_cWgE9B.js} +1 -1
- package/build/assets/canvas-extensions-DSgNlCha.js +1 -0
- package/build/assets/{canvas-extensions-runtime-2_x5Ezmi.js → canvas-extensions-runtime-DdnkgJXV.js} +1 -1
- package/build/assets/{chat-send-button-MUQqCZCS.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-BO_kFZt3.js → circle-plus-check-toggle-Fr-h-mbL.js} +1 -1
- package/build/assets/{cloud-funnel-analytics-CztBCCPp.js → cloud-funnel-analytics-BQanUEEC.js} +1 -1
- package/build/assets/{cog-D-MPQW6G.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-DmEOje-7.js → condenser-settings-eVKFMvap.js} +1 -1
- package/build/assets/confirmation-modal-gIFHeZt6.js +1 -0
- package/build/assets/{context-menu-list-item-I86vKcmM.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-B0ImPLHO.js → conversation-state-store-D1_G_9I-.js} +1 -1
- package/build/assets/{conversation-store-Ca3ghXap.js → conversation-store-DVVfkCsk.js} +1 -1
- package/build/assets/{conversation-tab-empty-state-FIbh_lc8.js → conversation-tab-empty-state-DKlzAz5c.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-Ca8iSkkA.js → copy-to-clipboard-button-B3w0X7WH.js} +1 -1
- package/build/assets/{device-verify-Bhn2e_Ye.js → device-verify-BfkCzyFB.js} +1 -1
- package/build/assets/{dropdown-classes-Bc1djN0-.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-CqyPPjOq.js → entry.client-Ds8LVp-E.js} +2 -2
- package/build/assets/enum-filter-dropdown-C4pW0ORd.js +1 -0
- package/build/assets/{environment-switch-overlay-BmBRT7gv.js → environment-switch-overlay-P2ZAuzov.js} +1 -1
- package/build/assets/{error-state-Body8Ngd.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-Bkh5FGrD.js → form-control-classes-B-z85REi.js} +1 -1
- 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-4ROKl2cB.js → git-repo-dropdown-DVeCUUXG.js} +1 -1
- package/build/assets/{highlighted-source-view-BFRxGT_Q.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-BmVyxs-2.js → key-CfXbJa8w.js} +1 -1
- package/build/assets/{launch-IrTDEFCs.js → launch-BSIf9KEg.js} +1 -1
- package/build/assets/list-filter-CNpqTWVY.js +1 -0
- package/build/assets/{list-todo-apgLVjMw.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-BY9N3pOe.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-CAOYzrYp.js → manifest-subpage-layout-BQQy5ipR.js} +1 -1
- package/build/assets/{map-provider-Cu3Zgumb.js → map-provider-DXvssjw9.js} +1 -1
- package/build/assets/markdown-renderer-rivLvYh-.js +8 -0
- package/build/assets/{mcp-BTs_SXfZ.js → mcp-CEXDhQWn.js} +1 -1
- package/build/assets/{mcp-marketplace-utils-AIBzzHTO.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-BxZjsju9.js → modal-body-DJw4xBki.js} +1 -1
- package/build/assets/{modal-classes-C8eycCwG.js → modal-classes-Dg0ngBPO.js} +1 -1
- package/build/assets/{modal-close-button-DDzdRvCs.js → modal-close-button-B9j4nasm.js} +1 -1
- package/build/assets/{mouse-pointer-click-Co2uyaPA.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-BhMcY5nv.js → providers-2gIIkz2N.js} +1 -1
- package/build/assets/proxy-CBgMd2zf.js +1 -0
- package/build/assets/{puzzle-JM_QaRm0.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-B_GpxKW2.js → secrets-settings-Bh0udeKv.js} +1 -1
- package/build/assets/settings-DmyIgRxO.js +1 -0
- package/build/assets/{settings-dropdown-input-BcwylHs2.js → settings-dropdown-input-DVpyD87C.js} +1 -1
- package/build/assets/settings-index-BSJUFmjE.js +1 -0
- package/build/assets/{settings-input-Db-1g8Ql.js → settings-input-C0dd8Utu.js} +1 -1
- package/build/assets/{settings-list-classes-BzeSZbF2.js → settings-list-classes-Ds4jPBHK.js} +1 -1
- package/build/assets/{settings-modal-DfJ3tcJQ.js → settings-modal-yStgEh2o.js} +1 -1
- package/build/assets/settings-service.api-9_xdv_mh.js +1 -0
- package/build/assets/{settings-switch-CS-dJDmA.js → settings-switch-B78Khmyz.js} +1 -1
- package/build/assets/{settings-utils-UYpEdPuD.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-D6fS8-Gl.js → sidebar-layout-EPfWxk11.js} +1 -1
- package/build/assets/sidebar-mobile-menu-toggle-D5GR5xT9.js +1 -0
- package/build/assets/{sidebar-nav-link-DQQcMf1A.js → sidebar-nav-link-_t4_Ef-9.js} +1 -1
- package/build/assets/{sidebar-onboarding-checklist-storage-BBkeI6Bp.js → sidebar-onboarding-checklist-storage-DbDX-Wvj.js} +1 -1
- package/build/assets/{sidebar-store-DGqHkVLw.js → sidebar-store-CSDFK0W5.js} +1 -1
- package/build/assets/{skill-card-pill-row-B27-xyig.js → skill-card-pill-row-989y15jV.js} +1 -1
- package/build/assets/{skill-filter-w__3UCEE.js → skill-filter-BBeZ4JEP.js} +1 -1
- package/build/assets/{skill-icon-badge-RQkq8wvl.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-C5zcaktH.js → task-list-tab-3Jg8ywch.js} +1 -1
- package/build/assets/{terminal-CNElN42a.js → terminal-onXx0_Qz.js} +2 -2
- 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-v1KN0tzi.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-E6NZi9rb.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-xijQKIl9.js → use-automations-Cg0PDIZr.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-CrJP5262.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-CDfAHpPX.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-K3jmk-LH.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-DYqkKv7T.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-B9Gebw_g.js → use-user-conversation-ZWlXtbZb.js} +1 -1
- package/build/assets/{useInfiniteQuery-C926xzY4.js → useInfiniteQuery-BzrRqjLg.js} +1 -1
- package/build/assets/{useMutation-B-qc391N.js → useMutation-CJuK90oc.js} +1 -1
- package/build/assets/{useQueries-DlbhlH9I.js → useQueries-CykmpT-a.js} +1 -1
- package/build/assets/{useQuery-BSTgq1rl.js → useQuery-S6j94er1.js} +1 -1
- package/build/assets/utils-BOco8mxR.js +1 -0
- package/build/assets/{vendor~conversation-panel~conversation-C8Fn4XOf.js → vendor~conversation-panel~conversation-4eJ0tml3.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~ew9ih1s8-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-hWywRBaR.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-BMbMgaGu.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-BWir3rJs.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-j5MFqfSy.js → vendor~root-layout~index-home~home~conversation-panel~conversation-DgQ564nC.js} +1 -1
- 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~nj1hli3r-DP9wmsjo.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-CnsDDzeE.js} +1 -1
- 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-CUmIwQCN.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BPjI-atc.js} +12 -6
- package/build/assets/{verification-settings-gw_q6vkL.js → verification-settings-u2POabjH.js} +1 -1
- package/build/assets/{wrench-CUEI1krB.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 +73 -20
- package/build/locales/ca/openhands.json +73 -20
- package/build/locales/de/openhands.json +73 -20
- package/build/locales/en/openhands.json +73 -20
- package/build/locales/es/openhands.json +73 -20
- package/build/locales/fr/openhands.json +73 -20
- package/build/locales/it/openhands.json +73 -20
- package/build/locales/ja/openhands.json +73 -20
- package/build/locales/ko-KR/openhands.json +73 -20
- package/build/locales/no/openhands.json +73 -20
- package/build/locales/pt/openhands.json +73 -20
- package/build/locales/tr/openhands.json +73 -20
- package/build/locales/uk/openhands.json +73 -20
- package/build/locales/zh-CN/openhands.json +73 -20
- package/build/locales/zh-TW/openhands.json +73 -20
- package/config/defaults.json +3 -3
- 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 +234 -132
- package/dist/api/agent-server-adapter.js.map +1 -1
- package/dist/api/agent-server-config.cjs +1 -1
- package/dist/api/agent-server-config.cjs.map +1 -1
- package/dist/api/agent-server-config.d.ts +6 -0
- package/dist/api/agent-server-config.js +6 -3
- 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/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-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 +20 -0
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +126 -77
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- 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/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 +2 -0
- package/dist/api/settings-service/settings-service.api.js +18 -10
- 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/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 +100 -94
- 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-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-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/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 +137 -137
- package/dist/components/features/chat/chat-interface.js.map +1 -1
- 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/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.js +4 -4
- 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 +88 -88
- package/dist/components/features/conversation/conversation-tabs/conversation-tabs.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/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 +42 -42
- 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/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 +1 -1
- package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +2 -2
- 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-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 +156 -139
- 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/extensions-navigation.cjs +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
- package/dist/components/features/skills/extensions-navigation.js +3 -3
- package/dist/components/features/skills/extensions-navigation.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/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +3 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/constants/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/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-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/query-keys.cjs +1 -1
- package/dist/hooks/query/query-keys.cjs.map +1 -1
- package/dist/hooks/query/query-keys.d.ts +6 -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-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-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-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-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/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-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-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 +65 -12
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +2 -2
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +1196 -295
- package/dist/i18n/translation.js.map +1 -1
- package/dist/locales/ar/openhands.json +73 -20
- package/dist/locales/ca/openhands.json +73 -20
- package/dist/locales/de/openhands.json +73 -20
- package/dist/locales/en/openhands.json +73 -20
- package/dist/locales/es/openhands.json +73 -20
- package/dist/locales/fr/openhands.json +73 -20
- package/dist/locales/it/openhands.json +73 -20
- package/dist/locales/ja/openhands.json +73 -20
- package/dist/locales/ko-KR/openhands.json +73 -20
- package/dist/locales/no/openhands.json +73 -20
- package/dist/locales/pt/openhands.json +73 -20
- package/dist/locales/tr/openhands.json +73 -20
- package/dist/locales/uk/openhands.json +73 -20
- package/dist/locales/zh-CN/openhands.json +73 -20
- package/dist/locales/zh-TW/openhands.json +73 -20
- 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-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/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-issue-to-pr/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.js +1 -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 +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js +1 -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/qa-changes/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/qa-changes/manifest.js.map +1 -1
- 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 +22 -20
- 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/gitlab.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js +24 -5
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js.map +1 -1
- 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/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/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 +4 -4
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +2 -0
- package/dist/routes/app-settings.cjs +1 -1
- package/dist/routes/app-settings.js +5 -5
- 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 +88 -87
- 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/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 +46 -1
- package/dist/types/automation.js.map +1 -1
- package/dist/ui/context-menu.d.ts +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/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/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/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/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/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/package.json +4 -4
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-safe.mjs +1 -1
- package/scripts/dev-with-automation.mjs +1 -1
- package/scripts/static-server.mjs +33 -1
- package/build/assets/active-backend-context-CrHTlgvN.js +0 -2
- package/build/assets/agent-profiles-settings-Dzgb7G9z.js +0 -1
- package/build/assets/agent-server-conversation-service.api-tnqNjbpE.js +0 -86
- package/build/assets/agent-settings-DLtsqaOs.js +0 -2
- package/build/assets/agent-settings-fFvR-XC2.js +0 -1
- package/build/assets/api-key-entry-screen-qTzrmJcr.js +0 -1
- package/build/assets/automation-detail-BmwlCUAB.js +0 -3
- package/build/assets/automation-git-sync-CprN5DcU.js +0 -1
- package/build/assets/automation-setup-route-C40kXjMY.js +0 -1
- package/build/assets/automations-list-DuNcRawl.js +0 -1
- package/build/assets/backend-form-modal-lhGwzXFI.js +0 -1
- package/build/assets/bot-dMYHVfYM.js +0 -1
- package/build/assets/canvas-extensions-8A-XhpgP.js +0 -1
- package/build/assets/check-CS0vmpQQ.js +0 -1
- package/build/assets/chevron-down-e1QBpjVy.js +0 -1
- package/build/assets/chevron-right-ZG4R5G4Q.js +0 -1
- package/build/assets/circle-check-DzWLNsbE.js +0 -1
- package/build/assets/command-menu--UIlGL72.js +0 -1
- package/build/assets/commits-tab-AnZwLvh-.js +0 -1
- package/build/assets/confirmation-modal-Dv1ktp8K.js +0 -1
- package/build/assets/conversation-BbGrAO4Z.js +0 -93
- package/build/assets/conversation-mYT6NAoj.js +0 -1
- package/build/assets/conversation-panel-mYT6NAoj.js +0 -1
- package/build/assets/edit-automation-modal-DadGbJ2u.js +0 -1
- package/build/assets/empty-state-BoGVDecT.js +0 -1
- package/build/assets/enum-filter-dropdown-Bgca129f.js +0 -1
- package/build/assets/extensions-hub-CcDqq_vR.js +0 -1
- package/build/assets/extensions-navigation-Cr4yzYk4.js +0 -1
- package/build/assets/external-link-DKUlnCQV.js +0 -1
- package/build/assets/files-tab-D4o2VyE_.js +0 -1
- package/build/assets/get-git-path-ChKDVHZp.js +0 -1
- package/build/assets/git-repo-dropdown-BkqzkMmM.js +0 -1
- package/build/assets/home-ChpSuepX.js +0 -1
- package/build/assets/home-DIsB440S.js +0 -1
- package/build/assets/home-automation-run-tooltip-BVNDWjAH.js +0 -1
- package/build/assets/home-store-CY9Ej0ux.js +0 -1
- package/build/assets/index-home-BdlrFIif.js +0 -1
- package/build/assets/info-B6RQawoW.js +0 -1
- package/build/assets/install-server-modal-Dpy89p4g.js +0 -1
- package/build/assets/kebab-menu-item-content-D8hSNGmm.js +0 -1
- package/build/assets/list-filter-DsEK7NFC.js +0 -1
- package/build/assets/llm-not-configured-banner-CIFABh3K.js +0 -27
- package/build/assets/llm-settings-B9juXhIa.js +0 -1
- package/build/assets/llm-settings-De1d5dfr.js +0 -1
- package/build/assets/llm-subscription-service-BpJ0ouQo.js +0 -1
- package/build/assets/loader-circle-CC1au6hc.js +0 -1
- package/build/assets/manage-backends-modal-BrPV3oB-.js +0 -1
- package/build/assets/manifest-80fb1c29.js +0 -1
- package/build/assets/markdown-renderer-BzTlxI8x.js +0 -8
- package/build/assets/mcp-page-BEBYqH_K.js +0 -9
- package/build/assets/messages-DKV9cRc2.js +0 -41
- package/build/assets/onboarding-DV_OXoeP.js +0 -1
- package/build/assets/onboarding-modal-rkyBYkeQ.js +0 -1
- package/build/assets/organization-service.api-DrYNkEN_.js +0 -1
- package/build/assets/pencil-47jAZH_V.js +0 -1
- package/build/assets/pin-By41Vl5J.js +0 -1
- package/build/assets/planner-tab-C9uZmhme.js +0 -1
- package/build/assets/plug-CG5HFcNG.js +0 -1
- package/build/assets/plugins-management-service-BMJgC3Ga.js +0 -1
- package/build/assets/plus-C7Slq-0I.js +0 -1
- package/build/assets/profiles-service.api-ChoKrL0l.js +0 -1
- package/build/assets/proxy-9Fe1v5na.js +0 -1
- package/build/assets/recommended-automations-launcher-6ABrI9Cy.js +0 -1
- package/build/assets/refresh-cw-3q3Frrii.js +0 -1
- package/build/assets/root-Dc8YmC9F.js +0 -2
- package/build/assets/root-VDaypvK4.css +0 -1
- package/build/assets/root-layout-CXkhSPYh.js +0 -2
- package/build/assets/schema-field-D-y9-LDb.js +0 -1
- package/build/assets/scroll-fade-state-Dw-i4SGq.js +0 -1
- package/build/assets/sdk-section-page-BlFiizlG.js +0 -1
- package/build/assets/secret-form-BB7the8W.js +0 -1
- package/build/assets/secrets-service-ByZVENbp.js +0 -1
- package/build/assets/settings-C0EWuBtA.js +0 -1
- package/build/assets/settings-index-5w5UW2K3.js +0 -1
- package/build/assets/settings-service.api-DJ1r62Zr.js +0 -1
- package/build/assets/shared-conversation-CA5ISEDy.js +0 -1
- package/build/assets/shield-check-D2aCRd16.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-C_fb0Jki.js +0 -1
- package/build/assets/skill-scope-B42H-XOc.js +0 -1
- package/build/assets/skills-plugins-tgF8EiXC.js +0 -1
- package/build/assets/skills-settings-BgJ9PaOe.js +0 -1
- package/build/assets/styled-tooltip-C4jf5Fv9.js +0 -1
- package/build/assets/toggle-switch-ChOLXv2n.js +0 -1
- package/build/assets/trash-2-D7K26eDO.js +0 -1
- package/build/assets/trash-D-HYiVYM.js +0 -1
- package/build/assets/triangle-alert-CtdXWHUI.js +0 -1
- package/build/assets/usage-tab-CVDffLPt.js +0 -1
- package/build/assets/use-acp-credential-form-XIQmpX6M.js +0 -1
- package/build/assets/use-activate-agent-profile-BLfmvDiG.js +0 -1
- package/build/assets/use-agent-profiles-Bd9Bvvp1.js +0 -1
- package/build/assets/use-canvas-extensions-Bi693ujJ.js +0 -1
- package/build/assets/use-config-A9QovgXO.js +0 -1
- package/build/assets/use-create-conversation-Dx3l7mFZ.js +0 -1
- package/build/assets/use-create-secret-B9cUFWRG.js +0 -1
- package/build/assets/use-has-permission-B3C8rQmR.js +0 -1
- package/build/assets/use-is-authed-nTBcM7dE.js +0 -1
- package/build/assets/use-llm-configured-BV9nZ1_j.js +0 -1
- package/build/assets/use-llm-profiles-BO-P4Oyo.js +0 -1
- package/build/assets/use-manifest-capabilities-Cw_flwEz.js +0 -1
- package/build/assets/use-onboarding-completion-D8U7k4Qb.js +0 -1
- package/build/assets/use-pinned-home-route-CckOZrmb.js +0 -1
- package/build/assets/use-plugins-marketplace-7i94Zu3Z.js +0 -1
- package/build/assets/use-save-agent-profile-BUjSsDXK.js +0 -1
- package/build/assets/use-settings-DSXLbvBl.js +0 -1
- package/build/assets/use-settings-nav-items-CwRw-CmX.js +0 -16
- package/build/assets/use-tracking-D53y3TH9.js +0 -3
- package/build/assets/utils-CN5ZfZy1.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js +0 -186
- package/build/assets/vendor~root-layout-C9Ju9DQg.js +0 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-cDuKr-WD.js +0 -1
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js +0 -1
- package/build/assets/x-DJdhbdmt.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/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/utils.js
CHANGED
|
@@ -62,18 +62,18 @@ var c = (e, t) => {
|
|
|
62
62
|
return `${r}/projects/${e}/repos/${n}`;
|
|
63
63
|
}
|
|
64
64
|
return `${r}/${t}`;
|
|
65
|
-
}, x = (e, t, n, r) => {
|
|
65
|
+
}, x = (e) => e.split("/").map(encodeURIComponent).join("/"), S = (e, t, n, r) => {
|
|
66
66
|
let i = h(e, r);
|
|
67
67
|
switch (e) {
|
|
68
|
-
case "github": return `${i}/${t}/tree/${n}`;
|
|
69
|
-
case "forgejo": return `${i}/${t}/src/branch/${n}`;
|
|
70
|
-
case "gitlab": return `${i}/${t}/-/tree/${n}`;
|
|
71
|
-
case "bitbucket": return `${i}/${t}/src/${n}`;
|
|
68
|
+
case "github": return `${i}/${t}/tree/${x(n)}`;
|
|
69
|
+
case "forgejo": return `${i}/${t}/src/branch/${x(n)}`;
|
|
70
|
+
case "gitlab": return `${i}/${t}/-/tree/${x(n)}`;
|
|
71
|
+
case "bitbucket": return `${i}/${t}/src/${x(n)}`;
|
|
72
72
|
case "bitbucket_data_center": {
|
|
73
73
|
let e = t.split("/");
|
|
74
74
|
if (e.length >= 2) {
|
|
75
75
|
let [t, r] = e;
|
|
76
|
-
return `${i}/projects/${t}/repos/${r}/browse?at=refs/heads/${n}`;
|
|
76
|
+
return `${i}/projects/${t}/repos/${r}/browse?at=refs/heads/${encodeURIComponent(n)}`;
|
|
77
77
|
}
|
|
78
78
|
return "";
|
|
79
79
|
}
|
|
@@ -81,23 +81,23 @@ var c = (e, t) => {
|
|
|
81
81
|
let e = t.split("/");
|
|
82
82
|
if (e.length === 3) {
|
|
83
83
|
let [t, r, a] = e;
|
|
84
|
-
return `${i}/${t}/${r}/_git/${a}?version=GB${n}`;
|
|
84
|
+
return `${i}/${t}/${r}/_git/${a}?version=GB${encodeURIComponent(n)}`;
|
|
85
85
|
}
|
|
86
86
|
return "";
|
|
87
87
|
}
|
|
88
88
|
default: return "";
|
|
89
89
|
}
|
|
90
|
-
},
|
|
90
|
+
}, C = "Please review the current changes and create a git commit with a concise, descriptive message.", w = () => C, T = () => "Please pull the latest code from the repository.", E = (e) => `Please push the changes to a remote branch on ${g(e)}, but do NOT create a ${_(e === "gitlab")}. Check your current branch name first - if it's main, master, deploy, or another common default branch name, create a new branch with a descriptive name related to your changes. Otherwise, use the exact SAME branch name as the one you are currently on.`, D = (e) => {
|
|
91
91
|
let t = g(e), n = _(e === "gitlab");
|
|
92
92
|
return `Please push the changes to ${t} and open a ${n}. If you're on a default branch (e.g., main, master, deploy), create a new branch with a descriptive name otherwise use the current branch. If a ${n} template exists in the repository, please follow it when creating the ${v(e === "gitlab")} description.`;
|
|
93
|
-
},
|
|
93
|
+
}, O = () => "Please create a new branch with a descriptive name related to the work you plan to do.", k = (e) => !!e && e !== "ERROR" && e !== "READY", A = (e) => {
|
|
94
94
|
let { isPausing: t, isTask: n, taskStatus: i, isStartingStatus: s, isStopStatus: c, curAgentState: l } = e;
|
|
95
95
|
return t ? "#FFD600" : n && i ? i === "ERROR" ? a : "#FFD600" : s ? "#FFD600" : c ? "#ffffff" : l === r.ERROR ? a : o;
|
|
96
96
|
};
|
|
97
|
-
function
|
|
97
|
+
function j({ isPausing: t = !1, isTask: n, taskStatus: a, taskDetail: o, isStartingStatus: s, isStopStatus: c, curAgentState: l, errorMessage: u, t: d }) {
|
|
98
98
|
return t ? d(e.COMMON$STOPPING) : n && a ? a === "ERROR" ? o || d(e.CONVERSATION$ERROR_STARTING_CONVERSATION) : a === "READY" ? d(e.CONVERSATION$READY) : o || d(i(a)) : s ? d(e.COMMON$STARTING) : c ? d(e.COMMON$SERVER_STOPPED) : l === r.ERROR ? u || d(e.COMMON$ERROR) : d(e.COMMON$RUNNING);
|
|
99
99
|
}
|
|
100
100
|
//#endregion
|
|
101
|
-
export { s as cn,
|
|
101
|
+
export { s as cn, S as constructBranchUrl, y as constructPullRequestUrl, b as constructRepositoryUrl, c as downloadBlob, O as getCreateNewBranchPrompt, D as getCreatePRPrompt, p as getFileExtension, w as getGitCommitPrompt, h as getGitProviderBaseUrl, T as getGitPullPrompt, E as getGitPushPrompt, g as getProviderName, A as getStatusColor, j as getStatusText, l as getStyleHeightPx, f as isMobileDevice, d as isMobileUserAgent, k as isTaskPolling, u as setStyleHeightPx, m as shouldUseInstallationRepos };
|
|
102
102
|
|
|
103
103
|
//# sourceMappingURL=utils.js.map
|
package/dist/utils/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":[],"sources":["../../src/utils/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\nimport { Provider } from \"#/types/settings\";\nimport { SuggestedTaskGroup } from \"#/utils/types\";\nimport { ConversationStatus } from \"#/types/conversation-status\";\nimport { GitRepository } from \"#/types/git\";\nimport { sanitizeQuery } from \"#/utils/sanitize-query\";\nimport { PRODUCT_URL } from \"#/utils/constants\";\nimport { AgentState } from \"#/types/agent-state\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { getTaskStatusI18nKey } from \"#/utils/status\";\nimport type { AppConversationStartTaskStatus } from \"#/api/conversation-service/agent-server-conversation-service.types\";\nimport {\n OH_STATUS_ERROR_COLOR,\n OH_STATUS_SUCCESS_COLOR,\n} from \"#/constants/status-colors\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * Trigger a download for a provided Blob with the given filename\n */\nexport const downloadBlob = (blob: Blob, filename: string): void => {\n const url = window.URL.createObjectURL(blob);\n const link = document.createElement(\"a\");\n link.href = url;\n link.download = filename;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n window.URL.revokeObjectURL(url);\n};\n\n/**\n * Get the numeric height value from an element's style property\n * @param el The HTML element to get the height from\n * @param fallback The fallback value to return if style height is invalid\n * @returns The numeric height value in pixels, or the fallback value\n *\n * @example\n * getStyleHeightPx(element, 20) // Returns 20 if element.style.height is \"auto\" or invalid\n * getStyleHeightPx(element, 20) // Returns 100 if element.style.height is \"100px\"\n */\nexport const getStyleHeightPx = (el: HTMLElement, fallback: number): number => {\n const elementHeight = parseFloat(el.style.height || \"\");\n return Number.isFinite(elementHeight) ? elementHeight : fallback;\n};\n\n/**\n * Set the height style property of an element to a specific pixel value\n * @param el The HTML element to set the height for\n * @param height The height value in pixels to set\n *\n * @example\n * setStyleHeightPx(element, 100) // Sets element.style.height to \"100px\"\n * setStyleHeightPx(textarea, 200) // Sets textarea.style.height to \"200px\"\n */\nexport const setStyleHeightPx = (el: HTMLElement, height: number): void => {\n el.style.setProperty(\"height\", `${height}px`);\n};\n\n/**\n * Detect a phone/tablet user agent (Android, iPhone, iPad, …).\n * Unlike isMobileDevice, this ignores touch capability, so a desktop OS with\n * a touchscreen (e.g. a Windows 2-in-1) is NOT matched. Use this when the\n * decision depends on having a physical keyboard rather than on touch input.\n */\nexport const isMobileUserAgent = (): boolean =>\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent,\n );\n\n/**\n * Detect if the user is on a mobile device.\n * Touch support alone is not sufficient — touchscreen laptops have touch\n * but use a mouse/trackpad as primary input. We check that the primary\n * pointing device is coarse (finger) to avoid false positives.\n */\nexport const isMobileDevice = (): boolean => {\n if (isMobileUserAgent()) return true;\n\n const hasTouch = \"ontouchstart\" in window || navigator.maxTouchPoints > 0;\n if (!hasTouch) return false;\n\n // If matchMedia is available, check whether the primary pointer is fine\n // (mouse/trackpad). Touchscreen laptops report fine, real mobile devices don't.\n if (typeof window.matchMedia === \"function\") {\n return !window.matchMedia(\"(pointer: fine)\").matches;\n }\n\n // Fallback: touch present but no matchMedia — assume mobile\n return true;\n};\n\n/**\n * Checks if the current domain is the production domain\n * @returns True if the current domain matches the production URL\n */\nexport const isProductionDomain = (): boolean =>\n window.location.origin === PRODUCT_URL.PRODUCTION;\n\ninterface EventActionHistory {\n args?: {\n LLM_API_KEY?: string;\n [key: string]: unknown;\n };\n extras?: {\n open_page_urls: string[];\n active_page_index: number;\n dom_object: Record<string, unknown>;\n axtree_object: Record<string, unknown>;\n extra_element_properties: Record<string, unknown>;\n last_browser_action: string;\n last_browser_action_error: unknown;\n focused_element_bid: string;\n };\n [key: string]: unknown;\n}\n\nexport const removeUnwantedKeys = (\n data: EventActionHistory[],\n): EventActionHistory[] => {\n const UNDESIRED_KEYS = [\n \"open_page_urls\",\n \"active_page_index\",\n \"dom_object\",\n \"axtree_object\",\n \"extra_element_properties\",\n \"last_browser_action\",\n \"last_browser_action_error\",\n \"focused_element_bid\",\n ];\n\n return data\n .filter((item) => {\n // Skip items that have a status key\n if (\"status\" in item) {\n return false;\n }\n return true;\n })\n .map((item) => {\n // Create a shallow copy of item\n const newItem = { ...item };\n\n // Check if extras exists and delete it from a new extras object\n if (newItem.extras) {\n const newExtras = { ...newItem.extras };\n UNDESIRED_KEYS.forEach((key) => {\n delete newExtras[key as keyof typeof newExtras];\n });\n newItem.extras = newExtras;\n }\n\n return newItem;\n });\n};\n\n/**\n * Get file extension from file name in uppercase format\n * @param fileName The file name to extract extension from\n * @returns The file extension in uppercase, or \"FILE\" if no extension found\n *\n * @example\n * getFileExtension(\"document.pdf\") // \"PDF\"\n * getFileExtension(\"image.jpeg\") // \"JPEG\"\n * getFileExtension(\"noextension\") // \"FILE\"\n */\nexport const getFileExtension = (fileName: string): string => {\n const extension = fileName.split(\".\").pop()?.toUpperCase();\n return extension || \"FILE\";\n};\n\n/**\n * Whether to use the installation-scoped repo flow\n * (`/api/v1/git/installations/search` → `/api/v1/git/repositories/search?installation_id=…`)\n * for the given provider/backend combo.\n *\n * Mirrors OpenHands' cloud frontend (parameterized by `app_mode`):\n * - bitbucket / bitbucket_data_center → always installation-based\n * - github → installation-based ONLY when the active backend is cloud\n * - gitlab / azure_devops / forgejo → direct (search) flow\n *\n * `appMode` accepts the active backend `kind` (\"local\" | \"cloud\") so call\n * sites can hand it through directly.\n */\nexport const shouldUseInstallationRepos = (\n provider: Provider | null | undefined,\n appMode?: \"local\" | \"cloud\",\n) => {\n if (!provider) return false;\n\n switch (provider) {\n case \"bitbucket\":\n case \"bitbucket_data_center\":\n return true;\n case \"github\":\n return appMode === \"cloud\";\n default:\n return false;\n }\n};\n\nexport const getGitProviderBaseUrl = (\n gitProvider: Provider,\n host?: string | null,\n): string => {\n // If custom host provided, use it (with https:// prefix if needed)\n if (host && host.trim() !== \"\") {\n return host.startsWith(\"http\") ? host : `https://${host}`;\n }\n\n // Fall back to defaults\n switch (gitProvider) {\n case \"github\":\n return \"https://github.com\";\n case \"gitlab\":\n return \"https://gitlab.com\";\n case \"bitbucket\":\n return \"https://bitbucket.org\";\n case \"azure_devops\":\n return \"https://dev.azure.com\";\n case \"forgejo\":\n // Default UI links to Codeberg unless a custom host is available in settings\n // Note: UI link builders don't currently receive host; consider plumbing settings if needed\n return \"https://codeberg.org\";\n default:\n return \"\";\n }\n};\n\n/**\n * Get the name of the git provider\n * @param gitProvider The git provider\n * @returns The name of the git provider\n */\nexport const getProviderName = (gitProvider: Provider) => {\n if (gitProvider === \"gitlab\") return \"GitLab\";\n if (gitProvider === \"bitbucket\") return \"Bitbucket\";\n if (gitProvider === \"bitbucket_data_center\") return \"Bitbucket Data Center\";\n if (gitProvider === \"azure_devops\") return \"Azure DevOps\";\n if (gitProvider === \"forgejo\") return \"Forgejo\";\n return \"GitHub\";\n};\n\n/**\n * Get the name of the PR\n * @param isGitLab Whether the git provider is GitLab\n * @returns The name of the PR\n */\nexport const getPR = (isGitLab: boolean) =>\n isGitLab ? \"merge request\" : \"pull request\";\n\n/**\n * Get the short name of the PR\n * @param isGitLab Whether the git provider is GitLab\n * @returns The short name of the PR\n */\nexport const getPRShort = (isGitLab: boolean) => (isGitLab ? \"MR\" : \"PR\");\n\n/**\n * Construct the pull request (merge request) URL for different providers\n * @param prNumber The pull request number\n * @param provider The git provider\n * @param repositoryName The repository name in format \"owner/repo\"\n * @returns The pull request URL\n *\n * @example\n * constructPullRequestUrl(123, \"github\", \"owner/repo\") // \"https://github.com/owner/repo/pull/123\"\n * constructPullRequestUrl(456, \"gitlab\", \"owner/repo\") // \"https://gitlab.com/owner/repo/-/merge_requests/456\"\n * constructPullRequestUrl(789, \"bitbucket\", \"owner/repo\") // \"https://bitbucket.org/owner/repo/pull-requests/789\"\n * constructPullRequestUrl(789, \"bitbucket\", \"PROJECT/repo\", \"server.com\") // \"https://server.com/projects/PROJECT/repos/repo/pull-requests/789\"\n */\nexport const constructPullRequestUrl = (\n prNumber: number,\n provider: Provider,\n repositoryName: string,\n host?: string | null,\n): string => {\n const baseUrl = getGitProviderBaseUrl(provider, host);\n\n switch (provider) {\n case \"github\":\n return `${baseUrl}/${repositoryName}/pull/${prNumber}`;\n case \"forgejo\":\n return `${baseUrl}/${repositoryName}/pull/${prNumber}`;\n case \"gitlab\":\n return `${baseUrl}/${repositoryName}/-/merge_requests/${prNumber}`;\n case \"bitbucket\":\n return `${baseUrl}/${repositoryName}/pull-requests/${prNumber}`;\n case \"bitbucket_data_center\": {\n const [project, repo] = repositoryName.split(\"/\");\n return `${baseUrl}/projects/${project}/repos/${repo}/pull-requests/${prNumber}`;\n }\n case \"azure_devops\": {\n // Azure DevOps format: org/project/repo\n const parts = repositoryName.split(\"/\");\n if (parts.length === 3) {\n const [org, project, repo] = parts;\n return `${baseUrl}/${org}/${project}/_git/${repo}/pullrequest/${prNumber}`;\n }\n return \"\";\n }\n default:\n return \"\";\n }\n};\n\n/**\n * Construct the repository URL for different providers\n * @param provider The git provider\n * @param repositoryName The repository name in format \"owner/repo\"\n * @returns The repository URL\n *\n * @example\n * constructRepositoryUrl(\"github\", \"owner/repo\") // \"https://github.com/owner/repo\"\n * constructRepositoryUrl(\"gitlab\", \"owner/repo\") // \"https://gitlab.com/owner/repo\"\n * constructRepositoryUrl(\"bitbucket\", \"owner/repo\") // \"https://bitbucket.org/owner/repo\"\n */\nexport const constructRepositoryUrl = (\n provider: Provider,\n repositoryName: string,\n host?: string | null,\n): string => {\n const baseUrl = getGitProviderBaseUrl(provider, host);\n if (provider === \"bitbucket_data_center\") {\n const [project, repo] = repositoryName.split(\"/\");\n return `${baseUrl}/projects/${project}/repos/${repo}`;\n }\n return `${baseUrl}/${repositoryName}`;\n};\n\n/**\n * Construct the branch URL for different providers\n * @param provider The git provider\n * @param repositoryName The repository name in format \"owner/repo\"\n * @param branchName The branch name\n * @param host Optional custom host for self-hosted instances\n * @returns The branch URL\n *\n * @example\n * constructBranchUrl(\"github\", \"owner/repo\", \"main\") // \"https://github.com/owner/repo/tree/main\"\n * constructBranchUrl(\"gitlab\", \"owner/repo\", \"develop\") // \"https://gitlab.com/owner/repo/-/tree/develop\"\n * constructBranchUrl(\"bitbucket\", \"owner/repo\", \"feature\") // \"https://bitbucket.org/owner/repo/src/feature\"\n * constructBranchUrl(\"bitbucket\", \"PROJECT/repo\", \"feature\", \"server.com\") // \"https://server.com/projects/PROJECT/repos/repo/browse?at=refs/heads/feature\"\n */\nexport const constructBranchUrl = (\n provider: Provider,\n repositoryName: string,\n branchName: string,\n host?: string | null,\n): string => {\n const baseUrl = getGitProviderBaseUrl(provider, host);\n\n switch (provider) {\n case \"github\":\n return `${baseUrl}/${repositoryName}/tree/${branchName}`;\n case \"forgejo\":\n return `${baseUrl}/${repositoryName}/src/branch/${branchName}`;\n case \"gitlab\":\n return `${baseUrl}/${repositoryName}/-/tree/${branchName}`;\n case \"bitbucket\":\n return `${baseUrl}/${repositoryName}/src/${branchName}`;\n case \"bitbucket_data_center\": {\n // Bitbucket Server format: /projects/{PROJECT}/repos/{repo}/browse?at=refs/heads/{branch}\n const parts = repositoryName.split(\"/\");\n if (parts.length >= 2) {\n const [project, repo] = parts;\n return `${baseUrl}/projects/${project}/repos/${repo}/browse?at=refs/heads/${branchName}`;\n }\n return \"\";\n }\n case \"azure_devops\": {\n // Azure DevOps format: org/project/repo\n const parts = repositoryName.split(\"/\");\n if (parts.length === 3) {\n const [org, project, repo] = parts;\n return `${baseUrl}/${org}/${project}/_git/${repo}?version=GB${branchName}`;\n }\n return \"\";\n }\n default:\n return \"\";\n }\n};\n\n// Git Action Prompts\n\nconst GIT_COMMIT_PROMPT =\n \"Please review the current changes and create a git commit with a concise, descriptive message.\";\n\nexport const getGitCommitPrompt = (): string => GIT_COMMIT_PROMPT;\n\n/**\n * Generate a git pull prompt\n * @returns The git pull prompt\n */\nexport const getGitPullPrompt = (): string =>\n \"Please pull the latest code from the repository.\";\n\n/**\n * Generate a git push prompt\n * @param gitProvider The git provider\n * @returns The git push prompt\n */\nexport const getGitPushPrompt = (gitProvider: Provider): string => {\n const providerName = getProviderName(gitProvider);\n const pr = getPR(gitProvider === \"gitlab\");\n\n return `Please push the changes to a remote branch on ${providerName}, but do NOT create a ${pr}. Check your current branch name first - if it's main, master, deploy, or another common default branch name, create a new branch with a descriptive name related to your changes. Otherwise, use the exact SAME branch name as the one you are currently on.`;\n};\n\n/**\n * Generate a create pull request prompt\n * @param gitProvider The git provider\n * @returns The create PR prompt\n */\nexport const getCreatePRPrompt = (gitProvider: Provider): string => {\n const providerName = getProviderName(gitProvider);\n const pr = getPR(gitProvider === \"gitlab\");\n const prShort = getPRShort(gitProvider === \"gitlab\");\n\n return `Please push the changes to ${providerName} and open a ${pr}. If you're on a default branch (e.g., main, master, deploy), create a new branch with a descriptive name otherwise use the current branch. If a ${pr} template exists in the repository, please follow it when creating the ${prShort} description.`;\n};\n\n/**\n * Generate a push to existing PR prompt\n * @param gitProvider The git provider\n * @returns The push to PR prompt\n */\nexport const getPushToPRPrompt = (gitProvider: Provider): string => {\n const pr = getPR(gitProvider === \"gitlab\");\n\n return `Please push the latest changes to the existing ${pr}.`;\n};\n\n/**\n * Generate a create new branch prompt\n * @returns The create new branch prompt\n */\nexport const getCreateNewBranchPrompt = (): string =>\n \"Please create a new branch with a descriptive name related to the work you plan to do.\";\n\n// Helper functions\nexport function getTotalTaskCount(\n suggestedTasks: SuggestedTaskGroup[] | undefined,\n): number {\n if (!suggestedTasks) return 0;\n return suggestedTasks.flatMap((group) => group.tasks).length;\n}\n\nexport function getLimitedTaskGroups(\n suggestedTasks: SuggestedTaskGroup[],\n maxTasks: number,\n): SuggestedTaskGroup[] {\n const limitedGroups: SuggestedTaskGroup[] = [];\n let taskCount = 0;\n\n for (const group of suggestedTasks) {\n if (taskCount >= maxTasks) break;\n\n const remainingTasksNeeded = maxTasks - taskCount;\n const tasksToShow = group.tasks.slice(0, remainingTasksNeeded);\n\n if (tasksToShow.length > 0) {\n limitedGroups.push({\n ...group,\n tasks: tasksToShow,\n });\n taskCount += tasksToShow.length;\n }\n }\n\n return limitedGroups;\n}\n\nexport function getDisplayedTaskGroups(\n suggestedTasks: SuggestedTaskGroup[] | undefined,\n isExpanded: boolean,\n): SuggestedTaskGroup[] {\n if (!suggestedTasks || suggestedTasks.length === 0) {\n return [];\n }\n\n if (isExpanded) {\n return suggestedTasks;\n }\n\n return getLimitedTaskGroups(suggestedTasks, 3);\n}\n\n/**\n * Get the label for a conversation status\n * @param status The conversation status\n * @returns The localized label for the status\n */\nexport const getConversationStatusLabel = (\n status: ConversationStatus,\n): string => {\n switch (status) {\n case \"STOPPED\":\n return \"COMMON$STOPPED\";\n case \"RUNNING\":\n return \"COMMON$RUNNING\";\n case \"STARTING\":\n return \"COMMON$STARTING\";\n case \"ERROR\":\n return \"COMMON$ERROR\";\n case \"ARCHIVED\":\n return \"COMMON$ARCHIVED\"; // Use STOPPED for archived conversations\n default:\n return \"COMMON$UNKNOWN\";\n }\n};\n\n// Task Tracking Utility Functions\n\n/**\n * Get the status icon for a task status\n * @param status The task status\n * @returns The emoji icon for the status\n */\nexport const getStatusIcon = (status: string) => {\n switch (status) {\n case \"todo\":\n return \"⏳\";\n case \"in_progress\":\n return \"🔄\";\n case \"done\":\n return \"✅\";\n default:\n return \"❓\";\n }\n};\n\n/**\n * Get the CSS class names for a task status badge\n * @param status The task status\n * @returns The CSS class names for styling the status badge\n */\nexport const getStatusClassName = (status: string) => {\n if (status === \"done\") {\n return \"bg-green-800 text-green-200\";\n }\n if (status === \"in_progress\") {\n return \"bg-yellow-800 text-yellow-200\";\n }\n return \"bg-tertiary text-[var(--oh-text-tertiary)]\";\n};\n\n/**\n * Helper function to apply client-side filtering based on search query\n * @param repo The Git repository to check\n * @param searchQuery The search query string\n * @returns True if the repository should be included based on the search query\n */\nexport const shouldIncludeRepository = (\n repo: GitRepository,\n searchQuery: string,\n): boolean => {\n if (!searchQuery.trim()) {\n return true;\n }\n\n const sanitizedQuery = sanitizeQuery(searchQuery);\n const sanitizedRepoName = sanitizeQuery(repo.full_name);\n return sanitizedRepoName.includes(sanitizedQuery);\n};\n\n/**\n * Get the OpenHands query string based on the provider\n * @param provider The git provider\n * @returns The query string for searching OpenHands repositories\n */\nexport const getOpenHandsQuery = (provider: Provider | null): string => {\n const providerRepositorySuffix: Record<string, string> = {\n gitlab: \"openhands-config\",\n azure_devops: \"openhands-config\",\n default: \".openhands\",\n } as const;\n\n return provider && provider in providerRepositorySuffix\n ? providerRepositorySuffix[provider]\n : providerRepositorySuffix.default;\n};\n\n/**\n * Check if a repository has the OpenHands suffix based on the provider\n * @param repo The Git repository to check\n * @param provider The git provider\n * @returns True if the repository has the OpenHands suffix\n */\nexport const hasOpenHandsSuffix = (\n repo: GitRepository,\n provider: Provider | null,\n): boolean => repo.full_name.endsWith(`/${getOpenHandsQuery(provider)}`);\n\n/**\n * Build headers for V1 API requests that require session authentication\n * @param sessionApiKey Session API key for authentication\n * @returns Headers object with X-Session-API-Key if provided\n */\nexport const buildSessionHeaders = (\n sessionApiKey?: string | null,\n): Record<string, string> => {\n const headers: Record<string, string> = {};\n if (sessionApiKey) {\n headers[\"X-Session-API-Key\"] = sessionApiKey;\n }\n return headers;\n};\n\n/**\n * Check if a task is currently being polled (loading state)\n * @param taskStatus The task status string (e.g., \"WORKING\", \"ERROR\", \"READY\")\n * @returns True if the task is in a loading state (not ERROR and not READY)\n *\n * @example\n * isTaskPolling(\"WORKING\") // Returns true\n * isTaskPolling(\"PREPARING_REPOSITORY\") // Returns true\n * isTaskPolling(\"READY\") // Returns false\n * isTaskPolling(\"ERROR\") // Returns false\n * isTaskPolling(null) // Returns false\n * isTaskPolling(undefined) // Returns false\n */\nexport const isTaskPolling = (taskStatus: string | null | undefined): boolean =>\n !!taskStatus && taskStatus !== \"ERROR\" && taskStatus !== \"READY\";\n\n/**\n * Get the appropriate color based on agent status\n * @param options Configuration object for status color calculation\n * @param options.isPausing Whether the agent is currently pausing\n * @param options.isTask Whether we're polling a task\n * @param options.taskStatus The task status string (e.g., \"ERROR\", \"READY\")\n * @param options.isStartingStatus Whether the agent is in a starting state (LOADING or INIT)\n * @param options.isStopStatus Whether the conversation status is STOPPED\n * @param options.curAgentState The current agent state\n * @returns The hex color code for the status\n *\n * @example\n * getStatusColor({\n * isPausing: false,\n * isTask: false,\n * taskStatus: undefined,\n * isStartingStatus: false,\n * isStopStatus: false,\n * curAgentState: AgentState.RUNNING\n * }) // Returns \"var(--oh-status-success)\"\n */\nexport const getStatusColor = (options: {\n isPausing: boolean;\n isTask: boolean;\n taskStatus?: string | null;\n isStartingStatus: boolean;\n isStopStatus: boolean;\n curAgentState: AgentState;\n}): string => {\n const {\n isPausing,\n isTask,\n taskStatus,\n isStartingStatus,\n isStopStatus,\n curAgentState,\n } = options;\n\n // Show pausing status\n if (isPausing) {\n return \"#FFD600\";\n }\n\n // Show task status if we're polling a task\n if (isTask && taskStatus) {\n if (taskStatus === \"ERROR\") {\n return OH_STATUS_ERROR_COLOR;\n }\n return \"#FFD600\";\n }\n\n if (isStartingStatus) {\n return \"#FFD600\";\n }\n if (isStopStatus) {\n return \"#ffffff\";\n }\n if (curAgentState === AgentState.ERROR) {\n return OH_STATUS_ERROR_COLOR;\n }\n return OH_STATUS_SUCCESS_COLOR;\n};\n\ninterface GetStatusTextArgs {\n isPausing: boolean;\n isTask: boolean;\n taskStatus?: AppConversationStartTaskStatus | null;\n taskDetail?: string | null;\n isStartingStatus: boolean;\n isStopStatus: boolean;\n curAgentState: AgentState;\n errorMessage?: string | null;\n t: (t: string) => string;\n}\n\n/**\n * Get the server status text based on agent and task state\n *\n * @param options Configuration object for status text calculation\n * @param options.isPausing Whether the agent is currently pausing\n * @param options.isTask Whether we're polling a task\n * @param options.taskStatus The task status string (e.g., \"ERROR\", \"READY\")\n * @param options.taskDetail Optional task-specific detail text\n * @param options.isStartingStatus Whether the conversation is in STARTING state\n * @param options.isStopStatus Whether the conversation is STOPPED\n * @param options.curAgentState The current agent state\n * @param options.errorMessage Optional agent error message\n * @returns Localized human-readable status text\n *\n * @example\n * getStatusText({\n * isPausing: false,\n * isTask: true,\n * taskStatus: \"STARTING_CONVERSATION\",\n * taskDetail: null,\n * isStartingStatus: false,\n * isStopStatus: false,\n * curAgentState: AgentState.RUNNING\n * }) // Returns \"Starting conversation\"\n */\nexport function getStatusText({\n isPausing = false,\n isTask,\n taskStatus,\n taskDetail,\n isStartingStatus,\n isStopStatus,\n curAgentState,\n errorMessage,\n t,\n}: GetStatusTextArgs): string {\n // Show pausing status\n if (isPausing) {\n return t(I18nKey.COMMON$STOPPING);\n }\n\n // Show task status if we're polling a task\n if (isTask && taskStatus) {\n if (taskStatus === \"ERROR\") {\n return taskDetail || t(I18nKey.CONVERSATION$ERROR_STARTING_CONVERSATION);\n }\n\n if (taskStatus === \"READY\") {\n return t(I18nKey.CONVERSATION$READY);\n }\n\n return taskDetail || t(getTaskStatusI18nKey(taskStatus));\n }\n\n if (isStartingStatus) {\n return t(I18nKey.COMMON$STARTING);\n }\n\n if (isStopStatus) {\n return t(I18nKey.COMMON$SERVER_STOPPED);\n }\n\n if (curAgentState === AgentState.ERROR) {\n return errorMessage || t(I18nKey.COMMON$ERROR);\n }\n\n return t(I18nKey.COMMON$RUNNING);\n}\n"],"mappings":";;;;;;;AAiBA,SAAgB,EAAG,GAAG,GAAsB;CAC1C,OAAO,EAAQ,EAAK,CAAM,CAAC;AAC7B;AAKA,IAAa,KAAgB,GAAY,MAA2B;CAClE,IAAM,IAAM,OAAO,IAAI,gBAAgB,CAAI,GACrC,IAAO,SAAS,cAAc,GAAG;CAMvC,AALA,EAAK,OAAO,GACZ,EAAK,WAAW,GAChB,SAAS,KAAK,YAAY,CAAI,GAC9B,EAAK,MAAM,GACX,SAAS,KAAK,YAAY,CAAI,GAC9B,OAAO,IAAI,gBAAgB,CAAG;AAChC,GAYa,KAAoB,GAAiB,MAA6B;CAC7E,IAAM,IAAgB,WAAW,EAAG,MAAM,UAAU,EAAE;CACtD,OAAO,OAAO,SAAS,CAAa,IAAI,IAAgB;AAC1D,GAWa,KAAoB,GAAiB,MAAyB;CACzE,EAAG,MAAM,YAAY,UAAU,GAAG,EAAO,GAAG;AAC9C,GAQa,UACX,iEAAiE,KAC/D,UAAU,SACZ,GAQW,UACP,EAAkB,IAAU,KAEf,kBAAkB,UAAU,UAAU,iBAAiB,IAKpE,OAAO,OAAO,cAAe,aACxB,CAAC,OAAO,WAAW,iBAAiB,EAAE,UAIxC,KATe,IAsFX,KAAoB,MACb,EAAS,MAAM,GAAG,EAAE,IAAI,GAAG,YAAY,KACrC,QAgBT,KACX,GACA,MACG;CACH,IAAI,CAAC,GAAU,OAAO;CAEtB,QAAQ,GAAR;EACE,KAAK;EACL,KAAK,yBACH,OAAO;EACT,KAAK,UACH,OAAO,MAAY;EACrB,SACE,OAAO;CACX;AACF,GAEa,KACX,GACA,MACW;CAEX,IAAI,KAAQ,EAAK,KAAK,MAAM,IAC1B,OAAO,EAAK,WAAW,MAAM,IAAI,IAAO,WAAW;CAIrD,QAAQ,GAAR;EACE,KAAK,UACH,OAAO;EACT,KAAK,UACH,OAAO;EACT,KAAK,aACH,OAAO;EACT,KAAK,gBACH,OAAO;EACT,KAAK,WAGH,OAAO;EACT,SACE,OAAO;CACX;AACF,GAOa,KAAmB,MAC1B,MAAgB,WAAiB,WACjC,MAAgB,cAAoB,cACpC,MAAgB,0BAAgC,0BAChD,MAAgB,iBAAuB,iBACvC,MAAgB,YAAkB,YAC/B,UAQI,KAAS,MACpB,IAAW,kBAAkB,gBAOlB,KAAc,MAAuB,IAAW,OAAO,MAevD,KACX,GACA,GACA,GACA,MACW;CACX,IAAM,IAAU,EAAsB,GAAU,CAAI;CAEpD,QAAQ,GAAR;EACE,KAAK,UACH,OAAO,GAAG,EAAQ,GAAG,EAAe,QAAQ;EAC9C,KAAK,WACH,OAAO,GAAG,EAAQ,GAAG,EAAe,QAAQ;EAC9C,KAAK,UACH,OAAO,GAAG,EAAQ,GAAG,EAAe,oBAAoB;EAC1D,KAAK,aACH,OAAO,GAAG,EAAQ,GAAG,EAAe,iBAAiB;EACvD,KAAK,yBAAyB;GAC5B,IAAM,CAAC,GAAS,KAAQ,EAAe,MAAM,GAAG;GAChD,OAAO,GAAG,EAAQ,YAAY,EAAQ,SAAS,EAAK,iBAAiB;EACvE;EACA,KAAK,gBAAgB;GAEnB,IAAM,IAAQ,EAAe,MAAM,GAAG;GACtC,IAAI,EAAM,WAAW,GAAG;IACtB,IAAM,CAAC,GAAK,GAAS,KAAQ;IAC7B,OAAO,GAAG,EAAQ,GAAG,EAAI,GAAG,EAAQ,QAAQ,EAAK,eAAe;GAClE;GACA,OAAO;EACT;EACA,SACE,OAAO;CACX;AACF,GAaa,KACX,GACA,GACA,MACW;CACX,IAAM,IAAU,EAAsB,GAAU,CAAI;CACpD,IAAI,MAAa,yBAAyB;EACxC,IAAM,CAAC,GAAS,KAAQ,EAAe,MAAM,GAAG;EAChD,OAAO,GAAG,EAAQ,YAAY,EAAQ,SAAS;CACjD;CACA,OAAO,GAAG,EAAQ,GAAG;AACvB,GAgBa,KACX,GACA,GACA,GACA,MACW;CACX,IAAM,IAAU,EAAsB,GAAU,CAAI;CAEpD,QAAQ,GAAR;EACE,KAAK,UACH,OAAO,GAAG,EAAQ,GAAG,EAAe,QAAQ;EAC9C,KAAK,WACH,OAAO,GAAG,EAAQ,GAAG,EAAe,cAAc;EACpD,KAAK,UACH,OAAO,GAAG,EAAQ,GAAG,EAAe,UAAU;EAChD,KAAK,aACH,OAAO,GAAG,EAAQ,GAAG,EAAe,OAAO;EAC7C,KAAK,yBAAyB;GAE5B,IAAM,IAAQ,EAAe,MAAM,GAAG;GACtC,IAAI,EAAM,UAAU,GAAG;IACrB,IAAM,CAAC,GAAS,KAAQ;IACxB,OAAO,GAAG,EAAQ,YAAY,EAAQ,SAAS,EAAK,wBAAwB;GAC9E;GACA,OAAO;EACT;EACA,KAAK,gBAAgB;GAEnB,IAAM,IAAQ,EAAe,MAAM,GAAG;GACtC,IAAI,EAAM,WAAW,GAAG;IACtB,IAAM,CAAC,GAAK,GAAS,KAAQ;IAC7B,OAAO,GAAG,EAAQ,GAAG,EAAI,GAAG,EAAQ,QAAQ,EAAK,aAAa;GAChE;GACA,OAAO;EACT;EACA,SACE,OAAO;CACX;AACF,GAIM,IACJ,kGAEW,UAAmC,GAMnC,UACX,oDAOW,KAAoB,MAIxB,iDAHc,EAAgB,CAGmB,EAAa,wBAF1D,EAAM,MAAgB,QAE4D,EAAG,gQAQrF,KAAqB,MAAkC;CAClE,IAAM,IAAe,EAAgB,CAAW,GAC1C,IAAK,EAAM,MAAgB,QAAQ;CAGzC,OAAO,8BAA8B,EAAa,cAAc,EAAG,mJAAmJ,EAAG,yEAFzM,EAAW,MAAgB,QAEuP,EAAQ;AAC5S,GAiBa,UACX,0FAwLW,KAAiB,MAC5B,CAAC,CAAC,KAAc,MAAe,WAAW,MAAe,SAuB9C,KAAkB,MAOjB;CACZ,IAAM,EACJ,cACA,WACA,eACA,qBACA,iBACA,qBACE;CAwBJ,OArBI,IACK,YAIL,KAAU,IACR,MAAe,UACV,IAEF,YAGL,IACK,YAEL,IACK,YAEL,MAAkB,EAAW,QACxB,IAEF;AACT;AAuCA,SAAgB,EAAc,EAC5B,eAAY,IACZ,WACA,eACA,eACA,qBACA,iBACA,kBACA,iBACA,QAC4B;CA+B5B,OA7BI,IACK,EAAE,EAAQ,eAAe,IAI9B,KAAU,IACR,MAAe,UACV,KAAc,EAAE,EAAQ,wCAAwC,IAGrE,MAAe,UACV,EAAE,EAAQ,kBAAkB,IAG9B,KAAc,EAAE,EAAqB,CAAU,CAAC,IAGrD,IACK,EAAE,EAAQ,eAAe,IAG9B,IACK,EAAE,EAAQ,qBAAqB,IAGpC,MAAkB,EAAW,QACxB,KAAgB,EAAE,EAAQ,YAAY,IAGxC,EAAE,EAAQ,cAAc;AACjC"}
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../src/utils/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\nimport { Provider } from \"#/types/settings\";\nimport { SuggestedTaskGroup } from \"#/utils/types\";\nimport { ConversationStatus } from \"#/types/conversation-status\";\nimport { GitRepository } from \"#/types/git\";\nimport { sanitizeQuery } from \"#/utils/sanitize-query\";\nimport { PRODUCT_URL } from \"#/utils/constants\";\nimport { AgentState } from \"#/types/agent-state\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { getTaskStatusI18nKey } from \"#/utils/status\";\nimport type { AppConversationStartTaskStatus } from \"#/api/conversation-service/agent-server-conversation-service.types\";\nimport {\n OH_STATUS_ERROR_COLOR,\n OH_STATUS_SUCCESS_COLOR,\n} from \"#/constants/status-colors\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\n/**\n * Trigger a download for a provided Blob with the given filename\n */\nexport const downloadBlob = (blob: Blob, filename: string): void => {\n const url = window.URL.createObjectURL(blob);\n const link = document.createElement(\"a\");\n link.href = url;\n link.download = filename;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n window.URL.revokeObjectURL(url);\n};\n\n/**\n * Get the numeric height value from an element's style property\n * @param el The HTML element to get the height from\n * @param fallback The fallback value to return if style height is invalid\n * @returns The numeric height value in pixels, or the fallback value\n *\n * @example\n * getStyleHeightPx(element, 20) // Returns 20 if element.style.height is \"auto\" or invalid\n * getStyleHeightPx(element, 20) // Returns 100 if element.style.height is \"100px\"\n */\nexport const getStyleHeightPx = (el: HTMLElement, fallback: number): number => {\n const elementHeight = parseFloat(el.style.height || \"\");\n return Number.isFinite(elementHeight) ? elementHeight : fallback;\n};\n\n/**\n * Set the height style property of an element to a specific pixel value\n * @param el The HTML element to set the height for\n * @param height The height value in pixels to set\n *\n * @example\n * setStyleHeightPx(element, 100) // Sets element.style.height to \"100px\"\n * setStyleHeightPx(textarea, 200) // Sets textarea.style.height to \"200px\"\n */\nexport const setStyleHeightPx = (el: HTMLElement, height: number): void => {\n el.style.setProperty(\"height\", `${height}px`);\n};\n\n/**\n * Detect a phone/tablet user agent (Android, iPhone, iPad, …).\n * Unlike isMobileDevice, this ignores touch capability, so a desktop OS with\n * a touchscreen (e.g. a Windows 2-in-1) is NOT matched. Use this when the\n * decision depends on having a physical keyboard rather than on touch input.\n */\nexport const isMobileUserAgent = (): boolean =>\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent,\n );\n\n/**\n * Detect if the user is on a mobile device.\n * Touch support alone is not sufficient — touchscreen laptops have touch\n * but use a mouse/trackpad as primary input. We check that the primary\n * pointing device is coarse (finger) to avoid false positives.\n */\nexport const isMobileDevice = (): boolean => {\n if (isMobileUserAgent()) return true;\n\n const hasTouch = \"ontouchstart\" in window || navigator.maxTouchPoints > 0;\n if (!hasTouch) return false;\n\n // If matchMedia is available, check whether the primary pointer is fine\n // (mouse/trackpad). Touchscreen laptops report fine, real mobile devices don't.\n if (typeof window.matchMedia === \"function\") {\n return !window.matchMedia(\"(pointer: fine)\").matches;\n }\n\n // Fallback: touch present but no matchMedia — assume mobile\n return true;\n};\n\n/**\n * Checks if the current domain is the production domain\n * @returns True if the current domain matches the production URL\n */\nexport const isProductionDomain = (): boolean =>\n window.location.origin === PRODUCT_URL.PRODUCTION;\n\ninterface EventActionHistory {\n args?: {\n LLM_API_KEY?: string;\n [key: string]: unknown;\n };\n extras?: {\n open_page_urls: string[];\n active_page_index: number;\n dom_object: Record<string, unknown>;\n axtree_object: Record<string, unknown>;\n extra_element_properties: Record<string, unknown>;\n last_browser_action: string;\n last_browser_action_error: unknown;\n focused_element_bid: string;\n };\n [key: string]: unknown;\n}\n\nexport const removeUnwantedKeys = (\n data: EventActionHistory[],\n): EventActionHistory[] => {\n const UNDESIRED_KEYS = [\n \"open_page_urls\",\n \"active_page_index\",\n \"dom_object\",\n \"axtree_object\",\n \"extra_element_properties\",\n \"last_browser_action\",\n \"last_browser_action_error\",\n \"focused_element_bid\",\n ];\n\n return data\n .filter((item) => {\n // Skip items that have a status key\n if (\"status\" in item) {\n return false;\n }\n return true;\n })\n .map((item) => {\n // Create a shallow copy of item\n const newItem = { ...item };\n\n // Check if extras exists and delete it from a new extras object\n if (newItem.extras) {\n const newExtras = { ...newItem.extras };\n UNDESIRED_KEYS.forEach((key) => {\n delete newExtras[key as keyof typeof newExtras];\n });\n newItem.extras = newExtras;\n }\n\n return newItem;\n });\n};\n\n/**\n * Get file extension from file name in uppercase format\n * @param fileName The file name to extract extension from\n * @returns The file extension in uppercase, or \"FILE\" if no extension found\n *\n * @example\n * getFileExtension(\"document.pdf\") // \"PDF\"\n * getFileExtension(\"image.jpeg\") // \"JPEG\"\n * getFileExtension(\"noextension\") // \"FILE\"\n */\nexport const getFileExtension = (fileName: string): string => {\n const extension = fileName.split(\".\").pop()?.toUpperCase();\n return extension || \"FILE\";\n};\n\n/**\n * Whether to use the installation-scoped repo flow\n * (`/api/v1/git/installations/search` → `/api/v1/git/repositories/search?installation_id=…`)\n * for the given provider/backend combo.\n *\n * Mirrors OpenHands' cloud frontend (parameterized by `app_mode`):\n * - bitbucket / bitbucket_data_center → always installation-based\n * - github → installation-based ONLY when the active backend is cloud\n * - gitlab / azure_devops / forgejo → direct (search) flow\n *\n * `appMode` accepts the active backend `kind` (\"local\" | \"cloud\") so call\n * sites can hand it through directly.\n */\nexport const shouldUseInstallationRepos = (\n provider: Provider | null | undefined,\n appMode?: \"local\" | \"cloud\",\n) => {\n if (!provider) return false;\n\n switch (provider) {\n case \"bitbucket\":\n case \"bitbucket_data_center\":\n return true;\n case \"github\":\n return appMode === \"cloud\";\n default:\n return false;\n }\n};\n\nexport const getGitProviderBaseUrl = (\n gitProvider: Provider,\n host?: string | null,\n): string => {\n // If custom host provided, use it (with https:// prefix if needed)\n if (host && host.trim() !== \"\") {\n return host.startsWith(\"http\") ? host : `https://${host}`;\n }\n\n // Fall back to defaults\n switch (gitProvider) {\n case \"github\":\n return \"https://github.com\";\n case \"gitlab\":\n return \"https://gitlab.com\";\n case \"bitbucket\":\n return \"https://bitbucket.org\";\n case \"azure_devops\":\n return \"https://dev.azure.com\";\n case \"forgejo\":\n // Default UI links to Codeberg unless a custom host is available in settings\n // Note: UI link builders don't currently receive host; consider plumbing settings if needed\n return \"https://codeberg.org\";\n default:\n return \"\";\n }\n};\n\n/**\n * Get the name of the git provider\n * @param gitProvider The git provider\n * @returns The name of the git provider\n */\nexport const getProviderName = (gitProvider: Provider) => {\n if (gitProvider === \"gitlab\") return \"GitLab\";\n if (gitProvider === \"bitbucket\") return \"Bitbucket\";\n if (gitProvider === \"bitbucket_data_center\") return \"Bitbucket Data Center\";\n if (gitProvider === \"azure_devops\") return \"Azure DevOps\";\n if (gitProvider === \"forgejo\") return \"Forgejo\";\n return \"GitHub\";\n};\n\n/**\n * Get the name of the PR\n * @param isGitLab Whether the git provider is GitLab\n * @returns The name of the PR\n */\nexport const getPR = (isGitLab: boolean) =>\n isGitLab ? \"merge request\" : \"pull request\";\n\n/**\n * Get the short name of the PR\n * @param isGitLab Whether the git provider is GitLab\n * @returns The short name of the PR\n */\nexport const getPRShort = (isGitLab: boolean) => (isGitLab ? \"MR\" : \"PR\");\n\n/**\n * Construct the pull request (merge request) URL for different providers\n * @param prNumber The pull request number\n * @param provider The git provider\n * @param repositoryName The repository name in format \"owner/repo\"\n * @returns The pull request URL\n *\n * @example\n * constructPullRequestUrl(123, \"github\", \"owner/repo\") // \"https://github.com/owner/repo/pull/123\"\n * constructPullRequestUrl(456, \"gitlab\", \"owner/repo\") // \"https://gitlab.com/owner/repo/-/merge_requests/456\"\n * constructPullRequestUrl(789, \"bitbucket\", \"owner/repo\") // \"https://bitbucket.org/owner/repo/pull-requests/789\"\n * constructPullRequestUrl(789, \"bitbucket\", \"PROJECT/repo\", \"server.com\") // \"https://server.com/projects/PROJECT/repos/repo/pull-requests/789\"\n */\nexport const constructPullRequestUrl = (\n prNumber: number,\n provider: Provider,\n repositoryName: string,\n host?: string | null,\n): string => {\n const baseUrl = getGitProviderBaseUrl(provider, host);\n\n switch (provider) {\n case \"github\":\n return `${baseUrl}/${repositoryName}/pull/${prNumber}`;\n case \"forgejo\":\n return `${baseUrl}/${repositoryName}/pull/${prNumber}`;\n case \"gitlab\":\n return `${baseUrl}/${repositoryName}/-/merge_requests/${prNumber}`;\n case \"bitbucket\":\n return `${baseUrl}/${repositoryName}/pull-requests/${prNumber}`;\n case \"bitbucket_data_center\": {\n const [project, repo] = repositoryName.split(\"/\");\n return `${baseUrl}/projects/${project}/repos/${repo}/pull-requests/${prNumber}`;\n }\n case \"azure_devops\": {\n // Azure DevOps format: org/project/repo\n const parts = repositoryName.split(\"/\");\n if (parts.length === 3) {\n const [org, project, repo] = parts;\n return `${baseUrl}/${org}/${project}/_git/${repo}/pullrequest/${prNumber}`;\n }\n return \"\";\n }\n default:\n return \"\";\n }\n};\n\n/**\n * Construct the repository URL for different providers\n * @param provider The git provider\n * @param repositoryName The repository name in format \"owner/repo\"\n * @returns The repository URL\n *\n * @example\n * constructRepositoryUrl(\"github\", \"owner/repo\") // \"https://github.com/owner/repo\"\n * constructRepositoryUrl(\"gitlab\", \"owner/repo\") // \"https://gitlab.com/owner/repo\"\n * constructRepositoryUrl(\"bitbucket\", \"owner/repo\") // \"https://bitbucket.org/owner/repo\"\n */\nexport const constructRepositoryUrl = (\n provider: Provider,\n repositoryName: string,\n host?: string | null,\n): string => {\n const baseUrl = getGitProviderBaseUrl(provider, host);\n if (provider === \"bitbucket_data_center\") {\n const [project, repo] = repositoryName.split(\"/\");\n return `${baseUrl}/projects/${project}/repos/${repo}`;\n }\n return `${baseUrl}/${repositoryName}`;\n};\n\n/**\n * Percent-encode a branch name for use as a URL path component. Each\n * `/`-separated segment is encoded on its own so nested branch names such as\n * `release/1.0` keep their slashes while `#`, `%` and `&` are escaped.\n */\nconst encodeBranchPath = (branchName: string): string =>\n branchName.split(\"/\").map(encodeURIComponent).join(\"/\");\n\n/**\n * Construct the branch URL for different providers\n * @param provider The git provider\n * @param repositoryName The repository name in format \"owner/repo\"\n * @param branchName The branch name\n * @param host Optional custom host for self-hosted instances\n * @returns The branch URL\n *\n * @example\n * constructBranchUrl(\"github\", \"owner/repo\", \"main\") // \"https://github.com/owner/repo/tree/main\"\n * constructBranchUrl(\"gitlab\", \"owner/repo\", \"develop\") // \"https://gitlab.com/owner/repo/-/tree/develop\"\n * constructBranchUrl(\"bitbucket\", \"owner/repo\", \"feature\") // \"https://bitbucket.org/owner/repo/src/feature\"\n * constructBranchUrl(\"bitbucket\", \"PROJECT/repo\", \"feature\", \"server.com\") // \"https://server.com/projects/PROJECT/repos/repo/browse?at=refs/heads/feature\"\n */\nexport const constructBranchUrl = (\n provider: Provider,\n repositoryName: string,\n branchName: string,\n host?: string | null,\n): string => {\n const baseUrl = getGitProviderBaseUrl(provider, host);\n\n switch (provider) {\n case \"github\":\n return `${baseUrl}/${repositoryName}/tree/${encodeBranchPath(branchName)}`;\n case \"forgejo\":\n return `${baseUrl}/${repositoryName}/src/branch/${encodeBranchPath(branchName)}`;\n case \"gitlab\":\n return `${baseUrl}/${repositoryName}/-/tree/${encodeBranchPath(branchName)}`;\n case \"bitbucket\":\n return `${baseUrl}/${repositoryName}/src/${encodeBranchPath(branchName)}`;\n case \"bitbucket_data_center\": {\n // Bitbucket Server format: /projects/{PROJECT}/repos/{repo}/browse?at=refs/heads/{branch}\n const parts = repositoryName.split(\"/\");\n if (parts.length >= 2) {\n const [project, repo] = parts;\n // The branch is one query value here, so encode it whole: an\n // unencoded `&` would start a new query parameter.\n return `${baseUrl}/projects/${project}/repos/${repo}/browse?at=refs/heads/${encodeURIComponent(branchName)}`;\n }\n return \"\";\n }\n case \"azure_devops\": {\n // Azure DevOps format: org/project/repo\n const parts = repositoryName.split(\"/\");\n if (parts.length === 3) {\n const [org, project, repo] = parts;\n // The branch is one query value here, so encode it whole: an\n // unencoded `&` would start a new query parameter.\n return `${baseUrl}/${org}/${project}/_git/${repo}?version=GB${encodeURIComponent(branchName)}`;\n }\n return \"\";\n }\n default:\n return \"\";\n }\n};\n\n// Git Action Prompts\n\nconst GIT_COMMIT_PROMPT =\n \"Please review the current changes and create a git commit with a concise, descriptive message.\";\n\nexport const getGitCommitPrompt = (): string => GIT_COMMIT_PROMPT;\n\n/**\n * Generate a git pull prompt\n * @returns The git pull prompt\n */\nexport const getGitPullPrompt = (): string =>\n \"Please pull the latest code from the repository.\";\n\n/**\n * Generate a git push prompt\n * @param gitProvider The git provider\n * @returns The git push prompt\n */\nexport const getGitPushPrompt = (gitProvider: Provider): string => {\n const providerName = getProviderName(gitProvider);\n const pr = getPR(gitProvider === \"gitlab\");\n\n return `Please push the changes to a remote branch on ${providerName}, but do NOT create a ${pr}. Check your current branch name first - if it's main, master, deploy, or another common default branch name, create a new branch with a descriptive name related to your changes. Otherwise, use the exact SAME branch name as the one you are currently on.`;\n};\n\n/**\n * Generate a create pull request prompt\n * @param gitProvider The git provider\n * @returns The create PR prompt\n */\nexport const getCreatePRPrompt = (gitProvider: Provider): string => {\n const providerName = getProviderName(gitProvider);\n const pr = getPR(gitProvider === \"gitlab\");\n const prShort = getPRShort(gitProvider === \"gitlab\");\n\n return `Please push the changes to ${providerName} and open a ${pr}. If you're on a default branch (e.g., main, master, deploy), create a new branch with a descriptive name otherwise use the current branch. If a ${pr} template exists in the repository, please follow it when creating the ${prShort} description.`;\n};\n\n/**\n * Generate a push to existing PR prompt\n * @param gitProvider The git provider\n * @returns The push to PR prompt\n */\nexport const getPushToPRPrompt = (gitProvider: Provider): string => {\n const pr = getPR(gitProvider === \"gitlab\");\n\n return `Please push the latest changes to the existing ${pr}.`;\n};\n\n/**\n * Generate a create new branch prompt\n * @returns The create new branch prompt\n */\nexport const getCreateNewBranchPrompt = (): string =>\n \"Please create a new branch with a descriptive name related to the work you plan to do.\";\n\n// Helper functions\nexport function getTotalTaskCount(\n suggestedTasks: SuggestedTaskGroup[] | undefined,\n): number {\n if (!suggestedTasks) return 0;\n return suggestedTasks.flatMap((group) => group.tasks).length;\n}\n\nexport function getLimitedTaskGroups(\n suggestedTasks: SuggestedTaskGroup[],\n maxTasks: number,\n): SuggestedTaskGroup[] {\n const limitedGroups: SuggestedTaskGroup[] = [];\n let taskCount = 0;\n\n for (const group of suggestedTasks) {\n if (taskCount >= maxTasks) break;\n\n const remainingTasksNeeded = maxTasks - taskCount;\n const tasksToShow = group.tasks.slice(0, remainingTasksNeeded);\n\n if (tasksToShow.length > 0) {\n limitedGroups.push({\n ...group,\n tasks: tasksToShow,\n });\n taskCount += tasksToShow.length;\n }\n }\n\n return limitedGroups;\n}\n\nexport function getDisplayedTaskGroups(\n suggestedTasks: SuggestedTaskGroup[] | undefined,\n isExpanded: boolean,\n): SuggestedTaskGroup[] {\n if (!suggestedTasks || suggestedTasks.length === 0) {\n return [];\n }\n\n if (isExpanded) {\n return suggestedTasks;\n }\n\n return getLimitedTaskGroups(suggestedTasks, 3);\n}\n\n/**\n * Get the label for a conversation status\n * @param status The conversation status\n * @returns The localized label for the status\n */\nexport const getConversationStatusLabel = (\n status: ConversationStatus,\n): string => {\n switch (status) {\n case \"STOPPED\":\n return \"COMMON$STOPPED\";\n case \"RUNNING\":\n return \"COMMON$RUNNING\";\n case \"STARTING\":\n return \"COMMON$STARTING\";\n case \"ERROR\":\n return \"COMMON$ERROR\";\n case \"ARCHIVED\":\n return \"COMMON$ARCHIVED\"; // Use STOPPED for archived conversations\n default:\n return \"COMMON$UNKNOWN\";\n }\n};\n\n// Task Tracking Utility Functions\n\n/**\n * Get the status icon for a task status\n * @param status The task status\n * @returns The emoji icon for the status\n */\nexport const getStatusIcon = (status: string) => {\n switch (status) {\n case \"todo\":\n return \"⏳\";\n case \"in_progress\":\n return \"🔄\";\n case \"done\":\n return \"✅\";\n default:\n return \"❓\";\n }\n};\n\n/**\n * Get the CSS class names for a task status badge\n * @param status The task status\n * @returns The CSS class names for styling the status badge\n */\nexport const getStatusClassName = (status: string) => {\n if (status === \"done\") {\n return \"bg-green-800 text-green-200\";\n }\n if (status === \"in_progress\") {\n return \"bg-yellow-800 text-yellow-200\";\n }\n return \"bg-tertiary text-[var(--oh-text-tertiary)]\";\n};\n\n/**\n * Helper function to apply client-side filtering based on search query\n * @param repo The Git repository to check\n * @param searchQuery The search query string\n * @returns True if the repository should be included based on the search query\n */\nexport const shouldIncludeRepository = (\n repo: GitRepository,\n searchQuery: string,\n): boolean => {\n if (!searchQuery.trim()) {\n return true;\n }\n\n const sanitizedQuery = sanitizeQuery(searchQuery);\n const sanitizedRepoName = sanitizeQuery(repo.full_name);\n return sanitizedRepoName.includes(sanitizedQuery);\n};\n\n/**\n * Get the OpenHands query string based on the provider\n * @param provider The git provider\n * @returns The query string for searching OpenHands repositories\n */\nexport const getOpenHandsQuery = (provider: Provider | null): string => {\n const providerRepositorySuffix: Record<string, string> = {\n gitlab: \"openhands-config\",\n azure_devops: \"openhands-config\",\n default: \".openhands\",\n } as const;\n\n return provider && provider in providerRepositorySuffix\n ? providerRepositorySuffix[provider]\n : providerRepositorySuffix.default;\n};\n\n/**\n * Check if a repository has the OpenHands suffix based on the provider\n * @param repo The Git repository to check\n * @param provider The git provider\n * @returns True if the repository has the OpenHands suffix\n */\nexport const hasOpenHandsSuffix = (\n repo: GitRepository,\n provider: Provider | null,\n): boolean => repo.full_name.endsWith(`/${getOpenHandsQuery(provider)}`);\n\n/**\n * Build headers for V1 API requests that require session authentication\n * @param sessionApiKey Session API key for authentication\n * @returns Headers object with X-Session-API-Key if provided\n */\nexport const buildSessionHeaders = (\n sessionApiKey?: string | null,\n): Record<string, string> => {\n const headers: Record<string, string> = {};\n if (sessionApiKey) {\n headers[\"X-Session-API-Key\"] = sessionApiKey;\n }\n return headers;\n};\n\n/**\n * Check if a task is currently being polled (loading state)\n * @param taskStatus The task status string (e.g., \"WORKING\", \"ERROR\", \"READY\")\n * @returns True if the task is in a loading state (not ERROR and not READY)\n *\n * @example\n * isTaskPolling(\"WORKING\") // Returns true\n * isTaskPolling(\"PREPARING_REPOSITORY\") // Returns true\n * isTaskPolling(\"READY\") // Returns false\n * isTaskPolling(\"ERROR\") // Returns false\n * isTaskPolling(null) // Returns false\n * isTaskPolling(undefined) // Returns false\n */\nexport const isTaskPolling = (taskStatus: string | null | undefined): boolean =>\n !!taskStatus && taskStatus !== \"ERROR\" && taskStatus !== \"READY\";\n\n/**\n * Get the appropriate color based on agent status\n * @param options Configuration object for status color calculation\n * @param options.isPausing Whether the agent is currently pausing\n * @param options.isTask Whether we're polling a task\n * @param options.taskStatus The task status string (e.g., \"ERROR\", \"READY\")\n * @param options.isStartingStatus Whether the agent is in a starting state (LOADING or INIT)\n * @param options.isStopStatus Whether the conversation status is STOPPED\n * @param options.curAgentState The current agent state\n * @returns The hex color code for the status\n *\n * @example\n * getStatusColor({\n * isPausing: false,\n * isTask: false,\n * taskStatus: undefined,\n * isStartingStatus: false,\n * isStopStatus: false,\n * curAgentState: AgentState.RUNNING\n * }) // Returns \"var(--oh-status-success)\"\n */\nexport const getStatusColor = (options: {\n isPausing: boolean;\n isTask: boolean;\n taskStatus?: string | null;\n isStartingStatus: boolean;\n isStopStatus: boolean;\n curAgentState: AgentState;\n}): string => {\n const {\n isPausing,\n isTask,\n taskStatus,\n isStartingStatus,\n isStopStatus,\n curAgentState,\n } = options;\n\n // Show pausing status\n if (isPausing) {\n return \"#FFD600\";\n }\n\n // Show task status if we're polling a task\n if (isTask && taskStatus) {\n if (taskStatus === \"ERROR\") {\n return OH_STATUS_ERROR_COLOR;\n }\n return \"#FFD600\";\n }\n\n if (isStartingStatus) {\n return \"#FFD600\";\n }\n if (isStopStatus) {\n return \"#ffffff\";\n }\n if (curAgentState === AgentState.ERROR) {\n return OH_STATUS_ERROR_COLOR;\n }\n return OH_STATUS_SUCCESS_COLOR;\n};\n\ninterface GetStatusTextArgs {\n isPausing: boolean;\n isTask: boolean;\n taskStatus?: AppConversationStartTaskStatus | null;\n taskDetail?: string | null;\n isStartingStatus: boolean;\n isStopStatus: boolean;\n curAgentState: AgentState;\n errorMessage?: string | null;\n t: (t: string) => string;\n}\n\n/**\n * Get the server status text based on agent and task state\n *\n * @param options Configuration object for status text calculation\n * @param options.isPausing Whether the agent is currently pausing\n * @param options.isTask Whether we're polling a task\n * @param options.taskStatus The task status string (e.g., \"ERROR\", \"READY\")\n * @param options.taskDetail Optional task-specific detail text\n * @param options.isStartingStatus Whether the conversation is in STARTING state\n * @param options.isStopStatus Whether the conversation is STOPPED\n * @param options.curAgentState The current agent state\n * @param options.errorMessage Optional agent error message\n * @returns Localized human-readable status text\n *\n * @example\n * getStatusText({\n * isPausing: false,\n * isTask: true,\n * taskStatus: \"STARTING_CONVERSATION\",\n * taskDetail: null,\n * isStartingStatus: false,\n * isStopStatus: false,\n * curAgentState: AgentState.RUNNING\n * }) // Returns \"Starting conversation\"\n */\nexport function getStatusText({\n isPausing = false,\n isTask,\n taskStatus,\n taskDetail,\n isStartingStatus,\n isStopStatus,\n curAgentState,\n errorMessage,\n t,\n}: GetStatusTextArgs): string {\n // Show pausing status\n if (isPausing) {\n return t(I18nKey.COMMON$STOPPING);\n }\n\n // Show task status if we're polling a task\n if (isTask && taskStatus) {\n if (taskStatus === \"ERROR\") {\n return taskDetail || t(I18nKey.CONVERSATION$ERROR_STARTING_CONVERSATION);\n }\n\n if (taskStatus === \"READY\") {\n return t(I18nKey.CONVERSATION$READY);\n }\n\n return taskDetail || t(getTaskStatusI18nKey(taskStatus));\n }\n\n if (isStartingStatus) {\n return t(I18nKey.COMMON$STARTING);\n }\n\n if (isStopStatus) {\n return t(I18nKey.COMMON$SERVER_STOPPED);\n }\n\n if (curAgentState === AgentState.ERROR) {\n return errorMessage || t(I18nKey.COMMON$ERROR);\n }\n\n return t(I18nKey.COMMON$RUNNING);\n}\n"],"mappings":";;;;;;;AAiBA,SAAgB,EAAG,GAAG,GAAsB;CAC1C,OAAO,EAAQ,EAAK,CAAM,CAAC;AAC7B;AAKA,IAAa,KAAgB,GAAY,MAA2B;CAClE,IAAM,IAAM,OAAO,IAAI,gBAAgB,CAAI,GACrC,IAAO,SAAS,cAAc,GAAG;CAMvC,AALA,EAAK,OAAO,GACZ,EAAK,WAAW,GAChB,SAAS,KAAK,YAAY,CAAI,GAC9B,EAAK,MAAM,GACX,SAAS,KAAK,YAAY,CAAI,GAC9B,OAAO,IAAI,gBAAgB,CAAG;AAChC,GAYa,KAAoB,GAAiB,MAA6B;CAC7E,IAAM,IAAgB,WAAW,EAAG,MAAM,UAAU,EAAE;CACtD,OAAO,OAAO,SAAS,CAAa,IAAI,IAAgB;AAC1D,GAWa,KAAoB,GAAiB,MAAyB;CACzE,EAAG,MAAM,YAAY,UAAU,GAAG,EAAO,GAAG;AAC9C,GAQa,UACX,iEAAiE,KAC/D,UAAU,SACZ,GAQW,UACP,EAAkB,IAAU,KAEf,kBAAkB,UAAU,UAAU,iBAAiB,IAKpE,OAAO,OAAO,cAAe,aACxB,CAAC,OAAO,WAAW,iBAAiB,EAAE,UAIxC,KATe,IAsFX,KAAoB,MACb,EAAS,MAAM,GAAG,EAAE,IAAI,GAAG,YAAY,KACrC,QAgBT,KACX,GACA,MACG;CACH,IAAI,CAAC,GAAU,OAAO;CAEtB,QAAQ,GAAR;EACE,KAAK;EACL,KAAK,yBACH,OAAO;EACT,KAAK,UACH,OAAO,MAAY;EACrB,SACE,OAAO;CACX;AACF,GAEa,KACX,GACA,MACW;CAEX,IAAI,KAAQ,EAAK,KAAK,MAAM,IAC1B,OAAO,EAAK,WAAW,MAAM,IAAI,IAAO,WAAW;CAIrD,QAAQ,GAAR;EACE,KAAK,UACH,OAAO;EACT,KAAK,UACH,OAAO;EACT,KAAK,aACH,OAAO;EACT,KAAK,gBACH,OAAO;EACT,KAAK,WAGH,OAAO;EACT,SACE,OAAO;CACX;AACF,GAOa,KAAmB,MAC1B,MAAgB,WAAiB,WACjC,MAAgB,cAAoB,cACpC,MAAgB,0BAAgC,0BAChD,MAAgB,iBAAuB,iBACvC,MAAgB,YAAkB,YAC/B,UAQI,KAAS,MACpB,IAAW,kBAAkB,gBAOlB,KAAc,MAAuB,IAAW,OAAO,MAevD,KACX,GACA,GACA,GACA,MACW;CACX,IAAM,IAAU,EAAsB,GAAU,CAAI;CAEpD,QAAQ,GAAR;EACE,KAAK,UACH,OAAO,GAAG,EAAQ,GAAG,EAAe,QAAQ;EAC9C,KAAK,WACH,OAAO,GAAG,EAAQ,GAAG,EAAe,QAAQ;EAC9C,KAAK,UACH,OAAO,GAAG,EAAQ,GAAG,EAAe,oBAAoB;EAC1D,KAAK,aACH,OAAO,GAAG,EAAQ,GAAG,EAAe,iBAAiB;EACvD,KAAK,yBAAyB;GAC5B,IAAM,CAAC,GAAS,KAAQ,EAAe,MAAM,GAAG;GAChD,OAAO,GAAG,EAAQ,YAAY,EAAQ,SAAS,EAAK,iBAAiB;EACvE;EACA,KAAK,gBAAgB;GAEnB,IAAM,IAAQ,EAAe,MAAM,GAAG;GACtC,IAAI,EAAM,WAAW,GAAG;IACtB,IAAM,CAAC,GAAK,GAAS,KAAQ;IAC7B,OAAO,GAAG,EAAQ,GAAG,EAAI,GAAG,EAAQ,QAAQ,EAAK,eAAe;GAClE;GACA,OAAO;EACT;EACA,SACE,OAAO;CACX;AACF,GAaa,KACX,GACA,GACA,MACW;CACX,IAAM,IAAU,EAAsB,GAAU,CAAI;CACpD,IAAI,MAAa,yBAAyB;EACxC,IAAM,CAAC,GAAS,KAAQ,EAAe,MAAM,GAAG;EAChD,OAAO,GAAG,EAAQ,YAAY,EAAQ,SAAS;CACjD;CACA,OAAO,GAAG,EAAQ,GAAG;AACvB,GAOM,KAAoB,MACxB,EAAW,MAAM,GAAG,EAAE,IAAI,kBAAkB,EAAE,KAAK,GAAG,GAgB3C,KACX,GACA,GACA,GACA,MACW;CACX,IAAM,IAAU,EAAsB,GAAU,CAAI;CAEpD,QAAQ,GAAR;EACE,KAAK,UACH,OAAO,GAAG,EAAQ,GAAG,EAAe,QAAQ,EAAiB,CAAU;EACzE,KAAK,WACH,OAAO,GAAG,EAAQ,GAAG,EAAe,cAAc,EAAiB,CAAU;EAC/E,KAAK,UACH,OAAO,GAAG,EAAQ,GAAG,EAAe,UAAU,EAAiB,CAAU;EAC3E,KAAK,aACH,OAAO,GAAG,EAAQ,GAAG,EAAe,OAAO,EAAiB,CAAU;EACxE,KAAK,yBAAyB;GAE5B,IAAM,IAAQ,EAAe,MAAM,GAAG;GACtC,IAAI,EAAM,UAAU,GAAG;IACrB,IAAM,CAAC,GAAS,KAAQ;IAGxB,OAAO,GAAG,EAAQ,YAAY,EAAQ,SAAS,EAAK,wBAAwB,mBAAmB,CAAU;GAC3G;GACA,OAAO;EACT;EACA,KAAK,gBAAgB;GAEnB,IAAM,IAAQ,EAAe,MAAM,GAAG;GACtC,IAAI,EAAM,WAAW,GAAG;IACtB,IAAM,CAAC,GAAK,GAAS,KAAQ;IAG7B,OAAO,GAAG,EAAQ,GAAG,EAAI,GAAG,EAAQ,QAAQ,EAAK,aAAa,mBAAmB,CAAU;GAC7F;GACA,OAAO;EACT;EACA,SACE,OAAO;CACX;AACF,GAIM,IACJ,kGAEW,UAAmC,GAMnC,UACX,oDAOW,KAAoB,MAIxB,iDAHc,EAAgB,CAGmB,EAAa,wBAF1D,EAAM,MAAgB,QAE4D,EAAG,gQAQrF,KAAqB,MAAkC;CAClE,IAAM,IAAe,EAAgB,CAAW,GAC1C,IAAK,EAAM,MAAgB,QAAQ;CAGzC,OAAO,8BAA8B,EAAa,cAAc,EAAG,mJAAmJ,EAAG,yEAFzM,EAAW,MAAgB,QAEuP,EAAQ;AAC5S,GAiBa,UACX,0FAwLW,KAAiB,MAC5B,CAAC,CAAC,KAAc,MAAe,WAAW,MAAe,SAuB9C,KAAkB,MAOjB;CACZ,IAAM,EACJ,cACA,WACA,eACA,qBACA,iBACA,qBACE;CAwBJ,OArBI,IACK,YAIL,KAAU,IACR,MAAe,UACV,IAEF,YAGL,IACK,YAEL,IACK,YAEL,MAAkB,EAAW,QACxB,IAEF;AACT;AAuCA,SAAgB,EAAc,EAC5B,eAAY,IACZ,WACA,eACA,eACA,qBACA,iBACA,kBACA,iBACA,QAC4B;CA+B5B,OA7BI,IACK,EAAE,EAAQ,eAAe,IAI9B,KAAU,IACR,MAAe,UACV,KAAc,EAAE,EAAQ,wCAAwC,IAGrE,MAAe,UACV,EAAE,EAAQ,kBAAkB,IAG9B,KAAc,EAAE,EAAqB,CAAU,CAAC,IAGrD,IACK,EAAE,EAAQ,eAAe,IAG9B,IACK,EAAE,EAAQ,qBAAqB,IAGpC,MAAkB,EAAW,QACxB,KAAgB,EAAE,EAAQ,YAAY,IAGxC,EAAE,EAAQ,cAAc;AACjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openhands/agent-canvas",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "Agent Canvas UI for OpenHands - run AI coding agents with a visual interface",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"agent-canvas": "bin/agent-canvas.mjs"
|
|
18
18
|
},
|
|
19
19
|
"engines": {
|
|
20
|
-
"node": ">=
|
|
20
|
+
"node": ">=24"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@heroui/react": "2.8.10",
|
|
24
24
|
"@microlink/react-json-view": "1.31.25",
|
|
25
25
|
"@monaco-editor/react": "4.7.0",
|
|
26
|
-
"@openhands/extensions": "0.
|
|
26
|
+
"@openhands/extensions": "0.20.0",
|
|
27
27
|
"@openhands/typescript-client": "1.39.0",
|
|
28
28
|
"@react-router/node": "7.18.2",
|
|
29
29
|
"@react-router/serve": "7.18.2",
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"@vercel/static-config": {
|
|
188
188
|
"ajv": "8.20.0"
|
|
189
189
|
},
|
|
190
|
-
"dompurify": "3.4.
|
|
190
|
+
"dompurify": "3.4.14",
|
|
191
191
|
"typed-rest-client": {
|
|
192
192
|
"qs": "6.15.3"
|
|
193
193
|
}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*
|
|
20
20
|
* Usage:
|
|
21
21
|
* node scripts/check-sdk-version-sync.mjs
|
|
22
|
-
* EXPECTED_SDK_VERSION=1.
|
|
22
|
+
* EXPECTED_SDK_VERSION=1.46.0 node scripts/check-sdk-version-sync.mjs
|
|
23
23
|
* node scripts/check-sdk-version-sync.mjs --check-pypi
|
|
24
24
|
*
|
|
25
25
|
* Environment variables:
|
|
@@ -78,7 +78,7 @@ Triggering from other repos:
|
|
|
78
78
|
-H "Authorization: token \$GITHUB_TOKEN" \\
|
|
79
79
|
-H "Accept: application/vnd.github.v3+json" \\
|
|
80
80
|
https://api.github.com/repos/OpenHands/OpenHands/dispatches \\
|
|
81
|
-
-d '{"event_type": "sdk-version-check", "client_payload": {"version": "1.
|
|
81
|
+
-d '{"event_type": "sdk-version-check", "client_payload": {"version": "1.46.0"}}'
|
|
82
82
|
`);
|
|
83
83
|
process.exit(0);
|
|
84
84
|
}
|
|
@@ -260,9 +260,9 @@ async function fetchPyPIDependencies(packageName, version) {
|
|
|
260
260
|
* Parse PyPI requires_dist array and extract SDK package versions
|
|
261
261
|
*
|
|
262
262
|
* PyPI returns dependencies in PEP 508 format like:
|
|
263
|
-
* "openhands-sdk>=1.
|
|
264
|
-
* "openhands-tools==1.
|
|
265
|
-
* "openhands-workspace (>=1.
|
|
263
|
+
* "openhands-sdk>=1.46.0,<2.0.0"
|
|
264
|
+
* "openhands-tools==1.46.0"
|
|
265
|
+
* "openhands-workspace (>=1.46.0)"
|
|
266
266
|
*/
|
|
267
267
|
function parseSdkVersionsFromRequiresDist(requiresDist) {
|
|
268
268
|
const versions = {};
|
|
@@ -276,7 +276,7 @@ function parseSdkVersionsFromRequiresDist(requiresDist) {
|
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
// Extract the version number - look for patterns like:
|
|
279
|
-
// ">=1.
|
|
279
|
+
// ">=1.46.0", "==1.46.0", "(>=1.46.0)", "~=1.46.0"
|
|
280
280
|
// After the package name and before any comma or closing paren
|
|
281
281
|
const versionPattern = /[><=~!]+\s*([0-9]+(?:\.[0-9]+)*)/;
|
|
282
282
|
const match = dep.match(versionPattern);
|
package/scripts/dev-safe.mjs
CHANGED
|
@@ -421,7 +421,7 @@ export const AGENT_SERVER_IMPORT_MODULES = "canvas_ui_tool";
|
|
|
421
421
|
* edits are picked up without a manual reinstall. The agent-server itself
|
|
422
422
|
* is rebuilt from local source on each invocation (--reinstall).
|
|
423
423
|
* - OH_AGENT_SERVER_GIT_REF: Git commit SHA or branch name
|
|
424
|
-
* - OH_AGENT_SERVER_VERSION: Specific PyPI version (e.g., "1.
|
|
424
|
+
* - OH_AGENT_SERVER_VERSION: Specific PyPI version (e.g., "1.46.0")
|
|
425
425
|
*
|
|
426
426
|
* If none are set, defaults to the released version specified by
|
|
427
427
|
* DEFAULT_AGENT_SERVER_VERSION. Set OH_AGENT_SERVER_GIT_REF to use a
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
*
|
|
29
29
|
* Environment variables:
|
|
30
30
|
* - PORT: Ingress port (default: 8000)
|
|
31
|
-
* - OH_AUTOMATION_GIT_REF: Git ref for automation (default
|
|
31
|
+
* - OH_AUTOMATION_GIT_REF: Git ref for automation (overrides default version)
|
|
32
32
|
* - OH_AGENT_SERVER_LOCAL_PATH: Absolute path to a local software-agent-sdk
|
|
33
33
|
* checkout. Highest precedence for agent-server source selection: rebuilds
|
|
34
34
|
* the agent-server from local source and installs openhands-sdk,
|
|
@@ -77,7 +77,13 @@ const ASSET_LIKE_EXTENSIONS = new Set([
|
|
|
77
77
|
// Args
|
|
78
78
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
function isEnvFlagEnabled(value) {
|
|
81
|
+
if (typeof value !== "string") return false;
|
|
82
|
+
const normalized = value.trim().toLowerCase();
|
|
83
|
+
return normalized === "1" || normalized === "true";
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function parseArgs(argv = process.argv.slice(2), env = process.env) {
|
|
81
87
|
const config = {
|
|
82
88
|
port: 3001,
|
|
83
89
|
host: "::",
|
|
@@ -91,6 +97,8 @@ export function parseArgs(argv = process.argv.slice(2)) {
|
|
|
91
97
|
lockToCloud: null,
|
|
92
98
|
basePath: "/",
|
|
93
99
|
vscodeBasePath: null,
|
|
100
|
+
// Also settable via the --disable-telemetry flag below.
|
|
101
|
+
disableTelemetry: isEnvFlagEnabled(env.AGENT_CANVAS_DISABLE_TELEMETRY),
|
|
94
102
|
};
|
|
95
103
|
|
|
96
104
|
for (let i = 0; i < argv.length; i++) {
|
|
@@ -149,6 +157,9 @@ export function parseArgs(argv = process.argv.slice(2)) {
|
|
|
149
157
|
case "--auth-required":
|
|
150
158
|
config.authRequired = true;
|
|
151
159
|
break;
|
|
160
|
+
case "--disable-telemetry":
|
|
161
|
+
config.disableTelemetry = true;
|
|
162
|
+
break;
|
|
152
163
|
case "--reject-prefix": {
|
|
153
164
|
const prefix = argv[++i];
|
|
154
165
|
if (!prefix || !prefix.startsWith("/")) {
|
|
@@ -244,6 +255,12 @@ OPTIONS:
|
|
|
244
255
|
--lock-to-cloud <cloud-url> Lock backend setup to a single OpenHands Cloud
|
|
245
256
|
URL. Hides manual/local backend setup and the
|
|
246
257
|
custom Cloud URL field in the pre-built frontend.
|
|
258
|
+
--disable-telemetry Disable all product telemetry (including the
|
|
259
|
+
anonymous install event) in the pre-built
|
|
260
|
+
frontend at runtime, without VITE_DO_NOT_TRACK
|
|
261
|
+
baked in. Injects
|
|
262
|
+
window.__AGENT_CANVAS_DO_NOT_TRACK__ = true.
|
|
263
|
+
Equivalent to AGENT_CANVAS_DISABLE_TELEMETRY=1.
|
|
247
264
|
--base-path <path> Mount the SPA under <path> (default: /).
|
|
248
265
|
For example, --base-path /canvas serves
|
|
249
266
|
index.html and assets under /canvas.
|
|
@@ -321,6 +338,12 @@ ROUTING:
|
|
|
321
338
|
* editor control can render here at all. Absent means this origin serves no
|
|
322
339
|
* editor — which is the correct answer for the public-mode instance, whose
|
|
323
340
|
* route table deliberately omits it.
|
|
341
|
+
*
|
|
342
|
+
* - `disableTelemetry`: sets `window.__AGENT_CANVAS_DO_NOT_TRACK__ = true` so a
|
|
343
|
+
* published bundle disables all telemetry (including the anonymous install
|
|
344
|
+
* event) at runtime without VITE_DO_NOT_TRACK baked in. Read by
|
|
345
|
+
* `isDoNotTrackEnabled()` in `#/services/telemetry`. Enabled by
|
|
346
|
+
* AGENT_CANVAS_DISABLE_TELEMETRY=1 or the --disable-telemetry flag.
|
|
324
347
|
*/
|
|
325
348
|
function makeConfigInjectionScript(
|
|
326
349
|
sessionApiKey,
|
|
@@ -329,6 +352,7 @@ function makeConfigInjectionScript(
|
|
|
329
352
|
lockToCloud,
|
|
330
353
|
basePath,
|
|
331
354
|
vscodeBasePath,
|
|
355
|
+
disableTelemetry,
|
|
332
356
|
) {
|
|
333
357
|
const parts = [];
|
|
334
358
|
|
|
@@ -384,6 +408,10 @@ function makeConfigInjectionScript(
|
|
|
384
408
|
);
|
|
385
409
|
}
|
|
386
410
|
|
|
411
|
+
if (disableTelemetry) {
|
|
412
|
+
parts.push(`window.__AGENT_CANVAS_DO_NOT_TRACK__=true;`);
|
|
413
|
+
}
|
|
414
|
+
|
|
387
415
|
if (parts.length === 0) return "";
|
|
388
416
|
|
|
389
417
|
return `<script>(function(){${parts.join("")}}());</script>`;
|
|
@@ -404,6 +432,7 @@ async function serveInjectedIndexHtml(
|
|
|
404
432
|
lockToCloud,
|
|
405
433
|
basePath,
|
|
406
434
|
vscodeBasePath,
|
|
435
|
+
disableTelemetry,
|
|
407
436
|
} = {},
|
|
408
437
|
) {
|
|
409
438
|
let content;
|
|
@@ -420,6 +449,7 @@ async function serveInjectedIndexHtml(
|
|
|
420
449
|
lockToCloud,
|
|
421
450
|
basePath,
|
|
422
451
|
vscodeBasePath,
|
|
452
|
+
disableTelemetry,
|
|
423
453
|
);
|
|
424
454
|
// Inject right before </head> so the key is available before any app code runs.
|
|
425
455
|
// replace() targets the first (and only) </head> in well-formed HTML.
|
|
@@ -469,6 +499,7 @@ function needsRuntimeInjection(injectionOpts) {
|
|
|
469
499
|
injectionOpts.runtimeServicesInfo ||
|
|
470
500
|
injectionOpts.lockToCloud ||
|
|
471
501
|
injectionOpts.vscodeBasePath ||
|
|
502
|
+
injectionOpts.disableTelemetry ||
|
|
472
503
|
(injectionOpts.basePath && injectionOpts.basePath !== "/"),
|
|
473
504
|
);
|
|
474
505
|
}
|
|
@@ -614,6 +645,7 @@ export function startStaticServer(config) {
|
|
|
614
645
|
lockToCloud: config.lockToCloud || null,
|
|
615
646
|
basePath: normalizeBasePath(config.basePath),
|
|
616
647
|
vscodeBasePath: config.vscodeBasePath || null,
|
|
648
|
+
disableTelemetry: config.disableTelemetry || false,
|
|
617
649
|
};
|
|
618
650
|
const basePath = injectionOpts.basePath;
|
|
619
651
|
const rejectPrefixes = config.rejectPrefixes ?? [];
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor~module-DyG7x7JT.js","assets/rolldown-runtime-Cyuzqnbw.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,xt as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{r as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{A as a,E as o,F as s,I as c,L as ee,N as te,O as ne,T as re,b as ie,f as ae,k as oe}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-DqZDXfg2.js";import{H as se,W as l,t as ce}from"./utils-CN5ZfZy1.js";var u=e(t(),1),le=`__AGENT_CANVAS_BASE_PATH__`;function ue(e){let t=e?.trim();return!t||t===`/`?``:(t.startsWith(`/`)?t:`/${t}`).replace(/\/+$/,``)}function de(){let e=ue(void 0);if(e)return e;if(typeof window<`u`){let e=window[le];if(typeof e==`string`)return ue(e)}return``}function fe(e){let t=de();return t?`${t}${e.startsWith(`/`)?e:`/${e}`}`:e.startsWith(`/`)?e:`/${e}`}var d=`openhands`,pe=[{label:`English`,value:`en`},{label:`日本語`,value:`ja`},{label:`简体中文`,value:`zh-CN`},{label:`繁體中文`,value:`zh-TW`},{label:`한국어`,value:`ko-KR`},{label:`Norsk`,value:`no`},{label:`Arabic`,value:`ar`},{label:`Deutsch`,value:`de`},{label:`Français`,value:`fr`},{label:`Italiano`,value:`it`},{label:`Português`,value:`pt`},{label:`Español`,value:`es`},{label:`Català`,value:`ca`},{label:`Türkçe`,value:`tr`},{label:`Українська`,value:`uk`}],me=new WeakMap,he=e=>{if(!me.has(e)){let t=e.use(oe).use(ne).use(i).init({fallbackLng:`en`,debug:!1,supportedLngs:pe.map(e=>e.value),nonExplicitSupportedLngs:!1,ns:[d],defaultNS:d,fallbackNS:d,backend:{loadPath:fe(`/locales/{{lng}}/{{ns}}.json`)},interpolation:{escapeValue:!1}});me.set(e,t)}return e},ge=()=>he(te()),_e=null,ve=null,f=()=>(_e||=ge(),_e),ye=()=>ve??f(),be=e=>(ve=e??f(),ve),xe=async(e=f())=>(await me.get(e),e),Se=e=>e?typeof e==`object`&&!Array.isArray(e)?{ns:d,...e}:e:{ns:d},p=new Proxy({},{get:(e,t)=>{let n=ye();if(t===`t`)return(e,t)=>n.t(e,Se(t));if(t===`exists`)return(e,t)=>n.exists(e,Se(t));let r=Reflect.get(n,t,n);return typeof r==`function`?r.bind(n):r},set:(e,t,n)=>{let r=ye();return Reflect.set(r,t,n,r)}}),Ce=e=>typeof e.response?.data==`object`&&e.response?.data!==null&&`error`in e.response.data&&typeof e.response?.data?.error==`string`,we=e=>typeof e.response?.data==`object`&&e.response?.data!==null&&`message`in e.response.data&&typeof e.response?.data?.message==`string`,Te=`Disconnected (check URL or network). Check that the backend URL is correct and the backend server is reachable. If the backend is on another origin, check that it allows this frontend origin.`,Ee=`Disconnected (request timed out). Check that the backend URL is correct and reachable.`,De=4;function Oe(e){return typeof e==`object`&&!!e}function ke(e){let t=[],n=new Set,r=e,i=0;for(;r!=null&&i<De&&!n.has(r);){if(n.add(r),r instanceof Error)r.message&&t.push(r.message),r=r.cause;else if(typeof r==`string`){r&&t.push(r);break}else if(Oe(r)){let e=r.message;typeof e==`string`&&e&&t.push(e),r=r.cause}else break;i+=1}return t}function Ae(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`disconnected (check cors or network)`)||t.includes(`disconnected (check url or network)`)||t.includes(`blocked by cors`)||t.includes(`failed to fetch`)||t.includes(`network error`)||t.includes(`load failed`)||t.includes(`networkerror when attempting to fetch resource`)||t.includes(`cors`)&&t.includes(`blocked`)}function je(e){return ke(e).some(Ae)}function Me(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`request timeout`)||t.includes(`timeout after`)||t.includes(`backend request timed out`)}function Ne(e){let t=ke(e);return t.some(Ae)?Te:t.some(Me)?Ee:t[0]??null}function Pe(e){return typeof e==`object`&&!!e&&`isAxiosError`in e&&e.isAxiosError===!0}var Fe=e=>{let t=null,n=!1;return Pe(e)?(n=!0,t=Ce(e)&&e.response?.data.error?e.response?.data.error:we(e)&&e.response?.data.message?e.response?.data.message:e.message):t=e instanceof Error?e.message:typeof e==`string`?e:null,Ne(n?t??e:e)??t??``},m=(e,t=5e3,n=1e4)=>{if(!e)return t;let r=e.length/(1e3/60)*1e3*1.5;return Math.min(Math.max(r,t),n)},h=r(),Ie={background:`var(--oh-color-tertiary)`,border:`1px solid var(--oh-border-input)`,color:`#fff`,borderRadius:`var(--oh-radius)`,maxWidth:`400px`,wordBreak:`break-word`,overflowWrap:`anywhere`,whiteSpace:`pre-wrap`},g={position:`top-right`,style:Ie},Le={...Ie,color:`var(--oh-muted)`};function Re({message:e}){let t=u.useRef(null),[n,r]=u.useState(!1);return u.useLayoutEffect(()=>{let e=t.current;if(!e)return;let n=()=>{let t=Number.parseFloat(getComputedStyle(e).lineHeight);if(!Number.isFinite(t)||t<=0){r(!1);return}r(e.getBoundingClientRect().height>t*1.5)};n();let i=new ResizeObserver(n);return i.observe(e),()=>i.disconnect()},[e]),(0,h.jsxs)(`div`,{className:ce(`flex min-w-0 gap-2`,n?`items-start`:`items-center`),children:[(0,h.jsx)(o,{"aria-hidden":!0,className:`h-4 w-4 shrink-0`,strokeWidth:2,style:{color:se}}),(0,h.jsx)(`span`,{ref:t,className:`min-w-0 flex-1 text-sm leading-5 [word-break:break-word] [overflow-wrap:anywhere]`,children:e})]})}var ze={...g,icon:null,style:Le},Be=e=>{let t=e||p.t(l.STATUS$ERROR);Ae(t)?t=p.t(l.ERROR$CORS_OR_NETWORK):Me(t)&&(t=p.t(l.ERROR$BACKEND_REQUEST_TIMEOUT));let n=m(t,4e3);re((0,h.jsx)(Re,{message:t}),{...ze,duration:n})},Ve=e=>{let t=m(e,5e3);re.success((0,h.jsx)(`span`,{className:`[word-break:break-word] [overflow-wrap:anywhere]`,children:e}),{...g,duration:t})},He=(e,t,n)=>{let r=m(`${e} ${t}`,5e3);re.success((0,h.jsxs)(`span`,{className:`[word-break:break-word] [overflow-wrap:anywhere]`,children:[e,` `,(0,h.jsx)(`a`,{className:`underline hover:no-underline`,href:n,children:t})]}),{...g,duration:r})},Ue=e=>{let t=m(e,6e3);re((0,h.jsx)(`span`,{className:`[word-break:break-word] [overflow-wrap:anywhere]`,children:e}),{...g,icon:`⚠️`,duration:t})},We=`openhands-backend-health`,Ge=500;function Ke(e){if(typeof e!=`object`||!e)return!1;let t=e;return Number.isInteger(t.consecutiveFailures)&&t.consecutiveFailures>=0&&t.consecutiveFailures<=5&&(t.lastError===null||typeof t.lastError==`string`)&&(t.lastFailureAt===null||typeof t.lastFailureAt==`number`)&&typeof t.disabled==`boolean`}function qe(){if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(We);if(!e)return{};let t=JSON.parse(e);if(typeof t!=`object`||!t)return{};let n={};for(let[e,r]of Object.entries(t))typeof e==`string`&&e.length>0&&Ke(r)&&(n[e]=r);return n}catch{return{}}}function Je(e){if(!(typeof window>`u`))try{if(Object.keys(e).length===0){window.localStorage.removeItem(We);return}window.localStorage.setItem(We,JSON.stringify(e))}catch{}}function Ye(e){let t=Ne(e)??`Unknown error`;return t.length>Ge?`${t.slice(0,Ge)}…`:t}var _=qe(),Xe=new Set;function Ze(){Xe.forEach(e=>e())}function v(e){_=e,Je(e),Ze()}function Qe(){return _}function $e(e){return _[e]??null}function et(e){return Xe.add(e),()=>{Xe.delete(e)}}function tt(e,t){let n=_[e],r=Math.min((n?.consecutiveFailures??0)+1,5),i=n?.disabled===!0||r>=5,a={consecutiveFailures:r,lastError:Ye(t),lastFailureAt:Date.now(),disabled:i};v({..._,[e]:a})}function nt(e){if(!(e in _))return;let{[e]:t,...n}=_;v(n)}function rt(e){if(!(e in _))return;let{[e]:t,...n}=_;v(n)}function it(e){if(!(e in _))return;let{[e]:t,...n}=_;v(n)}var at=`workspace/project`,ot=`__AGENT_CANVAS_LOCK_TO_CLOUD__`,st=`all-hands.dev`,y=`openhands.dev`,ct=`app.${st}`,lt=y,ut=`app.${y}`;function dt(e){return e?.trim()||null}function ft(e){if(!e)return null;let t=e.trim().replace(/\/$/,``);return t?/^https?:\/\//i.test(t)?t:typeof window<`u`?`${window.location.protocol}//${t}`:`http://${t}`:null}function pt(e){if(!e)return null;let t=e.trim().replace(/\/+$/,``);return t?/^https?:\/\//i.test(t)?t:`https://${t}`:null}function mt(e){let t=e.toLowerCase();return t===ct||t===ut?lt:t===st?y:t.endsWith(`.${st}`)?`${t.slice(0,-13)}${y}`:t}function ht(e){let t=pt(e);if(!t)return null;try{let e=new URL(t),n=e.port?`:${e.port}`:``;return`${e.protocol}//${mt(e.hostname)}${n}`}catch{return t.toLowerCase()}}function gt(){let e=b();return!e||typeof window>`u`||!bt(window.location.origin,e)?null:window.location.origin}function _t(){return ft(void 0)}function vt(){let e=dt(void 0);if(e)return e;if(typeof window<`u`){let e=window.__AGENT_CANVAS_SESSION_API_KEY__;if(typeof e==`string`)return dt(e)}return null}function yt(){return{baseUrl:x()??``,sessionApiKey:S()??``}}function b(){let e=pt(void 0);if(e)return e;if(typeof window<`u`){let e=window[ot];if(typeof e==`string`)return pt(e)}return null}function bt(e,t){let n=ht(e),r=ht(t);return!n||!r?!1:n===r}function xt(){return gt()?`cookie`:`api-key`}function x(){return _t()||(typeof window<`u`?window.location.origin:null)}function S(){return vt()}function St(){return at}function Ct(e,t){return`${e.replace(/\/+$/,``)}/${t.replace(/-/g,``)}`}function wt(e){return Ct(St(),e)}function Tt(e){return Ct(at,e)}function Et(e){let t=ft(x()),n=ft(e);return!t||!n?!1:t===n}function Dt(e,t){return Et(t)?wt(e):Tt(e)}function Ot(){let e=S();return e?{"X-Session-API-Key":e}:{}}function C(){return typeof window<`u`&&window.__AGENT_CANVAS_AUTH_REQUIRED__===!0}function kt(){return C()?!S():!1}var At=`default-local`,jt=`Local`,Mt=`locked-cloud`,Nt=`OpenHands Cloud`;function Pt(){if(!b())return null;let e=gt();return e?{id:Mt,name:Nt,host:e,apiKey:``,kind:`cloud`,authMode:`cookie`}:null}function Ft(){if(b())return null;let e=x(),t=S();return!e||!t?null:{id:At,name:jt,host:e,apiKey:t,kind:`local`}}var It=`openhands-backends`,w=`openhands-active-backend`;function Lt(e){return e===`local`||e===`cloud`}function Rt(e){return e===void 0||e===`api-key`||e===`cookie`}function zt(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.id==`string`&&t.id.length>0&&typeof t.name==`string`&&typeof t.host==`string`&&typeof t.apiKey==`string`&&Lt(t.kind)&&Rt(t.authMode)&&(t.connectionRevision===void 0||typeof t.connectionRevision==`number`&&Number.isSafeInteger(t.connectionRevision)&&t.connectionRevision>=0)}function Bt(e){try{let{hostname:t}=new URL(e);return t===`localhost`||t===`127.0.0.1`||t===`::1`||t===`[::1]`}catch{return!1}}function Vt(e,t){return e.id!==`default-local`||e.kind!==`local`?!1:e.host===t.host||Bt(e.host)&&Bt(t.host)}function Ht(e){let t=Ft();if(!t)return e;let n=!1,r=e.map(e=>!Vt(e,t)||e.apiKey===t.apiKey?e:(n=!0,{...e,apiKey:t.apiKey}));return n?(T(r),r):e}function T(e){if(!(typeof window>`u`))try{window.localStorage.setItem(It,JSON.stringify(e))}catch{}}function Ut(){if(typeof window>`u`)return[];try{let e=Pt();if(e)return T([e]),Jt()?.backendId!==e.id&&E({backendId:e.id}),[e];let t=window.localStorage.getItem(It);if(t===null){let e=Ft();return e?(T([e]),[e]):[]}let n=JSON.parse(t);if(!Array.isArray(n))return[];let r=n.filter(zt);if(r.length===0){let e=Ft();return e?(T([e]),[e]):[]}return Ht(r)}catch{return[]}}function Wt(e){if(!e)return null;try{let t=JSON.parse(e);if(typeof t!=`object`||!t||typeof t.backendId!=`string`)return null;let n=t.orgId;return{backendId:t.backendId,orgId:typeof n==`string`&&n.length>0?n:null}}catch{return null}}function Gt(e,t){try{return e?.getItem(t)??null}catch{return null}}function Kt(e,t,n){try{e?.setItem(t,n)}catch{}}function qt(e,t){try{e?.removeItem(t)}catch{}}function Jt(){return typeof window>`u`?null:Wt(Gt(window.sessionStorage,w))||Wt(Gt(window.localStorage,w))}function E(e){if(typeof window>`u`)return;if(!e){qt(window.sessionStorage,w),qt(window.localStorage,w);return}let t=JSON.stringify({backendId:e.backendId,orgId:e.orgId??null});Kt(window.sessionStorage,w,t),Kt(window.localStorage,w,t)}var Yt=`backend`;function Xt(e,t){let{backend:n,orgId:r}=t;if(!n.id)return e;let i=e.indexOf(`#`),a=i===-1?``:e.slice(i),o=i===-1?e:e.slice(0,i),s=o.indexOf(`?`),c=s===-1?o:o.slice(0,s),ee=s===-1?``:o.slice(s+1),te=new URLSearchParams(ee);return te.set(Yt,n.id),r&&te.set(`org`,r),`${c}?${te.toString()}${a}`}function Zt(e,t){if(!t)return null;let n;try{n=new URLSearchParams(t)}catch{return null}let r=n.get(Yt);return!r||!e.some(e=>e.id===r)?null:{backendId:r,orgId:n.get(`org`)||null}}function Qt(){return typeof window>`u`?``:window.location.search}var $t=`no-backend`,en={id:$t,name:`No Backend Available`,host:``,apiKey:``,kind:`local`};function tn(e){return e.id===$t}function nn(e){return e.find(e=>e.kind===`local`&&$e(e.id)?.disabled!==!0)||(e.find(e=>e.kind===`local`)??e[0]??en)}function rn(e,t){let n=null,r=null;if(t){let i=e.find(e=>e.id===t.backendId);i&&(n=i,r=t.orgId??null)}return n||(n=nn(e),r=null),{backends:e,selection:t,active:{backend:n,orgId:r}}}function an(e){let t=Zt(e,Qt());return t?(E(t),t):Jt()}var on=Ut(),D=rn(on,an(on)),sn=new Set;function cn(){sn.forEach(e=>e())}function ln(){return D.active}function O(){let e=D.active.backend;return e.kind===`local`&&!tn(e)?e:null}function k(){return D.backends}function un(){return D.selection}function A(){return D}function dn(e){E(e),D=rn(D.backends,e),cn()}function fn(e){T(e);let t=D.selection;t&&!e.some(e=>e.id===t.backendId)&&(t=null,E(null)),D=rn(e,t),cn()}function pn(e){return sn.add(e),()=>{sn.delete(e)}}var mn=(e,t)=>{(e?.response?.status===401||e?.status===401)&&t.invalidateQueries({queryKey:[`user`,`authenticated`]})},hn=e=>{if(!(e instanceof a)||e.response?.status!==401&&e.status!==401)return!1;let t=ln().backend;if(t.kind!==`cloud`)return!1;let n=e.config?.url;return!n||n.startsWith(t.host.replace(/\/+$/,``))},gn=new Set,_n=()=>{let e=new s({queryCache:new c({onSuccess:(e,t)=>{let n=t.meta?.backendId??t.options.meta?.backendId;typeof n==`string`&&nt(n)},onError:(t,n)=>{if(n.queryKey[0]===`user`&&n.queryKey[1]===`authenticated`||mn(t,e),!(n.meta?.disableToast??n.options.meta?.disableToast)&&!hn(t)){let e=Fe(t);gn.has(e||``)||(Be(e||p.t(l.ERROR$GENERIC)),gn.add(e||``),setTimeout(()=>{gn.delete(e||``)},3e3))}}}),mutationCache:new ee({onError:(t,n,r,i)=>{mn(t,e),!(i?.meta?.disableToast??i?.options.meta?.disableToast)&&!hn(t)&&Be(Fe(t)||p.t(l.ERROR$GENERIC))}})});return e},vn=null,yn=null,bn=()=>(vn||=_n(),vn),xn=()=>yn??bn(),Sn=e=>(yn=e??bn(),yn),Cn=new Proxy({},{get:(e,t)=>{let n=xn(),r=Reflect.get(n,t,n);return typeof r==`function`?r.bind(n):r},set:(e,t,n)=>{let r=xn();return Reflect.set(r,t,n,r)}});function wn(e){if(e&&!e.startsWith(`/`))try{let t=new URL(e),n=t.hostname,r=window.location.hostname??window.location.host?.split(`:`)[0];return r&&(n===`localhost`||n===`127.0.0.1`)&&r!==`localhost`&&r!==`127.0.0.1`?`${r}:${t.port}`:t.host}catch{return window.location.host}return window.location.host}function Tn(e){if(e&&!e.startsWith(`/`))try{return(new URL(e).pathname.split(`/api/conversations`)[0]||``).replace(/\/$/,``)}catch{return``}return``}function En(e){let t=wn(e),n=Tn(e),r=window.location.protocol===`https:`,i=Dn(e)===`https:`;return`${r||i?`https:`:`http:`}//${t}${n}`}function Dn(e){if(!e||e.startsWith(`/`))return null;try{return new URL(e).protocol}catch{return null}}function On(e){let t=wn(e),n=Tn(e),r=window.location.protocol===`https:`,i=Dn(e)===`https:`;return`${r||i?`wss:`:`ws:`}//${t}${n}/sockets/bash-events`}function kn(e,t){if(!e)return null;let n=wn(t),r=Tn(t),i=window.location.protocol===`https:`,a=Dn(t)===`https:`;return`${i||a?`wss:`:`ws:`}//${n}${r}/sockets/events/${e}`}var An=class extends Error{constructor(){super(`No backend is configured.`),this.name=`NoBackendAvailableError`}};function jn(e){return e.replace(/\/+$/,``)}function Mn(e,t){return e.host?jn(e.host):e.conversationUrl?jn(En(e.conversationUrl)):jn(t?.host??``)}function j(e={}){let t=O();if(!t&&!e.host&&!e.conversationUrl)throw new An;let n=e.sessionApiKey??e.apiKey??t?.apiKey??void 0;return{host:Mn(e,t),...n?{apiKey:n}:{},workingDir:e.workingDir??St(),...e.timeout===void 0?{}:{timeout:e.timeout}}}function Nn(e){let{host:t,apiKey:n,timeout:r}=j(e);return{baseUrl:t,...n?{apiKey:n}:{},timeout:r??6e4}}var Pn={_comment:`Single source of truth for version pins, ports, paths, and defaults shared across the npm and Docker install paths. Read by scripts/dev-safe.mjs, scripts/dev-with-automation.mjs, docker/entrypoint.sh (via generated defaults.env), and .github/workflows/docker.yml.`,versions:{agentServer:`1.44.0`,agentCanvas:`1.16.0`,automation:`1.9.0`},compatibility:{minimumAgentServer:`1.28.0`},constraints:{_comment:`Temporary upper bound on the agent-client-protocol (acp) transitive dependency. openhands-sdk 1.35.0 requires agent-client-protocol>=0.10.1 with no upper bound, but acp 0.11.0 reordered the ACP prompt() arguments and breaks the SDK's ACP client (a PromptRequest validation error surfaces as 'ACP error: 2 validation errors for PromptRequest'). Pin acp <0.11 until a fixed openhands-sdk ships. Consumed by scripts/dev-safe.mjs (agent-server uvx install) and .github/workflows/mock-llm-e2e.yml (mock ACP server venv).`,agentClientProtocol:`agent-client-protocol<0.11`},images:{agentServer:`ghcr.io/openhands/agent-server`,agentCanvas:`ghcr.io/openhands/agent-canvas`},ports:{agentServer:18e3,automation:18001,proxy:8e3,_vscodeComment:`Port the bundled editor binds to inside the container; agent-server's own default. Only the Docker entrypoint reads this — the npm launchers derive the editor port from the agent-server port so several stacks can run side by side. It is never published: the editor is reached through paths.vscodeBasePath on the proxy port.`,vscode:8001},paths:{stateSubdir:`agent-canvas`,conversations:`agent-canvas/conversations`,bashEvents:`agent-canvas/bash_events`,automationDb:`automation/automations.db`,canvasBasePath:`/canvas`,_vscodeBasePathComment:`Path prefix the bundled editor is served under, on the same origin as the canvas. Passed to agent-server as OH_VSCODE_BASE_PATH (it launches openvscode-server with --server-base-path and advertises the prefix in /api/vscode/url), and registered as an ingress route to the VSCode port. Keeping one value on both sides is what lets a single-origin deployment reach the editor without publishing a second port. Tradeoff: a path prefix routes but does not isolate, so the editor shares the canvas's browser origin and therefore its localStorage — see docs/SELF_HOSTING.md and OpenHands/OpenHands#16492.`,vscodeBasePath:`/vscode`},packages:{agentServer:`openhands-agent-server`,automation:`openhands-automation`,tools:`openhands-tools`,workspace:`openhands-workspace`},telemetry:{posthogApiKey:`phc_kBtz5nKmxVRRQ7HtPwr2QX9eMC5j65zE86QKocVNwb4U`,posthogHost:`https://us.i.posthog.com`}},Fn=5e3,In=`unknown`,M=Pn.compatibility.minimumAgentServer,Ln=`AGENT_SERVER_UNSUPPORTED_VERSION`,Rn=`AGENT_SERVER_UNKNOWN_VERSION`,zn=`Invalid API key`,N=null,Bn=null,Vn=e=>Array.isArray(e?.usable_tools)?e.usable_tools:null,P=class extends Error{details;noBackendConfigured;constructor(e,t){let n=t?.noBackendConfigured??!1;super(n?`No agent server backend is configured yet. Add a backend to get started.`:`Could not connect to the configured agent server. Make sure it is running and reachable, then reload the page.`),this.name=`AgentServerUnavailableError`,this.details=e??null,this.noBackendConfigured=n}},Hn=e=>e instanceof P||typeof e==`object`&&!!e&&`name`in e&&(e.name===`AgentServerUnavailableError`||e.name===`AgentServerUnsupportedVersionError`||e.name===`AgentServerUnknownVersionError`),Un=class extends P{code=Ln;actualVersion;requiredVersion=M;constructor(e){let t=`Agent Canvas requires agent-server ${M} or newer; this backend is running ${e}. Please upgrade the agent-server backend.`;super(t),this.name=`AgentServerUnsupportedVersionError`,this.message=t,this.actualVersion=e}},Wn=class extends P{code=Rn;actualVersion;requiredVersion=M;constructor(e){let t=`Could not determine this backend's agent-server version.${e?` It reported "${e}".`:``} Agent Canvas requires agent-server ${M} or newer, but this backend did not return a valid version from /server_info. Restart or rebuild the agent-server backend, then try again.`;super(t),this.name=`AgentServerUnknownVersionError`,this.message=t,this.actualVersion=e}},Gn=e=>C()&&I(e,401);function F(){N=null,Bn=null}function Kn(e){return e?.host&&e.host!==Bn?null:N}function qn(e){let t=Vn(N);return Array.isArray(t)?t.includes(e):!0}function Jn(e){return e instanceof Error&&e.name===`HttpError`&&`status`in e&&typeof e.status==`number`}function I(e,t){return Jn(e)&&e.status===t}function Yn(e){return typeof e==`string`&&e.trim()||null}function Xn(e){return Yn(e.sdk_version)}function Zn(e){return Yn(e.version)??Xn(e)}function Qn(e){let t=Zn(e);return!t||t.toLowerCase()===In?null:t}function $n(e){let t=Qn(e);return!t||!nr(t)?null:t}function er(e){return!N||e&&O()?.host!==e?null:$n(N)}function tr(e,t){let n=nr(e),r=nr(t);if(!n||!r)return null;for(let e of[`major`,`minor`,`patch`]){if(n[e]>r[e])return 1;if(n[e]<r[e])return-1}return n.prerelease&&!r.prerelease?-1:!n.prerelease&&r.prerelease?1:n.prerelease&&r.prerelease?n.prerelease.localeCompare(r.prerelease):0}function nr(e){let[t]=e.trim().replace(/^v/,``).split(`+`),[n,r]=t.split(`-`,2),i=n.split(`.`);if(i.length!==3)return null;let[a,o,s]=i.map(e=>Number(e));return[a,o,s].every(e=>Number.isInteger(e)&&e>=0)?{major:a,minor:o,patch:s,prerelease:r}:null}function rr(e){let t=Qn(e);if(!t)throw F(),new Wn(Zn(e));let n=tr(t,M);if(n===null)throw F(),new Wn(t);if(n<0)throw F(),new Un(t)}async function ir(e,t){let n=j({host:e.host,sessionApiKey:e.apiKey||null,timeout:t});try{await new ae(n).getSettings();let e=await new ie(n).getServerInfo();return rr(e),$n(e)}catch(e){throw I(e,401)?Error(zn):e}}async function ar(){let e=O();if(!e){if(F(),tn(ln().backend))throw new P(`No backend configured`,{noBackendConfigured:!0});return null}let t=j({host:e.host,sessionApiKey:e.apiKey||null,timeout:Fn}),n;try{n=await new ie(t).getServerInfo()}catch(e){throw F(),I(e,401)?e:new P(e instanceof Error?e.message:null)}if(rr(n),C())try{await new ae(t).getSettings()}catch(e){if(I(e,401))throw e;console.warn(`[agent-server] getSettings() probe failed (non-401):`,e)}return N=n,Bn=t.host,n}var or={WEB_CLIENT_CONFIG:[`web-client-config`],MAIN_APP_COOKIE_AUTH:[`main-app-cookie-auth`]},sr={all:[`settings`],byScope:e=>[`settings`,e],personal:()=>[`settings`,`personal`]},cr={all:[`llm-profiles`]},lr={all:[`agent-profiles`]},ur={all:[`provider-connections`]},dr={retry:!1},fr={all:[`llm-subscription`],openaiStatus:[`llm-subscription`,`openai`,`status`],openaiModels:[`llm-subscription`,`openai`,`models`]},pr={all:[`local-workspaces`]},mr={marketplace:[`plugins-marketplace`],installed:[`plugins-installed`],local:[`plugins-local`]},hr={all:[`canvas-extensions`],installed:(e,t,n)=>[`canvas-extensions`,`installed`,e,t,n]},gr={capabilities:()=>[`setup-capabilities`]},_r={latestVersion:[`agent-canvas-latest-version`]},vr={staleTime:1e3*60*5,gcTime:1e3*60*15},yr={name:`@openhands/agent-canvas`,version:`1.16.0`,description:`Agent Canvas UI for OpenHands - run AI coding agents with a visual interface`,license:`MIT`,private:!1,type:`module`,repository:{type:`git`,url:`https://github.com/OpenHands/OpenHands`},homepage:`https://github.com/OpenHands/OpenHands#readme`,bugs:{url:`https://github.com/OpenHands/OpenHands/issues`},bin:{"agent-canvas":`bin/agent-canvas.mjs`},engines:{node:`>=22.12.0`},dependencies:{"@heroui/react":`2.8.10`,"@microlink/react-json-view":`1.31.25`,"@monaco-editor/react":`4.7.0`,"@openhands/extensions":`0.19.0`,"@openhands/typescript-client":`1.39.0`,"@react-router/node":`7.18.2`,"@react-router/serve":`7.18.2`,"@tailwindcss/vite":`4.3.3`,"@tanstack/react-query":`5.101.4`,"@types/shell-quote":`1.7.5`,"@uidotdev/usehooks":`2.4.1`,"@xterm/addon-fit":`0.11.0`,"@xterm/xterm":`6.0.0`,axios:`1.18.0`,"class-variance-authority":`0.7.1`,clsx:`2.1.1`,downshift:`9.3.2`,"framer-motion":`12.38.0`,httpxy:`0.5.3`,i18next:`26.3.6`,"i18next-browser-languagedetector":`8.2.1`,"i18next-http-backend":`4.0.1`,isbot:`5.1.39`,"lucide-react":`1.25.0`,"monaco-editor":`0.56.0`,"posthog-js":`1.380.0`,react:`19.2.8`,"react-dom":`19.2.8`,"react-hot-toast":`2.6.0`,"react-i18next":`17.0.11`,"react-icons":`5.6.0`,"react-markdown":`10.1.0`,"react-router":`7.18.2`,"react-syntax-highlighter":`16.1.1`,"rehype-raw":`7.0.0`,"rehype-sanitize":`6.0.0`,"remark-breaks":`4.0.0`,"remark-gfm":`4.0.1`,"shell-quote":`1.9.0`,sirv:`3.0.2`,"sirv-cli":`3.0.1`,"socket.io-client":`4.8.3`,"tailwind-merge":`3.6.0`,"tailwind-scrollbar":`4.0.2`,"unist-util-visit":`5.1.0`,uuid:`14.0.0`,vite:`8.0.16`,winston:`3.19.0`,"winston-daily-rotate-file":`5.0.0`,zustand:`5.0.14`},scripts:{dev:`node --env-file-if-exists=.env scripts/dev-with-automation.mjs`,"dev:static":`node --env-file-if-exists=.env scripts/dev-static.mjs`,"dev:extra-backend":`node --env-file-if-exists=.env scripts/dev-extra-backend.mjs`,"dev:minimal":`node --env-file-if-exists=.env scripts/dev-safe.mjs`,"dev:frontend":`npm run make-i18n && cross-env VITE_MOCK_API=false react-router dev`,"dev:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router dev`,build:`npm run build:app`,"build:mock":`npm run make-i18n && cross-env VITE_MOCK_API=true react-router build`,start:`npx sirv-cli build/ --single`,test:`npm run make-i18n && vitest run`,"test:e2e":`playwright test --pass-with-no-tests`,"test:e2e:live":`node --env-file-if-exists=.env tests/e2e/live/scripts/run-live-e2e.mjs`,"test:e2e:mock-llm":`playwright test --config=playwright.mock-llm.config.ts`,"test:e2e:mock-llm:docker":`playwright test --config=playwright.mock-llm-docker.config.ts`,"test:coverage":`npm run make-i18n && vitest run --coverage`,"test:mutation":`npm run make-i18n && stryker run`,"test:mutation:diff":`npm run make-i18n && node scripts/stryker-diff.mjs`,"test:mutation:incremental":`npm run make-i18n && stryker run --incremental`,dev_wsl:`VITE_WATCH_USE_POLLING=true vite`,preview:`vite preview`,"make-i18n":`node scripts/make-i18n-translations.cjs`,prelint:`npm run make-i18n`,lint:`npm run typecheck && eslint src && prettier --check src/**/*.{ts,tsx}`,"lint:fix":`eslint src --fix && prettier --write src/**/*.{ts,tsx}`,postinstall:`node -e "if (process.env.npm_config_global === 'true') { console.log('\\n\\x1b[32m\\x1b[1m\\u2713 @openhands/agent-canvas installed!\\x1b[0m\\n\\nTo start Agent Canvas, run:\\n\\n \\x1b[36m\\x1b[1magent-canvas\\x1b[0m\\n\\nThis launches the full stack at \\x1b[36mhttp://localhost:8000\\x1b[0m.\\n\\nDocs: https://docs.openhands.dev/openhands/usage/agent-canvas/setup\\n') }"`,prepare:`husky`,typecheck:`react-router typegen && tsc`,"typecheck:staged":`react-router typegen && npx tsc --noEmit --skipLibCheck`,"check-translation-completeness":`node scripts/check-translation-completeness.cjs`,"build:app":`npm run make-i18n && react-router build`,"build:lib":`npm run make-i18n && react-router typegen && cross-env BUILD_LIB=true vite build && tsc -p tsconfig.lib.json`,"build:docker":`node scripts/docker-build.mjs`,"example:acp-docker:env":`node scripts/gen-acp-docker-env.mjs`,predesktop:`node scripts/brand-dev-electron.mjs`,desktop:`npm run build:app && electron electron`,"build:desktop":`npm run build:app && node scripts/download-uv.mjs && node scripts/download-node.mjs && electron-builder --config electron-builder.config.mjs --publish never`,"build:desktop:universal":`npm run build:app && node scripts/download-uv.mjs && node scripts/download-node.mjs && cross-env ELECTRON_ARCH=universal electron-builder --config electron-builder.config.mjs --publish never`,"download-uv":`node scripts/download-uv.mjs`,"download-node":`node scripts/download-node.mjs`,"generate-icons":`node scripts/generate-icons.mjs`},"lint-staged":{"src/**/*.{ts,tsx,js}":[`eslint --fix`,`prettier --write`],"src/**/*.{ts,tsx}":[`node scripts/run-staged-typecheck.mjs`],"src/**/*":[`npm run check-translation-completeness`]},devDependencies:{"@eslint/eslintrc":`3.3.6`,"@eslint/js":`9.39.4`,"@mswjs/socket.io-binding":`0.2.0`,"@playwright/test":`1.62.1`,"@react-router/dev":`7.18.2`,"@stryker-mutator/core":`9.6.1`,"@stryker-mutator/vitest-runner":`9.6.1`,"@tailwindcss/typography":`0.5.20`,"@tanstack/eslint-plugin-query":`5.101.4`,"@testing-library/dom":`10.4.1`,"@testing-library/jest-dom":`7.0.0`,"@testing-library/react":`16.3.2`,"@testing-library/user-event":`14.6.1`,"@types/mdast":`4.0.4`,"@types/node":`26.1.2`,"@types/react":`19.2.18`,"@types/react-dom":`19.2.4`,"@types/react-syntax-highlighter":`15.5.13`,"@typescript-eslint/eslint-plugin":`8.65.0`,"@typescript-eslint/parser":`8.65.0`,"@vercel/react-router":`1.3.0`,"@vitest/coverage-v8":`4.1.10`,"cross-env":`10.1.0`,electron:`42.3.3`,"electron-builder":`26.15.3`,eslint:`9.39.5`,"eslint-config-prettier":`10.1.8`,"eslint-import-resolver-typescript":`4.4.5`,"eslint-plugin-i18next":`6.1.5`,"eslint-plugin-import-x":`4.17.1`,"eslint-plugin-jsx-a11y":`6.10.2`,"eslint-plugin-prettier":`5.5.6`,"eslint-plugin-react":`7.37.5`,"eslint-plugin-react-hooks":`7.1.1`,"eslint-plugin-unused-imports":`4.4.1`,globals:`16.5.0`,husky:`9.1.7`,jsdom:`30.0.1`,"lint-staged":`17.3.0`,msw:`2.15.0`,png2icons:`2.0.1`,"postcss-prefix-selector":`2.1.1`,prettier:`3.8.3`,tailwindcss:`4.3.3`,typescript:`6.0.3`,"vite-plugin-svgr":`5.2.0`,vitest:`4.1.10`},packageManager:`npm@10.5.0`,volta:{node:`22.12.0`},msw:{workerDirectory:[`public`]},overrides:{"@vercel/static-config":{ajv:`8.20.0`},dompurify:`3.4.12`,"typed-rest-client":{qs:`6.15.3`}},main:`./dist/index.cjs`,module:`./dist/index.js`,types:`./dist/index.d.ts`,files:[`dist`,`bin`,`build`,`config`,`scripts`,`tools`],exports:{".":{types:`./dist/index.d.ts`,import:`./dist/index.js`,require:`./dist/index.cjs`},"./browser":{types:`./dist/components/browser/index.d.ts`,import:`./dist/components/browser/index.js`,require:`./dist/components/browser/index.cjs`},"./conversation":{types:`./dist/components/conversation/index.d.ts`,import:`./dist/components/conversation/index.js`,require:`./dist/components/conversation/index.cjs`},"./files":{types:`./dist/components/files/index.d.ts`,import:`./dist/components/files/index.js`,require:`./dist/components/files/index.cjs`},"./settings":{types:`./dist/components/settings/index.d.ts`,import:`./dist/components/settings/index.js`,require:`./dist/components/settings/index.cjs`},"./sidebar":{types:`./dist/components/sidebar/index.d.ts`,import:`./dist/components/sidebar/index.js`,require:`./dist/components/sidebar/index.cjs`},"./terminal":{types:`./dist/components/terminal/index.d.ts`,import:`./dist/components/terminal/index.js`,require:`./dist/components/terminal/index.cjs`},"./i18n":{types:`./dist/i18n/index.d.ts`,import:`./dist/i18n/index.js`,require:`./dist/i18n/index.cjs`},"./package.json":`./package.json`},peerDependencies:{react:`19.2.8`,"react-dom":`19.2.8`,"react-router":`7.18.2`}},br=`agent_canvas`,xr=yr.version,Sr=`X-OpenHands-Client`,Cr=`X-OpenHands-Client-Version`,wr=`X-OpenHands-Telemetry-Distinct-Id`,Tr={[Sr]:br,[Cr]:xr};function Er(e){return e?.trim()||`unknown`}function Dr(e){return e?.trim()||null}function L({backendKind:e,agentServerVersion:t,automationSdkVersion:n,backendVersion:r,connectionMethod:i}){let a=Er(t??r),o=Er(n),s=Er(r??t);return{backend_kind:e??null,agent_server_version:a,automation_sdk_version:o,backend_version:s,...i?{connection_method:i}:{}}}function Or(e=null){return{cloud_user_id:Dr(e?.userId),cloud_user_email:Dr(e?.email),cloud_org_id:Dr(e?.orgId)}}var R=`openhands-telemetry-consent`,z=`openhands-telemetry-consent-pending-cloud-sync`,B=`openhands-telemetry-consent-pending-local-revocation`,kr=`openhands-telemetry-consent-change`,Ar=`openhands-telemetry-first-use`,jr=`openhands-telemetry-session`,Mr=`agent-canvas`,Nr=`history_change`,Pr=`phc_BgzfxKdgsYMLFTmJqt424ZoyVHvKFfrwttLimzdYTKFK`,Fr=`https://z.openhands.dev`,Ir=`https://us.posthog.com`,V=null,H=null,Lr,U={},W=!1,G,K=0,q=-1,Rr=Object.freeze({client_source:br,client_version:xr,package_name:yr.name,package_version:yr.version}),zr=L({}),Br=Or();function Vr(e){zr=L(e)}function Hr(e){Br=Or(e)}function Ur(e){return e?{...e,properties:{...zr,...Br,...e.properties,...Rr}}:null}function Wr(e){W||Z()!==`granted`?e.opt_out_capturing():e.opt_in_capturing()}function Gr(e,t=!1){e.reset(t),q=-1,Wr(e)}function J(e){if(G===void 0||!$())return;let t=G?.distinctId,n=e.get_property(`$user_id`);if(n!=null&&n!==t&&Gr(e),G===null){q=K;return}(e.get_property(`$user_id`)!==G.distinctId||q!==K)&&(e.identify(G.distinctId,G.properties),q=K)}function Kr(e,t){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])}function qr(e){if(e===!1){if(W)return;W=!0,V?.opt_out_capturing(),Q();return}let t=W;if(W=!1,!V&&!H){let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));U={...U,...t}}t&&(V&&(Wr(V),J(V)),Q())}function Jr(){return W?null:{apiKey:U.apiKey||Pr,apiHost:U.apiHost||Fr,uiHost:U.uiHost||Ir}}function Y(){return typeof window<`u`&&typeof localStorage<`u`}async function Yr(){if(!Y())return null;if(V)return V;try{let{default:e}=await n(async()=>{let{default:e}=await import(`./vendor~module-DyG7x7JT.js`).then(e=>e.t);return{default:e}},__vite__mapDeps([0,1]));return e}catch{return null}}function Xr(){return!!(W||typeof process<`u`&&{}.DO_NOT_TRACK===`1`||typeof navigator<`u`&&(navigator.doNotTrack===`1`||typeof window<`u`&&window.doNotTrack===`1`))}function Zr(e){V||(Lr=e)}async function X(e=!1){if(V)return V;if(H)return H;H=(async()=>{let t=Jr();if(!t)return null;let n=await Yr();if(!n)return null;let r=n.init(t.apiKey,{api_host:t.apiHost,ui_host:t.uiHost,opt_out_capturing_by_default:!e,persistence:`localStorage`,persistence_name:Mr,consent_persistence_name:`${Mr}-consent`,person_profiles:`always`,capture_pageview:Nr,autocapture:!0,disable_session_recording:!0,bootstrap:Lr,before_send:Ur},Mr);return r?(V=r,Lr=void 0,W?V.opt_out_capturing():Z()===`granted`?(V.opt_in_capturing(),J(V)):e||V.opt_out_capturing(),V):null})();try{return await H}finally{V||(H=null)}}function Z(){if(!Y())return`pending`;if(Xr())return`denied`;if(xt()===`cookie`)return`granted`;try{let e=localStorage.getItem(R);if(e===`granted`||e===`denied`)return e}catch{}return`pending`}function Qr(){if(!Y())return null;try{let e=localStorage.getItem(z);return e===`granted`||e===`denied`?e:null}catch{return null}}function $r(){if(!Y())return null;try{return localStorage.getItem(B)}catch{return null}}function ei(e){if(!Y())return()=>{};let t=t=>{(t.key===R||t.key===z)&&e()};return window.addEventListener(kr,e),window.addEventListener(`storage`,t),()=>{window.removeEventListener(kr,e),window.removeEventListener(`storage`,t)}}function Q(){Y()&&window.dispatchEvent(new Event(kr))}function ti(e){if(Y())try{localStorage.setItem(z,e)}catch{}}function ni(e){if(!(!Y()||!e))try{localStorage.setItem(B,e)}catch{}}function ri(e){if(Y())try{if(localStorage.getItem(B)!==e)return;localStorage.removeItem(B)}catch{}}function ii(e){if(Y())try{if(e!==void 0&&localStorage.getItem(z)!==e)return;localStorage.removeItem(z),Q()}catch{}}async function ai(e,{syncToCloud:t=!0}={}){if(Y())try{let t=Z()===e;if(localStorage.setItem(R,e),W||t)return;let n=V??await X();if(!n)return;e===`granted`?(n.opt_in_capturing(),J(n)):(ni(n.get_distinct_id?.()??null),n.get_property?.(`$user_id`)==null?n.opt_out_capturing():Gr(n))}catch{}finally{t&&ti(e),Q()}}async function oi(e,t={}){let n=e===null?null:{distinctId:e,properties:t};if(G===n||G!=null&&n!==null&&G.distinctId===n.distinctId&&Kr(G.properties,t)||(G=n,K+=1,q=-1,!$()))return;let r=V??await X();r&&$()&&J(r)}function $(){return Z()===`granted`}function si(){if(!Y())return!1;try{return localStorage.getItem(Ar)===`true`}catch{return!1}}function ci(){if(Y())try{localStorage.setItem(Ar,`true`)}catch{}}async function li(){if(Xr()||si())return;let e=await X(!0);!e||Xr()||((e.has_opted_out_capturing?.()??!1)&&e.opt_in_capturing(),e.capture(`canvas_install`,{platform:typeof navigator<`u`?navigator.platform:`unknown`,user_agent:typeof navigator<`u`?navigator.userAgent:`unknown`,referrer:typeof document<`u`?document.referrer:``,url_origin:typeof window<`u`?window.location.origin:``,embedded:typeof window<`u`&&window.self!==window.top}),ci(),Z()!==`granted`&&e.opt_out_capturing())}function ui(){if(!Y())return!1;try{return sessionStorage.getItem(jr)===`true`}catch{return!1}}function di(){if(Y())try{sessionStorage.setItem(jr,`true`)}catch{}}async function fi(){if(!$()||Z()!==`granted`)return null;let e=await X();return!e||!$()?null:(e.has_opted_out_capturing?.()&&e.opt_in_capturing(),J(e),e)}async function pi(){if(ui())return;let e=await fi();e&&(e.capture(`canvas_new_session`,{is_first_use:!si()}),di())}async function mi(){return(await fi())?.get_distinct_id?.()??null}async function hi(){if(!Y())return null;if(Z()!==`granted`){let e=$r();if(e)return e}return W||Xr()?null:(await X())?.get_distinct_id?.()??null}async function gi(e,t={}){let n=await fi();n&&n.capture(e,t)}async function _i(){if(Y()){try{ni(V?.get_distinct_id?.()??null),localStorage.removeItem(R),localStorage.removeItem(Ar)}catch{}ii();try{sessionStorage.removeItem(jr)}catch{}zr=L({}),Br=Or(),G=null,K+=1,q=-1;try{V&&Gr(V,!0)}catch{try{V?.opt_out_capturing()}catch{}}finally{Q()}}}var vi=u.createContext(null);function yi(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`backend-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function bi(e,t){let n=e.backend.kind===`cloud`,r=t.backend.kind===`cloud`;!n&&!r||(Hr(null),r&&(!n||e.backend.id!==t.backend.id)&&oi(null))}function xi({children:e}){let t=u.useSyncExternalStore(pn,A,A),n=u.useCallback(()=>{F(),Cn.invalidateQueries({queryKey:or.WEB_CLIENT_CONFIG})},[]),r=u.useCallback((e,t)=>{let r=A(),i=un()?.backendId??null,a=un()?.orgId??null,o=t??null;if(e===i&&o===a)return;let s=k(),c=s.find(t=>t.id===e),ee={backend:c??s[0]??en,orgId:c?o:null};bi(r.active,ee),dn({backendId:e,orgId:o}),n()},[n]),i=u.useCallback(e=>{let t=A().active,r={...e,id:yi()},i=[...k(),r];return bi(t,{backend:r,orgId:null}),fn(i),dn({backendId:r.id}),n(),r},[n]),a=u.useCallback((e,t)=>{let r=k().find(t=>t.id===e),i=A().active.backend.id,a=t.host!==void 0&&r!==void 0&&t.host!==r.host,o=t.apiKey!==void 0&&r!==void 0&&t.apiKey!==r.apiKey;fn(k().map(n=>n.id===e?{...n,...t,connectionRevision:a||o?(n.connectionRevision??0)+1:n.connectionRevision}:n)),(a||o)&&(rt(e),i===e&&(r?.kind===`cloud`&&(Hr(null),oi(null)),n()))},[n]),o=u.useCallback(e=>{let t=k().find(t=>t.id===e),r=t?.kind===`cloud`&&A().active.backend.id===t.id;fn(k().filter(t=>t.id!==e)),r&&(Hr(null),oi(null)),it(e),n()},[n]),s=u.useMemo(()=>({backends:t.backends,active:t.active,setActive:r,addBackend:i,updateBackend:a,removeBackend:o}),[t,r,i,a,o]);return(0,h.jsx)(vi.Provider,{value:s,children:e})}function Si(){let e=u.useContext(vi);if(!e)throw Error(`useActiveBackendContext must be used inside <ActiveBackendProvider>`);return e}function Ci(){let e=u.useContext(vi);return e?e.active:{backend:Ft()??en,orgId:null}}export{ir as $,_r as A,Qe as At,gr as B,Ne as Bt,L as C,Ot as Ct,wr as D,C as Dt,xr as E,b as Et,pr as F,Be as Ft,er as G,d as Gt,F as H,je as Ht,mr as I,Ve as It,qn as J,p as Jt,$n as K,f as Kt,ur as L,He as Lt,vr as M,nt as Mt,cr as N,et as Nt,lr as O,kt as Ot,fr as P,g as Pt,ar as Q,or as R,Ue as Rt,pi as S,yt as St,br as T,xt as Tt,tr as U,Ae as Ut,zn as V,Me as Vt,Kn as W,pe as Wt,Jn as X,xe as Xt,Hn as Y,be as Yt,I as Z,fe as Zt,ai as _,jt as _t,ri as a,kn as at,gi as b,Dt as bt,qr as c,Cn as ct,Z as d,O as dt,An as et,mi as f,k as ft,Hr as g,Xt as gt,Vr as h,pn as ht,ii as i,En as it,hr as j,tt as jt,dr as k,bt as kt,Qr as l,Sn as lt,X as m,tn as mt,Ci as n,Nn as nt,_i as o,bn as ot,hi as p,A as pt,Gn as q,ye as qt,Si as r,On as rt,Zr as s,xn as st,xi as t,j as tt,$r as u,ln as ut,oi as v,At as vt,Tr as w,St as wt,li as x,x as xt,ei as y,at as yt,sr as z,Fe as zt};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,bt as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{U as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{n as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-rfV8mQ9m.js";import{t as o}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iyia17eu-Chf7vmKB.js";import{t as s}from"./useMutation-B-qc391N.js";import{Ft as c,It as l,O as u,zt as d}from"./active-backend-context-CrHTlgvN.js";import{W as f,t as p}from"./utils-CN5ZfZy1.js";import{t as m}from"./back-nav-button-Cjl_hoxq.js";import{t as h}from"./loading-spinner-BY9N3pOe.js";import{t as g}from"./brand-button-BAfk4wGP.js";import{i as _}from"./dropdown-classes-Bc1djN0-.js";import{t as v}from"./settings-dropdown-input-BcwylHs2.js";import{t as y}from"./use-llm-profiles-BO-P4Oyo.js";import{n as b,t as x}from"./use-agent-profiles-Bd9Bvvp1.js";import{i as S,n as C,t as w}from"./use-can-manage-org-profiles-CrJP5262.js";import{t as T}from"./u-edit-DAkcF52u.js";import{r as E}from"./typography-v1KN0tzi.js";import{o as D}from"./extension-module-card-classes-DpeaYhYo.js";import{i as O,n as k,o as A,r as j,t as M}from"./badge-BU3S0VtE.js";import{t as N}from"./u-check-circle-BKn1spCL.js";import{i as P,n as F,r as I,t as L}from"./settings-list-classes-BzeSZbF2.js";import{n as R}from"./settings-section-header-context-BOJ_Fbak.js";import{t as z}from"./use-save-agent-profile-BUjSsDXK.js";import{n as B}from"./use-activate-agent-profile-BLfmvDiG.js";import{t as V}from"./merge-agent-profile-save-input-WcFmQVKK.js";import{i as H,t as U}from"./agent-settings-DLtsqaOs.js";var W=e(t(),1),G=e(n(),1),K=r();function q({onEdit:e,onSetActive:t,onDelete:n,isActive:r,isActivating:i,onClose:a,anchorRef:s}){let{t:c}=o(`openhands`),l=(0,W.useRef)(null),u=(0,W.useRef)([]),d=s?.current??null,[m,h]=(0,W.useState)();(0,W.useLayoutEffect)(()=>{if(!d)return;let e=()=>{let e=d.getBoundingClientRect();e&&h({position:`fixed`,zIndex:9999,top:e.bottom+8,right:window.innerWidth-e.right,width:`max-content`})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[d]),(0,W.useEffect)(()=>{u.current[0]?.focus()},[]),(0,W.useEffect)(()=>{let e=e=>{let t=e.target;l.current?.contains(t)||d?.contains(t)||a()},t=e=>{e.key===`Escape`&&a()};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[d,a]);let g=e=>{e(),a()},v=(0,W.useCallback)((e,t)=>{if(e.key===`Tab`){a();return}let n=u.current.filter(Boolean).length;if(e.key===`ArrowDown`){e.preventDefault();let r=(t+1)%n;u.current[r]?.focus()}else if(e.key===`ArrowUp`){e.preventDefault();let r=(t-1+n)%n;u.current[r]?.focus()}},[a]),y=r||i,b=!!d,x=(0,K.jsxs)(`div`,{ref:l,className:p(`absolute right-0 top-full z-10 mt-2 w-[160px] rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 shadow-lg`,_,b&&`!static !top-auto !bottom-auto !left-auto !right-auto !mt-0`),role:`menu`,"aria-orientation":`vertical`,"data-testid":`agent-profile-actions-menu`,children:[(0,K.jsx)(k,{index:0,icon:(0,K.jsx)(T,{width:16,height:16}),label:c(f.SETTINGS$PROFILE_EDIT),onClick:()=>g(e),onKeyDown:v,menuItemsRef:u,testId:`agent-profile-edit`}),(0,K.jsx)(k,{index:1,icon:(0,K.jsx)(N,{width:16,height:16}),label:c(f.SETTINGS$PROFILE_SET_ACTIVE),onClick:()=>g(t),onKeyDown:v,menuItemsRef:u,disabled:y,testId:`agent-profile-set-active`}),(0,K.jsx)(k,{index:2,icon:(0,K.jsx)(S,{width:16,height:16}),label:c(f.BUTTON$DELETE),onClick:()=>g(n),onKeyDown:v,menuItemsRef:u,testId:`agent-profile-delete`})]});return b?typeof document>`u`||!m?null:G.createPortal((0,K.jsx)(`div`,{style:m,children:x}),document.body):x}function J({profile:e,isActive:t,canManage:n,onActivate:r,onEdit:i,onDelete:a,isActivating:s}){let{t:c}=o(`openhands`),[l,u]=(0,W.useState)(!1),d=(0,W.useRef)(null),m=e.agent_kind===`openhands`?e.llm_profile_ref:c(f.SETTINGS$AGENT_TYPE_ACP);return(0,K.jsxs)(`div`,{"data-testid":`agent-profile-row`,className:p(P,`justify-between gap-3`),children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-3`,children:[(0,K.jsx)(`span`,{className:`min-w-0 max-w-full truncate text-sm font-medium text-white`,title:e.name,children:e.name}),m?(0,K.jsx)(`span`,{className:`min-w-0 max-w-full truncate text-sm text-[var(--oh-muted)]`,title:m,children:m}):null,t&&(0,K.jsx)(M,{className:`shrink-0 whitespace-nowrap px-2.5 py-1 text-xs`,"data-testid":`agent-profile-active-badge`,children:c(f.SETTINGS$PROFILE_DEFAULT)})]}),n&&(0,K.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,K.jsx)(C,{ref:d,onClick:()=>u(e=>!e),ariaLabel:c(f.SETTINGS$PROFILE_MENU),testId:`agent-profile-menu-trigger`,className:I}),l&&(0,K.jsx)(q,{anchorRef:d,onEdit:()=>i(e),onSetActive:()=>r(e),onDelete:()=>a(e),isActive:t,isActivating:s,onClose:()=>u(!1)})]})]})}function Y({isLoading:e,loadError:t,profiles:n,activeId:r,canManage:i,onActivate:a,onEdit:s,onDelete:c,isActivating:l}){let{t:u}=o(`openhands`);return e?(0,K.jsx)(`div`,{className:`flex justify-center p-4`,children:(0,K.jsx)(h,{size:`large`})}):t?(0,K.jsx)(`div`,{"data-testid":`agent-profiles-load-error`,className:D,children:(0,K.jsx)(`p`,{className:`text-sm text-red-400`,children:u(f.SETTINGS$PROFILES_LOAD_ERROR)})}):n.length===0?(0,K.jsx)(`div`,{"data-testid":`agent-profiles-empty`,className:D,children:(0,K.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:u(f.SETTINGS$PROFILES_EMPTY)})}):(0,K.jsx)(`div`,{className:p(L,F),children:n.map(e=>(0,K.jsx)(J,{profile:e,isActive:!!e.id&&e.id===r,canManage:i,onActivate:a,onEdit:s,onDelete:c,isActivating:l},e.name))})}function X(){let e=a();return s({mutationFn:e=>b.deleteProfile(e),onSuccess:async()=>{await e.invalidateQueries({queryKey:u.all})},meta:{disableToast:!0}})}function Z({profile:e,onClose:t}){let{t:n}=o(`openhands`),r=X(),i=(0,W.useRef)(null);if(!e)return null;let a=async()=>{try{await r.mutateAsync(e.name),l(n(f.SETTINGS$PROFILE_DELETED,{name:e.name})),t()}catch(e){c(e instanceof Error?e.message:n(f.ERROR$GENERIC))}},s=()=>{r.isPending||t()},u=(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(g,{ref:i,type:`button`,variant:`tertiary`,onClick:s,isDisabled:r.isPending,children:n(f.BUTTON$CANCEL)}),(0,K.jsx)(g,{testId:`delete-agent-profile-confirm`,type:`button`,variant:`danger`,onClick:a,isDisabled:r.isPending,"aria-busy":r.isPending,children:r.isPending?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(h,{size:`small`}),(0,K.jsx)(`span`,{className:`sr-only`,children:n(f.BUTTON$DELETE)})]}):n(f.BUTTON$DELETE)})]});return(0,K.jsx)(j,{isOpen:!0,title:n(f.SETTINGS$PROFILE_DELETE_TITLE),footer:u,onClose:s,initialFocusRef:i,children:(0,K.jsx)(`p`,{className:`text-sm break-all`,children:n(f.SETTINGS$PROFILE_DELETE_CONFIRMATION,{name:e.name})})})}function Q({onAddProfile:e,onEditProfile:t}){let{t:n}=o(`openhands`),{data:r,isLoading:i,error:a}=x(),s=B(),c=w(),[u,d]=(0,W.useState)(null),p=r?.profiles??[],m=r?.active_agent_profile_id??null;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,K.jsx)(`h2`,{className:`text-base font-medium text-white`,children:n(f.SETTINGS$AVAILABLE_PROFILES)}),e&&c?(0,K.jsx)(g,{testId:`add-agent-profile`,type:`button`,variant:`secondary`,className:`ml-auto`,onClick:e,children:n(f.SETTINGS$ADD_AGENT_PROFILE)}):null]}),(0,K.jsx)(Y,{isLoading:i,loadError:a??null,profiles:p,activeId:m,canManage:c,onActivate:async e=>{if(e.id)try{await s.mutateAsync(e.id),l(n(f.SETTINGS$PROFILE_ACTIVATED,{name:e.name}))}catch(e){console.error(`Failed to activate agent profile:`,e)}},onEdit:e=>t?.(e),onDelete:d,isActivating:s.isPending})]}),(0,K.jsx)(Z,{profile:u,onClose:()=>d(null)})]})}function $(){let e=a();return s({mutationFn:({name:e,newName:t})=>b.renameProfile(e,t),onSuccess:async()=>{await e.invalidateQueries({queryKey:u.all})},meta:{disableToast:!0}})}function ee(e){if(e.agent_kind===`acp`)return{agent_kind:`acp`,acp_server:e.acp_server,acp_command:e.acp_command?H(e.acp_command):[],acp_args:e.acp_args??[],acp_model:e.acp_model??``};let t=e.enable_switch_llm_tool??!0;return{agent_kind:`openhands`,enable_sub_agents:e.enable_sub_agents,enable_switch_llm_tool:t,tool_concurrency_limit:e.tool_concurrency_limit}}function te(){let{t:e}=o(`openhands`),{setHideSectionHeader:t}=R(),n=z(),r=$(),{data:i}=x(),{data:a,isLoading:s}=y(),[u,p]=(0,W.useState)(`list`),[h,_]=(0,W.useState)(``),[S,C]=(0,W.useState)(null),[w,T]=(0,W.useState)(null),[D,k]=(0,W.useState)(``),[j,M]=(0,W.useState)(null),[N,P]=(0,W.useState)(!1);(0,W.useEffect)(()=>(t(u!==`list`),()=>t(!1)),[u,t]);let F=a?.profiles??[],I=a?.active_profile??F[0]?.name??``,L=(0,W.useMemo)(()=>new Set(i?.profiles?.map(e=>e.name)??[]),[i]),B=(0,W.useMemo)(()=>!(!A(h,{isRequired:!0})||u===`create`&&L.has(h)||u===`edit`&&h!==S?.name&&L.has(h)),[h,u,L,S?.name]),H=(0,W.useCallback)(()=>{_(``),C(null),T({agent_kind:`openhands`}),k(I),M(null),p(`create`)},[I]),G=(0,W.useCallback)(async t=>{try{let e=(await b.getProfile(t.name,`encrypted`)).profile;C(e),T(ee(e)),e.agent_kind===`openhands`?k(s||F.some(t=>t.name===e.llm_profile_ref)?e.llm_profile_ref:I):k(``),_(e.name),M(null),p(`edit`)}catch(t){console.error(`Failed to fetch agent profile:`,t),c(e(f.ERROR$GENERIC))}},[e,F,s,I]),q=(0,W.useCallback)(()=>{p(`list`),C(null),_(``),T(null),M(null)},[]),J=(0,W.useCallback)(async()=>{if(!j||!B)return;let t;try{let n=j.buildAgentProfileFields();if(n.agent_kind===`openhands`){if(!D){c(e(f.SETTINGS$AGENT_PROFILE_LLM_REQUIRED));return}t={...n,llm_profile_ref:D}}else t=n}catch(t){c(t instanceof Error?t.message:e(f.ERROR$GENERIC));return}let i=h.trim(),a=S?.name,o=u===`edit`&&a&&a!==i;P(!0);try{if(j.credentials.isDirty){if(!await j.credentials.save({silent:!0}))return;j.credentials.reset()}o&&await r.mutateAsync({name:a,newName:i});let s=V(u===`edit`?S:null,t);await n.mutateAsync({name:i,profile:s}),l(e(u===`create`?f.SETTINGS$PROFILE_CREATED:f.SETTINGS$PROFILE_UPDATED,{name:i})),q()}catch(t){c(d(t)||e(f.ERROR$GENERIC))}finally{P(!1)}},[j,B,D,h,u,S,n,r,e,q]);if(u===`list`)return(0,K.jsx)(Q,{onAddProfile:H,onEditProfile:G});let Y=e(u===`edit`?f.SETTINGS$EDIT_AGENT_PROFILE:f.SETTINGS$ADD_AGENT_PROFILE),X=u===`edit`&&S?e(f.SETTINGS$PROFILE_LOADED,{name:S.name}):e(f.SETTINGS$PROFILE_SAVE_HINT),Z=j?.agentType!==`acp`;return(0,K.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,K.jsx)(m,{testId:`back-to-agent-profiles`,onClick:q,children:e(f.BUTTON$BACK)}),(0,K.jsx)(E.H2,{testId:`agent-profile-editor-title`,children:Y}),(0,K.jsx)(`p`,{"data-testid":`agent-profile-editor-description`,className:`text-sm leading-5 text-tertiary-light`,children:X})]}),(0,K.jsx)(O,{testId:`agent-profile-name-input`,value:h,onChange:_,isRequired:!0}),(0,K.jsx)(U,{embedded:!0,agentSettingsOverride:w,onSaveControlChange:M},u===`edit`?`edit-${S?.id}`:`new-profile`),Z&&(F.length>0?(0,K.jsx)(v,{testId:`agent-profile-llm-selector`,name:`agent-profile-llm`,label:e(f.SETTINGS$AGENT_PROFILE_LLM_LABEL),items:F.map(e=>({key:e.name,label:e.model?`${e.name} (${e.model})`:e.name})),selectedKey:D,onSelectionChange:e=>e&&k(String(e))}):(0,K.jsx)(`p`,{"data-testid":`agent-profile-no-llm`,className:`text-sm text-red-400`,children:e(f.SETTINGS$AGENT_PROFILE_NO_LLM)})),(0,K.jsxs)(`div`,{className:`flex justify-start gap-3 pt-4`,children:[(0,K.jsx)(g,{testId:`cancel-agent-profile-btn`,type:`button`,variant:`secondary`,onClick:q,children:e(f.BUTTON$CANCEL)}),(0,K.jsx)(g,{testId:`save-agent-profile-btn`,type:`button`,variant:`primary`,onClick:J,isDisabled:!B||N||!j?.isValid,"aria-busy":N,children:e(N?f.SETTINGS$SAVING:f.BUTTON$SAVE)})]})]})}var ne={hideTitle:!1},re=i(function(){return(0,K.jsx)(te,{})});export{re as default,ne as handle};
|