@openhands/agent-canvas 1.18.0 → 1.19.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 +1 -0
- package/build/assets/{active-backend-context-BnH4-L8h.js → active-backend-context-BsLfwrXB.js} +1 -1
- package/build/assets/{agent-context-settings-D3peZkjX.js → agent-context-settings-D9i6ezoJ.js} +1 -1
- package/build/assets/{agent-profiles-service.api-DkeZaqIl.js → agent-profiles-service.api-U-9YzDFU.js} +1 -1
- package/build/assets/{agent-profiles-settings-7yMWYjGF.js → agent-profiles-settings-D-bUV2PX.js} +1 -1
- package/build/assets/agent-server-conversation-service.api-BaVQ6NpE.js +88 -0
- package/build/assets/agent-settings-BZJHtaIK.js +2 -0
- package/build/assets/agent-settings-D4snDd6u.js +1 -0
- package/build/assets/{alert-banner-eYyqvHL3.js → alert-banner-BkVt_8Or.js} +1 -1
- package/build/assets/{api-key-entry-screen-CCBvBD8u.js → api-key-entry-screen-fAIld-n7.js} +1 -1
- package/build/assets/{app-settings-BtYDs-Be.js → app-settings-DITbrM2u.js} +1 -1
- package/build/assets/automation-detail-DawHmaOl.js +3 -0
- package/build/assets/automation-disabled-reason-DtgC8Ppt.js +1 -0
- package/build/assets/{automation-export-BJsfi7n2.js → automation-export-Kv6e0bHx.js} +1 -1
- package/build/assets/{automation-git-sync-B7o_Nbl-.js → automation-git-sync-Dd98G_Oz.js} +1 -1
- package/build/assets/{automation-setup-route-qaJ6lLCf.js → automation-setup-route-Cdc109ZD.js} +1 -1
- package/build/assets/{automation-templates-Bb98r-kx.js → automation-templates-Xhr-FDAB.js} +1 -1
- package/build/assets/automations-list-BeP1LuzQ.js +1 -0
- package/build/assets/{back-nav-button-B2yBiVMB.js → back-nav-button-DWNiN277.js} +1 -1
- package/build/assets/backend-form-modal-DeaUJIik.js +1 -0
- package/build/assets/{backend-synced-settings-badge-DLEp6cq7.js → backend-synced-settings-badge-Br85iWIY.js} +1 -1
- package/build/assets/{badge-ehL-kgeO.js → badge-Cdnei7Ly.js} +1 -1
- package/build/assets/{base-modal-C1a0TsSx.js → base-modal-Ds7grR67.js} +1 -1
- package/build/assets/{brand-button-CUMfjb99.js → brand-button-mQq2Ld1I.js} +1 -1
- package/build/assets/{browser-SE24Tk8g.js → browser-Bfum8fkE.js} +2 -2
- package/build/assets/{browser-tab-HjJxHA0V.js → browser-tab-CmYT4j_r.js} +1 -1
- package/build/assets/{canvas-extension-page-BsUGBb1T.js → canvas-extension-page-CokKSVRG.js} +1 -1
- package/build/assets/{canvas-extensions-C9Tm6s_E.js → canvas-extensions-BoQEYG-2.js} +1 -1
- package/build/assets/{canvas-extensions-runtime-B8kxM4rO.js → canvas-extensions-runtime-Du2M5iEX.js} +1 -1
- package/build/assets/{chat-send-button-CGvc2wpE.js → chat-send-button-DM3JgMc2.js} +1 -1
- package/build/assets/{circle-plus-check-toggle-BDX_ctNs.js → circle-plus-check-toggle-BbYBiUwv.js} +1 -1
- package/build/assets/{cloud-funnel-analytics-D5uJ_4JE.js → cloud-funnel-analytics-D02kgq1s.js} +1 -1
- package/build/assets/{cog-CAEugqtV.js → cog-Dy1eWbSZ.js} +1 -1
- package/build/assets/{command-menu-CQxs4mtX.js → command-menu-mehU3Evb.js} +1 -1
- package/build/assets/{commits-tab-D0xgjipP.js → commits-tab-DhQW8CXi.js} +1 -1
- package/build/assets/{condenser-settings-D63NJRBT.js → condenser-settings-eRk6Fkx6.js} +1 -1
- package/build/assets/{confirmation-modal-78sd9Vny.js → confirmation-modal-BmVt_c0I.js} +1 -1
- package/build/assets/{context-menu-list-item-Cm7-7Y-7.js → context-menu-list-item-lx2zk9G7.js} +1 -1
- package/build/assets/{conversation-B_nweu5p.js → conversation-BOj0ENI6.js} +4 -4
- package/build/assets/conversation-SouWlGvs.js +1 -0
- package/build/assets/conversation-panel-SouWlGvs.js +1 -0
- package/build/assets/{conversation-state-store-9D_3P7q4.js → conversation-state-store-C6YncQNo.js} +1 -1
- package/build/assets/{conversation-tab-empty-state-B3dpJXX0.js → conversation-tab-empty-state-DIhwCC2J.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-B1ljgNxO.js → copy-to-clipboard-button-DVNXLylP.js} +1 -1
- package/build/assets/{device-verify-D5QRIS_x.js → device-verify-LP-x7nra.js} +1 -1
- package/build/assets/{dropdown-classes-BGvOvW2_.js → dropdown-classes-goDldkiu.js} +1 -1
- package/build/assets/edit-automation-modal-BJJR9wSW.js +1 -0
- package/build/assets/empty-state-Cd-TFe7i.js +1 -0
- package/build/assets/{entry.client-BMafTpjO.js → entry.client-CJdjIvMZ.js} +2 -2
- package/build/assets/{enum-filter-dropdown-UNaom12H.js → enum-filter-dropdown-pocrz9AL.js} +1 -1
- package/build/assets/{environment-switch-overlay-COibRUA-.js → environment-switch-overlay-Dwe78wRl.js} +1 -1
- package/build/assets/{error-state-Cf8LRuuY.js → error-state-SuWwztxV.js} +1 -1
- package/build/assets/{extensions-hub-C_6ahIua.js → extensions-hub-O0esK3Er.js} +1 -1
- package/build/assets/{extensions-navigation-C5GfpzFe.js → extensions-navigation-CgCVSXje.js} +1 -1
- package/build/assets/{files-tab-D5PPIWI1.js → files-tab-B_6t8ljw.js} +1 -1
- package/build/assets/{form-control-classes-Dbq-7YP_.js → form-control-classes-lQfLxzH4.js} +1 -1
- package/build/assets/{get-git-path-jU2zjqIB.js → get-git-path-Bp5rsUkl.js} +1 -1
- package/build/assets/git-repo-dropdown-CbD0_LPN.js +1 -0
- package/build/assets/{git-repo-dropdown-uxlFw2gn.js → git-repo-dropdown-DPQVumZg.js} +1 -1
- package/build/assets/{highlighted-source-view-C7pAXrT0.js → highlighted-source-view-Bp0sgK-f.js} +1 -1
- package/build/assets/home-BghzJd-D.js +1 -0
- package/build/assets/home-CXZ8zawS.js +1 -0
- package/build/assets/home-automation-run-tooltip-BdpCckKO.js +1 -0
- package/build/assets/{home-store-DCbei3DX.js → home-store-DNQpfIEO.js} +1 -1
- package/build/assets/{hooks-service-Dnmhqc0Z.js → hooks-service-DkxnQa4N.js} +1 -1
- package/build/assets/index-home-Ca6Q5CtT.js +1 -0
- package/build/assets/{install-server-modal-B81I-5OE.js → install-server-modal-DvxxYKia.js} +1 -1
- package/build/assets/{key-O84CMFHb.js → key-CwTE6XJj.js} +1 -1
- package/build/assets/{launch-ZLxI4opd.js → launch-jsRGPRBx.js} +1 -1
- package/build/assets/link-external-B4gx3EeM.js +1 -0
- package/build/assets/{llm-not-configured-banner-Dh_ajcM8.js → llm-not-configured-banner-DMdL1vaX.js} +4 -4
- package/build/assets/{llm-settings-CODhjQzy.js → llm-settings-dkQ5Oq7W.js} +1 -1
- package/build/assets/llm-settings-lNDerSlu.js +1 -0
- package/build/assets/{llm-subscription-service-CgIDc38n.js → llm-subscription-service-BiQaZbvv.js} +1 -1
- package/build/assets/{loading-spinner-BeLV0IXf.js → loading-spinner-DK1sAwVg.js} +1 -1
- package/build/assets/{manage-backends-modal-cMXqCb-B.js → manage-backends-modal-DqCJohsX.js} +1 -1
- package/build/assets/manifest-ff93dc8c.js +1 -0
- package/build/assets/{manifest-subpage-layout-CVZgVKoY.js → manifest-subpage-layout-sxuPqfUr.js} +1 -1
- package/build/assets/{markdown-renderer-DyFl9-mL.js → markdown-renderer-BH5pqDuJ.js} +1 -1
- package/build/assets/mcp-BtaJDXnP.js +1 -0
- package/build/assets/mcp-installed-servers-Br4ZLsjr.js +1 -0
- package/build/assets/mcp-marketplace-utils-BwEnDYqm.js +1 -0
- package/build/assets/mcp-page-DwbnQpVs.js +9 -0
- package/build/assets/{messages-Bk1xhbU2.js → messages-DmFJlW6c.js} +4 -4
- package/build/assets/{modal-body-C24WsdFb.js → modal-body-DBweM2EN.js} +1 -1
- package/build/assets/{modal-classes-B0b9eiL8.js → modal-classes-jvG85nkU.js} +1 -1
- package/build/assets/{modal-close-button-DfqfB2Nj.js → modal-close-button-BrM5fNnn.js} +1 -1
- package/build/assets/onboarding-CQ8T6T0U.js +1 -0
- package/build/assets/{onboarding-modal-BT3Gx_sZ.js → onboarding-modal-CnliiaSN.js} +1 -1
- package/build/assets/{organization-service.api-B5CvmnYQ.js → organization-service.api-DmFUEmu5.js} +1 -1
- package/build/assets/parse-git-remote-url-BG8pcKL8.js +1 -0
- package/build/assets/{planner-tab-CstoOlAB.js → planner-tab-CXph_C9F.js} +1 -1
- package/build/assets/{plugins-management-service-5rqVPEGN.js → plugins-management-service-CcEpfNKz.js} +1 -1
- package/build/assets/{profiles-service.api-D1XKMgr0.js → profiles-service.api-DdF_4Zhe.js} +1 -1
- package/build/assets/{providers-XmZ9HM4Q.js → providers-BWRnl31s.js} +1 -1
- package/build/assets/{proxy-XP6U1Dhv.js → proxy-DbEf3Nqr.js} +1 -1
- package/build/assets/recommended-automations-launcher-r0oI91HN.js +1 -0
- package/build/assets/root-j2fFRlWS.js +2 -0
- package/build/assets/{root-layout-DUquNZTU.js → root-layout-CfGgm2lo.js} +2 -2
- package/build/assets/root-sEWn3ha1.css +1 -0
- package/build/assets/{schema-field-Y3F8JvXd.js → schema-field-c3Ncgm4x.js} +1 -1
- package/build/assets/{sdk-section-page-CNZTLwH9.js → sdk-section-page-DFEiuiFQ.js} +1 -1
- package/build/assets/{secret-form-9-BoGA40.js → secret-form-WXXNFqTM.js} +1 -1
- package/build/assets/{secrets-service-BOIsfD9j.js → secrets-service-DU6wh3wX.js} +1 -1
- package/build/assets/{secrets-settings-CBJgFr42.js → secrets-settings-BEqbPvjy.js} +1 -1
- package/build/assets/{settings-D4hdToD4.js → settings-DjaSQwFh.js} +1 -1
- package/build/assets/{settings-dropdown-input-DBvsZ7-Q.js → settings-dropdown-input-BRR2OZwi.js} +1 -1
- package/build/assets/{settings-index-DeQphyBK.js → settings-index-DHv4XFcM.js} +1 -1
- package/build/assets/{settings-input-dVuzapBA.js → settings-input-Cm4VxUon.js} +1 -1
- package/build/assets/{settings-list-classes-DhAPuXm6.js → settings-list-classes-CaUfKZ33.js} +1 -1
- package/build/assets/{settings-modal-tHiJ8iYV.js → settings-modal-djXuAnBO.js} +1 -1
- package/build/assets/{settings-nav-GAQjW1a-.js → settings-nav-DFb3hBMr.js} +1 -1
- package/build/assets/{settings-service.api-C1vZH9Vh.js → settings-service.api-Q9lKW1TX.js} +1 -1
- package/build/assets/{settings-switch-DDd1cQ8t.js → settings-switch-seaSJc7t.js} +1 -1
- package/build/assets/{shared-conversation-Cyg7m7ns.js → shared-conversation-x3rxVCon.js} +1 -1
- package/build/assets/{sidebar-layout-DH0E-5KW.js → sidebar-layout-B6mcvvdV.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-CQ4iky__.js → sidebar-mobile-menu-toggle-CEqS8KnA.js} +1 -1
- package/build/assets/{sidebar-nav-link-oLQiKUBu.js → sidebar-nav-link-BTHX11LG.js} +1 -1
- package/build/assets/{sidebar-onboarding-checklist-storage-TfvNNnnr.js → sidebar-onboarding-checklist-storage-BP1kzn6p.js} +1 -1
- package/build/assets/{skill-card-pill-row-DfjIfj0K.js → skill-card-pill-row-TD39nfP3.js} +1 -1
- package/build/assets/{skill-filter-DsNLmn76.js → skill-filter-CdBbbwjm.js} +1 -1
- package/build/assets/{skill-icon-badge-0MK_68Nc.js → skill-icon-badge-vUEp7gsC.js} +1 -1
- package/build/assets/{skill-scope-BE-H9TSZ.js → skill-scope-BTRBQt0-.js} +1 -1
- package/build/assets/{skills-plugins-vzSdxSk_.js → skills-plugins-k1tUNAw4.js} +1 -1
- package/build/assets/{skills-settings-BiPOH9H9.js → skills-settings-CENviPT7.js} +1 -1
- package/build/assets/{styled-tooltip-CejG0rqv.js → styled-tooltip-DVAlWYnL.js} +1 -1
- package/build/assets/{task-list-tab-OkZSqnTp.js → task-list-tab-BLKF_x9f.js} +1 -1
- package/build/assets/{terminal-Dph60VFZ.js → terminal-Ckbnqb23.js} +1 -1
- package/build/assets/{toggle-switch-B2uXaAUS.js → toggle-switch-DeiG9Mf6.js} +1 -1
- package/build/assets/trash-CXN2R54L.js +1 -0
- package/build/assets/{typography-DgcLGdHk.js → typography-NarNyelM.js} +1 -1
- package/build/assets/{usage-tab-MCmNRAnR.js → usage-tab-Drd3O006.js} +1 -1
- package/build/assets/{use-acp-credential-form-ychoGqjC.js → use-acp-credential-form-CJ5wPsQm.js} +1 -1
- package/build/assets/{use-activate-agent-profile-8L8Xdghy.js → use-activate-agent-profile-iQZ0U3qV.js} +1 -1
- package/build/assets/{use-agent-profiles-Bi8hSkze.js → use-agent-profiles-LCvb5OXT.js} +1 -1
- package/build/assets/{use-automation-health-U99vvHxx.js → use-automation-health-DdgSa8sA.js} +1 -1
- package/build/assets/{use-automation-permissions-Buus0R6h.js → use-automation-permissions-D3kEeieu.js} +1 -1
- package/build/assets/{use-automations-Bq5hVuv0.js → use-automations-CEubcYTD.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-MzIeEV8F.js → use-can-manage-org-profiles-CB8ybxFK.js} +1 -1
- package/build/assets/{use-canvas-extensions-Ca9KoVEm.js → use-canvas-extensions-BMacwi2v.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-B4ZLUZSa.js → use-cloud-current-user-id-BEKRd6XZ.js} +1 -1
- package/build/assets/{use-config-l5tkDHyD.js → use-config-3WYcJsgC.js} +1 -1
- package/build/assets/{use-create-conversation-i_PdFdIs.js → use-create-conversation-Be-eVpFp.js} +1 -1
- package/build/assets/use-create-secret-Bk9ZxTjl.js +1 -0
- package/build/assets/{use-free-models-gCsJ5BV0.js → use-free-models-Ci3FkKEm.js} +1 -1
- package/build/assets/{use-get-secrets-CMTuWEp_.js → use-get-secrets-fqS0kxt6.js} +1 -1
- package/build/assets/{use-llm-configured-Dl4zg8ht.js → use-llm-configured-B71ZEVg2.js} +1 -1
- package/build/assets/{use-llm-profiles-SWsuFmFu.js → use-llm-profiles-xtCBMbef.js} +1 -1
- package/build/assets/{use-manifest-capabilities-CdqYfUAC.js → use-manifest-capabilities-Bso6A_-A.js} +1 -1
- package/build/assets/{use-onboarding-completion-Xl63ZvzQ.js → use-onboarding-completion-CEgjL02y.js} +1 -1
- package/build/assets/{use-pinned-home-route-BXDIUaxQ.js → use-pinned-home-route-pK4IlJ-p.js} +1 -1
- package/build/assets/{use-plugins-marketplace-BIIaPiaB.js → use-plugins-marketplace-B8-ZEB34.js} +1 -1
- package/build/assets/{use-save-agent-profile-D-ZHHE94.js → use-save-agent-profile-D7hJuW_u.js} +1 -1
- package/build/assets/{use-save-settings-Dapkf4cC.js → use-save-settings-CikTu5xV.js} +1 -1
- package/build/assets/{use-settings-C2KKQKVC.js → use-settings-BWIH5EuN.js} +1 -1
- package/build/assets/{use-settings-nav-items-TOc0Rsfd.js → use-settings-nav-items-DSKwLDnd.js} +1 -1
- package/build/assets/use-tracking-ChnSFChv.js +3 -0
- package/build/assets/{use-user-conversation-5UFqMoO4.js → use-user-conversation-C_l65DqW.js} +1 -1
- package/build/assets/utils-D-gOfhmN.js +1 -0
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-D6owle9R.js +2 -0
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-BFRW8wt-.js +48 -0
- package/build/assets/{verification-settings-DdBpaVPz.js → verification-settings-PKtoIUUY.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +10 -0
- package/build/locales/ca/openhands.json +10 -0
- package/build/locales/de/openhands.json +10 -0
- package/build/locales/en/openhands.json +10 -0
- package/build/locales/es/openhands.json +10 -0
- package/build/locales/fr/openhands.json +10 -0
- package/build/locales/it/openhands.json +10 -0
- package/build/locales/ja/openhands.json +10 -0
- package/build/locales/ko-KR/openhands.json +10 -0
- package/build/locales/no/openhands.json +10 -0
- package/build/locales/pt/openhands.json +10 -0
- package/build/locales/tr/openhands.json +10 -0
- package/build/locales/uk/openhands.json +10 -0
- package/build/locales/zh-CN/openhands.json +10 -0
- package/build/locales/zh-TW/openhands.json +10 -0
- package/config/defaults.json +3 -3
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.cjs +3 -3
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.js +12 -16
- package/dist/components/conversation-events/chat/event-content-helpers/get-skill-ready-content.js.map +1 -1
- package/dist/components/features/automations/detail/disabled-reason-banner.d.ts +16 -0
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.cjs.map +1 -1
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js +38 -29
- package/dist/components/features/home/featured-automations/home-automation-run-tooltip.js.map +1 -1
- package/dist/components/features/settings/agent-profiles/profile-scope-list.d.ts +20 -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/acp-providers.cjs +1 -1
- package/dist/constants/acp-providers.cjs.map +1 -1
- package/dist/constants/acp-providers.d.ts +0 -5
- package/dist/constants/acp-providers.js +20 -16
- package/dist/constants/acp-providers.js.map +1 -1
- package/dist/constants/profile-scope.d.ts +21 -0
- package/dist/hooks/query/use-automation-sdk-version.cjs +1 -1
- package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -1
- package/dist/hooks/query/use-automation-sdk-version.js +3 -1
- package/dist/hooks/query/use-automation-sdk-version.js.map +1 -1
- package/dist/hooks/use-drag-resize.cjs +1 -1
- package/dist/hooks/use-drag-resize.cjs.map +1 -1
- package/dist/hooks/use-drag-resize.js +8 -9
- package/dist/hooks/use-drag-resize.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 +10 -0
- 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 +170 -0
- package/dist/i18n/translation.js.map +1 -1
- package/dist/locales/ar/openhands.json +10 -0
- package/dist/locales/ca/openhands.json +10 -0
- package/dist/locales/de/openhands.json +10 -0
- package/dist/locales/en/openhands.json +10 -0
- package/dist/locales/es/openhands.json +10 -0
- package/dist/locales/fr/openhands.json +10 -0
- package/dist/locales/it/openhands.json +10 -0
- package/dist/locales/ja/openhands.json +10 -0
- package/dist/locales/ko-KR/openhands.json +10 -0
- package/dist/locales/no/openhands.json +10 -0
- package/dist/locales/pt/openhands.json +10 -0
- package/dist/locales/tr/openhands.json +10 -0
- package/dist/locales/uk/openhands.json +10 -0
- package/dist/locales/zh-CN/openhands.json +10 -0
- package/dist/locales/zh-TW/openhands.json +10 -0
- package/dist/manifests/manifest-validation.cjs +1 -1
- package/dist/manifests/manifest-validation.cjs.map +1 -1
- package/dist/manifests/manifest-validation.js +2 -2
- package/dist/manifests/manifest-validation.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js +15 -8
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js +11 -13
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js +6 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js +3 -6
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.js +9 -12
- package/dist/node_modules/@openhands/typescript-client/dist/client/file-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.js +41 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/runtime-transport.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-client.js +3 -6
- package/dist/node_modules/@openhands/typescript-client/dist/client/vscode-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 +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +199 -61
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.js +9 -8
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/remote-workspace.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +2 -2
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +5 -0
- package/dist/types/automation.cjs.map +1 -1
- package/dist/types/automation.d.ts +23 -1
- package/dist/types/automation.js.map +1 -1
- package/dist/utils/automation-disabled-reason.cjs +2 -0
- package/dist/utils/automation-disabled-reason.cjs.map +1 -0
- package/dist/utils/automation-disabled-reason.d.ts +32 -0
- package/dist/utils/automation-disabled-reason.js +19 -0
- package/dist/utils/automation-disabled-reason.js.map +1 -0
- package/dist/utils/parse-git-remote-url.cjs +1 -1
- package/dist/utils/parse-git-remote-url.cjs.map +1 -1
- package/dist/utils/parse-git-remote-url.d.ts +5 -1
- package/dist/utils/parse-git-remote-url.js +20 -13
- package/dist/utils/parse-git-remote-url.js.map +1 -1
- package/package.json +2 -2
- package/scripts/check-sdk-version-sync.mjs +79 -8
- package/scripts/dev-safe.mjs +1 -1
- package/scripts/static-server.mjs +24 -7
- package/build/assets/acp-providers-DcY_mKYa.js +0 -1
- package/build/assets/agent-server-conversation-service.api-jiCopc2E.js +0 -88
- package/build/assets/agent-settings-BF8hM6wb.js +0 -2
- package/build/assets/agent-settings-YPutBAeR.js +0 -1
- package/build/assets/automation-detail-BxXhb_m2.js +0 -3
- package/build/assets/automations-list-DEPVNud3.js +0 -1
- package/build/assets/backend-form-modal-DxisQV_6.js +0 -1
- package/build/assets/conversation-edjzrv5w.js +0 -1
- package/build/assets/conversation-panel-edjzrv5w.js +0 -1
- package/build/assets/edit-automation-modal-D_JWSmxT.js +0 -1
- package/build/assets/empty-state-FK_s1B60.js +0 -1
- package/build/assets/git-repo-dropdown-BoDDWXfX.js +0 -1
- package/build/assets/home-BM5_Wz_R.js +0 -1
- package/build/assets/home-Ivfm7KC4.js +0 -1
- package/build/assets/home-automation-run-tooltip-B1N2uO9p.js +0 -1
- package/build/assets/index-home-td9BN2T3.js +0 -1
- package/build/assets/kebab-menu-item-content-SCJBwZnp.js +0 -1
- package/build/assets/link-external-BNZzCM1I.js +0 -1
- package/build/assets/llm-settings-CZaXYgtw.js +0 -1
- package/build/assets/manifest-bfeccb98.js +0 -1
- package/build/assets/mcp-CraxoXQv.js +0 -1
- package/build/assets/mcp-marketplace-utils-C7PYr293.js +0 -1
- package/build/assets/mcp-page-CteH_K0N.js +0 -9
- package/build/assets/onboarding-DXFBRqEy.js +0 -1
- package/build/assets/parse-git-remote-url-DpDM9bK6.js +0 -1
- package/build/assets/recommended-automations-launcher-DEHRKIAg.js +0 -1
- package/build/assets/root-CM6IZHlg.css +0 -1
- package/build/assets/root-DdFkodKW.js +0 -2
- package/build/assets/trash-Ckh7yCaB.js +0 -1
- package/build/assets/use-create-secret-CjWq0J4O.js +0 -1
- package/build/assets/use-tracking-j4uo9VEW.js +0 -3
- package/build/assets/utils-BgLSZdyy.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0x1wrp2-Z0lly3FE.js +0 -2
- package/build/assets/vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~inibp4qe-CnsDDzeE.js +0 -48
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{D as e,O as t}from"./utils-
|
|
1
|
+
import{D as e,O as t}from"./utils-D-gOfhmN.js";import{t as n}from"./settings-CKqk8ZnH.js";import{c as r,d as i,l as a,o,s,u as c}from"./llm-subscription-DTqtBCWz.js";import{t as l}from"./automation-C_eCrGyP.js";import{a as ee,i as u,n as d,o as f,r as p,t as te}from"./vendor~browser-hbU4u2Ag.js";var m=[`file1.txt`,`file2.txt`,`file3.txt`],h=[`reboot_skynet.exe`,`target_list.txt`,`terminator_blueprint.txt`],ne={home:`/home/openhands`,favorites:[{label:`Downloads`,path:`/home/openhands/Downloads`}],locations:[]},re={"/projects":[{name:`demo-app`,path:`/projects/demo-app`},{name:`sample-tools`,path:`/projects/sample-tools`},{name:`notes-service`,path:`/projects/notes-service`}],"/projects/demo-app":[{name:`web-client`,path:`/projects/demo-app/web-client`},{name:`api-service`,path:`/projects/demo-app/api-service`}],"/projects/demo-app/web-client":[]},ie=[u.all(`*/api/bash/execute_bash_command`,async()=>f.json({command:``,exit_code:0,output:``})),u.get(`*/api/file/home`,async()=>f.json(ne)),u.get(`*/api/file/search_subdirs`,async({request:e})=>{let t=new URL(e.url).searchParams.get(`path`)??``,n=re[t]??[];return f.json({path:t,items:n,subdirs:n,next_page_id:null})}),u.get(`*/api/file/:path`,async({params:e})=>f.json({path:`/${e.path?.toString()??`home`}`,subdirs:[]})),u.get(`/api/conversations/:conversationId/list-files`,async({params:e})=>{await p();let t=e.conversationId?.toString();return t?t===`test-conversation-id-2`?f.json(h):f.json(m):f.json(null,{status:400})}),u.get(`/api/conversations/:conversationId/select-file`,async({request:e})=>{await p();let t=new URL(e.url).searchParams.get(`file`)?.toString();return t?f.json({code:`Content of ${t}`}):f.json(null,{status:404})})],g=new Map([[`OpenAI_API_Key`,{value:`test-123`,description:`OpenAI API Key`}],[`Google_Maps_API_Key`,{value:`test-123`,description:`Google Maps API Key`}]]),ae=[u.get(`*/api/settings/secrets`,async({request:e})=>{if(new URL(e.url).pathname.split(`/`).filter(Boolean).length>3)return;let t=Array.from(g.entries()).map(([e,{description:t}])=>({name:e,description:t}));return f.json({secrets:t})}),u.get(`*/api/settings/secrets/:name`,async({params:e})=>{let{name:t}=e;if(typeof t!=`string`)return f.json({detail:`Invalid name`},{status:400});let n=g.get(t);return n?new f(n.value,{headers:{"Content-Type":`text/plain`}}):f.json({detail:`Secret not found`},{status:404})}),u.put(`*/api/settings/secrets`,async({request:e})=>{let t=await e.json();return!t?.name||!t?.value?f.json({detail:`name and value are required`},{status:400}):(g.set(t.name,{value:t.value,description:t.description}),f.json({name:t.name,description:t.description}))}),u.delete(`*/api/settings/secrets/:name`,async({params:e})=>{let{name:t}=e;return typeof t==`string`?g.delete(t)?f.json({deleted:!0}):f.json({detail:`Secret not found`},{status:404}):f.json({detail:`Invalid name`},{status:400})})],_=new Map,v=null,oe={critic_enabled:!1,critic_mode:`off`,enable_iterative_refinement:!1,critic_threshold:.5,max_refinement_iterations:3,critic_server_url:null,critic_model_name:null};function se(e){return{schema_version:1,revision:1,mcp_server_refs:null,agent_kind:`openhands`,llm_profile_ref:`default`,agent:`CodeActAgent`,skills:[],system_message_suffix:null,condenser:null,verification:oe,enable_sub_agents:!1,tool_concurrency_limit:1,...e}}var ce=`3f1c1b7e-0000-4000-8000-000000000001`,le=[se({id:ce,name:`default`}),se({id:`3f1c1b7e-0000-4000-8000-000000000002`,name:`research`,enable_sub_agents:!0,tool_concurrency_limit:4})],y=le.length+1;function ue(){let e=String(y).padStart(12,`0`);return y+=1,`3f1c1b7e-0000-4000-8000-${e}`}function de(){_.clear(),v=null,y=le.length+1}function fe(){de();for(let e of le)_.set(e.name,{...e});v=ce}fe();function pe(e,t){return{id:t.id,name:e,agent_kind:t.agent_kind,revision:t.revision,llm_profile_ref:t.agent_kind===`openhands`?t.llm_profile_ref:null,mcp_server_refs:t.mcp_server_refs}}function b(e){return f.json({detail:`Agent profile '${e}' not found`},{status:404})}var me=[u.get(`*/api/agent-profiles`,async()=>{let e=Array.from(_.entries()).map(([e,t])=>pe(e,t));return f.json({profiles:e,active_agent_profile_id:v})}),u.get(`*/api/agent-profiles/:name`,async({params:e})=>{let{name:t}=e;if(typeof t!=`string`)return f.json({detail:`Invalid name`},{status:400});let n=_.get(t);return n?f.json({name:t,profile:n}):b(t)}),u.post(`*/api/agent-profiles/:name/rename`,async({params:e,request:t})=>{let{name:n}=e;if(typeof n!=`string`)return f.json({detail:`Invalid name`},{status:400});let r=(await t.json())?.new_name;if(!r)return f.json({detail:`new_name is required`},{status:422});let i=_.get(n);return i?r!==n&&_.has(r)?f.json({detail:`Agent profile '${r}' already exists`},{status:409}):(_.delete(n),_.set(r,{...i,name:r}),f.json({name:r,message:`Agent profile renamed.`})):b(n)}),u.post(`*/api/agent-profiles/:id/activate`,async({params:e})=>{let{id:t}=e;return typeof t==`string`?Array.from(_.values()).find(e=>e.id===t)?(v=t,f.json({id:t,message:`Agent profile activated.`,agent_settings_applied:!1})):b(t):f.json({detail:`Invalid id`},{status:400})}),u.post(`*/api/agent-profiles/:name`,async({params:e,request:t})=>{let{name:n}=e;if(typeof n!=`string`)return f.json({detail:`Invalid name`},{status:400});let r=await t.json(),i=_.get(n);return _.set(n,{...r,name:n,id:i?.id??r.id??ue(),revision:(i?.revision??0)+1}),f.json({name:n,message:`Agent profile saved.`})}),u.delete(`*/api/agent-profiles/:name`,async({params:e})=>{let{name:t}=e;return typeof t==`string`?(v===_.get(t)?.id&&(v=null),_.delete(t),f.json({name:t,message:`Agent profile deleted.`})):f.json({detail:`Invalid name`},{status:400})})],x=(e,t)=>Array.from({length:e},(e,n)=>({id:`${n+1}`,full_name:`user/repo-${n+1}`,git_provider:t,is_public:Math.random()>.3,stargazers_count:Math.floor(Math.random()*1e3),pushed_at:new Date(Date.now()-Math.random()*90*24*60*60*1e3).toISOString()})),he=e=>Array.from({length:e},(e,t)=>({name:t===0?`main`:t===1?`develop`:`feature/branch-${t}`,commit_sha:`abc123${t.toString().padStart(3,`0`)}`,protected:t===0,last_push_date:new Date(Date.now()-Math.random()*7*24*60*60*1e3).toISOString()})),ge={github:x(120,`github`),gitlab:x(120,`gitlab`),bitbucket:x(120,`bitbucket`)},S=he(25),_e=[{path:`src/components/hello.tsx`,status:`UPDATED`},{path:`src/utils/new-helper.ts`,status:`ADDED`},{path:`src/old-module.py`,status:`DELETED`}],ve=[u.get(`*/api/user/repositories`,async({request:e})=>{await p(500);let t=new URL(e.url),n=t.searchParams.get(`selected_provider`),r=parseInt(t.searchParams.get(`page`)||`1`,10),i=parseInt(t.searchParams.get(`per_page`)||`30`,10),a=t.searchParams.get(`sort`)||`pushed`,o=t.searchParams.get(`installation_id`);if(!n)return f.json(`Git provider token required. (such as GitHub).`,{status:401});let s=[...ge[n]||[]];if(a===`pushed`?s.sort((e,t)=>new Date(t.pushed_at).getTime()-new Date(e.pushed_at).getTime()):a===`stars`&&s.sort((e,t)=>(t.stargazers_count||0)-(e.stargazers_count||0)),o&&n===`github`){let e=(parseInt(o,10)||0)*20;s=s.slice(e,e+20)}let c=(r-1)*i,l=c+i,ee=s.slice(c,l),u=l<s.length,d=r>1,te=Math.ceil(s.length/i),m=``;if(u||d){let e=[];d&&e.push(`</api/user/repositories?page=${r-1}&per_page=${i}>; rel="prev"`),u&&e.push(`</api/user/repositories?page=${r+1}&per_page=${i}>; rel="next"`),e.push(`</api/user/repositories?page=${te}&per_page=${i}>; rel="last"`),e.push(`</api/user/repositories?page=1&per_page=${i}>; rel="first"`),m=e.join(`, `)}let h=[...ee];return h.length>0&&m&&(h[0]={...h[0],link_header:m}),f.json(h)}),u.get(`*/api/user/search/repositories`,async({request:e})=>{await p(300);let t=new URL(e.url),n=t.searchParams.get(`query`)||``,r=t.searchParams.get(`selected_provider`),i=parseInt(t.searchParams.get(`per_page`)||`5`,10),a=t.searchParams.get(`sort`)||`stars`,o=t.searchParams.get(`order`)||`desc`;if(!r)return f.json(`Git provider token required.`,{status:401});let s=[...(ge[r]||[]).filter(e=>e.full_name.toLowerCase().includes(n.toLowerCase()))];a===`stars`&&s.sort((e,t)=>{let n=e.stargazers_count||0,r=t.stargazers_count||0;return o===`desc`?r-n:n-r});let c=s.slice(0,i);return f.json(c)}),u.get(`*/api/user/repository/branches`,async({request:e})=>{await p(300);let t=new URL(e.url),n=t.searchParams.get(`repository`),r=parseInt(t.searchParams.get(`page`)||`1`,10),i=parseInt(t.searchParams.get(`per_page`)||`30`,10);if(!n)return f.json(`Repository parameter is required`,{status:400});let a=(r-1)*i,o=a+i,s={branches:S.slice(a,o),has_next_page:o<S.length,current_page:r,per_page:i,total_count:S.length};return f.json(s)}),u.get(`*/api/user/search/branches`,async({request:e})=>{await p(200);let t=new URL(e.url),n=t.searchParams.get(`repository`),r=t.searchParams.get(`query`)||``,i=parseInt(t.searchParams.get(`per_page`)||`30`,10);if(!n)return f.json(`Repository parameter is required`,{status:400});let a=S.filter(e=>e.name.toLowerCase().includes(r.toLowerCase())).slice(0,i);return f.json(a)}),u.get(`*/api/git/changes`,async()=>f.json(_e)),u.get(`*/api/git/diff`,async()=>f.json({original:`def greet(name):
|
|
2
2
|
return f"Hello, {name}!"
|
|
3
3
|
`,modified:`def greet(name: str) -> str:
|
|
4
4
|
return f"Hello, {name}! Welcome."
|
|
5
|
-
`}))];function C(e,t){let n={...e};for(let[e,r]of Object.entries(t))typeof r==`object`&&r&&!Array.isArray(r)&&typeof n[e]==`object`&&n[e]!=null&&!Array.isArray(n[e])?n[e]=C(n[e],r):n[e]=r;return n}var ye=n.agent_settings??{},w=ye.llm,be=typeof w?.model==`string`?w.model:`openhands/claude-opus-4-5-20251101`,T={model_name:`AgentSettings`,sections:[{key:`general`,label:`General`,fields:[{key:`enable_sub_agents`,label:`Enable sub-agents`,description:`Allow the agent to delegate work to specialized built-in sub-agents.`,section:`general`,section_label:`General`,value_type:`boolean`,default:!1,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!1},{key:`enable_switch_llm_tool`,label:`Enable LLM switching tool`,description:`Allow the agent to move the conversation to another saved LLM profile on its own.`,section:`general`,section_label:`General`,value_type:`boolean`,default:!0,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!1},{key:`tool_concurrency_limit`,label:`Parallel tool calls`,description:`Maximum number of tool calls to execute concurrently per agent step. 1 = sequential (default).`,section:`general`,section_label:`General`,value_type:`integer`,default:1,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!1}]},{key:`llm`,label:`LLM`,fields:[{key:`llm.model`,label:`Model`,description:`Select the model to use for this conversation.`,section:`llm`,section_label:`LLM`,value_type:`string`,default:be,choices:[],depends_on:[],prominence:`critical`,secret:!1,required:!0},{key:`llm.api_key`,label:`API Key`,description:`Provide the API key used to authenticate requests for the selected model.`,section:`llm`,section_label:`LLM`,value_type:`string`,default:null,choices:[],depends_on:[],prominence:`critical`,secret:!0,required:!1},{key:`llm.base_url`,description:`Override the model provider's default API base URL when needed.`,label:`Base URL`,section:`llm`,section_label:`LLM`,value_type:`string`,default:null,choices:[],depends_on:[],prominence:`critical`,secret:!1,required:!1},{key:`llm.temperature`,label:`Temperature`,description:`Adjust randomness for non-deterministic model outputs.`,section:`llm`,section_label:`LLM`,value_type:`number`,default:null,choices:[],depends_on:[],prominence:`minor`,secret:!1,required:!1}]},{key:`verification`,label:`Verification`,fields:[{key:`verification.critic_enabled`,label:`Enable Critic`,description:`Enable an additional critic pass to review the agent's work.`,section:`verification`,section_label:`Verification`,value_type:`boolean`,default:!1,choices:[],depends_on:[],prominence:`critical`,secret:!1,required:!1},{key:`verification.critic_mode`,label:`Critic Mode`,description:`Choose when the critic should review and intervene.`,section:`verification`,section_label:`Verification`,value_type:`string`,default:`finish_and_message`,choices:[{label:`finish_and_message`,value:`finish_and_message`},{label:`all_actions`,value:`all_actions`}],depends_on:[`verification.critic_enabled`],prominence:`major`,secret:!1,required:!1},{key:`verification.enable_iterative_refinement`,label:`Enable Iterative Refinement`,description:`Let the critic send the agent back to refine its work when issues are found.`,section:`verification`,section_label:`Verification`,value_type:`boolean`,default:!1,choices:[],depends_on:[`verification.critic_enabled`],prominence:`critical`,secret:!1,required:!1},{key:`verification.critic_api_key`,label:`Critic API Key`,description:`If OpenHands is selected as your active LLM provider, leave this empty; the critic reuses the OpenHands Provider LLM Key.`,section:`verification`,section_label:`Verification`,value_type:`string`,default:null,choices:[],depends_on:[`verification.critic_enabled`],prominence:`critical`,secret:!0,required:!1},{key:`verification.critic_threshold`,label:`Critic Threshold`,description:`Critic success threshold used for iterative refinement.`,section:`verification`,section_label:`Verification`,value_type:`number`,default:.6,choices:[],depends_on:[`verification.critic_enabled`,`verification.enable_iterative_refinement`],prominence:`minor`,secret:!1,required:!1},{key:`verification.max_refinement_iterations`,label:`Max Refinement Iterations`,description:`Maximum number of refinement attempts after critic feedback.`,section:`verification`,section_label:`Verification`,value_type:`integer`,default:3,choices:[],depends_on:[`verification.critic_enabled`,`verification.enable_iterative_refinement`],prominence:`minor`,secret:!1,required:!1},{key:`verification.critic_server_url`,label:`Critic Server URL`,description:`Override the critic service URL.`,section:`verification`,section_label:`Verification`,value_type:`string`,default:null,choices:[],depends_on:[`verification.critic_enabled`],prominence:`minor`,secret:!1,required:!1},{key:`verification.critic_model_name`,label:`Critic Model Name`,description:`Override the critic model name.`,section:`verification`,section_label:`Verification`,value_type:`string`,default:null,choices:[],depends_on:[`verification.critic_enabled`],prominence:`minor`,secret:!1,required:!1}]},{key:`condenser`,label:`Condenser`,fields:[{description:`Enable the default LLM-based condenser to summarize long conversation histories.`,key:`condenser.enable_default_condenser`,label:`Enable default condenser`,section:`condenser`,section_label:`Condenser`,value_type:`boolean`,default:!0,choices:[],depends_on:[],prominence:`critical`,secret:!1,required:!0},{description:`Maximum number of tokens the condenser keeps after summarization. Leave blank for unlimited.`,key:`condenser.condenser_max_size`,label:`Condenser max size`,section:`condenser`,section_label:`Condenser`,value_type:`integer`,default:null,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!1}]},{key:`agent_context`,label:`Memory`,fields:[{description:`The agent keeps notes under .openhands/memory/ and loads them at the start of each new conversation, learning your codebase and preferences over time.`,key:`agent_context.load_memory`,label:`Persistent memory`,section:`agent_context`,section_label:`Memory`,value_type:`boolean`,default:!1,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!1}]}]},E={model_name:`ConversationSettings`,sections:[{key:`general`,label:`General`,fields:[{key:`max_iterations`,label:`Max iterations`,section:`general`,description:`Maximum number of agent steps allowed before the conversation stops.`,section_label:`General`,value_type:`integer`,default:500,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!0}]},{key:`verification`,label:`Verification`,fields:[{key:`confirmation_mode`,label:`Confirmation mode`,description:`Pause for confirmation before the agent performs high-risk actions.`,section:`verification`,section_label:`Verification`,value_type:`boolean`,default:!1,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!0},{key:`security_analyzer`,label:`Security analyzer`,description:`Choose how OpenHands should analyze actions before asking for confirmation.`,section:`verification`,section_label:`Verification`,value_type:`string`,default:`llm`,choices:[{label:`llm`,value:`llm`},{label:`none`,value:`none`}],depends_on:[`confirmation_mode`],prominence:`major`,secret:!1,required:!1}]}]},D={...n,provider_tokens_set:{},agent_settings_schema:T,agent_settings:{...ye,verification:{critic_enabled:!1,enable_iterative_refinement:!1},llm:{...w??{},api_key:null,model:be},condenser:{enable_default_condenser:!0,condenser_max_size:null},enable_sub_agents:!1,tool_concurrency_limit:1},conversation_settings_schema:E,conversation_settings:{...n.conversation_settings??{}}},O={settings:structuredClone(D)},k={profiles:new Map,activeProfile:null},A=!1,j=e=>decodeURIComponent(String(Array.isArray(e)?e[0]??``:e??``)),xe=e=>({name:e.name,model:typeof e.config.model==`string`?e.config.model:null,base_url:typeof e.config.base_url==`string`?e.config.base_url:null,api_key_set:e.api_key_set}),Se=e=>{let t=O.settings||structuredClone(D);O.settings={...t,agent_settings:{...t.agent_settings??{},llm:structuredClone(e.config)},llm_api_key_set:e.api_key_set}},Ce=(e,t)=>{let n=structuredClone(e.config);return e.api_key_set&&`api_key`in n&&(t===`encrypted`?n.api_key=`gAAAAA_mock_encrypted_${e.name}`:t===`plaintext`||(n.api_key=null)),{name:e.name,config:n,api_key_set:e.api_key_set}},we=(e,t)=>{let n=structuredClone(t.llm??{});if(typeof n.model!=`string`||n.model.trim().length===0)return null;let r={name:e,config:n,api_key_set:typeof n.api_key==`string`&&n.api_key.trim().length>0};return k.profiles.set(e,r),k.activeProfile===e&&Se(r),r},M=[`anthropic/claude-3.5`,`anthropic/claude-sonnet-4-20250514`,`anthropic/claude-sonnet-4-5-20250929`,`anthropic/claude-haiku-4-5-20251001`,`anthropic/claude-opus-4-5-20251101`,`anthropic/claude-opus-4-8`,`openai/gpt-3.5-turbo`,`openai/gpt-5.5`,`openai/gpt-4o`,`openai/gpt-4o-mini`,`openhands/claude-sonnet-4-20250514`,`openhands/claude-sonnet-4-5-20250929`,`openhands/claude-haiku-4-5-20251001`,`openhands/claude-opus-4-5-20251101`,`openai/gpt-5.6-sol`,`openhands/deepseek-v4-flash`,`openhands/glm-5.2`,`sambanova/Meta-Llama-3.1-8B-Instruct`],Te=[`gpt-5.2`,`gpt-5.3-codex`],Ee=new Set([`anthropic/claude-opus-4-5-20251101`,`anthropic/claude-opus-4-8`,`anthropic/claude-sonnet-4-5-20250929`,`openai/gpt-5.5`,`openhands/claude-opus-4-5-20251101`,`openhands/claude-sonnet-4-5-20250929`,`openai/gpt-5.6-sol`,`openhands/deepseek-v4-flash`,`openhands/glm-5.2`]),De=new Set([`openhands/glm-5.2`]),Oe=`openhands/glm-5.2`,ke=[`openhands`,`anthropic`,`openai`,`mistral`,`gemini`,`deepseek`,`moonshot`,`minimax`],Ae=Array.from(new Set(M.map(e=>e.split(`/`)[0]).filter(e=>!!e))),je=M.reduce((e,t)=>{if(!Ee.has(t))return e;let[n,...r]=t.split(`/`);return!n||r.length===0?e:(e[n]??=[],e[n].push(r.join(`/`)),e)},{}),Me=`1.36.1`,Ne=[u.get(`*/server_info`,async()=>f.json({uptime:0,idle_time:0,version:Me,usable_tools:[`terminal`,`file_editor`,`task_tracker`,`browser_tool_set`],agents:[`CodeActAgent`],default_agent:`CodeActAgent`,models:M,security_analyzers:[`llm`,`none`]})),u.get(`*/api/llm/models`,async()=>f.json({models:M})),u.get(`*/api/llm/models/verified`,async()=>f.json({models:je})),u.get(`*/api/llm/providers`,async()=>f.json({providers:Ae})),u.get(`*${a}`,async()=>f.json({vendor:i,models:Te})),u.get(`*${c}`,async()=>f.json({connected:A,account_email:A?`mock-chatgpt@example.com`:null,expires_at:null})),u.post(`*${s}`,async()=>f.json({device_code:`mock-device-code`,user_code:`MOCK-CODE`,verification_uri:`https://auth.openai.com/activate`,verification_uri_complete:`https://auth.openai.com/activate?user_code=MOCK-CODE`,interval:1,expires_in:900})),u.post(`*${o}`,async()=>(A=!0,f.json({connected:!0,account_email:`mock-chatgpt@example.com`,expires_at:null}))),u.post(`*${r}`,async()=>(A=!1,f.json({connected:!1}))),u.get(`*/api/options/models`,async()=>f.json({models:M,verified_models:[`claude-opus-4-5-20251101`,`claude-sonnet-4-5-20250929`],verified_providers:ke,default_model:`openai/gpt-5.6-sol`})),u.get(`*/api/v1/config/providers/search`,async({request:e})=>{let t=new URL(e.url),n=t.searchParams.get(`query`)?.toLowerCase(),r=t.searchParams.get(`verified__eq`),i=new Set,a=[];for(let e of M){let[t]=e.split(`/`);t&&!i.has(t)&&(i.add(t),a.push({name:t,verified:ke.includes(t)}))}if(n&&(a=a.filter(e=>e.name.toLowerCase().includes(n))),r!=null){let e=r===`true`;a=a.filter(t=>t.verified===e)}return f.json({items:a,next_page_id:null})}),u.get(`*/api/v1/config/models/search`,async({request:e})=>{let t=new URL(e.url),n=t.searchParams.get(`query`)?.toLowerCase(),r=t.searchParams.get(`verified__eq`),i=t.searchParams.get(`provider__eq`),a=M.map(e=>{let[t,...n]=e.split(`/`),r=n.join(`/`);return{provider:t||null,name:r,verified:Ee.has(e),free:De.has(e),default:e===Oe}});if(i&&(a=a.filter(e=>e.provider===i)),n&&(a=a.filter(e=>e.name.toLowerCase().includes(n))),r!=null){let e=r===`true`;a=a.filter(t=>t.verified===e)}return f.json({items:a,next_page_id:null})}),u.get(`*/api/options/security-analyzers`,async()=>f.json([`llm`,`none`])),u.get(`*/api/profiles`,async()=>f.json({profiles:Array.from(k.profiles.values()).map(xe),active_profile:k.activeProfile})),u.get(`*/api/profiles/:name`,async({params:e,request:t})=>{let n=j(e.name),r=k.profiles.get(n);return r?f.json(Ce(r,t.headers.get(`X-Expose-Secrets`))):f.json({detail:`Profile '${n}' not found`},{status:404})}),u.post(`*/api/profiles/:name`,async({params:e,request:t})=>{let n=j(e.name),r=await t.json();if(!r)return f.json({detail:`Empty body`},{status:400});let i=we(n,r);return i?f.json({name:i.name,message:`Profile '${i.name}' saved`},{status:201}):f.json({detail:`Profile requires llm.model`},{status:400})}),u.delete(`*/api/profiles/:name`,async({params:e})=>{let t=j(e.name);return k.profiles.delete(t),k.activeProfile===t&&(k.activeProfile=null),f.json({name:t,message:`Profile '${t}' deleted`})}),u.post(`*/api/profiles/:name/rename`,async({params:e,request:t})=>{let n=j(e.name),r=(await t.json())?.new_name?.trim()??``,i=k.profiles.get(n);if(!i)return f.json({detail:`Profile '${n}' not found`},{status:404});if(!r)return f.json({detail:`new_name is required`},{status:400});if(r!==n&&k.profiles.has(r))return f.json({detail:`Profile '${r}' already exists`},{status:409});k.profiles.delete(n);let a={...i,name:r};return k.profiles.set(r,a),k.activeProfile===n&&(k.activeProfile=r,Se(a)),f.json({name:r,message:`Profile '${n}' renamed to '${r}'`})}),u.post(`*/api/profiles/:name/activate`,async({params:e})=>{let t=j(e.name),n=k.profiles.get(t);return n?(k.activeProfile=t,Se(n),f.json({name:t,message:`Profile '${t}' activated and applied to current settings`,llm_applied:!0})):f.json({detail:`Profile '${t}' not found`},{status:404})}),u.get(`*/api/v1/web-client/config`,()=>{let e={feature_flags:{hide_llm_settings:!1,hide_users_page:!1},providers_configured:[],maintenance_start_time:null,recaptcha_site_key:null,faulty_models:[],error_message:null,updated_at:new Date().toISOString()};return f.json(e)}),u.get(`*/api/settings/conversation-schema`,async()=>(await p(),f.json(E))),u.get(`*/api/v1/settings/conversation-schema`,async()=>(await p(),f.json(E))),u.get(`*/api/v1/settings`,async()=>{await p();let{settings:e}=O;return e?f.json(e):f.json(null,{status:404})}),u.get(`*/api/settings`,async({request:e})=>{if(new URL(e.url).pathname.split(`/`).filter(Boolean).length>2)return;await p();let{settings:t}=O,n={language:null,user_consents_to_analytics:null,enable_sound_notifications:null,git_user_name:null,git_user_email:null,title_llm_profile:null,disabled_skills:[]};if(!t)return f.json({agent_settings:{},conversation_settings:{},llm_api_key_is_set:!1,misc_settings:{app_preferences:n}});let r=e.headers.get(`X-Expose-Secrets`),i=structuredClone(t.agent_settings??{}),a=i.llm;a?.api_key&&(r===`encrypted`?a.api_key=`gAAAAA_mock_encrypted_${String(a.api_key).slice(0,8)}`:r===`plaintext`||(a.api_key=`**********`));let o=!!t.llm_api_key_set||!!t.agent_settings?.llm&&!!t.agent_settings.llm?.api_key,s=t.misc_settings,c={...n,...s?.app_preferences??{}};return f.json({agent_settings:i,conversation_settings:t.conversation_settings??{},llm_api_key_is_set:o,misc_settings:{app_preferences:c}})}),u.patch(`*/api/settings`,async({request:e})=>{await p();let t=await e.json();if(!t)return f.json({error:`Empty body`},{status:400});if(!t.agent_settings_diff&&!t.conversation_settings_diff&&!t.misc_settings_diff)return f.json({error:`At least one of agent_settings_diff, conversation_settings_diff, or misc_settings_diff must be provided`},{status:400});let n=O.settings||structuredClone(D),r={...n};if(t.agent_settings_diff){let e=C(n.agent_settings??{},t.agent_settings_diff);r.agent_settings=e;let i=e.llm;i?.api_key&&typeof i.api_key==`string`&&i.api_key.trim().length>0&&(r.llm_api_key_set=!0)}if(t.conversation_settings_diff&&(r.conversation_settings={...n.conversation_settings??{},...t.conversation_settings_diff}),t.misc_settings_diff){let e=n.misc_settings,i={...e??{}};t.misc_settings_diff.app_preferences&&(i.app_preferences={...e?.app_preferences??{},...t.misc_settings_diff.app_preferences}),r.misc_settings=i}return O.settings=r,f.json({agent_settings:r.agent_settings??{},conversation_settings:r.conversation_settings??{},llm_api_key_is_set:r.llm_api_key_set??!1,misc_settings:r.misc_settings??{app_preferences:{}}})}),u.post(`*/api/mcp/test`,async()=>(await p(),f.json({ok:!0,tools:[`mock_tool`]}))),u.get(`*/api/settings/agent-schema`,async()=>(await p(),f.json(T))),u.get(`*/api/v1/settings/agent-schema`,async()=>(await p(),f.json(T))),u.post(`*/api/v1/settings`,async({request:e})=>{await p();let t=await e.json();if(t){let e=O.settings||structuredClone(D);if(`agent_settings`in t||`conversation_settings`in t)return f.json({error:`Use *_diff nested settings payloads`,keys:[`agent_settings`,`conversation_settings`].filter(e=>e in t)},{status:422});let n={...e},r=t.agent_settings_diff;r&&(n.agent_settings=C(e.agent_settings??{},r));let i=t.conversation_settings_diff;i&&(n.conversation_settings={...e.conversation_settings??{},...i});for(let[e,r]of Object.entries(t))e!==`agent_settings_diff`&&e!==`conversation_settings_diff`&&e!==`agent_settings_schema`&&e!==`conversation_settings_schema`&&(n[e]=r);return O.settings=n,f.json(null,{status:200})}return f.json(null,{status:400})}),u.post(`*/api/mcp/test`,async()=>(await p(),f.json({ok:!0,tools:[]})))],Pe=`table-demo`,Fe=`Can you compare several coding agents in a wide table?`,Ie=[`Here is a wide comparison table. Scroll horizontally to read every column:`,``,`| Feature | OpenHands | Claude Code | Codex | Gemini CLI | Cursor | Windsurf | Cline | Aider | Devin | Continue |`,`| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |`,`| CLI | Yes | Yes | Yes | Yes | IDE | IDE | IDE | Terminal | Cloud | IDE |`,`| MCP support | Yes | Yes | Partial | Partial | Yes | Yes | Yes | No | Yes | Yes |`,`| Local models | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes |`,`| Browser tools | Yes | Yes | Yes | Limited | Yes | Yes | Yes | No | Yes | Yes |`,`| Git integration | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |`,`| Best for | General coding | Anthropic stack | OpenAI stack | Google stack | IDE users | IDE users | VS Code | Terminal | Autonomous | IDE users |`].join(`
|
|
5
|
+
`}))];function C(e,t){let n={...e};for(let[e,r]of Object.entries(t))typeof r==`object`&&r&&!Array.isArray(r)&&typeof n[e]==`object`&&n[e]!=null&&!Array.isArray(n[e])?n[e]=C(n[e],r):n[e]=r;return n}var ye=n.agent_settings??{},w=ye.llm,be=typeof w?.model==`string`?w.model:`openhands/claude-opus-4-5-20251101`,T={model_name:`AgentSettings`,sections:[{key:`general`,label:`General`,fields:[{key:`enable_sub_agents`,label:`Enable sub-agents`,description:`Allow the agent to delegate work to specialized built-in sub-agents.`,section:`general`,section_label:`General`,value_type:`boolean`,default:!1,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!1},{key:`enable_switch_llm_tool`,label:`Enable LLM switching tool`,description:`Allow the agent to move the conversation to another saved LLM profile on its own.`,section:`general`,section_label:`General`,value_type:`boolean`,default:!0,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!1},{key:`tool_concurrency_limit`,label:`Parallel tool calls`,description:`Maximum number of tool calls to execute concurrently per agent step. 1 = sequential (default).`,section:`general`,section_label:`General`,value_type:`integer`,default:1,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!1}]},{key:`llm`,label:`LLM`,fields:[{key:`llm.model`,label:`Model`,description:`Select the model to use for this conversation.`,section:`llm`,section_label:`LLM`,value_type:`string`,default:be,choices:[],depends_on:[],prominence:`critical`,secret:!1,required:!0},{key:`llm.api_key`,label:`API Key`,description:`Provide the API key used to authenticate requests for the selected model.`,section:`llm`,section_label:`LLM`,value_type:`string`,default:null,choices:[],depends_on:[],prominence:`critical`,secret:!0,required:!1},{key:`llm.base_url`,description:`Override the model provider's default API base URL when needed.`,label:`Base URL`,section:`llm`,section_label:`LLM`,value_type:`string`,default:null,choices:[],depends_on:[],prominence:`critical`,secret:!1,required:!1},{key:`llm.temperature`,label:`Temperature`,description:`Adjust randomness for non-deterministic model outputs.`,section:`llm`,section_label:`LLM`,value_type:`number`,default:null,choices:[],depends_on:[],prominence:`minor`,secret:!1,required:!1}]},{key:`verification`,label:`Verification`,fields:[{key:`verification.critic_enabled`,label:`Enable Critic`,description:`Enable an additional critic pass to review the agent's work.`,section:`verification`,section_label:`Verification`,value_type:`boolean`,default:!1,choices:[],depends_on:[],prominence:`critical`,secret:!1,required:!1},{key:`verification.critic_mode`,label:`Critic Mode`,description:`Choose when the critic should review and intervene.`,section:`verification`,section_label:`Verification`,value_type:`string`,default:`finish_and_message`,choices:[{label:`finish_and_message`,value:`finish_and_message`},{label:`all_actions`,value:`all_actions`}],depends_on:[`verification.critic_enabled`],prominence:`major`,secret:!1,required:!1},{key:`verification.enable_iterative_refinement`,label:`Enable Iterative Refinement`,description:`Let the critic send the agent back to refine its work when issues are found.`,section:`verification`,section_label:`Verification`,value_type:`boolean`,default:!1,choices:[],depends_on:[`verification.critic_enabled`],prominence:`critical`,secret:!1,required:!1},{key:`verification.critic_api_key`,label:`Critic API Key`,description:`If OpenHands is selected as your active LLM provider, leave this empty; the critic reuses the OpenHands Provider LLM Key.`,section:`verification`,section_label:`Verification`,value_type:`string`,default:null,choices:[],depends_on:[`verification.critic_enabled`],prominence:`critical`,secret:!0,required:!1},{key:`verification.critic_threshold`,label:`Critic Threshold`,description:`Critic success threshold used for iterative refinement.`,section:`verification`,section_label:`Verification`,value_type:`number`,default:.6,choices:[],depends_on:[`verification.critic_enabled`,`verification.enable_iterative_refinement`],prominence:`minor`,secret:!1,required:!1},{key:`verification.max_refinement_iterations`,label:`Max Refinement Iterations`,description:`Maximum number of refinement attempts after critic feedback.`,section:`verification`,section_label:`Verification`,value_type:`integer`,default:3,choices:[],depends_on:[`verification.critic_enabled`,`verification.enable_iterative_refinement`],prominence:`minor`,secret:!1,required:!1},{key:`verification.critic_server_url`,label:`Critic Server URL`,description:`Override the critic service URL.`,section:`verification`,section_label:`Verification`,value_type:`string`,default:null,choices:[],depends_on:[`verification.critic_enabled`],prominence:`minor`,secret:!1,required:!1},{key:`verification.critic_model_name`,label:`Critic Model Name`,description:`Override the critic model name.`,section:`verification`,section_label:`Verification`,value_type:`string`,default:null,choices:[],depends_on:[`verification.critic_enabled`],prominence:`minor`,secret:!1,required:!1}]},{key:`condenser`,label:`Condenser`,fields:[{description:`Enable the default LLM-based condenser to summarize long conversation histories.`,key:`condenser.enable_default_condenser`,label:`Enable default condenser`,section:`condenser`,section_label:`Condenser`,value_type:`boolean`,default:!0,choices:[],depends_on:[],prominence:`critical`,secret:!1,required:!0},{description:`Maximum number of tokens the condenser keeps after summarization. Leave blank for unlimited.`,key:`condenser.condenser_max_size`,label:`Condenser max size`,section:`condenser`,section_label:`Condenser`,value_type:`integer`,default:null,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!1}]},{key:`agent_context`,label:`Memory`,fields:[{description:`The agent keeps notes under .openhands/memory/ and loads them at the start of each new conversation, learning your codebase and preferences over time.`,key:`agent_context.load_memory`,label:`Persistent memory`,section:`agent_context`,section_label:`Memory`,value_type:`boolean`,default:!1,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!1}]}]},E={model_name:`ConversationSettings`,sections:[{key:`general`,label:`General`,fields:[{key:`max_iterations`,label:`Max iterations`,section:`general`,description:`Maximum number of agent steps allowed before the conversation stops.`,section_label:`General`,value_type:`integer`,default:500,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!0}]},{key:`verification`,label:`Verification`,fields:[{key:`confirmation_mode`,label:`Confirmation mode`,description:`Pause for confirmation before the agent performs high-risk actions.`,section:`verification`,section_label:`Verification`,value_type:`boolean`,default:!1,choices:[],depends_on:[],prominence:`major`,secret:!1,required:!0},{key:`security_analyzer`,label:`Security analyzer`,description:`Choose how OpenHands should analyze actions before asking for confirmation.`,section:`verification`,section_label:`Verification`,value_type:`string`,default:`llm`,choices:[{label:`llm`,value:`llm`},{label:`none`,value:`none`}],depends_on:[`confirmation_mode`],prominence:`major`,secret:!1,required:!1}]}]},D={...n,provider_tokens_set:{},agent_settings_schema:T,agent_settings:{...ye,verification:{critic_enabled:!1,enable_iterative_refinement:!1},llm:{...w??{},api_key:null,model:be},condenser:{enable_default_condenser:!0,condenser_max_size:null},enable_sub_agents:!1,tool_concurrency_limit:1},conversation_settings_schema:E,conversation_settings:{...n.conversation_settings??{}}},O={settings:structuredClone(D)},k={profiles:new Map,activeProfile:null},A=!1,j=e=>decodeURIComponent(String(Array.isArray(e)?e[0]??``:e??``)),xe=e=>({name:e.name,model:typeof e.config.model==`string`?e.config.model:null,base_url:typeof e.config.base_url==`string`?e.config.base_url:null,api_key_set:e.api_key_set}),Se=e=>{let t=O.settings||structuredClone(D);O.settings={...t,agent_settings:{...t.agent_settings??{},llm:structuredClone(e.config)},llm_api_key_set:e.api_key_set}},Ce=(e,t)=>{let n=structuredClone(e.config);return e.api_key_set&&`api_key`in n&&(t===`encrypted`?n.api_key=`gAAAAA_mock_encrypted_${e.name}`:t===`plaintext`||(n.api_key=null)),{name:e.name,config:n,api_key_set:e.api_key_set}},we=(e,t)=>{let n=structuredClone(t.llm??{});if(typeof n.model!=`string`||n.model.trim().length===0)return null;let r={name:e,config:n,api_key_set:typeof n.api_key==`string`&&n.api_key.trim().length>0};return k.profiles.set(e,r),k.activeProfile===e&&Se(r),r},M=[`anthropic/claude-3.5`,`anthropic/claude-sonnet-4-20250514`,`anthropic/claude-sonnet-4-5-20250929`,`anthropic/claude-haiku-4-5-20251001`,`anthropic/claude-opus-4-5-20251101`,`anthropic/claude-opus-4-8`,`openai/gpt-3.5-turbo`,`openai/gpt-5.5`,`openai/gpt-4o`,`openai/gpt-4o-mini`,`openhands/claude-sonnet-4-20250514`,`openhands/claude-sonnet-4-5-20250929`,`openhands/claude-haiku-4-5-20251001`,`openhands/claude-opus-4-5-20251101`,`openai/gpt-5.6-sol`,`openai/gpt-6-astra`,`openhands/deepseek-v4-flash`,`openhands/glm-5.2`,`sambanova/Meta-Llama-3.1-8B-Instruct`],Te=[`gpt-5.2`,`gpt-5.3-codex`],Ee=new Set([`anthropic/claude-opus-4-5-20251101`,`anthropic/claude-opus-4-8`,`anthropic/claude-sonnet-4-5-20250929`,`openai/gpt-5.5`,`openhands/claude-opus-4-5-20251101`,`openhands/claude-sonnet-4-5-20250929`,`openai/gpt-5.6-sol`,`openai/gpt-6-astra`,`openhands/deepseek-v4-flash`,`openhands/glm-5.2`]),De=new Set([`openhands/glm-5.2`]),Oe=`openhands/glm-5.2`,ke=[`openhands`,`anthropic`,`openai`,`mistral`,`gemini`,`deepseek`,`moonshot`,`minimax`],Ae=Array.from(new Set(M.map(e=>e.split(`/`)[0]).filter(e=>!!e))),je=M.reduce((e,t)=>{if(!Ee.has(t))return e;let[n,...r]=t.split(`/`);return!n||r.length===0?e:(e[n]??=[],e[n].push(r.join(`/`)),e)},{}),Me=`1.36.1`,Ne=[u.get(`*/server_info`,async()=>f.json({uptime:0,idle_time:0,version:Me,usable_tools:[`terminal`,`file_editor`,`task_tracker`,`browser_tool_set`],agents:[`CodeActAgent`],default_agent:`CodeActAgent`,models:M,security_analyzers:[`llm`,`none`]})),u.get(`*/api/llm/models`,async()=>f.json({models:M})),u.get(`*/api/llm/models/verified`,async()=>f.json({models:je})),u.get(`*/api/llm/providers`,async()=>f.json({providers:Ae})),u.get(`*${a}`,async()=>f.json({vendor:i,models:Te})),u.get(`*${c}`,async()=>f.json({connected:A,account_email:A?`mock-chatgpt@example.com`:null,expires_at:null})),u.post(`*${s}`,async()=>f.json({device_code:`mock-device-code`,user_code:`MOCK-CODE`,verification_uri:`https://auth.openai.com/activate`,verification_uri_complete:`https://auth.openai.com/activate?user_code=MOCK-CODE`,interval:1,expires_in:900})),u.post(`*${o}`,async()=>(A=!0,f.json({connected:!0,account_email:`mock-chatgpt@example.com`,expires_at:null}))),u.post(`*${r}`,async()=>(A=!1,f.json({connected:!1}))),u.get(`*/api/options/models`,async()=>f.json({models:M,verified_models:[`claude-opus-4-5-20251101`,`claude-sonnet-4-5-20250929`],verified_providers:ke,default_model:`openai/gpt-5.6-sol`})),u.get(`*/api/v1/config/providers/search`,async({request:e})=>{let t=new URL(e.url),n=t.searchParams.get(`query`)?.toLowerCase(),r=t.searchParams.get(`verified__eq`),i=new Set,a=[];for(let e of M){let[t]=e.split(`/`);t&&!i.has(t)&&(i.add(t),a.push({name:t,verified:ke.includes(t)}))}if(n&&(a=a.filter(e=>e.name.toLowerCase().includes(n))),r!=null){let e=r===`true`;a=a.filter(t=>t.verified===e)}return f.json({items:a,next_page_id:null})}),u.get(`*/api/v1/config/models/search`,async({request:e})=>{let t=new URL(e.url),n=t.searchParams.get(`query`)?.toLowerCase(),r=t.searchParams.get(`verified__eq`),i=t.searchParams.get(`provider__eq`),a=M.map(e=>{let[t,...n]=e.split(`/`),r=n.join(`/`);return{provider:t||null,name:r,verified:Ee.has(e),free:De.has(e),default:e===Oe}});if(i&&(a=a.filter(e=>e.provider===i)),n&&(a=a.filter(e=>e.name.toLowerCase().includes(n))),r!=null){let e=r===`true`;a=a.filter(t=>t.verified===e)}return f.json({items:a,next_page_id:null})}),u.get(`*/api/options/security-analyzers`,async()=>f.json([`llm`,`none`])),u.get(`*/api/profiles`,async()=>f.json({profiles:Array.from(k.profiles.values()).map(xe),active_profile:k.activeProfile})),u.get(`*/api/profiles/:name`,async({params:e,request:t})=>{let n=j(e.name),r=k.profiles.get(n);return r?f.json(Ce(r,t.headers.get(`X-Expose-Secrets`))):f.json({detail:`Profile '${n}' not found`},{status:404})}),u.post(`*/api/profiles/:name`,async({params:e,request:t})=>{let n=j(e.name),r=await t.json();if(!r)return f.json({detail:`Empty body`},{status:400});let i=we(n,r);return i?f.json({name:i.name,message:`Profile '${i.name}' saved`},{status:201}):f.json({detail:`Profile requires llm.model`},{status:400})}),u.delete(`*/api/profiles/:name`,async({params:e})=>{let t=j(e.name);return k.profiles.delete(t),k.activeProfile===t&&(k.activeProfile=null),f.json({name:t,message:`Profile '${t}' deleted`})}),u.post(`*/api/profiles/:name/rename`,async({params:e,request:t})=>{let n=j(e.name),r=(await t.json())?.new_name?.trim()??``,i=k.profiles.get(n);if(!i)return f.json({detail:`Profile '${n}' not found`},{status:404});if(!r)return f.json({detail:`new_name is required`},{status:400});if(r!==n&&k.profiles.has(r))return f.json({detail:`Profile '${r}' already exists`},{status:409});k.profiles.delete(n);let a={...i,name:r};return k.profiles.set(r,a),k.activeProfile===n&&(k.activeProfile=r,Se(a)),f.json({name:r,message:`Profile '${n}' renamed to '${r}'`})}),u.post(`*/api/profiles/:name/activate`,async({params:e})=>{let t=j(e.name),n=k.profiles.get(t);return n?(k.activeProfile=t,Se(n),f.json({name:t,message:`Profile '${t}' activated and applied to current settings`,llm_applied:!0})):f.json({detail:`Profile '${t}' not found`},{status:404})}),u.get(`*/api/v1/web-client/config`,()=>{let e={feature_flags:{hide_llm_settings:!1,hide_users_page:!1},providers_configured:[],maintenance_start_time:null,recaptcha_site_key:null,faulty_models:[],error_message:null,updated_at:new Date().toISOString()};return f.json(e)}),u.get(`*/api/settings/conversation-schema`,async()=>(await p(),f.json(E))),u.get(`*/api/v1/settings/conversation-schema`,async()=>(await p(),f.json(E))),u.get(`*/api/v1/settings`,async()=>{await p();let{settings:e}=O;return e?f.json(e):f.json(null,{status:404})}),u.get(`*/api/settings`,async({request:e})=>{if(new URL(e.url).pathname.split(`/`).filter(Boolean).length>2)return;await p();let{settings:t}=O,n={language:null,user_consents_to_analytics:null,enable_sound_notifications:null,git_user_name:null,git_user_email:null,title_llm_profile:null,disabled_skills:[]};if(!t)return f.json({agent_settings:{},conversation_settings:{},llm_api_key_is_set:!1,misc_settings:{app_preferences:n}});let r=e.headers.get(`X-Expose-Secrets`),i=structuredClone(t.agent_settings??{}),a=i.llm;a?.api_key&&(r===`encrypted`?a.api_key=`gAAAAA_mock_encrypted_${String(a.api_key).slice(0,8)}`:r===`plaintext`||(a.api_key=`**********`));let o=!!t.llm_api_key_set||!!t.agent_settings?.llm&&!!t.agent_settings.llm?.api_key,s=t.misc_settings,c={...n,...s?.app_preferences??{}};return f.json({agent_settings:i,conversation_settings:t.conversation_settings??{},llm_api_key_is_set:o,misc_settings:{app_preferences:c}})}),u.patch(`*/api/settings`,async({request:e})=>{await p();let t=await e.json();if(!t)return f.json({error:`Empty body`},{status:400});if(!t.agent_settings_diff&&!t.conversation_settings_diff&&!t.misc_settings_diff)return f.json({error:`At least one of agent_settings_diff, conversation_settings_diff, or misc_settings_diff must be provided`},{status:400});let n=O.settings||structuredClone(D),r={...n};if(t.agent_settings_diff){let e=C(n.agent_settings??{},t.agent_settings_diff);r.agent_settings=e;let i=e.llm;i?.api_key&&typeof i.api_key==`string`&&i.api_key.trim().length>0&&(r.llm_api_key_set=!0)}if(t.conversation_settings_diff&&(r.conversation_settings={...n.conversation_settings??{},...t.conversation_settings_diff}),t.misc_settings_diff){let e=n.misc_settings,i={...e??{}};t.misc_settings_diff.app_preferences&&(i.app_preferences={...e?.app_preferences??{},...t.misc_settings_diff.app_preferences}),r.misc_settings=i}return O.settings=r,f.json({agent_settings:r.agent_settings??{},conversation_settings:r.conversation_settings??{},llm_api_key_is_set:r.llm_api_key_set??!1,misc_settings:r.misc_settings??{app_preferences:{}}})}),u.post(`*/api/mcp/test`,async()=>(await p(),f.json({ok:!0,tools:[`mock_tool`]}))),u.get(`*/api/settings/agent-schema`,async()=>(await p(),f.json(T))),u.get(`*/api/v1/settings/agent-schema`,async()=>(await p(),f.json(T))),u.post(`*/api/v1/settings`,async({request:e})=>{await p();let t=await e.json();if(t){let e=O.settings||structuredClone(D);if(`agent_settings`in t||`conversation_settings`in t)return f.json({error:`Use *_diff nested settings payloads`,keys:[`agent_settings`,`conversation_settings`].filter(e=>e in t)},{status:422});let n={...e},r=t.agent_settings_diff;r&&(n.agent_settings=C(e.agent_settings??{},r));let i=t.conversation_settings_diff;i&&(n.conversation_settings={...e.conversation_settings??{},...i});for(let[e,r]of Object.entries(t))e!==`agent_settings_diff`&&e!==`conversation_settings_diff`&&e!==`agent_settings_schema`&&e!==`conversation_settings_schema`&&(n[e]=r);return O.settings=n,f.json(null,{status:200})}return f.json(null,{status:400})}),u.post(`*/api/mcp/test`,async()=>(await p(),f.json({ok:!0,tools:[]})))],Pe=`table-demo`,Fe=`Can you compare several coding agents in a wide table?`,Ie=[`Here is a wide comparison table. Scroll horizontally to read every column:`,``,`| Feature | OpenHands | Claude Code | Codex | Gemini CLI | Cursor | Windsurf | Cline | Aider | Devin | Continue |`,`| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |`,`| CLI | Yes | Yes | Yes | Yes | IDE | IDE | IDE | Terminal | Cloud | IDE |`,`| MCP support | Yes | Yes | Partial | Partial | Yes | Yes | Yes | No | Yes | Yes |`,`| Local models | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes |`,`| Browser tools | Yes | Yes | Yes | Limited | Yes | Yes | Yes | No | Yes | Yes |`,`| Git integration | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |`,`| Best for | General coding | Anthropic stack | OpenAI stack | Google stack | IDE users | IDE users | VS Code | Terminal | Autonomous | IDE users |`].join(`
|
|
6
6
|
`),Le=Date.UTC(2026,5,23,12,0,0);function Re(e,t,n,r){return{id:e,timestamp:new Date(Le+r*6e4).toISOString(),source:t===`user`?`user`:`agent`,llm_message:{role:t,content:[{type:`text`,text:n}]},activated_skills:[],extended_content:[]}}var ze=[Re(`table-demo-user-1`,`user`,Fe,0),Re(`table-demo-agent-1`,`assistant`,Ie,1)],Be=`canvas-demo`,N=`canvas.md`,P=[`# Agent Canvas Demo`,``,`This report was generated by the agent and opened from the file chip in chat.`,``,`## Release snapshot`,``,`| Area | Status | Next step |`,`| --- | --- | --- |`,`| Conversation UX | Ready | Validate the drawer flow |`,`| Markdown preview | Ready | Review rich rendering |`,`| Accessibility | Ready | Confirm keyboard navigation |`,``,`## Highlights`,``,`- The artifact stays in the conversation workspace.`,`- The chat chip is the compact entry point.`,`- The Files drawer provides the full rich Markdown view.`].join(`
|
|
7
7
|
`),Ve=Date.UTC(2026,6,29,12,0,0),F=e=>new Date(Ve+e*1e3).toISOString();function He(e,t,n,r){return{id:e,timestamp:F(r),source:t===`user`?`user`:`agent`,llm_message:{role:t,content:[{type:`text`,text:n}]},activated_skills:[],extended_content:[]}}var Ue={id:`canvas-demo-action`,timestamp:F(1),source:`agent`,thought:[],thinking_blocks:[],action:{kind:`FileEditorAction`,command:`create`,path:N,file_text:P,old_str:null,new_str:null,insert_line:null,view_range:null},tool_name:`file_editor`,tool_call_id:`canvas-demo-tool-call`,tool_call:{id:`canvas-demo-tool-call`,type:`function`,function:{name:`file_editor`,arguments:JSON.stringify({command:`create`,path:N})}},llm_response_id:`canvas-demo-response`,security_risk:t.LOW},We={id:`canvas-demo-observation`,timestamp:F(2),source:`environment`,tool_name:`file_editor`,tool_call_id:`canvas-demo-tool-call`,action_id:Ue.id,observation:{kind:`FileEditorObservation`,command:`create`,output:`Created ${N}`,path:N,prev_exist:!1,old_content:null,new_content:P,error:null}},Ge=[He(`canvas-demo-user`,`user`,`Create a concise project canvas as a Markdown report.`,0),Ue,We,He(`canvas-demo-agent`,`assistant`,`I generated the project canvas. Open it from the file chip above.`,3)],Ke={[Pe]:ze,[Be]:Ge},I=Date.now(),qe=`pagination-local`,L=`pagination-cloud`,Je=100,Ye=500,Xe=Date.UTC(2026,4,13,0,0,0),Ze=[{id:`1`,title:`My New Project`,created_at:new Date(I).toISOString(),updated_at:new Date(I).toISOString(),execution_status:`waiting_for_confirmation`,tags:{project:`vault`,work:``}},{id:`2`,title:`Repo Testing`,created_at:new Date(I-2880*60*1e3).toISOString(),updated_at:new Date(I-2880*60*1e3).toISOString(),execution_status:`idle`,selected_repository:`octocat/hello-world`,git_provider:`github`},{id:`3`,title:`Another Project`,created_at:new Date(I-7200*60*1e3).toISOString(),updated_at:new Date(I-7200*60*1e3).toISOString(),execution_status:`idle`,selected_repository:`octocat/earth`,selected_branch:`main`},{id:`4`,title:`Archived Project`,created_at:new Date(I-14400*60*1e3).toISOString(),updated_at:new Date(I-14400*60*1e3).toISOString(),execution_status:`idle`,sandbox_status:`MISSING`},{id:`5`,title:`Errored Project`,created_at:new Date(I-10080*60*1e3).toISOString(),updated_at:new Date(I-10080*60*1e3).toISOString(),execution_status:`idle`,sandbox_status:`ERROR`},{id:qe,title:`Local pagination fixture`,created_at:new Date(I-8640*60*1e3).toISOString(),updated_at:new Date(I-8640*60*1e3).toISOString(),execution_status:`idle`,workspace:{working_dir:`/workspace/project`}},{id:Pe,title:`Wide table demo`,created_at:new Date(I-1440*60*1e3).toISOString(),updated_at:new Date(I-1440*60*1e3).toISOString(),execution_status:`idle`,workspace:{working_dir:`/workspace/project`}},{id:Be,title:`Generated canvas demo`,created_at:new Date(I-720*60*1e3).toISOString(),updated_at:new Date(I-720*60*1e3).toISOString(),execution_status:`idle`,workspace:{working_dir:`/workspace/project`}}],R=new Map(Ze.map(e=>[e.id,e])),Qe=new Map([[qe,et(`Local pagination message`)],[L,et(`Cloud pagination message`)]]);function $e(e,t){return{id:`${t.toLowerCase().replaceAll(` `,`-`)}-${e}`,timestamp:new Date(Xe+e*6e4).toISOString(),source:`agent`,llm_message:{role:`assistant`,content:[{type:`text`,text:`${t} ${e}`}]},activated_skills:[],extended_content:[]}}function et(e){return Array.from({length:Je},(t,n)=>$e(n+1,e))}function tt(e,t){let n=Number(t.get(`limit`)??`100`),r=t.get(`timestamp__lt`),i=t.get(`sort_order`),a=[...r?e.filter(e=>(e.timestamp??``)<r):e].sort((e,t)=>i===`TIMESTAMP_DESC`?(t.timestamp??``).localeCompare(e.timestamp??``):(e.timestamp??``).localeCompare(t.timestamp??``));return{items:a.slice(0,n),next_page_id:a.length>n?`next-page`:null}}async function nt(e,t){let n=Qe.get(e);return n?(t.has(`timestamp__lt`)&&await p(Ye),tt(n,t)):null}function rt(){let t=new Date(I-8640*60*1e3).toISOString();return{id:L,created_by_user_id:null,selected_repository:null,selected_branch:null,git_provider:null,title:`Cloud pagination fixture`,trigger:null,pr_number:[],llm_model:`openhands/claude-haiku-4-5-20251001`,metrics:null,created_at:t,updated_at:t,execution_status:e.IDLE,conversation_url:null,session_api_key:null,sandbox_id:null,workspace:{working_dir:`/workspace/project`},public:!1,sub_conversation_ids:[]}}var it=rt();function z(e){return{id:e.id,title:e.title??null,created_at:e.created_at,updated_at:e.updated_at,execution_status:e.execution_status??`idle`,sandbox_status:e.sandbox_status??null,metrics:e.metrics??null,agent:e.agent??null,workspace:e.workspace??null,tags:e.tags??null}}function at(e){return!e||e.length===0?Array.from(R.values()).map(z):e.map(e=>{let t=R.get(e);return t?z(t):null})}var ot=[u.get(`*/api/conversations/search`,async({request:e})=>{let t=new URL(e.url),n=Number(t.searchParams.get(`limit`)??`20`),r=Array.from(R.values()).sort((e,t)=>t.updated_at.localeCompare(e.updated_at)).slice(0,n).map(z);return f.json({items:r,next_page_id:null})}),u.get(`*/api/conversations`,async({request:e})=>{let t=new URL(e.url),n=t.searchParams.getAll(`ids[]`).length>0?t.searchParams.getAll(`ids[]`):t.searchParams.getAll(`ids`);return f.json(at(n))}),u.get(`*/api/conversations/:conversationId`,async({params:e})=>{let t=e.conversationId,n=R.get(t);return n?f.json(z(n)):f.json(null,{status:404})}),u.post(`*/api/conversations`,async()=>{await p();let e={id:`${Math.floor(Math.random()*1e5)}`,title:`New Conversation`,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),execution_status:`idle`};return R.set(e.id,e),f.json(z(e),{status:201})}),u.patch(`/api/conversations/:conversationId`,async({params:e,request:t})=>{let n=e.conversationId,r=R.get(n);if(r){let e=await t.json();if(e?.title||e?.tags)return R.set(n,{...r,...e.title?{title:e.title}:{},...e.tags?{tags:e.tags}:{},updated_at:new Date().toISOString()}),f.json(null,{status:200})}return f.json(null,{status:404})}),u.delete(`*/api/conversations/:conversationId`,async({params:e})=>{let t=e.conversationId;return R.has(t)?(R.delete(t),f.json(null,{status:200})):f.json(null,{status:404})}),u.get(`*/api/conversations/:conversationId/events/count`,async()=>f.json(0)),u.get(`*/api/conversations/:conversationId/events/search`,async({params:e,request:t})=>{let n=e.conversationId,r=new URL(t.url).searchParams,i=await nt(n,r);if(i)return f.json(i);let a=Ke[n];return a?f.json(tt(a,r)):f.json({items:[],next_page_id:null})}),u.post(`*/api/conversations/:conversationId/events`,async()=>f.json({ok:!0})),u.get(`*/api/conversations/:conversationId/workspace/*`,({params:e,request:t})=>{let n=e.conversationId?.toString(),r=new URL(t.url);return n===`canvas-demo`&&r.pathname.endsWith(`/canvas.md`)?f.text(P,{headers:{"Content-Type":`text/markdown; charset=utf-8`}}):d()}),u.post(`*/api/conversations/:conversationId/pause`,async()=>f.json({success:!0})),u.post(`*/api/conversations/:conversationId/interrupt`,async()=>f.json({success:!0})),u.post(`*/api/conversations/:conversationId/run`,async()=>f.json({success:!0})),u.post(`*/api/cloud-proxy`,async({request:e})=>{let t=(await e.json()).path??`/`,n=new URL(t,`https://mock-cloud.test`);if(n.pathname===`/api/v1/app-conversations`){let e=n.searchParams.getAll(`ids`);if(e.length>0)return f.json(e.map(e=>e===L?it:null))}if(n.pathname===`/api/v1/app-conversations/search`)return f.json({items:[it],next_page_id:null});if(n.pathname===`/api/v1/conversation/${L}/events/search`){let e=await nt(L,n.searchParams);return f.json(e)}return n.pathname===`/api/v1/settings`?f.json({llm_model:`openhands/claude-haiku-4-5-20251001`,llm_base_url:``,llm_api_key:null,llm_api_key_set:!1,search_api_key_set:!1,agent:`CodeActAgent`,language:`en`,user_consents_to_analytics:!1,provider_tokens_set:{github:``}}):n.pathname===`/api/keys/current`?f.json({id:`mock-key`,name:`Mock key`,org_id:`org-1`,user_id:`user-1`,auth_type:`api_key`}):n.pathname===`/api/organizations`?f.json({items:[{id:`org-1`,name:`Mock Org`,is_personal:!0}],current_org_id:`org-1`}):n.pathname===`/api/organizations/org-1/me`?f.json({org_id:`org-1`,user_id:`org-1`}):n.pathname===`/api/authenticate`?f.json({ok:!0}):f.json({})}),u.post(`*/api/conversations/:conversationId/ask_agent`,async()=>f.json({response:`Mock agent response`})),u.get(`*/api/vscode/url`,async()=>f.json({url:null})),u.post(`*/api/skills`,async()=>f.json({skills:[]})),u.post(`/api/v1/conversations/:conversationId/pending-messages`,async()=>f.json({id:`mock-pending-id`,position:0}))],st=[u.post(`*/api/cloud-proxy`,()=>f.json({error:`cloud proxy not available in mock mode`},{status:503})),u.get(`*/api/user/info`,()=>f.json({id:`1`,login:`octocat`,avatar_url:`https://avatars.githubusercontent.com/u/583231?v=4`,company:`GitHub`,email:`placeholder@placeholder.placeholder`,name:`monalisa octocat`})),u.post(`*/api/authenticate`,async()=>f.json({message:`Authenticated`})),u.post(`*/api/logout`,()=>f.json(null,{status:200}))],ct=[u.post(`*/api/submit-feedback`,async()=>(await p(1200),f.json({statusCode:200,body:{message:`Success`,link:`fake-url.com`,password:`abc123`}}))),u.post(`*/api/submit-feedback`,async()=>f.json({statusCode:200},{status:200}))],lt=[u.post(`https://us.i.posthog.com/e`,async()=>f.json(null,{status:200})),u.post(`https://z.openhands.dev/*`,async()=>f.json(null,{status:200}))],B=new Date().toISOString(),V=e=>new Date(Date.now()-e*864e5).toISOString(),ut={automations:[{id:`a1000000-0000-0000-0000-000000000001`,name:`PR Triage Digest`,trigger:{type:`cron`,schedule:`0 9 * * 1-5`,schedule_human:`Weekdays at 09:00`},enabled:!0,repository:`acme/frontend-app`,model:`triage-fast`,timeout:600,created_at:V(90),updated_at:B,prompt:`Review newly opened pull requests in acme/frontend-app, identify risky changes, summarize likely impact, and prepare a concise digest with priority ordering for the engineering review channel.`,branch:`main`,plugins:[`GitHub`,`Slack`,`Linear`],notification:`Slack digest to #eng-reviews`,timezone:`America/Los_Angeles`,last_triggered_at:V(0)},{id:`a1000000-0000-0000-0000-000000000002`,name:`Nightly Security Pass`,trigger:{type:`cron`,schedule:`30 1 * * *`,schedule_human:`Daily at 01:30`},enabled:!0,repository:`acme/backend-api`,model:`security-careful`,timeout:900,created_at:V(60),updated_at:B,prompt:`Scan the acme/backend-api repository for known security vulnerabilities, outdated dependencies, and insecure code patterns. Produce a prioritized remediation summary.`,branch:`main`,plugins:[`GitHub`],notification:`Email to security-team@acme.com`,timezone:`UTC`,last_triggered_at:V(0)},{id:`a1000000-0000-0000-0000-000000000003`,name:`Docs Sync on Push`,trigger:{type:`cron`,schedule:`*/5 * * * *`,schedule_human:`Runs on every push`},enabled:!0,repository:`acme/docs`,model:`docs-fast`,created_at:V(45),updated_at:B,prompt:`Monitor acme/docs for new pushes. For each push, generate a changelog-ready summary of what changed and why.`,branch:`main`,plugins:[`GitHub`,`Slack`],notification:`Slack to #docs-updates`,timezone:`America/New_York`,last_triggered_at:V(1)},{id:`a1000000-0000-0000-0000-000000000004`,name:`Release Readiness Review`,trigger:{type:`cron`,schedule:`0 11 * * 5`,schedule_human:`Fridays at 11:00`},enabled:!1,repository:`acme/realtime-service`,model:`release-review`,created_at:V(80),updated_at:B,prompt:`Compile a release readiness report: list open blockers, active incidents, and pending approvals for acme/realtime-service.`,branch:`release`,plugins:[`GitHub`,`Linear`],notification:`Slack to #releases`,timezone:`America/Chicago`,last_triggered_at:V(14)},{id:`a1000000-0000-0000-0000-000000000005`,name:`Incident Webhook Summary`,trigger:{type:`cron`,schedule:`0 */2 * * *`,schedule_human:`On incident webhook`},enabled:!1,repository:`acme/incident-service`,model:`incident-summary`,created_at:V(30),updated_at:B,prompt:`Summarize incoming incident webhooks, categorize by severity, and post a digest to the on-call Slack channel.`,branch:`main`,plugins:[`Slack`],notification:`Slack to #oncall`,timezone:`UTC`,last_triggered_at:null},{id:`a1000000-0000-0000-0000-000000000006`,name:`PR Review on Open`,trigger:{type:`event`,source:`github`,on:`pull_request.opened`,filter:`repository.full_name == 'acme/frontend-app'`},enabled:!0,repository:`acme/frontend-app`,model:`review-fast`,timeout:1800,created_at:V(15),updated_at:B,prompt:`When a new PR is opened, perform a thorough code review focusing on correctness, security, and performance. Post findings as inline comments.`,branch:`main`,plugins:[`GitHub`],notification:`GitHub PR comment`,last_triggered_at:V(0),preset_metadata:{template:{id:`github-pr-reviewer`,version:`1.0.0`,config:{}}}},{id:`a1000000-0000-0000-0000-000000000007`,name:`Release Notes Generator`,trigger:{type:`event`,source:`github`,on:`release.published`,filter:`glob(release.tag_name, 'v*') && !release.prerelease`},enabled:!0,repository:`acme/backend-api`,model:`docs-fast`,created_at:V(10),updated_at:B,prompt:`Generate comprehensive release notes from the commits since the last release. Include breaking changes, new features, and bug fixes.`,branch:`main`,plugins:[`GitHub`],notification:`GitHub release body update`,last_triggered_at:V(3)}],total:7},dt=(e,t=9)=>{let n=new Date(Date.now()-e*864e5);return n.setHours(t,0,0,0),n.toISOString()},ft=e=>new Date(Date.now()-e*6e4).toISOString();function pt(e,t){return e?{phase_code:e.code,phase_label:e.label,phase_updated_at:e.ageMinutes===void 0?t:ft(e.ageMinutes)}:{}}function H(e,t,n,r=9,i=!0,a){let o=dt(n,r);return{id:e,status:t,conversation_id:i?`conv-${e}`:null,bash_command_id:i?`cmd-${e}`:null,error_detail:t===l.FAILED?`Process exited with code 1`:null,...pt(a,o),started_at:o,completed_at:new Date(new Date(o).getTime()+12e4).toISOString()}}function U(e,t,n,r=!0,i){let a=ft(n);return{id:e,status:t,conversation_id:r?`conv-${e}`:null,bash_command_id:r?`cmd-${e}`:null,error_detail:null,...pt(i,a),started_at:a,completed_at:null}}var mt={"a1000000-0000-0000-0000-000000000001":[H(`r1-01`,l.COMPLETED,0),H(`r1-02`,l.COMPLETED,1),H(`r1-03`,l.FAILED,2,9,!0,{code:`sandbox_provisioning`,label:null}),H(`r1-04`,l.COMPLETED,3,9,!0,{code:`running_agent`,label:null}),H(`r1-05`,l.COMPLETED,4),H(`r1-06`,l.COMPLETED,7),H(`r1-07`,l.FAILED,8),H(`r1-08`,l.COMPLETED,9),H(`r1-09`,l.COMPLETED,10),H(`r1-10`,l.COMPLETED,11)],"a1000000-0000-0000-0000-000000000002":[U(`r2-00`,l.PENDING,2,!1,{code:`queued`,label:null}),H(`r2-01`,l.COMPLETED,0,1),H(`r2-02`,l.COMPLETED,1,1),H(`r2-03`,l.COMPLETED,2,1),H(`r2-04`,l.FAILED,3,1),H(`r2-05`,l.COMPLETED,4,1)],"a1000000-0000-0000-0000-000000000003":[U(`r3-00`,l.RUNNING,52,!0,{code:`diffing_docs_tree`,label:`Diffing 340 changed files against main`,ageMinutes:41}),H(`r3-01`,l.COMPLETED,1),H(`r3-02`,l.CANCELLED,2),H(`r3-03`,l.SKIPPED,3,9,!1)],"a1000000-0000-0000-0000-000000000004":[H(`r4-01`,l.FAILED,14,11,!1),H(`r4-02`,l.COMPLETED,21,11)],"a1000000-0000-0000-0000-000000000005":[],"a1000000-0000-0000-0000-000000000006":[U(`r6-00`,l.RUNNING,13,!0,{code:null,label:`Running QA checks on PR #4821`,ageMinutes:4}),U(`r6-06`,l.RUNNING,6,!0,{code:`checking_out`,label:null,ageMinutes:2}),U(`r6-07`,l.RUNNING,21),H(`r6-01`,l.COMPLETED,0,14),H(`r6-02`,l.COMPLETED,0,11),H(`r6-03`,l.FAILED,1,16),H(`r6-04`,l.COMPLETED,2,10),H(`r6-05`,l.COMPLETED,3,9)],"a1000000-0000-0000-0000-000000000007":[H(`r7-01`,l.COMPLETED,3,15),H(`r7-02`,l.COMPLETED,10,12)]},W=te.responses.supported.body,ht=/^(?:\*|\*\/(\d+)) \* \* \* \*$/;function gt(e){let t=ht.exec(e.trim());return t?(t[1]?Number(t[1]):1)*60:null}var _t=W.eventTypes.filter(e=>e!==`pull_request_review_comment.created`);function vt(e){if(!e)return[];let t=W.triggers.cron;if(e.type===`cron`&&e.schedule&&t){let n=gt(e.schedule);if(n!==null&&n<t.minIntervalSeconds)return[{field:`trigger.schedule`,code:`interval_too_short`,message:`Minimum interval for this deployment is ${t.minIntervalSeconds/60} minutes.`}]}return e.type===`event`&&e.on&&!_t.includes(e.on)?[{field:`trigger.on`,code:`event_type_not_delivered`,message:`No ${e.source===`github`?`GitHub`:e.source} webhook delivering ${e.on} is registered for this organization.`}]:[]}var G=new Map(ut.automations.map(e=>[e.id,{...e}])),yt=[u.get(`*/api/automation/health`,async()=>(await p(100),f.json({status:`ok`}))),u.get(`*/api/automation/v1`,async({request:e})=>{await p(300);let t=new URL(e.url),n=Number(t.searchParams.get(`limit`)??`50`),r=Number(t.searchParams.get(`offset`)??`0`),i=Array.from(G.values()),a={automations:i.slice(r,r+n),total:i.length};return f.json(a)}),u.get(`*/api/automation/v1/capabilities`,async()=>(await p(200),f.json(W))),u.post(`*/api/automation/v1/validate`,async({request:e})=>{await p(200);let t=vt((await e.clone().json()).draft?.trigger),n={valid:t.length===0,errors:t};return f.json(n)}),u.post(`*/api/automation/v1/uploads`,async({request:e})=>{await p(200);let t=new URL(e.url).searchParams.get(`name`)||`automation`;return f.json({tarball_path:`oh-internal://uploads/${encodeURIComponent(t)}-${crypto.randomUUID()}.tar.gz`})}),u.post(`*/api/automation/v1`,async({request:e})=>{await p(200);let t=await e.clone().json(),n=new Date().toISOString(),r={id:crypto.randomUUID(),name:t.name,prompt:null,model:t.model??null,trigger:t.trigger,enabled:!0,created_at:n,updated_at:n,last_triggered_at:null,...typeof t.timeout==`number`&&{timeout:t.timeout},...typeof t.trigger.timezone==`string`&&{timezone:t.trigger.timezone}};return G.set(r.id,r),f.json(r,{status:201})}),u.post(`*/api/automation/v1/preset/:kind`,async({params:e,request:t})=>{await p(200);let n=await t.clone().json(),r=new Date().toISOString(),i={id:crypto.randomUUID(),name:n.name,prompt:n.prompt,model:n.model??null,trigger:n.trigger,enabled:!0,created_at:r,updated_at:r,last_triggered_at:null,...n.repos?.[0]&&{repository:n.repos[0].url,branch:n.repos[0].ref},...n.plugins&&{plugins:n.plugins.map(e=>e.source)},...typeof n.timeout==`number`&&{timeout:n.timeout},...typeof n.trigger.timezone==`string`&&{timezone:n.trigger.timezone}};return e.kind!==`prompt`&&e.kind!==`plugin`?f.json({detail:`Unknown preset kind`},{status:404}):(G.set(i.id,i),f.json(i,{status:201}))}),u.get(`*/api/automation/v1/:id/runs`,async({params:e,request:t})=>{await p(200);let n=e.id;if(!G.has(n))return f.json({detail:`Automation not found`},{status:404});let r=new URL(t.url),i=Number(r.searchParams.get(`limit`)??`50`),a=Number(r.searchParams.get(`offset`)??`0`),o=mt[n]??[],s=o.slice(a,a+i),c={};for(let e of o)c[e.status]=(c[e.status]??0)+1;let l={runs:s,total:o.length,status_counts:c};return f.json(l)}),u.get(`*/api/automation/v1/:id`,async({params:e})=>{await p(200);let t=G.get(e.id);return t?f.json(t):f.json({detail:`Automation not found`},{status:404})}),u.patch(`*/api/automation/v1/:id`,async({params:e,request:t})=>{await p(200);let n=e.id,r=await t.clone().json(),i=G.get(n);if(!i)return f.json({detail:`Automation not found`},{status:404});let a={...i,...r,updated_at:new Date().toISOString()};return G.set(n,a),f.json(a)}),u.post(`*/api/automation/v1/:id/dispatch`,async({params:e})=>{await p(200);let t=e.id;if(!G.get(t))return f.json({detail:`Automation not found`},{status:404});let n={id:crypto.randomUUID(),status:l.PENDING,conversation_id:null,bash_command_id:null,error_detail:null,phase_code:null,phase_label:null,phase_updated_at:null,started_at:new Date().toISOString(),completed_at:null};return f.json(n,{status:201})}),u.delete(`*/api/automation/v1/:id`,async({params:e})=>{await p(200);let t=e.id;return G.has(t)?(G.delete(t),new f(null,{status:204})):f.json({detail:`Automation not found`},{status:404})})],bt={ok:!0,tools:[]},xt=[u.post(`*/api/mcp/test`,async()=>f.json(bt))],K=[],q=[];function St(){return{workspaces:K.map(e=>({...e})),workspaceParents:q.map(e=>({...e}))}}var Ct=[u.get(`*/api/workspaces`,async()=>f.json(St())),u.post(`*/api/workspaces`,async({request:e})=>{let t=await e.json();for(let e of t.workspaces??[]){let t=K.findIndex(t=>t.path===e.path);t>=0?K[t]={...e}:K.push({...e})}return f.json(St())}),u.delete(`*/api/workspaces`,async({request:e})=>{let t=new URL(e.url).searchParams.get(`path`),n=K.length;return K=K.filter(e=>e.path!==t),f.json({deleted:K.length!==n})}),u.post(`*/api/workspaces/parents`,async({request:e})=>{let t=await e.json();for(let e of t.parents??[]){let t=q.findIndex(t=>t.path===e.path);t>=0?q[t]={...e}:q.push({...e})}return f.json(St())}),u.delete(`*/api/workspaces/parents`,async({request:e})=>{let t=new URL(e.url).searchParams.get(`path`),n=q.length;return q=q.filter(e=>e.path!==t),f.json({deleted:q.length!==n})}),u.post(`*/api/auth/workspace-session`,async()=>f.json({ok:!0})),u.delete(`*/api/auth/workspace-session`,async()=>new f(null,{status:204}))],wt=`{
|
|
8
8
|
"schema_version": 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./useTranslation-CCgUjPJF.js";import{K as n,t as r}from"./utils-
|
|
1
|
+
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./useTranslation-CCgUjPJF.js";import{K as n,t as r}from"./utils-D-gOfhmN.js";import{t as i}from"./external-link-Bd7Tga-1.js";import{C as a}from"./markdown-renderer-BH5pqDuJ.js";import{t as o}from"./conversation-tab-empty-state-DIhwCC2J.js";import{t as s}from"./vendor~browser-tab-C5uuAxZX.js";var c=e();function l({src:e}){let{t:r}=t(`openhands`);return(0,c.jsx)(`img`,{src:e,className:`block w-full h-auto`,alt:r(n.BROWSER$SCREENSHOT_ALT)})}function u({url:e,hasPage:a}){let{t:o}=t(`openhands`),s=r(`shrink-0 inline-flex items-center justify-center w-6 h-6 rounded-md`,`text-[var(--oh-text-tertiary)] opacity-40 cursor-not-allowed`),l=`w-3.5 h-3.5`;return(0,c.jsxs)(`div`,{className:`flex w-full min-h-[34px] shrink-0 items-center gap-1 border-b border-[var(--oh-border)] px-2 py-1.5`,"data-testid":`browser-chrome-bar`,children:[(0,c.jsx)(`div`,{className:r(`flex min-h-7 min-w-0 flex-1 items-center rounded-md border border-[var(--oh-border)]`,`bg-[var(--oh-surface-raised)] px-2 text-xs leading-5`,e?`text-[var(--oh-text-tertiary)]`:`text-[var(--oh-text-dim)]`),"data-testid":`browser-chrome-url`,title:e||void 0,children:(0,c.jsx)(`span`,{className:`truncate`,children:e||o(n.BROWSER$URL_PLACEHOLDER)})}),a&&e?(0,c.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,"aria-label":o(n.BUTTON$OPEN_IN_NEW_TAB),title:o(n.BUTTON$OPEN_IN_NEW_TAB),"data-testid":`browser-chrome-open-external`,className:r(`shrink-0 inline-flex items-center justify-center w-6 h-6 rounded-md`,`text-[var(--oh-text-tertiary)] hover:bg-tertiary cursor-pointer`),children:(0,c.jsx)(i,{className:l,"aria-hidden":!0,strokeWidth:2})}):(0,c.jsx)(`button`,{type:`button`,disabled:!0,"aria-label":o(n.BUTTON$OPEN_IN_NEW_TAB),title:o(n.BUTTON$OPEN_IN_NEW_TAB),className:s,children:(0,c.jsx)(i,{className:l,"aria-hidden":!0,strokeWidth:2})})]})}function d(){let{t:e}=t(`openhands`);return(0,c.jsx)(o,{icon:(0,c.jsx)(s,{}),children:e(n.BROWSER$NO_PAGE_LOADED)})}function f(){let{url:e,screenshotSrc:t}=a(),n=!!t,r=t?.startsWith(`data:image/png;base64,`)?t:`data:image/png;base64,${t??``}`;return(0,c.jsxs)(`div`,{className:`flex h-full min-h-0 w-full flex-col text-[var(--oh-muted)]`,children:[(0,c.jsx)(u,{url:e,hasPage:n}),(0,c.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto scrollbar-hide bg-[var(--oh-surface)]`,children:t?(0,c.jsx)(l,{src:r}):(0,c.jsx)(d,{})})]})}function p(){return(0,c.jsx)(f,{})}export{p as default};
|
package/build/assets/{canvas-extension-page-BsUGBb1T.js → canvas-extension-page-CokKSVRG.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{B as r,R as i,U as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{t as o}from"./useTranslation-CCgUjPJF.js";import{K as s}from"./utils-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{B as r,R as i,U as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{t as o}from"./useTranslation-CCgUjPJF.js";import{K as s}from"./utils-D-gOfhmN.js";import{t as c}from"./loading-spinner-DK1sAwVg.js";import{n as l}from"./canvas-extensions-runtime-Du2M5iEX.js";var u=e(t(),1),d=n(),f=a(function(){let{t:e}=o(`openhands`),t=r(),n=i(),a=t.extensionName??``,f=t[`*`]??``,{pages:p,activating:m,errors:h}=l(),g=u.useRef(null),[_,v]=u.useState(null),y=u.useMemo(()=>p.filter(e=>e.extension.name===a).sort((e,t)=>t.contribution.path.length-e.contribution.path.length).find(e=>f===e.contribution.path||f.startsWith(`${e.contribution.path}/`)),[a,p,f]);if(u.useEffect(()=>{let e=g.current;if(!e||!y)return;let t=!1,r;v(null),e.replaceChildren();let i=f.slice(y.contribution.path.length).replace(/^\/+/,``);return Promise.resolve().then(()=>y.mount({container:e,path:i,navigate:e=>n(e)})).then(e=>{typeof e==`function`&&(t?e():r=e)}).catch(e=>{t||v(e instanceof Error?e.message:`Extension page failed.`)}),()=>{t=!0;try{r?.()}catch(e){console.error(`Canvas Extension page cleanup failed`,e)}e.replaceChildren()}},[n,y,f]),m&&!y)return(0,d.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,d.jsx)(c,{size:`large`})});let b=_??h.get(a);return b||!y?(0,d.jsx)(`main`,{className:`flex h-full items-center justify-center p-8`,children:(0,d.jsxs)(`div`,{className:`max-w-lg rounded-xl border border-[var(--oh-border)] bg-base-secondary p-6 text-center`,children:[(0,d.jsx)(`h1`,{className:`text-lg font-semibold text-white`,children:e(s.SETUP$UNAVAILABLE_TITLE)}),(0,d.jsx)(`p`,{className:`mt-2 text-sm text-tertiary-light`,children:b||e(s.SETTINGS$APPS_PAGE_UNAVAILABLE)})]})}):(0,d.jsx)(`main`,{"aria-label":y.contribution.title,className:`h-full min-h-0 overflow-auto`,children:(0,d.jsx)(`div`,{ref:g,className:`min-h-full`})})});export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{U as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{f as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js";import{t as a}from"./useMutation-Cszf8mKy.js";import{t as o}from"./useTranslation-CCgUjPJF.js";import{ct as s,dt as c,j as l,n as u,st as d}from"./active-backend-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{U as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{f as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ew9ih1s8-40UR63Gt.js";import{t as a}from"./useMutation-Cszf8mKy.js";import{t as o}from"./useTranslation-CCgUjPJF.js";import{ct as s,dt as c,j as l,n as u,st as d}from"./active-backend-context-BsLfwrXB.js";import{K as f,t as p}from"./utils-D-gOfhmN.js";import{p as m}from"./agent-server-client-options-EHB23gyx.js";import{n as h}from"./extensions-navigation-CgCVSXje.js";import{t as g}from"./external-link-Bd7Tga-1.js";import{t as _}from"./modal-backdrop-BSzNhM4r.js";import{n as v}from"./modal-classes-jvG85nkU.js";import{t as y}from"./brand-button-mQq2Ld1I.js";import{t as b}from"./modal-close-button-BrM5fNnn.js";import{t as x}from"./settings-input-Cm4VxUon.js";import{t as S}from"./confirmation-modal-BmVt_c0I.js";import{t as C}from"./toggle-switch-DeiG9Mf6.js";import{i as w,n as T,r as E,t as D}from"./use-canvas-extensions-BMacwi2v.js";import{a as O,i as k,n as A,o as j,t as M}from"./extension-module-card-classes-DpeaYhYo.js";import{n as N,t as P}from"./api-error-message-BXo0lCI5.js";import{n as F}from"./settings-like-page-layout-classes-Cw4Yzv_P.js";var I=e(t(),1);function L(){let e=i();return()=>e.invalidateQueries({queryKey:l.all})}function R(){let e=L(),{t}=o(`openhands`);return a({meta:{disableToast:!0},mutationFn:e=>T.install(e),onSuccess:()=>{e(),s(t(f.SETTINGS$APPS_INSTALL_SUCCESS))},onError:e=>{d(P(e)?N(e,t(f.ERROR$GENERIC)):c(e)||t(f.ERROR$GENERIC))}})}function z(){let e=L();return a({mutationFn:({name:e,enabled:t})=>T.setEnabled(e,t),onSuccess:()=>void e()})}function B(){let e=L(),{t}=o(`openhands`);return a({mutationFn:e=>T.uninstall(e),onSuccess:()=>{e(),s(t(f.SETTINGS$APPS_UNINSTALL_SUCCESS))}})}var V=n();function H({onClose:e}){let{t}=o(`openhands`),n=R(),[r,i]=I.useState(``),[a,s]=I.useState(``),[c,l]=I.useState(``),u=r.trim(),d=u.length>0&&!n.isPending;return(0,V.jsx)(_,{onClose:e,"aria-label":t(f.SETTINGS$APPS_ADD_BUTTON),children:(0,V.jsxs)(`form`,{onSubmit:t=>{t.preventDefault(),d&&n.mutate({source:u,ref:a.trim()||null,repo_path:c.trim()||null},{onSuccess:e})},"data-testid":`add-canvas-extension-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,V.jsx)(b,{onClose:e,testId:`add-canvas-extension-modal-close`}),(0,V.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,V.jsx)(`h2`,{className:p(`pr-6`,v),children:t(f.SETTINGS$APPS_ADD_BUTTON)}),(0,V.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:t(f.SETTINGS$APPS_ADD_MODAL_INTRO)})]}),(0,V.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,V.jsx)(x,{testId:`add-canvas-extension-source-input`,label:t(f.SETTINGS$APPS_SOURCE_LABEL),type:`text`,value:r,onChange:i,placeholder:t(f.SETTINGS$PLUGINS_SOURCE_PLACEHOLDER),showRequiredTag:!0}),(0,V.jsx)(x,{testId:`add-canvas-extension-ref-input`,label:t(f.SETTINGS$PLUGINS_REF_LABEL),type:`text`,value:a,onChange:s,showOptionalTag:!0}),(0,V.jsx)(x,{testId:`add-canvas-extension-repo-path-input`,label:t(f.SETTINGS$PLUGINS_REPO_PATH_LABEL),type:`text`,value:c,onChange:l,showOptionalTag:!0})]}),(0,V.jsxs)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:[(0,V.jsx)(y,{type:`button`,variant:`secondary`,onClick:e,testId:`add-canvas-extension-dismiss`,children:t(f.BUTTON$CLOSE)}),(0,V.jsx)(y,{type:`submit`,variant:`primary`,testId:`add-canvas-extension-submit`,isDisabled:!d,children:t(n.isPending?f.SETTINGS$PLUGINS_INSTALLING:f.SETTINGS$PLUGINS_INSTALL)})]})]})})}function U({extension:e,isBusy:t,onToggle:n,onUninstall:r}){let{t:i}=o(`openhands`),a=e.manifest?.contributes?.pages??[],s=e.manifest?.display_name||e.name;return(0,V.jsxs)(`article`,{"data-testid":`canvas-extension-card-${e.name}`,className:`flex min-w-0 flex-col gap-4 p-4 ${O}`,children:[(0,V.jsxs)(`header`,{className:`flex items-start justify-between gap-4`,children:[(0,V.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`h3`,{className:`truncate text-sm font-semibold text-white`,children:s}),(0,V.jsx)(`p`,{className:`mt-0.5 truncate text-xs text-tertiary-alt`,children:e.source})]}),(0,V.jsx)(C,{enabled:e.enabled,label:i(e.enabled?f.COMMON$DISABLE:f.COMMON$ENABLE),onToggle:n,className:t?`pointer-events-none opacity-50`:void 0})]}),e.description||e.manifest?.description?(0,V.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:e.description||e.manifest?.description}):null,(0,V.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,V.jsx)(`span`,{className:k,children:e.enabled?i(f.SETTINGS$SKILLS_ENABLED):i(f.SETTINGS$SKILLS_DISABLED)}),(0,V.jsx)(`span`,{className:k,children:i(f.SETTINGS$SKILLS_VERSION,{version:e.version})}),a.length?(0,V.jsxs)(`span`,{className:k,children:[i(f.SETTINGS$APPS_PAGES),`: `,a.length]}):null]}),(0,V.jsxs)(`dl`,{className:`grid min-w-0 grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs`,children:[e.resolved_ref?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`dt`,{className:`text-tertiary-alt`,children:i(f.SETTINGS$PLUGINS_REF_LABEL)}),(0,V.jsx)(`dd`,{className:`min-w-0 truncate font-mono text-tertiary-light`,children:e.resolved_ref})]}):null,e.repo_path?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`dt`,{className:`text-tertiary-alt`,children:i(f.SETTINGS$PLUGINS_REPO_PATH_LABEL)}),(0,V.jsx)(`dd`,{className:`min-w-0 truncate text-tertiary-light`,children:e.repo_path})]}):null]}),a.length?(0,V.jsx)(`section`,{className:`flex min-w-0 flex-col gap-2`,children:(0,V.jsx)(`ul`,{className:`flex flex-wrap gap-2`,children:a.map(e=>(0,V.jsx)(`li`,{className:k,children:e.title},e.id))})}):null,(0,V.jsx)(`footer`,{className:`flex justify-end gap-2 border-t border-[var(--oh-border)] pt-3`,children:(0,V.jsx)(y,{type:`button`,variant:`ghost-danger`,testId:`canvas-extension-uninstall-${e.name}`,isDisabled:t,onClick:r,children:i(f.SETTINGS$PLUGINS_UNINSTALL)})})]})}var W=`https://docs.openhands.dev/openhands/usage/agent-canvas/canvas-extensions`,G=r(function(){let{t:e}=o(`openhands`),{backend:t}=u(),[n,r]=I.useState(!1),[i,a]=I.useState(null),s=D(),c=z(),l=B(),d=!m(t)&&t.kind===`local`,_=!d||w(s.error),v=c.isPending||l.isPending,b=()=>{i&&(i.type===`enable`?c.mutate({name:i.extension.name,enabled:!0},{onSuccess:()=>a(null)}):l.mutate(i.extension.name,{onSuccess:()=>a(null)}))},x=i?i.extension.manifest?.display_name||i.extension.name:``,C=i?.type===`enable`?e(f.SETTINGS$APPS_ENABLE_CONFIRM):i?.type===`uninstall`?e(f.SETTINGS$APPS_UNINSTALL_CONFIRM,{name:x}):``;return(0,V.jsxs)(`div`,{"data-testid":`canvas-extensions-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,V.jsx)(h,{}),(0,V.jsx)(`main`,{className:p(F,`h-full`),children:(0,V.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,V.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,V.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(f.SETTINGS$APPS_PAGE_TITLE)}),(0,V.jsx)(`p`,{className:`max-w-2xl text-sm text-tertiary-light`,children:e(f.SETTINGS$APPS_PAGE_DESCRIPTION)}),(0,V.jsxs)(`a`,{href:W,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-sm text-primary hover:underline`,children:[e(f.SETTINGS$APPS_BUILD_LINK),(0,V.jsx)(g,{className:`size-3.5`,"aria-hidden":!0})]})]}),(0,V.jsx)(y,{type:`button`,variant:`secondary`,testId:`canvas-extensions-add-button`,isDisabled:!d||_||s.isLoading,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>r(!0),children:e(f.SETTINGS$APPS_ADD_BUTTON)})]}),(0,V.jsx)(`div`,{className:`rounded-xl border border-amber-400/30 bg-amber-400/5 px-4 py-3 text-sm text-amber-100`,children:e(f.SETTINGS$APPS_TRUST_NOTICE)}),(0,V.jsx)(`h3`,{className:`text-base font-semibold text-foreground`,children:e(f.SETTINGS$APPS_INSTALLED)}),_?(0,V.jsxs)(`div`,{className:j,children:[(0,V.jsx)(`h3`,{className:`text-sm font-semibold text-white`,children:e(f.SETUP$UNAVAILABLE_TITLE)}),(0,V.jsx)(`p`,{className:`mt-2 text-sm text-tertiary-light`,children:w(s.error)?s.error.message:t.kind===`cloud`?new E(`cloud-backend`).message:new E(`no-backend`).message})]}):s.isLoading?(0,V.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2].map(e=>(0,V.jsx)(`div`,{className:`h-40 animate-pulse rounded-xl bg-base-secondary`},e))}):s.isError?(0,V.jsxs)(`div`,{className:j,children:[(0,V.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:s.error instanceof Error?s.error.message:e(f.ERROR$GENERIC)}),(0,V.jsx)(y,{type:`button`,variant:`secondary`,className:`mt-4`,onClick:()=>void s.refetch(),children:e(f.AUTOMATIONS$ERROR_RETRY)})]}):s.data?.length?(0,V.jsx)(`div`,{className:A,children:(0,V.jsx)(`div`,{className:M,children:s.data.map(e=>(0,V.jsx)(U,{extension:e,isBusy:v,onToggle:()=>{e.enabled?c.mutate({name:e.name,enabled:!1}):a({type:`enable`,extension:e})},onUninstall:()=>a({type:`uninstall`,extension:e})},e.name))})}):(0,V.jsx)(`div`,{className:j,children:(0,V.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(f.SETTINGS$APPS_EMPTY)})})]})}),n?(0,V.jsx)(H,{onClose:()=>r(!1)}):null,i?(0,V.jsx)(S,{text:C,onCancel:()=>a(null),onConfirm:b,confirmText:i.type===`enable`?e(f.SETTINGS$APPS_ENABLE_ACTION):void 0,isConfirming:v}):null]})});export{G as default};
|
package/build/assets/{canvas-extensions-runtime-B8kxM4rO.js → canvas-extensions-runtime-Du2M5iEX.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
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{n as a}from"./active-backend-context-
|
|
1
|
+
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{n as a}from"./active-backend-context-BsLfwrXB.js";import{n as o,t as s}from"./use-canvas-extensions-BMacwi2v.js";var c=e(t(),1),l=class extends Error{constructor(e){super(e),this.name=`InvalidCanvasExtensionModuleError`}};function u(e){if(typeof e!=`object`||!e||!(`activate`in e)||typeof e.activate!=`function`)throw new l(`Canvas Extension entrypoint must export an "activate" function.`)}async function d(e){let t=new Blob([e],{type:`text/javascript`}),r=URL.createObjectURL(t);try{let e=await n(()=>import(r),[]);return u(e),e}finally{URL.revokeObjectURL(r)}}var f=r(),p={pages:[],activating:!1,errors:new Map},m=c.createContext(p);function h(){return c.useContext(m)}function g(e){return/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(e)}function _(e,t){return`/extensions/${encodeURIComponent(e)}/${t.split(`/`).map(encodeURIComponent).join(`/`)}`}function v(e,t){let n=e.manifest?.contributes?.pages?.find(e=>e.id===t);if(!n)throw Error(`Extension ${e.name} registered undeclared page "${t}".`);let r=n.path.replace(/^\/+/,``);if(!g(e.name)||!g(n.id)||!r.split(`/`).every(g))throw Error(`Extension ${e.name} has an invalid page name, id, or path.`);return{...n,path:r}}function y({children:e,moduleLoader:t=d}){let n=a(),r=i(),l=s(),[u,p]=c.useState([]),[h,g]=c.useState(new Map),[y,b]=c.useState(!1),x=c.useMemo(()=>(l.data??[]).filter(e=>e.enabled),[l.data]),S=c.useMemo(()=>JSON.stringify({backendId:n.backend.id,backendKind:n.backend.kind,connectionRevision:n.backend.connectionRevision??0,orgId:n.orgId,extensions:x.map(e=>({name:e.name,version:e.version,resolvedRef:e.resolved_ref??null,pages:e.manifest?.contributes?.pages??[]}))}),[n.backend.id,n.backend.kind,n.backend.connectionRevision,n.orgId,x]),C=c.useRef(n);C.current=n;let w=c.useRef(x);w.current=x,c.useEffect(()=>{let e=!1,n=[],{backend:i,orgId:a}=C.current,s=w.current;return p([]),g(new Map),b(s.length>0),Promise.all(s.map(async s=>{let c=new Map,l=[];try{let u=await o.fetchBundle(s.name,i);if(e)return;let d=await t(u);if(e)return;let f={apiVersion:`1`,extension:Object.freeze({name:s.name,version:s.version,resolvedRef:s.resolved_ref??null}),backend:Object.freeze({id:i.id,kind:i.kind,orgId:a}),registerPage:(e,t)=>{if(c.has(e))throw Error(`Extension ${s.name} registered page "${e}" more than once.`);let n=v(s,e),r={extension:s,contribution:n,mount:t,href:_(s.name,n.path)};c.set(e,r);let i=()=>c.delete(e);return l.push(i),i},navigate:e=>r(e),agentServer:{request:e=>o.requestAgentServer(e,i)}},m=await d.activate(f);if(e){typeof m==`function`&&m();return}typeof m==`function`&&n.push(m),n.push(...l),p(e=>[...e.filter(e=>e.extension.name!==s.name),...c.values()])}catch(t){if(l.forEach(e=>e()),e)return;let n=t instanceof Error?t.message:`Extension activation failed.`;g(e=>{let t=new Map(e);return t.set(s.name,n),t})}})).finally(()=>{e||b(!1)}),()=>{e=!0,p([]);for(let e of n.reverse())try{e()}catch(e){console.error(`Canvas Extension cleanup failed`,e)}}},[S,t,r]);let T=c.useMemo(()=>({pages:u,activating:y,errors:h}),[u,y,h]);return(0,f.jsx)(m.Provider,{value:T,children:e})}export{h as n,y as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{i as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{t as n}from"./utils-
|
|
1
|
+
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{i as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{t as n}from"./utils-D-gOfhmN.js";var r=t(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),i=e();function a({buttonClassName:e,handleSubmit:t,disabled:a}){return(0,i.jsx)(`button`,{type:`button`,className:n(`flex items-center justify-center rounded-full border border-white size-8`,a?`cursor-not-allowed border-[var(--oh-muted)]`:`cursor-pointer hover:bg-white/10`,e),"data-name":`arrow-up-circle-fill`,"data-testid":`submit-button`,onClick:t,disabled:a,children:(0,i.jsx)(r,{className:`w-4 h-4`,color:a?`var(--oh-muted)`:`white`})})}export{a as t};
|
package/build/assets/{circle-plus-check-toggle-BDX_ctNs.js → circle-plus-check-toggle-BbYBiUwv.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./useTranslation-CCgUjPJF.js";import{K as i,t as a}from"./utils-
|
|
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{K as i,t as a}from"./utils-D-gOfhmN.js";import{t as o}from"./styled-tooltip-DVAlWYnL.js";import{t as s}from"./checkmark-XZyokq_Y.js";import{t as c}from"./x-mark-BopmFoBq.js";var l=e(t()),u=n(),d=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 25 25`,fill:`none`,...e,children:[(0,u.jsx)(`path`,{d:`M10.8696 23.3696V1.63043C10.8696 0.729971 11.5995 0 12.5 0C13.4005 0 14.1304 0.729971 14.1304 1.63043V23.3696C14.1304 24.27 13.4005 25 12.5 25C11.5995 25 10.8696 24.27 10.8696 23.3696Z`,fill:`currentColor`}),(0,u.jsx)(`path`,{d:`M1.63043 10.8641L23.3696 10.8641C24.27 10.8641 25 11.5941 25 12.4946C25 13.395 24.27 14.125 23.3696 14.125L1.63043 14.125C0.729971 14.125 -3.93605e-08 13.395 0 12.4946C3.93605e-08 11.5941 0.729971 10.8641 1.63043 10.8641Z`,fill:`currentColor`})]});function f({className:e,testId:t,tooltipKey:n=i.AUTOMATIONS$ADD_AUTOMATION}){let{t:s}=r(`openhands`);return(0,u.jsx)(o,{content:s(n),placement:`top`,children:(0,u.jsx)(`span`,{"aria-hidden":`true`,"data-testid":t,className:a(`inline-flex size-7 shrink-0 items-center justify-center rounded-full bg-surface-raised text-white transition-colors hover:bg-[var(--oh-interactive-hover)]`,e),children:(0,u.jsx)(d,{className:`size-3`})})})}function p({testId:e,isSelected:t,onToggle:n,isDisabled:f=!1,className:p,enableLabelKey:m=i.SETTINGS$SKILLS_ENABLE_SKILL,disableLabelKey:h=i.SETTINGS$SKILLS_DISABLE_SKILL,enableTooltipKey:g=i.COMMON$ENABLE,disableTooltipKey:_,removeTooltipKey:v=i.COMMON$REMOVE}){let{t:y}=r(`openhands`),[b,x]=l.useState(!1),S=e=>{e.stopPropagation(),!f&&(n(!t),e.currentTarget.blur())},C=t&&b,w=y(t?_??v:g),T=y(t?h:m);return(0,u.jsx)(o,{content:w,placement:`top`,children:(0,u.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":t,"data-testid":e,"data-showing-remove":C?`true`:`false`,disabled:f,"aria-label":T,onClick:S,onPointerEnter:()=>x(!0),onPointerLeave:()=>x(!1),className:a(`inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-full p-0 transition-colors`,t&&(C?`border-0 bg-[rgba(248,113,113,0.14)] text-[#ef4444] hover:bg-[rgba(248,113,113,0.24)]`:`border border-white bg-transparent text-white [&_path]:fill-current`),!t&&`border-0 bg-surface-raised text-white hover:bg-[var(--oh-interactive-hover)]`,f&&`cursor-not-allowed opacity-50`,p),children:t?C?(0,u.jsx)(c,{"aria-hidden":!0,width:14,height:14,className:`stroke-[2.5]`}):(0,u.jsx)(s,{"aria-hidden":!0,width:14,height:14}):(0,u.jsx)(d,{"aria-hidden":!0,className:`size-3`})})})}export{p as n,f as t};
|
package/build/assets/{cloud-funnel-analytics-D5uJ_4JE.js → cloud-funnel-analytics-D02kgq1s.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{i as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{C as n,T as r,b as i}from"./active-backend-context-
|
|
1
|
+
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{i as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{C as n,T as r,b as i}from"./active-backend-context-BsLfwrXB.js";import{t as a}from"./utils-D-gOfhmN.js";var o=t(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),s=e();function c({value:e,options:t,onChange:n,ariaLabel:r,testId:i,className:o,equalWidth:c=!1}){return(0,s.jsx)(`div`,{role:`radiogroup`,"aria-label":r,"data-testid":i,className:a(c?`flex w-full`:`inline-flex`,`items-center rounded-md bg-[var(--oh-surface-raised)] p-0.5 text-xs`,o),children:t.map(t=>{let r=t.value===e;return(0,s.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,"data-testid":i?`${i}-option-${t.value}`:void 0,onClick:()=>n(t.value),className:a(`inline-flex items-center gap-1.5 px-2 py-0.5 rounded cursor-pointer transition-colors`,c&&`flex-1 justify-center text-center`,r?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-muted)] hover:text-white`),children:[t.icon,t.label]},t.value)})})}var l=`${r}:cloud_conversation_ready`;function u(e,t){i(e,t)}function d(){return n({backendKind:`cloud`,connectionMethod:`cloud_login`})}function f(){return n({backendKind:`cloud`})}function p(e,t){u(`cloud_device_authorization_started`,{...d(),source:t})}function m(e,t){u(`cloud_device_authorization_succeeded`,{...d(),source:t})}function h(e,t){u(`cloud_conversation_ready`,{...f(),$insert_id:`${l}:${e}`,task_id:e,conversation_id:t})}export{o as a,c as i,p as n,m as r,h as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./back-nav-button-
|
|
1
|
+
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./back-nav-button-DWNiN277.js";import{A as r,C as i}from"./use-tracking-ChnSFChv.js";var a=t();function o(){return(0,a.jsx)(n,{to:i(),children:r().detailBackLabel})}e();var s=e=>(0,a.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:[(0,a.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6 3v12m0 0a3 3 0 1 0 3 3M6 15a3 3 0 0 1 3-3h6a3 3 0 0 0 3-3V3m0 0a3 3 0 1 0 0 0`}),(0,a.jsx)(`circle`,{cx:6,cy:3,r:2}),(0,a.jsx)(`circle`,{cx:18,cy:3,r:2}),(0,a.jsx)(`circle`,{cx:9,cy:18,r:2})]});function c({icon:e,title:t,children:n}){return(0,a.jsxs)(`div`,{className:`rounded-2xl border border-[var(--oh-border)] bg-[var(--oh-surface)]`,children:[(0,a.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-[var(--oh-border)] px-5 py-3`,children:[(0,a.jsx)(`span`,{className:`size-4 text-muted`,children:e}),(0,a.jsx)(`h3`,{className:`text-sm font-medium text-content`,children:t})]}),(0,a.jsx)(`div`,{className:`px-5 py-5`,children:n})]})}function l({icon:e,label:t,children:n}){return(0,a.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,a.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,a.jsx)(`span`,{className:`size-3.5 text-muted`,children:e}),(0,a.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:t})]}),(0,a.jsx)(`div`,{className:`text-sm text-content`,children:n})]})}var u=e=>(0,a.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,strokeWidth:2,stroke:`currentColor`,...e,children:[(0,a.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 0 1 1.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.56.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.893.149c-.425.07-.765.383-.93.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 0 1-1.449.12l-.738-.527c-.35-.25-.806-.272-1.204-.107-.397.165-.71.505-.78.929l-.15.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 0 1-.12-1.45l.527-.737c.25-.35.273-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.108-1.204l-.526-.738a1.125 1.125 0 0 1 .12-1.45l.773-.773a1.125 1.125 0 0 1 1.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894Z`}),(0,a.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z`})]});export{o as a,s as i,l as n,c as r,u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,bt as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{t as a}from"./useTranslation-CCgUjPJF.js";import{K as o,t as s}from"./utils-BgLSZdyy.js";import{a as c}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-3eJ4ExtV.js";import"./settings-nav-GAQjW1a-.js";import{t as l}from"./bot-ByolqPEr.js";import{t as u}from"./wrench-B8Wg_nbp.js";import{a as d,i as f,n as p,r as m,t as h}from"./sidebar-store-DAZVH-DR.js";import{o as g}from"./use-acp-credential-form-ychoGqjC.js";import{t as _}from"./list-todo-Caa8E1X_.js";import{n as v,t as y}from"./x-CX8lVGwm.js";import{t as b}from"./shield-check-C3Rl0NF8.js";import{r as x}from"./context-menu-list-item-Cm7-7Y-7.js";import{u as S}from"./agent-server-config-C_x8Otd9.js";import{A as C,C as w,P as T}from"./use-tracking-j4uo9VEW.js";import{n as E}from"./navigation-context-CQZwH_tC.js";var D=i(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),O=e(n(),1),k=e(t(),1),A=r(),j=18,M={conversations:`/conversations`,customize:`/customize`,automations:w(),mcp:`/mcp`,settings:`/settings`,agentSettings:`/settings/agents`,llmSettings:`/settings/llm`,condenserSettings:`/settings/condenser`,verificationSettings:`/settings/verification`,appSettings:`/settings/app`,secretsSettings:`/settings/secrets`};function N(e,t,n){return e===void 0?t===void 0?``:n(t):e}var P={navigation:o.COMMAND_MENU$GROUP_NAVIGATION,settings:o.COMMAND_MENU$GROUP_SETTINGS,actions:o.COMMAND_MENU$GROUP_ACTIONS},F=[`navigation`,`settings`,`actions`],I=({toggleSidebar:e})=>{let t=[{id:`new-chat`,group:`navigation`,titleKey:o.COMMAND_MENU$NEW_CHAT_TITLE,descriptionKey:o.COMMAND_MENU$NEW_CHAT_DESCRIPTION,keywordsKey:o.COMMAND_MENU$NEW_CHAT_KEYWORDS,icon:(0,A.jsx)(d,{size:j}),to:M.conversations},{id:`customize`,group:`navigation`,titleKey:o.COMMAND_MENU$CUSTOMIZE_TITLE,descriptionKey:o.COMMAND_MENU$CUSTOMIZE_DESCRIPTION,keywordsKey:o.COMMAND_MENU$CUSTOMIZE_KEYWORDS,icon:(0,A.jsx)(c,{size:j}),to:M.customize},...T()?[{id:`automations`,group:`navigation`,title:C().commandMenuTitle,description:C().commandMenuDescription,keywords:C().commandMenuKeywords,icon:(0,A.jsx)(x,{size:j}),to:M.automations}]:[],{id:`mcp`,group:`navigation`,titleKey:o.COMMAND_MENU$MCP_TITLE,descriptionKey:o.COMMAND_MENU$MCP_DESCRIPTION,keywordsKey:o.COMMAND_MENU$MCP_KEYWORDS,icon:(0,A.jsx)(u,{size:j}),to:M.mcp},{id:`settings`,group:`settings`,titleKey:o.COMMAND_MENU$SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$SETTINGS_KEYWORDS,icon:(0,A.jsx)(m,{size:j}),to:M.settings},{id:`agent-settings`,group:`settings`,titleKey:o.COMMAND_MENU$AGENT_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$AGENT_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$AGENT_SETTINGS_KEYWORDS,icon:(0,A.jsx)(l,{size:j}),to:M.agentSettings},{id:`llm-settings`,group:`settings`,titleKey:o.COMMAND_MENU$LLM_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$LLM_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$LLM_SETTINGS_KEYWORDS,icon:(0,A.jsx)(v,{size:j}),to:M.llmSettings},{id:`condenser-settings`,group:`settings`,titleKey:o.COMMAND_MENU$CONDENSER_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$CONDENSER_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$CONDENSER_SETTINGS_KEYWORDS,icon:(0,A.jsx)(_,{size:j}),to:M.condenserSettings},{id:`verification-settings`,group:`settings`,titleKey:o.COMMAND_MENU$VERIFICATION_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$VERIFICATION_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$VERIFICATION_SETTINGS_KEYWORDS,icon:(0,A.jsx)(b,{size:j}),to:M.verificationSettings},{id:`app-settings`,group:`settings`,titleKey:o.COMMAND_MENU$APP_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$APP_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$APP_SETTINGS_KEYWORDS,icon:(0,A.jsx)(f,{size:j}),to:M.appSettings},{id:`secrets-settings`,group:`settings`,titleKey:o.COMMAND_MENU$SECRETS_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$SECRETS_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$SECRETS_SETTINGS_KEYWORDS,icon:(0,A.jsx)(g,{size:j}),to:M.secretsSettings},{id:`toggle-sidebar`,group:`actions`,titleKey:o.COMMAND_MENU$TOGGLE_SIDEBAR_TITLE,descriptionKey:o.COMMAND_MENU$TOGGLE_SIDEBAR_DESCRIPTION,keywordsKey:o.COMMAND_MENU$TOGGLE_SIDEBAR_KEYWORDS,icon:(0,A.jsx)(D,{size:j}),perform:e}],n=S()!==null;return t.filter(e=>!n||e.group!==`settings`||e.to===M.settings||e.to===`/settings/app`)},L=`command-menu-search`,R=`command-menu-results`,z=`command-menu-option`,B=`command-menu`,V=`k`,H=`ArrowDown`,U=`ArrowUp`,W=`Enter`,G=`Escape`,K=``,q=-1;function J(e){return`${z}-${e.id}`}function Y({item:e,query:t,translate:n}){let r=t.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);if(r.length===0)return!0;let i=[N(e.title,e.titleKey,n),N(e.description,e.descriptionKey,n),N(e.keywords,e.keywordsKey,n)].join(` `).toLocaleLowerCase();return r.every(e=>i.includes(e))}function X(){let{t:e}=a(`openhands`),{navigate:t}=E(),n=p(e=>e.isOpen),r=p(e=>e.open),i=p(e=>e.close),[c,l]=k.useState(K),[u,d]=k.useState(0),f=k.useRef(null),m=k.useRef(new Map);k.useEffect(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLocaleLowerCase()===V&&(e.preventDefault(),r())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[r]),k.useEffect(()=>{if(!n){l(K),d(0),m.current.clear();return}let e=requestAnimationFrame(()=>f.current?.focus());return()=>cancelAnimationFrame(e)},[n]);let g=k.useMemo(()=>I({toggleSidebar:()=>h.getState().toggleCollapsed()}),[]),_=k.useMemo(()=>g.filter(t=>Y({item:t,query:c,translate:t=>e(t)})),[g,c,e]);k.useEffect(()=>{d(e=>_.length===0?q:Math.min(Math.max(e,0),_.length-1))},[_.length]),k.useEffect(()=>{let e=_[u];if(!e)return;let t=m.current.get(e.id);typeof t?.scrollIntoView==`function`&&t.scrollIntoView({block:`nearest`})},[u,_]);let b=k.useCallback(e=>{if(e){if(i(),e.to){t(e.to);return}e.perform?.()}},[i,t]),x=e=>{if(e.key===H){e.preventDefault(),d(e=>_.length===0?e:(e+1)%_.length);return}if(e.key===U){e.preventDefault(),d(e=>_.length===0?e:(e-1+_.length)%_.length);return}if(e.key===W){e.preventDefault(),b(_[u]);return}e.key===G&&(e.preventDefault(),i())};if(!n||typeof document>`u`)return null;let S=_[u];return(0,O.createPortal)((0,A.jsxs)(`div`,{className:`fixed inset-0 z-[70] flex items-start justify-center px-3 pt-[10vh] sm:px-6`,"data-testid":B,role:`dialog`,"aria-modal":`true`,"aria-label":e(o.COMMAND_MENU$ARIA_LABEL),children:[(0,A.jsx)(`button`,{type:`button`,className:`absolute inset-0 cursor-default bg-black/65 backdrop-blur-[2px]`,"aria-label":e(o.COMMAND_MENU$CLOSE_LABEL),onClick:i}),(0,A.jsxs)(`div`,{className:s(`relative flex max-h-[min(720px,78vh)] w-full max-w-2xl flex-col overflow-hidden rounded-2xl`,`border border-[var(--oh-border)] bg-[var(--oh-surface)]`,`shadow-[0_24px_90px_rgba(0,0,0,0.52),0_0_0_1px_rgba(255,255,255,0.03)_inset]`),children:[(0,A.jsxs)(`div`,{className:`relative flex items-center gap-3 border-b border-[var(--oh-border)] px-4 py-3`,children:[(0,A.jsx)(v,{className:`size-5 shrink-0 text-[var(--oh-text-dim)]`}),(0,A.jsx)(`input`,{ref:f,id:L,className:`h-11 min-w-0 flex-1 bg-transparent text-base text-white outline-none placeholder:text-[var(--oh-text-dim)]`,placeholder:e(o.COMMAND_MENU$PLACEHOLDER),"aria-label":e(o.COMMAND_MENU$SEARCH_LABEL),role:`combobox`,"aria-expanded":`true`,"aria-controls":R,"aria-activedescendant":S?J(S):void 0,value:c,onChange:e=>l(e.target.value),onKeyDown:x}),c?(0,A.jsx)(`button`,{type:`button`,className:`inline-flex size-8 items-center justify-center rounded-lg text-[var(--oh-muted)] hover:bg-[var(--oh-surface-raised)] hover:text-white`,"aria-label":e(o.COMMAND_MENU$CLEAR_SEARCH_LABEL),onClick:()=>{l(K),f.current?.focus()},children:(0,A.jsx)(y,{className:`size-4`})}):null,(0,A.jsx)(`kbd`,{className:`hidden rounded-md border border-[var(--oh-border)] bg-black/25 px-2 py-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--oh-text-dim)] sm:inline-flex`,children:e(o.COMMAND_MENU$SHORTCUT)})]}),(0,A.jsx)(`div`,{id:R,role:`listbox`,className:`relative min-h-0 flex-1 overflow-y-auto px-2 py-2 custom-scrollbar`,children:_.length===0?(0,A.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 px-6 py-16 text-center`,children:[(0,A.jsx)(`div`,{className:`flex size-11 items-center justify-center rounded-2xl border border-dashed border-[var(--oh-border)] text-[var(--oh-text-dim)]`,children:(0,A.jsx)(v,{className:`size-5`})}),(0,A.jsx)(`p`,{className:`text-sm font-medium text-white`,children:e(o.COMMAND_MENU$NO_RESULTS_TITLE)}),(0,A.jsx)(`p`,{className:`max-w-sm text-xs leading-5 text-[var(--oh-muted)]`,children:e(o.COMMAND_MENU$NO_RESULTS_DESCRIPTION)})]}):F.map(t=>{let n=_.filter(e=>e.group===t);return n.length===0?null:(0,A.jsxs)(`section`,{className:`py-1`,children:[(0,A.jsx)(`div`,{className:`px-3 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--oh-text-dim)]`,children:e(P[t])}),(0,A.jsx)(`div`,{className:`space-y-1`,children:n.map(t=>{let n=_.indexOf(t),r=n===u,i=t.to,a=e=>{e?m.current.set(t.id,e):m.current.delete(t.id)},c=s(`group flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left transition-colors duration-150`,r?`bg-white/[0.09] text-white shadow-[0_0_0_1px_rgba(255,255,255,0.08)_inset]`:`text-[var(--oh-muted)] hover:bg-white/[0.05] hover:text-white`),l=(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`span`,{className:s(`flex size-9 shrink-0 items-center justify-center rounded-lg border transition-colors duration-150`,r?`border-[var(--oh-accent)] bg-[var(--oh-accent)]/15 text-white`:`border-[var(--oh-border)] bg-black/15 text-[var(--oh-text-dim)] group-hover:text-white`),"aria-hidden":`true`,children:t.icon}),(0,A.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,A.jsx)(`span`,{className:`block truncate text-sm font-medium text-current`,children:N(t.title,t.titleKey,e)}),(0,A.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-[var(--oh-text-dim)]`,children:N(t.description,t.descriptionKey,e)})]}),(0,A.jsx)(`span`,{className:`hidden shrink-0 rounded-md border border-[var(--oh-border)] px-2 py-1 text-[10px] font-semibold uppercase tracking-[0.14em] text-[var(--oh-text-dim)] sm:inline-flex`,children:e(i?o.COMMAND_MENU$GO_HINT:o.COMMAND_MENU$RUN_HINT)})]});return i?(0,A.jsx)(`a`,{ref:a,id:J(t),href:i,role:`option`,"aria-selected":r,onMouseEnter:()=>d(n),onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),b(t))},className:c,children:l},t.id):(0,A.jsx)(`button`,{ref:a,id:J(t),type:`button`,role:`option`,"aria-selected":r,onMouseEnter:()=>d(n),onClick:()=>b(t),className:c,children:l},t.id)})})]},t)})}),(0,A.jsx)(`div`,{className:`border-t border-[var(--oh-border)] px-4 py-2.5 text-[11px] text-[var(--oh-text-dim)]`,children:e(o.COMMAND_MENU$FOOTER_HINT)})]})]}),document.body)}export{X as CommandMenu};
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,bt as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{t as a}from"./useTranslation-CCgUjPJF.js";import{K as o,t as s}from"./utils-D-gOfhmN.js";import{a as c}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-3eJ4ExtV.js";import"./settings-nav-DFb3hBMr.js";import{t as l}from"./bot-ByolqPEr.js";import{t as u}from"./wrench-B8Wg_nbp.js";import{a as d,i as f,n as p,r as m,t as h}from"./sidebar-store-DAZVH-DR.js";import{o as g}from"./use-acp-credential-form-CJ5wPsQm.js";import{t as _}from"./list-todo-Caa8E1X_.js";import{n as v,t as y}from"./x-CX8lVGwm.js";import{t as b}from"./shield-check-C3Rl0NF8.js";import{r as x}from"./context-menu-list-item-lx2zk9G7.js";import{u as S}from"./agent-server-config-C_x8Otd9.js";import{A as C,C as w,P as T}from"./use-tracking-ChnSFChv.js";import{n as E}from"./navigation-context-CQZwH_tC.js";var D=i(`keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),O=e(n(),1),k=e(t(),1),A=r(),j=18,M={conversations:`/conversations`,customize:`/customize`,automations:w(),mcp:`/mcp`,settings:`/settings`,agentSettings:`/settings/agents`,llmSettings:`/settings/llm`,condenserSettings:`/settings/condenser`,verificationSettings:`/settings/verification`,appSettings:`/settings/app`,secretsSettings:`/settings/secrets`};function N(e,t,n){return e===void 0?t===void 0?``:n(t):e}var P={navigation:o.COMMAND_MENU$GROUP_NAVIGATION,settings:o.COMMAND_MENU$GROUP_SETTINGS,actions:o.COMMAND_MENU$GROUP_ACTIONS},F=[`navigation`,`settings`,`actions`],I=({toggleSidebar:e})=>{let t=[{id:`new-chat`,group:`navigation`,titleKey:o.COMMAND_MENU$NEW_CHAT_TITLE,descriptionKey:o.COMMAND_MENU$NEW_CHAT_DESCRIPTION,keywordsKey:o.COMMAND_MENU$NEW_CHAT_KEYWORDS,icon:(0,A.jsx)(d,{size:j}),to:M.conversations},{id:`customize`,group:`navigation`,titleKey:o.COMMAND_MENU$CUSTOMIZE_TITLE,descriptionKey:o.COMMAND_MENU$CUSTOMIZE_DESCRIPTION,keywordsKey:o.COMMAND_MENU$CUSTOMIZE_KEYWORDS,icon:(0,A.jsx)(c,{size:j}),to:M.customize},...T()?[{id:`automations`,group:`navigation`,title:C().commandMenuTitle,description:C().commandMenuDescription,keywords:C().commandMenuKeywords,icon:(0,A.jsx)(x,{size:j}),to:M.automations}]:[],{id:`mcp`,group:`navigation`,titleKey:o.COMMAND_MENU$MCP_TITLE,descriptionKey:o.COMMAND_MENU$MCP_DESCRIPTION,keywordsKey:o.COMMAND_MENU$MCP_KEYWORDS,icon:(0,A.jsx)(u,{size:j}),to:M.mcp},{id:`settings`,group:`settings`,titleKey:o.COMMAND_MENU$SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$SETTINGS_KEYWORDS,icon:(0,A.jsx)(m,{size:j}),to:M.settings},{id:`agent-settings`,group:`settings`,titleKey:o.COMMAND_MENU$AGENT_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$AGENT_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$AGENT_SETTINGS_KEYWORDS,icon:(0,A.jsx)(l,{size:j}),to:M.agentSettings},{id:`llm-settings`,group:`settings`,titleKey:o.COMMAND_MENU$LLM_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$LLM_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$LLM_SETTINGS_KEYWORDS,icon:(0,A.jsx)(v,{size:j}),to:M.llmSettings},{id:`condenser-settings`,group:`settings`,titleKey:o.COMMAND_MENU$CONDENSER_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$CONDENSER_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$CONDENSER_SETTINGS_KEYWORDS,icon:(0,A.jsx)(_,{size:j}),to:M.condenserSettings},{id:`verification-settings`,group:`settings`,titleKey:o.COMMAND_MENU$VERIFICATION_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$VERIFICATION_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$VERIFICATION_SETTINGS_KEYWORDS,icon:(0,A.jsx)(b,{size:j}),to:M.verificationSettings},{id:`app-settings`,group:`settings`,titleKey:o.COMMAND_MENU$APP_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$APP_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$APP_SETTINGS_KEYWORDS,icon:(0,A.jsx)(f,{size:j}),to:M.appSettings},{id:`secrets-settings`,group:`settings`,titleKey:o.COMMAND_MENU$SECRETS_SETTINGS_TITLE,descriptionKey:o.COMMAND_MENU$SECRETS_SETTINGS_DESCRIPTION,keywordsKey:o.COMMAND_MENU$SECRETS_SETTINGS_KEYWORDS,icon:(0,A.jsx)(g,{size:j}),to:M.secretsSettings},{id:`toggle-sidebar`,group:`actions`,titleKey:o.COMMAND_MENU$TOGGLE_SIDEBAR_TITLE,descriptionKey:o.COMMAND_MENU$TOGGLE_SIDEBAR_DESCRIPTION,keywordsKey:o.COMMAND_MENU$TOGGLE_SIDEBAR_KEYWORDS,icon:(0,A.jsx)(D,{size:j}),perform:e}],n=S()!==null;return t.filter(e=>!n||e.group!==`settings`||e.to===M.settings||e.to===`/settings/app`)},L=`command-menu-search`,R=`command-menu-results`,z=`command-menu-option`,B=`command-menu`,V=`k`,H=`ArrowDown`,U=`ArrowUp`,W=`Enter`,G=`Escape`,K=``,q=-1;function J(e){return`${z}-${e.id}`}function Y({item:e,query:t,translate:n}){let r=t.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);if(r.length===0)return!0;let i=[N(e.title,e.titleKey,n),N(e.description,e.descriptionKey,n),N(e.keywords,e.keywordsKey,n)].join(` `).toLocaleLowerCase();return r.every(e=>i.includes(e))}function X(){let{t:e}=a(`openhands`),{navigate:t}=E(),n=p(e=>e.isOpen),r=p(e=>e.open),i=p(e=>e.close),[c,l]=k.useState(K),[u,d]=k.useState(0),f=k.useRef(null),m=k.useRef(new Map);k.useEffect(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLocaleLowerCase()===V&&(e.preventDefault(),r())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[r]),k.useEffect(()=>{if(!n){l(K),d(0),m.current.clear();return}let e=requestAnimationFrame(()=>f.current?.focus());return()=>cancelAnimationFrame(e)},[n]);let g=k.useMemo(()=>I({toggleSidebar:()=>h.getState().toggleCollapsed()}),[]),_=k.useMemo(()=>g.filter(t=>Y({item:t,query:c,translate:t=>e(t)})),[g,c,e]);k.useEffect(()=>{d(e=>_.length===0?q:Math.min(Math.max(e,0),_.length-1))},[_.length]),k.useEffect(()=>{let e=_[u];if(!e)return;let t=m.current.get(e.id);typeof t?.scrollIntoView==`function`&&t.scrollIntoView({block:`nearest`})},[u,_]);let b=k.useCallback(e=>{if(e){if(i(),e.to){t(e.to);return}e.perform?.()}},[i,t]),x=e=>{if(e.key===H){e.preventDefault(),d(e=>_.length===0?e:(e+1)%_.length);return}if(e.key===U){e.preventDefault(),d(e=>_.length===0?e:(e-1+_.length)%_.length);return}if(e.key===W){e.preventDefault(),b(_[u]);return}e.key===G&&(e.preventDefault(),i())};if(!n||typeof document>`u`)return null;let S=_[u];return(0,O.createPortal)((0,A.jsxs)(`div`,{className:`fixed inset-0 z-[70] flex items-start justify-center px-3 pt-[10vh] sm:px-6`,"data-testid":B,role:`dialog`,"aria-modal":`true`,"aria-label":e(o.COMMAND_MENU$ARIA_LABEL),children:[(0,A.jsx)(`button`,{type:`button`,className:`absolute inset-0 cursor-default bg-black/65 backdrop-blur-[2px]`,"aria-label":e(o.COMMAND_MENU$CLOSE_LABEL),onClick:i}),(0,A.jsxs)(`div`,{className:s(`relative flex max-h-[min(720px,78vh)] w-full max-w-2xl flex-col overflow-hidden rounded-2xl`,`border border-[var(--oh-border)] bg-[var(--oh-surface)]`,`shadow-[0_24px_90px_rgba(0,0,0,0.52),0_0_0_1px_rgba(255,255,255,0.03)_inset]`),children:[(0,A.jsxs)(`div`,{className:`relative flex items-center gap-3 border-b border-[var(--oh-border)] px-4 py-3`,children:[(0,A.jsx)(v,{className:`size-5 shrink-0 text-[var(--oh-text-dim)]`}),(0,A.jsx)(`input`,{ref:f,id:L,className:`h-11 min-w-0 flex-1 bg-transparent text-base text-white outline-none placeholder:text-[var(--oh-text-dim)]`,placeholder:e(o.COMMAND_MENU$PLACEHOLDER),"aria-label":e(o.COMMAND_MENU$SEARCH_LABEL),role:`combobox`,"aria-expanded":`true`,"aria-controls":R,"aria-activedescendant":S?J(S):void 0,value:c,onChange:e=>l(e.target.value),onKeyDown:x}),c?(0,A.jsx)(`button`,{type:`button`,className:`inline-flex size-8 items-center justify-center rounded-lg text-[var(--oh-muted)] hover:bg-[var(--oh-surface-raised)] hover:text-white`,"aria-label":e(o.COMMAND_MENU$CLEAR_SEARCH_LABEL),onClick:()=>{l(K),f.current?.focus()},children:(0,A.jsx)(y,{className:`size-4`})}):null,(0,A.jsx)(`kbd`,{className:`hidden rounded-md border border-[var(--oh-border)] bg-black/25 px-2 py-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--oh-text-dim)] sm:inline-flex`,children:e(o.COMMAND_MENU$SHORTCUT)})]}),(0,A.jsx)(`div`,{id:R,role:`listbox`,className:`relative min-h-0 flex-1 overflow-y-auto px-2 py-2 custom-scrollbar`,children:_.length===0?(0,A.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 px-6 py-16 text-center`,children:[(0,A.jsx)(`div`,{className:`flex size-11 items-center justify-center rounded-2xl border border-dashed border-[var(--oh-border)] text-[var(--oh-text-dim)]`,children:(0,A.jsx)(v,{className:`size-5`})}),(0,A.jsx)(`p`,{className:`text-sm font-medium text-white`,children:e(o.COMMAND_MENU$NO_RESULTS_TITLE)}),(0,A.jsx)(`p`,{className:`max-w-sm text-xs leading-5 text-[var(--oh-muted)]`,children:e(o.COMMAND_MENU$NO_RESULTS_DESCRIPTION)})]}):F.map(t=>{let n=_.filter(e=>e.group===t);return n.length===0?null:(0,A.jsxs)(`section`,{className:`py-1`,children:[(0,A.jsx)(`div`,{className:`px-3 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--oh-text-dim)]`,children:e(P[t])}),(0,A.jsx)(`div`,{className:`space-y-1`,children:n.map(t=>{let n=_.indexOf(t),r=n===u,i=t.to,a=e=>{e?m.current.set(t.id,e):m.current.delete(t.id)},c=s(`group flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left transition-colors duration-150`,r?`bg-white/[0.09] text-white shadow-[0_0_0_1px_rgba(255,255,255,0.08)_inset]`:`text-[var(--oh-muted)] hover:bg-white/[0.05] hover:text-white`),l=(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`span`,{className:s(`flex size-9 shrink-0 items-center justify-center rounded-lg border transition-colors duration-150`,r?`border-[var(--oh-accent)] bg-[var(--oh-accent)]/15 text-white`:`border-[var(--oh-border)] bg-black/15 text-[var(--oh-text-dim)] group-hover:text-white`),"aria-hidden":`true`,children:t.icon}),(0,A.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,A.jsx)(`span`,{className:`block truncate text-sm font-medium text-current`,children:N(t.title,t.titleKey,e)}),(0,A.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-[var(--oh-text-dim)]`,children:N(t.description,t.descriptionKey,e)})]}),(0,A.jsx)(`span`,{className:`hidden shrink-0 rounded-md border border-[var(--oh-border)] px-2 py-1 text-[10px] font-semibold uppercase tracking-[0.14em] text-[var(--oh-text-dim)] sm:inline-flex`,children:e(i?o.COMMAND_MENU$GO_HINT:o.COMMAND_MENU$RUN_HINT)})]});return i?(0,A.jsx)(`a`,{ref:a,id:J(t),href:i,role:`option`,"aria-selected":r,onMouseEnter:()=>d(n),onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),b(t))},className:c,children:l},t.id):(0,A.jsx)(`button`,{ref:a,id:J(t),type:`button`,role:`option`,"aria-selected":r,onMouseEnter:()=>d(n),onClick:()=>b(t),className:c,children:l},t.id)})})]},t)})}),(0,A.jsx)(`div`,{className:`border-t border-[var(--oh-border)] px-4 py-2.5 text-[11px] text-[var(--oh-text-dim)]`,children:e(o.COMMAND_MENU$FOOTER_HINT)})]})]}),document.body)}export{X as CommandMenu};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,m as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{t as i}from"./useQuery-DAAacS7O.js";import{t as a}from"./useTranslation-CCgUjPJF.js";import{A as o,K as s,t as c}from"./utils-BgLSZdyy.js";import{P as l,i as u}from"./messages-Bk1xhbU2.js";import{t as d}from"./chevron-down-Cr6Fn_wS.js";import{t as f}from"./vendor~root-layout~conversation-panel~conversation-C3EBV3kp.js";import{t as p}from"./chevron-right-CfdfRn-8.js";import{a as m,i as h,n as g,o as _,r as v,t as y}from"./vendor~conversation-panel~conversation-C22sJuWZ.js";import{t as b}from"./conversation-store-DC-JlJuq.js";import{t as x}from"./format-time-delta-BIR5Os7T.js";import{r as S}from"./typography-DgcLGdHk.js";import{m as C}from"./llm-not-configured-banner-Dh_ajcM8.js";import{$ as w,nt as T,t as ee,tt as E}from"./markdown-renderer-DyFl9-mL.js";import{a as D,o as O,s as k}from"./conversation-B_nweu5p.js";import{n as A,t as j}from"./get-git-path-jU2zjqIB.js";import{t as M}from"./conversation-tab-empty-state-B3dpJXX0.js";import{n as te,t as ne}from"./vendor~commits-tab-BaO2Ce3e.js";var N=e(t(),1),P=(e,t)=>{let{conversationId:n}=T(),{data:r}=E(),a=A(),o=r?.conversation_url,s=r?.session_api_key,c=r?.selected_repository,l=r?.workspace?.working_dir?.trim(),u=N.useMemo(()=>j(c,l),[c,l]);return i({queryKey:[`commit_changes`,n,o,s,u,e],queryFn:async()=>{if(!n)throw Error(`No conversation ID`);return k.getCommitChanges(o,s,u,e)},staleTime:1/0,gcTime:1e3*60*15,retry:!1,enabled:t.enabled&&a&&!!n,meta:{disableToast:!0}})},F=r(),I={duration:.2,ease:`easeInOut`};function L({open:e,children:t,testId:r,className:i}){return l()?e?(0,F.jsx)(`div`,{"data-testid":r,className:i,children:t}):null:(0,F.jsx)(n,{initial:!1,children:e?(0,F.jsx)(f.div,{"data-testid":r,initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:I,className:c(`overflow-hidden`,i),children:t},`accordion-panel`):null})}var re=e=>{let{conversationId:t}=T(),{data:n}=E(),r=n?.conversation_url,a=n?.session_api_key,o=n?.selected_repository,s=n?.workspace?.working_dir?.trim(),c=N.useMemo(()=>`${j(o,s)}/${e.filePath}`,[o,e.filePath,s]),l=e.type===`D`;return i({queryKey:e.commit?[`commit_file_diff`,t,r,a,e.commit,c]:[`file_diff`,t,r,a,c],queryFn:async()=>{if(!t)throw Error(`No conversation ID`);return k.getGitChangeDiff(t,r,a,c,e.commit)},enabled:e.enabled&&(!l||!!e.commit),staleTime:e.commit?1/0:1e3*60*5,gcTime:1e3*60*15})};function R({className:e}){let{t}=a(`openhands`);return(0,F.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,F.jsx)(`div`,{className:c(`animate-spin rounded-full border-4 border-transparent border-t-white`,e),role:`status`,"aria-label":t(s.HOME$LOADING)})})}function ie({height:e,children:t,className:n}){return(0,F.jsx)(`div`,{"data-testid":`editor-container`,className:c(`w-full border-b border-[var(--oh-border)] overflow-hidden h-[var(--editor-height)]`,n),style:{"--editor-height":`${e}px`},children:t})}var ae=[{mode:`old`,icon:_},{mode:`diff`,icon:m},{mode:`new`,icon:y}],z={renderValidationDecorations:`off`,readOnly:!0,scrollBeyondLastLine:!1,minimap:{enabled:!1},automaticLayout:!0,scrollbar:{alwaysConsumeMouseWheel:!1}};function B(e){return Math.min(e,600)}var V={A:h,D:v,M:g,R:`Renamed`,U:`Untracked`},H=e=>{e.editor.defineTheme(`custom-diff-theme`,{base:`vs-dark`,inherit:!0,rules:[{token:`comment`,foreground:`6a9955`},{token:`keyword`,foreground:`569cd6`},{token:`string`,foreground:`ce9178`},{token:`number`,foreground:`b5cea8`}],colors:{"diffEditor.insertedTextBackground":`#014b01AA`,"diffEditor.removedTextBackground":`#750000AA`,"diffEditor.insertedLineBackground":`#003f00AA`,"diffEditor.removedLineBackground":`#5a0000AA`,"diffEditor.border":`var(--oh-border-subtle)`,"editorUnnecessaryCode.border":`#00000000`,"editorUnnecessaryCode.opacity":`rgba(0, 0, 0, 0.467)`}})};function U({path:e,type:t,commit:n,isExpanded:r,onToggle:i}){let{t:o}=a(`openhands`),[l,f]=N.useState(!1),m=r!==void 0,h=m?r:l,g=!h,_=()=>{if(m){i?.();return}f(e=>!e)},[v,y]=N.useState(0),[b,x]=N.useState(!1),[C,w]=N.useState(`diff`),T=N.useRef(null),E=N.useRef(null),D=t===`A`||t===`U`,O=t===`D`,k=N.useMemo(()=>{if(t===`R`){let t=e.split(/\s+/).slice(1);return t[t.length-1]}return e},[e,t]),{data:A,isLoading:j,isSuccess:M,isRefetching:P}=re({filePath:k,type:t,enabled:!g,commit:n}),I=N.useCallback(()=>{if(!T.current)return;let e=T.current.getOriginalEditor(),t=T.current.getModifiedEditor();e&&t&&(y(B(Math.max(e.getContentHeight(),t.getContentHeight())+20)),x(!0))},[]),U=N.useCallback(()=>{E.current&&(y(B(E.current.getContentHeight()+20)),x(!0))},[]);N.useEffect(()=>{x(!1),y(0)},[g,C]);let W=e=>{T.current=e,I(),e.getOriginalEditor().onDidContentSizeChange(I),e.getModifiedEditor().onDidContentSizeChange(I)},G=e=>{E.current=e,U(),e.onDidContentSizeChange(U)},K=(t===`U`?V.A:V[t])||`?`,q=typeof K==`string`?(0,F.jsx)(S.Text,{children:K}):N.createElement(K,{className:`w-4 h-4 shrink-0`}),J=j||P,Y=u(k),X=Y===`markdown`,Z=C===`old`?A?.original??``:A?.modified??``,Q=!O,$=!g&&Q,oe=e=>(0,F.jsx)(`div`,{className:c(`relative w-full`,!b&&`h-0 overflow-hidden`),children:(0,F.jsx)(ie,{height:b?v:B(400),className:c(!b&&`absolute inset-x-0 top-0 invisible`),children:e})});return(0,F.jsxs)(`div`,{"data-testid":`file-diff-viewer-outer`,className:`w-full flex flex-col`,children:[(0,F.jsx)(`div`,{className:`flex h-10 items-center px-3 border-b border-[var(--oh-border)] hover:cursor-pointer`,onClick:_,children:(0,F.jsxs)(`span`,{className:`text-sm w-full text-content flex items-center gap-2 min-w-0`,children:[(0,F.jsx)(`span`,{className:`inline-flex w-4 h-4 shrink-0 items-center justify-center`,children:J?(0,F.jsx)(R,{className:`w-4 h-4`}):q}),(0,F.jsx)(`strong`,{className:`min-w-0 flex-1 truncate font-medium`,children:k}),Q&&(0,F.jsx)(`span`,{className:c(`flex items-center gap-0.5 shrink-0`,!$&&`invisible pointer-events-none`),onClick:e=>e.stopPropagation(),"aria-hidden":!$,children:ae.map(({mode:e,icon:t})=>(0,F.jsx)(`button`,{"data-testid":`view-mode-${e}`,type:`button`,tabIndex:$?0:-1,"aria-pressed":C===e,onClick:()=>w(e),className:c(`p-1 rounded transition-colors cursor-pointer`,C===e?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-white`),children:(0,F.jsx)(t,{className:`w-4 h-4`})},e))}),(0,F.jsx)(`button`,{"data-testid":`collapse`,type:`button`,className:`shrink-0 text-[var(--oh-muted)]`,children:g?(0,F.jsx)(p,{className:`w-4 h-4`,"aria-hidden":!0}):(0,F.jsx)(d,{className:`w-4 h-4`,"aria-hidden":!0})})]})}),(0,F.jsx)(L,{open:h,children:O&&!n?(0,F.jsx)(`div`,{"data-testid":`file-deleted-message`,className:`w-full border-b border-[var(--oh-border)] p-4 bg-base text-[var(--oh-text-dim)] text-sm`,children:o(s.DIFF_VIEWER$FILE_DELETED)}):M&&(C===`diff`?oe((0,F.jsx)(te,{"data-testid":`file-diff-viewer`,className:`w-full h-full`,language:Y,original:D?``:A?.original??``,modified:O?``:A?.modified??``,theme:`custom-diff-theme`,onMount:W,beforeMount:H,options:{...z,renderSideBySide:!D&&!O,hideUnchangedRegions:{enabled:!0}}})):X?(0,F.jsx)(`div`,{className:`w-full border-b border-[var(--oh-border)] overflow-auto p-4 bg-base prose prose-invert max-w-none`,"data-testid":`markdown-preview`,style:{maxHeight:600},children:(0,F.jsx)(ee,{content:Z,includeStandard:!0,includeHeadings:!0})}):oe((0,F.jsx)(ne,{"data-testid":`file-single-viewer`,className:`w-full h-full`,language:Y,value:Z,theme:`custom-diff-theme`,beforeMount:H,onMount:G,options:z})))})]})}function W({changes:e,commit:t}){let[n,r]=(0,N.useState)(null);return(0,F.jsx)(`div`,{"data-testid":`diff-change-list`,className:`w-full flex flex-col`,children:e.map(e=>(0,F.jsx)(U,{path:e.path,type:e.status,commit:t,isExpanded:n===e.path,onToggle:()=>r(t=>t===e.path?null:e.path)},e.path))})}function G({commit:e,showAuthor:t,isExpanded:n,onToggle:r}){let{t:i}=a(`openhands`),{data:o,isLoading:c,isSuccess:l}=P(e.sha,{enabled:n});return(0,F.jsxs)(`div`,{"data-testid":`commit-row`,className:`w-full flex flex-col`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:r,"aria-expanded":n,"data-testid":`commit-row-toggle`,className:`w-full flex h-10 items-center gap-2 px-3 border-b border-[var(--oh-border)] text-sm text-content text-left hover:cursor-pointer`,children:[(0,F.jsx)(`code`,{className:`w-[7ch] flex-shrink-0 text-center font-mono text-xs text-[var(--oh-muted)]`,children:e.shortSha}),(0,F.jsx)(`strong`,{className:`flex-1 truncate font-medium`,children:e.subject}),t&&(0,F.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate max-w-32 flex-shrink-0`,children:e.author}),(0,F.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] flex-shrink-0`,children:`${x(e.timestamp)} ${i(s.CONVERSATION$AGO)}`}),n?(0,F.jsx)(d,{className:`w-4 h-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0}):(0,F.jsx)(p,{className:`w-4 h-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]}),(0,F.jsxs)(L,{open:n,testId:`commit-row-content`,className:`w-full flex flex-col pl-6`,children:[c&&(0,F.jsx)(`div`,{className:`p-3`,children:(0,F.jsx)(R,{className:`w-4 h-4`})}),l&&o&&o.length>0&&(0,F.jsx)(W,{changes:o,commit:e.sha})]})]})}var K=`-`,q=`DIFF_VIEWER$UNCOMMITTED_FILE_COUNT`;function J({changes:e,isExpanded:t,onToggle:n}){let{t:r}=a(`openhands`);return(0,F.jsxs)(`div`,{"data-testid":`uncommitted-changes-row`,className:`w-full flex flex-col`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:n,"aria-expanded":t,"data-testid":`uncommitted-changes-row-toggle`,className:`w-full flex h-10 items-center gap-2 px-3 border-b border-[var(--oh-border)] text-sm text-content text-left hover:cursor-pointer`,children:[(0,F.jsx)(`code`,{className:`w-[7ch] flex-shrink-0 text-center font-mono text-xs text-[var(--oh-muted)]`,children:K}),(0,F.jsx)(`strong`,{className:`flex-1 truncate font-medium`,children:r(s.DIFF_VIEWER$UNCOMMITTED)}),e.length>0?(0,F.jsx)(`span`,{"data-testid":`uncommitted-changes-count`,className:`text-xs text-[var(--oh-muted)] tabular-nums flex-shrink-0`,children:r(q,{count:e.length})}):null,t?(0,F.jsx)(d,{className:`w-4 h-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0}):(0,F.jsx)(p,{className:`w-4 h-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]}),(0,F.jsx)(L,{open:t,testId:`uncommitted-changes-row-content`,className:`w-full flex flex-col pl-6`,children:e.length>0?(0,F.jsx)(W,{changes:e}):null})]})}var Y=`uncommitted`;function X({commits:e,hasMore:t,uncommittedChanges:n,autoExpandUncommitted:r=!1,onAutoExpandHandled:i}){let{t:o}=a(`openhands`),[c,l]=N.useState(null);N.useEffect(()=>{r&&(l(Y),i?.())},[r,i]);let u=new Set(e.map(e=>e.author)).size>1;return(0,F.jsxs)(`section`,{"data-testid":`commit-list`,className:`w-full flex flex-col`,children:[(0,F.jsx)(J,{changes:n,isExpanded:c===Y,onToggle:()=>l(e=>e===Y?null:Y)}),e.map(e=>(0,F.jsx)(G,{commit:e,showAuthor:u,isExpanded:c===e.sha,onToggle:()=>l(t=>t===e.sha?null:e.sha)},e.sha)),t&&(0,F.jsx)(`div`,{"data-testid":`commit-list-cap-notice`,className:`px-3 py-2.5 text-xs text-[var(--oh-muted)]`,children:o(s.DIFF_VIEWER$COMMITS_CAP,{count:e.length})})]})}function Z(){return(0,F.jsx)(g,{"aria-hidden":!0,className:`size-full`})}function Q(){let{t:e}=a(`openhands`),{conversationId:t}=T(),{commits:n,hasMore:r,isUnsupported:i,isLoading:c,isSuccess:l}=D(),{data:u,isSuccess:d,isLoading:f}=O(),p=b(e=>e.commitsAutoExpandSection),m=b(e=>e.setCommitsAutoExpandSection),h=(0,N.useCallback)(()=>m(null),[m]),{curAgentState:g}=w(),_=!o.includes(g),v=l&&!i&&n.length>0,y=d&&(u?.length??0)>0,x=v||y,S=c||_&&f;return(0,F.jsx)(`main`,{className:`h-full w-full flex flex-col items-stretch`,children:x?(0,F.jsx)(`div`,{className:`h-full overflow-y-auto flex flex-col items-stretch custom-scrollbar-always`,children:(0,F.jsx)(X,{commits:v?n:[],hasMore:v?r:!1,uncommittedChanges:d?(u??[]).slice(0,100):[],autoExpandUncommitted:p===`uncommitted`,onAutoExpandHandled:h},t)}):(0,F.jsxs)(`div`,{className:`flex-1 flex items-center justify-center`,children:[!_&&(0,F.jsx)(C,{testId:`commits-tab-status`,messageKey:s.DIFF_VIEWER$WAITING_FOR_RUNTIME}),_&&S&&(0,F.jsx)(C,{testId:`commits-tab-status`,messageKey:s.DIFF_VIEWER$LOADING}),_&&!S&&(0,F.jsx)(M,{icon:(0,F.jsx)(Z,{}),children:e(s.DIFF_VIEWER$NO_COMMITS)})]})})}export{Q as default};
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,m as n,yt as r}from"./vendor-styling-Ck5D_A2Q.js";import{t as i}from"./useQuery-DAAacS7O.js";import{t as a}from"./useTranslation-CCgUjPJF.js";import{A as o,K as s,t as c}from"./utils-D-gOfhmN.js";import{P as l,i as u}from"./messages-DmFJlW6c.js";import{t as d}from"./chevron-down-Cr6Fn_wS.js";import{t as f}from"./vendor~root-layout~conversation-panel~conversation-C3EBV3kp.js";import{t as p}from"./chevron-right-CfdfRn-8.js";import{a as m,i as h,n as g,o as _,r as v,t as y}from"./vendor~conversation-panel~conversation-C22sJuWZ.js";import{t as b}from"./conversation-store-DC-JlJuq.js";import{t as x}from"./format-time-delta-BIR5Os7T.js";import{r as S}from"./typography-NarNyelM.js";import{m as C}from"./llm-not-configured-banner-DMdL1vaX.js";import{$ as w,nt as T,t as ee,tt as E}from"./markdown-renderer-BH5pqDuJ.js";import{a as D,o as O,s as k}from"./conversation-BOj0ENI6.js";import{n as A,t as j}from"./get-git-path-Bp5rsUkl.js";import{t as M}from"./conversation-tab-empty-state-DIhwCC2J.js";import{n as te,t as ne}from"./vendor~commits-tab-BaO2Ce3e.js";var N=e(t(),1),P=(e,t)=>{let{conversationId:n}=T(),{data:r}=E(),a=A(),o=r?.conversation_url,s=r?.session_api_key,c=r?.selected_repository,l=r?.workspace?.working_dir?.trim(),u=N.useMemo(()=>j(c,l),[c,l]);return i({queryKey:[`commit_changes`,n,o,s,u,e],queryFn:async()=>{if(!n)throw Error(`No conversation ID`);return k.getCommitChanges(o,s,u,e)},staleTime:1/0,gcTime:1e3*60*15,retry:!1,enabled:t.enabled&&a&&!!n,meta:{disableToast:!0}})},F=r(),I={duration:.2,ease:`easeInOut`};function L({open:e,children:t,testId:r,className:i}){return l()?e?(0,F.jsx)(`div`,{"data-testid":r,className:i,children:t}):null:(0,F.jsx)(n,{initial:!1,children:e?(0,F.jsx)(f.div,{"data-testid":r,initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:I,className:c(`overflow-hidden`,i),children:t},`accordion-panel`):null})}var re=e=>{let{conversationId:t}=T(),{data:n}=E(),r=n?.conversation_url,a=n?.session_api_key,o=n?.selected_repository,s=n?.workspace?.working_dir?.trim(),c=N.useMemo(()=>`${j(o,s)}/${e.filePath}`,[o,e.filePath,s]),l=e.type===`D`;return i({queryKey:e.commit?[`commit_file_diff`,t,r,a,e.commit,c]:[`file_diff`,t,r,a,c],queryFn:async()=>{if(!t)throw Error(`No conversation ID`);return k.getGitChangeDiff(t,r,a,c,e.commit)},enabled:e.enabled&&(!l||!!e.commit),staleTime:e.commit?1/0:1e3*60*5,gcTime:1e3*60*15})};function R({className:e}){let{t}=a(`openhands`);return(0,F.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,F.jsx)(`div`,{className:c(`animate-spin rounded-full border-4 border-transparent border-t-white`,e),role:`status`,"aria-label":t(s.HOME$LOADING)})})}function ie({height:e,children:t,className:n}){return(0,F.jsx)(`div`,{"data-testid":`editor-container`,className:c(`w-full border-b border-[var(--oh-border)] overflow-hidden h-[var(--editor-height)]`,n),style:{"--editor-height":`${e}px`},children:t})}var ae=[{mode:`old`,icon:_},{mode:`diff`,icon:m},{mode:`new`,icon:y}],z={renderValidationDecorations:`off`,readOnly:!0,scrollBeyondLastLine:!1,minimap:{enabled:!1},automaticLayout:!0,scrollbar:{alwaysConsumeMouseWheel:!1}};function B(e){return Math.min(e,600)}var V={A:h,D:v,M:g,R:`Renamed`,U:`Untracked`},H=e=>{e.editor.defineTheme(`custom-diff-theme`,{base:`vs-dark`,inherit:!0,rules:[{token:`comment`,foreground:`6a9955`},{token:`keyword`,foreground:`569cd6`},{token:`string`,foreground:`ce9178`},{token:`number`,foreground:`b5cea8`}],colors:{"diffEditor.insertedTextBackground":`#014b01AA`,"diffEditor.removedTextBackground":`#750000AA`,"diffEditor.insertedLineBackground":`#003f00AA`,"diffEditor.removedLineBackground":`#5a0000AA`,"diffEditor.border":`var(--oh-border-subtle)`,"editorUnnecessaryCode.border":`#00000000`,"editorUnnecessaryCode.opacity":`rgba(0, 0, 0, 0.467)`}})};function U({path:e,type:t,commit:n,isExpanded:r,onToggle:i}){let{t:o}=a(`openhands`),[l,f]=N.useState(!1),m=r!==void 0,h=m?r:l,g=!h,_=()=>{if(m){i?.();return}f(e=>!e)},[v,y]=N.useState(0),[b,x]=N.useState(!1),[C,w]=N.useState(`diff`),T=N.useRef(null),E=N.useRef(null),D=t===`A`||t===`U`,O=t===`D`,k=N.useMemo(()=>{if(t===`R`){let t=e.split(/\s+/).slice(1);return t[t.length-1]}return e},[e,t]),{data:A,isLoading:j,isSuccess:M,isRefetching:P}=re({filePath:k,type:t,enabled:!g,commit:n}),I=N.useCallback(()=>{if(!T.current)return;let e=T.current.getOriginalEditor(),t=T.current.getModifiedEditor();e&&t&&(y(B(Math.max(e.getContentHeight(),t.getContentHeight())+20)),x(!0))},[]),U=N.useCallback(()=>{E.current&&(y(B(E.current.getContentHeight()+20)),x(!0))},[]);N.useEffect(()=>{x(!1),y(0)},[g,C]);let W=e=>{T.current=e,I(),e.getOriginalEditor().onDidContentSizeChange(I),e.getModifiedEditor().onDidContentSizeChange(I)},G=e=>{E.current=e,U(),e.onDidContentSizeChange(U)},K=(t===`U`?V.A:V[t])||`?`,q=typeof K==`string`?(0,F.jsx)(S.Text,{children:K}):N.createElement(K,{className:`w-4 h-4 shrink-0`}),J=j||P,Y=u(k),X=Y===`markdown`,Z=C===`old`?A?.original??``:A?.modified??``,Q=!O,$=!g&&Q,oe=e=>(0,F.jsx)(`div`,{className:c(`relative w-full`,!b&&`h-0 overflow-hidden`),children:(0,F.jsx)(ie,{height:b?v:B(400),className:c(!b&&`absolute inset-x-0 top-0 invisible`),children:e})});return(0,F.jsxs)(`div`,{"data-testid":`file-diff-viewer-outer`,className:`w-full flex flex-col`,children:[(0,F.jsx)(`div`,{className:`flex h-10 items-center px-3 border-b border-[var(--oh-border)] hover:cursor-pointer`,onClick:_,children:(0,F.jsxs)(`span`,{className:`text-sm w-full text-content flex items-center gap-2 min-w-0`,children:[(0,F.jsx)(`span`,{className:`inline-flex w-4 h-4 shrink-0 items-center justify-center`,children:J?(0,F.jsx)(R,{className:`w-4 h-4`}):q}),(0,F.jsx)(`strong`,{className:`min-w-0 flex-1 truncate font-medium`,children:k}),Q&&(0,F.jsx)(`span`,{className:c(`flex items-center gap-0.5 shrink-0`,!$&&`invisible pointer-events-none`),onClick:e=>e.stopPropagation(),"aria-hidden":!$,children:ae.map(({mode:e,icon:t})=>(0,F.jsx)(`button`,{"data-testid":`view-mode-${e}`,type:`button`,tabIndex:$?0:-1,"aria-pressed":C===e,onClick:()=>w(e),className:c(`p-1 rounded transition-colors cursor-pointer`,C===e?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-white`),children:(0,F.jsx)(t,{className:`w-4 h-4`})},e))}),(0,F.jsx)(`button`,{"data-testid":`collapse`,type:`button`,className:`shrink-0 text-[var(--oh-muted)]`,children:g?(0,F.jsx)(p,{className:`w-4 h-4`,"aria-hidden":!0}):(0,F.jsx)(d,{className:`w-4 h-4`,"aria-hidden":!0})})]})}),(0,F.jsx)(L,{open:h,children:O&&!n?(0,F.jsx)(`div`,{"data-testid":`file-deleted-message`,className:`w-full border-b border-[var(--oh-border)] p-4 bg-base text-[var(--oh-text-dim)] text-sm`,children:o(s.DIFF_VIEWER$FILE_DELETED)}):M&&(C===`diff`?oe((0,F.jsx)(te,{"data-testid":`file-diff-viewer`,className:`w-full h-full`,language:Y,original:D?``:A?.original??``,modified:O?``:A?.modified??``,theme:`custom-diff-theme`,onMount:W,beforeMount:H,options:{...z,renderSideBySide:!D&&!O,hideUnchangedRegions:{enabled:!0}}})):X?(0,F.jsx)(`div`,{className:`w-full border-b border-[var(--oh-border)] overflow-auto p-4 bg-base prose prose-invert max-w-none`,"data-testid":`markdown-preview`,style:{maxHeight:600},children:(0,F.jsx)(ee,{content:Z,includeStandard:!0,includeHeadings:!0})}):oe((0,F.jsx)(ne,{"data-testid":`file-single-viewer`,className:`w-full h-full`,language:Y,value:Z,theme:`custom-diff-theme`,beforeMount:H,onMount:G,options:z})))})]})}function W({changes:e,commit:t}){let[n,r]=(0,N.useState)(null);return(0,F.jsx)(`div`,{"data-testid":`diff-change-list`,className:`w-full flex flex-col`,children:e.map(e=>(0,F.jsx)(U,{path:e.path,type:e.status,commit:t,isExpanded:n===e.path,onToggle:()=>r(t=>t===e.path?null:e.path)},e.path))})}function G({commit:e,showAuthor:t,isExpanded:n,onToggle:r}){let{t:i}=a(`openhands`),{data:o,isLoading:c,isSuccess:l}=P(e.sha,{enabled:n});return(0,F.jsxs)(`div`,{"data-testid":`commit-row`,className:`w-full flex flex-col`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:r,"aria-expanded":n,"data-testid":`commit-row-toggle`,className:`w-full flex h-10 items-center gap-2 px-3 border-b border-[var(--oh-border)] text-sm text-content text-left hover:cursor-pointer`,children:[(0,F.jsx)(`code`,{className:`w-[7ch] flex-shrink-0 text-center font-mono text-xs text-[var(--oh-muted)]`,children:e.shortSha}),(0,F.jsx)(`strong`,{className:`flex-1 truncate font-medium`,children:e.subject}),t&&(0,F.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] truncate max-w-32 flex-shrink-0`,children:e.author}),(0,F.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)] flex-shrink-0`,children:`${x(e.timestamp)} ${i(s.CONVERSATION$AGO)}`}),n?(0,F.jsx)(d,{className:`w-4 h-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0}):(0,F.jsx)(p,{className:`w-4 h-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]}),(0,F.jsxs)(L,{open:n,testId:`commit-row-content`,className:`w-full flex flex-col pl-6`,children:[c&&(0,F.jsx)(`div`,{className:`p-3`,children:(0,F.jsx)(R,{className:`w-4 h-4`})}),l&&o&&o.length>0&&(0,F.jsx)(W,{changes:o,commit:e.sha})]})]})}var K=`-`,q=`DIFF_VIEWER$UNCOMMITTED_FILE_COUNT`;function J({changes:e,isExpanded:t,onToggle:n}){let{t:r}=a(`openhands`);return(0,F.jsxs)(`div`,{"data-testid":`uncommitted-changes-row`,className:`w-full flex flex-col`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:n,"aria-expanded":t,"data-testid":`uncommitted-changes-row-toggle`,className:`w-full flex h-10 items-center gap-2 px-3 border-b border-[var(--oh-border)] text-sm text-content text-left hover:cursor-pointer`,children:[(0,F.jsx)(`code`,{className:`w-[7ch] flex-shrink-0 text-center font-mono text-xs text-[var(--oh-muted)]`,children:K}),(0,F.jsx)(`strong`,{className:`flex-1 truncate font-medium`,children:r(s.DIFF_VIEWER$UNCOMMITTED)}),e.length>0?(0,F.jsx)(`span`,{"data-testid":`uncommitted-changes-count`,className:`text-xs text-[var(--oh-muted)] tabular-nums flex-shrink-0`,children:r(q,{count:e.length})}):null,t?(0,F.jsx)(d,{className:`w-4 h-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0}):(0,F.jsx)(p,{className:`w-4 h-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]}),(0,F.jsx)(L,{open:t,testId:`uncommitted-changes-row-content`,className:`w-full flex flex-col pl-6`,children:e.length>0?(0,F.jsx)(W,{changes:e}):null})]})}var Y=`uncommitted`;function X({commits:e,hasMore:t,uncommittedChanges:n,autoExpandUncommitted:r=!1,onAutoExpandHandled:i}){let{t:o}=a(`openhands`),[c,l]=N.useState(null);N.useEffect(()=>{r&&(l(Y),i?.())},[r,i]);let u=new Set(e.map(e=>e.author)).size>1;return(0,F.jsxs)(`section`,{"data-testid":`commit-list`,className:`w-full flex flex-col`,children:[(0,F.jsx)(J,{changes:n,isExpanded:c===Y,onToggle:()=>l(e=>e===Y?null:Y)}),e.map(e=>(0,F.jsx)(G,{commit:e,showAuthor:u,isExpanded:c===e.sha,onToggle:()=>l(t=>t===e.sha?null:e.sha)},e.sha)),t&&(0,F.jsx)(`div`,{"data-testid":`commit-list-cap-notice`,className:`px-3 py-2.5 text-xs text-[var(--oh-muted)]`,children:o(s.DIFF_VIEWER$COMMITS_CAP,{count:e.length})})]})}function Z(){return(0,F.jsx)(g,{"aria-hidden":!0,className:`size-full`})}function Q(){let{t:e}=a(`openhands`),{conversationId:t}=T(),{commits:n,hasMore:r,isUnsupported:i,isLoading:c,isSuccess:l}=D(),{data:u,isSuccess:d,isLoading:f}=O(),p=b(e=>e.commitsAutoExpandSection),m=b(e=>e.setCommitsAutoExpandSection),h=(0,N.useCallback)(()=>m(null),[m]),{curAgentState:g}=w(),_=!o.includes(g),v=l&&!i&&n.length>0,y=d&&(u?.length??0)>0,x=v||y,S=c||_&&f;return(0,F.jsx)(`main`,{className:`h-full w-full flex flex-col items-stretch`,children:x?(0,F.jsx)(`div`,{className:`h-full overflow-y-auto flex flex-col items-stretch custom-scrollbar-always`,children:(0,F.jsx)(X,{commits:v?n:[],hasMore:v?r:!1,uncommittedChanges:d?(u??[]).slice(0,100):[],autoExpandUncommitted:p===`uncommitted`,onAutoExpandHandled:h},t)}):(0,F.jsxs)(`div`,{className:`flex-1 flex items-center justify-center`,children:[!_&&(0,F.jsx)(C,{testId:`commits-tab-status`,messageKey:s.DIFF_VIEWER$WAITING_FOR_RUNTIME}),_&&S&&(0,F.jsx)(C,{testId:`commits-tab-status`,messageKey:s.DIFF_VIEWER$LOADING}),_&&!S&&(0,F.jsx)(M,{icon:(0,F.jsx)(Z,{}),children:e(s.DIFF_VIEWER$NO_COMMITS)})]})})}export{Q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{U as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{t as n}from"./sdk-section-page-
|
|
1
|
+
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{U as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~i58xkef6-cHFhpUBq.js";import{t as n}from"./sdk-section-page-DFEiuiFQ.js";var r=e();function i(){return(0,r.jsx)(n,{settingsSources:[{settingsSource:`agent_settings`,sectionKeys:[`condenser`]}],testId:`condenser-settings-screen`})}var a=t(i);export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./useTranslation-CCgUjPJF.js";import{K as n}from"./utils-
|
|
1
|
+
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./useTranslation-CCgUjPJF.js";import{K as n}from"./utils-D-gOfhmN.js";import{t as r}from"./modal-backdrop-BSzNhM4r.js";import{t as i}from"./brand-button-mQq2Ld1I.js";var a=e();function o({text:e,onConfirm:o,onCancel:s,confirmText:c,isConfirming:l=!1}){let{t:u}=t(`openhands`);return(0,a.jsx)(r,{onClose:l?void 0:s,closeOnEscape:!l,children:(0,a.jsxs)(`div`,{"data-testid":`confirmation-modal`,className:`bg-base-secondary p-4 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)]`,children:[(0,a.jsx)(`p`,{children:e}),(0,a.jsxs)(`div`,{className:`w-full flex justify-end gap-2`,children:[(0,a.jsx)(i,{testId:`cancel-button`,type:`button`,onClick:s,variant:`secondary`,isDisabled:l,children:u(n.BUTTON$CANCEL)}),(0,a.jsx)(i,{testId:`confirm-button`,type:`button`,onClick:o,variant:`primary`,isDisabled:l,children:c??u(n.BUTTON$CONFIRM)})]})]})})}export{o as t};
|
package/build/assets/{context-menu-list-item-Cm7-7Y-7.js → context-menu-list-item-lx2zk9G7.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{i as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{t as r}from"./utils-
|
|
1
|
+
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{i as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~czjee3a3-BXXGJNDU.js";import{t as r}from"./utils-D-gOfhmN.js";import{a as i,s as a}from"./dropdown-classes-goDldkiu.js";import{t as o}from"./dist-Bl64nBZL.js";var s=n(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]);e();var c=t(),l=o(`z-50 overflow-hidden text-[var(--oh-foreground)]`,{variants:{theme:{default:`absolute rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 shadow-lg`,naked:`relative`,popover:`relative rounded-md border border-[var(--oh-border-subtle)] bg-tertiary px-1 py-1 shadow-lg`},size:{compact:`py-1 px-1`,default:``},layout:{vertical:r(`flex flex-col`,i)},position:{top:`bottom-full`,bottom:`top-full`,none:``},spacing:{default:`mt-2`,none:``},alignment:{left:`left-0`,right:`right-0`,none:``}},compoundVariants:[{theme:`naked`,className:`shadow-none`}],defaultVariants:{theme:`default`,size:`default`,layout:`vertical`,spacing:`default`}});function u({testId:e,children:t,className:n,style:i,onKeyDown:a,ref:o,theme:s,size:u,layout:d,position:f,spacing:p,alignment:m}){return(0,c.jsx)(`ul`,{"data-testid":e,"data-position":f,ref:o,style:i,onKeyDown:a,className:r(l({theme:s,size:u,layout:d,position:f,spacing:p,alignment:m}),n),children:t})}function d({children:e,testId:t,onClick:n,isDisabled:i,className:o,ref:s}){return(0,c.jsx)(`button`,{ref:s,"data-testid":t||`context-menu-list-item`,type:`button`,onClick:n,disabled:i,className:r(a,`text-nowrap`,o),children:e})}export{u as n,s as r,d as t};
|