@openhands/agent-canvas 1.5.0 → 1.5.2
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-BQwoUBpe.js → acp-providers-DerAmTyY.js} +1 -1
- package/build/assets/{active-backend-context-BCXRv5pm.js → active-backend-context-DHhm10VS.js} +1 -1
- package/build/assets/{add-backend-modal-BKHzq5no.js → add-backend-modal-BoMkMyLB.js} +1 -1
- package/build/assets/{agent-profiles-settings-CEp5CIz8.js → agent-profiles-settings-CYPloKYK.js} +1 -1
- package/build/assets/{agent-server-compatibility-D6DSanlx.js → agent-server-compatibility-C0MtTTwb.js} +1 -1
- package/build/assets/{agent-server-conversation-service.api-cylugfDz.js → agent-server-conversation-service.api-lzc8dabY.js} +4 -4
- package/build/assets/{agent-settings-C-tann3x.js → agent-settings-GwiXe_6k.js} +1 -1
- package/build/assets/agent-settings-OdsyI2gX.js +1 -0
- package/build/assets/{alert-banner-Dd4woGbm.js → alert-banner-Dh51WURQ.js} +1 -1
- package/build/assets/{api-key-entry-screen-Bll_CkuQ.js → api-key-entry-screen-2gsoZAOK.js} +1 -1
- package/build/assets/app-settings-CD9euh81.js +1 -0
- package/build/assets/{automation-detail-Z9dN2f5l.js → automation-detail-Bn8q0AG3.js} +1 -1
- package/build/assets/{automation-export-D5uL0Tf8.js → automation-export-Djc8Tf0M.js} +1 -1
- package/build/assets/{automations-list-BMOWcqzZ.js → automations-list-Dtiolk1h.js} +1 -1
- package/build/assets/{back-nav-button-ZUDTMOTB.js → back-nav-button-DVknCcSP.js} +1 -1
- package/build/assets/backend-form-modal-B8GtBA-J.js +1 -0
- package/build/assets/{backend-synced-settings-badge-Db_REKVw.js → backend-synced-settings-badge-yVh6Kf4E.js} +1 -1
- package/build/assets/{base-modal-Cb0C6m0Q.js → base-modal-CIF_785P.js} +1 -1
- package/build/assets/{brand-button-2Tp3aXk1.js → brand-button-B1izLAdR.js} +1 -1
- package/build/assets/{browser-QYLVr1kS.js → browser-DKaeq_sT.js} +2 -2
- package/build/assets/browser-store-BI6uklCG.js +1 -0
- package/build/assets/{browser-tab-BTTP1OE2.js → browser-tab-qb_ftCxW.js} +1 -1
- package/build/assets/{circle-plus-check-toggle-QQJKUnF6.js → circle-plus-check-toggle-DoFIjVE0.js} +1 -1
- package/build/assets/client-source-CtQjJEy6.js +1 -0
- package/build/assets/cloud-funnel-analytics-uzzLlLuj.js +1 -0
- package/build/assets/{color-themes-bVMmJJG6.js → color-themes-CHizm1xF.js} +1 -1
- package/build/assets/{combobox-caret-A5jMVHgE.js → combobox-caret-CxZpqoSR.js} +1 -1
- package/build/assets/{command-menu-BMVEme4H.js → command-menu-oTvKDU3Y.js} +1 -1
- package/build/assets/{command-store-jrWX_CcW.js → command-store-D8J5LMW1.js} +1 -1
- package/build/assets/{condenser-settings-CIa6eyB4.js → condenser-settings-Q1rHh4Qe.js} +1 -1
- package/build/assets/{confirmation-modal-4n_944zq.js → confirmation-modal-DGBWM2Ls.js} +1 -1
- package/build/assets/{context-menu-list-item-DvfFic5I.js → context-menu-list-item-6psNyl7X.js} +1 -1
- package/build/assets/conversation-B8d8_Upd.js +1 -0
- package/build/assets/{conversation-D4o4dG2t.js → conversation-Lmqm6VJC.js} +20 -20
- package/build/assets/conversation-panel-B8n40Swu.js +1 -0
- package/build/assets/{conversation-service.api-0JG_fF9d.js → conversation-service.api-D8QU-BiL.js} +1 -1
- package/build/assets/conversation-state-store-B2Bp32XI.js +1 -0
- package/build/assets/{conversation-store-BCSpLuEf.js → conversation-store-LptbOvKa.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-Dp4Q_hXi.js → copy-to-clipboard-button-CFzH_NOX.js} +1 -1
- package/build/assets/{device-verify-CM086oKs.js → device-verify-WBSjJBLH.js} +1 -1
- package/build/assets/{dropdown-classes-DZq0BQjb.js → dropdown-classes-D3wMJlXT.js} +1 -1
- package/build/assets/{ellipsis-button-TPJdyxnK.js → ellipsis-button-CbNnHlIq.js} +1 -1
- package/build/assets/{entry.client-DypYHsYm.js → entry.client-Dnnak-Hq.js} +2 -2
- package/build/assets/{enum-filter-dropdown-CW_mBg0e.js → enum-filter-dropdown-JLYv1t8L.js} +1 -1
- package/build/assets/{environment-switch-overlay-6laJch-9.js → environment-switch-overlay-B1PFO8P8.js} +1 -1
- package/build/assets/{extensions-hub-BJFbFfKS.js → extensions-hub-DqvwvpCi.js} +1 -1
- package/build/assets/{extensions-navigation-DqSl7CJw.js → extensions-navigation-BMc9Nluv.js} +1 -1
- package/build/assets/{files-tab-c316dKAq.js → files-tab-BAkaV4aO.js} +1 -1
- package/build/assets/{files-tab-store-tfCav6bB.js → files-tab-store-DJsPxYdg.js} +1 -1
- package/build/assets/{git-provider-icon-DUb2pEos.js → git-provider-icon-xvbukHaT.js} +1 -1
- package/build/assets/{home-D7ds4Jyw.js → home-D01kSnmo.js} +1 -1
- package/build/assets/home-NZO2bF4N.js +1 -0
- package/build/assets/index-home-BsI6i0TC.js +1 -0
- package/build/assets/{install-server-modal-CvHvzZj3.js → install-server-modal-BYjqoRyX.js} +1 -1
- package/build/assets/{launch-A47TK2Me.js → launch-DlXspDku.js} +1 -1
- package/build/assets/lesson-plan-cNUjpdFx.js +4 -0
- package/build/assets/{llm-not-configured-banner-B7DR8SPs.js → llm-not-configured-banner-DUPyoFIZ.js} +7 -7
- package/build/assets/{llm-settings-Cvi7q4ox.js → llm-settings-Cs_iieFY.js} +1 -1
- package/build/assets/llm-settings-J2ke2foG.js +1 -0
- package/build/assets/{llm-subscription-service-Cz1yBBvE.js → llm-subscription-service-C0zN0-rH.js} +1 -1
- package/build/assets/{manage-backends-modal-DAVhNUCe.js → manage-backends-modal-nMoCZ2a0.js} +1 -1
- package/build/assets/manifest-f1b46f62.js +1 -0
- package/build/assets/{map-provider-XSFHmdDs.js → map-provider-BbIb12oh.js} +1 -1
- package/build/assets/{markdown-renderer-B6cJJ_MN.js → markdown-renderer-B4V2OMFP.js} +1 -1
- package/build/assets/{mcp-BwssgMpg.js → mcp-kZM-cAZw.js} +1 -1
- package/build/assets/{messages-D8MeG2ZQ.js → messages-CJAv5n4j.js} +1 -1
- package/build/assets/{model-selector-BxTbbKub.js → model-selector-D51W2Q9b.js} +1 -1
- package/build/assets/{navigation-link-imH6S7h2.js → navigation-link-D8hfwvxI.js} +1 -1
- package/build/assets/{onboarding-CyicadGt.js → onboarding-Dx8n8HFr.js} +1 -1
- package/build/assets/onboarding-modal-Bxuxpfdz.js +1 -0
- package/build/assets/{organization-service.api-QknzKDh3.js → organization-service.api-Da2jiuBS.js} +1 -1
- package/build/assets/{path-utils-BECGet7G.js → path-utils-D53ZHUQU.js} +1 -1
- package/build/assets/{planner-tab-DPKHmMAX.js → planner-tab-BM-pKx0z.js} +1 -1
- package/build/assets/{plugins-management-service-DuTTxquo.js → plugins-management-service-DISfOL13.js} +1 -1
- package/build/assets/{profiles-service.api-D6jvZOWu.js → profiles-service.api-DWetW2TL.js} +1 -1
- package/build/assets/providers-C7lMslCi.js +1 -0
- package/build/assets/{proxy-CuhhyjdX.js → proxy-G4ce0fnQ.js} +1 -1
- package/build/assets/{recommended-automations-launcher-DA6DWS7V.js → recommended-automations-launcher-BWRRvMPE.js} +1 -1
- package/build/assets/root-layout-ClEl-JlJ.js +2 -0
- package/build/assets/root-oT83qVlk.js +2 -0
- package/build/assets/{runtime-waiting-state-DeD9G7yJ.js → runtime-waiting-state-CnyVhX4T.js} +1 -1
- package/build/assets/{schema-field-BOLdL_U7.js → schema-field-CwdqUOnE.js} +1 -1
- package/build/assets/{sdk-section-page-ZIltERxf.js → sdk-section-page-Cwj0T4gF.js} +1 -1
- package/build/assets/{sdk-settings-schema-Ba_Pa9uf.js → sdk-settings-schema-CLR01YIK.js} +1 -1
- package/build/assets/{secrets-service-50DElFny.js → secrets-service-Ch7RH8eH.js} +1 -1
- package/build/assets/{secrets-settings-Digl7JLe.js → secrets-settings-Bc_pBX6F.js} +1 -1
- package/build/assets/{settings-dropdown-input-BD5C9fBn.js → settings-dropdown-input-Dhx9ErGd.js} +1 -1
- package/build/assets/{settings-index-CODBijya.js → settings-index-BzSIM1-N.js} +1 -1
- package/build/assets/{settings-input-CzNOq-Pj.js → settings-input-BsgQWS5R.js} +1 -1
- package/build/assets/{settings-list-classes-CuxH9ZoR.js → settings-list-classes-DSJJX99U.js} +1 -1
- package/build/assets/{settings-modal-BcSWpKI0.js → settings-modal-BnZ7mMu7.js} +1 -1
- package/build/assets/settings-n9a395O0.js +1 -0
- package/build/assets/{settings-service.api-Bsu1PvYO.js → settings-service.api-DPTFyRXL.js} +1 -1
- package/build/assets/{settings-switch-DqmHAfWJ.js → settings-switch-Bes8dIlV.js} +1 -1
- package/build/assets/{settings-utils-B1lBErvV.js → settings-utils-DzCVfiR3.js} +1 -1
- package/build/assets/{shared-conversation-CDskdmrb.js → shared-conversation-CIDDti9I.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-DmCmZgq1.js → sidebar-mobile-menu-toggle-CTX7J4wM.js} +1 -1
- package/build/assets/{sidebar-nav-link-DMc8AIe7.js → sidebar-nav-link-CHqyFXwV.js} +1 -1
- package/build/assets/{sidebar-store-DXWSCFpa.js → sidebar-store-uiUXBU1N.js} +1 -1
- package/build/assets/{skill-card-pill-row-DOIWjiMF.js → skill-card-pill-row-BPYKQ3IN.js} +1 -1
- package/build/assets/{skills-plugins-DLgINYuY.js → skills-plugins-HZEbNDmX.js} +1 -1
- package/build/assets/{skills-settings-DPiCWalR.js → skills-settings-BdqijFlC.js} +1 -1
- package/build/assets/{task-list-tab-CuhcDycu.js → task-list-tab-DyfgG4MC.js} +1 -1
- package/build/assets/telemetry-SHxpVxk8.js +2 -0
- package/build/assets/{terminal-CVqF-tCD.js → terminal-BDTa1HEr.js} +1 -1
- package/build/assets/{typography-CQn9wyEX.js → typography-CzfoD9DY.js} +1 -1
- package/build/assets/{use-acp-credential-form-LlfZO_DD.js → use-acp-credential-form-DHd_Id-q.js} +1 -1
- package/build/assets/{use-activate-agent-profile-DpQjsXM0.js → use-activate-agent-profile-BRDdSwQ0.js} +1 -1
- package/build/assets/{use-active-agent-profile-Gw_uJujV.js → use-active-agent-profile-BMDTXsay.js} +1 -1
- package/build/assets/{use-active-conversation-B0sttISF.js → use-active-conversation-BbeVgedA.js} +1 -1
- package/build/assets/{use-agent-profiles-LHZEK0Gg.js → use-agent-profiles-Dn_S_Tkz.js} +1 -1
- package/build/assets/{use-agent-state-C5uA0bRj.js → use-agent-state-5qM3X30V.js} +1 -1
- package/build/assets/{use-backends-health-DKt1SmiU.js → use-backends-health-BagmAE_W.js} +1 -1
- package/build/assets/{use-can-manage-org-profiles-BAtqsbCi.js → use-can-manage-org-profiles-CyYqfzeo.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-C8m1oBy4.js → use-cloud-current-user-id-BwMX7jHW.js} +1 -1
- package/build/assets/use-config-B39iHYFi.js +1 -0
- package/build/assets/{use-create-conversation-CWQGNQ9J.js → use-create-conversation-CkKUQVbP.js} +1 -1
- package/build/assets/{use-create-secret-BIrsX3OB.js → use-create-secret-DEgM0MXZ.js} +1 -1
- package/build/assets/{use-event-store-CsD17BKu.js → use-event-store-Bbaz51GR.js} +1 -1
- package/build/assets/{use-handle-plan-click-DEuO7Byo.js → use-handle-plan-click-BFcE0Xms.js} +1 -1
- package/build/assets/{use-launch-skill-in-chat-CdHOoQGM.js → use-launch-skill-in-chat-DJWEfVc5.js} +1 -1
- package/build/assets/{use-llm-profiles-DQpQxVOD.js → use-llm-profiles-CgRtnj74.js} +1 -1
- package/build/assets/{use-plugins-marketplace-Bkk07W_M.js → use-plugins-marketplace-DOJp9rlE.js} +1 -1
- package/build/assets/use-runtime-is-ready-ziHQvXZQ.js +1 -0
- package/build/assets/{use-save-agent-profile-BxEsjnW0.js → use-save-agent-profile-i4FcEP98.js} +1 -1
- package/build/assets/{use-save-settings-ioSUMqbE.js → use-save-settings-DiDEbIJw.js} +1 -1
- package/build/assets/{use-settings-DNJC4gqu.js → use-settings-BeJap6YL.js} +1 -1
- package/build/assets/{use-settings-nav-items-BUsrDbVR.js → use-settings-nav-items-D5JJjFHJ.js} +1 -1
- package/build/assets/{use-skills-BsmKm23M.js → use-skills-Blpg2BqE.js} +1 -1
- package/build/assets/{use-task-list-rs7Xbzl8.js → use-task-list-CfisapBW.js} +1 -1
- package/build/assets/use-tracking-DFoPQUSU.js +1 -0
- package/build/assets/{use-user-conversation-B337kUKB.js → use-user-conversation-BrN2xeQU.js} +1 -1
- package/build/assets/{vendor~browser-tab-Xn94EtUo.js → vendor~browser-tab-CsMb-pta.js} +1 -1
- package/build/assets/{vendor~browser-5Njjw1Cl.js → vendor~browser-wXQ-WZEC.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-BIieS_OD.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js} +2 -2
- package/build/assets/{vendor~files-tab-CiC3-lGh.js → vendor~files-tab-B-5fBohe.js} +1 -1
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DWteoTyr.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD7v71DM.js} +1 -1
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-tlf6AnDe.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BT05Osu4.js} +1 -1
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B8XNNEQZ.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-COhHANvV.js} +1 -1
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-Dc5nKwLO.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DgzWSMRc.js} +1 -1
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CnJRLn5s.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DqZatR3B.js} +1 -1
- package/build/assets/{vendor~launch-28DK5Rsl.js → vendor~launch-_Km3J77E.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g9hift2g-DmmpG9SI.js → vendor~module-D5a_AClf.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-lYNG9C1U.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-BrguKXCn.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation-Zhq6xAxR.js → vendor~root-layout~index-home~home~conversation-panel~conversation-BTvhGHHG.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-B81b08bw.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-BOKQkbc6.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-jpyLM1Nn.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js} +1 -1
- package/build/assets/{verification-settings-HRgEM-_3.js → verification-settings-C8KzAdAX.js} +1 -1
- package/build/index.html +4 -4
- package/config/defaults.json +1 -1
- package/dist/api/cloud/conversation-service.api.cjs +1 -1
- package/dist/api/cloud/conversation-service.api.js +4 -4
- package/dist/api/option-service/option-service.api.cjs +1 -1
- package/dist/api/option-service/option-service.api.cjs.map +1 -1
- package/dist/api/option-service/option-service.api.js +0 -1
- package/dist/api/option-service/option-service.api.js.map +1 -1
- package/dist/api/option-service/option.types.d.ts +0 -1
- package/dist/components/features/backends/backend-form-modal.cjs +1 -1
- package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
- package/dist/components/features/backends/backend-form-modal.d.ts +1 -1
- package/dist/components/features/backends/backend-form-modal.js +137 -144
- package/dist/components/features/backends/backend-form-modal.js.map +1 -1
- package/dist/components/providers/agent-server-ui-providers.cjs +1 -1
- package/dist/components/providers/agent-server-ui-providers.cjs.map +1 -1
- package/dist/components/providers/agent-server-ui-providers.d.ts +4 -2
- package/dist/components/providers/agent-server-ui-providers.js +9 -2
- package/dist/components/providers/agent-server-ui-providers.js.map +1 -1
- package/dist/components/providers/index.cjs +1 -1
- package/dist/components/providers/index.d.ts +1 -2
- package/dist/components/providers/index.js +0 -1
- package/dist/components/providers/telemetry-provider.cjs +2 -0
- package/dist/components/providers/telemetry-provider.cjs.map +1 -0
- package/dist/components/providers/telemetry-provider.d.ts +6 -0
- package/dist/components/providers/telemetry-provider.js +64 -0
- package/dist/components/providers/telemetry-provider.js.map +1 -0
- 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 +3 -3
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.js +197 -204
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs +1 -1
- package/dist/hooks/mutation/use-save-settings.cjs.map +1 -1
- package/dist/hooks/mutation/use-save-settings.d.ts +3 -1
- package/dist/hooks/mutation/use-save-settings.js +6 -5
- package/dist/hooks/mutation/use-save-settings.js.map +1 -1
- 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.d.ts +19 -3
- package/dist/hooks/query/use-task-polling.js +36 -35
- package/dist/hooks/query/use-task-polling.js.map +1 -1
- package/dist/hooks/use-telemetry.cjs +1 -1
- package/dist/hooks/use-telemetry.cjs.map +1 -1
- package/dist/hooks/use-telemetry.d.ts +3 -3
- package/dist/hooks/use-telemetry.js +16 -22
- package/dist/hooks/use-telemetry.js.map +1 -1
- package/dist/hooks/use-tracking.cjs +1 -1
- package/dist/hooks/use-tracking.cjs.map +1 -1
- package/dist/hooks/use-tracking.d.ts +3 -4
- package/dist/hooks/use-tracking.js +37 -37
- package/dist/hooks/use-tracking.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +2 -2
- package/dist/package.js.map +1 -1
- package/dist/routes/app-settings.cjs +1 -1
- package/dist/routes/app-settings.cjs.map +1 -1
- package/dist/routes/app-settings.js +66 -68
- package/dist/routes/app-settings.js.map +1 -1
- package/dist/routes/conversation.cjs +1 -1
- package/dist/routes/conversation.cjs.map +1 -1
- package/dist/routes/conversation.js +1 -1
- package/dist/routes/conversation.js.map +1 -1
- package/dist/routes/llm-settings.cjs +1 -1
- package/dist/routes/llm-settings.cjs.map +1 -1
- package/dist/routes/llm-settings.js +4 -1
- package/dist/routes/llm-settings.js.map +1 -1
- package/dist/services/cloud-funnel-analytics.cjs +1 -1
- package/dist/services/cloud-funnel-analytics.cjs.map +1 -1
- package/dist/services/cloud-funnel-analytics.d.ts +3 -11
- package/dist/services/cloud-funnel-analytics.js +16 -30
- package/dist/services/cloud-funnel-analytics.js.map +1 -1
- package/dist/services/telemetry.cjs +1 -1
- package/dist/services/telemetry.cjs.map +1 -1
- package/dist/services/telemetry.d.ts +46 -9
- package/dist/services/telemetry.js +181 -72
- package/dist/services/telemetry.js.map +1 -1
- package/dist/themes/color-themes.cjs.map +1 -1
- package/dist/themes/color-themes.d.ts +3 -6
- package/dist/themes/color-themes.js.map +1 -1
- package/dist/utils/error-handler.cjs +1 -1
- package/dist/utils/error-handler.cjs.map +1 -1
- package/dist/utils/error-handler.d.ts +1 -4
- package/dist/utils/error-handler.js +6 -7
- package/dist/utils/error-handler.js.map +1 -1
- package/dist/utils/map-provider.cjs +1 -1
- package/dist/utils/map-provider.cjs.map +1 -1
- package/dist/utils/map-provider.d.ts +1 -0
- package/dist/utils/map-provider.js +2 -1
- package/dist/utils/map-provider.js.map +1 -1
- package/package.json +2 -2
- package/build/assets/agent-settings-DGUKNSnU.js +0 -1
- package/build/assets/app-settings-BpViWwpC.js +0 -1
- package/build/assets/backend-form-modal-DhBT8P4g.js +0 -1
- package/build/assets/browser-store-BGXOGo-R.js +0 -1
- package/build/assets/client-source-Biqarhgr.js +0 -1
- package/build/assets/cloud-funnel-analytics-D-27T5Ao.js +0 -1
- package/build/assets/conversation-CHnEXGRM.js +0 -1
- package/build/assets/conversation-panel-11FjLCId.js +0 -1
- package/build/assets/conversation-state-store-JiUQp02U.js +0 -1
- package/build/assets/handle-capture-consent-DDnXMC9Y.js +0 -1
- package/build/assets/home-BQ-DC06B.js +0 -1
- package/build/assets/index-home-BRFDWs_4.js +0 -1
- package/build/assets/lesson-plan-DSf95kQ2.js +0 -4
- package/build/assets/llm-settings-Ch4ZbW3c.js +0 -1
- package/build/assets/manifest-958c741a.js +0 -1
- package/build/assets/onboarding-modal-DQwihcTz.js +0 -1
- package/build/assets/option-service.api-DAkg_F7p.js +0 -1
- package/build/assets/package-Dk_VtWJ4.js +0 -1
- package/build/assets/providers-B8pxQK8x.js +0 -1
- package/build/assets/root-BhP6bTBB.js +0 -2
- package/build/assets/root-layout-oBaHHW4s.js +0 -2
- package/build/assets/settings-BfgLHsgd.js +0 -1
- package/build/assets/telemetry-DHiTRl5_.js +0 -2
- package/build/assets/use-config-CXy4vD0H.js +0 -1
- package/build/assets/use-runtime-is-ready-D4pkGT6E.js +0 -1
- package/build/assets/use-tracking-poxQHMwR.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~ljq5gbus-B2XD4bi2.js +0 -1
- package/dist/components/providers/posthog-wrapper.cjs +0 -2
- package/dist/components/providers/posthog-wrapper.cjs.map +0 -1
- package/dist/components/providers/posthog-wrapper.d.ts +0 -4
- package/dist/components/providers/posthog-wrapper.js +0 -49
- package/dist/components/providers/posthog-wrapper.js.map +0 -1
- package/dist/node_modules/posthog-js/react/dist/esm/index.cjs +0 -2
- package/dist/node_modules/posthog-js/react/dist/esm/index.cjs.map +0 -1
- package/dist/node_modules/posthog-js/react/dist/esm/index.js +0 -113
- package/dist/node_modules/posthog-js/react/dist/esm/index.js.map +0 -1
- package/dist/utils/handle-capture-consent.cjs +0 -2
- package/dist/utils/handle-capture-consent.cjs.map +0 -1
- package/dist/utils/handle-capture-consent.d.ts +0 -7
- package/dist/utils/handle-capture-consent.js +0 -8
- package/dist/utils/handle-capture-consent.js.map +0 -1
- /package/build/assets/{__vite-browser-external-DU-Cb_sT.js → __vite-browser-external-BQUj0sYu.js} +0 -0
- /package/build/assets/{agent-server-ui-style-scope-COnDHTm5.js → agent-server-ui-style-scope-qhnhZHBV.js} +0 -0
- /package/build/assets/{automation-BVEmGghX.js → automation-LZB0MjdV.js} +0 -0
- /package/build/assets/{canvas-ui-BhxjoA1f.js → canvas-ui-COgjltGz.js} +0 -0
- /package/build/assets/{checkmark-DhcMGwtO.js → checkmark-h7udgXMM.js} +0 -0
- /package/build/assets/{close-DO5Rq_CS.js → close-DLFb5kfv.js} +0 -0
- /package/build/assets/{code-tag-BvjtzUsr.js → code-tag-DYlAhEQY.js} +0 -0
- /package/build/assets/{conversation-local-storage-B31voBg7.js → conversation-local-storage-F6zVMM--.js} +0 -0
- /package/build/assets/{conversation-tab-empty-state-BUhKVwoi.js → conversation-tab-empty-state-CNUmIms2.js} +0 -0
- /package/build/assets/{copy-DLUw2us-.js → copy-BLmGeJcd.js} +0 -0
- /package/build/assets/{dist-Dj01FXbZ.js → dist-CodhvuAP.js} +0 -0
- /package/build/assets/{environment-switch-store-D9hB9PvY.js → environment-switch-store-DkjlKWzN.js} +0 -0
- /package/build/assets/{extension-module-card-classes-BlO4w702.js → extension-module-card-classes-9V3J9J_b.js} +0 -0
- /package/build/assets/{folder-ynxP2EIL.js → folder-Bk311brm.js} +0 -0
- /package/build/assets/{form-control-classes-CvUaw8_L.js → form-control-classes-CbdN5aO3.js} +0 -0
- /package/build/assets/{get-language-from-path-rWEQrOGU.js → get-language-from-path-DBqBsCWH.js} +0 -0
- /package/build/assets/{git-status-mapper-C3rfzUex.js → git-status-mapper-DnL9OC8_.js} +0 -0
- /package/build/assets/{iconBase-CuvxAQZ5.js → iconBase-Dz51Zn5x.js} +0 -0
- /package/build/assets/{link-external-BVDiJfZt.js → link-external-CaBmUEs_.js} +0 -0
- /package/build/assets/{llm-subscription-BkdHwtQe.js → llm-subscription-DtsX5Lhg.js} +0 -0
- /package/build/assets/{loading-spinner-Txxx1I1p.js → loading-spinner-BcdnT0mN.js} +0 -0
- /package/build/assets/{middleware-CWYDMVuG.js → middleware-DYHYNAnP.js} +0 -0
- /package/build/assets/{modal-backdrop-Dsmzgr5s.js → modal-backdrop-zVwfOJZr.js} +0 -0
- /package/build/assets/{modal-body-CDZdZ-eT.js → modal-body-Cc2zp0xb.js} +0 -0
- /package/build/assets/{modal-classes-B4oit_4c.js → modal-classes-3qT9Ap7Q.js} +0 -0
- /package/build/assets/{modal-close-button-DQElFMPo.js → modal-close-button-BcIBUdSq.js} +0 -0
- /package/build/assets/{navigation-context-SjzfpygH.js → navigation-context-DPs2G0X8.js} +0 -0
- /package/build/assets/{objectWithoutPropertiesLoose-CQwg6tC0.js → objectWithoutPropertiesLoose-BgYIAs2y.js} +0 -0
- /package/build/assets/{openhands-logo-C-gDp1wr.js → openhands-logo-bcNw5bkY.js} +0 -0
- /package/build/assets/{plan-components-CgPHWz3E.js → plan-components-BdZXPyZU.js} +0 -0
- /package/build/assets/{react-ao3tWj6K.js → react-DPDgL6du.js} +0 -0
- /package/build/assets/{search-pb4UKTfK.js → search-BgOCR7_c.js} +0 -0
- /package/build/assets/{segmented-toggle-C1-ZVyr5.js → segmented-toggle-kzwZkLaj.js} +0 -0
- /package/build/assets/{settings-gear-D_HVvE5L.js → settings-gear-MXCyZW0x.js} +0 -0
- /package/build/assets/{settings-like-page-layout-classes-DLrsPCaI.js → settings-like-page-layout-classes-Cdl6jOe5.js} +0 -0
- /package/build/assets/{settings-DksoDv5z.js → settings-mQUckT0g.js} +0 -0
- /package/build/assets/{settings-section-header-context-C2MUIG88.js → settings-section-header-context-COMOIaxV.js} +0 -0
- /package/build/assets/{sidebar-layout-Cn6eQaEI.js → sidebar-layout-Bm7pa3Vk.js} +0 -0
- /package/build/assets/{skills-CH4xgIh-.js → skills-EqzxYBvT.js} +0 -0
- /package/build/assets/{styled-tooltip-CvsjHuIf.js → styled-tooltip-B14i_Uac.js} +0 -0
- /package/build/assets/{switch-skeleton-BpSOvZ-n.js → switch-skeleton-DqQwalyu.js} +0 -0
- /package/build/assets/{terminal-Dokfkxn0.js → terminal-Cgf___rK.js} +0 -0
- /package/build/assets/{toggle-switch-CS0ClOy2.js → toggle-switch-DX_k418f.js} +0 -0
- /package/build/assets/{u-check-circle-DPWVO-9N.js → u-check-circle-BqoIxNz_.js} +0 -0
- /package/build/assets/{u-check-circle-half-BGNAAjOW.js → u-check-circle-half-MsShT8Ec.js} +0 -0
- /package/build/assets/{u-edit-BIskOoEG.js → u-edit-DL5LgKon.js} +0 -0
- /package/build/assets/{use-breakpoint-OjLm94cF.js → use-breakpoint-BP3lqLMx.js} +0 -0
- /package/build/assets/{use-click-outside-element-Jpt2WWd7.js → use-click-outside-element-D9BYdANT.js} +0 -0
- /package/build/assets/{use-is-authed-Dvbpiu3B.js → use-is-authed-BezEyfeh.js} +0 -0
- /package/build/assets/{use-onboarding-completion-DkRpDTsD.js → use-onboarding-completion-C_Swglzp.js} +0 -0
- /package/build/assets/{v4-DPgam_jW.js → v4-DbCkTSoU.js} +0 -0
- /package/build/assets/{vendor~browser-BvEKaLBz.js → vendor~browser-By2MVv_N.js} +0 -0
- /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-CznX01nZ.js → vendor~conversation-panel~conversation~alert-banner-CxfzCmkN.js} +0 -0
- /package/build/assets/{vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BuL5kjfS.js → vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-FghQ3Z1a.js} +0 -0
- /package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-DUYl8gbZ.js → vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-mC0v44WR.js} +0 -0
- /package/build/assets/{vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-pIgQDxTc.js → vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C4-GDgiF.js} +0 -0
- /package/build/assets/{vendor~terminal-jAaNQWS9.js → vendor~terminal-CnKZILnC.js} +0 -0
- /package/build/assets/{x-mark-C5przfXl.js → x-mark-Batp6gXa.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-Cbf5AGg_.js";import{t as i}from"./declaration-BGsHjPEW.js";import{t as a}from"./utils-DB9LsAzA.js";import{n as o}from"./toggle-switch-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-Cbf5AGg_.js";import{t as i}from"./declaration-BGsHjPEW.js";import{t as a}from"./utils-DB9LsAzA.js";import{n as o}from"./toggle-switch-DX_k418f.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(i.BADGE$BETA)})]}):null;return(0,c.jsxs)(`label`,{className:a(`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-BbIb12oh.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-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r,P as i,r as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{h as o}from"./path-utils-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r,P as i,r as a}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{h as o}from"./path-utils-D53ZHUQU.js";import{t as s}from"./useQuery-D5pEZbY0.js";import{t as c}from"./useTranslation-Cbf5AGg_.js";import{t as l}from"./declaration-BGsHjPEW.js";import{t as u}from"./messages-CJAv5n4j.js";import{d}from"./agent-server-compatibility-C0MtTTwb.js";import{s as f}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import{t as p}from"./loading-spinner-BcdnT0mN.js";import{t as m}from"./openhands-logo-bcNw5bkY.js";import{c as h}from"./lesson-plan-cNUjpdFx.js";import{n as g}from"./use-event-store-Bbaz51GR.js";var _=e(t(),1),v=e=>s({queryKey:[`shared-conversation`,e],queryFn:()=>{if(!e)throw Error(`Conversation ID is required`);return new f(d()).getSharedConversation(e)},enabled:!!e,retry:!1}),y=e=>o({queryKey:[`shared-conversation-events`,e],queryFn:({pageParam:t})=>{if(!e)throw Error(`Conversation ID is required`);return new f(d()).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=r(function(){let{t:e}=c(`openhands`),{conversationId:t}=i(),{data:n,isLoading:r,error:o}=v(t),{data:s,isLoading:d,error:f,hasNextPage:S,fetchNextPage:C,isFetchingNextPage:w}=y(t),T=r||d,E=o||f,D=_.useMemo(()=>s?.pages?s.pages.flatMap(e=>e.items):[],[s?.pages]),O=_.useMemo(()=>D.reduce((e,t)=>g(t,e),[]).filter(h),[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(l.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(l.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(l.CONVERSATION$SHARED_CONVERSATION)}),n?.selected_branch&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(l.CONVERSATION$BRANCH),`: `,n.selected_branch]}),n?.selected_repository&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(l.CONVERSATION$REPOSITORY),`:`,` `,n.selected_repository]}),n?.llm_model&&(0,x.jsxs)(`div`,{className:`text-sm text-[var(--oh-muted)]`,children:[e(l.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)(u,{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(l.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{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t as i}from"./useMutation-u8UgRgDK.js";import{t as a}from"./Trans-DqF_OEZB.js";import{t as o}from"./useTranslation-Cbf5AGg_.js";import{t as s}from"./declaration-BGsHjPEW.js";import{t as c}from"./utils-DB9LsAzA.js";import{t as l}from"./modal-backdrop-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t as i}from"./useMutation-u8UgRgDK.js";import{t as a}from"./Trans-DqF_OEZB.js";import{t as o}from"./useTranslation-Cbf5AGg_.js";import{t as s}from"./declaration-BGsHjPEW.js";import{t as c}from"./utils-DB9LsAzA.js";import{t as l}from"./modal-backdrop-zVwfOJZr.js";import{n as u}from"./modal-body-Cc2zp0xb.js";import{n as d,r as f}from"./base-modal-CIF_785P.js";import{_ as p,u as m}from"./form-control-classes-CbdN5aO3.js";import{t as h}from"./brand-button-B1izLAdR.js";import{t as g}from"./agent-server-conversation-service.api-lzc8dabY.js";var _=e(t(),1),v=n();function y({onConfirm:e,onCancel:t,conversationTitle:n,title:r,description:i}){let{t:c}=o(`openhands`),p;return p=i??(n?(0,v.jsx)(a,{ns:`openhands`,i18nKey:s.CONVERSATION$DELETE_WARNING_WITH_TITLE,values:{title:n},components:{title:(0,v.jsx)(`span`,{className:`text-white`})}}):c(s.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??c(s.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:c(s.BUTTON$CANCEL)}),(0,v.jsx)(h,{type:`button`,variant:`primary`,onClick:e,"data-testid":`confirm-button`,children:c(s.ACTION$CONFIRM_DELETE)})]})]})})}function b({onConfirm:e,onCancel:t}){let{t:n}=o(`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(s.CONVERSATION$CONFIRM_CLOSE_CONVERSATION)}),(0,v.jsx)(d,{description:n(s.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(s.BUTTON$CANCEL)}),(0,v.jsx)(h,{type:`button`,variant:`primary`,onClick:e,"data-testid":`confirm-button`,children:n(s.ACTION$CONFIRM_CLOSE)})]})]})})}var x=()=>{let e=r();return i({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=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:`M21 7.5V9H3V7.5H21ZM3 10.5H21V18H3V10.5ZM21 6H3C2.60218 6 2.22064 6.15804 1.93934 6.43934C1.65804 6.72064 1.5 7.10218 1.5 7.5V18C1.5 18.3978 1.65804 18.7794 1.93934 19.0607C2.22064 19.342 2.60218 19.5 3 19.5H21C21.3978 19.5 21.7794 19.342 22.0607 19.0607C22.342 18.7794 22.5 18.3978 22.5 18V7.5C22.5 7.10218 22.342 6.72064 22.0607 6.43934C21.7794 6.15804 21.3978 6 21 6ZM16.5 15H19.5V16.5H16.5V15Z`,fill:`currentColor`})}),T=_.createContext(null);function E({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)(T.Provider,{value:o,children:e})}function D(){let e=_.useContext(T);if(!e)throw Error(`useSidebarMobileNav must be used within SidebarMobileNavProvider`);return e}var O=c(`inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md p-1`,`text-[var(--oh-muted)]`,p,m),k=`size-5 shrink-0`,A=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 j(){let{t:e}=o(`openhands`),{isOpen:t,toggle:n}=D();return(0,v.jsx)(`button`,{type:`button`,"data-testid":`sidebar-mobile-menu-toggle`,onClick:n,"aria-expanded":t,"aria-label":e(t?s.SIDEBAR$CLOSE_MENU:s.SIDEBAR$OPEN_MENU),className:O,children:(0,v.jsx)(A,{className:k,"aria-hidden":!0})})}export{E as a,C as c,b as d,y as f,k as i,S as l,A as n,D as o,O as r,w as s,j as t,x as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./utils-DB9LsAzA.js";import{n as r}from"./navigation-context-
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./utils-DB9LsAzA.js";import{n as r}from"./navigation-context-DPs2G0X8.js";import{t as i}from"./navigation-link-D8hfwvxI.js";import{a,c as o,f as s,o as c,s as l,t as u,u as d}from"./sidebar-layout-Bm7pa3Vk.js";import{t as f}from"./styled-tooltip-B14i_Uac.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,disabledReason:b,forceActive:x=!1}){let{currentPath:S}=r(),C=x||h(S,e,o),w=(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&&(C?c.active:c.idle),g&&`opacity-50`,g&&!b&&`pointer-events-none`),children:[_?v?(0,p.jsx)(m,{active:C,children:_}):(0,p.jsx)(`span`,{className:a,children:_}):null,(0,p.jsx)(`span`,{className:d(v),children:t})]});return g&&b?(0,p.jsx)(f,{content:b,placement:`right`,children:w}):v?(0,p.jsx)(f,{content:y??t,placement:`right`,tooltipClassName:y?`p-0 bg-tertiary text-white`:void 0,children:w}):w}export{m as n,g as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-D4Tak8A1.js";import{t}from"./react-
|
|
1
|
+
import{t as e}from"./createLucideIcon-D4Tak8A1.js";import{t}from"./react-DPDgL6du.js";import{r as n,t as r}from"./middleware-DYHYNAnP.js";var i=e(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),a=t(e=>({isOpen:!1,open:()=>e({isOpen:!0}),close:()=>e({isOpen:!1}),toggle:()=>e(e=>({isOpen:!e.isOpen}))})),o=`openhands-sidebar`,s=`openhands-sidebar-collapsed`,c=t()(n(e=>({collapsed:!1,setCollapsed:t=>e(e=>({collapsed:typeof t==`function`?t(e.collapsed):t})),toggleCollapsed:()=>e(e=>({collapsed:!e.collapsed}))}),{name:o,storage:r(()=>localStorage),partialize:e=>({collapsed:e.collapsed})}));if(typeof window<`u`)try{let e=window.localStorage.getItem(s);window.localStorage.getItem(o)===null&&(e===`true`||e===`false`)&&c.setState({collapsed:e===`true`}),e!==null&&window.localStorage.removeItem(s)}catch{}export{a as n,i as r,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-Cbf5AGg_.js";import{t as i}from"./declaration-BGsHjPEW.js";import{t as a}from"./utils-DB9LsAzA.js";import{i as o}from"./extension-module-card-classes-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-Cbf5AGg_.js";import{t as i}from"./declaration-BGsHjPEW.js";import{t as a}from"./utils-DB9LsAzA.js";import{i as o}from"./extension-module-card-classes-9V3J9J_b.js";var s=e(t(),1),c=n(),l=o,u=6,d=40;function f(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?d+u:0;if(n+a+i+o>t)return Math.max(1,r);n+=a+i}return e.length}function p({pills:e,testId:t}){let{t:n}=r(`openhands`),l=s.useRef(null),u=s.useRef(null),[d,p]=s.useState(e.length),m=s.useCallback(()=>{let e=l.current,t=u.current;!e||!t||p(f(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-d);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,d).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:a(o,`font-medium text-tertiary-alt`),title:e.slice(d).map(e=>e.id).join(`, `),children:n(i.SETTINGS$SKILLS_PILLS_MORE,{count:h})}):null]})]})}export{p as n,l as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t as a}from"./useMutation-u8UgRgDK.js";import{t as o}from"./useQuery-D5pEZbY0.js";import{t as s}from"./useTranslation-Cbf5AGg_.js";import{t as c}from"./declaration-BGsHjPEW.js";import{C as l,E as u,S as d,n as f,u as p}from"./active-backend-context-BCXRv5pm.js";import{t as m}from"./search-dIQ09UY2.js";import{t as h}from"./x-ZE4iplpF.js";import{t as g}from"./utils-DB9LsAzA.js";import{t as _}from"./modal-backdrop-Dsmzgr5s.js";import{n as v}from"./modal-classes-B4oit_4c.js";import{t as y}from"./brand-button-2Tp3aXk1.js";import{n as b}from"./navigation-context-SjzfpygH.js";import{t as x}from"./modal-close-button-DQElFMPo.js";import{t as S}from"./settings-input-CzNOq-Pj.js";import{t as C}from"./plugins-management-service-DuTTxquo.js";import{a as w,i as T,r as E}from"./extension-module-card-classes-BlO4w702.js";import{t as D}from"./settings-switch-DqmHAfWJ.js";import{n as O}from"./circle-plus-check-toggle-QQJKUnF6.js";import{n as k,t as A}from"./use-plugins-marketplace-Bkk07W_M.js";import{n as j}from"./extensions-navigation-DqSl7CJw.js";import{n as M}from"./settings-like-page-layout-classes-DLrsPCaI.js";var N=e(t(),1),P=n();function F({plugin:e,isBusy:t=!1,isDisabled:n=!1,onOpen:r,onInstall:i,onToggle:a}){let{t:o}=s(`openhands`);return(0,P.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:g(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,w,E),children:[(0,P.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,P.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,P.jsx)(`h3`,{"data-testid":`plugin-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,P.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,P.jsx)(O,{testId:`plugin-toggle-${e.name}`,isSelected:e.enabled,isDisabled:n||t,onToggle:a,disableTooltipKey:c.COMMON$DISABLE}):e.isLocal?(0,P.jsx)(`span`,{"data-testid":`plugin-local-badge-${e.name}`,className:g(T,`flex-shrink-0`),children:o(c.SETTINGS$PLUGINS_FILTER_LOCAL)}):(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-install-${e.name}`,isDisabled:n||t,className:`flex-shrink-0 whitespace-nowrap`,onClick:e=>{e?.stopPropagation(),i()},children:o(t?c.SETTINGS$PLUGINS_INSTALLING:c.SETTINGS$PLUGINS_INSTALL)})]}),e.description?(0,P.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,P.jsx)(`span`,{"data-testid":`plugin-version-${e.name}`,className:g(T,`self-start`),children:o(c.SETTINGS$SKILLS_VERSION,{version:e.version})}):null]})}var I=[{value:`all`,labelKey:c.SETTINGS$PLUGINS_FILTER_ALL},{value:`installed`,labelKey:c.SETTINGS$PLUGINS_FILTER_INSTALLED},{value:`available`,labelKey:c.SETTINGS$PLUGINS_FILTER_AVAILABLE},{value:`local`,labelKey:c.SETTINGS$PLUGINS_FILTER_LOCAL}];function ee({search:e,onSearchChange:t,statusFilter:n,onStatusFilterChange:r}){let{t:i}=s(`openhands`);return(0,P.jsxs)(`div`,{"data-testid":`plugins-toolbar`,className:`flex items-stretch gap-2`,children:[(0,P.jsxs)(`div`,{className:g(`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,P.jsx)(m,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,P.jsx)(`input`,{"data-testid":`plugins-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:i(c.SETTINGS$PLUGINS_SEARCH_PLACEHOLDER),"aria-label":i(c.SETTINGS$PLUGINS_SEARCH_PLACEHOLDER),className:g(`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,P.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":i(c.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,P.jsx)(h,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,P.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:I.map(e=>(0,P.jsx)(`button`,{type:`button`,"data-testid":`plugins-filter-${e.value}`,"aria-pressed":n===e.value,onClick:()=>r(e.value),className:g(`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))})]})}function L({plugin:e,isBusy:t=!1,isDisabled:n=!1,onToggle:r,onInstall:i,onUninstall:a,onRefresh:o,onClose:l,onStartConversation:u}){let{t:d}=s(`openhands`),f=n||t;return(0,P.jsx)(_,{onClose:l,"aria-label":e.name,children:(0,P.jsxs)(`div`,{"data-testid":`plugin-detail-modal`,"data-plugin-name":e.name,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,P.jsx)(x,{onClose:l,testId:`plugin-detail-modal-close`}),(0,P.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,P.jsx)(`h2`,{className:g(`pr-6`,v),children:e.name}),e.source?(0,P.jsx)(`p`,{className:`mt-1 break-all text-xs text-tertiary-alt`,children:e.source}):null]}),(0,P.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[e.description?(0,P.jsx)(`p`,{className:`text-sm leading-relaxed text-tertiary-light`,children:e.description}):null,(0,P.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[e.isLocal?(0,P.jsx)(`span`,{className:T,children:d(c.SETTINGS$PLUGINS_FILTER_LOCAL)}):null,e.version?(0,P.jsx)(`span`,{className:T,children:d(c.SETTINGS$SKILLS_VERSION,{version:e.version})}):null,e.ref?(0,P.jsxs)(`span`,{className:T,children:[d(c.SETTINGS$PLUGINS_REF_LABEL),` `,e.ref]}):null,e.repoPath?(0,P.jsxs)(`span`,{className:T,children:[d(c.SETTINGS$PLUGINS_REPO_PATH_LABEL),` `,e.repoPath]}):null]}),e.installed?(0,P.jsx)(D,{testId:`plugin-modal-toggle-${e.name}`,isToggled:e.enabled,onToggle:r,isDisabled:f,togglePosition:`right`,children:d(e.enabled?c.SETTINGS$SKILLS_ENABLED:c.SETTINGS$SKILLS_DISABLED)}):null]}),(0,P.jsxs)(`footer`,{className:`flex flex-shrink-0 flex-wrap justify-end gap-2 px-6 pb-6 pt-4`,children:[e.installed?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-refresh-${e.name}`,isDisabled:f,onClick:o,children:d(c.SETTINGS$PLUGINS_REFRESH)}),(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-uninstall-${e.name}`,isDisabled:f,onClick:a,children:d(c.SETTINGS$PLUGINS_UNINSTALL)})]}):e.isLocal?null:(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-install-${e.name}`,isDisabled:f,onClick:i,children:d(t?c.SETTINGS$PLUGINS_INSTALLING:c.SETTINGS$PLUGINS_INSTALL)}),e.source&&u?(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-start-conversation-${e.name}`,onClick:u,children:d(c.COMMON$START_CONVERSATION)}):null,(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-modal-dismiss`,onClick:l,children:d(c.BUTTON$CLOSE)})]})]})})}function R(){let e=i(),{t}=s(`openhands`);return a({mutationFn:e=>C.installPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:p.installed}),e.invalidateQueries({queryKey:p.marketplace}),l(t(c.SETTINGS$PLUGINS_INSTALL_SUCCESS))},onError:e=>{d(u(e)||t(c.ERROR$GENERIC))}})}function z({onClose:e,onInstalled:t}){let{t:n}=s(`openhands`),r=R(),[i,a]=N.useState(``),[o,l]=N.useState(``),[u,d]=N.useState(``),f=i.trim(),p=f.length>0&&!r.isPending;return(0,P.jsx)(_,{onClose:e,"aria-label":n(c.SETTINGS$PLUGINS_ADD_MODAL_TITLE),children:(0,P.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),p&&r.mutate({source:f,ref:o.trim()||null,repo_path:u.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,P.jsx)(x,{onClose:e,testId:`add-plugin-modal-close`}),(0,P.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,P.jsx)(`h2`,{className:g(`pr-6`,v),children:n(c.SETTINGS$PLUGINS_ADD_MODAL_TITLE)}),(0,P.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:n(c.SETTINGS$PLUGINS_ADD_MODAL_INTRO)})]}),(0,P.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,P.jsx)(S,{testId:`add-plugin-source-input`,label:n(c.SETTINGS$PLUGINS_SOURCE_LABEL),type:`text`,value:i,onChange:a,placeholder:n(c.SETTINGS$PLUGINS_SOURCE_PLACEHOLDER),showRequiredTag:!0}),(0,P.jsx)(S,{testId:`add-plugin-ref-input`,label:n(c.SETTINGS$PLUGINS_REF_LABEL),type:`text`,value:o,onChange:l,showOptionalTag:!0}),(0,P.jsx)(S,{testId:`add-plugin-repo-path-input`,label:n(c.SETTINGS$PLUGINS_REPO_PATH_LABEL),type:`text`,value:u,onChange:d,showOptionalTag:!0})]}),(0,P.jsxs)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:[(0,P.jsx)(y,{type:`button`,variant:`secondary`,onClick:e,testId:`add-plugin-modal-dismiss`,children:n(c.BUTTON$CLOSE)}),(0,P.jsx)(y,{type:`submit`,variant:`primary`,testId:`add-plugin-submit`,isDisabled:!p,children:n(r.isPending?c.SETTINGS$PLUGINS_INSTALLING:c.SETTINGS$PLUGINS_INSTALL)})]})]})})}function B(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});for(let e of t??[]){let t=r.get(e.name);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})}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});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 V(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 H(e,t){return t===`installed`?e.installed:t===`available`?!e.installed&&!e.isLocal:t===`local`?e.isLocal:!0}var U=()=>o({queryKey:p.installed,queryFn:()=>C.listInstalledPlugins(),staleTime:1e3*60*10,refetchOnWindowFocus:!1}),W=()=>o({queryKey:p.local,queryFn:()=>k.getLocalPlugins(),staleTime:1e3*60*10,refetchOnWindowFocus:!1});function G(){let e=i(),{t}=s(`openhands`);return a({mutationFn:({name:e,enabled:t})=>C.setPluginEnabled(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:p.installed})},onError:e=>{d(u(e)||t(c.ERROR$GENERIC))}})}function K(){let e=i(),{t}=s(`openhands`);return a({mutationFn:e=>C.uninstallPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:p.installed}),e.invalidateQueries({queryKey:p.marketplace}),l(t(c.SETTINGS$PLUGINS_UNINSTALL_SUCCESS))},onError:e=>{d(u(e)||t(c.ERROR$GENERIC))}})}function q(){let e=i(),{t}=s(`openhands`);return a({mutationFn:e=>C.refreshPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:p.installed}),l(t(c.SETTINGS$PLUGINS_REFRESH_SUCCESS))},onError:e=>{d(u(e)||t(c.ERROR$GENERIC))}})}function J(e){let t=btoa(JSON.stringify(e));return`/launch?${new URLSearchParams({plugins:t}).toString()}`}var Y=r(function(){let{t:e}=s(`openhands`),{backend:t}=f(),{navigate:n}=b(),r=t.kind===`local`,{data:i,isLoading:a}=A(),{data:o,isLoading:l}=U(),{data:u,isLoading:d}=W(),p=R(),m=G(),h=K(),_=q(),[v,x]=N.useState(``),[S,C]=N.useState(`all`),[w,T]=N.useState(null),[E,D]=N.useState(!1),O=N.useMemo(()=>B(i,o,u),[i,o,u]),k=N.useMemo(()=>O.filter(e=>H(e,S)&&V(e,v)),[O,S,v]),I=w?O.find(e=>e.name===w)??null:null,Y=a||l||d,X=(m.isPending?m.variables?.name:void 0)??(h.isPending?h.variables:void 0)??(_.isPending?_.variables:void 0)??null,Z=e=>X===e.name||p.isPending&&p.variables?.source===e.source,Q=e=>{e.source&&p.mutate({source:e.source,ref:e.ref,repo_path:e.repoPath})},$=(e,t)=>{m.mutate({name:e.name,enabled:t})},te=e=>{h.mutate(e.name,{onSuccess:()=>T(null)})},ne=e=>{_.mutate(e.name)},re=e=>{e.source&&n(J([{source:e.source,ref:e.ref,repo_path:e.repoPath}]))};return(0,P.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,P.jsx)(j,{}),(0,P.jsx)(`main`,{className:g(M,`h-full`),children:(0,P.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,P.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,P.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,P.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(c.SETTINGS$PLUGINS_TITLE)}),(0,P.jsx)(`div`,{"data-testid":`plugins-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(c.SETTINGS$PLUGINS_PAGE_DESCRIPTION)})]}),(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugins-add-plugin-button`,isDisabled:!r,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>D(!0),children:e(c.SETTINGS$PLUGINS_ADD_BUTTON)})]}),Y&&(0,P.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,P.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}),!Y&&O.length===0&&(0,P.jsx)(`div`,{"data-testid":`plugins-empty`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,P.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(c.SETTINGS$PLUGINS_NO_PLUGINS)})}),!Y&&O.length>0&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(ee,{search:v,onSearchChange:x,statusFilter:S,onStatusFilterChange:C}),k.length===0?(0,P.jsx)(`div`,{"data-testid":`plugins-no-match`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,P.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(c.SETTINGS$PLUGINS_NO_MATCH)})}):(0,P.jsx)(`section`,{className:g(`flex min-w-0 flex-col gap-3`,`@container min-w-0 w-full`),children:(0,P.jsx)(`div`,{className:`grid min-w-0 grid-cols-1 gap-3 @min-[600px]:grid-cols-2`,children:k.map(e=>(0,P.jsx)(F,{plugin:e,isBusy:Z(e),isDisabled:!r,onOpen:()=>T(e.name),onInstall:()=>Q(e),onToggle:t=>$(e,t)},e.name))})})]}),I&&(0,P.jsx)(L,{plugin:I,isBusy:Z(I),isDisabled:!r,onToggle:e=>$(I,e),onInstall:()=>Q(I),onUninstall:()=>te(I),onRefresh:()=>ne(I),onStartConversation:()=>re(I),onClose:()=>T(null)}),E&&(0,P.jsx)(z,{onClose:()=>D(!1)})]})})]})});export{Y as default};
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{n as i}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t as a}from"./useMutation-u8UgRgDK.js";import{t as o}from"./useQuery-D5pEZbY0.js";import{t as s}from"./useTranslation-Cbf5AGg_.js";import{t as c}from"./declaration-BGsHjPEW.js";import{C as l,E as u,S as d,n as f,u as p}from"./active-backend-context-DHhm10VS.js";import{t as m}from"./search-dIQ09UY2.js";import{t as h}from"./x-ZE4iplpF.js";import{t as g}from"./utils-DB9LsAzA.js";import{t as _}from"./modal-backdrop-zVwfOJZr.js";import{n as v}from"./modal-classes-3qT9Ap7Q.js";import{t as y}from"./brand-button-B1izLAdR.js";import{n as b}from"./navigation-context-DPs2G0X8.js";import{t as x}from"./modal-close-button-BcIBUdSq.js";import{t as S}from"./settings-input-BsgQWS5R.js";import{t as C}from"./plugins-management-service-DISfOL13.js";import{a as w,i as T,r as E}from"./extension-module-card-classes-9V3J9J_b.js";import{t as D}from"./settings-switch-Bes8dIlV.js";import{n as O}from"./circle-plus-check-toggle-DoFIjVE0.js";import{n as k,t as A}from"./use-plugins-marketplace-DOJp9rlE.js";import{n as j}from"./extensions-navigation-BMc9Nluv.js";import{n as M}from"./settings-like-page-layout-classes-Cdl6jOe5.js";var N=e(t(),1),P=n();function F({plugin:e,isBusy:t=!1,isDisabled:n=!1,onOpen:r,onInstall:i,onToggle:a}){let{t:o}=s(`openhands`);return(0,P.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:g(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,w,E),children:[(0,P.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,P.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,P.jsx)(`h3`,{"data-testid":`plugin-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,P.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,P.jsx)(O,{testId:`plugin-toggle-${e.name}`,isSelected:e.enabled,isDisabled:n||t,onToggle:a,disableTooltipKey:c.COMMON$DISABLE}):e.isLocal?(0,P.jsx)(`span`,{"data-testid":`plugin-local-badge-${e.name}`,className:g(T,`flex-shrink-0`),children:o(c.SETTINGS$PLUGINS_FILTER_LOCAL)}):(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-install-${e.name}`,isDisabled:n||t,className:`flex-shrink-0 whitespace-nowrap`,onClick:e=>{e?.stopPropagation(),i()},children:o(t?c.SETTINGS$PLUGINS_INSTALLING:c.SETTINGS$PLUGINS_INSTALL)})]}),e.description?(0,P.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,P.jsx)(`span`,{"data-testid":`plugin-version-${e.name}`,className:g(T,`self-start`),children:o(c.SETTINGS$SKILLS_VERSION,{version:e.version})}):null]})}var I=[{value:`all`,labelKey:c.SETTINGS$PLUGINS_FILTER_ALL},{value:`installed`,labelKey:c.SETTINGS$PLUGINS_FILTER_INSTALLED},{value:`available`,labelKey:c.SETTINGS$PLUGINS_FILTER_AVAILABLE},{value:`local`,labelKey:c.SETTINGS$PLUGINS_FILTER_LOCAL}];function ee({search:e,onSearchChange:t,statusFilter:n,onStatusFilterChange:r}){let{t:i}=s(`openhands`);return(0,P.jsxs)(`div`,{"data-testid":`plugins-toolbar`,className:`flex items-stretch gap-2`,children:[(0,P.jsxs)(`div`,{className:g(`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,P.jsx)(m,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,P.jsx)(`input`,{"data-testid":`plugins-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:i(c.SETTINGS$PLUGINS_SEARCH_PLACEHOLDER),"aria-label":i(c.SETTINGS$PLUGINS_SEARCH_PLACEHOLDER),className:g(`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,P.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":i(c.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,P.jsx)(h,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,P.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:I.map(e=>(0,P.jsx)(`button`,{type:`button`,"data-testid":`plugins-filter-${e.value}`,"aria-pressed":n===e.value,onClick:()=>r(e.value),className:g(`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))})]})}function L({plugin:e,isBusy:t=!1,isDisabled:n=!1,onToggle:r,onInstall:i,onUninstall:a,onRefresh:o,onClose:l,onStartConversation:u}){let{t:d}=s(`openhands`),f=n||t;return(0,P.jsx)(_,{onClose:l,"aria-label":e.name,children:(0,P.jsxs)(`div`,{"data-testid":`plugin-detail-modal`,"data-plugin-name":e.name,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,P.jsx)(x,{onClose:l,testId:`plugin-detail-modal-close`}),(0,P.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,P.jsx)(`h2`,{className:g(`pr-6`,v),children:e.name}),e.source?(0,P.jsx)(`p`,{className:`mt-1 break-all text-xs text-tertiary-alt`,children:e.source}):null]}),(0,P.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[e.description?(0,P.jsx)(`p`,{className:`text-sm leading-relaxed text-tertiary-light`,children:e.description}):null,(0,P.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[e.isLocal?(0,P.jsx)(`span`,{className:T,children:d(c.SETTINGS$PLUGINS_FILTER_LOCAL)}):null,e.version?(0,P.jsx)(`span`,{className:T,children:d(c.SETTINGS$SKILLS_VERSION,{version:e.version})}):null,e.ref?(0,P.jsxs)(`span`,{className:T,children:[d(c.SETTINGS$PLUGINS_REF_LABEL),` `,e.ref]}):null,e.repoPath?(0,P.jsxs)(`span`,{className:T,children:[d(c.SETTINGS$PLUGINS_REPO_PATH_LABEL),` `,e.repoPath]}):null]}),e.installed?(0,P.jsx)(D,{testId:`plugin-modal-toggle-${e.name}`,isToggled:e.enabled,onToggle:r,isDisabled:f,togglePosition:`right`,children:d(e.enabled?c.SETTINGS$SKILLS_ENABLED:c.SETTINGS$SKILLS_DISABLED)}):null]}),(0,P.jsxs)(`footer`,{className:`flex flex-shrink-0 flex-wrap justify-end gap-2 px-6 pb-6 pt-4`,children:[e.installed?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-refresh-${e.name}`,isDisabled:f,onClick:o,children:d(c.SETTINGS$PLUGINS_REFRESH)}),(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-uninstall-${e.name}`,isDisabled:f,onClick:a,children:d(c.SETTINGS$PLUGINS_UNINSTALL)})]}):e.isLocal?null:(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-install-${e.name}`,isDisabled:f,onClick:i,children:d(t?c.SETTINGS$PLUGINS_INSTALLING:c.SETTINGS$PLUGINS_INSTALL)}),e.source&&u?(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-start-conversation-${e.name}`,onClick:u,children:d(c.COMMON$START_CONVERSATION)}):null,(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugin-detail-modal-dismiss`,onClick:l,children:d(c.BUTTON$CLOSE)})]})]})})}function R(){let e=i(),{t}=s(`openhands`);return a({mutationFn:e=>C.installPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:p.installed}),e.invalidateQueries({queryKey:p.marketplace}),l(t(c.SETTINGS$PLUGINS_INSTALL_SUCCESS))},onError:e=>{d(u(e)||t(c.ERROR$GENERIC))}})}function z({onClose:e,onInstalled:t}){let{t:n}=s(`openhands`),r=R(),[i,a]=N.useState(``),[o,l]=N.useState(``),[u,d]=N.useState(``),f=i.trim(),p=f.length>0&&!r.isPending;return(0,P.jsx)(_,{onClose:e,"aria-label":n(c.SETTINGS$PLUGINS_ADD_MODAL_TITLE),children:(0,P.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),p&&r.mutate({source:f,ref:o.trim()||null,repo_path:u.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,P.jsx)(x,{onClose:e,testId:`add-plugin-modal-close`}),(0,P.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,P.jsx)(`h2`,{className:g(`pr-6`,v),children:n(c.SETTINGS$PLUGINS_ADD_MODAL_TITLE)}),(0,P.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:n(c.SETTINGS$PLUGINS_ADD_MODAL_INTRO)})]}),(0,P.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,P.jsx)(S,{testId:`add-plugin-source-input`,label:n(c.SETTINGS$PLUGINS_SOURCE_LABEL),type:`text`,value:i,onChange:a,placeholder:n(c.SETTINGS$PLUGINS_SOURCE_PLACEHOLDER),showRequiredTag:!0}),(0,P.jsx)(S,{testId:`add-plugin-ref-input`,label:n(c.SETTINGS$PLUGINS_REF_LABEL),type:`text`,value:o,onChange:l,showOptionalTag:!0}),(0,P.jsx)(S,{testId:`add-plugin-repo-path-input`,label:n(c.SETTINGS$PLUGINS_REPO_PATH_LABEL),type:`text`,value:u,onChange:d,showOptionalTag:!0})]}),(0,P.jsxs)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:[(0,P.jsx)(y,{type:`button`,variant:`secondary`,onClick:e,testId:`add-plugin-modal-dismiss`,children:n(c.BUTTON$CLOSE)}),(0,P.jsx)(y,{type:`submit`,variant:`primary`,testId:`add-plugin-submit`,isDisabled:!p,children:n(r.isPending?c.SETTINGS$PLUGINS_INSTALLING:c.SETTINGS$PLUGINS_INSTALL)})]})]})})}function B(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});for(let e of t??[]){let t=r.get(e.name);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})}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});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 V(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 H(e,t){return t===`installed`?e.installed:t===`available`?!e.installed&&!e.isLocal:t===`local`?e.isLocal:!0}var U=()=>o({queryKey:p.installed,queryFn:()=>C.listInstalledPlugins(),staleTime:1e3*60*10,refetchOnWindowFocus:!1}),W=()=>o({queryKey:p.local,queryFn:()=>k.getLocalPlugins(),staleTime:1e3*60*10,refetchOnWindowFocus:!1});function G(){let e=i(),{t}=s(`openhands`);return a({mutationFn:({name:e,enabled:t})=>C.setPluginEnabled(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:p.installed})},onError:e=>{d(u(e)||t(c.ERROR$GENERIC))}})}function K(){let e=i(),{t}=s(`openhands`);return a({mutationFn:e=>C.uninstallPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:p.installed}),e.invalidateQueries({queryKey:p.marketplace}),l(t(c.SETTINGS$PLUGINS_UNINSTALL_SUCCESS))},onError:e=>{d(u(e)||t(c.ERROR$GENERIC))}})}function q(){let e=i(),{t}=s(`openhands`);return a({mutationFn:e=>C.refreshPlugin(e),onSuccess:()=>{e.invalidateQueries({queryKey:p.installed}),l(t(c.SETTINGS$PLUGINS_REFRESH_SUCCESS))},onError:e=>{d(u(e)||t(c.ERROR$GENERIC))}})}function J(e){let t=btoa(JSON.stringify(e));return`/launch?${new URLSearchParams({plugins:t}).toString()}`}var Y=r(function(){let{t:e}=s(`openhands`),{backend:t}=f(),{navigate:n}=b(),r=t.kind===`local`,{data:i,isLoading:a}=A(),{data:o,isLoading:l}=U(),{data:u,isLoading:d}=W(),p=R(),m=G(),h=K(),_=q(),[v,x]=N.useState(``),[S,C]=N.useState(`all`),[w,T]=N.useState(null),[E,D]=N.useState(!1),O=N.useMemo(()=>B(i,o,u),[i,o,u]),k=N.useMemo(()=>O.filter(e=>H(e,S)&&V(e,v)),[O,S,v]),I=w?O.find(e=>e.name===w)??null:null,Y=a||l||d,X=(m.isPending?m.variables?.name:void 0)??(h.isPending?h.variables:void 0)??(_.isPending?_.variables:void 0)??null,Z=e=>X===e.name||p.isPending&&p.variables?.source===e.source,Q=e=>{e.source&&p.mutate({source:e.source,ref:e.ref,repo_path:e.repoPath})},$=(e,t)=>{m.mutate({name:e.name,enabled:t})},te=e=>{h.mutate(e.name,{onSuccess:()=>T(null)})},ne=e=>{_.mutate(e.name)},re=e=>{e.source&&n(J([{source:e.source,ref:e.ref,repo_path:e.repoPath}]))};return(0,P.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,P.jsx)(j,{}),(0,P.jsx)(`main`,{className:g(M,`h-full`),children:(0,P.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,P.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,P.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,P.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(c.SETTINGS$PLUGINS_TITLE)}),(0,P.jsx)(`div`,{"data-testid":`plugins-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(c.SETTINGS$PLUGINS_PAGE_DESCRIPTION)})]}),(0,P.jsx)(y,{type:`button`,variant:`secondary`,testId:`plugins-add-plugin-button`,isDisabled:!r,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>D(!0),children:e(c.SETTINGS$PLUGINS_ADD_BUTTON)})]}),Y&&(0,P.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,P.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}),!Y&&O.length===0&&(0,P.jsx)(`div`,{"data-testid":`plugins-empty`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,P.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(c.SETTINGS$PLUGINS_NO_PLUGINS)})}),!Y&&O.length>0&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(ee,{search:v,onSearchChange:x,statusFilter:S,onStatusFilterChange:C}),k.length===0?(0,P.jsx)(`div`,{"data-testid":`plugins-no-match`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,P.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(c.SETTINGS$PLUGINS_NO_MATCH)})}):(0,P.jsx)(`section`,{className:g(`flex min-w-0 flex-col gap-3`,`@container min-w-0 w-full`),children:(0,P.jsx)(`div`,{className:`grid min-w-0 grid-cols-1 gap-3 @min-[600px]:grid-cols-2`,children:k.map(e=>(0,P.jsx)(F,{plugin:e,isBusy:Z(e),isDisabled:!r,onOpen:()=>T(e.name),onInstall:()=>Q(e),onToggle:t=>$(e,t)},e.name))})})]}),I&&(0,P.jsx)(L,{plugin:I,isBusy:Z(I),isDisabled:!r,onToggle:e=>$(I,e),onInstall:()=>Q(I),onUninstall:()=>te(I),onRefresh:()=>ne(I),onStartConversation:()=>re(I),onClose:()=>T(null)}),E&&(0,P.jsx)(z,{onClose:()=>D(!1)})]})})]})});export{Y as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{t as i}from"./Trans-DqF_OEZB.js";import{t as a}from"./useTranslation-Cbf5AGg_.js";import{t as o}from"./declaration-BGsHjPEW.js";import{E as s,S as c}from"./active-backend-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~jkpzbynd-CkpBIhVe.js";import{t as i}from"./Trans-DqF_OEZB.js";import{t as a}from"./useTranslation-Cbf5AGg_.js";import{t as o}from"./declaration-BGsHjPEW.js";import{E as s,S as c}from"./active-backend-context-DHhm10VS.js";import{t as l}from"./search-dIQ09UY2.js";import{t as u}from"./x-ZE4iplpF.js";import{t as d}from"./utils-DB9LsAzA.js";import{t as f}from"./modal-backdrop-zVwfOJZr.js";import{n as p}from"./modal-classes-3qT9Ap7Q.js";import{t as m}from"./brand-button-B1izLAdR.js";import{t as h}from"./modal-close-button-BcIBUdSq.js";import{r as g}from"./use-settings-BeJap6YL.js";import{t as _}from"./skills-EqzxYBvT.js";import{t as v}from"./use-save-settings-DiDEbIJw.js";import{t as y}from"./checkmark-h7udgXMM.js";import{t as b}from"./copy-BLmGeJcd.js";import{a as x,r as S}from"./extension-module-card-classes-9V3J9J_b.js";import{t as C}from"./settings-switch-Bes8dIlV.js";import{n as w,t as T}from"./skill-card-pill-row-BPYKQ3IN.js";import{n as E}from"./circle-plus-check-toggle-DoFIjVE0.js";import{t as D}from"./use-skills-Blpg2BqE.js";import{n as O}from"./extensions-navigation-BMc9Nluv.js";import{n as k,t as A}from"./use-launch-skill-in-chat-DJWEfVc5.js";import{t as j}from"./enum-filter-dropdown-JLYv1t8L.js";import{n as ee}from"./settings-like-page-layout-classes-Cdl6jOe5.js";var M=e(t(),1),N=n();function P({skillName:e,className:t}){return(0,N.jsx)(`span`,{"aria-hidden":`true`,title:e,"data-testid":`skill-icon-${e}`,className:d(`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`,t),children:(0,N.jsx)(_,{})})}var F=/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;function te(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 ne(e){let t=e.match(F);return t?e.slice(t[0].length).trim():e.trim()}function re(e){let t=e.replace(/^#+\s+[^\n]+\n+/,``).trim();return t.split(/\n\s*\n/).map(e=>e.replace(/\s+/g,` `).trim()).find(e=>e.length>0)??t.replace(/\s+/g,` `).trim()}function I(e){let t=e.description?.trim();if(t)return t;let n=e.content?.trim();if(!n)return``;let r=n.match(F);if(r){let e=te(r[1]);if(e)return e}return re(ne(n))}var L=`inline-flex shrink-0 items-center whitespace-nowrap rounded-full border border-text-secondary/35 bg-text-secondary/12 px-2 py-0.5 text-[11px] font-medium leading-4 text-tertiary-light`,R={agentskills:{labelKey:o.SETTINGS$SKILLS_TYPE_AGENTSKILLS},knowledge:{labelKey:o.SETTINGS$SKILLS_TYPE_KNOWLEDGE},repo:{labelKey:o.SETTINGS$SKILLS_TYPE_REPO}};function z({type:e}){let{t}=a(`openhands`),n=R[e];return(0,N.jsx)(`span`,{"data-testid":`skill-type-badge-${e}`,className:L,children:t(n.labelKey)})}function B(e,t,n){if(e)return`${e}-${t}-${n}`}function V(e,t,n={}){let{variant:r=`card`,testIdPrefix:i}=n,a=[{id:`type-${e.type}`,node:(0,N.jsx)(z,{type:e.type})}];if(e.version&&a.push({id:`version-${e.version}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`version`)??`skill-version-${e.name}`,className:T,children:t(o.SETTINGS$SKILLS_VERSION,{version:e.version})})}),r===`detail`&&e.license&&a.push({id:`license-${e.license}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`license`),className:T,children:e.license})}),r===`detail`&&e.compatibility&&a.push({id:`compatibility-${e.compatibility}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`compatibility`),className:T,children:e.compatibility})}),e.disable_model_invocation&&a.push({id:`disable-model-invocation`,node:(0,N.jsxs)(`span`,{"data-testid":B(i,e.name,`disable-model-invocation`)??`skill-disable-model-invocation-${e.name}`,className:`inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-full border border-[rgba(248,113,113,0.35)] bg-[rgba(248,113,113,0.12)] px-2 py-0.5 text-[11px] font-medium leading-4 text-[#fca5a5]`,children:[(0,N.jsx)(`span`,{className:`size-1.5 rounded-full bg-[#fca5a5]`}),t(o.SETTINGS$SKILLS_DISABLE_MODEL_INVOCATION)]})}),r===`detail`&&e.allowed_tools)for(let t of e.allowed_tools)a.push({id:`allowed-tool-${t}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`tool-${t}`),className:d(T,`font-mono`),children:t})});if(r===`detail`&&e.metadata)for(let[t,n]of Object.entries(e.metadata))a.push({id:`metadata-${t}`,node:(0,N.jsxs)(`span`,{"data-testid":B(i,e.name,`metadata-${t}`),className:T,children:[(0,N.jsxs)(`span`,{className:`font-mono text-[10px] text-tertiary-light`,children:[t,`:`]}),` `,n]})});for(let t of e.triggers??[])a.push({id:`trigger-${t}`,node:(0,N.jsx)(`span`,{"data-testid":B(i,e.name,`trigger-${t}`),className:T,children:t})});return a}function H(e){let t=e?.trim();return t?!!(/^https?:\/\//i.test(t)||t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`../`)||t.startsWith(`~`)||/^[A-Za-z]:[\\/]/.test(t)||t.includes(`/`)||t.includes(`\\`)):!1}function U({skill:e,enabled:t,onOpen:n,onToggle:r}){let{t:i}=a(`openhands`),[s,c]=M.useState(!1),l=I(e),u=M.useMemo(()=>V(e,i),[e,i]),f=H(e.source);return M.useEffect(()=>{if(!s)return;let e=setTimeout(()=>c(!1),2e3);return()=>clearTimeout(e)},[s]),(0,N.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:d(`flex min-w-0 flex-col gap-3 overflow-hidden p-4`,x,S),children:(0,N.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,N.jsx)(P,{skillName:e.name}),(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,N.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,N.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,N.jsx)(`h3`,{"data-testid":`skill-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),e.source?(0,N.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,N.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,N.jsx)(`button`,{type:`button`,"data-testid":`skill-copy-source-${e.name}`,"aria-label":i(s?o.BUTTON$COPIED:o.SETTINGS$SKILLS_COPY_PATH),disabled:s,onClick:async t=>{t.stopPropagation(),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,N.jsx)(y,{width:12,height:12}):(0,N.jsx)(b,{width:12,height:12})}):null]}):null]}),(0,N.jsx)(E,{testId:`skill-toggle-${e.name}`,isSelected:t,onToggle:r,disableTooltipKey:o.COMMON$DISABLE})]}),l?(0,N.jsx)(`div`,{"data-testid":`skill-description-${e.name}`,className:`min-w-0`,children:(0,N.jsx)(`p`,{className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:l})}):null,u.length>0?(0,N.jsx)(w,{pills:u,testId:`skill-triggers-${e.name}`}):null]})]})})}var W=`https://docs.openhands.dev/overview/skills/adding#adding-new-skills`,G=`/add-skill https://github.com/OpenHands/extensions/tree/main/skills/codereview`;function K(e){return e.name===`add-skill`?G:`/${e.name} `}function q({testId:e,label:t,value:n}){return(0,N.jsxs)(`label`,{className:`flex min-w-0 w-full flex-col gap-2.5`,children:[(0,N.jsx)(`span`,{className:`text-sm`,children:t}),(0,N.jsx)(`textarea`,{"data-testid":e,readOnly:!0,value:n,rows:Math.min(12,Math.max(4,n.split(`
|
|
2
2
|
`).length)),className:d(`bg-[var(--oh-surface-raised)] border border-[var(--oh-border-subtle)] w-full min-w-0 rounded-sm p-2 text-sm`,`cursor-not-allowed resize-none custom-scrollbar`)})]})}function J({skill:e,enabled:t,onToggle:n,onClose:r}){let{t:i}=a(`openhands`),s=A(),[c,l]=M.useState(!1),u=M.useMemo(()=>K(e),[e]),d=I(e),g=M.useMemo(()=>V(e,i,{variant:`detail`,testIdPrefix:`skill-modal-pill`}),[e,i]),_=H(e.source);return M.useEffect(()=>{if(!c)return;let e=setTimeout(()=>l(!1),2e3);return()=>clearTimeout(e)},[c]),(0,N.jsx)(f,{onClose:r,"aria-label":e.name,children:(0,N.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,N.jsx)(h,{onClose:r,testId:`skill-detail-modal-close`}),(0,N.jsxs)(`div`,{className:`flex items-start gap-3 pr-6`,children:[(0,N.jsx)(P,{skillName:e.name}),(0,N.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,N.jsx)(`h2`,{"data-testid":`skill-modal-name-${e.name}`,className:p,children:e.name}),e.source?(0,N.jsxs)(`div`,{className:`mt-0.5 flex min-w-0 items-center gap-1`,children:[(0,N.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}),_?(0,N.jsx)(`button`,{type:`button`,"data-testid":`skill-modal-copy-source-${e.name}`,"aria-label":i(c?o.BUTTON$COPIED:o.SETTINGS$SKILLS_COPY_PATH),disabled:c,onClick:async()=>{e.source&&(await navigator.clipboard.writeText(e.source),l(!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:c?(0,N.jsx)(y,{width:12,height:12}):(0,N.jsx)(b,{width:12,height:12})}):null]}):null]})]}),(0,N.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,N.jsx)(C,{testId:`skill-modal-toggle-${e.name}`,isToggled:t,onToggle:n,togglePosition:`right`,children:i(t?o.SETTINGS$SKILLS_ENABLED:o.SETTINGS$SKILLS_DISABLED)})}),d?(0,N.jsx)(`p`,{"data-testid":`skill-modal-description-${e.name}`,className:`text-xs text-tertiary-light`,children:d}):null,g.length>0?(0,N.jsx)(w,{pills:g,testId:`skill-modal-pills-${e.name}`}):null,e.content?(0,N.jsx)(q,{testId:`skill-modal-field-content-${e.name}`,label:i(o.SETTINGS$SKILLS_CONTENT),value:e.content}):null,(0,N.jsxs)(`div`,{className:`mt-2 flex justify-end gap-2`,children:[(0,N.jsx)(m,{type:`button`,variant:`secondary`,onClick:r,testId:`skill-detail-close`,children:i(o.BUTTON$CLOSE)}),(0,N.jsx)(m,{type:`button`,variant:`primary`,isDisabled:!t,onClick:()=>s(u,r),testId:`skill-detail-use-skill-${e.name}`,startContent:(0,N.jsx)(k,{className:`size-4`,"aria-hidden":!0}),children:i(o.SETTINGS$SKILLS_USE_SKILL_BUTTON)})]})]})})}var Y=[o.SETTINGS$SKILLS_ADD_MODAL_STEP_1,o.SETTINGS$SKILLS_ADD_MODAL_STEP_2,o.SETTINGS$SKILLS_ADD_MODAL_STEP_3,o.SETTINGS$SKILLS_ADD_MODAL_STEP_4,o.SETTINGS$SKILLS_ADD_MODAL_STEP_5],X={cmd:(0,N.jsx)(Z,{}),path:(0,N.jsx)(Z,{}),env:(0,N.jsx)(Z,{})};function Z({children:e}){return(0,N.jsx)(`code`,{className:d(`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 ie(){let{t:e}=a(`openhands`),[t,n]=M.useState(!1);return M.useEffect(()=>{if(!t)return;let e=setTimeout(()=>n(!1),2e3);return()=>clearTimeout(e)},[t]),(0,N.jsxs)(`div`,{className:`relative`,children:[(0,N.jsx)(`pre`,{"data-testid":`add-skill-modal-example`,className:d(`overflow-x-auto rounded-sm border border-[var(--oh-border-subtle)]`,`bg-[var(--oh-surface-raised)] p-2 pr-10 text-xs text-white`),children:G}),(0,N.jsx)(`button`,{type:`button`,"data-testid":`add-skill-modal-example-copy`,"aria-label":e(t?o.BUTTON$COPIED:o.BUTTON$COPY),disabled:t,onClick:async()=>{await navigator.clipboard.writeText(G),n(!0)},className:d(`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,N.jsx)(y,{width:14,height:14}):(0,N.jsx)(b,{width:14,height:14})})]})}function Q({i18nKey:e}){return(0,N.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:(0,N.jsx)(i,{ns:`openhands`,i18nKey:e,components:X})})}function ae({onClose:e}){let{t}=a(`openhands`);return(0,N.jsx)(f,{onClose:e,"aria-label":t(o.SETTINGS$SKILLS_ADD_MODAL_TITLE),children:(0,N.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,N.jsx)(h,{onClose:e,testId:`add-skill-modal-close`}),(0,N.jsxs)(`header`,{className:`flex-shrink-0 px-6 pb-4 pt-6`,children:[(0,N.jsx)(`h2`,{className:d(`pr-6`,p),children:t(o.SETTINGS$SKILLS_ADD_MODAL_TITLE)}),(0,N.jsx)(`p`,{className:`mt-4 text-sm text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_INTRO)})]}),(0,N.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-6 custom-scrollbar`,children:[(0,N.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,N.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_CHAT_TITLE)}),(0,N.jsx)(Q,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_CHAT_BODY}),(0,N.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_EXAMPLE_LABEL)}),(0,N.jsx)(ie,{}),(0,N.jsx)(`ol`,{className:`list-decimal space-y-1 pl-4 text-xs leading-relaxed text-tertiary-light`,children:Y.map(e=>(0,N.jsx)(`li`,{children:e===o.SETTINGS$SKILLS_ADD_MODAL_STEP_3?(0,N.jsx)(i,{ns:`openhands`,i18nKey:e,components:X}):t(e)},e))})]}),(0,N.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS_TITLE)}),(0,N.jsx)(`p`,{className:`text-xs leading-relaxed text-tertiary-light`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_URL_FORMATS)})]}),(0,N.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,N.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_STORAGE_TITLE)}),(0,N.jsx)(Q,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_STORAGE_BODY})]}),(0,N.jsx)(Q,{i18nKey:o.SETTINGS$SKILLS_ADD_MODAL_PRIVATE_REPOS}),(0,N.jsx)(`a`,{href:W,target:`_blank`,rel:`noreferrer`,"data-testid":`add-skill-modal-docs-link`,className:`self-start text-xs text-[var(--oh-muted)] transition-colors hover:text-white hover:underline`,children:t(o.SETTINGS$SKILLS_ADD_MODAL_VIEW_DOCS)})]}),(0,N.jsx)(`footer`,{className:`flex flex-shrink-0 justify-end gap-2 px-6 pb-6 pt-4`,children:(0,N.jsx)(m,{type:`button`,variant:`secondary`,onClick:e,testId:`add-skill-modal-dismiss`,children:t(o.BUTTON$CLOSE)})})]})})}var oe=[`all`,`agentskills`,`knowledge`,`repo`],$={all:o.SETTINGS$SKILLS_TYPE_ALL,agentskills:o.SETTINGS$SKILLS_TYPE_AGENTSKILLS,knowledge:o.SETTINGS$SKILLS_TYPE_KNOWLEDGE,repo:o.SETTINGS$SKILLS_TYPE_REPO};function se({value:e,onChange:t}){return(0,N.jsx)(j,{testId:`skills-type-filter`,value:e,onChange:t,options:oe,labelKeyByValue:$})}function ce({search:e,onSearchChange:t,typeFilter:n,onTypeFilterChange:r}){let{t:i}=a(`openhands`);return(0,N.jsxs)(`div`,{"data-testid":`skills-toolbar`,className:`flex items-stretch gap-2`,children:[(0,N.jsxs)(`div`,{className:d(`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,N.jsx)(l,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,N.jsx)(`input`,{"data-testid":`skills-search-input`,type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:i(o.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),"aria-label":i(o.SETTINGS$SKILLS_SEARCH_PLACEHOLDER),className:d(`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,N.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":i(o.MCP$SEARCH_CLEAR),className:`mr-2 p-1 rounded text-tertiary-alt hover:text-white cursor-pointer`,children:(0,N.jsx)(u,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),(0,N.jsx)(se,{value:n,onChange:r})]})}function le(e,t){if(!t)return!0;let n=[e.name,I(e),e.description??``,e.content??``,e.license??``,e.compatibility??``,...e.triggers??[],...e.allowed_tools??[]],r=t.toLowerCase();return n.some(e=>e.toLowerCase().includes(r))}function ue(){let{t:e}=a(`openhands`),{mutate:t}=v(),{data:n,isLoading:r}=g(),{data:i,isLoading:l}=D(),[u,f]=M.useState(new Set),[p,h]=M.useState(!1),[_,y]=M.useState(``),[b,x]=M.useState(`all`),[S,C]=M.useState(null),[w,T]=M.useState(!1);M.useEffect(()=>{r||!n||(f(new Set(n.disabled_skills??[])),h(!0))},[r,n?.disabled_skills]);let E=(e,t)=>{f(n=>{let r=new Set(n);return t?r.delete(e):r.add(e),r})};M.useEffect(()=>{p&&t({disabled_skills:Array.from(u)},{onError:t=>{c(s(t)||e(o.ERROR$GENERIC))}})},[u,p,t,e]);let k=r||l||!n,A=M.useMemo(()=>i?i.filter(e=>(b===`all`||e.type===b)&&le(e,_)):[],[i,b,_]);return(0,N.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,N.jsx)(O,{}),(0,N.jsx)(`main`,{className:d(ee,`h-full`),children:(0,N.jsxs)(`div`,{className:`mx-auto flex w-full min-w-0 max-w-[800px] flex-col gap-6`,children:[(0,N.jsxs)(`div`,{className:`flex min-w-0 items-start justify-between gap-4`,children:[(0,N.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,N.jsx)(`h2`,{className:`text-xl font-semibold leading-6 text-foreground`,children:e(o.SETTINGS$SKILLS_TITLE)}),(0,N.jsx)(`div`,{"data-testid":`skills-settings-description`,className:`max-w-2xl text-sm text-tertiary-light`,children:e(o.SETTINGS$SKILLS_PAGE_DESCRIPTION)})]}),(0,N.jsx)(m,{type:`button`,variant:`secondary`,testId:`skills-add-skill-button`,className:`flex-shrink-0 whitespace-nowrap`,onClick:()=>T(!0),children:e(o.SETTINGS$SKILLS_ADD_BUTTON)})]}),k&&(0,N.jsx)(`div`,{className:`flex flex-col gap-4`,children:[1,2,3].map(e=>(0,N.jsx)(`div`,{className:`h-24 rounded-2xl bg-tertiary animate-pulse`},e))}),!k&&(!i||i.length===0)&&(0,N.jsx)(`div`,{"data-testid":`skills-empty`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,N.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(o.SETTINGS$SKILLS_NO_SKILLS)})}),!k&&i&&i.length>0&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(ce,{search:_,onSearchChange:y,typeFilter:b,onTypeFilterChange:x}),A.length===0?(0,N.jsx)(`div`,{"data-testid":`skills-no-match`,className:`rounded-xl border border-[var(--oh-border)] p-8 text-center`,children:(0,N.jsx)(`p`,{className:`text-sm text-tertiary-light`,children:e(o.SETTINGS$SKILLS_NO_MATCH)})}):(0,N.jsx)(`section`,{className:d(`flex min-w-0 flex-col gap-3`,`@container min-w-0 w-full`),children:(0,N.jsx)(`div`,{className:`grid min-w-0 grid-cols-1 gap-3 @min-[600px]:grid-cols-2`,children:A.map(e=>(0,N.jsx)(U,{skill:e,enabled:!u.has(e.name),onOpen:()=>C(e),onToggle:t=>E(e.name,t)},e.name))})})]}),S&&(0,N.jsx)(J,{skill:S,enabled:!u.has(S.name),onToggle:e=>E(S.name,e),onClose:()=>C(null)}),w&&(0,N.jsx)(ae,{onClose:()=>T(!1)})]})})]})}var de=r(ue);export{de as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-Cbf5AGg_.js";import{t as i}from"./declaration-BGsHjPEW.js";import{t as a}from"./utils-DB9LsAzA.js";import{r as o}from"./typography-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-Cbf5AGg_.js";import{t as i}from"./declaration-BGsHjPEW.js";import{t as a}from"./utils-DB9LsAzA.js";import{r as o}from"./typography-CzfoD9DY.js";import{t as s}from"./u-check-circle-BqoIxNz_.js";import{n as c,t as l}from"./u-check-circle-half-MsShT8Ec.js";import{t as u}from"./use-task-list-CfisapBW.js";import{t as d}from"./conversation-tab-empty-state-CNUmIms2.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)(c,{className:`w-4 h-4 text-[#ffffff]`});case`in_progress`:return(0,p.jsx)(l,{className:`w-4 h-4 text-[#ffffff]`});case`done`:return(0,p.jsx)(s,{className:`w-4 h-4 text-[var(--oh-muted)]`});default:return(0,p.jsx)(c,{className:`w-4 h-4 text-[#ffffff]`})}},[e.status]),u=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)(o.Text,{className:a(`text-[12px]`,u?`text-[var(--oh-muted)]`:`text-white`),children:e.title}),e.notes&&(0,p.jsxs)(o.Text,{className:`text-[10px] text-[var(--oh-muted)]`,children:[t(i.TASK_TRACKING_OBSERVATION$TASK_NOTES),`: `,e.notes]})]})]})}function h(){let{t:e}=r(`openhands`),{taskList:t}=u();return t.length===0?(0,p.jsx)(d,{icon:(0,p.jsx)(s,{}),children:e(i.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:a(`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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor~module-D5a_AClf.js","assets/rolldown-runtime-BFRubm34.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{St as e}from"./vendor-styling-CI0PQ3ab.js";import{i as t,n,r}from"./client-source-CtQjJEy6.js";var i=`openhands-telemetry-consent`,a=`openhands-telemetry-consent-pending-cloud-sync`,o=`openhands-telemetry-consent-change`,s=`openhands-telemetry-first-use`,c=`openhands-telemetry-session`,l=`agent-canvas`,u=`phc_BgzfxKdgsYMLFTmJqt424ZoyVHvKFfrwttLimzdYTKFK`,d=`https://z.openhands.dev`,f=`https://us.posthog.com`,p=null,m=null,h,g={},_=!1,v,y=0,b=-1,x=Object.freeze({client_source:n,client_version:r,package_name:t.name,package_version:t.version});function S(e){return e?{...e,properties:{...e.properties,...x}}:null}function C(e){_||P()!==`granted`?e.opt_out_capturing():e.opt_in_capturing()}function w(e,t=!1){e.reset(t),b=-1,C(e)}function T(e){if(v===void 0||!H())return;let t=v?.distinctId,n=e.get_property(`$user_id`);if(n!=null&&n!==t&&w(e),v===null){b=y;return}(e.get_property(`$user_id`)!==v.distinctId||b!==y)&&(e.identify(v.distinctId,v.properties),b=y)}function E(e,t){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])}function D(e){if(e===!1){if(_)return;_=!0,p?.opt_out_capturing(),L();return}let t=_;if(_=!1,!p&&!m){let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));g={...g,...t}}t&&(p&&(C(p),T(p)),L())}function O(){return _?null:{apiKey:g.apiKey||u,apiHost:g.apiHost||d,uiHost:g.uiHost||f}}function k(){return typeof window<`u`&&typeof localStorage<`u`}async function A(){if(!k())return null;if(p)return p;try{let{default:t}=await e(async()=>{let{default:e}=await import(`./vendor~module-D5a_AClf.js`).then(e=>e.t);return{default:e}},__vite__mapDeps([0,1]));return t}catch{return null}}function j(){return!!(_||typeof process<`u`&&{}?.DO_NOT_TRACK===`1`||typeof navigator<`u`&&(navigator.doNotTrack===`1`||typeof window<`u`&&window.doNotTrack===`1`))}function M(e){p||(h=e)}async function N(e=!1){if(p)return p;if(m)return m;m=(async()=>{let t=O();if(!t)return null;let n=await A();if(!n)return null;let r=n.init(t.apiKey,{api_host:t.apiHost,ui_host:t.uiHost,opt_out_capturing_by_default:!e,capture_pageview:!1,autocapture:!1,persistence:`localStorage`,persistence_name:l,consent_persistence_name:`${l}-consent`,person_profiles:`identified_only`,disable_session_recording:!0,bootstrap:h,before_send:S},l);return r?(p=r,h=void 0,_?p.opt_out_capturing():P()===`granted`?(p.opt_in_capturing(),T(p)):e||p.opt_out_capturing(),p):null})();try{return await m}finally{p||(m=null)}}function P(){if(!k())return`pending`;if(j())return`denied`;try{let e=localStorage.getItem(i);if(e===`granted`||e===`denied`)return e}catch{}return`pending`}function F(){if(!k())return null;try{let e=localStorage.getItem(a);return e===`granted`||e===`denied`?e:null}catch{return null}}function I(e){if(!k())return()=>{};let t=t=>{(t.key===i||t.key===a)&&e()};return window.addEventListener(o,e),window.addEventListener(`storage`,t),()=>{window.removeEventListener(o,e),window.removeEventListener(`storage`,t)}}function L(){k()&&window.dispatchEvent(new Event(o))}function R(e){if(k())try{localStorage.setItem(a,e)}catch{}}function z(e){if(k())try{if(e!==void 0&&localStorage.getItem(a)!==e)return;localStorage.removeItem(a),L()}catch{}}async function B(e,{syncToCloud:t=!0}={}){if(k())try{if(localStorage.setItem(i,e),_)return;let t=p??await N();if(!t)return;e===`granted`?(t.opt_in_capturing(),T(t)):t.get_property(`$user_id`)==null?t.opt_out_capturing():w(t)}catch{}finally{t&&R(e),L()}}async function V(e,t={}){let n=e===null?null:{distinctId:e,properties:t};if(v===n||v!=null&&n!==null&&v.distinctId===n.distinctId&&E(v.properties,t)||(v=n,y+=1,b=-1,!H()))return;let r=p??await N();r&&H()&&T(r)}function H(){return P()===`granted`}function U(){if(!k())return!1;try{return localStorage.getItem(s)===`true`}catch{return!1}}function W(){if(k())try{localStorage.setItem(s,`true`)}catch{}}async function G(){if(j()||U())return;let e=await N(!0);!e||j()||((e.has_opted_out_capturing?.()??!1)&&e.opt_in_capturing(),e.capture(`canvas_install`,{platform:typeof navigator<`u`?navigator.platform:`unknown`,user_agent:typeof navigator<`u`?navigator.userAgent:`unknown`,referrer:typeof document<`u`?document.referrer:``,url_origin:typeof window<`u`?window.location.origin:``,embedded:typeof window<`u`&&window.self!==window.top}),W(),P()!==`granted`&&e.opt_out_capturing())}function K(){if(!k())return!1;try{return sessionStorage.getItem(c)===`true`}catch{return!1}}function q(){if(k())try{sessionStorage.setItem(c,`true`)}catch{}}async function J(){if(!H())return null;let e=await N();return!e||!H()?null:(e.has_opted_out_capturing?.()&&e.opt_in_capturing(),T(e),e)}async function Y(){if(K())return;let e=await J();e&&(e.capture(`canvas_new_session`,{is_first_use:!U()}),q())}async function X(e,t={}){let n=await J();n&&n.capture(e,t)}async function Z(e,t={}){let n=await J();n&&n.captureException(e,t)}async function Q(){if(k()){try{localStorage.removeItem(i),localStorage.removeItem(s)}catch{}z();try{sessionStorage.removeItem(c)}catch{}v=null,y+=1,b=-1;try{p&&w(p,!0)}catch{try{p?.opt_out_capturing()}catch{}}}}export{F as a,B as c,X as d,Z as f,D as i,V as l,Y as m,Q as n,P as o,G as p,M as r,N as s,z as t,I as u};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-Cbf5AGg_.js";import{t as i}from"./declaration-BGsHjPEW.js";import{t as a}from"./square-chevron-right-DE-JN-2Z.js";import{t as o,w as s}from"./utils-DB9LsAzA.js";import{t as c}from"./use-agent-state-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-Cbf5AGg_.js";import{t as i}from"./declaration-BGsHjPEW.js";import{t as a}from"./square-chevron-right-DE-JN-2Z.js";import{t as o,w as s}from"./utils-DB9LsAzA.js";import{t as c}from"./use-agent-state-5qM3X30V.js";import{t as l}from"./command-store-D8J5LMW1.js";import{t as u}from"./runtime-waiting-state-CnyVhX4T.js";import{n as d,t as f}from"./vendor~terminal-CnKZILnC.js";import{t as p}from"./conversation-tab-empty-state-CNUmIms2.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=l(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)(u,{testId:t,className:e})}function w(){let{t:e}=r(`openhands`);return(0,S.jsx)(p,{className:`h-full`,icon:(0,S.jsx)(a,{"aria-hidden":!0,strokeWidth:2,className:`size-full`}),children:e(i.TERMINAL$NO_OUTPUT)})}function T(){let{curAgentState:e}=c(),t=l(e=>e.commands),n=s.includes(e),r=t.length>0,i=n||!r,a=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:o(`flex-1 min-h-0 p-4`,i&&`pointer-events-none absolute inset-0 h-0 w-0 overflow-hidden p-0 opacity-0`),children:(0,S.jsx)(`div`,{ref:a,className:`h-full w-full`})})]})}export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bt as e}from"./vendor-styling-CI0PQ3ab.js";import{t}from"./utils-DB9LsAzA.js";import{t as n}from"./dist-
|
|
1
|
+
import{bt as e}from"./vendor-styling-CI0PQ3ab.js";import{t}from"./utils-DB9LsAzA.js";import{t as n}from"./dist-CodhvuAP.js";var r=e(),i=n(``,{variants:{variant:{h1:`text-[32px] text-white font-medium leading-5`,h2:`text-xl font-medium leading-6 -tracking-[0.02em] text-white`,h3:`text-sm font-medium text-[var(--oh-text-tertiary)]`,span:`text-sm font-normal text-white leading-5.5`,p:`text-sm font-normal text-white leading-5.5`,codeBlock:`font-mono text-sm leading-relaxed text-[var(--oh-text-tertiary)] whitespace-pre-wrap`}},defaultVariants:{variant:`h1`}});function a({variant:e,className:n,testId:a,children:o}){return(0,r.jsx)(e,{"data-testid":a,className:t(i({variant:e}),n),children:o})}function o({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h1`,className:e,testId:t,children:n})}function s({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h2`,className:e,testId:t,children:n})}function c({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`h3`,className:e,testId:t,children:n})}function l({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`span`,className:e,testId:t,children:n})}function u({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`codeBlock`,className:e,testId:t,children:n})}function d({className:e,testId:t,children:n}){return(0,r.jsx)(a,{variant:`p`,className:e,testId:t,children:n})}a.H1=o,a.H2=s,a.H3=c,a.Text=l,a.CodeBlock=u,a.Paragraph=d;export{l as n,a as r,o as t};
|
package/build/assets/{use-acp-credential-form-LlfZO_DD.js → use-acp-credential-form-DHd_Id-q.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t as i}from"./useQuery-D5pEZbY0.js";import{t as a}from"./useTranslation-Cbf5AGg_.js";import{t as o}from"./declaration-BGsHjPEW.js";import{C as s,E as c,S as l,T as u,n as d}from"./active-backend-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t as i}from"./useQuery-D5pEZbY0.js";import{t as a}from"./useTranslation-Cbf5AGg_.js";import{t as o}from"./declaration-BGsHjPEW.js";import{C as s,E as c,S as l,T as u,n as d}from"./active-backend-context-DHhm10VS.js";import{t as f}from"./check-TbOEtHKj.js";import{t as p}from"./loader-circle-CsAsfLIs.js";import{t as m}from"./utils-DB9LsAzA.js";import{d as h}from"./agent-server-compatibility-C0MtTTwb.js";import{v as g}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import{l as _}from"./form-control-classes-CbdN5aO3.js";import{n as v,t as y}from"./settings-input-BsgQWS5R.js";import{a as b,l as x}from"./acp-providers-DerAmTyY.js";import{n as S,t as C}from"./use-create-secret-DEgM0MXZ.js";var w=e(t(),1),T=n();function E({conflicts:e}){let{t}=a(`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(o.SETTINGS$ACP_CREDENTIAL_CONFLICT_WARNING,{credential:e,conflicting:n})},`${e}:${n}`))})}function D({status:e,isChecking:t,providerName:n,testIdPrefix:r}){let{t:i}=a(`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)(f,{className:`mt-0.5 size-4 shrink-0 text-green-400`,"aria-hidden":!0}),(0,T.jsx)(`span`,{children:i(o.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)(p,{className:`size-4 shrink-0 animate-spin`,"aria-hidden":!0}),(0,T.jsx)(`span`,{children:i(o.ONBOARDING$ACP_AUTH_CHECKING,{provider:n})})]}):null}function O({field:e,value:t,onChange:n,alreadySet:r,testId:i,showOptionalTag:s}){let{t:c}=a(`openhands`),l=r?c(o.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}),s&&(0,T.jsx)(v,{})]}),(0,T.jsx)(`textarea`,{"data-testid":i,name:e.name,rows:4,spellCheck:!1,autoCapitalize:`off`,autoComplete:`off`,autoCorrect:`off`,value:t,placeholder:l,onChange:e=>n(e.target.value),className:m(_,`font-mono text-xs`)})]}):(0,T.jsx)(y,{testId:i,name:e.name,label:e.name,labelClassName:`font-mono`,type:e.secret?`password`:`text`,value:t,onChange:n,showOptionalTag:s,placeholder:l}),(0,T.jsx)(`span`,{className:`text-xs text-[var(--oh-muted)]`,children:c(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 g(h()).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=d(),a=r.backend.kind===`local`,o=n&&a&&!!e,s=i({queryKey:[`acp-auth-status`,r.backend.id,e],queryFn:()=>I(e),enabled:o,staleTime:1/0,gcTime:1e3*60*15,retry:!1,refetchOnWindowFocus:!1,refetchOnMount:!1});return{status:s.data??`unknown`,isChecking:o&&s.isFetching&&s.data===void 0,isSupported:a}}function R(e,t){let{t:n}=a(`openhands`),i=r(),{mutateAsync:d}=C(),[f,p]=w.useState(!1);return{saveFilled:async(r,{silent:a=!1}={})=>{let f=e.map(e=>({field:e,value:r[e.name]?.trim()})).filter(e=>!!e.value);if(f.length===0)return!0;p(!0);try{for(let{field:e,value:t}of f)await d({name:e.name,value:t});return await i.invalidateQueries({queryKey:[`secrets-search`]}),await i.invalidateQueries({queryKey:[`secrets`]}),!t&&f.some(({field:e})=>e.multiline)?u(n(o.ONBOARDING$ACP_SECRETS_ORPHANED_WARNING)):a||s(n(o.SETTINGS$SAVED)),!0}catch(e){return l(c(e)||n(o.ERROR$GENERIC)),!1}finally{p(!1)}},isSaving:f}}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~e0djk9ee-Cw6LUe8p.js";import{t}from"./useMutation-u8UgRgDK.js";import{f as n,i as r}from"./active-backend-context-
|
|
1
|
+
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t}from"./useMutation-u8UgRgDK.js";import{f as n,i as r}from"./active-backend-context-DHhm10VS.js";import{t as i}from"./settings-service.api-DPTFyRXL.js";import{n as a}from"./use-agent-profiles-Dn_S_Tkz.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};
|
package/build/assets/{use-active-agent-profile-Gw_uJujV.js → use-active-agent-profile-BMDTXsay.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./use-agent-profiles-
|
|
1
|
+
import{t as e}from"./use-agent-profiles-Dn_S_Tkz.js";function t(){let{data:t,isLoading:n}=e(),r=t?.active_agent_profile_id??null;return{activeProfile:t?.profiles?.find(e=>e.id!=null&&e.id===r)??null,isLoading:n}}function n(){let{activeProfile:e}=t();return e?.agent_kind}export{t as n,n as t};
|
package/build/assets/{use-active-conversation-B0sttISF.js → use-active-conversation-BbeVgedA.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{b as n}from"./utils-DB9LsAzA.js";import{n as r}from"./navigation-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{b as n}from"./utils-DB9LsAzA.js";import{n as r}from"./navigation-context-DPs2G0X8.js";import{t as i}from"./conversation-service.api-D8QU-BiL.js";import{t as a}from"./use-user-conversation-BrN2xeQU.js";var o=e(t(),1);function s(){let{conversationId:e}=r();return{conversationId:e}}function c(){let{conversationId:e}=s();if(!e)throw Error(`useConversationId must be used within a route that has a conversationId parameter`);return{conversationId:e}}var l=()=>{let{conversationId:e}=s(),t=!!e&&e.startsWith(`task-`),r=a(!e||t?null:e,e=>{let t=e.state.data;return t&&(!t.conversation_url||t.sandbox_status===`PAUSED`||!t.title&&n(t.execution_status))?3e3:3e4});return(0,o.useEffect)(()=>{let e=r.data;i.setCurrentConversation(e||null)},[e,r.isFetched,r?.data?.execution_status]),r};export{c as n,s as r,l as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useQuery-D5pEZbY0.js";import{a as t,i as n,n as r,o as i}from"./active-backend-context-
|
|
1
|
+
import{t as e}from"./useQuery-D5pEZbY0.js";import{a as t,i as n,n as r,o as i}from"./active-backend-context-DHhm10VS.js";import{_ as a,d as o}from"./agent-server-compatibility-C0MtTTwb.js";import{b as s}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import{t as c}from"./proxy-G4ce0fnQ.js";var l=`/api/agent-profiles`;function u(){let e=a().backend;if(e.kind!==`cloud`)throw Error(`Cloud agent-profile call requires a cloud backend.`);return e}async function d(){return c({backend:u(),method:`GET`,path:l})}async function f(e){return c({backend:u(),method:`GET`,path:`${l}/${encodeURIComponent(e)}`})}async function p(e,t){return c({backend:u(),method:`POST`,path:`${l}/${encodeURIComponent(e)}`,body:t})}async function m(e){return c({backend:u(),method:`DELETE`,path:`${l}/${encodeURIComponent(e)}`})}async function h(e,t){return c({backend:u(),method:`POST`,path:`${l}/${encodeURIComponent(e)}/rename`,body:{new_name:t}})}async function g(e){return c({backend:u(),method:`POST`,path:`${l}/${encodeURIComponent(e)}/activate`,body:{}})}function _(){return a().backend.kind===`cloud`}var v=`default`,y=class{static async listProfiles(){return _()?d():new s(o()).listAgentProfiles()}static async getProfile(e,t){if(_())return f(e);let n=t?{exposeSecrets:t}:{};return new s(o()).getAgentProfile(e,n)}static async saveProfile(e,t){return _()?p(e,t):new s(o()).saveAgentProfile(e,t)}static async deleteProfile(e){return _()?m(e):new s(o()).deleteAgentProfile(e)}static async renameProfile(e,t){return _()?h(e,t):new s(o()).renameAgentProfile(e,t)}static async activateProfile(e){return _()?g(e):new s(o()).activateAgentProfile(e)}};function b(a={}){let{backend:o,orgId:s}=r();return e({queryKey:[...n.all,o.id,s],queryFn:y.listProfiles,...i,...t,enabled:a.enabled??!0,meta:{disableToast:!0}})}export{y as n,v as r,b as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{C as n}from"./utils-DB9LsAzA.js";import{t as r}from"./common-CxbUL3nR.js";import{t as i}from"./conversation-state-store-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{C as n}from"./utils-DB9LsAzA.js";import{t as r}from"./common-CxbUL3nR.js";import{t as i}from"./conversation-state-store-B2Bp32XI.js";import{t as a}from"./use-active-conversation-BbeVgedA.js";var o=e(t(),1);function s(e){if(!e)return n.LOADING;switch(e){case r.IDLE:return n.AWAITING_USER_INPUT;case r.RUNNING:return n.RUNNING;case r.PAUSED:return n.PAUSED;case r.WAITING_FOR_CONFIRMATION:return n.AWAITING_USER_CONFIRMATION;case r.FINISHED:return n.FINISHED;case r.ERROR:return n.ERROR;case r.STUCK:return n.ERROR;default:return n.LOADING}}function c(){let e=i(e=>e.execution_status),t=a().data?.execution_status??null,n=e??t;return{curAgentState:(0,o.useMemo)(()=>s(n),[n]),executionStatus:n}}export{c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{c as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js";import{t as r}from"./useQueries-BpIlT8Mt.js";import{A as i,_ as a,b as o,k as s,v as c,y as l}from"./active-backend-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{c as n}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~iztiaf2o-rqo6vRFz.js";import{t as r}from"./useQueries-BpIlT8Mt.js";import{A as i,_ as a,b as o,k as s,v as c,y as l}from"./active-backend-context-DHhm10VS.js";import{c as u,d,t as f}from"./agent-server-compatibility-C0MtTTwb.js";import{S as p,d as m,y as h}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";import"./vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js";import{n as g,r as _}from"./organization-service.api-Da2jiuBS.js";var v=e(t(),1),y=1e4,b=4e3,x=`Invalid API key`,S=`API key required`,C=`Cloud API key or network issue`,w=`Logged out`;function T(e){return e===x}function E(e){return e===S}function D(e){return e===C}function O(e){return e.kind===`cloud`&&e.authMode!==`cookie`&&!e.apiKey.trim()}function k(e){return e===w}async function A(e){if(e.kind===`cloud`){if(e.authMode!==`cookie`&&!e.apiKey?.trim())throw Error(S);try{e.authMode===`cookie`?await g(e):await _(e)}catch(e){throw n.isAxiosError(e)&&e.response?.status===401||e instanceof p&&e.status===401?Error(w):s(e)?Error(C):e}return!0}try{let t=d({host:e.host,sessionApiKey:e.apiKey||null,timeout:b});await new m(t).getSettings(),f(await new h(t).getServerInfo())}catch(e){throw u(e,401)?Error(x):e}return!0}var j=2,M=300;function N(e){return e instanceof Error?e.message!==`Invalid API key`&&e.message!==`API key required`&&e.message!==`Logged out`:!0}async function P(e){for(let t=0;;t+=1)try{return await A(e)}catch(e){if(t>=j||!N(e))throw e;await new Promise(e=>{setTimeout(e,M)})}}function F(e,t={}){let{probeDisabledOnce:n=!1}=t,s=v.useSyncExternalStore(o,a,a),u=r({queries:e.map(e=>{let t=s[e.id],r=O(e),a=t?.disabled===!0,o=a&&e.kind===`cloud`&&i(t?.lastError),u=!r&&(!a||n||o);return{queryKey:[`backend-health`,e.id,e.kind,e.host,e.apiKey??``],queryFn:async()=>{try{let t=await P(e);return l(e.id),t}catch(t){throw c(e.id,t),t}},enabled:u,refetchInterval:a||r?!1:y,refetchIntervalInBackground:!1,refetchOnMount:a&&n?`always`:!0,refetchOnReconnect:!a&&!r,refetchOnWindowFocus:!a&&!r,retry:!1,staleTime:a?0:y,meta:{disableToast:!0}}})}),d={};return e.forEach((e,t)=>{let n=u[t],r=s[e.id],i=O(e),a=i?!1:r?.disabled===!0,o=i?0:r?.consecutiveFailures??0,c=i?S:r?.lastError??null,l;l=i||a?!1:n.isSuccess?!0:n.isError?!1:null,d[e.id]={isConnected:l,consecutiveFailures:o,lastError:c,disabled:a}}),d}export{F as a,E as i,k as n,T as r,D as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useQuery-D5pEZbY0.js";import{t as i}from"./useTranslation-Cbf5AGg_.js";import{t as a}from"./declaration-BGsHjPEW.js";import{n as o}from"./active-backend-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useQuery-D5pEZbY0.js";import{t as i}from"./useTranslation-Cbf5AGg_.js";import{t as a}from"./declaration-BGsHjPEW.js";import{n as o}from"./active-backend-context-DHhm10VS.js";import{t as s}from"./utils-DB9LsAzA.js";import{t as c}from"./organization-service.api-Da2jiuBS.js";import{t as l}from"./modal-backdrop-zVwfOJZr.js";import{r as u,t as d}from"./modal-body-Cc2zp0xb.js";import{r as f}from"./base-modal-CIF_785P.js";import{t as p}from"./settings-input-BsgQWS5R.js";import{i as m}from"./ellipsis-button-CbNnHlIq.js";var h=e(t(),1),g=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;function _(e,{isRequired:t=!1}={}){return e===``?!t:g.test(e)}function v(e){let t=e.split(`/`),n=(t[t.length-1]||e).replace(/[^A-Za-z0-9._-]/g,`-`).replace(/-+/g,`-`).replace(/^-+|-+$/g,``);return n&&!/^[A-Za-z0-9]/.test(n)&&(n=`profile-${n}`),n.length>64&&(n=n.substring(0,64).replace(/-+$/,``)),n||`default-profile`}var y=n(),b=(0,h.forwardRef)(function({testId:e,ruleTestId:t,value:n,onChange:r,onKeyDown:o,placeholder:c,isDisabled:l,isOptional:u,isRequired:d=!1},f){let{t:m}=i(`openhands`),g=_(n,{isRequired:d}),v=u?`${m(a.SETTINGS$PROFILE_NAME_LABEL)} (${m(a.COMMON$OPTIONAL)})`:m(a.SETTINGS$PROFILE_NAME_LABEL),b=h.useId(),x=t??`${b}-rule`;return(0,y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,y.jsx)(p,{ref:f,testId:e,label:v,type:`text`,className:`w-full`,value:n,placeholder:c??m(a.SETTINGS$PROFILE_NAME_PLACEHOLDER),onChange:r,onKeyDown:o,isDisabled:l,ariaDescribedBy:x,ariaInvalid:!g}),(0,y.jsx)(`p`,{id:x,"data-testid":t,className:s(`text-xs`,g?`text-[var(--oh-muted)]`:`text-red-400`),children:m(a.SETTINGS$PROFILE_NAME_RULE)})]})});function x({isOpen:e,title:t,width:n=`md`,children:r,footer:i,onClose:a,initialFocusRef:o}){let c=(0,h.useRef)(null);return(0,h.useEffect)(()=>{if(!e)return;let t=o?.current??c.current;if(t){let e=setTimeout(()=>{t.focus()},0);return()=>clearTimeout(e)}},[e,o]),(0,h.useEffect)(()=>{if(!e||!c.current)return;let t=c.current,n=e=>{if(e.key!==`Tab`)return;let n=t.querySelectorAll(`button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`),r=n[0],i=n[n.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),i?.focus()):!e.shiftKey&&document.activeElement===i&&(e.preventDefault(),r?.focus())};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[e]),e?(0,y.jsx)(l,{onClose:a,children:(0,y.jsxs)(`div`,{ref:c,tabIndex:-1,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`modal-title`,className:s(`bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)]`,u(n),d),children:[(0,y.jsx)(f,{id:`modal-title`,title:t}),r,(0,y.jsx)(`div`,{className:`w-full flex justify-end gap-2 mt-2`,children:i})]})}):null}function S({index:e,icon:t,label:n,onClick:r,onKeyDown:i,menuItemsRef:a,disabled:o,testId:c}){return(0,y.jsx)(`button`,{ref:t=>{a.current[e]=t},type:`button`,onClick:r,onKeyDown:t=>i(t,e),disabled:o,className:s(`group w-full cursor-pointer rounded px-2 py-2 text-start text-nowrap text-sm font-normal`,`text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,`disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent`),role:`menuitem`,"data-testid":c,children:(0,y.jsx)(m,{icon:t,text:n})})}function C({children:e,className:t,...n}){return(0,y.jsx)(`span`,{className:s(`text-sm leading-4 text-black font-semibold tracking-tighter bg-primary p-1 rounded-full`,t),...n,children:e})}var w=`edit_org_settings`;function T(){let{backend:e,orgId:t}=o(),n=e.kind===`cloud`,{data:i}=r({queryKey:[`cloud-current-user`,e.id,t],queryFn:()=>c(t,e),enabled:n&&!!t,staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}});return n?i?.permissions?i.permissions.includes(w):i?.role===`owner`||i?.role===`admin`:!0}export{b as a,x as i,C as n,v as o,S as r,_ as s,T as t};
|
package/build/assets/{use-cloud-current-user-id-C8m1oBy4.js → use-cloud-current-user-id-BwMX7jHW.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useQueries-BpIlT8Mt.js";import{n as t,r as n}from"./active-backend-context-
|
|
1
|
+
import{t as e}from"./useQueries-BpIlT8Mt.js";import{n as t,r as n}from"./active-backend-context-DHhm10VS.js";import{n as r,r as i,t as a}from"./organization-service.api-Da2jiuBS.js";function o(){let{backends:t}=n(),a=t.filter(e=>e.kind===`cloud`),o=e({queries:a.map(e=>({queryKey:[`cloud-organizations`,e.id],queryFn:async()=>{let t=await r(e);if(e.authMode===`cookie`)return t;let n=await i(e);return n.isLegacyKey||n.orgId===null?t:{...t,items:t.items.filter(e=>e.id===n.orgId)}},staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}}))}),s={};return a.forEach((e,t)=>{let n=o[t];s[e.id]={backend:e,isLoading:n.isLoading,orgs:n.data?.items??[],currentOrgId:n.data?.currentOrgId??null}}),s}function s(){let{backends:r}=n(),i=t(),s=o(),c=[];for(let e of r)if(e.kind===`cloud`){let t=s[e.id],n=e.id===i.backend.id&&i.orgId?i.orgId:t?.orgs[0]?.id??null;n&&c.push({backendId:e.id,orgIdForMe:n})}let l=e({queries:c.map(({backendId:e,orgIdForMe:t})=>{let n=r.find(t=>t.id===e);return{queryKey:[`cloud-current-user`,e,t],queryFn:async()=>n?a(t,n):{orgId:t,userId:``},enabled:!!n,staleTime:1e3*60*5,retry:!1,meta:{disableToast:!0}}})}),u={};return c.forEach((e,t)=>{let n=l[t];u[e.backendId]={isLoading:n.isLoading,userId:n.data?.userId??null}}),u}export{o as n,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./useQuery-D5pEZbY0.js";import{d as t,o as n}from"./active-backend-context-DHhm10VS.js";import{d as r,i,l as a,o}from"./agent-server-compatibility-C0MtTTwb.js";import{m as s}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";var c=class{static async getModels(){let e=new s(r()),[t,n,i]=await Promise.all([e.getModels(),e.getVerifiedModels(),e.getProviders()]),a=Object.keys(n??{}).sort(),o=a.flatMap(e=>n[e]??[]);return{models:t??[],verified_models:o,verified_providers:i?.filter(e=>a.includes(e))??a,default_model:o[0]??t?.[0]??``}}static async getConfig(){return await a(),{feature_flags:{hide_llm_settings:!1,hide_users_page:!0},providers_configured:[],maintenance_start_time:null,recaptcha_site_key:null,faulty_models:[],error_message:null,updated_at:new Date().toISOString()}}},l=r=>e({queryKey:t.WEB_CLIENT_CONFIG,queryFn:c.getConfig,retry:(e,t)=>!o(t)&&!i(t)&&e<3,meta:{disableToast:!0},...n,enabled:r?.enabled});export{c as n,l as t};
|
package/build/assets/{use-create-conversation-CWQGNQ9J.js → use-create-conversation-CkKUQVbP.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t}from"./useMutation-u8UgRgDK.js";import{a as n,i as r,n as i,s as a,u as o}from"./active-backend-context-
|
|
1
|
+
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t}from"./useMutation-u8UgRgDK.js";import{a as n,i as r,n as i,s as a,u as o}from"./active-backend-context-DHhm10VS.js";import{t as s}from"./use-tracking-DFoPQUSU.js";import{c,o as l,s as u,t as d}from"./agent-server-conversation-service.api-lzc8dabY.js";import{t as f}from"./profiles-service.api-DWetW2TL.js";import{t as p}from"./use-llm-profiles-CgRtnj74.js";import{n as m,t as h}from"./use-agent-profiles-Dn_S_Tkz.js";import{t as g}from"./plugins-management-service-DISfOL13.js";function _(e){if(e.name)return e.name;if(e.repo_path){let t=e.repo_path.split(`/`).filter(Boolean);if(t.length>0)return t[t.length-1]}let{source:t}=e;return t.startsWith(`github:`)?t.replace(`github:`,``):t.includes(`/`)&&t.split(`/`).pop()?.replace(/\.git$/,``)||t}function v(e){let{source:t}=e;return!(t.startsWith(`github:`)||/^[a-z][a-z0-9+.-]*:\/\//i.test(t))}function y(e){let t=e.source.startsWith(`github:`)?e.source.replace(`github:`,``):e.source;return e.ref?`${t} @ ${e.ref}`:t}function b(e){return[e.source,e.ref??``,e.repo_path??``].join(` `)}var x=[`create-conversation`],S=()=>{let _=e(),{trackConversationCreated:v}=s(),{data:y}=p(),{backend:S,orgId:C}=i();return h(),t({mutationKey:x,mutationFn:async e=>{let{query:t,conversationInstructions:i,plugins:s,repository:p,workingDir:h,workspaceMode:v,parentConversationId:x,agentType:w,agentProfileId:T}=e,E;try{E=await _.ensureQueryData({queryKey:[...r.all,S.id,C],queryFn:m.listProfiles,...n})}catch{}let D=T??E?.active_agent_profile_id??void 0,O=D?E?.profiles?.find(e=>e.id===D):void 0,k=S.kind===`cloud`,A=D;if(!k&&O?.name===`default`&&O?.agent_kind===`openhands`)A=void 0;else if(O?.agent_kind===`openhands`&&O.llm_profile_ref){let e=!1;try{e=(await _.ensureQueryData({queryKey:[...a.all,S.id,C],queryFn:f.listProfiles,retry:!1})).profiles.some(e=>e.name===O.llm_profile_ref)}catch{}e||(console.warn(`Agent profile "${O.name}" references missing LLM profile "${O.llm_profile_ref}"; launching from agent_settings instead.`),A=void 0)}let j=A?[void 0,A,O?.agent_kind]:[],M=await d.createConversation(t,i,s,p?{selected_repository:p.name,selected_branch:p.branch??null,git_provider:p.gitProvider}:null,h,v,x,w,...j),N=M.app_conversation_id,P=s?.map(c)??[],F=P;if(N){let e=[];try{e=await _.ensureQueryData({queryKey:o.installed,queryFn:()=>g.listInstalledPlugins()})}catch{}let t=new Set(P.map(b)),n=e.filter(e=>e.enabled).map(e=>({source:e.source,ref:e.resolved_ref??null,repo_path:e.repo_path??null,name:e.name})).filter(e=>!t.has(b(e)));F=[...P,...n]}let I=A&&O?.agent_kind===`openhands`?O.llm_profile_ref:y?.active_profile??null;if(N&&(I||F.length)){let e=l(N);u(N,{selected_repository:e?.selected_repository??null,selected_branch:e?.selected_branch??null,git_provider:e?.git_provider??null,selected_workspace:e?.selected_workspace??null,workspace_mode:e?.workspace_mode??null,active_profile:I??e?.active_profile??null,plugins:F.length?F:e?.plugins??null})}return{conversation_id:M.app_conversation_id?M.app_conversation_id:`task-${M.id}`,session_api_key:null,url:M.agent_server_url,task_id:M.id}},onSuccess:async(e,t)=>{v({conversationId:e.conversation_id,taskId:e.task_id,hasRepository:!!t.repository,gitProvider:t.repository?.gitProvider,hasWorkspace:!!t.workingDir,workspaceMode:t.workspaceMode,hasInitialQuery:!!t.query,agentType:t.agentType,hasParentConversation:!!t.parentConversationId,entryPoint:t.entryPoint}),_.invalidateQueries({queryKey:[`user`,`conversations`]}),_.invalidateQueries({queryKey:[`start-tasks`]})}})};export{v as a,y as i,S as n,b as o,_ as r,x as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useMutation-u8UgRgDK.js";import{t as r}from"./useQuery-D5pEZbY0.js";import{n as i}from"./active-backend-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useMutation-u8UgRgDK.js";import{t as r}from"./useQuery-D5pEZbY0.js";import{n as i}from"./active-backend-context-DHhm10VS.js";import{t as a}from"./secrets-service-Ch7RH8eH.js";var o=e(t(),1),s=(e={})=>{let{nameContains:t,enabled:n=!0}=e,s=i(),c=r({queryKey:[`secrets`,s.backend.id,s.orgId],queryFn:a.getSecrets,enabled:n,staleTime:1e3*60*5,gcTime:1e3*60*15});return{data:(0,o.useMemo)(()=>{if(!c.data)return[];if(!t)return c.data;let e=t.toLowerCase();return c.data.filter(t=>t.name.toLowerCase().includes(e))},[c.data,t]),isLoading:c.isLoading,isError:c.isError,hasNextPage:!1,isFetchingNextPage:!1,fetchNextPage:()=>{},onLoadMore:()=>{},refetch:c.refetch}},c=()=>n({mutationFn:({name:e,value:t,description:n})=>a.createSecret(e,t,n)});export{s as n,c as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./react-
|
|
1
|
+
import{t as e}from"./react-DPDgL6du.js";import"./canvas-ui-COgjltGz.js";function t(e){return typeof e==`object`&&!!e&&`id`in e&&`timestamp`in e&&`source`in e&&typeof e.id==`string`&&e.id.length>0&&typeof e.timestamp==`string`&&e.timestamp.length>0&&typeof e.source==`string`&&(e.source===`agent`||e.source===`user`||e.source===`environment`||e.source===`hook`)}var n=e=>e.source===`environment`&&`action_id`in e&&`observation`in e&&e.observation!==null&&typeof e.observation==`object`&&`kind`in e.observation,r=e=>e.source===`agent`&&`tool_name`in e&&`tool_call_id`in e&&`error`in e&&typeof e.tool_name==`string`&&typeof e.tool_call_id==`string`&&typeof e.error==`string`,i=e=>`llm_message`in e&&typeof e.llm_message==`object`&&e.llm_message!==null&&`role`in e.llm_message&&`content`in e.llm_message,a=e=>i(e)&&e.llm_message.role===`user`,o=e=>e.source===`agent`&&`action`in e&&e.action!==null&&typeof e.action==`object`&&`kind`in e.action&&`tool_name`in e&&`tool_call_id`in e&&typeof e.tool_name==`string`&&typeof e.tool_call_id==`string`,s=e=>o(e)&&(e.action.kind===`ExecuteBashAction`||e.action.kind===`TerminalAction`),c=e=>n(e)&&(e.observation.kind===`ExecuteBashObservation`||e.observation.kind===`TerminalObservation`),l=e=>n(e)&&e.observation.kind===`PlanningFileEditorObservation`,u=e=>n(e)&&e.observation.kind===`BrowserObservation`,d=e=>n(e)&&e.observation.kind===`SwitchLLMObservation`,f=e=>o(e)&&e.action.kind===`BrowserNavigateAction`,p=e=>o(e)&&(e.tool_name===`canvas_ui`||e.tool_name===`canvas_ui_control`),m=e=>e.source===`agent`&&`system_prompt`in e&&`tools`in e&&typeof e.system_prompt==`object`&&Array.isArray(e.tools),h=e=>`kind`in e&&e.kind===`ConversationStateUpdateEvent`,g=e=>e.key===`full_state`,_=e=>e.key===`execution_status`,v=e=>e.key===`stats`,y=e=>e.key===`goal`,b=e=>`kind`in e&&e.kind===`ConversationErrorEvent`,x=e=>`kind`in e&&e.kind===`ServerErrorEvent`,S=e=>b(e)||x(e),C=e=>`kind`in e&&e.kind===`HookExecutionEvent`,w=e=>`kind`in e&&e.kind===`ACPToolCallEvent`,T=e=>`kind`in e&&e.kind===`StreamingDeltaEvent`;function E(e){return t(e)}var D=e=>e.thought.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
2
2
|
`),O=e=>e.reasoning_content?e.reasoning_content:e.thinking_blocks?.length?e.thinking_blocks.filter(e=>e.type===`thinking`).map(e=>e.thinking).join(`
|
|
3
3
|
|
|
4
4
|
`):``,k=e=>D(e).trim().length>0,A=(e,t)=>{let n=e.replace(/^\s+/,``);if(!n.startsWith(`<think>`))return{reasoning:``,message:e};let r=n.slice(7),i=r.indexOf(`</think>`);return i===-1?t?.streaming?{reasoning:r.trim(),message:``}:{reasoning:``,message:e}:{reasoning:r.slice(0,i).trim(),message:r.slice(i+8).trim()}},j=(e,t)=>{if(o(e))return e.action.kind===`ThinkAction`?null:k(e)?e:null;if(n(e)){let n=t.find(t=>o(t)&&t.id===e.action_id);return!n||n.action.kind===`ThinkAction`?null:k(n)?n:null}return null},M=(e,t)=>({...t,content:`${t.content??``}${e.content??``}`||null,reasoning_content:`${t.reasoning_content??``}${e.reasoning_content??``}`||null}),N=(e,t)=>({...e,content:`${e.content??``}${t}`||null}),P=e=>{for(let t=e.length-1;t>=0;--t){let n=e[t];if(i(n)&&n.source===`user`)return t}return-1},F=e=>e.filter(e=>e.type===`text`).map(e=>e.text).join(``),I=e=>o(e)&&e.action.kind===`FinishAction`?e.action.message:i(e)&&e.source===`agent`?F(e.llm_message.content):null,L=(e,t)=>{let n=0,r=0;for(let i of t){let t=e.indexOf(i,n);if(t===-1)return{matched:!1,lastMatchEnd:r};r=t+i.length,n=r}return{matched:!0,lastMatchEnd:r}},R=e=>{let t=P(e);return e.map((e,t)=>({event:e,index:t})).filter(e=>e.index>t&&T(e.event)&&(e.event.content?.length??0)>0)},z=e=>{let t=[];for(let n=e.length-1;n>=0;--n){let r=e[n];if(!T(r))break;(r.content?.length??0)>0&&t.unshift({event:r,index:n})}return t},B=(e,t)=>{let n=t.join(``);for(let t of[n,n.trimEnd()])if(t&&e.startsWith(t))return{matched:!0,lastMatchEnd:t.length};let r=t.length-1;return L(e,t.map((e,t)=>t===r?e.trimEnd():e))},V=(e,t)=>{let n=R(t);if(n.length===0)return null;let r=I(e);if(!r)return null;let{matched:i,lastMatchEnd:a}=B(r,n.map(({event:e})=>e.content??``));if(!i)return null;let o=[...t],s=r.slice(a),c=n.at(-1)?.index,l=c===void 0?void 0:o[c];return s&&c!==void 0&&l&&T(l)&&(o[c]=N(l,s)),o},H=(e,t)=>{let n=F(e.thought);if(!n)return null;let r=z(t);if(r.length===0||!B(n,r.map(({event:e})=>e.content??``)).matched)return null;let i=O(e).trim().length>0,a=new Set(r.map(({index:e})=>e)),o=[];return t.forEach((e,t)=>{if(!a.has(t)||!T(e)){o.push(e);return}!i&&e.reasoning_content&&o.push({...e,content:null})}),o},U=(e,t)=>{let r=[...t];if(T(e)){if(e.content===null&&e.reasoning_content===null)return r;let t=r.length-1,n=r[t];return n&&T(n)?(r[t]=M(e,n),r):(r.push(e),r)}if(o(e)&&e.action.kind===`FinishAction`||i(e)&&e.source===`agent`){let t=V(e,r);if(t)return t}if(o(e)&&e.action.kind!==`FinishAction`&&e.action.kind!==`ThinkAction`){let t=H(e,r);if(t)return t.push(e),t}if(w(e)){let t=r.findIndex(t=>w(t)&&t.tool_call_id===e.tool_call_id);return t===-1?r.push(e):r[t]=e,r}if(n(e)){if(e.observation.kind===`ThinkObservation`||e.observation.kind===`FinishObservation`)return r;let t=r.findIndex(t=>t.id===e.action_id);t===-1?r.push(e):r[t]=e}else r.push(e);return r},W=e=>`id`in e?e.id:void 0,G=e=>`timestamp`in e?e.timestamp:void 0,K=(e,t)=>{let n=G(e),r=G(t);return!n&&!r?0:n?r?n.localeCompare(r):-1:1},q=(e,t)=>{if(e.length===0)return!1;let n=e[e.length-1],r=G(n),i=G(t);return!r||!i?!1:i<r},J=(e,t)=>{let n=W(t);if(n!==void 0&&e.eventIds.has(n))return e;let r=n===void 0?e.eventIds:new Set(e.eventIds).add(n),i=e.events.length-1,a=e.events[i],o=a&&T(t)&&T(a),s=[...e.events];return o?s[i]=M(t,a):s.push(t),{...e,events:s,eventIds:r,uiEvents:U(t,e.uiEvents)}},Y=e=>({...e,events:[...e.events].sort(K),uiEvents:[...e.uiEvents].sort(K)}),X=(e,t)=>{let n=J(e,t);return n===e?e:!q(e.events,t)&&!q(e.uiEvents,t)?n:Y(n)},Z=e()(e=>({events:[],eventIds:new Set,uiEvents:[],loadedConversationId:null,addEvent:t=>e(e=>X(e,t)),addEvents:t=>e(e=>{if(t.length===0)return e;let n=new Set(e.eventIds),r=[...e.events],i=[...e.uiEvents],a=!1;for(let e of t){let t=W(e);if(!(t!==void 0&&n.has(t))){a=!0,t!==void 0&&n.add(t);let o=r.length-1,s=r[o];s&&T(e)&&T(s)?r[o]=M(e,s):r.push(e),i=U(e,i)}}return a?Y({...e,events:r,eventIds:n,uiEvents:i}):e}),clearEvents:()=>e(()=>({events:[],eventIds:new Set,uiEvents:[],loadedConversationId:null})),clearEventsForConversation:t=>e(()=>({events:[],eventIds:new Set,uiEvents:[],loadedConversationId:t}))}));export{n as C,d as D,T as E,m as O,i as S,v as T,s as _,j as a,y as b,o as c,_ as d,f,S as g,h,O as i,a as k,r as l,p as m,U as n,A as o,u as p,D as r,w as s,Z as t,E as u,c as v,l as w,C as x,g as y};
|
package/build/assets/{use-handle-plan-click-DEuO7Byo.js → use-handle-plan-click-BFcE0Xms.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useTranslation-Cbf5AGg_.js";import{t as r}from"./declaration-BGsHjPEW.js";import{C as i}from"./active-backend-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useTranslation-Cbf5AGg_.js";import{t as r}from"./declaration-BGsHjPEW.js";import{C as i}from"./active-backend-context-DHhm10VS.js";import{a,r as o}from"./conversation-local-storage-F6zVMM--.js";import{t as s}from"./conversation-store-LptbOvKa.js";import{n as c}from"./use-create-conversation-CkKUQVbP.js";import{t as l}from"./use-active-conversation-BbeVgedA.js";var u=e(t(),1),d=()=>{let{t:e}=n(`openhands`),{setConversationMode:t,setSubConversationTaskId:d,subConversationTaskId:f}=s(),{data:p}=l(),{mutate:m,isPending:h}=c();return(0,u.useEffect)(()=>{if(!p?.id)return;let e=o(p.id);e.subConversationTaskId&&!f&&d(e.subConversationTaskId)},[p?.id,f,d]),{handlePlanClick:(0,u.useCallback)(n=>{n?.preventDefault(),n?.stopPropagation(),t(`plan`),!(p?.sub_conversation_ids&&p.sub_conversation_ids.length>0||!p?.id||f)&&m({parentConversationId:p.id,agentType:`plan`,entryPoint:`plan_sub_conversation`},{onSuccess:t=>{i(e(r.PLANNING_AGENTT$PLANNING_AGENT_INITIALIZED)),t.task_id&&(d(t.task_id),a(p.id,{subConversationTaskId:t.task_id}))}})},[p,m,t,d,f,e]),isCreatingConversation:h}};export{d as t};
|
package/build/assets/{use-launch-skill-in-chat-CdHOoQGM.js → use-launch-skill-in-chat-DJWEfVc5.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./navigation-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./navigation-context-DPs2G0X8.js";import{t as i}from"./conversation-store-LptbOvKa.js";var a=e(t()),o=n(),s=e=>(0,o.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,...e,children:[(0,o.jsx)(`path`,{d:`M12 3H4a2 2 0 0 0-2 2v16.286a.71.71 0 0 0 1.212.502l2.202-2.202A2 2 0 0 1 6.828 19H20a2 2 0 0 0 2-2v-4`}),(0,o.jsx)(`path`,{d:`M16 3h6v6`}),(0,o.jsx)(`path`,{d:`m16 9 6-6`})]});function c(){let{navigate:e}=r(),t=i(e=>e.setMessageToSend);return(0,a.useCallback)((n,r)=>{r?.(),e(`/conversations`),window.setTimeout(()=>{t(n)},0)},[e,t])}export{s as n,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useQuery-D5pEZbY0.js";import{n as t,o as n,s as r}from"./active-backend-context-
|
|
1
|
+
import{t as e}from"./useQuery-D5pEZbY0.js";import{n as t,o as n,s as r}from"./active-backend-context-DHhm10VS.js";import{t as i}from"./profiles-service.api-DWetW2TL.js";function a(a={}){let{backend:o,orgId:s}=t();return e({queryKey:[...r.all,o.id,s],queryFn:i.listProfiles,...n,enabled:a.enabled??!0,meta:{disableToast:!0}})}export{a as t};
|
package/build/assets/{use-plugins-marketplace-Bkk07W_M.js → use-plugins-marketplace-DOJp9rlE.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./useQuery-D5pEZbY0.js";import{_ as t,d as n}from"./agent-server-compatibility-
|
|
1
|
+
import{t as e}from"./useQuery-D5pEZbY0.js";import{_ as t,d as n}from"./agent-server-compatibility-C0MtTTwb.js";import{l as r}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js";var i=class{static async getPluginsMarketplace(){if(t().backend.kind===`cloud`)return[];try{return(await new r(n()).getPluginsMarketplace()).plugins??[]}catch{return[]}}static async getLocalPlugins(){if(t().backend.kind===`cloud`)return[];try{return(await new r(n()).getPlugins({load_user:!0,load_project:!1})).plugins??[]}catch{return[]}}},a=()=>e({queryKey:[`plugins-marketplace`],queryFn:()=>i.getPluginsMarketplace(),staleTime:1e3*60*10,refetchOnWindowFocus:!1});export{i as n,a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{T as e,b as t,w as n}from"./utils-DB9LsAzA.js";import{t as r}from"./use-active-conversation-BbeVgedA.js";import{t as i}from"./use-agent-state-5qM3X30V.js";var a=({allowAgentError:a=!1}={})=>{let{data:o}=r(),{curAgentState:s}=i(),c=a?e:n;return t(o?.execution_status)&&!c.includes(s)};export{a as t};
|
package/build/assets/{use-save-agent-profile-BxEsjnW0.js → use-save-agent-profile-i4FcEP98.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t}from"./useMutation-u8UgRgDK.js";import{i as n}from"./active-backend-context-
|
|
1
|
+
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t}from"./useMutation-u8UgRgDK.js";import{i as n}from"./active-backend-context-DHhm10VS.js";import{n as r}from"./use-agent-profiles-Dn_S_Tkz.js";function i(){let i=e();return t({mutationFn:({name:e,profile:t})=>r.saveProfile(e,t),onSuccess:async()=>{await i.invalidateQueries({queryKey:n.all})},meta:{disableToast:!0}})}export{i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t}from"./useMutation-u8UgRgDK.js";import{f as n}from"./active-backend-context-
|
|
1
|
+
import{n as e}from"./vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~e0djk9ee-Cw6LUe8p.js";import{t}from"./useMutation-u8UgRgDK.js";import{f as n}from"./active-backend-context-DHhm10VS.js";import{t as r}from"./settings-service.api-DPTFyRXL.js";import{r as i}from"./use-settings-BeJap6YL.js";import{t as a}from"./use-tracking-DFoPQUSU.js";var o=async e=>{let t={...e};delete t.agent_settings_schema,delete t.conversation_settings_schema;let n={...t.conversation_settings_diff??{}};Object.keys(n).length>0?t.conversation_settings_diff=n:delete t.conversation_settings_diff,delete t.conversation_settings;let i=t.agent_settings_diff,a=i?.llm;if(a&&typeof a.api_key==`string`){let e=a.api_key.trim();a.api_key=e===``?``:e}i&&Object.keys(i).length>0?t.agent_settings_diff=i:delete t.agent_settings_diff,delete t.agent_settings,typeof t.search_api_key==`string`&&(t.search_api_key=t.search_api_key.trim()),typeof t.git_user_name==`string`&&(t.git_user_name=t.git_user_name.trim()),typeof t.git_user_email==`string`&&(t.git_user_email=t.git_user_email.trim()),await r.saveSettings(t)},s=(r=`personal`,{retry:s}={})=>{let{trackMcpConfigUpdated:c}=a(),l=e(),{data:u}=i(r);return t({...s===void 0?{}:{retry:s},mutationFn:async e=>{let t=e.mcp_config,n=u?.mcp_config;t&&n!==t&&c({sseServersCount:t.sse_servers?.length??0,stdioServersCount:t.stdio_servers?.length??0}),await o(e)},onSuccess:async()=>{await l.invalidateQueries({queryKey:n.byScope(r)})},meta:{disableToast:!0}})};export{s as t};
|