@openhands/agent-canvas 1.13.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.windows.md +2 -2
- package/build/assets/{acp-providers-D1PORKc0.js → acp-providers-CYy8qA2z.js} +1 -1
- package/build/assets/active-backend-context-BZDG15C0.js +2 -0
- package/build/assets/{agent-context-settings-DMrObcIS.js → agent-context-settings-DGWBBbcp.js} +1 -1
- package/build/assets/{agent-profiles-settings-DororXN5.js → agent-profiles-settings-DrkGdf4_.js} +1 -1
- package/build/assets/{agent-server-conversation-service.api-DWBe0rbX.js → agent-server-conversation-service.api-DK56YPTs.js} +7 -7
- package/build/assets/{agent-settings-BJVk92PU.js → agent-settings-DfcSgkLD.js} +2 -2
- package/build/assets/agent-settings-Lrc5-twS.js +1 -0
- package/build/assets/{alert-banner-CzZsm7ms.js → alert-banner-BgDHhL7b.js} +1 -1
- package/build/assets/api-error-message-BEIE_yD1.js +1 -0
- package/build/assets/{api-key-entry-screen-D8Fade_-.js → api-key-entry-screen-DaZnOlVo.js} +1 -1
- package/build/assets/{app-settings-CpyGB3AT.js → app-settings-BG5NAUbC.js} +1 -1
- package/build/assets/automation-detail-D4Hs831Z.js +3 -0
- package/build/assets/automation-export-n0X6FB0C.js +2 -0
- package/build/assets/automation-git-sync-CDrm8WV7.js +1 -0
- package/build/assets/automation-setup-route-CZCl4ONs.js +1 -0
- package/build/assets/{automation-templates-DgpCGOJV.js → automation-templates-DFF96AdL.js} +1 -1
- package/build/assets/automations-list-Bl-oGOrV.js +1 -0
- package/build/assets/{back-nav-button-HHEneWMw.js → back-nav-button-H_ThtDA0.js} +1 -1
- package/build/assets/{backend-form-modal-DiVrD4Cm.js → backend-form-modal-CbCemvHt.js} +1 -1
- package/build/assets/backend-not-configured-DP8KLNq_.js +1 -0
- package/build/assets/{backend-synced-settings-badge-7MIjpr8M.js → backend-synced-settings-badge-BBASWqsb.js} +1 -1
- package/build/assets/{badge-CpYmcVZV.js → badge-B-51h-SW.js} +1 -1
- package/build/assets/{base-modal-Fnh6Uln9.js → base-modal-BbjycA8X.js} +1 -1
- package/build/assets/{bot-BQZx8e2i.js → bot-CGPCg03p.js} +1 -1
- package/build/assets/{brand-button-swT1RyO0.js → brand-button-Blxv5nww.js} +1 -1
- package/build/assets/browser-CuW0nWvh.js +7 -0
- package/build/assets/{browser-tab-zAY12m_i.js → browser-tab-D5G0ORwt.js} +1 -1
- package/build/assets/{chat-send-button-DsJtivmL.js → chat-send-button-BD2tii1r.js} +1 -1
- package/build/assets/check-DSuS-lyr.js +1 -0
- package/build/assets/chevron-down-CgGcmtE2.js +1 -0
- package/build/assets/circle-check-CG5-NPw7.js +1 -0
- package/build/assets/{circle-plus-check-toggle-Cuzx55bo.js → circle-plus-check-toggle-ASbpB8vN.js} +1 -1
- package/build/assets/{cloud-funnel-analytics-86CwNdSh.js → cloud-funnel-analytics-GlCUG0gk.js} +1 -1
- package/build/assets/cog-CZiR80uT.js +1 -0
- package/build/assets/{combobox-caret-D0fRotFi.js → combobox-caret-DvpEsh2O.js} +1 -1
- package/build/assets/{command-menu-BXy03FBl.js → command-menu-DwUQzjYP.js} +1 -1
- package/build/assets/{condenser-settings-BmZa0ui_.js → condenser-settings-BptcoiLA.js} +1 -1
- package/build/assets/{confirmation-modal-BgoN6lbN.js → confirmation-modal-CiEwxZAA.js} +1 -1
- package/build/assets/{context-menu-list-item-Bq02tc-P.js → context-menu-list-item-CdcamfM1.js} +1 -1
- package/build/assets/conversation-DREHj4nT.js +1 -0
- package/build/assets/conversation-DotRfiDz.js +90 -0
- package/build/assets/conversation-panel-DREHj4nT.js +1 -0
- package/build/assets/conversation-state-store-DMLtlHbE.js +1 -0
- package/build/assets/{conversation-tab-empty-state-CMqo_0Bd.js → conversation-tab-empty-state-D-puECpY.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-Cg1pF0xn.js → copy-to-clipboard-button-BGxcUbgy.js} +1 -1
- package/build/assets/{device-verify-BfQLgNyq.js → device-verify-CZJfWaJf.js} +1 -1
- package/build/assets/{dropdown-classes-BIqQr5mx.js → dropdown-classes-tLhpwtxS.js} +1 -1
- package/build/assets/{entry.client-CxFjRYqH.js → entry.client-D8GnI6GZ.js} +2 -2
- package/build/assets/{enum-filter-dropdown-C_yV4_bo.js → enum-filter-dropdown-Fk8k60nk.js} +1 -1
- package/build/assets/{environment-switch-overlay-Bi4qbh2g.js → environment-switch-overlay-DeztVYuL.js} +1 -1
- package/build/assets/{extensions-hub-BqUINAhp.js → extensions-hub-Cd6GCYzq.js} +1 -1
- package/build/assets/{extensions-navigation-lraj88Wk.js → extensions-navigation-C4sgZg-y.js} +1 -1
- package/build/assets/{external-link-CgtpA_a1.js → external-link-C0UpBgsE.js} +1 -1
- package/build/assets/{file-text-DEK4LSVw.js → file-text-C6WYtNdV.js} +1 -1
- package/build/assets/files-tab-BW_qzyAm.js +1 -0
- package/build/assets/{form-control-classes-7yFSQJq_.js → form-control-classes-CGXBLcn1.js} +1 -1
- package/build/assets/format-model-name-BNPKVsIq.js +1 -0
- package/build/assets/format-relative-time-ZhQD4rsl.js +1 -0
- package/build/assets/git-provider-icon-CaQ1yLPi.js +1 -0
- package/build/assets/{git-repo-dropdown-ByMzpNko.js → git-repo-dropdown-CgXR6M_E.js} +1 -1
- package/build/assets/git-repo-dropdown-D2Uei3CO.js +1 -0
- package/build/assets/{highlighted-source-view-C_sfncLZ.js → highlighted-source-view-C_YOp8Fo.js} +1 -1
- package/build/assets/home-DNzzJcMP.js +1 -0
- package/build/assets/home-aCos-5vc.js +1 -0
- package/build/assets/{home-store-CxqsY9Fi.js → home-store-DgzViC3f.js} +1 -1
- package/build/assets/index-home-DNzzJcMP.js +1 -0
- package/build/assets/info-CLoC1LRo.js +1 -0
- package/build/assets/install-server-modal-D7zIqNKz.js +1 -0
- package/build/assets/kebab-menu-item-content-DERMdnDv.js +1 -0
- package/build/assets/{launch-CkqiSCqi.js → launch-5PjKeLak.js} +1 -1
- package/build/assets/{list-todo-DNWlzfaM.js → list-todo-BF049YaY.js} +1 -1
- package/build/assets/llm-not-configured-banner-BK9z5eS0.js +27 -0
- package/build/assets/llm-settings-BLAMK2tR.js +1 -0
- package/build/assets/llm-settings-BWsbarGM.js +1 -0
- package/build/assets/{llm-subscription-service-BAdOl5Xx.js → llm-subscription-service-SfnEV9Uc.js} +1 -1
- package/build/assets/loader-circle-D7IagAyF.js +1 -0
- package/build/assets/{loading-spinner-xhnrGP4Y.js → loading-spinner-DBgXgra0.js} +1 -1
- package/build/assets/{manage-backends-modal-DhGk5mJt.js → manage-backends-modal-BTqNPhzc.js} +1 -1
- package/build/assets/manifest-abebca3c.js +1 -0
- package/build/assets/manifest-subpage-layout-Rn-glaxV.js +1 -0
- package/build/assets/{map-provider-Mx8mZuE-.js → map-provider-BK4HnqYz.js} +1 -1
- package/build/assets/markdown-renderer-Cp6DlHQN.js +8 -0
- package/build/assets/{mcp-DCkvl6K0.js → mcp-BC-Ixn4T.js} +2 -2
- package/build/assets/{mcp-marketplace-utils-DEbMXlQr.js → mcp-marketplace-utils-BJWJgbB6.js} +1 -1
- package/build/assets/{messages-DSXvyc21.js → messages-CzFKrzPG.js} +5 -5
- package/build/assets/{modal-body-gIe21fDv.js → modal-body-BdKfD3Hl.js} +1 -1
- package/build/assets/{modal-classes-D66dlgZ7.js → modal-classes-D5_b5vMi.js} +1 -1
- package/build/assets/{modal-close-button-B6iOGYpI.js → modal-close-button-objukxk_.js} +1 -1
- package/build/assets/{mouse-pointer-click-BYX1Pw5W.js → mouse-pointer-click-C_gXyLyD.js} +1 -1
- package/build/assets/{npm-DLckoeJc.js → npm-CHVHV1MC.js} +1 -1
- package/build/assets/{onboarding-D7WDG66N.js → onboarding-Diw0V51A.js} +1 -1
- package/build/assets/onboarding-modal-Da4yHzsA.js +1 -0
- package/build/assets/{organization-service.api-D-s9z18a.js → organization-service.api-BztSy69u.js} +1 -1
- package/build/assets/parse-git-remote-url-BkXN9jzl.js +1 -0
- package/build/assets/{pencil-BGOCPRyu.js → pencil-49avMHlD.js} +1 -1
- package/build/assets/{planner-tab-AKaXIIfg.js → planner-tab-CJiSpNax.js} +1 -1
- package/build/assets/{plugins-management-service-wtmY4QQw.js → plugins-management-service-lHdNKWNU.js} +1 -1
- package/build/assets/plus-C0BagBpV.js +1 -0
- package/build/assets/profiles-service.api-BLr7FXec.js +1 -0
- package/build/assets/providers-CWXnb7S3.js +1 -0
- package/build/assets/{proxy-9Z_WZggZ.js → proxy-DYDXxtje.js} +1 -1
- package/build/assets/{puzzle-BWLmN8z4.js → puzzle-Bt2B1rzf.js} +1 -1
- package/build/assets/recommended-automations-launcher-CcFMfJRR.js +1 -0
- package/build/assets/{refresh-cw-CXtFWpwv.js → refresh-cw-nmcesifB.js} +1 -1
- package/build/assets/root-CT4t7apy.css +1 -0
- package/build/assets/root-DnRgLKpU.js +2 -0
- package/build/assets/root-layout-2L9tr-BN.js +2 -0
- package/build/assets/{schema-field-OnM5Uob_.js → schema-field-C59lVZTA.js} +1 -1
- package/build/assets/{sdk-section-page-m5WQm2sy.js → sdk-section-page-BbBEQQjq.js} +1 -1
- package/build/assets/search-CYSDBczG.js +1 -0
- package/build/assets/secrets-service-BtsgYSlj.js +1 -0
- package/build/assets/secrets-settings-DJ0OKa4_.js +1 -0
- package/build/assets/{segmented-toggle-DCspm2U5.js → segmented-toggle-DiVfTZuN.js} +1 -1
- package/build/assets/{settings-BJQI_iBM.js → settings-CDqL_Uqh.js} +1 -1
- package/build/assets/{settings-CWFxymAf.js → settings-DcNPxz0v.js} +1 -1
- package/build/assets/{settings-dropdown-input-BI8V_Nov.js → settings-dropdown-input-Ba1UN5Du.js} +1 -1
- package/build/assets/{settings-index-BiTqJoH7.js → settings-index-Cz2cKt2K.js} +1 -1
- package/build/assets/{settings-input-Cz62hWVW.js → settings-input-CWUEHHvS.js} +1 -1
- package/build/assets/{settings-list-classes-z_3FW5H3.js → settings-list-classes-DdcLXDGn.js} +1 -1
- package/build/assets/{settings-modal-BIrIVn97.js → settings-modal-nEEK1Kh1.js} +1 -1
- package/build/assets/{settings-service.api--rJmnuLa.js → settings-service.api-3yAUFcaP.js} +1 -1
- package/build/assets/{settings-switch-BRsSI8Vs.js → settings-switch-Dk9hChx1.js} +1 -1
- package/build/assets/{settings-utils-Ba7vel6T.js → settings-utils-CxjtCSB3.js} +1 -1
- package/build/assets/{shared-conversation-CQK_PqHx.js → shared-conversation-DbAcrx3s.js} +1 -1
- package/build/assets/{shield-check-T3JsDJiM.js → shield-check-CiOTXxV2.js} +1 -1
- package/build/assets/{sidebar-layout-Bhi3hVcu.js → sidebar-layout-lrfPooIB.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-YWJNRN4p.js → sidebar-mobile-menu-toggle-KERXfNu1.js} +1 -1
- package/build/assets/{sidebar-nav-link-BSUlY5Ml.js → sidebar-nav-link-B8lFD6Cb.js} +1 -1
- package/build/assets/{sidebar-store-Cl1cUv_F.js → sidebar-store-u6pUpxJ7.js} +1 -1
- package/build/assets/{skill-card-pill-row-BXz8L8Rn.js → skill-card-pill-row-dGIUzr_b.js} +1 -1
- package/build/assets/{skill-icon-badge-QgfKv31M.js → skill-icon-badge-kkOWZ89w.js} +1 -1
- package/build/assets/{skill-scope-Dc3JPW-8.js → skill-scope-DWN1PBPH.js} +1 -1
- package/build/assets/{skills-plugins-CpTV27n3.js → skills-plugins-DFjH2Nq6.js} +1 -1
- package/build/assets/{skills-settings-CSW__IW4.js → skills-settings-DIHpl3ol.js} +2 -2
- package/build/assets/{sparkles-TJ0mdECe.js → sparkles-ntyMLnbj.js} +1 -1
- package/build/assets/{styled-tooltip-BUMSbgrF.js → styled-tooltip-B6JXcsmL.js} +1 -1
- package/build/assets/{task-list-tab-mAHMOkUz.js → task-list-tab-aEJzEcHD.js} +1 -1
- package/build/assets/{terminal-BzxBaHx2.js → terminal-Dch7Ty5K.js} +1 -1
- package/build/assets/{toggle-switch-O5v1FgxW.js → toggle-switch-B2MLKsgt.js} +1 -1
- package/build/assets/{trash-2-C0xNVp9c.js → trash-2-yZnDM4Ji.js} +1 -1
- package/build/assets/{typography-NOKSk9_R.js → typography-DB5HoCk0.js} +1 -1
- package/build/assets/usage-tab-DrEtBmBT.js +1 -0
- package/build/assets/use-acp-credential-form-c8KXAa8A.js +1 -0
- package/build/assets/{use-activate-agent-profile-D9YRQPTF.js → use-activate-agent-profile-B0p34N3q.js} +1 -1
- package/build/assets/use-agent-profiles-CPIc6wLH.js +1 -0
- package/build/assets/{use-can-manage-org-profiles-Dxzq2AEd.js → use-can-manage-org-profiles-Dz_8Eqkv.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-Co2eJk2A.js → use-cloud-current-user-id-DvUVqCle.js} +1 -1
- package/build/assets/use-config-C3PO4TBw.js +1 -0
- package/build/assets/{use-create-conversation-CoHTiCbI.js → use-create-conversation-DVrA_uLD.js} +1 -1
- package/build/assets/use-create-secret-DbBIpaCR.js +1 -0
- package/build/assets/use-get-secrets-6PBitf54.js +1 -0
- package/build/assets/use-has-permission-CQ31Cl8j.js +1 -0
- package/build/assets/use-is-authed-2UrDIziV.js +1 -0
- package/build/assets/use-is-creating-conversation-BvYpmb3v.js +1 -0
- package/build/assets/use-llm-profiles-diZS4FiN.js +1 -0
- package/build/assets/use-manifest-capabilities-HIWCtIUm.js +1 -0
- package/build/assets/{use-onboarding-completion-CCE8OQgV.js → use-onboarding-completion-Bs8PcXik.js} +1 -1
- package/build/assets/{use-plugins-marketplace-CEiak69h.js → use-plugins-marketplace-BCuNLFsr.js} +1 -1
- package/build/assets/use-save-agent-profile-BaMNSpBV.js +1 -0
- package/build/assets/{use-save-settings-DNmnbG6f.js → use-save-settings-BahvC2Gw.js} +1 -1
- package/build/assets/{use-settings-wCwPaSIv.js → use-settings-C6ZxpBDX.js} +1 -1
- package/build/assets/{use-settings-nav-items-BlFL7YhM.js → use-settings-nav-items-Bqn69Ggw.js} +2 -2
- package/build/assets/use-tracking-Bhu7gk2y.js +3 -0
- package/build/assets/{use-user-conversation-DVtfg0B_.js → use-user-conversation-BkNXpXrd.js} +1 -1
- package/build/assets/{useInfiniteQuery-p1xq35r2.js → useInfiniteQuery-c_OmS3lK.js} +1 -1
- package/build/assets/{useMutation-BFDQmgk9.js → useMutation-6ZsQCqAn.js} +1 -1
- package/build/assets/{useQueries-DF1NAAeC.js → useQueries-xDrGlTO_.js} +1 -1
- package/build/assets/{useQuery-DRv--6bK.js → useQuery-Bs5NFz2s.js} +1 -1
- package/build/assets/{utils-zxEjKE70.js → utils-DUD5ScdA.js} +1 -1
- package/build/assets/{vendor~entry.client-CgNUwtQL.js → vendor~entry.client-BFE7Llz9.js} +1 -1
- package/build/assets/{vendor~entry.client-zSIea5EO.js → vendor~entry.client-BaKt_PIp.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js} +1 -1
- package/build/assets/{vendor~files-tab-D9wR9yM2.js → vendor~files-tab-B6POTS66.js} +1 -1
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-Ipoe6hvY.js → vendor~index-home~home~conversation-panel~conversation-53Q_U6uP.js} +1 -1
- package/build/assets/{vendor~root-layout-C-IgVx6e.js → vendor~root-layout-DeQACFVA.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-Dhd_I4H4.js → vendor~root-layout~conversation-panel~conversation-bv7ooVgH.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-Cc0f9kPP.js → vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-e8pX05xf.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-d7svw-BB.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-BvS6PCK2.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-4WsUP-tz.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hjcjabwg-DOPLJMH9.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js} +1 -1
- package/build/assets/{verification-settings-B8UMQ7MG.js → verification-settings-COueVXmM.js} +1 -1
- package/build/assets/{wrench-DIka3hCq.js → wrench-C95ujnYo.js} +1 -1
- package/build/assets/x-86ZCfxKY.js +1 -0
- package/build/assets/{zap-DHddTPc0.js → zap-DRa-r-Tf.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +60 -2
- package/build/locales/ca/openhands.json +60 -2
- package/build/locales/de/openhands.json +60 -2
- package/build/locales/en/openhands.json +60 -2
- package/build/locales/es/openhands.json +60 -2
- package/build/locales/fr/openhands.json +60 -2
- package/build/locales/it/openhands.json +60 -2
- package/build/locales/ja/openhands.json +60 -2
- package/build/locales/ko-KR/openhands.json +60 -2
- package/build/locales/no/openhands.json +60 -2
- package/build/locales/pt/openhands.json +60 -2
- package/build/locales/tr/openhands.json +60 -2
- package/build/locales/uk/openhands.json +60 -2
- package/build/locales/zh-CN/openhands.json +60 -2
- package/build/locales/zh-TW/openhands.json +60 -2
- package/config/defaults.json +1 -1
- package/dist/api/automation-service/automation-service.api.cjs +1 -1
- package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
- package/dist/api/automation-service/automation-service.api.d.ts +10 -0
- package/dist/api/automation-service/automation-service.api.js +42 -0
- package/dist/api/automation-service/automation-service.api.js.map +1 -1
- package/dist/api/cloud/conversation-service.api.cjs +1 -1
- package/dist/api/cloud/conversation-service.api.cjs.map +1 -1
- package/dist/api/cloud/conversation-service.api.d.ts +9 -0
- package/dist/api/cloud/conversation-service.api.js +11 -1
- package/dist/api/cloud/conversation-service.api.js.map +1 -1
- package/dist/api/profiles-service/profiles-service.api.cjs +1 -1
- package/dist/api/profiles-service/profiles-service.api.cjs.map +1 -1
- package/dist/api/profiles-service/profiles-service.api.d.ts +15 -2
- package/dist/api/profiles-service/profiles-service.api.js +25 -2
- package/dist/api/profiles-service/profiles-service.api.js.map +1 -1
- package/dist/api/secrets-service.cjs +1 -1
- package/dist/api/secrets-service.cjs.map +1 -1
- package/dist/api/secrets-service.d.ts +5 -0
- package/dist/api/secrets-service.js +12 -6
- package/dist/api/secrets-service.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/index.d.ts +0 -1
- package/dist/components/features/automations/git-sync/git-sync-activity-row.d.ts +15 -0
- package/dist/components/features/automations/git-sync/git-sync-config-form.d.ts +13 -0
- package/dist/components/features/automations/git-sync/git-sync-error-banner.d.ts +6 -0
- package/dist/components/features/automations/git-sync/git-sync-not-local-state.d.ts +1 -0
- package/dist/components/features/automations/git-sync/git-sync-overview-section.d.ts +12 -0
- package/dist/components/features/automations/git-sync/git-sync-skeleton.d.ts +1 -0
- package/dist/components/features/automations/git-sync/git-sync-status-pill.d.ts +7 -0
- package/dist/components/features/automations/git-sync/git-sync-unsupported-state.d.ts +7 -0
- package/dist/components/features/automations/responder-deployment-modal.d.ts +2 -1
- package/dist/components/features/chat/chat-interface.cjs +2 -2
- package/dist/components/features/chat/chat-interface.cjs.map +1 -1
- package/dist/components/features/chat/chat-interface.js +177 -176
- package/dist/components/features/chat/chat-interface.js.map +1 -1
- package/dist/components/features/chat/error-message-banner.cjs +1 -1
- package/dist/components/features/chat/error-message-banner.cjs.map +1 -1
- package/dist/components/features/chat/error-message-banner.d.ts +3 -1
- package/dist/components/features/chat/error-message-banner.js +64 -58
- package/dist/components/features/chat/error-message-banner.js.map +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.cjs +1 -1
- package/dist/components/features/conversation-panel/compact-conversation-row.js +6 -6
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +19 -19
- package/dist/components/features/onboarding/steps/setup-llm-step.d.ts +10 -7
- package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs +1 -1
- package/dist/components/shared/buttons/conversation-confirmation-buttons.cjs.map +1 -1
- package/dist/components/shared/buttons/conversation-confirmation-buttons.js +1 -1
- package/dist/components/shared/buttons/conversation-confirmation-buttons.js.map +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +1 -1
- package/dist/config/defaults.js.map +1 -1
- package/dist/contexts/conversation-websocket-context.cjs +2 -2
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.js +12 -12
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/hooks/query/use-commit-changes.cjs +1 -1
- package/dist/hooks/query/use-commit-changes.js +4 -4
- package/dist/hooks/query/use-git-sync.d.ts +19 -0
- package/dist/hooks/query/use-task-polling.cjs +1 -1
- package/dist/hooks/query/use-task-polling.cjs.map +1 -1
- package/dist/hooks/query/use-task-polling.js +12 -10
- package/dist/hooks/query/use-task-polling.js.map +1 -1
- package/dist/hooks/query/use-unified-get-git-changes.cjs +1 -1
- package/dist/hooks/query/use-unified-get-git-changes.js +4 -4
- package/dist/hooks/query/use-unified-git-commits.cjs +1 -1
- package/dist/hooks/query/use-unified-git-commits.js +4 -4
- package/dist/hooks/query/use-unified-git-diff.cjs +1 -1
- package/dist/hooks/query/use-unified-git-diff.js +4 -4
- package/dist/hooks/query/use-workspace-files.cjs +1 -1
- package/dist/hooks/query/use-workspace-files.cjs.map +1 -1
- package/dist/hooks/query/use-workspace-files.d.ts +14 -4
- package/dist/hooks/query/use-workspace-files.js +45 -32
- package/dist/hooks/query/use-workspace-files.js.map +1 -1
- package/dist/hooks/use-responder-url-secret.d.ts +5 -0
- package/dist/hooks/use-tracking.cjs +1 -1
- package/dist/hooks/use-tracking.cjs.map +1 -1
- package/dist/hooks/use-tracking.d.ts +6 -0
- package/dist/hooks/use-tracking.js +6 -0
- package/dist/hooks/use-tracking.js.map +1 -1
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +59 -1
- 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 +1001 -15
- package/dist/i18n/translation.js.map +1 -1
- package/dist/locales/ar/openhands.json +60 -2
- package/dist/locales/ca/openhands.json +60 -2
- package/dist/locales/de/openhands.json +60 -2
- package/dist/locales/en/openhands.json +60 -2
- package/dist/locales/es/openhands.json +60 -2
- package/dist/locales/fr/openhands.json +60 -2
- package/dist/locales/it/openhands.json +60 -2
- package/dist/locales/ja/openhands.json +60 -2
- package/dist/locales/ko-KR/openhands.json +60 -2
- package/dist/locales/no/openhands.json +60 -2
- package/dist/locales/pt/openhands.json +60 -2
- package/dist/locales/tr/openhands.json +60 -2
- package/dist/locales/uk/openhands.json +60 -2
- package/dist/locales/zh-CN/openhands.json +60 -2
- package/dist/locales/zh-TW/openhands.json +60 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js +27 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js.map +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/dist/routes/files-tab.cjs +1 -1
- package/dist/routes/files-tab.js +11 -11
- package/dist/routes/files-tab.js.map +1 -1
- package/dist/services/settings.cjs +1 -1
- package/dist/services/settings.cjs.map +1 -1
- package/dist/services/settings.js +2 -2
- package/dist/services/settings.js.map +1 -1
- package/dist/services/telemetry.cjs +1 -1
- package/dist/services/telemetry.cjs.map +1 -1
- package/dist/services/telemetry.js +47 -51
- package/dist/services/telemetry.js.map +1 -1
- package/dist/stores/error-message-store.cjs +1 -1
- package/dist/stores/error-message-store.cjs.map +1 -1
- package/dist/stores/error-message-store.d.ts +3 -1
- package/dist/stores/error-message-store.js +5 -3
- package/dist/stores/error-message-store.js.map +1 -1
- package/dist/types/git-sync.d.ts +51 -0
- package/dist/utils/error-handler.cjs +1 -1
- package/dist/utils/error-handler.cjs.map +1 -1
- package/dist/utils/error-handler.d.ts +3 -2
- package/dist/utils/error-handler.js +18 -5
- package/dist/utils/error-handler.js.map +1 -1
- package/dist/utils/format-model-name.cjs +1 -1
- package/dist/utils/format-model-name.cjs.map +1 -1
- package/dist/utils/format-model-name.d.ts +1 -0
- package/dist/utils/format-model-name.js +1 -0
- package/dist/utils/format-model-name.js.map +1 -1
- package/dist/utils/transcript-export/load-complete-events.cjs +1 -1
- package/dist/utils/transcript-export/load-complete-events.cjs.map +1 -1
- package/dist/utils/transcript-export/load-complete-events.js +24 -16
- package/dist/utils/transcript-export/load-complete-events.js.map +1 -1
- package/package.json +1 -1
- package/scripts/check-translation-completeness.cjs +3 -0
- package/scripts/dev-with-automation.mjs +98 -9
- package/build/assets/active-backend-context-IqOjobNK.js +0 -2
- package/build/assets/agent-settings-COfJsQ1d.js +0 -1
- package/build/assets/automation-detail-B-jQ39Mm.js +0 -3
- package/build/assets/automation-export-B1dywoqk.js +0 -2
- package/build/assets/automation-setup-route-C-bWUZBi.js +0 -1
- package/build/assets/automations-list-DnMxlxsL.js +0 -1
- package/build/assets/browser-B9AbV6kG.js +0 -7
- package/build/assets/check-WAFXrrs_.js +0 -1
- package/build/assets/chevron-down-CifNWzme.js +0 -1
- package/build/assets/circle-check-CtnimJa8.js +0 -1
- package/build/assets/conversation-BPo8SvLN.js +0 -1
- package/build/assets/conversation-CPCVsCUY.js +0 -90
- package/build/assets/conversation-panel-BPo8SvLN.js +0 -1
- package/build/assets/conversation-state-store-C5YpjMNy.js +0 -1
- package/build/assets/files-tab-DV0L-lFE.js +0 -1
- package/build/assets/format-model-name-BN_rx1Y3.js +0 -1
- package/build/assets/format-relative-time-DSErAuVr.js +0 -1
- package/build/assets/git-provider-icon-BvlLAche.js +0 -1
- package/build/assets/git-repo-dropdown-C6R7hgM8.js +0 -1
- package/build/assets/home-BOrlwLqG.js +0 -1
- package/build/assets/home-BvMNC6E-.js +0 -1
- package/build/assets/index-home-BvMNC6E-.js +0 -1
- package/build/assets/info-BRVcJAUg.js +0 -1
- package/build/assets/install-server-modal-Bl4G1zF4.js +0 -1
- package/build/assets/kebab-menu-item-content-BGoGFEAg.js +0 -1
- package/build/assets/llm-not-configured-banner-DLw_tu-G.js +0 -27
- package/build/assets/llm-settings-B-pkVCrt.js +0 -1
- package/build/assets/llm-settings-DSC0-IQ7.js +0 -1
- package/build/assets/loader-circle-B47W9XqT.js +0 -1
- package/build/assets/manifest-653b89aa.js +0 -1
- package/build/assets/manifest-subpage-layout-CKWvL2ig.js +0 -1
- package/build/assets/markdown-renderer-DUmk7pFc.js +0 -8
- package/build/assets/onboarding-modal-C_xVrFNv.js +0 -1
- package/build/assets/plus-zNEL8rcX.js +0 -1
- package/build/assets/profiles-service.api-DCMYxHMi.js +0 -1
- package/build/assets/providers-BjrtjX4L.js +0 -1
- package/build/assets/recommended-automations-launcher-CFlzhu1o.js +0 -1
- package/build/assets/root-CanxKlNV.css +0 -1
- package/build/assets/root-DkfG_UWR.js +0 -2
- package/build/assets/root-layout-D75LHYhh.js +0 -2
- package/build/assets/search-CycosyjN.js +0 -1
- package/build/assets/secrets-service-B26R61C1.js +0 -1
- package/build/assets/secrets-settings-CbLYCKOX.js +0 -1
- package/build/assets/usage-tab-tEmVN0KD.js +0 -1
- package/build/assets/use-acp-credential-form-BPNi0Zbm.js +0 -1
- package/build/assets/use-agent-profiles-Cb2zUW3l.js +0 -1
- package/build/assets/use-config-DKAMiI5R.js +0 -1
- package/build/assets/use-create-secret-2zBlCDsF.js +0 -1
- package/build/assets/use-is-authed-C52-ivnB.js +0 -1
- package/build/assets/use-is-creating-conversation-DdaAE6jV.js +0 -1
- package/build/assets/use-llm-profiles-C_BHue65.js +0 -1
- package/build/assets/use-manifest-capabilities-DPrQsaPP.js +0 -1
- package/build/assets/use-save-agent-profile-DK9idD6a.js +0 -1
- package/build/assets/use-tracking-CVwPmhlX.js +0 -3
- package/build/assets/x-BWKA2Ver.js +0 -1
- package/dist/api/cloud/suggestions-service.api.d.ts +0 -8
- package/dist/api/suggestions-service/suggestions-service.api.d.ts +0 -11
- package/dist/components/conversation-events/chat/event-message-components/observation-pair-event-message.d.ts +0 -7
- package/dist/components/conversation-events/index.d.ts +0 -1
- package/dist/components/features/automations/metadata-chip.d.ts +0 -6
- package/dist/components/features/chat/task-tracking/status-badge.d.ts +0 -5
- package/dist/components/features/chat/task-tracking/status-icon.d.ts +0 -5
- package/dist/components/features/chat/task-tracking/task-list-section.d.ts +0 -10
- package/dist/components/features/controls/tools.d.ts +0 -2
- package/dist/components/features/conversation-panel/new-conversation-button.d.ts +0 -23
- package/dist/components/features/home/home-header/guide-message.d.ts +0 -1
- package/dist/components/features/home/home-header/home-header.d.ts +0 -1
- package/dist/components/features/home/new-conversation/create-conversation-button.d.ts +0 -1
- package/dist/components/features/home/new-conversation/new-conversation.d.ts +0 -1
- package/dist/components/features/home/new-conversation.d.ts +0 -1
- package/dist/components/features/home/tasks/task-card.d.ts +0 -6
- package/dist/components/features/home/tasks/task-group.d.ts +0 -7
- package/dist/components/features/home/tasks/task-issue-number.d.ts +0 -6
- package/dist/components/features/home/tasks/task-item-title.d.ts +0 -1
- package/dist/components/features/home/tasks/task-suggestions-skeleton.d.ts +0 -1
- package/dist/components/features/home/tasks/task-suggestions.d.ts +0 -6
- package/dist/components/features/settings/agent-server-onboarding.d.ts +0 -10
- package/dist/components/features/settings/mcp-settings/mcp-server-list-item.d.ts +0 -6
- package/dist/components/features/settings/mcp-settings/mcp-server-list.d.ts +0 -8
- package/dist/hooks/query/use-suggested-tasks.d.ts +0 -1
- package/dist/hooks/use-should-show-user-features.d.ts +0 -1
- package/dist/ui/card-title.d.ts +0 -16
- package/dist/ui/card.d.ts +0 -14
- package/dist/utils/group-suggested-tasks.d.ts +0 -7
- /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dh9v73sa-rfV8mQ9m.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js} +0 -0
- /package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~9pstowjp-BOVIFA_g.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~eo2nf80n-BOVIFA_g.js} +0 -0
- /package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~ht43enc2-C0JXQb_q.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C0JXQb_q.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js";import{$ as t,ct as n}from"./active-backend-context-IqOjobNK.js";import{t as r}from"./proxy-9Z_WZggZ.js";import{t as i}from"./settings-CWFxymAf.js";var a=[`none`,`api_key`,`bearer`,`basic`,`header`,`oauth2`],o=e=>!!e&&typeof e==`object`&&!Array.isArray(e),s=e=>o(e)&&typeof e.strategy==`string`&&a.includes(e.strategy),c=/^[a-zA-Z0-9_-]+$/;function l(e){return c.test(e)}function u(e,t=`mcp`){return e.trim().replace(/[^a-zA-Z0-9_-]+/g,`_`).replace(/_+/g,`_`).replace(/^_+|_+$/g,``)||t}var d=`**********`,f=e=>!!e&&typeof e==`object`&&!Array.isArray(e);function p(e){if(!f(e))return null;let t=e.mcpServers;return f(t)&&!(`url`in t)&&!(`command`in t)?t:e}function m(e){if(!f(e))return;let t=Object.entries(e).filter(e=>typeof e[1]==`string`);return t.length>0?Object.fromEntries(t):void 0}function h(e){return e===`**********`?!0:Array.isArray(e)?e.some(h):f(e)?Object.values(e).some(h):!1}var g=e=>e.enabled===!1?!1:void 0,_=e=>{if(e===`stdio`||e===`sse`||e===`streamable-http`)return e;if(e===`http`||e===`shttp`||e===void 0)return`http`};function v(e){let t=p(e);if(!t)return{};let n={};for(let[e,r]of Object.entries(t)){if(!f(r))continue;if(typeof r.command==`string`){n[e]={transport:`stdio`,command:r.command,...Array.isArray(r.args)&&r.args.every(e=>typeof e==`string`)&&{args:r.args},...m(r.env)&&{env:m(r.env)},...typeof r.cwd==`string`&&{cwd:r.cwd},...typeof r.description==`string`&&{description:r.description},...typeof r.icon==`string`&&{icon:r.icon},...typeof r.timeout==`number`&&{timeout:r.timeout},...r.enabled===!1&&{enabled:!1}};continue}if(typeof r.url!=`string`)continue;let t=_(r.transport);!t||t===`stdio`||(n[e]={transport:t,url:r.url,...m(r.headers)&&{headers:m(r.headers)},...s(r.auth)&&{auth:r.auth},...typeof r.description==`string`&&{description:r.description},...typeof r.icon==`string`&&{icon:r.icon},...typeof r.timeout==`number`&&{timeout:r.timeout},...typeof r.sse_read_timeout==`number`&&{sse_read_timeout:r.sse_read_timeout},...typeof r.keep_alive==`boolean`&&{keep_alive:r.keep_alive},...r.enabled===!1&&{enabled:!1}})}return n}function ee(e){return e.type===`stdio`?{transport:`stdio`,command:e.command,...e.args?.length?{args:e.args}:{},...e.env&&Object.keys(e.env).length>0?{env:e.env}:{},...e.enabled===!1&&{enabled:!1}}:{transport:e.type===`sse`?`sse`:`http`,url:e.url,...e.headers&&Object.keys(e.headers).length>0?{headers:e.headers}:{},...e.auth?{auth:e.auth}:{},...e.type===`shttp`&&e.timeout!==void 0?{timeout:e.timeout}:{},...e.enabled===!1&&{enabled:!1}}}var y=(e,t)=>t.enabled===!1?{enabled:!1}:g(e)===!1?{enabled:!0}:{},b=(e,t)=>{if(!t)return e?null:void 0;let n={};for(let[e,r]of Object.entries(t))r!==`**********`&&(n[e]=r);for(let r of Object.keys(e??{}))r in t||(n[r]=null);return Object.keys(n).length>0?n:void 0},x=[`client_auth_method`,`scopes`,`client_id`,`client_secret`],S=(e,t)=>{if(t===`**********`||t===void 0)return;if(t===null)return null;if(Array.isArray(t))return h(t)||JSON.stringify(e)===JSON.stringify(t)?void 0:t;if(!f(t))return Object.is(e,t)?void 0:t;let n=f(e)?e:{},r={};for(let[e,i]of Object.entries(t)){let t=S(n[e],i);t!==void 0&&(r[e]=t)}return Object.keys(r).length>0?r:void 0},C=(e,t)=>{if(t===void 0)return;if(t===null)return null;let n=S(e,t),r=f(n)?{...n}:{},i=f(e)?e:{};for(let e of x)e in i&&!(e in t)&&(r[e]=null);if(Object.keys(r).length!==0)return{type:`oauth`,...r}},w=(e,t)=>{if(!e||e.strategy===t.strategy)return t;let n={...t};for(let t of Object.keys(e))t!==`strategy`&&!(t in n)&&(n[t]=null);return n},T=`Removing an individual header from header authentication is not supported yet. Replace the credential or clear authentication, then re-enter the headers you want to keep.`,E=(e,t)=>{let n=b(e?.strategy===`header`?e.headers:void 0,t.headers);if(n){if(Object.values(n).some(e=>e===null))throw Error(T);return{strategy:`header`,headers:n}}},D=(e,t)=>{let n=e?.strategy===`oauth2`?e:void 0,r=C(n?.authentication,t.authentication),i=S(n?.state,t.state);if(!(n&&r===void 0&&i===void 0))return w(e,{strategy:`oauth2`,...r!==void 0&&{authentication:r},...i!==void 0&&{state:i}})};function O(e,t){let n=y(e,t);if(t.type===`stdio`){let r=b(e.transport===`stdio`?e.env:void 0,t.env);return{transport:`stdio`,command:t.command,...t.args?.length?{args:t.args}:e.transport===`stdio`&&e.args?{args:null}:{},...r===void 0?{}:{env:r},...n}}let r=e.transport===`stdio`?void 0:e,i={transport:t.type===`sse`?`sse`:`http`,url:t.url,...n};if(t.type===`shttp`&&(t.timeout===void 0?r?.timeout!==void 0&&(i.timeout=null):i.timeout=t.timeout),t.auth)if(t.auth.strategy===`oauth2`){let e=D(r?.auth,t.auth);e!==void 0&&(i.auth=e)}else if(t.auth.strategy===`header`&&r?.auth?.strategy===`header`){let e=E(r.auth,t.auth);e!==void 0&&(i.auth=e)}else h(t.auth)||(i.auth=w(r?.auth,t.auth));else r?.auth&&(i.auth=null);return i}var k=(e,t)=>{let n=(e,t)=>{let r=f(e)?{...e}:{};if(!f(t))return r;for(let[e,i]of Object.entries(t))i===null?delete r[e]:f(i)?r[e]=n(r[e],i):r[e]=i;return r};return n(e,t)},A=`Replace or clear the stored credential before renaming this MCP server.`;function te(e,t,n,r){if(h(n.transport===`stdio`?n.env:{auth:n.auth,headers:n.headers}))throw Error(A);let i=k(n,O(n,r));return{[e]:null,[t]:i}}function ne(e,t,n){let r=u(t||n);if(!(r in e))return r;let i=1;for(;`${r}_${i}`in e;)i+=1;return`${r}_${i}`}function j(){let e=n().backend;if(e.kind!==`cloud`)throw Error(`Cloud settings call requires a cloud backend.`);return e}function M(e){if(e.agent_settings&&Object.keys(e.agent_settings).length>0)return e.agent_settings;let t={},n={};typeof e.llm_model==`string`&&(n.model=e.llm_model),typeof e.llm_base_url==`string`&&(n.base_url=e.llm_base_url),typeof e.llm_api_key==`string`&&(n.api_key=e.llm_api_key),Object.keys(n).length>0&&(t.llm=n);let r={};return typeof e.enable_default_condenser==`boolean`&&(r.enabled=e.enable_default_condenser),typeof e.condenser_max_size==`number`&&(r.max_size=e.condenser_max_size),Object.keys(r).length>0&&(t.condenser=r),typeof e.agent==`string`&&(t.agent=e.agent),e.mcp_config&&Object.keys(e.mcp_config).length>0&&(t.mcp_config=e.mcp_config),t}function N(e){if(e.conversation_settings&&Object.keys(e.conversation_settings).length>0)return e.conversation_settings;let t={};return typeof e.confirmation_mode==`boolean`&&(t.confirmation_mode=e.confirmation_mode),(typeof e.security_analyzer==`string`||e.security_analyzer===null)&&(t.security_analyzer=e.security_analyzer),typeof e.max_iterations==`number`&&(t.max_iterations=e.max_iterations),t}async function P(){let e=await r({backend:j(),method:`GET`,path:`/api/v1/settings`});return{...e,agent_settings:M(e),conversation_settings:N(e),llm_api_key_set:!!e.llm_api_key_set,search_api_key_set:!!e.search_api_key_set,provider_tokens_set:e.provider_tokens_set}}async function F(e){let t=j(),n={};if(e.agent_settings_diff){let t={...e.agent_settings_diff};t.agent_context===null&&delete t.agent_context,Object.keys(t).length>0&&(n.agent_settings_diff=t)}if(e.conversation_settings_diff&&Object.keys(e.conversation_settings_diff).length>0&&(n.conversation_settings_diff=e.conversation_settings_diff),e.app_preferences)for(let[t,r]of Object.entries(e.app_preferences))r!==void 0&&(n[t]=r);await r({backend:t,method:`POST`,path:`/api/v1/settings`,body:n})}async function I(){return r({backend:j(),method:`GET`,path:`/api/v1/settings/agent-schema`})}async function L(){return r({backend:j(),method:`GET`,path:`/api/v1/settings/conversation-schema`})}var R=[`language`,`user_consents_to_analytics`,`enable_sound_notifications`,`git_user_name`,`git_user_email`,`title_llm_profile`,`disabled_skills`],z=new Set(R),B=e=>z.has(e),V=e=>{let t={},n={};for(let[r,i]of Object.entries(e))B(r)?t[r]=i:n[r]=i;return{extracted:t,rest:n}},H=e=>JSON.parse(JSON.stringify(e)),U=(e,t)=>({...e??{},...t??{}});async function W(e,t=3,n=500){for(let r=0;r<t;r+=1)try{return await e()}catch(e){if(r>=t-1)throw e;let i=n*2**r;await new Promise(e=>{setTimeout(e,i)})}throw Error(`Retry attempts exhausted`)}var G={redacted:null,encrypted:null,timestamp:0},K=300*1e3,q=()=>Date.now()-G.timestamp<K,J=()=>{G={redacted:null,encrypted:null,timestamp:0}},Y=e=>!!e&&typeof e==`object`&&!Array.isArray(e),X=(e,t)=>`Basic ${btoa(`${e}:${t}`)}`,re=e=>{switch(e.strategy){case`none`:return{};case`api_key`:{if(typeof e.value!=`string`||!e.value)return null;let t=typeof e.header_name==`string`&&e.header_name?e.header_name:`Authorization`,n=t===`Authorization`?`Bearer ${e.value}`:e.value;return{[t]:n}}case`bearer`:return typeof e.value!=`string`||!e.value?null:{Authorization:`Bearer ${e.value}`};case`basic`:return typeof e.username!=`string`||typeof e.password!=`string`?null:{Authorization:X(e.username,e.password)};case`header`:return m(e.headers)??{};case`oauth2`:{let t=Y(e.state)?e.state.tokens:void 0;return!Y(t)||typeof t.access_token!=`string`?null:{Authorization:`Bearer ${t.access_token}`}}default:return null}},Z=async e=>{if(!Y(e))return e;let t=Y(e.mcpServers),r=t?e.mcpServers:e,i=Object.values(r).some(e=>Y(e)&&Y(e.auth)&&e.auth!==null)&&n().backend.kind===`cloud`,a=new Map;if(i)try{let e=await P(),t=Y(e.mcp_config)?e.mcp_config:{};for(let[e,n]of Object.entries(t))if(Y(n)){let t=m(n.headers);t&&a.set(e,t)}}catch{}let o=Object.fromEntries(Object.entries(r).map(([e,t])=>{if(!Y(t))return[e,t];if(t.auth===null){let n={...t,headers:null};return delete n.auth,[e,n]}if(!Y(t.auth))return[e,t];let n=re(t.auth);if(n===null)return[e,t];let r={...t},i={...m(t.headers)??{},...n},o=a.get(e);if(o)for(let e of Object.keys(o))e in i||(i[e]=null);return delete r.auth,Object.keys(i).length>0?r.headers=i:delete r.headers,[e,r]}));return t?{...e,mcpServers:o}:o},Q=e=>{let t={agent_settings:e.agent_settings??{},conversation_settings:e.conversation_settings??{},llm_api_key_set:e.llm_api_key_is_set},n=e.misc_settings?.app_preferences;if(n)for(let e of R){let r=n[e];r!==void 0&&(t[e]=r)}return t},$=e=>{let t=U(i.agent_settings??{},e.agent_settings??{}),n=U(i.conversation_settings??{},e.conversation_settings??{}),r={...H(i),...e,provider_tokens_set:{...i.provider_tokens_set??{},...e.provider_tokens_set??{}},agent_settings:t,conversation_settings:n},a=t.llm,o=t.condenser;return typeof t.agent==`string`&&(r.agent=t.agent),typeof a?.model==`string`&&a.model.length>0&&(r.llm_model=a.model),typeof a?.base_url==`string`&&(r.llm_base_url=a.base_url),typeof o?.enabled==`boolean`&&(r.enable_default_condenser=o.enabled),typeof o?.max_size==`number`&&(r.condenser_max_size=o.max_size),typeof n.confirmation_mode==`boolean`&&(r.confirmation_mode=n.confirmation_mode),(typeof n.security_analyzer==`string`||n.security_analyzer===null)&&(r.security_analyzer=n.security_analyzer),typeof n.max_iterations==`number`&&(r.max_iterations=n.max_iterations),r.search_api_key_set=!!r.search_api_key,r},ie=class r{static async fetchSettingsFromApi(n){return W(()=>new e(t()).getSettings({exposeSecrets:n}))}static async getSettings(){if(n().backend.kind===`cloud`)try{return $(await W(()=>P()))}catch(e){return console.warn(`Failed to fetch cloud settings, using defaults:`,e),$({})}if(q()&&G.redacted)return $(Q(G.redacted));try{let e=await this.fetchSettingsFromApi();return G.redacted=e,G.timestamp=Date.now(),$(Q(e))}catch(e){return console.warn(`Failed to fetch settings from API, using defaults:`,e),$({})}}static async getSettingsForConversation(){if(q()&&G.encrypted)return{agentSettings:G.encrypted.agent_settings,conversationSettings:G.encrypted.conversation_settings,secretsEncrypted:!0};let e=await this.fetchSettingsFromApi(`encrypted`);return G.encrypted=e,G.timestamp||=Date.now(),{agentSettings:e.agent_settings,conversationSettings:e.conversation_settings,secretsEncrypted:!0}}static async getSettingsSchema(){return n().backend.kind===`cloud`?await I():await new e(t()).getAgentSchema()}static async getConversationSettingsSchema(){return n().backend.kind===`cloud`?await L():await new e(t()).getConversationSchema()}static async patchMcpConfig(r){if(n().backend.kind===`cloud`){let e=await Z(r);await W(()=>F({agent_settings_diff:{mcp_config:e}}))}else await W(()=>new e(t()).updateSettings({agent_settings_diff:{mcp_config:r}}));return J(),!0}static async patchMcpServer(i,a){return n().backend.kind===`cloud`?r.patchMcpConfig({[i]:a}):(await W(()=>new e(t()).patchMcpServer(i,a)),J(),!0)}static async createMcpServer(i,a){return n().backend.kind===`cloud`?r.patchMcpConfig({[i]:a}):(await W(()=>new e(t()).createMcpServer(i,a)),J(),!0)}static async deleteMcpServer(i){return n().backend.kind===`cloud`?r.patchMcpConfig({[i]:null}):(await W(()=>new e(t()).deleteMcpServer(i)),J(),!0)}static async saveSettings(r){let{extracted:i,rest:a}=V(r),o=Object.keys(i).length>0,s={},c=a.agent_settings_diff;c&&Object.keys(c).length>0&&(s.agent_settings_diff=c);let l=a.conversation_settings_diff;if(l&&Object.keys(l).length>0&&(s.conversation_settings_diff=l),o&&(s.misc_settings_diff={app_preferences:i}),n().backend.kind===`cloud`){if(!(s.agent_settings_diff||s.conversation_settings_diff||o))return!0;let e={};s.agent_settings_diff&&(e.agent_settings_diff={...s.agent_settings_diff},`mcp_config`in e.agent_settings_diff&&(e.agent_settings_diff.mcp_config=await Z(e.agent_settings_diff.mcp_config))),s.conversation_settings_diff&&(e.conversation_settings_diff=s.conversation_settings_diff),o&&(e.app_preferences=i),await W(()=>F(e))}else{if(!(s.agent_settings_diff||s.conversation_settings_diff||s.misc_settings_diff))return!0;await W(()=>new e(t()).updateSettings(s))}return J(),!0}static invalidateCache(){J()}};export{O as a,h as c,c as d,l as f,ne as i,v as l,s as m,A as n,te as o,u as p,d as r,g as s,ie as t,ee as u};
|
|
1
|
+
import{f as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";import{Q as t,st as n}from"./active-backend-context-BZDG15C0.js";import{t as r}from"./proxy-DYDXxtje.js";import{t as i}from"./settings-DcNPxz0v.js";var a=[`none`,`api_key`,`bearer`,`basic`,`header`,`oauth2`],o=e=>!!e&&typeof e==`object`&&!Array.isArray(e),s=e=>o(e)&&typeof e.strategy==`string`&&a.includes(e.strategy),c=/^[a-zA-Z0-9_-]+$/;function l(e){return c.test(e)}function u(e,t=`mcp`){return e.trim().replace(/[^a-zA-Z0-9_-]+/g,`_`).replace(/_+/g,`_`).replace(/^_+|_+$/g,``)||t}var d=`**********`,f=e=>!!e&&typeof e==`object`&&!Array.isArray(e);function p(e){if(!f(e))return null;let t=e.mcpServers;return f(t)&&!(`url`in t)&&!(`command`in t)?t:e}function m(e){if(!f(e))return;let t=Object.entries(e).filter(e=>typeof e[1]==`string`);return t.length>0?Object.fromEntries(t):void 0}function h(e){return e===`**********`?!0:Array.isArray(e)?e.some(h):f(e)?Object.values(e).some(h):!1}var g=e=>e.enabled===!1?!1:void 0,_=e=>{if(e===`stdio`||e===`sse`||e===`streamable-http`)return e;if(e===`http`||e===`shttp`||e===void 0)return`http`};function v(e){let t=p(e);if(!t)return{};let n={};for(let[e,r]of Object.entries(t)){if(!f(r))continue;if(typeof r.command==`string`){n[e]={transport:`stdio`,command:r.command,...Array.isArray(r.args)&&r.args.every(e=>typeof e==`string`)&&{args:r.args},...m(r.env)&&{env:m(r.env)},...typeof r.cwd==`string`&&{cwd:r.cwd},...typeof r.description==`string`&&{description:r.description},...typeof r.icon==`string`&&{icon:r.icon},...typeof r.timeout==`number`&&{timeout:r.timeout},...r.enabled===!1&&{enabled:!1}};continue}if(typeof r.url!=`string`)continue;let t=_(r.transport);!t||t===`stdio`||(n[e]={transport:t,url:r.url,...m(r.headers)&&{headers:m(r.headers)},...s(r.auth)&&{auth:r.auth},...typeof r.description==`string`&&{description:r.description},...typeof r.icon==`string`&&{icon:r.icon},...typeof r.timeout==`number`&&{timeout:r.timeout},...typeof r.sse_read_timeout==`number`&&{sse_read_timeout:r.sse_read_timeout},...typeof r.keep_alive==`boolean`&&{keep_alive:r.keep_alive},...r.enabled===!1&&{enabled:!1}})}return n}function ee(e){return e.type===`stdio`?{transport:`stdio`,command:e.command,...e.args?.length?{args:e.args}:{},...e.env&&Object.keys(e.env).length>0?{env:e.env}:{},...e.enabled===!1&&{enabled:!1}}:{transport:e.type===`sse`?`sse`:`http`,url:e.url,...e.headers&&Object.keys(e.headers).length>0?{headers:e.headers}:{},...e.auth?{auth:e.auth}:{},...e.type===`shttp`&&e.timeout!==void 0?{timeout:e.timeout}:{},...e.enabled===!1&&{enabled:!1}}}var y=(e,t)=>t.enabled===!1?{enabled:!1}:g(e)===!1?{enabled:!0}:{},b=(e,t)=>{if(!t)return e?null:void 0;let n={};for(let[e,r]of Object.entries(t))r!==`**********`&&(n[e]=r);for(let r of Object.keys(e??{}))r in t||(n[r]=null);return Object.keys(n).length>0?n:void 0},x=[`client_auth_method`,`scopes`,`client_id`,`client_secret`],S=(e,t)=>{if(t===`**********`||t===void 0)return;if(t===null)return null;if(Array.isArray(t))return h(t)||JSON.stringify(e)===JSON.stringify(t)?void 0:t;if(!f(t))return Object.is(e,t)?void 0:t;let n=f(e)?e:{},r={};for(let[e,i]of Object.entries(t)){let t=S(n[e],i);t!==void 0&&(r[e]=t)}return Object.keys(r).length>0?r:void 0},C=(e,t)=>{if(t===void 0)return;if(t===null)return null;let n=S(e,t),r=f(n)?{...n}:{},i=f(e)?e:{};for(let e of x)e in i&&!(e in t)&&(r[e]=null);if(Object.keys(r).length!==0)return{type:`oauth`,...r}},w=(e,t)=>{if(!e||e.strategy===t.strategy)return t;let n={...t};for(let t of Object.keys(e))t!==`strategy`&&!(t in n)&&(n[t]=null);return n},T=`Removing an individual header from header authentication is not supported yet. Replace the credential or clear authentication, then re-enter the headers you want to keep.`,E=(e,t)=>{let n=b(e?.strategy===`header`?e.headers:void 0,t.headers);if(n){if(Object.values(n).some(e=>e===null))throw Error(T);return{strategy:`header`,headers:n}}},D=(e,t)=>{let n=e?.strategy===`oauth2`?e:void 0,r=C(n?.authentication,t.authentication),i=S(n?.state,t.state);if(!(n&&r===void 0&&i===void 0))return w(e,{strategy:`oauth2`,...r!==void 0&&{authentication:r},...i!==void 0&&{state:i}})};function O(e,t){let n=y(e,t);if(t.type===`stdio`){let r=b(e.transport===`stdio`?e.env:void 0,t.env);return{transport:`stdio`,command:t.command,...t.args?.length?{args:t.args}:e.transport===`stdio`&&e.args?{args:null}:{},...r===void 0?{}:{env:r},...n}}let r=e.transport===`stdio`?void 0:e,i={transport:t.type===`sse`?`sse`:`http`,url:t.url,...n};if(t.type===`shttp`&&(t.timeout===void 0?r?.timeout!==void 0&&(i.timeout=null):i.timeout=t.timeout),t.auth)if(t.auth.strategy===`oauth2`){let e=D(r?.auth,t.auth);e!==void 0&&(i.auth=e)}else if(t.auth.strategy===`header`&&r?.auth?.strategy===`header`){let e=E(r.auth,t.auth);e!==void 0&&(i.auth=e)}else h(t.auth)||(i.auth=w(r?.auth,t.auth));else r?.auth&&(i.auth=null);return i}var k=(e,t)=>{let n=(e,t)=>{let r=f(e)?{...e}:{};if(!f(t))return r;for(let[e,i]of Object.entries(t))i===null?delete r[e]:f(i)?r[e]=n(r[e],i):r[e]=i;return r};return n(e,t)},A=`Replace or clear the stored credential before renaming this MCP server.`;function te(e,t,n,r){if(h(n.transport===`stdio`?n.env:{auth:n.auth,headers:n.headers}))throw Error(A);let i=k(n,O(n,r));return{[e]:null,[t]:i}}function ne(e,t,n){let r=u(t||n);if(!(r in e))return r;let i=1;for(;`${r}_${i}`in e;)i+=1;return`${r}_${i}`}function j(){let e=n().backend;if(e.kind!==`cloud`)throw Error(`Cloud settings call requires a cloud backend.`);return e}function M(e){if(e.agent_settings&&Object.keys(e.agent_settings).length>0)return e.agent_settings;let t={},n={};typeof e.llm_model==`string`&&(n.model=e.llm_model),typeof e.llm_base_url==`string`&&(n.base_url=e.llm_base_url),typeof e.llm_api_key==`string`&&(n.api_key=e.llm_api_key),Object.keys(n).length>0&&(t.llm=n);let r={};return typeof e.enable_default_condenser==`boolean`&&(r.enabled=e.enable_default_condenser),typeof e.condenser_max_size==`number`&&(r.max_size=e.condenser_max_size),Object.keys(r).length>0&&(t.condenser=r),typeof e.agent==`string`&&(t.agent=e.agent),e.mcp_config&&Object.keys(e.mcp_config).length>0&&(t.mcp_config=e.mcp_config),t}function N(e){if(e.conversation_settings&&Object.keys(e.conversation_settings).length>0)return e.conversation_settings;let t={};return typeof e.confirmation_mode==`boolean`&&(t.confirmation_mode=e.confirmation_mode),(typeof e.security_analyzer==`string`||e.security_analyzer===null)&&(t.security_analyzer=e.security_analyzer),typeof e.max_iterations==`number`&&(t.max_iterations=e.max_iterations),t}async function P(){let e=await r({backend:j(),method:`GET`,path:`/api/v1/settings`});return{...e,agent_settings:M(e),conversation_settings:N(e),llm_api_key_set:!!e.llm_api_key_set,search_api_key_set:!!e.search_api_key_set,provider_tokens_set:e.provider_tokens_set}}async function F(e){let t=j(),n={};if(e.agent_settings_diff){let t={...e.agent_settings_diff};t.agent_context===null&&delete t.agent_context,Object.keys(t).length>0&&(n.agent_settings_diff=t)}if(e.conversation_settings_diff&&Object.keys(e.conversation_settings_diff).length>0&&(n.conversation_settings_diff=e.conversation_settings_diff),e.app_preferences)for(let[t,r]of Object.entries(e.app_preferences))r!==void 0&&(n[t]=r);await r({backend:t,method:`POST`,path:`/api/v1/settings`,body:n})}async function I(){return r({backend:j(),method:`GET`,path:`/api/v1/settings/agent-schema`})}async function L(){return r({backend:j(),method:`GET`,path:`/api/v1/settings/conversation-schema`})}var R=[`language`,`user_consents_to_analytics`,`enable_sound_notifications`,`git_user_name`,`git_user_email`,`title_llm_profile`,`disabled_skills`],z=new Set(R),B=e=>z.has(e),V=e=>{let t={},n={};for(let[r,i]of Object.entries(e))B(r)?t[r]=i:n[r]=i;return{extracted:t,rest:n}},H=e=>JSON.parse(JSON.stringify(e)),U=(e,t)=>({...e??{},...t??{}});async function W(e,t=3,n=500){for(let r=0;r<t;r+=1)try{return await e()}catch(e){if(r>=t-1)throw e;let i=n*2**r;await new Promise(e=>{setTimeout(e,i)})}throw Error(`Retry attempts exhausted`)}var G={redacted:null,encrypted:null,timestamp:0},K=300*1e3,q=()=>Date.now()-G.timestamp<K,J=()=>{G={redacted:null,encrypted:null,timestamp:0}},Y=e=>!!e&&typeof e==`object`&&!Array.isArray(e),X=(e,t)=>`Basic ${btoa(`${e}:${t}`)}`,re=e=>{switch(e.strategy){case`none`:return{};case`api_key`:{if(typeof e.value!=`string`||!e.value)return null;let t=typeof e.header_name==`string`&&e.header_name?e.header_name:`Authorization`,n=t===`Authorization`?`Bearer ${e.value}`:e.value;return{[t]:n}}case`bearer`:return typeof e.value!=`string`||!e.value?null:{Authorization:`Bearer ${e.value}`};case`basic`:return typeof e.username!=`string`||typeof e.password!=`string`?null:{Authorization:X(e.username,e.password)};case`header`:return m(e.headers)??{};case`oauth2`:{let t=Y(e.state)?e.state.tokens:void 0;return!Y(t)||typeof t.access_token!=`string`?null:{Authorization:`Bearer ${t.access_token}`}}default:return null}},Z=async e=>{if(!Y(e))return e;let t=Y(e.mcpServers),r=t?e.mcpServers:e,i=Object.values(r).some(e=>Y(e)&&Y(e.auth)&&e.auth!==null)&&n().backend.kind===`cloud`,a=new Map;if(i)try{let e=await P(),t=Y(e.mcp_config)?e.mcp_config:{};for(let[e,n]of Object.entries(t))if(Y(n)){let t=m(n.headers);t&&a.set(e,t)}}catch{}let o=Object.fromEntries(Object.entries(r).map(([e,t])=>{if(!Y(t))return[e,t];if(t.auth===null){let n={...t,headers:null};return delete n.auth,[e,n]}if(!Y(t.auth))return[e,t];let n=re(t.auth);if(n===null)return[e,t];let r={...t},i={...m(t.headers)??{},...n},o=a.get(e);if(o)for(let e of Object.keys(o))e in i||(i[e]=null);return delete r.auth,Object.keys(i).length>0?r.headers=i:delete r.headers,[e,r]}));return t?{...e,mcpServers:o}:o},Q=e=>{let t={agent_settings:e.agent_settings??{},conversation_settings:e.conversation_settings??{},llm_api_key_set:e.llm_api_key_is_set},n=e.misc_settings?.app_preferences;if(n)for(let e of R){let r=n[e];r!==void 0&&(t[e]=r)}return t},$=e=>{let t=U(i.agent_settings??{},e.agent_settings??{}),n=U(i.conversation_settings??{},e.conversation_settings??{}),r={...H(i),...e,provider_tokens_set:{...i.provider_tokens_set??{},...e.provider_tokens_set??{}},agent_settings:t,conversation_settings:n},a=t.llm,o=t.condenser;return typeof t.agent==`string`&&(r.agent=t.agent),typeof a?.model==`string`&&a.model.length>0&&(r.llm_model=a.model),typeof a?.base_url==`string`&&(r.llm_base_url=a.base_url),typeof o?.enabled==`boolean`&&(r.enable_default_condenser=o.enabled),typeof o?.max_size==`number`&&(r.condenser_max_size=o.max_size),typeof n.confirmation_mode==`boolean`&&(r.confirmation_mode=n.confirmation_mode),(typeof n.security_analyzer==`string`||n.security_analyzer===null)&&(r.security_analyzer=n.security_analyzer),typeof n.max_iterations==`number`&&(r.max_iterations=n.max_iterations),r.search_api_key_set=!!r.search_api_key,r},ie=class r{static async fetchSettingsFromApi(n){return W(()=>new e(t()).getSettings({exposeSecrets:n}))}static async getSettings(){if(n().backend.kind===`cloud`)try{return $(await W(()=>P()))}catch(e){return console.warn(`Failed to fetch cloud settings, using defaults:`,e),$({})}if(q()&&G.redacted)return $(Q(G.redacted));try{let e=await this.fetchSettingsFromApi();return G.redacted=e,G.timestamp=Date.now(),$(Q(e))}catch(e){return console.warn(`Failed to fetch settings from API, using defaults:`,e),$({})}}static async getSettingsForConversation(){if(q()&&G.encrypted)return{agentSettings:G.encrypted.agent_settings,conversationSettings:G.encrypted.conversation_settings,secretsEncrypted:!0};let e=await this.fetchSettingsFromApi(`encrypted`);return G.encrypted=e,G.timestamp||=Date.now(),{agentSettings:e.agent_settings,conversationSettings:e.conversation_settings,secretsEncrypted:!0}}static async getSettingsSchema(){return n().backend.kind===`cloud`?await I():await new e(t()).getAgentSchema()}static async getConversationSettingsSchema(){return n().backend.kind===`cloud`?await L():await new e(t()).getConversationSchema()}static async patchMcpConfig(r){if(n().backend.kind===`cloud`){let e=await Z(r);await W(()=>F({agent_settings_diff:{mcp_config:e}}))}else await W(()=>new e(t()).updateSettings({agent_settings_diff:{mcp_config:r}}));return J(),!0}static async patchMcpServer(i,a){return n().backend.kind===`cloud`?r.patchMcpConfig({[i]:a}):(await W(()=>new e(t()).patchMcpServer(i,a)),J(),!0)}static async createMcpServer(i,a){return n().backend.kind===`cloud`?r.patchMcpConfig({[i]:a}):(await W(()=>new e(t()).createMcpServer(i,a)),J(),!0)}static async deleteMcpServer(i){return n().backend.kind===`cloud`?r.patchMcpConfig({[i]:null}):(await W(()=>new e(t()).deleteMcpServer(i)),J(),!0)}static async saveSettings(r){let{extracted:i,rest:a}=V(r),o=Object.keys(i).length>0,s={},c=a.agent_settings_diff;c&&Object.keys(c).length>0&&(s.agent_settings_diff=c);let l=a.conversation_settings_diff;if(l&&Object.keys(l).length>0&&(s.conversation_settings_diff=l),o&&(s.misc_settings_diff={app_preferences:i}),n().backend.kind===`cloud`){if(!(s.agent_settings_diff||s.conversation_settings_diff||o))return!0;let e={};s.agent_settings_diff&&(e.agent_settings_diff={...s.agent_settings_diff},`mcp_config`in e.agent_settings_diff&&(e.agent_settings_diff.mcp_config=await Z(e.agent_settings_diff.mcp_config))),s.conversation_settings_diff&&(e.conversation_settings_diff=s.conversation_settings_diff),o&&(e.app_preferences=i),await W(()=>F(e))}else{if(!(s.agent_settings_diff||s.conversation_settings_diff||s.misc_settings_diff))return!0;await W(()=>new e(t()).updateSettings(s))}return J(),!0}static invalidateCache(){J()}};export{O as a,h as c,c as d,l as f,ne as i,v as l,s as m,A as n,te as o,u as p,d as r,g as s,ie as t,ee as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{t as i,z as a}from"./utils-DUD5ScdA.js";import{n as o}from"./toggle-switch-B2MLKsgt.js";var s=e(t(),1),c=n();function l({children:e,testId:t,name:n,onToggle:l,defaultIsToggled:u,isToggled:d,isBeta:f,isDisabled:p,togglePosition:m=`left`}){let{t:h}=r(`openhands`),[g,_]=s.useState(u??!1),v=e=>{p||(_(e),l?.(e))},y=(0,c.jsx)(`input`,{hidden:!0,"data-testid":t,name:n,type:`checkbox`,onChange:e=>v(e.target.checked),checked:d??g,disabled:p}),b=(0,c.jsx)(o,{enabled:d??g}),x=e||f?(0,c.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,c.jsx)(`span`,{className:`text-sm`,children:e}),f&&(0,c.jsx)(`span`,{className:`text-[11px] leading-4 text-base font-[500] tracking-tighter bg-primary px-1 rounded-full`,children:h(a.BADGE$BETA)})]}):null;return(0,c.jsxs)(`label`,{className:i(`flex items-center gap-2`,m===`right`?`w-full justify-between`:`w-fit`,p?`cursor-not-allowed opacity-50`:`cursor-pointer`),children:[y,m===`right`?(0,c.jsxs)(c.Fragment,{children:[x,b]}):(0,c.jsxs)(c.Fragment,{children:[b,x]})]})}export{l as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./map-provider-
|
|
1
|
+
import{t as e}from"./map-provider-BK4HnqYz.js";var t=t=>{let n=t.get(`llm-provider-input`)?.toString(),r=n?e(n):void 0,i=t.get(`llm-model-input`)?.toString();return{llmModel:r&&i?`${r}/${i}`:void 0,llmApiKey:t.get(`llm-api-key-input`)?.toString(),agent:t.get(`agent`)?.toString(),language:t.get(`language`)?.toString()}},n=e=>{let{llmModel:n,llmApiKey:r,agent:i,language:a}=t(e),o={};n&&(o.model=n),r!==void 0&&(o.api_key=r);let s={};return Object.keys(o).length>0&&(s.llm=o),i&&(s.agent=i),{...Object.keys(s).length>0?{agent_settings_diff:s}:{},...a?{language:a}:{}}};function r(e,t){return!!(t?.hide_llm_settings&&e===`/settings/llm`)}function i(e){return[{path:`/settings/agents`,hidden:!1},{path:`/settings/llm`,hidden:!!e?.hide_llm_settings},{path:`/settings`,hidden:!!e?.hide_llm_settings},{path:`/settings/app`,hidden:!1},{path:`/settings/secrets`,hidden:!1}].find(e=>!e.hidden)?.path??null}export{i as n,r,n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{B as r,U as i,c as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{B as r,U as i,c as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{t as o}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{t as s}from"./useInfiniteQuery-c_OmS3lK.js";import{c}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";import{t as l}from"./useQuery-Bs5NFz2s.js";import{Q as u}from"./active-backend-context-BZDG15C0.js";import{z as d}from"./utils-DUD5ScdA.js";import{t as f}from"./messages-CzFKrzPG.js";import{t as p}from"./loading-spinner-DBgXgra0.js";import{t as m}from"./openhands-logo-BS-Epajy.js";import{C as h,d as g}from"./markdown-renderer-Cp6DlHQN.js";var _=e(t(),1),v=e=>l({queryKey:[`shared-conversation`,e],queryFn:()=>{if(!e)throw Error(`Conversation ID is required`);return new c(u()).getSharedConversation(e)},enabled:!!e,retry:!1}),y=e=>s({queryKey:[`shared-conversation-events`,e],queryFn:({pageParam:t})=>{if(!e)throw Error(`Conversation ID is required`);return new c(u()).searchSharedEvents({conversationId:e,limit:100,pageId:t})},initialPageParam:void 0,getNextPageParam:e=>e.next_page_id??void 0,enabled:!!e,retry:!1}),b=({hasNextPage:e,isFetchingNextPage:t,fetchNextPage:n,threshold:r=100})=>{let i=(0,_.useRef)(null),a=(0,_.useCallback)(()=>{if(!i.current||t||!e)return;let{scrollTop:a,scrollHeight:o,clientHeight:s}=i.current;a+s>=o-r&&n()},[e,t,n,r]);return(0,_.useEffect)(()=>{let e=i.current;if(e)return e.addEventListener(`scroll`,a),()=>{e.removeEventListener(`scroll`,a)}},[a]),i},x=n(),S=i(function(){let{t:e}=o(`openhands`),{conversationId:t}=r(),{data:n,isLoading:i,error:s}=v(t),{data:c,isLoading:l,error:u,hasNextPage:S,fetchNextPage:C,isFetchingNextPage:w}=y(t),T=i||l,E=s||u,D=_.useMemo(()=>c?.pages?c.pages.flatMap(e=>e.items):[],[c?.pages]),O=_.useMemo(()=>D.reduce((e,t)=>h(t,e),[]).filter(g),[D]),k=b({hasNextPage:!!S,isFetchingNextPage:w,fetchNextPage:C});return T?(0,x.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-base`,children:(0,x.jsx)(p,{size:`large`})}):E||!n?(0,x.jsx)(`div`,{className:`flex items-center justify-center h-screen bg-base`,children:(0,x.jsx)(`div`,{className:`text-white`,children:e(d.CONVERSATION$NOT_FOUND)})}):(0,x.jsxs)(`div`,{className:`h-screen bg-base text-white flex flex-col`,children:[(0,x.jsx)(`div`,{className:`border-b border-[var(--oh-border-subtle)] p-4 flex-shrink-0`,children:(0,x.jsxs)(`div`,{className:`max-w-4xl mx-auto flex items-start gap-4`,children:[(0,x.jsx)(a,{to:`/conversations`,className:`flex-shrink-0`,"aria-label":e(d.BRANDING$OPENHANDS_LOGO),children:(0,x.jsx)(m,{width:46,height:30})}),(0,x.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,x.jsx)(`h1`,{className:`text-xl font-medium mb-2`,children:n?.title||e(d.CONVERSATION$SHARED_CONVERSATION)}),n?.selected_branch&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(d.CONVERSATION$BRANCH),`: `,n.selected_branch]}),n?.selected_repository&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(d.CONVERSATION$REPOSITORY),`:`,` `,n.selected_repository]}),n?.llm_model&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(d.LLM$MODEL),`: `,n.llm_model]})]})]})}),(0,x.jsx)(`div`,{ref:k,className:`flex-1 overflow-y-auto custom-scrollbar-always px-4 pt-4 gap-2`,children:(0,x.jsxs)(`div`,{className:`max-w-4xl mx-auto p-4 border border-[var(--oh-border-subtle)] rounded`,children:[O.length>0?(0,x.jsx)(f,{messages:O,allEvents:D}):(0,x.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,x.jsx)(`div`,{className:`text-center text-[var(--oh-muted)] py-8`,children:e(d.CONVERSATION$NO_HISTORY_AVAILABLE)})}),w&&(0,x.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,x.jsx)(p,{size:`small`})})]})})]})});export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
1
|
+
import{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";var t=e(`shield-check`,[[`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`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./utils-
|
|
1
|
+
import{t as e}from"./utils-DUD5ScdA.js";var t=`transition-none motion-reduce:transition-none`,n=`flex h-9 w-[18px] shrink-0 items-center justify-center`,r=`relative h-9 min-h-9 max-h-9 w-full shrink-0`;function i(t){return e(`flex h-10 min-h-10 shrink-0 items-center w-full`,t?`px-0`:`gap-2 pl-2.5 pr-2.5`)}var a={active:`bg-tertiary text-white font-normal`,idle:`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`};function o(t){return e(`flex flex-col gap-0.5 w-full shrink-0 items-stretch`,!t&&`pr-2.5`)}function s(n){let{indent:r=!1,collapsed:i=!1}=n??{};return e(`flex h-9 min-h-9 min-w-0 items-center rounded-md`,t,`text-sm leading-5 w-full`,i?`group gap-0 px-0 overflow-visible bg-transparent hover:bg-transparent`:`gap-2 px-2.5 overflow-hidden`,r&&!i&&`pl-7`)}function c(n){return e(`pointer-events-none absolute inset-0 z-0 rounded-md`,t,n?`bg-tertiary`:`bg-transparent group-hover:bg-[var(--oh-surface-raised)]`)}function l(t){return e(`relative z-[1] flex h-full w-full items-center justify-start pl-2.5 [&_svg]:shrink-0`,t?`text-white font-normal`:`text-[var(--oh-muted)] group-hover:text-white`)}function u(e){return e?`sr-only`:`min-w-0 truncate`}var d=e(`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md`,t,`cursor-pointer`),f=e(`relative hidden md:block shrink-0 overflow-visible`,r),p=e(`absolute left-1/2 top-1/2 hidden h-7 w-7 -translate-x-1/2 -translate-y-1/2 md:inline-flex`,`items-center justify-center rounded-md`,t,`cursor-pointer`,`text-[var(--oh-muted)] hover:text-white hover:bg-[var(--oh-surface-raised)]`);export{n as a,l as c,o as d,s as f,d as i,i as l,f as n,a as o,p as r,c as s,r as t,u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{t as a}from"./useMutation-6ZsQCqAn.js";import{t as o}from"./vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-e8pX05xf.js";import{t as s,z as c}from"./utils-DUD5ScdA.js";import{t as l}from"./modal-backdrop-BSzNhM4r.js";import{n as u}from"./modal-body-BdKfD3Hl.js";import{n as d,r as f}from"./base-modal-BbjycA8X.js";import{_ as p,u as m}from"./form-control-classes-CGXBLcn1.js";import{t as h}from"./brand-button-Blxv5nww.js";import{t as g}from"./agent-server-conversation-service.api-DK56YPTs.js";var _=e(t(),1),v=n();function y({onConfirm:e,onCancel:t,conversationTitle:n,title:r,description:a}){let{t:s}=i(`openhands`),p;return p=a??(n?(0,v.jsx)(o,{ns:`openhands`,i18nKey:c.CONVERSATION$DELETE_WARNING_WITH_TITLE,values:{title:n},components:{title:(0,v.jsx)(`span`,{className:`text-white`})}}):s(c.CONVERSATION$DELETE_WARNING)),(0,v.jsx)(l,{onClose:t,children:(0,v.jsxs)(u,{className:`items-start border border-[var(--oh-border)]`,children:[(0,v.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,v.jsx)(f,{title:r??s(c.CONVERSATION$CONFIRM_DELETE)}),(0,v.jsx)(d,{children:p})]}),(0,v.jsxs)(`div`,{className:`flex justify-end gap-2 w-full`,onClick:e=>e.stopPropagation(),children:[(0,v.jsx)(h,{type:`button`,variant:`secondary`,onClick:t,"data-testid":`cancel-button`,children:s(c.BUTTON$CANCEL)}),(0,v.jsx)(h,{type:`button`,variant:`primary`,onClick:e,"data-testid":`confirm-button`,children:s(c.ACTION$CONFIRM_DELETE)})]})]})})}function b({onConfirm:e,onCancel:t}){let{t:n}=i(`openhands`);return(0,v.jsx)(l,{onClose:t,children:(0,v.jsxs)(u,{className:`items-start border border-[var(--oh-border)]`,children:[(0,v.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,v.jsx)(f,{title:n(c.CONVERSATION$CONFIRM_CLOSE_CONVERSATION)}),(0,v.jsx)(d,{description:n(c.CONVERSATION$CLOSE_CONVERSATION_WARNING)})]}),(0,v.jsxs)(`div`,{className:`flex justify-end gap-2 w-full`,onClick:e=>e.stopPropagation(),children:[(0,v.jsx)(h,{type:`button`,variant:`secondary`,onClick:t,"data-testid":`cancel-button`,children:n(c.BUTTON$CANCEL)}),(0,v.jsx)(h,{type:`button`,variant:`primary`,onClick:e,"data-testid":`confirm-button`,children:n(c.ACTION$CONFIRM_CLOSE)})]})]})})}var x=()=>{let e=r();return a({mutationFn:e=>g.updateConversationTitle(e.conversationId,e.newTitle),onMutate:async t=>{await e.cancelQueries({queryKey:[`user`,`conversations`]});let n=e.getQueryData([`user`,`conversations`]);return e.setQueryData([`user`,`conversations`],e=>e?.map(e=>e.id===t.conversationId?{...e,title:t.newTitle}:e)),e.setQueryData([`user`,`conversation`,t.conversationId],e=>e&&{...e,title:t.newTitle}),{previousConversations:n}},onError:(t,n,r)=>{r?.previousConversations&&e.setQueryData([`user`,`conversations`],r.previousConversations)},onSettled:(t,n,r)=>{e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`user`,`conversation`,r.conversationId]})}})};function S(e){if(!e)return null;try{let t=new URL(e);return t.hostname===`localhost`&&window.location.hostname!==`localhost`?(t.hostname=window.location.hostname,t.toString()):e}catch{return e}}var C=e=>(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,v.jsx)(`path`,{d:`M12 2C12.5523 2 13 2.44772 13 3V13.5858L15.2929 11.2929C15.6834 10.9024 16.3166 10.9024 16.7071 11.2929C17.0976 11.6834 17.0976 12.3166 16.7071 12.7071L12.7071 16.7071C12.3166 17.0976 11.6834 17.0976 11.2929 16.7071L7.29289 12.7071C6.90237 12.3166 6.90237 11.6834 7.29289 11.2929C7.68342 10.9024 8.31658 10.9024 8.70711 11.2929L11 13.5858V3C11 2.44772 11.4477 2 12 2ZM5 17C5.55228 17 6 17.4477 6 18V20H18V18C18 17.4477 18.4477 17 19 17C19.5523 17 20 17.4477 20 18V20C20 21.1046 19.1046 22 18 22H6C4.89543 22 4 21.1046 4 20V18C4 17.4477 4.44772 17 5 17Z`,fill:`currentColor`})}),w=_.createContext(null);function T({children:e}){let[t,n]=_.useState(!1),r=_.useCallback(()=>n(!0),[]),i=_.useCallback(()=>n(!1),[]),a=_.useCallback(()=>n(e=>!e),[]),o=_.useMemo(()=>({isOpen:t,open:r,close:i,toggle:a}),[t,r,i,a]);return(0,v.jsx)(w.Provider,{value:o,children:e})}function E(){let e=_.useContext(w);if(!e)throw Error(`useSidebarMobileNav must be used within SidebarMobileNavProvider`);return e}var D=s(`inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md p-1`,`text-[var(--oh-muted)]`,p,m),O=`size-5 shrink-0`,k=e=>(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,v.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M10 5.5H18C18.2761 5.5 18.5 5.72386 18.5 6V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 5.5ZM8.5 5.5H6C5.72386 5.5 5.5 5.72386 5.5 6V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 5.5ZM18 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V6C20 4.89543 19.1046 4 18 4Z`,fill:`currentColor`})});function A(){let{t:e}=i(`openhands`),{isOpen:t,toggle:n}=E();return(0,v.jsx)(`button`,{type:`button`,"data-testid":`sidebar-mobile-menu-toggle`,onClick:n,"aria-expanded":t,"aria-label":e(t?c.SIDEBAR$CLOSE_MENU:c.SIDEBAR$OPEN_MENU),className:D,children:(0,v.jsx)(k,{className:O,"aria-hidden":!0})})}export{T as a,S as c,y as d,O as i,x as l,k as n,E as o,D as r,C as s,A as t,b as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./utils-
|
|
1
|
+
import"./rolldown-runtime-Cyuzqnbw.js";import{St as e,yt as t}from"./vendor-styling-Ck5D_A2Q.js";import{t as n}from"./utils-DUD5ScdA.js";import{n as r}from"./navigation-context-CQZwH_tC.js";import{t as i}from"./navigation-link-Bxo3-4vo.js";import{a,c as o,f as s,o as c,s as l,t as u,u as d}from"./sidebar-layout-lrfPooIB.js";import{t as f}from"./styled-tooltip-B6JXcsmL.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{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
1
|
+
import{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";import{d as t,f as n,l as r}from"./conversation-store-Blc5xysY.js";var i=e(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),a=e(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),o=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`}]]),s=n(e=>({isOpen:!1,open:()=>e({isOpen:!0}),close:()=>e({isOpen:!1}),toggle:()=>e(e=>({isOpen:!e.isOpen}))})),c=`openhands-sidebar`,l=`openhands-sidebar-collapsed`,u=n()(t(e=>({collapsed:!1,setCollapsed:t=>e(e=>({collapsed:typeof t==`function`?t(e.collapsed):t})),toggleCollapsed:()=>e(e=>({collapsed:!e.collapsed}))}),{name:c,storage:r(()=>localStorage),partialize:e=>({collapsed:e.collapsed})}));if(typeof window<`u`)try{let e=window.localStorage.getItem(l);window.localStorage.getItem(c)===null&&(e===`true`||e===`false`)&&u.setState({collapsed:e===`true`}),e!==null&&window.localStorage.removeItem(l)}catch{}export{i as a,a as i,s as n,o as r,u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{t as i,z as a}from"./utils-DUD5ScdA.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-Ck5D_A2Q.js";import{t}from"./utils-
|
|
1
|
+
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./utils-DUD5ScdA.js";import{t as n}from"./skills-B0IliMxw.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{d as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
1
|
+
import{d as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";import{t}from"./useQuery-Bs5NFz2s.js";import{Q as n,bt as r,st as i}from"./active-backend-context-BZDG15C0.js";import{t as a}from"./proxy-DYDXxtje.js";import{t as o}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C0JXQb_q.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,category:e.category,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}),m=[`project`,`personal`,`public`],h=[`/.agents/skills/`,`/.openhands/skills/`,`/.openhands/microagents/`];function g(e){return e.replace(/\\/g,`/`)}function _(e){let t=g(e).toLowerCase();return t===`public`?!0:t.includes(`public-skills`)||t.includes(`/.openhands/cache/skills/`)}function v(e){let t=g(e);return/^\/Users\/[^/]+\/\.(agents|openhands)\//.test(t)||/^\/home\/[^/]+\/\.(agents|openhands)\//.test(t)?!0:h.some(e=>{let n=t.indexOf(e);if(n===-1)return!1;let r=t.slice(0,n);return/^\/Users\/[^/]+$/.test(r)||/^\/home\/[^/]+$/.test(r)})}function y(e,t){let n=g(e);if(!h.some(e=>n.includes(e))||v(e))return!1;if(t){let e=g(t).replace(/\/$/,``);if(n.startsWith(e))return!0}return!0}function b(e,t){let n=e.source?.trim();if(!n)return e.type===`repo`?`project`:`public`;let r=n.toLowerCase();return _(n)?`public`:r===`user`||r===`global`?`personal`:r===`project`||r===`repo`||r===`sandbox`?`project`:v(n)?`personal`:y(n,t)?`project`:`public`}function x(e,t){let n={project:[],personal:[],public:[]};for(let r of e)n[b(r,t)].push(r);for(let e of m)n[e].sort((e,t)=>e.name.localeCompare(t.name));return n}export{p as i,b as n,x as r,m as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{U as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dh9v73sa-rfV8mQ9m.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js";import{t as o}from"./useMutation-BFDQmgk9.js";import{t as s}from"./useQuery-DRv--6bK.js";import{At as c,I as l,Pt as u,jt as d,n as f}from"./active-backend-context-IqOjobNK.js";import{t as p,z as m}from"./utils-zxEjKE70.js";import{t as h}from"./search-CycosyjN.js";import{t as g}from"./x-BWKA2Ver.js";import{t as _}from"./loading-spinner-xhnrGP4Y.js";import{t as v}from"./modal-backdrop-BSzNhM4r.js";import{n as y}from"./modal-classes-D66dlgZ7.js";import{t as b}from"./brand-button-swT1RyO0.js";import{n as x}from"./navigation-context-CQZwH_tC.js";import{t as S}from"./modal-close-button-B6iOGYpI.js";import{t as C}from"./settings-input-Cz62hWVW.js";import{t as w}from"./plugins-management-service-wtmY4QQw.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-BRsSI8Vs.js";import{n as k}from"./circle-plus-check-toggle-Cuzx55bo.js";import{n as A,t as ee}from"./use-plugins-marketplace-CEiak69h.js";import{n as j}from"./extensions-navigation-lraj88Wk.js";import{t as M}from"./skill-icon-badge-QgfKv31M.js";import{n as N}from"./settings-like-page-layout-classes-Cw4Yzv_P.js";import{n as P,t as F}from"./highlighted-source-view-C_sfncLZ.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}),d(t(m.SETTINGS$PLUGINS_INSTALL_SUCCESS))},onError:e=>{c(u(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(u(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}),d(t(m.SETTINGS$PLUGINS_UNINSTALL_SUCCESS))},onError:e=>{c(u(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}),d(t(m.SETTINGS$PLUGINS_REFRESH_SUCCESS))},onError:e=>{c(u(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
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{U as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{t as o}from"./useMutation-6ZsQCqAn.js";import{t as s}from"./useQuery-Bs5NFz2s.js";import{F as c,Ft as l,Mt as u,jt as d,n as f}from"./active-backend-context-BZDG15C0.js";import{t as p,z as m}from"./utils-DUD5ScdA.js";import{t as h}from"./search-CYSDBczG.js";import{t as g}from"./x-86ZCfxKY.js";import{t as _}from"./loading-spinner-DBgXgra0.js";import{t as v}from"./modal-backdrop-BSzNhM4r.js";import{n as y}from"./modal-classes-D5_b5vMi.js";import{t as b}from"./brand-button-Blxv5nww.js";import{n as x}from"./navigation-context-CQZwH_tC.js";import{t as S}from"./modal-close-button-objukxk_.js";import{t as C}from"./settings-input-CWUEHHvS.js";import{t as w}from"./plugins-management-service-lHdNKWNU.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-Dk9hChx1.js";import{n as k}from"./circle-plus-check-toggle-ASbpB8vN.js";import{n as A,t as ee}from"./use-plugins-marketplace-BCuNLFsr.js";import{n as j}from"./extensions-navigation-C4sgZg-y.js";import{t as M}from"./skill-icon-badge-kkOWZ89w.js";import{n as N}from"./settings-like-page-layout-classes-Cw4Yzv_P.js";import{n as P,t as F}from"./highlighted-source-view-C_YOp8Fo.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}),u(t(m.SETTINGS$PLUGINS_INSTALL_SUCCESS))},onError:e=>{d(l(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(l(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}),u(t(m.SETTINGS$PLUGINS_UNINSTALL_SUCCESS))},onError:e=>{d(l(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}),u(t(m.SETTINGS$PLUGINS_REFRESH_SUCCESS))},onError:e=>{d(l(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-Ck5D_A2Q.js";import{H as r,U as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~lq5hicxx-cHFhpUBq.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gxu4j2ea-D5DWZVc7.js";import{D as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kv3pap4j-B8i84bh4.js";import{t as s}from"./vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-Cc0f9kPP.js";import{At as c,Pt as l}from"./active-backend-context-IqOjobNK.js";import{t as u,z as d}from"./utils-zxEjKE70.js";import{t as f}from"./bot-BQZx8e2i.js";import{t as p}from"./check-WAFXrrs_.js";import{a as m,i as h,n as g,r as _,t as v}from"./wrench-DIka3hCq.js";import{t as y}from"./search-CycosyjN.js";import{t as b}from"./shield-check-T3JsDJiM.js";import{t as x}from"./x-BWKA2Ver.js";import{n as S}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~ht43enc2-C0JXQb_q.js";import{n as ee}from"./use-settings-wCwPaSIv.js";import{t as te}from"./use-save-settings-DNmnbG6f.js";import{t as C}from"./modal-backdrop-BSzNhM4r.js";import{n as w,t as T}from"./modal-body-gIe21fDv.js";import{n as E}from"./modal-classes-D66dlgZ7.js";import{t as D}from"./brand-button-swT1RyO0.js";import{t as O}from"./modal-close-button-B6iOGYpI.js";import{t as k}from"./checkmark-XZyokq_Y.js";import{t as A}from"./copy-Drmhc2jD.js";import{a as j,n as ne,o as re,r as M,t as ie}from"./extension-module-card-classes-Bo43vY5V.js";import{t as N}from"./settings-switch-BRsSI8Vs.js";import{n as P,t as F}from"./skill-card-pill-row-BXz8L8Rn.js";import{n as I}from"./circle-plus-check-toggle-Cuzx55bo.js";import{i as ae,n as L,t as oe}from"./skill-scope-Dc3JPW-8.js";import{n as se}from"./extensions-navigation-lraj88Wk.js";import{t as ce}from"./skill-icon-badge-QgfKv31M.js";import{n as le,t as ue}from"./use-launch-skill-in-chat-COnDpxCQ.js";import{n as de}from"./settings-like-page-layout-classes-Cw4Yzv_P.js";var fe=o(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),pe=o(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),me=o(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),R=e(t(),1),he=`https://docs.openhands.dev/overview/skills/adding#adding-new-skills`,z=`/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview`,B=n(),ge=[d.SETTINGS$SKILLS_ADD_MODAL_STEP_1,d.SETTINGS$SKILLS_ADD_MODAL_STEP_2,d.SETTINGS$SKILLS_ADD_MODAL_STEP_3,d.SETTINGS$SKILLS_ADD_MODAL_STEP_4,d.SETTINGS$SKILLS_ADD_MODAL_STEP_5],V={cmd:(0,B.jsx)(H,{}),path:(0,B.jsx)(H,{}),env:(0,B.jsx)(H,{})};function H({children:e}){return(0,B.jsx)(`code`,{className:u(`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 _e(){let{t:e}=a(`openhands`),[t,n]=R.useState(!1);return R.useEffect(()=>{if(!t)return;let e=setTimeout(()=>n(!1),2e3);return()=>clearTimeout(e)},[t]),(0,B.jsxs)(`div`,{className:`relative`,children:[(0,B.jsx)(`pre`,{"data-testid":`add-skill-modal-example`,className:u(`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:z}),(0,B.jsx)(`button`,{type:`button`,"data-testid":`add-skill-modal-example-copy`,"aria-label":e(t?d.BUTTON$COPIED:d.BUTTON$COPY),disabled:t,onClick:async()=>{await navigator.clipboard.writeText(z),n(!0)},className:u(`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,B.jsx)(k,{width:14,height:14}):(0,B.jsx)(A,{width:14,height:14})})]})}function U({i18nKey:e}){return(0,B.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:(0,B.jsx)(s,{ns:`openhands`,i18nKey:e,components:V})})}function ve({onClose:e}){let{t}=a(`openhands`);return(0,B.jsx)(C,{onClose:e,"aria-label":t(d.SETTINGS$SKILLS_ADD_MODAL_TITLE),children:(0,B.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,B.jsx)(O,{onClose:e,testId:`add-skill-modal-close`}),(0,B.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,B.jsx)(`h2`,{className:u(`pr-6`,E),children:t(d.SETTINGS$SKILLS_ADD_MODAL_TITLE)}),(0,B.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:t(d.SETTINGS$SKILLS_ADD_MODAL_INTRO)})]}),(0,B.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,B.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(d.SETTINGS$SKILLS_ADD_MODAL_CHAT_TITLE)}),(0,B.jsx)(U,{i18nKey:d.SETTINGS$SKILLS_ADD_MODAL_CHAT_BODY}),(0,B.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:t(d.SETTINGS$SKILLS_ADD_MODAL_EXAMPLE_LABEL)}),(0,B.jsx)(_e,{}),(0,B.jsx)(`ol`,{className:`list-decimal space-y-1 pl-4 text-xs leading-relaxed text-tertiary-light`,children:ge.map(e=>(0,B.jsx)(`li`,{children:e===d.SETTINGS$SKILLS_ADD_MODAL_STEP_3?(0,B.jsx)(s,{ns:`openhands`,i18nKey:e,components:V}):t(e)},e))})]}),(0,B.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(d.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS_TITLE)}),(0,B.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:t(d.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS)})]}),(0,B.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(d.SETTINGS$SKILLS_ADD_MODAL_STORAGE_TITLE)}),(0,B.jsx)(U,{i18nKey:d.SETTINGS$SKILLS_ADD_MODAL_STORAGE_BODY})]}),(0,B.jsx)(U,{i18nKey:d.SETTINGS$SKILLS_ADD_MODAL_PRIVATE_REPOS}),(0,B.jsx)(`a`,{href:he,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(d.SETTINGS$SKILLS_ADD_MODAL_VIEW_DOCS)})]}),(0,B.jsx)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:(0,B.jsx)(D,{type:`button`,variant:`secondary`,onClick:e,testId:`add-skill-modal-dismiss`,children:t(d.BUTTON$CLOSE)})})]})})}var W=/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;function ye(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 be(e){let t=e.match(W);return t?e.slice(t[0].length).trim():e.trim()}function xe(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 G(e){let t=e.description?.trim();if(t)return t;let n=e.content?.trim();if(!n)return``;let r=n.match(W);if(r){let e=ye(r[1]);if(e)return e}return xe(be(n))}var Se=`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`,Ce={agentskills:{labelKey:d.SETTINGS$SKILLS_TYPE_AGENTSKILLS},knowledge:{labelKey:d.SETTINGS$SKILLS_TYPE_KNOWLEDGE},repo:{labelKey:d.SETTINGS$SKILLS_TYPE_REPO}};function we({type:e}){let{t}=a(`openhands`),n=Ce[e];return(0,B.jsx)(`span`,{"data-testid":`skill-type-badge-${e}`,className:Se,children:t(n.labelKey)})}var K=[`automations`,`environment`,`code-hosting`,`agent-authoring`,`code-quality`,`integrations`,`writing`,`design`,`other`],q={automations:d.SETTINGS$SKILLS_CATEGORY_AUTOMATIONS,environment:d.SETTINGS$SKILLS_CATEGORY_ENVIRONMENT,"code-hosting":d.SETTINGS$SKILLS_CATEGORY_CODE_HOSTING,"agent-authoring":d.SETTINGS$SKILLS_CATEGORY_AGENT_AUTHORING,"code-quality":d.SETTINGS$SKILLS_CATEGORY_CODE_QUALITY,integrations:d.SETTINGS$SKILLS_CATEGORY_INTEGRATIONS,writing:d.SETTINGS$SKILLS_CATEGORY_WRITING,design:d.SETTINGS$SKILLS_CATEGORY_DESIGN,other:d.SETTINGS$SKILLS_CATEGORY_OTHER},Te={automations:g,environment:v,"code-hosting":m,"agent-authoring":f,"code-quality":b,integrations:_,writing:me,design:pe,other:fe},Ee=`other`,De=new Set(S);function Oe(e){let t=e.category;return t&&De.has(t)?t:Ee}function J(e,t,n){if(e)return`${e}-${t}-${n}`}function ke(e,t,n={}){let{variant:r=`card`,testIdPrefix:i}=n,a=Oe(e),o=[{id:`type-${e.type}`,node:(0,B.jsx)(we,{type:e.type})}];if(a!==`other`&&o.push({id:`category-${a}`,node:(0,B.jsx)(`span`,{"data-testid":J(i,e.name,`category`)??`skill-category-${e.name}`,className:F,children:t(q[a])})}),e.version&&o.push({id:`version-${e.version}`,node:(0,B.jsx)(`span`,{"data-testid":J(i,e.name,`version`)??`skill-version-${e.name}`,className:F,children:t(d.SETTINGS$SKILLS_VERSION,{version:e.version})})}),r===`detail`&&e.license&&o.push({id:`license-${e.license}`,node:(0,B.jsx)(`span`,{"data-testid":J(i,e.name,`license`),className:F,children:e.license})}),r===`detail`&&e.compatibility&&o.push({id:`compatibility-${e.compatibility}`,node:(0,B.jsx)(`span`,{"data-testid":J(i,e.name,`compatibility`),className:F,children:e.compatibility})}),e.disable_model_invocation&&o.push({id:`disable-model-invocation`,node:(0,B.jsxs)(`span`,{"data-testid":J(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,B.jsx)(`span`,{className:`size-1.5 rounded-full bg-[#fca5a5]`}),t(d.SETTINGS$SKILLS_DISABLE_MODEL_INVOCATION)]})}),r===`detail`&&e.allowed_tools)for(let t of e.allowed_tools)o.push({id:`allowed-tool-${t}`,node:(0,B.jsx)(`span`,{"data-testid":J(i,e.name,`tool-${t}`),className:u(F,`font-mono`),children:t})});if(r===`detail`&&e.metadata)for(let[t,n]of Object.entries(e.metadata))o.push({id:`metadata-${t}`,node:(0,B.jsxs)(`span`,{"data-testid":J(i,e.name,`metadata-${t}`),className:F,children:[(0,B.jsxs)(`span`,{className:`font-mono text-[10px] text-tertiary-light`,children:[t,`:`]}),` `,n]})});for(let t of e.triggers??[])o.push({id:`trigger-${t}`,node:(0,B.jsx)(`span`,{"data-testid":J(i,e.name,`trigger-${t}`),className:F,children:t})});return o}function Ae(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 je({skill:e,enabled:t,onOpen:n,onToggle:r}){let{t:i}=a(`openhands`),[o,s]=R.useState(!1),c=G(e),l=R.useMemo(()=>ke(e,i),[e,i]),f=Ae(e.source);return R.useEffect(()=>{if(!o)return;let e=setTimeout(()=>s(!1),2e3);return()=>clearTimeout(e)},[o]),(0,B.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:u(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,j,M),children:(0,B.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,B.jsx)(ce,{skillName:e.name}),(0,B.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,B.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,B.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,B.jsx)(`h3`,{"data-testid":`skill-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,B.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,B.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,B.jsx)(`button`,{type:`button`,"data-testid":`skill-copy-source-${e.name}`,"aria-label":i(o?d.BUTTON$COPIED:d.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,B.jsx)(k,{width:12,height:12}):(0,B.jsx)(A,{width:12,height:12})}):null]}):null]}),(0,B.jsx)(I,{testId:`skill-toggle-${e.name}`,isSelected:t,onToggle:r,disableTooltipKey:d.COMMON$DISABLE})]}),c?(0,B.jsx)(`div`,{"data-testid":`skill-description-${e.name}`,className:`min-w-0`,children:(0,B.jsx)(`p`,{className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:c})}):null,l.length>0?(0,B.jsx)(P,{pills:l,testId:`skill-triggers-${e.name}`}):null]})]})})}function Me(e){return e.name===`add-skill`?z:`/${e.name} `}function Ne({testId:e,label:t,value:n}){return(0,B.jsxs)(`label`,{className:`flex min-w-0 w-full flex-col gap-2.5`,children:[(0,B.jsx)(`span`,{className:`text-sm`,children:t}),(0,B.jsx)(`textarea`,{"data-testid":e,readOnly:!0,value:n,rows:Math.min(12,Math.max(4,n.split(`
|
|
2
|
-
`).length)),className:u(`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 Pe({skill:e,enabled:t,onToggle:n,onClose:r}){let{t:i}=a(`openhands`),o=ue(),[s,c]=R.useState(!1),l=R.useMemo(()=>Me(e),[e]),u=G(e),f=R.useMemo(()=>ke(e,i,{variant:`detail`,testIdPrefix:`skill-modal-pill`}),[e,i]),p=Ae(e.source);return R.useEffect(()=>{if(!s)return;let e=setTimeout(()=>c(!1),2e3);return()=>clearTimeout(e)},[s]),(0,B.jsx)(C,{onClose:r,"aria-label":e.name,children:(0,B.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,B.jsx)(O,{onClose:r,testId:`skill-detail-modal-close`}),(0,B.jsxs)(`div`,{className:`flex items-start gap-3 pr-6`,children:[(0,B.jsx)(ce,{skillName:e.name}),(0,B.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,B.jsx)(`h2`,{"data-testid":`skill-modal-name-${e.name}`,className:E,children:e.name}),e.source?(0,B.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,B.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,B.jsx)(`button`,{type:`button`,"data-testid":`skill-modal-copy-source-${e.name}`,"aria-label":i(s?d.BUTTON$COPIED:d.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,B.jsx)(k,{width:12,height:12}):(0,B.jsx)(A,{width:12,height:12})}):null]}):null]})]}),(0,B.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,B.jsx)(N,{testId:`skill-modal-toggle-${e.name}`,isToggled:t,onToggle:n,togglePosition:`right`,children:i(t?d.SETTINGS$SKILLS_ENABLED:d.SETTINGS$SKILLS_DISABLED)})}),u?(0,B.jsx)(`p`,{"data-testid":`skill-modal-description-${e.name}`,className:`text-xs text-tertiary-light`,children:u}):null,f.length>0?(0,B.jsx)(P,{pills:f,testId:`skill-modal-pills-${e.name}`}):null,e.content?(0,B.jsx)(Ne,{testId:`skill-modal-field-content-${e.name}`,label:i(d.SETTINGS$SKILLS_CONTENT),value:e.content}):null,(0,B.jsxs)(`div`,{className:`mt-2 flex justify-end gap-2`,children:[(0,B.jsx)(D,{type:`button`,variant:`secondary`,onClick:r,testId:`skill-detail-close`,children:i(d.BUTTON$CLOSE)}),(0,B.jsx)(D,{type:`button`,variant:`primary`,isDisabled:!t,onClick:()=>o(l,r),testId:`skill-detail-use-skill-${e.name}`,startContent:(0,B.jsx)(le,{className:`size-4`,"aria-hidden":!0}),children:i(d.SETTINGS$SKILLS_USE_SKILL_BUTTON)})]})]})})}function Fe({labelKey:e,count:t,checked:n,disabled:r,icon:i,testId:o,onToggle:s}){let{t:c}=a(`openhands`),l=c(e);return(0,B.jsxs)(`button`,{type:`button`,role:`checkbox`,"aria-checked":n,"data-testid":o,disabled:r,onClick:s,className:u(`flex w-full items-center gap-2 rounded-md px-1.5 py-1 text-left text-sm`,r?`cursor-default text-tertiary-alt/40`:`cursor-pointer hover:bg-[var(--oh-surface-raised)] hover:text-white`,n?`text-white`:`text-tertiary-light`),children:[(0,B.jsx)(`span`,{"aria-hidden":!0,className:u(`flex size-3.5 shrink-0 items-center justify-center rounded-[3px] border`,n?`border-white bg-white text-black`:`border-[var(--oh-border)]`),children:n?(0,B.jsx)(p,{className:`size-2.5`,strokeWidth:3}):null}),i?(0,B.jsx)(i,{className:`size-3.5 shrink-0`,"aria-hidden":!0}):null,(0,B.jsx)(`span`,{title:l,className:`min-w-0 flex-1 truncate`,children:l}),(0,B.jsx)(`span`,{className:`shrink-0 text-xs text-tertiary-alt`,children:t})]})}function Ie(e,t){if(e===`category`)return Te[t]}function Le({groups:e,onToggle:t,className:n}){let{t:r}=a(`openhands`);return e.length===0?null:(0,B.jsx)(`div`,{"data-testid":`skill-facet-rail`,className:u(`flex min-w-0 flex-col gap-5`,n),children:e.map(e=>{let n=`skill-facet-group-${e.id}-title`;return(0,B.jsxs)(`div`,{"data-testid":`skill-facet-group-${e.id}`,role:`group`,"aria-labelledby":n,className:`flex flex-col gap-1.5`,children:[(0,B.jsx)(`span`,{id:n,className:`px-1 text-[11px] font-semibold uppercase tracking-wider text-tertiary-alt`,children:r(e.labelKey)}),e.rows.map(n=>(0,B.jsx)(Fe,{testId:`skill-facet-${e.id}-${n.value}`,labelKey:n.labelKey,count:n.count,checked:n.checked,disabled:n.disabled,icon:Ie(e.id,n.value),onToggle:()=>t(e.id,n.value)},n.value))]},e.id)})})}function Re({groups:e,activeCount:t,onToggle:n,onClearAll:r,onClose:i}){let{t:o}=a(`openhands`);return(0,B.jsx)(C,{onClose:i,"aria-label":o(d.SETTINGS$SKILLS_FILTERS_MODAL_TITLE),children:(0,B.jsxs)(w,{testID:`skill-filters-modal`,className:u(`items-stretch`,T),children:[(0,B.jsx)(`h3`,{className:`text-lg font-semibold text-foreground`,children:o(d.SETTINGS$SKILLS_FILTERS_MODAL_TITLE)}),(0,B.jsx)(`div`,{className:`max-h-[60vh] overflow-y-auto custom-scrollbar-always`,children:(0,B.jsx)(Le,{groups:e,onToggle:n})}),(0,B.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[t>0?(0,B.jsx)(D,{type:`button`,variant:`secondary`,testId:`skill-filters-modal-clear`,onClick:r,children:o(d.SETTINGS$SKILLS_CLEAR_FILTERS)}):null,(0,B.jsx)(D,{type:`button`,variant:`primary`,testId:`skill-filters-modal-done`,onClick:i,children:o(d.BUTTON$CLOSE)})]})]})})}var ze=`source`,Be=`category`,Ve=`type`,He=`state`,Ue=[`enabled`,`disabled`],We=[`agentskills`,`knowledge`,`repo`],Ge={query:``,sources:new Set,categories:new Set,types:new Set,states:new Set};function Y(e,t){return e.map(e=>({value:e,labelKey:t[e]}))}function X(e,t){return new Set(e.filter(e=>t.has(e)))}var Ke={project:d.SETTINGS$SKILLS_SOURCE_PROJECT,personal:d.SETTINGS$SKILLS_SOURCE_PERSONAL,public:d.SETTINGS$SKILLS_SOURCE_PUBLIC},qe={agentskills:d.SETTINGS$SKILLS_TYPE_AGENTSKILLS,knowledge:d.SETTINGS$SKILLS_TYPE_KNOWLEDGE,repo:d.SETTINGS$SKILLS_TYPE_REPO},Je={enabled:d.SETTINGS$SKILLS_ENABLED,disabled:d.SETTINGS$SKILLS_DISABLED},Z=[{id:`state`,labelKey:d.SETTINGS$SKILLS_FACET_STATE,param:He,values:Y(Ue,Je),valueOf:(e,t)=>t.has(e.name)?`disabled`:`enabled`,selected:e=>e.states,withSelected:(e,t)=>({...e,states:X(Ue,t)})},{id:`source`,labelKey:d.SETTINGS$SKILLS_FACET_SOURCE,param:ze,values:Y(oe,Ke),valueOf:e=>L(e),selected:e=>e.sources,withSelected:(e,t)=>({...e,sources:X(oe,t)})},{id:`category`,labelKey:d.SETTINGS$SKILLS_FACET_CATEGORY,param:Be,values:Y(K,q),valueOf:e=>Oe(e),selected:e=>e.categories,withSelected:(e,t)=>({...e,categories:X(K,t)})},{id:`type`,labelKey:d.SETTINGS$SKILLS_FACET_TYPE,param:Ve,values:Y(We,qe),valueOf:e=>e.type,selected:e=>e.types,withSelected:(e,t)=>({...e,types:X(We,t)})}];function Ye(e){let t=Z.find(t=>t.id===e);if(!t)throw Error(`Unknown skill facet group: ${e}`);return t}function Xe(e,t){let n=new Set(t.values.map(({value:e})=>e));return new Set(e.map(e=>e.trim()).filter(e=>n.has(e)))}function Ze(e){return Z.reduce((t,n)=>n.withSelected(t,Xe(e.getAll(n.param),n)),{...Ge,query:e.get(`q`)??``})}function Q(e){let t=new URLSearchParams;e.query&&t.set(`q`,e.query);for(let n of Z){let r=n.selected(e);for(let{value:e}of n.values)r.has(e)&&t.append(n.param,e)}return t}function Qe(e,t){let n=t.trim();if(!n)return!0;let r=[e.name,G(e),e.description??``,e.content??``,e.license??``,e.compatibility??``,...e.triggers??[],...e.allowed_tools??[]],i=n.toLowerCase();return r.some(e=>e.toLowerCase().includes(i))}function $e(e,t,n,r){return Z.every(i=>{if(i.id===r)return!0;let a=i.selected(n);return a.size===0?!0:a.has(i.valueOf(e,t))})}function et(e,t,n){return e.filter(e=>Qe(e,n.query)&&$e(e,t,n))}function $(e,t,n){let r={};for(let i of e){let e=t.valueOf(i,n);r[e]=(r[e]??0)+1}return r}function tt(e,t,n,r,i){let a=$(t,e,r),o=e.values.filter(({value:e})=>(a[e]??0)>0),s=e.selected(i);if(o.length<2&&s.size===0)return null;let c=e.values.filter(({value:e})=>(a[e]??0)>0||s.has(e)),l=$(n.filter(t=>$e(t,r,i,e.id)),e,r);return{id:e.id,labelKey:e.labelKey,rows:c.map(({value:e,labelKey:t})=>{let n=l[e]??0,r=s.has(e);return{value:e,labelKey:t,count:n,checked:r,disabled:n===0&&!r}})}}function nt(e,t,n){let r=e.filter(e=>Qe(e,n.query));return Z.map(i=>tt(i,e,r,t,n)).filter(e=>e!==null)}function rt(e,t,n){let r=Ye(t);if(!r.values.some(e=>e.value===n))return e;let i=new Set(r.selected(e));return i.has(n)?i.delete(n):i.add(n),r.withSelected(e,i)}function it(e){return{...Ge,query:e.query}}function at(e){return Z.reduce((t,n)=>t+n.selected(e).size,0)}function ot({search:e,onSearchChange:t,activeFilterCount:n,onOpenFilters:r}){let{t:i}=a(`openhands`);return(0,B.jsxs)(`div`,{"data-testid":`skills-toolbar`,className:`flex items-stretch gap-2`,children:[(0,B.jsxs)(`div`,{className:u(`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,B.jsx)(y,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,B.jsx)(`input`,{"data-testid":`skills-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:i(d.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),"aria-label":i(d.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),className:u(`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,B.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":i(d.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,B.jsx)(x,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,B.jsxs)(`button`,{type:`button`,"data-testid":`skills-filters-button`,onClick:r,className:u(`flex shrink-0 items-center gap-2 rounded-lg px-3 py-2 text-sm md:hidden`,`border border-[var(--oh-border)] bg-base-secondary text-white`,`cursor-pointer hover:bg-[var(--oh-interactive-hover)]`),children:[(0,B.jsx)(h,{className:`size-4 shrink-0`,"aria-hidden":!0}),i(d.SETTINGS$SKILLS_FILTERS_BUTTON),n>0?(0,B.jsx)(`span`,{className:`rounded-full bg-white px-1.5 text-[11px] font-medium text-black`,children:n}):null]})]})}var st=300;function ct(){let{t:e}=a(`openhands`),{mutate:t}=te(),{data:n,isLoading:i}=ee(),{data:o,isLoading:s}=ae(),[f,p]=r(),[m,h]=R.useState(()=>f.get(`q`)??``),g=R.useRef(m),[_,v]=R.useState(new Set),[y,b]=R.useState(!1),[x,S]=R.useState(null),[C,w]=R.useState(!1),[T,E]=R.useState(!1),O=i||s||!n,k=o??[],A=R.useMemo(()=>({...Ze(f),query:m}),[f,m]),j=R.useMemo(()=>nt(k,_,A),[k,_,A]),M=R.useMemo(()=>et(k,_,A),[k,_,A]),N=at(A);R.useEffect(()=>{i||!n||(v(new Set(n.disabled_skills??[])),b(!0))},[i,n?.disabled_skills]),R.useEffect(()=>{y&&t({disabled_skills:Array.from(_)},{onError:t=>{c(l(t)||e(d.ERROR$GENERIC))}})},[_,y,t,e]),R.useEffect(()=>{let e=f.get(`q`)??``;e!==g.current&&(g.current=e,h(e))},[f]),R.useEffect(()=>{if((f.get(`q`)??``)===m)return;let e=setTimeout(()=>{g.current=m,p(e=>{let t=new URLSearchParams(e);return m?t.set(`q`,m):t.delete(`q`),t},{replace:!0})},st);return()=>clearTimeout(e)},[m,f,p]);let P=e=>{e.query!==A.query&&h(e.query),Q({...e,query:``}).toString()!==Q({...A,query:``}).toString()&&p(Q(e))},F=(e,t)=>P(rt(A,e,t)),I=()=>P(it(A)),L=(e,t)=>{v(n=>{let r=new Set(n);return t?r.delete(e):r.add(e),r})};return(0,B.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,B.jsx)(se,{}),(0,B.jsxs)(`main`,{className:u(de,`h-full`),children:[(0,B.jsxs)(`div`,{"data-testid":`skills-page`,className:`mx-auto flex w-full min-w-0 max-w-[1100px] flex-col gap-6`,children:[(0,B.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,B.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,B.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(d.SETTINGS$SKILLS_TITLE)}),(0,B.jsx)(`div`,{"data-testid":`skills-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(d.SETTINGS$SKILLS_PAGE_DESCRIPTION)})]}),(0,B.jsx)(D,{type:`button`,variant:`secondary`,testId:`skills-add-skill-button`,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>w(!0),children:e(d.SETTINGS$SKILLS_ADD_BUTTON)})]}),O?(0,B.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,B.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}):null,!O&&k.length===0?(0,B.jsx)(`div`,{"data-testid":`skills-empty`,className:re,children:(0,B.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(d.SETTINGS$SKILLS_NO_SKILLS)})}):null,!O&&k.length>0?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(ot,{search:A.query,onSearchChange:e=>P({...A,query:e}),activeFilterCount:N,onOpenFilters:()=>E(!0)}),(0,B.jsxs)(`div`,{className:`flex min-w-0 gap-6`,children:[(0,B.jsx)(Le,{groups:j,onToggle:F,className:`hidden w-[240px] shrink-0 self-start md:flex`}),(0,B.jsxs)(`section`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-xs text-tertiary-light`,children:[(0,B.jsx)(`span`,{"data-testid":`skills-result-summary`,children:e(d.SETTINGS$SKILLS_RESULT_COUNT,{count:M.length})}),N>0?(0,B.jsx)(`button`,{type:`button`,"data-testid":`skills-clear-filters`,onClick:I,className:`cursor-pointer underline hover:text-white`,children:e(d.SETTINGS$SKILLS_CLEAR_FILTERS)}):null]}),M.length===0?(0,B.jsx)(`div`,{"data-testid":`skills-no-match`,className:re,children:(0,B.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(d.SETTINGS$SKILLS_NO_MATCH)})}):(0,B.jsx)(`div`,{className:u(ne),children:(0,B.jsx)(`div`,{className:ie,children:M.map(e=>(0,B.jsx)(je,{skill:e,enabled:!_.has(e.name),onOpen:()=>S(e),onToggle:t=>L(e.name,t)},e.name))})})]})]}),T?(0,B.jsx)(Re,{groups:j,activeCount:N,onToggle:F,onClearAll:I,onClose:()=>E(!1)}):null]}):null]}),x&&(0,B.jsx)(Pe,{skill:x,enabled:!_.has(x.name),onToggle:e=>L(x.name,e),onClose:()=>S(null)}),C&&(0,B.jsx)(ve,{onClose:()=>w(!1)})]})]})}var lt=i(ct);export{lt as default};
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{H as r,U as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ox0jfsa0-cHFhpUBq.js";import{t as a}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{D as o}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";import{t as s}from"./vendor~root-layout~conversation-panel~conversation~skills-settings~automations-list~shared-~bovqqk8e-e8pX05xf.js";import{Ft as c,jt as l}from"./active-backend-context-BZDG15C0.js";import{t as u,z as d}from"./utils-DUD5ScdA.js";import{t as f}from"./bot-CGPCg03p.js";import{t as p}from"./check-DSuS-lyr.js";import{a as m,i as h,n as g,r as _,t as v}from"./wrench-C95ujnYo.js";import{t as y}from"./search-CYSDBczG.js";import{t as b}from"./shield-check-CiOTXxV2.js";import{t as x}from"./x-86ZCfxKY.js";import{n as S}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~jz4f6vo2-C0JXQb_q.js";import{n as ee}from"./use-settings-C6ZxpBDX.js";import{t as te}from"./use-save-settings-BahvC2Gw.js";import{t as C}from"./modal-backdrop-BSzNhM4r.js";import{n as w,t as T}from"./modal-body-BdKfD3Hl.js";import{n as E}from"./modal-classes-D5_b5vMi.js";import{t as D}from"./brand-button-Blxv5nww.js";import{t as O}from"./modal-close-button-objukxk_.js";import{t as k}from"./checkmark-XZyokq_Y.js";import{t as A}from"./copy-Drmhc2jD.js";import{a as j,n as ne,o as re,r as M,t as ie}from"./extension-module-card-classes-Bo43vY5V.js";import{t as N}from"./settings-switch-Dk9hChx1.js";import{n as P,t as F}from"./skill-card-pill-row-dGIUzr_b.js";import{n as I}from"./circle-plus-check-toggle-ASbpB8vN.js";import{i as ae,n as L,t as oe}from"./skill-scope-DWN1PBPH.js";import{n as se}from"./extensions-navigation-C4sgZg-y.js";import{t as ce}from"./skill-icon-badge-kkOWZ89w.js";import{n as le,t as ue}from"./use-launch-skill-in-chat-COnDpxCQ.js";import{n as de}from"./settings-like-page-layout-classes-Cw4Yzv_P.js";var fe=o(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),pe=o(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),me=o(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),R=e(t(),1),he=`https://docs.openhands.dev/overview/skills/adding#adding-new-skills`,z=`/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview`,B=n(),ge=[d.SETTINGS$SKILLS_ADD_MODAL_STEP_1,d.SETTINGS$SKILLS_ADD_MODAL_STEP_2,d.SETTINGS$SKILLS_ADD_MODAL_STEP_3,d.SETTINGS$SKILLS_ADD_MODAL_STEP_4,d.SETTINGS$SKILLS_ADD_MODAL_STEP_5],V={cmd:(0,B.jsx)(H,{}),path:(0,B.jsx)(H,{}),env:(0,B.jsx)(H,{})};function H({children:e}){return(0,B.jsx)(`code`,{className:u(`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 _e(){let{t:e}=a(`openhands`),[t,n]=R.useState(!1);return R.useEffect(()=>{if(!t)return;let e=setTimeout(()=>n(!1),2e3);return()=>clearTimeout(e)},[t]),(0,B.jsxs)(`div`,{className:`relative`,children:[(0,B.jsx)(`pre`,{"data-testid":`add-skill-modal-example`,className:u(`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:z}),(0,B.jsx)(`button`,{type:`button`,"data-testid":`add-skill-modal-example-copy`,"aria-label":e(t?d.BUTTON$COPIED:d.BUTTON$COPY),disabled:t,onClick:async()=>{await navigator.clipboard.writeText(z),n(!0)},className:u(`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,B.jsx)(k,{width:14,height:14}):(0,B.jsx)(A,{width:14,height:14})})]})}function U({i18nKey:e}){return(0,B.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:(0,B.jsx)(s,{ns:`openhands`,i18nKey:e,components:V})})}function ve({onClose:e}){let{t}=a(`openhands`);return(0,B.jsx)(C,{onClose:e,"aria-label":t(d.SETTINGS$SKILLS_ADD_MODAL_TITLE),children:(0,B.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,B.jsx)(O,{onClose:e,testId:`add-skill-modal-close`}),(0,B.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,B.jsx)(`h2`,{className:u(`pr-6`,E),children:t(d.SETTINGS$SKILLS_ADD_MODAL_TITLE)}),(0,B.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:t(d.SETTINGS$SKILLS_ADD_MODAL_INTRO)})]}),(0,B.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,B.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,B.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(d.SETTINGS$SKILLS_ADD_MODAL_CHAT_TITLE)}),(0,B.jsx)(U,{i18nKey:d.SETTINGS$SKILLS_ADD_MODAL_CHAT_BODY}),(0,B.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:t(d.SETTINGS$SKILLS_ADD_MODAL_EXAMPLE_LABEL)}),(0,B.jsx)(_e,{}),(0,B.jsx)(`ol`,{className:`list-decimal space-y-1 pl-4 text-xs leading-relaxed text-tertiary-light`,children:ge.map(e=>(0,B.jsx)(`li`,{children:e===d.SETTINGS$SKILLS_ADD_MODAL_STEP_3?(0,B.jsx)(s,{ns:`openhands`,i18nKey:e,components:V}):t(e)},e))})]}),(0,B.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(d.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS_TITLE)}),(0,B.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:t(d.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS)})]}),(0,B.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,B.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(d.SETTINGS$SKILLS_ADD_MODAL_STORAGE_TITLE)}),(0,B.jsx)(U,{i18nKey:d.SETTINGS$SKILLS_ADD_MODAL_STORAGE_BODY})]}),(0,B.jsx)(U,{i18nKey:d.SETTINGS$SKILLS_ADD_MODAL_PRIVATE_REPOS}),(0,B.jsx)(`a`,{href:he,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(d.SETTINGS$SKILLS_ADD_MODAL_VIEW_DOCS)})]}),(0,B.jsx)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:(0,B.jsx)(D,{type:`button`,variant:`secondary`,onClick:e,testId:`add-skill-modal-dismiss`,children:t(d.BUTTON$CLOSE)})})]})})}var W=/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;function ye(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 be(e){let t=e.match(W);return t?e.slice(t[0].length).trim():e.trim()}function xe(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 G(e){let t=e.description?.trim();if(t)return t;let n=e.content?.trim();if(!n)return``;let r=n.match(W);if(r){let e=ye(r[1]);if(e)return e}return xe(be(n))}var Se=`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`,Ce={agentskills:{labelKey:d.SETTINGS$SKILLS_TYPE_AGENTSKILLS},knowledge:{labelKey:d.SETTINGS$SKILLS_TYPE_KNOWLEDGE},repo:{labelKey:d.SETTINGS$SKILLS_TYPE_REPO}};function we({type:e}){let{t}=a(`openhands`),n=Ce[e];return(0,B.jsx)(`span`,{"data-testid":`skill-type-badge-${e}`,className:Se,children:t(n.labelKey)})}var K=[`automations`,`environment`,`code-hosting`,`agent-authoring`,`code-quality`,`integrations`,`writing`,`design`,`other`],q={automations:d.SETTINGS$SKILLS_CATEGORY_AUTOMATIONS,environment:d.SETTINGS$SKILLS_CATEGORY_ENVIRONMENT,"code-hosting":d.SETTINGS$SKILLS_CATEGORY_CODE_HOSTING,"agent-authoring":d.SETTINGS$SKILLS_CATEGORY_AGENT_AUTHORING,"code-quality":d.SETTINGS$SKILLS_CATEGORY_CODE_QUALITY,integrations:d.SETTINGS$SKILLS_CATEGORY_INTEGRATIONS,writing:d.SETTINGS$SKILLS_CATEGORY_WRITING,design:d.SETTINGS$SKILLS_CATEGORY_DESIGN,other:d.SETTINGS$SKILLS_CATEGORY_OTHER},Te={automations:g,environment:v,"code-hosting":m,"agent-authoring":f,"code-quality":b,integrations:_,writing:me,design:pe,other:fe},Ee=`other`,De=new Set(S);function Oe(e){let t=e.category;return t&&De.has(t)?t:Ee}function J(e,t,n){if(e)return`${e}-${t}-${n}`}function ke(e,t,n={}){let{variant:r=`card`,testIdPrefix:i}=n,a=Oe(e),o=[{id:`type-${e.type}`,node:(0,B.jsx)(we,{type:e.type})}];if(a!==`other`&&o.push({id:`category-${a}`,node:(0,B.jsx)(`span`,{"data-testid":J(i,e.name,`category`)??`skill-category-${e.name}`,className:F,children:t(q[a])})}),e.version&&o.push({id:`version-${e.version}`,node:(0,B.jsx)(`span`,{"data-testid":J(i,e.name,`version`)??`skill-version-${e.name}`,className:F,children:t(d.SETTINGS$SKILLS_VERSION,{version:e.version})})}),r===`detail`&&e.license&&o.push({id:`license-${e.license}`,node:(0,B.jsx)(`span`,{"data-testid":J(i,e.name,`license`),className:F,children:e.license})}),r===`detail`&&e.compatibility&&o.push({id:`compatibility-${e.compatibility}`,node:(0,B.jsx)(`span`,{"data-testid":J(i,e.name,`compatibility`),className:F,children:e.compatibility})}),e.disable_model_invocation&&o.push({id:`disable-model-invocation`,node:(0,B.jsxs)(`span`,{"data-testid":J(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,B.jsx)(`span`,{className:`size-1.5 rounded-full bg-[#fca5a5]`}),t(d.SETTINGS$SKILLS_DISABLE_MODEL_INVOCATION)]})}),r===`detail`&&e.allowed_tools)for(let t of e.allowed_tools)o.push({id:`allowed-tool-${t}`,node:(0,B.jsx)(`span`,{"data-testid":J(i,e.name,`tool-${t}`),className:u(F,`font-mono`),children:t})});if(r===`detail`&&e.metadata)for(let[t,n]of Object.entries(e.metadata))o.push({id:`metadata-${t}`,node:(0,B.jsxs)(`span`,{"data-testid":J(i,e.name,`metadata-${t}`),className:F,children:[(0,B.jsxs)(`span`,{className:`font-mono text-[10px] text-tertiary-light`,children:[t,`:`]}),` `,n]})});for(let t of e.triggers??[])o.push({id:`trigger-${t}`,node:(0,B.jsx)(`span`,{"data-testid":J(i,e.name,`trigger-${t}`),className:F,children:t})});return o}function Ae(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 je({skill:e,enabled:t,onOpen:n,onToggle:r}){let{t:i}=a(`openhands`),[o,s]=R.useState(!1),c=G(e),l=R.useMemo(()=>ke(e,i),[e,i]),f=Ae(e.source);return R.useEffect(()=>{if(!o)return;let e=setTimeout(()=>s(!1),2e3);return()=>clearTimeout(e)},[o]),(0,B.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:u(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,j,M),children:(0,B.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,B.jsx)(ce,{skillName:e.name}),(0,B.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,B.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,B.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,B.jsx)(`h3`,{"data-testid":`skill-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,B.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,B.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,B.jsx)(`button`,{type:`button`,"data-testid":`skill-copy-source-${e.name}`,"aria-label":i(o?d.BUTTON$COPIED:d.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,B.jsx)(k,{width:12,height:12}):(0,B.jsx)(A,{width:12,height:12})}):null]}):null]}),(0,B.jsx)(I,{testId:`skill-toggle-${e.name}`,isSelected:t,onToggle:r,disableTooltipKey:d.COMMON$DISABLE})]}),c?(0,B.jsx)(`div`,{"data-testid":`skill-description-${e.name}`,className:`min-w-0`,children:(0,B.jsx)(`p`,{className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:c})}):null,l.length>0?(0,B.jsx)(P,{pills:l,testId:`skill-triggers-${e.name}`}):null]})]})})}function Me(e){return e.name===`add-skill`?z:`/${e.name} `}function Ne({testId:e,label:t,value:n}){return(0,B.jsxs)(`label`,{className:`flex min-w-0 w-full flex-col gap-2.5`,children:[(0,B.jsx)(`span`,{className:`text-sm`,children:t}),(0,B.jsx)(`textarea`,{"data-testid":e,readOnly:!0,value:n,rows:Math.min(12,Math.max(4,n.split(`
|
|
2
|
+
`).length)),className:u(`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 Pe({skill:e,enabled:t,onToggle:n,onClose:r}){let{t:i}=a(`openhands`),o=ue(),[s,c]=R.useState(!1),l=R.useMemo(()=>Me(e),[e]),u=G(e),f=R.useMemo(()=>ke(e,i,{variant:`detail`,testIdPrefix:`skill-modal-pill`}),[e,i]),p=Ae(e.source);return R.useEffect(()=>{if(!s)return;let e=setTimeout(()=>c(!1),2e3);return()=>clearTimeout(e)},[s]),(0,B.jsx)(C,{onClose:r,"aria-label":e.name,children:(0,B.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,B.jsx)(O,{onClose:r,testId:`skill-detail-modal-close`}),(0,B.jsxs)(`div`,{className:`flex items-start gap-3 pr-6`,children:[(0,B.jsx)(ce,{skillName:e.name}),(0,B.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,B.jsx)(`h2`,{"data-testid":`skill-modal-name-${e.name}`,className:E,children:e.name}),e.source?(0,B.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,B.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,B.jsx)(`button`,{type:`button`,"data-testid":`skill-modal-copy-source-${e.name}`,"aria-label":i(s?d.BUTTON$COPIED:d.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,B.jsx)(k,{width:12,height:12}):(0,B.jsx)(A,{width:12,height:12})}):null]}):null]})]}),(0,B.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,B.jsx)(N,{testId:`skill-modal-toggle-${e.name}`,isToggled:t,onToggle:n,togglePosition:`right`,children:i(t?d.SETTINGS$SKILLS_ENABLED:d.SETTINGS$SKILLS_DISABLED)})}),u?(0,B.jsx)(`p`,{"data-testid":`skill-modal-description-${e.name}`,className:`text-xs text-tertiary-light`,children:u}):null,f.length>0?(0,B.jsx)(P,{pills:f,testId:`skill-modal-pills-${e.name}`}):null,e.content?(0,B.jsx)(Ne,{testId:`skill-modal-field-content-${e.name}`,label:i(d.SETTINGS$SKILLS_CONTENT),value:e.content}):null,(0,B.jsxs)(`div`,{className:`mt-2 flex justify-end gap-2`,children:[(0,B.jsx)(D,{type:`button`,variant:`secondary`,onClick:r,testId:`skill-detail-close`,children:i(d.BUTTON$CLOSE)}),(0,B.jsx)(D,{type:`button`,variant:`primary`,isDisabled:!t,onClick:()=>o(l,r),testId:`skill-detail-use-skill-${e.name}`,startContent:(0,B.jsx)(le,{className:`size-4`,"aria-hidden":!0}),children:i(d.SETTINGS$SKILLS_USE_SKILL_BUTTON)})]})]})})}function Fe({labelKey:e,count:t,checked:n,disabled:r,icon:i,testId:o,onToggle:s}){let{t:c}=a(`openhands`),l=c(e);return(0,B.jsxs)(`button`,{type:`button`,role:`checkbox`,"aria-checked":n,"data-testid":o,disabled:r,onClick:s,className:u(`flex w-full items-center gap-2 rounded-md px-1.5 py-1 text-left text-sm`,r?`cursor-default text-tertiary-alt/40`:`cursor-pointer hover:bg-[var(--oh-surface-raised)] hover:text-white`,n?`text-white`:`text-tertiary-light`),children:[(0,B.jsx)(`span`,{"aria-hidden":!0,className:u(`flex size-3.5 shrink-0 items-center justify-center rounded-[3px] border`,n?`border-white bg-white text-black`:`border-[var(--oh-border)]`),children:n?(0,B.jsx)(p,{className:`size-2.5`,strokeWidth:3}):null}),i?(0,B.jsx)(i,{className:`size-3.5 shrink-0`,"aria-hidden":!0}):null,(0,B.jsx)(`span`,{title:l,className:`min-w-0 flex-1 truncate`,children:l}),(0,B.jsx)(`span`,{className:`shrink-0 text-xs text-tertiary-alt`,children:t})]})}function Ie(e,t){if(e===`category`)return Te[t]}function Le({groups:e,onToggle:t,className:n}){let{t:r}=a(`openhands`);return e.length===0?null:(0,B.jsx)(`div`,{"data-testid":`skill-facet-rail`,className:u(`flex min-w-0 flex-col gap-5`,n),children:e.map(e=>{let n=`skill-facet-group-${e.id}-title`;return(0,B.jsxs)(`div`,{"data-testid":`skill-facet-group-${e.id}`,role:`group`,"aria-labelledby":n,className:`flex flex-col gap-1.5`,children:[(0,B.jsx)(`span`,{id:n,className:`px-1 text-[11px] font-semibold uppercase tracking-wider text-tertiary-alt`,children:r(e.labelKey)}),e.rows.map(n=>(0,B.jsx)(Fe,{testId:`skill-facet-${e.id}-${n.value}`,labelKey:n.labelKey,count:n.count,checked:n.checked,disabled:n.disabled,icon:Ie(e.id,n.value),onToggle:()=>t(e.id,n.value)},n.value))]},e.id)})})}function Re({groups:e,activeCount:t,onToggle:n,onClearAll:r,onClose:i}){let{t:o}=a(`openhands`);return(0,B.jsx)(C,{onClose:i,"aria-label":o(d.SETTINGS$SKILLS_FILTERS_MODAL_TITLE),children:(0,B.jsxs)(w,{testID:`skill-filters-modal`,className:u(`items-stretch`,T),children:[(0,B.jsx)(`h3`,{className:`text-lg font-semibold text-foreground`,children:o(d.SETTINGS$SKILLS_FILTERS_MODAL_TITLE)}),(0,B.jsx)(`div`,{className:`max-h-[60vh] overflow-y-auto custom-scrollbar-always`,children:(0,B.jsx)(Le,{groups:e,onToggle:n})}),(0,B.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[t>0?(0,B.jsx)(D,{type:`button`,variant:`secondary`,testId:`skill-filters-modal-clear`,onClick:r,children:o(d.SETTINGS$SKILLS_CLEAR_FILTERS)}):null,(0,B.jsx)(D,{type:`button`,variant:`primary`,testId:`skill-filters-modal-done`,onClick:i,children:o(d.BUTTON$CLOSE)})]})]})})}var ze=`source`,Be=`category`,Ve=`type`,He=`state`,Ue=[`enabled`,`disabled`],We=[`agentskills`,`knowledge`,`repo`],Ge={query:``,sources:new Set,categories:new Set,types:new Set,states:new Set};function Y(e,t){return e.map(e=>({value:e,labelKey:t[e]}))}function X(e,t){return new Set(e.filter(e=>t.has(e)))}var Ke={project:d.SETTINGS$SKILLS_SOURCE_PROJECT,personal:d.SETTINGS$SKILLS_SOURCE_PERSONAL,public:d.SETTINGS$SKILLS_SOURCE_PUBLIC},qe={agentskills:d.SETTINGS$SKILLS_TYPE_AGENTSKILLS,knowledge:d.SETTINGS$SKILLS_TYPE_KNOWLEDGE,repo:d.SETTINGS$SKILLS_TYPE_REPO},Je={enabled:d.SETTINGS$SKILLS_ENABLED,disabled:d.SETTINGS$SKILLS_DISABLED},Z=[{id:`state`,labelKey:d.SETTINGS$SKILLS_FACET_STATE,param:He,values:Y(Ue,Je),valueOf:(e,t)=>t.has(e.name)?`disabled`:`enabled`,selected:e=>e.states,withSelected:(e,t)=>({...e,states:X(Ue,t)})},{id:`source`,labelKey:d.SETTINGS$SKILLS_FACET_SOURCE,param:ze,values:Y(oe,Ke),valueOf:e=>L(e),selected:e=>e.sources,withSelected:(e,t)=>({...e,sources:X(oe,t)})},{id:`category`,labelKey:d.SETTINGS$SKILLS_FACET_CATEGORY,param:Be,values:Y(K,q),valueOf:e=>Oe(e),selected:e=>e.categories,withSelected:(e,t)=>({...e,categories:X(K,t)})},{id:`type`,labelKey:d.SETTINGS$SKILLS_FACET_TYPE,param:Ve,values:Y(We,qe),valueOf:e=>e.type,selected:e=>e.types,withSelected:(e,t)=>({...e,types:X(We,t)})}];function Ye(e){let t=Z.find(t=>t.id===e);if(!t)throw Error(`Unknown skill facet group: ${e}`);return t}function Xe(e,t){let n=new Set(t.values.map(({value:e})=>e));return new Set(e.map(e=>e.trim()).filter(e=>n.has(e)))}function Ze(e){return Z.reduce((t,n)=>n.withSelected(t,Xe(e.getAll(n.param),n)),{...Ge,query:e.get(`q`)??``})}function Q(e){let t=new URLSearchParams;e.query&&t.set(`q`,e.query);for(let n of Z){let r=n.selected(e);for(let{value:e}of n.values)r.has(e)&&t.append(n.param,e)}return t}function Qe(e,t){let n=t.trim();if(!n)return!0;let r=[e.name,G(e),e.description??``,e.content??``,e.license??``,e.compatibility??``,...e.triggers??[],...e.allowed_tools??[]],i=n.toLowerCase();return r.some(e=>e.toLowerCase().includes(i))}function $e(e,t,n,r){return Z.every(i=>{if(i.id===r)return!0;let a=i.selected(n);return a.size===0?!0:a.has(i.valueOf(e,t))})}function et(e,t,n){return e.filter(e=>Qe(e,n.query)&&$e(e,t,n))}function $(e,t,n){let r={};for(let i of e){let e=t.valueOf(i,n);r[e]=(r[e]??0)+1}return r}function tt(e,t,n,r,i){let a=$(t,e,r),o=e.values.filter(({value:e})=>(a[e]??0)>0),s=e.selected(i);if(o.length<2&&s.size===0)return null;let c=e.values.filter(({value:e})=>(a[e]??0)>0||s.has(e)),l=$(n.filter(t=>$e(t,r,i,e.id)),e,r);return{id:e.id,labelKey:e.labelKey,rows:c.map(({value:e,labelKey:t})=>{let n=l[e]??0,r=s.has(e);return{value:e,labelKey:t,count:n,checked:r,disabled:n===0&&!r}})}}function nt(e,t,n){let r=e.filter(e=>Qe(e,n.query));return Z.map(i=>tt(i,e,r,t,n)).filter(e=>e!==null)}function rt(e,t,n){let r=Ye(t);if(!r.values.some(e=>e.value===n))return e;let i=new Set(r.selected(e));return i.has(n)?i.delete(n):i.add(n),r.withSelected(e,i)}function it(e){return{...Ge,query:e.query}}function at(e){return Z.reduce((t,n)=>t+n.selected(e).size,0)}function ot({search:e,onSearchChange:t,activeFilterCount:n,onOpenFilters:r}){let{t:i}=a(`openhands`);return(0,B.jsxs)(`div`,{"data-testid":`skills-toolbar`,className:`flex items-stretch gap-2`,children:[(0,B.jsxs)(`div`,{className:u(`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,B.jsx)(y,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,B.jsx)(`input`,{"data-testid":`skills-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:i(d.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),"aria-label":i(d.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),className:u(`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,B.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":i(d.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,B.jsx)(x,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,B.jsxs)(`button`,{type:`button`,"data-testid":`skills-filters-button`,onClick:r,className:u(`flex shrink-0 items-center gap-2 rounded-lg px-3 py-2 text-sm md:hidden`,`border border-[var(--oh-border)] bg-base-secondary text-white`,`cursor-pointer hover:bg-[var(--oh-interactive-hover)]`),children:[(0,B.jsx)(h,{className:`size-4 shrink-0`,"aria-hidden":!0}),i(d.SETTINGS$SKILLS_FILTERS_BUTTON),n>0?(0,B.jsx)(`span`,{className:`rounded-full bg-white px-1.5 text-[11px] font-medium text-black`,children:n}):null]})]})}var st=300;function ct(){let{t:e}=a(`openhands`),{mutate:t}=te(),{data:n,isLoading:i}=ee(),{data:o,isLoading:s}=ae(),[f,p]=r(),[m,h]=R.useState(()=>f.get(`q`)??``),g=R.useRef(m),[_,v]=R.useState(new Set),[y,b]=R.useState(!1),[x,S]=R.useState(null),[C,w]=R.useState(!1),[T,E]=R.useState(!1),O=i||s||!n,k=o??[],A=R.useMemo(()=>({...Ze(f),query:m}),[f,m]),j=R.useMemo(()=>nt(k,_,A),[k,_,A]),M=R.useMemo(()=>et(k,_,A),[k,_,A]),N=at(A);R.useEffect(()=>{i||!n||(v(new Set(n.disabled_skills??[])),b(!0))},[i,n?.disabled_skills]),R.useEffect(()=>{y&&t({disabled_skills:Array.from(_)},{onError:t=>{l(c(t)||e(d.ERROR$GENERIC))}})},[_,y,t,e]),R.useEffect(()=>{let e=f.get(`q`)??``;e!==g.current&&(g.current=e,h(e))},[f]),R.useEffect(()=>{if((f.get(`q`)??``)===m)return;let e=setTimeout(()=>{g.current=m,p(e=>{let t=new URLSearchParams(e);return m?t.set(`q`,m):t.delete(`q`),t},{replace:!0})},st);return()=>clearTimeout(e)},[m,f,p]);let P=e=>{e.query!==A.query&&h(e.query),Q({...e,query:``}).toString()!==Q({...A,query:``}).toString()&&p(Q(e))},F=(e,t)=>P(rt(A,e,t)),I=()=>P(it(A)),L=(e,t)=>{v(n=>{let r=new Set(n);return t?r.delete(e):r.add(e),r})};return(0,B.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,B.jsx)(se,{}),(0,B.jsxs)(`main`,{className:u(de,`h-full`),children:[(0,B.jsxs)(`div`,{"data-testid":`skills-page`,className:`mx-auto flex w-full min-w-0 max-w-[1100px] flex-col gap-6`,children:[(0,B.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,B.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,B.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(d.SETTINGS$SKILLS_TITLE)}),(0,B.jsx)(`div`,{"data-testid":`skills-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(d.SETTINGS$SKILLS_PAGE_DESCRIPTION)})]}),(0,B.jsx)(D,{type:`button`,variant:`secondary`,testId:`skills-add-skill-button`,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>w(!0),children:e(d.SETTINGS$SKILLS_ADD_BUTTON)})]}),O?(0,B.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,B.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}):null,!O&&k.length===0?(0,B.jsx)(`div`,{"data-testid":`skills-empty`,className:re,children:(0,B.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(d.SETTINGS$SKILLS_NO_SKILLS)})}):null,!O&&k.length>0?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(ot,{search:A.query,onSearchChange:e=>P({...A,query:e}),activeFilterCount:N,onOpenFilters:()=>E(!0)}),(0,B.jsxs)(`div`,{className:`flex min-w-0 gap-6`,children:[(0,B.jsx)(Le,{groups:j,onToggle:F,className:`hidden w-[240px] shrink-0 self-start md:flex`}),(0,B.jsxs)(`section`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-xs text-tertiary-light`,children:[(0,B.jsx)(`span`,{"data-testid":`skills-result-summary`,children:e(d.SETTINGS$SKILLS_RESULT_COUNT,{count:M.length})}),N>0?(0,B.jsx)(`button`,{type:`button`,"data-testid":`skills-clear-filters`,onClick:I,className:`cursor-pointer underline hover:text-white`,children:e(d.SETTINGS$SKILLS_CLEAR_FILTERS)}):null]}),M.length===0?(0,B.jsx)(`div`,{"data-testid":`skills-no-match`,className:re,children:(0,B.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(d.SETTINGS$SKILLS_NO_MATCH)})}):(0,B.jsx)(`div`,{className:u(ne),children:(0,B.jsx)(`div`,{className:ie,children:M.map(e=>(0,B.jsx)(je,{skill:e,enabled:!_.has(e.name),onOpen:()=>S(e),onToggle:t=>L(e.name,t)},e.name))})})]})]}),T?(0,B.jsx)(Re,{groups:j,activeCount:N,onToggle:F,onClearAll:I,onClose:()=>E(!1)}):null]}):null]}),x&&(0,B.jsx)(Pe,{skill:x,enabled:!_.has(x.name),onToggle:e=>L(x.name,e),onClose:()=>S(null)}),C&&(0,B.jsx)(ve,{onClose:()=>w(!1)})]})]})}var lt=i(ct);export{lt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
1
|
+
import{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";var t=e(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]);export{t};
|
|
@@ -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-Ck5D_A2Q.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-Ck5D_A2Q.js";import{t as i}from"./utils-DUD5ScdA.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-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{t as i,z as a}from"./utils-DUD5ScdA.js";import{a as o,o as s}from"./messages-CzFKrzPG.js";import{n as c}from"./conversation-DotRfiDz.js";import{r as l}from"./typography-DB5HoCk0.js";import{t as u}from"./u-check-circle-BKn1spCL.js";import{t as d}from"./conversation-tab-empty-state-D-puECpY.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)(s,{className:`w-4 h-4 text-[#ffffff]`});case`in_progress`:return(0,p.jsx)(o,{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)(s,{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-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{E as i,t as a,z as o}from"./utils-DUD5ScdA.js";import{i as s}from"./conversation-DotRfiDz.js";import{h as c}from"./llm-not-configured-banner-BK9z5eS0.js";import{q as l,y as u}from"./markdown-renderer-Cp6DlHQN.js";import{n as d,t as f}from"./vendor~terminal-BVSbSr6V.js";import{t as p}from"./conversation-tab-empty-state-D-puECpY.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-Ck5D_A2Q.js";import{t}from"./utils-
|
|
1
|
+
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./utils-DUD5ScdA.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{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
1
|
+
import{D as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.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-Ck5D_A2Q.js";import{t}from"./utils-
|
|
1
|
+
import{yt as e}from"./vendor-styling-Ck5D_A2Q.js";import{t}from"./utils-DUD5ScdA.js";import{t as n}from"./dist-Bl64nBZL.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{t as r}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{o as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";import{t as a}from"./useQuery-Bs5NFz2s.js";import{Q as o,n as s}from"./active-backend-context-BZDG15C0.js";import{t as c,z as l}from"./utils-DUD5ScdA.js";import{r as u}from"./vendor~index-home~home~conversation-panel~conversation-53Q_U6uP.js";import{f as d}from"./git-provider-icon-CaQ1yLPi.js";import{t as f}from"./info-CLoC1LRo.js";import{t as p}from"./loader-circle-D7IagAyF.js";import{t as m}from"./refresh-cw-nmcesifB.js";import{t as h}from"./brand-button-Blxv5nww.js";import{t as g}from"./styled-tooltip-B6JXcsmL.js";import{d as _,f as v,p as y,u as b}from"./llm-not-configured-banner-BK9z5eS0.js";import{J as x,p as S}from"./markdown-renderer-Cp6DlHQN.js";import{t as C}from"./conversation-tab-empty-state-D-puECpY.js";var w=e(t(),1);function T(e=!0){let t=S(e=>e.cost),n=S(e=>e.max_budget_per_task),r=S(e=>e.usage),{data:i}=x(),{data:a}=y(i?.id,i?.conversation_url,i?.session_api_key,e);return(0,w.useMemo)(()=>t!==null||r!==null?{cost:t,max_budget_per_task:n,usage:r}:a?{cost:a.accumulated_cost,max_budget_per_task:a.max_budget_per_task,usage:a.accumulated_token_usage?{prompt_tokens:a.accumulated_token_usage.prompt_tokens??0,completion_tokens:a.accumulated_token_usage.completion_tokens??0,cache_read_tokens:a.accumulated_token_usage.cache_read_tokens??0,cache_write_tokens:a.accumulated_token_usage.cache_write_tokens??0,context_window:a.accumulated_token_usage.context_window??0,per_turn_token:a.accumulated_token_usage.per_turn_token??0}:null}:{cost:null,max_budget_per_task:null,usage:null},[a,t,n,r])}var E=n();function D({currentCost:e,maxBudget:t}){let n=e/t*100;return(0,E.jsx)(`div`,{className:`relative mt-1 h-1.5 w-full rounded-full bg-tertiary`,children:(0,E.jsx)(`div`,{className:c(`absolute inset-y-0 left-0 rounded-full transition-all duration-300`,n>80?`bg-red-500`:`bg-blue-500`),style:{width:`${Math.min(100,n)}%`}})})}function O({currentCost:e,maxBudget:t}){let{t:n}=r(`openhands`),i=e/t*100;return(0,E.jsx)(`div`,{className:`flex justify-end`,children:(0,E.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:n(l.CONVERSATION$BUDGET_USAGE_FORMAT,{currentCost:`$${e.toFixed(4)}`,maxBudget:`$${t.toFixed(4)}`,usagePercentage:i.toFixed(2),used:n(l.CONVERSATION$USED)})})})}function k({cost:e,maxBudgetPerTask:t}){let{t:n}=r(`openhands`);return e===null?null:(0,E.jsx)(`div`,{children:t!==null&&t>0?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(D,{currentCost:e,maxBudget:t}),(0,E.jsx)(O,{currentCost:e,maxBudget:t})]}):(0,E.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:n(l.CONVERSATION$NO_BUDGET_LIMIT)})})}function A({cost:e,maxBudgetPerTask:t}){let{t:n}=r(`openhands`);return e===null?null:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(k,{cost:e,maxBudgetPerTask:t}),(0,E.jsxs)(`div`,{className:`flex justify-between items-center border-t border-[var(--oh-border-subtle)] pt-2`,children:[(0,E.jsx)(`span`,{className:`font-semibold`,children:n(l.CONVERSATION$TOTAL_COST)}),(0,E.jsxs)(`span`,{className:`font-semibold`,children:[`$`,e.toFixed(4)]})]})]})}function j({label:e,value:t,labelClassName:n=``,valueClassName:r=`font-semibold`,showBorder:i=!0}){return(0,E.jsxs)(`div`,{className:c(`flex justify-between items-center pb-2`,i&&`border-b border-[var(--oh-border-subtle)]`),children:[(0,E.jsx)(`span`,{className:n,children:e}),(0,E.jsx)(`span`,{className:r,children:t})]})}function M({usage:e}){let{t}=r(`openhands`);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(j,{label:t(l.CONVERSATION$INPUT),value:e.prompt_tokens.toLocaleString()}),(0,E.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 pl-4 text-sm`,children:[(0,E.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:t(l.CONVERSATION$CACHE_HIT)}),(0,E.jsx)(`span`,{className:`text-right`,children:e.cache_read_tokens.toLocaleString()}),(0,E.jsx)(`span`,{className:`text-[var(--oh-muted)]`,children:t(l.CONVERSATION$CACHE_WRITE)}),(0,E.jsx)(`span`,{className:`text-right`,children:e.cache_write_tokens.toLocaleString()})]}),(0,E.jsx)(j,{label:t(l.CONVERSATION$OUTPUT),value:e.completion_tokens.toLocaleString()}),(0,E.jsx)(j,{label:t(l.CONVERSATION$TOTAL),value:(e.prompt_tokens+e.completion_tokens).toLocaleString(),labelClassName:`font-semibold`,valueClassName:`font-bold`,showBorder:!1})]})}function N({fillPercent:e,perTurnToken:t=0}){let{t:n}=r(`openhands`),{handleCompact:i,isCompacting:a,isDisabled:o,description:s}=_(t),c=e>70;return(0,E.jsxs)(`div`,{"data-testid":`compact-context-section`,className:`flex flex-col gap-2 border-t border-[var(--oh-border-subtle)] pt-3`,children:[c&&(0,E.jsx)(`span`,{className:`text-xs text-amber-500`,children:n(l.CONVERSATION$CONTEXT_FILLING_UP)}),(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsx)(h,{testId:`compact-context-button`,type:`button`,variant:c?`primary`:`secondary`,isDisabled:o,"aria-busy":a,onClick:i,startContent:a?(0,E.jsx)(p,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}):(0,E.jsx)(u,{className:`h-4 w-4`,"aria-hidden":!0}),className:`w-fit`,children:n(l.CONVERSATION$COMPACT_CONTEXT)}),(0,E.jsx)(g,{content:s,placement:`top`,tooltipClassName:`max-w-[220px] text-xs font-normal leading-relaxed whitespace-normal`,children:(0,E.jsx)(`button`,{type:`button`,"data-testid":`compact-context-info`,"aria-label":s,className:`flex size-5 shrink-0 items-center justify-center rounded-full text-[var(--oh-muted)] hover:text-[var(--oh-foreground)] transition-colors cursor-help`,children:(0,E.jsx)(f,{className:`size-3.5`,"aria-hidden":!0})})})]})]})}var P=`/api/llm/balance`,F=1e4;function I(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function L(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function R(e){return I(e)&&(e.name===`TimeoutError`||e.name===`AbortError`)}function z(e){return!I(e)||typeof e.provider!=`string`?null:{provider:e.provider,limit:L(e.limit),limitRemaining:L(e.limit_remaining),usage:L(e.usage)??0,usageDaily:L(e.usage_daily),usageWeekly:L(e.usage_weekly),usageMonthly:L(e.usage_monthly),isFreeTier:e.is_free_tier===!0}}var B=class{static async getBalance(){let{host:e,apiKey:t}=o(),n=new i({host:e,apiKey:t,timeout:F});try{return z(await n.get(P,{acceptableStatusCodes:new Set([200]),responseType:`json`,timeoutSeconds:Math.floor(F/1e3)}))}catch(e){if(e instanceof Error&&`status`in e&&e.status===404)return null;if(R(e))throw Error(`Balance request timed out after ${F}ms`);let t=e instanceof Error&&`status`in e&&e.status;throw Error(t?`Balance request failed with ${t}`:`Balance request failed: ${e instanceof Error?e.message:String(e)}`)}finally{n.close()}}},V=e=>{let{backend:t}=s();return a({queryKey:[`llm-balance`,t.id,e],queryFn:()=>B.getBalance(),enabled:t.kind!==`cloud`&&!!e,staleTime:1/0,gcTime:1e3*60*5,retry:!1,refetchOnWindowFocus:!1})};function H(e){return`$${e.toFixed(2)}`}function U(){let{t:e}=r(`openhands`),{data:t}=x(),{data:n,isError:i,isFetching:a,refetch:o}=V(t?.id);if(!n||i)return null;let s=n.limit!==null&&n.limitRemaining!==null;return(0,E.jsxs)(`div`,{"data-testid":`provider-balance-card`,className:`rounded-md border border-[var(--oh-border)] bg-surface-raised p-3`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between pb-2`,children:[(0,E.jsx)(`span`,{className:`font-semibold`,children:e(l.CONVERSATION$PROVIDER_BALANCE)}),(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsxs)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:[n.provider,n.isFreeTier?` · ${e(l.CONVERSATION$FREE_TIER)}`:null]}),(0,E.jsx)(`button`,{type:`button`,"data-testid":`provider-balance-refresh`,"aria-label":e(l.BUTTON$REFRESH),disabled:a,onClick:()=>o(),className:`cursor-pointer text-[var(--oh-muted)] hover:text-[var(--oh-foreground)] disabled:cursor-default`,children:(0,E.jsx)(m,{className:c(`h-3.5 w-3.5`,a&&`animate-spin`)})})]})]}),(0,E.jsxs)(`div`,{className:`grid gap-3`,children:[s?(0,E.jsx)(j,{label:e(l.CONVERSATION$CREDITS_REMAINING),value:H(n.limitRemaining??0)}):null,(0,E.jsx)(j,{label:e(l.CONVERSATION$CREDITS_USED),value:H(n.usage),valueClassName:s?``:`font-semibold`,labelClassName:s?`text-[var(--oh-muted)]`:``})]})]})}function W(){let{t:e}=r(`openhands`),t=T(),{data:n}=x(),i=n?.agent_kind===`acp`,{usage:a}=t;return t.cost!==null||a!==null?(0,E.jsxs)(`main`,{"data-testid":`usage-panel`,className:`h-full overflow-y-auto custom-scrollbar-always flex flex-col gap-3 p-3`,children:[a!==null&&(0,E.jsx)(`div`,{className:`rounded-md border border-[var(--oh-border)] bg-surface-raised p-3`,children:(0,E.jsxs)(`div`,{className:`grid gap-3`,children:[(0,E.jsx)(b,{perTurnToken:a.per_turn_token,contextWindow:a.context_window}),(0,E.jsx)(N,{fillPercent:v(a.per_turn_token,a.context_window),perTurnToken:a.per_turn_token})]})}),(0,E.jsx)(`div`,{className:`rounded-md border border-[var(--oh-border)] bg-surface-raised p-3`,children:(0,E.jsxs)(`div`,{className:`grid gap-3`,children:[(0,E.jsx)(`div`,{className:`flex justify-between items-center pb-2`,children:(0,E.jsx)(`span`,{className:`text-lg font-semibold`,children:e(l.CONVERSATION$TOKEN_USAGE)})}),i&&(0,E.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:e(l.CONVERSATION$PLAN_USAGE_NOTE)}),a!==null&&(0,E.jsx)(M,{usage:a}),(0,E.jsx)(A,{cost:t.cost,maxBudgetPerTask:t.max_budget_per_task})]})}),(0,E.jsx)(U,{})]}):(0,E.jsx)(C,{icon:(0,E.jsx)(d,{}),children:e(l.CONVERSATION$NO_METRICS)})}function G(){return(0,E.jsx)(W,{})}export{G as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-Cyuzqnbw.js";import{St as t,yt as n}from"./vendor-styling-Ck5D_A2Q.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js";import{t as i}from"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~iw7io29p-Dz8NQve5.js";import{y as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~kepq2zme-D87mAf6K.js";import{t as o}from"./useQuery-Bs5NFz2s.js";import{Ft as s,Mt as c,Pt as l,Q as u,jt as d,n as f}from"./active-backend-context-BZDG15C0.js";import{t as p,z as m}from"./utils-DUD5ScdA.js";import{t as h}from"./check-DSuS-lyr.js";import{t as g}from"./loader-circle-D7IagAyF.js";import{l as _}from"./form-control-classes-CGXBLcn1.js";import{n as v,t as y}from"./settings-input-CWUEHHvS.js";import{a as b,l as x}from"./acp-providers-CYy8qA2z.js";import{t as S}from"./use-get-secrets-6PBitf54.js";import{t as C}from"./use-create-secret-DbBIpaCR.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)?l(n(m.ONBOARDING$ACP_SECRETS_ORPHANED_WARNING)):i||c(n(m.SETTINGS$SAVED)),!0}catch(e){return d(s(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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~
|
|
1
|
+
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dcc51rps-rfV8mQ9m.js";import{t}from"./useMutation-6ZsQCqAn.js";import{L as n,O as r}from"./active-backend-context-BZDG15C0.js";import{t as i}from"./settings-service.api-3yAUFcaP.js";import{n as a}from"./use-agent-profiles-CPIc6wLH.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};
|