@openhands/agent-canvas 1.7.2 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.windows.md +2 -2
- package/build/assets/{Trans-DP5rcauH.js → Trans-Bwpzk1wT.js} +1 -1
- package/build/assets/{acp-providers-BHKZvEm5.js → acp-providers-C921BlYB.js} +1 -1
- package/build/assets/active-backend-context-BiwzkzDy.js +2 -0
- package/build/assets/agent-context-settings-DXNT_dcw.js +1 -0
- package/build/assets/agent-profiles-settings-BymJf3EP.js +1 -0
- package/build/assets/agent-server-conversation-service.api-CYSWw-2g.js +41 -0
- package/build/assets/agent-settings-BjgQQe-_.js +1 -0
- package/build/assets/{agent-settings-BIOsUglV.js → agent-settings-WzqXk6B4.js} +2 -2
- package/build/assets/{alert-banner-C1nzoXBC.js → alert-banner-DR8EVyZM.js} +1 -1
- package/build/assets/api-error-message-e16L1kwH.js +1 -0
- package/build/assets/api-key-entry-screen-DI0I04O3.js +1 -0
- package/build/assets/app-settings-DGistSFV.js +1 -0
- package/build/assets/automation-C_eCrGyP.js +1 -0
- package/build/assets/automation-detail-DY6x2FW1.js +2 -0
- package/build/assets/automation-export-C09f-Lua.js +2 -0
- package/build/assets/automation-setup-route-CqKp0717.js +1 -0
- package/build/assets/automations-list-CqWJ7qXW.js +1 -0
- package/build/assets/{back-nav-button-Be_L157B.js → back-nav-button-D4ngzpSh.js} +1 -1
- package/build/assets/backend-form-modal-B8D5hBzK.js +1 -0
- package/build/assets/{backend-synced-settings-badge-BNpEylNP.js → backend-synced-settings-badge-BnzI8Ysj.js} +1 -1
- package/build/assets/{badge-DwgrwohM.js → badge-1Mf1iPcX.js} +1 -1
- package/build/assets/{base-modal-CSHhJTSr.js → base-modal-BBuy0WQQ.js} +1 -1
- package/build/assets/{brand-button-CQO8oqVo.js → brand-button-DGN6Y9o6.js} +1 -1
- package/build/assets/browser-D_ekTlTS.js +6 -0
- package/build/assets/{browser-tab-CEApjoEV.js → browser-tab-D4a4Ou_w.js} +1 -1
- package/build/assets/{chat-send-button-D4614wUz.js → chat-send-button-CgbcjD97.js} +1 -1
- package/build/assets/check-CPLXgluF.js +1 -0
- package/build/assets/chevron-down-CP4QHvyc.js +1 -0
- package/build/assets/circle-check-Dpy2_xSI.js +1 -0
- package/build/assets/{circle-plus-check-toggle-E3Ecb_gg.js → circle-plus-check-toggle-yTAS-nX3.js} +1 -1
- package/build/assets/cloud-funnel-analytics-CEOl5Gxr.js +1 -0
- package/build/assets/{combobox-caret-C8_eGdp2.js → combobox-caret-Bd2yySnF.js} +1 -1
- package/build/assets/command-menu-Bj6X4ckE.js +1 -0
- package/build/assets/condenser-settings-EAXQNR2E.js +1 -0
- package/build/assets/{confirmation-modal-gZtbojCm.js → confirmation-modal-NCUPr2-O.js} +1 -1
- package/build/assets/{context-menu-list-item-BTHGFhIx.js → context-menu-list-item-CrCrYuPF.js} +1 -1
- package/build/assets/conversation-BzyIcSwr.js +1 -0
- package/build/assets/conversation-CUJ0Vo8g.js +90 -0
- package/build/assets/conversation-panel-BzyIcSwr.js +1 -0
- package/build/assets/conversation-state-store-F62HvuI1.js +1 -0
- package/build/assets/{conversation-tab-empty-state-BCMHkGQk.js → conversation-tab-empty-state-BCZ7rUMH.js} +1 -1
- package/build/assets/{copy-B8Y5ufoR.js → copy-DCmZtz6n.js} +1 -1
- package/build/assets/{copy-to-clipboard-button-C4l3CMSd.js → copy-to-clipboard-button-D_Lp6-Fl.js} +1 -1
- package/build/assets/{device-verify-C_M7Z8xs.js → device-verify-DLmolX8Q.js} +1 -1
- package/build/assets/{dropdown-classes-DQlj-MpS.js → dropdown-classes-BB8rzqXL.js} +1 -1
- package/build/assets/{entry.client-DETaouwO.js → entry.client-BbIYOsIg.js} +2 -2
- package/build/assets/{enum-filter-dropdown-paB-lFSP.js → enum-filter-dropdown-C08-srev.js} +1 -1
- package/build/assets/{environment-switch-overlay-D0FgCMqs.js → environment-switch-overlay-BepBBX66.js} +1 -1
- package/build/assets/extensions-hub-R3KNv-5V.js +1 -0
- package/build/assets/extensions-navigation-CfWFmI1I.js +1 -0
- package/build/assets/{external-link-Cnnd6ikC.js → external-link-BdBSg8rk.js} +1 -1
- package/build/assets/files-tab-DEq8MbHu.js +1 -0
- package/build/assets/{form-control-classes-CSPevi7c.js → form-control-classes-DAfsCJTe.js} +1 -1
- package/build/assets/{format-time-delta-DuhE50B-.js → format-time-delta-CxfPJpzC.js} +1 -1
- package/build/assets/git-provider-icon-BZqqUPlm.js +1 -0
- package/build/assets/git-repo-dropdown-9WKINV6J.js +1 -0
- package/build/assets/git-repo-dropdown-DEpOwUez.js +1 -0
- package/build/assets/{highlighted-source-view-suUKd5if.js → highlighted-source-view-CX9oIoVT.js} +1 -1
- package/build/assets/home-CY0JaxiY.js +1 -0
- package/build/assets/home-CaNWlVvB.js +1 -0
- package/build/assets/home-store-Ch1ErdBc.js +1 -0
- package/build/assets/index-home-CaNWlVvB.js +1 -0
- package/build/assets/info-CmWQXtRQ.js +1 -0
- package/build/assets/install-server-modal-BWrudmZU.js +1 -0
- package/build/assets/{launch-Ccnhte5b.js → launch-B1POpHuP.js} +1 -1
- package/build/assets/{list-todo-_BXQzOiB.js → list-todo-DtiL3lTp.js} +1 -1
- package/build/assets/llm-not-configured-banner-3tMsM4K6.js +27 -0
- package/build/assets/llm-settings-CXo8iPNW.js +1 -0
- package/build/assets/llm-settings-D0W8mJDk.js +1 -0
- package/build/assets/{llm-subscription-service-W5BprsNA.js → llm-subscription-service-DBJbfd8Z.js} +1 -1
- package/build/assets/loader-circle-B4QDBARx.js +1 -0
- package/build/assets/{loading-spinner-CcpnCr_d.js → loading-spinner-DfZ_bhV7.js} +1 -1
- package/build/assets/manage-backends-modal-CwyWsiag.js +1 -0
- package/build/assets/manifest-39f4789d.js +1 -0
- package/build/assets/{markdown-renderer-CvOO0YIr.js → markdown-renderer-DgiLLhW6.js} +6 -6
- package/build/assets/mcp-DXG9LWrI.js +9 -0
- package/build/assets/mcp-marketplace-utils-DFmhKc5s.js +1 -0
- package/build/assets/messages-kBjKaAeA.js +40 -0
- package/build/assets/{modal-body-DQhiw-AR.js → modal-body-CMsDpalT.js} +1 -1
- package/build/assets/{modal-classes-YaEEa5eZ.js → modal-classes-B6PDrxXo.js} +1 -1
- package/build/assets/{modal-close-button-turIYn0t.js → modal-close-button-DyxBZaAb.js} +1 -1
- package/build/assets/{onboarding-BegDrOKn.js → onboarding-47hh2IHA.js} +1 -1
- package/build/assets/onboarding-modal-9BuvvROo.js +1 -0
- package/build/assets/organization-service.api-UDy63-oC.js +1 -0
- package/build/assets/{pencil-8_lvWDoZ.js → pencil-BjgtZmWp.js} +1 -1
- package/build/assets/{planner-tab-w6HT0N_A.js → planner-tab-BWk8885v.js} +1 -1
- package/build/assets/plugins-management-service-CjkgF2dd.js +1 -0
- package/build/assets/plus-DrKuuvMe.js +1 -0
- package/build/assets/profiles-service.api-CukSFLzz.js +1 -0
- package/build/assets/providers-CqUWC85T.js +1 -0
- package/build/assets/proxy-BBUG3sd2.js +1 -0
- package/build/assets/{puzzle-DXWdfaa7.js → puzzle-BoNc6zZ8.js} +1 -1
- package/build/assets/recommended-automations-launcher-ejxy1P27.js +1 -0
- package/build/assets/{refresh-cw-D7CYLy-d.js → refresh-cw-BrM5ZAZD.js} +1 -1
- package/build/assets/root-5S-M8SYa.js +2 -0
- package/build/assets/root-DZ39lS5f.css +1 -0
- package/build/assets/root-layout-BPqoa0gv.js +3 -0
- package/build/assets/schema-field-nImDoY6-.js +1 -0
- package/build/assets/{sdk-section-page-BW-i45yr.js → sdk-section-page-BxMrtUNV.js} +1 -1
- package/build/assets/search-Dc2qR4O2.js +1 -0
- package/build/assets/secrets-service-Dhjh3HhH.js +1 -0
- package/build/assets/{secrets-settings-D7U1ErCH.js → secrets-settings-CPdxceT_.js} +1 -1
- package/build/assets/segmented-toggle-Do6oyepX.js +1 -0
- package/build/assets/settings-BRbnfKEm.js +1 -0
- package/build/assets/{settings-dropdown-input-Dx6vlkgf.js → settings-dropdown-input-DYCULKpp.js} +1 -1
- package/build/assets/{settings-index-COAdxm2Q.js → settings-index-C9o2NBO0.js} +1 -1
- package/build/assets/settings-input-B-q2gkVy.js +1 -0
- package/build/assets/{settings-list-classes-gQdBahdt.js → settings-list-classes-WpQi0q1L.js} +1 -1
- package/build/assets/{settings-modal-CFnbQ8_4.js → settings-modal-CEK0AIx6.js} +1 -1
- package/build/assets/settings-service.api-CZiPD8__.js +1 -0
- package/build/assets/{settings-switch-UNSf8K8I.js → settings-switch-LqKdGxHL.js} +1 -1
- package/build/assets/shared-conversation-Bu-dQlgp.js +1 -0
- package/build/assets/{sidebar-layout-DXHtbEj1.js → sidebar-layout-oHBGQmLh.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-U78hQRJ1.js → sidebar-mobile-menu-toggle-ND-hgygu.js} +1 -1
- package/build/assets/{sidebar-nav-link-pvUivfK2.js → sidebar-nav-link-CrujNA09.js} +1 -1
- package/build/assets/{sidebar-store-DwrYKwYr.js → sidebar-store-Bui-WNEr.js} +1 -1
- package/build/assets/{skill-card-pill-row-D7XCz5uk.js → skill-card-pill-row-CZBI7OqH.js} +1 -1
- package/build/assets/{skill-icon-badge-HqBWZ2Eq.js → skill-icon-badge-BOov_phZ.js} +1 -1
- package/build/assets/{skills-plugins-BPhaNpfx.js → skills-plugins-D0PiHWAD.js} +1 -1
- package/build/assets/{skills-settings-CcwMtnnJ.js → skills-settings-B43KArIz.js} +2 -2
- package/build/assets/{styled-tooltip-DsjDnR_W.js → styled-tooltip-C7grwnOX.js} +1 -1
- package/build/assets/{task-list-tab-BmaTwjaS.js → task-list-tab-R3ac6m7O.js} +1 -1
- package/build/assets/{terminal-BRcoba5B.js → terminal-yqkNdEAx.js} +1 -1
- package/build/assets/{toggle-switch-BptY3XRG.js → toggle-switch-BeSrbgCg.js} +1 -1
- package/build/assets/{trash-2-Bq4lHbTB.js → trash-2-wW5TWcdN.js} +1 -1
- package/build/assets/{typography-C6fuRTTT.js → typography-iYhzLlHO.js} +1 -1
- package/build/assets/{use-acp-credential-form-B0_pZ_uS.js → use-acp-credential-form-DUxbxmbq.js} +1 -1
- package/build/assets/use-activate-agent-profile-CDHA52tC.js +1 -0
- package/build/assets/use-agent-profiles-TsOdIyw5.js +1 -0
- package/build/assets/{use-can-manage-org-profiles-CrG1km7R.js → use-can-manage-org-profiles-Bt1M71u5.js} +1 -1
- package/build/assets/use-cloud-current-user-id-DWt7HCgf.js +1 -0
- package/build/assets/{use-config-Csy8EAP9.js → use-config-CxlEdf_v.js} +1 -1
- package/build/assets/{use-create-conversation-Dsa4nzU9.js → use-create-conversation-nOJ6Um5h.js} +1 -1
- package/build/assets/{use-create-secret-BnxuAjDt.js → use-create-secret-Dj5ang9x.js} +1 -1
- package/build/assets/use-is-authed-BT7Iud4U.js +1 -0
- package/build/assets/{use-is-creating-conversation-CIAcnd8M.js → use-is-creating-conversation-CAggrM75.js} +1 -1
- package/build/assets/use-llm-profiles-2Wc2db8u.js +1 -0
- package/build/assets/use-onboarding-completion-gxQlcEy2.js +1 -0
- package/build/assets/use-plugins-marketplace-CVO7sXYR.js +1 -0
- package/build/assets/use-save-agent-profile-D0wC5ExW.js +1 -0
- package/build/assets/{use-save-settings-BRh9p_fv.js → use-save-settings-L3aMaDeS.js} +1 -1
- package/build/assets/use-settings-8nt3DGxW.js +1 -0
- package/build/assets/use-settings-nav-items-DHAAD-zk.js +16 -0
- package/build/assets/use-skills-CE6miQ3r.js +1 -0
- package/build/assets/use-tracking-BGboadaZ.js +68 -0
- package/build/assets/{use-user-conversation-GnGhs_Ob.js → use-user-conversation-BIIpGUgM.js} +1 -1
- package/build/assets/useInfiniteQuery-BLRVmVPU.js +1 -0
- package/build/assets/{useMutation-DyQXZFEF.js → useMutation-CaSHLnX0.js} +1 -1
- package/build/assets/{useQueries-B3T1a7qt.js → useQueries--d_WWAzc.js} +1 -1
- package/build/assets/{useQuery-B38jBavx.js → useQuery-DiPh8LRJ.js} +1 -1
- package/build/assets/utils-BgGG1znF.js +1 -0
- package/build/assets/{vendor~browser-CIoZCqGs.js → vendor~browser-IVYgIgG1.js} +1 -1
- package/build/assets/{vendor~entry.client-Di4qO77Y.js → vendor~entry.client-BcYIVQvB.js} +1 -1
- package/build/assets/{vendor~entry.client-BfviqoVc.js → vendor~entry.client-CXM9oiAk.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~g4xrpilz-CJ7amdtQ.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~b0bpqexo-CbTboogo.js} +2 -2
- package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f9xdmd0z-DLMP7bZx.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~d4by102p-C2f0ZhS-.js} +1 -1
- package/build/assets/{vendor~files-tab-vm3f67Pz.js → vendor~files-tab-C7RmQJwN.js} +1 -1
- package/build/assets/{vendor~index-home~home~conversation-panel~conversation-kX4LrGQC.js → vendor~index-home~home~conversation-panel~conversation-Bqp1ZqJM.js} +1 -1
- package/build/assets/{vendor~root-layout~conversation-panel~conversation-DpA6fir3.js → vendor~root-layout~conversation-panel~conversation-BCn8lzeG.js} +1 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~automation-setup-route-B_L-gcOG.js +1 -0
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-sjx0x5ac.js +1 -0
- package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~automation-setup-route~onboarding-modal-D7IDevqN.js +1 -0
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~bi2r7bko-Bw4AuHN1.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~dfc8ddxy-tTyxnjXT.js} +1 -1
- package/build/assets/{vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~hakxo2tj-ClV0p9g3.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~extensions-h~gy8zbn65-CGt6bWRT.js} +1 -1
- package/build/assets/{vendor~root-layout~index-home~home~conversation-panel~conversation~launch~skills-settings~a~eywn6ulz-BKxxr74w.js → vendor~root~root-layout~index-home~home~conversation-panel~conversation~launch~skills-setti~dufan6ng-Dtdw8H0q.js} +17 -4
- package/build/assets/{verification-settings-CaCzojbc.js → verification-settings-DBsnSXC3.js} +1 -1
- package/build/assets/x-omAzpXkl.js +1 -0
- package/build/favicon-16x16.png +0 -0
- package/build/favicon-32x32.png +0 -0
- package/build/favicon.ico +0 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +39 -2
- package/build/locales/ca/openhands.json +39 -2
- package/build/locales/de/openhands.json +39 -2
- package/build/locales/en/openhands.json +40 -3
- package/build/locales/es/openhands.json +39 -2
- package/build/locales/fr/openhands.json +39 -2
- package/build/locales/it/openhands.json +39 -2
- package/build/locales/ja/openhands.json +39 -2
- package/build/locales/ko-KR/openhands.json +39 -2
- package/build/locales/no/openhands.json +39 -2
- package/build/locales/pt/openhands.json +39 -2
- package/build/locales/tr/openhands.json +39 -2
- package/build/locales/uk/openhands.json +39 -2
- package/build/locales/zh-CN/openhands.json +39 -2
- package/build/locales/zh-TW/openhands.json +39 -2
- package/config/defaults.json +4 -4
- package/dist/api/agent-server-adapter.cjs +3 -3
- package/dist/api/agent-server-adapter.cjs.map +1 -1
- package/dist/api/agent-server-adapter.d.ts +46 -6
- package/dist/api/agent-server-adapter.js +187 -168
- 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 +4 -0
- package/dist/api/agent-server-compatibility.js +41 -38
- package/dist/api/agent-server-compatibility.js.map +1 -1
- package/dist/api/automation-service/automation-service.api.cjs +1 -1
- package/dist/api/automation-service/automation-service.api.cjs.map +1 -1
- package/dist/api/automation-service/automation-service.api.d.ts +20 -0
- package/dist/api/automation-service/automation-service.api.js +136 -99
- package/dist/api/automation-service/automation-service.api.js.map +1 -1
- package/dist/api/backend-registry/storage.cjs +1 -1
- package/dist/api/backend-registry/storage.cjs.map +1 -1
- package/dist/api/backend-registry/storage.js +1 -1
- package/dist/api/backend-registry/storage.js.map +1 -1
- package/dist/api/backend-registry/types.d.ts +2 -0
- package/dist/api/cloud/conversation-service.api.cjs +1 -1
- package/dist/api/cloud/conversation-service.api.js +22 -22
- package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
- package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
- package/dist/api/mcp-service/mcp-service.api.js +19 -19
- package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
- package/dist/api/settings-service/settings-service.api.cjs +1 -1
- package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
- package/dist/api/settings-service/settings-service.api.js +26 -12
- package/dist/api/settings-service/settings-service.api.js.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.cjs +2 -0
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.cjs.map +1 -0
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.d.ts +12 -0
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.js +94 -0
- package/dist/components/conversation-events/chat/event-content-helpers/get-action-event-title.js.map +1 -0
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +31 -90
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
- package/dist/components/features/automations/recommended-automations-launcher.d.ts +0 -7
- package/dist/components/features/automations/recommended-automations-section.d.ts +0 -6
- 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.js +568 -358
- package/dist/components/features/backends/backend-form-modal.js.map +1 -1
- package/dist/components/features/backends/device-flow-auth.cjs +1 -1
- package/dist/components/features/backends/device-flow-auth.cjs.map +1 -1
- package/dist/components/features/backends/device-flow-auth.d.ts +9 -1
- package/dist/components/features/backends/device-flow-auth.js +56 -55
- package/dist/components/features/backends/device-flow-auth.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 +1 -1
- package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
- package/dist/components/features/chat/chat-interface.cjs +1 -1
- package/dist/components/features/chat/chat-interface.cjs.map +1 -1
- package/dist/components/features/chat/chat-interface.js +105 -105
- package/dist/components/features/chat/chat-interface.js.map +1 -1
- package/dist/components/features/chat/chat-message.cjs +1 -1
- package/dist/components/features/chat/chat-message.cjs.map +1 -1
- package/dist/components/features/chat/chat-message.d.ts +2 -1
- package/dist/components/features/chat/chat-message.js +59 -49
- package/dist/components/features/chat/chat-message.js.map +1 -1
- package/dist/components/features/chat/pending-user-messages.cjs +1 -1
- package/dist/components/features/chat/pending-user-messages.cjs.map +1 -1
- package/dist/components/features/chat/pending-user-messages.js +4 -1
- package/dist/components/features/chat/pending-user-messages.js.map +1 -1
- package/dist/components/features/chat/typing-indicator.cjs +1 -1
- package/dist/components/features/chat/typing-indicator.cjs.map +1 -1
- package/dist/components/features/chat/typing-indicator.d.ts +8 -1
- package/dist/components/features/chat/typing-indicator.js +94 -10
- package/dist/components/features/chat/typing-indicator.js.map +1 -1
- package/dist/components/features/command-menu/command-menu-items.d.ts +5 -1
- package/dist/components/features/files-tab/segmented-toggle.cjs +1 -1
- package/dist/components/features/files-tab/segmented-toggle.cjs.map +1 -1
- package/dist/components/features/files-tab/segmented-toggle.d.ts +2 -0
- package/dist/components/features/files-tab/segmented-toggle.js +17 -14
- package/dist/components/features/files-tab/segmented-toggle.js.map +1 -1
- package/dist/components/features/manifest/manifest-form-field.d.ts +27 -0
- package/dist/components/features/manifest/manifest-prerequisites-step.d.ts +11 -0
- package/dist/components/features/manifest/manifest-review-step.d.ts +14 -0
- package/dist/components/features/manifest/manifest-setup-dialog.d.ts +14 -0
- package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.js +16 -16
- package/dist/components/features/mcp-page/installed-server-card.cjs +1 -1
- package/dist/components/features/mcp-page/installed-server-card.cjs.map +1 -1
- package/dist/components/features/mcp-page/installed-server-card.d.ts +2 -2
- package/dist/components/features/mcp-page/installed-server-card.js +6 -7
- package/dist/components/features/mcp-page/installed-server-card.js.map +1 -1
- package/dist/components/features/mcp-page/installed-servers-section.cjs +1 -1
- package/dist/components/features/mcp-page/installed-servers-section.cjs.map +1 -1
- package/dist/components/features/mcp-page/installed-servers-section.d.ts +2 -2
- package/dist/components/features/mcp-page/installed-servers-section.js +2 -2
- package/dist/components/features/mcp-page/installed-servers-section.js.map +1 -1
- package/dist/components/features/mcp-page/mcp-server-health.cjs +1 -1
- package/dist/components/features/mcp-page/mcp-server-health.js +4 -4
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs.map +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js +2 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js.map +1 -1
- package/dist/components/features/settings/settings-input.cjs +1 -1
- package/dist/components/features/settings/settings-input.cjs.map +1 -1
- package/dist/components/features/settings/settings-input.d.ts +6 -0
- package/dist/components/features/settings/settings-input.js +13 -8
- package/dist/components/features/settings/settings-input.js.map +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.js +124 -123
- package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +3 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/contexts/active-backend-context.cjs +1 -1
- package/dist/contexts/active-backend-context.cjs.map +1 -1
- package/dist/contexts/active-backend-context.d.ts +3 -2
- package/dist/contexts/active-backend-context.js +55 -42
- package/dist/contexts/active-backend-context.js.map +1 -1
- package/dist/favicon-16x16.png +0 -0
- package/dist/favicon-32x32.png +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.js +5 -5
- package/dist/hooks/query/query-keys.cjs.map +1 -1
- package/dist/hooks/query/query-keys.d.ts +4 -0
- package/dist/hooks/query/query-keys.js.map +1 -1
- package/dist/hooks/query/use-cloud-current-user-id.cjs +1 -1
- package/dist/hooks/query/use-cloud-current-user-id.cjs.map +1 -1
- package/dist/hooks/query/use-cloud-current-user-id.js +7 -5
- package/dist/hooks/query/use-cloud-current-user-id.js.map +1 -1
- package/dist/hooks/query/use-cloud-organizations.cjs +1 -1
- package/dist/hooks/query/use-cloud-organizations.cjs.map +1 -1
- package/dist/hooks/query/use-cloud-organizations.js +5 -1
- package/dist/hooks/query/use-cloud-organizations.js.map +1 -1
- package/dist/hooks/query/use-manifest-capabilities.d.ts +21 -0
- package/dist/hooks/query/use-manifest-prerequisites.d.ts +24 -0
- package/dist/hooks/use-can-manage-org-profiles.cjs +1 -1
- package/dist/hooks/use-can-manage-org-profiles.cjs.map +1 -1
- package/dist/hooks/use-can-manage-org-profiles.js +2 -1
- package/dist/hooks/use-can-manage-org-profiles.js.map +1 -1
- package/dist/hooks/use-llm-configured.cjs +1 -1
- package/dist/hooks/use-llm-configured.cjs.map +1 -1
- package/dist/hooks/use-llm-configured.js +2 -1
- package/dist/hooks/use-llm-configured.js.map +1 -1
- package/dist/hooks/use-manifest-preflight.d.ts +18 -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 +14 -0
- package/dist/hooks/use-tracking.js +28 -10
- 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 +38 -1
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +2 -2
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +645 -16
- package/dist/i18n/translation.js.map +1 -1
- package/dist/icons/external-link.cjs +2 -0
- package/dist/icons/external-link.cjs.map +1 -0
- package/dist/icons/external-link.js +22 -0
- package/dist/icons/external-link.js.map +1 -0
- package/dist/icons/server.cjs +2 -0
- package/dist/icons/server.cjs.map +1 -0
- package/dist/icons/server.js +17 -0
- package/dist/icons/server.js.map +1 -0
- package/dist/locales/ar/openhands.json +39 -2
- package/dist/locales/ca/openhands.json +39 -2
- package/dist/locales/de/openhands.json +39 -2
- package/dist/locales/en/openhands.json +40 -3
- package/dist/locales/es/openhands.json +39 -2
- package/dist/locales/fr/openhands.json +39 -2
- package/dist/locales/it/openhands.json +39 -2
- package/dist/locales/ja/openhands.json +39 -2
- package/dist/locales/ko-KR/openhands.json +39 -2
- package/dist/locales/no/openhands.json +39 -2
- package/dist/locales/pt/openhands.json +39 -2
- package/dist/locales/tr/openhands.json +39 -2
- package/dist/locales/uk/openhands.json +39 -2
- package/dist/locales/zh-CN/openhands.json +39 -2
- package/dist/locales/zh-TW/openhands.json +39 -2
- package/dist/manifests/automation-interface.cjs +2 -0
- package/dist/manifests/automation-interface.cjs.map +1 -0
- package/dist/manifests/automation-interface.d.ts +44 -0
- package/dist/manifests/automation-interface.js +81 -0
- package/dist/manifests/automation-interface.js.map +1 -0
- package/dist/manifests/automation-setup.cjs +2 -0
- package/dist/manifests/automation-setup.cjs.map +1 -0
- package/dist/manifests/automation-setup.d.ts +52 -0
- package/dist/manifests/automation-setup.js +8 -0
- package/dist/manifests/automation-setup.js.map +1 -0
- package/dist/manifests/interface-validation.cjs +2 -0
- package/dist/manifests/interface-validation.cjs.map +1 -0
- package/dist/manifests/interface-validation.d.ts +27 -0
- package/dist/manifests/interface-validation.js +182 -0
- package/dist/manifests/interface-validation.js.map +1 -0
- package/dist/manifests/manifest-actions.d.ts +15 -0
- package/dist/manifests/manifest-capabilities.d.ts +25 -0
- package/dist/manifests/manifest-error-map.d.ts +40 -0
- package/dist/manifests/manifest-local-validation.d.ts +56 -0
- package/dist/manifests/manifest-registry.cjs +2 -0
- package/dist/manifests/manifest-registry.cjs.map +1 -0
- package/dist/manifests/manifest-registry.d.ts +15 -0
- package/dist/manifests/manifest-registry.js +26 -0
- package/dist/manifests/manifest-registry.js.map +1 -0
- package/dist/manifests/manifest-sources.cjs +2 -0
- package/dist/manifests/manifest-sources.cjs.map +1 -0
- package/dist/manifests/manifest-sources.d.ts +15 -0
- package/dist/manifests/manifest-sources.js +8 -0
- package/dist/manifests/manifest-sources.js.map +1 -0
- package/dist/manifests/manifest-template.d.ts +18 -0
- package/dist/manifests/manifest-validation.cjs +2 -0
- package/dist/manifests/manifest-validation.cjs.map +1 -0
- package/dist/manifests/manifest-validation.d.ts +30 -0
- package/dist/manifests/manifest-validation.js +145 -0
- package/dist/manifests/manifest-validation.js.map +1 -0
- package/dist/manifests/types.cjs +2 -0
- package/dist/manifests/types.cjs.map +1 -0
- package/dist/manifests/types.d.ts +227 -0
- package/dist/manifests/types.js +6 -0
- package/dist/manifests/types.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js +75 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-pr-reviewer/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js +78 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/github-repo-monitor/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.cjs +17 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.js +89 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/incident-retrospective-drafter/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.cjs +10 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.js +17 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/jira-issue-to-pr/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.js +15 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/linear-triage-assistant/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.js +18 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/research-brief-writer/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.js +14 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/slack-channel-monitor/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.cjs +9 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.js +14 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog/slack-standup-digest/manifest.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js +23 -0
- package/dist/node_modules/@openhands/extensions/automations/catalog-index.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/index.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/automations/index.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/index.js +18 -0
- package/dist/node_modules/@openhands/extensions/automations/index.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/automations/interface.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/automations/interface.js +89 -0
- package/dist/node_modules/@openhands/extensions/automations/interface.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js +3 -3
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.cjs +17 -4
- package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js +5 -5
- package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.js +9 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/settings-client.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/monitor.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/monitor.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/monitor.js +29 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/monitor.js.map +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +3 -3
- package/dist/package.js.map +1 -1
- package/dist/routes/app-settings.cjs +1 -1
- package/dist/routes/app-settings.js +5 -5
- package/dist/routes/mcp.cjs +1 -1
- package/dist/routes/mcp.cjs.map +1 -1
- package/dist/routes/mcp.js +73 -82
- package/dist/routes/mcp.js.map +1 -1
- package/dist/services/telemetry.cjs +1 -1
- package/dist/services/telemetry.cjs.map +1 -1
- package/dist/services/telemetry.d.ts +8 -0
- package/dist/services/telemetry.js +163 -116
- package/dist/services/telemetry.js.map +1 -1
- package/dist/types/agent-server/core/events/conversation-state-event.d.ts +2 -19
- package/dist/types/agent-server/core/events/observation-event.d.ts +2 -18
- package/dist/types/automation.d.ts +7 -3
- package/dist/types/mcp-server.d.ts +5 -0
- package/dist/types/settings.d.ts +3 -0
- package/dist/utils/api-error-message.d.ts +6 -2
- package/dist/utils/automation-catalog.cjs +2 -0
- package/dist/utils/automation-catalog.cjs.map +1 -0
- package/dist/utils/automation-catalog.d.ts +28 -0
- package/dist/utils/automation-catalog.js +5 -0
- package/dist/utils/automation-catalog.js.map +1 -0
- package/dist/utils/automation-timeout.d.ts +3 -2
- package/dist/utils/mcp-config.cjs +1 -1
- package/dist/utils/mcp-config.cjs.map +1 -1
- package/dist/utils/mcp-config.d.ts +8 -0
- package/dist/utils/mcp-config.js +25 -20
- package/dist/utils/mcp-config.js.map +1 -1
- package/dist/utils/mcp-installed-servers.cjs +1 -1
- package/dist/utils/mcp-installed-servers.cjs.map +1 -1
- package/dist/utils/mcp-installed-servers.js +6 -3
- package/dist/utils/mcp-installed-servers.js.map +1 -1
- package/dist/utils/responder-deployment.d.ts +5 -1
- package/dist/utils/transcript-export/index.cjs +5 -5
- package/dist/utils/transcript-export/index.js +12 -12
- package/package.json +3 -3
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/check-translation-completeness.cjs +1 -0
- package/scripts/dev-safe.mjs +17 -12
- package/scripts/dev-static.mjs +17 -0
- package/scripts/dev-with-automation.mjs +12 -14
- package/scripts/ingress.mjs +22 -0
- package/scripts/proxy-utils.mjs +157 -2
- package/scripts/runtime-services-info.mjs +6 -6
- package/scripts/static-build.mjs +0 -7
- package/scripts/static-server.mjs +10 -0
- package/build/assets/active-backend-context-BlZPzZNU.js +0 -1
- package/build/assets/agent-context-settings-CTaN-Iw9.js +0 -1
- package/build/assets/agent-profiles-settings-CR4VTqv_.js +0 -1
- package/build/assets/agent-server-conversation-service.api-Btmi4q6d.js +0 -41
- package/build/assets/agent-settings-KQs-occT.js +0 -1
- package/build/assets/api-key-entry-screen-BhR24gkM.js +0 -1
- package/build/assets/app-settings-Bs4sY8WP.js +0 -1
- package/build/assets/automation-BGP_I1RR.js +0 -1
- package/build/assets/automation-detail-CwDnJbYR.js +0 -2
- package/build/assets/automation-export-Bu-r-EzL.js +0 -2
- package/build/assets/automations-list-CYw7_6FR.js +0 -1
- package/build/assets/backend-form-modal-Ce-KRHOJ.js +0 -1
- package/build/assets/browser-BUDJnBg4.js +0 -6
- package/build/assets/check-BMOG005H.js +0 -1
- package/build/assets/chevron-down-CV1zZP_K.js +0 -1
- package/build/assets/circle-check-lvN_jFN5.js +0 -1
- package/build/assets/client-source-1v-kWLNU.js +0 -1
- package/build/assets/cloud-funnel-analytics-CasMM7EO.js +0 -1
- package/build/assets/command-menu-N_BriUy8.js +0 -1
- package/build/assets/condenser-settings-Czi8cKxV.js +0 -1
- package/build/assets/conversation-C25pc2dT.js +0 -1
- package/build/assets/conversation-CObLYSJd.js +0 -90
- package/build/assets/conversation-panel-C25pc2dT.js +0 -1
- package/build/assets/conversation-state-store-DTq4hFoP.js +0 -1
- package/build/assets/extensions-hub-BKftOQ-X.js +0 -1
- package/build/assets/extensions-navigation-DF24q1H1.js +0 -1
- package/build/assets/files-tab-SAiFCnS5.js +0 -1
- package/build/assets/git-provider-icon-BREx-yUX.js +0 -1
- package/build/assets/home-EPNFgzUh.js +0 -1
- package/build/assets/home-sN90Xcxp.js +0 -1
- package/build/assets/index-home-EPNFgzUh.js +0 -1
- package/build/assets/install-server-modal-BI8yUfmr.js +0 -1
- package/build/assets/llm-not-configured-banner-DTWzISnk.js +0 -27
- package/build/assets/llm-settings-BXk5_Pac.js +0 -1
- package/build/assets/llm-settings-C1vpgWam.js +0 -1
- package/build/assets/loader-circle-6zlEYCJw.js +0 -1
- package/build/assets/manage-backends-modal-DhflyGTf.js +0 -1
- package/build/assets/manifest-8082e879.js +0 -1
- package/build/assets/mcp-CxLPda-W.js +0 -9
- package/build/assets/messages-DINDkPNK.js +0 -40
- package/build/assets/onboarding-modal-DdvE6rzw.js +0 -1
- package/build/assets/organization-service.api-CT2OQlLz.js +0 -1
- package/build/assets/plugins-management-service-DVkoM3eA.js +0 -1
- package/build/assets/plus-vIbGD459.js +0 -1
- package/build/assets/profiles-service.api-CBafmAPO.js +0 -1
- package/build/assets/providers-9UzRB9mT.js +0 -1
- package/build/assets/proxy-C79PCMjo.js +0 -1
- package/build/assets/recommended-automations-launcher-BF2mtAKw.js +0 -58
- package/build/assets/root-B5JXKp1P.css +0 -1
- package/build/assets/root-Sj7W28yE.js +0 -2
- package/build/assets/root-layout-DbhKVoc7.js +0 -3
- package/build/assets/schema-field-CV6bFnoL.js +0 -1
- package/build/assets/search-sKuYKllf.js +0 -1
- package/build/assets/secrets-service-BjK-bPN2.js +0 -1
- package/build/assets/segmented-toggle-DbbD3Tve.js +0 -1
- package/build/assets/settings-Bj5Oo45A.js +0 -1
- package/build/assets/settings-input-BjW_zyTN.js +0 -1
- package/build/assets/settings-service.api-DryhKdSr.js +0 -1
- package/build/assets/shared-conversation-CnMxy7p_.js +0 -1
- package/build/assets/telemetry-cmCL3o6Z.js +0 -2
- package/build/assets/use-activate-agent-profile-DH33MvVj.js +0 -1
- package/build/assets/use-agent-profiles-Dmd_4H8q.js +0 -1
- package/build/assets/use-cloud-current-user-id-B6DP3s47.js +0 -1
- package/build/assets/use-is-authed-BsS4XwSL.js +0 -1
- package/build/assets/use-llm-profiles-BMQoc612.js +0 -1
- package/build/assets/use-onboarding-completion-B-2BTS-y.js +0 -1
- package/build/assets/use-plugins-marketplace-PBc_XNz_.js +0 -1
- package/build/assets/use-save-agent-profile-2Mk9ZX37.js +0 -1
- package/build/assets/use-settings-DBI44RnH.js +0 -1
- package/build/assets/use-settings-nav-items-Cva28C-c.js +0 -16
- package/build/assets/use-skills-RQsCtdzN.js +0 -1
- package/build/assets/use-tracking-CN1nIMnY.js +0 -1
- package/build/assets/utils-qjs_KuS4.js +0 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation-EShpjxey.js +0 -1
- package/build/assets/vendor~root-layout~index-home~home~conversation-panel~conversation~shared-conversation-DD_UNO02.js +0 -1
- package/build/assets/vendor~root-layout~index-home~home~mcp~automations-list~onboarding-modal-Be63Q2Ln.js +0 -1
- package/build/assets/x-EjvKGawc.js +0 -1
- /package/build/assets/{vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~f1hl7voa-BrmgjeOw.js → vendor~entry.client~root~root-layout~index-home~home~conversation-panel~conversation~launch~emdr2jt4-BrmgjeOw.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pending-user-messages.js","names":[],"sources":["../../../../src/components/features/chat/pending-user-messages.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { useOptimisticUserMessageStore } from \"#/stores/optimistic-user-message-store\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { useSendMessage } from \"#/hooks/use-send-message\";\nimport { createChatMessage } from \"#/services/chat-service\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { matchesPendingConversationId } from \"#/utils/pending-task-message-link\";\nimport { ImageCarousel } from \"#/components/features/images/image-carousel\";\nimport { ChatMessage } from \"./chat-message\";\n\n/**\n * Renders the queue of locally-tracked user messages that have been submitted\n * but not yet echoed back through the WebSocket. Each message shows a faded\n * \"sending\" treatment until the server echoes a real `UserMessageEvent`\n * (which removes it via `consumeMatchingPendingMessage`). If the API rejects the\n * send, the message switches to an \"error\" state with a retry button.\n *\n * The queue is global but each entry is tagged with the conversation id it\n * was enqueued from; this component filters to only entries belonging to the\n * active conversation, so switching conversations never carries pending\n * bubbles over.\n */\nexport function PendingUserMessages() {\n const { t } = useTranslation(\"openhands\");\n const { conversationId } = useOptionalConversationId();\n const pendingMessages = useOptimisticUserMessageStore(\n (state) => state.pendingMessages,\n );\n const markPendingMessageError = useOptimisticUserMessageStore(\n (state) => state.markPendingMessageError,\n );\n const markPendingMessageSending = useOptimisticUserMessageStore(\n (state) => state.markPendingMessageSending,\n );\n const removePendingMessage = useOptimisticUserMessageStore(\n (state) => state.removePendingMessage,\n );\n const restoreMessageToInputIfEmpty = useConversationStore(\n (state) => state.restoreMessageToInputIfEmpty,\n );\n const { send } = useSendMessage();\n\n const visibleMessages = React.useMemo(\n () =>\n conversationId\n ? pendingMessages.filter((message) =>\n matchesPendingConversationId(\n conversationId,\n message.conversationId,\n ),\n )\n : [],\n [pendingMessages, conversationId],\n );\n\n const handleRetry = React.useCallback(\n async (id: string) => {\n const message = useOptimisticUserMessageStore\n .getState()\n .pendingMessages.find((entry) => entry.id === id);\n if (!message) return;\n\n markPendingMessageSending(id);\n\n try {\n await send(\n createChatMessage(\n message.text,\n message.imageUrls,\n message.fileUrls,\n message.timestamp,\n ),\n );\n } catch (error) {\n const errorMessage =\n error instanceof Error\n ? error.message\n : t(I18nKey.CHAT_INTERFACE$FAILED_TO_SEND_MESSAGE);\n markPendingMessageError(id, errorMessage);\n }\n },\n [send, markPendingMessageError, markPendingMessageSending, t],\n );\n\n const handleStop = React.useCallback(\n (id: string, text: string) => {\n restoreMessageToInputIfEmpty(text);\n removePendingMessage(id);\n },\n [restoreMessageToInputIfEmpty, removePendingMessage],\n );\n\n if (visibleMessages.length === 0) {\n return null;\n }\n\n return (\n <>\n {visibleMessages.map((message) => (\n <ChatMessage\n key={message.id}\n type=\"user\"\n message={message.text}\n pendingStatus={message.status}\n onRetry={\n message.status === \"error\"\n ? () => handleRetry(message.id)\n : undefined\n }\n onStop={\n message.status === \"sending\"\n ? () => handleStop(message.id, message.text)\n : undefined\n }\n >\n {message.imageUrls.length > 0 && (\n <ImageCarousel size=\"small\" images={message.imageUrls} />\n )}\n </ChatMessage>\n ))}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAwBA,SAAgB,IAAsB;CACpC,IAAM,EAAE,SAAM,EAAe,WAAW,GAClC,EAAE,sBAAmB,EAA0B,GAC/C,IAAkB,GACrB,MAAU,EAAM,eACnB,GACM,IAA0B,GAC7B,MAAU,EAAM,uBACnB,GACM,IAA4B,GAC/B,MAAU,EAAM,yBACnB,GACM,IAAuB,GAC1B,MAAU,EAAM,oBACnB,GACM,IAA+B,GAClC,MAAU,EAAM,4BACnB,GACM,EAAE,YAAS,EAAe,GAE1B,IAAkB,EAAM,cAE1B,IACI,EAAgB,QAAQ,MACtB,EACE,GACA,EAAQ,cACV,CACF,IACA,CAAC,GACP,CAAC,GAAiB,CAAc,CAClC,GAEM,IAAc,EAAM,YACxB,OAAO,MAAe;EACpB,IAAM,IAAU,EACb,SAAS,EACT,gBAAgB,MAAM,MAAU,EAAM,OAAO,CAAE;EAC7C,OAEL;KAA0B,CAAE;GAE5B,IAAI;IACF,MAAM,EACJ,EACE,EAAQ,MACR,EAAQ,WACR,EAAQ,UACR,EAAQ,SACV,CACF;GACF,SAAS,GAAO;IAKd,EAAwB,GAHtB,aAAiB,QACb,EAAM,UACN,EAAE,EAAQ,qCAAqC,CACb;GAC1C;EAjB4B;CAkB9B,GACA;EAAC;EAAM;EAAyB;EAA2B;CAAC,CAC9D,GAEM,IAAa,EAAM,aACtB,GAAY,MAAiB;EAE5B,AADA,EAA6B,CAAI,GACjC,EAAqB,CAAE;CACzB,GACA,CAAC,GAA8B,CAAoB,CACrD;CAMA,OAJI,EAAgB,WAAW,IACtB,OAIP,kBAAA,GAAA,EAAA,UACG,EAAgB,KAAK,MACpB,kBAAC,GAAD;EAEE,MAAK;EACL,SAAS,EAAQ;EACjB,eAAe,EAAQ;EACvB,SACE,EAAQ,WAAW,gBACT,EAAY,EAAQ,EAAE,IAC5B,KAAA;EAEN,QACE,EAAQ,WAAW,kBACT,EAAW,EAAQ,IAAI,EAAQ,IAAI,IACzC,KAAA;YAGL,EAAQ,UAAU,SAAS,KAC1B,kBAAC,GAAD;GAAe,MAAK;GAAQ,QAAQ,EAAQ;EAAY,CAAA;CAE/C,
|
|
1
|
+
{"version":3,"file":"pending-user-messages.js","names":[],"sources":["../../../../src/components/features/chat/pending-user-messages.tsx"],"sourcesContent":["import React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { useOptimisticUserMessageStore } from \"#/stores/optimistic-user-message-store\";\nimport { useConversationStore } from \"#/stores/conversation-store\";\nimport { useSendMessage } from \"#/hooks/use-send-message\";\nimport { createChatMessage } from \"#/services/chat-service\";\nimport { useOptionalConversationId } from \"#/hooks/use-conversation-id\";\nimport { matchesPendingConversationId } from \"#/utils/pending-task-message-link\";\nimport { ImageCarousel } from \"#/components/features/images/image-carousel\";\nimport { ChatMessage } from \"./chat-message\";\n\n/**\n * Renders the queue of locally-tracked user messages that have been submitted\n * but not yet echoed back through the WebSocket. Each message shows a faded\n * \"sending\" treatment until the server echoes a real `UserMessageEvent`\n * (which removes it via `consumeMatchingPendingMessage`). If the API rejects the\n * send, the message switches to an \"error\" state with a retry button.\n *\n * The queue is global but each entry is tagged with the conversation id it\n * was enqueued from; this component filters to only entries belonging to the\n * active conversation, so switching conversations never carries pending\n * bubbles over.\n */\nexport function PendingUserMessages() {\n const { t } = useTranslation(\"openhands\");\n const { conversationId } = useOptionalConversationId();\n const pendingMessages = useOptimisticUserMessageStore(\n (state) => state.pendingMessages,\n );\n const markPendingMessageError = useOptimisticUserMessageStore(\n (state) => state.markPendingMessageError,\n );\n const markPendingMessageSending = useOptimisticUserMessageStore(\n (state) => state.markPendingMessageSending,\n );\n const removePendingMessage = useOptimisticUserMessageStore(\n (state) => state.removePendingMessage,\n );\n const restoreMessageToInputIfEmpty = useConversationStore(\n (state) => state.restoreMessageToInputIfEmpty,\n );\n const { send } = useSendMessage();\n\n const visibleMessages = React.useMemo(\n () =>\n conversationId\n ? pendingMessages.filter((message) =>\n matchesPendingConversationId(\n conversationId,\n message.conversationId,\n ),\n )\n : [],\n [pendingMessages, conversationId],\n );\n\n const handleRetry = React.useCallback(\n async (id: string) => {\n const message = useOptimisticUserMessageStore\n .getState()\n .pendingMessages.find((entry) => entry.id === id);\n if (!message) return;\n\n markPendingMessageSending(id);\n\n try {\n await send(\n createChatMessage(\n message.text,\n message.imageUrls,\n message.fileUrls,\n message.timestamp,\n ),\n );\n } catch (error) {\n const errorMessage =\n error instanceof Error\n ? error.message\n : t(I18nKey.CHAT_INTERFACE$FAILED_TO_SEND_MESSAGE);\n markPendingMessageError(id, errorMessage);\n }\n },\n [send, markPendingMessageError, markPendingMessageSending, t],\n );\n\n const handleStop = React.useCallback(\n (id: string, text: string) => {\n restoreMessageToInputIfEmpty(text);\n removePendingMessage(id);\n },\n [restoreMessageToInputIfEmpty, removePendingMessage],\n );\n\n const handleDismiss = React.useCallback(\n (id: string) => {\n removePendingMessage(id);\n },\n [removePendingMessage],\n );\n\n if (visibleMessages.length === 0) {\n return null;\n }\n\n return (\n <>\n {visibleMessages.map((message) => (\n <ChatMessage\n key={message.id}\n type=\"user\"\n message={message.text}\n pendingStatus={message.status}\n onRetry={\n message.status === \"error\"\n ? () => handleRetry(message.id)\n : undefined\n }\n onDismiss={\n message.status === \"error\"\n ? () => handleDismiss(message.id)\n : undefined\n }\n onStop={\n message.status === \"sending\"\n ? () => handleStop(message.id, message.text)\n : undefined\n }\n >\n {message.imageUrls.length > 0 && (\n <ImageCarousel size=\"small\" images={message.imageUrls} />\n )}\n </ChatMessage>\n ))}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAwBA,SAAgB,IAAsB;CACpC,IAAM,EAAE,SAAM,EAAe,WAAW,GAClC,EAAE,sBAAmB,EAA0B,GAC/C,IAAkB,GACrB,MAAU,EAAM,eACnB,GACM,IAA0B,GAC7B,MAAU,EAAM,uBACnB,GACM,IAA4B,GAC/B,MAAU,EAAM,yBACnB,GACM,IAAuB,GAC1B,MAAU,EAAM,oBACnB,GACM,IAA+B,GAClC,MAAU,EAAM,4BACnB,GACM,EAAE,YAAS,EAAe,GAE1B,IAAkB,EAAM,cAE1B,IACI,EAAgB,QAAQ,MACtB,EACE,GACA,EAAQ,cACV,CACF,IACA,CAAC,GACP,CAAC,GAAiB,CAAc,CAClC,GAEM,IAAc,EAAM,YACxB,OAAO,MAAe;EACpB,IAAM,IAAU,EACb,SAAS,EACT,gBAAgB,MAAM,MAAU,EAAM,OAAO,CAAE;EAC7C,OAEL;KAA0B,CAAE;GAE5B,IAAI;IACF,MAAM,EACJ,EACE,EAAQ,MACR,EAAQ,WACR,EAAQ,UACR,EAAQ,SACV,CACF;GACF,SAAS,GAAO;IAKd,EAAwB,GAHtB,aAAiB,QACb,EAAM,UACN,EAAE,EAAQ,qCAAqC,CACb;GAC1C;EAjB4B;CAkB9B,GACA;EAAC;EAAM;EAAyB;EAA2B;CAAC,CAC9D,GAEM,IAAa,EAAM,aACtB,GAAY,MAAiB;EAE5B,AADA,EAA6B,CAAI,GACjC,EAAqB,CAAE;CACzB,GACA,CAAC,GAA8B,CAAoB,CACrD,GAEM,IAAgB,EAAM,aACzB,MAAe;EACd,EAAqB,CAAE;CACzB,GACA,CAAC,CAAoB,CACvB;CAMA,OAJI,EAAgB,WAAW,IACtB,OAIP,kBAAA,GAAA,EAAA,UACG,EAAgB,KAAK,MACpB,kBAAC,GAAD;EAEE,MAAK;EACL,SAAS,EAAQ;EACjB,eAAe,EAAQ;EACvB,SACE,EAAQ,WAAW,gBACT,EAAY,EAAQ,EAAE,IAC5B,KAAA;EAEN,WACE,EAAQ,WAAW,gBACT,EAAc,EAAQ,EAAE,IAC9B,KAAA;EAEN,QACE,EAAQ,WAAW,kBACT,EAAW,EAAQ,IAAI,EAAQ,IAAI,IACzC,KAAA;YAGL,EAAQ,UAAU,SAAS,KAC1B,kBAAC,GAAD;GAAe,MAAK;GAAQ,QAAQ,EAAQ;EAAY,CAAA;CAE/C,GAvBN,EAAQ,EAuBF,CACd,EACD,CAAA;AAEN"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
1
|
+
require("../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../node_modules/react-i18next/dist/es/Trans.cjs"),t=require("../../../types/agent-server/type-guards.cjs"),n=require("../../conversation-events/chat/event-content-helpers/get-acp-tool-call-content.cjs"),r=require("../../conversation-events/chat/event-content-helpers/get-action-event-title.cjs"),i=require("./mono-component.cjs"),a=require("./path-component.cjs");let o=require("react/jsx-runtime");var s={kind:`translation`,key:`ACTION_MESSAGE$THINK`,values:{}},c=new Set([`ExecuteBashAction`,`TerminalAction`,`FileEditorAction`,`StrReplaceEditorAction`,`MCPToolAction`,`InvokeSkillAction`,`TaskAction`,`ThinkAction`,`TaskTrackerAction`,`GrepAction`,`GlobAction`,`BrowserNavigateAction`,`BrowserClickAction`,`BrowserTypeAction`,`BrowserGetStateAction`,`BrowserGetContentAction`,`BrowserScrollAction`,`BrowserGoBackAction`,`BrowserListTabsAction`,`BrowserSwitchTabAction`,`BrowserCloseTabAction`]),l=e=>{if(!t.isActionEvent(e))return null;let n=r.getActionSummaryTitle(e);return n?{kind:`text`,text:n}:c.has(e.action.kind)?r.getActionEventTitleDescriptor(e):null},u=e=>e.source===`environment`&&`rejection_reason`in e,d=e=>{let r=new Set,i=new Set;for(let a=e.length-1;a>=0;--a){let o=e[a];if(!o.isFromPlanningAgent){if(t.isObservationEvent(o)||u(o)){r.add(o.action_id),i.add(o.tool_call_id);continue}if(t.isAgentErrorEvent(o)){i.add(o.tool_call_id);continue}if(t.isACPToolCallEvent(o)){if(!(o.status===`pending`||o.status===`in_progress`)){i.add(o.tool_call_id);continue}if(i.has(o.tool_call_id))continue;let e=n.stripRedundantTitlePrefix(o);return e?{kind:`translation`,key:n.getACPToolCallTitleKey(o),values:{title:e}}:s}if(t.isActionEvent(o)&&!r.has(o.id)&&!i.has(o.tool_call_id))return l(o)??s}}return s};function f({events:t}){let n=d(t);return(0,o.jsxs)(`div`,{className:`flex min-w-0 max-w-full items-center gap-2 rounded-full border border-[var(--oh-border)] bg-[var(--oh-surface)] px-3 py-1.5 text-xs text-[var(--oh-text-secondary)]`,"data-testid":`live-activity-chip`,role:`status`,"aria-live":`polite`,children:[(0,o.jsx)(`span`,{"aria-hidden":`true`,className:`size-1.5 shrink-0 animate-pulse rounded-full bg-[var(--oh-status-success)] motion-reduce:animate-none`}),(0,o.jsx)(`span`,{className:`min-w-0 truncate`,children:n.kind===`text`?n.text:(0,o.jsx)(e.Trans,{ns:`openhands`,i18nKey:n.key,values:n.values,components:{path:(0,o.jsx)(a.PathComponent,{}),cmd:(0,o.jsx)(i.MonoComponent,{})}})})]})}exports.TypingIndicator=f;
|
|
2
2
|
//# sourceMappingURL=typing-indicator.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typing-indicator.cjs","names":[],"sources":["../../../../src/components/features/chat/typing-indicator.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"typing-indicator.cjs","names":[],"sources":["../../../../src/components/features/chat/typing-indicator.tsx"],"sourcesContent":["import { Trans } from \"react-i18next\";\nimport type { OHEvent } from \"#/stores/use-event-store\";\nimport type { UserRejectObservation } from \"#/types/agent-server/core\";\nimport {\n isACPToolCallEvent,\n isActionEvent,\n isAgentErrorEvent,\n isObservationEvent,\n} from \"#/types/agent-server/type-guards\";\nimport {\n getACPToolCallTitleKey,\n stripRedundantTitlePrefix,\n} from \"#/components/conversation-events/chat/event-content-helpers/get-acp-tool-call-content\";\nimport {\n getActionEventTitleDescriptor,\n getActionSummaryTitle,\n type EventTitleDescriptor,\n} from \"#/components/conversation-events/chat/event-content-helpers/get-action-event-title\";\nimport { MonoComponent } from \"./mono-component\";\nimport { PathComponent } from \"./path-component\";\n\nconst THINKING_ACTIVITY: EventTitleDescriptor = {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$THINK\",\n values: {},\n};\n\nconst LIVE_ACTION_KINDS = new Set([\n \"ExecuteBashAction\",\n \"TerminalAction\",\n \"FileEditorAction\",\n \"StrReplaceEditorAction\",\n \"MCPToolAction\",\n \"InvokeSkillAction\",\n \"TaskAction\",\n \"ThinkAction\",\n \"TaskTrackerAction\",\n \"GrepAction\",\n \"GlobAction\",\n \"BrowserNavigateAction\",\n \"BrowserClickAction\",\n \"BrowserTypeAction\",\n \"BrowserGetStateAction\",\n \"BrowserGetContentAction\",\n \"BrowserScrollAction\",\n \"BrowserGoBackAction\",\n \"BrowserListTabsAction\",\n \"BrowserSwitchTabAction\",\n \"BrowserCloseTabAction\",\n]);\n\nconst getLiveActionTitle = (event: OHEvent): EventTitleDescriptor | null => {\n if (!isActionEvent(event)) return null;\n\n const summary = getActionSummaryTitle(event);\n if (summary) {\n return { kind: \"text\", text: summary };\n }\n\n return LIVE_ACTION_KINDS.has(event.action.kind)\n ? getActionEventTitleDescriptor(event)\n : null;\n};\n\nconst isUserRejectObservation = (\n event: OHEvent,\n): event is UserRejectObservation =>\n event.source === \"environment\" && \"rejection_reason\" in event;\n\nexport const deriveLiveActivity = (\n events: readonly OHEvent[],\n): EventTitleDescriptor => {\n const resolvedActionIds = new Set<string>();\n const resolvedToolCallIds = new Set<string>();\n\n for (let index = events.length - 1; index >= 0; index -= 1) {\n const event = events[index];\n if (event.isFromPlanningAgent) {\n continue;\n }\n\n if (isObservationEvent(event) || isUserRejectObservation(event)) {\n resolvedActionIds.add(event.action_id);\n resolvedToolCallIds.add(event.tool_call_id);\n continue;\n }\n\n if (isAgentErrorEvent(event)) {\n resolvedToolCallIds.add(event.tool_call_id);\n continue;\n }\n\n if (isACPToolCallEvent(event)) {\n const isInProgress =\n event.status === \"pending\" || event.status === \"in_progress\";\n if (!isInProgress) {\n resolvedToolCallIds.add(event.tool_call_id);\n continue;\n }\n if (resolvedToolCallIds.has(event.tool_call_id)) {\n continue;\n }\n\n const title = stripRedundantTitlePrefix(event);\n return title\n ? {\n kind: \"translation\",\n key: getACPToolCallTitleKey(event),\n values: { title },\n }\n : THINKING_ACTIVITY;\n }\n\n if (\n isActionEvent(event) &&\n !resolvedActionIds.has(event.id) &&\n !resolvedToolCallIds.has(event.tool_call_id)\n ) {\n return getLiveActionTitle(event) ?? THINKING_ACTIVITY;\n }\n }\n\n return THINKING_ACTIVITY;\n};\n\ninterface TypingIndicatorProps {\n readonly events: readonly OHEvent[];\n}\n\nexport function TypingIndicator({ events }: TypingIndicatorProps) {\n const activity = deriveLiveActivity(events);\n\n return (\n <div\n className=\"flex min-w-0 max-w-full items-center gap-2 rounded-full border border-[var(--oh-border)] bg-[var(--oh-surface)] px-3 py-1.5 text-xs text-[var(--oh-text-secondary)]\"\n data-testid=\"live-activity-chip\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <span\n aria-hidden=\"true\"\n className=\"size-1.5 shrink-0 animate-pulse rounded-full bg-[var(--oh-status-success)] motion-reduce:animate-none\"\n />\n <span className=\"min-w-0 truncate\">\n {activity.kind === \"text\" ? (\n activity.text\n ) : (\n <Trans\n ns=\"openhands\"\n i18nKey={activity.key}\n values={activity.values}\n components={{\n path: <PathComponent />,\n cmd: <MonoComponent />,\n }}\n />\n )}\n </span>\n </div>\n );\n}\n"],"mappings":"ydAqBA,IAAM,EAA0C,CAC9C,KAAM,cACN,IAAK,uBACL,OAAQ,CAAC,CACX,EAEM,EAAoB,IAAI,IAAI,CAChC,oBACA,iBACA,mBACA,yBACA,gBACA,oBACA,aACA,cACA,oBACA,aACA,aACA,wBACA,qBACA,oBACA,wBACA,0BACA,sBACA,sBACA,wBACA,yBACA,uBACF,CAAC,EAEK,EAAsB,GAAgD,CAC1E,GAAI,CAAC,EAAA,cAAc,CAAK,EAAG,OAAO,KAElC,IAAM,EAAU,EAAA,sBAAsB,CAAK,EAK3C,OAJI,EACK,CAAE,KAAM,OAAQ,KAAM,CAAQ,EAGhC,EAAkB,IAAI,EAAM,OAAO,IAAI,EAC1C,EAAA,8BAA8B,CAAK,EACnC,IACN,EAEM,EACJ,GAEA,EAAM,SAAW,eAAiB,qBAAsB,EAE7C,EACX,GACyB,CACzB,IAAM,EAAoB,IAAI,IACxB,EAAsB,IAAI,IAEhC,IAAK,IAAI,EAAQ,EAAO,OAAS,EAAG,GAAS,EAAG,IAAY,CAC1D,IAAM,EAAQ,EAAO,GACjB,MAAM,oBAIV,IAAI,EAAA,mBAAmB,CAAK,GAAK,EAAwB,CAAK,EAAG,CAC/D,EAAkB,IAAI,EAAM,SAAS,EACrC,EAAoB,IAAI,EAAM,YAAY,EAC1C,QACF,CAEA,GAAI,EAAA,kBAAkB,CAAK,EAAG,CAC5B,EAAoB,IAAI,EAAM,YAAY,EAC1C,QACF,CAEA,GAAI,EAAA,mBAAmB,CAAK,EAAG,CAG7B,GAAI,EADF,EAAM,SAAW,WAAa,EAAM,SAAW,eAC9B,CACjB,EAAoB,IAAI,EAAM,YAAY,EAC1C,QACF,CACA,GAAI,EAAoB,IAAI,EAAM,YAAY,EAC5C,SAGF,IAAM,EAAQ,EAAA,0BAA0B,CAAK,EAC7C,OAAO,EACH,CACE,KAAM,cACN,IAAK,EAAA,uBAAuB,CAAK,EACjC,OAAQ,CAAE,OAAM,CAClB,EACA,CACN,CAEA,GACE,EAAA,cAAc,CAAK,GACnB,CAAC,EAAkB,IAAI,EAAM,EAAE,GAC/B,CAAC,EAAoB,IAAI,EAAM,YAAY,EAE3C,OAAO,EAAmB,CAAK,GAAK,CAjCtC,CAmCF,CAEA,OAAO,CACT,EAMA,SAAgB,EAAgB,CAAE,UAAgC,CAChE,IAAM,EAAW,EAAmB,CAAM,EAE1C,OACE,EAAA,EAAA,MAAC,MAAD,CACE,UAAU,sKACV,cAAY,qBACZ,KAAK,SACL,YAAU,kBAJZ,EAME,EAAA,EAAA,KAAC,OAAD,CACE,cAAY,OACZ,UAAU,uGACX,CAAA,GACD,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,4BACb,EAAS,OAAS,OACjB,EAAS,MAET,EAAA,EAAA,KAAC,EAAA,MAAD,CACE,GAAG,YACH,QAAS,EAAS,IAClB,OAAQ,EAAS,OACjB,WAAY,CACV,MAAM,EAAA,EAAA,KAAC,EAAA,cAAD,CAAgB,CAAA,EACtB,KAAK,EAAA,EAAA,KAAC,EAAA,cAAD,CAAgB,CAAA,CACvB,CACD,CAAA,CAEC,CAAA,CACH,GAET"}
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import type { OHEvent } from "#/stores/use-event-store";
|
|
2
|
+
import { type EventTitleDescriptor } from "#/components/conversation-events/chat/event-content-helpers/get-action-event-title";
|
|
3
|
+
export declare const deriveLiveActivity: (events: readonly OHEvent[]) => EventTitleDescriptor;
|
|
4
|
+
interface TypingIndicatorProps {
|
|
5
|
+
readonly events: readonly OHEvent[];
|
|
6
|
+
}
|
|
7
|
+
export declare function TypingIndicator({ events }: TypingIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,16 +1,100 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Trans as e } from "../../../node_modules/react-i18next/dist/es/Trans.js";
|
|
2
|
+
import { isACPToolCallEvent as t, isActionEvent as n, isAgentErrorEvent as r, isObservationEvent as i } from "../../../types/agent-server/type-guards.js";
|
|
3
|
+
import { getACPToolCallTitleKey as a, stripRedundantTitlePrefix as o } from "../../conversation-events/chat/event-content-helpers/get-acp-tool-call-content.js";
|
|
4
|
+
import { getActionEventTitleDescriptor as s, getActionSummaryTitle as c } from "../../conversation-events/chat/event-content-helpers/get-action-event-title.js";
|
|
5
|
+
import { MonoComponent as l } from "./mono-component.js";
|
|
6
|
+
import { PathComponent as u } from "./path-component.js";
|
|
7
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
2
8
|
//#region src/components/features/chat/typing-indicator.tsx
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
var p = {
|
|
10
|
+
kind: "translation",
|
|
11
|
+
key: "ACTION_MESSAGE$THINK",
|
|
12
|
+
values: {}
|
|
13
|
+
}, m = new Set([
|
|
14
|
+
"ExecuteBashAction",
|
|
15
|
+
"TerminalAction",
|
|
16
|
+
"FileEditorAction",
|
|
17
|
+
"StrReplaceEditorAction",
|
|
18
|
+
"MCPToolAction",
|
|
19
|
+
"InvokeSkillAction",
|
|
20
|
+
"TaskAction",
|
|
21
|
+
"ThinkAction",
|
|
22
|
+
"TaskTrackerAction",
|
|
23
|
+
"GrepAction",
|
|
24
|
+
"GlobAction",
|
|
25
|
+
"BrowserNavigateAction",
|
|
26
|
+
"BrowserClickAction",
|
|
27
|
+
"BrowserTypeAction",
|
|
28
|
+
"BrowserGetStateAction",
|
|
29
|
+
"BrowserGetContentAction",
|
|
30
|
+
"BrowserScrollAction",
|
|
31
|
+
"BrowserGoBackAction",
|
|
32
|
+
"BrowserListTabsAction",
|
|
33
|
+
"BrowserSwitchTabAction",
|
|
34
|
+
"BrowserCloseTabAction"
|
|
35
|
+
]), h = (e) => {
|
|
36
|
+
if (!n(e)) return null;
|
|
37
|
+
let t = c(e);
|
|
38
|
+
return t ? {
|
|
39
|
+
kind: "text",
|
|
40
|
+
text: t
|
|
41
|
+
} : m.has(e.action.kind) ? s(e) : null;
|
|
42
|
+
}, g = (e) => e.source === "environment" && "rejection_reason" in e, _ = (e) => {
|
|
43
|
+
let s = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set();
|
|
44
|
+
for (let l = e.length - 1; l >= 0; --l) {
|
|
45
|
+
let u = e[l];
|
|
46
|
+
if (!u.isFromPlanningAgent) {
|
|
47
|
+
if (i(u) || g(u)) {
|
|
48
|
+
s.add(u.action_id), c.add(u.tool_call_id);
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
if (r(u)) {
|
|
52
|
+
c.add(u.tool_call_id);
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
if (t(u)) {
|
|
56
|
+
if (!(u.status === "pending" || u.status === "in_progress")) {
|
|
57
|
+
c.add(u.tool_call_id);
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (c.has(u.tool_call_id)) continue;
|
|
61
|
+
let e = o(u);
|
|
62
|
+
return e ? {
|
|
63
|
+
kind: "translation",
|
|
64
|
+
key: a(u),
|
|
65
|
+
values: { title: e }
|
|
66
|
+
} : p;
|
|
67
|
+
}
|
|
68
|
+
if (n(u) && !s.has(u.id) && !c.has(u.tool_call_id)) return h(u) ?? p;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return p;
|
|
72
|
+
};
|
|
73
|
+
function v({ events: t }) {
|
|
74
|
+
let n = _(t);
|
|
75
|
+
return /* @__PURE__ */ f("div", {
|
|
76
|
+
className: "flex min-w-0 max-w-full items-center gap-2 rounded-full border border-[var(--oh-border)] bg-[var(--oh-surface)] px-3 py-1.5 text-xs text-[var(--oh-text-secondary)]",
|
|
77
|
+
"data-testid": "live-activity-chip",
|
|
78
|
+
role: "status",
|
|
79
|
+
"aria-live": "polite",
|
|
80
|
+
children: [/* @__PURE__ */ d("span", {
|
|
81
|
+
"aria-hidden": "true",
|
|
82
|
+
className: "size-1.5 shrink-0 animate-pulse rounded-full bg-[var(--oh-status-success)] motion-reduce:animate-none"
|
|
83
|
+
}), /* @__PURE__ */ d("span", {
|
|
84
|
+
className: "min-w-0 truncate",
|
|
85
|
+
children: n.kind === "text" ? n.text : /* @__PURE__ */ d(e, {
|
|
86
|
+
ns: "openhands",
|
|
87
|
+
i18nKey: n.key,
|
|
88
|
+
values: n.values,
|
|
89
|
+
components: {
|
|
90
|
+
path: /* @__PURE__ */ d(u, {}),
|
|
91
|
+
cmd: /* @__PURE__ */ d(l, {})
|
|
92
|
+
}
|
|
93
|
+
})
|
|
94
|
+
})]
|
|
11
95
|
});
|
|
12
96
|
}
|
|
13
97
|
//#endregion
|
|
14
|
-
export {
|
|
98
|
+
export { v as TypingIndicator };
|
|
15
99
|
|
|
16
100
|
//# sourceMappingURL=typing-indicator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typing-indicator.js","names":[],"sources":["../../../../src/components/features/chat/typing-indicator.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"typing-indicator.js","names":[],"sources":["../../../../src/components/features/chat/typing-indicator.tsx"],"sourcesContent":["import { Trans } from \"react-i18next\";\nimport type { OHEvent } from \"#/stores/use-event-store\";\nimport type { UserRejectObservation } from \"#/types/agent-server/core\";\nimport {\n isACPToolCallEvent,\n isActionEvent,\n isAgentErrorEvent,\n isObservationEvent,\n} from \"#/types/agent-server/type-guards\";\nimport {\n getACPToolCallTitleKey,\n stripRedundantTitlePrefix,\n} from \"#/components/conversation-events/chat/event-content-helpers/get-acp-tool-call-content\";\nimport {\n getActionEventTitleDescriptor,\n getActionSummaryTitle,\n type EventTitleDescriptor,\n} from \"#/components/conversation-events/chat/event-content-helpers/get-action-event-title\";\nimport { MonoComponent } from \"./mono-component\";\nimport { PathComponent } from \"./path-component\";\n\nconst THINKING_ACTIVITY: EventTitleDescriptor = {\n kind: \"translation\",\n key: \"ACTION_MESSAGE$THINK\",\n values: {},\n};\n\nconst LIVE_ACTION_KINDS = new Set([\n \"ExecuteBashAction\",\n \"TerminalAction\",\n \"FileEditorAction\",\n \"StrReplaceEditorAction\",\n \"MCPToolAction\",\n \"InvokeSkillAction\",\n \"TaskAction\",\n \"ThinkAction\",\n \"TaskTrackerAction\",\n \"GrepAction\",\n \"GlobAction\",\n \"BrowserNavigateAction\",\n \"BrowserClickAction\",\n \"BrowserTypeAction\",\n \"BrowserGetStateAction\",\n \"BrowserGetContentAction\",\n \"BrowserScrollAction\",\n \"BrowserGoBackAction\",\n \"BrowserListTabsAction\",\n \"BrowserSwitchTabAction\",\n \"BrowserCloseTabAction\",\n]);\n\nconst getLiveActionTitle = (event: OHEvent): EventTitleDescriptor | null => {\n if (!isActionEvent(event)) return null;\n\n const summary = getActionSummaryTitle(event);\n if (summary) {\n return { kind: \"text\", text: summary };\n }\n\n return LIVE_ACTION_KINDS.has(event.action.kind)\n ? getActionEventTitleDescriptor(event)\n : null;\n};\n\nconst isUserRejectObservation = (\n event: OHEvent,\n): event is UserRejectObservation =>\n event.source === \"environment\" && \"rejection_reason\" in event;\n\nexport const deriveLiveActivity = (\n events: readonly OHEvent[],\n): EventTitleDescriptor => {\n const resolvedActionIds = new Set<string>();\n const resolvedToolCallIds = new Set<string>();\n\n for (let index = events.length - 1; index >= 0; index -= 1) {\n const event = events[index];\n if (event.isFromPlanningAgent) {\n continue;\n }\n\n if (isObservationEvent(event) || isUserRejectObservation(event)) {\n resolvedActionIds.add(event.action_id);\n resolvedToolCallIds.add(event.tool_call_id);\n continue;\n }\n\n if (isAgentErrorEvent(event)) {\n resolvedToolCallIds.add(event.tool_call_id);\n continue;\n }\n\n if (isACPToolCallEvent(event)) {\n const isInProgress =\n event.status === \"pending\" || event.status === \"in_progress\";\n if (!isInProgress) {\n resolvedToolCallIds.add(event.tool_call_id);\n continue;\n }\n if (resolvedToolCallIds.has(event.tool_call_id)) {\n continue;\n }\n\n const title = stripRedundantTitlePrefix(event);\n return title\n ? {\n kind: \"translation\",\n key: getACPToolCallTitleKey(event),\n values: { title },\n }\n : THINKING_ACTIVITY;\n }\n\n if (\n isActionEvent(event) &&\n !resolvedActionIds.has(event.id) &&\n !resolvedToolCallIds.has(event.tool_call_id)\n ) {\n return getLiveActionTitle(event) ?? THINKING_ACTIVITY;\n }\n }\n\n return THINKING_ACTIVITY;\n};\n\ninterface TypingIndicatorProps {\n readonly events: readonly OHEvent[];\n}\n\nexport function TypingIndicator({ events }: TypingIndicatorProps) {\n const activity = deriveLiveActivity(events);\n\n return (\n <div\n className=\"flex min-w-0 max-w-full items-center gap-2 rounded-full border border-[var(--oh-border)] bg-[var(--oh-surface)] px-3 py-1.5 text-xs text-[var(--oh-text-secondary)]\"\n data-testid=\"live-activity-chip\"\n role=\"status\"\n aria-live=\"polite\"\n >\n <span\n aria-hidden=\"true\"\n className=\"size-1.5 shrink-0 animate-pulse rounded-full bg-[var(--oh-status-success)] motion-reduce:animate-none\"\n />\n <span className=\"min-w-0 truncate\">\n {activity.kind === \"text\" ? (\n activity.text\n ) : (\n <Trans\n ns=\"openhands\"\n i18nKey={activity.key}\n values={activity.values}\n components={{\n path: <PathComponent />,\n cmd: <MonoComponent />,\n }}\n />\n )}\n </span>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAqBA,IAAM,IAA0C;CAC9C,MAAM;CACN,KAAK;CACL,QAAQ,CAAC;AACX,GAEM,IAAoB,IAAI,IAAI;CAChC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC,GAEK,KAAsB,MAAgD;CAC1E,IAAI,CAAC,EAAc,CAAK,GAAG,OAAO;CAElC,IAAM,IAAU,EAAsB,CAAK;CAK3C,OAJI,IACK;EAAE,MAAM;EAAQ,MAAM;CAAQ,IAGhC,EAAkB,IAAI,EAAM,OAAO,IAAI,IAC1C,EAA8B,CAAK,IACnC;AACN,GAEM,KACJ,MAEA,EAAM,WAAW,iBAAiB,sBAAsB,GAE7C,KACX,MACyB;CACzB,IAAM,oBAAoB,IAAI,IAAY,GACpC,oBAAsB,IAAI,IAAY;CAE5C,KAAK,IAAI,IAAQ,EAAO,SAAS,GAAG,KAAS,GAAG,KAAY;EAC1D,IAAM,IAAQ,EAAO;EACjB,OAAM,qBAIV;OAAI,EAAmB,CAAK,KAAK,EAAwB,CAAK,GAAG;IAE/D,AADA,EAAkB,IAAI,EAAM,SAAS,GACrC,EAAoB,IAAI,EAAM,YAAY;IAC1C;GACF;GAEA,IAAI,EAAkB,CAAK,GAAG;IAC5B,EAAoB,IAAI,EAAM,YAAY;IAC1C;GACF;GAEA,IAAI,EAAmB,CAAK,GAAG;IAG7B,IAAI,EADF,EAAM,WAAW,aAAa,EAAM,WAAW,gBAC9B;KACjB,EAAoB,IAAI,EAAM,YAAY;KAC1C;IACF;IACA,IAAI,EAAoB,IAAI,EAAM,YAAY,GAC5C;IAGF,IAAM,IAAQ,EAA0B,CAAK;IAC7C,OAAO,IACH;KACE,MAAM;KACN,KAAK,EAAuB,CAAK;KACjC,QAAQ,EAAE,SAAM;IAClB,IACA;GACN;GAEA,IACE,EAAc,CAAK,KACnB,CAAC,EAAkB,IAAI,EAAM,EAAE,KAC/B,CAAC,EAAoB,IAAI,EAAM,YAAY,GAE3C,OAAO,EAAmB,CAAK,KAAK;EAjCtC;CAmCF;CAEA,OAAO;AACT;AAMA,SAAgB,EAAgB,EAAE,aAAgC;CAChE,IAAM,IAAW,EAAmB,CAAM;CAE1C,OACE,kBAAC,OAAD;EACE,WAAU;EACV,eAAY;EACZ,MAAK;EACL,aAAU;YAJZ,CAME,kBAAC,QAAD;GACE,eAAY;GACZ,WAAU;EACX,CAAA,GACD,kBAAC,QAAD;GAAM,WAAU;aACb,EAAS,SAAS,SACjB,EAAS,OAET,kBAAC,GAAD;IACE,IAAG;IACH,SAAS,EAAS;IAClB,QAAQ,EAAS;IACjB,YAAY;KACV,MAAM,kBAAC,GAAD,CAAgB,CAAA;KACtB,KAAK,kBAAC,GAAD,CAAgB,CAAA;IACvB;GACD,CAAA;EAEC,CAAA,CACH;;AAET"}
|
|
@@ -3,7 +3,7 @@ import { I18nKey } from "#/i18n/declaration";
|
|
|
3
3
|
export declare const COMMAND_MENU_ROUTE: {
|
|
4
4
|
readonly conversations: "/conversations";
|
|
5
5
|
readonly customize: "/customize";
|
|
6
|
-
readonly automations:
|
|
6
|
+
readonly automations: string;
|
|
7
7
|
readonly mcp: "/mcp";
|
|
8
8
|
readonly settings: "/settings";
|
|
9
9
|
readonly agentSettings: "/settings/agents";
|
|
@@ -21,6 +21,10 @@ export interface CommandMenuItemDefinition {
|
|
|
21
21
|
titleKey: I18nKey;
|
|
22
22
|
descriptionKey: I18nKey;
|
|
23
23
|
keywordsKey: I18nKey;
|
|
24
|
+
/** Literal copy overriding the i18n key, when a manifest owns it. */
|
|
25
|
+
title?: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
keywords?: string;
|
|
24
28
|
icon: React.ReactElement;
|
|
25
29
|
to?: string;
|
|
26
30
|
perform?: () => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../utils/utils.cjs");let t=require("react/jsx-runtime");function n({value:n,options:r,onChange:i,ariaLabel:a,testId:o}){return(0,t.jsx)(`div`,{role:`radiogroup`,"aria-label":a,"data-testid":o,className:`inline-flex items-center rounded-md bg-[var(--oh-surface-raised)] p-0.5 text-xs`,children:r.map(r=>{let a=r.value===n;return(0,t.
|
|
1
|
+
require("../../../_virtual/_rolldown/runtime.cjs");const e=require("../../../utils/utils.cjs");let t=require("react/jsx-runtime");function n({value:n,options:r,onChange:i,ariaLabel:a,testId:o}){return(0,t.jsx)(`div`,{role:`radiogroup`,"aria-label":a,"data-testid":o,className:`inline-flex items-center rounded-md bg-[var(--oh-surface-raised)] p-0.5 text-xs`,children:r.map(r=>{let a=r.value===n;return(0,t.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":a,"data-testid":o?`${o}-option-${r.value}`:void 0,onClick:()=>i(r.value),className:e.cn(`inline-flex items-center gap-1.5 px-2.5 py-1 rounded cursor-pointer transition-colors`,a?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-muted)] hover:text-white`),children:[r.icon?(0,t.jsx)(`span`,{className:`inline-flex size-3.5 shrink-0 items-center justify-center [&_svg]:size-3.5`,children:r.icon}):null,r.label]},r.value)})})}exports.SegmentedToggle=n;
|
|
2
2
|
//# sourceMappingURL=segmented-toggle.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmented-toggle.cjs","names":[],"sources":["../../../../src/components/features/files-tab/segmented-toggle.tsx"],"sourcesContent":["import { cn } from \"#/utils/utils\";\n\ninterface SegmentedToggleOption<T extends string> {\n value: T;\n label: string;\n}\n\ninterface SegmentedToggleProps<T extends string> {\n value: T;\n options: SegmentedToggleOption<T>[];\n onChange: (value: T) => void;\n ariaLabel: string;\n testId?: string;\n}\n\n/**\n * Lightweight 2-state segmented control used for the files-tab toggles\n * (\"Diff view\" on/off, \"Rich\"/\"Plain\"). Kept local because the existing\n * shared switch components are heavier than what we need here.\n */\nexport function SegmentedToggle<T extends string>({\n value,\n options,\n onChange,\n ariaLabel,\n testId,\n}: SegmentedToggleProps<T>) {\n return (\n <div\n role=\"radiogroup\"\n aria-label={ariaLabel}\n data-testid={testId}\n className=\"inline-flex items-center rounded-md bg-[var(--oh-surface-raised)] p-0.5 text-xs\"\n >\n {options.map((option) => {\n const isActive = option.value === value;\n return (\n <button\n key={option.value}\n type=\"button\"\n role=\"radio\"\n aria-checked={isActive}\n data-testid={\n testId ? `${testId}-option-${option.value}` : undefined\n }\n onClick={() => onChange(option.value)}\n className={cn(\n \"px-2 py-
|
|
1
|
+
{"version":3,"file":"segmented-toggle.cjs","names":[],"sources":["../../../../src/components/features/files-tab/segmented-toggle.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cn } from \"#/utils/utils\";\n\ninterface SegmentedToggleOption<T extends string> {\n value: T;\n label: string;\n icon?: ReactNode;\n}\n\ninterface SegmentedToggleProps<T extends string> {\n value: T;\n options: SegmentedToggleOption<T>[];\n onChange: (value: T) => void;\n ariaLabel: string;\n testId?: string;\n}\n\n/**\n * Lightweight 2-state segmented control used for the files-tab toggles\n * (\"Diff view\" on/off, \"Rich\"/\"Plain\"). Kept local because the existing\n * shared switch components are heavier than what we need here.\n */\nexport function SegmentedToggle<T extends string>({\n value,\n options,\n onChange,\n ariaLabel,\n testId,\n}: SegmentedToggleProps<T>) {\n return (\n <div\n role=\"radiogroup\"\n aria-label={ariaLabel}\n data-testid={testId}\n className=\"inline-flex items-center rounded-md bg-[var(--oh-surface-raised)] p-0.5 text-xs\"\n >\n {options.map((option) => {\n const isActive = option.value === value;\n return (\n <button\n key={option.value}\n type=\"button\"\n role=\"radio\"\n aria-checked={isActive}\n data-testid={\n testId ? `${testId}-option-${option.value}` : undefined\n }\n onClick={() => onChange(option.value)}\n className={cn(\n \"inline-flex items-center gap-1.5 px-2.5 py-1 rounded cursor-pointer transition-colors\",\n isActive\n ? \"bg-[var(--oh-interactive-hover)] text-white\"\n : \"text-[var(--oh-muted)] hover:text-white\",\n )}\n >\n {option.icon ? (\n <span className=\"inline-flex size-3.5 shrink-0 items-center justify-center [&_svg]:size-3.5\">\n {option.icon}\n </span>\n ) : null}\n {option.label}\n </button>\n );\n })}\n </div>\n );\n}\n"],"mappings":"kIAsBA,SAAgB,EAAkC,CAChD,QACA,UACA,WACA,YACA,UAC0B,CAC1B,OACE,EAAA,EAAA,KAAC,MAAD,CACE,KAAK,aACL,aAAY,EACZ,cAAa,EACb,UAAU,2FAET,EAAQ,IAAK,GAAW,CACvB,IAAM,EAAW,EAAO,QAAU,EAClC,OACE,EAAA,EAAA,MAAC,SAAD,CAEE,KAAK,SACL,KAAK,QACL,eAAc,EACd,cACE,EAAS,GAAG,EAAO,UAAU,EAAO,QAAU,IAAA,GAEhD,YAAe,EAAS,EAAO,KAAK,EACpC,UAAW,EAAA,GACT,wFACA,EACI,8CACA,yCACN,WAdF,CAgBG,EAAO,MACN,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,sFACb,EAAO,IACJ,CAAA,EACJ,KACH,EAAO,KACF,GArBD,EAAO,KAqBN,CAEZ,CAAC,CACE,CAAA,CAET"}
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
import { cn as e } from "../../../utils/utils.js";
|
|
2
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/features/files-tab/segmented-toggle.tsx
|
|
4
|
-
function
|
|
4
|
+
function r({ value: r, options: i, onChange: a, ariaLabel: o, testId: s }) {
|
|
5
5
|
return /* @__PURE__ */ t("div", {
|
|
6
6
|
role: "radiogroup",
|
|
7
|
-
"aria-label":
|
|
8
|
-
"data-testid":
|
|
7
|
+
"aria-label": o,
|
|
8
|
+
"data-testid": s,
|
|
9
9
|
className: "inline-flex items-center rounded-md bg-[var(--oh-surface-raised)] p-0.5 text-xs",
|
|
10
|
-
children:
|
|
11
|
-
let
|
|
12
|
-
return /* @__PURE__ */
|
|
10
|
+
children: i.map((i) => {
|
|
11
|
+
let o = i.value === r;
|
|
12
|
+
return /* @__PURE__ */ n("button", {
|
|
13
13
|
type: "button",
|
|
14
14
|
role: "radio",
|
|
15
|
-
"aria-checked":
|
|
16
|
-
"data-testid":
|
|
17
|
-
onClick: () => i
|
|
18
|
-
className: e("px-2 py-
|
|
19
|
-
children:
|
|
20
|
-
|
|
15
|
+
"aria-checked": o,
|
|
16
|
+
"data-testid": s ? `${s}-option-${i.value}` : void 0,
|
|
17
|
+
onClick: () => a(i.value),
|
|
18
|
+
className: e("inline-flex items-center gap-1.5 px-2.5 py-1 rounded cursor-pointer transition-colors", o ? "bg-[var(--oh-interactive-hover)] text-white" : "text-[var(--oh-muted)] hover:text-white"),
|
|
19
|
+
children: [i.icon ? /* @__PURE__ */ t("span", {
|
|
20
|
+
className: "inline-flex size-3.5 shrink-0 items-center justify-center [&_svg]:size-3.5",
|
|
21
|
+
children: i.icon
|
|
22
|
+
}) : null, i.label]
|
|
23
|
+
}, i.value);
|
|
21
24
|
})
|
|
22
25
|
});
|
|
23
26
|
}
|
|
24
27
|
//#endregion
|
|
25
|
-
export {
|
|
28
|
+
export { r as SegmentedToggle };
|
|
26
29
|
|
|
27
30
|
//# sourceMappingURL=segmented-toggle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmented-toggle.js","names":[],"sources":["../../../../src/components/features/files-tab/segmented-toggle.tsx"],"sourcesContent":["import { cn } from \"#/utils/utils\";\n\ninterface SegmentedToggleOption<T extends string> {\n value: T;\n label: string;\n}\n\ninterface SegmentedToggleProps<T extends string> {\n value: T;\n options: SegmentedToggleOption<T>[];\n onChange: (value: T) => void;\n ariaLabel: string;\n testId?: string;\n}\n\n/**\n * Lightweight 2-state segmented control used for the files-tab toggles\n * (\"Diff view\" on/off, \"Rich\"/\"Plain\"). Kept local because the existing\n * shared switch components are heavier than what we need here.\n */\nexport function SegmentedToggle<T extends string>({\n value,\n options,\n onChange,\n ariaLabel,\n testId,\n}: SegmentedToggleProps<T>) {\n return (\n <div\n role=\"radiogroup\"\n aria-label={ariaLabel}\n data-testid={testId}\n className=\"inline-flex items-center rounded-md bg-[var(--oh-surface-raised)] p-0.5 text-xs\"\n >\n {options.map((option) => {\n const isActive = option.value === value;\n return (\n <button\n key={option.value}\n type=\"button\"\n role=\"radio\"\n aria-checked={isActive}\n data-testid={\n testId ? `${testId}-option-${option.value}` : undefined\n }\n onClick={() => onChange(option.value)}\n className={cn(\n \"px-2 py-
|
|
1
|
+
{"version":3,"file":"segmented-toggle.js","names":[],"sources":["../../../../src/components/features/files-tab/segmented-toggle.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cn } from \"#/utils/utils\";\n\ninterface SegmentedToggleOption<T extends string> {\n value: T;\n label: string;\n icon?: ReactNode;\n}\n\ninterface SegmentedToggleProps<T extends string> {\n value: T;\n options: SegmentedToggleOption<T>[];\n onChange: (value: T) => void;\n ariaLabel: string;\n testId?: string;\n}\n\n/**\n * Lightweight 2-state segmented control used for the files-tab toggles\n * (\"Diff view\" on/off, \"Rich\"/\"Plain\"). Kept local because the existing\n * shared switch components are heavier than what we need here.\n */\nexport function SegmentedToggle<T extends string>({\n value,\n options,\n onChange,\n ariaLabel,\n testId,\n}: SegmentedToggleProps<T>) {\n return (\n <div\n role=\"radiogroup\"\n aria-label={ariaLabel}\n data-testid={testId}\n className=\"inline-flex items-center rounded-md bg-[var(--oh-surface-raised)] p-0.5 text-xs\"\n >\n {options.map((option) => {\n const isActive = option.value === value;\n return (\n <button\n key={option.value}\n type=\"button\"\n role=\"radio\"\n aria-checked={isActive}\n data-testid={\n testId ? `${testId}-option-${option.value}` : undefined\n }\n onClick={() => onChange(option.value)}\n className={cn(\n \"inline-flex items-center gap-1.5 px-2.5 py-1 rounded cursor-pointer transition-colors\",\n isActive\n ? \"bg-[var(--oh-interactive-hover)] text-white\"\n : \"text-[var(--oh-muted)] hover:text-white\",\n )}\n >\n {option.icon ? (\n <span className=\"inline-flex size-3.5 shrink-0 items-center justify-center [&_svg]:size-3.5\">\n {option.icon}\n </span>\n ) : null}\n {option.label}\n </button>\n );\n })}\n </div>\n );\n}\n"],"mappings":";;;AAsBA,SAAgB,EAAkC,EAChD,UACA,YACA,aACA,cACA,aAC0B;CAC1B,OACE,kBAAC,OAAD;EACE,MAAK;EACL,cAAY;EACZ,eAAa;EACb,WAAU;YAET,EAAQ,KAAK,MAAW;GACvB,IAAM,IAAW,EAAO,UAAU;GAClC,OACE,kBAAC,UAAD;IAEE,MAAK;IACL,MAAK;IACL,gBAAc;IACd,eACE,IAAS,GAAG,EAAO,UAAU,EAAO,UAAU,KAAA;IAEhD,eAAe,EAAS,EAAO,KAAK;IACpC,WAAW,EACT,yFACA,IACI,gDACA,yCACN;cAdF,CAgBG,EAAO,OACN,kBAAC,QAAD;KAAM,WAAU;eACb,EAAO;IACJ,CAAA,IACJ,MACH,EAAO,KACF;MArBD,EAAO,KAqBN;EAEZ,CAAC;CACE,CAAA;AAET"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { GitRepository } from "#/types/git";
|
|
2
|
+
import type { SetupFieldOption, SetupFormField as SetupFormFieldDefinition } from "#/manifests/types";
|
|
3
|
+
export interface SetupFormFieldProps {
|
|
4
|
+
/** The record key the field is declared under, and what `{{form.x}}` reads. */
|
|
5
|
+
name: string;
|
|
6
|
+
field: SetupFormFieldDefinition;
|
|
7
|
+
value: string;
|
|
8
|
+
/** Already-resolved copy: local checks and service errors look the same here. */
|
|
9
|
+
error?: string;
|
|
10
|
+
/** Declared options, or the ones the deployment supplied. */
|
|
11
|
+
options: SetupFieldOption[];
|
|
12
|
+
/** The picked repository, kept so the picker can show what is selected. */
|
|
13
|
+
repository: GitRepository | null;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
onChange: (value: string) => void;
|
|
16
|
+
onRepositoryChange: (repository: GitRepository | null) => void;
|
|
17
|
+
onBlur: () => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Render one manifest-declared field.
|
|
21
|
+
*
|
|
22
|
+
* The host knows how to render a field *type*; what any field means is the
|
|
23
|
+
* manifest's business. Every field's own copy comes from the manifest and is
|
|
24
|
+
* never translated by the host; the only host string is the format hint the
|
|
25
|
+
* repository fallback below needs, because no manifest declares it.
|
|
26
|
+
*/
|
|
27
|
+
export declare function SetupFormField({ name, field, value, error, options, repository, disabled, onChange, onRepositoryChange, onBlur, }: SetupFormFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SetupPrerequisitesResult } from "#/hooks/query/use-manifest-prerequisites";
|
|
2
|
+
export interface SetupPrerequisitesStepProps {
|
|
3
|
+
prerequisites: SetupPrerequisitesResult;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Stage 3 — what has to be connected before the form is worth filling in.
|
|
7
|
+
*
|
|
8
|
+
* Each integration is listed with the reason the manifest gives for needing it,
|
|
9
|
+
* so the user is told why rather than just what.
|
|
10
|
+
*/
|
|
11
|
+
export declare function SetupPrerequisitesStep({ prerequisites, }: SetupPrerequisitesStepProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SetupBlock, SetupFormValues } from "#/manifests/types";
|
|
2
|
+
export interface SetupReviewStepProps {
|
|
3
|
+
setup: SetupBlock;
|
|
4
|
+
values: SetupFormValues;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Stage 7 — the plain-language summary the user confirms.
|
|
8
|
+
*
|
|
9
|
+
* The last cheap moment to catch a wrong answer, and the last point at which
|
|
10
|
+
* nothing has been created yet. A manifest declares no summary of its own: one
|
|
11
|
+
* row per declared field, labelled the way the field was labelled, says the
|
|
12
|
+
* same thing without asking every entry to restate it.
|
|
13
|
+
*/
|
|
14
|
+
export declare function SetupReviewStep({ setup, values }: SetupReviewStepProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SetupEntry } from "#/manifests/types";
|
|
2
|
+
export interface SetupDialogProps {
|
|
3
|
+
entry: SetupEntry;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The setup host: capabilities check, prerequisites, form, review, and the
|
|
8
|
+
* action the manifest's mode selects, rendered as a dialog.
|
|
9
|
+
*
|
|
10
|
+
* The host runs the stages and owns everything the same for every entry; the
|
|
11
|
+
* manifest supplies only what varies. Any string the user reads here is either
|
|
12
|
+
* manifest-authored or host chrome.
|
|
13
|
+
*/
|
|
14
|
+
export declare function SetupDialog({ entry, onClose }: SetupDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -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("
|
|
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("../../../hooks/mutation/use-update-mcp-server.cjs"),d=require("../../../api/mcp-service/mcp-service.api.cjs"),f=require("../../../api/mcp-health/probe-mcp-server-health.cjs"),p=require("../../../utils/mcp-test-error-message.cjs"),m=require("../../../hooks/mutation/use-add-mcp-server.cjs"),h=require("../../../hooks/mutation/use-test-mcp-server.cjs"),g=require("../../shared/modals/confirmation-modal.cjs"),_=require("../settings/mcp-settings/mcp-server-form.cjs"),v=require("../../../hooks/mutation/use-delete-mcp-server.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}=m.useAddMcpServer(),{mutate:E,isPending:D}=u.useUpdateMcpServer(),{mutate:O,isPending:k}=v.useDeleteMcpServer(),{mutate:A,isPending:j,data:M,reset:N}=h.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:p.makeMcpTestErrorMessage(C,e.error_kind,e.error)}:null},[I,M,C]),K=(t,n)=>{V||f.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)(_.MCPServerForm,{mode:H?`edit`:`add`,server:H?e:void 0,existingServers:x,onSubmit:t=>{if(N(),L(null),t.auth?.strategy===`oauth2`){z(!0),d.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),d.default.authorizeOAuth(e).then(L).catch(q).finally(()=>z(!1));return}A(e)},isTestPending:j||R,testMessage:V?null:G})]})}),P?(0,b.jsx)(g.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
|
|
@@ -7,34 +7,34 @@ import { useActiveBackend as o } from "../../../contexts/active-backend-context.
|
|
|
7
7
|
import { ModalBackdrop as s } from "../../shared/modals/modal-backdrop.js";
|
|
8
8
|
import { modalTitleLgClassName as c } from "../../../utils/modal-classes.js";
|
|
9
9
|
import { ModalCloseButton as l } from "../../shared/modals/modal-close-button.js";
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import f from "../../../api/mcp-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
10
|
+
import { useUpdateMcpServer as u } from "../../../hooks/mutation/use-update-mcp-server.js";
|
|
11
|
+
import d from "../../../api/mcp-service/mcp-service.api.js";
|
|
12
|
+
import { seedMcpServerHealth as f } from "../../../api/mcp-health/probe-mcp-server-health.js";
|
|
13
|
+
import { makeMcpTestErrorMessage as p } from "../../../utils/mcp-test-error-message.js";
|
|
14
|
+
import { useAddMcpServer as m } from "../../../hooks/mutation/use-add-mcp-server.js";
|
|
15
|
+
import { useTestMcpServer as h } from "../../../hooks/mutation/use-test-mcp-server.js";
|
|
16
|
+
import { ConfirmationModal as g } from "../../shared/modals/confirmation-modal.js";
|
|
17
|
+
import { MCPServerForm as _ } from "../settings/mcp-settings/mcp-server-form.js";
|
|
18
|
+
import { useDeleteMcpServer as v } from "../../../hooks/mutation/use-delete-mcp-server.js";
|
|
19
19
|
import y from "react";
|
|
20
20
|
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
21
21
|
//#region src/components/features/mcp-page/custom-server-editor.tsx
|
|
22
22
|
function C({ server: C, existingServers: w, onClose: T }) {
|
|
23
|
-
let { t: E } = e("openhands"), { mutate: D, isPending: O } =
|
|
23
|
+
let { t: E } = e("openhands"), { mutate: D, isPending: O } = m(), { mutate: k, isPending: A } = u(), { mutate: j, isPending: M } = v(), { mutate: N, isPending: P, data: F, reset: I } = h(), [L, R] = y.useState(!1), [z, B] = y.useState(null), [V, H] = y.useState(!1), { backend: U } = o(), W = U.kind === "cloud", G = !!C.id, K = O || A || M, q = K || P || V || L, J = y.useMemo(() => {
|
|
24
24
|
let e = z ?? F;
|
|
25
25
|
return e ? e.ok ? {
|
|
26
26
|
ok: !0,
|
|
27
27
|
text: E(t.MCP$TEST_SUCCESS, { count: e.tools.length })
|
|
28
28
|
} : {
|
|
29
29
|
ok: !1,
|
|
30
|
-
text:
|
|
30
|
+
text: p(E, e.error_kind, e.error)
|
|
31
31
|
} : null;
|
|
32
32
|
}, [
|
|
33
33
|
z,
|
|
34
34
|
F,
|
|
35
35
|
E
|
|
36
36
|
]), Y = (e, t) => {
|
|
37
|
-
W ||
|
|
37
|
+
W || f(e, t, G ? w.filter((e) => e.id !== C.id) : w);
|
|
38
38
|
}, X = (e) => {
|
|
39
39
|
i(r(e) || E(t.ERROR$GENERIC));
|
|
40
40
|
};
|
|
@@ -55,13 +55,13 @@ function C({ server: C, existingServers: w, onClose: T }) {
|
|
|
55
55
|
className: n("mb-4 pr-6", c),
|
|
56
56
|
children: E(G ? t.MCP$EDIT_CUSTOM_TITLE : t.MCP$ADD_CUSTOM_TITLE)
|
|
57
57
|
}),
|
|
58
|
-
/* @__PURE__ */ x(
|
|
58
|
+
/* @__PURE__ */ x(_, {
|
|
59
59
|
mode: G ? "edit" : "add",
|
|
60
60
|
server: G ? C : void 0,
|
|
61
61
|
existingServers: w,
|
|
62
62
|
onSubmit: (e) => {
|
|
63
63
|
if (I(), B(null), e.auth?.strategy === "oauth2") {
|
|
64
|
-
H(!0),
|
|
64
|
+
H(!0), d.authorizeOAuth(e).then((t) => {
|
|
65
65
|
if (B(t), !t.ok) return;
|
|
66
66
|
let n = t.oauth_state ? {
|
|
67
67
|
...e,
|
|
@@ -116,7 +116,7 @@ function C({ server: C, existingServers: w, onClose: T }) {
|
|
|
116
116
|
isActionDisabled: K,
|
|
117
117
|
onTest: W ? void 0 : (e) => {
|
|
118
118
|
if (B(null), e.auth?.strategy === "oauth2" && !W) {
|
|
119
|
-
H(!0),
|
|
119
|
+
H(!0), d.authorizeOAuth(e).then(B).catch(X).finally(() => H(!1));
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
122
|
N(e);
|
|
@@ -126,7 +126,7 @@ function C({ server: C, existingServers: w, onClose: T }) {
|
|
|
126
126
|
})
|
|
127
127
|
]
|
|
128
128
|
})
|
|
129
|
-
}), L ? /* @__PURE__ */ x(
|
|
129
|
+
}), L ? /* @__PURE__ */ x(g, {
|
|
130
130
|
text: E(t.SETTINGS$MCP_CONFIRM_DELETE),
|
|
131
131
|
onCancel: () => R(!1),
|
|
132
132
|
onConfirm: () => {
|
|
@@ -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("../../../node_modules/lucide-react/dist/esm/icons/puzzle.cjs"),i=require("../../../utils/utils.cjs"),a=require("../../../utils/extension-module-card-classes.cjs"),o=require("../../../utils/mcp-marketplace-utils.cjs"),s=require("../../../node_modules/@openhands/extensions/integrations/index.cjs"),c=require("../mcp-logo-badge.cjs"),l=require("../../shared/buttons/circle-plus-check-toggle.cjs"),u=require("../../../utils/mcp-installed-server-display.cjs"),d=require("./mcp-server-health.cjs");let f=require("react");f=e.__toESM(f,1);let p=require("react/jsx-runtime");function m(e){switch(e){case`sse`:return`SSE`;case`shttp`:return`HTTP`;case`stdio`:return`STDIO`;default:return e}}function h(e){if(e.type===`stdio`){let t=e.args&&e.args.length>0?` ${e.args.join(` `)}`:``;return`${e.command??``}${t}`.trim()}return e.url??``}function g({server:e,onEdit:f,
|
|
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("../../../node_modules/lucide-react/dist/esm/icons/puzzle.cjs"),i=require("../../../utils/utils.cjs"),a=require("../../../utils/extension-module-card-classes.cjs"),o=require("../../../utils/mcp-marketplace-utils.cjs"),s=require("../../../node_modules/@openhands/extensions/integrations/index.cjs"),c=require("../mcp-logo-badge.cjs"),l=require("../../shared/buttons/circle-plus-check-toggle.cjs"),u=require("../../../utils/mcp-installed-server-display.cjs"),d=require("./mcp-server-health.cjs");let f=require("react");f=e.__toESM(f,1);let p=require("react/jsx-runtime");function m(e){switch(e){case`sse`:return`SSE`;case`shttp`:return`HTTP`;case`stdio`:return`STDIO`;default:return e}}function h(e){if(e.type===`stdio`){let t=e.args&&e.args.length>0?` ${e.args.join(` `)}`:``;return`${e.command??``}${t}`.trim()}return e.url??``}function g({server:e,onEdit:f,onToggleEnabled:g}){let{t:_}=t.useTranslation(`openhands`),v=o.findCatalogEntryForServer(e,o.getMcpMarketplaceCatalog(s.default)),y=u.getInstalledServerTitle(e,v),b=h(e),x=m(e.type);return(0,p.jsx)(`div`,{"data-testid":`mcp-server-item`,"data-server-id":e.id,role:`button`,tabIndex:0,onClick:f,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),f())},"aria-label":_(n.I18nKey.MCP$EDIT_SERVER_ARIA,{name:y}),className:i.cn(`flex min-h-[132px] flex-col overflow-hidden p-4 text-left`,a.extensionModuleCardSurfaceClassName,a.extensionModuleCardInteractiveClassName),children:(0,p.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,p.jsx)(c.McpLogoBadge,{entry:v,fallback:(0,p.jsx)(r.Puzzle,{strokeWidth:2.25})}),(0,p.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,p.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,p.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,p.jsx)(`h3`,{className:`truncate text-sm font-semibold`,title:y,children:y}),(0,p.jsx)(`p`,{className:`mt-0.5 text-xs text-tertiary-alt`,children:x})]}),(0,p.jsx)(l.CirclePlusCheckToggle,{testId:`mcp-installed-toggle-${e.id}`,isSelected:e.enabled!==!1,onToggle:g,enableLabelKey:n.I18nKey.MCP$TOGGLE_ENABLE_SERVER,disableLabelKey:n.I18nKey.MCP$TOGGLE_DISABLE_SERVER,disableTooltipKey:n.I18nKey.COMMON$DISABLE})]}),v?.description?(0,p.jsx)(`p`,{"data-testid":`mcp-server-description-${e.id}`,className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:v.description}):null,b?(0,p.jsx)(`p`,{"data-testid":`mcp-server-detail-${e.id}`,className:`truncate text-xs text-tertiary-alt`,title:b,children:b}):null,(0,p.jsx)(d.McpServerHealthSection,{server:e,catalog:v,onEdit:f})]})]})})}exports.InstalledServerCard=g;
|
|
2
2
|
//# sourceMappingURL=installed-server-card.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installed-server-card.cjs","names":[],"sources":["../../../../src/components/features/mcp-page/installed-server-card.tsx"],"sourcesContent":["import React from \"react\";\nimport { Puzzle } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { McpLogoBadge } from \"#/components/features/mcp-logo-badge\";\nimport { CirclePlusCheckToggle } from \"#/components/shared/buttons/circle-plus-check-toggle\";\nimport { MCPServerConfig } from \"#/types/mcp-server\";\nimport { INTEGRATION_CATALOG as MCP_MARKETPLACE } from \"@openhands/extensions/integrations\";\nimport {\n findCatalogEntryForServer,\n getMcpMarketplaceCatalog,\n} from \"#/utils/mcp-marketplace-utils\";\nimport { cn } from \"#/utils/utils\";\nimport {\n extensionModuleCardInteractiveClassName,\n extensionModuleCardSurfaceClassName,\n} from \"#/utils/extension-module-card-classes\";\nimport { getInstalledServerTitle } from \"#/utils/mcp-installed-server-display\";\nimport { McpServerHealthSection } from \"./mcp-server-health\";\n\ninterface InstalledServerCardProps {\n server: MCPServerConfig;\n onEdit: () => void;\n
|
|
1
|
+
{"version":3,"file":"installed-server-card.cjs","names":[],"sources":["../../../../src/components/features/mcp-page/installed-server-card.tsx"],"sourcesContent":["import React from \"react\";\nimport { Puzzle } from \"lucide-react\";\nimport { useTranslation } from \"react-i18next\";\nimport { I18nKey } from \"#/i18n/declaration\";\nimport { McpLogoBadge } from \"#/components/features/mcp-logo-badge\";\nimport { CirclePlusCheckToggle } from \"#/components/shared/buttons/circle-plus-check-toggle\";\nimport { MCPServerConfig } from \"#/types/mcp-server\";\nimport { INTEGRATION_CATALOG as MCP_MARKETPLACE } from \"@openhands/extensions/integrations\";\nimport {\n findCatalogEntryForServer,\n getMcpMarketplaceCatalog,\n} from \"#/utils/mcp-marketplace-utils\";\nimport { cn } from \"#/utils/utils\";\nimport {\n extensionModuleCardInteractiveClassName,\n extensionModuleCardSurfaceClassName,\n} from \"#/utils/extension-module-card-classes\";\nimport { getInstalledServerTitle } from \"#/utils/mcp-installed-server-display\";\nimport { McpServerHealthSection } from \"./mcp-server-health\";\n\ninterface InstalledServerCardProps {\n server: MCPServerConfig;\n onEdit: () => void;\n onToggleEnabled: (enabled: boolean) => void;\n}\n\nfunction getServerTransportLabel(type: MCPServerConfig[\"type\"]) {\n switch (type) {\n case \"sse\":\n return \"SSE\";\n case \"shttp\":\n return \"HTTP\";\n case \"stdio\":\n return \"STDIO\";\n default:\n return type;\n }\n}\n\nfunction getServerDetailLine(server: MCPServerConfig): string {\n if (server.type === \"stdio\") {\n const args =\n server.args && server.args.length > 0 ? ` ${server.args.join(\" \")}` : \"\";\n return `${server.command ?? \"\"}${args}`.trim();\n }\n return server.url ?? \"\";\n}\n\nexport function InstalledServerCard({\n server,\n onEdit,\n onToggleEnabled,\n}: InstalledServerCardProps) {\n const { t } = useTranslation(\"openhands\");\n const catalog = findCatalogEntryForServer(\n server,\n getMcpMarketplaceCatalog(MCP_MARKETPLACE),\n );\n\n const title = getInstalledServerTitle(server, catalog);\n const detailLine = getServerDetailLine(server);\n const transport = getServerTransportLabel(server.type);\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n onEdit();\n }\n };\n\n return (\n <div\n data-testid=\"mcp-server-item\"\n data-server-id={server.id}\n role=\"button\"\n tabIndex={0}\n onClick={onEdit}\n onKeyDown={handleKeyDown}\n aria-label={t(I18nKey.MCP$EDIT_SERVER_ARIA, { name: title })}\n className={cn(\n \"flex min-h-[132px] flex-col overflow-hidden p-4 text-left\",\n extensionModuleCardSurfaceClassName,\n extensionModuleCardInteractiveClassName,\n )}\n >\n <div className=\"flex items-start gap-3\">\n <McpLogoBadge\n entry={catalog}\n fallback={<Puzzle strokeWidth={2.25} />}\n />\n\n <div className=\"flex min-w-0 flex-1 flex-col gap-3\">\n <header className=\"flex items-start justify-between gap-3\">\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"truncate text-sm font-semibold\" title={title}>\n {title}\n </h3>\n <p className=\"mt-0.5 text-xs text-tertiary-alt\">{transport}</p>\n </div>\n {/* Enable/disable, not remove: a disabled server keeps its full\n configuration (secrets included) and is simply withheld from\n the agent. Removing lives in the editor, reached by clicking\n the card. */}\n <CirclePlusCheckToggle\n testId={`mcp-installed-toggle-${server.id}`}\n isSelected={server.enabled !== false}\n onToggle={onToggleEnabled}\n enableLabelKey={I18nKey.MCP$TOGGLE_ENABLE_SERVER}\n disableLabelKey={I18nKey.MCP$TOGGLE_DISABLE_SERVER}\n disableTooltipKey={I18nKey.COMMON$DISABLE}\n />\n </header>\n\n {catalog?.description ? (\n <p\n data-testid={`mcp-server-description-${server.id}`}\n className=\"line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light\"\n >\n {catalog.description}\n </p>\n ) : null}\n\n {detailLine ? (\n <p\n data-testid={`mcp-server-detail-${server.id}`}\n className=\"truncate text-xs text-tertiary-alt\"\n title={detailLine}\n >\n {detailLine}\n </p>\n ) : null}\n\n <McpServerHealthSection\n server={server}\n catalog={catalog}\n onEdit={onEdit}\n />\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":"qvBA0BA,SAAS,EAAwB,EAA+B,CAC9D,OAAQ,EAAR,CACE,IAAK,MACH,MAAO,MACT,IAAK,QACH,MAAO,OACT,IAAK,QACH,MAAO,QACT,QACE,OAAO,CACX,CACF,CAEA,SAAS,EAAoB,EAAiC,CAC5D,GAAI,EAAO,OAAS,QAAS,CAC3B,IAAM,EACJ,EAAO,MAAQ,EAAO,KAAK,OAAS,EAAI,IAAI,EAAO,KAAK,KAAK,GAAG,IAAM,GACxE,MAAO,GAAG,EAAO,SAAW,KAAK,IAAO,KAAK,CAC/C,CACA,OAAO,EAAO,KAAO,EACvB,CAEA,SAAgB,EAAoB,CAClC,SACA,SACA,mBAC2B,CAC3B,GAAM,CAAE,KAAM,EAAA,eAAe,WAAW,EAClC,EAAU,EAAA,0BACd,EACA,EAAA,yBAAyB,EAAA,OAAe,CAC1C,EAEM,EAAQ,EAAA,wBAAwB,EAAQ,CAAO,EAC/C,EAAa,EAAoB,CAAM,EACvC,EAAY,EAAwB,EAAO,IAAI,EASrD,OACE,EAAA,EAAA,KAAC,MAAD,CACE,cAAY,kBACZ,iBAAgB,EAAO,GACvB,KAAK,SACL,SAAU,EACV,QAAS,EACT,UAdmB,GAA+B,EAChD,EAAM,MAAQ,SAAW,EAAM,MAAQ,OACzC,EAAM,eAAe,EACrB,EAAO,EAEX,EAUI,aAAY,EAAE,EAAA,QAAQ,qBAAsB,CAAE,KAAM,CAAM,CAAC,EAC3D,UAAW,EAAA,GACT,4DACA,EAAA,oCACA,EAAA,uCACF,YAEA,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,kCAAf,EACE,EAAA,EAAA,KAAC,EAAA,aAAD,CACE,MAAO,EACP,UAAU,EAAA,EAAA,KAAC,EAAA,OAAD,CAAQ,YAAa,IAAO,CAAA,CACvC,CAAA,GAED,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,8CAAf,EACE,EAAA,EAAA,MAAC,SAAD,CAAQ,UAAU,kDAAlB,EACE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,0BAAf,EACE,EAAA,EAAA,KAAC,KAAD,CAAI,UAAU,iCAAwC,iBACnD,CACC,CAAA,GACJ,EAAA,EAAA,KAAC,IAAD,CAAG,UAAU,4CAAoC,CAAa,CAAA,CAC3D,KAKL,EAAA,EAAA,KAAC,EAAA,sBAAD,CACE,OAAQ,wBAAwB,EAAO,KACvC,WAAY,EAAO,UAAY,GAC/B,SAAU,EACV,eAAgB,EAAA,QAAQ,yBACxB,gBAAiB,EAAA,QAAQ,0BACzB,kBAAmB,EAAA,QAAQ,cAC5B,CAAA,CACK,IAEP,GAAS,aACR,EAAA,EAAA,KAAC,IAAD,CACE,cAAa,0BAA0B,EAAO,KAC9C,UAAU,gFAET,EAAQ,WACR,CAAA,EACD,KAEH,GACC,EAAA,EAAA,KAAC,IAAD,CACE,cAAa,qBAAqB,EAAO,KACzC,UAAU,qCACV,MAAO,WAEN,CACA,CAAA,EACD,MAEJ,EAAA,EAAA,KAAC,EAAA,uBAAD,CACU,SACC,UACD,QACT,CAAA,CACE,GACF,GACF,CAAA,CAET"}
|
|
@@ -2,7 +2,7 @@ import { MCPServerConfig } from "#/types/mcp-server";
|
|
|
2
2
|
interface InstalledServerCardProps {
|
|
3
3
|
server: MCPServerConfig;
|
|
4
4
|
onEdit: () => void;
|
|
5
|
-
|
|
5
|
+
onToggleEnabled: (enabled: boolean) => void;
|
|
6
6
|
}
|
|
7
|
-
export declare function InstalledServerCard({ server, onEdit,
|
|
7
|
+
export declare function InstalledServerCard({ server, onEdit, onToggleEnabled, }: InstalledServerCardProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -27,7 +27,7 @@ function g(e) {
|
|
|
27
27
|
}
|
|
28
28
|
return e.url ?? "";
|
|
29
29
|
}
|
|
30
|
-
function _({ server: _, onEdit: v,
|
|
30
|
+
function _({ server: _, onEdit: v, onToggleEnabled: y }) {
|
|
31
31
|
let { t: b } = e("openhands"), x = o(_, s(c)), S = d(_, x), C = g(_), w = h(_.type);
|
|
32
32
|
return /* @__PURE__ */ p("div", {
|
|
33
33
|
"data-testid": "mcp-server-item",
|
|
@@ -62,12 +62,11 @@ function _({ server: _, onEdit: v, onDelete: y }) {
|
|
|
62
62
|
})]
|
|
63
63
|
}), /* @__PURE__ */ p(u, {
|
|
64
64
|
testId: `mcp-installed-toggle-${_.id}`,
|
|
65
|
-
isSelected: !
|
|
66
|
-
onToggle:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
disableLabelKey: t.MCP$TOGGLE_REMOVE_SERVER
|
|
65
|
+
isSelected: _.enabled !== !1,
|
|
66
|
+
onToggle: y,
|
|
67
|
+
enableLabelKey: t.MCP$TOGGLE_ENABLE_SERVER,
|
|
68
|
+
disableLabelKey: t.MCP$TOGGLE_DISABLE_SERVER,
|
|
69
|
+
disableTooltipKey: t.COMMON$DISABLE
|
|
71
70
|
})]
|
|
72
71
|
}),
|
|
73
72
|
x?.description ? /* @__PURE__ */ p("p", {
|