@openhands/agent-canvas 1.0.0-alpha.4 → 1.0.0-alpha.5
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/build/assets/acp-providers-SCPK1BIU.js +1 -0
- package/build/assets/{acp-route-guard-CY4Kktrm.js → acp-route-guard-IWlFmS6x.js} +1 -1
- package/build/assets/active-backend-context-CkP3ZEJs.js +1 -0
- package/build/assets/{add-backend-modal-MoeYcSlW.js → add-backend-modal-CqjNjGqY.js} +1 -1
- package/build/assets/{agent-server-compatibility-DnXbX5aL.js → agent-server-compatibility-DvKtnXHw.js} +1 -1
- package/build/assets/agent-server-conversation-service.api-BdEre_71.js +5 -0
- package/build/assets/{agent-settings-D9CvPVkc.js → agent-settings-DdisD2Xx.js} +1 -1
- package/build/assets/{alert-banner-BopWFWDK.js → alert-banner-CvTYN73l.js} +1 -1
- package/build/assets/{analytics-consent-form-modal-FvOoRQJt.js → analytics-consent-form-modal-BKgT9i2w.js} +1 -1
- package/build/assets/{app-settings-Dh9WIVcy.js → app-settings-DcYXtxGP.js} +1 -1
- package/build/assets/{automation-detail-B1toFzbL.js → automation-detail-ZQs6D2d3.js} +1 -1
- package/build/assets/{automations-list-lQ_f_eVe.js → automations-list-CqHXGwSw.js} +1 -1
- package/build/assets/backend-form-modal-KudhWUX8.js +1 -0
- package/build/assets/{backend-synced-settings-badge-f7SIwZJJ.js → backend-synced-settings-badge-BFy2HylT.js} +1 -1
- package/build/assets/{base-modal-D0AZIorb.js → base-modal-B4HvlFHE.js} +1 -1
- package/build/assets/{browser-store-CYpN823z.js → browser-store-C3AqxAO7.js} +1 -1
- package/build/assets/{browser-tab-Cy5h30Rj.js → browser-tab-DTM6RyoV.js} +1 -1
- package/build/assets/{browser-CqONu_f3.js → browser-vYpdU3CR.js} +1 -1
- package/build/assets/{circle-plus-check-toggle-BLCVOBAz.js → circle-plus-check-toggle-DRvuu-RD.js} +1 -1
- package/build/assets/{color-themes-VfRROuOB.js → color-themes-DSaoIL6A.js} +1 -1
- package/build/assets/{command-store-BUJOHJw0.js → command-store-DFN_17p1.js} +1 -1
- package/build/assets/{condenser-settings-tU2QpcvW.js → condenser-settings-DduLQcpV.js} +1 -1
- package/build/assets/{confirmation-modal-C9X6T5NM.js → confirmation-modal-B-DOYMUH.js} +1 -1
- package/build/assets/{context-menu-list-item-CdiNsCXt.js → context-menu-list-item-DzjPB8aC.js} +1 -1
- package/build/assets/conversation-CeGMBOyB.js +1 -0
- package/build/assets/conversation-D8scXOe7.js +17 -0
- package/build/assets/conversation-panel-DMz46ji-.js +1 -0
- package/build/assets/{conversation-service.api-bFeuJPps.js → conversation-service.api-YTGTw0pz.js} +1 -1
- package/build/assets/conversation-state-store-Bc0slAjL.js +1 -0
- package/build/assets/{conversation-store-CAtSuhbI.js → conversation-store-Z5iMCRpc.js} +1 -1
- package/build/assets/conversation-websocket-context-B0Gd3yiT.js +3 -0
- package/build/assets/{device-verify-B3pEa6X6.js → device-verify-CTbXX9CQ.js} +1 -1
- package/build/assets/dist-yMQV8IUk.js +1 -0
- package/build/assets/{edit-automation-modal-CoJon94X.js → edit-automation-modal-DgW0Q8vr.js} +1 -1
- package/build/assets/{ellipsis-button-BMXoWChN.js → ellipsis-button-BoU2-xlG.js} +1 -1
- package/build/assets/{entry.client-DH09zdmW.js → entry.client-DU7-q4ZU.js} +2 -2
- package/build/assets/{environment-switch-overlay-akifSJ7a.js → environment-switch-overlay-DQ1n6Iu6.js} +1 -1
- package/build/assets/{extensions-hub-BTPY21Mo.js → extensions-hub-BW1FAKFJ.js} +1 -1
- package/build/assets/{extensions-navigation-Bw61uJe9.js → extensions-navigation-CbPMhSML.js} +1 -1
- package/build/assets/{files-tab-CsZQRSpv.js → files-tab-CbJ4s7Ik.js} +1 -1
- package/build/assets/files-tab-store-CDyVTXNT.js +1 -0
- package/build/assets/git-control-bar-branch-button-DhpPgadK.js +27 -0
- package/build/assets/git-provider-icon-D8RE4unY.js +1 -0
- package/build/assets/health-store-BDC2rM-X.js +1 -0
- package/build/assets/{home-7IR9W24e.js → home-D9fJfhQA.js} +1 -1
- package/build/assets/{install-server-modal-BL4pprnN.js → install-server-modal-VB5hOBpW.js} +1 -1
- package/build/assets/{launch-Bd5avLyw.js → launch-DKCU9uJH.js} +1 -1
- package/build/assets/{llm-client-BvUU4If8.js → llm-client-BpIfxETv.js} +1 -1
- package/build/assets/{llm-settings-yIFf1UoE.js → llm-settings-BOJC4vD-.js} +1 -1
- package/build/assets/llm-settings-CIdxmimN.js +1 -0
- package/build/assets/{manage-backends-modal-buYNliLv.js → manage-backends-modal-DqpzcxdI.js} +1 -1
- package/build/assets/{manage-workspaces-modal-BiTj6Z4W.js → manage-workspaces-modal-eG6XgAvw.js} +1 -1
- package/build/assets/manifest-f141dc70.js +1 -0
- package/build/assets/{markdown-renderer-CeCYDWvz.js → markdown-renderer-wZnLDbA1.js} +1 -1
- package/build/assets/{mcp-DSzTA9H1.js → mcp-BdfyCW1l.js} +1 -1
- package/build/assets/{messages-x5kGl-bQ.js → messages-BfaEAG2q.js} +1 -1
- package/build/assets/{model-selector-CED-tBXx.js → model-selector-7id-Uirf.js} +1 -1
- package/build/assets/{navigation-link-C_YVC2i-.js → navigation-link-DFQ7YcWq.js} +1 -1
- package/build/assets/{option-service.api-Bqy363N2.js → option-service.api-DN0ZcGjw.js} +1 -1
- package/build/assets/{organization-service.api-BAwDUJoL.js → organization-service.api-Ct2dZF8M.js} +1 -1
- package/build/assets/{path-utils-3ccf0YXA.js → path-utils-D1ZtqFC7.js} +1 -1
- package/build/assets/{planner-tab-b0Q_JZvr.js → planner-tab-yubfN-6U.js} +1 -1
- package/build/assets/{profiles-client-Cj9KHwuq.js → profiles-client-D4twHRVf.js} +1 -1
- package/build/assets/{providers-CdDNvcEb.js → providers-C2T07PM3.js} +1 -1
- package/build/assets/{proxy-3uQm0NJ9.js → proxy-BMZyC45G.js} +1 -1
- package/build/assets/query-client-config-CiK0GJJO.js +1 -0
- package/build/assets/{recommended-automations-launcher--puKMsm-.js → recommended-automations-launcher-Cx7svuGE.js} +17 -3
- package/build/assets/root-layout-DvYGxAnr.js +2 -0
- package/build/assets/root-luPHQiBx.js +2 -0
- package/build/assets/{sdk-section-page-Dgmjx3Nh.js → sdk-section-page-03k88tIR.js} +1 -1
- package/build/assets/{sdk-settings-schema-QrDJfOon.js → sdk-settings-schema-BY8dOy3a.js} +1 -1
- package/build/assets/{secrets-service-Dy7jaVk0.js → secrets-service-Z3qtRb_G.js} +1 -1
- package/build/assets/{secrets-settings-9X_bB7-j.js → secrets-settings-BnlByuMZ.js} +1 -1
- package/build/assets/{server-client-BvA-DepM.js → server-client-CG1zHqph.js} +1 -1
- package/build/assets/{settings-CLfgxw_Q.js → settings-DyzGLF_d.js} +1 -1
- package/build/assets/{settings-client-DjnapAI3.js → settings-client-CkXDJwIY.js} +1 -1
- package/build/assets/{settings-dropdown-input-1bMoP5ld.js → settings-dropdown-input-CAQWQgx-.js} +1 -1
- package/build/assets/{settings-index-QV1myqj-.js → settings-index-KtTw49xL.js} +1 -1
- package/build/assets/{settings-input-Bz9QClNU.js → settings-input-BWCZt9g2.js} +1 -1
- package/build/assets/{settings-list-classes-vFnNAdFx.js → settings-list-classes-xMleGkTC.js} +1 -1
- package/build/assets/{settings-modal-CmsyiNtY.js → settings-modal-Cv2YWSUY.js} +1 -1
- package/build/assets/{settings-service.api-DfJwVvYA.js → settings-service.api-Z6x0l0GU.js} +1 -1
- package/build/assets/{shared-conversation-CsGvti_a.js → shared-conversation-BfZNCsvo.js} +1 -1
- package/build/assets/{sidebar-mobile-menu-toggle-CRQrI0ED.js → sidebar-mobile-menu-toggle-DXplko7u.js} +1 -1
- package/build/assets/{sidebar-nav-link-qrRmYl8T.js → sidebar-nav-link-B4h8naZ7.js} +1 -1
- package/build/assets/{sidebar-store-CUm9qCi_.js → sidebar-store-cOeaKmIm.js} +1 -1
- package/build/assets/{skill-card-pill-row-DdaVfIxC.js → skill-card-pill-row-D0oTWx-a.js} +1 -1
- package/build/assets/{skills-plugins-BX5zDQC6.js → skills-plugins-BTnp7QcQ.js} +1 -1
- package/build/assets/{skills-settings-CuoWDnTN.js → skills-settings-CbOQvzkR.js} +1 -1
- package/build/assets/{styled-tooltip-C7QOGK28.js → styled-tooltip-Awq4HMw3.js} +1 -1
- package/build/assets/{task-list-tab-Bz7_oCIo.js → task-list-tab-B45ktzHM.js} +1 -1
- package/build/assets/{terminal-CRX7ZSEA.js → terminal-D5pzR9Ru.js} +1 -1
- package/build/assets/{typography-BqlA_dVV.js → typography-BbaUAC4V.js} +1 -1
- package/build/assets/{use-active-conversation-DOLpeZZ5.js → use-active-conversation-Bu5J9iLy.js} +1 -1
- package/build/assets/{use-agent-settings-schema-D90oKLgR.js → use-agent-settings-schema-BbtOsR7P.js} +1 -1
- package/build/assets/{use-agent-state-BqaILzms.js → use-agent-state-DN9Nc5pP.js} +1 -1
- package/build/assets/{use-cloud-current-user-id-Dy9b3ahi.js → use-cloud-current-user-id-B_rMUiu8.js} +1 -1
- package/build/assets/{use-config-BD9X1AvI.js → use-config-Bcz2JL2t.js} +1 -1
- package/build/assets/{use-conversation-id-DPRiMh48.js → use-conversation-id-BOaaZahn.js} +1 -1
- package/build/assets/{use-create-conversation-B4M_yYz3.js → use-create-conversation-BWFA_FId.js} +1 -1
- package/build/assets/{use-event-store-DDhcATXi.js → use-event-store-CQZCcVz-.js} +1 -1
- package/build/assets/{use-handle-plan-click-Dno7Yfm3.js → use-handle-plan-click-CgrCGmT1.js} +1 -1
- package/build/assets/{use-is-creating-conversation-CVum0xhv.js → use-is-creating-conversation-DhoM7UAB.js} +1 -1
- package/build/assets/{use-launch-skill-in-chat-sASpuCpy.js → use-launch-skill-in-chat-DOyQsXFO.js} +1 -1
- package/build/assets/{use-llm-profiles-DHxXPcrl.js → use-llm-profiles-CAIzHJDX.js} +1 -1
- package/build/assets/{use-runtime-is-ready-C-dZi-ZU.js → use-runtime-is-ready-BQWLEyqa.js} +1 -1
- package/build/assets/{use-save-settings-pkHKHB31.js → use-save-settings-5m3w89Ph.js} +1 -1
- package/build/assets/{use-settings-ClRWXa6p.js → use-settings-DzG0C3vO.js} +1 -1
- package/build/assets/{use-settings-nav-items-CDy22kOR.js → use-settings-nav-items-BIsKeX52.js} +1 -1
- package/build/assets/use-skills-Cn-78xP1.js +1 -0
- package/build/assets/{use-task-list-BwJGWML_.js → use-task-list-Bs90uF2N.js} +1 -1
- package/build/assets/{use-unified-vscode-url-DU7On_6w.js → use-unified-vscode-url-C5iI-Z5A.js} +1 -1
- package/build/assets/{use-user-conversation-DdUU6uqz.js → use-user-conversation-BCYpbPT1.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation-CJfSHdwC.js → vendor~conversation-panel~conversation-CbjvWBSu.js} +1 -1
- package/build/assets/{vendor~conversation-panel~conversation~index-DZ7eKFW3.js → vendor~conversation-panel~conversation~index-C23ZXO4R.js} +1 -1
- package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-ksomn5Bg.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-VnmIZrq3.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CM_1dibO.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B92czPCF.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B-s2ZXN7.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BbFOrAjI.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-bTqZAHqW.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-By5W2oHN.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-8cYFyeHR.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CofhIDpd.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-uK_SqCPd.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DpAdkv8m.js} +1 -1
- package/build/assets/{vendor~home~mcp~automations-list-a--VL9Np.js → vendor~home~mcp~automations-list-DRfWZRnF.js} +1 -1
- package/build/assets/{vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-WuKCleb6.js → vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-BQPOygpY.js} +2 -2
- package/build/assets/{vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-BG3to4e4.js → vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-CyYIBiBk.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation-DL8iX8eY.js → vendor~root-layout~home~conversation-panel~conversation-DjAjXS5J.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-8l0SYWBt.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-CFpDeb9o.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-CrBN5IsU.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~iguv7bgw-CuGq_cxH.js} +1 -1
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-DHbj3Bsh.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~k776hupu-C1p8-pMr.js} +2 -2
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~dp08i1qy-BJm2mGIp.js +48 -0
- package/build/assets/{verification-settings-CiaMSkli.js → verification-settings-DbziMp4K.js} +1 -1
- package/build/assets/{vscode-tab-DkUK-4Xb.js → vscode-tab-BVhQR2rt.js} +1 -1
- package/build/index.html +4 -4
- package/dist/constants/acp-providers.cjs +1 -1
- package/dist/constants/acp-providers.cjs.map +1 -1
- package/dist/constants/acp-providers.d.ts +10 -18
- package/dist/constants/acp-providers.js +42 -209
- package/dist/constants/acp-providers.js.map +1 -1
- package/dist/hooks/query/use-paginated-conversations.cjs +1 -1
- package/dist/hooks/query/use-paginated-conversations.cjs.map +1 -1
- package/dist/hooks/query/use-paginated-conversations.js +2 -1
- package/dist/hooks/query/use-paginated-conversations.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/index.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/index.js +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js +213 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp-providers.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.js +10 -0
- package/dist/node_modules/@openhands/typescript-client/dist/models/acp.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/query-client-config.cjs +1 -1
- package/dist/query-client-config.cjs.map +1 -1
- package/dist/query-client-config.js +30 -23
- package/dist/query-client-config.js.map +1 -1
- package/package.json +3 -3
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/dev-safe.mjs +1 -1
- package/build/assets/acp-providers-BhOEPsud.js +0 -1
- package/build/assets/active-backend-context-jthDtMCD.js +0 -1
- package/build/assets/agent-server-conversation-service.api-CA7hOJAy.js +0 -5
- package/build/assets/backend-form-modal-DbriBS-v.js +0 -1
- package/build/assets/conversation-CDHXbtHw.js +0 -17
- package/build/assets/conversation-Dd7NkKCq.js +0 -1
- package/build/assets/conversation-panel-BZ1-fw2m.js +0 -1
- package/build/assets/conversation-state-store-Dpa4x70O.js +0 -1
- package/build/assets/conversation-websocket-context-BEeh-jIG.js +0 -3
- package/build/assets/dist-dxViYC8L.js +0 -1
- package/build/assets/files-tab-store-ymnFnIBO.js +0 -1
- package/build/assets/git-control-bar-branch-button-BzqhhzW4.js +0 -27
- package/build/assets/git-provider-icon-Cf-vdwYZ.js +0 -1
- package/build/assets/llm-settings-BwVWlOyB.js +0 -1
- package/build/assets/manifest-e27751af.js +0 -1
- package/build/assets/query-client-config-BtB8Yvpf.js +0 -1
- package/build/assets/root-Xt6cd1J6.js +0 -2
- package/build/assets/root-layout-Bp7iQEOJ.js +0 -2
- package/build/assets/skills-client-DOeT6HEj.js +0 -1
- package/build/assets/use-skills-C2S3iOtJ.js +0 -1
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~automations-list~automation-~f57mv2f3-D6ItaxF-.js +0 -48
- package/scripts/check-acp-providers-sync.mjs +0 -560
- /package/build/assets/{agent-server-client-options-BvlH7qGM.js → agent-server-client-options-8OJSXbm8.js} +0 -0
- /package/build/assets/{agent-server-ui-style-scope-DWLieFHA.js → agent-server-ui-style-scope-BwIZYdC1.js} +0 -0
- /package/build/assets/{brand-button-BYloqbQ3.js → brand-button-8fVVei4i.js} +0 -0
- /package/build/assets/{combobox-caret-C7rVhI_V.js → combobox-caret-BMsz5mQX.js} +0 -0
- /package/build/assets/{conversation-local-storage-BQSptoYo.js → conversation-local-storage-UYl-SX-r.js} +0 -0
- /package/build/assets/{dist-3eF0ujsw.js → dist-DZHSA2e6.js} +0 -0
- /package/build/assets/{environment-switch-store-CBXkf5bS.js → environment-switch-store-C4ulFJKp.js} +0 -0
- /package/build/assets/{loading-spinner-D-ea2dZq.js → loading-spinner-91b5FiMQ.js} +0 -0
- /package/build/assets/{middleware-iK-zKVe0.js → middleware-BC9EwbB9.js} +0 -0
- /package/build/assets/{modal-backdrop-DML21GPD.js → modal-backdrop-B04pVYAD.js} +0 -0
- /package/build/assets/{modal-body-RpEv_U1i.js → modal-body-CgUoFQA1.js} +0 -0
- /package/build/assets/{modal-close-button-SKLwT3A4.js → modal-close-button-SM_WXzDY.js} +0 -0
- /package/build/assets/{navigation-context-DtjWNE3F.js → navigation-context-BFjstyH6.js} +0 -0
- /package/build/assets/{objectWithoutPropertiesLoose-SGdQSpMZ.js → objectWithoutPropertiesLoose-Du6eBn-V.js} +0 -0
- /package/build/assets/{openhands-logo-BRKD7Ir9.js → openhands-logo-DkDp75rC.js} +0 -0
- /package/build/assets/{query-keys-D5xWPArX.js → query-keys-tAsQcc_9.js} +0 -0
- /package/build/assets/{react-DMUxGBRt.js → react-Do0CT17Y.js} +0 -0
- /package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~zm51vy4j-Csgp2p8o.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~zm51vy4j-iOsylxCS.js} +0 -0
- /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-BdNVgtVT.js → vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~skil~i4kjfqhl-BebWhFNT.js} +0 -0
- /package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~pfbaerbd-DFFy3NX_.js → vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~pfbaerbd-zhv9fooy.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n,t as r}from"./declaration-C9nuq2Dj.js";import{t as i}from"./useTranslation-01pF7z10.js";import{t as a}from"./utils-Czcl6buL.js";import{c as o,i as s,l as c,n as l,r as ee}from"./vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-BP1SKG0F.js";import{t as te}from"./checkmark-BcvXE9bf.js";import{a as u}from"./vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n,t as r}from"./declaration-C9nuq2Dj.js";import{t as i}from"./useTranslation-01pF7z10.js";import{t as a}from"./utils-Czcl6buL.js";import{c as o,i as s,l as c,n as l,r as ee}from"./vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-BP1SKG0F.js";import{t as te}from"./checkmark-BcvXE9bf.js";import{a as u}from"./vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-B92czPCF.js";import{o as ne}from"./vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DpAdkv8m.js";import{$ as re,A as ie,B as ae,C as oe,D as se,E as d,F as f,G as p,H as m,I as h,J as g,K as _,L as v,M as y,N as b,O as x,P as S,Q as C,R as w,S as T,T as E,U as D,V as O,W as k,X as A,Y as j,Z as M,_ as N,a as P,at as F,b as I,c as L,ct as R,d as z,dt as B,et as V,f as H,ft as U,g as W,h as G,i as K,it as ce,j as le,k as ue,l as de,lt as fe,m as pe,n as me,nt as he,o as ge,ot as q,p as _e,q as ve,r as ye,rt as be,s as xe,st as Se,t as Ce,tt as we,u as Te,ut as Ee,v as De,w as Oe,x as ke,y as Ae,z as je}from"./vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CofhIDpd.js";import{t as Me}from"./copy-BxgbrjDT.js";var J=e(t(),1),Y=n();function X({isHidden:e,isDisabled:t,onClick:n,mode:a}){let{t:o}=i(`openhands`);return(0,Y.jsxs)(`button`,{hidden:e,disabled:t,"data-testid":`copy-to-clipboard`,type:`button`,onClick:n,"aria-label":o(a===`copy`?r.BUTTON$COPY:r.BUTTON$COPIED),className:`button-base p-1 cursor-pointer`,children:[a===`copy`&&(0,Y.jsx)(Me,{width:15,height:15}),a===`copied`&&(0,Y.jsx)(te,{width:15,height:15})]})}function Z({text:e,children:t}){let[n,r]=J.useState(!1),[i,a]=J.useState(!1);return J.useEffect(()=>{let e;return i&&(e=setTimeout(()=>a(!1),2e3)),()=>clearTimeout(e)},[i]),(0,Y.jsxs)(`div`,{className:`relative`,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[(0,Y.jsx)(`div`,{className:`absolute top-2 right-2 z-10`,children:(0,Y.jsx)(X,{isHidden:!n,isDisabled:i,onClick:async()=>{await navigator.clipboard.writeText(e),a(!0)},mode:i?`copied`:`copy`})}),t]})}var Ne={bash:F,batch:ce,c:be,clike:he,clojure:we,cpp:V,csharp:re,css:C,dart:M,diff:A,docker:j,elixir:g,erlang:ve,fsharp:_,go:p,graphql:k,groovy:D,haskell:m,hcl:O,http:ae,ini:je,java:w,javascript:v,json:h,json5:f,jsx:S,julia:b,kotlin:y,less:le,lua:ie,makefile:ue,markdown:x,markup:se,matlab:d,nginx:E,nix:Oe,objectivec:oe,ocaml:T,perl:ke,php:I,powershell:Ae,properties:De,protobuf:N,python:W,r:G,regex:pe,ruby:_e,rust:H,sass:z,scala:Te,scss:de,"shell-session":L,solidity:xe,sql:ge,swift:P,toml:K,tsx:ye,typescript:me,yaml:Ce},Pe={cpp:[`c++`,`cxx`,`cc`],elixir:[`ex`,`exs`],erlang:[`erl`],fsharp:[`fs`,`fsx`],hcl:[`terraform`,`tf`],haskell:[`hs`],julia:[`jl`],ocaml:[`ml`,`mli`],powershell:[`ps`,`ps1`],rust:[`rs`],"shell-session":[`console`]};Object.entries(Ne).forEach(([e,t])=>{q.registerLanguage(e,t);let n=t.aliases;Array.isArray(n)&&n.length>0&&q.alias(e,n);let r=Pe[e];r&&q.alias(e,r)});function Fe({children:e,className:t}){let n=/language-(\w+)/.exec(t||``),r=String(e).replace(/\n$/,``);return n?(0,Y.jsx)(Z,{text:r,children:(0,Y.jsx)(q,{className:`rounded-lg`,style:Se,language:n?.[1],PreTag:`div`,children:r})}):String(e).includes(`
|
|
2
2
|
`)?(0,Y.jsx)(Z,{text:r,children:(0,Y.jsx)(`pre`,{className:`bg-surface-raised text-foreground border border-surface-raised rounded p-[1em] overflow-auto`,children:(0,Y.jsx)(`code`,{className:t,children:r})})}):(0,Y.jsx)(`code`,{className:a(t,`bg-surface-raised text-foreground border border-surface-raised rounded px-[0.4em] py-[0.2em]`),children:e})}function Ie({children:e}){return(0,Y.jsx)(`ul`,{className:`my-2 list-disc ml-5 pl-2 whitespace-normal leading-6`,children:e})}function Le({children:e,start:t}){return(0,Y.jsx)(`ol`,{className:`my-2 list-decimal ml-5 pl-2 whitespace-normal leading-6`,start:t,children:e})}function Re({children:e}){return(0,Y.jsx)(`li`,{className:`py-0.5`,children:e})}function ze({children:e}){return(0,Y.jsx)(`p`,{className:`py-1.5 leading-6 first:pt-0 last:pb-0`,children:e})}function Be({href:e,children:t}){return(0,Y.jsx)(`a`,{className:`text-blue-500 hover:underline`,href:e,target:`_blank`,rel:`noopener noreferrer`,children:t})}function Ve({children:e}){return(0,Y.jsx)(`h1`,{className:`text-xl text-white font-medium leading-7 mb-3 mt-4 first:mt-0`,children:e})}function He({children:e}){return(0,Y.jsx)(`h2`,{className:`text-lg font-medium leading-6 -tracking-[0.01em] text-white mb-2.5 mt-4 first:mt-0`,children:e})}function Ue({children:e}){return(0,Y.jsx)(`h3`,{className:`text-base font-medium text-white mb-2 mt-3 first:mt-0`,children:e})}function We({children:e}){return(0,Y.jsx)(`h4`,{className:`text-sm font-medium text-white mb-1.5 mt-3 first:mt-0`,children:e})}function Ge({children:e}){return(0,Y.jsx)(`h5`,{className:`text-sm font-normal text-[var(--oh-text-tertiary)] mb-1.5 mt-2.5 first:mt-0`,children:e})}function Ke({children:e}){return(0,Y.jsx)(`h6`,{className:`text-sm font-normal text-[var(--oh-text-tertiary)] mb-1.5 mt-2.5 first:mt-0`,children:e})}function qe({children:e}){return(0,Y.jsx)(`div`,{className:`my-4 w-full overflow-x-auto`,children:(0,Y.jsx)(`table`,{className:`w-full border-collapse border border-[var(--oh-border)] text-sm`,children:e})})}function Je({children:e}){return(0,Y.jsx)(`th`,{className:`border border-[var(--oh-border)] bg-[var(--oh-surface)] px-3 py-2 text-left font-semibold text-white`,children:e})}function Ye({children:e}){return(0,Y.jsx)(`td`,{className:`border border-[var(--oh-border)] px-3 py-2 align-top`,children:e})}var Q={note:{label:`Note`,icon:ee,containerClass:`border-l-blue-500 bg-blue-500/10`,titleClass:`text-blue-300`,iconClass:`text-blue-400`},tip:{label:`Tip`,icon:o,containerClass:`border-l-emerald-500 bg-emerald-500/10`,titleClass:`text-emerald-300`,iconClass:`text-emerald-400`},important:{label:`Important`,icon:l,containerClass:`border-l-purple-500 bg-purple-500/10`,titleClass:`text-purple-300`,iconClass:`text-purple-400`},warning:{label:`Warning`,icon:c,containerClass:`border-l-yellow-500 bg-yellow-500/10`,titleClass:`text-yellow-300`,iconClass:`text-yellow-400`},caution:{label:`Caution`,icon:s,containerClass:`border-l-rose-500 bg-rose-500/10`,titleClass:`text-rose-300`,iconClass:`text-rose-400`}},Xe=/(?:^|\s)markdown-alert-(note|tip|important|warning|caution)(?:\s|$)/i;function Ze(e){if(!e)return null;let t=e.match(Xe);return t?t[1].toLowerCase():null}function Qe({children:e,className:t}){let n=Ze(t);if(n){let t=Q[n],r=t.icon;return(0,Y.jsxs)(`div`,{"data-testid":`markdown-alert-${n}`,className:a(`my-3 rounded-r-sm border-l-4 px-3 py-2`,t.containerClass),children:[(0,Y.jsxs)(`p`,{className:a(`flex items-center gap-2 font-semibold`,t.titleClass),children:[(0,Y.jsx)(r,{"aria-hidden":!0,className:a(`shrink-0`,t.iconClass)}),(0,Y.jsx)(`span`,{children:t.label})]}),(0,Y.jsx)(`div`,{className:`text-content`,children:e})]})}return(0,Y.jsx)(`blockquote`,{className:`my-2 border-l-4 border-border pl-3 italic text-content-muted`,children:e})}function $e({...e}){return(0,Y.jsx)(`hr`,{...e,className:`my-4 border-0 border-t border-[var(--oh-border)]`})}var $=/^\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\][ \t]*\r?\n?/i;function et(e){return Array.isArray(e)?e:typeof e==`string`?e.split(/\s+/).filter(Boolean):[]}var tt=()=>e=>{ne(e,`blockquote`,e=>{let t=e,n=t.children[0];if(n?.type!==`paragraph`)return;let r=n,i=r.children[0];if(i?.type!==`text`)return;let a=i.value.match($);if(!a)return;let o=a[1].toLowerCase(),s=i;s.value=s.value.replace($,``),s.value===``&&(r.children.shift(),r.children[0]?.type===`break`&&r.children.shift(),r.children.length===0&&t.children.shift()),t.data=t.data??{};let c=t.data.hProperties??{},l=et(c.className);t.data.hProperties={...c,className:[...l,`markdown-alert`,`markdown-alert-${o}`]}})},nt={...u,attributes:{...u.attributes,"*":[...u.attributes?.[`*`]??[],`className`,`id`],a:[`href`,`title`,`target`,`rel`],img:[...u.attributes?.img??[],`src`,`alt`,`title`,`width`,`height`,`loading`]},tagNames:[...u.tagNames??[],`img`,`details`,`summary`,`figure`,`figcaption`,`mark`,`kbd`,`sub`,`sup`],protocols:{...u.protocols,src:[`http`,`https`],href:[`http`,`https`,`mailto`,`tel`]}};function rt({children:e,content:t,components:n,includeStandard:r=!1,includeHeadings:i=!1,allowHtml:a=!0}){return(0,Y.jsx)(`div`,{"data-testid":`markdown-renderer`,children:(0,Y.jsx)(U,{components:{code:Fe,ul:Ie,ol:Le,li:Re,hr:$e,table:qe,th:Je,td:Ye,blockquote:Qe,...r&&{a:Be,p:ze},...i&&{h1:Ve,h2:He,h3:Ue,h4:We,h5:Ge,h6:Ke},...n},remarkPlugins:[tt,B,Ee],rehypePlugins:a?[fe,[R,nt]]:void 0,children:t??e??``})})}export{X as n,rt as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{L as n}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{t as r}from"./useMutation-CRJwk4cR.js";import{o as i,t as a}from"./declaration-C9nuq2Dj.js";import{n as o}from"./QueryClientProvider-DITRCGAK.js";import{t as s}from"./useTranslation-01pF7z10.js";import{t as c}from"./retrieve-axios-error-message-BY-yIkIq.js";import{t as l}from"./createLucideIcon-Ddu8jDOQ.js";import{r as u}from"./vendor~home~mcp~automations-list-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{L as n}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~cnj3raoq-DTEXlLSB.js";import{t as r}from"./useMutation-CRJwk4cR.js";import{o as i,t as a}from"./declaration-C9nuq2Dj.js";import{n as o}from"./QueryClientProvider-DITRCGAK.js";import{t as s}from"./useTranslation-01pF7z10.js";import{t as c}from"./retrieve-axios-error-message-BY-yIkIq.js";import{t as l}from"./createLucideIcon-Ddu8jDOQ.js";import{r as u}from"./vendor~home~mcp~automations-list-DRfWZRnF.js";import{n as d,r as f}from"./custom-toast-handlers-BYxhSr3t.js";import{a as p,c as m,i as h,l as g,n as _,r as v,s as y}from"./circle-plus-check-toggle-DRvuu-RD.js";import{t as b}from"./trash-2-CbVljPko.js";import{t as x}from"./x-JOBEVLW0.js";import{t as S}from"./utils-Czcl6buL.js";import{n as C}from"./active-backend-context-CkP3ZEJs.js";import{a as w}from"./query-keys-tAsQcc_9.js";import{t as T}from"./modal-backdrop-B04pVYAD.js";import{a as E,t as D}from"./brand-button-8fVVei4i.js";import{t as O}from"./modal-close-button-SM_WXzDY.js";import{n as k,t as A}from"./settings-input-BWCZt9g2.js";import{t as j}from"./confirmation-modal-B-DOYMUH.js";import{t as M}from"./settings-service.api-Z6x0l0GU.js";import{a as N,i as P,r as F}from"./use-settings-DzG0C3vO.js";import{t as I}from"./settings-dropdown-input-CAQWQgx-.js";import{c as L,d as R,i as z,l as B,n as V,o as ee,r as H,t as U,u as W}from"./install-server-modal-VB5hOBpW.js";import{n as G}from"./extensions-navigation-CbPMhSML.js";import{t as K}from"./enum-filter-dropdown-BJt-NplD.js";import{n as q}from"./settings-like-page-layout-classes-Bn-M9oOa.js";import{t as J}from"./acp-route-guard-IWlFmS6x.js";var Y=l(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),X=e(t(),1);function Z(){let e=o(),{data:t}=F();return r({mutationFn:async e=>{let n=P(t?.agent_settings?.mcp_config),r={sse_servers:[...n.sse_servers],stdio_servers:[...n.stdio_servers],shttp_servers:[...n.shttp_servers]},i=e=>{if(typeof e==`string`)return e;if(e&&typeof e==`object`&&`url`in e){let t=e.url;return typeof t==`string`?t:void 0}};if(e.type===`sse`){if(!e.url)return;let t=r.sse_servers.findIndex(t=>i(t)===e.url);t>=0&&r.sse_servers.splice(t,1)}else if(e.type===`shttp`){if(!e.url)return;let t=r.shttp_servers.findIndex(t=>i(t)===e.url);t>=0&&r.shttp_servers.splice(t,1)}else if(e.type===`stdio`){if(!e.name||!e.command)return;let t=r.stdio_servers.findIndex(t=>t.name===e.name&&t.command===e.command&&JSON.stringify(t.args??[])===JSON.stringify(e.args??[]));t>=0&&r.stdio_servers.splice(t,1)}else return;await M.saveSettings({agent_settings_diff:{mcp_config:N(r)}})},onSuccess:()=>{e.invalidateQueries({queryKey:w.personal()})}})}var Q=i();function te(e){switch(e){case`sse`:return`SSE`;case`shttp`:return`HTTP`;case`stdio`:return`STDIO`;default:return e}}function ne(e){return e.type===`stdio`?e.name??e.command??``:e.url??``}function re(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 ie({server:e,onEdit:t,onDelete:n}){let{t:r}=s(`openhands`),i=z(e,u),o=i?.name??ne(e),c=re(e),l=te(e.type);return(0,Q.jsx)(`div`,{"data-testid":`mcp-server-item`,"data-server-id":e.id,role:`button`,tabIndex:0,onClick:t,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())},"aria-label":r(a.MCP$EDIT_SERVER_ARIA,{name:o}),className:S(`flex min-h-[132px] flex-col overflow-hidden p-4 text-left`,y,p),children:(0,Q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Q.jsx)(H,{entry:i,fallback:(0,Q.jsx)(Y,{strokeWidth:2.25})}),(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,Q.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`h3`,{className:`truncate text-sm font-semibold`,title:o,children:o}),(0,Q.jsx)(`p`,{className:`mt-0.5 text-xs text-tertiary-alt`,children:l})]}),(0,Q.jsx)(_,{testId:`mcp-installed-toggle-${e.id}`,isSelected:!0,onToggle:e=>{e||n()},enableLabelKey:a.MCP$TOGGLE_ADD_SERVER,disableLabelKey:a.MCP$TOGGLE_REMOVE_SERVER})]}),i?.description?(0,Q.jsx)(`p`,{"data-testid":`mcp-server-description-${e.id}`,className:`line-clamp-2 break-words text-xs leading-relaxed text-tertiary-light`,children:i.description}):null,c?(0,Q.jsx)(`p`,{"data-testid":`mcp-server-detail-${e.id}`,className:`truncate text-xs text-tertiary-alt`,title:c,children:c}):null]})]})})}function ae({servers:e,hasAnyInstalled:t,query:n=``,onEdit:r,onDelete:i}){let{t:o}=s(`openhands`);return e.length===0?t&&n.trim().length>0?(0,Q.jsx)(`div`,{"data-testid":`mcp-installed-empty-search`,className:`rounded-xl border border-[var(--oh-border)] p-6 text-center`,children:(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:o(a.MCP$SEARCH_EMPTY)})}):(0,Q.jsxs)(`div`,{"data-testid":`mcp-installed-empty`,className:m,children:[(0,Q.jsx)(`p`,{className:`text-sm text-white`,children:o(a.MCP$INSTALLED_EMPTY_TITLE)}),(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-light mt-1`,children:o(a.MCP$INSTALLED_EMPTY_HINT)})]}):(0,Q.jsx)(`div`,{className:h,children:(0,Q.jsx)(`div`,{"data-testid":`mcp-installed-list`,className:v,children:e.map(e=>(0,Q.jsx)(ie,{server:e,onEdit:()=>r(e),onDelete:()=>i(e.id)},e.id))})})}function oe({entry:e,onClick:t,onAdd:n}){let r=(()=>{switch(e.template.kind){case`stdio`:return`STDIO`;case`shttp`:return`HTTP`;case`sse`:return`SSE`;default:return``}})();return(0,Q.jsx)(`button`,{type:`button`,onClick:t,"data-testid":`mcp-marketplace-card-${e.id}`,className:S(`flex min-h-[132px] flex-col overflow-hidden p-4 text-left`,y,p),children:(0,Q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Q.jsx)(H,{entry:e}),(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3`,children:[(0,Q.jsxs)(`header`,{className:`flex items-start justify-between gap-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`h3`,{className:`truncate text-sm font-semibold`,children:e.name}),(0,Q.jsx)(`p`,{className:`mt-0.5 text-xs text-tertiary-alt`,children:r})]}),(0,Q.jsx)(_,{testId:`mcp-marketplace-toggle-${e.id}`,isSelected:!1,onToggle:e=>{e&&n()},enableLabelKey:a.MCP$TOGGLE_ADD_SERVER,disableLabelKey:a.MCP$TOGGLE_ADD_SERVER})]}),(0,Q.jsx)(`p`,{className:`line-clamp-3 text-xs leading-relaxed text-tertiary-light`,children:e.description})]})]})})}function $({backendKind:e,onSelect:t,onAdd:n,query:r=``}){let{t:i}=s(`openhands`),o=ee(u).filter(t=>B(t,e)&&W(t,r));return(0,Q.jsxs)(`section`,{"data-testid":`mcp-marketplace-section`,className:`flex flex-col gap-3`,children:[(0,Q.jsx)(`h2`,{className:`text-base font-medium text-foreground`,children:i(a.MCP$LIBRARY_TITLE)}),o.length===0?(0,Q.jsx)(`div`,{"data-testid":`mcp-marketplace-empty`,className:`rounded-xl border border-dashed border-[var(--oh-border)] p-6 text-center`,children:(0,Q.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:i(a.MCP$SEARCH_EMPTY)})}):(0,Q.jsx)(`div`,{className:h,children:(0,Q.jsx)(`div`,{"data-testid":`mcp-marketplace-grid`,className:v,children:o.map(e=>(0,Q.jsx)(oe,{entry:e,onClick:()=>t(e),onAdd:()=>n(e)},e.id))})})]})}function se({mode:e,server:t,existingServers:n,onSubmit:r,onCancel:i,onDelete:o,isActionDisabled:c=!1}){let{t:l}=s(`openhands`),[u,d]=X.useState(t?.type||`sse`),[f,p]=X.useState(null),m=[{key:`sse`,label:l(a.SETTINGS$MCP_SERVER_TYPE_SSE)},{key:`stdio`,label:l(a.SETTINGS$MCP_SERVER_TYPE_STDIO)},{key:`shttp`,label:l(a.SETTINGS$MCP_SERVER_TYPE_SHTTP)}],h=e=>{if(!e)return l(a.SETTINGS$MCP_ERROR_URL_REQUIRED);try{let t=new URL(e);if(![`http:`,`https:`].includes(t.protocol))return l(a.SETTINGS$MCP_ERROR_URL_INVALID_PROTOCOL)}catch{return l(a.SETTINGS$MCP_ERROR_URL_INVALID)}return null},g=e=>e?/^[a-zA-Z0-9_-]+$/.test(e)?null:l(a.SETTINGS$MCP_ERROR_NAME_INVALID):l(a.SETTINGS$MCP_ERROR_NAME_REQUIRED),_=r=>!n||!(e===`add`||e===`edit`&&t?.name!==r)?null:n.filter(e=>e.type===`stdio`).map(e=>e.name).filter(Boolean).includes(r)?l(a.SETTINGS$MCP_ERROR_NAME_DUPLICATE):null,v=e=>e?e.includes(` `)?l(a.SETTINGS$MCP_ERROR_COMMAND_NO_SPACES):null:l(a.SETTINGS$MCP_ERROR_COMMAND_REQUIRED),y=r=>{if(!n)return null;let i=t?.url;return(e===`add`||e===`edit`&&i!==r)&&n.some(e=>(e.type===`sse`||e.type===`shttp`)&&e.url===r)?l(a.SETTINGS$MCP_ERROR_URL_DUPLICATE):null},x=e=>{if(!e.trim())return null;let t=e.split(`
|
|
2
2
|
`);for(let e=0;e<t.length;e+=1){let n=t[e].trim();if(n){let e=n.indexOf(`=`);if(e===-1||!n.substring(0,e).trim())return l(a.SETTINGS$MCP_ERROR_ENV_INVALID_FORMAT)}}return null},C=e=>{if(!e.trim())return null;let t=parseInt(e.trim(),10);return Number.isNaN(t)?l(a.SETTINGS$MCP_ERROR_TIMEOUT_INVALID_NUMBER):t<=0?l(a.SETTINGS$MCP_ERROR_TIMEOUT_POSITIVE):t>3600?l(a.SETTINGS$MCP_ERROR_TIMEOUT_MAX_EXCEEDED):null},w=e=>{let t=e.get(`name`)?.toString().trim()||``,n=e.get(`command`)?.toString().trim()||``,r=e.get(`env`)?.toString()||``;return g(t)||_(t)||v(n)||x(r)||null},T=e=>{if(u===`sse`||u===`shttp`){let t=e.get(`url`)?.toString().trim()||``,n=h(t);if(n)return n;let r=y(t);if(r)return r;if(u===`shttp`){let t=C(e.get(`timeout`)?.toString()||``);if(t)return t}return null}return u===`stdio`?w(e):null},O=e=>{let t={},n=e.trim();if(!n)return t;for(let e of n.split(`
|
|
3
3
|
`)){let n=e.trim(),r=n.indexOf(`=`),i=r>=0?n.substring(0,r).trim():``;n&&r!==-1&&i&&(t[i]=n.substring(r+1).trim())}return t};return(0,Q.jsxs)(`form`,{"data-testid":e===`add`?`add-mcp-server-form`:`edit-mcp-server-form`,onSubmit:e=>{e.preventDefault(),p(null);let n=new FormData(e.currentTarget),i=T(n);if(i){p(i);return}let a={id:t?.id||`${u}-${Date.now()}`,type:u};if(u===`sse`||u===`shttp`){let e=n.get(`url`)?.toString().trim(),t=n.get(`api_key`)?.toString().trim(),i=n.get(`timeout`)?.toString().trim(),o={...a,url:e,...t&&{api_key:t}};if(u===`shttp`&&i){let e=parseInt(i,10);Number.isNaN(e)||(o.timeout=e)}r(o)}else if(u===`stdio`){let e=n.get(`name`)?.toString().trim(),t=n.get(`command`)?.toString().trim(),i=n.get(`args`)?.toString().trim(),o=n.get(`env`)?.toString().trim(),s=i?i.split(`
|
|
4
4
|
`).map(e=>e.trim()).filter(Boolean):[],c=O(o||``);r({...a,name:e,command:t,...s.length>0&&{args:s},...Object.keys(c).length>0&&{env:c}})}},className:`flex flex-col items-start gap-6`,children:[e===`add`&&(0,Q.jsx)(I,{testId:`server-type-dropdown`,name:`server-type`,label:l(a.SETTINGS$MCP_SERVER_TYPE),items:m,selectedKey:u,onSelectionChange:e=>d(e),onInputChange:()=>{},isClearable:!1,allowsCustomValue:!1,required:!0,wrapperClassName:`w-full min-w-0`}),f&&(0,Q.jsx)(`p`,{className:`text-red-500 text-sm`,children:f}),(u===`sse`||u===`shttp`)&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(A,{testId:`url-input`,name:`url`,type:`url`,label:l(a.SETTINGS$MCP_URL),className:`w-full min-w-0`,required:!0,defaultValue:t?.url||``,placeholder:`https://api.example.com`}),(0,Q.jsx)(A,{testId:`api-key-input`,name:`api_key`,type:`password`,label:l(a.SETTINGS$MCP_API_KEY),className:`w-full min-w-0`,showOptionalTag:!0,defaultValue:t?.api_key||``,placeholder:l(a.SETTINGS$MCP_API_KEY_PLACEHOLDER)}),u===`shttp`&&(0,Q.jsx)(A,{testId:`timeout-input`,name:`timeout`,type:`number`,label:l(a.SETTINGS$MCP_TIMEOUT_LABEL),className:`w-full min-w-0`,showOptionalTag:!0,defaultValue:t?.timeout?.toString()||``,placeholder:`60`,min:1,max:3600})]}),u===`stdio`&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(A,{testId:`name-input`,name:`name`,type:`text`,label:l(a.SETTINGS$MCP_NAME),className:`w-full min-w-0`,required:!0,defaultValue:t?.name||``,placeholder:`my-mcp-server`,pattern:`^[a-zA-Z0-9_-]+$`}),(0,Q.jsx)(A,{testId:`command-input`,name:`command`,type:`text`,label:l(a.SETTINGS$MCP_COMMAND),className:`w-full min-w-0`,required:!0,defaultValue:t?.command||``,placeholder:`npx`}),(0,Q.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:`text-sm`,children:l(a.SETTINGS$MCP_COMMAND_ARGUMENTS)}),(0,Q.jsx)(k,{})]}),(0,Q.jsx)(`textarea`,{"data-testid":`args-input`,name:`args`,rows:3,defaultValue:t?.args?.join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{u as n}from"./path-utils-3ccf0YXA.js";import{t as r}from"./useMutation-CRJwk4cR.js";import{o as i,t as a}from"./declaration-C9nuq2Dj.js";import{t as o}from"./Trans-D43bd3yR.js";import{t as s}from"./useTranslation-01pF7z10.js";import{a as c}from"./i18n-DkYgs32x.js";import{t as l}from"./createLucideIcon-Ddu8jDOQ.js";import{t as u}from"./chevron-down-Bnmd5iG-.js";import{d,l as f,m as p,n as m,u as h}from"./conversation-websocket-context-BEeh-jIG.js";import{T as g,_,t as v}from"./utils-Czcl6buL.js";import{t as y}from"./use-config-BD9X1AvI.js";import{t as ee}from"./styled-tooltip-C7QOGK28.js";import{t as te}from"./react-DMUxGBRt.js";import{s as ne}from"./conversation-local-storage-BQSptoYo.js";import{t as b}from"./conversation-store-CAtSuhbI.js";import{n as x}from"./common-SMkEaBSr.js";import{n as re}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-DrXgiSCq.js";import{t as ie}from"./skills-BN8atjgW.js";import{t as ae}from"./close-SnIy2eLD.js";import{n as S,t as oe}from"./use-conversation-id-DPRiMh48.js";import{t as se}from"./use-active-conversation-DOLpeZZ5.js";import{t as C}from"./use-agent-state-BqaILzms.js";import{C as w,a as ce,g as le,i as T,r as E,t as ue,v as D,y as O}from"./use-event-store-DDhcATXi.js";import{r as k}from"./typography-BqlA_dVV.js";import{t as de}from"./lesson-plan-CmkRbe6Z.js";import{n as fe,t as A}from"./markdown-renderer-CeCYDWvz.js";import{t as pe}from"./u-check-circle-DHGiAi-w.js";import{n as me,r as he,t as ge}from"./plan-components-gOm-daR3.js";import{n as _e,t as ve}from"./u-check-circle-half-BPcWtWwv.js";var ye=l(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),j=e(t(),1),M=function(e){return e.INIT=`initialize`,e.MESSAGE=`message`,e.SYSTEM=`system`,e.READ=`read`,e.WRITE=`write`,e.RUN=`run`,e.RUN_IPYTHON=`run_ipython`,e.BROWSE=`browse`,e.BROWSE_INTERACTIVE=`browse_interactive`,e.DELEGATE=`delegate`,e.THINK=`think`,e.FINISH=`finish`,e.REJECT=`reject`,e.CHANGE_AGENT_STATE=`change_agent_state`,e.MCP=`call_tool_mcp`,e.TASK_TRACKING=`task_tracking`,e}(M||{});function N(){let{conversationId:e}=S(),t=m();return{send:(0,j.useCallback)(async e=>{if(t){let{action:n,args:r}=e;if(n===`message`&&r?.content){let e=[{type:`text`,text:r.content}];return r.image_urls&&r.image_urls.length>0&&e.push({type:`image`,image_urls:r.image_urls}),await t.sendMessage({role:`user`,content:e})}return{queued:!1}}return{queued:!1}},[t,e])}}function P(e,t,n,r){return{action:M.MESSAGE,args:{content:e,image_urls:t,file_urls:n,timestamp:r}}}var F=i(),I=e=>(0,F.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,F.jsx)(`path`,{d:`M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z`})}),L=e=>(0,F.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,F.jsx)(`path`,{d:`M201.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 205.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z`})});function be({status:e}){return(0,F.jsx)(`span`,{className:`flex-shrink-0`,children:e===`timeout`&&(0,F.jsx)(re,{"data-testid":`status-icon`,className:`h-4 w-4 ml-2 inline fill-yellow-500`})})}function R({title:e,details:t,success:n,initiallyExpanded:r=!1,chevronPosition:i=`after`,titleTrailing:a,titleIcon:o}){let[s,c]=j.useState(r),l=t?(0,F.jsx)(`button`,{type:`button`,onClick:()=>c(e=>!e),className:`cursor-pointer text-left`,"aria-label":s?`Collapse`:`Expand`,children:s?(0,F.jsx)(L,{className:v(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)}):(0,F.jsx)(I,{className:v(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)})}):null;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5 my-1 py-1 text-sm w-full`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between font-normal text-[var(--oh-muted)]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center`,children:[i===`before`&&l,o,(0,F.jsx)(`span`,{children:e}),i===`after`&&l]}),(0,F.jsxs)(`div`,{className:`flex items-center`,children:[a,n&&(0,F.jsx)(be,{status:n})]})]}),s&&(typeof t==`string`?(0,F.jsx)(A,{children:t}):t)]})}var xe=e=>(0,F.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,...e,children:[(0,F.jsxs)(`g`,{clipPath:`url(#clip0_17463_15006)`,children:[(0,F.jsx)(`path`,{d:`M6 11C8.76142 11 11 8.76142 11 6C11 3.23858 8.76142 1 6 1C3.23858 1 1 3.23858 1 6C1 8.76142 3.23858 11 6 11Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`M6 8V6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`M6 4H6.00667`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),(0,F.jsx)(`defs`,{children:(0,F.jsx)(`clipPath`,{id:`clip0_17463_15006`,children:(0,F.jsx)(`rect`,{width:12,height:12,fill:`white`})})})]});function Se({profile:e}){let[t,r]=j.useState(!1);return(0,F.jsxs)(`div`,{className:`border border-neutral-700 rounded-md overflow-hidden`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:()=>r(e=>!e),"aria-expanded":t,"aria-label":`Toggle details for ${e.name}`,className:`w-full py-1.5 px-2 text-left flex items-center gap-2 hover:bg-neutral-700 transition-colors cursor-pointer`,children:[(0,F.jsx)(`span`,{className:`text-neutral-300`,children:t?(0,F.jsx)(u,{size:14}):(0,F.jsx)(n,{size:14})}),(0,F.jsx)(`span`,{className:`font-normal text-neutral-200 text-sm`,children:e.name})]}),t&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`hr`,{className:`border-neutral-700`}),(0,F.jsx)(`div`,{className:`px-3 py-2 text-xs text-neutral-300 font-mono whitespace-pre-wrap`,children:`model: ${e.model??`—`}\nbase_url: ${e.base_url??`—`}\napi_key: ${e.api_key_set?`set`:`not set`}`})]})]})}function Ce({conversationId:e,anchorEventId:t}){let n=h(e=>e.entriesByConversation),r=(e?n[e]??[]:[]).filter(e=>e.anchorEventId===t);return!e||r.length===0?null:(0,F.jsx)(`div`,{"data-testid":`model-messages`,className:`flex flex-col w-full`,children:r.map(e=>{if(e.switchedTo)return(0,F.jsx)(R,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(xe,{width:14,height:14,className:`shrink-0 text-neutral-400`,"aria-hidden":!0}),(0,F.jsx)(o,{i18nKey:a.MODEL$SWITCHED_TO_PROFILE,values:{name:e.switchedTo},components:{cmd:(0,F.jsx)(`span`,{className:`font-mono text-neutral-200 bg-neutral-800 px-1 rounded`})}})]}),details:``},e.id);let t=e.profiles.length===0;return(0,F.jsx)(R,{title:(0,F.jsx)(`span`,{children:t?(0,F.jsx)(o,{i18nKey:a.MODEL$NO_SAVED_PROFILES}):(0,F.jsx)(o,{i18nKey:a.MODEL$AVAILABLE_PROFILES,values:{count:e.profiles.length}})}),details:t?(0,F.jsx)(`span`,{className:`text-neutral-300 text-sm px-2 py-1 block`,children:(0,F.jsx)(o,{i18nKey:a.MODEL$NO_PROFILES_HINT})}):(0,F.jsx)(`div`,{className:`flex flex-col gap-1 mt-1`,children:e.profiles.map(e=>(0,F.jsx)(Se,{profile:e},e.name))}),initiallyExpanded:t},e.id)})})}var we=(0,j.createContext)(void 0);function Te({children:e,value:t}){let n=he(j.useRef(null)),r=t||n;return(0,F.jsx)(we.Provider,{value:r,children:e})}function Ee(){let e=(0,j.useContext)(we);if(e===void 0)throw Error(`useScrollContext must be used within a ScrollProvider`);return e}var De=()=>{let{setConversationMode:e}=b(),{send:t}=N(),{conversationId:n}=S(),r=d(e=>e.enqueuePendingMessage),i=d(e=>e.markPendingMessageError);return{handleBuildPlanClick:(0,j.useCallback)(a=>{a?.preventDefault(),a?.stopPropagation(),e(`code`);let o=`Execute the plan based on the .agents_tmp/PLAN.md file.`,s=new Date().toISOString(),c=n?r({conversationId:n,text:o,timestamp:s}):null;t(P(o,[],[],s)).catch(e=>{c&&i(c,e instanceof Error?e.message:`Failed to send message`)})},[e,t,n,r,i])}};function Oe(){let{conversationId:e}=oe(),{selectedTab:t,isRightPanelShown:n,setHasRightPanelToggled:r,setSelectedTab:i}=b(),{setSelectedTab:a}=ne(e),o=e=>{i(e),a(e)};return{selectTab:e=>{t===e&&n?r(!1):(o(e),n||r(!0))},navigateToTab:e=>{o(e),n||r(!0)},isTabActive:e=>n&&t===e,onTabChange:o,selectedTab:t,isRightPanelShown:n}}var z=300,ke=ge(`shine-text`);function Ae({planContent:e,isStreaming:t,isBuildDisabled:n}){let{t:r}=s(`openhands`),{navigateToTab:i}=Oe(),{handleBuildPlanClick:o}=De(),{scrollDomToBottom:c}=Ee(),l=()=>{i(`planner`)},u=(0,j.useCallback)(e=>{o(e),c()},[o,c]),d=(0,j.useMemo)(()=>e?e.length<=z?e:`${e.slice(0,z)}...`:``,[e]);return e?(0,F.jsxs)(`div`,{className:`bg-[var(--oh-surface)] border border-[#597FF4] rounded-[12px] w-full mt-2`,children:[(0,F.jsxs)(`div`,{className:`border-b border-[var(--oh-border)] flex h-[41px] items-center px-2 gap-1`,children:[(0,F.jsx)(de,{width:18,height:18,color:`var(--oh-muted)`}),(0,F.jsx)(k.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(a.COMMON$PLAN_MD)}),(0,F.jsx)(`div`,{className:`flex-1`}),(0,F.jsxs)(`button`,{type:`button`,onClick:l,className:`flex items-center gap-1 hover:opacity-80 transition-opacity cursor-pointer`,"data-testid":`plan-preview-view-button`,children:[(0,F.jsx)(k.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(a.COMMON$VIEW)}),(0,F.jsx)(ye,{className:`text-white`,size:18})]})]}),(0,F.jsx)(`div`,{"data-testid":`plan-preview-content`,className:`flex flex-col gap-[10px] p-4 text-[15px] text-white leading-[29px]`,children:d&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(A,{includeStandard:!0,components:t?ke:me,children:d}),e&&e.length>z&&(0,F.jsx)(`button`,{type:`button`,onClick:l,className:`text-[#4a67bd] cursor-pointer hover:underline text-left`,"data-testid":`plan-preview-read-more-button`,children:r(a.COMMON$READ_MORE)})]})}),(0,F.jsx)(`div`,{className:`border-t border-[var(--oh-border)] flex h-[54px] items-center justify-start px-4`,children:(0,F.jsx)(`button`,{type:`button`,onClick:u,disabled:n,className:v(`bg-white flex items-center justify-center h-[26px] px-2 rounded-[4px] w-[93px] transition-opacity`,n?`opacity-50 cursor-not-allowed`:`hover:opacity-90 cursor-pointer`),"data-testid":`plan-preview-build-button`,children:(0,F.jsxs)(k.Text,{className:`font-normal text-[14px] text-black leading-5`,children:[r(a.COMMON$BUILD),` `,(0,F.jsx)(k.Text,{className:`font-normal text-black`,children:`⌘↩`})]})})})]}):null}function je({errorId:e,defaultMessage:t}){let{t:n}=s(`openhands`),[r,i]=j.useState(!1);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 my-2 py-2 text-sm w-full`,children:[(0,F.jsxs)(`div`,{className:`font-bold text-danger`,children:[n(e&&c.exists(e)?e:`CHAT_INTERFACE$AGENT_ERROR_MESSAGE`),(0,F.jsx)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`cursor-pointer text-left`,children:r?(0,F.jsx)(L,{className:`h-4 w-4 ml-2 inline fill-danger`}):(0,F.jsx)(I,{className:`h-4 w-4 ml-2 inline fill-danger`})})]}),r&&(0,F.jsx)(A,{children:t})]})}function Me({event:e}){return ce(e)?(0,F.jsx)(je,{errorId:e.id,defaultMessage:e.error}):null}function B({type:e,message:t,children:n,actions:r,isFromPlanningAgent:i=!1,pendingStatus:o,onRetry:c}){let{t:l}=s(`openhands`),[u,d]=j.useState(!1),[f,p]=j.useState(!1);return j.useEffect(()=>{let e;return f&&(e=setTimeout(()=>{p(!1)},2e3)),()=>{clearTimeout(e)}},[f]),(0,F.jsxs)(`article`,{"data-testid":`${e}-message`,"data-pending-status":o,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),className:v(`rounded-xl relative w-fit max-w-full last:mb-4`,`flex flex-col gap-2`,e===`user`&&`p-4 bg-tertiary self-end`,e===`agent`&&`mt-6 w-full max-w-full bg-transparent`,i&&e===`agent`&&`border border-[#597ff4] bg-tertiary p-4 mt-2`,o===`sending`&&`opacity-60`,o===`error`&&`border border-status-fail-border`),children:[(0,F.jsxs)(`div`,{className:v(`absolute -top-2.5 -right-2.5`,u?`flex`:`hidden`,`items-center gap-1`),children:[r?.map((e,t)=>e.tooltip?(0,F.jsx)(ee,{content:e.tooltip,placement:`top`,children:(0,F.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":e.tooltip,children:e.icon})},t):(0,F.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":`Action ${t+1}`,children:e.icon},t)),(0,F.jsx)(fe,{isHidden:!u,isDisabled:f,onClick:async()=>{await navigator.clipboard.writeText(t),p(!0)},mode:f?`copied`:`copy`})]}),(0,F.jsx)(`div`,{className:`text-sm whitespace-normal [word-break:break-word]`,children:(0,F.jsx)(A,{includeStandard:!0,includeHeadings:!0,children:t})}),o===`sending`&&(0,F.jsx)(`span`,{role:`status`,"aria-live":`polite`,"data-testid":`chat-message-sending`,className:`self-end text-xs italic text-content-muted`,children:l(a.CHAT_INTERFACE$MESSAGE_SENDING)}),o===`error`&&(0,F.jsxs)(`span`,{role:`alert`,"data-testid":`chat-message-error`,className:`self-end text-xs text-status-fail-text`,children:[l(a.CHAT_INTERFACE$MESSAGE_SEND_FAILED),` `,c&&(0,F.jsx)(`button`,{type:`button`,onClick:c,className:`underline cursor-pointer`,"data-testid":`chat-message-retry`,children:l(a.CHAT_INTERFACE$MESSAGE_RETRY)})]}),n]})}function Ne({width:e=20,height:t=20,active:n}){return(0,F.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M11.204 15.0037L6.65511 9.99993L11.204 4.99617L12.1289 5.83701L8.34444 9.99993L12.1289 14.1628L11.204 15.0037Z`,fill:n?`var(--oh-text-tertiary)`:`var(--oh-border)`})})}function Pe({width:e=20,height:t=20,active:n}){return(0,F.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.79602 4.99634L13.3449 10.0001L8.79602 15.0038L7.87109 14.163L11.6556 10.0001L7.87109 5.83718L8.79602 4.99634Z`,fill:n?`var(--oh-text-tertiary)`:`var(--oh-border)`})})}function Fe({onClick:e,className:t}){return(0,F.jsx)(`button`,{type:`button`,onClick:e,className:v(`bg-[var(--oh-muted)] rounded-full w-5 h-5 flex items-center justify-center cursor-pointer`,t),children:(0,F.jsx)(ae,{width:18,height:18})})}function Ie({src:e,size:t=`small`}){return(0,F.jsx)(`img`,{role:`img`,alt:``,src:e,className:v(`rounded-sm object-cover`,t===`small`&&`w-[62px] h-[62px]`,t===`large`&&`w-[100px] h-[100px]`)})}function Le({src:e,onRemove:t,size:n=`small`}){return(0,F.jsxs)(`div`,{"data-testid":`image-preview`,className:`relative w-fit shrink-0 py-1`,children:[(0,F.jsx)(Ie,{src:e,size:n}),t&&(0,F.jsx)(Fe,{onClick:t,className:`absolute right-[3px] top-[3px] cursor-pointer`})]})}function Re({size:e=`small`,images:t,onRemove:n}){let r=j.useRef(null),[i,a]=j.useState(!1),[o,s]=j.useState(!0),[c,l]=j.useState(!1);return j.useEffect(()=>{let e=r.current;e&&a(e.scrollWidth>e.clientWidth)},[t]),(0,F.jsxs)(`div`,{"data-testid":`image-carousel`,className:`relative`,children:[i&&(0,F.jsx)(`div`,{className:`absolute right-full transform top-1/2 -translate-y-1/2`,children:(0,F.jsx)(Ne,{active:!o})}),(0,F.jsx)(`div`,{ref:r,onScroll:e=>{let t=e.currentTarget;s(t.scrollLeft===0),l(t.scrollLeft+t.clientWidth===t.scrollWidth)},className:v(`flex overflow-x-auto`,e===`small`&&`gap-2`,e===`large`&&`gap-4`),children:t.map((t,r)=>(0,F.jsx)(Le,{size:e,src:t,onRemove:n?()=>n?.(r):void 0},r))}),i&&(0,F.jsx)(`div`,{className:`absolute left-full transform top-1/2 -translate-y-1/2`,children:(0,F.jsx)(Pe,{active:!c})})]})}function ze({type:e,onClick:t}){let{t:n}=s(`openhands`),r=e===`confirm`,i=n(r?a.ACTION$CONFIRM:a.ACTION$REJECT),o=n(r?a.CHAT_INTERFACE$USER_CONFIRMED:a.CHAT_INTERFACE$USER_REJECTED),c=r?`${n(a.CHAT_INTERFACE$INPUT_CONTINUE_MESSAGE)} ⌘↩`:`${n(a.BUTTON$CANCEL)} ⇧⌘⌫`;return(0,F.jsx)(ee,{closeDelay:100,content:o,children:(0,F.jsx)(`button`,{"data-testid":`action-${e}-button`,type:`button`,"aria-label":i,className:v(`rounded px-2 h-6.5 text-sm font-normal leading-5 cursor-pointer hover:opacity-80`,e===`confirm`?`bg-tertiary text-white`:`bg-white text-base`),onClick:t,children:c})})}function Be({className:e,content:t,icon:n,severity:r,title:i}){return r===`high`?(0,F.jsxs)(`div`,{className:v(`flex items-center gap-3.5 bg-[#4A0709] border border-[#FF0006] text-red-400 rounded-xl px-3.5 h-13 text-sm text-white`,e),children:[n&&(0,F.jsx)(`span`,{className:``,children:n}),(0,F.jsx)(`span`,{className:`font-bold`,children:i}),(0,F.jsx)(`span`,{className:`font-normal`,children:t})]}):null}var Ve=e=>(0,F.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,F.jsx)(`path`,{d:`M12 14C11.4477 14 11 13.5523 11 13V10C11 9.44772 11.4477 9 12 9C12.5523 9 13 9.44772 13 10V13C13 13.5523 12.5523 14 12 14Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M10.5 16.5C10.5 15.6716 11.1716 15 12 15C12.8284 15 13.5 15.6716 13.5 16.5C13.5 17.3284 12.8284 18 12 18C11.1716 18 10.5 17.3284 10.5 16.5Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M10.2301 3.2156C10.98 1.79093 13.02 1.79092 13.7698 3.2156L22.1135 19.0685C22.8144 20.4003 21.8486 22 20.3436 22H3.65635C2.15133 22 1.18556 20.4003 1.88651 19.0685L10.2301 3.2156ZM20.3436 20L12 4.1471L3.65635 20L20.3436 20Z`,fill:`currentColor`})]}),He=te(e=>({submittedEventIds:[],addSubmittedEventId:t=>e(e=>({submittedEventIds:[...e.submittedEventIds,t]})),removeSubmittedEventId:t=>e(e=>({submittedEventIds:e.submittedEventIds.filter(e=>e!==t)}))})),Ue=()=>r({mutationKey:[`respond-to-confirmation`],mutationFn:async({conversationId:e,conversationUrl:t,sessionApiKey:n,accept:r})=>{let i={accept:r};return f.respondToConfirmation(e,t,i,n)}});function We(){let e=He(e=>e.submittedEventIds),t=He(e=>e.addSubmittedEventId),{t:n}=s(`openhands`),{data:r}=se(),{curAgentState:i}=C(),{mutate:o}=Ue(),c=ue(e=>e.events).slice().reverse().find(e=>e.source===`agent`?i===_.AWAITING_USER_CONFIRMATION:!1),l=(0,j.useCallback)(e=>{!c||!r||(t(c.id),o({conversationId:r.id,conversationUrl:r.conversation_url||``,sessionApiKey:r.session_api_key,accept:e}))},[c,r,t,o]);return(0,j.useEffect)(()=>{if(!c)return;let e=e=>{e.shiftKey&&e.metaKey&&e.key===`Backspace`&&(e.preventDefault(),l(!1))},t=e=>{e.metaKey&&e.key===`Enter`&&(e.preventDefault(),l(!0))},n=n=>{e(n),t(n)};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[c,l]),i!==_.AWAITING_USER_CONFIRMATION||!c||e.includes(c.id)?null:(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 pt-4`,children:[(T(c)?c.security_risk:x.UNKNOWN)===x.HIGH&&(0,F.jsx)(Be,{content:n(a.CHAT_INTERFACE$HIGH_RISK_WARNING),icon:(0,F.jsx)(Ve,{width:16,height:16,color:`#fff`}),severity:`high`,title:n(a.COMMON$HIGH_RISK)}),(0,F.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,F.jsx)(`p`,{className:`text-sm font-normal text-white`,children:n(a.CHAT_INTERFACE$USER_ASK_CONFIRMATION)}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,F.jsx)(ze,{type:`reject`,onClick:()=>l(!1)}),(0,F.jsx)(ze,{type:`confirm`,onClick:()=>l(!0)})]})]})]})}var Ge=e=>{let t=e.llm_message;if(!t?.content)return``;let n=``;if(t.content&&(Array.isArray(t.content)?n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{u as n}from"./path-utils-D1ZtqFC7.js";import{t as r}from"./useMutation-CRJwk4cR.js";import{o as i,t as a}from"./declaration-C9nuq2Dj.js";import{t as o}from"./Trans-D43bd3yR.js";import{t as s}from"./useTranslation-01pF7z10.js";import{a as c}from"./i18n-DkYgs32x.js";import{t as l}from"./createLucideIcon-Ddu8jDOQ.js";import{t as u}from"./chevron-down-Bnmd5iG-.js";import{d,l as f,m as p,n as m,u as h}from"./conversation-websocket-context-B0Gd3yiT.js";import{T as g,_,t as v}from"./utils-Czcl6buL.js";import{t as y}from"./use-config-Bcz2JL2t.js";import{t as ee}from"./styled-tooltip-Awq4HMw3.js";import{t as te}from"./react-Do0CT17Y.js";import{s as ne}from"./conversation-local-storage-UYl-SX-r.js";import{t as b}from"./conversation-store-Z5iMCRpc.js";import{n as x}from"./common-SMkEaBSr.js";import{n as re}from"./vendor~root-layout~conversation-panel~conversation~shared-conversation-DrXgiSCq.js";import{t as ie}from"./skills-BN8atjgW.js";import{t as ae}from"./close-SnIy2eLD.js";import{n as S,t as oe}from"./use-conversation-id-BOaaZahn.js";import{t as se}from"./use-active-conversation-Bu5J9iLy.js";import{t as C}from"./use-agent-state-DN9Nc5pP.js";import{C as w,a as ce,g as le,i as T,r as E,t as ue,v as D,y as O}from"./use-event-store-CQZCcVz-.js";import{r as k}from"./typography-BbaUAC4V.js";import{t as de}from"./lesson-plan-CmkRbe6Z.js";import{n as fe,t as A}from"./markdown-renderer-wZnLDbA1.js";import{t as pe}from"./u-check-circle-DHGiAi-w.js";import{n as me,r as he,t as ge}from"./plan-components-gOm-daR3.js";import{n as _e,t as ve}from"./u-check-circle-half-BPcWtWwv.js";var ye=l(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),j=e(t(),1),M=function(e){return e.INIT=`initialize`,e.MESSAGE=`message`,e.SYSTEM=`system`,e.READ=`read`,e.WRITE=`write`,e.RUN=`run`,e.RUN_IPYTHON=`run_ipython`,e.BROWSE=`browse`,e.BROWSE_INTERACTIVE=`browse_interactive`,e.DELEGATE=`delegate`,e.THINK=`think`,e.FINISH=`finish`,e.REJECT=`reject`,e.CHANGE_AGENT_STATE=`change_agent_state`,e.MCP=`call_tool_mcp`,e.TASK_TRACKING=`task_tracking`,e}(M||{});function N(){let{conversationId:e}=S(),t=m();return{send:(0,j.useCallback)(async e=>{if(t){let{action:n,args:r}=e;if(n===`message`&&r?.content){let e=[{type:`text`,text:r.content}];return r.image_urls&&r.image_urls.length>0&&e.push({type:`image`,image_urls:r.image_urls}),await t.sendMessage({role:`user`,content:e})}return{queued:!1}}return{queued:!1}},[t,e])}}function P(e,t,n,r){return{action:M.MESSAGE,args:{content:e,image_urls:t,file_urls:n,timestamp:r}}}var F=i(),I=e=>(0,F.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,F.jsx)(`path`,{d:`M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z`})}),L=e=>(0,F.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 448 512`,...e,children:(0,F.jsx)(`path`,{d:`M201.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 205.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z`})});function be({status:e}){return(0,F.jsx)(`span`,{className:`flex-shrink-0`,children:e===`timeout`&&(0,F.jsx)(re,{"data-testid":`status-icon`,className:`h-4 w-4 ml-2 inline fill-yellow-500`})})}function R({title:e,details:t,success:n,initiallyExpanded:r=!1,chevronPosition:i=`after`,titleTrailing:a,titleIcon:o}){let[s,c]=j.useState(r),l=t?(0,F.jsx)(`button`,{type:`button`,onClick:()=>c(e=>!e),className:`cursor-pointer text-left`,"aria-label":s?`Collapse`:`Expand`,children:s?(0,F.jsx)(L,{className:v(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)}):(0,F.jsx)(I,{className:v(`h-4 w-4 inline fill-[var(--oh-muted)]`,i===`after`?`ml-2`:`mr-2`)})}):null;return(0,F.jsxs)(`div`,{className:`flex flex-col gap-1.5 my-1 py-1 text-sm w-full`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between font-normal text-[var(--oh-muted)]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center`,children:[i===`before`&&l,o,(0,F.jsx)(`span`,{children:e}),i===`after`&&l]}),(0,F.jsxs)(`div`,{className:`flex items-center`,children:[a,n&&(0,F.jsx)(be,{status:n})]})]}),s&&(typeof t==`string`?(0,F.jsx)(A,{children:t}):t)]})}var xe=e=>(0,F.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:12,height:12,viewBox:`0 0 12 12`,fill:`none`,...e,children:[(0,F.jsxs)(`g`,{clipPath:`url(#clip0_17463_15006)`,children:[(0,F.jsx)(`path`,{d:`M6 11C8.76142 11 11 8.76142 11 6C11 3.23858 8.76142 1 6 1C3.23858 1 1 3.23858 1 6C1 8.76142 3.23858 11 6 11Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`M6 8V6`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`M6 4H6.00667`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`})]}),(0,F.jsx)(`defs`,{children:(0,F.jsx)(`clipPath`,{id:`clip0_17463_15006`,children:(0,F.jsx)(`rect`,{width:12,height:12,fill:`white`})})})]});function Se({profile:e}){let[t,r]=j.useState(!1);return(0,F.jsxs)(`div`,{className:`border border-neutral-700 rounded-md overflow-hidden`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:()=>r(e=>!e),"aria-expanded":t,"aria-label":`Toggle details for ${e.name}`,className:`w-full py-1.5 px-2 text-left flex items-center gap-2 hover:bg-neutral-700 transition-colors cursor-pointer`,children:[(0,F.jsx)(`span`,{className:`text-neutral-300`,children:t?(0,F.jsx)(u,{size:14}):(0,F.jsx)(n,{size:14})}),(0,F.jsx)(`span`,{className:`font-normal text-neutral-200 text-sm`,children:e.name})]}),t&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`hr`,{className:`border-neutral-700`}),(0,F.jsx)(`div`,{className:`px-3 py-2 text-xs text-neutral-300 font-mono whitespace-pre-wrap`,children:`model: ${e.model??`—`}\nbase_url: ${e.base_url??`—`}\napi_key: ${e.api_key_set?`set`:`not set`}`})]})]})}function Ce({conversationId:e,anchorEventId:t}){let n=h(e=>e.entriesByConversation),r=(e?n[e]??[]:[]).filter(e=>e.anchorEventId===t);return!e||r.length===0?null:(0,F.jsx)(`div`,{"data-testid":`model-messages`,className:`flex flex-col w-full`,children:r.map(e=>{if(e.switchedTo)return(0,F.jsx)(R,{title:(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,F.jsx)(xe,{width:14,height:14,className:`shrink-0 text-neutral-400`,"aria-hidden":!0}),(0,F.jsx)(o,{i18nKey:a.MODEL$SWITCHED_TO_PROFILE,values:{name:e.switchedTo},components:{cmd:(0,F.jsx)(`span`,{className:`font-mono text-neutral-200 bg-neutral-800 px-1 rounded`})}})]}),details:``},e.id);let t=e.profiles.length===0;return(0,F.jsx)(R,{title:(0,F.jsx)(`span`,{children:t?(0,F.jsx)(o,{i18nKey:a.MODEL$NO_SAVED_PROFILES}):(0,F.jsx)(o,{i18nKey:a.MODEL$AVAILABLE_PROFILES,values:{count:e.profiles.length}})}),details:t?(0,F.jsx)(`span`,{className:`text-neutral-300 text-sm px-2 py-1 block`,children:(0,F.jsx)(o,{i18nKey:a.MODEL$NO_PROFILES_HINT})}):(0,F.jsx)(`div`,{className:`flex flex-col gap-1 mt-1`,children:e.profiles.map(e=>(0,F.jsx)(Se,{profile:e},e.name))}),initiallyExpanded:t},e.id)})})}var we=(0,j.createContext)(void 0);function Te({children:e,value:t}){let n=he(j.useRef(null)),r=t||n;return(0,F.jsx)(we.Provider,{value:r,children:e})}function Ee(){let e=(0,j.useContext)(we);if(e===void 0)throw Error(`useScrollContext must be used within a ScrollProvider`);return e}var De=()=>{let{setConversationMode:e}=b(),{send:t}=N(),{conversationId:n}=S(),r=d(e=>e.enqueuePendingMessage),i=d(e=>e.markPendingMessageError);return{handleBuildPlanClick:(0,j.useCallback)(a=>{a?.preventDefault(),a?.stopPropagation(),e(`code`);let o=`Execute the plan based on the .agents_tmp/PLAN.md file.`,s=new Date().toISOString(),c=n?r({conversationId:n,text:o,timestamp:s}):null;t(P(o,[],[],s)).catch(e=>{c&&i(c,e instanceof Error?e.message:`Failed to send message`)})},[e,t,n,r,i])}};function Oe(){let{conversationId:e}=oe(),{selectedTab:t,isRightPanelShown:n,setHasRightPanelToggled:r,setSelectedTab:i}=b(),{setSelectedTab:a}=ne(e),o=e=>{i(e),a(e)};return{selectTab:e=>{t===e&&n?r(!1):(o(e),n||r(!0))},navigateToTab:e=>{o(e),n||r(!0)},isTabActive:e=>n&&t===e,onTabChange:o,selectedTab:t,isRightPanelShown:n}}var z=300,ke=ge(`shine-text`);function Ae({planContent:e,isStreaming:t,isBuildDisabled:n}){let{t:r}=s(`openhands`),{navigateToTab:i}=Oe(),{handleBuildPlanClick:o}=De(),{scrollDomToBottom:c}=Ee(),l=()=>{i(`planner`)},u=(0,j.useCallback)(e=>{o(e),c()},[o,c]),d=(0,j.useMemo)(()=>e?e.length<=z?e:`${e.slice(0,z)}...`:``,[e]);return e?(0,F.jsxs)(`div`,{className:`bg-[var(--oh-surface)] border border-[#597FF4] rounded-[12px] w-full mt-2`,children:[(0,F.jsxs)(`div`,{className:`border-b border-[var(--oh-border)] flex h-[41px] items-center px-2 gap-1`,children:[(0,F.jsx)(de,{width:18,height:18,color:`var(--oh-muted)`}),(0,F.jsx)(k.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(a.COMMON$PLAN_MD)}),(0,F.jsx)(`div`,{className:`flex-1`}),(0,F.jsxs)(`button`,{type:`button`,onClick:l,className:`flex items-center gap-1 hover:opacity-80 transition-opacity cursor-pointer`,"data-testid":`plan-preview-view-button`,children:[(0,F.jsx)(k.Text,{className:`font-normal text-[11px] text-white tracking-[0.11px] leading-4`,children:r(a.COMMON$VIEW)}),(0,F.jsx)(ye,{className:`text-white`,size:18})]})]}),(0,F.jsx)(`div`,{"data-testid":`plan-preview-content`,className:`flex flex-col gap-[10px] p-4 text-[15px] text-white leading-[29px]`,children:d&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(A,{includeStandard:!0,components:t?ke:me,children:d}),e&&e.length>z&&(0,F.jsx)(`button`,{type:`button`,onClick:l,className:`text-[#4a67bd] cursor-pointer hover:underline text-left`,"data-testid":`plan-preview-read-more-button`,children:r(a.COMMON$READ_MORE)})]})}),(0,F.jsx)(`div`,{className:`border-t border-[var(--oh-border)] flex h-[54px] items-center justify-start px-4`,children:(0,F.jsx)(`button`,{type:`button`,onClick:u,disabled:n,className:v(`bg-white flex items-center justify-center h-[26px] px-2 rounded-[4px] w-[93px] transition-opacity`,n?`opacity-50 cursor-not-allowed`:`hover:opacity-90 cursor-pointer`),"data-testid":`plan-preview-build-button`,children:(0,F.jsxs)(k.Text,{className:`font-normal text-[14px] text-black leading-5`,children:[r(a.COMMON$BUILD),` `,(0,F.jsx)(k.Text,{className:`font-normal text-black`,children:`⌘↩`})]})})})]}):null}function je({errorId:e,defaultMessage:t}){let{t:n}=s(`openhands`),[r,i]=j.useState(!1);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 my-2 py-2 text-sm w-full`,children:[(0,F.jsxs)(`div`,{className:`font-bold text-danger`,children:[n(e&&c.exists(e)?e:`CHAT_INTERFACE$AGENT_ERROR_MESSAGE`),(0,F.jsx)(`button`,{type:`button`,onClick:()=>i(e=>!e),className:`cursor-pointer text-left`,children:r?(0,F.jsx)(L,{className:`h-4 w-4 ml-2 inline fill-danger`}):(0,F.jsx)(I,{className:`h-4 w-4 ml-2 inline fill-danger`})})]}),r&&(0,F.jsx)(A,{children:t})]})}function Me({event:e}){return ce(e)?(0,F.jsx)(je,{errorId:e.id,defaultMessage:e.error}):null}function B({type:e,message:t,children:n,actions:r,isFromPlanningAgent:i=!1,pendingStatus:o,onRetry:c}){let{t:l}=s(`openhands`),[u,d]=j.useState(!1),[f,p]=j.useState(!1);return j.useEffect(()=>{let e;return f&&(e=setTimeout(()=>{p(!1)},2e3)),()=>{clearTimeout(e)}},[f]),(0,F.jsxs)(`article`,{"data-testid":`${e}-message`,"data-pending-status":o,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),className:v(`rounded-xl relative w-fit max-w-full last:mb-4`,`flex flex-col gap-2`,e===`user`&&`p-4 bg-tertiary self-end`,e===`agent`&&`mt-6 w-full max-w-full bg-transparent`,i&&e===`agent`&&`border border-[#597ff4] bg-tertiary p-4 mt-2`,o===`sending`&&`opacity-60`,o===`error`&&`border border-status-fail-border`),children:[(0,F.jsxs)(`div`,{className:v(`absolute -top-2.5 -right-2.5`,u?`flex`:`hidden`,`items-center gap-1`),children:[r?.map((e,t)=>e.tooltip?(0,F.jsx)(ee,{content:e.tooltip,placement:`top`,children:(0,F.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":e.tooltip,children:e.icon})},t):(0,F.jsx)(`button`,{type:`button`,onClick:e.onClick,className:`button-base p-1 cursor-pointer`,"aria-label":`Action ${t+1}`,children:e.icon},t)),(0,F.jsx)(fe,{isHidden:!u,isDisabled:f,onClick:async()=>{await navigator.clipboard.writeText(t),p(!0)},mode:f?`copied`:`copy`})]}),(0,F.jsx)(`div`,{className:`text-sm whitespace-normal [word-break:break-word]`,children:(0,F.jsx)(A,{includeStandard:!0,includeHeadings:!0,children:t})}),o===`sending`&&(0,F.jsx)(`span`,{role:`status`,"aria-live":`polite`,"data-testid":`chat-message-sending`,className:`self-end text-xs italic text-content-muted`,children:l(a.CHAT_INTERFACE$MESSAGE_SENDING)}),o===`error`&&(0,F.jsxs)(`span`,{role:`alert`,"data-testid":`chat-message-error`,className:`self-end text-xs text-status-fail-text`,children:[l(a.CHAT_INTERFACE$MESSAGE_SEND_FAILED),` `,c&&(0,F.jsx)(`button`,{type:`button`,onClick:c,className:`underline cursor-pointer`,"data-testid":`chat-message-retry`,children:l(a.CHAT_INTERFACE$MESSAGE_RETRY)})]}),n]})}function Ne({width:e=20,height:t=20,active:n}){return(0,F.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M11.204 15.0037L6.65511 9.99993L11.204 4.99617L12.1289 5.83701L8.34444 9.99993L12.1289 14.1628L11.204 15.0037Z`,fill:n?`var(--oh-text-tertiary)`:`var(--oh-border)`})})}function Pe({width:e=20,height:t=20,active:n}){return(0,F.jsx)(`svg`,{width:e,height:t,viewBox:`0 0 ${e} ${t}`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M8.79602 4.99634L13.3449 10.0001L8.79602 15.0038L7.87109 14.163L11.6556 10.0001L7.87109 5.83718L8.79602 4.99634Z`,fill:n?`var(--oh-text-tertiary)`:`var(--oh-border)`})})}function Fe({onClick:e,className:t}){return(0,F.jsx)(`button`,{type:`button`,onClick:e,className:v(`bg-[var(--oh-muted)] rounded-full w-5 h-5 flex items-center justify-center cursor-pointer`,t),children:(0,F.jsx)(ae,{width:18,height:18})})}function Ie({src:e,size:t=`small`}){return(0,F.jsx)(`img`,{role:`img`,alt:``,src:e,className:v(`rounded-sm object-cover`,t===`small`&&`w-[62px] h-[62px]`,t===`large`&&`w-[100px] h-[100px]`)})}function Le({src:e,onRemove:t,size:n=`small`}){return(0,F.jsxs)(`div`,{"data-testid":`image-preview`,className:`relative w-fit shrink-0 py-1`,children:[(0,F.jsx)(Ie,{src:e,size:n}),t&&(0,F.jsx)(Fe,{onClick:t,className:`absolute right-[3px] top-[3px] cursor-pointer`})]})}function Re({size:e=`small`,images:t,onRemove:n}){let r=j.useRef(null),[i,a]=j.useState(!1),[o,s]=j.useState(!0),[c,l]=j.useState(!1);return j.useEffect(()=>{let e=r.current;e&&a(e.scrollWidth>e.clientWidth)},[t]),(0,F.jsxs)(`div`,{"data-testid":`image-carousel`,className:`relative`,children:[i&&(0,F.jsx)(`div`,{className:`absolute right-full transform top-1/2 -translate-y-1/2`,children:(0,F.jsx)(Ne,{active:!o})}),(0,F.jsx)(`div`,{ref:r,onScroll:e=>{let t=e.currentTarget;s(t.scrollLeft===0),l(t.scrollLeft+t.clientWidth===t.scrollWidth)},className:v(`flex overflow-x-auto`,e===`small`&&`gap-2`,e===`large`&&`gap-4`),children:t.map((t,r)=>(0,F.jsx)(Le,{size:e,src:t,onRemove:n?()=>n?.(r):void 0},r))}),i&&(0,F.jsx)(`div`,{className:`absolute left-full transform top-1/2 -translate-y-1/2`,children:(0,F.jsx)(Pe,{active:!c})})]})}function ze({type:e,onClick:t}){let{t:n}=s(`openhands`),r=e===`confirm`,i=n(r?a.ACTION$CONFIRM:a.ACTION$REJECT),o=n(r?a.CHAT_INTERFACE$USER_CONFIRMED:a.CHAT_INTERFACE$USER_REJECTED),c=r?`${n(a.CHAT_INTERFACE$INPUT_CONTINUE_MESSAGE)} ⌘↩`:`${n(a.BUTTON$CANCEL)} ⇧⌘⌫`;return(0,F.jsx)(ee,{closeDelay:100,content:o,children:(0,F.jsx)(`button`,{"data-testid":`action-${e}-button`,type:`button`,"aria-label":i,className:v(`rounded px-2 h-6.5 text-sm font-normal leading-5 cursor-pointer hover:opacity-80`,e===`confirm`?`bg-tertiary text-white`:`bg-white text-base`),onClick:t,children:c})})}function Be({className:e,content:t,icon:n,severity:r,title:i}){return r===`high`?(0,F.jsxs)(`div`,{className:v(`flex items-center gap-3.5 bg-[#4A0709] border border-[#FF0006] text-red-400 rounded-xl px-3.5 h-13 text-sm text-white`,e),children:[n&&(0,F.jsx)(`span`,{className:``,children:n}),(0,F.jsx)(`span`,{className:`font-bold`,children:i}),(0,F.jsx)(`span`,{className:`font-normal`,children:t})]}):null}var Ve=e=>(0,F.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,F.jsx)(`path`,{d:`M12 14C11.4477 14 11 13.5523 11 13V10C11 9.44772 11.4477 9 12 9C12.5523 9 13 9.44772 13 10V13C13 13.5523 12.5523 14 12 14Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M10.5 16.5C10.5 15.6716 11.1716 15 12 15C12.8284 15 13.5 15.6716 13.5 16.5C13.5 17.3284 12.8284 18 12 18C11.1716 18 10.5 17.3284 10.5 16.5Z`,fill:`currentColor`}),(0,F.jsx)(`path`,{d:`M10.2301 3.2156C10.98 1.79093 13.02 1.79092 13.7698 3.2156L22.1135 19.0685C22.8144 20.4003 21.8486 22 20.3436 22H3.65635C2.15133 22 1.18556 20.4003 1.88651 19.0685L10.2301 3.2156ZM20.3436 20L12 4.1471L3.65635 20L20.3436 20Z`,fill:`currentColor`})]}),He=te(e=>({submittedEventIds:[],addSubmittedEventId:t=>e(e=>({submittedEventIds:[...e.submittedEventIds,t]})),removeSubmittedEventId:t=>e(e=>({submittedEventIds:e.submittedEventIds.filter(e=>e!==t)}))})),Ue=()=>r({mutationKey:[`respond-to-confirmation`],mutationFn:async({conversationId:e,conversationUrl:t,sessionApiKey:n,accept:r})=>{let i={accept:r};return f.respondToConfirmation(e,t,i,n)}});function We(){let e=He(e=>e.submittedEventIds),t=He(e=>e.addSubmittedEventId),{t:n}=s(`openhands`),{data:r}=se(),{curAgentState:i}=C(),{mutate:o}=Ue(),c=ue(e=>e.events).slice().reverse().find(e=>e.source===`agent`?i===_.AWAITING_USER_CONFIRMATION:!1),l=(0,j.useCallback)(e=>{!c||!r||(t(c.id),o({conversationId:r.id,conversationUrl:r.conversation_url||``,sessionApiKey:r.session_api_key,accept:e}))},[c,r,t,o]);return(0,j.useEffect)(()=>{if(!c)return;let e=e=>{e.shiftKey&&e.metaKey&&e.key===`Backspace`&&(e.preventDefault(),l(!1))},t=e=>{e.metaKey&&e.key===`Enter`&&(e.preventDefault(),l(!0))},n=n=>{e(n),t(n)};return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[c,l]),i!==_.AWAITING_USER_CONFIRMATION||!c||e.includes(c.id)?null:(0,F.jsxs)(`div`,{className:`flex flex-col gap-2 pt-4`,children:[(T(c)?c.security_risk:x.UNKNOWN)===x.HIGH&&(0,F.jsx)(Be,{content:n(a.CHAT_INTERFACE$HIGH_RISK_WARNING),icon:(0,F.jsx)(Ve,{width:16,height:16,color:`#fff`}),severity:`high`,title:n(a.COMMON$HIGH_RISK)}),(0,F.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,F.jsx)(`p`,{className:`text-sm font-normal text-white`,children:n(a.CHAT_INTERFACE$USER_ASK_CONFIRMATION)}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,F.jsx)(ze,{type:`reject`,onClick:()=>l(!1)}),(0,F.jsx)(ze,{type:`confirm`,onClick:()=>l(!0)})]})]})]})}var Ge=e=>{let t=e.llm_message;if(!t?.content)return``;let n=``;if(t.content&&(Array.isArray(t.content)?n=t.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
2
2
|
`):typeof t.content==`string`&&(n=t.content)),!(Array.isArray(t.content)&&t.content.some(e=>e.type===`image`)))return n;let r=c.t(`CHAT_INTERFACE$AUGMENTED_PROMPT_FILES_TITLE`);return n.split(r)[0]};function V({event:e,isLastMessage:t,isFromPlanningAgent:n}){let r=Ge(e),i=[];return Array.isArray(e.llm_message.content)&&e.llm_message.content.forEach(e=>{e.type===`image`&&i.push(...e.image_urls)}),(0,F.jsxs)(B,{type:e.source,message:r,isFromPlanningAgent:n,children:[i.length>0&&(0,F.jsx)(Re,{size:`small`,images:i}),t&&(0,F.jsx)(We,{})]})}var H=class{static isDevMode=!1;static message(e){this.isDevMode&&console.warn(JSON.stringify(JSON.parse(e.data.toString()),null,2))}static event(e,t){this.isDevMode&&console.warn(t||`EVENT`,e)}static warning(e){this.isDevMode&&console.warn(e)}static error(e){this.isDevMode&&console.error(e)}},Ke=e=>{let t=document.createElement(`textarea`);return t.innerHTML=e,t.value};function qe(e){let{children:t}=e,n=e=>{try{return Ke(e)}catch(t){return H.error(String(t)),e}};return Array.isArray(t)?(0,F.jsx)(`strong`,{className:`font-mono`,children:t.map(e=>typeof e==`string`?n(e):e)}):typeof t==`string`?(0,F.jsx)(`strong`,{className:`font-mono`,children:n(t)}):(0,F.jsx)(`strong`,{className:`font-mono`,children:t})}var Je=e=>{let t=document.createElement(`textarea`);return t.innerHTML=e,t.value},Ye=e=>e?e.endsWith(`/`)||e.endsWith(`\\`)?!0:!(e.split(/[/\\]/).pop()||``).includes(`.`):!1,Xe=e=>{if(!e)return``;let t=e.split(/[/\\]/),n=t[t.length-1];return Ye(e)&&!n.endsWith(`/`)?`${n}/`:n};function Ze(e){let{children:t}=e,n=e=>{try{let t=Je(e);return(0,F.jsx)(`span`,{className:`font-mono`,title:t,children:Xe(t)})}catch(t){return H.error(String(t)),(0,F.jsx)(`span`,{className:`font-mono`,children:e})}};return Array.isArray(t)?(0,F.jsx)(`strong`,{className:`font-mono`,children:t.map(e=>typeof e==`string`?n(e):e)}):typeof t==`string`?(0,F.jsx)(`strong`,{children:n(t)}):(0,F.jsx)(`strong`,{className:`font-mono`,children:t})}var U=1e3,Qe=e=>`\`\`\`json\n${JSON.stringify(e,null,2)}\n\`\`\``,$e=e=>{switch(e){case x.LOW:return c.t(`SECURITY$LOW_RISK`);case x.MEDIUM:return c.t(`SECURITY$MEDIUM_RISK`);case x.HIGH:return c.t(`SECURITY$HIGH_RISK`);case x.UNKNOWN:default:return c.t(`SECURITY$UNKNOWN_RISK`)}},W=()=>``,et=e=>e.name?`**Skill:** \`${e.name}\``:W(),tt=e=>{let{action:t}=e,n=[];return t.pattern&&n.push(`**Pattern:** \`${t.pattern}\``),t.path&&n.push(`**Path:** \`${t.path}\``),`include`in t&&t.include&&n.push(`**Include:** \`${t.include}\``),n.length>0?n.join(`
|
|
3
3
|
`):W()},nt=e=>{if(e.command!==`create`||!e.file_text)return W();let t=e.file_text;return t.length>1e3&&(t=`${t.slice(0,U)}...`),`${e.path}\n${t}`},rt=e=>{let t=`Command:\n\`${e.action.command}\``;return(e.security_risk===x.HIGH||e.security_risk===x.MEDIUM)&&(t+=`\n\n${$e(e.security_risk)}`),t},it=e=>{let t=`**MCP Tool Call**
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{o as r,t as i}from"./declaration-C9nuq2Dj.js";import{t as a}from"./useTranslation-01pF7z10.js";import{D as o,t as s}from"./utils-Czcl6buL.js";import{t as c}from"./agent-server-client-options-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{t as n}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{o as r,t as i}from"./declaration-C9nuq2Dj.js";import{t as a}from"./useTranslation-01pF7z10.js";import{D as o,t as s}from"./utils-Czcl6buL.js";import{t as c}from"./agent-server-client-options-8OJSXbm8.js";import{t as l}from"./llm-client-BpIfxETv.js";import{s as u}from"./brand-button-8fVVei4i.js";import{n as d,t as f}from"./vendor~home~mcp~llm-settings~agent-settings~condenser-settings~verification-settings~app-se~ocm3mykx-BQPOygpY.js";import{i as p}from"./combobox-caret-BMsz5mQX.js";import{n as m}from"./map-provider-COBVzZYo.js";import{l as h}from"./sdk-settings-schema-BY8dOy3a.js";var g=e(t(),1);function _(e){return null}_.getCollectionNode=function*(e){let{children:t,title:n,items:r}=e;yield{type:`section`,props:e,hasChildNodes:!0,rendered:n,"aria-label":e[`aria-label`],*childNodes(){if(typeof t==`function`){if(!r)throw Error(`props.children was a function but props.items is missing`);for(let e of r)yield{type:`item`,value:e,renderer:t}}else{let e=[];g.Children.forEach(t,t=>{e.push({type:`item`,element:t})}),yield*e}}}};var v=_,y=e=>{let[t,...n]=e.split(`/`);return!t||n.length===0?{provider:``,model:e,separator:``}:{provider:t,model:n.join(`/`),separator:`/`}};function b(e,t){if(!t)return e;let n=t.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(n))}function x(e,t){return t===void 0?e:e.filter(e=>e.verified===t)}function S(e,t){return!t||t<=0?e:e.slice(0,t)}var C=class{static async searchModels(e={},t){let n=new l(c()),r=t===void 0?n.getVerifiedModels():Promise.resolve(t),[i,a]=await Promise.all([n.getModels(),r]),o=e.provider__eq??null,s=new Set(o?a?.[o]??[]:[]),u=[...s].map(e=>({provider:o,name:e,verified:!0})),d=o?(i??[]).filter(e=>e.startsWith(`${o}/`)).map(e=>e.slice(o.length+1)).filter(e=>e.length>0&&!s.has(e)).map(e=>({provider:o,name:e,verified:!1})):[];return{items:S(x(b([...u,...d],e.query),e.verified__eq),e.limit),next_page_id:null}}static async searchProviders(e={},t){let n=new l(c()),r=t===void 0?n.getVerifiedModels():Promise.resolve(t),[i,a]=await Promise.all([n.getProviders(),r]),o=new Set(Object.keys(a??{}));return{items:S(x(b([...new Set([...o,...i??[]])].map(e=>({name:e,verified:o.has(e)})),e.query),e.verified__eq),e.limit),next_page_id:null}}},w=[`config`,`verified-models`],T=1e3*60*5,E=1e3*60*15;async function D(){return await new l(c()).getVerifiedModels()??{}}var O=()=>n({queryKey:[`config`,`providers`],queryFn:async({client:e})=>{let t=await e.fetchQuery({queryKey:w,queryFn:D,staleTime:T});return(await C.searchProviders({limit:100},t)).items},staleTime:T,gcTime:E}),k=10;async function A(e,t,n,r=0){if(r>=k)throw Error(`Too many pagination requests for provider ${e}`);let i=await C.searchModels({provider__eq:e,limit:100,page_id:n},t);if(i.next_page_id){let n=await A(e,t,i.next_page_id,r+1);return[...i.items,...n]}return i.items}var j=e=>n({queryKey:[`config`,`models`,e],queryFn:async({client:t})=>A(e,await t.fetchQuery({queryKey:w,queryFn:D,staleTime:T})),enabled:!!e,staleTime:T,gcTime:E}),M=()=>n({queryKey:w,queryFn:D,select:e=>e?.openhands??[],staleTime:T,gcTime:E}),N=new Set([`https://llm-proxy.app.all-hands.dev`,`https://llm-proxy.app.all-hands.dev/v1`]),P=`litellm_proxy/`,F=e=>e.trim().replace(/\/+$/,``);function I(e,t,n){if(!e)return``;if(!e.startsWith(P)||!t||!N.has(F(t)))return e;let r=e.slice(14);return n.includes(r)?`openhands/${r}`:e}var L=r();function R({isDisabled:e,currentModel:t,currentBaseUrl:n,onChange:r,onDefaultValuesChanged:c,wrapperClassName:l,labelClassName:_}){let[,b]=g.useState(null),[x,S]=g.useState(null),[C,w]=g.useState(null),{data:T=[]}=O(),{data:E}=M(),{data:D=[],isLoading:k,error:A}=j(x),N=g.useMemo(()=>T.filter(e=>e.verified),[T]),P=g.useMemo(()=>T.filter(e=>!e.verified),[T]),F=g.useMemo(()=>D.filter(e=>e.verified),[D]),R=g.useMemo(()=>D.filter(e=>!e.verified),[D]);g.useEffect(()=>{if(t&&E!==void 0){let e=I(t,n,E),{provider:r,model:i}=y(e);b(e),S(r||null),w(i),c?.(r||null,i)}},[t,n,E]);let z=e=>{S(e),w(null),b(`${e}/`),r?.(e,null)},B=e=>{let t=`${x}/${e}`;x===`openai`&&(t=e),b(t),w(e),r?.(x,e)},V=()=>{S(null),b(null)},{t:H}=a(`openhands`);return(0,L.jsxs)(`div`,{className:s(`flex flex-col md:flex-row w-full min-w-0 justify-between gap-4 md:gap-[46px]`,l),children:[(0,L.jsxs)(`fieldset`,{className:`flex flex-col gap-2.5 w-full`,children:[(0,L.jsx)(`label`,{className:s(`text-sm`,_),children:H(i.LLM$PROVIDER)}),(0,L.jsxs)(f,{"data-testid":`llm-provider-input`,isRequired:!0,isVirtualized:!1,name:`llm-provider-input`,isDisabled:e,"aria-label":H(i.LLM$PROVIDER),isClearable:!1,onSelectionChange:e=>{e?.toString()&&z(e.toString())},onInputChange:e=>!e&&V(),defaultSelectedKey:x??void 0,selectedKey:x,classNames:{popoverContent:`bg-content1 rounded-xl border border-[var(--oh-border)]`,selectorButton:p},selectorButtonProps:{disableRipple:!0},inputProps:{classNames:{inputWrapper:u}},children:[(0,L.jsx)(v,{title:H(i.MODEL_SELECTOR$VERIFIED),classNames:{heading:`text-[var(--oh-muted)]`},children:N.map(e=>(0,L.jsx)(d,{"data-testid":`provider-item-${e.name}`,children:m(e.name)},e.name))}),P.length>0?(0,L.jsx)(v,{title:H(i.MODEL_SELECTOR$OTHERS),classNames:{heading:`text-[var(--oh-muted)]`},children:P.map(e=>(0,L.jsx)(d,{children:m(e.name)},e.name))}):null]})]}),x===`openhands`&&(0,L.jsx)(h,{testId:`openhands-account-help`,text:H(i.SETTINGS$NEED_OPENHANDS_ACCOUNT),linkText:H(i.SETTINGS$CLICK_HERE),href:o.PRODUCTION,size:`settings`,linkColor:`white`}),(0,L.jsxs)(`fieldset`,{className:`flex flex-col gap-2.5 w-full`,children:[(0,L.jsx)(`label`,{className:s(`text-sm`,_),children:H(i.LLM$MODEL)}),(0,L.jsxs)(f,{"data-testid":`llm-model-input`,isRequired:!0,isVirtualized:!1,isLoading:k,name:`llm-model-input`,"aria-label":H(i.LLM$MODEL),isClearable:!1,onSelectionChange:e=>{e?.toString()&&B(e.toString())},isDisabled:e||!x,selectedKey:C,defaultSelectedKey:C??void 0,classNames:{popoverContent:`bg-content1 rounded-xl border border-[var(--oh-border)]`,selectorButton:p},selectorButtonProps:{disableRipple:!0},inputProps:{classNames:{inputWrapper:u}},children:[(0,L.jsx)(v,{title:H(i.MODEL_SELECTOR$VERIFIED),classNames:{heading:`text-[var(--oh-muted)]`},children:F.map(e=>(0,L.jsx)(d,{children:e.name},e.name))}),R.length>0?(0,L.jsx)(v,{title:H(i.MODEL_SELECTOR$OTHERS),classNames:{heading:`text-[var(--oh-muted)]`},children:R.map(e=>(0,L.jsx)(d,{"data-testid":`model-item-${e.name}`,children:e.name},e.name))}):null]}),A&&(0,L.jsx)(`p`,{"data-testid":`models-error`,className:`text-danger text-xs`,children:H(i.CONFIGURATION$ERROR_FETCH_MODELS)})]})]})}export{y as n,R as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-C9nuq2Dj.js";import{n as r}from"./navigation-context-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n}from"./declaration-C9nuq2Dj.js";import{n as r}from"./navigation-context-BFjstyH6.js";var i=e(t(),1),a=n();function o(e){return e.metaKey||e.altKey||e.ctrlKey||e.shiftKey}function s(e,t,n){return t===`/`||n?e===t:e===t||e.startsWith(`${t}/`)}var c=i.forwardRef(({to:e,replace:t=!1,end:n=!1,onClick:i,className:c,children:l,target:u,rel:d,...f},p)=>{let{currentPath:m,navigate:h}=r(),g=s(m,e,n),_=typeof c==`function`?c({isActive:g}):c,v=n=>{i?.(n),!(n.defaultPrevented||n.button!==0||o(n)||u===`_blank`)&&(n.preventDefault(),h(e,{replace:t}))};return(0,a.jsx)(`a`,{...f,ref:p,href:e,target:u,rel:d,onClick:v,className:_,"aria-current":g?`page`:void 0,children:l})});c.displayName=`NavigationLink`;export{c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./agent-server-client-options-
|
|
1
|
+
import{t as e}from"./agent-server-client-options-8OJSXbm8.js";import{t}from"./llm-client-BpIfxETv.js";import{r as n}from"./agent-server-compatibility-DvKtnXHw.js";var r=class{static async getModels(){let n=new t(e()),[r,i,a]=await Promise.all([n.getModels(),n.getVerifiedModels(),n.getProviders()]),o=Object.keys(i??{}).sort(),s=o.flatMap(e=>i[e]??[]);return{models:r??[],verified_models:s,verified_providers:a?.filter(e=>o.includes(e))??o,default_model:s[0]??r?.[0]??``}}static async getConfig(){return await n(),{posthog_client_key:null,feature_flags:{hide_llm_settings:!1,hide_users_page:!0},providers_configured:[],maintenance_start_time:null,recaptcha_site_key:null,faulty_models:[],error_message:null,updated_at:new Date().toISOString()}}};export{r as t};
|
package/build/assets/{organization-service.api-BAwDUJoL.js → organization-service.api-Ct2dZF8M.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{C as n,_ as r,b as i,c as a,k as o}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~b4cctr4k-B7YVdv1X.js";import{a as s,c,d as l,i as u,l as d,o as f,r as p,s as m,u as h}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{n as g}from"./QueryClientProvider-DITRCGAK.js";import{c as _}from"./agent-server-client-options-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{C as n,_ as r,b as i,c as a,k as o}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~b4cctr4k-B7YVdv1X.js";import{a as s,c,d as l,i as u,l as d,o as f,r as p,s as m,u as h}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{n as g}from"./QueryClientProvider-DITRCGAK.js";import{c as _}from"./agent-server-client-options-8OJSXbm8.js";import{r as v}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~pfbaerbd-zhv9fooy.js";import{t as y}from"./proxy-BMZyC45G.js";function b(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function x(e,t,n){let r=e.slice(0);return r[t]=n,r}var S=class extends o{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,a.batch(()=>{let e=this.#i,t=this.#p(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let r=t.map(e=>e.observer),i=r.map(e=>e.getCurrentResult()),a=e.length!==r.length,o=r.some((t,n)=>t!==e[n]),s=a||o,c=s?!0:i.some((e,t)=>{let r=this.#t[t];return!r||!n(e,r)});!s&&!c||(s&&(this.#l=t,this.#i=r),this.#t=i,this.hasListeners()&&(s&&(b(e,r).forEach(e=>{e.destroy()}),b(r,e).forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#p(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#d(e,t,n){if(t){let r=this.#c,a=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(!this.#a||this.#t!==this.#s||a||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=i(this.#a,t(e))),this.#a}return e}#f(){return this.#r?.combine!==void 0&&this.#i.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#p(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new l(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#m(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=x(this.#t,n,t),this.#h())}#h(){if(this.hasListeners()){let e=this.#u(this.#t,this.#l),t=this.#f(),n=this.#a,r=t?n:this.#d(e,this.#r?.combine);(t||n!==r)&&a.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},C=e(t(),1);function w({queries:e,...t},n){let i=g(n),o=h(),_=d(),v=C.useMemo(()=>e.map(e=>{let t=i.defaultQueryOptions(e);return t._optimisticResults=o?`isRestoring`:`optimistic`,t}),[e,i,o]);v.forEach(e=>{p(e),f(e,_,i.getQueryCache().get(e.queryHash))}),c(_);let[y]=C.useState(()=>new S(i,v,t)),[b,x,w]=y.getOptimisticResult(v,t.combine),T=!o&&t.subscribed!==!1;C.useSyncExternalStore(C.useCallback(e=>T?y.subscribe(a.batchCalls(e)):r,[y,T]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),C.useEffect(()=>{y.setQueries(v,t)},[v,t,y]);let E=b.some((e,t)=>s(v[t],e))?b.flatMap((e,t)=>{let n=v[t];return n&&s(n,e)?u(n,new l(i,n),_):[]}):[];if(E.length>0)throw Promise.all(E);let D=b.find((e,t)=>{let n=v[t];return n&&m({result:e,errorResetBoundary:_,throwOnError:n.throwOnError,query:i.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(D?.error)throw D.error;return x(w())}function T(e){return{items:e?.items??[],currentOrgId:e?.current_org_id??null}}function E(e){if(e)return e;let t=_().backend;if(t.kind!==`cloud`)throw Error(`Cloud organization calls require a cloud backend. Active backend is local.`);return t}async function D(e){return T(await y({backend:E(e),method:`GET`,path:`/api/organizations`}))}async function O(e){let t=E(e);try{return{orgId:(await y({backend:t,method:`GET`,path:`/api/keys/current`}))?.org_id??null,isLegacyKey:!1}}catch(e){if(v.isAxiosError(e)&&e.response?.status===400)return{orgId:null,isLegacyKey:!0};throw e}}async function k(e,t){let n=await y({backend:E(t),method:`GET`,path:`/api/organizations/${encodeURIComponent(e)}/me`});return{orgId:n?.org_id??e,userId:n?.user_id??``}}export{w as i,D as n,O as r,k as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,r as t}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~b4cctr4k-B7YVdv1X.js";import{d as n,n as r}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{t as i}from"./createLucideIcon-Ddu8jDOQ.js";import{c as a,t as o}from"./agent-server-client-options-
|
|
1
|
+
import{i as e,r as t}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~b4cctr4k-B7YVdv1X.js";import{d as n,n as r}from"./vendor~root~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-s~kyz9p27j-DlKA6SoO.js";import{t as i}from"./createLucideIcon-Ddu8jDOQ.js";import{c as a,t as o}from"./agent-server-client-options-8OJSXbm8.js";import{r as s,s as c,t as l}from"./agent-server-conversation-service.api-BdEre_71.js";var u=class extends n{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(n,r){let{state:i}=n,a=super.createResult(n,r),{isFetching:o,isRefetching:s,isError:c,isRefetchError:l}=a,u=i.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=o&&u===`forward`,p=c&&u===`backward`,m=o&&u===`backward`;return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:t(r,i.data),hasPreviousPage:e(r,i.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:s&&!f&&!m}}};function d(e,t){return r(e,u,t)}var f=i(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),p=async e=>{let t=(await l.batchGetAppConversations([e]))[0];if(!t)throw Error(`V1 conversation not found: ${e}`);return{conversationUrl:t.conversation_url,sessionApiKey:t.session_api_key,sandboxId:t.sandbox_id}},m=async e=>{let{conversationUrl:t,sessionApiKey:n,sandboxId:r}=await p(e);if(a().backend.kind===`cloud`){if(!r)throw Error(`Cannot stop runtime: cloud conversation ${e} has no sandbox_id.`);return await s(r),{success:!0}}return new c(o({conversationUrl:t,sessionApiKey:n})).interruptConversation(e)},h=async(e,t)=>{let{conversationUrl:n,sessionApiKey:r}=await p(e);return new c(o({conversationUrl:n,sessionApiKey:r})).askAgent(e,t)},g=async e=>{let{conversationUrl:t,sessionApiKey:n}=await p(e);return new c(o({conversationUrl:t,sessionApiKey:n})).runConversation(e)},_=(e,t,n)=>{e.setQueriesData({queryKey:[`user`,`conversation`,t]},e=>e&&{...e,...n}),e.setQueriesData({queryKey:[`user`,`conversations`]},e=>e&&{...e,pages:e.pages.map(e=>({...e,items:e.items.map(e=>e.id===t?{...e,...n}:e)}))})},v=(e,t,n)=>_(e,t,{execution_status:n}),y=(e,t,n)=>_(e,t,{llm_model:n}),b=(e,t)=>{e.invalidateQueries({queryKey:[`user`,`conversation`,t]}),e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`v1-batch-get-app-conversations`]}),e.invalidateQueries({queryKey:[`unified`,`vscode_url`]})},x=e=>{let t=e.match(/^\/workspace\/[^/]+\/(.*)$/);return t?t[1]:e},S=e=>{let t=e.trim();if(!t)return``;let n=t.replace(/[\\/]+$/,``);if(!n||/^[A-Za-z]:$/.test(n))return``;let r=Math.max(n.lastIndexOf(`/`),n.lastIndexOf(`\\`));return r>=0?n.slice(r+1):n};export{_ as a,v as c,d,b as i,y as l,x as n,m as o,h as r,g as s,S as t,f as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n,t as r}from"./declaration-C9nuq2Dj.js";import{t as i}from"./useTranslation-01pF7z10.js";import{t as a}from"./brand-button-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n,t as r}from"./declaration-C9nuq2Dj.js";import{t as i}from"./useTranslation-01pF7z10.js";import{t as a}from"./brand-button-8fVVei4i.js";import{t as o}from"./conversation-store-Z5iMCRpc.js";import{t as s}from"./lesson-plan-CmkRbe6Z.js";import{t as c}from"./use-handle-plan-click-CgrCGmT1.js";import{t as l}from"./markdown-renderer-wZnLDbA1.js";import{n as u,r as d}from"./plan-components-gOm-daR3.js";import{t as f}from"./conversation-tab-empty-state-BtFDbyTe.js";var p=e(t(),1),m=n();function h(){let{t:e}=i(`openhands`),{scrollRef:t,onChatBodyScroll:n,autoScroll:h,scrollDomToBottom:g}=d(p.useRef(null)),{planContent:_,conversationMode:v}=o();p.useEffect(()=>{h&&g()},[_,h,g]);let y=v===`plan`,{handlePlanClick:b}=c();return _==null?(0,m.jsx)(f,{icon:(0,m.jsx)(s,{}),action:(0,m.jsx)(a,{type:`button`,variant:`secondary`,onClick:b,isDisabled:y,className:`min-w-40 justify-center px-6`,children:e(r.COMMON$CREATE_A_PLAN)}),children:e(r.PLANNER$EMPTY_MESSAGE)}):(0,m.jsx)(`div`,{ref:t,onScroll:e=>n(e.currentTarget),className:`flex flex-col w-full h-full p-4 overflow-auto`,children:(0,m.jsx)(l,{includeStandard:!0,components:u,children:_})})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./agent-server-client-options-
|
|
1
|
+
import{o as e}from"./agent-server-client-options-8OJSXbm8.js";var t=class{constructor(t){this.host=t.host.replace(/\/$/,``),this.apiKey=t.apiKey,this.client=new e({baseUrl:this.host,apiKey:this.apiKey,timeout:t.timeout||6e4})}async listProfiles(){return(await this.client.get(`/api/profiles`)).data}async getProfile(e,t={}){let n={};return t.exposeSecrets&&(n[`X-Expose-Secrets`]=t.exposeSecrets),(await this.client.get(`/api/profiles/${encodeURIComponent(e)}`,{headers:n})).data}async saveProfile(e,t){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}`,t)).data}async deleteProfile(e){return(await this.client.delete(`/api/profiles/${encodeURIComponent(e)}`)).data}async renameProfile(e,t){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}/rename`,{new_name:t})).data}async activateProfile(e){return(await this.client.post(`/api/profiles/${encodeURIComponent(e)}/activate`,{})).data}close(){this.client.close()}};export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{a as n,n as r,t as i}from"./query-client-config-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{a as n,n as r,t as i}from"./query-client-config-CiK0GJJO.js";import{o as a}from"./declaration-C9nuq2Dj.js";import{n as o,t as s}from"./QueryClientProvider-DITRCGAK.js";import{t as c}from"./context-CEQZwATj.js";import{i as l,n as u,o as d,r as f}from"./i18n-DkYgs32x.js";import{t as p}from"./utils-Czcl6buL.js";import{t as m}from"./active-backend-context-CkP3ZEJs.js";import{t as h}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~jfc6hidu-VnmIZrq3.js";import{t as g}from"./option-service.api-DN0ZcGjw.js";import{i as _,t as v}from"./query-keys-tAsQcc_9.js";import{n as y,t as b}from"./agent-server-ui-style-scope-BwIZYdC1.js";var x=e(t());function S({i18n:e,defaultNS:t,children:n}){let r=(0,x.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,x.createElement)(c.Provider,{value:r},n)}var C=a(),w=`posthog_bootstrap`;function T(){let e=window.location.hash.substring(1),t=new URLSearchParams(e),n=t.get(`distinct_id`),r=t.get(`session_id`);if(n&&r){let e={distinctID:n,sessionID:r};return sessionStorage.setItem(w,JSON.stringify(e)),window.history.replaceState(null,``,window.location.pathname+window.location.search),e}let i=sessionStorage.getItem(w);if(i)return sessionStorage.removeItem(w),JSON.parse(i)}function E({children:e}){let t=o(),[n,r]=x.useState(null),[i,a]=x.useState(!0),s=x.useMemo(()=>T(),[]);return x.useEffect(()=>{(async()=>{try{r((await t.fetchQuery({queryKey:_.WEB_CLIENT_CONFIG,queryFn:g.getConfig,meta:{disableToast:!0},...v})).posthog_client_key)}catch{}finally{a(!1)}})()},[t]),i||!n?e:(0,C.jsx)(h,{apiKey:n,options:{api_host:`https://us.i.posthog.com`,person_profiles:`identified_only`,bootstrap:s},children:e})}function D({children:e,theme:t=y,className:n,style:r,styleOverrides:i,contentClassName:a,...o}){let s=x.useMemo(()=>({...b,...i,...r}),[r,i]);return(0,C.jsx)(`div`,{"data-agent-server-ui":``,...o,className:n,style:s,children:(0,C.jsx)(`div`,{className:p(t,a,`text-foreground`),"data-theme":t,children:e})})}var O={provider:`posthog`};function k({children:e,queryClient:t,analytics:a,i18n:o,className:c,contentClassName:p,style:h,styleOverrides:g,theme:_,withStyleRoot:v=!0}){let y=x.useMemo(()=>t??i(),[t]),b=x.useMemo(()=>o??f(),[o]),w=x.useRef(null);w.current||={queryClient:r(),i18n:l()},n(y),d(b),x.useEffect(()=>()=>{w.current&&(n(w.current.queryClient),d(w.current.i18n))},[]);let T=a&&a.provider===`posthog`?(0,C.jsx)(E,{children:e}):e;return(0,C.jsx)(S,{i18n:b,defaultNS:u,children:(0,C.jsx)(s,{client:y,children:(0,C.jsx)(m,{children:v?(0,C.jsx)(D,{className:c,contentClassName:p,style:h,styleOverrides:g,theme:_,children:T}):T})})})}export{O as n,D as r,k as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e,c as t,u as n,x as r}from"./agent-server-client-options-
|
|
1
|
+
import{b as e,c as t,u as n,x as r}from"./agent-server-client-options-8OJSXbm8.js";import{r as i}from"./vendor~root-layout~home~conversation-panel~conversation~launch~extensions-hub~skills-settin~pfbaerbd-zhv9fooy.js";function a(e){if(e.kind===`local`&&e.id===`default-local`){let e=r();if(e)return{"X-Session-API-Key":e}}return e.apiKey?e.kind===`cloud`?{Authorization:`Bearer ${e.apiKey}`}:{"X-Session-API-Key":e.apiKey}:{}}function o(e){let t=e.authMode??`bearer`;return t===`bearer`?a(e.backend):t===`session-api-key`&&e.sessionApiKey?{"X-Session-API-Key":e.sessionApiKey}:{}}async function s(r){let s=n(),c={...a(s),...e()},l=t(),u=l.backend.id===r.backend.id&&l.orgId?{"X-Org-Id":l.orgId}:{},d={...o(r),...u,...r.headers??{}},f=r.hostOverride??r.backend.host;return(await i.post(`${s.host.replace(/\/+$/,``)}/api/cloud-proxy`,{host:f,method:r.method,path:r.path,headers:d,body:r.body??null,...r.timeoutSeconds?{timeout_seconds:r.timeoutSeconds}:{}},{headers:c,timeout:3e4,...r.responseType?{responseType:r.responseType}:{}})).data}export{a as n,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-BFRubm34.js";import{O as t,S as n,T as r,_ as i,c as a,d as o,f as s,g as c,h as l,k as u,p as d,s as f,t as p,v as m}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~b4cctr4k-B7YVdv1X.js";import{t as h}from"./mutation-Cz7N4XAo.js";import{t as g}from"./declaration-C9nuq2Dj.js";import{a as _}from"./i18n-DkYgs32x.js";import{t as v}from"./retrieve-axios-error-message-BY-yIkIq.js";import{n as y}from"./custom-toast-handlers-BYxhSr3t.js";import{i as b}from"./health-store-BDC2rM-X.js";var x=class extends u{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new h({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=S(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=S(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=S(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=S(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){a.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>l(t,e))}findAll(e={}){return this.getAll().filter(t=>l(e,t))}notify(e){a.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return a.batch(()=>Promise.all(e.map(e=>e.continue().catch(i))))}};function S(e){return e.options.scope?.id}var C=class extends u{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??d(r,t),a=this.get(i);return a||(a=new p({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){a.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>c(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>c(e,t)):t}notify(e){a.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){a.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){a.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},w=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new C,this.#t=e.mutationCache||new x,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=t.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=f.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#e.build(this,t),i=r.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(n(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=o(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return a.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;a.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return a.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=a.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(i).catch(i)}invalidateQueries(e,t={}){return a.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=a.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(i)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(i)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let r=this.#e.build(this,t);return r.isStaleByTime(n(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(i).catch(i)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(i).catch(i)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return f.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(s(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{m(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(s(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{m(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=d(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===r&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},T=e({createAgentServerQueryClient:()=>O,getDefaultQueryClient:()=>j,getQueryClient:()=>M,queryClient:()=>P,setQueryClient:()=>N}),E=(e,t)=>{(e?.response?.status===401||e?.status===401)&&t.invalidateQueries({queryKey:[`user`,`authenticated`]})},D=new Set,O=()=>{let e=new w({queryCache:new C({onSuccess:(e,t)=>{let n=t.meta?.backendId??t.options.meta?.backendId;typeof n==`string`&&b(n)},onError:(t,n)=>{if(n.queryKey[0]===`user`&&n.queryKey[1]===`authenticated`||E(t,e),!(n.meta?.disableToast??n.options.meta?.disableToast)){let e=v(t);D.has(e||``)||(y(e||_.t(g.ERROR$GENERIC)),D.add(e||``),setTimeout(()=>{D.delete(e||``)},3e3))}}}),mutationCache:new x({onError:(t,n,r,i)=>{E(t,e),(i?.meta?.disableToast??i?.options.meta?.disableToast)||y(v(t)||_.t(g.ERROR$GENERIC))}})});return e},k=null,A=null,j=()=>(k||=O(),k),M=()=>A??j(),N=e=>(A=e??j(),A),P=new Proxy({},{get:(e,t)=>{let n=M(),r=Reflect.get(n,t,n);return typeof r==`function`?r.bind(n):r},set:(e,t,n)=>{let r=M();return Reflect.set(r,t,n,r)}});export{N as a,T as i,M as n,P as r,j as t};
|
|
@@ -1,18 +1,32 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n,t as r}from"./declaration-C9nuq2Dj.js";import{t as i}from"./use-is-creating-conversation-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{t}from"./react-CM_dJw1Z.js";import{o as n,t as r}from"./declaration-C9nuq2Dj.js";import{t as i}from"./use-is-creating-conversation-DhoM7UAB.js";import{t as a}from"./useTranslation-01pF7z10.js";import{r as o}from"./vendor~home~mcp~automations-list-DRfWZRnF.js";import{a as s,i as c,o as l,r as u,s as d,t as f}from"./circle-plus-check-toggle-DRvuu-RD.js";import{t as p}from"./utils-Czcl6buL.js";import{n as m}from"./active-backend-context-CkP3ZEJs.js";import{n as h}from"./navigation-context-BFjstyH6.js";import{a as g,o as _}from"./conversation-local-storage-UYl-SX-r.js";import{t as v}from"./conversation-store-Z5iMCRpc.js";import{i as y,r as b}from"./use-settings-DzG0C3vO.js";import{t as x}from"./use-create-conversation-BWFA_FId.js";import{a as S,d as C,l as w,r as T,s as E,t as D}from"./install-server-modal-VB5hOBpW.js";import{n as O}from"./skill-card-pill-row-D0oTWx-a.js";import{t as k}from"./clock-DfoVUZVq.js";var A=e(t(),1),j=[{id:`github-pr-reviewer`,name:`GitHub PR review copilot`,category:`Code review`,description:`Watch pull requests, inspect the diff, and leave a concise review with risks and suggested follow-ups.`,requiredMcpIds:[`github`],popularityRank:100,estimatedSetupMinutes:4,prompt:`Create an automation that reviews GitHub pull requests when they are opened or updated. Use the GitHub MCP to inspect the PR diff, changed files, tests, and existing discussion. Post a short review that highlights correctness risks, security issues, missing tests, and concrete next steps. Ask me for the repositories, filters, review tone, and whether comments should be posted automatically or drafted first.`,exampleImplementation:`Trigger: github.pull_request.opened and github.pull_request.synchronize
|
|
2
2
|
Required MCP: GitHub
|
|
3
3
|
|
|
4
4
|
1. Read repository, pull_request, and sender from the event payload.
|
|
5
5
|
2. Fetch the PR diff and related comments through the GitHub MCP.
|
|
6
6
|
3. Run a review rubric focused on bugs, security, tests, and maintainability.
|
|
7
7
|
4. TODO: decide whether to publish inline comments, a summary comment, or a draft artifact.
|
|
8
|
-
5. Post or save the review with links back to the exact files and lines.`},{id:`
|
|
8
|
+
5. Post or save the review with links back to the exact files and lines.`},{id:`github-repo-monitor`,name:`GitHub repository monitor`,category:`Developer tools`,description:`Watch a repository for @OpenHands mentions in issues and PR comments, start a conversation, and post the agent's reply back to GitHub.`,requiredMcpIds:[`github`],popularityRank:98,estimatedSetupMinutes:5,prompt:`Set up a GitHub repository monitor automation that polls a repository for comments containing a trigger phrase (default: @OpenHands) and starts an OpenHands conversation in response, then posts the agent's reply back to GitHub. Walk me through the setup.`,exampleImplementation:`Trigger: cron, every minute (configurable)
|
|
9
|
+
Required secret: GITHUB_TOKEN
|
|
10
|
+
|
|
11
|
+
1. Poll GitHub for new issue and PR comments since the last run.
|
|
12
|
+
2. Match comments containing the trigger phrase (case-insensitive, default: @OpenHands).
|
|
13
|
+
3. Post an acknowledgment comment with a link to the new OpenHands conversation.
|
|
14
|
+
4. Forward follow-up replies in the same thread to the running conversation.
|
|
15
|
+
5. Post the agent's final response back to GitHub when the conversation completes.`},{id:`slack-standup-digest`,name:`Slack standup digest`,category:`Team updates`,description:`Summarize yesterday’s Slack activity into an async standup note with blockers, decisions, and owners.`,requiredMcpIds:[`slack`],popularityRank:94,estimatedSetupMinutes:5,prompt:`Create an automation that generates an async standup digest from Slack. Use the Slack MCP to search selected channels since the previous workday, group updates by project, call out blockers and decisions, and draft a message for a target channel. Ask me which channels to watch, what time to run, what timezone to use, and whether the digest should post automatically or wait for approval.`,exampleImplementation:`Trigger: cron, weekday mornings
|
|
9
16
|
Required MCP: Slack
|
|
10
17
|
|
|
11
18
|
1. Search configured channels for messages since the last digest window.
|
|
12
19
|
2. Cluster updates into shipped work, active work, blockers, and decisions.
|
|
13
20
|
3. TODO: choose a safe allowlist for channels and whether DMs are excluded.
|
|
14
21
|
4. Draft a Slack message with owners, links, and unanswered questions.
|
|
15
|
-
5. Optionally post to the configured standup channel.`},{id:`
|
|
22
|
+
5. Optionally post to the configured standup channel.`},{id:`slack-channel-monitor`,name:`Slack channel monitor`,category:`Team communication`,description:`Watch Slack channels for @openhands mentions, open a conversation with the message context, and reply in the thread when the agent finishes.`,requiredMcpIds:[`slack`],popularityRank:92,estimatedSetupMinutes:7,prompt:`Set up a Slack channel monitor automation that polls Slack channels for messages containing a trigger phrase (default: @openhands) and starts an OpenHands conversation in response, then posts the agent's reply back to the Slack thread. Walk me through the setup — ask me which channels to monitor and what trigger phrase to use.`,exampleImplementation:`Trigger: cron, every minute
|
|
23
|
+
Required secret: SLACK_BOT_TOKEN or SLACK_USER_TOKEN
|
|
24
|
+
|
|
25
|
+
1. Poll up to 10 configured Slack channels for new messages since the last run.
|
|
26
|
+
2. Match messages containing the trigger phrase (default: @openhands).
|
|
27
|
+
3. React with 👀 and start an OpenHands conversation with the message and recent channel context.
|
|
28
|
+
4. Post a thread reply with a link to the conversation.
|
|
29
|
+
5. Forward subsequent thread replies to the running conversation and post the agent's response when done.`},{id:`linear-triage-assistant`,name:`Linear issue triage assistant`,category:`Project management`,description:`Classify new Linear issues, suggest labels, find duplicates, and ask clarifying questions.`,requiredMcpIds:[`linear`],popularityRank:90,estimatedSetupMinutes:3,prompt:`Create an automation that triages new Linear issues. Use the Linear MCP to inspect the issue title, description, team, customer, priority, and recent related issues. Suggest labels, priority, likely owner, duplicates, and a clarifying comment. Ask me which teams/projects to include and whether updates should be applied directly or presented for approval.`,exampleImplementation:`Trigger: linear Issue create
|
|
16
30
|
Required MCP: Linear
|
|
17
31
|
|
|
18
32
|
1. Load the new issue, team context, project, labels, and recent similar issues.
|