@openhands/agent-canvas 1.19.0 → 1.20.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-BQ4o4vqy.js → acp-providers-DOKcGeaV.js} +1 -1
- package/build/assets/active-backend-context-BETEdaJl.js +2 -0
- package/build/assets/{agent-context-settings-D9i6ezoJ.js → agent-context-settings-Dir0loAn.js} +1 -1
- package/build/assets/{agent-profiles-service.api-U-9YzDFU.js → agent-profiles-service.api-CiMVQAIT.js} +1 -1
- package/build/assets/{agent-profiles-settings-D-bUV2PX.js → agent-profiles-settings-CT5owzRT.js} +1 -1
- package/build/assets/{agent-server-conversation-service.api-BaVQ6NpE.js → agent-server-conversation-service.api-BtOlitCD.js} +3 -3
- package/build/assets/agent-settings-BnzyTgCb.js +2 -0
- package/build/assets/agent-settings-CeXj3xK-.js +1 -0
- package/build/assets/{alert-banner-BkVt_8Or.js → alert-banner-Ccx1Du6n.js} +1 -1
- package/build/assets/{api-key-entry-screen-fAIld-n7.js → api-key-entry-screen-DXIuzBjY.js} +1 -1
- package/build/assets/{app-settings-DITbrM2u.js → app-settings-DkIJVTKL.js} +1 -1
- package/build/assets/{automation-detail-DawHmaOl.js → automation-detail-CF2SweVs.js} +1 -1
- package/build/assets/{automation-disabled-reason-DtgC8Ppt.js → automation-disabled-reason-QFtMrdOr.js} +1 -1
- package/build/assets/{automation-export-Kv6e0bHx.js → automation-export-CkvehhPF.js} +1 -1
- package/build/assets/{automation-git-sync-Dd98G_Oz.js → automation-git-sync-di4tBAyZ.js} +1 -1
- package/build/assets/automation-setup-route-FERj7WEe.js +3 -0
- package/build/assets/{automation-templates-Xhr-FDAB.js → automation-templates-DlaCRvD-.js} +1 -1
- package/build/assets/{automations-list-BeP1LuzQ.js → automations-list-yK7ETmYP.js} +1 -1
- package/build/assets/{back-nav-button-DWNiN277.js → back-nav-button-oDvIxpQ5.js} +1 -1
- package/build/assets/{backend-form-modal-DeaUJIik.js → backend-form-modal-DzYf_arO.js} +1 -1
- package/build/assets/{backend-synced-settings-badge-Br85iWIY.js → backend-synced-settings-badge-DXDDHWX4.js} +1 -1
- package/build/assets/{badge-Cdnei7Ly.js → badge-CDHZEVeN.js} +1 -1
- package/build/assets/{base-modal-Ds7grR67.js → base-modal-CZq4kB_H.js} +1 -1
- package/build/assets/{brand-button-mQq2Ld1I.js → brand-button-CGUwj6zK.js} +1 -1
- package/build/assets/{browser-Bfum8fkE.js → browser-kY6jN61T.js} +1 -1
- package/build/assets/{browser-tab-CmYT4j_r.js → browser-tab-DFyZXsnB.js} +1 -1
- package/build/assets/{canvas-extension-page-CokKSVRG.js → canvas-extension-page-DsGq1DtT.js} +1 -1
- package/build/assets/{canvas-extensions-BoQEYG-2.js → canvas-extensions-Cb2Z0Hdc.js} +1 -1
- package/build/assets/{canvas-extensions-runtime-Du2M5iEX.js → canvas-extensions-runtime-DS6eT4nK.js} +1 -1
- package/build/assets/{chat-send-button-DM3JgMc2.js → chat-send-button-B6aVaD9V.js} +1 -1
- package/build/assets/{circle-plus-check-toggle-BbYBiUwv.js → circle-plus-check-toggle-ZOXpJ3I2.js} +1 -1
- package/build/assets/{cloud-funnel-analytics-D02kgq1s.js → cloud-funnel-analytics-BH_zxjiO.js} +1 -1
- package/build/assets/{cog-Dy1eWbSZ.js → cog-DVZT1f0s.js} +1 -1
- package/build/assets/{command-menu-mehU3Evb.js → command-menu-ImeHQ6c2.js} +1 -1
- package/build/assets/{commits-tab-DhQW8CXi.js → commits-tab-B5SUF66c.js} +1 -1
- package/build/assets/{condenser-settings-eRk6Fkx6.js → condenser-settings-BlGOXEXM.js} +1 -1
- package/build/assets/{confirmation-modal-BmVt_c0I.js → confirmation-modal-oN1EId79.js} +1 -1
- package/build/assets/{context-menu-list-item-lx2zk9G7.js → context-menu-list-item-DIm5xQg6.js} +1 -1
- package/build/assets/{conversation-BOj0ENI6.js → conversation-9a53tdbO.js} +3 -3
- package/build/assets/conversation-XRsI28ZM.js +1 -0
- package/build/assets/conversation-panel-XRsI28ZM.js +1 -0
- package/build/assets/{conversation-state-store-C6YncQNo.js → conversation-state-store-Br-eE-gg.js} +1 -1
- package/build/assets/{conversation-tab-empty-state-DIhwCC2J.js → conversation-tab-empty-state-BT1GrnKP.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-DVNXLylP.js → copy-to-clipboard-button-CvTHqY13.js} +1 -1
- package/build/assets/{device-verify-LP-x7nra.js → device-verify-DX0xdNjo.js} +1 -1
- package/build/assets/{dropdown-classes-goDldkiu.js → dropdown-classes-DyyMaaXl.js} +1 -1
- package/build/assets/edit-automation-modal-bfD-5NIc.js +1 -0
- package/build/assets/{empty-state-Cd-TFe7i.js → empty-state-B5advKVW.js} +1 -1
- package/build/assets/{entry.client-CJdjIvMZ.js → entry.client-D_2gnSyB.js} +2 -2
- package/build/assets/{enum-filter-dropdown-pocrz9AL.js → enum-filter-dropdown-VAJp5mqh.js} +1 -1
- package/build/assets/{environment-switch-overlay-Dwe78wRl.js → environment-switch-overlay-C7x_yhEs.js} +1 -1
- package/build/assets/{error-state-SuWwztxV.js → error-state-BgYl7YeB.js} +1 -1
- package/build/assets/{extensions-hub-O0esK3Er.js → extensions-hub-DjhOed1I.js} +1 -1
- package/build/assets/{extensions-navigation-CgCVSXje.js → extensions-navigation-Di-J2KUR.js} +1 -1
- package/build/assets/{files-tab-B_6t8ljw.js → files-tab-BNDp3e_x.js} +1 -1
- package/build/assets/{form-control-classes-lQfLxzH4.js → form-control-classes-BVI_szaj.js} +1 -1
- package/build/assets/{get-git-path-Bp5rsUkl.js → get-git-path-DOe6PM_a.js} +1 -1
- package/build/assets/git-repo-dropdown-1fZGYtYm.js +1 -0
- package/build/assets/{git-repo-dropdown-DPQVumZg.js → git-repo-dropdown-DNlinQ7r.js} +1 -1
- package/build/assets/{highlighted-source-view-Bp0sgK-f.js → highlighted-source-view-DPerL6tF.js} +1 -1
- package/build/assets/home-4lyLzYjG.js +1 -0
- package/build/assets/{home-BghzJd-D.js → home-BGaB0EeK.js} +1 -1
- package/build/assets/{home-automation-run-tooltip-BdpCckKO.js → home-automation-run-tooltip-v5n7zXR0.js} +1 -1
- package/build/assets/{home-store-DNQpfIEO.js → home-store-roz1x6D5.js} +1 -1
- package/build/assets/{hooks-service-DkxnQa4N.js → hooks-service-tzRqtAlm.js} +1 -1
- package/build/assets/index-home-6Y_Y7kOo.js +1 -0
- package/build/assets/{install-server-modal-DvxxYKia.js → install-server-modal-DkMCfj0J.js} +1 -1
- package/build/assets/{key-CwTE6XJj.js → key-DpfBWQbk.js} +1 -1
- package/build/assets/{launch-jsRGPRBx.js → launch-TrnYlJe6.js} +1 -1
- package/build/assets/llm-not-configured-banner-BdjItKQR.js +27 -0
- package/build/assets/{llm-settings-dkQ5Oq7W.js → llm-settings-CUgt39uu.js} +1 -1
- package/build/assets/llm-settings-DEfw-fUJ.js +1 -0
- package/build/assets/{llm-subscription-service-BiQaZbvv.js → llm-subscription-service-LGYVzyAc.js} +1 -1
- package/build/assets/{loading-spinner-DK1sAwVg.js → loading-spinner-BJc2J0Dw.js} +1 -1
- package/build/assets/{manage-backends-modal-DqCJohsX.js → manage-backends-modal-CIjk0B2H.js} +1 -1
- package/build/assets/manifest-23d79467.js +1 -0
- package/build/assets/{manifest-subpage-layout-sxuPqfUr.js → manifest-subpage-layout-DGYRoP_8.js} +1 -1
- package/build/assets/{markdown-renderer-BH5pqDuJ.js → markdown-renderer-DRpwRlNm.js} +1 -1
- package/build/assets/{mcp-BtaJDXnP.js → mcp-CoUOIGBF.js} +1 -1
- package/build/assets/{mcp-installed-servers-Br4ZLsjr.js → mcp-installed-servers-BW51n6PC.js} +1 -1
- package/build/assets/{mcp-page-DwbnQpVs.js → mcp-page-hZ4aJjj_.js} +1 -1
- package/build/assets/{messages-DmFJlW6c.js → messages-WUb9Yh-p.js} +1 -1
- package/build/assets/{modal-body-DBweM2EN.js → modal-body-B_95ci1c.js} +1 -1
- package/build/assets/{modal-classes-jvG85nkU.js → modal-classes-BPcBCWVj.js} +1 -1
- package/build/assets/{modal-close-button-BrM5fNnn.js → modal-close-button-Cq3dma5u.js} +1 -1
- package/build/assets/{onboarding-CQ8T6T0U.js → onboarding-Cc4Av7bi.js} +1 -1
- package/build/assets/{onboarding-modal-CnliiaSN.js → onboarding-modal-DCFD4Dsa.js} +1 -1
- package/build/assets/{organization-service.api-DmFUEmu5.js → organization-service.api-zhHpQU0t.js} +1 -1
- package/build/assets/{planner-tab-CXph_C9F.js → planner-tab-yISBVUKu.js} +1 -1
- package/build/assets/{plugins-management-service-CcEpfNKz.js → plugins-management-service-2oP6_tWr.js} +1 -1
- package/build/assets/{profiles-service.api-DdF_4Zhe.js → profiles-service.api-B5thiTI3.js} +1 -1
- package/build/assets/{providers-BWRnl31s.js → providers-Co9PsD0s.js} +1 -1
- package/build/assets/{proxy-DbEf3Nqr.js → proxy-BCCQUna8.js} +1 -1
- package/build/assets/{recommended-automations-launcher-r0oI91HN.js → recommended-automations-launcher-D1Do753p.js} +1 -1
- package/build/assets/{root-j2fFRlWS.js → root-D1y82Lhg.js} +2 -2
- package/build/assets/{root-layout-CfGgm2lo.js → root-layout-cQTYEG2w.js} +2 -2
- package/build/assets/{schema-field-c3Ncgm4x.js → schema-field-DSi0d7a8.js} +1 -1
- package/build/assets/{sdk-section-page-DFEiuiFQ.js → sdk-section-page-DCoI2dtd.js} +1 -1
- package/build/assets/{secret-form-WXXNFqTM.js → secret-form-BDvzojzN.js} +1 -1
- package/build/assets/{secrets-service-DU6wh3wX.js → secrets-service-C3CNNEpY.js} +1 -1
- package/build/assets/{secrets-settings-BEqbPvjy.js → secrets-settings-BKqfYQt5.js} +1 -1
- package/build/assets/{settings-DjaSQwFh.js → settings-C8ZLONyx.js} +1 -1
- package/build/assets/{settings-dropdown-input-BRR2OZwi.js → settings-dropdown-input-Df_HXRk4.js} +1 -1
- package/build/assets/{settings-index-DHv4XFcM.js → settings-index-BWvlGHg3.js} +1 -1
- package/build/assets/{settings-input-Cm4VxUon.js → settings-input-B3i5U9GL.js} +1 -1
- package/build/assets/{settings-list-classes-CaUfKZ33.js → settings-list-classes-DbqcSiVW.js} +1 -1
- package/build/assets/{settings-modal-djXuAnBO.js → settings-modal-DHKJSBPL.js} +1 -1
- package/build/assets/{settings-nav-DFb3hBMr.js → settings-nav-BThjwLWD.js} +1 -1
- package/build/assets/{settings-service.api-Q9lKW1TX.js → settings-service.api-CYBTLGOd.js} +1 -1
- package/build/assets/{settings-switch-seaSJc7t.js → settings-switch-CI93Iozg.js} +1 -1
- package/build/assets/{shared-conversation-x3rxVCon.js → shared-conversation-C7OILS-U.js} +1 -1
- package/build/assets/{sidebar-layout-B6mcvvdV.js → sidebar-layout-Csb6Geq0.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-CEqS8KnA.js → sidebar-mobile-menu-toggle-B2xwXm4s.js} +1 -1
- package/build/assets/{sidebar-nav-link-BTHX11LG.js → sidebar-nav-link-Xv7QEMVS.js} +1 -1
- package/build/assets/{sidebar-onboarding-checklist-storage-BP1kzn6p.js → sidebar-onboarding-checklist-storage-_zxMqHS0.js} +1 -1
- package/build/assets/{skill-card-pill-row-TD39nfP3.js → skill-card-pill-row-CxOFySng.js} +1 -1
- package/build/assets/{skill-enablement-DXeaImBz.js → skill-enablement-BBKya60C.js} +1 -1
- package/build/assets/{skill-filter-CdBbbwjm.js → skill-filter-BvtbD--b.js} +1 -1
- package/build/assets/{skill-icon-badge-vUEp7gsC.js → skill-icon-badge-CVxE42yg.js} +1 -1
- package/build/assets/{skill-scope-BTRBQt0-.js → skill-scope-C0NxJnpT.js} +1 -1
- package/build/assets/{skills-plugins-k1tUNAw4.js → skills-plugins-BGjX4jve.js} +1 -1
- package/build/assets/{skills-settings-CENviPT7.js → skills-settings-d3ZwIjSP.js} +1 -1
- package/build/assets/{styled-tooltip-DVAlWYnL.js → styled-tooltip-CknPQH4Y.js} +1 -1
- package/build/assets/{task-list-tab-BLKF_x9f.js → task-list-tab-CQisRcPh.js} +1 -1
- package/build/assets/{terminal-Ckbnqb23.js → terminal-Bs50gJPC.js} +1 -1
- package/build/assets/{toggle-switch-DeiG9Mf6.js → toggle-switch-D3TBxlsc.js} +1 -1
- package/build/assets/{trash-CXN2R54L.js → trash-D1QMHInX.js} +1 -1
- package/build/assets/{typography-NarNyelM.js → typography-BdAApXGl.js} +1 -1
- package/build/assets/{usage-tab-Drd3O006.js → usage-tab-ClVHAFJy.js} +1 -1
- package/build/assets/{use-acp-credential-form-CJ5wPsQm.js → use-acp-credential-form-GfqcTJl5.js} +1 -1
- package/build/assets/{use-activate-agent-profile-iQZ0U3qV.js → use-activate-agent-profile-DO6SNPkK.js} +1 -1
- package/build/assets/{use-agent-profiles-LCvb5OXT.js → use-agent-profiles-YsBlt3tT.js} +1 -1
- package/build/assets/{use-automation-health-DdgSa8sA.js → use-automation-health-CbQ9n-k7.js} +1 -1
- package/build/assets/{use-automation-permissions-D3kEeieu.js → use-automation-permissions-gFy-2VD0.js} +1 -1
- package/build/assets/{use-automations-CEubcYTD.js → use-automations-7_XBXHQK.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-CB8ybxFK.js → use-can-manage-org-profiles-Dt4YkPO7.js} +1 -1
- package/build/assets/{use-canvas-extensions-BMacwi2v.js → use-canvas-extensions-BhYQrtMK.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-BEKRd6XZ.js → use-cloud-current-user-id-Dqw6qQUg.js} +1 -1
- package/build/assets/{use-config-3WYcJsgC.js → use-config-BJ_FJCjV.js} +1 -1
- package/build/assets/use-create-conversation-D15Px574.js +1 -0
- package/build/assets/use-create-secret-D_qPU88t.js +1 -0
- package/build/assets/{use-free-models-Ci3FkKEm.js → use-free-models-FAk2nngq.js} +1 -1
- package/build/assets/{use-get-secrets-fqS0kxt6.js → use-get-secrets-Pbo9jh2A.js} +1 -1
- package/build/assets/{use-llm-configured-B71ZEVg2.js → use-llm-configured-DF9BYmIe.js} +1 -1
- package/build/assets/{use-llm-profiles-xtCBMbef.js → use-llm-profiles-U4u1gzuk.js} +1 -1
- package/build/assets/use-manifest-capabilities-D81_YdAF.js +1 -0
- package/build/assets/{use-onboarding-completion-CEgjL02y.js → use-onboarding-completion-C4W-m2Jk.js} +1 -1
- package/build/assets/{use-pinned-home-route-pK4IlJ-p.js → use-pinned-home-route-DByWTojw.js} +1 -1
- package/build/assets/{use-plugins-marketplace-B8-ZEB34.js → use-plugins-marketplace-CTRoukH0.js} +1 -1
- package/build/assets/{use-save-agent-profile-D7hJuW_u.js → use-save-agent-profile-xpHBxMZM.js} +1 -1
- package/build/assets/{use-save-settings-CikTu5xV.js → use-save-settings-CmX41wlf.js} +1 -1
- package/build/assets/{use-settings-BWIH5EuN.js → use-settings-D69cw06D.js} +1 -1
- package/build/assets/{use-settings-nav-items-DSKwLDnd.js → use-settings-nav-items-CVz0SnDr.js} +1 -1
- package/build/assets/use-tracking-BAFpgpgq.js +3 -0
- package/build/assets/{use-user-conversation-C_l65DqW.js → use-user-conversation-BBDXUbOc.js} +1 -1
- package/build/assets/utils-CbjwNcR-.js +1 -0
- package/build/assets/{vendor~browser-hbU4u2Ag.js → vendor~browser-BZ-zIfb6.js} +1 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-DvZtOcoT.js +2 -0
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-CxhwKuAd.js → vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-BIjRfQ4u.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-BFRW8wt-.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-BBfdJIV9.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-3eJ4ExtV.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-fgzdgvrL.js} +3579 -165
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C7HiY4Ae.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-BqdU447s.js} +794 -227
- package/build/assets/{verification-settings-PKtoIUUY.js → verification-settings-BXspn27q.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +8 -1
- package/build/locales/ca/openhands.json +8 -1
- package/build/locales/de/openhands.json +8 -1
- package/build/locales/en/openhands.json +8 -1
- package/build/locales/es/openhands.json +8 -1
- package/build/locales/fr/openhands.json +8 -1
- package/build/locales/it/openhands.json +8 -1
- package/build/locales/ja/openhands.json +8 -1
- package/build/locales/ko-KR/openhands.json +8 -1
- package/build/locales/no/openhands.json +8 -1
- package/build/locales/pt/openhands.json +8 -1
- package/build/locales/tr/openhands.json +8 -1
- package/build/locales/uk/openhands.json +8 -1
- package/build/locales/zh-CN/openhands.json +8 -1
- package/build/locales/zh-TW/openhands.json +8 -1
- package/config/defaults.json +3 -3
- package/dist/api/agent-profiles-service/profile-field-support.d.ts +2 -0
- package/dist/components/features/automations/agent-profile-selector.d.ts +7 -0
- 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/profile-scope.d.ts +2 -2
- 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 +30 -19
- package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
- package/dist/hooks/mutation/use-switch-acp-model.cjs +1 -1
- package/dist/hooks/mutation/use-switch-acp-model.cjs.map +1 -1
- package/dist/hooks/mutation/use-switch-acp-model.js +11 -12
- package/dist/hooks/mutation/use-switch-acp-model.js.map +1 -1
- package/dist/hooks/query/query-keys.cjs +1 -1
- package/dist/hooks/query/query-keys.cjs.map +1 -1
- package/dist/hooks/query/query-keys.d.ts +1 -0
- package/dist/hooks/query/query-keys.js +10 -1
- package/dist/hooks/query/query-keys.js.map +1 -1
- package/dist/hooks/query/use-active-acp-profile-detail.cjs +1 -1
- package/dist/hooks/query/use-active-acp-profile-detail.cjs.map +1 -1
- package/dist/hooks/query/use-active-acp-profile-detail.d.ts +0 -9
- package/dist/hooks/query/use-active-acp-profile-detail.js +4 -13
- package/dist/hooks/query/use-active-acp-profile-detail.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 +8 -1
- 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 +119 -0
- package/dist/i18n/translation.js.map +1 -1
- package/dist/locales/ar/openhands.json +8 -1
- package/dist/locales/ca/openhands.json +8 -1
- package/dist/locales/de/openhands.json +8 -1
- package/dist/locales/en/openhands.json +8 -1
- package/dist/locales/es/openhands.json +8 -1
- package/dist/locales/fr/openhands.json +8 -1
- package/dist/locales/it/openhands.json +8 -1
- package/dist/locales/ja/openhands.json +8 -1
- package/dist/locales/ko-KR/openhands.json +8 -1
- package/dist/locales/no/openhands.json +8 -1
- package/dist/locales/pt/openhands.json +8 -1
- package/dist/locales/tr/openhands.json +8 -1
- package/dist/locales/uk/openhands.json +8 -1
- package/dist/locales/zh-CN/openhands.json +8 -1
- package/dist/locales/zh-TW/openhands.json +8 -1
- package/dist/manifests/automation-setup.cjs.map +1 -1
- package/dist/manifests/automation-setup.js.map +1 -1
- package/dist/manifests/manifest-local-validation.cjs.map +1 -1
- package/dist/manifests/manifest-local-validation.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/bundle-index.cjs +3670 -247
- package/dist/node_modules/@openhands/extensions/automations/bundle-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/bundle-index.js +26 -3
- package/dist/node_modules/@openhands/extensions/automations/bundle-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.js +4 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-agents-md-maintainer/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-delivery-watchdog/manifest.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-delivery-watchdog/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-delivery-watchdog/manifest.js +79 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-delivery-watchdog/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-to-pr/manifest.cjs +1 -11
- 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 +25 -11
- 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-issue-triage/manifest.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-triage/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-triage/manifest.js +72 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-issue-triage/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs +1 -10
- 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 +24 -11
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog/gitlab-issue-to-mr/manifest.cjs +12 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/gitlab-issue-to-mr/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/gitlab-issue-to-mr/manifest.js +115 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/gitlab-issue-to-mr/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +20 -14
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/reportportal.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/reportportal.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/reportportal.js +73 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/reportportal.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js +9 -7
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.cjs +794 -227
- package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js +46 -6
- package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js +9 -10
- package/dist/node_modules/@openhands/typescript-client/dist/client/openhands-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.js +2 -2
- package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/clients.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/clients.js +0 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/conversation-manager.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/conversation-manager.js +0 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +3 -3
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +6 -0
- package/dist/types/automation.cjs.map +1 -1
- package/dist/types/automation.d.ts +3 -1
- package/dist/types/automation.js.map +1 -1
- package/package.json +3 -3
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-safe.mjs +14 -1
- package/scripts/docker-build.mjs +3 -0
- package/build/assets/active-backend-context-BsLfwrXB.js +0 -2
- package/build/assets/agent-settings-BZJHtaIK.js +0 -2
- package/build/assets/agent-settings-D4snDd6u.js +0 -1
- package/build/assets/automation-setup-route-Cdc109ZD.js +0 -3
- package/build/assets/conversation-SouWlGvs.js +0 -1
- package/build/assets/conversation-panel-SouWlGvs.js +0 -1
- package/build/assets/edit-automation-modal-BJJR9wSW.js +0 -1
- package/build/assets/git-repo-dropdown-CbD0_LPN.js +0 -1
- package/build/assets/home-CXZ8zawS.js +0 -1
- package/build/assets/index-home-Ca6Q5CtT.js +0 -1
- package/build/assets/llm-not-configured-banner-DMdL1vaX.js +0 -27
- package/build/assets/llm-settings-lNDerSlu.js +0 -1
- package/build/assets/manifest-ff93dc8c.js +0 -1
- package/build/assets/use-create-conversation-Be-eVpFp.js +0 -1
- package/build/assets/use-create-secret-Bk9ZxTjl.js +0 -1
- package/build/assets/use-manifest-capabilities-Bso6A_-A.js +0 -1
- package/build/assets/use-tracking-ChnSFChv.js +0 -3
- package/build/assets/utils-D-gOfhmN.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js +0 -2
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs +0 -2
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs.map +0 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js +0 -18
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation.js","names":[],"sources":["../../src/types/automation.ts"],"sourcesContent":["export interface AutomationTrigger {\n /**\n * Trigger kind. Known values are the schedule aliases \"cron\" / \"schedule\"\n * (time-based) and \"event\" (webhook/event-driven). Kept as `string` rather\n * than a closed union on purpose: the backend emits more than one\n * scheduled-trigger alias and may introduce new kinds, so UI code branches\n * on `type === \"event\"` and treats every other value as a schedule.\n */\n type: string;\n /** Cron expression (schedule triggers only). */\n schedule?: string;\n /** Human-readable schedule description (schedule triggers only). */\n schedule_human?: string;\n /** IANA timezone name (schedule triggers only). */\n timezone?: string;\n /** Event source, e.g. \"github\" (event triggers only). */\n source?: string;\n /** Event key pattern(s) to match, e.g. \"pull_request.opened\" or [\"push\", \"release.*\"]. */\n on?: string | string[];\n /** JMESPath filter expression evaluated against the raw webhook payload. */\n filter?: string;\n}\n\nexport interface Automation {\n id: string;\n name: string;\n trigger: AutomationTrigger;\n enabled: boolean;\n /**\n * Human-readable reason the automation was last disabled (the latest\n * disablement event overwrites this). Mirrors the automation service's\n * `AutomationResponse.disabled_reason`. `null`/absent for enabled automations\n * or an automation service older than the release that started recording it.\n */\n disabled_reason?: string | null;\n /**\n * Structured disablement metadata from the automation service\n * (`AutomationResponse.disabled_detail`): `{reason, source, run_id, ...}`\n * plus rule-specific fields (threshold, consecutive counts, status_detail).\n * Used to tell user-initiated (\"manual\") disables from automatic ones\n * (consecutive failures, permanent config faults).\n */\n disabled_detail?: {\n reason?: string;\n source?: string;\n run_id?: string | null;\n [key: string]: unknown;\n } | null;\n /** UTC timestamp the automation was last disabled. */\n disabled_at?: string | null;\n /**\n * UUID of the user who created this automation. The backend returns it in\n * `AutomationResponse.user_id`; the frontend uses it to implement the\n * \"creator escape hatch\" — a member (view-only) may still edit their own\n * automations even without `manage_automations`.\n */\n user_id?: string;\n repository?: string;\n /** LLM/model profile name used
|
|
1
|
+
{"version":3,"file":"automation.js","names":[],"sources":["../../src/types/automation.ts"],"sourcesContent":["export interface AutomationTrigger {\n /**\n * Trigger kind. Known values are the schedule aliases \"cron\" / \"schedule\"\n * (time-based) and \"event\" (webhook/event-driven). Kept as `string` rather\n * than a closed union on purpose: the backend emits more than one\n * scheduled-trigger alias and may introduce new kinds, so UI code branches\n * on `type === \"event\"` and treats every other value as a schedule.\n */\n type: string;\n /** Cron expression (schedule triggers only). */\n schedule?: string;\n /** Human-readable schedule description (schedule triggers only). */\n schedule_human?: string;\n /** IANA timezone name (schedule triggers only). */\n timezone?: string;\n /** Event source, e.g. \"github\" (event triggers only). */\n source?: string;\n /** Event key pattern(s) to match, e.g. \"pull_request.opened\" or [\"push\", \"release.*\"]. */\n on?: string | string[];\n /** JMESPath filter expression evaluated against the raw webhook payload. */\n filter?: string;\n}\n\nexport interface Automation {\n id: string;\n name: string;\n trigger: AutomationTrigger;\n enabled: boolean;\n /**\n * Human-readable reason the automation was last disabled (the latest\n * disablement event overwrites this). Mirrors the automation service's\n * `AutomationResponse.disabled_reason`. `null`/absent for enabled automations\n * or an automation service older than the release that started recording it.\n */\n disabled_reason?: string | null;\n /**\n * Structured disablement metadata from the automation service\n * (`AutomationResponse.disabled_detail`): `{reason, source, run_id, ...}`\n * plus rule-specific fields (threshold, consecutive counts, status_detail).\n * Used to tell user-initiated (\"manual\") disables from automatic ones\n * (consecutive failures, permanent config faults).\n */\n disabled_detail?: {\n reason?: string;\n source?: string;\n run_id?: string | null;\n [key: string]: unknown;\n } | null;\n /** UTC timestamp the automation was last disabled. */\n disabled_at?: string | null;\n /**\n * UUID of the user who created this automation. The backend returns it in\n * `AutomationResponse.user_id`; the frontend uses it to implement the\n * \"creator escape hatch\" — a member (view-only) may still edit their own\n * automations even without `manage_automations`.\n */\n user_id?: string;\n repository?: string;\n /** Saved agent profile controlling model, tools, and selected secrets. */\n agent_profile_id?: string | null;\n /** LLM/model profile name used when no agent profile is selected. */\n model?: string | null;\n /**\n * Maximum run time in seconds. `null`/omitted uses the server default\n * (600s, 10 min); the deployment reports the maximum it accepts.\n */\n timeout?: number | null;\n\n created_at: string;\n updated_at: string;\n prompt: string | null;\n branch?: string;\n plugins?: string[];\n notification?: string;\n timezone?: string;\n last_triggered_at?: string | null;\n /**\n * Service-owned preset state, returned verbatim. The GUI reads only the\n * `template` provenance block inside it ({id, version, config}, written at\n * setup time), and only through the guarded helper in\n * `#/utils/automation-catalog`.\n */\n preset_metadata?: Record<string, unknown> | null;\n}\n\nexport type AutomationSpec = Omit<\n Automation,\n | \"id\"\n | \"created_at\"\n | \"updated_at\"\n | \"last_triggered_at\"\n | \"preset_metadata\"\n | \"disabled_reason\"\n | \"disabled_detail\"\n | \"disabled_at\"\n>;\n\n/** The envelope constants come from the interface manifest's import/export spec. */\nexport interface AutomationExportFile {\n version: number;\n kind: string;\n spec: AutomationSpec;\n}\n\nexport interface AutomationsResponse {\n automations: Automation[];\n total: number;\n}\n\n/** Mirrors `RunStatus` in the automation service's OpenAPI schema. */\nexport enum AutomationRunStatus {\n PENDING = \"PENDING\",\n RUNNING = \"RUNNING\",\n COMPLETED = \"COMPLETED\",\n FAILED = \"FAILED\",\n CANCELLED = \"CANCELLED\",\n SKIPPED = \"SKIPPED\",\n}\n\nexport type AutomationTaskOutcomeStatus =\n | \"success\"\n | \"partial_success\"\n | \"blocked\"\n | \"failed\"\n | \"unknown\";\n\nexport interface AutomationFinishToolResponse {\n status?: AutomationTaskOutcomeStatus | string;\n outcome_summary?: string;\n [key: string]: unknown;\n}\n\nexport interface AutomationRunMetadata {\n finish_tool_response?: AutomationFinishToolResponse | string | null;\n [key: string]: unknown;\n}\n\nexport interface AutomationRunStatusDetail {\n phase?: string;\n kind?: string;\n detail?: string;\n formatted_detail?: string;\n transient?: boolean;\n source?: string;\n operation?: string;\n code?: string;\n status_code?: number;\n [key: string]: unknown;\n}\n\nexport interface AutomationRun {\n id: string;\n status: AutomationRunStatus;\n conversation_id: string | null;\n /**\n * ID of the bash command that ran the automation inside the agent-server\n * sandbox. Used to fetch run logs from\n * `/api/bash/bash_events/{bash_command_id}` and the matching\n * `BashOutput` events. Null when the run failed before a command was\n * dispatched (e.g. sandbox provisioning errors).\n */\n bash_command_id: string | null;\n error_detail: string | null;\n status_detail?: AutomationRunStatusDetail | null;\n run_metadata?: AutomationRunMetadata | null;\n /**\n * Accumulated LLM cost of the run in USD, reported by the SDK in the\n * completion callback. `null` means unknown — the run predates cost\n * tracking, or ended without a callback (cancelled, watchdog timeout).\n * Absent entirely when the automation service is older than the release\n * that added the field, hence optional.\n */\n cost?: number | null;\n /**\n * Machine-readable code for the run's current or last-known phase (e.g.\n * \"sandbox_provisioning\"). `null` means nothing has reported one; absent\n * entirely against an automation service that predates phase reporting.\n * Code and label are one value, always written together.\n */\n phase_code?: string | null;\n /**\n * Author-supplied description of the phase (at most 200 characters, no\n * control or separator characters, emoji and non-Latin text allowed).\n * Data, not translatable interface copy.\n */\n phase_label?: string | null;\n /** UTC datetime the phase was last written. Same nullability as `phase_code`. */\n phase_updated_at?: string | null;\n started_at: string;\n completed_at: string | null;\n}\n\nexport interface AutomationRunsResponse {\n runs: AutomationRun[];\n total: number;\n /**\n * Lifetime run counts by status, unaffected by pagination. Sparse — a\n * status with no runs has no key, so when the field is present a missing\n * key means zero. Absent entirely when the automation service is older\n * than the release that added it.\n */\n status_counts?: Partial<Record<AutomationRunStatus, number>>;\n}\n\nexport type ActivityLogExportFormat = \"json\" | \"csv\";\n\n/** Client-built Activity Log export row (from list runs + automation detail). */\nexport interface AutomationRunExportRow {\n run_id: string;\n automation_id: string;\n automation_name: string;\n trigger: AutomationTrigger | Record<string, unknown>;\n start_time: string | null;\n end_time: string | null;\n duration_seconds: number | null;\n status: AutomationRunStatus;\n conversation_id: string | null;\n conversation_url: string | null;\n error: string | null;\n /**\n * Accumulated LLM cost in USD, or null when unknown. Unlike\n * `AutomationRun[\"cost\"]` this is always present: the row normalizes a\n * missing field to null so every exported record has the same shape.\n */\n cost: number | null;\n /**\n * The raw `phase_code`, like `status`, falling back to `phase_label` for a\n * phase reported without a code. Null only when the run has no phase.\n */\n phase: string | null;\n}\n"],"mappings":";AA8GA,IAAY,IAAL,yBAAA,GAAA;QACL,EAAA,UAAA,WACA,EAAA,UAAA,WACA,EAAA,YAAA,aACA,EAAA,SAAA,UACA,EAAA,YAAA,aACA,EAAA,UAAA;AACF,EAAA,CAAA,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openhands/agent-canvas",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.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,
|
|
@@ -23,8 +23,8 @@
|
|
|
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.
|
|
27
|
-
"@openhands/typescript-client": "1.
|
|
26
|
+
"@openhands/extensions": "0.22.1",
|
|
27
|
+
"@openhands/typescript-client": "1.49.1",
|
|
28
28
|
"@react-router/node": "7.18.2",
|
|
29
29
|
"@react-router/serve": "7.18.2",
|
|
30
30
|
"@tailwindcss/vite": "4.3.3",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
*
|
|
27
27
|
* Usage:
|
|
28
28
|
* node scripts/check-sdk-version-sync.mjs
|
|
29
|
-
* EXPECTED_SDK_VERSION=1.
|
|
29
|
+
* EXPECTED_SDK_VERSION=1.49.1 node scripts/check-sdk-version-sync.mjs
|
|
30
30
|
* node scripts/check-sdk-version-sync.mjs --check-pypi
|
|
31
31
|
*
|
|
32
32
|
* Environment variables:
|
|
@@ -85,7 +85,7 @@ Triggering from other repos:
|
|
|
85
85
|
-H "Authorization: token \$GITHUB_TOKEN" \\
|
|
86
86
|
-H "Accept: application/vnd.github.v3+json" \\
|
|
87
87
|
https://api.github.com/repos/OpenHands/OpenHands/dispatches \\
|
|
88
|
-
-d '{"event_type": "sdk-version-check", "client_payload": {"version": "1.
|
|
88
|
+
-d '{"event_type": "sdk-version-check", "client_payload": {"version": "1.49.1"}}'
|
|
89
89
|
`);
|
|
90
90
|
process.exit(0);
|
|
91
91
|
}
|
|
@@ -300,9 +300,9 @@ async function fetchPyPIDependencies(packageName, version) {
|
|
|
300
300
|
* Parse PyPI requires_dist array and extract SDK package versions
|
|
301
301
|
*
|
|
302
302
|
* PyPI returns dependencies in PEP 508 format like:
|
|
303
|
-
* "openhands-sdk>=1.
|
|
304
|
-
* "openhands-tools==1.
|
|
305
|
-
* "openhands-workspace (>=1.
|
|
303
|
+
* "openhands-sdk>=1.49.1,<2.0.0"
|
|
304
|
+
* "openhands-tools==1.49.1"
|
|
305
|
+
* "openhands-workspace (>=1.49.1)"
|
|
306
306
|
*/
|
|
307
307
|
function parseSdkVersionsFromRequiresDist(requiresDist) {
|
|
308
308
|
const versions = {};
|
|
@@ -316,7 +316,7 @@ function parseSdkVersionsFromRequiresDist(requiresDist) {
|
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
// Extract the version number - look for patterns like:
|
|
319
|
-
// ">=1.
|
|
319
|
+
// ">=1.49.1", "==1.49.1", "(>=1.49.1)", "~=1.49.1"
|
|
320
320
|
// After the package name and before any comma or closing paren
|
|
321
321
|
const versionPattern = /[><=~!]+\s*([0-9]+(?:\.[0-9]+)*)/;
|
|
322
322
|
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.49.1")
|
|
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
|
|
@@ -789,8 +789,21 @@ export function buildAgentServerTelemetryEnv(env = process.env) {
|
|
|
789
789
|
*/
|
|
790
790
|
export function buildAgentServerEnv(config, options = {}) {
|
|
791
791
|
const { vscodeBasePath = null, env = process.env } = options;
|
|
792
|
+
const conversationRuntimeEnv = Object.fromEntries(
|
|
793
|
+
[
|
|
794
|
+
"OH_CONVERSATION_RUNTIME",
|
|
795
|
+
"OH_CONVERSATION_IMAGE",
|
|
796
|
+
"OH_CONVERSATION_CONTAINER_MEMORY",
|
|
797
|
+
"OH_CONVERSATION_CONTAINER_CPUS",
|
|
798
|
+
"OH_CONVERSATION_CONTAINER_PIDS_LIMIT",
|
|
799
|
+
"OH_CONVERSATION_CONTAINER_STARTUP_TIMEOUT",
|
|
800
|
+
]
|
|
801
|
+
.filter((key) => env[key] !== undefined)
|
|
802
|
+
.map((key) => [key, env[key]]),
|
|
803
|
+
);
|
|
792
804
|
return {
|
|
793
805
|
...buildAgentServerTelemetryEnv(env),
|
|
806
|
+
...conversationRuntimeEnv,
|
|
794
807
|
// Force Python to use UTF-8 for all file I/O and streams.
|
|
795
808
|
//
|
|
796
809
|
// On Windows, Python defaults to the system ANSI codepage (e.g. cp1252).
|
package/scripts/docker-build.mjs
CHANGED
|
@@ -24,6 +24,7 @@ const config = JSON.parse(
|
|
|
24
24
|
);
|
|
25
25
|
|
|
26
26
|
const agentServerImage = `${config.images.agentServer}:${config.versions.agentServer}-python`;
|
|
27
|
+
const agentServerVersion = config.versions.agentServer;
|
|
27
28
|
const automationVersion = config.versions.automation;
|
|
28
29
|
const canvasBasePath = config.paths.canvasBasePath;
|
|
29
30
|
|
|
@@ -50,6 +51,8 @@ const cmd = [
|
|
|
50
51
|
"--build-arg",
|
|
51
52
|
`AGENT_SERVER_IMAGE=${agentServerImage}`,
|
|
52
53
|
"--build-arg",
|
|
54
|
+
`AGENT_SERVER_VERSION=${agentServerVersion}`,
|
|
55
|
+
"--build-arg",
|
|
53
56
|
`AUTOMATION_VERSION=${automationVersion}`,
|
|
54
57
|
"--build-arg",
|
|
55
58
|
`VITE_BASE_PATH=${canvasBasePath}`,
|
|
@@ -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,f as o,m as s,n as c,o as ee,p as te,r as ne,s as re,u as ie}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{K as l,W as ae,t as oe}from"./utils-D-gOfhmN.js";import{A as se,D as ce,O as le,T as ue,b as de,c as fe,d as u,f as d,g as pe,h as me,l as he,m as ge,n as _e,p as ve,s as ye,u as be,w as xe,x as Se}from"./agent-server-client-options-EHB23gyx.js";import{f as Ce,l as we}from"./agent-server-config-C_x8Otd9.js";import{S as Te,f as Ee}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js";var f=e(t(),1),De=`__AGENT_CANVAS_BASE_PATH__`;function Oe(e){let t=e?.trim();return!t||t===`/`?``:(t.startsWith(`/`)?t:`/${t}`).replace(/\/+$/,``)}function ke(){let e=Oe(void 0);if(e)return e;if(typeof window<`u`){let e=window[De];if(typeof e==`string`)return Oe(e)}return``}function Ae(e){let t=ke();return t?`${t}${e.startsWith(`/`)?e:`/${e}`}`:e.startsWith(`/`)?e:`/${e}`}var p=`openhands`,je=[{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,Ne=e=>{if(!Me.has(e)){let t=e.use(ee).use(a).use(i).init({fallbackLng:`en`,debug:!1,supportedLngs:je.map(e=>e.value),nonExplicitSupportedLngs:!1,ns:[p],defaultNS:p,fallbackNS:p,backend:{loadPath:Ae(`/locales/{{lng}}/{{ns}}.json`)},interpolation:{escapeValue:!1}});Me.set(e,t)}return e},Pe=()=>Ne(ie()),Fe=null,m=null,h=()=>(Fe||=Pe(),Fe),Ie=()=>m??h(),Le=e=>(m=e??h(),m),Re=async(e=h())=>(await Me.get(e),e),ze=e=>e?typeof e==`object`&&!Array.isArray(e)?{ns:p,...e}:e:{ns:p},g=new Proxy({},{get:(e,t)=>{let n=Ie();if(t===`t`)return(e,t)=>n.t(e,ze(t));if(t===`exists`)return(e,t)=>n.exists(e,ze(t));let r=Reflect.get(n,t,n);return typeof r==`function`?r.bind(n):r},set:(e,t,n)=>{let r=Ie();return Reflect.set(r,t,n,r)}}),Be=e=>typeof e.response?.data==`object`&&e.response?.data!==null&&`error`in e.response.data&&typeof e.response?.data?.error==`string`,Ve=e=>typeof e.response?.data==`object`&&e.response?.data!==null&&`message`in e.response.data&&typeof e.response?.data?.message==`string`;function He(e){return typeof e==`object`&&!!e&&`isAxiosError`in e&&e.isAxiosError===!0}var _=e=>{let t=null,n=!1;return He(e)?(n=!0,t=Be(e)&&e.response?.data.error?e.response?.data.error:Ve(e)&&e.response?.data.message?e.response?.data.message:e.message):t=e instanceof Error?e.message:typeof e==`string`?e:null,ce(n?t??e:e)??t??``},v=(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)},y=r(),Ue={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`},b={position:`top-right`,style:Ue},We={...Ue,color:`var(--oh-muted)`};function Ge({message:e}){let t=f.useRef(null),[n,r]=f.useState(!1);return f.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,y.jsxs)(`div`,{className:oe(`flex min-w-0 gap-2`,n?`items-start`:`items-center`),children:[(0,y.jsx)(ne,{"aria-hidden":!0,className:`h-4 w-4 shrink-0`,strokeWidth:2,style:{color:ae}}),(0,y.jsx)(`span`,{ref:t,className:`min-w-0 flex-1 text-sm leading-5 [word-break:break-word] [overflow-wrap:anywhere]`,children:e})]})}var Ke={...b,icon:null,style:We},qe=e=>{let t=e||g.t(l.STATUS$ERROR);se(t)?t=g.t(l.ERROR$CORS_OR_NETWORK):le(t)&&(t=g.t(l.ERROR$BACKEND_REQUEST_TIMEOUT));let n=v(t,4e3);c((0,y.jsx)(Ge,{message:t}),{...Ke,duration:n})},Je=e=>{let t=v(e,5e3);c.success((0,y.jsx)(`span`,{className:`[word-break:break-word] [overflow-wrap:anywhere]`,children:e}),{...b,duration:t})},Ye=(e,t,n)=>{let r=v(`${e} ${t}`,5e3);c.success((0,y.jsxs)(`span`,{className:`[word-break:break-word] [overflow-wrap:anywhere]`,children:[e,` `,(0,y.jsx)(`a`,{className:`underline hover:no-underline`,href:n,children:t})]}),{...b,duration:r})},Xe=e=>{let t=v(e,6e3);c((0,y.jsx)(`span`,{className:`[word-break:break-word] [overflow-wrap:anywhere]`,children:e}),{...b,icon:`⚠️`,duration:t})},Ze=(e,t)=>{(e?.response?.status===401||e?.status===401)&&t.invalidateQueries({queryKey:[`user`,`authenticated`]})},Qe=e=>{if(!(e instanceof re)||e.response?.status!==401&&e.status!==401)return!1;let t=fe().backend;if(t.kind!==`cloud`)return!1;let n=e.config?.url;return!n||n.startsWith(t.host.replace(/\/+$/,``))},$e=new Set,et=()=>{let e=new o({queryCache:new te({onSuccess:(e,t)=>{let n=t.meta?.backendId??t.options.meta?.backendId;typeof n==`string`&&xe(n)},onError:(t,n)=>{if(n.queryKey[0]===`user`&&n.queryKey[1]===`authenticated`||Ze(t,e),!(n.meta?.disableToast??n.options.meta?.disableToast)&&!Qe(t)){let e=_(t);$e.has(e||``)||(qe(e||g.t(l.ERROR$GENERIC)),$e.add(e||``),setTimeout(()=>{$e.delete(e||``)},3e3))}}}),mutationCache:new s({onError:(t,n,r,i)=>{Ze(t,e),!(i?.meta?.disableToast??i?.options.meta?.disableToast)&&!Qe(t)&&qe(_(t)||g.t(l.ERROR$GENERIC))}})});return e},tt=null,nt=null,rt=()=>(tt||=et(),tt),x=()=>nt??rt(),it=e=>(nt=e??rt(),nt),at=new Proxy({},{get:(e,t)=>{let n=x(),r=Reflect.get(n,t,n);return typeof r==`function`?r.bind(n):r},set:(e,t,n)=>{let r=x();return Reflect.set(r,t,n,r)}}),ot={_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.48.0`,agentCanvas:`1.19.0`,automation:`1.12.1`},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`}},st=5e3,ct=`unknown`,S=ot.compatibility.minimumAgentServer,lt=`AGENT_SERVER_UNSUPPORTED_VERSION`,ut=`AGENT_SERVER_UNKNOWN_VERSION`,dt=`Invalid API key`,C=null,w=null,ft=e=>Array.isArray(e?.usable_tools)?e.usable_tools:null,T=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}},pt=e=>e instanceof T||typeof e==`object`&&!!e&&`name`in e&&(e.name===`AgentServerUnavailableError`||e.name===`AgentServerUnsupportedVersionError`||e.name===`AgentServerUnknownVersionError`),mt=class extends T{code=lt;actualVersion;requiredVersion=S;constructor(e){let t=`Agent Canvas requires agent-server ${S} or newer; this backend is running ${e}. Please upgrade the agent-server backend.`;super(t),this.name=`AgentServerUnsupportedVersionError`,this.message=t,this.actualVersion=e}},ht=class extends T{code=ut;actualVersion;requiredVersion=S;constructor(e){let t=`Could not determine this backend's agent-server version.${e?` It reported "${e}".`:``} Agent Canvas requires agent-server ${S} 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}},gt=e=>Ce()&&D(e,401);function E(){C=null,w=null}function _t(e){return e?.host&&e.host!==w?null:C}function vt(e){let t=ft(C);return Array.isArray(t)?t.includes(e):!0}function yt(e){return e instanceof Error&&e.name===`HttpError`&&`status`in e&&typeof e.status==`number`}function D(e,t){return yt(e)&&e.status===t}function bt(e){return typeof e==`string`&&e.trim()||null}function xt(e){return bt(e.sdk_version)}function St(e){return bt(e.version)??xt(e)}function Ct(e){let t=St(e);return!t||t.toLowerCase()===ct?null:t}function O(e){let t=Ct(e);return!t||!k(t)?null:t}function wt(e){return!C||e&&be()?.host!==e?null:O(C)}function Tt(e,t){let n=k(e),r=k(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 k(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 Et(e){let t=Ct(e);if(!t)throw E(),new ht(St(e));let n=Tt(t,S);if(n===null)throw E(),new ht(t);if(n<0)throw E(),new mt(t)}async function Dt(e,t){let n=_e({host:e.host,sessionApiKey:e.apiKey||null,timeout:t});try{await new Ee(n).getSettings();let e=await new Te(n).getServerInfo();return Et(e),O(e)}catch(e){throw D(e,401)?Error(dt):e}}async function Ot(){let e=be();if(!e){if(E(),ve(fe().backend))throw new T(`No backend configured`,{noBackendConfigured:!0});return null}let t=_e({host:e.host,sessionApiKey:e.apiKey||null,timeout:st}),n;try{n=await new Te(t).getServerInfo()}catch(e){throw E(),D(e,401)?e:new T(e instanceof Error?e.message:null)}if(Et(n),Ce())try{await new Ee(t).getSettings()}catch(e){if(D(e,401))throw e;console.warn(`[agent-server] getSettings() probe failed (non-401):`,e)}return C=n,w=t.host,n}var kt={WEB_CLIENT_CONFIG:[`web-client-config`],MAIN_APP_COOKIE_AUTH:[`main-app-cookie-auth`]},At={all:[`settings`],byScope:e=>[`settings`,e],personal:()=>[`settings`,`personal`]},jt={all:[`llm-profiles`]},Mt={all:[`agent-profiles`]},Nt={all:[`provider-connections`]},Pt={retry:!1},Ft={all:[`llm-subscription`],openaiStatus:[`llm-subscription`,`openai`,`status`],openaiModels:[`llm-subscription`,`openai`,`models`]},It={all:[`local-workspaces`]},Lt={marketplace:[`plugins-marketplace`],installed:[`plugins-installed`],local:[`plugins-local`]},Rt={all:[`canvas-extensions`],installed:(e,t,n)=>[`canvas-extensions`,`installed`,e,t,n]},zt={capabilities:()=>[`setup-capabilities`]},Bt={latestVersion:[`agent-canvas-latest-version`]},Vt={subConversations:[`v1`,`sub-conversations`]},Ht={create:[`create-local-planning-conversation`]},Ut={staleTime:1e3*60*5,gcTime:1e3*60*15},A={name:`@openhands/agent-canvas`,version:`1.19.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:`>=24`},dependencies:{"@heroui/react":`2.8.10`,"@microlink/react-json-view":`1.31.25`,"@monaco-editor/react":`4.7.0`,"@openhands/extensions":`0.20.0`,"@openhands/typescript-client":`1.48.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.14`,"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`}},j=`agent_canvas`,M=A.version,Wt=`X-OpenHands-Client`,Gt=`X-OpenHands-Client-Version`,Kt=`X-OpenHands-Telemetry-Distinct-Id`,qt={[Wt]:j,[Gt]:M};function Jt(e){return e?.trim()||`unknown`}function N(e){return e?.trim()||null}function P({backendKind:e,agentServerVersion:t,automationSdkVersion:n,backendVersion:r,connectionMethod:i}){let a=Jt(t??r),o=Jt(n),s=Jt(r??t);return{backend_kind:e??null,agent_server_version:a,automation_sdk_version:o,backend_version:s,...i?{connection_method:i}:{}}}function Yt(e=null){return{cloud_user_id:N(e?.userId),cloud_user_email:N(e?.email),cloud_org_id:N(e?.orgId)}}var F=`openhands-telemetry-consent`,I=`openhands-telemetry-consent-pending-cloud-sync`,L=`openhands-telemetry-consent-pending-local-revocation`,Xt=`openhands-telemetry-consent-change`,Zt=`openhands-telemetry-first-use`,Qt=`openhands-telemetry-session`,$t=`agent-canvas`,en=`history_change`,tn=`phc_BgzfxKdgsYMLFTmJqt424ZoyVHvKFfrwttLimzdYTKFK`,nn=`https://z.openhands.dev`,rn=`https://us.posthog.com`,R=null,z=null,an,B={},V=!1;function on(){return typeof window<`u`&&window.__AGENT_CANVAS_DO_NOT_TRACK__===!0}function sn(){return V||on()}var H,U=0,W=-1,cn=Object.freeze({client_source:j,client_version:M,package_name:A.name,package_version:A.version}),ln=P({}),un=Yt();function dn(e){ln=P(e)}function G(e){un=Yt(e)}function fn(e){return e?{...e,properties:{...ln,...un,...e.properties,...cn}}:null}function pn(e){V||X()!==`granted`?e.opt_out_capturing():e.opt_in_capturing()}function mn(e,t=!1){e.reset(t),W=-1,pn(e)}function K(e){if(H===void 0||!$())return;let t=H?.distinctId,n=e.get_property(`$user_id`);if(n!=null&&n!==t&&mn(e),H===null){W=U;return}(e.get_property(`$user_id`)!==H.distinctId||W!==U)&&(e.identify(H.distinctId,H.properties),W=U)}function hn(e,t){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])}function gn(e){if(e===!1){if(V)return;V=!0,R?.opt_out_capturing(),Z();return}let t=V;if(V=!1,!R&&!z){let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));B={...B,...t}}t&&(R&&(pn(R),K(R)),Z())}function _n(){return sn()?null:{apiKey:B.apiKey||tn,apiHost:B.apiHost||nn,uiHost:B.uiHost||rn}}function q(){return typeof window<`u`&&typeof localStorage<`u`}async function vn(){if(!q())return null;if(R)return R;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 J(){return!!(V||on()||typeof process<`u`&&{}.DO_NOT_TRACK===`1`||typeof navigator<`u`&&(navigator.doNotTrack===`1`||typeof window<`u`&&window.doNotTrack===`1`))}function yn(e){R||(an=e)}async function Y(e=!1){if(R)return R;if(z)return z;z=(async()=>{let t=_n();if(!t)return null;let n=await vn();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:$t,consent_persistence_name:`${$t}-consent`,person_profiles:`always`,capture_pageview:en,autocapture:!0,disable_session_recording:!0,bootstrap:an,before_send:fn},$t);return r?(R=r,an=void 0,V?R.opt_out_capturing():X()===`granted`?(R.opt_in_capturing(),K(R)):e||R.opt_out_capturing(),R):null})();try{return await z}finally{R||(z=null)}}function X(){if(!q())return`pending`;if(J())return`denied`;if(we()===`cookie`)return`granted`;try{let e=localStorage.getItem(F);if(e===`granted`||e===`denied`)return e}catch{}return`pending`}function bn(){if(!q())return null;try{let e=localStorage.getItem(I);return e===`granted`||e===`denied`?e:null}catch{return null}}function xn(){if(!q())return null;try{return localStorage.getItem(L)}catch{return null}}function Sn(e){if(!q())return()=>{};let t=t=>{(t.key===F||t.key===I)&&e()};return window.addEventListener(Xt,e),window.addEventListener(`storage`,t),()=>{window.removeEventListener(Xt,e),window.removeEventListener(`storage`,t)}}function Z(){q()&&window.dispatchEvent(new Event(Xt))}function Cn(e){if(q())try{localStorage.setItem(I,e)}catch{}}function wn(e){if(!(!q()||!e))try{localStorage.setItem(L,e)}catch{}}function Tn(e){if(q())try{if(localStorage.getItem(L)!==e)return;localStorage.removeItem(L)}catch{}}function En(e){if(q())try{if(e!==void 0&&localStorage.getItem(I)!==e)return;localStorage.removeItem(I),Z()}catch{}}async function Dn(e,{syncToCloud:t=!0}={}){if(q())try{let t=X()===e;if(localStorage.setItem(F,e),sn()||t)return;let n=R??await Y();if(!n)return;e===`granted`?(n.opt_in_capturing(),K(n)):(wn(n.get_distinct_id?.()??null),n.get_property?.(`$user_id`)==null?n.opt_out_capturing():mn(n))}catch{}finally{t&&Cn(e),Z()}}async function Q(e,t={}){let n=e===null?null:{distinctId:e,properties:t};if(H===n||H!=null&&n!==null&&H.distinctId===n.distinctId&&hn(H.properties,t)||(H=n,U+=1,W=-1,!$()))return;let r=R??await Y();r&&$()&&K(r)}function $(){return X()===`granted`}function On(){if(!q())return!1;try{return localStorage.getItem(Zt)===`true`}catch{return!1}}function kn(){if(q())try{localStorage.setItem(Zt,`true`)}catch{}}async function An(){if(J()||On())return;let e=await Y(!0);!e||J()||((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}),kn(),X()!==`granted`&&e.opt_out_capturing())}function jn(){if(!q())return!1;try{return sessionStorage.getItem(Qt)===`true`}catch{return!1}}function Mn(){if(q())try{sessionStorage.setItem(Qt,`true`)}catch{}}async function Nn(){if(!$()||X()!==`granted`)return null;let e=await Y();return!e||!$()?null:(e.has_opted_out_capturing?.()&&e.opt_in_capturing(),K(e),e)}async function Pn(){if(jn())return;let e=await Nn();e&&(e.capture(`canvas_new_session`,{is_first_use:!On()}),Mn())}async function Fn(){return(await Nn())?.get_distinct_id?.()??null}async function In(){if(!q())return null;if(X()!==`granted`){let e=xn();if(e)return e}return V||J()?null:(await Y())?.get_distinct_id?.()??null}async function Ln(e,t={}){let n=await Nn();n&&n.capture(e,t)}async function Rn(){if(q()){try{wn(R?.get_distinct_id?.()??null),localStorage.removeItem(F),localStorage.removeItem(Zt)}catch{}En();try{sessionStorage.removeItem(Qt)}catch{}ln=P({}),un=Yt(),H=null,U+=1,W=-1;try{R&&mn(R,!0)}catch{try{R?.opt_out_capturing()}catch{}}finally{Z()}}}var zn=f.createContext(null);function Bn(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`backend-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function Vn(e,t){let n=e.backend.kind===`cloud`,r=t.backend.kind===`cloud`;!n&&!r||(G(null),r&&(!n||e.backend.id!==t.backend.id)&&Q(null))}function Hn({children:e}){let t=f.useSyncExternalStore(pe,d,d),n=f.useCallback(()=>{E(),at.invalidateQueries({queryKey:kt.WEB_CLIENT_CONFIG})},[]),r=f.useCallback((e,t)=>{let r=d(),i=he()?.backendId??null,a=he()?.orgId??null,o=t??null;if(e===i&&o===a)return;let s=u(),c=s.find(t=>t.id===e),ee={backend:c??s[0]??ye,orgId:c?o:null};Vn(r.active,ee),ge({backendId:e,orgId:o}),n()},[n]),i=f.useCallback(e=>{let t=d().active,r={...e,id:Bn()},i=[...u(),r];return Vn(t,{backend:r,orgId:null}),me(i),ge({backendId:r.id}),n(),r},[n]),a=f.useCallback((e,t)=>{let r=u().find(t=>t.id===e),i=d().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;me(u().map(n=>n.id===e?{...n,...t,connectionRevision:a||o?(n.connectionRevision??0)+1:n.connectionRevision}:n)),(a||o)&&(ue(e),i===e&&(r?.kind===`cloud`&&(G(null),Q(null)),n()))},[n]),o=f.useCallback(e=>{let t=u().find(t=>t.id===e),r=t?.kind===`cloud`&&d().active.backend.id===t.id;me(u().filter(t=>t.id!==e)),r&&(G(null),Q(null)),Se(e),n()},[n]),s=f.useMemo(()=>({backends:t.backends,active:t.active,setActive:r,addBackend:i,updateBackend:a,removeBackend:o}),[t,r,i,a,o]);return(0,y.jsx)(zn.Provider,{value:s,children:e})}function Un(){let e=f.useContext(zn);if(!e)throw Error(`useActiveBackendContext must be used inside <ActiveBackendProvider>`);return e}function Wn(){let e=f.useContext(zn);return e?e.active:{backend:de()??ye,orgId:null}}export{D as $,Bt as A,kt as B,P as C,Kt as D,M as E,Ft as F,Tt as G,zt as H,Ht as I,O as J,_t as K,It as L,Ut as M,Vt as N,Mt as O,jt as P,yt as Q,Lt as R,Pn as S,j as T,dt as U,At as V,E as W,vt as X,gt as Y,pt as Z,Dn as _,Le as _t,Tn as a,it as at,Ln as b,gn as c,Je as ct,X as d,_ as dt,Ot as et,Fn as f,je as ft,G as g,g as gt,dn as h,Ie as ht,En as i,at as it,Rt as j,Pt as k,bn as l,Ye as lt,Y as m,h as mt,Wn as n,rt as nt,Rn as o,b as ot,In as p,p as pt,wt as q,Un as r,x as rt,yn as s,qe as st,Hn as t,Dt as tt,xn as u,Xe as ut,Q as v,Re as vt,qt as w,An as x,Sn as y,Ae as yt,Nt as z};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,t}from"./rolldown-runtime-Cyuzqnbw.js";import{St as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{U as i,f as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{t as o}from"./useTranslation-CCgUjPJF.js";import{G as s,ct as c,dt as l,q as u,st as d}from"./active-backend-context-BsLfwrXB.js";import{K as f,t as p}from"./utils-D-gOfhmN.js";import{a as m,i as h,n as g,r as _,t as v}from"./use-acp-credential-form-CJ5wPsQm.js";import{l as ee}from"./settings-service.api-Q9lKW1TX.js";import{n as te}from"./use-settings-BWIH5EuN.js";import{t as ne}from"./use-save-settings-CikTu5xV.js";import{h as re}from"./form-control-classes-lQfLxzH4.js";import{t as ie}from"./brand-button-mQq2Ld1I.js";import{t as y}from"./settings-dropdown-input-BRR2OZwi.js";import{t as ae}from"./settings-input-Cm4VxUon.js";import{c as b,i as oe,n as x,o as S,s as se,t as ce}from"./acp-providers-BQ4o4vqy.js";import{_ as le,g as ue,h as de,n as fe,o as pe,v as me}from"./schema-field-c3Ncgm4x.js";import{r as C}from"./typography-NarNyelM.js";import{t as he}from"./settings-switch-seaSJc7t.js";import{t as ge}from"./mcp-installed-servers-Br4ZLsjr.js";var w=e(n(),1),T=r();function _e({form:e,providerKey:t}){let{t:n}=o(`openhands`),{fields:r,values:i,setValue:a,secretExists:s,conflicts:c,credentialsConfigured:l}=e,{status:u,isChecking:d}=g(t),p=b(t)??t;return r.length===0?null:(0,T.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,T.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,T.jsx)(C.Text,{className:`text-sm font-medium text-white`,children:n(f.SETTINGS$ACP_CREDENTIALS_TITLE)}),(0,T.jsx)(C.Text,{className:`text-xs text-[#717888]`,children:n(f.SETTINGS$ACP_CREDENTIALS_DESCRIPTION)})]}),(0,T.jsx)(h,{status:u,isChecking:d,credentialsConfigured:l,providerName:p,testIdPrefix:`settings-acp-auth`}),(0,T.jsx)(`div`,{className:`flex flex-col gap-5`,children:r.map(e=>(0,T.jsx)(_,{field:e,value:i[e.name]??``,onChange:t=>a(e.name,t),alreadySet:s(e.name),testId:`settings-acp-secret-${e.name}`,showOptionalTag:!0},e.name))}),(0,T.jsx)(m,{conflicts:c})]})}function ve({testId:e,items:t,selected:n,isDisabled:r=!1,onToggle:i}){return(0,T.jsx)(`ul`,{"data-testid":`${e}-list`,className:`flex flex-col gap-2.5`,children:t.map(({name:t,description:a})=>(0,T.jsxs)(`li`,{className:`flex flex-col gap-0.5`,children:[(0,T.jsx)(he,{testId:`${e}-${t}`,name:`${e}-${t}`,isToggled:n.includes(t),isDisabled:r,onToggle:e=>i(t,e),children:(0,T.jsx)(`span`,{className:`font-mono`,children:t})}),a?(0,T.jsx)(C.Text,{className:`text-xs text-tertiary-alt pl-11`,children:a}):null]},t))})}var E=t(((e,t)=>{var n=[`||`,`&&`,`;;`,`|&`,`<(`,`<<<`,`>>`,`>&`,`<&`,`&`,`;`,`(`,`)`,`|`,`<`,`>`],r=/[\n\r\u2028\u2029]/,i=/[\s#!"$&'():;<=>@\\^`|]/g;t.exports=function(e){return e.map(function(e){if(e===``)return`''`;if(e&&typeof e==`object`){if(`op`in e&&e.op===`glob`){if(typeof e.pattern!=`string`)throw TypeError("glob token requires a string `pattern`");if(r.test(e.pattern))throw TypeError("glob `pattern` must not contain line terminators");return e.pattern.replace(i,`\\$&`)}if(`op`in e&&typeof e.op==`string`){if(n.indexOf(e.op)<0)throw TypeError("invalid `op` value: "+JSON.stringify(e.op));return e.op.replace(/[\s\S]/g,`\\$&`)}if(`comment`in e&&typeof e.comment==`string`){if(r.test(e.comment))throw TypeError("`comment` must not contain line terminators");return`#`+e.comment}throw TypeError(`unrecognized object token shape`)}return/["\s\\]/.test(e)&&!/'/.test(e)?`'`+e.replace(/(['])/g,`\\$1`)+`'`:/["'\s]/.test(e)?`"`+e.replace(/(["\\$`!])/g,`\\$1`)+`"`:String(e).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g,`$1\\$2`)}).join(` `)}})),ye=t(((e,t)=>{for(var n=`(?:`+[`\\|\\|`,`\\&\\&`,`;;`,`\\|\\&`,`\\<\\(`,`\\<\\<\\<`,`>>`,`>\\&`,`<\\&`,`[&;()|<>]`].join(`|`)+`)`,r=RegExp(`^`+n+`$`),i=`|&;()<> \\t`,a=`"((\\\\"|[^"])*?)"`,o=`'((\\\\'|[^'])*?)'`,s=/^#$/,c=`'`,l=`"`,u=`$`,d=``,f=4294967296,p=0;p<4;p++)d+=(f*Math.random()).toString(16);var m=RegExp(`^`+d);function h(e,t){for(var n=t.lastIndex,r=[],i;i=t.exec(e);)r[r.length]=i,t.lastIndex===i.index&&(t.lastIndex+=1);return t.lastIndex=n,r}function g(e,t,n){var r=typeof e==`function`?e(n):e[n];return r===void 0&&n!=``?r=``:r===void 0&&(r=`$`),typeof r==`object`?t+d+JSON.stringify(r)+d:t+r}function _(e,t,d){d||={};var f=d.escape||`\\`,p=`(\\`+f+`['"`+i+`]|[^\\s'"`+i+`])+`,m=h(e,new RegExp([`(`+n+`)`,`(`+p+`|`+a+`|`+o+`)+`].join(`|`),`g`));if(m.length===0)return[];t||={};var _=!1;return m.map(function(n){var i=n[0];if(!i||_)return;if(r.test(i))return{op:i};var a=!1,o=!1,d=``,p=!1,m;function h(){m+=1;var e,n,r=i.charAt(m);if(r===`{`){if(m+=1,i.charAt(m)===`}`)throw Error(`Bad substitution: `+i.slice(m-2,m+1));if(e=i.indexOf(`}`,m),e<0)throw Error(`Bad substitution: `+i.slice(m));n=i.slice(m,e),m=e}else if(/[*@#?$!_-]/.test(r))n=r,m+=1;else{var a=i.slice(m);e=a.match(/[^\w\d_]/),e?(n=a.slice(0,e.index),m+=e.index-1):(n=a,m=i.length)}return g(t,``,n)}for(m=0;m<i.length;m++){var v=i.charAt(m);if(p||=!a&&(v===`*`||v===`?`),o)d+=v,o=!1;else if(a)v===a?a=!1:a==c?d+=v:v===f?(m+=1,v=i.charAt(m),v===l||v===f||v===u?d+=v:d+=f+v):v===u?d+=h():d+=v;else if(v===l||v===c)a=v;else if(r.test(v))return{op:i};else if(s.test(v)){_=!0;var ee={comment:e.slice(n.index+m+1)};return d.length?[d,ee]:[ee]}else v===f?o=!0:v===u?d+=h():d+=v}return p?{op:`glob`,pattern:d}:d}).reduce(function(e,t){return t===void 0||[].concat(t).forEach(function(t){e[e.length]=t}),e},[])}t.exports=function(e,t,n){var r=_(e,t,n);return typeof t==`function`?r.reduce(function(e,t){if(typeof t==`object`)return e[e.length]=t,e;var n=t.split(RegExp(`(`+d+`.*?`+d+`)`,`g`));return n.length===1?(e[e.length]=n[0],e):(n.filter(Boolean).forEach(function(t){e[e.length]=m.test(t)?JSON.parse(t.split(d)[1]):t}),e)},[]):r}})),{quote:D}=e(t((e=>{e.quote=E(),e.parse=ye()}))(),1);function O(e){let t=[],n=0,r=``,i=!1;for(;n<e.length;){let a=e[n];if(a===` `||a===` `||a===`
|
|
2
|
-
`||a===`\r`){i&&=(t.push(r),r=``,!1),n+=1;continue}if(a===`'`){for(i=!0,n+=1;n<e.length&&e[n]!==`'`;)r+=e[n],n+=1;n<e.length&&(n+=1);continue}if(a===`"`){for(i=!0,n+=1;n<e.length&&e[n]!==`"`;){if(e[n]===`\\`&&n+1<e.length){let t=e[n+1];if(t===`"`||t===`\\`){r+=t,n+=2;continue}}r+=e[n],n+=1}n<e.length&&(n+=1);continue}if(a===`\\`&&n+1<e.length){i=!0,r+=e[n+1],n+=2;continue}i=!0,r+=a,n+=1}return i&&t.push(r),t}var k=/[\s"'\\$`&|;<>(){}*?#!~[\]]/;function A(e){return e.map(e=>k.test(e)||e===``?D([e]):e).join(` `)}function be(e){return Array.isArray(e)?{mode:`custom`,selected:e.filter(e=>typeof e==`string`)}:{mode:`standard`,selected:[]}}function xe(e,t){let n=e=>[...new Set(e)].sort().join(`\0`);return n(e)===n(t)}var j=`1.31.0`;function Se(){let e=u();if(!e)return!0;let t=s(e,j);return t===null?!0:t>=0}var Ce={hideTitle:!0},we=`enable_sub_agents`,Te=`enable_switch_llm_tool`,Ee=`tool_concurrency_limit`,De=`mcp_server_refs`,Oe=`npx -y <package-name>`,M=`__custom_model__`,ke={agentType:`openhands`,commandText:``,acpModel:``,isCustomAcpModel:!1};function Ae(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function je(e,t){let n=O(e).join(` `);for(let e of t)if(n===e.default_command.join(` `))return e.key;return ce}function Me(e){return e?.find(e=>e.key===we)}function Ne(e,t){return typeof e==`boolean`?e:t?.default===!0}function Pe(e,t){return typeof e==`boolean`?e:t?.default===!0}function Fe(e,t){return e?.available_models?.some(({id:e})=>e===t.trim())??!1}function Ie(e){let{isAcp:t,selectedPreset:n,isDefaultProviderCommand:r,commandTokens:i,acpModel:a,subAgentsEnabled:o,switchLlmToolField:s,switchLlmToolEnabled:c,switchLlmToolSupportedOnProfile:l,toolConcurrencyField:u,toolConcurrency:d,mcpMode:f,selectedMcpServers:p}=e,m={mcp_server_refs:f===`custom`?p:null};if(t){let e=r&&n!==`custom`;return{agent_kind:`acp`,...m,acp_server:n,acp_model:a.trim()||null,acp_command:e?null:A(i)||null,acp_args:null}}let h={agent_kind:`openhands`,...m,enable_sub_agents:o};if(s&&l&&(h.enable_switch_llm_tool=c),u){let e=pe(u,d),t=typeof u.default==`number`?u.default:1;h.tool_concurrency_limit=e==null?t:Number(e)}return h}function Le({embedded:e=!1,agentSettingsOverride:t=null,onSaveControlChange:n}={}){let{t:r}=o(`openhands`),{data:i,isLoading:a}=te(),s=t??i?.agent_settings??null,{mutate:u,isPending:m}=ne(),{data:h}=me(i?.agent_settings_schema),g=w.useMemo(()=>h?.sections.flatMap(e=>e.fields),[h]),_=Me(g),b=w.useMemo(()=>Ne(s?.[we],_),[_,s]),[E,ye]=(0,w.useState)(b),D=g?.find(e=>e.key===Te),k=w.useMemo(()=>Pe(s?.[Te],D),[D,s]),[j,Ce]=(0,w.useState)(k),Le=Se(),Re=!!D&&(!e||Le),N=g?.find(e=>e.key===Ee),ze=w.useMemo(()=>{if(!N)return``;let e=s?.[Ee];return de(N,e)},[N,s]),[Be,Ve]=(0,w.useState)(ze),He=e,P=w.useMemo(()=>be(s?.[De]),[s]),[F,Ue]=(0,w.useState)(P.mode),[We,Ge]=(0,w.useState)(P.selected),I=w.useMemo(()=>ge(i?.mcp_config??ee(i?.agent_settings?.mcp_config)).filter(e=>typeof e.name==`string`).map(e=>({name:e.name,description:e.type})),[i]),L=w.useMemo(()=>{let e=I,t=new Set(e.map(({name:e})=>e));return[...e,...P.selected.filter(e=>!t.has(e)).map(e=>({name:e,description:null}))]},[I,P]),R=w.useMemo(()=>L.map(({name:e})=>e).filter(e=>We.includes(e)),[L,We]),Ke=w.useMemo(()=>F===`custom`?R.filter(e=>!I.some(t=>t.name===e)):[],[F,R,I]),[z,qe]=(0,w.useState)(`openhands`),[B,V]=(0,w.useState)(``),[H,U]=(0,w.useState)(``),[Je,W]=(0,w.useState)(!1),Ye=z===`acp`?je(B,x):null,G=v(Ye&&Ye!==`custom`?Ye:null),Xe=(0,w.useRef)(null),Ze=(0,w.useRef)(null),K=(0,w.useRef)(``),[q,J]=(0,w.useState)(ke);(0,w.useEffect)(()=>{let e=t??i?.agent_settings??null;if(!e&&!i)return;let n=t??i;if(Xe.current!==n)if(Xe.current=n,e?.agent_kind===`acp`){qe(`acp`);let t=e?.acp_server,n=typeof t==`string`?t:void 0,r=se(n),i=Ae(e?.acp_command),a=[...i.length>0?i:r?.default_command??[],...Ae(e?.acp_args)],o=a.length>0?A(a):``;V(o),Ze.current=n??null,K.current=o;let s=e?.acp_model,c=typeof s==`string`?s.trim():``,l=c||S(n)||``,u=!!c&&(!r||!Fe(r,c));U(l),W(u),J({agentType:`acp`,commandText:o,acpModel:l,isCustomAcpModel:u})}else qe(`openhands`),V(``),U(``),Ze.current=null,K.current=``,W(!1),J(ke)},[i,t]),(0,w.useEffect)(()=>{ye(b)},[b]),(0,w.useEffect)(()=>{Ce(k)},[k]),(0,w.useEffect)(()=>{Ve(ze)},[ze]),(0,w.useEffect)(()=>{Ue(P.mode),Ge(P.selected)},[P]);let Qe=(0,w.useRef)(()=>({agent_kind:`openhands`,mcp_server_refs:null,enable_sub_agents:!1})),$e=(0,w.useCallback)(()=>Qe.current(),[]),et=(0,w.useRef)(G);et.current=G;let tt=(0,w.useCallback)(e=>et.current.save(e),[]),nt=(0,w.useCallback)(()=>et.current.reset(),[]),rt=z===`acp`&&O(B).length===0,it=F!==P.mode||!xe(R,P.selected),at=z!==q.agentType||it||(z===`acp`?B!==q.commandText||H!==q.acpModel||Je!==q.isCustomAcpModel:E!==b||j!==k||Be!==ze),ot=G.isDirty,st=at||ot;if((0,w.useEffect)(()=>{!e||!n||n({agentType:z,isValid:!rt,isDirty:st,buildAgentProfileFields:$e,credentials:{isDirty:ot,save:tt,reset:nt}})},[e,n,z,rt,st,ot,$e,tt,nt]),a)return null;let Y=z===`acp`,X=O(B),ct=Y&&X.length===0,Z=je(B,x),Q=se(Z),lt=Q?.available_models??[],ut=lt.length>0,dt=Fe(Q,H),ft=Je||!dt?M:H,pt=!!Q&&X.join(` `)===Q.default_command.join(` `),mt=A(x[0]?.default_command??[])||Oe;Qe.current=()=>Ie({isAcp:Y,selectedPreset:Z,isDefaultProviderCommand:pt,commandTokens:X,acpModel:H,subAgentsEnabled:E,switchLlmToolField:D,switchLlmToolEnabled:j,switchLlmToolSupportedOnProfile:Le,toolConcurrencyField:N,toolConcurrency:Be,mcpMode:F,selectedMcpServers:R});let $=m||G.isSaving,ht=async()=>{if(G.isDirty){if(!await G.save({silent:at}))return;G.reset()}if(at)if(Y){let e=!!(Q&&pt),t=Ze.current,n=B===K.current,i=!!t&&t!==`custom`&&!x.some(e=>e.key===t),a=Y&&n&&i,o=oe(a?t:Q&&pt?Q.key:ce,{command:e?[]:X,model:H.trim()||void 0,allowUnknownServer:a});if(!o)return;u({agent_settings_diff:o},{onError:e=>{d(l(e)||r(f.ERROR$GENERIC))},onSuccess:()=>{c(r(f.SETTINGS$SAVED)),J({agentType:z,commandText:B,acpModel:H,isCustomAcpModel:Je}),K.current=B}})}else{let e={agent_kind:`openhands`,enable_sub_agents:E};if(D&&(e[Te]=j),N){let t;try{t=pe(N,Be)}catch(e){d(e instanceof Error?e.message:r(f.ERROR$GENERIC));return}t!=null&&(e[Ee]=t)}u({agent_settings_diff:e},{onError:e=>{d(l(e)||r(f.ERROR$GENERIC))},onSuccess:()=>{c(r(f.SETTINGS$SAVED)),J({agentType:`openhands`,commandText:``,acpModel:``,isCustomAcpModel:!1})}})}},gt=_?le(r,_.key,_.label):r(f.SCHEMA$ENABLE_SUB_AGENTS$LABEL),_t=_?ue(r,_.key,_.description):r(f.SCHEMA$ENABLE_SUB_AGENTS$DESCRIPTION),vt=D?le(r,D.key,D.label):r(f.SCHEMA$ENABLE_SWITCH_LLM_TOOL$LABEL),yt=D?ue(r,D.key,D.description):r(f.SCHEMA$ENABLE_SWITCH_LLM_TOOL$DESCRIPTION);return(0,T.jsxs)(`div`,{"data-testid":`agent-settings-screen`,className:`flex flex-col gap-6 pb-8 max-w-2xl`,children:[!e&&(0,T.jsxs)(`div`,{children:[(0,T.jsx)(C.H2,{className:`mb-2`,children:r(f.SETTINGS$NAV_AGENT)}),(0,T.jsx)(C.Paragraph,{className:`text-sm text-[#A3A3A3]`,children:r(f.SETTINGS$AGENT_PAGE_DESCRIPTION)})]}),(0,T.jsx)(y,{testId:`agent-type-selector`,name:`agent-type`,label:r(f.SETTINGS$NAV_AGENT),items:[{key:`openhands`,label:r(f.SETTINGS$AGENT_TYPE_OPENHANDS)},{key:`acp`,label:r(f.SETTINGS$AGENT_TYPE_ACP)}],selectedKey:z,onSelectionChange:e=>{if(!e)return;let t=e;if(qe(t),t===`acp`&&!B){let e=x[0];e&&(V(A(e.default_command)),U(S(e.key)??``),W(!1))}else t===`openhands`&&W(!1)}}),!Y&&(0,T.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,T.jsx)(he,{testId:`agent-settings-enable-sub-agents`,isToggled:E,onToggle:e=>{ye(e)},children:gt}),_t?(0,T.jsx)(C.Paragraph,{className:p(`pl-12`,`text-tertiary-alt text-xs leading-5`),children:_t}):null]}),!Y&&Re?(0,T.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,T.jsx)(he,{testId:`agent-settings-enable-switch-llm-tool`,isToggled:j,onToggle:e=>{Ce(e)},children:vt}),yt?(0,T.jsx)(C.Paragraph,{className:p(re,`text-tertiary-alt text-xs leading-5`),children:yt}):null]}):null,!Y&&N?(0,T.jsx)(fe,{field:N,value:Be,isDisabled:$,onChange:Ve}):null,He?(0,T.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,T.jsx)(C.Text,{className:`text-sm`,children:r(f.SETTINGS$AGENT_PROFILE_MCP)}),(0,T.jsx)(y,{testId:`agent-settings-mcp-mode`,name:`agent-mcp-mode`,label:``,items:[{key:`standard`,label:r(f.SETTINGS$AGENT_PROFILE_MCP_ALL)},{key:`custom`,label:r(f.SETTINGS$AGENT_PROFILE_MCP_CHOOSE)}],selectedKey:F,isDisabled:$,onSelectionChange:e=>{if(!e)return;let t=e;Ue(t),t===`custom`&&We.length===0&&Ge(I.map(({name:e})=>e))}}),L.length>0?(0,T.jsx)(ve,{testId:`agent-settings-mcp`,items:L,selected:F===`custom`?R:L.map(({name:e})=>e),isDisabled:$||F===`standard`,onToggle:(e,t)=>Ge(n=>t?[...n,e]:n.filter(t=>t!==e))}):(0,T.jsx)(C.Text,{className:`text-xs text-tertiary-alt`,children:r(f.SETTINGS$AGENT_PROFILE_MCP_NONE)}),Ke.length>0?(0,T.jsx)(C.Text,{testId:`agent-settings-mcp-dangling`,className:`text-xs text-danger`,children:r(f.SETTINGS$AGENT_PROFILE_MCP_DANGLING,{names:Ke.join(`, `)})}):null,(0,T.jsx)(C.Text,{className:`text-xs text-tertiary-alt`,children:r(F===`custom`?f.SETTINGS$AGENT_PROFILE_MCP_CHOOSE_HINT:f.SETTINGS$AGENT_PROFILE_MCP_ALL_HINT)})]}):null,Y&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(y,{testId:`agent-preset-selector`,name:`agent-preset`,label:r(f.SETTINGS$AGENT_PRESET),items:[...x.map(e=>({key:e.key,label:e.display_name})),{key:`custom`,label:r(f.SETTINGS$AGENT_PRESET_CUSTOM)}],selectedKey:Z,onSelectionChange:e=>{if(!e)return;let t=String(e),n=se(t);n?(V(A(n.default_command)),U(S(t)??``),W(!1)):t===`custom`&&(V(``),U(``),W(!0))}}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,T.jsx)(C.Text,{className:`text-sm`,children:r(f.SETTINGS$AGENT_COMMAND)}),(0,T.jsx)(`textarea`,{"data-testid":`agent-command-input`,className:`bg-tertiary border border-[#717888] rounded-sm p-2 text-sm font-mono text-white placeholder:text-[#717888] min-h-[60px] resize-y focus:outline-none focus:border-white`,value:B,placeholder:mt,onChange:e=>{let t=e.target.value,n=je(B,x),r=je(t,x);r!==n&&(U(S(r)??``),W(!1)),V(t)}}),(0,T.jsx)(C.Text,{className:`text-xs text-[#717888]`,children:r(f.SETTINGS$AGENT_COMMAND_HINT)})]}),(0,T.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[ut&&(0,T.jsx)(y,{testId:`agent-model-selector`,name:`agent-model`,label:r(f.SETTINGS$AGENT_MODEL),items:[...lt.map(e=>({key:e.id,label:e.label})),{key:M,label:r(f.SETTINGS$AGENT_PRESET_CUSTOM)}],selectedKey:ft,onSelectionChange:e=>{if(!e)return;let t=String(e);t===M?(W(!0),U(``)):(W(!1),U(t))}}),ft===M&&(0,T.jsx)(ae,{testId:`agent-model-input`,label:r(ut?f.SETTINGS$AGENT_CUSTOM_MODEL:f.SETTINGS$AGENT_MODEL),type:`text`,className:`w-full`,value:H,showOptionalTag:!0,onChange:e=>{U(e)}}),(0,T.jsx)(C.Text,{className:`text-xs text-[#717888]`,children:r(f.SETTINGS$AGENT_MODEL_HINT)})]})]}),Y&&Z!==`custom`&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`hr`,{className:`border-[#3D4046]`}),(0,T.jsx)(_e,{form:G,providerKey:Z})]}),!e&&(0,T.jsx)(`div`,{children:(0,T.jsx)(ie,{testId:`agent-save-button`,type:`button`,variant:`primary`,isDisabled:$||!st||ct,onClick:ht,children:r($?f.SETTINGS$SAVING:f.SETTINGS$SAVE_CHANGES)})})]})}var Re=i(function(){return(0,T.jsx)(a,{to:`/settings/agents`,replace:!0})});export{O as i,Re as n,Ce as r,Le as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t}from"./agent-settings-BZJHtaIK.js";export{e as default,t as handle};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{F as r,P as i,R as a,U as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{l as s}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{t as c}from"./useTranslation-CCgUjPJF.js";import{$ as l,n as u}from"./active-backend-context-BsLfwrXB.js";import{K as d,t as f}from"./utils-D-gOfhmN.js";import{r as p}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-3eJ4ExtV.js";import{t as m}from"./loading-spinner-DK1sAwVg.js";import{C as h,I as g,L as _,P as v,R as ee,S as y,_ as te,a as b,b as ne,c as x,d as re,f as S,g as ie,h as ae,i as oe,l as se,m as ce,n as C,o as le,p as w,r as ue,s as T,t as de,u as fe,v as pe,y as me}from"./use-tracking-ChnSFChv.js";import{l as E}from"./settings-service.api-Q9lKW1TX.js";import{n as he}from"./use-settings-BWIH5EuN.js";import{t as ge}from"./modal-backdrop-BSzNhM4r.js";import{n as _e}from"./modal-classes-jvG85nkU.js";import{f as ve,l as ye}from"./form-control-classes-lQfLxzH4.js";import{t as D}from"./brand-button-mQq2Ld1I.js";import{t as O}from"./navigation-link-Bxo3-4vo.js";import{t as k}from"./settings-dropdown-input-BRR2OZwi.js";import{o as be,s as A,t as j}from"./conversation-store-DC-JlJuq.js";import{t as xe}from"./modal-close-button-BrM5fNnn.js";import{t as M}from"./settings-input-Cm4VxUon.js";import{t as Se}from"./use-llm-profiles-xtCBMbef.js";import{n as N}from"./use-create-conversation-Be-eVpFp.js";import{t as Ce}from"./api-error-message-BXo0lCI5.js";import{t as P}from"./mcp-installed-servers-Br4ZLsjr.js";import{t as F}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~mcp~automations-list~aut~ibfbmr9f-CxhwKuAd.js";import{n as I,o as L,s as R}from"./mcp-marketplace-utils-BwEnDYqm.js";import{i as we,n as Te,r as Ee}from"./use-manifest-capabilities-Bso6A_-A.js";import{t as z}from"./git-repo-dropdown-DPQVumZg.js";import"./git-repo-dropdown-CbD0_LPN.js";var B=e(t(),1);function De(e){let t=e.requires.integrations,{data:n,isLoading:r}=he(),i=(0,B.useMemo)(()=>P(E(n?.agent_settings?.mcp_config)),[n?.agent_settings?.mcp_config]),a=(0,B.useMemo)(()=>{let e=R(F);return Object.entries(t).map(([t,n])=>({id:t,requirement:n,entry:L(t,e)??null})).filter(({entry:e})=>!e||!I(e,i))},[t,i]),o=a.filter(({requirement:e})=>e.required!==!1);return{blockingIntegrations:o,warningIntegrations:a.filter(({requirement:e})=>e.required===!1),isBlocked:o.length>0,isLoading:r}}var Oe={fieldErrors:{},formErrors:[]};function V(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ke(e,t){let n=e[0]===`body`?e.slice(1):e,r=[],i=t;return n.forEach(e=>{if(typeof e==`number`){Array.isArray(i)&&r.length>0&&(r[r.length-1]+=`[${e}]`,i=i[e]);return}V(i)&&e in i&&(r.push(e),i=i[e])}),r.join(`.`)}function Ae(e,t){if(!V(e))return[];if(Array.isArray(e.errors))return e.errors.flatMap(e=>!V(e)||typeof e.message!=`string`?[]:[{path:typeof e.field==`string`?e.field:``,message:e.message}]);let{detail:n}=e;return typeof n==`string`?[{path:``,message:n}]:Array.isArray(n)?n.flatMap(e=>!V(e)||typeof e.msg!=`string`?[]:[{path:ke(Array.isArray(e.loc)?e.loc:[],t),message:e.msg}]):[]}function je(e,t){return t[e]??t[e.replace(/\[\d+\]/g,`[0]`)]}function Me(e,t){if(e.length===0)return Oe;let n={},r=[];return e.forEach(({path:e,message:i})=>{let a=e?je(e,t):void 0;if(!a?.length){r.push(i);return}a.forEach(e=>{e in n||(n[e]=i)})}),{fieldErrors:n,formErrors:r}}var Ne={fieldErrors:{},formErrors:[]},Pe=[404,501];function H(e){return Pe.some(t=>l(e,t)||s.isAxiosError(e)&&e.response?.status===t)}function Fe(e){let t=(0,B.useRef)(0);return(0,B.useCallback)(async(n,r,i)=>{try{let a=b(e,n,r,i);if(!a)return null;t.current+=1;let o=t.current,s=await C.validateDraft(a);return o===t.current?s?.valid?Ne:Me(Ae(s,a.draft),le(e,r,i)):null}catch(e){return H(e)||console.warn(`Automation setup preflight failed:`,e),null}},[e])}var U=new TextEncoder,W=512,G=100,K=148;function q(e,t,n){let r=new Uint8Array(W),i=(e,t)=>{for(let n=0;n<t.length;n+=1)r[e+n]=t.charCodeAt(n)&127},a=(e,t,n)=>i(e,n.toString(8).padStart(t-1,`0`));return r.set(t,0),a(100,8,e.mode??420),a(108,8,0),a(116,8,0),a(124,12,n),a(136,12,0),r[156]=48,i(257,`ustar`),i(263,`00`),r.fill(32,K,156),i(K,r.reduce((e,t)=>e+t,0).toString(8).padStart(6,`0`)),r[154]=0,r[155]=32,r}function Ie(e){let t=[];for(let n of e){let e=U.encode(n.name);if(e.length>G)throw Error(`tar: name too long for a ustar header: ${n.name}`);let r=U.encode(n.content);t.push(q(n,e,r.length));let i=new Uint8Array(Math.ceil(r.length/W)*W);i.set(r),t.push(i)}t.push(new Uint8Array(W*2));let n=t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(new ArrayBuffer(n)),i=0;for(let e of t)r.set(e,i),i+=e.length;return r}async function Le(e){let t=Ie(e),n=new ReadableStream({start(e){e.enqueue(t),e.close()}}),r=new Response(n.pipeThrough(new CompressionStream(`gzip`)));return new Uint8Array(await r.arrayBuffer())}function Re(e){let t=p?.(e);if(!t||Object.keys(t).length===0)throw Error(`The published extensions package ships no bundle files for '${e}'.`);return t}function ze(e){let t=(e.entrypoint.trim().split(` `)[0]??``).replace(/^\.\//,``);return new Set([e.setupScript,t in e.files?t:void 0].filter(e=>e!==void 0))}async function Be(e,t){let n=e.setup.bundle;if(!n)throw Error(`'${e.id}' declares no bundle.`);let r=Re(e.id),i=Object.keys(n.files).filter(e=>typeof r[e]!=`string`);if(i.length>0)throw Error(`The published extensions package is missing bundle files for '${e.id}': ${i.join(`, `)}.`);let a=oe(e,t)?.template,o=ze(n),s=Object.keys(n.files).sort().map(e=>({name:e,content:r[e],mode:o.has(e)?493:420}));return s.push({name:_,content:`${JSON.stringify(a?.config??{},null,2)}\n`}),Le(s)}function Ve(e){return typeof File<`u`&&e instanceof File}function He(e,t,n){let r=t.tarball,i=Ve(r)?{name:r.name,size:r.size,lastModified:r.lastModified}:r;return`${e.id}
|
|
2
|
-
${n??``}
|
|
3
|
-
${JSON.stringify({...t,tarball:i})}`}async function Ue(e){let t=e.tarball;if(!Ve(t))throw Error(`Choose a tarball before creating this automation.`);return new Uint8Array(await t.arrayBuffer())}function We(){let e=N(),t=j(e=>e.setMessageToSend),n=(0,B.useRef)(null),r=(0,B.useCallback)(async n=>{let r=await e.mutateAsync({});return r.conversation_id.startsWith(`task-`)&&r.task_id?A(r.task_id,n):be(r.conversation_id,{draftMessage:n}),window.setTimeout(()=>t(n),0),{response:{...r}}},[e,t]);return(0,B.useCallback)(async(e,t,i,a,o)=>{if(!i)return r(ue(e,t));if(T(e)||x(e,o)){let r=He(e,t,o),i=n.current?.path??null;if(n.current?.key!==r||i===null){let a=T(e)?await Be(e,t):await Ue(t);i=await C.uploadAutomationTarball(e.id,a),n.current={key:r,path:i}}let s=oe(e,t,i,a,o);if(!s)throw Error(`'${e.id}' produced no create request.`);return{response:await C.createAutomationDraft(s,e,o)}}return{response:await C.createAutomationDraft(i,e,o)}},[r])}var J=n();function Y({name:e,field:t,values:n,canListRepositories:r,placeholder:i,disabled:a,onChange:o,onBlur:s}){let{t:l}=c(`openhands`),[u,f]=(0,B.useState)(``),p=e=>{let t=e.trim();!t||n.includes(t)||(o([...n,t]),f(``),s())},m=e=>{o(n.filter(t=>t!==e)),s()};return(0,J.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,"data-testid":`setup-list-${e}`,children:[n.length>0&&(0,J.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:n.map(t=>(0,J.jsxs)(`li`,{className:`flex items-center justify-between gap-2 rounded-md border border-[var(--oh-border)] px-3 py-1.5`,children:[(0,J.jsx)(`span`,{className:`truncate text-sm`,children:t}),(0,J.jsx)(D,{testId:`setup-list-${e}-remove-${t}`,type:`button`,variant:`ghost-danger`,isDisabled:a,ariaLabel:l(d.COMMON$REMOVE),onClick:()=>m(t),children:l(d.COMMON$REMOVE)})]},t))}),r?(0,J.jsx)(z,{provider:t.provider??`github`,value:null,repositoryName:null,placeholder:i,disabled:a,onChange:e=>{e?.full_name&&p(e.full_name)}}):(0,J.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,J.jsx)(`div`,{className:`grow`,children:(0,J.jsx)(M,{testId:`setup-field-${e}`,name:e,label:``,ariaLabel:t.label,type:`text`,value:u,placeholder:i,isDisabled:a,onChange:f,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),p(u))},onBlur:()=>p(u)})}),(0,J.jsx)(D,{testId:`setup-list-${e}-add`,type:`button`,variant:`secondary`,isDisabled:a||u.trim()===``,onClick:()=>p(u),children:l(d.BUTTON$ADD)})]})]})}function Ge({name:e,field:t,value:n,error:r,options:i,isOptionsLoading:a=!1,repository:o,disabled:s,onChange:l,onRepositoryChange:p,onBlur:m}){let{t:h}=c(`openhands`),{backend:g}=u(),_=`setup-field-${e}`,v=(0,J.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)]`,children:t.help}),ee=g.kind===`cloud`,y=t.placeholder??h(d.SETUP$REPOSITORY_PLACEHOLDER);if(t.type===`repo-picker`&&t.multiple)return(0,J.jsxs)(`div`,{className:`flex w-full flex-col gap-2.5`,children:[(0,J.jsx)(Z,{field:t}),(0,J.jsx)(Y,{name:e,field:t,values:w(n),canListRepositories:ee,placeholder:y,disabled:s,onChange:l,onBlur:m}),(0,J.jsx)(Q,{testId:_,error:r}),v]});if(t.type===`repo-picker`&&ee)return(0,J.jsxs)(`div`,{className:`flex w-full flex-col gap-2.5`,children:[(0,J.jsx)(Z,{field:t}),(0,J.jsx)(z,{provider:t.provider??`github`,value:o?.id??null,repositoryName:o?.full_name??S(n)??null,placeholder:t.placeholder,disabled:s,onChange:e=>{p(e??null),l(e?.full_name??``),m()}}),(0,J.jsx)(Q,{testId:_,error:r}),v]});if(t.type===`select`||t.type===`llm-profile`||[`timezone`,`event-source`,`event-type`].includes(t.type)&&i.length>0){let o=i.length>0,c=t.type===`llm-profile`&&!a&&!o;return(0,J.jsxs)(`div`,{className:`flex w-full flex-col gap-2.5`,children:[(0,J.jsx)(k,{testId:_,name:e,label:(0,J.jsx)(X,{field:t}),items:i.map(e=>({key:e.value,label:e.label})),selectedKey:S(n)||void 0,placeholder:c?h(d.MODEL$NO_SAVED_PROFILES):t.placeholder,isDisabled:s||c,isLoading:a,required:t.required,onSelectionChange:e=>{l(e===null?``:String(e)),m()}}),(0,J.jsx)(Q,{testId:_,error:r}),v]})}if(t.type===`plugin-sources`)return(0,J.jsxs)(`label`,{className:`flex w-full flex-col gap-2.5`,children:[(0,J.jsx)(X,{field:t}),(0,J.jsx)(`textarea`,{"data-testid":_,name:e,rows:4,value:S(n),placeholder:t.placeholder,disabled:s,"aria-invalid":!!r,onChange:e=>l(e.target.value),onBlur:m,className:f(ye,r&&`border-red-500`)}),(0,J.jsx)(Q,{testId:_,error:r}),v]});if(t.type===`tarball-upload`)return(0,J.jsxs)(`div`,{className:`flex w-full flex-col gap-2.5`,children:[(0,J.jsx)(Z,{field:t}),(0,J.jsx)(`input`,{"data-testid":_,name:e,type:`file`,accept:`.tar,.tar.gz,.tgz,application/gzip,application/x-tar`,disabled:s,"aria-invalid":!!r,onChange:e=>{l(e.target.files?.[0]??``),m()},className:f(ve,`file:mr-3 file:rounded-md file:border-0 file:bg-neutral-700 file:px-3 file:py-1.5 file:text-sm file:text-white`,r&&`border-red-500`)}),S(n)&&(0,J.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)]`,children:S(n)}),(0,J.jsx)(Q,{testId:_,error:r}),v]});if(t.type===`textarea`)return(0,J.jsxs)(`label`,{className:`flex w-full flex-col gap-2.5`,children:[(0,J.jsx)(X,{field:t}),(0,J.jsx)(`textarea`,{"data-testid":_,name:e,rows:4,value:S(n),placeholder:t.placeholder,disabled:s,"aria-invalid":!!r,onChange:e=>l(e.target.value),onBlur:m,className:f(ye,r&&`border-red-500`)}),(0,J.jsx)(Q,{testId:_,error:r}),v]});let te=t.type===`repo-picker`?y:t.placeholder;return(0,J.jsxs)(`div`,{className:`flex w-full flex-col gap-2.5`,children:[(0,J.jsx)(M,{testId:_,name:e,type:t.type===`number`?`number`:`text`,label:t.label,value:S(n),placeholder:te,isDisabled:s,min:t.constraints?.min,max:t.constraints?.max,showRequiredTag:t.required,error:r,onChange:l,onBlur:m}),v]})}function X({field:e}){return(0,J.jsxs)(`span`,{className:`flex items-center gap-2 text-sm`,children:[e.label,e.required&&(0,J.jsx)(`span`,{className:`text-sm leading-none text-red-400`,"aria-hidden":!0,children:`*`})]})}function Z({field:e}){return(0,J.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,J.jsx)(X,{field:e})})}function Q({testId:e,error:t}){return t?(0,J.jsx)(`p`,{role:`alert`,"data-testid":`${e}-error`,className:`-mt-1 text-xs text-red-400`,children:t}):null}var Ke=`/mcp`;function qe({prerequisites:e}){let{t}=c(`openhands`),{blockingIntegrations:n,warningIntegrations:r}=e;return(0,J.jsxs)(`div`,{className:`flex flex-col gap-4`,"data-testid":`setup-prerequisites`,children:[[...n,...r].map(({id:e,requirement:t,entry:n})=>(0,J.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,J.jsx)(`span`,{className:`text-sm`,children:n?.name??e}),(0,J.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:t.message})]},e)),(0,J.jsx)(O,{to:Ke,className:`text-sm underline`,children:t(d.SETUP$MANAGE_INTEGRATIONS)})]})}function Je({setup:e,values:t,selectedTrigger:n,selectedAction:r}){let{t:i}=c(`openhands`);return(0,J.jsx)(`div`,{className:`flex flex-col gap-4`,"data-testid":`setup-review`,children:(0,J.jsxs)(`dl`,{className:`flex flex-col gap-3`,children:[r&&e.actions?.[r]&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-[var(--oh-muted)]`,children:i(d.SETUP$ACTION_LABEL)}),(0,J.jsx)(`dd`,{className:`text-sm break-words`,children:e.actions[r]?.label})]}),Object.entries(re(e,n,r)).map(([e,n])=>(0,J.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,J.jsx)(`dt`,{className:`text-xs text-[var(--oh-muted)]`,children:n.label}),(0,J.jsx)(`dd`,{className:`text-sm break-words`,children:w(t[e]).join(`, `)||i(d.SETUP$EMPTY_VALUE)})]},e))]})})}var Ye=400,$={fieldErrors:{},formErrors:[]};function Xe(e){return e.formErrors.length>0||Object.keys(e.fieldErrors).length>0}function Ze(e){return typeof e.conversation_id==`string`?`/conversations/${e.conversation_id}`:typeof e.id==`string`?y(e.id):null}function Qe({entry:e,onClose:t}){let{t:n}=c(`openhands`),r=a(),i=Te(e),o=De(e),s=Fe(e),l=We(),{trackAutomationSetupOpened:u,trackAutomationSetupValidated:p,trackAutomationSetupCreated:h,trackAutomationSetupFailed:g}=de(),[_,v]=(0,B.useState)(`prerequisites`),y=(0,B.useMemo)(()=>me(e.setup),[e]),b=(0,B.useMemo)(()=>y.length===0?[]:i.capabilities?we(e,i.capabilities):y,[y,i.capabilities,e]),x=(0,B.useMemo)(()=>fe(e.setup),[e]),[S,C]=(0,B.useState)(()=>te(e.setup)),[w,ue]=(0,B.useState)(()=>ie(e.setup)),[T,E]=(0,B.useState)(()=>ae(e.setup,te(e.setup),ie(e.setup))),[he,ve]=(0,B.useState)({}),[ye,O]=(0,B.useState)({}),[be,A]=(0,B.useState)($),[j,M]=(0,B.useState)(!1),N=(0,B.useRef)(T),P=(0,B.useRef)(null);(0,B.useEffect)(()=>()=>{P.current&&window.clearTimeout(P.current)},[]);let F=(0,B.useMemo)(()=>x.length===0?[]:(i.capabilities?Ee(e,i.capabilities):x).filter(t=>se(e,t).length===0),[x,i.capabilities,e]),I=(0,B.useMemo)(()=>re(e.setup,S,w),[e,S,w]),L=(0,B.useMemo)(()=>Object.values(I).some(e=>e.type===`llm-profile`),[I]),{data:R,isLoading:z}=Se({enabled:L}),Oe=(0,B.useMemo)(()=>(R?.profiles??[]).map(e=>({value:e.name,label:e.name})),[R?.profiles]),V=(0,B.useMemo)(()=>{let t=pe(e.setup,i.capabilities,S,w);return!L||z?t:Object.entries(I).reduce((e,[t,n])=>n.type===`llm-profile`?{...e,[t]:{options:Oe}}:e,t)},[e.setup,i.capabilities,S,w,L,z,I,Oe]),ke=(0,B.useMemo)(()=>oe(e,T,void 0,S,w),[e,T,S,w]),je=(0,B.useMemo)(()=>le(e,S,w),[e,S,w]),Ne=(0,B.useRef)(!1);(0,B.useEffect)(()=>{Ne.current||(Ne.current=!0,u({automationId:e.id}))},[e.id,u]);let Pe=(0,B.useMemo)(()=>se(e,w),[e,w]),H=i.supported===!1||Pe.length>0,U=[...i.unmet,...Pe],W=o.blockingIntegrations.length>0||o.warningIntegrations.length>0,G=_===`prerequisites`&&!W?`form`:_,K=t=>{C(t),N.current={...ae(e.setup,t,w),...N.current},E(N.current),O({}),A($)},q=t=>{ue(t),N.current={...ae(e.setup,S,t),...N.current},E(N.current),O({}),A($)};(0,B.useEffect)(()=>{y.length===0||i.isLoading||S&&b.includes(S)||b.length>0&&K(b[0])},[b,y.length,i.isLoading,S]),(0,B.useEffect)(()=>{x.length===0||i.isLoading||w&&F.includes(w)||F.length>0&&q(F[0])},[F,x.length,i.isLoading,w]);let Ie=(e,t)=>{N.current={...N.current,[e]:t},E(N.current),O(({[e]:t,...n})=>n),A(t=>{if(!(e in t.fieldErrors))return t;let{[e]:n,...r}=t.fieldErrors;return{...t,fieldErrors:r}})},Le=()=>{P.current&&window.clearTimeout(P.current),P.current=window.setTimeout(()=>{s(N.current,S,w).then(e=>{e&&A(e)})},Ye)},Re=async()=>{if(G===`prerequisites`){v(`form`);return}let t=ne(e.setup,T,V,S,w);if(Object.keys(t).length>0){O(t);return}O({});let n=await s(T,S,w);if(n&&Xe(n)){A(n);return}A($),p({automationId:e.id}),v(`review`)},ze=async(i,a)=>{M(!0);try{let{response:n}=await l(e,T,i,S,w);h({automationId:e.id,setupMode:a});let o=Ze(n);o?r(o,{replace:!0}):t()}catch(t){g({automationId:e.id,setupMode:a});let r=Me(Ae(Ce(t),i),je);A(Xe(r)?r:{fieldErrors:{},formErrors:[n(d.SETUP$SUBMIT_FAILED)]}),v(`form`)}finally{M(!1)}},Be=()=>ze(ke,e.setup.mode),Ve=()=>ze(null,`assisted`),He=e.setup.mode===`direct`&&(ee(e)!==null||e.setup.message!==void 0),Ue=e=>{let t=ye[e];return t?$e(t,n):be.fieldErrors[e]},Y=i.isLoading||o.isLoading,X=L&&z,Z=H?n(d.SETUP$UNAVAILABLE_TITLE):G===`prerequisites`?n(d.SETUP$PREREQUISITES_TITLE):G===`review`?n(d.SETUP$REVIEW_TITLE):e.name;return(0,J.jsx)(ge,{onClose:t,"aria-label":e.name,children:(0,J.jsxs)(`div`,{"data-testid":`setup-dialog`,className:`relative flex max-h-[85vh] w-[92vw] max-w-lg flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,J.jsx)(xe,{onClose:t,testId:`setup-dialog-close`,disabled:j}),(0,J.jsx)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:(0,J.jsx)(`h2`,{className:f(`pr-6`,_e),children:Z})}),(0,J.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-6`,children:[Y&&(0,J.jsx)(`div`,{className:`flex justify-center py-6`,children:(0,J.jsx)(m,{size:`small`})}),!Y&&H&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:n(d.SETUP$UNSUPPORTED_MESSAGE)}),U.length>0&&(0,J.jsx)(`p`,{"data-testid":`setup-unmet-requirements`,className:`text-sm text-[var(--oh-muted)]`,children:U.join(`, `)})]}),!Y&&!H&&G===`prerequisites`&&(0,J.jsx)(qe,{prerequisites:o}),!Y&&!H&&G===`form`&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,J.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:e.description}),e.setup.form.note&&(0,J.jsx)(`p`,{className:`text-sm text-[var(--oh-muted)]`,children:e.setup.form.note}),x.length>1&&F.length>1&&(0,J.jsxs)(`div`,{className:`flex w-full flex-col gap-2.5`,children:[(0,J.jsx)(k,{testId:`setup-action-kind`,name:`actionKind`,label:n(d.SETUP$ACTION_LABEL),items:F.map(t=>({key:t,label:e.setup.actions?.[t]?.label??t})),selectedKey:w??void 0,isDisabled:j,required:!0,onSelectionChange:e=>{e!==null&&q(String(e))}}),w&&e.setup.actions?.[w]&&(0,J.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)]`,children:e.setup.actions[w]?.help})]}),b.length>1&&(0,J.jsxs)(`div`,{className:`flex w-full flex-col gap-2.5`,children:[(0,J.jsx)(k,{testId:`setup-trigger-kind`,name:`triggerKind`,label:n(d.SETUP$TRIGGER_LABEL),items:b.map(e=>({key:e,label:e===`cron`?`Scheduled`:`Event`})),selectedKey:S??void 0,isDisabled:j,required:!0,onSelectionChange:e=>{e!==null&&K(String(e))}}),(0,J.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)]`,children:n(d.SETUP$TRIGGER_HELP)})]}),Object.entries(I).map(([e,t])=>(0,J.jsx)(Ge,{name:e,field:t,value:T[e]??``,error:Ue(e),options:ce(e,t,V),repository:he[e]??null,disabled:j,isOptionsLoading:t.type===`llm-profile`&&X,onChange:t=>Ie(e,t),onRepositoryChange:t=>ve(n=>({...n,[e]:t})),onBlur:Le},e))]}),!Y&&!H&&G===`review`&&(0,J.jsx)(Je,{setup:e.setup,values:T,selectedTrigger:S,selectedAction:w}),be.formErrors.map(e=>(0,J.jsx)(`p`,{role:`alert`,"data-testid":`setup-form-error`,className:`pt-4 text-sm text-red-400`,children:e},e))]}),(0,J.jsxs)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:[G===`review`&&(0,J.jsx)(D,{testId:`setup-back-button`,type:`button`,variant:`secondary`,isDisabled:j,onClick:()=>v(`form`),children:n(d.BUTTON$BACK)}),H?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(D,{type:`button`,variant:`secondary`,isDisabled:j,onClick:t,children:n(d.BUTTON$CLOSE)}),He&&(0,J.jsx)(D,{testId:`setup-fallback-conversation`,type:`button`,variant:`primary`,isDisabled:j,onClick:Ve,children:n(d.SETUP$FALLBACK_CONVERSATION)})]}):(0,J.jsx)(D,{testId:`setup-continue-button`,type:`button`,variant:`primary`,isDisabled:Y||X||j||G===`prerequisites`&&o.isBlocked,onClick:G===`review`?Be:Re,children:n(G===`review`?d.SETUP$CONFIRM:d.BUTTON$CONTINUE)})]})]})})}function $e(e,t){switch(e.code){case`required`:return t(d.SETUP$VALIDATION_REQUIRED);case`minLength`:return t(d.SETUP$VALIDATION_MIN_LENGTH,{length:e.length});case`maxLength`:return t(d.SETUP$VALIDATION_MAX_LENGTH,{length:e.length});case`min`:return`Must be at least ${e.value}.`;case`max`:return`Must be at most ${e.value}.`;case`invalidOption`:return t(d.SETUP$VALIDATION_INVALID_OPTION);case`unsafeExpressionLiteral`:return t(d.SETUP$VALIDATION_UNSAFE_VALUE);default:return e}}var et=({params:e})=>{let t=g.findById(e.automationId??``);if(!t||!v())throw new Response(null,{status:404,statusText:`Not Found`});return{automationId:t.id}},tt=o(function(){let{automationId:e}=i(),t=r(),n=a(),o=g.findById(e);return o?(0,J.jsx)(Qe,{entry:o,onClose:()=>{t.key==="default"?n(h(),{replace:!0}):n(-1)}}):null});export{et as clientLoader,tt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./conversation-BOj0ENI6.js";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./conversation-BOj0ENI6.js";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./useTranslation-CCgUjPJF.js";import{ct as i,st as a}from"./active-backend-context-BsLfwrXB.js";import{K as o,t as s}from"./utils-D-gOfhmN.js";import{_ as c,b as l,g as u,h as d,v as f,y as p}from"./automation-disabled-reason-DtgC8Ppt.js";import{A as m,T as h}from"./use-tracking-ChnSFChv.js";import{r as g}from"./modal-classes-jvG85nkU.js";import{f as ee,l as _}from"./form-control-classes-lQfLxzH4.js";import{t as v}from"./brand-button-mQq2Ld1I.js";import{t as y}from"./settings-dropdown-input-BRR2OZwi.js";import{t as b}from"./settings-input-Cm4VxUon.js";import{t as x}from"./use-llm-profiles-xtCBMbef.js";import{s as S}from"./use-automations-CEubcYTD.js";import{n as C}from"./api-error-message-BXo0lCI5.js";import{t as w}from"./x-mark-BopmFoBq.js";import{t as T}from"./use-manifest-capabilities-Bso6A_-A.js";var E=e(t(),1);function D(e,t){let n=e.trim();if(!n)return{value:null};let r=Number(n);return Number.isInteger(r)?r<=0?{errorKey:o.AUTOMATIONS$ERROR_TIMEOUT_POSITIVE}:t!==void 0&&r>t?{errorKey:o.AUTOMATIONS$ERROR_TIMEOUT_MAX_EXCEEDED}:{value:r}:{errorKey:o.AUTOMATIONS$ERROR_TIMEOUT_INVALID_NUMBER}}var O=n(),k=`__active__`,A=[o.AUTOMATIONS$WEEKDAY_SUN,o.AUTOMATIONS$WEEKDAY_MON,o.AUTOMATIONS$WEEKDAY_TUE,o.AUTOMATIONS$WEEKDAY_WED,o.AUTOMATIONS$WEEKDAY_THU,o.AUTOMATIONS$WEEKDAY_FRI,o.AUTOMATIONS$WEEKDAY_SAT];function j(e){let t=e.timeout==null?``:String(e.timeout);if(e.trigger.type===`event`)return{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:`custom`,weekday:1,timeOfDay:``,isCustomSchedule:!0,rawSchedule:``,timeout:t};let n=f(e.trigger.schedule);return n.kind===`custom`?{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:`custom`,weekday:1,timeOfDay:n.hour!==void 0&&n.minute!==void 0?c(n.hour,n.minute):``,isCustomSchedule:!0,rawSchedule:n.raw,timeout:t}:{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:n.kind,weekday:n.kind===`weekly`?n.weekday??1:1,timeOfDay:c(n.hour,n.minute),isCustomSchedule:!1,rawSchedule:e.trigger.schedule??``,timeout:t}}function M({automation:e,isOpen:t,onClose:n}){let{t:c}=r(`openhands`),f=S(),M=m().editTitle,N=h(`name`),P=h(`prompt`),F=h(`model`),I=h(`timeout`),L=h(`schedule`),{data:R}=T(),z=R?.maxAutomationTimeoutSeconds,B=z===void 0?void 0:Math.min(z,I.max??z),{data:V,isLoading:H}=x(),U=V?.profiles??[],W=[{key:k,label:c(o.COMMON$ACTIVE_PROFILE)},...U.map(e=>({key:e.name,label:e.name}))],G=(0,E.useMemo)(()=>j(e),[e]),[K,q]=(0,E.useState)(G),[J,Y]=(0,E.useState)(null),[X,Z]=(0,E.useState)(null),[Q,$]=(0,E.useState)(null);if((0,E.useEffect)(()=>{t&&(q(G),Y(null),Z(null),$(null))},[t,G]),!t)return null;let te=[{key:`daily`,label:c(o.AUTOMATIONS$FREQUENCY_DAILY)},{key:`weekdays`,label:c(o.AUTOMATIONS$FREQUENCY_WEEKDAYS)},{key:`weekly`,label:c(o.AUTOMATIONS$FREQUENCY_WEEKLY)},...K.isCustomSchedule?[{key:`custom`,label:c(o.AUTOMATIONS$FREQUENCY_CUSTOM)}]:[]],ne=A.map((e,t)=>({key:String(t),label:c(e)}));return(0,O.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,O.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`presentation`}),(0,O.jsxs)(`div`,{className:`relative w-full max-w-md rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,O.jsx)(`button`,{type:`button`,onClick:n,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":c(o.AUTOMATIONS$CANCEL),children:(0,O.jsx)(w,{className:`size-5`})}),(0,O.jsx)(`h2`,{className:g,children:M}),(0,O.jsxs)(`form`,{onSubmit:t=>{t.preventDefault();let r=K.name.trim();if(!r){Y(c(o.AUTOMATIONS$NAME_REQUIRED));return}Y(null);let s=D(K.timeout,B);if(`errorKey`in s){Z(c(s.errorKey,{max:B}));return}Z(null);let u={};r!==e.name&&(u.name=r);let m=K.prompt.trim();m!==(e.prompt??``).trim()&&(u.prompt=m.length===0?null:m);let h=K.model.trim();if(h!==(e.model??``)&&(u.model=h===``?null:h),(s.value??null)!==(e.timeout??null)&&(u.timeout=s.value),e.trigger.type!==`event`&&K.isCustomSchedule){if(K.rawSchedule.trim()!==(e.trigger.schedule??``).trim()){let t=l(K.rawSchedule);if(`errorKey`in t){$(c(t.errorKey));return}u.trigger={...e.trigger,schedule:t.schedule}}$(null)}else if(!K.isCustomSchedule&&K.frequency!==`custom`){let t=p(K.timeOfDay);if(t){let n=d({kind:K.frequency,hour:t.hour,minute:t.minute,weekday:K.frequency===`weekly`?K.weekday:void 0});n!==e.trigger.schedule&&(u.trigger={...e.trigger,schedule:n})}}if(Object.keys(u).length===0){n();return}f.mutate({id:e.id,body:u},{onSuccess:()=>{i(c(o.AUTOMATIONS$EDIT_SUCCESS)),n()},onError:e=>{a(C(e,c(o.AUTOMATIONS$EDIT_ERROR)))}})},noValidate:!0,className:`mt-4 flex flex-col gap-4`,"aria-label":M,children:[N.present&&(0,O.jsx)(b,{testId:`edit-automation-name`,name:`name`,type:`text`,label:N.label,value:K.name,onChange:e=>q(t=>({...t,name:e})),error:J??void 0,showRequiredTag:N.required}),P.present&&(0,O.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,O.jsx)(`span`,{className:`text-sm`,children:P.label}),(0,O.jsx)(`textarea`,{"data-testid":`edit-automation-prompt`,name:`prompt`,value:K.prompt,onChange:e=>q(t=>({...t,prompt:e.target.value})),rows:4,className:s(_,`placeholder:italic`)}),P.help!==null&&(0,O.jsx)(`span`,{className:`text-xs text-muted`,children:P.help})]}),F.present&&(H||U.length>0)&&(0,O.jsx)(y,{testId:`edit-automation-model`,name:`model`,label:F.label,items:W,selectedKey:K.model||k,isLoading:H,placeholder:c(o.COMMON$ACTIVE_PROFILE),onSelectionChange:e=>q(t=>({...t,model:e&&e!==k?String(e):``}))}),I.present&&(0,O.jsxs)(`div`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,O.jsx)(b,{testId:`edit-automation-timeout`,name:`timeout`,type:`number`,label:I.label,value:K.timeout,onChange:e=>q(t=>({...t,timeout:e})),error:X??void 0,showOptionalTag:!0,min:I.min??1,max:B,step:1,placeholder:`600`}),I.help!==null&&(0,O.jsx)(`span`,{"data-testid":`edit-automation-timeout-hint`,className:`text-xs text-muted`,children:I.help})]}),e.trigger.type===`event`?(0,O.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg bg-[var(--oh-surface-raised)] p-3`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:c(o.AUTOMATIONS$DETAIL$TRIGGER)}),(0,O.jsx)(`span`,{className:`text-sm text-content`,children:c(o.AUTOMATIONS$DETAIL$TRIGGER_EVENT)})]}),e.trigger.source&&(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:c(o.AUTOMATIONS$DETAIL$EVENT_SOURCE)}),(0,O.jsx)(`span`,{className:`text-sm text-content`,children:e.trigger.source})]}),e.trigger.on&&(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:c(o.AUTOMATIONS$DETAIL$EVENT_TYPE)}),(0,O.jsx)(`code`,{className:`text-xs font-mono text-content`,children:u(e.trigger.on)})]}),e.trigger.filter&&(0,O.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,O.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:c(o.AUTOMATIONS$DETAIL$EVENT_FILTER)}),(0,O.jsx)(`code`,{className:`text-xs font-mono text-content break-all`,children:e.trigger.filter})]})]}):L.present?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(y,{testId:`edit-automation-frequency`,name:`frequency`,label:L.label,items:te,selectedKey:K.frequency,isDisabled:K.isCustomSchedule,onSelectionChange:e=>{!e||K.isCustomSchedule||q(t=>({...t,frequency:e}))}}),K.frequency===`weekly`&&!K.isCustomSchedule&&(0,O.jsx)(y,{testId:`edit-automation-weekday`,name:`weekday`,label:c(o.AUTOMATIONS$WEEKDAY),items:ne,selectedKey:String(K.weekday),onSelectionChange:e=>{e!==null&&q(t=>({...t,weekday:Number(e)}))}}),(0,O.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,O.jsx)(`span`,{className:`text-sm`,children:c(o.AUTOMATIONS$TIME_OF_DAY)}),(0,O.jsx)(`input`,{"data-testid":`edit-automation-time`,name:`timeOfDay`,type:`time`,value:K.timeOfDay,onChange:e=>q(t=>({...t,timeOfDay:e.target.value})),disabled:K.isCustomSchedule,className:s(ee,`disabled:bg-[var(--oh-surface-raised)]`)}),e.timezone&&(0,O.jsxs)(`span`,{className:`text-xs text-muted`,children:[c(o.AUTOMATIONS$TIMEZONE),`: `,e.timezone]})]}),K.isCustomSchedule&&(0,O.jsx)(b,{testId:`edit-automation-cron`,name:`cron`,type:`text`,label:c(o.AUTOMATIONS$CRON_EXPRESSION),value:K.rawSchedule,onChange:e=>q(t=>({...t,rawSchedule:e})),error:Q??void 0,placeholder:`*/10 * * * *`})]}):null,(0,O.jsxs)(`div`,{className:`mt-2 flex justify-end gap-3`,children:[(0,O.jsx)(v,{testId:`edit-automation-cancel`,type:`button`,variant:`secondary`,onClick:n,isDisabled:f.isPending,children:c(o.AUTOMATIONS$CANCEL)}),(0,O.jsx)(v,{testId:`edit-automation-save`,type:`submit`,variant:`primary`,isDisabled:f.isPending,"aria-busy":f.isPending,children:f.isPending?c(o.AUTOMATIONS$SAVING):c(o.AUTOMATIONS$SAVE)})]})]})]})]})}export{M as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./git-repo-dropdown-DPQVumZg.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./home-BghzJd-D.js";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{t}from"./home-BghzJd-D.js";import{n}from"./use-pinned-home-route-pK4IlJ-p.js";var r=()=>{let t=n();return t?e(t):null};export{r as clientLoader,t as default};
|