@openhands/agent-canvas 1.5.2 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.windows.md +2 -2
- package/build/assets/{Trans-DqF_OEZB.js → Trans-52HCczKK.js} +1 -1
- package/build/assets/{acp-providers-DerAmTyY.js → acp-providers-xACMK9ZP.js} +1 -1
- package/build/assets/{active-backend-context-DHhm10VS.js → active-backend-context-Cd1qcZsb.js} +1 -1
- package/build/assets/{add-backend-modal-BoMkMyLB.js → add-backend-modal-5chsfln3.js} +1 -1
- package/build/assets/{agent-profiles-settings-CYPloKYK.js → agent-profiles-settings-BWK4H3kR.js} +1 -1
- package/build/assets/agent-server-compatibility-DMY0CihN.js +1 -0
- package/build/assets/agent-server-conversation-service.api-CI5-xmIX.js +41 -0
- package/build/assets/agent-settings-CMd8-O4f.js +2 -0
- package/build/assets/agent-settings-CdrhQJXX.js +1 -0
- package/build/assets/{alert-banner-Dh51WURQ.js → alert-banner-CLfWuIAX.js} +1 -1
- package/build/assets/api-key-entry-screen-Cc3aC7DZ.js +1 -0
- package/build/assets/app-settings-B-DQcBoB.js +1 -0
- package/build/assets/{automation-detail-Bn8q0AG3.js → automation-detail-BgxBIpyK.js} +2 -2
- package/build/assets/automation-export-Dbur8OHa.js +2 -0
- package/build/assets/automations-list-BWfjizlp.js +1 -0
- package/build/assets/{back-nav-button-DVknCcSP.js → back-nav-button-CaKvsD1E.js} +1 -1
- package/build/assets/backend-form-modal-YcfpuBZo.js +1 -0
- package/build/assets/{backend-synced-settings-badge-yVh6Kf4E.js → backend-synced-settings-badge-BellMmgC.js} +1 -1
- package/build/assets/{base-modal-CIF_785P.js → base-modal-Cw7enAHz.js} +1 -1
- package/build/assets/{brand-button-B1izLAdR.js → brand-button-BulEFHr3.js} +1 -1
- package/build/assets/{browser-DKaeq_sT.js → browser-DfVgUREb.js} +2 -2
- package/build/assets/browser-store-CBqI3tNR.js +1 -0
- package/build/assets/{browser-tab-qb_ftCxW.js → browser-tab-CmIKQB7S.js} +1 -1
- package/build/assets/chat-send-button-BchSSwuD.js +1 -0
- package/build/assets/circle-check-BXbQ5nEH.js +1 -0
- package/build/assets/{circle-plus-check-toggle-DoFIjVE0.js → circle-plus-check-toggle-BhpPjkh9.js} +1 -1
- package/build/assets/client-source-DAUgyJsi.js +1 -0
- package/build/assets/cloud-funnel-analytics-B5OeWh4y.js +1 -0
- package/build/assets/{color-themes-CHizm1xF.js → color-themes-QKMSVfDU.js} +1 -1
- package/build/assets/{combobox-caret-CxZpqoSR.js → combobox-caret-kNZtp53R.js} +1 -1
- package/build/assets/{command-menu-oTvKDU3Y.js → command-menu-tUsn23zy.js} +1 -1
- package/build/assets/{command-store-D8J5LMW1.js → command-store-B0hrIWMN.js} +1 -1
- package/build/assets/{condenser-settings-Q1rHh4Qe.js → condenser-settings-BBizzfIH.js} +1 -1
- package/build/assets/{confirmation-modal-DGBWM2Ls.js → confirmation-modal-108xng7X.js} +1 -1
- package/build/assets/{context-menu-list-item-6psNyl7X.js → context-menu-list-item-BbKfFuN1.js} +1 -1
- package/build/assets/conversation-CTzSrLMq.js +1 -0
- package/build/assets/conversation-CgcXNb-Z.js +90 -0
- package/build/assets/conversation-panel-bscjGQda.js +1 -0
- package/build/assets/{conversation-service.api-D8QU-BiL.js → conversation-service.api-DbBvscJA.js} +1 -1
- package/build/assets/conversation-state-store-C5GagZHT.js +1 -0
- package/build/assets/{conversation-store-LptbOvKa.js → conversation-store-CyVqoa0d.js} +1 -1
- package/build/assets/{conversation-tab-empty-state-CNUmIms2.js → conversation-tab-empty-state-2KYlk5Bh.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-CFzH_NOX.js → copy-to-clipboard-button-C54YRPMg.js} +1 -1
- package/build/assets/declaration-_yumYLEx.js +1 -0
- package/build/assets/{device-verify-WBSjJBLH.js → device-verify-D6FW_KZq.js} +1 -1
- package/build/assets/{dropdown-classes-D3wMJlXT.js → dropdown-classes-9uONlOg1.js} +1 -1
- package/build/assets/{ellipsis-button-CbNnHlIq.js → ellipsis-button-CoaUrKmQ.js} +1 -1
- package/build/assets/{entry.client-Dnnak-Hq.js → entry.client-BJSVzw7V.js} +2 -2
- package/build/assets/{enum-filter-dropdown-JLYv1t8L.js → enum-filter-dropdown-qQzyjk_q.js} +1 -1
- package/build/assets/{environment-switch-overlay-B1PFO8P8.js → environment-switch-overlay-XRWCClLu.js} +1 -1
- package/build/assets/extensions-hub-DUp9sWQY.js +1 -0
- package/build/assets/extensions-navigation-DmkftjAx.js +1 -0
- package/build/assets/file-tUAzhmJ3.js +1 -0
- package/build/assets/files-tab-GV5hwiIM.js +1 -0
- package/build/assets/files-tab-store-DehyITNC.js +1 -0
- package/build/assets/{form-control-classes-CbdN5aO3.js → form-control-classes-BPUnoYyg.js} +1 -1
- package/build/assets/git-provider-icon-DDkru3b_.js +1 -0
- package/build/assets/highlighted-source-view-CYkPZUxr.js +1 -0
- package/build/assets/home-C53WekZ2.js +1 -0
- package/build/assets/home-EAwq8ah2.js +1 -0
- package/build/assets/index-home-kBdZGKtu.js +1 -0
- package/build/assets/install-server-modal-DYk4VP3-.js +1 -0
- package/build/assets/{launch-DlXspDku.js → launch-CIecOy_y.js} +1 -1
- package/build/assets/lesson-plan-BSEUwflx.js +4 -0
- package/build/assets/llm-not-configured-banner-C8uv1PHT.js +27 -0
- package/build/assets/llm-settings-0Bb97NCk.js +1 -0
- package/build/assets/llm-settings-D4toJ90k.js +1 -0
- package/build/assets/{llm-subscription-service-C0zN0-rH.js → llm-subscription-service-BPRw3u3H.js} +1 -1
- package/build/assets/{loading-spinner-BcdnT0mN.js → loading-spinner-BCInDEXB.js} +1 -1
- package/build/assets/manage-backends-modal-Bon32JYr.js +1 -0
- package/build/assets/manifest-ec000ae3.js +1 -0
- package/build/assets/markdown-renderer-BlaJOAI2.js +2 -0
- package/build/assets/mcp-CFIpOkn2.js +9 -0
- package/build/assets/messages-eRPeR4pW.js +40 -0
- package/build/assets/{modal-body-Cc2zp0xb.js → modal-body-Bg9UCeoV.js} +1 -1
- package/build/assets/{modal-classes-3qT9Ap7Q.js → modal-classes-H1KbJkeC.js} +1 -1
- package/build/assets/{modal-close-button-BcIBUdSq.js → modal-close-button-BMLYvo0C.js} +1 -1
- package/build/assets/{model-selector-D51W2Q9b.js → model-selector-BqX2RvEr.js} +1 -1
- package/build/assets/{navigation-link-D8hfwvxI.js → navigation-link-DoJzTCEz.js} +1 -1
- package/build/assets/onboarding-3KO4qE6R.js +1 -0
- package/build/assets/onboarding-modal-D4vqkJeT.js +1 -0
- package/build/assets/{organization-service.api-Da2jiuBS.js → organization-service.api-CvfQugOt.js} +1 -1
- package/build/assets/{path-utils-D53ZHUQU.js → path-utils-DRgexxnX.js} +1 -1
- package/build/assets/{plan-components-BdZXPyZU.js → plan-components-qkMiGs_-.js} +1 -1
- package/build/assets/{planner-tab-BM-pKx0z.js → planner-tab-ZrjiirRr.js} +1 -1
- package/build/assets/{plugins-management-service-DISfOL13.js → plugins-management-service-9qT-r_37.js} +1 -1
- package/build/assets/plus-CzE1b-wl.js +1 -0
- package/build/assets/{profiles-service.api-DWetW2TL.js → profiles-service.api-CRVlrQpT.js} +1 -1
- package/build/assets/{providers-C7lMslCi.js → providers-C2DFGBrf.js} +1 -1
- package/build/assets/{proxy-G4ce0fnQ.js → proxy-DnnDqkwn.js} +1 -1
- package/build/assets/puzzle-IHQnD54C.js +1 -0
- package/build/assets/recommended-automations-launcher-B97vgHuN.js +58 -0
- package/build/assets/refresh-cw-DxbAs3SK.js +1 -0
- package/build/assets/root-BbONavTg.css +1 -0
- package/build/assets/root-D01rpqZU.js +2 -0
- package/build/assets/root-layout-BiHbCIkS.js +2 -0
- package/build/assets/{runtime-waiting-state-CnyVhX4T.js → runtime-waiting-state-CbUV9txX.js} +1 -1
- package/build/assets/{schema-field-CwdqUOnE.js → schema-field-B9-9Ta9u.js} +1 -1
- package/build/assets/sdk-section-page-DG1s25Pr.js +1 -0
- package/build/assets/{sdk-settings-schema-CLR01YIK.js → sdk-settings-schema-B42JFr5Y.js} +1 -1
- package/build/assets/{secrets-service-Ch7RH8eH.js → secrets-service-DvyS6-mV.js} +1 -1
- package/build/assets/secrets-settings-CeSq6cQw.js +1 -0
- package/build/assets/{segmented-toggle-kzwZkLaj.js → segmented-toggle-DRVJBNy0.js} +1 -1
- package/build/assets/settings-Dzo0dJKM.js +1 -0
- package/build/assets/{settings-mQUckT0g.js → settings-HcwfqMjJ.js} +1 -1
- package/build/assets/{settings-dropdown-input-Dhx9ErGd.js → settings-dropdown-input-B6RL_mt0.js} +1 -1
- package/build/assets/settings-index-uAKHyijw.js +1 -0
- package/build/assets/{settings-input-BsgQWS5R.js → settings-input-ZoaAPNQh.js} +1 -1
- package/build/assets/{settings-list-classes-DSJJX99U.js → settings-list-classes-Dr8LgITi.js} +1 -1
- package/build/assets/settings-modal-BVX2G_IT.js +1 -0
- package/build/assets/{settings-service.api-DPTFyRXL.js → settings-service.api-BY7ncxIz.js} +1 -1
- package/build/assets/{settings-switch-Bes8dIlV.js → settings-switch-DUlGnP0B.js} +1 -1
- package/build/assets/{settings-utils-DzCVfiR3.js → settings-utils-kWEEvcdv.js} +1 -1
- package/build/assets/shared-conversation-CV4Rtdz2.js +1 -0
- package/build/assets/{sidebar-layout-Bm7pa3Vk.js → sidebar-layout-BhGooCga.js} +1 -1
- package/build/assets/sidebar-mobile-menu-toggle-BntOJphE.js +1 -0
- package/build/assets/{sidebar-nav-link-CHqyFXwV.js → sidebar-nav-link-DkA1XWV8.js} +1 -1
- package/build/assets/{sidebar-store-uiUXBU1N.js → sidebar-store-CF3b12-m.js} +1 -1
- package/build/assets/{skill-card-pill-row-BPYKQ3IN.js → skill-card-pill-row-_gWe1Tws.js} +1 -1
- package/build/assets/skill-icon-badge-C-zbaXbD.js +1 -0
- package/build/assets/skills-plugins-BwoXKtrR.js +1 -0
- package/build/assets/skills-settings-Crq-fZSt.js +2 -0
- package/build/assets/{styled-tooltip-B14i_Uac.js → styled-tooltip-CdnCJ67u.js} +1 -1
- package/build/assets/syntax-highlighter-CZK2ab-O.js +1 -0
- package/build/assets/{task-list-tab-DyfgG4MC.js → task-list-tab-CONOO9iI.js} +1 -1
- package/build/assets/telemetry-CC32dJYW.js +2 -0
- package/build/assets/{terminal-BDTa1HEr.js → terminal-CTkDpIU-.js} +1 -1
- package/build/assets/{toggle-switch-DX_k418f.js → toggle-switch-yVIzmJLM.js} +1 -1
- package/build/assets/{typography-CzfoD9DY.js → typography-BBVEW0un.js} +1 -1
- package/build/assets/{use-acp-credential-form-DHd_Id-q.js → use-acp-credential-form-CIsp8hJe.js} +1 -1
- package/build/assets/use-activate-agent-profile-BfcTTJJG.js +1 -0
- package/build/assets/{use-active-agent-profile-BMDTXsay.js → use-active-agent-profile-CCeFtmk9.js} +1 -1
- package/build/assets/{use-active-conversation-BbeVgedA.js → use-active-conversation-Badxj8w4.js} +1 -1
- package/build/assets/{use-agent-profiles-Dn_S_Tkz.js → use-agent-profiles-BSWVN6hH.js} +1 -1
- package/build/assets/{use-agent-state-5qM3X30V.js → use-agent-state-BzRrhoPd.js} +1 -1
- package/build/assets/use-backends-health-BsZikyFW.js +1 -0
- package/build/assets/{use-can-manage-org-profiles-CyYqfzeo.js → use-can-manage-org-profiles-Do6mYf6P.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-BwMX7jHW.js → use-cloud-current-user-id-Cx3B_0-w.js} +1 -1
- package/build/assets/use-config-D9zUVw5b.js +1 -0
- package/build/assets/{use-create-conversation-CkKUQVbP.js → use-create-conversation-vvl0kvu7.js} +1 -1
- package/build/assets/{use-create-secret-DEgM0MXZ.js → use-create-secret-CB7Dvd4s.js} +1 -1
- package/build/assets/use-event-store-BlpSUF7N.js +4 -0
- package/build/assets/{use-handle-plan-click-BFcE0Xms.js → use-handle-plan-click-DDZkew9p.js} +1 -1
- package/build/assets/use-is-creating-conversation-fxSzN778.js +1 -0
- package/build/assets/{use-launch-skill-in-chat-DJWEfVc5.js → use-launch-skill-in-chat-D6_n1fs3.js} +1 -1
- package/build/assets/use-llm-profiles-CNQm7HYS.js +1 -0
- package/build/assets/use-plugins-marketplace-CloojomS.js +1 -0
- package/build/assets/use-runtime-is-ready-Bx_4cfar.js +1 -0
- package/build/assets/{use-save-agent-profile-i4FcEP98.js → use-save-agent-profile-Bj7N-1jS.js} +1 -1
- package/build/assets/{use-save-settings-DiDEbIJw.js → use-save-settings-BMsb2wk_.js} +1 -1
- package/build/assets/use-settings-B9XEmh7i.js +1 -0
- package/build/assets/use-settings-nav-items-BGfBS0yL.js +16 -0
- package/build/assets/{use-skills-Blpg2BqE.js → use-skills-CSRbvPle.js} +1 -1
- package/build/assets/{use-task-list-CfisapBW.js → use-task-list-CTIVLrQA.js} +1 -1
- package/build/assets/use-tracking-DjdCssvp.js +1 -0
- package/build/assets/{use-user-conversation-BrN2xeQU.js → use-user-conversation-BCpFn-Ei.js} +1 -1
- package/build/assets/{useTranslation-Cbf5AGg_.js → useTranslation-CHm_6BRr.js} +1 -1
- package/build/assets/{utils-DB9LsAzA.js → utils-CrRpzbM2.js} +1 -1
- package/build/assets/vendor-markdown-DzO4uO_0.js +37 -0
- package/build/assets/{vendor~browser-wXQ-WZEC.js → vendor~browser-Byfuq5J-.js} +1 -1
- package/build/assets/{vendor~browser-tab-CsMb-pta.js → vendor~browser-tab-BLk3qxhw.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-eGLBu60s.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~dhilvkxv-DTJ_cjR5.js} +2 -2
- package/build/assets/{vendor~files-tab-B-5fBohe.js → vendor~files-tab-XmnauIZI.js} +1 -1
- package/build/assets/{vendor~launch-_Km3J77E.js → vendor~launch-DeC8QhXQ.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-BrguKXCn.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-DDmLzCzm.js} +1 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-YrfJYTQw.js +1 -0
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-mC0v44WR.js → vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~j2jlu22h-DoaS51iW.js} +123 -3
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-BOKQkbc6.js → vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation~aler~gfu7qdtz-DEYwoy8u.js} +1 -1
- package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-DZHLw5Sr.js +1 -0
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-cFNmfAE6.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~ftka0fnu-UJ4BNDJP.js} +1 -1
- package/build/assets/{verification-settings-C8KzAdAX.js → verification-settings-uwOfc16F.js} +1 -1
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +38 -4
- package/build/locales/ca/openhands.json +38 -4
- package/build/locales/de/openhands.json +38 -4
- package/build/locales/en/openhands.json +38 -4
- package/build/locales/es/openhands.json +38 -4
- package/build/locales/fr/openhands.json +38 -4
- package/build/locales/it/openhands.json +38 -4
- package/build/locales/ja/openhands.json +38 -4
- package/build/locales/ko-KR/openhands.json +38 -4
- package/build/locales/no/openhands.json +38 -4
- package/build/locales/pt/openhands.json +38 -4
- package/build/locales/tr/openhands.json +38 -4
- package/build/locales/uk/openhands.json +38 -4
- package/build/locales/zh-CN/openhands.json +38 -4
- package/build/locales/zh-TW/openhands.json +38 -4
- package/config/defaults.json +7 -3
- package/dist/api/agent-canvas-updates.cjs +2 -0
- package/dist/api/agent-canvas-updates.cjs.map +1 -0
- package/dist/api/agent-canvas-updates.d.ts +7 -0
- package/dist/api/agent-canvas-updates.js +19 -0
- package/dist/api/agent-canvas-updates.js.map +1 -0
- package/dist/api/agent-server-adapter.cjs +1 -1
- package/dist/api/agent-server-adapter.cjs.map +1 -1
- package/dist/api/agent-server-adapter.d.ts +3 -0
- package/dist/api/agent-server-adapter.js +1 -0
- package/dist/api/agent-server-adapter.js.map +1 -1
- package/dist/api/agent-server-compatibility.cjs +1 -1
- package/dist/api/agent-server-compatibility.cjs.map +1 -1
- package/dist/api/agent-server-compatibility.d.ts +5 -0
- package/dist/api/agent-server-compatibility.js +24 -15
- package/dist/api/agent-server-compatibility.js.map +1 -1
- package/dist/api/agent-server-config.cjs +1 -1
- package/dist/api/agent-server-config.cjs.map +1 -1
- package/dist/api/agent-server-config.js +11 -8
- package/dist/api/agent-server-config.js.map +1 -1
- package/dist/api/automation-service/automation-service.api.cjs +2 -0
- package/dist/api/automation-service/automation-service.api.cjs.map +1 -0
- package/dist/api/automation-service/automation-service.api.d.ts +3 -0
- package/dist/api/automation-service/automation-service.api.js +283 -0
- package/dist/api/automation-service/automation-service.api.js.map +1 -0
- package/dist/api/client-source.cjs +1 -1
- package/dist/api/client-source.cjs.map +1 -1
- package/dist/api/client-source.d.ts +3 -0
- package/dist/api/client-source.js +4 -4
- package/dist/api/client-source.js.map +1 -1
- package/dist/api/cloud/settings-service.api.cjs.map +1 -1
- package/dist/api/cloud/settings-service.api.js.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +111 -109
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/mcp-health/mcp-health-store.cjs +2 -0
- package/dist/api/mcp-health/mcp-health-store.cjs.map +1 -0
- package/dist/api/mcp-health/mcp-health-store.d.ts +22 -0
- package/dist/api/mcp-health/mcp-health-store.js +45 -0
- package/dist/api/mcp-health/mcp-health-store.js.map +1 -0
- package/dist/api/mcp-health/probe-mcp-server-health.cjs +2 -0
- package/dist/api/mcp-health/probe-mcp-server-health.cjs.map +1 -0
- package/dist/api/mcp-health/probe-mcp-server-health.d.ts +31 -0
- package/dist/api/mcp-health/probe-mcp-server-health.js +57 -0
- package/dist/api/mcp-health/probe-mcp-server-health.js.map +1 -0
- package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
- package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
- package/dist/api/mcp-service/mcp-service.api.js +66 -46
- package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
- package/dist/api/plugins-management-service.cjs.map +1 -1
- package/dist/api/plugins-management-service.d.ts +6 -1
- package/dist/api/plugins-management-service.js.map +1 -1
- package/dist/api/plugins-service.d.ts +30 -2
- package/dist/api/secrets-service.cjs +1 -1
- package/dist/api/secrets-service.cjs.map +1 -1
- package/dist/api/secrets-service.d.ts +6 -6
- package/dist/api/secrets-service.js +8 -3
- package/dist/api/secrets-service.js.map +1 -1
- package/dist/api/settings-service/settings-service.api.cjs +1 -1
- package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
- package/dist/api/settings-service/settings-service.api.d.ts +1 -1
- package/dist/api/settings-service/settings-service.api.js +1 -0
- package/dist/api/settings-service/settings-service.api.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/critic-result-display.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/critic-result-display.js +5 -5
- 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 +4 -1
- package/dist/components/features/backends/backend-form-modal.js +15 -16
- package/dist/components/features/backends/backend-form-modal.js.map +1 -1
- package/dist/components/features/backends/backend-selector.cjs +1 -1
- package/dist/components/features/backends/backend-selector.cjs.map +1 -1
- package/dist/components/features/backends/backend-selector.js +103 -102
- package/dist/components/features/backends/backend-selector.js.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.js +85 -73
- package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
- package/dist/components/features/chat/chat-interface.cjs +2 -2
- package/dist/components/features/chat/chat-interface.cjs.map +1 -1
- package/dist/components/features/chat/chat-interface.js +131 -129
- package/dist/components/features/chat/chat-interface.js.map +1 -1
- package/dist/components/features/chat/confirmation-mode-enabled.cjs +1 -1
- package/dist/components/features/chat/confirmation-mode-enabled.js +4 -4
- package/dist/components/features/chat/skill-install-restart-banner.cjs +2 -0
- package/dist/components/features/chat/skill-install-restart-banner.cjs.map +1 -0
- package/dist/components/features/chat/skill-install-restart-banner.d.ts +11 -0
- package/dist/components/features/chat/skill-install-restart-banner.js +63 -0
- package/dist/components/features/chat/skill-install-restart-banner.js.map +1 -0
- package/dist/components/features/conversation/right-panel-toggle.cjs +1 -1
- package/dist/components/features/conversation/right-panel-toggle.cjs.map +1 -1
- package/dist/components/features/conversation/right-panel-toggle.js +1 -1
- package/dist/components/features/conversation/right-panel-toggle.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +10 -10
- package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.js +78 -77
- package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.d.ts +4 -1
- package/dist/components/features/mcp-page/install-server-modal.js +135 -136
- package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
- package/dist/components/features/mcp-page/installed-server-card.cjs +1 -1
- package/dist/components/features/mcp-page/installed-server-card.cjs.map +1 -1
- package/dist/components/features/mcp-page/installed-server-card.js +40 -34
- package/dist/components/features/mcp-page/installed-server-card.js.map +1 -1
- package/dist/components/features/mcp-page/mcp-server-health.cjs +2 -0
- package/dist/components/features/mcp-page/mcp-server-health.cjs.map +1 -0
- package/dist/components/features/mcp-page/mcp-server-health.d.ts +18 -0
- package/dist/components/features/mcp-page/mcp-server-health.js +117 -0
- package/dist/components/features/mcp-page/mcp-server-health.js.map +1 -0
- package/dist/components/features/plugins/build-plugins-view-model.d.ts +10 -1
- package/dist/components/features/plugins/plugin-files-section.d.ts +13 -0
- package/dist/components/features/settings/agent-canvas-update-card.cjs +2 -0
- package/dist/components/features/settings/agent-canvas-update-card.cjs.map +1 -0
- package/dist/components/features/settings/agent-canvas-update-card.d.ts +7 -0
- package/dist/components/features/settings/agent-canvas-update-card.js +170 -0
- package/dist/components/features/settings/agent-canvas-update-card.js.map +1 -0
- package/dist/components/features/settings/integrations-settings-link.cjs +2 -0
- package/dist/components/features/settings/integrations-settings-link.cjs.map +1 -0
- package/dist/components/features/settings/integrations-settings-link.d.ts +5 -0
- package/dist/components/features/settings/integrations-settings-link.js +41 -0
- package/dist/components/features/settings/integrations-settings-link.js.map +1 -0
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +1 -1
- package/dist/components/features/settings/settings-desktop-sidebar.cjs +1 -1
- package/dist/components/features/settings/settings-desktop-sidebar.cjs.map +1 -1
- package/dist/components/features/settings/settings-desktop-sidebar.js +31 -21
- package/dist/components/features/settings/settings-desktop-sidebar.js.map +1 -1
- package/dist/components/features/settings/settings-mobile-drawer.cjs +1 -1
- package/dist/components/features/settings/settings-mobile-drawer.cjs.map +1 -1
- package/dist/components/features/settings/settings-mobile-drawer.js +40 -30
- package/dist/components/features/settings/settings-mobile-drawer.js.map +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
- package/dist/components/features/skills/extensions-navigation.js +54 -33
- package/dist/components/features/skills/extensions-navigation.js.map +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +7 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/constants/acp-providers.cjs.map +1 -1
- package/dist/constants/acp-providers.js.map +1 -1
- package/dist/contexts/conversation-websocket-context.cjs +2 -2
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.js +169 -166
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/hooks/mutation/use-delete-llm-profile.cjs +1 -1
- package/dist/hooks/mutation/use-delete-llm-profile.js +1 -0
- package/dist/hooks/mutation/use-delete-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.js +8 -6
- package/dist/hooks/mutation/use-delete-mcp-server.js.map +1 -1
- package/dist/hooks/mutation/use-rename-llm-profile.cjs +1 -1
- package/dist/hooks/mutation/use-rename-llm-profile.js +1 -0
- package/dist/hooks/mutation/use-save-settings.cjs +1 -1
- package/dist/hooks/mutation/use-save-settings.js +3 -3
- package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.js +11 -9
- package/dist/hooks/mutation/use-update-mcp-server.js.map +1 -1
- package/dist/hooks/query/query-keys.cjs +1 -1
- package/dist/hooks/query/query-keys.cjs.map +1 -1
- package/dist/hooks/query/query-keys.d.ts +4 -0
- package/dist/hooks/query/query-keys.js +2 -2
- package/dist/hooks/query/query-keys.js.map +1 -1
- package/dist/hooks/query/use-automation-sdk-version.cjs +2 -0
- package/dist/hooks/query/use-automation-sdk-version.cjs.map +1 -0
- package/dist/hooks/query/use-automation-sdk-version.d.ts +3 -0
- package/dist/hooks/query/use-automation-sdk-version.js +63 -0
- package/dist/hooks/query/use-automation-sdk-version.js.map +1 -0
- package/dist/hooks/query/use-latest-agent-canvas-version.cjs +2 -0
- package/dist/hooks/query/use-latest-agent-canvas-version.cjs.map +1 -0
- package/dist/hooks/query/use-latest-agent-canvas-version.d.ts +10 -0
- package/dist/hooks/query/use-latest-agent-canvas-version.js +19 -0
- package/dist/hooks/query/use-latest-agent-canvas-version.js.map +1 -0
- package/dist/hooks/query/use-plugin-file-content.d.ts +7 -0
- package/dist/hooks/query/use-resolved-workspaces.cjs +1 -1
- package/dist/hooks/query/use-resolved-workspaces.cjs.map +1 -1
- package/dist/hooks/query/use-resolved-workspaces.js +25 -26
- package/dist/hooks/query/use-resolved-workspaces.js.map +1 -1
- package/dist/hooks/query/use-search-subdirs.cjs +1 -1
- package/dist/hooks/query/use-search-subdirs.cjs.map +1 -1
- package/dist/hooks/query/use-search-subdirs.d.ts +5 -0
- package/dist/hooks/query/use-search-subdirs.js +16 -4
- package/dist/hooks/query/use-search-subdirs.js.map +1 -1
- package/dist/hooks/use-device-flow.cjs +1 -1
- package/dist/hooks/use-device-flow.js +6 -6
- package/dist/hooks/use-llm-configured.cjs +1 -1
- package/dist/hooks/use-llm-configured.js +3 -3
- package/dist/hooks/use-mcp-server-health.cjs +2 -0
- package/dist/hooks/use-mcp-server-health.cjs.map +1 -0
- package/dist/hooks/use-mcp-server-health.d.ts +11 -0
- package/dist/hooks/use-mcp-server-health.js +18 -0
- package/dist/hooks/use-mcp-server-health.js.map +1 -0
- package/dist/hooks/use-skill-installs.cjs +2 -0
- package/dist/hooks/use-skill-installs.cjs.map +1 -0
- package/dist/hooks/use-skill-installs.d.ts +10 -0
- package/dist/hooks/use-skill-installs.js +21 -0
- package/dist/hooks/use-skill-installs.js.map +1 -0
- package/dist/hooks/use-tracking.cjs +1 -1
- package/dist/hooks/use-tracking.cjs.map +1 -1
- package/dist/hooks/use-tracking.d.ts +3 -3
- package/dist/hooks/use-tracking.js +67 -52
- package/dist/hooks/use-tracking.js.map +1 -1
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +35 -1
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +3 -3
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +623 -45
- package/dist/i18n/translation.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -2
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.d.ts +0 -1
- package/dist/lib/index.js +0 -1
- package/dist/locales/ar/openhands.json +38 -4
- package/dist/locales/ca/openhands.json +38 -4
- package/dist/locales/de/openhands.json +38 -4
- package/dist/locales/en/openhands.json +38 -4
- package/dist/locales/es/openhands.json +38 -4
- package/dist/locales/fr/openhands.json +38 -4
- package/dist/locales/it/openhands.json +38 -4
- package/dist/locales/ja/openhands.json +38 -4
- package/dist/locales/ko-KR/openhands.json +38 -4
- package/dist/locales/no/openhands.json +38 -4
- package/dist/locales/pt/openhands.json +38 -4
- package/dist/locales/tr/openhands.json +38 -4
- package/dist/locales/uk/openhands.json +38 -4
- package/dist/locales/zh-CN/openhands.json +38 -4
- package/dist/locales/zh-TW/openhands.json +38 -4
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.js +44 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian-rovo.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js +13 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js +21 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js +13 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js +13 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js +13 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js +13 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js +13 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js +16 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.js +46 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/vanta.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js +74 -70
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.cjs +123 -3
- package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js +7 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +9 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.js +21 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/info.js.map +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +10 -3
- 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 +113 -67
- package/dist/routes/app-settings.js.map +1 -1
- package/dist/routes/mcp.cjs +1 -1
- package/dist/routes/mcp.cjs.map +1 -1
- package/dist/routes/mcp.js +1 -0
- package/dist/routes/mcp.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 +2 -2
- package/dist/services/cloud-funnel-analytics.js +18 -16
- package/dist/services/cloud-funnel-analytics.js.map +1 -1
- package/dist/services/settings.cjs +1 -1
- package/dist/services/settings.cjs.map +1 -1
- package/dist/services/settings.js +1 -0
- package/dist/services/settings.js.map +1 -1
- package/dist/services/telemetry-context.cjs +2 -0
- package/dist/services/telemetry-context.cjs.map +1 -0
- package/dist/services/telemetry-context.d.ts +17 -0
- package/dist/services/telemetry-context.js +27 -0
- package/dist/services/telemetry-context.js.map +1 -0
- package/dist/services/telemetry.cjs +1 -1
- package/dist/services/telemetry.cjs.map +1 -1
- package/dist/services/telemetry.d.ts +7 -5
- package/dist/services/telemetry.js +132 -123
- package/dist/services/telemetry.js.map +1 -1
- package/dist/stores/skill-install-banner-store.cjs +2 -0
- package/dist/stores/skill-install-banner-store.cjs.map +1 -0
- package/dist/stores/skill-install-banner-store.d.ts +32 -0
- package/dist/stores/skill-install-banner-store.js +14 -0
- package/dist/stores/skill-install-banner-store.js.map +1 -0
- package/dist/stores/use-event-store.cjs +1 -1
- package/dist/stores/use-event-store.cjs.map +1 -1
- package/dist/stores/use-event-store.js +35 -35
- package/dist/stores/use-event-store.js.map +1 -1
- package/dist/types/mcp-health.cjs +2 -0
- package/dist/types/mcp-health.cjs.map +1 -0
- package/dist/types/mcp-health.d.ts +21 -0
- package/dist/types/mcp-health.js +6 -0
- package/dist/types/mcp-health.js.map +1 -0
- package/dist/types/settings.d.ts +1 -0
- package/dist/utils/handle-event-for-ui.cjs +1 -1
- package/dist/utils/handle-event-for-ui.cjs.map +1 -1
- package/dist/utils/handle-event-for-ui.d.ts +5 -0
- package/dist/utils/handle-event-for-ui.js +71 -57
- package/dist/utils/handle-event-for-ui.js.map +1 -1
- package/dist/utils/mcp-credential-validation.cjs +1 -1
- package/dist/utils/mcp-credential-validation.cjs.map +1 -1
- package/dist/utils/mcp-credential-validation.js +32 -16
- package/dist/utils/mcp-credential-validation.js.map +1 -1
- package/dist/utils/mcp-server-health-key.cjs +2 -0
- package/dist/utils/mcp-server-health-key.cjs.map +1 -0
- package/dist/utils/mcp-server-health-key.d.ts +16 -0
- package/dist/utils/mcp-server-health-key.js +23 -0
- package/dist/utils/mcp-server-health-key.js.map +1 -0
- package/dist/utils/mcp-test-error-message.cjs +2 -0
- package/dist/utils/mcp-test-error-message.cjs.map +1 -0
- package/dist/utils/mcp-test-error-message.d.ts +8 -0
- package/dist/utils/mcp-test-error-message.js +14 -0
- package/dist/utils/mcp-test-error-message.js.map +1 -0
- package/dist/utils/redact-mcp-secrets.cjs +2 -0
- package/dist/utils/redact-mcp-secrets.cjs.map +1 -0
- package/dist/utils/redact-mcp-secrets.d.ts +13 -0
- package/dist/utils/redact-mcp-secrets.js +57 -0
- package/dist/utils/redact-mcp-secrets.js.map +1 -0
- package/dist/utils/settings-utils.cjs.map +1 -1
- package/dist/utils/settings-utils.js.map +1 -1
- package/dist/utils/skill-install-events.cjs +3 -0
- package/dist/utils/skill-install-events.cjs.map +1 -0
- package/dist/utils/skill-install-events.d.ts +16 -0
- package/dist/utils/skill-install-events.js +26 -0
- package/dist/utils/skill-install-events.js.map +1 -0
- package/dist/utils/title-llm-profile.cjs +2 -0
- package/dist/utils/title-llm-profile.cjs.map +1 -0
- package/dist/utils/title-llm-profile.d.ts +2 -0
- package/dist/utils/title-llm-profile.js +11 -0
- package/dist/utils/title-llm-profile.js.map +1 -0
- package/package.json +10 -3
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/check-translation-completeness.cjs +2 -0
- package/scripts/dev-process-utils.mjs +62 -1
- package/scripts/dev-safe.mjs +2 -2
- package/scripts/dev-static.mjs +5 -3
- package/scripts/dev-with-automation.mjs +98 -14
- package/scripts/download-node.mjs +382 -0
- package/scripts/download-uv.mjs +204 -0
- package/scripts/logger.mjs +64 -35
- package/build/assets/agent-server-compatibility-C0MtTTwb.js +0 -1
- package/build/assets/agent-server-conversation-service.api-lzc8dabY.js +0 -41
- package/build/assets/agent-settings-GwiXe_6k.js +0 -2
- package/build/assets/agent-settings-OdsyI2gX.js +0 -1
- package/build/assets/api-key-entry-screen-2gsoZAOK.js +0 -1
- package/build/assets/app-settings-CD9euh81.js +0 -1
- package/build/assets/automation-export-Djc8Tf0M.js +0 -2
- package/build/assets/automations-list-Dtiolk1h.js +0 -1
- package/build/assets/backend-form-modal-B8GtBA-J.js +0 -1
- package/build/assets/browser-store-BI6uklCG.js +0 -1
- package/build/assets/chat-send-button-BZHG2hAW.js +0 -1
- package/build/assets/client-source-CtQjJEy6.js +0 -1
- package/build/assets/cloud-funnel-analytics-uzzLlLuj.js +0 -1
- package/build/assets/conversation-B8d8_Upd.js +0 -1
- package/build/assets/conversation-Lmqm6VJC.js +0 -89
- package/build/assets/conversation-panel-B8n40Swu.js +0 -1
- package/build/assets/conversation-state-store-B2Bp32XI.js +0 -1
- package/build/assets/declaration-BGsHjPEW.js +0 -1
- package/build/assets/extensions-hub-DqvwvpCi.js +0 -1
- package/build/assets/extensions-navigation-BMc9Nluv.js +0 -1
- package/build/assets/files-tab-BAkaV4aO.js +0 -1
- package/build/assets/files-tab-store-DJsPxYdg.js +0 -1
- package/build/assets/git-provider-icon-xvbukHaT.js +0 -1
- package/build/assets/home-D01kSnmo.js +0 -1
- package/build/assets/home-NZO2bF4N.js +0 -1
- package/build/assets/index-home-BsI6i0TC.js +0 -1
- package/build/assets/install-server-modal-BYjqoRyX.js +0 -1
- package/build/assets/lesson-plan-cNUjpdFx.js +0 -4
- package/build/assets/llm-not-configured-banner-DUPyoFIZ.js +0 -27
- package/build/assets/llm-settings-Cs_iieFY.js +0 -1
- package/build/assets/llm-settings-J2ke2foG.js +0 -1
- package/build/assets/manage-backends-modal-nMoCZ2a0.js +0 -1
- package/build/assets/manifest-f1b46f62.js +0 -1
- package/build/assets/markdown-renderer-B4V2OMFP.js +0 -2
- package/build/assets/mcp-kZM-cAZw.js +0 -9
- package/build/assets/messages-CJAv5n4j.js +0 -40
- package/build/assets/objectWithoutPropertiesLoose-BgYIAs2y.js +0 -1
- package/build/assets/onboarding-Dx8n8HFr.js +0 -1
- package/build/assets/onboarding-modal-Bxuxpfdz.js +0 -1
- package/build/assets/recommended-automations-launcher-BWRRvMPE.js +0 -58
- package/build/assets/refresh-cw-B9B7-vsy.js +0 -1
- package/build/assets/root-CYWeTrWE.css +0 -1
- package/build/assets/root-layout-ClEl-JlJ.js +0 -2
- package/build/assets/root-oT83qVlk.js +0 -2
- package/build/assets/sdk-section-page-Cwj0T4gF.js +0 -1
- package/build/assets/secrets-settings-Bc_pBX6F.js +0 -1
- package/build/assets/settings-index-BzSIM1-N.js +0 -1
- package/build/assets/settings-modal-BnZ7mMu7.js +0 -1
- package/build/assets/settings-n9a395O0.js +0 -1
- package/build/assets/shared-conversation-CIDDti9I.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-CTX7J4wM.js +0 -1
- package/build/assets/skills-plugins-HZEbNDmX.js +0 -1
- package/build/assets/skills-settings-BdqijFlC.js +0 -2
- package/build/assets/telemetry-SHxpVxk8.js +0 -2
- package/build/assets/use-activate-agent-profile-BRDdSwQ0.js +0 -1
- package/build/assets/use-backends-health-BagmAE_W.js +0 -1
- package/build/assets/use-config-B39iHYFi.js +0 -1
- package/build/assets/use-event-store-Bbaz51GR.js +0 -4
- package/build/assets/use-llm-profiles-CgRtnj74.js +0 -1
- package/build/assets/use-plugins-marketplace-DOJp9rlE.js +0 -1
- package/build/assets/use-runtime-is-ready-ziHQvXZQ.js +0 -1
- package/build/assets/use-settings-BeJap6YL.js +0 -1
- package/build/assets/use-settings-nav-items-D5JJjFHJ.js +0 -16
- package/build/assets/use-tracking-DFoPQUSU.js +0 -1
- package/build/assets/useMutationState-OnAsCLA_.js +0 -1
- package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD7v71DM.js +0 -2
- package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BT05Osu4.js +0 -28
- package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-COhHANvV.js +0 -2
- package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DgzWSMRc.js +0 -2
- package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DqZatR3B.js +0 -7
- package/build/assets/vendor~index-home~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-FghQ3Z1a.js +0 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-BTvhGHHG.js +0 -1
- package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-C4-GDgiF.js +0 -1
- package/dist/components/features/analytics/telemetry-consent-banner.cjs +0 -2
- package/dist/components/features/analytics/telemetry-consent-banner.cjs.map +0 -1
- package/dist/components/features/analytics/telemetry-consent-banner.d.ts +0 -29
- package/dist/components/features/analytics/telemetry-consent-banner.js +0 -59
- package/dist/components/features/analytics/telemetry-consent-banner.js.map +0 -1
- /package/build/assets/{__vite-browser-external-BQUj0sYu.js → __vite-browser-external-CKHVBTNC.js} +0 -0
- /package/build/assets/{agent-server-ui-style-scope-qhnhZHBV.js → agent-server-ui-style-scope-BvSa9on7.js} +0 -0
- /package/build/assets/{automation-LZB0MjdV.js → automation-BGiPmxFR.js} +0 -0
- /package/build/assets/{canvas-ui-COgjltGz.js → canvas-ui-CC4EJo-H.js} +0 -0
- /package/build/assets/{checkmark-h7udgXMM.js → checkmark-ygQB1AtV.js} +0 -0
- /package/build/assets/{close-DLFb5kfv.js → close-BjSA0HWT.js} +0 -0
- /package/build/assets/{code-tag-DYlAhEQY.js → code-tag-D9aPPbOe.js} +0 -0
- /package/build/assets/{common-CxbUL3nR.js → common-CCuqQy_S.js} +0 -0
- /package/build/assets/{conversation-local-storage-F6zVMM--.js → conversation-local-storage-BDjWPg0Z.js} +0 -0
- /package/build/assets/{copy-BLmGeJcd.js → copy-Dce7sOvS.js} +0 -0
- /package/build/assets/{copy-D1YGjP-C.js → copy-iPJAncAj.js} +0 -0
- /package/build/assets/{dist-CodhvuAP.js → dist-D9PhjOaq.js} +0 -0
- /package/build/assets/{environment-switch-store-DkjlKWzN.js → environment-switch-store-DHfcz4M4.js} +0 -0
- /package/build/assets/{extension-module-card-classes-9V3J9J_b.js → extension-module-card-classes-BpebKiN6.js} +0 -0
- /package/build/assets/{external-link-lhdITPqq.js → external-link-CpPMXxrV.js} +0 -0
- /package/build/assets/{folder-Bk311brm.js → folder-BabbYnbF.js} +0 -0
- /package/build/assets/{format-time-delta-DhDbkD7V.js → format-time-delta-BkAmJEPT.js} +0 -0
- /package/build/assets/{get-language-from-path-DBqBsCWH.js → get-language-from-path-CPNnuVhI.js} +0 -0
- /package/build/assets/{git-status-mapper-DnL9OC8_.js → git-status-mapper-BIXK0AAG.js} +0 -0
- /package/build/assets/{iconBase-Dz51Zn5x.js → iconBase-Ch-fOe8B.js} +0 -0
- /package/build/assets/{link-external-CaBmUEs_.js → link-external-DfKQroKX.js} +0 -0
- /package/build/assets/{list-todo-CAtvkzcy.js → list-todo-6J6zc8oS.js} +0 -0
- /package/build/assets/{llm-subscription-DtsX5Lhg.js → llm-subscription-Bvu8BLXc.js} +0 -0
- /package/build/assets/{loader-circle-CsAsfLIs.js → loader-circle-DGsqG5qw.js} +0 -0
- /package/build/assets/{map-provider-BbIb12oh.js → map-provider-BSvXvVR0.js} +0 -0
- /package/build/assets/{middleware-DYHYNAnP.js → middleware-_izt7V6U.js} +0 -0
- /package/build/assets/{modal-backdrop-zVwfOJZr.js → modal-backdrop-B7H42xHG.js} +0 -0
- /package/build/assets/{navigation-context-DPs2G0X8.js → navigation-context-cvyvI1WA.js} +0 -0
- /package/build/assets/{openhands-logo-bcNw5bkY.js → openhands-logo-pEw0nKFP.js} +0 -0
- /package/build/assets/{pencil-CWhApFIT.js → pencil-DmSqWUA3.js} +0 -0
- /package/build/assets/{react-DPDgL6du.js → react-MKQOkha9.js} +0 -0
- /package/build/assets/{search-BgOCR7_c.js → search-B5D5EuSn.js} +0 -0
- /package/build/assets/{search-dIQ09UY2.js → search-vnYL5jwV.js} +0 -0
- /package/build/assets/{settings-gear-MXCyZW0x.js → settings-gear-BOwF59Bs.js} +0 -0
- /package/build/assets/{settings-section-header-context-COMOIaxV.js → settings-section-header-context-CGgHZXrf.js} +0 -0
- /package/build/assets/{skills-EqzxYBvT.js → skills-arUOHLcS.js} +0 -0
- /package/build/assets/{square-chevron-right-DE-JN-2Z.js → square-chevron-right-EizCGtgq.js} +0 -0
- /package/build/assets/{switch-skeleton-DqQwalyu.js → switch-skeleton-BjPRx1QD.js} +0 -0
- /package/build/assets/{terminal-Cgf___rK.js → terminal-a57bHgZs.js} +0 -0
- /package/build/assets/{trash-2-BU6BlW4i.js → trash-2-CF3hilrY.js} +0 -0
- /package/build/assets/{u-check-circle-BqoIxNz_.js → u-check-circle-WGqHdtfO.js} +0 -0
- /package/build/assets/{u-check-circle-half-MsShT8Ec.js → u-check-circle-half-LiwZkuFe.js} +0 -0
- /package/build/assets/{u-edit-DL5LgKon.js → u-edit-BwHepAPi.js} +0 -0
- /package/build/assets/{use-breakpoint-BP3lqLMx.js → use-breakpoint-B-O0lQ84.js} +0 -0
- /package/build/assets/{use-click-outside-element-D9BYdANT.js → use-click-outside-element-DLQIMQrz.js} +0 -0
- /package/build/assets/{use-is-authed-BezEyfeh.js → use-is-authed-BSeo4coy.js} +0 -0
- /package/build/assets/{use-onboarding-completion-C_Swglzp.js → use-onboarding-completion-C0hPNGpw.js} +0 -0
- /package/build/assets/{v4-DbCkTSoU.js → v4-q4yWTlMz.js} +0 -0
- /package/build/assets/{vendor~browser-By2MVv_N.js → vendor~browser-UwB1jbAZ.js} +0 -0
- /package/build/assets/{vendor~conversation-panel~conversation~alert-banner-CxfzCmkN.js → vendor~conversation-panel~conversation~alert-banner-DHDkknt5.js} +0 -0
- /package/build/assets/{vendor~index-home~home~conversation-panel~conversation-ChmYLVgz.js → vendor~index-home~home~conversation-panel~conversation-Bff9cq5J.js} +0 -0
- /package/build/assets/{vendor~module-D5a_AClf.js → vendor~module-D4DeFV4J.js} +0 -0
- /package/build/assets/{vendor~terminal-CnKZILnC.js → vendor~terminal-B7Eiak0-.js} +0 -0
- /package/build/assets/{x-ZE4iplpF.js → x-DQB_00VJ.js} +0 -0
- /package/build/assets/{x-mark-Batp6gXa.js → x-mark-B32XuEwS.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-install-restart-banner.cjs","names":[],"sources":["../../../../src/components/features/chat/skill-install-restart-banner.tsx"],"sourcesContent":["import { useTranslation } from \"react-i18next\";\nimport { X } from \"lucide-react\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { useSkillInstalls } from \"#/hooks/use-skill-installs\";\nimport { useCreateConversation } from \"#/hooks/mutation/use-create-conversation\";\nimport { useIsCreatingConversation } from \"#/hooks/use-is-creating-conversation\";\nimport { useNavigation } from \"#/context/navigation-context\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\n\nexport interface SkillInstallRestartBannerProps {\n conversationId: string | null | undefined;\n}\n\n/**\n * Pinned notice shown after the agent installs a skill via the bundled\n * add-skill flow. The SDK loads skills once at conversation start, so a\n * chat-installed skill can't activate in the running conversation — this\n * banner says so and offers one action: start a new conversation in the\n * directory the skill was installed to.\n */\nexport function SkillInstallRestartBanner({\n conversationId,\n}: SkillInstallRestartBannerProps) {\n const { t } = useTranslation(\"openhands\");\n const { installs, dismissAll } = useSkillInstalls(conversationId);\n const { backend } = useActiveBackend();\n const { mutate: createConversation, isPending } = useCreateConversation();\n const isCreatingElsewhere = useIsCreatingConversation();\n const { navigate } = useNavigation();\n const { data: conversation } = useActiveConversation();\n\n // Local-only: the cloud create path ignores workingDir entirely.\n if (backend.kind !== \"local\" || installs.length === 0) return null;\n\n const latest = installs[installs.length - 1];\n const skillNames = installs\n .filter((install) => install.workspacePath === latest.workspacePath)\n .map((install) => install.skillName);\n\n const handleRestart = () => {\n if (isPending || isCreatingElsewhere) return;\n createConversation(\n {\n // The agent's real install root, parsed from the fetch_skill.py\n // success line — correct even for worktree conversations where\n // selected_workspace would point elsewhere.\n workingDir: latest.workspacePath,\n // new_worktree would start from a fresh worktree without the\n // freshly installed .agents/skills/ directory.\n workspaceMode: \"local_repo\",\n repository:\n conversation?.selected_repository && conversation?.git_provider\n ? {\n name: conversation.selected_repository,\n gitProvider: conversation.git_provider,\n branch: conversation.selected_branch ?? undefined,\n }\n : undefined,\n entryPoint: \"skill_install_restart_banner\",\n },\n {\n onSuccess: (data) => navigate(`/conversations/${data.conversation_id}`),\n onError: (error) => displayErrorToast(error.message),\n },\n );\n };\n\n return (\n <div\n className=\"flex w-full items-start gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]\"\n data-testid=\"skill-install-restart-banner\"\n >\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm text-[var(--oh-foreground)]\">\n {t(I18nKey.SKILLS$INSTALL_BANNER_MESSAGE, {\n skills: skillNames.join(\", \"),\n })}\n </p>\n <button\n type=\"button\"\n onClick={handleRestart}\n disabled={isPending || isCreatingElsewhere}\n className=\"mt-2 cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] disabled:cursor-not-allowed disabled:opacity-50\"\n data-testid=\"skill-install-restart-action\"\n >\n {t(I18nKey.SKILLS$INSTALL_BANNER_ACTION)}\n </button>\n </div>\n <button\n type=\"button\"\n onClick={dismissAll}\n className=\"shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]\"\n aria-label={t(I18nKey.BUTTON$CLOSE)}\n data-testid=\"skill-install-restart-dismiss\"\n >\n <X className=\"h-4 w-4\" aria-hidden />\n </button>\n </div>\n );\n}\n"],"mappings":"4qBAsBA,SAAgB,EAA0B,CACxC,kBACiC,CACjC,GAAM,CAAE,KAAM,EAAA,eAAe,YAAY,CACnC,CAAE,WAAU,cAAe,EAAA,iBAAiB,EAAe,CAC3D,CAAE,WAAY,EAAA,kBAAkB,CAChC,CAAE,OAAQ,EAAoB,aAAc,EAAA,uBAAuB,CACnE,EAAsB,EAAA,2BAA2B,CACjD,CAAE,YAAa,EAAA,eAAe,CAC9B,CAAE,KAAM,GAAiB,EAAA,uBAAuB,CAGtD,GAAI,EAAQ,OAAS,SAAW,EAAS,SAAW,EAAG,OAAO,KAE9D,IAAM,EAAS,EAAS,EAAS,OAAS,GACpC,EAAa,EAChB,OAAQ,GAAY,EAAQ,gBAAkB,EAAO,cAAc,CACnE,IAAK,GAAY,EAAQ,UAAU,CA8BtC,OACE,EAAA,EAAA,MAAC,MAAD,CACE,UAAU,0IACV,cAAY,wCAFd,EAIE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,0BAAf,EACE,EAAA,EAAA,KAAC,IAAD,CAAG,UAAU,+CACV,EAAE,EAAA,QAAQ,8BAA+B,CACxC,OAAQ,EAAW,KAAK,KAAK,CAC9B,CAAC,CACA,CAAA,EACJ,EAAA,EAAA,KAAC,SAAD,CACE,KAAK,SACL,YAzCoB,CACtB,GAAa,GACjB,EACE,CAIE,WAAY,EAAO,cAGnB,cAAe,aACf,WACE,GAAc,qBAAuB,GAAc,aAC/C,CACE,KAAM,EAAa,oBACnB,YAAa,EAAa,aAC1B,OAAQ,EAAa,iBAAmB,IAAA,GACzC,CACD,IAAA,GACN,WAAY,+BACb,CACD,CACE,UAAY,GAAS,EAAS,kBAAkB,EAAK,kBAAkB,CACvE,QAAU,GAAU,EAAA,kBAAkB,EAAM,QAAQ,CACrD,CACF,EAiBK,SAAU,GAAa,EACvB,UAAU,mNACV,cAAY,wCAEX,EAAE,EAAA,QAAQ,6BAA6B,CACjC,CAAA,CACL,IACN,EAAA,EAAA,KAAC,SAAD,CACE,KAAK,SACL,QAAS,EACT,UAAU,yIACV,aAAY,EAAE,EAAA,QAAQ,aAAa,CACnC,cAAY,0CAEZ,EAAA,EAAA,KAAC,EAAA,EAAD,CAAG,UAAU,UAAU,cAAA,GAAc,CAAA,CAC9B,CAAA,CACL"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface SkillInstallRestartBannerProps {
|
|
2
|
+
conversationId: string | null | undefined;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Pinned notice shown after the agent installs a skill via the bundled
|
|
6
|
+
* add-skill flow. The SDK loads skills once at conversation start, so a
|
|
7
|
+
* chat-installed skill can't activate in the running conversation — this
|
|
8
|
+
* banner says so and offers one action: start a new conversation in the
|
|
9
|
+
* directory the skill was installed to.
|
|
10
|
+
*/
|
|
11
|
+
export declare function SkillInstallRestartBanner({ conversationId, }: SkillInstallRestartBannerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { useTranslation as e } from "../../../node_modules/react-i18next/dist/es/useTranslation.js";
|
|
2
|
+
import { I18nKey as t } from "../../../i18n/declaration.js";
|
|
3
|
+
import { X as n } from "../../../node_modules/lucide-react/dist/esm/icons/x.js";
|
|
4
|
+
import { useNavigation as r } from "../../../context/navigation-context.js";
|
|
5
|
+
import { displayErrorToast as i } from "../../../utils/custom-toast-handlers.js";
|
|
6
|
+
import { useActiveBackend as a } from "../../../contexts/active-backend-context.js";
|
|
7
|
+
import { useActiveConversation as o } from "../../../hooks/query/use-active-conversation.js";
|
|
8
|
+
import { useCreateConversation as s } from "../../../hooks/mutation/use-create-conversation.js";
|
|
9
|
+
import { useSkillInstalls as c } from "../../../hooks/use-skill-installs.js";
|
|
10
|
+
import { useIsCreatingConversation as l } from "../../../hooks/use-is-creating-conversation.js";
|
|
11
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
12
|
+
//#region src/components/features/chat/skill-install-restart-banner.tsx
|
|
13
|
+
function f({ conversationId: f }) {
|
|
14
|
+
let { t: p } = e("openhands"), { installs: m, dismissAll: h } = c(f), { backend: g } = a(), { mutate: _, isPending: v } = s(), y = l(), { navigate: b } = r(), { data: x } = o();
|
|
15
|
+
if (g.kind !== "local" || m.length === 0) return null;
|
|
16
|
+
let S = m[m.length - 1], C = m.filter((e) => e.workspacePath === S.workspacePath).map((e) => e.skillName);
|
|
17
|
+
return /* @__PURE__ */ d("div", {
|
|
18
|
+
className: "flex w-full items-start gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]",
|
|
19
|
+
"data-testid": "skill-install-restart-banner",
|
|
20
|
+
children: [/* @__PURE__ */ d("div", {
|
|
21
|
+
className: "min-w-0 flex-1",
|
|
22
|
+
children: [/* @__PURE__ */ u("p", {
|
|
23
|
+
className: "text-sm text-[var(--oh-foreground)]",
|
|
24
|
+
children: p(t.SKILLS$INSTALL_BANNER_MESSAGE, { skills: C.join(", ") })
|
|
25
|
+
}), /* @__PURE__ */ u("button", {
|
|
26
|
+
type: "button",
|
|
27
|
+
onClick: () => {
|
|
28
|
+
v || y || _({
|
|
29
|
+
workingDir: S.workspacePath,
|
|
30
|
+
workspaceMode: "local_repo",
|
|
31
|
+
repository: x?.selected_repository && x?.git_provider ? {
|
|
32
|
+
name: x.selected_repository,
|
|
33
|
+
gitProvider: x.git_provider,
|
|
34
|
+
branch: x.selected_branch ?? void 0
|
|
35
|
+
} : void 0,
|
|
36
|
+
entryPoint: "skill_install_restart_banner"
|
|
37
|
+
}, {
|
|
38
|
+
onSuccess: (e) => b(`/conversations/${e.conversation_id}`),
|
|
39
|
+
onError: (e) => i(e.message)
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
disabled: v || y,
|
|
43
|
+
className: "mt-2 cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
44
|
+
"data-testid": "skill-install-restart-action",
|
|
45
|
+
children: p(t.SKILLS$INSTALL_BANNER_ACTION)
|
|
46
|
+
})]
|
|
47
|
+
}), /* @__PURE__ */ u("button", {
|
|
48
|
+
type: "button",
|
|
49
|
+
onClick: h,
|
|
50
|
+
className: "shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]",
|
|
51
|
+
"aria-label": p(t.BUTTON$CLOSE),
|
|
52
|
+
"data-testid": "skill-install-restart-dismiss",
|
|
53
|
+
children: /* @__PURE__ */ u(n, {
|
|
54
|
+
className: "h-4 w-4",
|
|
55
|
+
"aria-hidden": !0
|
|
56
|
+
})
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
export { f as SkillInstallRestartBanner };
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=skill-install-restart-banner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-install-restart-banner.js","names":[],"sources":["../../../../src/components/features/chat/skill-install-restart-banner.tsx"],"sourcesContent":["import { useTranslation } from \"react-i18next\";\nimport { X } from \"lucide-react\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { useSkillInstalls } from \"#/hooks/use-skill-installs\";\nimport { useCreateConversation } from \"#/hooks/mutation/use-create-conversation\";\nimport { useIsCreatingConversation } from \"#/hooks/use-is-creating-conversation\";\nimport { useNavigation } from \"#/context/navigation-context\";\nimport { useActiveConversation } from \"#/hooks/query/use-active-conversation\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { displayErrorToast } from \"#/utils/custom-toast-handlers\";\n\nexport interface SkillInstallRestartBannerProps {\n conversationId: string | null | undefined;\n}\n\n/**\n * Pinned notice shown after the agent installs a skill via the bundled\n * add-skill flow. The SDK loads skills once at conversation start, so a\n * chat-installed skill can't activate in the running conversation — this\n * banner says so and offers one action: start a new conversation in the\n * directory the skill was installed to.\n */\nexport function SkillInstallRestartBanner({\n conversationId,\n}: SkillInstallRestartBannerProps) {\n const { t } = useTranslation(\"openhands\");\n const { installs, dismissAll } = useSkillInstalls(conversationId);\n const { backend } = useActiveBackend();\n const { mutate: createConversation, isPending } = useCreateConversation();\n const isCreatingElsewhere = useIsCreatingConversation();\n const { navigate } = useNavigation();\n const { data: conversation } = useActiveConversation();\n\n // Local-only: the cloud create path ignores workingDir entirely.\n if (backend.kind !== \"local\" || installs.length === 0) return null;\n\n const latest = installs[installs.length - 1];\n const skillNames = installs\n .filter((install) => install.workspacePath === latest.workspacePath)\n .map((install) => install.skillName);\n\n const handleRestart = () => {\n if (isPending || isCreatingElsewhere) return;\n createConversation(\n {\n // The agent's real install root, parsed from the fetch_skill.py\n // success line — correct even for worktree conversations where\n // selected_workspace would point elsewhere.\n workingDir: latest.workspacePath,\n // new_worktree would start from a fresh worktree without the\n // freshly installed .agents/skills/ directory.\n workspaceMode: \"local_repo\",\n repository:\n conversation?.selected_repository && conversation?.git_provider\n ? {\n name: conversation.selected_repository,\n gitProvider: conversation.git_provider,\n branch: conversation.selected_branch ?? undefined,\n }\n : undefined,\n entryPoint: \"skill_install_restart_banner\",\n },\n {\n onSuccess: (data) => navigate(`/conversations/${data.conversation_id}`),\n onError: (error) => displayErrorToast(error.message),\n },\n );\n };\n\n return (\n <div\n className=\"flex w-full items-start gap-2 rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface-raised)] p-2 text-[var(--oh-foreground)]\"\n data-testid=\"skill-install-restart-banner\"\n >\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm text-[var(--oh-foreground)]\">\n {t(I18nKey.SKILLS$INSTALL_BANNER_MESSAGE, {\n skills: skillNames.join(\", \"),\n })}\n </p>\n <button\n type=\"button\"\n onClick={handleRestart}\n disabled={isPending || isCreatingElsewhere}\n className=\"mt-2 cursor-pointer rounded-md border border-[var(--oh-border)] px-2 py-1 text-xs font-normal text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)] disabled:cursor-not-allowed disabled:opacity-50\"\n data-testid=\"skill-install-restart-action\"\n >\n {t(I18nKey.SKILLS$INSTALL_BANNER_ACTION)}\n </button>\n </div>\n <button\n type=\"button\"\n onClick={dismissAll}\n className=\"shrink-0 cursor-pointer rounded-md p-1 text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-[var(--oh-foreground)]\"\n aria-label={t(I18nKey.BUTTON$CLOSE)}\n data-testid=\"skill-install-restart-dismiss\"\n >\n <X className=\"h-4 w-4\" aria-hidden />\n </button>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAsBA,SAAgB,EAA0B,EACxC,qBACiC;CACjC,IAAM,EAAE,SAAM,EAAe,YAAY,EACnC,EAAE,aAAU,kBAAe,EAAiB,EAAe,EAC3D,EAAE,eAAY,GAAkB,EAChC,EAAE,QAAQ,GAAoB,iBAAc,GAAuB,EACnE,IAAsB,GAA2B,EACjD,EAAE,gBAAa,GAAe,EAC9B,EAAE,MAAM,MAAiB,GAAuB;AAGtD,KAAI,EAAQ,SAAS,WAAW,EAAS,WAAW,EAAG,QAAO;CAE9D,IAAM,IAAS,EAAS,EAAS,SAAS,IACpC,IAAa,EAChB,QAAQ,MAAY,EAAQ,kBAAkB,EAAO,cAAc,CACnE,KAAK,MAAY,EAAQ,UAAU;AA8BtC,QACE,kBAAC,OAAD;EACE,WAAU;EACV,eAAY;YAFd,CAIE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,KAAD;IAAG,WAAU;cACV,EAAE,EAAQ,+BAA+B,EACxC,QAAQ,EAAW,KAAK,KAAK,EAC9B,CAAC;IACA,CAAA,EACJ,kBAAC,UAAD;IACE,MAAK;IACL,eAzCoB;AACtB,UAAa,KACjB,EACE;MAIE,YAAY,EAAO;MAGnB,eAAe;MACf,YACE,GAAc,uBAAuB,GAAc,eAC/C;OACE,MAAM,EAAa;OACnB,aAAa,EAAa;OAC1B,QAAQ,EAAa,mBAAmB,KAAA;OACzC,GACD,KAAA;MACN,YAAY;MACb,EACD;MACE,YAAY,MAAS,EAAS,kBAAkB,EAAK,kBAAkB;MACvE,UAAU,MAAU,EAAkB,EAAM,QAAQ;MACrD,CACF;;IAiBK,UAAU,KAAa;IACvB,WAAU;IACV,eAAY;cAEX,EAAE,EAAQ,6BAA6B;IACjC,CAAA,CACL;MACN,kBAAC,UAAD;GACE,MAAK;GACL,SAAS;GACT,WAAU;GACV,cAAY,EAAE,EAAQ,aAAa;GACnC,eAAY;aAEZ,kBAAC,GAAD;IAAG,WAAU;IAAU,eAAA;IAAc,CAAA;GAC9B,CAAA,CACL"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require(`../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../node_modules/react-i18next/dist/es/useTranslation.cjs`),t=require(`../../../i18n/declaration.cjs`),n=require(`../../../utils/utils.cjs`),r=require(`../../../hooks/use-conversation-id.cjs`),i=require(`../../../stores/conversation-store.cjs`),a=require(`../../../hooks/use-is-archived-conversation.cjs`),o=require(`../../../hooks/use-breakpoint.cjs`),s=require(`../../../utils/mobile-top-bar-icon-button-classes.cjs`),c=require(`../../../icons/block-drawer-left.cjs`),l=require(`../chat/chat-action-tooltip.cjs`);let u=require(`react/jsx-runtime`),d=require(`react-router`);function f({className:f}){let{t:p}=e.useTranslation(`openhands`),m=o.useBreakpoint(),h=a.useIsArchivedConversation(),g=(0,d.useNavigate)(),{conversationId:_}=r.useConversationId(),{isRightPanelShown:v,setHasRightPanelToggled:y,setIsRightPanelShown:b,setSelectedTab:x}=i.useConversationStore(),S=()=>{if(h)return;if(m){if(!_)return;y(!0),b(!0);let{selectedTab:e}=i.useConversationStore.getState();e||x(`files`),g(`/conversations/${_}/panel`);return}let e=!v;if(y(e),e){let{selectedTab:e}=i.useConversationStore.getState();e||x(`files`)}},C=p(h?t.I18nKey.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES:m?t.I18nKey.COMMON$SHOW_PANEL:v?t.I18nKey.COMMON$HIDE_PANEL:t.I18nKey.COMMON$SHOW_PANEL),w=m?!1:v;return(0,u.jsx)(l.ChatActionTooltip,{tooltip:C,ariaLabel:C,children:(0,u.jsx)(`button`,{type:`button`,onClick:S,disabled:h,className:n.cn(s.mobileTopBarIconButtonClassName,h&&`cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]`,f),"aria-label":C,"aria-pressed":w,"aria-disabled":h,"data-testid":`right-panel-toggle`,children:(0,u.jsx)(c.default,{className:`w-5 h-5 -scale-x-100`})})})}exports.RightPanelToggle=f;
|
|
1
|
+
require(`../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../node_modules/react-i18next/dist/es/useTranslation.cjs`),t=require(`../../../i18n/declaration.cjs`),n=require(`../../../utils/utils.cjs`),r=require(`../../../hooks/use-conversation-id.cjs`),i=require(`../../../stores/conversation-store.cjs`),a=require(`../../../hooks/use-is-archived-conversation.cjs`),o=require(`../../../hooks/use-breakpoint.cjs`),s=require(`../../../utils/mobile-top-bar-icon-button-classes.cjs`),c=require(`../../../icons/block-drawer-left.cjs`),l=require(`../chat/chat-action-tooltip.cjs`);let u=require(`react/jsx-runtime`),d=require(`react-router`);function f({className:f}){let{t:p}=e.useTranslation(`openhands`),m=o.useBreakpoint(),h=a.useIsArchivedConversation(),g=(0,d.useNavigate)(),{conversationId:_}=r.useConversationId(),{isRightPanelShown:v,setHasRightPanelToggled:y,setIsRightPanelShown:b,setSelectedTab:x}=i.useConversationStore(),S=()=>{if(h)return;if(m){if(!_)return;y(!0),b(!0);let{selectedTab:e}=i.useConversationStore.getState();e||x(`files`),g(`/conversations/${_}/panel`);return}let e=!v;if(y(e),b(e),e){let{selectedTab:e}=i.useConversationStore.getState();e||x(`files`)}},C=p(h?t.I18nKey.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES:m?t.I18nKey.COMMON$SHOW_PANEL:v?t.I18nKey.COMMON$HIDE_PANEL:t.I18nKey.COMMON$SHOW_PANEL),w=m?!1:v;return(0,u.jsx)(l.ChatActionTooltip,{tooltip:C,ariaLabel:C,children:(0,u.jsx)(`button`,{type:`button`,onClick:S,disabled:h,className:n.cn(s.mobileTopBarIconButtonClassName,h&&`cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]`,f),"aria-label":C,"aria-pressed":w,"aria-disabled":h,"data-testid":`right-panel-toggle`,children:(0,u.jsx)(c.default,{className:`w-5 h-5 -scale-x-100`})})})}exports.RightPanelToggle=f;
|
|
2
2
|
//# sourceMappingURL=right-panel-toggle.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"right-panel-toggle.cjs","names":[],"sources":["../../../../src/components/features/conversation/right-panel-toggle.tsx"],"sourcesContent":["import { useNavigate } from \"react-router\";\nimport { useTranslation } from \"react-i18next\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { cn } from \"#/utils/utils\";\nimport { mobileTopBarIconButtonClassName } from \"#/utils/mobile-top-bar-icon-button-classes\";\nimport BlockDrawerLeftIcon from \"#/icons/block-drawer-left.svg?react\";\nimport { ChatActionTooltip } from \"../chat/chat-action-tooltip\";\nimport { useBreakpoint } from \"#/hooks/use-breakpoint\";\nimport { useConversationId } from \"#/hooks/use-conversation-id\";\nimport { useIsArchivedConversation } from \"#/hooks/use-is-archived-conversation\";\n\ninterface RightPanelToggleProps {\n className?: string;\n}\n\n/**\n * Toggle button for showing/hiding the right panel.\n *\n * Placed in the chat header so users can always restore the panel,\n * even when it's hidden. The open/closed state lives in the in-memory\n * Zustand store and is intentionally not persisted across full reloads —\n * see the comment in `useConversationStore` for the rationale.\n */\nexport function RightPanelToggle({ className }: RightPanelToggleProps) {\n const { t } = useTranslation(\"openhands\");\n const isMobile = useBreakpoint();\n const isArchivedConversation = useIsArchivedConversation();\n const navigate = useNavigate();\n const { conversationId } = useConversationId();\n const {\n isRightPanelShown,\n setHasRightPanelToggled,\n setIsRightPanelShown,\n setSelectedTab,\n } = useConversationStore();\n\n const handleToggle = () => {\n if (isArchivedConversation) {\n return;\n }\n\n if (isMobile) {\n if (!conversationId) return;\n setHasRightPanelToggled(true);\n setIsRightPanelShown(true);\n const { selectedTab } = useConversationStore.getState();\n if (!selectedTab) {\n setSelectedTab(\"files\");\n }\n navigate(`/conversations/${conversationId}/panel`);\n return;\n }\n\n const newState = !isRightPanelShown;\n setHasRightPanelToggled(newState);\n\n if (newState) {\n const { selectedTab } = useConversationStore.getState();\n if (!selectedTab) {\n setSelectedTab(\"files\");\n }\n }\n };\n\n const tooltipText = isArchivedConversation\n ? t(I18nKey.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES)\n : isMobile\n ? t(I18nKey.COMMON$SHOW_PANEL)\n : isRightPanelShown\n ? t(I18nKey.COMMON$HIDE_PANEL)\n : t(I18nKey.COMMON$SHOW_PANEL);\n\n const ariaPressed = isMobile ? false : isRightPanelShown;\n\n return (\n <ChatActionTooltip tooltip={tooltipText} ariaLabel={tooltipText}>\n <button\n type=\"button\"\n onClick={handleToggle}\n disabled={isArchivedConversation}\n className={cn(\n mobileTopBarIconButtonClassName,\n isArchivedConversation &&\n \"cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]\",\n className,\n )}\n aria-label={tooltipText}\n aria-pressed={ariaPressed}\n aria-disabled={isArchivedConversation}\n data-testid=\"right-panel-toggle\"\n >\n <BlockDrawerLeftIcon className=\"w-5 h-5 -scale-x-100\" />\n </button>\n </ChatActionTooltip>\n );\n}\n"],"mappings":"yoBAwBA,SAAgB,EAAiB,CAAE,aAAoC,CACrE,GAAM,CAAE,KAAM,EAAA,eAAe,YAAY,CACnC,EAAW,EAAA,eAAe,CAC1B,EAAyB,EAAA,2BAA2B,CACpD,GAAA,EAAA,EAAA,cAAwB,CACxB,CAAE,kBAAmB,EAAA,mBAAmB,CACxC,CACJ,oBACA,0BACA,uBACA,kBACE,EAAA,sBAAsB,CAEpB,MAAqB,CACzB,GAAI,EACF,OAGF,GAAI,EAAU,CACZ,GAAI,CAAC,EAAgB,OACrB,EAAwB,GAAK,CAC7B,EAAqB,GAAK,CAC1B,GAAM,CAAE,eAAgB,EAAA,qBAAqB,UAAU,CAClD,GACH,EAAe,QAAQ,CAEzB,EAAS,kBAAkB,EAAe,QAAQ,CAClD,OAGF,IAAM,EAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"right-panel-toggle.cjs","names":[],"sources":["../../../../src/components/features/conversation/right-panel-toggle.tsx"],"sourcesContent":["import { useNavigate } from \"react-router\";\nimport { useTranslation } from \"react-i18next\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { cn } from \"#/utils/utils\";\nimport { mobileTopBarIconButtonClassName } from \"#/utils/mobile-top-bar-icon-button-classes\";\nimport BlockDrawerLeftIcon from \"#/icons/block-drawer-left.svg?react\";\nimport { ChatActionTooltip } from \"../chat/chat-action-tooltip\";\nimport { useBreakpoint } from \"#/hooks/use-breakpoint\";\nimport { useConversationId } from \"#/hooks/use-conversation-id\";\nimport { useIsArchivedConversation } from \"#/hooks/use-is-archived-conversation\";\n\ninterface RightPanelToggleProps {\n className?: string;\n}\n\n/**\n * Toggle button for showing/hiding the right panel.\n *\n * Placed in the chat header so users can always restore the panel,\n * even when it's hidden. The open/closed state lives in the in-memory\n * Zustand store and is intentionally not persisted across full reloads —\n * see the comment in `useConversationStore` for the rationale.\n */\nexport function RightPanelToggle({ className }: RightPanelToggleProps) {\n const { t } = useTranslation(\"openhands\");\n const isMobile = useBreakpoint();\n const isArchivedConversation = useIsArchivedConversation();\n const navigate = useNavigate();\n const { conversationId } = useConversationId();\n const {\n isRightPanelShown,\n setHasRightPanelToggled,\n setIsRightPanelShown,\n setSelectedTab,\n } = useConversationStore();\n\n const handleToggle = () => {\n if (isArchivedConversation) {\n return;\n }\n\n if (isMobile) {\n if (!conversationId) return;\n setHasRightPanelToggled(true);\n setIsRightPanelShown(true);\n const { selectedTab } = useConversationStore.getState();\n if (!selectedTab) {\n setSelectedTab(\"files\");\n }\n navigate(`/conversations/${conversationId}/panel`);\n return;\n }\n\n const newState = !isRightPanelShown;\n setHasRightPanelToggled(newState);\n setIsRightPanelShown(newState);\n\n if (newState) {\n const { selectedTab } = useConversationStore.getState();\n if (!selectedTab) {\n setSelectedTab(\"files\");\n }\n }\n };\n\n const tooltipText = isArchivedConversation\n ? t(I18nKey.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES)\n : isMobile\n ? t(I18nKey.COMMON$SHOW_PANEL)\n : isRightPanelShown\n ? t(I18nKey.COMMON$HIDE_PANEL)\n : t(I18nKey.COMMON$SHOW_PANEL);\n\n const ariaPressed = isMobile ? false : isRightPanelShown;\n\n return (\n <ChatActionTooltip tooltip={tooltipText} ariaLabel={tooltipText}>\n <button\n type=\"button\"\n onClick={handleToggle}\n disabled={isArchivedConversation}\n className={cn(\n mobileTopBarIconButtonClassName,\n isArchivedConversation &&\n \"cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]\",\n className,\n )}\n aria-label={tooltipText}\n aria-pressed={ariaPressed}\n aria-disabled={isArchivedConversation}\n data-testid=\"right-panel-toggle\"\n >\n <BlockDrawerLeftIcon className=\"w-5 h-5 -scale-x-100\" />\n </button>\n </ChatActionTooltip>\n );\n}\n"],"mappings":"yoBAwBA,SAAgB,EAAiB,CAAE,aAAoC,CACrE,GAAM,CAAE,KAAM,EAAA,eAAe,YAAY,CACnC,EAAW,EAAA,eAAe,CAC1B,EAAyB,EAAA,2BAA2B,CACpD,GAAA,EAAA,EAAA,cAAwB,CACxB,CAAE,kBAAmB,EAAA,mBAAmB,CACxC,CACJ,oBACA,0BACA,uBACA,kBACE,EAAA,sBAAsB,CAEpB,MAAqB,CACzB,GAAI,EACF,OAGF,GAAI,EAAU,CACZ,GAAI,CAAC,EAAgB,OACrB,EAAwB,GAAK,CAC7B,EAAqB,GAAK,CAC1B,GAAM,CAAE,eAAgB,EAAA,qBAAqB,UAAU,CAClD,GACH,EAAe,QAAQ,CAEzB,EAAS,kBAAkB,EAAe,QAAQ,CAClD,OAGF,IAAM,EAAW,CAAC,EAIlB,GAHA,EAAwB,EAAS,CACjC,EAAqB,EAAS,CAE1B,EAAU,CACZ,GAAM,CAAE,eAAgB,EAAA,qBAAqB,UAAU,CAClD,GACH,EAAe,QAAQ,GAKvB,EACF,EADgB,EACd,EAAA,QAAQ,sCACV,EACI,EAAA,QAAQ,kBACV,EACI,EAAA,QAAQ,kBACR,EAAA,QAAQ,kBAAkB,CAE9B,EAAc,EAAW,GAAQ,EAEvC,OACE,EAAA,EAAA,KAAC,EAAA,kBAAD,CAAmB,QAAS,EAAa,UAAW,YAClD,EAAA,EAAA,KAAC,SAAD,CACE,KAAK,SACL,QAAS,EACT,SAAU,EACV,UAAW,EAAA,GACT,EAAA,gCACA,GACE,kFACF,EACD,CACD,aAAY,EACZ,eAAc,EACd,gBAAe,EACf,cAAY,+BAEZ,EAAA,EAAA,KAAC,EAAA,QAAD,CAAqB,UAAU,uBAAyB,CAAA,CACjD,CAAA,CACS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"right-panel-toggle.js","names":[],"sources":["../../../../src/components/features/conversation/right-panel-toggle.tsx"],"sourcesContent":["import { useNavigate } from \"react-router\";\nimport { useTranslation } from \"react-i18next\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { cn } from \"#/utils/utils\";\nimport { mobileTopBarIconButtonClassName } from \"#/utils/mobile-top-bar-icon-button-classes\";\nimport BlockDrawerLeftIcon from \"#/icons/block-drawer-left.svg?react\";\nimport { ChatActionTooltip } from \"../chat/chat-action-tooltip\";\nimport { useBreakpoint } from \"#/hooks/use-breakpoint\";\nimport { useConversationId } from \"#/hooks/use-conversation-id\";\nimport { useIsArchivedConversation } from \"#/hooks/use-is-archived-conversation\";\n\ninterface RightPanelToggleProps {\n className?: string;\n}\n\n/**\n * Toggle button for showing/hiding the right panel.\n *\n * Placed in the chat header so users can always restore the panel,\n * even when it's hidden. The open/closed state lives in the in-memory\n * Zustand store and is intentionally not persisted across full reloads —\n * see the comment in `useConversationStore` for the rationale.\n */\nexport function RightPanelToggle({ className }: RightPanelToggleProps) {\n const { t } = useTranslation(\"openhands\");\n const isMobile = useBreakpoint();\n const isArchivedConversation = useIsArchivedConversation();\n const navigate = useNavigate();\n const { conversationId } = useConversationId();\n const {\n isRightPanelShown,\n setHasRightPanelToggled,\n setIsRightPanelShown,\n setSelectedTab,\n } = useConversationStore();\n\n const handleToggle = () => {\n if (isArchivedConversation) {\n return;\n }\n\n if (isMobile) {\n if (!conversationId) return;\n setHasRightPanelToggled(true);\n setIsRightPanelShown(true);\n const { selectedTab } = useConversationStore.getState();\n if (!selectedTab) {\n setSelectedTab(\"files\");\n }\n navigate(`/conversations/${conversationId}/panel`);\n return;\n }\n\n const newState = !isRightPanelShown;\n setHasRightPanelToggled(newState);\n\n if (newState) {\n const { selectedTab } = useConversationStore.getState();\n if (!selectedTab) {\n setSelectedTab(\"files\");\n }\n }\n };\n\n const tooltipText = isArchivedConversation\n ? t(I18nKey.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES)\n : isMobile\n ? t(I18nKey.COMMON$SHOW_PANEL)\n : isRightPanelShown\n ? t(I18nKey.COMMON$HIDE_PANEL)\n : t(I18nKey.COMMON$SHOW_PANEL);\n\n const ariaPressed = isMobile ? false : isRightPanelShown;\n\n return (\n <ChatActionTooltip tooltip={tooltipText} ariaLabel={tooltipText}>\n <button\n type=\"button\"\n onClick={handleToggle}\n disabled={isArchivedConversation}\n className={cn(\n mobileTopBarIconButtonClassName,\n isArchivedConversation &&\n \"cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]\",\n className,\n )}\n aria-label={tooltipText}\n aria-pressed={ariaPressed}\n aria-disabled={isArchivedConversation}\n data-testid=\"right-panel-toggle\"\n >\n <BlockDrawerLeftIcon className=\"w-5 h-5 -scale-x-100\" />\n </button>\n </ChatActionTooltip>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAwBA,SAAgB,EAAiB,EAAE,gBAAoC;CACrE,IAAM,EAAE,SAAM,EAAe,YAAY,EACnC,IAAW,GAAe,EAC1B,IAAyB,GAA2B,EACpD,IAAW,GAAa,EACxB,EAAE,sBAAmB,GAAmB,EACxC,EACJ,sBACA,4BACA,yBACA,sBACE,GAAsB,EAEpB,UAAqB;AACzB,MAAI,EACF;AAGF,MAAI,GAAU;AACZ,OAAI,CAAC,EAAgB;AAErB,GADA,EAAwB,GAAK,EAC7B,EAAqB,GAAK;GAC1B,IAAM,EAAE,mBAAgB,EAAqB,UAAU;AAIvD,GAHK,KACH,EAAe,QAAQ,EAEzB,EAAS,kBAAkB,EAAe,QAAQ;AAClD;;EAGF,IAAM,IAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"right-panel-toggle.js","names":[],"sources":["../../../../src/components/features/conversation/right-panel-toggle.tsx"],"sourcesContent":["import { useNavigate } from \"react-router\";\nimport { useTranslation } from \"react-i18next\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { cn } from \"#/utils/utils\";\nimport { mobileTopBarIconButtonClassName } from \"#/utils/mobile-top-bar-icon-button-classes\";\nimport BlockDrawerLeftIcon from \"#/icons/block-drawer-left.svg?react\";\nimport { ChatActionTooltip } from \"../chat/chat-action-tooltip\";\nimport { useBreakpoint } from \"#/hooks/use-breakpoint\";\nimport { useConversationId } from \"#/hooks/use-conversation-id\";\nimport { useIsArchivedConversation } from \"#/hooks/use-is-archived-conversation\";\n\ninterface RightPanelToggleProps {\n className?: string;\n}\n\n/**\n * Toggle button for showing/hiding the right panel.\n *\n * Placed in the chat header so users can always restore the panel,\n * even when it's hidden. The open/closed state lives in the in-memory\n * Zustand store and is intentionally not persisted across full reloads —\n * see the comment in `useConversationStore` for the rationale.\n */\nexport function RightPanelToggle({ className }: RightPanelToggleProps) {\n const { t } = useTranslation(\"openhands\");\n const isMobile = useBreakpoint();\n const isArchivedConversation = useIsArchivedConversation();\n const navigate = useNavigate();\n const { conversationId } = useConversationId();\n const {\n isRightPanelShown,\n setHasRightPanelToggled,\n setIsRightPanelShown,\n setSelectedTab,\n } = useConversationStore();\n\n const handleToggle = () => {\n if (isArchivedConversation) {\n return;\n }\n\n if (isMobile) {\n if (!conversationId) return;\n setHasRightPanelToggled(true);\n setIsRightPanelShown(true);\n const { selectedTab } = useConversationStore.getState();\n if (!selectedTab) {\n setSelectedTab(\"files\");\n }\n navigate(`/conversations/${conversationId}/panel`);\n return;\n }\n\n const newState = !isRightPanelShown;\n setHasRightPanelToggled(newState);\n setIsRightPanelShown(newState);\n\n if (newState) {\n const { selectedTab } = useConversationStore.getState();\n if (!selectedTab) {\n setSelectedTab(\"files\");\n }\n }\n };\n\n const tooltipText = isArchivedConversation\n ? t(I18nKey.CONVERSATION$UNAVAILABLE_FOR_ARCHIVES)\n : isMobile\n ? t(I18nKey.COMMON$SHOW_PANEL)\n : isRightPanelShown\n ? t(I18nKey.COMMON$HIDE_PANEL)\n : t(I18nKey.COMMON$SHOW_PANEL);\n\n const ariaPressed = isMobile ? false : isRightPanelShown;\n\n return (\n <ChatActionTooltip tooltip={tooltipText} ariaLabel={tooltipText}>\n <button\n type=\"button\"\n onClick={handleToggle}\n disabled={isArchivedConversation}\n className={cn(\n mobileTopBarIconButtonClassName,\n isArchivedConversation &&\n \"cursor-not-allowed opacity-50 hover:bg-transparent hover:text-[var(--oh-muted)]\",\n className,\n )}\n aria-label={tooltipText}\n aria-pressed={ariaPressed}\n aria-disabled={isArchivedConversation}\n data-testid=\"right-panel-toggle\"\n >\n <BlockDrawerLeftIcon className=\"w-5 h-5 -scale-x-100\" />\n </button>\n </ChatActionTooltip>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAwBA,SAAgB,EAAiB,EAAE,gBAAoC;CACrE,IAAM,EAAE,SAAM,EAAe,YAAY,EACnC,IAAW,GAAe,EAC1B,IAAyB,GAA2B,EACpD,IAAW,GAAa,EACxB,EAAE,sBAAmB,GAAmB,EACxC,EACJ,sBACA,4BACA,yBACA,sBACE,GAAsB,EAEpB,UAAqB;AACzB,MAAI,EACF;AAGF,MAAI,GAAU;AACZ,OAAI,CAAC,EAAgB;AAErB,GADA,EAAwB,GAAK,EAC7B,EAAqB,GAAK;GAC1B,IAAM,EAAE,mBAAgB,EAAqB,UAAU;AAIvD,GAHK,KACH,EAAe,QAAQ,EAEzB,EAAS,kBAAkB,EAAe,QAAQ;AAClD;;EAGF,IAAM,IAAW,CAAC;AAIlB,MAHA,EAAwB,EAAS,EACjC,EAAqB,EAAS,EAE1B,GAAU;GACZ,IAAM,EAAE,mBAAgB,EAAqB,UAAU;AACvD,GAAK,KACH,EAAe,QAAQ;;IAKvB,IACF,EADgB,IACd,EAAQ,wCACV,IACI,EAAQ,oBACV,IACI,EAAQ,oBACR,EAAQ,kBAAkB,EAE9B,IAAc,IAAW,KAAQ;AAEvC,QACE,kBAAC,GAAD;EAAmB,SAAS;EAAa,WAAW;YAClD,kBAAC,UAAD;GACE,MAAK;GACL,SAAS;GACT,UAAU;GACV,WAAW,EACT,GACA,KACE,mFACF,EACD;GACD,cAAY;GACZ,gBAAc;GACd,iBAAe;GACf,eAAY;aAEZ,kBAAC,GAAD,EAAqB,WAAU,wBAAyB,CAAA;GACjD,CAAA;EACS,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../../node_modules/react-i18next/dist/es/useTranslation.cjs`),n=require(`../../../i18n/declaration.cjs`),r=require(`../../../utils/status.cjs`),i=require(`../../../utils/utils.cjs`),ee=require(`../../../context/navigation-context.cjs`),te=require(`../../../utils/custom-toast-handlers.cjs`),ne=require(`../../../contexts/active-backend-context.cjs`),re=require(`../../../node_modules/@heroui/tooltip/dist/chunk-AUA5GDXN.cjs`),ie=require(`../../../hooks/use-click-outside-element.cjs`),ae=require(`../../../hooks/mutation/use-create-conversation.cjs`),oe=require(`../../shared/navigation-link.cjs`),se=require(`../../../hooks/mutation/use-delete-conversation.cjs`),ce=require(`../../../hooks/mutation/use-unified-stop-conversation.cjs`),le=require(`../../../hooks/mutation/use-update-conversation.cjs`),ue=require(`./confirm-delete-modal.cjs`),de=require(`./confirm-stop-modal.cjs`),fe=require(`../../../hooks/query/use-paginated-conversations.cjs`),pe=require(`../../../hooks/query/use-start-tasks.cjs`),me=require(`./exit-conversation-modal.cjs`),he=require(`../../../hooks/use-is-creating-conversation.cjs`),ge=require(`./conversation-card/conversation-card.cjs`),_e=require(`./conversation-card/conversation-card-preview.cjs`),ve=require(`./start-task-card/start-task-card.cjs`),ye=require(`./conversation-card/conversation-card-skeleton.cjs`),be=require(`./compact-conversation-row.cjs`),a=require(`../../../stores/conversation-panel-preferences-store.cjs`),xe=require(`./conversation-panel-filter-menu.cjs`),Se=require(`./conversation-panel-new-thread-picker.cjs`),o=require(`./conversation-panel-list-helpers.cjs`),Ce=require(`./conversation-group-folder-list.cjs`),we=require(`./conversation-panel-pinned-section.cjs`),s=require(`../../../stores/pinned-conversations-store.cjs`);let c=require(`react`);c=e.__toESM(c,1);let l=require(`react/jsx-runtime`);var Te=()=>{},Ee=[],u=3600*1e3,De=e=>{let t=Date.now()-u,n=[],r=[];for(let i of e){let e=i.updated_at?Date.parse(i.updated_at):NaN;Number.isFinite(e)&&e<t?r.push(i):n.push(i)}return{recent:n,older:r}};function d({onClose:e,compact:u=!1}){let{t:d}=t.useTranslation(`openhands`),{conversationId:f,navigate:p}=ee.useNavigation(),{backend:m}=ne.useActiveBackend(),Oe=ie.useClickOutsideElement(e??Te),[ke,h]=c.default.useState(!1),[Ae,g]=c.default.useState(!1),[je,Me]=c.default.useState(!1),[Ne,_]=c.default.useState(!1),v=a.useConversationPanelPreferencesStore(e=>e.showOlderConversations),Pe=a.useConversationPanelPreferencesStore(e=>e.toggleShowOlderConversations),y=a.useConversationPanelPreferencesStore(e=>e.showRepoBranchMetadata),Fe=a.useConversationPanelPreferencesStore(e=>e.toggleShowRepoBranchMetadata),b=a.useConversationPanelPreferencesStore(e=>e.showLlmProfiles),Ie=a.useConversationPanelPreferencesStore(e=>e.toggleShowLlmProfiles),x=a.useConversationPanelPreferencesStore(e=>e.showHoverMetadata),Le=a.useConversationPanelPreferencesStore(e=>e.toggleShowHoverMetadata),S=a.useConversationPanelPreferencesStore(e=>e.organizeMode),Re=a.useConversationPanelPreferencesStore(e=>e.setOrganizeMode),C=a.useConversationPanelPreferencesStore(e=>e.conversationSort),ze=a.useConversationPanelPreferencesStore(e=>e.setConversationSort),w=a.useConversationPanelPreferencesStore(e=>e.threadScope),Be=a.useConversationPanelPreferencesStore(e=>e.setThreadScope),T=a.useConversationPanelPreferencesStore(e=>e.groupFolderOrder),Ve=a.useConversationPanelPreferencesStore(e=>e.setGroupFolderOrder),[He,E]=c.default.useState(!1),[Ue,We]=c.default.useState(!1),Ge=ie.useClickOutsideElement(()=>{E(!1)}),[Ke,D]=c.default.useState(()=>new Set),[qe,O]=c.default.useState(()=>new Set),[Je,k]=c.default.useState(!1),A=s.usePinnedConversationsStore(e=>e.pinsByBackendId[m.id]??Ee),Ye=s.usePinnedConversationsStore(e=>e.togglePin),Xe=s.usePinnedConversationsStore(e=>e.pruneMissingConversations),Ze=c.default.useCallback(e=>{D(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),Qe=c.default.useCallback(e=>{O(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);c.default.useEffect(()=>{S!==`grouped`&&(D(new Set),O(new Set))},[S]);let $e=c.default.useRef(null),[j,M]=c.default.useState(null),[et,N]=c.default.useState(null),[P,tt]=c.default.useState(null),{data:nt,isLoading:rt,isFetched:F,hasNextPage:I,isFetching:L,isFetchingNextPage:R,fetchNextPage:z}=fe.usePaginatedConversations(),{data:B}=pe.useStartTasks(),V=c.default.useMemo(()=>{let e=nt?.pages.flatMap(e=>e.items)??[],t=new Set;return e.filter(e=>t.has(e.id)?!1:(t.add(e.id),!0))},[nt]),H=c.default.useMemo(()=>o.resolvePinnedConversations(A,V),[V,A]);c.default.useEffect(()=>{F&&Xe(m.id,V.map(e=>e.id))},[m.id,V,F,Xe]),c.default.useEffect(()=>{A.length===0&&k(!1)},[A.length]);let U=c.default.useMemo(()=>{let e=w===`relevant`?V.filter(e=>r.isExecutionActive(e.execution_status)):V;return u?e:o.filterOutPinnedConversations(e,A)},[u,V,A,w]),{recent:W,older:G}=c.default.useMemo(()=>De(U),[U]),it=c.default.useMemo(()=>o.sortConversationsByField(v?[...W,...G]:W,C),[W,G,v,C]),at=c.default.useMemo(()=>({emptyWorkspace:d(n.I18nKey.CONVERSATION_PANEL$NO_WORKSPACE),emptyRepository:d(n.I18nKey.CONVERSATION_PANEL$NO_REPOSITORY)}),[d]),K=c.default.useMemo(()=>u||S!==`grouped`?null:o.groupConversations([...W,...v?G:[]],m.kind,C,at),[m.kind,u,C,at,G,S,W,v]),q=c.default.useMemo(()=>K?o.applyGroupFolderOrder(K,T):null,[K,T]),ot=c.default.useMemo(()=>K?.map(e=>e.id)??[],[K]),st=c.default.useMemo(()=>o.sortConversationsByField(W.filter(e=>r.isExecutionActive(e.execution_status)),C),[C,W]),ct=it.length,lt=c.default.useMemo(()=>q?q.reduce((e,t)=>e+t.conversations.length,0):0,[q]),ut=S===`grouped`&&!u?lt===0:ct===0,J=S===`grouped`&&!u?lt:ct,[Y,X]=c.default.useState(null),dt=c.default.useRef(J);dt.current=J;let ft=c.default.useCallback(()=>{I&&X(dt.current)},[I]);c.default.useEffect(()=>{if(Y!==null){if(J>Y){X(null);return}if(!I){X(null);return}L||R||z()}},[Y,J,I,L,R,z]);let pt=Y!==null||R,{mutate:mt,mutateAsync:ht}=se.useDeleteConversation(),{mutate:gt}=ce.useUnifiedPauseConversation(),{mutate:_t}=le.useUpdateConversation(),vt=G.length>0&&!v,yt=!!I&&!vt&&!u&&!ut,{mutate:bt}=ae.useCreateConversation(),Z=he.useIsCreatingConversation(),xt=c.default.useCallback(e=>{Z||bt({workingDir:e.workingDir,repository:e.repository,entryPoint:`sidebar_relaunch_project`},{onSuccess:e=>{p(`/conversations/${e.conversation_id}`)}})},[bt,Z,p]),St=c.default.useCallback((e,t)=>{h(!0),M(e),N(t)},[]),Ct=c.default.useCallback(e=>{g(!0),M(e)},[]),wt=c.default.useCallback((e,t)=>{_t({conversationId:e,newTitle:t},{onSuccess:()=>{te.displaySuccessToast(d(n.I18nKey.CONVERSATION$TITLE_UPDATED))}})},[d,_t]),Tt=()=>{j&&mt({conversationId:j},{onSuccess:()=>{j===f&&p(`/conversations`)}})},Et=()=>{j&>({conversationId:j})},Dt=async()=>{let e=V.map(e=>e.id),t=await Promise.allSettled(e.map(e=>ht({conversationId:e}))),n=t.flatMap((t,n)=>t.status===`fulfilled`?[e[n]]:[]),r=t.length-n.length;f!==null&&n.includes(f)&&p(`/conversations`),r>0&&te.displayErrorToast(`${r} conversation${r===1?``:`s`} could not be deleted.`)},Q=c.default.useCallback((t,n)=>{let r=A.includes(t.id);return u?(0,l.jsx)(be.CompactConversationRow,{conversationId:t.id,title:t.title??``,selectedRepository:{selected_repository:t.selected_repository,selected_branch:t.selected_branch,git_provider:t.git_provider},executionStatus:t.execution_status,sandboxStatus:t.sandbox_status,lastUpdatedAt:t.updated_at,createdAt:t.created_at,workspaceWorkingDir:t.selected_workspace??t.workspace?.working_dir,isActive:t.id===f,onClose:e,showRepositoryMetadata:y,llmModel:t.llm_model,showLlmProfiles:b,agentKind:t.agent_kind,acpServer:t.acp_server},t.id):(0,l.jsx)(re.tooltip_default,{placement:`right-start`,delay:1e3,closeDelay:100,isDisabled:!x||P===t.id,disableAnimation:!1,className:`rounded-xl border border-[var(--oh-border)] bg-base-secondary p-0 text-white shadow-xl`,content:(0,l.jsx)(_e.ConversationCardPreview,{title:t.title??``,executionStatus:t.execution_status,sandboxStatus:t.sandbox_status,selectedRepository:{selected_repository:t.selected_repository,selected_branch:t.selected_branch,git_provider:t.git_provider},workspaceWorkingDir:t.selected_workspace??t.workspace?.working_dir,llmModel:t.llm_model,createdAt:t.created_at}),children:(0,l.jsx)(oe.NavigationLink,{to:`/conversations/${t.id}`,onClick:e,className:i.cn(`block rounded-md transition-colors`,P!==t.id&&`hover:bg-[var(--oh-surface)]`,(t.id===f||P===t.id)&&`bg-[var(--oh-surface)]`),children:(0,l.jsx)(ge.ConversationCard,{onDelete:()=>St(t.id,t.title??``),onStop:()=>Ct(t.id),onChangeTitle:e=>wt(t.id,e),title:t.title??``,selectedRepository:{selected_repository:t.selected_repository,selected_branch:t.selected_branch,git_provider:t.git_provider},lastUpdatedAt:t.updated_at,createdAt:t.created_at,executionStatus:t.execution_status,sandboxStatus:t.sandbox_status,conversationId:t.id,contextMenuOpen:P===t.id,onContextMenuToggle:e=>tt(e?t.id:null),isActive:t.id===f,workspaceWorkingDir:t.selected_workspace??t.workspace?.working_dir,showRepositoryMetadata:y,llmModel:t.llm_model,showLlmProfiles:b,agentKind:t.agent_kind,acpServer:t.acp_server,isPinned:r,onTogglePin:()=>Ye(m.id,t.id),alwaysShowPinIcon:r&&!n?.inPinnedSection})})},t.id)},[m.id,u,f,wt,St,Ct,e,P,A,y,b,x,Ye]),$=rt||!F,Ot=!u&&!$&&H.length>0,kt=F&&!rt&&!u&&ut&&!Ot&&!B?.length;return(0,l.jsxs)(`div`,{ref:Oe,"data-testid":`conversation-panel`,className:`flex h-full min-h-0 w-full flex-col`,children:[!u&&(0,l.jsx)(`div`,{className:i.cn(`-ml-2.5 w-[calc(100%+0.625rem)] max-w-none box-border border-b`,Ue?`border-[var(--oh-border)]`:`border-transparent`),children:(0,l.jsxs)(`div`,{"data-testid":`older-conversations-summary`,className:`flex min-w-0 flex-nowrap items-center gap-x-2 py-2 pl-4 pr-2.5 text-[var(--oh-muted)]`,children:[(0,l.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-[var(--oh-muted)]`,children:d(n.I18nKey.SIDEBAR$CONVERSATIONS)}),(0,l.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,l.jsx)(Se.ConversationPanelNewThreadPicker,{backendKind:m.kind}),(0,l.jsx)(xe.ConversationPanelFilterMenu,{filterMenuOpen:He,setFilterMenuOpen:E,menuRef:Ge,backendKind:m.kind,organizeMode:S,setOrganizeMode:Re,conversationSort:C,setConversationSort:ze,threadScope:w,setThreadScope:Be,showOlderConversations:v,toggleShowOlderConversations:Pe,showRepoBranchMetadata:y,toggleShowRepoBranchMetadata:Fe,showLlmProfiles:b,toggleShowLlmProfiles:Ie,showHoverMetadata:x,toggleShowHoverMetadata:Le,totalConversationsCount:V.length,onRequestDeleteAll:()=>_(!0)})]})]})}),(0,l.jsxs)(`div`,{ref:$e,"data-testid":`conversation-panel-list-scroll`,onScroll:e=>{We(e.currentTarget.scrollTop>0)},className:i.cn(`flex min-h-0 flex-1 flex-col overflow-y-auto overflow-x-hidden overscroll-contain custom-scrollbar-always`,!u&&`conversation-panel-list-scroll`),children:[$&&(0,l.jsx)(ye.ConversationCardSkeleton,{compact:u}),!u&&kt&&(0,l.jsx)(`div`,{"data-testid":`conversation-panel-empty-state`,className:`flex min-h-0 flex-1 flex-col items-center justify-center px-4 py-8`,children:(0,l.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)]`,children:d(n.I18nKey.CONVERSATION$NO_CONVERSATIONS)})}),Ot?(0,l.jsx)(we.ConversationPanelPinnedSection,{pinnedConversations:H,isPreviewExpanded:Je,onTogglePreviewExpanded:()=>k(e=>!e),activeConversationId:f,showDivider:!u&&S===`chronological`,renderConversationCard:e=>Q(e,{inPinnedSection:!0})}):null,!u&&B?.map(t=>(0,l.jsx)(oe.NavigationLink,{to:`/conversations/task-${t.id}`,onClick:e,className:`block`,children:(0,l.jsx)(ve.StartTaskCard,{task:t})},t.id)),!$&&u?st.map(e=>Q(e)):null,!$&&!u&&S===`grouped`&&q&&q.length>0?(0,l.jsx)(Ce.ConversationGroupFolderList,{groups:q,groupIds:ot,groupFolderOrder:T,setGroupFolderOrder:Ve,collapsedGroupIds:Ke,expandedGroupPreviewIds:qe,onToggleGroupCollapsed:Ze,onToggleGroupPreviewExpanded:Qe,isCreatingConversationFlow:Z,activeConversationId:f,onLaunchFromGroup:xt,renderConversationCard:e=>Q(e)}):null,!$&&!u&&S===`chronological`?(0,l.jsx)(`div`,{className:`space-y-0.5`,children:it.map(e=>Q(e))}):null,yt&&(pt?(0,l.jsx)(`div`,{className:`py-1`,children:(0,l.jsx)(ye.ConversationCardSkeleton,{compact:u})}):(0,l.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,l.jsx)(`button`,{type:`button`,"data-testid":`load-more-conversations`,onClick:ft,className:`text-xs text-[var(--oh-muted)] hover:text-white`,children:d(n.I18nKey.CONVERSATION$LOAD_MORE)})}))]}),ke&&(0,l.jsx)(ue.ConfirmDeleteModal,{onConfirm:()=>{Tt(),h(!1),N(null)},onCancel:()=>{h(!1),N(null)},conversationTitle:et??void 0}),Ne&&(0,l.jsx)(ue.ConfirmDeleteModal,{title:d(n.I18nKey.CONVERSATION$CONFIRM_DELETE_ALL_TITLE),description:d(n.I18nKey.CONVERSATION$CONFIRM_DELETE_ALL_DESC,{count:V.length}),onConfirm:async()=>{await Dt(),_(!1)},onCancel:()=>_(!1)}),Ae&&(0,l.jsx)(de.ConfirmStopModal,{onConfirm:()=>{Et(),g(!1)},onCancel:()=>g(!1)}),je&&(0,l.jsx)(me.ExitConversationModal,{onConfirm:()=>{e?.()},onClose:()=>Me(!1),onCancel:()=>Me(!1)})]})}exports.ConversationPanel=d;
|
|
1
|
+
const e=require(`../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../../node_modules/react-i18next/dist/es/useTranslation.cjs`),n=require(`../../../i18n/declaration.cjs`),r=require(`../../../utils/status.cjs`),i=require(`../../../utils/utils.cjs`),ee=require(`../../../context/navigation-context.cjs`),te=require(`../../../utils/custom-toast-handlers.cjs`),ne=require(`../../../contexts/active-backend-context.cjs`),re=require(`../../../node_modules/@heroui/tooltip/dist/chunk-AUA5GDXN.cjs`),ie=require(`../../../hooks/use-click-outside-element.cjs`),ae=require(`../../../hooks/mutation/use-create-conversation.cjs`),oe=require(`../../shared/navigation-link.cjs`),se=require(`../../../hooks/mutation/use-delete-conversation.cjs`),ce=require(`../../../hooks/mutation/use-unified-stop-conversation.cjs`),le=require(`../../../hooks/use-is-creating-conversation.cjs`),ue=require(`../../../hooks/mutation/use-update-conversation.cjs`),de=require(`./confirm-delete-modal.cjs`),fe=require(`./confirm-stop-modal.cjs`),pe=require(`../../../hooks/query/use-paginated-conversations.cjs`),me=require(`../../../hooks/query/use-start-tasks.cjs`),he=require(`./exit-conversation-modal.cjs`),ge=require(`./conversation-card/conversation-card.cjs`),_e=require(`./conversation-card/conversation-card-preview.cjs`),ve=require(`./start-task-card/start-task-card.cjs`),ye=require(`./conversation-card/conversation-card-skeleton.cjs`),be=require(`./compact-conversation-row.cjs`),a=require(`../../../stores/conversation-panel-preferences-store.cjs`),xe=require(`./conversation-panel-filter-menu.cjs`),Se=require(`./conversation-panel-new-thread-picker.cjs`),o=require(`./conversation-panel-list-helpers.cjs`),Ce=require(`./conversation-group-folder-list.cjs`),we=require(`./conversation-panel-pinned-section.cjs`),s=require(`../../../stores/pinned-conversations-store.cjs`);let c=require(`react`);c=e.__toESM(c,1);let l=require(`react/jsx-runtime`);var Te=()=>{},Ee=[],u=3600*1e3,De=e=>{let t=Date.now()-u,n=[],r=[];for(let i of e){let e=i.updated_at?Date.parse(i.updated_at):NaN;Number.isFinite(e)&&e<t?r.push(i):n.push(i)}return{recent:n,older:r}};function d({onClose:e,compact:u=!1}){let{t:d}=t.useTranslation(`openhands`),{conversationId:f,navigate:p}=ee.useNavigation(),{backend:m}=ne.useActiveBackend(),Oe=ie.useClickOutsideElement(e??Te),[ke,h]=c.default.useState(!1),[Ae,g]=c.default.useState(!1),[je,Me]=c.default.useState(!1),[Ne,_]=c.default.useState(!1),v=a.useConversationPanelPreferencesStore(e=>e.showOlderConversations),Pe=a.useConversationPanelPreferencesStore(e=>e.toggleShowOlderConversations),y=a.useConversationPanelPreferencesStore(e=>e.showRepoBranchMetadata),Fe=a.useConversationPanelPreferencesStore(e=>e.toggleShowRepoBranchMetadata),b=a.useConversationPanelPreferencesStore(e=>e.showLlmProfiles),Ie=a.useConversationPanelPreferencesStore(e=>e.toggleShowLlmProfiles),x=a.useConversationPanelPreferencesStore(e=>e.showHoverMetadata),Le=a.useConversationPanelPreferencesStore(e=>e.toggleShowHoverMetadata),S=a.useConversationPanelPreferencesStore(e=>e.organizeMode),Re=a.useConversationPanelPreferencesStore(e=>e.setOrganizeMode),C=a.useConversationPanelPreferencesStore(e=>e.conversationSort),ze=a.useConversationPanelPreferencesStore(e=>e.setConversationSort),w=a.useConversationPanelPreferencesStore(e=>e.threadScope),Be=a.useConversationPanelPreferencesStore(e=>e.setThreadScope),T=a.useConversationPanelPreferencesStore(e=>e.groupFolderOrder),Ve=a.useConversationPanelPreferencesStore(e=>e.setGroupFolderOrder),[He,E]=c.default.useState(!1),[Ue,We]=c.default.useState(!1),Ge=ie.useClickOutsideElement(()=>{E(!1)}),[Ke,D]=c.default.useState(()=>new Set),[qe,O]=c.default.useState(()=>new Set),[Je,k]=c.default.useState(!1),A=s.usePinnedConversationsStore(e=>e.pinsByBackendId[m.id]??Ee),Ye=s.usePinnedConversationsStore(e=>e.togglePin),Xe=s.usePinnedConversationsStore(e=>e.pruneMissingConversations),Ze=c.default.useCallback(e=>{D(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),Qe=c.default.useCallback(e=>{O(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);c.default.useEffect(()=>{S!==`grouped`&&(D(new Set),O(new Set))},[S]);let $e=c.default.useRef(null),[j,M]=c.default.useState(null),[et,N]=c.default.useState(null),[P,tt]=c.default.useState(null),{data:nt,isLoading:rt,isFetched:F,hasNextPage:I,isFetching:L,isFetchingNextPage:R,fetchNextPage:z}=pe.usePaginatedConversations(),{data:B}=me.useStartTasks(),V=c.default.useMemo(()=>{let e=nt?.pages.flatMap(e=>e.items)??[],t=new Set;return e.filter(e=>t.has(e.id)?!1:(t.add(e.id),!0))},[nt]),H=c.default.useMemo(()=>o.resolvePinnedConversations(A,V),[V,A]);c.default.useEffect(()=>{F&&Xe(m.id,V.map(e=>e.id))},[m.id,V,F,Xe]),c.default.useEffect(()=>{A.length===0&&k(!1)},[A.length]);let U=c.default.useMemo(()=>{let e=w===`relevant`?V.filter(e=>r.isExecutionActive(e.execution_status)):V;return u?e:o.filterOutPinnedConversations(e,A)},[u,V,A,w]),{recent:W,older:G}=c.default.useMemo(()=>De(U),[U]),it=c.default.useMemo(()=>o.sortConversationsByField(v?[...W,...G]:W,C),[W,G,v,C]),at=c.default.useMemo(()=>({emptyWorkspace:d(n.I18nKey.CONVERSATION_PANEL$NO_WORKSPACE),emptyRepository:d(n.I18nKey.CONVERSATION_PANEL$NO_REPOSITORY)}),[d]),K=c.default.useMemo(()=>u||S!==`grouped`?null:o.groupConversations([...W,...v?G:[]],m.kind,C,at),[m.kind,u,C,at,G,S,W,v]),q=c.default.useMemo(()=>K?o.applyGroupFolderOrder(K,T):null,[K,T]),ot=c.default.useMemo(()=>K?.map(e=>e.id)??[],[K]),st=c.default.useMemo(()=>o.sortConversationsByField(W.filter(e=>r.isExecutionActive(e.execution_status)),C),[C,W]),ct=it.length,lt=c.default.useMemo(()=>q?q.reduce((e,t)=>e+t.conversations.length,0):0,[q]),ut=S===`grouped`&&!u?lt===0:ct===0,J=S===`grouped`&&!u?lt:ct,[Y,X]=c.default.useState(null),dt=c.default.useRef(J);dt.current=J;let ft=c.default.useCallback(()=>{I&&X(dt.current)},[I]);c.default.useEffect(()=>{if(Y!==null){if(J>Y){X(null);return}if(!I){X(null);return}L||R||z()}},[Y,J,I,L,R,z]);let pt=Y!==null||R,{mutate:mt,mutateAsync:ht}=se.useDeleteConversation(),{mutate:gt}=ce.useUnifiedPauseConversation(),{mutate:_t}=ue.useUpdateConversation(),vt=G.length>0&&!v,yt=!!I&&!vt&&!u&&!ut,{mutate:bt}=ae.useCreateConversation(),Z=le.useIsCreatingConversation(),xt=c.default.useCallback(e=>{Z||bt({workingDir:e.workingDir,repository:e.repository,entryPoint:`sidebar_relaunch_project`},{onSuccess:e=>{p(`/conversations/${e.conversation_id}`)}})},[bt,Z,p]),St=c.default.useCallback((e,t)=>{h(!0),M(e),N(t)},[]),Ct=c.default.useCallback(e=>{g(!0),M(e)},[]),wt=c.default.useCallback((e,t)=>{_t({conversationId:e,newTitle:t},{onSuccess:()=>{te.displaySuccessToast(d(n.I18nKey.CONVERSATION$TITLE_UPDATED))}})},[d,_t]),Tt=()=>{j&&mt({conversationId:j},{onSuccess:()=>{j===f&&p(`/conversations`)}})},Et=()=>{j&>({conversationId:j})},Dt=async()=>{let e=V.map(e=>e.id),t=await Promise.allSettled(e.map(e=>ht({conversationId:e}))),n=t.flatMap((t,n)=>t.status===`fulfilled`?[e[n]]:[]),r=t.length-n.length;f!==null&&n.includes(f)&&p(`/conversations`),r>0&&te.displayErrorToast(`${r} conversation${r===1?``:`s`} could not be deleted.`)},Q=c.default.useCallback((t,n)=>{let r=A.includes(t.id);return u?(0,l.jsx)(be.CompactConversationRow,{conversationId:t.id,title:t.title??``,selectedRepository:{selected_repository:t.selected_repository,selected_branch:t.selected_branch,git_provider:t.git_provider},executionStatus:t.execution_status,sandboxStatus:t.sandbox_status,lastUpdatedAt:t.updated_at,createdAt:t.created_at,workspaceWorkingDir:t.selected_workspace??t.workspace?.working_dir,isActive:t.id===f,onClose:e,showRepositoryMetadata:y,llmModel:t.llm_model,showLlmProfiles:b,agentKind:t.agent_kind,acpServer:t.acp_server},t.id):(0,l.jsx)(re.tooltip_default,{placement:`right-start`,delay:1e3,closeDelay:100,isDisabled:!x||P===t.id,disableAnimation:!1,className:`rounded-xl border border-[var(--oh-border)] bg-base-secondary p-0 text-white shadow-xl`,content:(0,l.jsx)(_e.ConversationCardPreview,{title:t.title??``,executionStatus:t.execution_status,sandboxStatus:t.sandbox_status,selectedRepository:{selected_repository:t.selected_repository,selected_branch:t.selected_branch,git_provider:t.git_provider},workspaceWorkingDir:t.selected_workspace??t.workspace?.working_dir,llmModel:t.llm_model,createdAt:t.created_at}),children:(0,l.jsx)(oe.NavigationLink,{to:`/conversations/${t.id}`,onClick:e,className:i.cn(`block rounded-md transition-colors`,P!==t.id&&`hover:bg-[var(--oh-surface)]`,(t.id===f||P===t.id)&&`bg-[var(--oh-surface)]`),children:(0,l.jsx)(ge.ConversationCard,{onDelete:()=>St(t.id,t.title??``),onStop:()=>Ct(t.id),onChangeTitle:e=>wt(t.id,e),title:t.title??``,selectedRepository:{selected_repository:t.selected_repository,selected_branch:t.selected_branch,git_provider:t.git_provider},lastUpdatedAt:t.updated_at,createdAt:t.created_at,executionStatus:t.execution_status,sandboxStatus:t.sandbox_status,conversationId:t.id,contextMenuOpen:P===t.id,onContextMenuToggle:e=>tt(e?t.id:null),isActive:t.id===f,workspaceWorkingDir:t.selected_workspace??t.workspace?.working_dir,showRepositoryMetadata:y,llmModel:t.llm_model,showLlmProfiles:b,agentKind:t.agent_kind,acpServer:t.acp_server,isPinned:r,onTogglePin:()=>Ye(m.id,t.id),alwaysShowPinIcon:r&&!n?.inPinnedSection})})},t.id)},[m.id,u,f,wt,St,Ct,e,P,A,y,b,x,Ye]),$=rt||!F,Ot=!u&&!$&&H.length>0,kt=F&&!rt&&!u&&ut&&!Ot&&!B?.length;return(0,l.jsxs)(`div`,{ref:Oe,"data-testid":`conversation-panel`,className:`flex h-full min-h-0 w-full flex-col`,children:[!u&&(0,l.jsx)(`div`,{className:i.cn(`-ml-2.5 w-[calc(100%+0.625rem)] max-w-none box-border border-b`,Ue?`border-[var(--oh-border)]`:`border-transparent`),children:(0,l.jsxs)(`div`,{"data-testid":`older-conversations-summary`,className:`flex min-w-0 flex-nowrap items-center gap-x-2 py-2 pl-4 pr-2.5 text-[var(--oh-muted)]`,children:[(0,l.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-[var(--oh-muted)]`,children:d(n.I18nKey.SIDEBAR$CONVERSATIONS)}),(0,l.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,l.jsx)(Se.ConversationPanelNewThreadPicker,{backendKind:m.kind}),(0,l.jsx)(xe.ConversationPanelFilterMenu,{filterMenuOpen:He,setFilterMenuOpen:E,menuRef:Ge,backendKind:m.kind,organizeMode:S,setOrganizeMode:Re,conversationSort:C,setConversationSort:ze,threadScope:w,setThreadScope:Be,showOlderConversations:v,toggleShowOlderConversations:Pe,showRepoBranchMetadata:y,toggleShowRepoBranchMetadata:Fe,showLlmProfiles:b,toggleShowLlmProfiles:Ie,showHoverMetadata:x,toggleShowHoverMetadata:Le,totalConversationsCount:V.length,onRequestDeleteAll:()=>_(!0)})]})]})}),(0,l.jsxs)(`div`,{ref:$e,"data-testid":`conversation-panel-list-scroll`,onScroll:e=>{We(e.currentTarget.scrollTop>0)},className:i.cn(`flex min-h-0 flex-1 flex-col overflow-y-auto overflow-x-hidden overscroll-contain custom-scrollbar-always`,!u&&`conversation-panel-list-scroll`),children:[$&&(0,l.jsx)(ye.ConversationCardSkeleton,{compact:u}),!u&&kt&&(0,l.jsx)(`div`,{"data-testid":`conversation-panel-empty-state`,className:`flex min-h-0 flex-1 flex-col items-center justify-center px-4 py-8`,children:(0,l.jsx)(`p`,{className:`text-xs text-[var(--oh-muted)]`,children:d(n.I18nKey.CONVERSATION$NO_CONVERSATIONS)})}),Ot?(0,l.jsx)(we.ConversationPanelPinnedSection,{pinnedConversations:H,isPreviewExpanded:Je,onTogglePreviewExpanded:()=>k(e=>!e),activeConversationId:f,showDivider:!u&&S===`chronological`,renderConversationCard:e=>Q(e,{inPinnedSection:!0})}):null,!u&&B?.map(t=>(0,l.jsx)(oe.NavigationLink,{to:`/conversations/task-${t.id}`,onClick:e,className:`block`,children:(0,l.jsx)(ve.StartTaskCard,{task:t})},t.id)),!$&&u?st.map(e=>Q(e)):null,!$&&!u&&S===`grouped`&&q&&q.length>0?(0,l.jsx)(Ce.ConversationGroupFolderList,{groups:q,groupIds:ot,groupFolderOrder:T,setGroupFolderOrder:Ve,collapsedGroupIds:Ke,expandedGroupPreviewIds:qe,onToggleGroupCollapsed:Ze,onToggleGroupPreviewExpanded:Qe,isCreatingConversationFlow:Z,activeConversationId:f,onLaunchFromGroup:xt,renderConversationCard:e=>Q(e)}):null,!$&&!u&&S===`chronological`?(0,l.jsx)(`div`,{className:`space-y-0.5`,children:it.map(e=>Q(e))}):null,yt&&(pt?(0,l.jsx)(`div`,{className:`py-1`,children:(0,l.jsx)(ye.ConversationCardSkeleton,{compact:u})}):(0,l.jsx)(`div`,{className:`flex justify-center py-4`,children:(0,l.jsx)(`button`,{type:`button`,"data-testid":`load-more-conversations`,onClick:ft,className:`text-xs text-[var(--oh-muted)] hover:text-white`,children:d(n.I18nKey.CONVERSATION$LOAD_MORE)})}))]}),ke&&(0,l.jsx)(de.ConfirmDeleteModal,{onConfirm:()=>{Tt(),h(!1),N(null)},onCancel:()=>{h(!1),N(null)},conversationTitle:et??void 0}),Ne&&(0,l.jsx)(de.ConfirmDeleteModal,{title:d(n.I18nKey.CONVERSATION$CONFIRM_DELETE_ALL_TITLE),description:d(n.I18nKey.CONVERSATION$CONFIRM_DELETE_ALL_DESC,{count:V.length}),onConfirm:async()=>{await Dt(),_(!1)},onCancel:()=>_(!1)}),Ae&&(0,l.jsx)(fe.ConfirmStopModal,{onConfirm:()=>{Et(),g(!1)},onCancel:()=>g(!1)}),je&&(0,l.jsx)(he.ExitConversationModal,{onConfirm:()=>{e?.()},onClose:()=>Me(!1),onCancel:()=>Me(!1)})]})}exports.ConversationPanel=d;
|
|
2
2
|
//# sourceMappingURL=conversation-panel.cjs.map
|
|
@@ -11,13 +11,13 @@ import { useCreateConversation as ae } from "../../../hooks/mutation/use-create-
|
|
|
11
11
|
import { NavigationLink as oe } from "../../shared/navigation-link.js";
|
|
12
12
|
import { useDeleteConversation as se } from "../../../hooks/mutation/use-delete-conversation.js";
|
|
13
13
|
import { useUnifiedPauseConversation as ce } from "../../../hooks/mutation/use-unified-stop-conversation.js";
|
|
14
|
-
import {
|
|
14
|
+
import { useIsCreatingConversation as le } from "../../../hooks/use-is-creating-conversation.js";
|
|
15
|
+
import { useUpdateConversation as ue } from "../../../hooks/mutation/use-update-conversation.js";
|
|
15
16
|
import { ConfirmDeleteModal as a } from "./confirm-delete-modal.js";
|
|
16
|
-
import { ConfirmStopModal as
|
|
17
|
-
import { usePaginatedConversations as
|
|
18
|
-
import { useStartTasks as
|
|
19
|
-
import { ExitConversationModal as
|
|
20
|
-
import { useIsCreatingConversation as me } from "../../../hooks/use-is-creating-conversation.js";
|
|
17
|
+
import { ConfirmStopModal as de } from "./confirm-stop-modal.js";
|
|
18
|
+
import { usePaginatedConversations as fe } from "../../../hooks/query/use-paginated-conversations.js";
|
|
19
|
+
import { useStartTasks as pe } from "../../../hooks/query/use-start-tasks.js";
|
|
20
|
+
import { ExitConversationModal as me } from "./exit-conversation-modal.js";
|
|
21
21
|
import { ConversationCard as he } from "./conversation-card/conversation-card.js";
|
|
22
22
|
import { ConversationCardPreview as ge } from "./conversation-card/conversation-card-preview.js";
|
|
23
23
|
import { StartTaskCard as _e } from "./start-task-card/start-task-card.js";
|
|
@@ -61,7 +61,7 @@ function p({ onClose: f, compact: p = !1 }) {
|
|
|
61
61
|
l.useEffect(() => {
|
|
62
62
|
E !== "grouped" && (j(/* @__PURE__ */ new Set()), M(/* @__PURE__ */ new Set()));
|
|
63
63
|
}, [E]);
|
|
64
|
-
let et = l.useRef(null), [I, tt] = l.useState(null), [nt, L] = l.useState(null), [R, rt] = l.useState(null), { data: it, isLoading: at, isFetched: z, hasNextPage: B, isFetching: ot, isFetchingNextPage: V, fetchNextPage: st } =
|
|
64
|
+
let et = l.useRef(null), [I, tt] = l.useState(null), [nt, L] = l.useState(null), [R, rt] = l.useState(null), { data: it, isLoading: at, isFetched: z, hasNextPage: B, isFetching: ot, isFetchingNextPage: V, fetchNextPage: st } = fe(), { data: ct } = pe(), H = l.useMemo(() => {
|
|
65
65
|
let e = it?.pages.flatMap((e) => e.items) ?? [], t = /* @__PURE__ */ new Set();
|
|
66
66
|
return e.filter((e) => t.has(e.id) ? !1 : (t.add(e.id), !0));
|
|
67
67
|
}, [it]), lt = l.useMemo(() => we(P, H), [H, P]);
|
|
@@ -125,7 +125,7 @@ function p({ onClose: f, compact: p = !1 }) {
|
|
|
125
125
|
V,
|
|
126
126
|
st
|
|
127
127
|
]);
|
|
128
|
-
let bt = J !== null || V, { mutate: xt, mutateAsync: St } = se(), { mutate: Ct } = ce(), { mutate: wt } =
|
|
128
|
+
let bt = J !== null || V, { mutate: xt, mutateAsync: St } = se(), { mutate: Ct } = ce(), { mutate: wt } = ue(), Tt = W.length > 0 && !S, Et = !!B && !Tt && !p && !_t, { mutate: Dt } = ae(), X = le(), Ot = l.useCallback((e) => {
|
|
129
129
|
X || Dt({
|
|
130
130
|
workingDir: e.workingDir,
|
|
131
131
|
repository: e.repository,
|
|
@@ -370,13 +370,13 @@ function p({ onClose: f, compact: p = !1 }) {
|
|
|
370
370
|
},
|
|
371
371
|
onCancel: () => x(!1)
|
|
372
372
|
}),
|
|
373
|
-
Ne && /* @__PURE__ */ u(
|
|
373
|
+
Ne && /* @__PURE__ */ u(de, {
|
|
374
374
|
onConfirm: () => {
|
|
375
375
|
Nt(), y(!1);
|
|
376
376
|
},
|
|
377
377
|
onCancel: () => y(!1)
|
|
378
378
|
}),
|
|
379
|
-
Pe && /* @__PURE__ */ u(
|
|
379
|
+
Pe && /* @__PURE__ */ u(me, {
|
|
380
380
|
onConfirm: () => {
|
|
381
381
|
f?.();
|
|
382
382
|
},
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../../node_modules/react-i18next/dist/es/useTranslation.cjs`),n=require(`../../../i18n/declaration.cjs`),r=require(`../../../utils/utils.cjs`),i=require(`../../../utils/retrieve-axios-error-message.cjs`),a=require(`../../../utils/custom-toast-handlers.cjs`),o=require(`../../../contexts/active-backend-context.cjs`),s=require(`../../shared/modals/modal-backdrop.cjs`),c=require(`../../../utils/modal-classes.cjs`),l=require(`../../shared/modals/modal-close-button.cjs`),u=require(`../../shared/modals/confirmation-modal.cjs`),d=require(`../../../hooks/mutation/use-delete-mcp-server.cjs`),f=require(`../../../
|
|
1
|
+
const e=require(`../../../_virtual/_rolldown/runtime.cjs`),t=require(`../../../node_modules/react-i18next/dist/es/useTranslation.cjs`),n=require(`../../../i18n/declaration.cjs`),r=require(`../../../utils/utils.cjs`),i=require(`../../../utils/retrieve-axios-error-message.cjs`),a=require(`../../../utils/custom-toast-handlers.cjs`),o=require(`../../../contexts/active-backend-context.cjs`),s=require(`../../shared/modals/modal-backdrop.cjs`),c=require(`../../../utils/modal-classes.cjs`),l=require(`../../shared/modals/modal-close-button.cjs`),u=require(`../../shared/modals/confirmation-modal.cjs`),d=require(`../../../hooks/mutation/use-delete-mcp-server.cjs`),f=require(`../../../api/mcp-service/mcp-service.api.cjs`),p=require(`../../../api/mcp-health/probe-mcp-server-health.cjs`),m=require(`../../../hooks/mutation/use-update-mcp-server.cjs`),h=require(`../../../utils/mcp-test-error-message.cjs`),g=require(`../../../hooks/mutation/use-add-mcp-server.cjs`),_=require(`../../../hooks/mutation/use-test-mcp-server.cjs`),v=require(`../settings/mcp-settings/mcp-server-form.cjs`);let y=require(`react`);y=e.__toESM(y,1);let b=require(`react/jsx-runtime`);function x({server:e,existingServers:x,onClose:S}){let{t:C}=t.useTranslation(`openhands`),{mutate:w,isPending:T}=g.useAddMcpServer(),{mutate:E,isPending:D}=m.useUpdateMcpServer(),{mutate:O,isPending:k}=d.useDeleteMcpServer(),{mutate:A,isPending:j,data:M,reset:N}=_.useTestMcpServer(),[P,F]=y.default.useState(!1),[I,L]=y.default.useState(null),[R,z]=y.default.useState(!1),{backend:B}=o.useActiveBackend(),V=B.kind===`cloud`,H=!!e.id,U=T||D||k,W=U||j||R||P,G=y.default.useMemo(()=>{let e=I??M;return e?e.ok?{ok:!0,text:C(n.I18nKey.MCP$TEST_SUCCESS,{count:e.tools.length})}:{ok:!1,text:h.makeMcpTestErrorMessage(C,e.error_kind,e.error)}:null},[I,M,C]),K=(t,n)=>{V||p.seedMcpServerHealth(t,n,H?x.filter(t=>t.id!==e.id):x)},q=e=>{a.displayErrorToast(i.retrieveAxiosErrorMessage(e)||C(n.I18nKey.ERROR$GENERIC))};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s.ModalBackdrop,{onClose:W?void 0:S,closeOnEscape:!W,"aria-label":C(H?n.I18nKey.MCP$EDIT_CUSTOM_TITLE:n.I18nKey.MCP$ADD_CUSTOM_TITLE),children:(0,b.jsxs)(`div`,{"data-testid":`mcp-custom-editor`,className:`relative bg-base-secondary p-6 rounded-xl border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[90vh] overflow-y-auto custom-scrollbar`,children:[(0,b.jsx)(l.ModalCloseButton,{onClose:S,testId:`mcp-custom-editor-close`,disabled:W}),(0,b.jsx)(`h2`,{className:r.cn(`mb-4 pr-6`,c.modalTitleLgClassName),children:C(H?n.I18nKey.MCP$EDIT_CUSTOM_TITLE:n.I18nKey.MCP$ADD_CUSTOM_TITLE)}),(0,b.jsx)(v.MCPServerForm,{mode:H?`edit`:`add`,server:H?e:void 0,existingServers:x,onSubmit:t=>{if(N(),L(null),t.auth?.strategy===`oauth2`){z(!0),f.default.authorizeOAuth(t).then(n=>{if(L(n),!n.ok)return;let r=n.oauth_state?{...t,auth:{...t.auth,state:n.oauth_state}}:t,i=()=>{K(r,n),S()};H?E({serverId:e.id,server:r},{onSuccess:i,onError:q}):w(r,{onSuccess:i,onError:q})}).catch(q).finally(()=>z(!1));return}A(t,{onSuccess:n=>{if(!n.ok)return;let r=n.oauth_state&&t.auth?.strategy===`oauth2`?{...t,auth:{...t.auth,state:n.oauth_state}}:t,i=()=>{K(r,n),S()};H?E({serverId:e.id,server:r},{onSuccess:i,onError:q}):w(r,{onSuccess:i,onError:q})},onError:q})},onCancel:S,onDelete:H?()=>F(!0):void 0,isActionDisabled:U,onTest:V?void 0:e=>{if(L(null),e.auth?.strategy===`oauth2`&&!V){z(!0),f.default.authorizeOAuth(e).then(L).catch(q).finally(()=>z(!1));return}A(e)},isTestPending:j||R,testMessage:V?null:G})]})}),P?(0,b.jsx)(u.ConfirmationModal,{text:C(n.I18nKey.SETTINGS$MCP_CONFIRM_DELETE),onCancel:()=>F(!1),onConfirm:()=>{O(e,{onSuccess:()=>{a.displaySuccessToast(C(n.I18nKey.MCP$REMOVE_SUCCESS)),F(!1),S()},onError:e=>{q(e),F(!1)}})},isConfirming:k}):null]})}exports.CustomServerEditor=x;
|
|
2
2
|
//# sourceMappingURL=custom-server-editor.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-server-editor.cjs","names":[],"sources":["../../../../src/components/features/mcp-page/custom-server-editor.tsx"],"sourcesContent":["import React from \"react\";\nimport { AxiosError } from \"axios\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ModalBackdrop } from \"#/components/shared/modals/modal-backdrop\";\nimport { ModalCloseButton } from \"#/components/shared/modals/modal-close-button\";\nimport { ConfirmationModal } from \"#/components/shared/modals/confirmation-modal\";\nimport {\n MCPServerForm,\n type TestMessage,\n} from \"#/components/features/settings/mcp-settings/mcp-server-form\";\nimport { useAddMcpServer } from \"#/hooks/mutation/use-add-mcp-server\";\nimport { useUpdateMcpServer } from \"#/hooks/mutation/use-update-mcp-server\";\nimport { useDeleteMcpServer } from \"#/hooks/mutation/use-delete-mcp-server\";\nimport { useTestMcpServer } from \"#/hooks/mutation/use-test-mcp-server\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport {\n ExtendedMCPTestFailure,\n ExtendedMCPTestResponse,\n MCPServerConfig,\n} from \"#/types/mcp-server\";\nimport {\n displayErrorToast,\n displaySuccessToast,\n} from \"#/utils/custom-toast-handlers\";\nimport { retrieveAxiosErrorMessage } from \"#/utils/retrieve-axios-error-message\";\nimport { cn } from \"#/utils/utils\";\nimport { modalTitleLgClassName } from \"#/utils/modal-classes\";\nimport McpService from \"#/api/mcp-service/mcp-service.api\";\n\ninterface CustomServerEditorProps {\n server: MCPServerConfig;\n existingServers: MCPServerConfig[];\n onClose: () => void;\n}\n\n/**\n * Modal wrapper around `MCPServerForm` so users can hand-author\n * arbitrary stdio / SSE / SHTTP entries without reaching for raw JSON.\n * An empty `server.id` means \"Add new\".\n */\nexport function CustomServerEditor({\n server,\n existingServers,\n onClose,\n}: CustomServerEditorProps) {\n const { t } = useTranslation(\"openhands\");\n const { mutate: addMcpServer, isPending: isAdding } = useAddMcpServer();\n const { mutate: updateMcpServer, isPending: isUpdating } =\n useUpdateMcpServer();\n const { mutate: deleteMcpServer, isPending: isDeleting } =\n useDeleteMcpServer();\n const {\n mutate: testServer,\n isPending: isTesting,\n data: testResult,\n reset: resetTest,\n } = useTestMcpServer();\n const [showDeleteConfirm, setShowDeleteConfirm] = React.useState(false);\n const [oauthTestResult, setOauthTestResult] =\n React.useState<ExtendedMCPTestResponse | null>(null);\n const [isOauthTesting, setIsOauthTesting] = React.useState(false);\n\n // The MCP connectivity-test endpoint only exists on the local agent-server.\n // For cloud backends `McpService.testServer` short-circuits with a synthetic\n // success so the save still completes; we hide the manual \"Test connection\"\n // button here so cloud users aren't shown a misleading \"0 tools\" result.\n const { backend } = useActiveBackend();\n const isCloudBackend = backend.kind === \"cloud\";\n\n const isEditing = !!server.id;\n const isPending = isAdding || isUpdating || isDeleting;\n const isDismissBlocked =\n isPending || isTesting || isOauthTesting || showDeleteConfirm;\n\n const makeTestErrorMessage = (failure: ExtendedMCPTestFailure): string => {\n switch (failure.error_kind) {\n case \"timeout\":\n return t(I18nKey.MCP$TEST_ERROR_TIMEOUT);\n case \"connection\":\n return t(I18nKey.MCP$TEST_ERROR_CONNECTION);\n case \"credentials\":\n return t(I18nKey.MCP$TEST_ERROR_CREDENTIALS, { error: failure.error });\n default:\n return t(I18nKey.MCP$TEST_ERROR_UNKNOWN, { error: failure.error });\n }\n };\n\n const testMessage: TestMessage | null = React.useMemo(() => {\n const result = oauthTestResult ?? testResult;\n if (!result) return null;\n if (result.ok) {\n return {\n ok: true,\n text: t(I18nKey.MCP$TEST_SUCCESS, { count: result.tools.length }),\n };\n }\n return { ok: false, text: makeTestErrorMessage(result) };\n }, [oauthTestResult, testResult, t]);\n\n // Shared error handler so both add and update surface backend errors\n // as a toast instead of failing silently — previously these calls\n // had no `onError` and the modal closed even on a 4xx/5xx, leaving\n // the user to discover the failure on the next page load.\n const handleError = (err: unknown) => {\n const message = retrieveAxiosErrorMessage(err as AxiosError);\n displayErrorToast(message || t(I18nKey.ERROR$GENERIC));\n };\n\n const handleSubmit = (payload: MCPServerConfig) => {\n resetTest();\n setOauthTestResult(null);\n if (payload.auth?.strategy === \"oauth2\") {\n setIsOauthTesting(true);\n void McpService.authorizeOAuth(payload)\n .then((result) => {\n setOauthTestResult(result);\n if (!result.ok) return;\n const serverToSave = result.oauth_state\n ? {\n ...payload,\n auth: { ...payload.auth!, state: result.oauth_state },\n }\n : payload;\n if (isEditing) {\n updateMcpServer(\n { serverId: server.id, server: serverToSave },\n { onSuccess: onClose, onError: handleError },\n );\n } else {\n addMcpServer(serverToSave, {\n onSuccess: onClose,\n onError: handleError,\n });\n }\n })\n .catch(handleError)\n .finally(() => setIsOauthTesting(false));\n return;\n }\n testServer(payload, {\n onSuccess: (result) => {\n if (!result.ok) {\n // Test failed — modal stays open, error shown via testMessage.\n return;\n }\n const serverToSave =\n result.oauth_state && payload.auth?.strategy === \"oauth2\"\n ? {\n ...payload,\n auth: { ...payload.auth, state: result.oauth_state },\n }\n : payload;\n if (isEditing) {\n updateMcpServer(\n { serverId: server.id, server: serverToSave },\n { onSuccess: onClose, onError: handleError },\n );\n } else {\n addMcpServer(serverToSave, {\n onSuccess: onClose,\n onError: handleError,\n });\n }\n },\n onError: handleError,\n });\n };\n\n const handleTestClick = (payload: MCPServerConfig) => {\n setOauthTestResult(null);\n if (payload.auth?.strategy === \"oauth2\" && !isCloudBackend) {\n setIsOauthTesting(true);\n void McpService.authorizeOAuth(payload)\n .then(setOauthTestResult)\n .catch(handleError)\n .finally(() => setIsOauthTesting(false));\n return;\n }\n testServer(payload);\n };\n\n const handleConfirmDelete = () => {\n deleteMcpServer(server, {\n onSuccess: () => {\n displaySuccessToast(t(I18nKey.MCP$REMOVE_SUCCESS));\n setShowDeleteConfirm(false);\n onClose();\n },\n onError: (err) => {\n handleError(err);\n setShowDeleteConfirm(false);\n },\n });\n };\n\n return (\n <>\n <ModalBackdrop\n // Block backdrop-click / Escape from dismissing the modal while\n // a mutation is in flight — closing mid-request would orphan\n // the request and leave the user with no error feedback.\n onClose={isDismissBlocked ? undefined : onClose}\n closeOnEscape={!isDismissBlocked}\n aria-label={\n isEditing\n ? t(I18nKey.MCP$EDIT_CUSTOM_TITLE)\n : t(I18nKey.MCP$ADD_CUSTOM_TITLE)\n }\n >\n <div\n data-testid=\"mcp-custom-editor\"\n className=\"relative bg-base-secondary p-6 rounded-xl border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[90vh] overflow-y-auto custom-scrollbar\"\n >\n <ModalCloseButton\n onClose={onClose}\n testId=\"mcp-custom-editor-close\"\n disabled={isDismissBlocked}\n />\n <h2 className={cn(\"mb-4 pr-6\", modalTitleLgClassName)}>\n {isEditing\n ? t(I18nKey.MCP$EDIT_CUSTOM_TITLE)\n : t(I18nKey.MCP$ADD_CUSTOM_TITLE)}\n </h2>\n <MCPServerForm\n mode={isEditing ? \"edit\" : \"add\"}\n server={isEditing ? server : undefined}\n existingServers={existingServers}\n onSubmit={handleSubmit}\n onCancel={onClose}\n onDelete={isEditing ? () => setShowDeleteConfirm(true) : undefined}\n isActionDisabled={isPending}\n onTest={isCloudBackend ? undefined : handleTestClick}\n isTestPending={isTesting || isOauthTesting}\n testMessage={isCloudBackend ? null : testMessage}\n />\n </div>\n </ModalBackdrop>\n\n {showDeleteConfirm ? (\n <ConfirmationModal\n text={t(I18nKey.SETTINGS$MCP_CONFIRM_DELETE)}\n onCancel={() => setShowDeleteConfirm(false)}\n onConfirm={handleConfirmDelete}\n isConfirming={isDeleting}\n />\n ) : null}\n </>\n );\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"custom-server-editor.cjs","names":[],"sources":["../../../../src/components/features/mcp-page/custom-server-editor.tsx"],"sourcesContent":["import React from \"react\";\nimport { AxiosError } from \"axios\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { ModalBackdrop } from \"#/components/shared/modals/modal-backdrop\";\nimport { ModalCloseButton } from \"#/components/shared/modals/modal-close-button\";\nimport { ConfirmationModal } from \"#/components/shared/modals/confirmation-modal\";\nimport {\n MCPServerForm,\n type TestMessage,\n} from \"#/components/features/settings/mcp-settings/mcp-server-form\";\nimport { seedMcpServerHealth } from \"#/api/mcp-health/probe-mcp-server-health\";\nimport { useAddMcpServer } from \"#/hooks/mutation/use-add-mcp-server\";\nimport { useUpdateMcpServer } from \"#/hooks/mutation/use-update-mcp-server\";\nimport { useDeleteMcpServer } from \"#/hooks/mutation/use-delete-mcp-server\";\nimport { useTestMcpServer } from \"#/hooks/mutation/use-test-mcp-server\";\nimport { useActiveBackend } from \"#/contexts/active-backend-context\";\nimport { ExtendedMCPTestResponse, MCPServerConfig } from \"#/types/mcp-server\";\nimport {\n displayErrorToast,\n displaySuccessToast,\n} from \"#/utils/custom-toast-handlers\";\nimport { makeMcpTestErrorMessage } from \"#/utils/mcp-test-error-message\";\nimport { retrieveAxiosErrorMessage } from \"#/utils/retrieve-axios-error-message\";\nimport { cn } from \"#/utils/utils\";\nimport { modalTitleLgClassName } from \"#/utils/modal-classes\";\nimport McpService from \"#/api/mcp-service/mcp-service.api\";\n\ninterface CustomServerEditorProps {\n server: MCPServerConfig;\n existingServers: MCPServerConfig[];\n onClose: () => void;\n}\n\n/**\n * Modal wrapper around `MCPServerForm` so users can hand-author\n * arbitrary stdio / SSE / SHTTP entries without reaching for raw JSON.\n * An empty `server.id` means \"Add new\".\n */\nexport function CustomServerEditor({\n server,\n existingServers,\n onClose,\n}: CustomServerEditorProps) {\n const { t } = useTranslation(\"openhands\");\n const { mutate: addMcpServer, isPending: isAdding } = useAddMcpServer();\n const { mutate: updateMcpServer, isPending: isUpdating } =\n useUpdateMcpServer();\n const { mutate: deleteMcpServer, isPending: isDeleting } =\n useDeleteMcpServer();\n const {\n mutate: testServer,\n isPending: isTesting,\n data: testResult,\n reset: resetTest,\n } = useTestMcpServer();\n const [showDeleteConfirm, setShowDeleteConfirm] = React.useState(false);\n const [oauthTestResult, setOauthTestResult] =\n React.useState<ExtendedMCPTestResponse | null>(null);\n const [isOauthTesting, setIsOauthTesting] = React.useState(false);\n\n // The MCP connectivity-test endpoint only exists on the local agent-server.\n // For cloud backends `McpService.testServer` short-circuits with a synthetic\n // success so the save still completes; we hide the manual \"Test connection\"\n // button here so cloud users aren't shown a misleading \"0 tools\" result.\n const { backend } = useActiveBackend();\n const isCloudBackend = backend.kind === \"cloud\";\n\n const isEditing = !!server.id;\n const isPending = isAdding || isUpdating || isDeleting;\n const isDismissBlocked =\n isPending || isTesting || isOauthTesting || showDeleteConfirm;\n\n const testMessage: TestMessage | null = React.useMemo(() => {\n const result = oauthTestResult ?? testResult;\n if (!result) return null;\n if (result.ok) {\n return {\n ok: true,\n text: t(I18nKey.MCP$TEST_SUCCESS, { count: result.tools.length }),\n };\n }\n return {\n ok: false,\n text: makeMcpTestErrorMessage(t, result.error_kind, result.error),\n };\n }, [oauthTestResult, testResult, t]);\n\n // A save always follows a fresh successful probe of the exact config being\n // saved, so publish that result to the card's health entry. On cloud\n // backends the probe is synthetic — never present it as a health verdict.\n const seedSavedServerHealth = (\n serverToSave: MCPServerConfig,\n result: ExtendedMCPTestResponse,\n ) => {\n if (isCloudBackend) return;\n // When editing, the server's own entry must be overwritten, so only the\n // OTHER servers guard against a same-key collision.\n const otherServers = isEditing\n ? existingServers.filter((existing) => existing.id !== server.id)\n : existingServers;\n seedMcpServerHealth(serverToSave, result, otherServers);\n };\n\n // Shared error handler so both add and update surface backend errors\n // as a toast instead of failing silently — previously these calls\n // had no `onError` and the modal closed even on a 4xx/5xx, leaving\n // the user to discover the failure on the next page load.\n const handleError = (err: unknown) => {\n const message = retrieveAxiosErrorMessage(err as AxiosError);\n displayErrorToast(message || t(I18nKey.ERROR$GENERIC));\n };\n\n const handleSubmit = (payload: MCPServerConfig) => {\n resetTest();\n setOauthTestResult(null);\n if (payload.auth?.strategy === \"oauth2\") {\n setIsOauthTesting(true);\n void McpService.authorizeOAuth(payload)\n .then((result) => {\n setOauthTestResult(result);\n if (!result.ok) return;\n const serverToSave = result.oauth_state\n ? {\n ...payload,\n auth: { ...payload.auth!, state: result.oauth_state },\n }\n : payload;\n const onSaved = () => {\n seedSavedServerHealth(serverToSave, result);\n onClose();\n };\n if (isEditing) {\n updateMcpServer(\n { serverId: server.id, server: serverToSave },\n { onSuccess: onSaved, onError: handleError },\n );\n } else {\n addMcpServer(serverToSave, {\n onSuccess: onSaved,\n onError: handleError,\n });\n }\n })\n .catch(handleError)\n .finally(() => setIsOauthTesting(false));\n return;\n }\n testServer(payload, {\n onSuccess: (result) => {\n if (!result.ok) {\n // Test failed — modal stays open, error shown via testMessage.\n return;\n }\n const serverToSave =\n result.oauth_state && payload.auth?.strategy === \"oauth2\"\n ? {\n ...payload,\n auth: { ...payload.auth, state: result.oauth_state },\n }\n : payload;\n const onSaved = () => {\n seedSavedServerHealth(serverToSave, result);\n onClose();\n };\n if (isEditing) {\n updateMcpServer(\n { serverId: server.id, server: serverToSave },\n { onSuccess: onSaved, onError: handleError },\n );\n } else {\n addMcpServer(serverToSave, {\n onSuccess: onSaved,\n onError: handleError,\n });\n }\n },\n onError: handleError,\n });\n };\n\n const handleTestClick = (payload: MCPServerConfig) => {\n setOauthTestResult(null);\n if (payload.auth?.strategy === \"oauth2\" && !isCloudBackend) {\n setIsOauthTesting(true);\n void McpService.authorizeOAuth(payload)\n .then(setOauthTestResult)\n .catch(handleError)\n .finally(() => setIsOauthTesting(false));\n return;\n }\n testServer(payload);\n };\n\n const handleConfirmDelete = () => {\n deleteMcpServer(server, {\n onSuccess: () => {\n displaySuccessToast(t(I18nKey.MCP$REMOVE_SUCCESS));\n setShowDeleteConfirm(false);\n onClose();\n },\n onError: (err) => {\n handleError(err);\n setShowDeleteConfirm(false);\n },\n });\n };\n\n return (\n <>\n <ModalBackdrop\n // Block backdrop-click / Escape from dismissing the modal while\n // a mutation is in flight — closing mid-request would orphan\n // the request and leave the user with no error feedback.\n onClose={isDismissBlocked ? undefined : onClose}\n closeOnEscape={!isDismissBlocked}\n aria-label={\n isEditing\n ? t(I18nKey.MCP$EDIT_CUSTOM_TITLE)\n : t(I18nKey.MCP$ADD_CUSTOM_TITLE)\n }\n >\n <div\n data-testid=\"mcp-custom-editor\"\n className=\"relative bg-base-secondary p-6 rounded-xl border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[90vh] overflow-y-auto custom-scrollbar\"\n >\n <ModalCloseButton\n onClose={onClose}\n testId=\"mcp-custom-editor-close\"\n disabled={isDismissBlocked}\n />\n <h2 className={cn(\"mb-4 pr-6\", modalTitleLgClassName)}>\n {isEditing\n ? t(I18nKey.MCP$EDIT_CUSTOM_TITLE)\n : t(I18nKey.MCP$ADD_CUSTOM_TITLE)}\n </h2>\n <MCPServerForm\n mode={isEditing ? \"edit\" : \"add\"}\n server={isEditing ? server : undefined}\n existingServers={existingServers}\n onSubmit={handleSubmit}\n onCancel={onClose}\n onDelete={isEditing ? () => setShowDeleteConfirm(true) : undefined}\n isActionDisabled={isPending}\n onTest={isCloudBackend ? undefined : handleTestClick}\n isTestPending={isTesting || isOauthTesting}\n testMessage={isCloudBackend ? null : testMessage}\n />\n </div>\n </ModalBackdrop>\n\n {showDeleteConfirm ? (\n <ConfirmationModal\n text={t(I18nKey.SETTINGS$MCP_CONFIRM_DELETE)}\n onCancel={() => setShowDeleteConfirm(false)}\n onConfirm={handleConfirmDelete}\n isConfirming={isDeleting}\n />\n ) : null}\n </>\n );\n}\n"],"mappings":"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"}
|