@openhands/agent-canvas 1.7.2 → 1.8.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/{Trans-DP5rcauH.js → Trans-B7lYw4uD.js} +1 -1
- package/build/assets/{acp-providers-BHKZvEm5.js → acp-providers-WUD4tfSq.js} +1 -1
- package/build/assets/active-backend-context-mY7Gff5c.js +2 -0
- package/build/assets/{agent-context-settings-CTaN-Iw9.js → agent-context-settings-BTUmWEzL.js} +1 -1
- package/build/assets/{agent-profiles-settings-CR4VTqv_.js → agent-profiles-settings-Ilqid_R5.js} +1 -1
- package/build/assets/agent-server-conversation-service.api-C_7YnjzP.js +41 -0
- package/build/assets/{agent-settings-BIOsUglV.js → agent-settings-BGTyoT6X.js} +2 -2
- package/build/assets/agent-settings-CxfT4ksO.js +1 -0
- package/build/assets/{alert-banner-C1nzoXBC.js → alert-banner-eRyIwDyU.js} +1 -1
- package/build/assets/api-key-entry-screen-JOx3SH1-.js +1 -0
- package/build/assets/app-settings-D53QZy5p.js +1 -0
- package/build/assets/automation-detail-nEflClmc.js +2 -0
- package/build/assets/{automation-export-Bu-r-EzL.js → automation-export-BO_kfqC8.js} +1 -1
- package/build/assets/{automations-list-CYw7_6FR.js → automations-list-BYncC7gv.js} +1 -1
- package/build/assets/{back-nav-button-Be_L157B.js → back-nav-button-C02hGa8t.js} +1 -1
- package/build/assets/backend-form-modal-CKrBF80P.js +1 -0
- package/build/assets/{backend-synced-settings-badge-BNpEylNP.js → backend-synced-settings-badge-CQ9xtNWm.js} +1 -1
- package/build/assets/{badge-DwgrwohM.js → badge-CzXbf7tR.js} +1 -1
- package/build/assets/{base-modal-CSHhJTSr.js → base-modal-DkVyzFMt.js} +1 -1
- package/build/assets/{brand-button-CQO8oqVo.js → brand-button-BUlDL-mz.js} +1 -1
- package/build/assets/{browser-BUDJnBg4.js → browser-3QjrEr1D.js} +1 -1
- package/build/assets/{browser-tab-CEApjoEV.js → browser-tab-BijpUbdt.js} +1 -1
- package/build/assets/{chat-send-button-D4614wUz.js → chat-send-button-BKsVjhtA.js} +1 -1
- package/build/assets/check-CrxQfJZ2.js +1 -0
- package/build/assets/chevron-down-D_LsyTA7.js +1 -0
- package/build/assets/circle-check-DZn9HkLE.js +1 -0
- package/build/assets/{circle-plus-check-toggle-E3Ecb_gg.js → circle-plus-check-toggle-DdjUiOo1.js} +1 -1
- package/build/assets/cloud-funnel-analytics-NlmDoeo2.js +1 -0
- package/build/assets/{combobox-caret-C8_eGdp2.js → combobox-caret-Dl9UtvD6.js} +1 -1
- package/build/assets/{command-menu-N_BriUy8.js → command-menu-CvLPs7dg.js} +1 -1
- package/build/assets/{condenser-settings-Czi8cKxV.js → condenser-settings-C4Y9CzQV.js} +1 -1
- package/build/assets/{confirmation-modal-gZtbojCm.js → confirmation-modal-CRBJSllP.js} +1 -1
- package/build/assets/{context-menu-list-item-BTHGFhIx.js → context-menu-list-item-FGaafXGh.js} +1 -1
- package/build/assets/conversation-D_ORtpKC.js +1 -0
- package/build/assets/conversation-Dpc5nmGi.js +90 -0
- package/build/assets/conversation-panel-D_ORtpKC.js +1 -0
- package/build/assets/conversation-state-store-CGRQemtx.js +1 -0
- package/build/assets/{conversation-tab-empty-state-BCMHkGQk.js → conversation-tab-empty-state-CDjvNgpG.js} +1 -1
- package/build/assets/{copy-B8Y5ufoR.js → copy-Drwu97Gx.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-C4l3CMSd.js → copy-to-clipboard-button-NbN1clVr.js} +1 -1
- package/build/assets/{device-verify-C_M7Z8xs.js → device-verify-CDm_WrVu.js} +1 -1
- package/build/assets/{dropdown-classes-DQlj-MpS.js → dropdown-classes-CqA2BTCL.js} +1 -1
- package/build/assets/{entry.client-DETaouwO.js → entry.client-BO2KQj0y.js} +2 -2
- package/build/assets/{enum-filter-dropdown-paB-lFSP.js → enum-filter-dropdown-DSqPZnsD.js} +1 -1
- package/build/assets/{environment-switch-overlay-D0FgCMqs.js → environment-switch-overlay-mGl2pqqx.js} +1 -1
- package/build/assets/extensions-hub-Br3Lgynp.js +1 -0
- package/build/assets/extensions-navigation-BQmstKDZ.js +1 -0
- package/build/assets/{external-link-Cnnd6ikC.js → external-link-D9B2QMPf.js} +1 -1
- package/build/assets/files-tab-4c9HFSLo.js +1 -0
- package/build/assets/{form-control-classes-CSPevi7c.js → form-control-classes-CtVAktAy.js} +1 -1
- package/build/assets/{format-time-delta-DuhE50B-.js → format-time-delta-DICE64sz.js} +1 -1
- package/build/assets/git-provider-icon-0PqmIS_S.js +1 -0
- package/build/assets/{highlighted-source-view-suUKd5if.js → highlighted-source-view-KMsA9c4a.js} +1 -1
- package/build/assets/home-D9JsyEmE.js +1 -0
- package/build/assets/{home-sN90Xcxp.js → home-TFhnmZLx.js} +1 -1
- package/build/assets/index-home-D9JsyEmE.js +1 -0
- package/build/assets/install-server-modal-BgGRnqA0.js +1 -0
- package/build/assets/{launch-Ccnhte5b.js → launch-DjkKw55l.js} +1 -1
- package/build/assets/{list-todo-_BXQzOiB.js → list-todo-BpAf7aOT.js} +1 -1
- package/build/assets/{llm-not-configured-banner-DTWzISnk.js → llm-not-configured-banner-Y4W9-sar.js} +4 -4
- package/build/assets/llm-settings-D8zNkIlP.js +1 -0
- package/build/assets/llm-settings-nPwv7hKu.js +1 -0
- package/build/assets/{llm-subscription-service-W5BprsNA.js → llm-subscription-service-COTgZc1C.js} +1 -1
- package/build/assets/loader-circle-CGD6-Vak.js +1 -0
- package/build/assets/{loading-spinner-CcpnCr_d.js → loading-spinner-DRFyh6Iy.js} +1 -1
- package/build/assets/manage-backends-modal-DiRWE3tJ.js +1 -0
- package/build/assets/manifest-1cf33a7b.js +1 -0
- package/build/assets/markdown-renderer-U40HF0Ak.js +8 -0
- package/build/assets/mcp-xDMaHzOw.js +9 -0
- package/build/assets/{messages-DINDkPNK.js → messages-CdNfZPgd.js} +2 -2
- package/build/assets/{modal-body-DQhiw-AR.js → modal-body-C3bGicn4.js} +1 -1
- package/build/assets/{modal-classes-YaEEa5eZ.js → modal-classes-DFFO6BMU.js} +1 -1
- package/build/assets/{modal-close-button-turIYn0t.js → modal-close-button-vxkAIRyZ.js} +1 -1
- package/build/assets/{onboarding-BegDrOKn.js → onboarding-DWuFieEA.js} +1 -1
- package/build/assets/onboarding-modal-C8m72Dpb.js +1 -0
- package/build/assets/organization-service.api-CQ73CB-S.js +1 -0
- package/build/assets/{pencil-8_lvWDoZ.js → pencil-DzW2GB2M.js} +1 -1
- package/build/assets/{planner-tab-w6HT0N_A.js → planner-tab-YG0bGxDY.js} +1 -1
- package/build/assets/plugins-management-service-ijhH8OSh.js +1 -0
- package/build/assets/plus-CTGLo3aa.js +1 -0
- package/build/assets/profiles-service.api-C32pPm70.js +1 -0
- package/build/assets/providers-DuSn9s2i.js +1 -0
- package/build/assets/proxy-BiyDhMBd.js +1 -0
- package/build/assets/{puzzle-DXWdfaa7.js → puzzle-DlqT0yvr.js} +1 -1
- package/build/assets/{recommended-automations-launcher-BF2mtAKw.js → recommended-automations-launcher-Dru1yN46.js} +2 -2
- package/build/assets/{refresh-cw-D7CYLy-d.js → refresh-cw-Br5254f4.js} +1 -1
- package/build/assets/root-DOLLQteU.js +2 -0
- package/build/assets/root-layout-xmylWoew.js +3 -0
- package/build/assets/schema-field-htfNouTG.js +1 -0
- package/build/assets/{sdk-section-page-BW-i45yr.js → sdk-section-page-D0K1dBQY.js} +1 -1
- package/build/assets/search-BrpWXWUi.js +1 -0
- package/build/assets/secrets-service-Dbv5Zb8G.js +1 -0
- package/build/assets/{secrets-settings-D7U1ErCH.js → secrets-settings-Da4SSaX9.js} +1 -1
- package/build/assets/{segmented-toggle-DbbD3Tve.js → segmented-toggle-CZKOdIly.js} +1 -1
- package/build/assets/settings-F4a09IxY.js +1 -0
- package/build/assets/{settings-dropdown-input-Dx6vlkgf.js → settings-dropdown-input-jOiv5Yrk.js} +1 -1
- package/build/assets/{settings-index-COAdxm2Q.js → settings-index-CyJBf5NA.js} +1 -1
- package/build/assets/{settings-input-BjW_zyTN.js → settings-input-BEaTCem1.js} +1 -1
- package/build/assets/{settings-list-classes-gQdBahdt.js → settings-list-classes-VqMzkYYt.js} +1 -1
- package/build/assets/{settings-modal-CFnbQ8_4.js → settings-modal-C-S1NpbC.js} +1 -1
- package/build/assets/settings-service.api-CTJRrvMu.js +1 -0
- package/build/assets/{settings-switch-UNSf8K8I.js → settings-switch-B405oU_v.js} +1 -1
- package/build/assets/{shared-conversation-CnMxy7p_.js → shared-conversation-BvWtTwES.js} +1 -1
- package/build/assets/{sidebar-layout-DXHtbEj1.js → sidebar-layout-BGMuyC86.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-U78hQRJ1.js → sidebar-mobile-menu-toggle-xiKoUfGa.js} +1 -1
- package/build/assets/{sidebar-nav-link-pvUivfK2.js → sidebar-nav-link-DA4_ct9G.js} +1 -1
- package/build/assets/{sidebar-store-DwrYKwYr.js → sidebar-store-FRJ3rADB.js} +1 -1
- package/build/assets/{skill-card-pill-row-D7XCz5uk.js → skill-card-pill-row-BMdhr_sd.js} +1 -1
- package/build/assets/{skill-icon-badge-HqBWZ2Eq.js → skill-icon-badge-CGUkgcVH.js} +1 -1
- package/build/assets/{skills-plugins-BPhaNpfx.js → skills-plugins-C5eJnyft.js} +1 -1
- package/build/assets/{skills-settings-CcwMtnnJ.js → skills-settings-pUxMr6WZ.js} +1 -1
- package/build/assets/{styled-tooltip-DsjDnR_W.js → styled-tooltip-B3kIdVyH.js} +1 -1
- package/build/assets/{task-list-tab-BmaTwjaS.js → task-list-tab-B3k4W1cK.js} +1 -1
- package/build/assets/{terminal-BRcoba5B.js → terminal-CBI_41Zc.js} +1 -1
- package/build/assets/{toggle-switch-BptY3XRG.js → toggle-switch-DYRr9CAR.js} +1 -1
- package/build/assets/{trash-2-Bq4lHbTB.js → trash-2-gZPlx23R.js} +1 -1
- package/build/assets/{typography-C6fuRTTT.js → typography-B1UxuuEC.js} +1 -1
- package/build/assets/{use-acp-credential-form-B0_pZ_uS.js → use-acp-credential-form-CjSvKWFH.js} +1 -1
- package/build/assets/use-activate-agent-profile-DCRf47e-.js +1 -0
- package/build/assets/use-agent-profiles-DmT9zxAN.js +1 -0
- package/build/assets/{use-can-manage-org-profiles-CrG1km7R.js → use-can-manage-org-profiles-vBiP7rHF.js} +1 -1
- package/build/assets/use-cloud-current-user-id-BMq9gw93.js +1 -0
- package/build/assets/use-config-C959QcRC.js +1 -0
- package/build/assets/{use-create-conversation-Dsa4nzU9.js → use-create-conversation-CakhLF0X.js} +1 -1
- package/build/assets/{use-create-secret-BnxuAjDt.js → use-create-secret-RT4QtSS9.js} +1 -1
- package/build/assets/use-llm-profiles-CdaxVpyY.js +1 -0
- package/build/assets/use-onboarding-completion-CJU4MNAY.js +1 -0
- package/build/assets/use-plugins-marketplace-D-93nqtJ.js +1 -0
- package/build/assets/{use-save-agent-profile-2Mk9ZX37.js → use-save-agent-profile-DGJ3-u0M.js} +1 -1
- package/build/assets/{use-save-settings-BRh9p_fv.js → use-save-settings--C6LZXfI.js} +1 -1
- package/build/assets/use-settings-DIAo5KFk.js +1 -0
- package/build/assets/use-settings-nav-items-DPK5sxvR.js +16 -0
- package/build/assets/use-skills-D_mLhYNa.js +1 -0
- package/build/assets/use-tracking-COqZLobY.js +1 -0
- package/build/assets/{use-user-conversation-GnGhs_Ob.js → use-user-conversation-DhcAEyJX.js} +1 -1
- package/build/assets/{useMutation-DyQXZFEF.js → useMutation-DHLpZ6J0.js} +1 -1
- package/build/assets/utils-DsWhWn2F.js +1 -0
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js} +1 -1
- package/build/assets/{vendor~files-tab-vm3f67Pz.js → vendor~files-tab-atebg0iG.js} +1 -1
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-kX4LrGQC.js → vendor~index-home~home~conversation-panel~conversation-G9DMrR7m.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-DpA6fir3.js → vendor~root-layout~conversation-panel~conversation-DEhW1h3I.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation-EShpjxey.js → vendor~root-layout~index-home~home~conversation-panel~conversation-Acmf1sKj.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-DD_UNO02.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-CmzCY1BT.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-Be63Q2Ln.js → vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C7Yh77RT.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~bi2r7bko-Bw4AuHN1.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~bi2r7bko-VFnwct3q.js} +1 -1
- package/build/assets/{verification-settings-CaCzojbc.js → verification-settings-Vr5cN4md.js} +1 -1
- package/build/assets/x-Dx_JbpHA.js +1 -0
- package/build/favicon-16x16.png +0 -0
- package/build/favicon-32x32.png +0 -0
- package/build/favicon.ico +0 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +2 -0
- package/build/locales/ca/openhands.json +2 -0
- package/build/locales/de/openhands.json +2 -0
- package/build/locales/en/openhands.json +2 -0
- package/build/locales/es/openhands.json +2 -0
- package/build/locales/fr/openhands.json +2 -0
- package/build/locales/it/openhands.json +2 -0
- package/build/locales/ja/openhands.json +2 -0
- package/build/locales/ko-KR/openhands.json +2 -0
- package/build/locales/no/openhands.json +2 -0
- package/build/locales/pt/openhands.json +2 -0
- package/build/locales/tr/openhands.json +2 -0
- package/build/locales/uk/openhands.json +2 -0
- package/build/locales/zh-CN/openhands.json +2 -0
- package/build/locales/zh-TW/openhands.json +2 -0
- package/config/defaults.json +4 -4
- package/dist/api/agent-server-adapter.cjs +1 -1
- package/dist/api/agent-server-adapter.cjs.map +1 -1
- package/dist/api/agent-server-adapter.js +7 -7
- package/dist/api/agent-server-adapter.js.map +1 -1
- package/dist/api/automation-service/automation-service.api.cjs +1 -1
- package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
- package/dist/api/automation-service/automation-service.api.js +95 -95
- package/dist/api/automation-service/automation-service.api.js.map +1 -1
- package/dist/api/backend-registry/storage.cjs +1 -1
- package/dist/api/backend-registry/storage.cjs.map +1 -1
- package/dist/api/backend-registry/storage.js +1 -1
- package/dist/api/backend-registry/storage.js.map +1 -1
- package/dist/api/backend-registry/types.d.ts +2 -0
- package/dist/api/cloud/conversation-service.api.cjs +1 -1
- package/dist/api/cloud/conversation-service.api.js +22 -22
- package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
- package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
- package/dist/api/mcp-service/mcp-service.api.js +19 -19
- package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
- package/dist/api/settings-service/settings-service.api.cjs +1 -1
- package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
- package/dist/api/settings-service/settings-service.api.js +26 -12
- package/dist/api/settings-service/settings-service.api.js.map +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.js +16 -16
- package/dist/components/features/mcp-page/installed-server-card.cjs +1 -1
- package/dist/components/features/mcp-page/installed-server-card.cjs.map +1 -1
- package/dist/components/features/mcp-page/installed-server-card.d.ts +2 -2
- package/dist/components/features/mcp-page/installed-server-card.js +6 -7
- package/dist/components/features/mcp-page/installed-server-card.js.map +1 -1
- package/dist/components/features/mcp-page/installed-servers-section.cjs +1 -1
- package/dist/components/features/mcp-page/installed-servers-section.cjs.map +1 -1
- package/dist/components/features/mcp-page/installed-servers-section.d.ts +2 -2
- package/dist/components/features/mcp-page/installed-servers-section.js +2 -2
- package/dist/components/features/mcp-page/installed-servers-section.js.map +1 -1
- package/dist/components/features/mcp-page/mcp-server-health.cjs +1 -1
- package/dist/components/features/mcp-page/mcp-server-health.js +4 -4
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs.map +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js.map +1 -1
- 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/contexts/active-backend-context.cjs +1 -1
- package/dist/contexts/active-backend-context.cjs.map +1 -1
- package/dist/contexts/active-backend-context.d.ts +3 -2
- package/dist/contexts/active-backend-context.js +55 -42
- package/dist/contexts/active-backend-context.js.map +1 -1
- package/dist/favicon-16x16.png +0 -0
- package/dist/favicon-32x32.png +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.js +5 -5
- package/dist/hooks/query/use-cloud-current-user-id.cjs +1 -1
- package/dist/hooks/query/use-cloud-current-user-id.cjs.map +1 -1
- package/dist/hooks/query/use-cloud-current-user-id.js +7 -5
- package/dist/hooks/query/use-cloud-current-user-id.js.map +1 -1
- package/dist/hooks/query/use-cloud-organizations.cjs +1 -1
- package/dist/hooks/query/use-cloud-organizations.cjs.map +1 -1
- package/dist/hooks/query/use-cloud-organizations.js +5 -1
- package/dist/hooks/query/use-cloud-organizations.js.map +1 -1
- package/dist/hooks/use-can-manage-org-profiles.cjs +1 -1
- package/dist/hooks/use-can-manage-org-profiles.cjs.map +1 -1
- package/dist/hooks/use-can-manage-org-profiles.js +2 -1
- package/dist/hooks/use-can-manage-org-profiles.js.map +1 -1
- package/dist/hooks/use-tracking.cjs +1 -1
- package/dist/hooks/use-tracking.js +9 -9
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +2 -0
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +1 -1
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +34 -0
- package/dist/i18n/translation.js.map +1 -1
- package/dist/locales/ar/openhands.json +2 -0
- package/dist/locales/ca/openhands.json +2 -0
- package/dist/locales/de/openhands.json +2 -0
- package/dist/locales/en/openhands.json +2 -0
- package/dist/locales/es/openhands.json +2 -0
- package/dist/locales/fr/openhands.json +2 -0
- package/dist/locales/it/openhands.json +2 -0
- package/dist/locales/ja/openhands.json +2 -0
- package/dist/locales/ko-KR/openhands.json +2 -0
- package/dist/locales/no/openhands.json +2 -0
- package/dist/locales/pt/openhands.json +2 -0
- package/dist/locales/tr/openhands.json +2 -0
- package/dist/locales/uk/openhands.json +2 -0
- package/dist/locales/zh-CN/openhands.json +2 -0
- package/dist/locales/zh-TW/openhands.json +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.js +9 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.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/app-settings.cjs +1 -1
- package/dist/routes/app-settings.js +5 -5
- package/dist/routes/mcp.cjs +1 -1
- package/dist/routes/mcp.cjs.map +1 -1
- package/dist/routes/mcp.js +73 -82
- package/dist/routes/mcp.js.map +1 -1
- package/dist/services/telemetry.cjs +1 -1
- package/dist/services/telemetry.cjs.map +1 -1
- package/dist/services/telemetry.d.ts +8 -0
- package/dist/services/telemetry.js +163 -116
- package/dist/services/telemetry.js.map +1 -1
- package/dist/types/mcp-server.d.ts +5 -0
- package/dist/types/settings.d.ts +3 -0
- package/dist/utils/mcp-config.cjs +1 -1
- package/dist/utils/mcp-config.cjs.map +1 -1
- package/dist/utils/mcp-config.d.ts +8 -0
- package/dist/utils/mcp-config.js +25 -20
- package/dist/utils/mcp-config.js.map +1 -1
- package/dist/utils/mcp-installed-servers.cjs +1 -1
- package/dist/utils/mcp-installed-servers.cjs.map +1 -1
- package/dist/utils/mcp-installed-servers.js +6 -3
- package/dist/utils/mcp-installed-servers.js.map +1 -1
- package/package.json +2 -2
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-safe.mjs +2 -2
- package/build/assets/active-backend-context-BlZPzZNU.js +0 -1
- package/build/assets/agent-server-conversation-service.api-Btmi4q6d.js +0 -41
- package/build/assets/agent-settings-KQs-occT.js +0 -1
- package/build/assets/api-key-entry-screen-BhR24gkM.js +0 -1
- package/build/assets/app-settings-Bs4sY8WP.js +0 -1
- package/build/assets/automation-detail-CwDnJbYR.js +0 -2
- package/build/assets/backend-form-modal-Ce-KRHOJ.js +0 -1
- package/build/assets/check-BMOG005H.js +0 -1
- package/build/assets/chevron-down-CV1zZP_K.js +0 -1
- package/build/assets/circle-check-lvN_jFN5.js +0 -1
- package/build/assets/client-source-1v-kWLNU.js +0 -1
- package/build/assets/cloud-funnel-analytics-CasMM7EO.js +0 -1
- package/build/assets/conversation-C25pc2dT.js +0 -1
- package/build/assets/conversation-CObLYSJd.js +0 -90
- package/build/assets/conversation-panel-C25pc2dT.js +0 -1
- package/build/assets/conversation-state-store-DTq4hFoP.js +0 -1
- package/build/assets/extensions-hub-BKftOQ-X.js +0 -1
- package/build/assets/extensions-navigation-DF24q1H1.js +0 -1
- package/build/assets/files-tab-SAiFCnS5.js +0 -1
- package/build/assets/git-provider-icon-BREx-yUX.js +0 -1
- package/build/assets/home-EPNFgzUh.js +0 -1
- package/build/assets/index-home-EPNFgzUh.js +0 -1
- package/build/assets/install-server-modal-BI8yUfmr.js +0 -1
- package/build/assets/llm-settings-BXk5_Pac.js +0 -1
- package/build/assets/llm-settings-C1vpgWam.js +0 -1
- package/build/assets/loader-circle-6zlEYCJw.js +0 -1
- package/build/assets/manage-backends-modal-DhflyGTf.js +0 -1
- package/build/assets/manifest-8082e879.js +0 -1
- package/build/assets/markdown-renderer-CvOO0YIr.js +0 -8
- package/build/assets/mcp-CxLPda-W.js +0 -9
- package/build/assets/onboarding-modal-DdvE6rzw.js +0 -1
- package/build/assets/organization-service.api-CT2OQlLz.js +0 -1
- package/build/assets/plugins-management-service-DVkoM3eA.js +0 -1
- package/build/assets/plus-vIbGD459.js +0 -1
- package/build/assets/profiles-service.api-CBafmAPO.js +0 -1
- package/build/assets/providers-9UzRB9mT.js +0 -1
- package/build/assets/proxy-C79PCMjo.js +0 -1
- package/build/assets/root-Sj7W28yE.js +0 -2
- package/build/assets/root-layout-DbhKVoc7.js +0 -3
- package/build/assets/schema-field-CV6bFnoL.js +0 -1
- package/build/assets/search-sKuYKllf.js +0 -1
- package/build/assets/secrets-service-BjK-bPN2.js +0 -1
- package/build/assets/settings-Bj5Oo45A.js +0 -1
- package/build/assets/settings-service.api-DryhKdSr.js +0 -1
- package/build/assets/telemetry-cmCL3o6Z.js +0 -2
- package/build/assets/use-activate-agent-profile-DH33MvVj.js +0 -1
- package/build/assets/use-agent-profiles-Dmd_4H8q.js +0 -1
- package/build/assets/use-cloud-current-user-id-B6DP3s47.js +0 -1
- package/build/assets/use-config-Csy8EAP9.js +0 -1
- package/build/assets/use-llm-profiles-BMQoc612.js +0 -1
- package/build/assets/use-onboarding-completion-B-2BTS-y.js +0 -1
- package/build/assets/use-plugins-marketplace-PBc_XNz_.js +0 -1
- package/build/assets/use-settings-DBI44RnH.js +0 -1
- package/build/assets/use-settings-nav-items-Cva28C-c.js +0 -16
- package/build/assets/use-skills-RQsCtdzN.js +0 -1
- package/build/assets/use-tracking-CN1nIMnY.js +0 -1
- package/build/assets/utils-qjs_KuS4.js +0 -1
- package/build/assets/x-EjvKGawc.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Bcgpimp9.js";import{t as n}from"./utils-
|
|
1
|
+
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Bcgpimp9.js";import{t as n}from"./utils-DsWhWn2F.js";import{n as r}from"./navigation-context-BOGzIng3.js";import{t as i}from"./navigation-link-Bxmn-pCs.js";import{a,c as o,f as s,o as c,s as l,t as u,u as d}from"./sidebar-layout-BGMuyC86.js";import{t as f}from"./styled-tooltip-B3kIdVyH.js";e();var p=t();function m({active:e,className:t,children:r}){return(0,p.jsxs)(`span`,{className:n(u,t),children:[(0,p.jsx)(`span`,{"aria-hidden":!0,className:l(e)}),(0,p.jsx)(`span`,{className:o(e),children:r})]})}function h(e,t,n){return t===`/`||n?e===t:e===t||e.startsWith(`${t}/`)}function g({to:e,label:t,end:o=!1,indent:l=!1,testId:u,disabled:g=!1,icon:_,collapsed:v=!1,hoverContent:y,forceActive:b=!1}){let{currentPath:x}=r(),S=b||h(x,e,o),C=(0,p.jsxs)(i,{to:e,end:o,"data-testid":u,tabIndex:g?-1:0,"aria-label":v?t:void 0,"aria-disabled":g||void 0,onClick:e=>{g&&e.preventDefault()},className:n(s({indent:l,collapsed:v}),!v&&(S?c.active:c.idle),g&&`opacity-50`,g&&`pointer-events-none`),children:[_?v?(0,p.jsx)(m,{active:S,children:_}):(0,p.jsx)(`span`,{className:a,children:_}):null,(0,p.jsx)(`span`,{className:d(v),children:t})]});return v?(0,p.jsx)(f,{content:y??t,placement:`right`,tooltipClassName:y?`p-0 bg-tertiary text-white`:void 0,children:C}):C}export{m as n,g as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-
|
|
1
|
+
import{E as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js";import{d as t,f as n,l as r}from"./conversation-store-C6hSXHw0.js";var i=e(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),a=n(e=>({isOpen:!1,open:()=>e({isOpen:!0}),close:()=>e({isOpen:!1}),toggle:()=>e(e=>({isOpen:!e.isOpen}))})),o=`openhands-sidebar`,s=`openhands-sidebar-collapsed`,c=n()(t(e=>({collapsed:!1,setCollapsed:t=>e(e=>({collapsed:typeof t==`function`?t(e.collapsed):t})),toggleCollapsed:()=>e(e=>({collapsed:!e.collapsed}))}),{name:o,storage:r(()=>localStorage),partialize:e=>({collapsed:e.collapsed})}));if(typeof window<`u`)try{let e=window.localStorage.getItem(s);window.localStorage.getItem(o)===null&&(e===`true`||e===`false`)&&c.setState({collapsed:e===`true`}),e!==null&&window.localStorage.removeItem(s)}catch{}export{a as n,i as r,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{t as i,z as a}from"./utils-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{t as i,z as a}from"./utils-DsWhWn2F.js";import{i as o}from"./extension-module-card-classes-Bo43vY5V.js";var s=e(t(),1),c=n(),l=o,u=6;function d(e,t){if(e.length===0||t<=0)return 0;let n=0;for(let r=0;r<e.length;r+=1){let i=e[r],a=r>0?u:0,o=e.length-r-1>0?46:0;if(n+a+i+o>t)return Math.max(1,r);n+=a+i}return e.length}function f({pills:e,testId:t}){let{t:n}=r(`openhands`),l=s.useRef(null),u=s.useRef(null),[f,p]=s.useState(e.length),m=s.useCallback(()=>{let e=l.current,t=u.current;!e||!t||p(d(Array.from(t.children).map(e=>e.offsetWidth),e.clientWidth))},[]);if(s.useLayoutEffect(()=>{m()},[e,m]),s.useEffect(()=>{let e=l.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>m());return t.observe(e),()=>t.disconnect()},[m]),e.length===0)return null;let h=Math.max(0,e.length-f);return(0,c.jsxs)(`div`,{className:`min-w-0 overflow-hidden`,children:[(0,c.jsx)(`div`,{ref:u,"aria-hidden":!0,className:`pointer-events-none fixed top-0 -left-[10000px] z-[-1] flex flex-nowrap items-center gap-1.5 opacity-0`,children:e.map(e=>(0,c.jsx)(`span`,{className:`inline-flex shrink-0`,children:e.node},e.id))}),(0,c.jsxs)(`div`,{ref:l,"data-testid":t,className:`flex w-full min-w-0 max-w-full flex-nowrap items-center gap-1.5 overflow-hidden`,children:[e.slice(0,f).map(e=>(0,c.jsx)(`span`,{className:`inline-flex shrink-0`,children:e.node},e.id)),h>0?(0,c.jsx)(`span`,{"data-testid":`${t}-overflow`,className:i(o,`font-medium text-tertiary-alt`),title:e.slice(f).map(e=>e.id).join(`, `),children:n(a.SETTINGS$SKILLS_PILLS_MORE,{count:h})}):null]})]})}export{f as n,l as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-Bcgpimp9.js";import{t}from"./utils-
|
|
1
|
+
import{yt as e}from"./vendor-styling-Bcgpimp9.js";import{t}from"./utils-DsWhWn2F.js";import{t as n}from"./skills-CYFLsN5U.js";var r=e();function i({skillName:e,className:i}){return(0,r.jsx)(`span`,{"aria-hidden":`true`,title:e,"data-testid":`skill-icon-${e}`,className:t(`inline-flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden`,`rounded-lg border border-white/10 bg-surface-raised text-white`,`shadow-[inset_0_1px_0_rgba(255,255,255,0.18)]`,`[&>svg]:h-5 [&>svg]:w-5`,i),children:(0,r.jsx)(n,{})})}export{i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{U as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{t as o}from"./useMutation-DyQXZFEF.js";import{t as s}from"./useQuery-B38jBavx.js";import{d as c,it as l,n as u,rt as d,st as f}from"./active-backend-context-BlZPzZNU.js";import{t as p,z as m}from"./utils-qjs_KuS4.js";import{t as h}from"./search-sKuYKllf.js";import{t as g}from"./x-EjvKGawc.js";import{t as _}from"./loading-spinner-CcpnCr_d.js";import{t as v}from"./modal-backdrop-X-vKo61e.js";import{n as y}from"./modal-classes-YaEEa5eZ.js";import{t as b}from"./brand-button-CQO8oqVo.js";import{n as x}from"./navigation-context-BOGzIng3.js";import{t as S}from"./modal-close-button-turIYn0t.js";import{t as C}from"./settings-input-BjW_zyTN.js";import{t as w}from"./plugins-management-service-DVkoM3eA.js";import{a as T,i as E,r as D}from"./extension-module-card-classes-Bo43vY5V.js";import{t as O}from"./settings-switch-UNSf8K8I.js";import{n as k}from"./circle-plus-check-toggle-E3Ecb_gg.js";import{n as A,t as j}from"./use-plugins-marketplace-PBc_XNz_.js";import{n as ee}from"./extensions-navigation-DF24q1H1.js";import{t as M}from"./skill-icon-badge-HqBWZ2Eq.js";import{n as N}from"./settings-like-page-layout-classes-DyxyJ0k4.js";import{n as P,t as F}from"./highlighted-source-view-suUKd5if.js";var I=e(t(),1),L=n();function R({plugin:e,isBusy:t=!1,isDisabled:n=!1,onOpen:r,onInstall:i,onToggle:o}){let{t:s}=a(`openhands`);return(0,L.jsxs)(`div`,{"data-testid":`plugin-card-${e.name}`,role:`button`,tabIndex:0,onClick:r,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r())},className:p(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,T,D),children:[(0,L.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`h3`,{"data-testid":`plugin-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,L.jsx)(`p`,{"data-testid":`plugin-source-${e.name}`,className:`mt-0.5 min-w-0 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}):null]}),e.installed?(0,L.jsx)(k,{testId:`plugin-toggle-${e.name}`,isSelected:e.enabled,isDisabled:n||t,onToggle:o,disableTooltipKey:m.COMMON$DISABLE}):e.isLocal?(0,L.jsx)(`span`,{"data-testid":`plugin-local-badge-${e.name}`,className:p(E,`flex-shrink-0`),children:s(m.SETTINGS$PLUGINS_FILTER_LOCAL)}):(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-install-${e.name}`,isDisabled:n||t,className:`flex-shrink-0 whitespace-nowrap`,onClick:e=>{e?.stopPropagation(),i()},children:s(t?m.SETTINGS$PLUGINS_INSTALLING:m.SETTINGS$PLUGINS_INSTALL)})]}),e.description?(0,L.jsx)(`p`,{"data-testid":`plugin-description-${e.name}`,className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:e.description}):null,(e.installed||e.isLocal)&&e.version?(0,L.jsx)(`span`,{"data-testid":`plugin-version-${e.name}`,className:p(E,`self-start`),children:s(m.SETTINGS$SKILLS_VERSION,{version:e.version})}):null]})}var z=[{value:`all`,labelKey:m.SETTINGS$PLUGINS_FILTER_ALL},{value:`installed`,labelKey:m.SETTINGS$PLUGINS_FILTER_INSTALLED},{value:`available`,labelKey:m.SETTINGS$PLUGINS_FILTER_AVAILABLE},{value:`local`,labelKey:m.SETTINGS$PLUGINS_FILTER_LOCAL}];function B({search:e,onSearchChange:t,statusFilter:n,onStatusFilterChange:r}){let{t:i}=a(`openhands`);return(0,L.jsxs)(`div`,{"data-testid":`plugins-toolbar`,className:`flex items-stretch gap-2`,children:[(0,L.jsxs)(`div`,{className:p(`relative flex flex-1 min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`),children:[(0,L.jsx)(h,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,L.jsx)(`input`,{"data-testid":`plugins-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:i(m.SETTINGS$PLUGINS_SEARCH_PLACEHOLDER),"aria-label":i(m.SETTINGS$PLUGINS_SEARCH_PLACEHOLDER),className:p(`flex-1 min-w-0 bg-transparent border-0 outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),e?(0,L.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":i(m.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,L.jsx)(g,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,L.jsx)(`div`,{"data-testid":`plugins-status-filter`,className:`flex shrink-0 items-center gap-1 rounded-lg border border-[var(--oh-border)] bg-base-secondary p-1`,children:z.map(e=>(0,L.jsx)(`button`,{type:`button`,"data-testid":`plugins-filter-${e.value}`,"aria-pressed":n===e.value,onClick:()=>r(e.value),className:p(`cursor-pointer rounded-md px-3 py-1 text-xs transition-colors`,n===e.value?`bg-surface-raised text-white`:`text-tertiary-alt hover:text-white`),children:i(e.labelKey)},e.value))})]})}var V=(e,t)=>s({queryKey:[`plugin-file-content`,e,t],queryFn:()=>{if(!e||!t)throw Error(`No file selected`);return A.getPluginFileContent(e,t)},enabled:!!(e&&t),retry:!1,staleTime:1e3*60*10,refetchOnWindowFocus:!1});function H({basePath:e,files:t}){let{t:n}=a(`openhands`),[r,i]=I.useState(null),o=r&&t.includes(r)?r:null,{data:s,isLoading:c,isError:l}=V(o?e:null,o);return(0,L.jsxs)(`section`,{"data-testid":`plugin-files-section`,className:`flex min-w-0 flex-col gap-2`,children:[(0,L.jsx)(`h3`,{className:`text-sm font-medium text-white`,children:n(m.COMMON$FILES)}),(0,L.jsxs)(`div`,{className:`min-w-0 rounded-lg border border-[var(--oh-border)] bg-[rgba(255,255,255,0.04)]`,children:[(0,L.jsx)(`div`,{className:`max-h-48 overflow-y-auto custom-scrollbar`,children:(0,L.jsx)(P,{paths:t,selectedPath:o,onSelectFile:e=>i(t=>t===e?null:e)})}),o?(0,L.jsxs)(`div`,{"data-testid":`plugin-file-content`,className:`flex h-60 min-w-0 flex-col border-t border-[var(--oh-border)]`,children:[(0,L.jsx)(`p`,{className:`truncate px-3 py-2 text-xs text-tertiary-alt`,title:o,children:o}),(0,L.jsx)(`div`,{className:`min-h-0 flex-1`,children:c?(0,L.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,L.jsx)(_,{size:`small`})}):l?(0,L.jsx)(`p`,{className:`px-3 py-2 text-xs text-tertiary-light`,children:n(m.FILES$LOAD_ERROR)}):s?.kind===`binary`?(0,L.jsx)(`p`,{className:`px-3 py-2 text-xs text-tertiary-light`,children:n(m.FILES$BINARY_FALLBACK)}):(0,L.jsx)(F,{path:o,text:s?.text??``})})]}):null]})]})}function U({plugin:e,isBusy:t=!1,isDisabled:n=!1,onToggle:r,onInstall:i,onUninstall:o,onRefresh:s,onClose:c,onStartConversation:l}){let{t:u}=a(`openhands`),d=n||t;return(0,L.jsx)(v,{onClose:c,"aria-label":e.name,children:(0,L.jsxs)(`div`,{"data-testid":`plugin-detail-modal`,"data-plugin-name":e.name,className:`relative flex w-[640px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,L.jsx)(S,{onClose:c,testId:`plugin-detail-modal-close`}),(0,L.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,L.jsx)(`h2`,{className:p(`pr-6`,y),children:e.name}),e.source?(0,L.jsx)(`p`,{className:`mt-1 break-all text-xs text-tertiary-alt`,children:e.source}):null]}),(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[e.description?(0,L.jsx)(`p`,{className:`text-sm leading-relaxed text-tertiary-light`,children:e.description}):null,(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[e.isLocal?(0,L.jsx)(`span`,{className:E,children:u(m.SETTINGS$PLUGINS_FILTER_LOCAL)}):null,e.version?(0,L.jsx)(`span`,{className:E,children:u(m.SETTINGS$SKILLS_VERSION,{version:e.version})}):null,e.ref?(0,L.jsxs)(`span`,{className:E,children:[u(m.SETTINGS$PLUGINS_REF_LABEL),` `,e.ref]}):null,e.repoPath?(0,L.jsxs)(`span`,{className:E,children:[u(m.SETTINGS$PLUGINS_REPO_PATH_LABEL),` `,e.repoPath]}):null]}),e.installed?(0,L.jsx)(O,{testId:`plugin-modal-toggle-${e.name}`,isToggled:e.enabled,onToggle:r,isDisabled:d,togglePosition:`right`,children:u(e.enabled?m.SETTINGS$SKILLS_ENABLED:m.SETTINGS$SKILLS_DISABLED)}):null,e.skills?.length?(0,L.jsxs)(`section`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,L.jsx)(`h3`,{className:`text-sm font-medium text-white`,children:u(m.SETTINGS$PLUGINS_SKILLS_IN_BUNDLE)}),(0,L.jsx)(`ul`,{className:`flex min-w-0 flex-col gap-2`,children:e.skills.map(e=>(0,L.jsxs)(`li`,{"data-testid":`plugin-bundled-skill-${e.name}`,className:`flex items-start gap-3 rounded-lg border border-[var(--oh-border)] bg-[rgba(255,255,255,0.04)] px-3 py-2.5`,children:[(0,L.jsx)(M,{skillName:e.name}),(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`p`,{className:`truncate text-sm font-semibold text-white`,children:e.name}),e.description?(0,L.jsx)(`p`,{className:`mt-0.5 break-words text-xs leading-relaxed text-tertiary-light`,children:e.description}):null]})]},e.name))})]}):null,e.path&&e.files?.length?(0,L.jsx)(H,{basePath:e.path,files:e.files}):null]}),(0,L.jsxs)(`footer`,{className:`flex flex-shrink-0 flex-wrap justify-end gap-2 px-6 pb-6 pt-4`,children:[e.installed?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-detail-refresh-${e.name}`,isDisabled:d,onClick:s,children:u(m.SETTINGS$PLUGINS_REFRESH)}),(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-detail-uninstall-${e.name}`,isDisabled:d,onClick:o,children:u(m.SETTINGS$PLUGINS_UNINSTALL)})]}):e.isLocal?null:(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-detail-install-${e.name}`,isDisabled:d,onClick:i,children:u(t?m.SETTINGS$PLUGINS_INSTALLING:m.SETTINGS$PLUGINS_INSTALL)}),e.source&&l?(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-detail-start-conversation-${e.name}`,onClick:l,children:u(m.COMMON$START_CONVERSATION)}):null,(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-detail-modal-dismiss`,onClick:c,children:u(m.BUTTON$CLOSE)})]})]})})}function W(){let e=i(),{t}=a(`openhands`);return o({mutationFn:e=>w.installPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:c.installed}),e.invalidateQueries({queryKey:c.marketplace}),l(t(m.SETTINGS$PLUGINS_INSTALL_SUCCESS))},onError:e=>{d(f(e)||t(m.ERROR$GENERIC))}})}function G({onClose:e,onInstalled:t}){let{t:n}=a(`openhands`),r=W(),[i,o]=I.useState(``),[s,c]=I.useState(``),[l,u]=I.useState(``),d=i.trim(),f=d.length>0&&!r.isPending;return(0,L.jsx)(v,{onClose:e,"aria-label":n(m.SETTINGS$PLUGINS_ADD_MODAL_TITLE),children:(0,L.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),f&&r.mutate({source:d,ref:s.trim()||null,repo_path:l.trim()||null},{onSuccess:()=>{t?.(),e()}})},"data-testid":`add-plugin-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,L.jsx)(S,{onClose:e,testId:`add-plugin-modal-close`}),(0,L.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,L.jsx)(`h2`,{className:p(`pr-6`,y),children:n(m.SETTINGS$PLUGINS_ADD_MODAL_TITLE)}),(0,L.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:n(m.SETTINGS$PLUGINS_ADD_MODAL_INTRO)})]}),(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,L.jsx)(C,{testId:`add-plugin-source-input`,label:n(m.SETTINGS$PLUGINS_SOURCE_LABEL),type:`text`,value:i,onChange:o,placeholder:n(m.SETTINGS$PLUGINS_SOURCE_PLACEHOLDER),showRequiredTag:!0}),(0,L.jsx)(C,{testId:`add-plugin-ref-input`,label:n(m.SETTINGS$PLUGINS_REF_LABEL),type:`text`,value:s,onChange:c,showOptionalTag:!0}),(0,L.jsx)(C,{testId:`add-plugin-repo-path-input`,label:n(m.SETTINGS$PLUGINS_REPO_PATH_LABEL),type:`text`,value:l,onChange:u,showOptionalTag:!0})]}),(0,L.jsxs)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:[(0,L.jsx)(b,{type:`button`,variant:`secondary`,onClick:e,testId:`add-plugin-modal-dismiss`,children:n(m.BUTTON$CLOSE)}),(0,L.jsx)(b,{type:`submit`,variant:`primary`,testId:`add-plugin-submit`,isDisabled:!f,children:n(r.isPending?m.SETTINGS$PLUGINS_INSTALLING:m.SETTINGS$PLUGINS_INSTALL)})]})]})})}function K(e,t,n=void 0){let r=new Map;for(let t of e??[])r.set(t.name,{name:t.name,description:t.description,source:t.source,ref:t.ref??null,repoPath:t.repo_path??null,installed:t.installed,enabled:!1,version:null,inCatalog:!0,isLocal:!1,path:t.path??null,skills:t.skills??null,files:t.files??null});for(let e of t??[]){let t=r.get(e.name),n=e.skills!=null||e.files!=null;r.set(e.name,{name:e.name,description:t?.description??e.description??null,source:e.source??t?.source??null,ref:e.resolved_ref??t?.ref??null,repoPath:e.repo_path??t?.repoPath??null,installed:!0,enabled:e.enabled,version:e.version??null,inCatalog:t?.inCatalog??!1,isLocal:!1,path:n?e.install_path:t?.path??null,skills:n?e.skills??null:t?.skills??null,files:n?e.files??null:t?.files??null})}for(let e of n??[])r.has(e.name)||r.set(e.name,{name:e.name,description:e.description||null,source:null,ref:null,repoPath:null,installed:!1,enabled:!1,version:e.version||null,inCatalog:!1,isLocal:!0,path:e.path??null,skills:e.skills??null,files:e.files??null});let i=e=>e.installed?0:e.isLocal?1:2;return Array.from(r.values()).sort((e,t)=>{let n=i(e)-i(t);return n===0?e.name.localeCompare(t.name):n})}function q(e,t){let n=t.trim().toLowerCase();return n?[e.name,e.description??``,e.source??``,e.repoPath??``,e.ref??``].some(e=>e.toLowerCase().includes(n)):!0}function J(e,t){return t===`installed`?e.installed:t===`available`?!e.installed&&!e.isLocal:t===`local`?e.isLocal:!0}var Y=()=>s({queryKey:c.installed,queryFn:()=>w.listInstalledPlugins(),staleTime:1e3*60*10,refetchOnWindowFocus:!1}),X=()=>s({queryKey:c.local,queryFn:()=>A.getLocalPlugins(),staleTime:1e3*60*10,refetchOnWindowFocus:!1});function Z(){let e=i(),{t}=a(`openhands`);return o({mutationFn:({name:e,enabled:t})=>w.setPluginEnabled(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:c.installed})},onError:e=>{d(f(e)||t(m.ERROR$GENERIC))}})}function Q(){let e=i(),{t}=a(`openhands`);return o({mutationFn:e=>w.uninstallPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:c.installed}),e.invalidateQueries({queryKey:c.marketplace}),l(t(m.SETTINGS$PLUGINS_UNINSTALL_SUCCESS))},onError:e=>{d(f(e)||t(m.ERROR$GENERIC))}})}function te(){let e=i(),{t}=a(`openhands`);return o({mutationFn:e=>w.refreshPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:c.installed}),l(t(m.SETTINGS$PLUGINS_REFRESH_SUCCESS))},onError:e=>{d(f(e)||t(m.ERROR$GENERIC))}})}function ne(e){let t=btoa(JSON.stringify(e));return`/launch?${new URLSearchParams({plugins:t}).toString()}`}var $=r(function(){let{t:e}=a(`openhands`),{backend:t}=u(),{navigate:n}=x(),r=t.kind===`local`,{data:i,isLoading:o}=j(),{data:s,isLoading:c}=Y(),{data:l,isLoading:d}=X(),f=W(),h=Z(),g=Q(),_=te(),[v,y]=I.useState(``),[S,C]=I.useState(`all`),[w,T]=I.useState(null),[E,D]=I.useState(!1),O=I.useMemo(()=>K(i,s,l),[i,s,l]),k=I.useMemo(()=>O.filter(e=>J(e,S)&&q(e,v)),[O,S,v]),A=w?O.find(e=>e.name===w)??null:null,M=o||c||d,P=(h.isPending?h.variables?.name:void 0)??(g.isPending?g.variables:void 0)??(_.isPending?_.variables:void 0)??null,F=e=>P===e.name||f.isPending&&f.variables?.source===e.source,z=e=>{e.source&&f.mutate({source:e.source,ref:e.ref,repo_path:e.repoPath})},V=(e,t)=>{h.mutate({name:e.name,enabled:t})},H=e=>{g.mutate(e.name,{onSuccess:()=>T(null)})},$=e=>{_.mutate(e.name)},re=e=>{e.source&&n(ne([{source:e.source,ref:e.ref,repo_path:e.repoPath}]))};return(0,L.jsxs)(`div`,{"data-testid":`skills-plugins-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,L.jsx)(ee,{}),(0,L.jsx)(`main`,{className:p(N,`h-full`),children:(0,L.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,L.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,L.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(m.SETTINGS$PLUGINS_TITLE)}),(0,L.jsx)(`div`,{"data-testid":`plugins-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(m.SETTINGS$PLUGINS_PAGE_DESCRIPTION)})]}),(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugins-add-plugin-button`,isDisabled:!r,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>D(!0),children:e(m.SETTINGS$PLUGINS_ADD_BUTTON)})]}),M&&(0,L.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,L.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}),!M&&O.length===0&&(0,L.jsx)(`div`,{"data-testid":`plugins-empty`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,L.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(m.SETTINGS$PLUGINS_NO_PLUGINS)})}),!M&&O.length>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(B,{search:v,onSearchChange:y,statusFilter:S,onStatusFilterChange:C}),k.length===0?(0,L.jsx)(`div`,{"data-testid":`plugins-no-match`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,L.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(m.SETTINGS$PLUGINS_NO_MATCH)})}):(0,L.jsx)(`section`,{className:p(`flex min-w-0 flex-col gap-3`,`@container min-w-0 w-full`),children:(0,L.jsx)(`div`,{className:`grid min-w-0 grid-cols-1 gap-3 @min-[600px]:grid-cols-2`,children:k.map(e=>(0,L.jsx)(R,{plugin:e,isBusy:F(e),isDisabled:!r,onOpen:()=>T(e.name),onInstall:()=>z(e),onToggle:t=>V(e,t)},e.name))})})]}),A&&(0,L.jsx)(U,{plugin:A,isBusy:F(A),isDisabled:!r,onToggle:e=>V(A,e),onInstall:()=>z(A),onUninstall:()=>H(A),onRefresh:()=>$(A),onStartConversation:()=>re(A),onClose:()=>T(null)}),E&&(0,L.jsx)(G,{onClose:()=>D(!1)})]})})]})});export{$ as default};
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{U as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{t as o}from"./useMutation-DHLpZ6J0.js";import{t as s}from"./useQuery-B38jBavx.js";import{Dt as c,I as l,Ot as u,jt as d,n as f}from"./active-backend-context-mY7Gff5c.js";import{t as p,z as m}from"./utils-DsWhWn2F.js";import{t as h}from"./search-BrpWXWUi.js";import{t as g}from"./x-Dx_JbpHA.js";import{t as _}from"./loading-spinner-DRFyh6Iy.js";import{t as v}from"./modal-backdrop-X-vKo61e.js";import{n as y}from"./modal-classes-DFFO6BMU.js";import{t as b}from"./brand-button-BUlDL-mz.js";import{n as x}from"./navigation-context-BOGzIng3.js";import{t as S}from"./modal-close-button-vxkAIRyZ.js";import{t as C}from"./settings-input-BEaTCem1.js";import{t as w}from"./plugins-management-service-ijhH8OSh.js";import{a as T,i as E,r as D}from"./extension-module-card-classes-Bo43vY5V.js";import{t as O}from"./settings-switch-B405oU_v.js";import{n as k}from"./circle-plus-check-toggle-DdjUiOo1.js";import{n as A,t as ee}from"./use-plugins-marketplace-D-93nqtJ.js";import{n as j}from"./extensions-navigation-BQmstKDZ.js";import{t as M}from"./skill-icon-badge-CGUkgcVH.js";import{n as N}from"./settings-like-page-layout-classes-DyxyJ0k4.js";import{n as P,t as F}from"./highlighted-source-view-KMsA9c4a.js";var I=e(t(),1),L=n();function R({plugin:e,isBusy:t=!1,isDisabled:n=!1,onOpen:r,onInstall:i,onToggle:o}){let{t:s}=a(`openhands`);return(0,L.jsxs)(`div`,{"data-testid":`plugin-card-${e.name}`,role:`button`,tabIndex:0,onClick:r,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r())},className:p(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,T,D),children:[(0,L.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`h3`,{"data-testid":`plugin-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,L.jsx)(`p`,{"data-testid":`plugin-source-${e.name}`,className:`mt-0.5 min-w-0 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}):null]}),e.installed?(0,L.jsx)(k,{testId:`plugin-toggle-${e.name}`,isSelected:e.enabled,isDisabled:n||t,onToggle:o,disableTooltipKey:m.COMMON$DISABLE}):e.isLocal?(0,L.jsx)(`span`,{"data-testid":`plugin-local-badge-${e.name}`,className:p(E,`flex-shrink-0`),children:s(m.SETTINGS$PLUGINS_FILTER_LOCAL)}):(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-install-${e.name}`,isDisabled:n||t,className:`flex-shrink-0 whitespace-nowrap`,onClick:e=>{e?.stopPropagation(),i()},children:s(t?m.SETTINGS$PLUGINS_INSTALLING:m.SETTINGS$PLUGINS_INSTALL)})]}),e.description?(0,L.jsx)(`p`,{"data-testid":`plugin-description-${e.name}`,className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:e.description}):null,(e.installed||e.isLocal)&&e.version?(0,L.jsx)(`span`,{"data-testid":`plugin-version-${e.name}`,className:p(E,`self-start`),children:s(m.SETTINGS$SKILLS_VERSION,{version:e.version})}):null]})}var z=[{value:`all`,labelKey:m.SETTINGS$PLUGINS_FILTER_ALL},{value:`installed`,labelKey:m.SETTINGS$PLUGINS_FILTER_INSTALLED},{value:`available`,labelKey:m.SETTINGS$PLUGINS_FILTER_AVAILABLE},{value:`local`,labelKey:m.SETTINGS$PLUGINS_FILTER_LOCAL}];function B({search:e,onSearchChange:t,statusFilter:n,onStatusFilterChange:r}){let{t:i}=a(`openhands`);return(0,L.jsxs)(`div`,{"data-testid":`plugins-toolbar`,className:`flex items-stretch gap-2`,children:[(0,L.jsxs)(`div`,{className:p(`relative flex flex-1 min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`),children:[(0,L.jsx)(h,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,L.jsx)(`input`,{"data-testid":`plugins-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:i(m.SETTINGS$PLUGINS_SEARCH_PLACEHOLDER),"aria-label":i(m.SETTINGS$PLUGINS_SEARCH_PLACEHOLDER),className:p(`flex-1 min-w-0 bg-transparent border-0 outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),e?(0,L.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":i(m.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,L.jsx)(g,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,L.jsx)(`div`,{"data-testid":`plugins-status-filter`,className:`flex shrink-0 items-center gap-1 rounded-lg border border-[var(--oh-border)] bg-base-secondary p-1`,children:z.map(e=>(0,L.jsx)(`button`,{type:`button`,"data-testid":`plugins-filter-${e.value}`,"aria-pressed":n===e.value,onClick:()=>r(e.value),className:p(`cursor-pointer rounded-md px-3 py-1 text-xs transition-colors`,n===e.value?`bg-surface-raised text-white`:`text-tertiary-alt hover:text-white`),children:i(e.labelKey)},e.value))})]})}var V=(e,t)=>s({queryKey:[`plugin-file-content`,e,t],queryFn:()=>{if(!e||!t)throw Error(`No file selected`);return A.getPluginFileContent(e,t)},enabled:!!(e&&t),retry:!1,staleTime:1e3*60*10,refetchOnWindowFocus:!1});function H({basePath:e,files:t}){let{t:n}=a(`openhands`),[r,i]=I.useState(null),o=r&&t.includes(r)?r:null,{data:s,isLoading:c,isError:l}=V(o?e:null,o);return(0,L.jsxs)(`section`,{"data-testid":`plugin-files-section`,className:`flex min-w-0 flex-col gap-2`,children:[(0,L.jsx)(`h3`,{className:`text-sm font-medium text-white`,children:n(m.COMMON$FILES)}),(0,L.jsxs)(`div`,{className:`min-w-0 rounded-lg border border-[var(--oh-border)] bg-[rgba(255,255,255,0.04)]`,children:[(0,L.jsx)(`div`,{className:`max-h-48 overflow-y-auto custom-scrollbar`,children:(0,L.jsx)(P,{paths:t,selectedPath:o,onSelectFile:e=>i(t=>t===e?null:e)})}),o?(0,L.jsxs)(`div`,{"data-testid":`plugin-file-content`,className:`flex h-60 min-w-0 flex-col border-t border-[var(--oh-border)]`,children:[(0,L.jsx)(`p`,{className:`truncate px-3 py-2 text-xs text-tertiary-alt`,title:o,children:o}),(0,L.jsx)(`div`,{className:`min-h-0 flex-1`,children:c?(0,L.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,L.jsx)(_,{size:`small`})}):l?(0,L.jsx)(`p`,{className:`px-3 py-2 text-xs text-tertiary-light`,children:n(m.FILES$LOAD_ERROR)}):s?.kind===`binary`?(0,L.jsx)(`p`,{className:`px-3 py-2 text-xs text-tertiary-light`,children:n(m.FILES$BINARY_FALLBACK)}):(0,L.jsx)(F,{path:o,text:s?.text??``})})]}):null]})]})}function U({plugin:e,isBusy:t=!1,isDisabled:n=!1,onToggle:r,onInstall:i,onUninstall:o,onRefresh:s,onClose:c,onStartConversation:l}){let{t:u}=a(`openhands`),d=n||t;return(0,L.jsx)(v,{onClose:c,"aria-label":e.name,children:(0,L.jsxs)(`div`,{"data-testid":`plugin-detail-modal`,"data-plugin-name":e.name,className:`relative flex w-[640px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,L.jsx)(S,{onClose:c,testId:`plugin-detail-modal-close`}),(0,L.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,L.jsx)(`h2`,{className:p(`pr-6`,y),children:e.name}),e.source?(0,L.jsx)(`p`,{className:`mt-1 break-all text-xs text-tertiary-alt`,children:e.source}):null]}),(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[e.description?(0,L.jsx)(`p`,{className:`text-sm leading-relaxed text-tertiary-light`,children:e.description}):null,(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[e.isLocal?(0,L.jsx)(`span`,{className:E,children:u(m.SETTINGS$PLUGINS_FILTER_LOCAL)}):null,e.version?(0,L.jsx)(`span`,{className:E,children:u(m.SETTINGS$SKILLS_VERSION,{version:e.version})}):null,e.ref?(0,L.jsxs)(`span`,{className:E,children:[u(m.SETTINGS$PLUGINS_REF_LABEL),` `,e.ref]}):null,e.repoPath?(0,L.jsxs)(`span`,{className:E,children:[u(m.SETTINGS$PLUGINS_REPO_PATH_LABEL),` `,e.repoPath]}):null]}),e.installed?(0,L.jsx)(O,{testId:`plugin-modal-toggle-${e.name}`,isToggled:e.enabled,onToggle:r,isDisabled:d,togglePosition:`right`,children:u(e.enabled?m.SETTINGS$SKILLS_ENABLED:m.SETTINGS$SKILLS_DISABLED)}):null,e.skills?.length?(0,L.jsxs)(`section`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,L.jsx)(`h3`,{className:`text-sm font-medium text-white`,children:u(m.SETTINGS$PLUGINS_SKILLS_IN_BUNDLE)}),(0,L.jsx)(`ul`,{className:`flex min-w-0 flex-col gap-2`,children:e.skills.map(e=>(0,L.jsxs)(`li`,{"data-testid":`plugin-bundled-skill-${e.name}`,className:`flex items-start gap-3 rounded-lg border border-[var(--oh-border)] bg-[rgba(255,255,255,0.04)] px-3 py-2.5`,children:[(0,L.jsx)(M,{skillName:e.name}),(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`p`,{className:`truncate text-sm font-semibold text-white`,children:e.name}),e.description?(0,L.jsx)(`p`,{className:`mt-0.5 break-words text-xs leading-relaxed text-tertiary-light`,children:e.description}):null]})]},e.name))})]}):null,e.path&&e.files?.length?(0,L.jsx)(H,{basePath:e.path,files:e.files}):null]}),(0,L.jsxs)(`footer`,{className:`flex flex-shrink-0 flex-wrap justify-end gap-2 px-6 pb-6 pt-4`,children:[e.installed?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-detail-refresh-${e.name}`,isDisabled:d,onClick:s,children:u(m.SETTINGS$PLUGINS_REFRESH)}),(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-detail-uninstall-${e.name}`,isDisabled:d,onClick:o,children:u(m.SETTINGS$PLUGINS_UNINSTALL)})]}):e.isLocal?null:(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-detail-install-${e.name}`,isDisabled:d,onClick:i,children:u(t?m.SETTINGS$PLUGINS_INSTALLING:m.SETTINGS$PLUGINS_INSTALL)}),e.source&&l?(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-detail-start-conversation-${e.name}`,onClick:l,children:u(m.COMMON$START_CONVERSATION)}):null,(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugin-detail-modal-dismiss`,onClick:c,children:u(m.BUTTON$CLOSE)})]})]})})}function W(){let e=i(),{t}=a(`openhands`);return o({mutationFn:e=>w.installPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:l.installed}),e.invalidateQueries({queryKey:l.marketplace}),u(t(m.SETTINGS$PLUGINS_INSTALL_SUCCESS))},onError:e=>{c(d(e)||t(m.ERROR$GENERIC))}})}function G({onClose:e,onInstalled:t}){let{t:n}=a(`openhands`),r=W(),[i,o]=I.useState(``),[s,c]=I.useState(``),[l,u]=I.useState(``),d=i.trim(),f=d.length>0&&!r.isPending;return(0,L.jsx)(v,{onClose:e,"aria-label":n(m.SETTINGS$PLUGINS_ADD_MODAL_TITLE),children:(0,L.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),f&&r.mutate({source:d,ref:s.trim()||null,repo_path:l.trim()||null},{onSuccess:()=>{t?.(),e()}})},"data-testid":`add-plugin-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,L.jsx)(S,{onClose:e,testId:`add-plugin-modal-close`}),(0,L.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,L.jsx)(`h2`,{className:p(`pr-6`,y),children:n(m.SETTINGS$PLUGINS_ADD_MODAL_TITLE)}),(0,L.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:n(m.SETTINGS$PLUGINS_ADD_MODAL_INTRO)})]}),(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,L.jsx)(C,{testId:`add-plugin-source-input`,label:n(m.SETTINGS$PLUGINS_SOURCE_LABEL),type:`text`,value:i,onChange:o,placeholder:n(m.SETTINGS$PLUGINS_SOURCE_PLACEHOLDER),showRequiredTag:!0}),(0,L.jsx)(C,{testId:`add-plugin-ref-input`,label:n(m.SETTINGS$PLUGINS_REF_LABEL),type:`text`,value:s,onChange:c,showOptionalTag:!0}),(0,L.jsx)(C,{testId:`add-plugin-repo-path-input`,label:n(m.SETTINGS$PLUGINS_REPO_PATH_LABEL),type:`text`,value:l,onChange:u,showOptionalTag:!0})]}),(0,L.jsxs)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:[(0,L.jsx)(b,{type:`button`,variant:`secondary`,onClick:e,testId:`add-plugin-modal-dismiss`,children:n(m.BUTTON$CLOSE)}),(0,L.jsx)(b,{type:`submit`,variant:`primary`,testId:`add-plugin-submit`,isDisabled:!f,children:n(r.isPending?m.SETTINGS$PLUGINS_INSTALLING:m.SETTINGS$PLUGINS_INSTALL)})]})]})})}function K(e,t,n=void 0){let r=new Map;for(let t of e??[])r.set(t.name,{name:t.name,description:t.description,source:t.source,ref:t.ref??null,repoPath:t.repo_path??null,installed:t.installed,enabled:!1,version:null,inCatalog:!0,isLocal:!1,path:t.path??null,skills:t.skills??null,files:t.files??null});for(let e of t??[]){let t=r.get(e.name),n=e.skills!=null||e.files!=null;r.set(e.name,{name:e.name,description:t?.description??e.description??null,source:e.source??t?.source??null,ref:e.resolved_ref??t?.ref??null,repoPath:e.repo_path??t?.repoPath??null,installed:!0,enabled:e.enabled,version:e.version??null,inCatalog:t?.inCatalog??!1,isLocal:!1,path:n?e.install_path:t?.path??null,skills:n?e.skills??null:t?.skills??null,files:n?e.files??null:t?.files??null})}for(let e of n??[])r.has(e.name)||r.set(e.name,{name:e.name,description:e.description||null,source:null,ref:null,repoPath:null,installed:!1,enabled:!1,version:e.version||null,inCatalog:!1,isLocal:!0,path:e.path??null,skills:e.skills??null,files:e.files??null});let i=e=>e.installed?0:e.isLocal?1:2;return Array.from(r.values()).sort((e,t)=>{let n=i(e)-i(t);return n===0?e.name.localeCompare(t.name):n})}function q(e,t){let n=t.trim().toLowerCase();return n?[e.name,e.description??``,e.source??``,e.repoPath??``,e.ref??``].some(e=>e.toLowerCase().includes(n)):!0}function J(e,t){return t===`installed`?e.installed:t===`available`?!e.installed&&!e.isLocal:t===`local`?e.isLocal:!0}var Y=()=>s({queryKey:l.installed,queryFn:()=>w.listInstalledPlugins(),staleTime:1e3*60*10,refetchOnWindowFocus:!1}),X=()=>s({queryKey:l.local,queryFn:()=>A.getLocalPlugins(),staleTime:1e3*60*10,refetchOnWindowFocus:!1});function Z(){let e=i(),{t}=a(`openhands`);return o({mutationFn:({name:e,enabled:t})=>w.setPluginEnabled(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:l.installed})},onError:e=>{c(d(e)||t(m.ERROR$GENERIC))}})}function Q(){let e=i(),{t}=a(`openhands`);return o({mutationFn:e=>w.uninstallPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:l.installed}),e.invalidateQueries({queryKey:l.marketplace}),u(t(m.SETTINGS$PLUGINS_UNINSTALL_SUCCESS))},onError:e=>{c(d(e)||t(m.ERROR$GENERIC))}})}function te(){let e=i(),{t}=a(`openhands`);return o({mutationFn:e=>w.refreshPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:l.installed}),u(t(m.SETTINGS$PLUGINS_REFRESH_SUCCESS))},onError:e=>{c(d(e)||t(m.ERROR$GENERIC))}})}function ne(e){let t=btoa(JSON.stringify(e));return`/launch?${new URLSearchParams({plugins:t}).toString()}`}var $=r(function(){let{t:e}=a(`openhands`),{backend:t}=f(),{navigate:n}=x(),r=t.kind===`local`,{data:i,isLoading:o}=ee(),{data:s,isLoading:c}=Y(),{data:l,isLoading:u}=X(),d=W(),h=Z(),g=Q(),_=te(),[v,y]=I.useState(``),[S,C]=I.useState(`all`),[w,T]=I.useState(null),[E,D]=I.useState(!1),O=I.useMemo(()=>K(i,s,l),[i,s,l]),k=I.useMemo(()=>O.filter(e=>J(e,S)&&q(e,v)),[O,S,v]),A=w?O.find(e=>e.name===w)??null:null,M=o||c||u,P=(h.isPending?h.variables?.name:void 0)??(g.isPending?g.variables:void 0)??(_.isPending?_.variables:void 0)??null,F=e=>P===e.name||d.isPending&&d.variables?.source===e.source,z=e=>{e.source&&d.mutate({source:e.source,ref:e.ref,repo_path:e.repoPath})},V=(e,t)=>{h.mutate({name:e.name,enabled:t})},H=e=>{g.mutate(e.name,{onSuccess:()=>T(null)})},$=e=>{_.mutate(e.name)},re=e=>{e.source&&n(ne([{source:e.source,ref:e.ref,repo_path:e.repoPath}]))};return(0,L.jsxs)(`div`,{"data-testid":`skills-plugins-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,L.jsx)(j,{}),(0,L.jsx)(`main`,{className:p(N,`h-full`),children:(0,L.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,L.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,L.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(m.SETTINGS$PLUGINS_TITLE)}),(0,L.jsx)(`div`,{"data-testid":`plugins-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(m.SETTINGS$PLUGINS_PAGE_DESCRIPTION)})]}),(0,L.jsx)(b,{type:`button`,variant:`secondary`,testId:`plugins-add-plugin-button`,isDisabled:!r,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>D(!0),children:e(m.SETTINGS$PLUGINS_ADD_BUTTON)})]}),M&&(0,L.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,L.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}),!M&&O.length===0&&(0,L.jsx)(`div`,{"data-testid":`plugins-empty`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,L.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(m.SETTINGS$PLUGINS_NO_PLUGINS)})}),!M&&O.length>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(B,{search:v,onSearchChange:y,statusFilter:S,onStatusFilterChange:C}),k.length===0?(0,L.jsx)(`div`,{"data-testid":`plugins-no-match`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,L.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(m.SETTINGS$PLUGINS_NO_MATCH)})}):(0,L.jsx)(`section`,{className:p(`flex min-w-0 flex-col gap-3`,`@container min-w-0 w-full`),children:(0,L.jsx)(`div`,{className:`grid min-w-0 grid-cols-1 gap-3 @min-[600px]:grid-cols-2`,children:k.map(e=>(0,L.jsx)(R,{plugin:e,isBusy:F(e),isDisabled:!r,onOpen:()=>T(e.name),onInstall:()=>z(e),onToggle:t=>V(e,t)},e.name))})})]}),A&&(0,L.jsx)(U,{plugin:A,isBusy:F(A),isDisabled:!r,onToggle:e=>V(A,e),onInstall:()=>z(A),onUninstall:()=>H(A),onRefresh:()=>$(A),onStartConversation:()=>re(A),onClose:()=>T(null)}),E&&(0,L.jsx)(G,{onClose:()=>D(!1)})]})})]})});export{$ as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{U as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{t as a}from"./Trans-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{U as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{t as a}from"./Trans-B7lYw4uD.js";import{Dt as o,jt as s}from"./active-backend-context-mY7Gff5c.js";import{t as c,z as l}from"./utils-DsWhWn2F.js";import{t as u}from"./search-BrpWXWUi.js";import{t as d}from"./x-Dx_JbpHA.js";import{n as f}from"./use-settings-DIAo5KFk.js";import{t as p}from"./use-save-settings--C6LZXfI.js";import{t as m}from"./modal-backdrop-X-vKo61e.js";import{n as h}from"./modal-classes-DFFO6BMU.js";import{t as g}from"./brand-button-BUlDL-mz.js";import{t as _}from"./modal-close-button-vxkAIRyZ.js";import{t as v}from"./checkmark-CxdXtM3b.js";import{t as y}from"./copy-z7idLzWO.js";import{a as b,r as x}from"./extension-module-card-classes-Bo43vY5V.js";import{t as S}from"./settings-switch-B405oU_v.js";import{n as C,t as w}from"./skill-card-pill-row-BMdhr_sd.js";import{n as T}from"./circle-plus-check-toggle-DdjUiOo1.js";import{t as E}from"./use-skills-D_mLhYNa.js";import{n as D}from"./extensions-navigation-BQmstKDZ.js";import{t as O}from"./skill-icon-badge-CGUkgcVH.js";import{n as k,t as A}from"./use-launch-skill-in-chat-DKzCTMt0.js";import{t as ee}from"./enum-filter-dropdown-DSqPZnsD.js";import{n as te}from"./settings-like-page-layout-classes-DyxyJ0k4.js";var j=e(t(),1),M=/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;function N(e){let t=e.match(/^description:\s*\|\s*\r?\n((?:[ \t].*(?:\r?\n|$))+)/m);if(t)return t[1].replace(/^[ \t]+/gm,``).trim();let n=e.match(/^description:\s*['"](.+?)['"]\s*$/m);if(n)return n[1].trim();let r=e.match(/^description:\s*(.+)\s*$/m);return r?r[1].trim():null}function P(e){let t=e.match(M);return t?e.slice(t[0].length).trim():e.trim()}function F(e){let t=e.replace(/^#+\s+[^\n]+\n+/,``).trim();return t.split(/\n\s*\n/).map(e=>e.replace(/\s+/g,` `).trim()).find(e=>e.length>0)??t.replace(/\s+/g,` `).trim()}function I(e){let t=e.description?.trim();if(t)return t;let n=e.content?.trim();if(!n)return``;let r=n.match(M);if(r){let e=N(r[1]);if(e)return e}return F(P(n))}var L=n(),ne=`inline-flex shrink-0 items-center whitespace-nowrap rounded-full border border-text-secondary/35 bg-text-secondary/12 px-2 py-0.5 text-[11px] font-medium leading-4 text-tertiary-light`,R={agentskills:{labelKey:l.SETTINGS$SKILLS_TYPE_AGENTSKILLS},knowledge:{labelKey:l.SETTINGS$SKILLS_TYPE_KNOWLEDGE},repo:{labelKey:l.SETTINGS$SKILLS_TYPE_REPO}};function z({type:e}){let{t}=i(`openhands`),n=R[e];return(0,L.jsx)(`span`,{"data-testid":`skill-type-badge-${e}`,className:ne,children:t(n.labelKey)})}function B(e,t,n){if(e)return`${e}-${t}-${n}`}function V(e,t,n={}){let{variant:r=`card`,testIdPrefix:i}=n,a=[{id:`type-${e.type}`,node:(0,L.jsx)(z,{type:e.type})}];if(e.version&&a.push({id:`version-${e.version}`,node:(0,L.jsx)(`span`,{"data-testid":B(i,e.name,`version`)??`skill-version-${e.name}`,className:w,children:t(l.SETTINGS$SKILLS_VERSION,{version:e.version})})}),r===`detail`&&e.license&&a.push({id:`license-${e.license}`,node:(0,L.jsx)(`span`,{"data-testid":B(i,e.name,`license`),className:w,children:e.license})}),r===`detail`&&e.compatibility&&a.push({id:`compatibility-${e.compatibility}`,node:(0,L.jsx)(`span`,{"data-testid":B(i,e.name,`compatibility`),className:w,children:e.compatibility})}),e.disable_model_invocation&&a.push({id:`disable-model-invocation`,node:(0,L.jsxs)(`span`,{"data-testid":B(i,e.name,`disable-model-invocation`)??`skill-disable-model-invocation-${e.name}`,className:`inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-full border border-[rgba(248,113,113,0.35)] bg-[rgba(248,113,113,0.12)] px-2 py-0.5 text-[11px] font-medium leading-4 text-[#fca5a5]`,children:[(0,L.jsx)(`span`,{className:`size-1.5 rounded-full bg-[#fca5a5]`}),t(l.SETTINGS$SKILLS_DISABLE_MODEL_INVOCATION)]})}),r===`detail`&&e.allowed_tools)for(let t of e.allowed_tools)a.push({id:`allowed-tool-${t}`,node:(0,L.jsx)(`span`,{"data-testid":B(i,e.name,`tool-${t}`),className:c(w,`font-mono`),children:t})});if(r===`detail`&&e.metadata)for(let[t,n]of Object.entries(e.metadata))a.push({id:`metadata-${t}`,node:(0,L.jsxs)(`span`,{"data-testid":B(i,e.name,`metadata-${t}`),className:w,children:[(0,L.jsxs)(`span`,{className:`font-mono text-[10px] text-tertiary-light`,children:[t,`:`]}),` `,n]})});for(let t of e.triggers??[])a.push({id:`trigger-${t}`,node:(0,L.jsx)(`span`,{"data-testid":B(i,e.name,`trigger-${t}`),className:w,children:t})});return a}function H(e){let t=e?.trim();return t?!!(/^https?:\/\//i.test(t)||t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`~`)||/^[A-Za-z]:[\\/]/.test(t)||t.includes(`/`)||t.includes(`\\`)):!1}function U({skill:e,enabled:t,onOpen:n,onToggle:r}){let{t:a}=i(`openhands`),[o,s]=j.useState(!1),u=I(e),d=j.useMemo(()=>V(e,a),[e,a]),f=H(e.source);return j.useEffect(()=>{if(!o)return;let e=setTimeout(()=>s(!1),2e3);return()=>clearTimeout(e)},[o]),(0,L.jsx)(`div`,{"data-testid":`skill-card-${e.name}`,role:`button`,tabIndex:0,onClick:n,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),n())},className:c(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,b,x),children:(0,L.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,L.jsx)(O,{skillName:e.name}),(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,L.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`h3`,{"data-testid":`skill-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,L.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,L.jsx)(`p`,{"data-testid":`skill-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),f?(0,L.jsx)(`button`,{type:`button`,"data-testid":`skill-copy-source-${e.name}`,"aria-label":a(o?l.BUTTON$COPIED:l.SETTINGS$SKILLS_COPY_PATH),disabled:o,onClick:async t=>{t.stopPropagation(),e.source&&(await navigator.clipboard.writeText(e.source),s(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:o?(0,L.jsx)(v,{width:12,height:12}):(0,L.jsx)(y,{width:12,height:12})}):null]}):null]}),(0,L.jsx)(T,{testId:`skill-toggle-${e.name}`,isSelected:t,onToggle:r,disableTooltipKey:l.COMMON$DISABLE})]}),u?(0,L.jsx)(`div`,{"data-testid":`skill-description-${e.name}`,className:`min-w-0`,children:(0,L.jsx)(`p`,{className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:u})}):null,d.length>0?(0,L.jsx)(C,{pills:d,testId:`skill-triggers-${e.name}`}):null]})]})})}var W=`https://docs.openhands.dev/overview/skills/adding#adding-new-skills`,G=`/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview`;function K(e){return e.name===`add-skill`?G:`/${e.name} `}function q({testId:e,label:t,value:n}){return(0,L.jsxs)(`label`,{className:`flex min-w-0 w-full flex-col gap-2.5`,children:[(0,L.jsx)(`span`,{className:`text-sm`,children:t}),(0,L.jsx)(`textarea`,{"data-testid":e,readOnly:!0,value:n,rows:Math.min(12,Math.max(4,n.split(`
|
|
2
2
|
`).length)),className:c(`bg-[var(--oh-surface-raised)] border border-[var(--oh-border-subtle)] w-full min-w-0 rounded-sm p-2 text-sm`,`cursor-not-allowed resize-none custom-scrollbar`)})]})}function J({skill:e,enabled:t,onToggle:n,onClose:r}){let{t:a}=i(`openhands`),o=A(),[s,c]=j.useState(!1),u=j.useMemo(()=>K(e),[e]),d=I(e),f=j.useMemo(()=>V(e,a,{variant:`detail`,testIdPrefix:`skill-modal-pill`}),[e,a]),p=H(e.source);return j.useEffect(()=>{if(!s)return;let e=setTimeout(()=>c(!1),2e3);return()=>clearTimeout(e)},[s]),(0,L.jsx)(m,{onClose:r,"aria-label":e.name,children:(0,L.jsxs)(`div`,{"data-testid":`skill-detail-modal`,"data-skill-name":e.name,className:`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[85vh] overflow-y-auto custom-scrollbar`,children:[(0,L.jsx)(_,{onClose:r,testId:`skill-detail-modal-close`}),(0,L.jsxs)(`div`,{className:`flex items-start gap-3 pr-6`,children:[(0,L.jsx)(O,{skillName:e.name}),(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`h2`,{"data-testid":`skill-modal-name-${e.name}`,className:h,children:e.name}),e.source?(0,L.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,L.jsx)(`p`,{"data-testid":`skill-modal-source-${e.name}`,className:`min-w-0 flex-1 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),p?(0,L.jsx)(`button`,{type:`button`,"data-testid":`skill-modal-copy-source-${e.name}`,"aria-label":a(s?l.BUTTON$COPIED:l.SETTINGS$SKILLS_COPY_PATH),disabled:s,onClick:async()=>{e.source&&(await navigator.clipboard.writeText(e.source),c(!0))},className:`shrink-0 cursor-pointer border-0 bg-transparent p-0.5 text-tertiary-alt hover:text-white disabled:cursor-default [&_path]:fill-current`,children:s?(0,L.jsx)(v,{width:12,height:12}):(0,L.jsx)(y,{width:12,height:12})}):null]}):null]})]}),(0,L.jsx)(`div`,{"data-testid":`skill-modal-enable-row-${e.name}`,className:`flex w-full items-center rounded-lg border border-[var(--oh-border)] bg-[rgba(255,255,255,0.04)] px-3 py-2.5`,children:(0,L.jsx)(S,{testId:`skill-modal-toggle-${e.name}`,isToggled:t,onToggle:n,togglePosition:`right`,children:a(t?l.SETTINGS$SKILLS_ENABLED:l.SETTINGS$SKILLS_DISABLED)})}),d?(0,L.jsx)(`p`,{"data-testid":`skill-modal-description-${e.name}`,className:`text-xs text-tertiary-light`,children:d}):null,f.length>0?(0,L.jsx)(C,{pills:f,testId:`skill-modal-pills-${e.name}`}):null,e.content?(0,L.jsx)(q,{testId:`skill-modal-field-content-${e.name}`,label:a(l.SETTINGS$SKILLS_CONTENT),value:e.content}):null,(0,L.jsxs)(`div`,{className:`mt-2 flex justify-end gap-2`,children:[(0,L.jsx)(g,{type:`button`,variant:`secondary`,onClick:r,testId:`skill-detail-close`,children:a(l.BUTTON$CLOSE)}),(0,L.jsx)(g,{type:`button`,variant:`primary`,isDisabled:!t,onClick:()=>o(u,r),testId:`skill-detail-use-skill-${e.name}`,startContent:(0,L.jsx)(k,{className:`size-4`,"aria-hidden":!0}),children:a(l.SETTINGS$SKILLS_USE_SKILL_BUTTON)})]})]})})}var Y=[l.SETTINGS$SKILLS_ADD_MODAL_STEP_1,l.SETTINGS$SKILLS_ADD_MODAL_STEP_2,l.SETTINGS$SKILLS_ADD_MODAL_STEP_3,l.SETTINGS$SKILLS_ADD_MODAL_STEP_4,l.SETTINGS$SKILLS_ADD_MODAL_STEP_5],X={cmd:(0,L.jsx)(Z,{}),path:(0,L.jsx)(Z,{}),env:(0,L.jsx)(Z,{})};function Z({children:e}){return(0,L.jsx)(`code`,{className:c(`mx-0.5 inline-block rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] px-1.5 py-0.5 align-baseline font-mono text-[11px] text-white`),children:e})}function re(){let{t:e}=i(`openhands`),[t,n]=j.useState(!1);return j.useEffect(()=>{if(!t)return;let e=setTimeout(()=>n(!1),2e3);return()=>clearTimeout(e)},[t]),(0,L.jsxs)(`div`,{className:`relative`,children:[(0,L.jsx)(`pre`,{"data-testid":`add-skill-modal-example`,className:c(`overflow-x-auto rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] p-2 pr-10 text-xs text-white`),children:G}),(0,L.jsx)(`button`,{type:`button`,"data-testid":`add-skill-modal-example-copy`,"aria-label":e(t?l.BUTTON$COPIED:l.BUTTON$COPY),disabled:t,onClick:async()=>{await navigator.clipboard.writeText(G),n(!0)},className:c(`absolute right-2 top-2 cursor-pointer rounded-sm border border-[var(--oh-border-subtle)]`,`bg-base-secondary p-1 text-tertiary-alt transition-colors`,`hover:bg-[var(--oh-surface)] hover:text-white disabled:cursor-default [&_path]:fill-current`),children:t?(0,L.jsx)(v,{width:14,height:14}):(0,L.jsx)(y,{width:14,height:14})})]})}function Q({i18nKey:e}){return(0,L.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:(0,L.jsx)(a,{ns:`openhands`,i18nKey:e,components:X})})}function ie({onClose:e}){let{t}=i(`openhands`);return(0,L.jsx)(m,{onClose:e,"aria-label":t(l.SETTINGS$SKILLS_ADD_MODAL_TITLE),children:(0,L.jsxs)(`div`,{"data-testid":`add-skill-modal`,className:`relative flex w-[520px] max-w-[90vw] max-h-[85vh] flex-col rounded-xl border border-[var(--oh-border)] bg-base-secondary`,children:[(0,L.jsx)(_,{onClose:e,testId:`add-skill-modal-close`}),(0,L.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,L.jsx)(`h2`,{className:c(`pr-6`,h),children:t(l.SETTINGS$SKILLS_ADD_MODAL_TITLE)}),(0,L.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:t(l.SETTINGS$SKILLS_ADD_MODAL_INTRO)})]}),(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,L.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(l.SETTINGS$SKILLS_ADD_MODAL_CHAT_TITLE)}),(0,L.jsx)(Q,{i18nKey:l.SETTINGS$SKILLS_ADD_MODAL_CHAT_BODY}),(0,L.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:t(l.SETTINGS$SKILLS_ADD_MODAL_EXAMPLE_LABEL)}),(0,L.jsx)(re,{}),(0,L.jsx)(`ol`,{className:`list-decimal space-y-1 pl-4 text-xs leading-relaxed text-tertiary-light`,children:Y.map(e=>(0,L.jsx)(`li`,{children:e===l.SETTINGS$SKILLS_ADD_MODAL_STEP_3?(0,L.jsx)(a,{ns:`openhands`,i18nKey:e,components:X}):t(e)},e))})]}),(0,L.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,L.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(l.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS_TITLE)}),(0,L.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:t(l.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS)})]}),(0,L.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,L.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(l.SETTINGS$SKILLS_ADD_MODAL_STORAGE_TITLE)}),(0,L.jsx)(Q,{i18nKey:l.SETTINGS$SKILLS_ADD_MODAL_STORAGE_BODY})]}),(0,L.jsx)(Q,{i18nKey:l.SETTINGS$SKILLS_ADD_MODAL_PRIVATE_REPOS}),(0,L.jsx)(`a`,{href:W,target:`_blank`,rel:`noreferrer`,"data-testid":`add-skill-modal-docs-link`,className:`self-start text-xs text-[var(--oh-muted)] transition-colors hover:text-white hover:underline`,children:t(l.SETTINGS$SKILLS_ADD_MODAL_VIEW_DOCS)})]}),(0,L.jsx)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:(0,L.jsx)(g,{type:`button`,variant:`secondary`,onClick:e,testId:`add-skill-modal-dismiss`,children:t(l.BUTTON$CLOSE)})})]})})}var ae=[`all`,`agentskills`,`knowledge`,`repo`],oe={all:l.SETTINGS$SKILLS_TYPE_ALL,agentskills:l.SETTINGS$SKILLS_TYPE_AGENTSKILLS,knowledge:l.SETTINGS$SKILLS_TYPE_KNOWLEDGE,repo:l.SETTINGS$SKILLS_TYPE_REPO};function se({value:e,onChange:t}){return(0,L.jsx)(ee,{testId:`skills-type-filter`,value:e,onChange:t,options:ae,labelKeyByValue:oe})}function ce({search:e,onSearchChange:t,typeFilter:n,onTypeFilterChange:r}){let{t:a}=i(`openhands`);return(0,L.jsxs)(`div`,{"data-testid":`skills-toolbar`,className:`flex items-stretch gap-2`,children:[(0,L.jsxs)(`div`,{className:c(`relative flex flex-1 min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,`transition-colors`),children:[(0,L.jsx)(u,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,L.jsx)(`input`,{"data-testid":`skills-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:a(l.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),"aria-label":a(l.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),className:c(`flex-1 min-w-0 bg-transparent border-0 outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),e?(0,L.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":a(l.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,L.jsx)(d,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,L.jsx)(se,{value:n,onChange:r})]})}function le(e,t){if(!t)return!0;let n=[e.name,I(e),e.description??``,e.content??``,e.license??``,e.compatibility??``,...e.triggers??[],...e.allowed_tools??[]],r=t.toLowerCase();return n.some(e=>e.toLowerCase().includes(r))}function $(){let{t:e}=i(`openhands`),{mutate:t}=p(),{data:n,isLoading:r}=f(),{data:a,isLoading:u}=E(),[d,m]=j.useState(new Set),[h,_]=j.useState(!1),[v,y]=j.useState(``),[b,x]=j.useState(`all`),[S,C]=j.useState(null),[w,T]=j.useState(!1);j.useEffect(()=>{r||!n||(m(new Set(n.disabled_skills??[])),_(!0))},[r,n?.disabled_skills]);let O=(e,t)=>{m(n=>{let r=new Set(n);return t?r.delete(e):r.add(e),r})};j.useEffect(()=>{h&&t({disabled_skills:Array.from(d)},{onError:t=>{o(s(t)||e(l.ERROR$GENERIC))}})},[d,h,t,e]);let k=r||u||!n,A=j.useMemo(()=>a?a.filter(e=>(b===`all`||e.type===b)&&le(e,v)):[],[a,b,v]);return(0,L.jsxs)(`div`,{"data-testid":`skills-settings-screen`,className:`flex h-full gap-4 md:gap-6 md:pl-8 lg:gap-10 lg:pl-10`,children:[(0,L.jsx)(D,{}),(0,L.jsx)(`main`,{className:c(te,`h-full`),children:(0,L.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,L.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,L.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(l.SETTINGS$SKILLS_TITLE)}),(0,L.jsx)(`div`,{"data-testid":`skills-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(l.SETTINGS$SKILLS_PAGE_DESCRIPTION)})]}),(0,L.jsx)(g,{type:`button`,variant:`secondary`,testId:`skills-add-skill-button`,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>T(!0),children:e(l.SETTINGS$SKILLS_ADD_BUTTON)})]}),k&&(0,L.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,L.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}),!k&&(!a||a.length===0)&&(0,L.jsx)(`div`,{"data-testid":`skills-empty`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,L.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(l.SETTINGS$SKILLS_NO_SKILLS)})}),!k&&a&&a.length>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(ce,{search:v,onSearchChange:y,typeFilter:b,onTypeFilterChange:x}),A.length===0?(0,L.jsx)(`div`,{"data-testid":`skills-no-match`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,L.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(l.SETTINGS$SKILLS_NO_MATCH)})}):(0,L.jsx)(`section`,{className:c(`flex min-w-0 flex-col gap-3`,`@container min-w-0 w-full`),children:(0,L.jsx)(`div`,{className:`grid min-w-0 grid-cols-1 gap-3 @min-[600px]:grid-cols-2`,children:A.map(e=>(0,L.jsx)(U,{skill:e,enabled:!d.has(e.name),onOpen:()=>C(e),onToggle:t=>O(e.name,t)},e.name))})})]}),S&&(0,L.jsx)(J,{skill:S,enabled:!d.has(S.name),onToggle:e=>O(S.name,e),onClose:()=>C(null)}),w&&(0,L.jsx)(ie,{onClose:()=>T(!1)})]})})]})}var ue=r($);export{ue as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,i as n,yt as r}from"./vendor-styling-Bcgpimp9.js";import{t as i}from"./utils-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,i as n,yt as r}from"./vendor-styling-Bcgpimp9.js";import{t as i}from"./utils-DsWhWn2F.js";var a=e(t(),1),o=r();function s(e){return a.Children.count(e)===1&&a.isValidElement(e)?e:(0,o.jsx)(`span`,{className:`inline-flex`,children:e})}function c({children:e,content:t,tooltipClassName:r,placement:a=`right`,showArrow:c=!1,closeDelay:l=100,shouldFlip:u,offset:d=7}){return(0,o.jsx)(n,{content:t,closeDelay:l,placement:a,offset:d,shouldFlip:u,className:i(`bg-white text-black`,r),showArrow:c,disableAnimation:!1,classNames:{content:i(`z-[9999] rounded-md px-2 py-1 text-xs font-medium shadow-md`,`!bg-white !text-black`,r)},children:s(e)})}export{c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{t as i,z as a}from"./utils-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{t as i,z as a}from"./utils-DsWhWn2F.js";import{a as o,i as s}from"./messages-CdNfZPgd.js";import{n as c}from"./conversation-Dpc5nmGi.js";import{r as l}from"./typography-B1UxuuEC.js";import{t as u}from"./u-check-circle-DBEvndTS.js";import{t as d}from"./conversation-tab-empty-state-CDjvNgpG.js";var f=e(t(),1),p=n();function m({task:e}){let{t}=r(`openhands`),n=(0,f.useMemo)(()=>{switch(e.status){case`todo`:return(0,p.jsx)(o,{className:`w-4 h-4 text-[#ffffff]`});case`in_progress`:return(0,p.jsx)(s,{className:`w-4 h-4 text-[#ffffff]`});case`done`:return(0,p.jsx)(u,{className:`w-4 h-4 text-[var(--oh-muted)]`});default:return(0,p.jsx)(o,{className:`w-4 h-4 text-[#ffffff]`})}},[e.status]),c=e.status===`done`;return(0,p.jsxs)(`div`,{className:`flex gap-2 items-center w-full`,"data-name":`item`,children:[(0,p.jsx)(`div`,{className:`shrink-0`,children:n}),(0,p.jsxs)(`div`,{className:`flex flex-col items-start justify-center leading-[16px] text-nowrap whitespace-pre font-normal`,children:[(0,p.jsx)(l.Text,{className:i(`text-[12px]`,c?`text-[var(--oh-muted)]`:`text-white`),children:e.title}),e.notes&&(0,p.jsxs)(l.Text,{className:`text-[10px] text-[var(--oh-muted)]`,children:[t(a.TASK_TRACKING_OBSERVATION$TASK_NOTES),`: `,e.notes]})]})]})}function h(){let{t:e}=r(`openhands`),{taskList:t}=c();return t.length===0?(0,p.jsx)(d,{icon:(0,p.jsx)(u,{}),children:e(a.COMMON$NO_TASKS)}):(0,p.jsx)(`main`,{className:`h-full overflow-y-auto flex flex-col custom-scrollbar-always`,children:t.map(e=>(0,p.jsx)(`div`,{"data-active":e.status===`in_progress`?`true`:`false`,className:i(`px-4 py-2`,e.status===`in_progress`&&`bg-[var(--oh-surface-raised)]`),children:(0,p.jsx)(m,{task:e})},e.id))})}export{h as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{E as i,t as a,z as o}from"./utils-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{E as i,t as a,z as o}from"./utils-DsWhWn2F.js";import{i as s}from"./conversation-Dpc5nmGi.js";import{_ as c}from"./llm-not-configured-banner-Y4W9-sar.js";import{G as l,v as u}from"./markdown-renderer-U40HF0Ak.js";import{n as d,t as f}from"./vendor~terminal-BVSbSr6V.js";import{t as p}from"./conversation-tab-empty-state-CDjvNgpG.js";var m=e(t(),1),h=`[Python Interpreter: `,g=e=>{let t=e.indexOf(h);if(t<0)return e;let n=t+21;return e.indexOf(`]`,n)<=n?e:e.substring(0,t).trim()},_=(e,t,n=!1)=>{let{content:r,type:i}=e;if(i===`input`&&n)return;let a=(r||``).replaceAll(`
|
|
2
2
|
`,`\r
|
|
3
3
|
`).trim();a&&t.writeln(g(a))},v=(e,t,n)=>{if(!e||!t||!n||window.getComputedStyle(n).display===`none`)return!1;let{clientWidth:r,clientHeight:i}=n;return!(r===0||i===0||!e.element)};function y(e){let t=e.ownerDocument.createElement(`span`);t.style.color=`var(--oh-surface-foreground)`,t.style.position=`absolute`,t.style.visibility=`hidden`,t.style.pointerEvents=`none`,e.appendChild(t);let n=getComputedStyle(t).color;return t.remove(),n&&n!==`rgba(0, 0, 0, 0)`?n:getComputedStyle(e).color}var b={current:0},x=()=>{let e=u(e=>e.commands),t=m.useRef(null),n=m.useRef(null),r=m.useRef(null),i=b,a=m.useRef(!1),o=e=>new f({fontFamily:`Menlo, Monaco, 'Courier New', monospace`,fontSize:14,scrollback:1e4,scrollSensitivity:1,fastScrollSensitivity:5,disableStdin:!0,allowTransparency:!0,theme:{background:`rgba(0, 0, 0, 0)`,foreground:y(e)}}),s=m.useCallback(()=>{a.current||v(t.current,n.current,r.current)&&n.current.fit()},[]),c=()=>{t.current&&(n.current&&t.current.loadAddon(n.current),r.current&&(t.current.open(r.current),t.current.write(`\x1B[?25l`),s()))};return m.useEffect(()=>{a.current=!1;let s=r.current;if(s){if(t.current=o(s),n.current=new d,r.current&&(c(),e.length>0)){for(let n=0;n<e.length;n+=1)e[n].type===`input`&&t.current.write(`$ `),_(e[n],t.current,!1);i.current=e.length}return()=>{a.current=!0,t.current?.dispose(),i.current=0}}},[]),m.useEffect(()=>{if(t.current&&e.length>0&&i.current<e.length){for(let n=i.current;n<e.length;n+=1)e[n].type===`input`&&t.current.write(`$ `),_(e[n],t.current,!1);i.current=e.length}},[e]),m.useEffect(()=>{let e=null;return e=new ResizeObserver(()=>{requestAnimationFrame(()=>{s()})}),r.current&&e.observe(r.current),()=>{e?.disconnect()}},[s]),r},S=n();function C({className:e,testId:t}){return(0,S.jsx)(c,{testId:t,className:e})}function w(){let{t:e}=r(`openhands`);return(0,S.jsx)(p,{className:`h-full`,icon:(0,S.jsx)(s,{"aria-hidden":!0,strokeWidth:2,className:`size-full`}),children:e(o.TERMINAL$NO_OUTPUT)})}function T(){let{curAgentState:e}=l(),t=u(e=>e.commands),n=i.includes(e),r=t.length>0,o=n||!r,s=x();return(0,S.jsxs)(`div`,{className:`relative flex h-full min-h-0 flex-col`,children:[n&&(0,S.jsx)(C,{className:`pt-16`}),!n&&!r&&(0,S.jsx)(w,{}),(0,S.jsx)(`div`,{className:a(`flex-1 min-h-0 p-4`,o&&`pointer-events-none absolute inset-0 h-0 w-0 overflow-hidden p-0 opacity-0`),children:(0,S.jsx)(`div`,{ref:s,className:`h-full w-full`})})]})}export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-Bcgpimp9.js";import{t}from"./utils-
|
|
1
|
+
import{yt as e}from"./vendor-styling-Bcgpimp9.js";import{t}from"./utils-DsWhWn2F.js";var n=e();function r({enabled:e,className:r}){return(0,n.jsx)(`span`,{"aria-hidden":`true`,className:t(`relative inline-flex h-[22px] w-[40px] shrink-0 items-center rounded-full border`,`transition-colors duration-200 ease-in-out motion-reduce:transition-none`,e?`border-white bg-white`:`border-[var(--oh-border)] bg-surface-raised`,r),children:(0,n.jsx)(`span`,{className:t(`inline-block size-4 rounded-full`,`transition-transform duration-200 ease-in-out motion-reduce:transition-none`,e?`translate-x-[21px] bg-base-secondary`:`translate-x-[2px] bg-[var(--oh-muted)]`)})})}function i({enabled:e,label:i,onToggle:a,className:o}){return(0,n.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e,"aria-label":i,onClick:e=>{e.stopPropagation(),a()},className:t(`cursor-pointer`,o),children:(0,n.jsx)(r,{enabled:e})})}export{r as n,i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-
|
|
1
|
+
import{E as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{yt as e}from"./vendor-styling-Bcgpimp9.js";import{t}from"./utils-
|
|
1
|
+
import{yt as e}from"./vendor-styling-Bcgpimp9.js";import{t}from"./utils-DsWhWn2F.js";import{t as n}from"./dist-hOnv1nn2.js";var r=e(),i=n(``,{variants:{variant:{h1:`text-[32px] text-white font-medium leading-5`,h2:`text-xl font-medium leading-6 -tracking-[0.02em] text-white`,h3:`text-sm font-medium text-[var(--oh-text-tertiary)]`,span:`text-sm font-normal text-white leading-5.5`,p:`text-sm font-normal text-white leading-5.5`,codeBlock:`font-mono text-sm leading-relaxed text-[var(--oh-text-tertiary)] whitespace-pre-wrap`}},defaultVariants:{variant:`h1`}});function a({variant:e,className:n,testId:a,children:o}){return(0,r.jsx)(e,{"data-testid":a,className:t(i({variant:e}),n),children:o})}function o({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h1`,className:e,testId:t,children:n})}function s({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h2`,className:e,testId:t,children:n})}function c({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h3`,className:e,testId:t,children:n})}function l({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`span`,className:e,testId:t,children:n})}function u({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`codeBlock`,className:e,testId:t,children:n})}function d({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`p`,className:e,testId:t,children:n})}a.H1=o,a.H2=s,a.H3=c,a.Text=l,a.CodeBlock=u,a.Paragraph=d;export{l as n,a as r,o as t};
|
package/build/assets/{use-acp-credential-form-B0_pZ_uS.js → use-acp-credential-form-CjSvKWFH.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{v as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{v as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js";import{t as o}from"./useQuery-B38jBavx.js";import{At as s,Dt as c,Ot as l,Z as u,jt as d,n as f}from"./active-backend-context-mY7Gff5c.js";import{t as p,z as m}from"./utils-DsWhWn2F.js";import{t as h}from"./check-CrxQfJZ2.js";import{t as g}from"./loader-circle-CGD6-Vak.js";import{l as _}from"./form-control-classes-CtVAktAy.js";import{n as v,t as y}from"./settings-input-BEaTCem1.js";import{a as b,l as x}from"./acp-providers-WUD4tfSq.js";import{n as S,t as C}from"./use-create-secret-RT4QtSS9.js";var w=e(t(),1),T=n();function E({conflicts:e}){let{t}=i(`openhands`);return(0,T.jsx)(T.Fragment,{children:e.map(([e,n])=>(0,T.jsx)(`p`,{"data-testid":`acp-credential-conflict-warning`,className:`text-sm text-amber-300`,children:t(m.SETTINGS$ACP_CREDENTIAL_CONFLICT_WARNING,{credential:e,conflicting:n})},`${e}:${n}`))})}function D({status:e,isChecking:t,providerName:n,testIdPrefix:r}){let{t:a}=i(`openhands`);return e===`authenticated`?(0,T.jsxs)(`div`,{"data-testid":`${r}-detected`,className:`flex items-start gap-2 rounded-xl border border-green-500/40 bg-green-500/10 px-4 py-3 text-sm text-green-200`,children:[(0,T.jsx)(h,{className:`mt-0.5 size-4 shrink-0 text-green-400`,"aria-hidden":!0}),(0,T.jsx)(`span`,{children:a(m.ONBOARDING$ACP_AUTH_DETECTED,{provider:n})})]}):t?(0,T.jsxs)(`div`,{"data-testid":`${r}-checking`,className:`flex items-center gap-2 text-sm text-[var(--oh-muted)]`,children:[(0,T.jsx)(g,{className:`size-4 shrink-0 animate-spin`,"aria-hidden":!0}),(0,T.jsx)(`span`,{children:a(m.ONBOARDING$ACP_AUTH_CHECKING,{provider:n})})]}):null}function O({field:e,value:t,onChange:n,alreadySet:r,testId:a,showOptionalTag:o}){let{t:s}=i(`openhands`),c=r?s(m.ONBOARDING$ACP_SECRET_ALREADY_SET):``;return(0,T.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e.multiline?(0,T.jsxs)(`label`,{className:`flex flex-col gap-2.5`,children:[(0,T.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`span`,{className:`text-sm font-mono text-white`,children:e.name}),o&&(0,T.jsx)(v,{})]}),(0,T.jsx)(`textarea`,{"data-testid":a,name:e.name,rows:4,spellCheck:!1,autoCapitalize:`off`,autoComplete:`off`,autoCorrect:`off`,value:t,placeholder:c,onChange:e=>n(e.target.value),className:p(_,`font-mono text-xs`)})]}):(0,T.jsx)(y,{testId:a,name:e.name,label:e.name,labelClassName:`font-mono`,type:e.secret?`password`:`text`,value:t,onChange:n,showOptionalTag:o,placeholder:c}),(0,T.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:s(e.hint_key,e.hint_values)})]})}var k=10;function A(e){return`${e.stdout??``}\n${e.stderr??``}`}function j(e){let t;try{t=JSON.parse((e.stdout??``).trim())}catch{return`unknown`}let n=t?.loggedIn;return typeof n==`boolean`?n?`authenticated`:`unauthenticated`:`unknown`}function M(e){let t=A(e).toLowerCase();return t.includes(`not logged in`)?`unauthenticated`:t.includes(`logged in`)?`authenticated`:`unknown`}function N(e){let t=(e.stdout??``).trim();return t===`present`?`authenticated`:t===`absent`?`unauthenticated`:`unknown`}var P={"claude-code":{command:`claude auth status --json`,classify:j},codex:{command:`codex login status`,classify:M},"gemini-cli":{command:`test -f "$HOME/.gemini/oauth_creds.json" && echo present || echo absent`,classify:N}},F=class{static async getAuthStatus(e){let t=P[e];if(!t)return`unknown`;let n=await new a(u()).executeCommand(t.command,void 0,k);return t.classify(n)}};async function I(e){try{return await F.getAuthStatus(e)}catch{return`unknown`}}function L(e,t={}){let{enabled:n=!0}=t,r=f(),i=r.backend.kind===`local`,a=n&&i&&!!e,s=o({queryKey:[`acp-auth-status`,r.backend.id,e],queryFn:()=>I(e),enabled:a,staleTime:1/0,gcTime:1e3*60*15,retry:!1,refetchOnWindowFocus:!1,refetchOnMount:!1});return{status:s.data??`unknown`,isChecking:a&&s.isFetching&&s.data===void 0,isSupported:i}}function R(e,t){let{t:n}=i(`openhands`),a=r(),{mutateAsync:o}=C(),[u,f]=w.useState(!1);return{saveFilled:async(r,{silent:i=!1}={})=>{let u=e.map(e=>({field:e,value:r[e.name]?.trim()})).filter(e=>!!e.value);if(u.length===0)return!0;f(!0);try{for(let{field:e,value:t}of u)await o({name:e.name,value:t});return await a.invalidateQueries({queryKey:[`secrets-search`]}),await a.invalidateQueries({queryKey:[`secrets`]}),!t&&u.some(({field:e})=>e.multiline)?s(n(m.ONBOARDING$ACP_SECRETS_ORPHANED_WARNING)):i||l(n(m.SETTINGS$SAVED)),!0}catch(e){return c(d(e)||n(m.ERROR$GENERIC)),!1}finally{f(!1)}},isSaving:u}}function z(e){let{data:t}=S(),n=w.useMemo(()=>x(e),[e]),[r,i]=w.useState({}),{saveFilled:a,isSaving:o}=R(n,!0);w.useEffect(()=>{i({})},[e]);let s=w.useCallback(e=>(t??[]).some(t=>t.name===e),[t]),c=w.useCallback(e=>!!r[e]?.trim()||s(e),[r,s]),l=w.useCallback((e,t)=>i(n=>({...n,[e]:t})),[]),u=w.useCallback(()=>i({}),[]);return{fields:n,values:r,setValue:l,secretExists:s,hasValueFor:c,conflicts:b(e,c),consumesFileCredentials:!0,isDirty:n.some(e=>!!r[e.name]?.trim()),save:e=>a(r,e),reset:u,isSaving:o}}export{E as a,D as i,L as n,O as r,z as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js";import{t}from"./useMutation-DHLpZ6J0.js";import{R as n,k as r}from"./active-backend-context-mY7Gff5c.js";import{t as i}from"./settings-service.api-CTJRrvMu.js";import{n as a}from"./use-agent-profiles-DmT9zxAN.js";var o=[`activate-agent-profile`];function s(){let s=e();return t({mutationKey:o,mutationFn:e=>a.activateProfile(e),onMutate:async e=>{await s.cancelQueries({queryKey:r.all});let t=s.getQueriesData({queryKey:r.all});return s.setQueriesData({queryKey:r.all},t=>t&&{...t,active_agent_profile_id:e}),{snapshots:t}},onError:(e,t,n)=>{n?.snapshots?.forEach(([e,t])=>{s.setQueryData(e,t)})},onSuccess:async()=>{i.invalidateCache(),await s.invalidateQueries({queryKey:r.all}),await s.invalidateQueries({queryKey:n.personal()})}})}export{s as n,o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js";import{t}from"./useQuery-B38jBavx.js";import{A as n,M as r,Z as i,k as a,n as o,ot as s}from"./active-backend-context-mY7Gff5c.js";import{t as c}from"./proxy-BiyDhMBd.js";var l=`/api/agent-profiles`;function u(){let e=s().backend;if(e.kind!==`cloud`)throw Error(`Cloud agent-profile call requires a cloud backend.`);return e}async function d(){return c({backend:u(),method:`GET`,path:l})}async function f(e){return c({backend:u(),method:`GET`,path:`${l}/${encodeURIComponent(e)}`})}async function p(e,t){return c({backend:u(),method:`POST`,path:`${l}/${encodeURIComponent(e)}`,body:t})}async function m(e){return c({backend:u(),method:`DELETE`,path:`${l}/${encodeURIComponent(e)}`})}async function h(e,t){return c({backend:u(),method:`POST`,path:`${l}/${encodeURIComponent(e)}/rename`,body:{new_name:t}})}async function g(e){return c({backend:u(),method:`POST`,path:`${l}/${encodeURIComponent(e)}/activate`,body:{}})}function _(){return s().backend.kind===`cloud`}var v=`default`,y=class{static async listProfiles(){return _()?d():new e(i()).listAgentProfiles()}static async getProfile(t,n){if(_())return f(t);let r=n?{exposeSecrets:n}:{};return new e(i()).getAgentProfile(t,r)}static async saveProfile(t,n){return _()?p(t,n):new e(i()).saveAgentProfile(t,n)}static async deleteProfile(t){return _()?m(t):new e(i()).deleteAgentProfile(t)}static async renameProfile(t,n){return _()?h(t,n):new e(i()).renameAgentProfile(t,n)}static async activateProfile(t){return _()?g(t):new e(i()).activateAgentProfile(t)}};function b(e={}){let{backend:i,orgId:s}=o();return t({queryKey:[...a.all,i.id,s],queryFn:y.listProfiles,...r,...n,enabled:e.enabled??!0,meta:{disableToast:!0}})}export{y as n,v as r,b as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{t as r}from"./useQuery-B38jBavx.js";import{n as i}from"./active-backend-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{t as r}from"./useQuery-B38jBavx.js";import{n as i}from"./active-backend-context-mY7Gff5c.js";import{t as a}from"./utils-DsWhWn2F.js";import{t as o}from"./organization-service.api-CQ73CB-S.js";import{_ as s,u as c}from"./form-control-classes-CtVAktAy.js";import{c as l,u}from"./dropdown-classes-CqA2BTCL.js";var d=n();function f({icon:e,text:t,className:n}){return(0,d.jsxs)(`div`,{className:a(`flex min-w-0 w-full items-center`,l,n),children:[(0,d.jsx)(`span`,{className:u,"aria-hidden":!0,children:e}),(0,d.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t})]})}var p=e(t()),m=e=>(0,d.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,d.jsx)(`path`,{d:`M7 4C7 2.89543 7.89543 2 9 2H15C16.1046 2 17 2.89543 17 4V6H18.9897C18.9959 5.99994 19.0021 5.99994 19.0083 6H21C21.5523 6 22 6.44772 22 7C22 7.55228 21.5523 8 21 8H19.9311L19.0638 20.1425C18.989 21.1891 18.1182 22 17.0689 22H6.93112C5.88184 22 5.01096 21.1891 4.9362 20.1425L4.06888 8H3C2.44772 8 2 7.55228 2 7C2 6.44772 2.44772 6 3 6H4.99174C4.99795 5.99994 5.00414 5.99994 5.01032 6H7V4ZM9 6H15V4H9V6ZM6.07398 8L6.93112 20H17.0689L17.926 8H6.07398ZM10 10C10.5523 10 11 10.4477 11 11V17C11 17.5523 10.5523 18 10 18C9.44772 18 9 17.5523 9 17V11C9 10.4477 9.44772 10 10 10ZM14 10C14.5523 10 15 10.4477 15 11V17C15 17.5523 14.5523 18 14 18C13.4477 18 13 17.5523 13 17V11C13 10.4477 13.4477 10 14 10Z`,fill:`currentColor`})}),h=e=>(0,d.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,d.jsx)(`path`,{d:`M14.25 19.5C14.25 20.7426 13.2426 21.75 12 21.75C10.7574 21.75 9.75 20.7426 9.75 19.5C9.75 18.2574 10.7574 17.25 12 17.25C13.2426 17.25 14.25 18.2574 14.25 19.5ZM14.25 12C14.25 13.2426 13.2426 14.25 12 14.25C10.7574 14.25 9.75 13.2426 9.75 12C9.75 10.7574 10.7574 9.75 12 9.75C13.2426 9.75 14.25 10.7574 14.25 12ZM14.25 4.5C14.25 5.74264 13.2426 6.75 12 6.75C10.7574 6.75 9.75 5.74264 9.75 4.5C9.75 3.25736 10.7574 2.25 12 2.25C13.2426 2.25 14.25 3.25736 14.25 4.5Z`,fill:`currentColor`})}),g=p.forwardRef(function({onClick:e,className:t,iconClassName:n,ariaLabel:r,testId:i=`ellipsis-button`},o){return(0,d.jsx)(`button`,{ref:o,"data-testid":i,type:`button`,onClick:e,"aria-label":r,className:a(`p-1 rounded-md cursor-pointer`,s,`text-[var(--oh-muted)]`,c,`flex items-center justify-center`,t),children:(0,d.jsx)(h,{className:n??`w-4 h-4`})})}),_=`edit_org_settings`;function v(){let{backend:e,orgId:t}=i(),n=e.kind===`cloud`,{data:a}=r({queryKey:[`cloud-current-user`,e.id,t,e.connectionRevision??0],queryFn:()=>o(t,e),enabled:n&&!!t,staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}});return n?a?.permissions?a.permissions.includes(_):a?.role===`owner`||a?.role===`admin`:!0}export{f as a,m as i,g as n,h as r,v as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./useQueries-B3T1a7qt.js";import{n as t,r as n}from"./active-backend-context-mY7Gff5c.js";import{n as r,r as i,t as a}from"./organization-service.api-CQ73CB-S.js";function o(){let{backends:t}=n(),a=t.filter(e=>e.kind===`cloud`),o=e({queries:a.map(e=>({queryKey:[`cloud-organizations`,e.id,e.connectionRevision??0],queryFn:async()=>{let t=await r(e);if(e.authMode===`cookie`)return t;let n=await i(e);return n.isLegacyKey||n.orgId===null?t:{...t,items:t.items.filter(e=>e.id===n.orgId)}},staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}}))}),s={};return a.forEach((e,t)=>{let n=o[t];s[e.id]={backend:e,isLoading:n.isLoading,orgs:n.data?.items??[],currentOrgId:n.data?.currentOrgId??null}}),s}function s(){let{backends:r}=n(),i=t(),s=o(),c=[];for(let e of r)if(e.kind===`cloud`){let t=s[e.id],n=e.id===i.backend.id&&i.orgId?i.orgId:t?.orgs[0]?.id??null;n&&c.push({backendId:e.id,connectionRevision:e.connectionRevision??0,orgIdForMe:n})}let l=e({queries:c.map(({backendId:e,connectionRevision:t,orgIdForMe:n})=>{let i=r.find(t=>t.id===e);return{queryKey:[`cloud-current-user`,e,n,t],queryFn:async()=>i?a(n,i):{orgId:n,userId:``},enabled:!!i,staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}}})}),u={};return c.forEach((e,t)=>{let n=l[t];u[e.backendId]={isLoading:n.isLoading,userId:n.data?.userId??null}}),u}export{o as n,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js";import{t}from"./useQuery-B38jBavx.js";import{K as n,L as r,M as i,W as a,Y as o,Z as s}from"./active-backend-context-mY7Gff5c.js";var c=class{static async getModels(){let t=new e(s()),[n,r,i]=await Promise.all([t.getModels(),t.getVerifiedModels(),t.getProviders()]),a=Object.keys(r??{}).sort(),o=a.flatMap(e=>r[e]??[]);return{models:n??[],verified_models:o,verified_providers:i?.filter(e=>a.includes(e))??a,default_model:o[0]??n?.[0]??``}}static async getConfig(){return await o(),{feature_flags:{hide_llm_settings:!1,hide_users_page:!0},providers_configured:[],maintenance_start_time:null,recaptcha_site_key:null,faulty_models:[],error_message:null,updated_at:new Date().toISOString()}}},l=e=>t({queryKey:r.WEB_CLIENT_CONFIG,queryFn:c.getConfig,retry:(e,t)=>!n(t)&&!a(t)&&e<3,meta:{disableToast:!0},...i,enabled:e?.enabled});export{c as n,l as t};
|
package/build/assets/{use-create-conversation-Dsa4nzU9.js → use-create-conversation-CakhLF0X.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js";import{t}from"./useMutation-
|
|
1
|
+
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js";import{t}from"./useMutation-DHLpZ6J0.js";import{A as n,I as r,N as i,k as a,n as o}from"./active-backend-context-mY7Gff5c.js";import{t as s}from"./use-tracking-COqZLobY.js";import{d as c,f as l,t as u,u as d}from"./agent-server-conversation-service.api-C_7YnjzP.js";import{t as f}from"./profiles-service.api-C32pPm70.js";import{t as p}from"./use-llm-profiles-CdaxVpyY.js";import{n as m,t as h}from"./use-agent-profiles-DmT9zxAN.js";import{t as g}from"./plugins-management-service-ijhH8OSh.js";function _(e){if(e.name)return e.name;if(e.repo_path){let t=e.repo_path.split(`/`).filter(Boolean);if(t.length>0)return t[t.length-1]}let{source:t}=e;return t.startsWith(`github:`)?t.replace(`github:`,``):t.includes(`/`)&&t.split(`/`).pop()?.replace(/\.git$/,``)||t}function v(e){let{source:t}=e;return!(t.startsWith(`github:`)||/^[a-z][a-z0-9+.-]*:\/\//i.test(t))}function y(e){let t=e.source.startsWith(`github:`)?e.source.replace(`github:`,``):e.source;return e.ref?`${t} @ ${e.ref}`:t}function b(e){return[e.source,e.ref??``,e.repo_path??``].join(` `)}var x=[`create-conversation`],S=()=>{let _=e(),{trackConversationCreated:v}=s(),{data:y}=p(),{backend:S,orgId:C}=o();return h(),t({mutationKey:x,mutationFn:async e=>{let{query:t,conversationInstructions:o,plugins:s,repository:p,workingDir:h,workspaceMode:v,parentConversationId:x,agentType:w,agentProfileId:T}=e,E;try{E=await _.ensureQueryData({queryKey:[...a.all,S.id,C],queryFn:m.listProfiles,...n})}catch{}let D=T??E?.active_agent_profile_id??void 0,O=D?E?.profiles?.find(e=>e.id===D):void 0,k=S.kind===`cloud`,A=D;if(!k&&O?.name==="default"&&O?.agent_kind===`openhands`)A=void 0;else if(O?.agent_kind===`openhands`&&O.llm_profile_ref){let e=!1;try{e=(await _.ensureQueryData({queryKey:[...i.all,S.id,C],queryFn:f.listProfiles,retry:!1})).profiles.some(e=>e.name===O.llm_profile_ref)}catch{}e||(console.warn(`Agent profile "${O.name}" references missing LLM profile "${O.llm_profile_ref}"; launching from agent_settings instead.`),A=void 0)}let j=A?[void 0,A,O?.agent_kind]:[],M=await u.createConversation(t,o,s,p?{selected_repository:p.name,selected_branch:p.branch??null,git_provider:p.gitProvider}:null,h,v,x,w,...j),N=M.app_conversation_id,P=s?.map(l)??[],F=P;if(N){let e=[];try{e=await _.ensureQueryData({queryKey:r.installed,queryFn:()=>g.listInstalledPlugins()})}catch{}let t=new Set(P.map(b)),n=e.filter(e=>e.enabled).map(e=>({source:e.source,ref:e.resolved_ref??null,repo_path:e.repo_path??null,name:e.name})).filter(e=>!t.has(b(e)));F=[...P,...n]}let I=A&&O?.agent_kind===`openhands`?O.llm_profile_ref:y?.active_profile??null;if(N&&(I||F.length)){let e=d(N);c(N,{selected_repository:e?.selected_repository??null,selected_branch:e?.selected_branch??null,git_provider:e?.git_provider??null,selected_workspace:e?.selected_workspace??null,workspace_mode:e?.workspace_mode??null,active_profile:I??e?.active_profile??null,plugins:F.length?F:e?.plugins??null})}return{conversation_id:M.app_conversation_id?M.app_conversation_id:`task-${M.id}`,session_api_key:null,url:M.agent_server_url,task_id:M.id}},onSuccess:async(e,t)=>{v({conversationId:e.conversation_id,taskId:e.task_id,hasRepository:!!t.repository,gitProvider:t.repository?.gitProvider,hasWorkspace:!!t.workingDir,workspaceMode:t.workspaceMode,hasInitialQuery:!!t.query,agentType:t.agentType,hasParentConversation:!!t.parentConversationId,entryPoint:t.entryPoint}),_.invalidateQueries({queryKey:[`user`,`conversations`]}),_.invalidateQueries({queryKey:[`start-tasks`]})}})};export{v as a,y as i,S as n,b as o,_ as r,x as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Bcgpimp9.js";import{t as n}from"./useMutation-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Bcgpimp9.js";import{t as n}from"./useMutation-DHLpZ6J0.js";import{t as r}from"./useQuery-B38jBavx.js";import{n as i}from"./active-backend-context-mY7Gff5c.js";import{t as a}from"./secrets-service-Dbv5Zb8G.js";var o=e(t(),1),s=(e={})=>{let{nameContains:t,enabled:n=!0}=e,s=i(),c=r({queryKey:[`secrets`,s.backend.id,s.orgId],queryFn:a.getSecrets,enabled:n,staleTime:1e3*60*5,gcTime:1e3*60*15});return{data:(0,o.useMemo)(()=>{if(!c.data)return[];if(!t)return c.data;let e=t.toLowerCase();return c.data.filter(t=>t.name.toLowerCase().includes(e))},[c.data,t]),isLoading:c.isLoading,isError:c.isError,hasNextPage:!1,isFetchingNextPage:!1,fetchNextPage:()=>{},onLoadMore:()=>{},refetch:c.refetch}},c=()=>n({mutationFn:({name:e,value:t,description:n})=>a.createSecret(e,t,n)});export{s as n,c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./useQuery-B38jBavx.js";import{M as t,N as n,n as r}from"./active-backend-context-mY7Gff5c.js";import{t as i}from"./profiles-service.api-C32pPm70.js";function a(a={}){let{backend:o,orgId:s}=r();return e({queryKey:[...n.all,o.id,s],queryFn:i.listProfiles,...t,enabled:a.enabled??!0,meta:{disableToast:!0}})}export{a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Bcgpimp9.js";import{S as n,d as r,j as i,y as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js";import{t as o}from"./useQueries-B3T1a7qt.js";import{Ct as s,Ft as c,J as l,Pt as u,St as d,Tt as f,Z as p,wt as m,z as h}from"./active-backend-context-mY7Gff5c.js";import"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~bi2r7bko-VFnwct3q.js";import{n as g,r as _}from"./organization-service.api-CQ73CB-S.js";var v=e(t(),1),y=1e4,b=4e3,x=`Invalid API key`,S=`API key required`,C=`Cloud API key or network issue`,w=`Logged out`;function T(e){return e===x}function E(e){return e===S}function D(e){return e===C}function O(e){return e.kind===`cloud`&&e.authMode!==`cookie`&&!e.apiKey.trim()}function k(e){return e===w}async function A(e){if(e.kind===`cloud`){if(e.authMode!==`cookie`&&!e.apiKey?.trim())throw Error(S);try{e.authMode===`cookie`?await g(e):await _(e)}catch(e){throw i.isAxiosError(e)&&e.response?.status===401||e instanceof n&&e.status===401?Error(w):u(e)?Error(C):e}return!0}try{let t=p({host:e.host,sessionApiKey:e.apiKey||null,timeout:b});await new r(t).getSettings(),h(await new a(t).getServerInfo())}catch(e){throw l(e,401)?Error(x):e}return!0}var j=2,M=300;function N(e){return e instanceof Error?e.message!==`Invalid API key`&&e.message!==`API key required`&&e.message!==`Logged out`:!0}async function P(e){for(let t=0;;t+=1)try{return await A(e)}catch(e){if(t>=j||!N(e))throw e;await new Promise(e=>{setTimeout(e,M)})}}function F(e,t={}){let{probeDisabledOnce:n=!1}=t,r=v.useSyncExternalStore(f,d,d),i=o({queries:e.map(e=>{let t=r[e.id],i=O(e),a=t?.disabled===!0,o=a&&e.kind===`cloud`&&c(t?.lastError),l=!i&&(!a||n||o);return{queryKey:[`backend-health`,e.id,e.kind,e.host,e.apiKey??``],queryFn:async()=>{try{let t=await P(e);return m(e.id),t}catch(t){throw s(e.id,t),t}},enabled:l,refetchInterval:a||i?!1:y,refetchIntervalInBackground:!1,refetchOnMount:a&&n?`always`:!0,refetchOnReconnect:!a&&!i,refetchOnWindowFocus:!a&&!i,retry:!1,staleTime:a?0:y,meta:{disableToast:!0}}})}),a={};return e.forEach((e,t)=>{let n=i[t],o=r[e.id],s=O(e),c=s?!1:o?.disabled===!0,l=s?0:o?.consecutiveFailures??0,u=s?S:o?.lastError??null,d;d=s||c?!1:n.isSuccess?!0:n.isError?!1:null,a[e.id]={isConnected:d,consecutiveFailures:l,lastError:u,disabled:c}}),a}var I=`openhands-onboarded`;function L(){if(typeof window>`u`)return!0;try{return window.localStorage.getItem(I)!==null}catch{return!0}}function R(){let[e,t]=v.useState(()=>L());return v.useEffect(()=>{let e=e=>{e.key===`openhands-onboarded`&&t(L())};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]),{isCompleted:e,markCompleted:v.useCallback(()=>{try{window.localStorage.setItem(I,`1`)}catch{}t(!0)},[])}}export{E as a,T as i,D as n,F as o,k as r,R as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e,l as t}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js";import{t as n}from"./useQuery-B38jBavx.js";import{Z as r,ot as i}from"./active-backend-context-mY7Gff5c.js";function a(e){let t=new Uint8Array(e,0,Math.min(e.byteLength,8e3));for(let e=0;e<t.length;e+=1)if(t[e]===0)return!0;return!1}var o=class{static async getPluginsMarketplace(){if(i().backend.kind===`cloud`)return[];try{return(await new t(r()).getPluginsMarketplace()).plugins??[]}catch{return[]}}static async getLocalPlugins(){if(i().backend.kind===`cloud`)return[];try{return(await new t(r()).getPlugins({load_user:!0,load_project:!1})).plugins??[]}catch{return[]}}static async getPluginFileContent(t,n){if(i().backend.kind===`cloud`)throw Error(`Reading plugin files is only available on a local backend.`);let o=await new e(r()).downloadFile(`${t}/${n}`);return a(o)?{kind:`binary`,text:null}:{kind:`text`,text:new TextDecoder(`utf-8`,{fatal:!1}).decode(o)}}},s=()=>n({queryKey:[`plugins-marketplace`],queryFn:()=>o.getPluginsMarketplace(),staleTime:1e3*60*10,refetchOnWindowFocus:!1});export{o as n,s as t};
|
package/build/assets/{use-save-agent-profile-2Mk9ZX37.js → use-save-agent-profile-DGJ3-u0M.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js";import{t}from"./useMutation-
|
|
1
|
+
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js";import{t}from"./useMutation-DHLpZ6J0.js";import{k as n}from"./active-backend-context-mY7Gff5c.js";import{n as r}from"./use-agent-profiles-DmT9zxAN.js";function i(){let i=e();return t({mutationFn:({name:e,profile:t})=>r.saveProfile(e,t),onSuccess:async()=>{await i.invalidateQueries({queryKey:n.all})},meta:{disableToast:!0}})}export{i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js";import{t}from"./useMutation-
|
|
1
|
+
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js";import{t}from"./useMutation-DHLpZ6J0.js";import{R as n}from"./active-backend-context-mY7Gff5c.js";import{t as r}from"./use-tracking-COqZLobY.js";import{t as i}from"./settings-service.api-CTJRrvMu.js";import{n as a}from"./use-settings-DIAo5KFk.js";var o=async e=>{let t={...e};delete t.agent_settings_schema,delete t.conversation_settings_schema;let n={...t.conversation_settings_diff??{}};Object.keys(n).length>0?t.conversation_settings_diff=n:delete t.conversation_settings_diff,delete t.conversation_settings;let r=t.agent_settings_diff,a=r?.llm;if(a&&typeof a.api_key==`string`){let e=a.api_key.trim();a.api_key=e===``?``:e}r&&Object.keys(r).length>0?t.agent_settings_diff=r:delete t.agent_settings_diff,delete t.agent_settings,typeof t.search_api_key==`string`&&(t.search_api_key=t.search_api_key.trim()),typeof t.git_user_name==`string`&&(t.git_user_name=t.git_user_name.trim()),typeof t.git_user_email==`string`&&(t.git_user_email=t.git_user_email.trim()),await i.saveSettings(t)},s=(i=`personal`,{retry:s}={})=>{let{trackMcpConfigUpdated:c}=r(),l=e(),{data:u}=a(i);return t({...s===void 0?{}:{retry:s},mutationFn:async e=>{let t=e.mcp_config,n=u?.mcp_config;t&&n!==t&&c({sseServersCount:t.sse_servers?.length??0,stdioServersCount:t.stdio_servers?.length??0}),await o(e)},onSuccess:async()=>{await l.invalidateQueries({queryKey:n.byScope(i)})},meta:{disableToast:!0}})};export{s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js";import{t}from"./useQuery-B38jBavx.js";import{R as n,lt as r,n as i}from"./active-backend-context-mY7Gff5c.js";import{t as a}from"./settings-Chfn5xTD.js";import{i as o,t as s}from"./settings-service.api-CTJRrvMu.js";var c=(...e)=>e.find(e=>typeof e==`boolean`),l=(...e)=>e.find(e=>typeof e==`number`),u=(...e)=>{for(let t of e){if(typeof t==`string`)return t;if(t===null)return null}},d=t=>{if(typeof t==`object`&&t&&`status`in t){let{status:e}=t;if(typeof e==`number`)return e}if(e.isAxiosError(t))return t.response?.status},f=(e,t)=>{let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r},p=(e,t,n,r=!1)=>{let i=f(e,t);return typeof i==`string`&&(i.length>0||r)?i:n},m=e=>{let t=e.agent_settings??{},n={...a.conversation_settings??{},...e.conversation_settings??{}},r=t.mcp_config===void 0?e.mcp_config??a.mcp_config:o(t.mcp_config);return{...a,...e,llm_model:p(t,`llm.model`,a.llm_model),llm_base_url:p(t,`llm.base_url`,a.llm_base_url,!0),agent:p(t,`agent`,a.agent),llm_api_key:e.llm_api_key??null,llm_api_key_set:e.llm_api_key_set??!1,confirmation_mode:c(n.confirmation_mode)??a.confirmation_mode,security_analyzer:u(n.security_analyzer)??a.security_analyzer,max_iterations:l(n.max_iterations)??a.max_iterations,enable_default_condenser:c(f(t,`condenser.enabled`))??a.enable_default_condenser,condenser_max_size:l(f(t,`condenser.max_size`))??a.condenser_max_size,mcp_config:r,search_api_key:e.search_api_key||``,email:e.email||``,git_user_name:e.git_user_name||a.git_user_name,git_user_email:e.git_user_email||a.git_user_email,is_new_user:!1,disabled_skills:e.disabled_skills??a.disabled_skills,agent_settings_schema:e.agent_settings_schema??null,agent_settings:e.agent_settings??a.agent_settings,conversation_settings_schema:e.conversation_settings_schema??a.conversation_settings_schema,conversation_settings:n}},h=async(e=`personal`)=>{if(e!==`personal`)throw Error(`Unsupported settings scope: ${e}`);return m(await s.getSettings())},g=(e=`personal`)=>{let o=i(),s=!r(o.backend),c=t({queryKey:[...n.byScope(e),o.backend.id,o.orgId],queryFn:()=>h(e),retry:(e,t)=>d(t)!==404,enabled:s,refetchOnWindowFocus:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,meta:{disableToast:!0}});return s?d(c.error)===404?{data:a,error:c.error,isError:c.isError,isLoading:c.isLoading,isFetching:c.isFetching,isFetched:c.isFetched,isSuccess:c.isSuccess,status:c.status,fetchStatus:c.fetchStatus,refetch:c.refetch}:c:{data:a,error:null,isError:!1,isLoading:!1,isFetching:!1,isFetched:!1,isSuccess:!0,status:`success`,fetchStatus:`idle`,refetch:c.refetch}};export{g as n,d as t};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Bcgpimp9.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js";import{E as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js";import{t as a}from"./useQuery-B38jBavx.js";import{D as o,V as s,j as c,lt as l,n as u,r as d,vt as f}from"./active-backend-context-mY7Gff5c.js";import{t as p,z as m}from"./utils-DsWhWn2F.js";import{t as h}from"./chevron-down-D_LsyTA7.js";import{t as g}from"./circle-check-DZn9HkLE.js";import{t as _}from"./external-link-D9B2QMPf.js";import{t as v}from"./puzzle-DlqT0yvr.js";import{t as y}from"./refresh-cw-Br5254f4.js";import{t as b}from"./use-config-C959QcRC.js";import{t as x}from"./brand-button-BUlDL-mz.js";import{a as S,f as C,o as w,u as T}from"./sidebar-layout-BGMuyC86.js";import{t as E}from"./copy-to-clipboard-button-NbN1clVr.js";import{t as D}from"./u-robot-CJtSzy5X.js";import{r as O}from"./settings-utils-BL_Z9uIe.js";var k=i(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),A=i(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),j=i(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),M=i(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),N=i(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),P=i(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),F=e(t(),1),I=`https://registry.npmjs.org/@openhands/agent-canvas/latest`,L={npm:`npm install -g @openhands/agent-canvas@latest`,docker:`docker pull ghcr.io/openhands/agent-canvas:latest`};async function R(e){let t=await fetch(I,{signal:e,headers:{Accept:`application/json`}});if(!t.ok)throw Error(`npm registry responded ${t.status}`);let n=(await t.json())?.version;if(typeof n!=`string`||!n.trim())throw Error(`npm registry response missing version`);return n.trim()}function z({enabled:e=!0}={}){return a({queryKey:c.latestVersion,queryFn:({signal:e})=>R(e),enabled:e,retry:!1,refetchOnWindowFocus:!1,staleTime:1e3*60*60,meta:{disableToast:!0}})}var B=n();function V({command:e,testId:t}){let[n,r]=(0,F.useState)(!1);return(0,B.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg bg-[var(--oh-surface-deep)] px-2 py-1.5`,children:[(0,B.jsx)(`code`,{"data-testid":t,className:`min-w-0 flex-1 select-all break-all font-mono text-[11px] leading-4 text-white`,children:e}),(0,B.jsx)(E,{isHidden:!1,isDisabled:!1,onClick:()=>{navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)},mode:n?`copied`:`copy`})]})}function H(){let{t:e}=r(`openhands`),[t,n]=(0,F.useState)(!1),i=(0,F.useId)(),a=f()!==null,c=z({enabled:!a});if(a)return null;let l=c.data,u=l===void 0?null:s(l,o),d=u===1,v=u!==null&&u<=0,b=t?j:h;return(0,B.jsxs)(`section`,{"data-testid":`agent-canvas-update-card`,className:`flex flex-col gap-2 rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-3`,children:[(0,B.jsxs)(`button`,{type:`button`,onClick:()=>n(e=>!e),"aria-expanded":t,"aria-controls":i,"data-testid":`agent-canvas-update-toggle`,className:`flex w-full cursor-pointer items-center gap-2 text-left`,children:[(0,B.jsx)(`span`,{className:`flex-1 truncate text-xs font-medium text-white`,children:e(m.SETTINGS$APP_UPDATE_CARD_TITLE)}),u!==null&&(0,B.jsx)(`span`,{"data-testid":`agent-canvas-update-badge`,className:p(`inline-flex shrink-0 items-center rounded-full border border-[var(--oh-border)] bg-[var(--oh-surface)] px-1.5 py-0.5 text-[10px] font-medium leading-none`,d?`text-warning`:`text-success`),children:e(d?m.SETTINGS$APP_UPDATE_BADGE_UPDATE_AVAILABLE:m.SETTINGS$APP_UPDATE_BADGE_UP_TO_DATE)}),(0,B.jsx)(b,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]}),(0,B.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,B.jsx)(`span`,{className:`text-[var(--oh-text-dim)]`,children:e(m.SETTINGS$APP_UPDATE_VERSION_LABEL)}),(0,B.jsx)(`span`,{className:`font-mono text-white`,children:o})]}),t&&(0,B.jsxs)(`div`,{id:i,className:`flex flex-col gap-3 pt-1`,children:[(0,B.jsx)(`div`,{"data-testid":`agent-canvas-update-status`,className:`flex items-start gap-2 text-xs`,children:c.isPending?(0,B.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:e(m.SETTINGS$APP_UPDATE_CHECKING)}):d?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(N,{className:`size-4 shrink-0 text-warning`,"aria-hidden":!0}),(0,B.jsx)(`span`,{className:`text-warning`,children:e(m.SETTINGS$APP_UPDATE_AVAILABLE_MESSAGE,{version:l})})]}):v?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(g,{className:`size-4 shrink-0 text-success`,"aria-hidden":!0}),(0,B.jsx)(`span`,{className:`text-success`,children:e(m.SETTINGS$APP_UPDATE_LATEST_MESSAGE)})]}):(0,B.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:e(m.SETTINGS$APP_UPDATE_CHECK_FAILED)})}),(0,B.jsx)(x,{testId:`agent-canvas-update-check-button`,type:`button`,variant:`secondary`,className:`w-full`,isDisabled:c.isFetching,"aria-busy":c.isFetching,onClick:()=>c.refetch(),startContent:(0,B.jsx)(y,{className:p(`size-4`,c.isFetching&&`animate-spin`),"aria-hidden":!0}),children:e(m.SETTINGS$APP_UPDATE_CHECK_BUTTON)}),(0,B.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-lg border border-[var(--oh-border-subtle)] p-3 text-xs`,children:[(0,B.jsxs)(`div`,{className:`flex items-center gap-1.5 text-white`,children:[(0,B.jsx)(N,{className:`size-4 shrink-0`,"aria-hidden":!0}),(0,B.jsx)(`span`,{className:`font-medium`,children:e(m.SETTINGS$APP_UPDATE_HOW_TO_UPDATE)})]}),(0,B.jsx)(`span`,{className:`text-[var(--oh-text-dim)]`,children:e(m.SETTINGS$APP_UPDATE_RUN_COMMANDS)}),(0,B.jsx)(V,{command:L.npm,testId:`agent-canvas-update-command-npm`}),(0,B.jsx)(`span`,{className:`text-center text-[var(--oh-text-dim)]`,children:e(m.SETTINGS$APP_UPDATE_OR)}),(0,B.jsx)(V,{command:L.docker,testId:`agent-canvas-update-command-docker`})]}),(0,B.jsxs)(`a`,{"data-testid":`agent-canvas-update-release-notes`,href:`https://github.com/OpenHands/OpenHands/releases`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 self-start text-xs text-[var(--oh-accent)] underline`,children:[e(m.SETTINGS$APP_UPDATE_RELEASE_NOTES),(0,B.jsx)(_,{size:12,"aria-hidden":!0})]})]})]})}function U(){let{t:e}=r(`openhands`),{active:t}=d(),{backend:n}=t;return l(n)||n.kind!==`cloud`?null:(0,B.jsxs)(`a`,{"data-testid":`settings-cloud-link`,href:`${n.host.replace(/\/+$/,``)}/settings`,target:`_blank`,rel:`noopener noreferrer`,className:p(C({collapsed:!1}),w.idle),children:[(0,B.jsx)(`span`,{className:S,children:(0,B.jsx)(M,{className:`size-4 shrink-0`,"aria-hidden":!0})}),(0,B.jsx)(`span`,{className:p(T(!1),`flex-1`),children:e(m.SETTINGS$CLOUD_SETTINGS_LINK)}),(0,B.jsx)(_,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]})}function W(){let{t:e}=r(`openhands`),{active:t}=d(),{backend:n}=t;return l(n)||n.kind!==`cloud`?null:(0,B.jsxs)(`a`,{"data-testid":`settings-integrations-link`,href:`${n.host.replace(/\/+$/,``)}/settings/integrations`,target:`_blank`,rel:`noopener noreferrer`,className:p(C({collapsed:!1}),w.idle),children:[(0,B.jsx)(`span`,{className:S,children:(0,B.jsx)(v,{className:`size-4 shrink-0`,"aria-hidden":!0})}),(0,B.jsx)(`span`,{className:p(T(!1),`flex-1`),children:e(m.SETTINGS$INTEGRATIONS_SETTINGS_LINK)}),(0,B.jsx)(_,{className:`size-4 shrink-0 text-[var(--oh-muted)]`,"aria-hidden":!0})]})}var G=[{icon:(0,B.jsx)(D,{width:16,height:16}),to:`/settings/agents`,text:`SETTINGS$NAV_AGENT`,subtitle:`SETTINGS$PAGE_AGENT_PROFILES_SUBLINE`},{icon:(0,B.jsx)(e=>(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,B.jsx)(`path`,{d:`M10 13C9.80222 13 9.60888 13.0586 9.44443 13.1685C9.27998 13.2784 9.15181 13.4346 9.07612 13.6173C9.00043 13.8 8.98063 14.0011 9.01921 14.1951C9.0578 14.3891 9.15304 14.5673 9.29289 14.7071C9.43275 14.847 9.61093 14.9422 9.80491 14.9808C9.99889 15.0194 10.2 14.9996 10.3827 14.9239C10.5654 14.8482 10.7216 14.72 10.8315 14.5556C10.9414 14.3911 11 14.1978 11 14C11 13.7348 10.8946 13.4804 10.7071 13.2929C10.5196 13.1054 10.2652 13 10 13ZM10 9C9.80222 9 9.60888 9.05865 9.44443 9.16853C9.27998 9.27841 9.15181 9.43459 9.07612 9.61732C9.00043 9.80004 8.98063 10.0011 9.01921 10.1951C9.0578 10.3891 9.15304 10.5673 9.29289 10.7071C9.43275 10.847 9.61093 10.9422 9.80491 10.9808C9.99889 11.0194 10.2 10.9996 10.3827 10.9239C10.5654 10.8482 10.7216 10.72 10.8315 10.5556C10.9414 10.3911 11 10.1978 11 10C11 9.73478 10.8946 9.48043 10.7071 9.29289C10.5196 9.10536 10.2652 9 10 9ZM14 9C13.8022 9 13.6089 9.05865 13.4444 9.16853C13.28 9.27841 13.1518 9.43459 13.0761 9.61732C13.0004 9.80004 12.9806 10.0011 13.0192 10.1951C13.0578 10.3891 13.153 10.5673 13.2929 10.7071C13.4327 10.847 13.6109 10.9422 13.8049 10.9808C13.9989 11.0194 14.2 10.9996 14.3827 10.9239C14.5654 10.8482 14.7216 10.72 14.8315 10.5556C14.9414 10.3911 15 10.1978 15 10C15 9.73478 14.8946 9.48043 14.7071 9.29289C14.5196 9.10536 14.2652 9 14 9ZM21 13C21.2652 13 21.5196 12.8946 21.7071 12.7071C21.8946 12.5196 22 12.2652 22 12C22 11.7348 21.8946 11.4804 21.7071 11.2929C21.5196 11.1054 21.2652 11 21 11H19V9H21C21.2652 9 21.5196 8.89464 21.7071 8.70711C21.8946 8.51957 22 8.26522 22 8C22 7.73478 21.8946 7.48043 21.7071 7.29289C21.5196 7.10536 21.2652 7 21 7H18.82C18.6707 6.5806 18.4299 6.19969 18.1151 5.8849C17.8003 5.57011 17.4194 5.32932 17 5.18V3C17 2.73478 16.8946 2.48043 16.7071 2.29289C16.5196 2.10536 16.2652 2 16 2C15.7348 2 15.4804 2.10536 15.2929 2.29289C15.1054 2.48043 15 2.73478 15 3V5H13V3C13 2.73478 12.8946 2.48043 12.7071 2.29289C12.5196 2.10536 12.2652 2 12 2C11.7348 2 11.4804 2.10536 11.2929 2.29289C11.1054 2.48043 11 2.73478 11 3V5H9V3C9 2.73478 8.89464 2.48043 8.70711 2.29289C8.51957 2.10536 8.26522 2 8 2C7.73478 2 7.48043 2.10536 7.29289 2.29289C7.10536 2.48043 7 2.73478 7 3V5.18C6.5806 5.32932 6.19969 5.57011 5.8849 5.8849C5.57011 6.19969 5.32932 6.5806 5.18 7H3C2.73478 7 2.48043 7.10536 2.29289 7.29289C2.10536 7.48043 2 7.73478 2 8C2 8.26522 2.10536 8.51957 2.29289 8.70711C2.48043 8.89464 2.73478 9 3 9H5V11H3C2.73478 11 2.48043 11.1054 2.29289 11.2929C2.10536 11.4804 2 11.7348 2 12C2 12.2652 2.10536 12.5196 2.29289 12.7071C2.48043 12.8946 2.73478 13 3 13H5V15H3C2.73478 15 2.48043 15.1054 2.29289 15.2929C2.10536 15.4804 2 15.7348 2 16C2 16.2652 2.10536 16.5196 2.29289 16.7071C2.48043 16.8946 2.73478 17 3 17H5.18C5.32932 17.4194 5.57011 17.8003 5.8849 18.1151C6.19969 18.4299 6.5806 18.6707 7 18.82V21C7 21.2652 7.10536 21.5196 7.29289 21.7071C7.48043 21.8946 7.73478 22 8 22C8.26522 22 8.51957 21.8946 8.70711 21.7071C8.89464 21.5196 9 21.2652 9 21V19H11V21C11 21.2652 11.1054 21.5196 11.2929 21.7071C11.4804 21.8946 11.7348 22 12 22C12.2652 22 12.5196 21.8946 12.7071 21.7071C12.8946 21.5196 13 21.2652 13 21V19H15V21C15 21.2652 15.1054 21.5196 15.2929 21.7071C15.4804 21.8946 15.7348 22 16 22C16.2652 22 16.5196 21.8946 16.7071 21.7071C16.8946 21.5196 17 21.2652 17 21V18.82C17.4194 18.6707 17.8003 18.4299 18.1151 18.1151C18.4299 17.8003 18.6707 17.4194 18.82 17H21C21.2652 17 21.5196 16.8946 21.7071 16.7071C21.8946 16.5196 22 16.2652 22 16C22 15.7348 21.8946 15.4804 21.7071 15.2929C21.5196 15.1054 21.2652 15 21 15H19V13H21ZM17 16C17 16.2652 16.8946 16.5196 16.7071 16.7071C16.5196 16.8946 16.2652 17 16 17H8C7.73478 17 7.48043 16.8946 7.29289 16.7071C7.10536 16.5196 7 16.2652 7 16V8C7 7.73478 7.10536 7.48043 7.29289 7.29289C7.48043 7.10536 7.73478 7 8 7H16C16.2652 7 16.5196 7.10536 16.7071 7.29289C16.8946 7.48043 17 7.73478 17 8V16ZM14 13C13.8022 13 13.6089 13.0586 13.4444 13.1685C13.28 13.2784 13.1518 13.4346 13.0761 13.6173C13.0004 13.8 12.9806 14.0011 13.0192 14.1951C13.0578 14.3891 13.153 14.5673 13.2929 14.7071C13.4327 14.847 13.6109 14.9422 13.8049 14.9808C13.9989 15.0194 14.2 14.9996 14.3827 14.9239C14.5654 14.8482 14.7216 14.72 14.8315 14.5556C14.9414 14.3911 15 14.1978 15 14C15 13.7348 14.8946 13.4804 14.7071 13.2929C14.5196 13.1054 14.2652 13 14 13Z`,fill:`currentColor`})}),{width:16,height:16}),to:`/settings/llm`,text:`SETTINGS$NAV_LLM`,subtitle:`SETTINGS$PAGE_LLM_SUBLINE`},{icon:(0,B.jsx)(e=>(0,B.jsxs)(`svg`,{id:`Layer_1`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 22.3 18.66`,...e,children:[(0,B.jsx)(`defs`,{children:(0,B.jsx)(`style`,{children:`
|
|
2
|
+
.st0 {
|
|
3
|
+
stroke-miterlimit: 10;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.st0, .st1 {
|
|
7
|
+
fill: none;
|
|
8
|
+
stroke: currentColor;
|
|
9
|
+
stroke-linecap: round;
|
|
10
|
+
stroke-width: 2px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.st1 {
|
|
14
|
+
stroke-linejoin: round;
|
|
15
|
+
}
|
|
16
|
+
`})}),(0,B.jsx)(`path`,{className:`st1`,d:`M15.15,12.54h3.26c1.58,0,2.93-1.29,2.9-2.88-.03-1.53-1.28-2.77-2.82-2.77-.04,0-.08,0-.11,0,.13-.44.16-.92.04-1.43-.27-1.17-1.27-2.05-2.46-2.17-.74-.07-1.43.14-1.97.55,0,0,0-.02,0-.03,0-1.56-1.26-2.82-2.82-2.82s-2.82,1.26-2.82,2.82c0,0,0,.02,0,.03-.54-.4-1.23-.62-1.97-.55-1.19.12-2.19,1-2.46,2.17-.12.5-.09.99.04,1.43-.04,0-.08,0-.11,0-1.56,0-2.82,1.26-2.82,2.82s1.26,2.82,2.82,2.82l1.29.03c.41,0,.74.34.74.75v1.85c0,1.38,1.12,2.5,2.5,2.5h.29c1.44,0,2.6-1.17,2.6-2.6V6.49`}),(0,B.jsx)(`polyline`,{className:`st0`,points:`7.97 9.74 11.22 6.49 14.47 9.74`})]}),{width:16,height:16}),to:`/settings/condenser`,text:`SETTINGS$NAV_CONDENSER`,subtitle:`SETTINGS$PAGE_CONDENSER_SUBLINE`},{icon:(0,B.jsx)(A,{className:`size-4`,strokeWidth:2,"aria-hidden":!0}),to:`/settings/agent-context`,text:`SETTINGS$NAV_AGENT_CONTEXT`,subtitle:`SETTINGS$PAGE_AGENT_CONTEXT_SUBLINE`},{icon:(0,B.jsx)(P,{className:`size-4`,strokeWidth:2,"aria-hidden":!0}),to:`/settings/verification`,text:`SETTINGS$NAV_VERIFICATION`,subtitle:`SETTINGS$PAGE_VERIFICATION_SUBLINE`},{icon:(0,B.jsx)(k,{className:`size-4`,strokeWidth:2,"aria-hidden":!0}),to:`/settings/app`,text:`SETTINGS$NAV_APPLICATION`,subtitle:`SETTINGS$PAGE_APPLICATION_SUBLINE`},{icon:(0,B.jsx)(e=>(0,B.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,B.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M17.0265 1.63647C18.2362 1.88301 19.3557 2.45458 20.2649 3.28974C21.1741 4.12489 21.8384 5.19205 22.1865 6.37647C22.509 7.46247 22.557 8.61147 22.326 9.72147C21.9921 11.2422 21.1518 12.6046 19.9428 13.5856C18.7337 14.5666 17.2274 15.1081 15.6705 15.1215C15.0135 15.1215 14.3595 15.027 13.731 14.8365L12.531 16.2435L11.9625 16.506H10.5V18.756L9.75 19.506H7.5V21.756L6.75 22.506H2.25L1.5 21.756V18.2955L1.719 17.766L9.18 10.305C8.96826 9.62297 8.86698 8.91148 8.88 8.19747C8.89367 7.19853 9.12754 6.2149 9.56495 5.3167C10.0024 4.4185 10.6325 3.62786 11.4105 3.00113C12.1885 2.3744 13.0952 1.92702 14.0659 1.69088C15.0367 1.45473 16.0475 1.43565 17.0265 1.63497V1.63647ZM19.0035 12.4365C19.9458 11.6734 20.6011 10.6131 20.862 9.42897L20.868 9.43647C21.0538 8.57068 21.0204 7.67216 20.7707 6.82258C20.521 5.97299 20.063 5.19926 19.4383 4.57169C18.8135 3.94412 18.0419 3.4826 17.1934 3.22908C16.345 2.97555 15.4466 2.93804 14.58 3.11997C13.4112 3.3794 12.3627 4.0224 11.6016 4.94661C10.8405 5.87082 10.4105 7.02309 10.38 8.21997C10.365 8.90397 10.485 9.58197 10.7385 10.215L10.5735 11.0295L3 18.606V21.006H6V18.756L6.75 18.006H9V15.756L9.75 15.006H11.6175L12.9315 13.482L13.773 13.272C14.3796 13.509 15.0253 13.6301 15.6765 13.629C16.8885 13.6197 18.0615 13.1992 19.0035 12.4365ZM17.7465 8.33847C17.8648 8.17505 17.9489 7.98945 17.9937 7.79277C18.0386 7.59609 18.0434 7.39239 18.0077 7.19384C17.972 6.99528 17.8967 6.80597 17.7861 6.63721C17.6756 6.46845 17.5322 6.32373 17.3644 6.21169C17.1967 6.09965 17.008 6.0226 16.8098 5.98514C16.6116 5.94769 16.4078 5.95061 16.2108 5.99372C16.0137 6.03683 15.8273 6.11925 15.6629 6.23605C15.4984 6.35285 15.3592 6.50162 15.2535 6.67347C15.0503 7.00406 14.983 7.40054 15.066 7.77963C15.1489 8.15872 15.3755 8.49093 15.6982 8.70645C16.0209 8.92198 16.4146 9.00405 16.7966 8.93543C17.1785 8.86682 17.519 8.65285 17.7465 8.33847Z`,fill:`currentColor`})}),{width:16,height:16}),to:`/settings/secrets`,text:`SETTINGS$NAV_SECRETS`,subtitle:`SETTINGS$PAGE_SECRETS_SUBLINE`}];function K(){let{data:e}=b(),{backend:t}=u(),n=e?.feature_flags;return G.filter(e=>!O(e.to,n)).map(e=>({type:`item`,item:e.to===`/settings`?{...e,text:t.kind===`local`?m.SETTINGS$LLM_PROFILES:e.text,subtitle:t.kind===`local`?m.SETTINGS$PAGE_LLM_PROFILES_SUBLINE:e.subtitle}:e}))}export{H as i,W as n,U as r,K as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js";import{t}from"./useQuery-B38jBavx.js";import{Z as n,gt as r,ot as i}from"./active-backend-context-mY7Gff5c.js";import{t as a}from"./proxy-BiyDhMBd.js";import{t as o}from"./vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~eywn6ulz-BKxxr74w.js";var s=100;function c(){let e=i().backend;if(e.kind!==`cloud`)throw Error(`Cloud skills call requires a cloud backend.`);return e}async function l(){let e=c(),t=[],n=null;do{let r=new URLSearchParams({limit:String(s)});n&&r.set(`page_id`,n);let i=await a({backend:e,method:`GET`,path:`/api/v1/skills/search?${r.toString()}`});t.push(...i.items??[]),n=i.next_page_id}while(n);return t}function u(e){return{name:e.name,type:`knowledge`,source:`public`,description:e.description,triggers:e.triggers,content:e.content,license:e.license??null,compatibility:e.compatibility??null}}var d=o.map(u),f=class{static async getSkills(t){if(i().backend.kind===`cloud`)return l();let a=[];try{a=(await new e(n()).getSkills({load_public:!1,load_user:!0,load_project:!0,load_org:!1,project_dir:t??r()})).skills??[]}catch{}return[...a,...d]}},p=e=>t({queryKey:[`skills`,e??null],queryFn:()=>f.getSkills(e),staleTime:1e3*60*10,refetchOnWindowFocus:!1});export{p as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Bcgpimp9.js";import{j as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js";import{H as r,O as i,T as a,X as o,a as s,b as c,d as l,f as u,h as d,lt as f,n as p,ot as m,p as h,st as g,w as _}from"./active-backend-context-mY7Gff5c.js";import{t as v}from"./proxy-BiyDhMBd.js";var y=e(t(),1),b=`/api/automation`,x=n.create();async function S(e={}){let t=await u();return{...a,...t?{[i]:t}:{},...e}}x.interceptors.request.use(async e=>{let t=await S();if(Object.entries(t).forEach(([t,n])=>{e.headers.set(t,n)}),e.baseURL)return e;let n=g();if(!n)throw new o;e.baseURL=n.host;let r=n.apiKey?.trim();return r&&e.headers.set(`X-Session-API-Key`,r),e});function C(e){return typeof e==`string`&&e.trim()||null}function w(e){return typeof e==`string`?C(e):C(e.sdk_version)??C(e.version)}function T(e,t){let n=new URLSearchParams;return n.set(`limit`,String(e)),n.set(`offset`,String(t)),n.toString()}function E(e){return e.trigger.type===`event`?{type:`event`,source:e.trigger.source,on:e.trigger.on,...e.trigger.filter&&{filter:e.trigger.filter}}:{type:`cron`,schedule:e.trigger.schedule,timezone:e.timezone??e.trigger.timezone??`UTC`}}function D(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?`pending.${crypto.randomUUID()}`:`pending.${Date.now()}.${Math.random().toString(36).slice(2,10)}`}function O(e){if(!e.prompt)throw Error(`An automation prompt is required for import.`);let t=e.repository?[{url:e.repository,...e.branch&&{ref:e.branch},...!e.repository.includes(`://`)&&!e.repository.startsWith(`git@`)&&{provider:`github`}}]:void 0;return{path:`${b}/v1/preset/${e.plugins?.length?`plugin`:`prompt`}`,body:{name:e.name,prompt:e.prompt,trigger:{type:`event`,source:`agent-canvas-import`,on:D()},...e.model&&{model:e.model},...t&&{repos:t},...e.plugins?.length&&{plugins:e.plugins.map(e=>({source:e}))},...e.timeout!=null&&{timeout:e.timeout}}}}async function k(e){let t=e.apiKey.trim();return{baseURL:e.host,headers:await S(t?{"X-Session-API-Key":t}:{})}}async function A(e){return S(e.orgId?{"X-Org-Id":e.orgId}:{})}var j=class e{static async syncTelemetryConsent(e=l()){if(m().backend.kind!==`local`)return;let t=await h();await x.post(`${b}/v1/telemetry/consent`,{consent_granted:e===`granted`,frontend_distinct_id:t},{timeout:5e3}),e!==`granted`&&t&&s(t)}static async getSdkVersion(){let e=m(),t=`${b}/sdk-version`;try{let n;if(e.backend.kind===`cloud`)n=await v({backend:e.backend,method:`GET`,path:t,headers:await A(e),timeoutSeconds:5});else{let{data:e}=await x.get(t,{timeout:5e3});n=e}return w(n)}catch{return null}}static async listAutomations(e={}){let{limit:t=50,offset:n=0}=e,r=m().backend;if(r.kind===`cloud`)return v({backend:r,method:`GET`,path:`${b}/v1?${T(t,n)}`,headers:await S()});let{data:i}=await x.get(`${b}/v1`,{params:{limit:t,offset:n}});return i}static async getAutomations(t=50,n=0){return e.listAutomations({limit:t,offset:n})}static async getAutomation(e){let t=m().backend,n=`${b}/v1/${encodeURIComponent(e)}`;if(t.kind===`cloud`)return v({backend:t,method:`GET`,path:n,headers:await S()});let{data:r}=await x.get(n);return r}static async createAutomation(e){let t=m(),{path:n,body:r}=O(e),i;if(t.backend.kind===`cloud`)i=await v({backend:t.backend,method:`POST`,path:n,body:r,headers:await A(t)});else{let{data:e}=await x.post(n,r,await k(t.backend));i=e}let a=`${b}/v1/${encodeURIComponent(i.id)}`,o={trigger:E(e),enabled:!1};try{if(t.backend.kind===`cloud`)return await v({backend:t.backend,method:`PATCH`,path:a,body:o,headers:await A(t)});let{data:e}=await x.patch(a,o,await k(t.backend));return e}catch(e){try{t.backend.kind===`cloud`?await v({backend:t.backend,method:`DELETE`,path:a,headers:await A(t)}):await x.delete(a,await k(t.backend))}catch(t){throw AggregateError([e,t],`Failed to disable the imported automation and clean it up.`)}throw e}}static async updateAutomation(e,t){let n=m().backend,r=`${b}/v1/${encodeURIComponent(e)}`;if(n.kind===`cloud`)return v({backend:n,method:`PATCH`,path:r,body:t,headers:await S()});let{data:i}=await x.patch(r,t);return i}static async deleteAutomation(e){let t=m().backend,n=`${b}/v1/${encodeURIComponent(e)}`;if(t.kind===`cloud`){await v({backend:t,method:`DELETE`,path:n,headers:await S()});return}await x.delete(n)}static async dispatchAutomation(e){let t=m().backend,n=`${b}/v1/${encodeURIComponent(e)}/dispatch`;if(t.kind===`cloud`)return v({backend:t,method:`POST`,path:n,headers:await S()});let{data:r}=await x.post(n);return r}static async listAutomationRuns(e,t={}){let{limit:n=50,offset:r=0}=t,i=m().backend,a=`${b}/v1/${encodeURIComponent(e)}/runs`;if(i.kind===`cloud`)return v({backend:i,method:`GET`,path:`${a}?${T(n,r)}`,headers:await S()});let{data:o}=await x.get(a,{params:{limit:n,offset:r}});return o}static async getAutomationRuns(t,n=50,r=0){return e.listAutomationRuns(t,{limit:n,offset:r})}static async toggleAutomation(t,n){return e.updateAutomation(t,{enabled:n})}static async downloadTarball(e,t){let n=m().backend,r=`${b}/v1/${encodeURIComponent(e)}/tarball`,i;if(n.kind===`cloud`)i=await v({backend:n,method:`GET`,path:r,responseType:`blob`,headers:await S()});else{let{data:e}=await x.get(r,{responseType:`blob`});i=e}let a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=`${t}.tar`,o.click(),URL.revokeObjectURL(a)}static async checkHealth(){let e=m().backend,t=`${b}/health`;try{if(e.kind===`cloud`)return await v({backend:e,method:`GET`,path:t,timeoutSeconds:5,headers:await S()});let{data:n}=await x.get(t,{timeout:5e3});return n}catch{return{status:`error`}}}},M=`automation-sdk-version`,N=3600*1e3,P=`\0`,F=new Map,I=new Map;function L(e){let t=F.get(e);if(t){if(t.expiresAt<=Date.now()){F.delete(e);return}return t.version}}function R(e,t){F.set(e,{expiresAt:Date.now()+N,version:t})}function z(e){let t=L(e);if(t!==void 0)return Promise.resolve(t);let n=I.get(e);if(n)return n;if(typeof j.getSdkVersion!=`function`)return R(e,null),Promise.resolve(null);let r=j.getSdkVersion().then(t=>(R(e,t),t)).catch(()=>(R(e,null),null)).finally(()=>{I.delete(e)});return I.set(e,r),r}function B(){let e=p(),{backend:t}=e,n=[M,t.id,t.kind,t.host,e.orgId??``].join(P),[r,i]=y.useState(()=>L(n)??null);return y.useEffect(()=>{if(f(t)){i(null);return}let e=L(n);if(e!==void 0){i(e);return}let r=!0;return i(null),z(n).then(e=>{r&&i(e)}),()=>{r=!1}},[t,n]),r}var V=()=>{let{backend:e}=p(),t=B(),n=y.useCallback(()=>({backendKind:e.kind,agentServerVersion:e.kind===`local`?r(e.host):null,automationSdkVersion:t??null}),[t,e.host,e.kind]);y.useEffect(()=>{d(n())},[n]);let i={current_url:window.location.href},a=(e,t={})=>{d(n()),c(e,{...i,...t})};return{trackLoginButtonClick:({provider:e})=>{a(`login_button_clicked`,{provider:e})},trackConversationCreated:({conversationId:e,taskId:t,hasRepository:n,gitProvider:r,hasWorkspace:i,workspaceMode:o,hasInitialQuery:s,agentType:c,hasParentConversation:l,entryPoint:u})=>{a(`conversation_created`,{conversation_id:e,task_id:t,is_start_task:e.startsWith(`task-`),has_repository:n,git_provider:r,has_workspace:i,workspace_mode:o,has_initial_query:s,agent_type:c,has_parent_conversation:l,entry_point:u})},trackPushButtonClick:()=>{a(`push_button_clicked`)},trackPullButtonClick:()=>{a(`pull_button_clicked`)},trackCreatePrButtonClick:()=>{a(`create_pr_button_clicked`)},trackUserSignupCompleted:()=>{a(`user_signup_completed`,{signup_timestamp:new Date().toISOString()})},trackPrebuiltAutomationEnabled:({automationId:e,automationName:t,automationCategory:n})=>{a(`prebuilt_automation_enabled`,{automation_id:e,automation_name:t,automation_category:n})},trackInitialQuerySubmitted:({entryPoint:e,queryCharacterLength:t,replayJsonSize:n})=>{a(`initial_query_submitted`,{entry_point:e,query_character_length:t,replay_json_size:n})},trackUserMessageSent:({sessionMessageCount:e,currentMessageLength:t})=>{a(`user_message_sent`,{session_message_count:e,current_message_length:t})},trackDownloadVsCodeButtonClicked:()=>{a(`download_via_vscode_button_clicked`)},trackSettingsSaved:({llmModel:e,llmApiKeySet:t,searchApiKeySet:n,remoteRuntimeResourceFactor:r})=>{a(`settings_saved`,{LLM_MODEL:e,LLM_API_KEY_SET:t,SEARCH_API_KEY_SET:n,REMOTE_RUNTIME_RESOURCE_FACTOR:r})},trackMcpConfigUpdated:({sseServersCount:e,stdioServersCount:t})=>{a(`mcp_config_updated`,{has_mcp_config:!0,sse_servers_count:e,stdio_servers_count:t})},trackDownloadTrajectoryButtonClicked:()=>{a(`download_trajectory_button_clicked`)},trackConversationExported:e=>{a(`conversation_exported`,{format:e})},trackAutomationCreatedButton:({backendKind:e})=>{a(`automation_created_button`,{backend_kind:e})},trackAutomationExecuted:({backendKind:e})=>{a(`automation_executed`,{backend_kind:e})},trackAutomationDeleted:({backendKind:e})=>{a(`automation_deleted`,{backend_kind:e})},trackAutomationDisableButton:({backendKind:e})=>{a(`automation_disable_button`,{backend_kind:e})},trackAutomationEdited:({backendKind:e})=>{a(`automation_edited`,{backend_kind:e})},trackAutomationExported:({backendKind:e})=>{a(`automation_exported`,{backend_kind:e})},trackAutomationImported:({backendKind:e})=>{a(`automation_imported`,{backend_kind:e})},trackBackendAdded:({backendKind:e,connectionMethod:t,hasApiKey:n,source:r,agentServerVersion:i,backendVersion:o})=>{a(`backend_added`,{..._({backendKind:e,agentServerVersion:i,backendVersion:o,connectionMethod:t}),has_api_key:n,source:r})},trackOnboardingStarted:()=>{a(`onboarding_started`)},trackOnboardingStepViewed:({step:e,stepIndex:t,totalSteps:n,agent:r})=>{a(`onboarding_step_viewed`,{step:e,step_index:t,total_steps:n,agent:r})},trackOnboardingCompleted:({agent:e})=>{a(`onboarding_completed`,{agent:e})},trackOnboardingSkipped:({step:e,stepIndex:t,totalSteps:n,agent:r})=>{a(`onboarding_skipped`,{step:e,step_index:t,total_steps:n,agent:r})}}};export{j as n,V as t};
|
package/build/assets/{use-user-conversation-GnGhs_Ob.js → use-user-conversation-DhcAEyJX.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Bcgpimp9.js";import{t as n}from"./useQuery-B38jBavx.js";import{n as r}from"./active-backend-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Bcgpimp9.js";import{t as n}from"./useQuery-B38jBavx.js";import{n as r}from"./active-backend-context-mY7Gff5c.js";import{t as i}from"./agent-server-conversation-service.api-C_7YnjzP.js";var a=e(t(),1),o=1e3*60*5,s=1e3*60*15,c=(e,t)=>{let c=r(),l=(0,a.useRef)({cid:e,backendId:c.backend.id});l.current.cid!==e&&(l.current={cid:e,backendId:c.backend.id});let u=l.current.backendId!==c.backend.id;return n({queryKey:[`user`,`conversation`,e,c.backend.id,c.orgId],queryFn:async()=>e?(await i.batchGetAppConversations([e]))[0]??null:null,enabled:!!e&&!e.startsWith(`task-`)&&!u,retry:!1,refetchInterval:t,staleTime:o,gcTime:s})};export{c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Bcgpimp9.js";import{E as n,T as r,j as i,m as a,n as o,u as s,y as c}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js";import{L as l}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t}from"./vendor-styling-Bcgpimp9.js";import{E as n,T as r,j as i,m as a,n as o,u as s,y as c}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js";import{L as l}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CYPMCkX1.js";var u=class extends i{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),r(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&a(t.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??l();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){s.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},d=e(t(),1);function f(e,t){let r=o(t),[i]=d.useState(()=>new u(r,e));d.useEffect(()=>{i.setOptions(e)},[i,e]);let a=d.useSyncExternalStore(d.useCallback(e=>i.subscribe(s.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=d.useCallback((e,t)=>{i.mutate(e,t).catch(c)},[i]);if(a.error&&n(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:l,mutateAsync:a.mutate}}export{f as t};
|