@openhands/agent-canvas 1.1.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.windows.md +2 -2
- package/build/assets/Trans-De9RwQhA.js +1 -0
- package/build/assets/__vite-browser-external-4xJsU2-u.js +1 -0
- package/build/assets/{acp-providers-B_ZxlEbx.js → acp-providers-D_D8VUpP.js} +1 -1
- package/build/assets/active-backend-context-u2tdYRgH.js +1 -0
- package/build/assets/add-backend-modal-DIEyAkA4.js +1 -0
- package/build/assets/agent-profiles-settings-BovdV4N8.js +1 -0
- package/build/assets/{agent-server-client-options-CxnCYyIW.js → agent-server-client-options-DVLRd9sw.js} +1 -1
- package/build/assets/agent-server-conversation-service.api-BP73yONA.js +5 -0
- package/build/assets/agent-settings-FGL3Yvkp.js +1 -0
- package/build/assets/agent-settings-Ofbh6UTD.js +2 -0
- package/build/assets/alert-banner-BW0wRYw6.js +1 -0
- package/build/assets/api-key-entry-screen-CZIdRmUJ.js +1 -0
- package/build/assets/app-settings-BHJ9nKti.js +1 -0
- package/build/assets/automation-detail-DwYGzLkp.js +2 -0
- package/build/assets/automations-list-CuAfJmMW.js +1 -0
- package/build/assets/back-nav-button-BYmxFxGt.js +1 -0
- package/build/assets/backend-form-modal-BiaOB2C4.js +1 -0
- package/build/assets/backend-synced-settings-badge-Bs3FSXsS.js +1 -0
- package/build/assets/base-modal-CC5Pp8CF.js +1 -0
- package/build/assets/bot-D7eUAuSB.js +1 -0
- package/build/assets/brand-button-DKPMEKcW.js +1 -0
- package/build/assets/{browser-CCwPzPsD.js → browser-B39N74jU.js} +2 -2
- package/build/assets/browser-store-BI6uklCG.js +1 -0
- package/build/assets/browser-tab-aiDg7aEn.js +1 -0
- package/build/assets/chat-send-button-DxuZIoW8.js +1 -0
- package/build/assets/check-Bvi71siz.js +1 -0
- package/build/assets/checkmark-h7udgXMM.js +1 -0
- package/build/assets/{chevron-down-BxZEAIv4.js → chevron-down-CI8A6tet.js} +1 -1
- package/build/assets/circle-plus-check-toggle-T3eAIuPQ.js +1 -0
- package/build/assets/close-p3Op5lxI.js +1 -0
- package/build/assets/code-tag-DYlAhEQY.js +1 -0
- package/build/assets/{color-themes-CTNRQd1a.js → color-themes-DPBzNtVg.js} +4 -4
- package/build/assets/combobox-caret-CLGvOs32.js +1 -0
- package/build/assets/command-menu-DKrLCRla.js +1 -0
- package/build/assets/{command-store-C-57Heey.js → command-store-D8J5LMW1.js} +1 -1
- package/build/assets/condenser-settings-D_5vY4m3.js +1 -0
- package/build/assets/confirmation-modal-BK1F0A68.js +1 -0
- package/build/assets/context-menu-list-item-DBFzplWW.js +1 -0
- package/build/assets/conversation-DnVC6vRV.js +1 -0
- package/build/assets/conversation-local-storage-F6zVMM--.js +1 -0
- package/build/assets/conversation-panel-ZEz-z3az.js +1 -0
- package/build/assets/conversation-service.api-CqZcHr1c.js +1 -0
- package/build/assets/conversation-state-store-B2Bp32XI.js +1 -0
- package/build/assets/conversation-store-LptbOvKa.js +1 -0
- package/build/assets/conversation-tab-empty-state-m8IUkfMj.js +1 -0
- package/build/assets/conversation-xkBS3AHC.js +19 -0
- package/build/assets/copy-3JCw_XFB.js +1 -0
- package/build/assets/copy-BLmGeJcd.js +1 -0
- package/build/assets/copy-to-clipboard-button-Aj9wFmt2.js +1 -0
- package/build/assets/createLucideIcon-CVAsW2Yo.js +1 -0
- package/build/assets/declaration-B9kpCaYl.js +1 -0
- package/build/assets/device-verify-B5YCrvSu.js +1 -0
- package/build/assets/dist-CodhvuAP.js +1 -0
- package/build/assets/dropdown-classes-CgQ45JmQ.js +1 -0
- package/build/assets/edit-automation-modal-B6U96gVV.js +1 -0
- package/build/assets/ellipsis-button-1BV9Sga8.js +1 -0
- package/build/assets/entry.client-Dy--3GeA.js +2 -0
- package/build/assets/enum-filter-dropdown-DCITiYVi.js +1 -0
- package/build/assets/environment-switch-overlay-DUnKILNH.js +1 -0
- package/build/assets/extensions-hub-CksKNpP9.js +1 -0
- package/build/assets/{extensions-navigation-DfLHdTUC.js → extensions-navigation-Di9rJ-b5.js} +1 -1
- package/build/assets/{external-link-D8njjDTk.js → external-link-D2zJjE9G.js} +1 -1
- package/build/assets/files-tab-61Vaihc6.js +1 -0
- package/build/assets/files-tab-store-DJsPxYdg.js +1 -0
- package/build/assets/folder-mMWFvaw0.js +1 -0
- package/build/assets/form-control-classes-9rkU4usZ.js +1 -0
- package/build/assets/get-language-from-path-CPNnuVhI.js +1 -0
- package/build/assets/git-provider-icon-aQRcUVI-.js +1 -0
- package/build/assets/home-5gOtUe-n.js +1 -0
- package/build/assets/iconBase-DaTRRUjy.js +1 -0
- package/build/assets/index-redirect-CUUJiNki.js +1 -0
- package/build/assets/install-server-modal-BRab9inF.js +1 -0
- package/build/assets/launch-1TJRKkkX.js +1 -0
- package/build/assets/lesson-plan-BtrZUCuj.js +4 -0
- package/build/assets/link-external-DfKQroKX.js +1 -0
- package/build/assets/{list-todo-B_Ts2JmZ.js → list-todo-BfH6yYUK.js} +1 -1
- package/build/assets/llm-not-configured-banner-BrU5uHto.js +27 -0
- package/build/assets/llm-settings-BpdU51Jo.js +1 -0
- package/build/assets/llm-settings-DsInf6yD.js +1 -0
- package/build/assets/{llm-subscription-service-BX_AtNlO.js → llm-subscription-service-CKyaV24y.js} +1 -1
- package/build/assets/loader-circle-BEykUKYG.js +1 -0
- package/build/assets/loading-spinner-DHAIPZkP.js +1 -0
- package/build/assets/manage-backends-modal-BREySP-J.js +1 -0
- package/build/assets/manifest-a5bb7568.js +1 -0
- package/build/assets/{markdown-renderer-DWy7Np7u.js → markdown-renderer-D8mayGjI.js} +1 -1
- package/build/assets/mcp-XXf8k6mb.js +9 -0
- package/build/assets/messages-D2oZb47Z.js +40 -0
- package/build/assets/middleware-DYHYNAnP.js +6 -0
- package/build/assets/modal-backdrop-zVwfOJZr.js +1 -0
- package/build/assets/modal-body-Dcu5McCa.js +1 -0
- package/build/assets/{modal-classes-C4kS6ib_.js → modal-classes-DPqxSyuP.js} +1 -1
- package/build/assets/modal-close-button-CTCX4nCH.js +1 -0
- package/build/assets/model-selector-VDHBytb6.js +1 -0
- package/build/assets/{mouse-pointer-click-CXAx4FyM.js → mouse-pointer-click-PdEQPL6v.js} +1 -1
- package/build/assets/navigation-context-DPs2G0X8.js +1 -0
- package/build/assets/navigation-link-D8hfwvxI.js +1 -0
- package/build/assets/onboarding-D32kiGME.js +1 -0
- package/build/assets/onboarding-modal-C084vkv7.js +1 -0
- package/build/assets/openhands-logo-bcNw5bkY.js +1 -0
- package/build/assets/option-service.api-Cl5VLGyw.js +1 -0
- package/build/assets/organization-service.api-CnynNoT-.js +1 -0
- package/build/assets/path-utils-BeOmjIcE.js +1 -0
- package/build/assets/{pencil-CsL0ns9y.js → pencil-Dj2XjKmI.js} +1 -1
- package/build/assets/plan-components-j9X4AxYM.js +1 -0
- package/build/assets/planner-tab-AZMjJx31.js +1 -0
- package/build/assets/plugins-management-service-BAp70KN7.js +1 -0
- package/build/assets/profiles-service.api-CeYEmSM3.js +1 -0
- package/build/assets/providers-vX9jk9Vy.js +1 -0
- package/build/assets/{proxy-TeteRRW5.js → proxy-CHmFkV16.js} +1 -1
- package/build/assets/react-DPDgL6du.js +1 -0
- package/build/assets/recommended-automations-launcher-Bk8tQ-Cn.js +58 -0
- package/build/assets/{refresh-cw-GkGYXsU-.js → refresh-cw-DM82EIyx.js} +1 -1
- package/build/assets/root-CxWZUXTQ.css +1 -0
- package/build/assets/root-layout-CoWw4kpz.js +2 -0
- package/build/assets/root-tuEPDx-i.js +2 -0
- package/build/assets/runtime-waiting-state-DkzLgvMn.js +1 -0
- package/build/assets/schema-field-nvq_Juo2.js +1 -0
- package/build/assets/sdk-section-page-CgT70FaZ.js +1 -0
- package/build/assets/sdk-settings-schema-BjBkMHzZ.js +1 -0
- package/build/assets/search-4DHskuhE.js +1 -0
- package/build/assets/search-BsjCEFNf.js +1 -0
- package/build/assets/secrets-service-CZYjNxFw.js +1 -0
- package/build/assets/secrets-settings-BCxk9p9s.js +1 -0
- package/build/assets/segmented-toggle-Cen5AMUc.js +1 -0
- package/build/assets/settings-CedTdtb5.js +1 -0
- package/build/assets/settings-dropdown-input-xzoZwgUe.js +1 -0
- package/build/assets/settings-gear-MXCyZW0x.js +1 -0
- package/build/assets/settings-index-Cct3PJSP.js +1 -0
- package/build/assets/settings-input-DYs7t3oK.js +1 -0
- package/build/assets/settings-list-classes-DvQr5jVS.js +1 -0
- package/build/assets/{settings-CN_HaPjH.js → settings-mQUckT0g.js} +1 -1
- package/build/assets/settings-modal-DwLybV_O.js +1 -0
- package/build/assets/settings-section-header-context-COMOIaxV.js +1 -0
- package/build/assets/settings-service.api-DldkFI1x.js +1 -0
- package/build/assets/settings-switch-C2N2xqEb.js +1 -0
- package/build/assets/{settings-utils-9-_6iVIn.js → settings-utils-BMdG65By.js} +1 -1
- package/build/assets/shared-conversation-DnDwfLgg.js +1 -0
- package/build/assets/sidebar-layout-BtpUSN3j.js +1 -0
- package/build/assets/sidebar-mobile-menu-toggle-B8k3qu84.js +1 -0
- package/build/assets/sidebar-nav-link-CIB3NBRW.js +1 -0
- package/build/assets/sidebar-store-CZuE8AH5.js +1 -0
- package/build/assets/skill-card-pill-row-D2bUe2kB.js +1 -0
- package/build/assets/skills-9cDZONKh.js +1 -0
- package/build/assets/skills-plugins-B68ay6Pu.js +1 -0
- package/build/assets/skills-settings-A6sUy0T7.js +2 -0
- package/build/assets/{square-chevron-right-Cfi-SUY0.js → square-chevron-right-Czw3FFWc.js} +1 -1
- package/build/assets/styled-tooltip-DsKsFjuq.js +1 -0
- package/build/assets/suspense-X5dBsJzn.js +1 -0
- package/build/assets/switch-skeleton-DqQwalyu.js +1 -0
- package/build/assets/task-list-tab-BAThr9Ex.js +1 -0
- package/build/assets/{terminal-HakoMrQX.js → terminal-BmT0_gIH.js} +2 -2
- package/build/assets/terminal-BuLtIrb9.js +1 -0
- package/build/assets/toggle-switch-DBlOOzBr.js +1 -0
- package/build/assets/{trash-2-Bq4hqiRH.js → trash-2-Be_7y3Mn.js} +1 -1
- package/build/assets/typography-YGPBGzOG.js +1 -0
- package/build/assets/u-check-circle-BqoIxNz_.js +1 -0
- package/build/assets/u-check-circle-half-LiwZkuFe.js +1 -0
- package/build/assets/u-edit-DJ90xc8Z.js +1 -0
- package/build/assets/use-acp-credential-form-Bs6s0DTU.js +1 -0
- package/build/assets/use-activate-agent-profile-CKtTToSx.js +1 -0
- package/build/assets/use-active-agent-profile-CWLPpOtK.js +1 -0
- package/build/assets/use-active-conversation-DI5S5M1w.js +1 -0
- package/build/assets/use-agent-profiles-DPcaYLpm.js +1 -0
- package/build/assets/use-agent-state-Buh3bQDh.js +1 -0
- package/build/assets/use-backends-health-CxkvJy2N.js +1 -0
- package/build/assets/use-breakpoint-B-O0lQ84.js +1 -0
- package/build/assets/use-can-manage-org-profiles-DeX2Mfje.js +1 -0
- package/build/assets/use-click-outside-element-Bf4Omzot.js +1 -0
- package/build/assets/use-cloud-current-user-id-D_PQGfmT.js +1 -0
- package/build/assets/use-config-ur0RbjCP.js +1 -0
- package/build/assets/use-create-conversation-D9OWYcte.js +1 -0
- package/build/assets/use-create-secret-CVFSlhlR.js +1 -0
- package/build/assets/use-event-store-YSOxy9FC.js +4 -0
- package/build/assets/use-handle-plan-click-Dug8egQl.js +1 -0
- package/build/assets/use-is-authed-_dhQ2Xuj.js +1 -0
- package/build/assets/use-launch-skill-in-chat-BnoDgvAy.js +1 -0
- package/build/assets/use-llm-profiles-DjackuP1.js +1 -0
- package/build/assets/use-onboarding-completion-C_Swglzp.js +1 -0
- package/build/assets/use-plugins-marketplace-BGb-KgfD.js +1 -0
- package/build/assets/use-runtime-is-ready-Diiq65Q-.js +1 -0
- package/build/assets/use-save-agent-profile-aKKLqDJM.js +1 -0
- package/build/assets/{use-save-settings-DErJDIDL.js → use-save-settings-CChDyjOB.js} +1 -1
- package/build/assets/use-settings-dX4fKUPF.js +1 -0
- package/build/assets/use-settings-nav-items-D6pHnvxg.js +16 -0
- package/build/assets/use-skills-Dqo-pDDx.js +1 -0
- package/build/assets/use-task-list-CmWGElgb.js +1 -0
- package/build/assets/use-tracking-GtXCHmTv.js +1 -0
- package/build/assets/use-user-conversation-6uOXFP95.js +1 -0
- package/build/assets/useMutation-DCE9RcgK.js +1 -0
- package/build/assets/useMutationState-BUab8Kxr.js +1 -0
- package/build/assets/useQueries-CRzaAqzH.js +1 -0
- package/build/assets/useQuery-CpjHYtZc.js +1 -0
- package/build/assets/useTranslation-Cgy4JA_g.js +1 -0
- package/build/assets/utils-CE0lDWtb.js +1 -0
- package/build/assets/vendor-styling-CI0PQ3ab.js +22 -0
- package/build/assets/{vendor~browser-BQU4C3CQ.js → vendor~browser-Cvg7jXCP.js} +1 -1
- package/build/assets/{vendor~browser-tab-Cim6xN2k.js → vendor~browser-tab-Di0kh5Zw.js} +1 -1
- package/build/assets/vendor~conversation-panel~conversation~alert-banner-DHDkknt5.js +1 -0
- package/build/assets/vendor~entry.client-9tWQ_Ugw.js +1 -0
- package/build/assets/{vendor~entry.client-lAMyAlBD.js → vendor~entry.client-D6BtSOtn.js} +1 -1
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~d1e18dtv-5Q6lQJdE.js +177 -0
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~i3v2mlbw-BrJQ3XZH.js +1 -0
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~ncdxw0bh-ClHnt5lR.js +10 -0
- package/build/assets/{vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~t35o0b0f-Bss49YXv.js → vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~k6tszsdc-Bb-xMtbv.js} +1 -1
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~nn5zty47-Zl0G1QCy.js +1 -0
- package/build/assets/{vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~fpbtwbmk-DDSPtjxR.js → vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~byh8a1g4-XNPdpuO8.js} +1 -1
- package/build/assets/{vendor~files-tab-BvQLon-P.js → vendor~files-tab-B02k3xvx.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation-DBPRU26Z.js → vendor~home~conversation-panel~conversation-CYMF9JYB.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DnEBAp2W.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-9UMeuPV6.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CzI-A-Gz.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-BD0GaRGa.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-ByET2Quf.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-CqXiHwjU.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DCYBrned.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-D7EUmQ8Y.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DnctfFZL.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-DTzw2x50.js} +1 -1
- package/build/assets/{vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-pSG7lnvH.js → vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-d8aETPbZ.js} +1 -1
- package/build/assets/{vendor~launch-DqoOsAhA.js → vendor~launch-CHXA9cJu.js} +1 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation-CpiTHpHl.js +1 -0
- package/build/assets/{vendor~root-layout~conversation-panel~conversation~shared-conversation-BJl81v7J.js → vendor~root-layout~conversation-panel~conversation~shared-conversation-_TdZcNMD.js} +1 -1
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation-Cn2jwSga.js +1 -0
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~enjl5xdm-mMKDm94D.js +48 -0
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~automations-~ki5qnp0d-DRld6s9c.js → vendor~root-layout~home~conversation-panel~conversation~launch~skills-settings~automations-~ki5qnp0d-rV6d1Iv_.js} +502 -43
- package/build/assets/{vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-9d2kA26V.js → vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-CZM4hwUT.js} +1 -1
- package/build/assets/vendor~root-layout~home~mcp~automations-list~onboarding-modal-CXyYYvYh.js +1 -0
- package/build/assets/verification-settings-D_zsNB_c.js +1 -0
- package/build/assets/x-Cb0WAtak.js +1 -0
- package/build/assets/x-mark-Batp6gXa.js +1 -0
- package/build/index.html +4 -4
- package/build/locales/ar/openhands.json +138 -1
- package/build/locales/ca/openhands.json +138 -1
- package/build/locales/de/openhands.json +138 -1
- package/build/locales/en/openhands.json +138 -1
- package/build/locales/es/openhands.json +138 -1
- package/build/locales/fr/openhands.json +138 -1
- package/build/locales/it/openhands.json +138 -1
- package/build/locales/ja/openhands.json +138 -1
- package/build/locales/ko-KR/openhands.json +138 -1
- package/build/locales/no/openhands.json +138 -1
- package/build/locales/pt/openhands.json +138 -1
- package/build/locales/tr/openhands.json +138 -1
- package/build/locales/uk/openhands.json +138 -1
- package/build/locales/zh-CN/openhands.json +138 -1
- package/build/locales/zh-TW/openhands.json +138 -1
- package/config/defaults.json +7 -9
- package/dist/_virtual/__vite-browser-external.cjs +2 -0
- package/dist/_virtual/__vite-browser-external.cjs.map +1 -0
- package/dist/_virtual/__vite-browser-external.js +9 -0
- package/dist/_virtual/__vite-browser-external.js.map +1 -0
- package/dist/api/agent-profiles-service/agent-profiles-service.api.cjs +2 -0
- package/dist/api/agent-profiles-service/agent-profiles-service.api.cjs.map +1 -0
- package/dist/api/agent-profiles-service/agent-profiles-service.api.d.ts +22 -0
- package/dist/api/agent-profiles-service/agent-profiles-service.api.js +35 -0
- package/dist/api/agent-profiles-service/agent-profiles-service.api.js.map +1 -0
- package/dist/api/agent-server-adapter.cjs +2 -2
- package/dist/api/agent-server-adapter.cjs.map +1 -1
- package/dist/api/agent-server-adapter.d.ts +11 -1
- package/dist/api/agent-server-adapter.js +60 -60
- package/dist/api/agent-server-adapter.js.map +1 -1
- package/dist/api/agent-server-compatibility.cjs +1 -1
- package/dist/api/agent-server-compatibility.cjs.map +1 -1
- package/dist/api/agent-server-compatibility.js +1 -0
- package/dist/api/agent-server-compatibility.js.map +1 -1
- package/dist/api/agent-server-home.cjs +1 -1
- package/dist/api/agent-server-home.cjs.map +1 -1
- package/dist/api/agent-server-home.js +1 -0
- package/dist/api/agent-server-home.js.map +1 -1
- package/dist/api/cloud/agent-profiles-service.api.cjs +2 -0
- package/dist/api/cloud/agent-profiles-service.api.cjs.map +1 -0
- package/dist/api/cloud/agent-profiles-service.api.d.ts +7 -0
- package/dist/api/cloud/agent-profiles-service.api.js +58 -0
- package/dist/api/cloud/agent-profiles-service.api.js.map +1 -0
- package/dist/api/cloud/organization-service.api.cjs +1 -1
- package/dist/api/cloud/organization-service.api.cjs.map +1 -1
- package/dist/api/cloud/organization-service.api.d.ts +8 -0
- package/dist/api/cloud/organization-service.api.js +3 -1
- package/dist/api/cloud/organization-service.api.js.map +1 -1
- package/dist/api/cloud/profiles-service.api.cjs +2 -0
- package/dist/api/cloud/profiles-service.api.cjs.map +1 -0
- package/dist/api/cloud/profiles-service.api.d.ts +7 -0
- package/dist/api/cloud/profiles-service.api.js +75 -0
- package/dist/api/cloud/profiles-service.api.js.map +1 -0
- package/dist/api/cloud/settings-service.api.cjs +1 -1
- package/dist/api/cloud/settings-service.api.cjs.map +1 -1
- package/dist/api/cloud/settings-service.api.js +1 -1
- package/dist/api/cloud/settings-service.api.js.map +1 -1
- package/dist/api/config-service/config-service.api.cjs +1 -1
- package/dist/api/config-service/config-service.api.cjs.map +1 -1
- package/dist/api/config-service/config-service.api.js +1 -0
- package/dist/api/config-service/config-service.api.js.map +1 -1
- package/dist/api/conversation-metadata-store.cjs.map +1 -1
- package/dist/api/conversation-metadata-store.d.ts +11 -0
- package/dist/api/conversation-metadata-store.js.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.cjs.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.d.ts +20 -1
- package/dist/api/conversation-service/agent-server-conversation-service.api.js +134 -105
- package/dist/api/conversation-service/agent-server-conversation-service.api.js.map +1 -1
- package/dist/api/conversation-service/agent-server-conversation-service.types.d.ts +2 -0
- package/dist/api/conversation-service/conversation-service.api.cjs +1 -1
- package/dist/api/conversation-service/conversation-service.api.cjs.map +1 -1
- package/dist/api/conversation-service/conversation-service.api.d.ts +1 -0
- package/dist/api/conversation-service/conversation-service.api.js +4 -0
- package/dist/api/conversation-service/conversation-service.api.js.map +1 -1
- package/dist/api/device-flow-client.cjs +1 -1
- package/dist/api/device-flow-client.cjs.map +1 -1
- package/dist/api/device-flow-client.js +33 -25
- package/dist/api/device-flow-client.js.map +1 -1
- package/dist/api/event-service/event-service.api.cjs +1 -1
- package/dist/api/event-service/event-service.api.cjs.map +1 -1
- package/dist/api/event-service/event-service.api.js +1 -0
- package/dist/api/event-service/event-service.api.js.map +1 -1
- package/dist/api/mcp-service/mcp-redacted-credentials.cjs +1 -1
- package/dist/api/mcp-service/mcp-redacted-credentials.cjs.map +1 -1
- package/dist/api/mcp-service/mcp-redacted-credentials.d.ts +3 -3
- package/dist/api/mcp-service/mcp-redacted-credentials.js +29 -30
- package/dist/api/mcp-service/mcp-redacted-credentials.js.map +1 -1
- package/dist/api/mcp-service/mcp-service.api.cjs +1 -1
- package/dist/api/mcp-service/mcp-service.api.cjs.map +1 -1
- package/dist/api/mcp-service/mcp-service.api.d.ts +8 -1
- package/dist/api/mcp-service/mcp-service.api.js +129 -23
- package/dist/api/mcp-service/mcp-service.api.js.map +1 -1
- package/dist/api/option-service/option-service.api.cjs +1 -1
- package/dist/api/option-service/option-service.api.cjs.map +1 -1
- package/dist/api/option-service/option-service.api.js +1 -0
- package/dist/api/option-service/option-service.api.js.map +1 -1
- package/dist/api/plugins-management-service.cjs +2 -0
- package/dist/api/plugins-management-service.cjs.map +1 -0
- package/dist/api/plugins-management-service.d.ts +50 -0
- package/dist/api/plugins-management-service.js +41 -0
- package/dist/api/plugins-management-service.js.map +1 -0
- package/dist/api/plugins-service.d.ts +49 -0
- package/dist/api/profiles-service/profiles-service.api.cjs +1 -1
- package/dist/api/profiles-service/profiles-service.api.cjs.map +1 -1
- package/dist/api/profiles-service/profiles-service.api.js +21 -14
- package/dist/api/profiles-service/profiles-service.api.js.map +1 -1
- package/dist/api/runtime-service/agent-server-runtime-service.cjs +1 -1
- package/dist/api/runtime-service/agent-server-runtime-service.cjs.map +1 -1
- package/dist/api/runtime-service/agent-server-runtime-service.js +1 -0
- package/dist/api/runtime-service/agent-server-runtime-service.js.map +1 -1
- package/dist/api/secrets-service.cjs +1 -1
- package/dist/api/secrets-service.cjs.map +1 -1
- package/dist/api/secrets-service.js +1 -0
- package/dist/api/secrets-service.js.map +1 -1
- package/dist/api/settings-service/settings-service.api.cjs +1 -1
- package/dist/api/settings-service/settings-service.api.cjs.map +1 -1
- package/dist/api/settings-service/settings-service.api.js +92 -50
- package/dist/api/settings-service/settings-service.api.js.map +1 -1
- package/dist/api/skills-service.cjs +1 -1
- package/dist/api/skills-service.cjs.map +1 -1
- package/dist/api/skills-service.js +1 -0
- package/dist/api/skills-service.js.map +1 -1
- package/dist/api/workspaces-service/workspaces-service.api.cjs +1 -1
- package/dist/api/workspaces-service/workspaces-service.api.cjs.map +1 -1
- package/dist/api/workspaces-service/workspaces-service.api.js +1 -0
- package/dist/api/workspaces-service/workspaces-service.api.js.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js +57 -38
- package/dist/components/conversation-events/chat/event-content-helpers/get-event-content.js.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.cjs +2 -1
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.js +13 -9
- package/dist/components/conversation-events/chat/event-content-helpers/should-render-event.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js +65 -26
- package/dist/components/conversation-events/chat/event-message-components/user-assistant-event-message.js.map +1 -1
- package/dist/components/conversation-events/chat/event-message.cjs +2 -2
- package/dist/components/conversation-events/chat/event-message.cjs.map +1 -1
- package/dist/components/conversation-events/chat/event-message.js +78 -76
- package/dist/components/conversation-events/chat/event-message.js.map +1 -1
- package/dist/components/features/analytics/telemetry-consent-banner.cjs +1 -1
- package/dist/components/features/analytics/telemetry-consent-banner.cjs.map +1 -1
- package/dist/components/features/analytics/telemetry-consent-banner.js +1 -0
- package/dist/components/features/analytics/telemetry-consent-banner.js.map +1 -1
- package/dist/components/features/automations/detail/activity-log-item.d.ts +3 -2
- package/dist/components/features/automations/detail/activity-log-section.d.ts +3 -2
- package/dist/components/features/automations/detail/debug-automation-button.d.ts +17 -0
- package/dist/components/features/automations/detail/run-logs-modal.d.ts +6 -1
- package/dist/components/features/backends/backend-form-modal.cjs +1 -1
- package/dist/components/features/backends/backend-form-modal.cjs.map +1 -1
- package/dist/components/features/backends/backend-form-modal.d.ts +6 -2
- package/dist/components/features/backends/backend-form-modal.js +198 -161
- package/dist/components/features/backends/backend-form-modal.js.map +1 -1
- package/dist/components/features/backends/backend-row.cjs +1 -1
- package/dist/components/features/backends/backend-row.cjs.map +1 -1
- package/dist/components/features/backends/backend-row.d.ts +2 -1
- package/dist/components/features/backends/backend-row.js +60 -54
- package/dist/components/features/backends/backend-row.js.map +1 -1
- package/dist/components/features/backends/backend-selector.cjs +1 -1
- package/dist/components/features/backends/backend-selector.cjs.map +1 -1
- package/dist/components/features/backends/backend-selector.js +4 -4
- package/dist/components/features/backends/backend-version.cjs +1 -1
- package/dist/components/features/backends/backend-version.cjs.map +1 -1
- package/dist/components/features/backends/backend-version.js +1 -0
- package/dist/components/features/backends/backend-version.js.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs +1 -1
- package/dist/components/features/backends/manage-backends-modal.cjs.map +1 -1
- package/dist/components/features/backends/manage-backends-modal.js +72 -61
- package/dist/components/features/backends/manage-backends-modal.js.map +1 -1
- package/dist/components/features/chat/change-agent-button.cjs +1 -1
- package/dist/components/features/chat/change-agent-button.js +9 -9
- package/dist/components/features/chat/chat-add-file-button.cjs +1 -1
- package/dist/components/features/chat/chat-add-file-button.cjs.map +1 -1
- package/dist/components/features/chat/chat-add-file-button.js +38 -34
- package/dist/components/features/chat/chat-add-file-button.js.map +1 -1
- package/dist/components/features/chat/chat-interface.cjs +2 -2
- package/dist/components/features/chat/chat-interface.cjs.map +1 -1
- package/dist/components/features/chat/chat-interface.js +136 -129
- package/dist/components/features/chat/chat-interface.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-actions.cjs.map +1 -1
- package/dist/components/features/chat/components/chat-input-actions.js +100 -87
- package/dist/components/features/chat/components/chat-input-actions.js.map +1 -1
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs +2 -0
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.cjs.map +1 -0
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.d.ts +15 -0
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.js +118 -0
- package/dist/components/features/chat/components/chat-input-llm-profile-picker.js.map +1 -0
- package/dist/components/features/chat/components/chat-input-model.cjs +1 -1
- package/dist/components/features/chat/components/chat-input-model.js +17 -17
- package/dist/components/features/chat/components/chat-input-profile-picker.cjs +2 -0
- package/dist/components/features/chat/components/chat-input-profile-picker.cjs.map +1 -0
- package/dist/components/features/chat/components/chat-input-profile-picker.d.ts +9 -0
- package/dist/components/features/chat/components/chat-input-profile-picker.js +112 -0
- package/dist/components/features/chat/components/chat-input-profile-picker.js.map +1 -0
- package/dist/components/features/chat/components/resolve-picker-kind.cjs +2 -0
- package/dist/components/features/chat/components/resolve-picker-kind.cjs.map +1 -0
- package/dist/components/features/chat/components/resolve-picker-kind.d.ts +29 -0
- package/dist/components/features/chat/components/resolve-picker-kind.js +8 -0
- package/dist/components/features/chat/components/resolve-picker-kind.js.map +1 -0
- package/dist/components/features/chat/goal-status-banner.cjs +2 -0
- package/dist/components/features/chat/goal-status-banner.cjs.map +1 -0
- package/dist/components/features/chat/goal-status-banner.d.ts +11 -0
- package/dist/components/features/chat/goal-status-banner.js +12 -0
- package/dist/components/features/chat/goal-status-banner.js.map +1 -0
- package/dist/components/features/chat/goal-status-content.cjs +2 -0
- package/dist/components/features/chat/goal-status-content.cjs.map +1 -0
- package/dist/components/features/chat/goal-status-content.d.ts +21 -0
- package/dist/components/features/chat/goal-status-content.js +98 -0
- package/dist/components/features/chat/goal-status-content.js.map +1 -0
- package/dist/components/features/chat/interactive-chat-box.cjs +1 -1
- package/dist/components/features/chat/interactive-chat-box.cjs.map +1 -1
- package/dist/components/features/chat/interactive-chat-box.js +20 -19
- package/dist/components/features/chat/interactive-chat-box.js.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/code-block.cjs +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/code-block.cjs.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/code-block.d.ts +10 -3
- package/dist/components/features/chat/tool-visualizers/primitives/code-block.js +29 -16
- package/dist/components/features/chat/tool-visualizers/primitives/code-block.js.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/output-pane.cjs +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/output-pane.cjs.map +1 -1
- package/dist/components/features/chat/tool-visualizers/primitives/output-pane.d.ts +2 -2
- package/dist/components/features/chat/tool-visualizers/primitives/output-pane.js +16 -16
- package/dist/components/features/chat/tool-visualizers/primitives/output-pane.js.map +1 -1
- package/dist/components/features/chat/user-message-body.cjs +1 -1
- package/dist/components/features/chat/user-message-body.cjs.map +1 -1
- package/dist/components/features/chat/user-message-body.js +20 -20
- package/dist/components/features/chat/user-message-body.js.map +1 -1
- package/dist/components/features/command-menu/command-menu-items.d.ts +32 -0
- package/dist/components/features/command-menu/command-menu-trigger.cjs +2 -0
- package/dist/components/features/command-menu/command-menu-trigger.cjs.map +1 -0
- package/dist/components/features/command-menu/command-menu-trigger.d.ts +5 -0
- package/dist/components/features/command-menu/command-menu-trigger.js +53 -0
- package/dist/components/features/command-menu/command-menu-trigger.js.map +1 -0
- package/dist/components/features/command-menu/command-menu.d.ts +2 -0
- package/dist/components/features/command-menu/index.d.ts +2 -0
- package/dist/components/features/controls/tools-context-menu.cjs +1 -1
- package/dist/components/features/controls/tools-context-menu.cjs.map +1 -1
- package/dist/components/features/controls/tools-context-menu.d.ts +3 -1
- package/dist/components/features/controls/tools-context-menu.js +94 -77
- package/dist/components/features/controls/tools-context-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/cloud-new-conversation-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/cloud-new-conversation-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/cloud-new-conversation-menu.js +8 -5
- package/dist/components/features/conversation-panel/cloud-new-conversation-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.d.ts +1 -1
- package/dist/components/features/conversation-panel/conversation-card/conversation-card-footer.js.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.cjs.map +1 -1
- package/dist/components/features/conversation-panel/conversation-panel.js +2 -1
- package/dist/components/features/conversation-panel/conversation-panel.js.map +1 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.cjs +1 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.cjs.map +1 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.js +4 -1
- package/dist/components/features/conversation-panel/local-new-conversation-menu.js.map +1 -1
- package/dist/components/features/conversation-panel/plugins-modal.cjs +2 -0
- package/dist/components/features/conversation-panel/plugins-modal.cjs.map +1 -0
- package/dist/components/features/conversation-panel/plugins-modal.d.ts +12 -0
- package/dist/components/features/conversation-panel/plugins-modal.js +62 -0
- package/dist/components/features/conversation-panel/plugins-modal.js.map +1 -0
- package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.cjs +1 -1
- package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.cjs.map +1 -1
- package/dist/components/features/home/git-repo-dropdown/git-repo-dropdown.js +4 -4
- package/dist/components/features/mcp-logo-badge.cjs +1 -1
- package/dist/components/features/mcp-logo-badge.cjs.map +1 -1
- package/dist/components/features/mcp-logo-badge.js +17 -15
- package/dist/components/features/mcp-logo-badge.js.map +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.cjs.map +1 -1
- package/dist/components/features/mcp-page/custom-server-editor.js +102 -59
- package/dist/components/features/mcp-page/custom-server-editor.js.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs +1 -1
- package/dist/components/features/mcp-page/install-server-modal.cjs.map +1 -1
- package/dist/components/features/mcp-page/install-server-modal.js +284 -169
- package/dist/components/features/mcp-page/install-server-modal.js.map +1 -1
- package/dist/components/features/mcp-page/installed-server-card.cjs +1 -1
- package/dist/components/features/mcp-page/installed-server-card.cjs.map +1 -1
- package/dist/components/features/mcp-page/installed-server-card.js +16 -18
- package/dist/components/features/mcp-page/installed-server-card.js.map +1 -1
- package/dist/components/features/onboarding/onboarding-host.d.ts +3 -13
- package/dist/components/features/plugins/add-plugin-modal.d.ts +6 -0
- package/dist/components/features/plugins/build-plugins-view-model.d.ts +39 -0
- package/dist/components/features/plugins/plugin-card.d.ts +13 -0
- package/dist/components/features/plugins/plugin-detail-modal.d.ts +13 -0
- package/dist/components/features/plugins/plugin-picker-card.d.ts +10 -0
- package/dist/components/features/plugins/plugin-picker-modal.d.ts +9 -0
- package/dist/components/features/plugins/plugin-picker-trigger.d.ts +9 -0
- package/dist/components/features/plugins/plugin-picker.d.ts +18 -0
- package/dist/components/features/plugins/plugin-spec-identity.d.ts +28 -0
- package/dist/components/features/plugins/plugins-toolbar.d.ts +9 -0
- package/dist/components/features/settings/agent-profiles/agent-profile-actions-menu.d.ts +16 -0
- package/dist/components/features/settings/agent-profiles/agent-profile-row.d.ts +13 -0
- package/dist/components/features/settings/agent-profiles/agent-profiles-body.d.ts +15 -0
- package/dist/components/features/settings/agent-profiles/agent-profiles-local-view.d.ts +7 -0
- package/dist/components/features/settings/agent-profiles/agent-profiles-manager.d.ts +7 -0
- package/dist/components/features/settings/agent-profiles/delete-agent-profile-modal.d.ts +7 -0
- package/dist/components/features/settings/agent-profiles/index.d.ts +6 -0
- package/dist/components/features/settings/agent-profiles/merge-agent-profile-save-input.d.ts +18 -0
- package/dist/components/features/settings/llm-profiles/llm-profiles-manager.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/llm-profiles-manager.js +1 -0
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.cjs +1 -1
- package/dist/components/features/settings/llm-profiles/llm-settings-local-view.js +1 -1
- package/dist/components/features/settings/llm-profiles/profile-row.d.ts +3 -1
- package/dist/components/features/settings/llm-profiles/profiles-body.d.ts +3 -1
- package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.cjs +1 -1
- package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.cjs.map +1 -1
- package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.js +3 -2
- package/dist/components/features/settings/llm-settings/openai-subscription-auth-card.js.map +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs +7 -7
- package/dist/components/features/settings/mcp-settings/mcp-server-form.cjs.map +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js +279 -130
- package/dist/components/features/settings/mcp-settings/mcp-server-form.js.map +1 -1
- package/dist/components/features/settings/mcp-settings/mcp-server-list-item.d.ts +1 -12
- package/dist/components/features/settings/mcp-settings/mcp-server-list.d.ts +1 -11
- package/dist/components/features/settings/settings-dropdown-input.cjs +1 -1
- package/dist/components/features/settings/settings-dropdown-input.js +6 -6
- package/dist/components/features/sidebar/sidebar-rail-body.cjs +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar-rail-body.d.ts +1 -2
- package/dist/components/features/sidebar/sidebar-rail-body.js +81 -82
- package/dist/components/features/sidebar/sidebar-rail-body.js.map +1 -1
- package/dist/components/features/sidebar/sidebar.cjs +1 -1
- package/dist/components/features/sidebar/sidebar.cjs.map +1 -1
- package/dist/components/features/sidebar/sidebar.js +45 -46
- package/dist/components/features/sidebar/sidebar.js.map +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs +1 -1
- package/dist/components/features/skills/extensions-navigation.cjs.map +1 -1
- package/dist/components/features/skills/extensions-navigation.js +1 -2
- package/dist/components/features/skills/extensions-navigation.js.map +1 -1
- package/dist/components/shared/modals/modal-backdrop.cjs +1 -1
- package/dist/components/shared/modals/modal-backdrop.cjs.map +1 -1
- package/dist/components/shared/modals/modal-backdrop.d.ts +5 -1
- package/dist/components/shared/modals/modal-backdrop.js +3 -3
- package/dist/components/shared/modals/modal-backdrop.js.map +1 -1
- package/dist/components/shared/modals/settings/model-selector.cjs +1 -1
- package/dist/components/shared/modals/settings/model-selector.js +16 -16
- package/dist/config/defaults.cjs +1 -1
- package/dist/config/defaults.cjs.map +1 -1
- package/dist/config/defaults.js +7 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/contexts/conversation-websocket-context.cjs +3 -3
- package/dist/contexts/conversation-websocket-context.cjs.map +1 -1
- package/dist/contexts/conversation-websocket-context.js +200 -197
- package/dist/contexts/conversation-websocket-context.js.map +1 -1
- package/dist/hooks/chat/use-goal-interceptor.cjs +2 -0
- package/dist/hooks/chat/use-goal-interceptor.cjs.map +1 -0
- package/dist/hooks/chat/use-goal-interceptor.d.ts +8 -0
- package/dist/hooks/chat/use-goal-interceptor.js +37 -0
- package/dist/hooks/chat/use-goal-interceptor.js.map +1 -0
- package/dist/hooks/chat/use-grip-resize.cjs +1 -1
- package/dist/hooks/chat/use-grip-resize.cjs.map +1 -1
- package/dist/hooks/chat/use-grip-resize.js +17 -16
- package/dist/hooks/chat/use-grip-resize.js.map +1 -1
- package/dist/hooks/chat/use-model-interceptor.cjs +1 -1
- package/dist/hooks/chat/use-model-interceptor.cjs.map +1 -1
- package/dist/hooks/chat/use-model-interceptor.d.ts +3 -3
- package/dist/hooks/chat/use-model-interceptor.js +8 -9
- package/dist/hooks/chat/use-model-interceptor.js.map +1 -1
- package/dist/hooks/chat/use-slash-command.cjs +1 -1
- package/dist/hooks/chat/use-slash-command.cjs.map +1 -1
- package/dist/hooks/chat/use-slash-command.js +4 -4
- package/dist/hooks/chat/use-slash-command.js.map +1 -1
- package/dist/hooks/mutation/conversation-mutation-utils.cjs +1 -1
- package/dist/hooks/mutation/conversation-mutation-utils.cjs.map +1 -1
- package/dist/hooks/mutation/conversation-mutation-utils.d.ts +17 -0
- package/dist/hooks/mutation/conversation-mutation-utils.js +23 -4
- package/dist/hooks/mutation/conversation-mutation-utils.js.map +1 -1
- package/dist/hooks/mutation/use-activate-agent-profile.cjs +2 -0
- package/dist/hooks/mutation/use-activate-agent-profile.cjs.map +1 -0
- package/dist/hooks/mutation/use-activate-agent-profile.d.ts +23 -0
- package/dist/hooks/mutation/use-activate-agent-profile.js +34 -0
- package/dist/hooks/mutation/use-activate-agent-profile.js.map +1 -0
- package/dist/hooks/mutation/use-activate-llm-profile.cjs +1 -1
- package/dist/hooks/mutation/use-activate-llm-profile.js +1 -1
- package/dist/hooks/mutation/use-add-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-add-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-add-mcp-server.d.ts +1 -12
- package/dist/hooks/mutation/use-add-mcp-server.js +10 -34
- package/dist/hooks/mutation/use-add-mcp-server.js.map +1 -1
- package/dist/hooks/mutation/use-apply-onboarding-agent-profile.d.ts +20 -0
- package/dist/hooks/mutation/use-create-conversation.cjs +1 -1
- package/dist/hooks/mutation/use-create-conversation.cjs.map +1 -1
- package/dist/hooks/mutation/use-create-conversation.d.ts +2 -0
- package/dist/hooks/mutation/use-create-conversation.js +94 -25
- package/dist/hooks/mutation/use-create-conversation.js.map +1 -1
- package/dist/hooks/mutation/use-delete-agent-profile.d.ts +1 -0
- package/dist/hooks/mutation/use-delete-llm-profile.cjs +1 -1
- package/dist/hooks/mutation/use-delete-llm-profile.js +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-delete-mcp-server.js +4 -4
- package/dist/hooks/mutation/use-fork-conversation.cjs +2 -0
- package/dist/hooks/mutation/use-fork-conversation.cjs.map +1 -0
- package/dist/hooks/mutation/use-fork-conversation.d.ts +24 -0
- package/dist/hooks/mutation/use-fork-conversation.js +29 -0
- package/dist/hooks/mutation/use-fork-conversation.js.map +1 -0
- package/dist/hooks/mutation/use-install-plugin.d.ts +7 -0
- package/dist/hooks/mutation/use-new-conversation-command.cjs +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.cjs.map +1 -1
- package/dist/hooks/mutation/use-new-conversation-command.d.ts +1 -0
- package/dist/hooks/mutation/use-new-conversation-command.js +20 -10
- package/dist/hooks/mutation/use-new-conversation-command.js.map +1 -1
- package/dist/hooks/mutation/use-rename-agent-profile.d.ts +6 -0
- package/dist/hooks/mutation/use-rename-llm-profile.cjs +1 -1
- package/dist/hooks/mutation/use-rename-llm-profile.js +1 -1
- package/dist/hooks/mutation/use-save-agent-profile.d.ts +5 -0
- package/dist/hooks/mutation/use-save-llm-profile.cjs +1 -1
- package/dist/hooks/mutation/use-save-llm-profile.js +1 -1
- package/dist/hooks/mutation/use-switch-acp-model.cjs.map +1 -1
- package/dist/hooks/mutation/use-switch-acp-model.js.map +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile-and-log.cjs +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile-and-log.cjs.map +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile-and-log.d.ts +3 -4
- package/dist/hooks/mutation/use-switch-llm-profile-and-log.js +10 -35
- package/dist/hooks/mutation/use-switch-llm-profile-and-log.js.map +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile.cjs +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile.cjs.map +1 -1
- package/dist/hooks/mutation/use-switch-llm-profile.d.ts +20 -5
- package/dist/hooks/mutation/use-switch-llm-profile.js +38 -14
- package/dist/hooks/mutation/use-switch-llm-profile.js.map +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.cjs +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.cjs.map +1 -1
- package/dist/hooks/mutation/use-update-mcp-server.js +11 -37
- package/dist/hooks/mutation/use-update-mcp-server.js.map +1 -1
- package/dist/hooks/query/query-keys.cjs +1 -1
- package/dist/hooks/query/query-keys.cjs.map +1 -1
- package/dist/hooks/query/query-keys.d.ts +21 -0
- package/dist/hooks/query/query-keys.js +7 -3
- package/dist/hooks/query/query-keys.js.map +1 -1
- package/dist/hooks/query/use-active-conversation.cjs +1 -1
- package/dist/hooks/query/use-active-conversation.cjs.map +1 -1
- package/dist/hooks/query/use-active-conversation.js +17 -16
- package/dist/hooks/query/use-active-conversation.js.map +1 -1
- package/dist/hooks/query/use-agent-profiles.cjs +2 -0
- package/dist/hooks/query/use-agent-profiles.cjs.map +1 -0
- package/dist/hooks/query/use-agent-profiles.d.ts +13 -0
- package/dist/hooks/query/use-agent-profiles.js +24 -0
- package/dist/hooks/query/use-agent-profiles.js.map +1 -0
- package/dist/hooks/query/use-backends-health.cjs +1 -1
- package/dist/hooks/query/use-backends-health.cjs.map +1 -1
- package/dist/hooks/query/use-backends-health.js +18 -3
- package/dist/hooks/query/use-backends-health.js.map +1 -1
- package/dist/hooks/query/use-conversation-history.cjs +1 -1
- package/dist/hooks/query/use-conversation-history.cjs.map +1 -1
- package/dist/hooks/query/use-conversation-history.js +4 -2
- package/dist/hooks/query/use-conversation-history.js.map +1 -1
- package/dist/hooks/query/use-local-workspaces.cjs +1 -1
- package/dist/hooks/query/use-local-workspaces.cjs.map +1 -1
- package/dist/hooks/query/use-local-workspaces.js +1 -0
- package/dist/hooks/query/use-local-workspaces.js.map +1 -1
- package/dist/hooks/query/use-plugins-marketplace.d.ts +7 -0
- package/dist/hooks/query/use-resolved-workspaces.cjs +1 -1
- package/dist/hooks/query/use-resolved-workspaces.cjs.map +1 -1
- package/dist/hooks/query/use-resolved-workspaces.js +7 -6
- package/dist/hooks/query/use-resolved-workspaces.js.map +1 -1
- package/dist/hooks/query/use-search-subdirs.cjs +1 -1
- package/dist/hooks/query/use-search-subdirs.cjs.map +1 -1
- package/dist/hooks/query/use-search-subdirs.js +1 -0
- package/dist/hooks/query/use-search-subdirs.js.map +1 -1
- package/dist/hooks/query/use-settings.cjs +1 -1
- package/dist/hooks/query/use-settings.cjs.map +1 -1
- package/dist/hooks/query/use-settings.js +11 -11
- package/dist/hooks/query/use-settings.js.map +1 -1
- package/dist/hooks/query/use-verified-models.cjs +1 -1
- package/dist/hooks/query/use-verified-models.cjs.map +1 -1
- package/dist/hooks/query/use-verified-models.js +1 -0
- package/dist/hooks/query/use-verified-models.js.map +1 -1
- package/dist/hooks/use-acp-model-context.cjs +1 -1
- package/dist/hooks/use-acp-model-context.cjs.map +1 -1
- package/dist/hooks/use-acp-model-context.d.ts +1 -1
- package/dist/hooks/use-acp-model-context.js +9 -8
- package/dist/hooks/use-acp-model-context.js.map +1 -1
- package/dist/hooks/use-active-agent-profile.cjs +2 -0
- package/dist/hooks/use-active-agent-profile.cjs.map +1 -0
- package/dist/hooks/use-active-agent-profile.d.ts +20 -0
- package/dist/hooks/use-active-agent-profile.js +17 -0
- package/dist/hooks/use-active-agent-profile.js.map +1 -0
- package/dist/hooks/use-auto-resize.cjs +1 -1
- package/dist/hooks/use-auto-resize.cjs.map +1 -1
- package/dist/hooks/use-auto-resize.d.ts +2 -0
- package/dist/hooks/use-auto-resize.js +49 -45
- package/dist/hooks/use-auto-resize.js.map +1 -1
- package/dist/hooks/use-can-manage-org-profiles.cjs +1 -0
- package/dist/hooks/use-can-manage-org-profiles.d.ts +18 -0
- package/dist/hooks/use-can-manage-org-profiles.js +2 -0
- package/dist/hooks/use-chat-input-llm-profile-state.cjs +2 -0
- package/dist/hooks/use-chat-input-llm-profile-state.cjs.map +1 -0
- package/dist/hooks/use-chat-input-llm-profile-state.d.ts +23 -0
- package/dist/hooks/use-chat-input-llm-profile-state.js +30 -0
- package/dist/hooks/use-chat-input-llm-profile-state.js.map +1 -0
- package/dist/hooks/use-chat-input-model-state.cjs.map +1 -1
- package/dist/hooks/use-chat-input-model-state.d.ts +1 -1
- package/dist/hooks/use-chat-input-model-state.js.map +1 -1
- package/dist/hooks/use-chat-input-profile-state.cjs +2 -0
- package/dist/hooks/use-chat-input-profile-state.cjs.map +1 -0
- package/dist/hooks/use-chat-input-profile-state.d.ts +20 -0
- package/dist/hooks/use-chat-input-profile-state.js +22 -0
- package/dist/hooks/use-chat-input-profile-state.js.map +1 -0
- package/dist/hooks/use-conversation-name-context-menu.cjs +1 -1
- package/dist/hooks/use-conversation-name-context-menu.cjs.map +1 -1
- package/dist/hooks/use-conversation-name-context-menu.d.ts +4 -0
- package/dist/hooks/use-conversation-name-context-menu.js +44 -37
- package/dist/hooks/use-conversation-name-context-menu.js.map +1 -1
- package/dist/hooks/use-conversation-plugins.cjs +2 -0
- package/dist/hooks/use-conversation-plugins.cjs.map +1 -0
- package/dist/hooks/use-conversation-plugins.d.ts +9 -0
- package/dist/hooks/use-conversation-plugins.js +12 -0
- package/dist/hooks/use-conversation-plugins.js.map +1 -0
- package/dist/hooks/use-handle-plan-click.cjs +1 -1
- package/dist/hooks/use-handle-plan-click.cjs.map +1 -1
- package/dist/hooks/use-handle-plan-click.js +2 -1
- package/dist/hooks/use-handle-plan-click.js.map +1 -1
- package/dist/hooks/use-llm-configured.cjs +1 -1
- package/dist/hooks/use-llm-configured.cjs.map +1 -1
- package/dist/hooks/use-llm-configured.js +17 -16
- package/dist/hooks/use-llm-configured.js.map +1 -1
- package/dist/hooks/use-tracking.cjs +1 -1
- package/dist/hooks/use-tracking.cjs.map +1 -1
- package/dist/hooks/use-tracking.d.ts +51 -1
- package/dist/hooks/use-tracking.js +61 -2
- package/dist/hooks/use-tracking.js.map +1 -1
- package/dist/i18n/declaration.cjs +1 -1
- package/dist/i18n/declaration.cjs.map +1 -1
- package/dist/i18n/declaration.d.ts +138 -1
- package/dist/i18n/declaration.js +1 -1
- package/dist/i18n/declaration.js.map +1 -1
- package/dist/i18n/translation.cjs +18 -3
- package/dist/i18n/translation.cjs.map +1 -1
- package/dist/i18n/translation.js +2329 -0
- package/dist/i18n/translation.js.map +1 -1
- package/dist/icons/slack.cjs +2 -0
- package/dist/icons/slack.cjs.map +1 -0
- package/dist/icons/slack.js +19 -0
- package/dist/icons/slack.js.map +1 -0
- package/dist/icons/u-puzzle-piece.cjs +2 -0
- package/dist/icons/u-puzzle-piece.cjs.map +1 -0
- package/dist/icons/u-puzzle-piece.js +19 -0
- package/dist/icons/u-puzzle-piece.js.map +1 -0
- package/dist/icons/x-circle-solid.cjs +2 -0
- package/dist/icons/x-circle-solid.cjs.map +1 -0
- package/dist/icons/x-circle-solid.js +13 -0
- package/dist/icons/x-circle-solid.js.map +1 -0
- package/dist/locales/ar/openhands.json +138 -1
- package/dist/locales/ca/openhands.json +138 -1
- package/dist/locales/de/openhands.json +138 -1
- package/dist/locales/en/openhands.json +138 -1
- package/dist/locales/es/openhands.json +138 -1
- package/dist/locales/fr/openhands.json +138 -1
- package/dist/locales/it/openhands.json +138 -1
- package/dist/locales/ja/openhands.json +138 -1
- package/dist/locales/ko-KR/openhands.json +138 -1
- package/dist/locales/no/openhands.json +138 -1
- package/dist/locales/pt/openhands.json +138 -1
- package/dist/locales/tr/openhands.json +138 -1
- package/dist/locales/uk/openhands.json +138 -1
- package/dist/locales/zh-CN/openhands.json +138 -1
- package/dist/locales/zh-TW/openhands.json +138 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.js +0 -20
- package/dist/node_modules/@openhands/extensions/integrations/catalog/airtable.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/asana.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/asana.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/asana.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/asana.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js +70 -3
- package/dist/node_modules/@openhands/extensions/integrations/catalog/atlassian.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/bitbucket.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/bitbucket.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/bitbucket.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/bitbucket.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/box.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/box.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/box.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/box.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/canva.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/canva.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/canva.js +3 -7
- package/dist/node_modules/@openhands/extensions/integrations/catalog/canva.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/confluence.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/confluence.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/confluence.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/confluence.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js +27 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/datadog.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/discord.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/discord.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/discord.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/discord.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.js +20 -26
- package/dist/node_modules/@openhands/extensions/integrations/catalog/figma.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js +0 -9
- package/dist/node_modules/@openhands/extensions/integrations/catalog/github.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gmail.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gmail.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gmail.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gmail.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/google-calendar.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/google-calendar.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/google-calendar.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/google-calendar.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/google-docs.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/google-docs.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/google-docs.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/google-docs.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/google-drive.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/google-drive.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/google-drive.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/google-drive.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/google-sheets.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/google-sheets.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/google-sheets.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/google-sheets.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/intercom.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/intercom.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/intercom.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/intercom.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/jira.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/jira.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/jira.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/jira.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js +13 -13
- package/dist/node_modules/@openhands/extensions/integrations/catalog/linear.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-outlook.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/microsoft-teams.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/miro.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/miro.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/miro.js +14 -10
- package/dist/node_modules/@openhands/extensions/integrations/catalog/miro.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/monday.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/monday.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/monday.js +13 -10
- package/dist/node_modules/@openhands/extensions/integrations/catalog/monday.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/netlify.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/netlify.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/netlify.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/netlify.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js +1 -8
- package/dist/node_modules/@openhands/extensions/integrations/catalog/notion.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/okta.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/okta.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/okta.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/okta.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/onedrive.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.js +20 -18
- package/dist/node_modules/@openhands/extensions/integrations/catalog/posthog.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/quickbooks.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/quickbooks.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/quickbooks.js +66 -21
- package/dist/node_modules/@openhands/extensions/integrations/catalog/quickbooks.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/salesforce.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/salesforce.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/salesforce.js +17 -11
- package/dist/node_modules/@openhands/extensions/integrations/catalog/salesforce.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sentry.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sentry.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sentry.js +12 -17
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sentry.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/sharepoint.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/slack.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/stripe.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/stripe.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/stripe.js +14 -19
- package/dist/node_modules/@openhands/extensions/integrations/catalog/stripe.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.js +15 -20
- package/dist/node_modules/@openhands/extensions/integrations/catalog/supabase.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/superhuman-mail.cjs +2 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/superhuman-mail.cjs.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/superhuman-mail.js +33 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/superhuman-mail.js.map +1 -0
- package/dist/node_modules/@openhands/extensions/integrations/catalog/trello.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/trello.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/trello.js +10 -8
- package/dist/node_modules/@openhands/extensions/integrations/catalog/trello.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/vercel.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/vercel.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/vercel.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/vercel.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/xero.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/xero.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/xero.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/xero.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/zoom.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/zoom.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/zoom.js +1 -6
- package/dist/node_modules/@openhands/extensions/integrations/catalog/zoom.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js +71 -89
- package/dist/node_modules/@openhands/extensions/integrations/catalog-index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/index.cjs +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/integrations/index.js +4 -4
- package/dist/node_modules/@openhands/extensions/integrations/index.js.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.cjs +502 -43
- package/dist/node_modules/@openhands/extensions/skills/index.cjs.map +1 -1
- package/dist/node_modules/@openhands/extensions/skills/index.js +58 -33
- package/dist/node_modules/@openhands/extensions/skills/index.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-profiles-client.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-profiles-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-profiles-client.js +40 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-profiles-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js +4 -4
- package/dist/node_modules/@openhands/typescript-client/dist/client/agent-server-compatibility.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js +3 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/bash-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js +3 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/conversation-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.cjs +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/desktop-client.js +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.cjs +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/hooks-client.js +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/http-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/http-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/http-client.js +84 -27
- package/dist/node_modules/@openhands/typescript-client/dist/client/http-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/mcp-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/mcp-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/mcp-client.js +9 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/mcp-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.cjs +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/meta-profiles-client.js +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/plugins-client.cjs +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/plugins-client.cjs.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/plugins-client.js +42 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/plugins-client.js.map +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.cjs +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/shared-client.js +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/skills-client.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/skills-client.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/skills-client.js +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/skills-client.js.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.cjs +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/sub-agents-client.js +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.cjs +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/client/tool-client.js +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/clients.cjs +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/clients.js +20 -0
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/conversation-manager.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/conversation-manager.js +18 -0
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/conversation.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/conversation.js +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-conversation.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-conversation.js +2 -0
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.cjs +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.cjs.map +1 -1
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.js +15 -17
- package/dist/node_modules/@openhands/typescript-client/dist/conversation/remote-state.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 +3 -0
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/workspace.cjs +1 -0
- package/dist/node_modules/@openhands/typescript-client/dist/workspace/workspace.js +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +7 -4
- package/dist/package.js.map +1 -1
- package/dist/routes/agent-settings.d.ts +106 -0
- package/dist/routes/files-tab.cjs +1 -1
- package/dist/routes/files-tab.js +23 -23
- package/dist/routes/llm-settings.cjs +1 -1
- package/dist/routes/llm-settings.cjs.map +1 -1
- package/dist/routes/llm-settings.d.ts +6 -4
- package/dist/routes/llm-settings.js +0 -1
- package/dist/routes/llm-settings.js.map +1 -1
- package/dist/routes/mcp.cjs.map +1 -1
- package/dist/routes/mcp.js.map +1 -1
- package/dist/services/settings.cjs +1 -1
- package/dist/services/settings.cjs.map +1 -1
- package/dist/services/settings.js +2 -6
- package/dist/services/settings.js.map +1 -1
- package/dist/stores/command-menu-store.cjs +2 -0
- package/dist/stores/command-menu-store.cjs.map +1 -0
- package/dist/stores/command-menu-store.d.ts +8 -0
- package/dist/stores/command-menu-store.js +12 -0
- package/dist/stores/command-menu-store.js.map +1 -0
- package/dist/stores/conversation-panel-preferences-store.cjs +1 -1
- package/dist/stores/conversation-panel-preferences-store.cjs.map +1 -1
- package/dist/stores/conversation-panel-preferences-store.js +1 -1
- package/dist/stores/conversation-panel-preferences-store.js.map +1 -1
- package/dist/stores/conversation-store.cjs +1 -1
- package/dist/stores/conversation-store.cjs.map +1 -1
- package/dist/stores/conversation-store.d.ts +1 -0
- package/dist/stores/conversation-store.js +1 -0
- package/dist/stores/conversation-store.js.map +1 -1
- package/dist/stores/goal-store.cjs +2 -0
- package/dist/stores/goal-store.cjs.map +1 -0
- package/dist/stores/goal-store.d.ts +28 -0
- package/dist/stores/goal-store.js +14 -0
- package/dist/stores/goal-store.js.map +1 -0
- package/dist/themes/color-themes.cjs +3 -3
- package/dist/themes/color-themes.cjs.map +1 -1
- package/dist/themes/color-themes.d.ts +13 -2
- package/dist/themes/color-themes.js +2 -2
- package/dist/themes/color-themes.js.map +1 -1
- package/dist/types/agent-server/core/events/conversation-state-event.d.ts +39 -3
- package/dist/types/agent-server/type-guards.cjs +1 -1
- package/dist/types/agent-server/type-guards.cjs.map +1 -1
- package/dist/types/agent-server/type-guards.d.ts +2 -1
- package/dist/types/agent-server/type-guards.js +3 -3
- package/dist/types/agent-server/type-guards.js.map +1 -1
- package/dist/types/mcp-auth.cjs +2 -0
- package/dist/types/mcp-auth.cjs.map +1 -0
- package/dist/types/mcp-auth.d.ts +43 -0
- package/dist/types/mcp-auth.js +13 -0
- package/dist/types/mcp-auth.js.map +1 -0
- package/dist/types/mcp-server.d.ts +22 -1
- package/dist/types/settings.d.ts +6 -4
- package/dist/ui/context-menu.d.ts +1 -1
- package/dist/utils/acp-command.d.ts +64 -0
- package/dist/utils/automation-debug-prompt.d.ts +18 -0
- package/dist/utils/constants.cjs +1 -1
- package/dist/utils/constants.cjs.map +1 -1
- package/dist/utils/constants.d.ts +2 -0
- package/dist/utils/constants.js +12 -3
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/dropdown-classes.cjs +1 -1
- package/dist/utils/dropdown-classes.cjs.map +1 -1
- package/dist/utils/dropdown-classes.js +4 -2
- package/dist/utils/dropdown-classes.js.map +1 -1
- package/dist/utils/form-control-classes.cjs +1 -1
- package/dist/utils/form-control-classes.js +1 -1
- package/dist/utils/handle-event-for-ui.cjs +1 -1
- package/dist/utils/handle-event-for-ui.cjs.map +1 -1
- package/dist/utils/handle-event-for-ui.js +72 -37
- package/dist/utils/handle-event-for-ui.js.map +1 -1
- package/dist/utils/mcp-config.cjs +1 -1
- package/dist/utils/mcp-config.cjs.map +1 -1
- package/dist/utils/mcp-config.d.ts +15 -9
- package/dist/utils/mcp-config.js +124 -53
- package/dist/utils/mcp-config.js.map +1 -1
- package/dist/utils/mcp-installed-server-display.cjs +2 -0
- package/dist/utils/mcp-installed-server-display.cjs.map +1 -0
- package/dist/utils/mcp-installed-server-display.d.ts +8 -0
- package/dist/utils/mcp-installed-server-display.js +12 -0
- package/dist/utils/mcp-installed-server-display.js.map +1 -0
- package/dist/utils/mcp-installed-servers.cjs +1 -1
- package/dist/utils/mcp-installed-servers.cjs.map +1 -1
- package/dist/utils/mcp-installed-servers.js +4 -4
- package/dist/utils/mcp-installed-servers.js.map +1 -1
- package/dist/utils/mcp-marketplace-utils.cjs +1 -1
- package/dist/utils/mcp-marketplace-utils.cjs.map +1 -1
- package/dist/utils/mcp-marketplace-utils.d.ts +2 -0
- package/dist/utils/mcp-marketplace-utils.js +31 -16
- package/dist/utils/mcp-marketplace-utils.js.map +1 -1
- package/dist/utils/mcp-server-name.cjs +2 -0
- package/dist/utils/mcp-server-name.cjs.map +1 -0
- package/dist/utils/mcp-server-name.d.ts +3 -0
- package/dist/utils/mcp-server-name.js +12 -0
- package/dist/utils/mcp-server-name.js.map +1 -0
- package/dist/utils/plugin-display.cjs +2 -0
- package/dist/utils/plugin-display.cjs.map +1 -0
- package/dist/utils/plugin-display.d.ts +20 -0
- package/dist/utils/plugin-display.js +29 -0
- package/dist/utils/plugin-display.js.map +1 -0
- package/dist/utils/settings-utils.cjs.map +1 -1
- package/dist/utils/settings-utils.js.map +1 -1
- package/dist/utils/workspaces-compatibility.cjs +1 -1
- package/dist/utils/workspaces-compatibility.cjs.map +1 -1
- package/dist/utils/workspaces-compatibility.js +1 -0
- package/dist/utils/workspaces-compatibility.js.map +1 -1
- package/package.json +7 -4
- package/scripts/check-sdk-version-sync.mjs +6 -6
- package/scripts/check-translation-completeness.cjs +6 -0
- package/scripts/dev-safe.mjs +14 -3
- package/scripts/dev-with-automation.mjs +4 -0
- package/scripts/gen-acp-docker-env.mjs +107 -0
- package/scripts/ingress.mjs +66 -226
- package/scripts/proxy-utils.mjs +171 -0
- package/scripts/static-server.mjs +127 -283
- package/build/assets/Trans-CiZR6eVI.js +0 -1
- package/build/assets/active-backend-context-CEuva6ZJ.js +0 -1
- package/build/assets/add-backend-modal-b_eiVk3A.js +0 -1
- package/build/assets/agent-server-conversation-service.api-D_uJ7BKc.js +0 -5
- package/build/assets/agent-settings-DyfziYyM.js +0 -2
- package/build/assets/alert-banner-BFayS5vM.js +0 -1
- package/build/assets/analytics-consent-form-modal-CQ22qlFF.js +0 -1
- package/build/assets/api-key-entry-screen-KnIwP0vN.js +0 -1
- package/build/assets/app-settings-CBaHJ5vJ.js +0 -1
- package/build/assets/automation-detail-DgQswnXg.js +0 -1
- package/build/assets/automations-list-D99p6CoQ.js +0 -1
- package/build/assets/back-nav-button-Cp9z-wsG.js +0 -1
- package/build/assets/backend-form-modal-BABAz-zH.js +0 -1
- package/build/assets/backend-synced-settings-badge-DzwWQC4T.js +0 -1
- package/build/assets/base-modal-1bHiB5Wf.js +0 -1
- package/build/assets/brand-button-FHWgEb4Q.js +0 -1
- package/build/assets/browser-store-B9h0eW79.js +0 -1
- package/build/assets/browser-tab-JiCXo0Nc.js +0 -1
- package/build/assets/chat-send-button-QtyofqFt.js +0 -1
- package/build/assets/check-6ieIiPhW.js +0 -1
- package/build/assets/checkmark-BfgRVMHK.js +0 -1
- package/build/assets/circle-plus-check-toggle-CmINKfZj.js +0 -1
- package/build/assets/close-DhH0uMa7.js +0 -1
- package/build/assets/code-tag-CnORXDJj.js +0 -1
- package/build/assets/combobox-caret-BB15S7zY.js +0 -1
- package/build/assets/condenser-settings-BOKNShD9.js +0 -1
- package/build/assets/confirmation-modal-CofmThy4.js +0 -1
- package/build/assets/context-menu-list-item-DO12IEaK.js +0 -1
- package/build/assets/conversation-DIzv-jq8.js +0 -1
- package/build/assets/conversation-DV3odvMe.js +0 -19
- package/build/assets/conversation-local-storage-DK7yJr5N.js +0 -1
- package/build/assets/conversation-panel-CgCarTAn.js +0 -1
- package/build/assets/conversation-service.api-RV_bOKNz.js +0 -1
- package/build/assets/conversation-state-store-4obo4ZMf.js +0 -1
- package/build/assets/conversation-store-CXrL0v-X.js +0 -6
- package/build/assets/conversation-tab-empty-state-CqT5ur_H.js +0 -1
- package/build/assets/copy-C5tBqfWu.js +0 -1
- package/build/assets/copy-to-clipboard-button-BVFYcsg_.js +0 -1
- package/build/assets/createLucideIcon-D3nkdIAN.js +0 -1
- package/build/assets/declaration-B0yY_dkQ.js +0 -1
- package/build/assets/device-verify-DRupI_hz.js +0 -1
- package/build/assets/dist-D5d5zm8o.js +0 -1
- package/build/assets/dist-fV7trlfb.js +0 -1
- package/build/assets/dropdown-classes-5IsMjYYw.js +0 -1
- package/build/assets/edit-automation-modal-BG-gd82b.js +0 -1
- package/build/assets/ellipsis-button-DWvVZO_r.js +0 -1
- package/build/assets/entry.client-uhbVfCtd.js +0 -2
- package/build/assets/enum-filter-dropdown-CB2fqz_e.js +0 -1
- package/build/assets/environment-switch-overlay-Oeal5TVq.js +0 -1
- package/build/assets/extensions-hub-DxiE0AZR.js +0 -1
- package/build/assets/files-tab-1F2OlNeH.js +0 -1
- package/build/assets/files-tab-store-C1q5Rbx3.js +0 -1
- package/build/assets/folder-C5tr7xyN.js +0 -1
- package/build/assets/get-language-from-path-E1JKsbeE.js +0 -1
- package/build/assets/git-provider-icon-CKs-22Ts.js +0 -1
- package/build/assets/home-B3E0le0g.js +0 -1
- package/build/assets/iconBase-DMoh3FEg.js +0 -1
- package/build/assets/index-redirect-DhuK5mhS.js +0 -1
- package/build/assets/install-server-modal-DjintV14.js +0 -1
- package/build/assets/is-backend-llm-ready-Bj44pekN.js +0 -1
- package/build/assets/launch-DCU3S84p.js +0 -1
- package/build/assets/lesson-plan-BUUPKVsa.js +0 -3
- package/build/assets/link-external-CF4KHxx-.js +0 -1
- package/build/assets/llm-client-BakM_czF.js +0 -1
- package/build/assets/llm-not-configured-banner-BV-NIjfR.js +0 -27
- package/build/assets/llm-settings-B5d7PHzz.js +0 -1
- package/build/assets/llm-settings-C5whb-0p.js +0 -1
- package/build/assets/loader-circle-DyX8DmLg.js +0 -1
- package/build/assets/loading-spinner-BvOAco8a.js +0 -1
- package/build/assets/manage-backends-modal-D9ClxVpM.js +0 -1
- package/build/assets/manifest-38a873aa.js +0 -1
- package/build/assets/mcp-7rk44GRS.js +0 -9
- package/build/assets/mcp-client-DxHXYNOw.js +0 -1
- package/build/assets/messages-DgBEaXil.js +0 -43
- package/build/assets/modal-backdrop-DjAC2zOZ.js +0 -1
- package/build/assets/modal-body-OJdIUJ68.js +0 -1
- package/build/assets/modal-close-button-BNjGesHc.js +0 -1
- package/build/assets/model-selector-w2uGPM5y.js +0 -1
- package/build/assets/navigation-context-CUJ60pLI.js +0 -1
- package/build/assets/navigation-link-BiPKTOHF.js +0 -1
- package/build/assets/onboarding-Cit87z8g.js +0 -1
- package/build/assets/onboarding-modal-JPrzvr8W.js +0 -1
- package/build/assets/openhands-logo-uNs9g6LY.js +0 -1
- package/build/assets/option-service.api-BLYUhnCF.js +0 -1
- package/build/assets/organization-service.api-DpSSwlZu.js +0 -1
- package/build/assets/path-utils-B4WAVqvK.js +0 -1
- package/build/assets/plan-components-DSOTFW2D.js +0 -1
- package/build/assets/planner-tab-LmoxgKKe.js +0 -1
- package/build/assets/preload-helper-D_sPnjeL.js +0 -1
- package/build/assets/profiles-client-B4SJ4ZAf.js +0 -1
- package/build/assets/providers-BGUAB8kf.js +0 -1
- package/build/assets/react-Dn-iWFF5.js +0 -1
- package/build/assets/react-dom-BBXlXOZX.js +0 -1
- package/build/assets/react-uQK8du1l.js +0 -1
- package/build/assets/recommended-automations-launcher-Df9MXUpX.js +0 -50
- package/build/assets/root-BShAdYGY.css +0 -1
- package/build/assets/root-C99reK-P.js +0 -2
- package/build/assets/root-layout-BtH64XeC.js +0 -2
- package/build/assets/runtime-waiting-state-C7MjXDeW.js +0 -1
- package/build/assets/schema-field-BCDuEMrl.js +0 -1
- package/build/assets/sdk-section-page-XJN9mGju.js +0 -1
- package/build/assets/sdk-settings-schema-B15AE1GH.js +0 -1
- package/build/assets/search-rob4u9f8.js +0 -1
- package/build/assets/secrets-service-CrPyCR8u.js +0 -1
- package/build/assets/secrets-settings-UJn15N7E.js +0 -1
- package/build/assets/settings-C5aUD_sQ.js +0 -1
- package/build/assets/settings-dropdown-input-DQRt2_RA.js +0 -1
- package/build/assets/settings-gear-B7bZDo_8.js +0 -1
- package/build/assets/settings-index-zP_rYIW1.js +0 -1
- package/build/assets/settings-input-n8FzVso3.js +0 -1
- package/build/assets/settings-list-classes-DquY3fwm.js +0 -1
- package/build/assets/settings-modal-szlQ6LpE.js +0 -1
- package/build/assets/settings-section-header-context-DrXgyNC-.js +0 -1
- package/build/assets/settings-service.api-B4G8NzCM.js +0 -1
- package/build/assets/settings-switch-DsbEm3ie.js +0 -1
- package/build/assets/shared-conversation-BrAvqeaI.js +0 -1
- package/build/assets/sidebar-mobile-menu-toggle-BRZGCe-l.js +0 -1
- package/build/assets/sidebar-nav-link-B_EygIce.js +0 -1
- package/build/assets/skill-card-pill-row-Bq9Imkdh.js +0 -1
- package/build/assets/skills-Wg6i0kbu.js +0 -1
- package/build/assets/skills-client-DNd444Bm.js +0 -1
- package/build/assets/skills-plugins-DaGkVI7-.js +0 -1
- package/build/assets/skills-settings-Dlp0WFaT.js +0 -2
- package/build/assets/styled-tooltip-ulgpZDga.js +0 -1
- package/build/assets/suspense-BqBQEuKs.js +0 -1
- package/build/assets/switch-skeleton-C49gVWOQ.js +0 -1
- package/build/assets/task-list-tab-Bz-UlCm2.js +0 -1
- package/build/assets/telemetry-DD3HKMgf.js +0 -2
- package/build/assets/terminal-BwLvVzyJ.js +0 -1
- package/build/assets/toggle-switch-CxW8-lBI.js +0 -1
- package/build/assets/typography-BLf_mRKH.js +0 -1
- package/build/assets/u-check-circle-CxTAJuY9.js +0 -1
- package/build/assets/u-check-circle-half-Bj73jfUG.js +0 -1
- package/build/assets/u-circuit-C-6V9H9C.js +0 -1
- package/build/assets/u-edit-C7OnK2sa.js +0 -1
- package/build/assets/use-acp-credential-form-oehc057O.js +0 -1
- package/build/assets/use-active-conversation-CFXVX2on.js +0 -1
- package/build/assets/use-agent-state-D6xfZA4-.js +0 -1
- package/build/assets/use-backends-health-93yRIOWs.js +0 -1
- package/build/assets/use-breakpoint-Xdy_aZHE.js +0 -1
- package/build/assets/use-click-outside-element-CADb_gCP.js +0 -1
- package/build/assets/use-cloud-current-user-id-CzOXsy04.js +0 -1
- package/build/assets/use-config-oXjEWyb6.js +0 -1
- package/build/assets/use-create-conversation-D-YkgrxS.js +0 -1
- package/build/assets/use-create-secret-CX7Ij7W4.js +0 -1
- package/build/assets/use-event-store-DMRAQQi8.js +0 -1
- package/build/assets/use-handle-plan-click-CwW2Ijc2.js +0 -1
- package/build/assets/use-is-authed-CNbX1KMm.js +0 -1
- package/build/assets/use-launch-skill-in-chat-xI9byRUw.js +0 -1
- package/build/assets/use-llm-profiles-BXRZ2rBh.js +0 -1
- package/build/assets/use-runtime-is-ready-Dwzs9_vp.js +0 -1
- package/build/assets/use-settings-_usWr_qn.js +0 -1
- package/build/assets/use-settings-nav-items-DoB5iH-7.js +0 -16
- package/build/assets/use-skills-BtorhoCN.js +0 -1
- package/build/assets/use-task-list-u46BhYBC.js +0 -1
- package/build/assets/use-tracking-Ca7p71hH.js +0 -1
- package/build/assets/use-user-conversation-U-16WF6G.js +0 -1
- package/build/assets/useMutation-CseCrRRO.js +0 -1
- package/build/assets/useQuery-bowvACed.js +0 -1
- package/build/assets/useTranslation-KhTtKmnv.js +0 -1
- package/build/assets/utils-cRyMoFbz.js +0 -1
- package/build/assets/vendor~conversation-panel~conversation~alert-banner-CjfR7T3x.js +0 -1
- package/build/assets/vendor~entry.client-_zl82x5T.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~dj9x5fm9-CgCGB-3J.js +0 -177
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~jfvr34cq-BJdsUTJG.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~m3df9r20-BynFAJ_S.js +0 -1
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~nk00xiud-MfCRtPrK.js +0 -9
- package/build/assets/vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~ghtfhmuy-BHDILMe2.js +0 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation-BFZmbXpq.js +0 -1
- package/build/assets/vendor~root-layout~conversation-panel~conversation~index-BPY-kNjK.js +0 -1
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation-BhWqQNmF.js +0 -1
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~cfyi58ut-CnnEa0dP.js +0 -1
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~clac83qc-DMX6XUwI.js +0 -2
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ldu51w4e-Cqp6k3RG.js +0 -1
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~extensions-hub~skills-settings~mcp~~ldu51w4e-DS4GWhCz.js +0 -9
- package/build/assets/vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~ji28rqgb-DVffa9Ks.js +0 -48
- package/build/assets/vendor~root-layout~home~mcp~automations-list~onboarding-modal-BzR6ypP3.js +0 -1
- package/build/assets/vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~hzfcl1q6-BcvHZmEZ.js +0 -2
- package/build/assets/vendor~root-layout~home~mcp~llm-settings~agent-settings~condenser-settings~verification-set~hzfcl1q6-Cuvp6wqR.js +0 -14
- package/build/assets/verification-settings-DKZnUHD6.js +0 -1
- package/build/assets/x-DpnGZyVW.js +0 -1
- package/build/assets/x-mark-x3tvCZzc.js +0 -1
- package/dist/components/features/analytics/analytics-consent-form-modal.d.ts +0 -5
- package/dist/components/features/chat/switch-profile-button.cjs +0 -2
- package/dist/components/features/chat/switch-profile-button.cjs.map +0 -1
- package/dist/components/features/chat/switch-profile-button.d.ts +0 -1
- package/dist/components/features/chat/switch-profile-button.js +0 -48
- package/dist/components/features/chat/switch-profile-button.js.map +0 -1
- package/dist/components/features/chat/switch-profile-context-menu.cjs +0 -2
- package/dist/components/features/chat/switch-profile-context-menu.cjs.map +0 -1
- package/dist/components/features/chat/switch-profile-context-menu.d.ts +0 -9
- package/dist/components/features/chat/switch-profile-context-menu.js +0 -106
- package/dist/components/features/chat/switch-profile-context-menu.js.map +0 -1
- package/dist/components/features/onboarding/is-backend-llm-ready.d.ts +0 -30
- package/dist/icons/u-circuit.cjs +0 -2
- package/dist/icons/u-circuit.cjs.map +0 -1
- package/dist/icons/u-circuit.js +0 -19
- package/dist/icons/u-circuit.js.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/clickup.cjs +0 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/clickup.cjs.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/clickup.js +0 -35
- package/dist/node_modules/@openhands/extensions/integrations/catalog/clickup.js.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/dropbox.cjs +0 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/dropbox.cjs.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/dropbox.js +0 -35
- package/dist/node_modules/@openhands/extensions/integrations/catalog/dropbox.js.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/freshdesk.cjs +0 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/freshdesk.cjs.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/freshdesk.js +0 -35
- package/dist/node_modules/@openhands/extensions/integrations/catalog/freshdesk.js.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs +0 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.cjs.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js +0 -35
- package/dist/node_modules/@openhands/extensions/integrations/catalog/gitlab.js.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/mailchimp.cjs +0 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/mailchimp.cjs.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/mailchimp.js +0 -35
- package/dist/node_modules/@openhands/extensions/integrations/catalog/mailchimp.js.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/pipedrive.cjs +0 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/pipedrive.cjs.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/pipedrive.js +0 -35
- package/dist/node_modules/@openhands/extensions/integrations/catalog/pipedrive.js.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/plaid.cjs +0 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/plaid.cjs.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/plaid.js +0 -28
- package/dist/node_modules/@openhands/extensions/integrations/catalog/plaid.js.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/servicenow.cjs +0 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/servicenow.cjs.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/servicenow.js +0 -35
- package/dist/node_modules/@openhands/extensions/integrations/catalog/servicenow.js.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/shopify.cjs +0 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/shopify.cjs.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/shopify.js +0 -35
- package/dist/node_modules/@openhands/extensions/integrations/catalog/shopify.js.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/zendesk.cjs +0 -2
- package/dist/node_modules/@openhands/extensions/integrations/catalog/zendesk.cjs.map +0 -1
- package/dist/node_modules/@openhands/extensions/integrations/catalog/zendesk.js +0 -35
- package/dist/node_modules/@openhands/extensions/integrations/catalog/zendesk.js.map +0 -1
- /package/build/assets/{agent-server-ui-style-scope-CIDFDeQb.js → agent-server-ui-style-scope-COnDHTm5.js} +0 -0
- /package/build/assets/{automation-DNgDxqtq.js → automation-BU8zu-FP.js} +0 -0
- /package/build/assets/{common-KeiA2Rod.js → common-Dh7OqABE.js} +0 -0
- /package/build/assets/{environment-switch-store-BpKxp6Xq.js → environment-switch-store-DkjlKWzN.js} +0 -0
- /package/build/assets/{extension-module-card-classes-DvvyImGv.js → extension-module-card-classes-9V3J9J_b.js} +0 -0
- /package/build/assets/{git-status-mapper-B3_HbzUT.js → git-status-mapper-BI8FyUVp.js} +0 -0
- /package/build/assets/{handle-capture-consent-BChvj6mt.js → handle-capture-consent-CPMXU29K.js} +0 -0
- /package/build/assets/{llm-subscription-C1xDoa3K.js → llm-subscription-DtsX5Lhg.js} +0 -0
- /package/build/assets/{map-provider-MonJL5SS.js → map-provider-BM2SJarp.js} +0 -0
- /package/build/assets/{objectWithoutPropertiesLoose-BRYudkUn.js → objectWithoutPropertiesLoose-BgYIAs2y.js} +0 -0
- /package/build/assets/{rolldown-runtime-wFmyQBCi.js → rolldown-runtime-BFRubm34.js} +0 -0
- /package/build/assets/{settings-like-page-layout-classes-DNg2vKSM.js → settings-like-page-layout-classes-DENKlZpD.js} +0 -0
- /package/build/assets/{v4-BMWDcIWQ.js → v4-DbCkTSoU.js} +0 -0
- /package/build/assets/{vendor~browser-yZEspfT9.js → vendor~browser-Dqd33JyP.js} +0 -0
- /package/build/assets/{vendor~terminal-CcUoOdAH.js → vendor~terminal-aeP3PnKf.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n,xt as r}from"./vendor-styling-CI0PQ3ab.js";import{n as i}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~i3v2mlbw-BrJQ3XZH.js";import{t as a}from"./useMutation-DCE9RcgK.js";import{t as o}from"./useQuery-CpjHYtZc.js";import{t as s}from"./useTranslation-Cgy4JA_g.js";import{t as c}from"./declaration-B9kpCaYl.js";import{b as l,y as u}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~ncdxw0bh-ClHnt5lR.js";import{A as ee,j as te,n as d}from"./active-backend-context-u2tdYRgH.js";import{t as f}from"./utils-CE0lDWtb.js";import{c as p,t as m,u as h}from"./agent-server-client-options-DVLRd9sw.js";import{t as g}from"./proxy-CHmFkV16.js";import{r as _}from"./modal-classes-DPqxSyuP.js";import{f as v,l as y}from"./form-control-classes-9rkU4usZ.js";import{t as b}from"./brand-button-DKPMEKcW.js";import{r as x,u as S}from"./dropdown-classes-CgQ45JmQ.js";import{t as C}from"./settings-input-DYs7t3oK.js";import{t as w}from"./use-tracking-GtXCHmTv.js";import{t as ne}from"./use-llm-profiles-DjackuP1.js";import{n as T,t as re}from"./context-menu-list-item-DBFzplWW.js";import{t as E}from"./settings-dropdown-input-xzoZwgUe.js";import{t as D}from"./x-mark-Batp6gXa.js";import{t as O}from"./automation-BU8zu-FP.js";var k=`/api/automation`,A=l.create();A.interceptors.request.use(e=>{let t=h();if(!t)throw new m;e.baseURL||=t.host;let n=t.apiKey?.trim();return n&&e.headers.set(`X-Session-API-Key`,n),e});function j(e,t){let n=new URLSearchParams;return n.set(`limit`,String(e)),n.set(`offset`,String(t)),n.toString()}var M=class e{static async listAutomations(e={}){let{limit:t=50,offset:n=0}=e,r=p().backend;if(r.kind===`cloud`)return g({backend:r,method:`GET`,path:`${k}/v1?${j(t,n)}`});let{data:i}=await A.get(`${k}/v1`,{params:{limit:t,offset:n}});return i}static async getAutomations(t=50,n=0){return e.listAutomations({limit:t,offset:n})}static async getAutomation(e){let t=p().backend,n=`${k}/v1/${encodeURIComponent(e)}`;if(t.kind===`cloud`)return g({backend:t,method:`GET`,path:n});let{data:r}=await A.get(n);return r}static async updateAutomation(e,t){let n=p().backend,r=`${k}/v1/${encodeURIComponent(e)}`;if(n.kind===`cloud`)return g({backend:n,method:`PATCH`,path:r,body:t});let{data:i}=await A.patch(r,t);return i}static async deleteAutomation(e){let t=p().backend,n=`${k}/v1/${encodeURIComponent(e)}`;if(t.kind===`cloud`){await g({backend:t,method:`DELETE`,path:n});return}await A.delete(n)}static async dispatchAutomation(e){let t=p().backend,n=`${k}/v1/${encodeURIComponent(e)}/dispatch`;if(t.kind===`cloud`)return g({backend:t,method:`POST`,path:n});let{data:r}=await A.post(n);return r}static async listAutomationRuns(e,t={}){let{limit:n=50,offset:r=0}=t,i=p().backend,a=`${k}/v1/${encodeURIComponent(e)}/runs`;if(i.kind===`cloud`)return g({backend:i,method:`GET`,path:`${a}?${j(n,r)}`});let{data:o}=await A.get(a,{params:{limit:n,offset:r}});return o}static async getAutomationRuns(t,n=50,r=0){return e.listAutomationRuns(t,{limit:n,offset:r})}static async toggleAutomation(t,n){return e.updateAutomation(t,{enabled:n})}static async downloadTarball(e,t){let n=p().backend,r=`${k}/v1/${encodeURIComponent(e)}/tarball`,i;if(n.kind===`cloud`)i=await g({backend:n,method:`GET`,path:r,responseType:`blob`});else{let{data:e}=await A.get(r,{responseType:`blob`});i=e}let a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=`${t}.tar`,o.click(),URL.revokeObjectURL(a)}static async checkHealth(){let e=p().backend,t=`${k}/health`;try{if(e.kind===`cloud`)return await g({backend:e,method:`GET`,path:t,timeoutSeconds:5});let{data:n}=await A.get(t,{timeout:5e3});return n}catch{return{status:`error`}}}},N=e(t()),ie=e(r(),1),P=n(),F=[`automation-detail`],I=[`automation-runs`];function ae(e){let{id:t,enabled:n=!0}=e,r=d();return o({queryKey:[...F,t,r.backend.id,r.orgId],queryFn:()=>M.getAutomation(t),staleTime:300*1e3,enabled:!!t&&n})}function oe(e){let{id:t,limit:n=20,offset:r=0,enabled:i=!0}=e,a=d();return o({queryKey:[...I,t,{limit:n,offset:r},a.backend.id,a.orgId],queryFn:()=>M.getAutomationRuns(t,n,r),staleTime:60*1e3,enabled:!!t&&i,refetchInterval:e=>{let t=e.state.data;return t&&t.runs.some(e=>e.status===O.PENDING||e.status===O.RUNNING)?3e3:!1}})}var L=[`automations`];function R(e={}){let{limit:t=50,offset:n=0,enabled:r=!0}=e,i=d();return o({queryKey:[...L,{limit:t,offset:n},i.backend.id,i.orgId],queryFn:()=>M.getAutomations(t,n),staleTime:0,enabled:r})}function z(){let e=i(),t=d(),{trackAutomationDeactivated:n}=w();return a({mutationFn:({id:e,enabled:t})=>M.toggleAutomation(e,t),onSuccess:(r,i)=>{e.invalidateQueries({queryKey:L}),e.invalidateQueries({queryKey:F}),i.enabled||n({backendKind:t.backend.kind})}})}function B(){let e=i(),t=d(),{trackAutomationEdited:n}=w();return a({mutationFn:({id:e,body:t})=>M.updateAutomation(e,t),onSuccess:()=>{e.invalidateQueries({queryKey:L}),e.invalidateQueries({queryKey:F}),n({backendKind:t.backend.kind})}})}function V(){let e=i(),t=d(),{trackAutomationDeleted:n}=w();return a({mutationFn:e=>M.deleteAutomation(e),onSuccess:()=>{e.invalidateQueries({queryKey:L}),n({backendKind:t.backend.kind})}})}function H(){let e=i(),t=d(),{trackAutomationExecuted:n}=w();return a({mutationFn:e=>M.dispatchAutomation(e),onSuccess:(r,i)=>{e.invalidateQueries({queryKey:L}),e.invalidateQueries({queryKey:F}),e.invalidateQueries({queryKey:[...I,i]}),n({backendKind:t.backend.kind})}})}var U=[`automation-health`];function W(){let e=d();return o({queryKey:[...U,e.backend.id,e.orgId],queryFn:()=>M.checkHealth(),staleTime:30*1e3,retry:!1})}var G=e=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`currentColor`,viewBox:`0 0 20 20`,...e,children:(0,P.jsx)(`path`,{d:`M10 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4z`})}),K=f(`inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted hover:bg-interactive-hover hover:text-white focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-muted`,x),q=f(`inline-flex h-8 shrink-0 cursor-pointer items-center gap-1.5 rounded-md border-0 bg-transparent px-2 text-xs text-muted hover:bg-interactive-hover hover:text-white focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-muted`,x);function se({icon:e,label:t}){return(0,P.jsxs)(`span`,{className:`flex min-w-0 w-full items-center gap-2`,children:[(0,P.jsx)(`span`,{className:f(`[&_svg]:size-4`,S),"aria-hidden":!0,children:e}),(0,P.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t})]})}function ce({items:e}){let{t}=s(`openhands`),[n,r]=(0,N.useState)(!1),[i,a]=(0,N.useState)(),o=(0,N.useRef)(null),l=(0,N.useRef)(null);(0,N.useLayoutEffect)(()=>{if(!n||!o.current)return;let e=()=>{let e=o.current?.getBoundingClientRect();e&&a({position:`fixed`,zIndex:9999,top:e.bottom+4,right:window.innerWidth-e.right})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[n]),(0,N.useEffect)(()=>{if(!n)return;let e=e=>{let t=e.target;o.current?.contains(t)||l.current?.contains(t)||r(!1)},t=e=>{e.key===`Escape`&&r(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[n]);let u=n&&i?(0,P.jsx)(T,{ref:l,theme:`popover`,className:`min-w-[10rem]`,children:e.map(e=>(0,P.jsx)(`li`,{children:(0,P.jsx)(re,{onClick:t=>{t.stopPropagation(),e.onClick(),r(!1)},isDisabled:e.disabled,className:`group`,children:(0,P.jsx)(se,{icon:e.icon,label:e.label})})},e.label))}):null;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`button`,{ref:o,type:`button`,onClick:e=>{e.stopPropagation(),r(e=>!e)},className:K,"aria-label":t(c.AUTOMATIONS$ACTIONS_MENU),"aria-expanded":n,"aria-haspopup":`menu`,children:(0,P.jsx)(G,{className:`size-4`})}),n&&i&&typeof document<`u`?ie.createPortal((0,P.jsx)(`div`,{style:i,children:u}),document.body):null]})}function le(e){return!0}var ue=e=>(0,P.jsxs)(`svg`,{width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,P.jsx)(`g`,{clipPath:`url(#clip0_8467_30872)`,children:(0,P.jsx)(`path`,{d:`M6.26693 21.4874L6.25583 21.4951L6.24514 21.5033C5.95991 21.7227 5.5 21.5308 5.5 21.0996V2.89961C5.5 2.4684 5.95991 2.2765 6.24514 2.49592L6.25634 2.50452L6.26799 2.51249L19.518 11.5625L19.518 11.5625L19.5226 11.5656C19.8258 11.7677 19.8258 12.1815 19.5226 12.3836L19.5226 12.3835L19.5169 12.3874L6.26693 21.4874Z`,fill:`currentColor`,stroke:`currentColor`})}),(0,P.jsx)(`defs`,{children:(0,P.jsx)(`clipPath`,{id:`clip0_8467_30872`,children:(0,P.jsx)(`rect`,{width:24,height:24,fill:`white`})})})]}),de=e=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z`})}),fe=e=>(0,P.jsx)(`svg`,{viewBox:`0 0 18 18`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,P.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2.4375 9C2.4375 5.37563 5.37563 2.4375 9 2.4375C12.6244 2.4375 15.5625 5.37563 15.5625 9C15.5625 12.6244 12.6244 15.5625 9 15.5625C5.37563 15.5625 2.4375 12.6244 2.4375 9ZM4.13812 6.5625C4.81317 5.21867 6.02897 4.19333 7.49996 3.77204C7.15155 4.17641 6.85182 4.65395 6.60713 5.17892C6.40828 5.60556 6.24263 6.06975 6.11494 6.5625H4.13812ZM3.72196 7.6875C3.61778 8.10783 3.5625 8.54746 3.5625 9C3.5625 9.45254 3.61778 9.89217 3.72196 10.3125H5.89738C5.84161 9.88758 5.8125 9.44852 5.8125 8.99998C5.8125 8.55142 5.84161 8.11239 5.89737 7.6875H3.72196ZM7.0333 7.6875C6.97087 8.10689 6.9375 8.54634 6.9375 8.99998C6.9375 9.45367 6.97087 9.89313 7.0333 10.3125H10.9667C11.0291 9.89311 11.0625 9.45367 11.0625 9.00002C11.0625 8.54637 11.0291 8.1069 10.9667 7.6875H7.0333ZM12.1026 7.6875C12.1584 8.1124 12.1875 8.55145 12.1875 9.00002C12.1875 9.44858 12.1584 9.88762 12.1026 10.3125H14.278C14.3822 9.89217 14.4375 9.45254 14.4375 9C14.4375 8.54746 14.3822 8.10783 14.278 7.6875H12.1026ZM13.8619 6.5625H11.885C11.7574 6.06976 11.5917 5.6056 11.3929 5.17897C11.1482 4.65397 10.8484 4.1764 10.5 3.77203C11.971 4.19331 13.1868 5.21866 13.8619 6.5625ZM10.7171 6.5625H7.28293C7.38007 6.23971 7.49559 5.93571 7.62681 5.65419C7.99835 4.85708 8.48101 4.26914 8.99997 3.92442C9.51895 4.26913 10.0016 4.8571 10.3732 5.65424C10.5044 5.93575 10.6199 6.23973 10.7171 6.5625ZM4.13812 11.4375H6.11496C6.24963 11.9572 6.42655 12.4452 6.64015 12.8909C6.87835 13.3879 7.16685 13.8413 7.50006 14.228C6.02902 13.8067 4.81318 12.7814 4.13812 11.4375ZM10.7171 11.4375H7.28295C7.3869 11.7829 7.51191 12.1068 7.65465 12.4047C8.02305 13.1733 8.49456 13.7398 9.00007 14.0756C9.51902 13.7308 10.0017 13.1429 10.3732 12.3458C10.5044 12.0643 10.6199 11.7603 10.7171 11.4375ZM11.3929 12.8211C11.5917 12.3944 11.7574 11.9303 11.8851 11.4375H13.8619C13.1868 12.7813 11.971 13.8067 10.5 14.228C10.8485 13.8236 11.1482 13.346 11.3929 12.8211Z`,fill:`currentColor`})}),pe=e=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 00-2.455 2.456z`})}),me=/^(\d+)$/;function J(e,t,n){let r=e.match(me);if(!r)return null;let i=Number(r[1]);return Number.isNaN(i)||i<t||i>n?null:i}function he(e){let t=(e??``).trim();if(!t)return{kind:`custom`,raw:``};let n=t.split(/\s+/);if(n.length!==5)return{kind:`custom`,raw:t};let[r,i,a,o,s]=n,c=J(r,0,59),l=J(i,0,23);if(c===null||l===null)return{kind:`custom`,raw:t};if(a!==`*`||o!==`*`)return{kind:`custom`,raw:t,hour:l,minute:c};if(s===`*`||s===`0-6`)return{kind:`daily`,hour:l,minute:c};if(s===`1-5`)return{kind:`weekdays`,hour:l,minute:c};let u=J(s,0,6);return u===null?{kind:`custom`,raw:t,hour:l,minute:c}:{kind:`weekly`,hour:l,minute:c,weekday:u}}function ge(e){let{kind:t,hour:n,minute:r,weekday:i}=e;switch(t){case`daily`:return`${r} ${n} * * *`;case`weekdays`:return`${r} ${n} * * 1-5`;case`weekly`:return`${r} ${n} * * ${i??1}`;default:return t}}function Y(e,t){return`${String(e).padStart(2,`0`)}:${String(t).padStart(2,`0`)}`}function X(e){let t=e.match(/^(\d{1,2}):(\d{2})$/);if(!t)return null;let n=Number(t[1]),r=Number(t[2]);return Number.isNaN(n)||Number.isNaN(r)||n<0||n>23||r<0||r>59?null:{hour:n,minute:r}}function Z(e){return e?Array.isArray(e)?e.join(`, `):e:`—`}var _e=e=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M5.636 5.636a9 9 0 1012.728 0M12 3v9`})}),ve=e=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,...e,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16`})}),Q=e=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:1.5,...e,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z`})});function ye({onRetry:e}){let{t}=s(`openhands`);return(0,P.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20`,children:[(0,P.jsx)(Q,{className:`size-12 text-danger`}),(0,P.jsx)(`p`,{className:`mt-4 text-sm text-muted`,children:t(c.AUTOMATIONS$ERROR_TITLE)}),(0,P.jsx)(`button`,{type:`button`,onClick:e,className:`mt-4 rounded-lg border border-[var(--oh-border)] px-4 py-2 text-sm text-white hover:bg-surface-raised`,children:t(c.AUTOMATIONS$ERROR_RETRY)})]})}function be({onRetry:e}){let{t}=s(`openhands`);return(0,P.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-20 px-4`,children:[(0,P.jsx)(Q,{className:`size-12 text-[var(--oh-warning)]`}),(0,P.jsx)(`h2`,{className:`mt-4 text-lg font-medium text-content`,children:t(c.AUTOMATIONS$BACKEND_UNAVAILABLE_TITLE)}),(0,P.jsx)(`p`,{className:`mt-2 text-sm text-muted text-center max-w-md`,children:t(c.AUTOMATIONS$BACKEND_UNAVAILABLE_MESSAGE)}),(0,P.jsx)(b,{type:`button`,variant:`secondary`,className:`mt-6`,onClick:e,children:t(c.AUTOMATIONS$BACKEND_UNAVAILABLE_RETRY)})]})}function xe({automationName:e,isOpen:t,onConfirm:n,onCancel:r}){let{t:i}=s(`openhands`);return t?(0,P.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,P.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:r,onKeyDown:e=>{e.key===`Escape`&&r()},role:`presentation`}),(0,P.jsxs)(`div`,{className:`relative w-full max-w-sm rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,P.jsx)(`button`,{type:`button`,onClick:r,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":i(c.BUTTON$CLOSE),children:(0,P.jsx)(D,{className:`size-5`})}),(0,P.jsx)(`h2`,{className:_,children:i(c.AUTOMATIONS$DELETE_CONFIRM_TITLE)}),(0,P.jsx)(`p`,{className:`mt-2 text-sm text-muted`,children:i(c.AUTOMATIONS$DELETE_CONFIRM_MESSAGE,{name:e})}),(0,P.jsxs)(`div`,{className:`mt-6 flex justify-end gap-3`,children:[(0,P.jsx)(`button`,{type:`button`,onClick:r,className:`rounded-lg border border-[var(--oh-border)] px-4 py-2 text-sm text-white hover:bg-surface-raised`,children:i(c.AUTOMATIONS$CANCEL)}),(0,P.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-lg bg-danger px-4 py-2 text-sm text-white hover:bg-danger/80`,children:i(c.AUTOMATIONS$DELETE)})]})]})]}):null}var $=`__active__`,Se=[c.AUTOMATIONS$WEEKDAY_SUN,c.AUTOMATIONS$WEEKDAY_MON,c.AUTOMATIONS$WEEKDAY_TUE,c.AUTOMATIONS$WEEKDAY_WED,c.AUTOMATIONS$WEEKDAY_THU,c.AUTOMATIONS$WEEKDAY_FRI,c.AUTOMATIONS$WEEKDAY_SAT];function Ce(e){if(e.trigger.type===`event`)return{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:`custom`,weekday:1,timeOfDay:``,isCustomSchedule:!0,rawSchedule:``};let t=he(e.trigger.schedule);return t.kind===`custom`?{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:`custom`,weekday:1,timeOfDay:t.hour!==void 0&&t.minute!==void 0?Y(t.hour,t.minute):``,isCustomSchedule:!0,rawSchedule:t.raw}:{name:e.name,prompt:e.prompt??``,model:e.model??``,frequency:t.kind,weekday:t.kind===`weekly`?t.weekday??1:1,timeOfDay:Y(t.hour,t.minute),isCustomSchedule:!1,rawSchedule:e.trigger.schedule??``}}function we({automation:e,isOpen:t,onClose:n}){let{t:r}=s(`openhands`),i=B(),{data:a,isLoading:o}=ne(),l=a?.profiles??[],d=[{key:$,label:r(c.COMMON$ACTIVE_PROFILE)},...l.map(e=>({key:e.name,label:e.name}))],p=(0,N.useMemo)(()=>Ce(e),[e]),[m,h]=(0,N.useState)(p),[g,x]=(0,N.useState)(null);if((0,N.useEffect)(()=>{t&&(h(p),x(null))},[t,p]),!t)return null;let S=[{key:`daily`,label:r(c.AUTOMATIONS$FREQUENCY_DAILY)},{key:`weekdays`,label:r(c.AUTOMATIONS$FREQUENCY_WEEKDAYS)},{key:`weekly`,label:r(c.AUTOMATIONS$FREQUENCY_WEEKLY)},...m.isCustomSchedule?[{key:`custom`,label:r(c.AUTOMATIONS$FREQUENCY_CUSTOM)}]:[]],w=Se.map((e,t)=>({key:String(t),label:r(e)})),T=!m.isCustomSchedule||X(m.timeOfDay)!==null||m.timeOfDay===``;return(0,P.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,P.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`presentation`}),(0,P.jsxs)(`div`,{className:`relative w-full max-w-md rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] p-6`,children:[(0,P.jsx)(`button`,{type:`button`,onClick:n,className:`absolute right-4 top-4 text-muted hover:text-foreground`,"aria-label":r(c.AUTOMATIONS$CANCEL),children:(0,P.jsx)(D,{className:`size-5`})}),(0,P.jsx)(`h2`,{className:_,children:r(c.AUTOMATIONS$EDIT_TITLE)}),(0,P.jsxs)(`form`,{onSubmit:t=>{t.preventDefault();let a=m.name.trim();if(!a){x(r(c.AUTOMATIONS$NAME_REQUIRED));return}x(null);let o={};a!==e.name&&(o.name=a);let s=m.prompt.trim();s!==(e.prompt??``).trim()&&(o.prompt=s.length===0?null:s);let l=m.model.trim();if(l!==(e.model??``)&&(o.model=l===``?null:l),!m.isCustomSchedule&&m.frequency!==`custom`){let t=X(m.timeOfDay);if(t){let n=ge({kind:m.frequency,hour:t.hour,minute:t.minute,weekday:m.frequency===`weekly`?m.weekday:void 0});n!==e.trigger.schedule&&(o.trigger={...e.trigger,schedule:n})}}if(Object.keys(o).length===0){n();return}i.mutate({id:e.id,body:o},{onSuccess:()=>{te(r(c.AUTOMATIONS$EDIT_SUCCESS)),n()},onError:e=>{ee(u(e)?e.response?.data?.message||e.message||r(c.AUTOMATIONS$EDIT_ERROR):e.message||r(c.AUTOMATIONS$EDIT_ERROR))}})},className:`mt-4 flex flex-col gap-4`,"aria-label":r(c.AUTOMATIONS$EDIT_TITLE),children:[(0,P.jsx)(C,{testId:`edit-automation-name`,name:`name`,type:`text`,label:r(c.AUTOMATIONS$NAME),value:m.name,onChange:e=>h(t=>({...t,name:e})),error:g??void 0,showRequiredTag:!0}),(0,P.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,P.jsx)(`span`,{className:`text-sm`,children:r(c.AUTOMATIONS$PROMPT)}),(0,P.jsx)(`textarea`,{"data-testid":`edit-automation-prompt`,name:`prompt`,value:m.prompt,onChange:e=>h(t=>({...t,prompt:e.target.value})),rows:4,className:f(y,`placeholder:italic`)}),(0,P.jsx)(`span`,{className:`text-xs text-muted`,children:r(c.AUTOMATIONS$EDIT_PROMPT_HINT)})]}),(o||l.length>0)&&(0,P.jsx)(E,{testId:`edit-automation-model`,name:`model`,label:r(c.AUTOMATIONS$DETAIL$MODEL),items:d,selectedKey:m.model||$,isLoading:o,placeholder:r(c.COMMON$ACTIVE_PROFILE),onSelectionChange:e=>h(t=>({...t,model:e&&e!==$?String(e):``}))}),e.trigger.type===`event`?(0,P.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg bg-[var(--oh-surface-raised)] p-3`,children:[(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,P.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:r(c.AUTOMATIONS$DETAIL$TRIGGER)}),(0,P.jsx)(`span`,{className:`text-sm text-content`,children:r(c.AUTOMATIONS$DETAIL$TRIGGER_EVENT)})]}),e.trigger.source&&(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,P.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:r(c.AUTOMATIONS$DETAIL$EVENT_SOURCE)}),(0,P.jsx)(`span`,{className:`text-sm text-content`,children:e.trigger.source})]}),e.trigger.on&&(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,P.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:r(c.AUTOMATIONS$DETAIL$EVENT_TYPE)}),(0,P.jsx)(`code`,{className:`text-xs font-mono text-content`,children:Z(e.trigger.on)})]}),e.trigger.filter&&(0,P.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,P.jsx)(`span`,{className:`text-xs font-medium text-muted`,children:r(c.AUTOMATIONS$DETAIL$EVENT_FILTER)}),(0,P.jsx)(`code`,{className:`text-xs font-mono text-content break-all`,children:e.trigger.filter})]})]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(E,{testId:`edit-automation-frequency`,name:`frequency`,label:r(c.AUTOMATIONS$FREQUENCY),items:S,selectedKey:m.frequency,isDisabled:m.isCustomSchedule,onSelectionChange:e=>{!e||m.isCustomSchedule||h(t=>({...t,frequency:e}))}}),m.frequency===`weekly`&&!m.isCustomSchedule&&(0,P.jsx)(E,{testId:`edit-automation-weekday`,name:`weekday`,label:r(c.AUTOMATIONS$WEEKDAY),items:w,selectedKey:String(m.weekday),onSelectionChange:e=>{e!==null&&h(t=>({...t,weekday:Number(e)}))}}),(0,P.jsxs)(`label`,{className:`flex flex-col gap-2.5 w-full min-w-0`,children:[(0,P.jsx)(`span`,{className:`text-sm`,children:r(c.AUTOMATIONS$TIME_OF_DAY)}),(0,P.jsx)(`input`,{"data-testid":`edit-automation-time`,name:`timeOfDay`,type:`time`,value:m.timeOfDay,onChange:e=>h(t=>({...t,timeOfDay:e.target.value})),disabled:m.isCustomSchedule&&!T,className:f(v,`disabled:bg-[var(--oh-surface-raised)]`)}),e.timezone&&(0,P.jsxs)(`span`,{className:`text-xs text-muted`,children:[r(c.AUTOMATIONS$TIMEZONE),`: `,e.timezone]})]}),m.isCustomSchedule&&(0,P.jsxs)(`p`,{className:`text-xs text-muted`,"data-testid":`custom-schedule-hint`,children:[r(c.AUTOMATIONS$CUSTOM_SCHEDULE_HINT),m.rawSchedule&&(0,P.jsxs)(P.Fragment,{children:[` `,(0,P.jsx)(`code`,{className:`text-xs text-content`,children:m.rawSchedule})]})]})]}),(0,P.jsxs)(`div`,{className:`mt-2 flex justify-end gap-3`,children:[(0,P.jsx)(b,{testId:`edit-automation-cancel`,type:`button`,variant:`secondary`,onClick:n,isDisabled:i.isPending,children:r(c.AUTOMATIONS$CANCEL)}),(0,P.jsx)(b,{testId:`edit-automation-save`,type:`submit`,variant:`primary`,isDisabled:i.isPending,"aria-busy":i.isPending,children:i.isPending?r(c.AUTOMATIONS$SAVING):r(c.AUTOMATIONS$SAVE)})]})]})]})]})}export{oe as C,ae as S,W as _,Q as a,H as b,Z as c,de as d,ue as f,q as g,K as h,ye as i,pe as l,ce as m,xe as n,ve as o,le as p,be as r,_e as s,we as t,fe as u,R as v,M as w,z as x,V as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./utils-CE0lDWtb.js";import{_ as i,u as a}from"./form-control-classes-9rkU4usZ.js";import{c as o,u as s}from"./dropdown-classes-CgQ45JmQ.js";var c=n();function l({icon:e,text:t,className:n}){return(0,c.jsxs)(`div`,{className:r(`flex min-w-0 w-full items-center`,o,n),children:[(0,c.jsx)(`span`,{className:s,"aria-hidden":!0,children:e}),(0,c.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t})]})}var u=e(t()),d=e=>(0,c.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,c.jsx)(`path`,{d:`M7 4C7 2.89543 7.89543 2 9 2H15C16.1046 2 17 2.89543 17 4V6H18.9897C18.9959 5.99994 19.0021 5.99994 19.0083 6H21C21.5523 6 22 6.44772 22 7C22 7.55228 21.5523 8 21 8H19.9311L19.0638 20.1425C18.989 21.1891 18.1182 22 17.0689 22H6.93112C5.88184 22 5.01096 21.1891 4.9362 20.1425L4.06888 8H3C2.44772 8 2 7.55228 2 7C2 6.44772 2.44772 6 3 6H4.99174C4.99795 5.99994 5.00414 5.99994 5.01032 6H7V4ZM9 6H15V4H9V6ZM6.07398 8L6.93112 20H17.0689L17.926 8H6.07398ZM10 10C10.5523 10 11 10.4477 11 11V17C11 17.5523 10.5523 18 10 18C9.44772 18 9 17.5523 9 17V11C9 10.4477 9.44772 10 10 10ZM14 10C14.5523 10 15 10.4477 15 11V17C15 17.5523 14.5523 18 14 18C13.4477 18 13 17.5523 13 17V11C13 10.4477 13.4477 10 14 10Z`,fill:`currentColor`})}),f=e=>(0,c.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,c.jsx)(`path`,{d:`M14.25 19.5C14.25 20.7426 13.2426 21.75 12 21.75C10.7574 21.75 9.75 20.7426 9.75 19.5C9.75 18.2574 10.7574 17.25 12 17.25C13.2426 17.25 14.25 18.2574 14.25 19.5ZM14.25 12C14.25 13.2426 13.2426 14.25 12 14.25C10.7574 14.25 9.75 13.2426 9.75 12C9.75 10.7574 10.7574 9.75 12 9.75C13.2426 9.75 14.25 10.7574 14.25 12ZM14.25 4.5C14.25 5.74264 13.2426 6.75 12 6.75C10.7574 6.75 9.75 5.74264 9.75 4.5C9.75 3.25736 10.7574 2.25 12 2.25C13.2426 2.25 14.25 3.25736 14.25 4.5Z`,fill:`currentColor`})}),p=u.forwardRef(function({onClick:e,className:t,iconClassName:n,ariaLabel:o,testId:s=`ellipsis-button`},l){return(0,c.jsx)(`button`,{ref:l,"data-testid":s,type:`button`,onClick:e,"aria-label":o,className:r(`p-1 rounded-md cursor-pointer`,i,`text-[var(--oh-muted)]`,a,`flex items-center justify-center`,t),children:(0,c.jsx)(f,{className:n??`w-4 h-4`})})});export{l as i,f as n,d as r,p as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browser-B39N74jU.js","assets/vendor~browser-Cvg7jXCP.js","assets/vendor~browser-Dqd33JyP.js","assets/llm-subscription-DtsX5Lhg.js","assets/settings-mQUckT0g.js","assets/common-Dh7OqABE.js","assets/automation-BU8zu-FP.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,St as n,bt as r}from"./vendor-styling-CI0PQ3ab.js";import{n as i}from"./vendor~entry.client-9tWQ_Ugw.js";import{t as a}from"./vendor~entry.client-D6BtSOtn.js";import{n as o,t as s}from"./providers-vX9jk9Vy.js";import{W as c}from"./active-backend-context-u2tdYRgH.js";var l=e(t(),1),u=a();function d({mockApi:e=void 0,hasWindow:t=typeof window<`u`}={}){return t&&e===`true`}var f=r();async function p(){if(await c(),d()){let{worker:e}=await n(async()=>{let{worker:e}=await import(`./browser-B39N74jU.js`);return{worker:e}},__vite__mapDeps([0,1,2,3,4,5,6]));await e.start({onUnhandledRequest:`bypass`})}}p().then(()=>(0,l.startTransition)(()=>{(0,u.hydrateRoot)(document,(0,f.jsx)(l.StrictMode,{children:(0,f.jsx)(s,{analytics:o,withStyleRoot:!1,children:(0,f.jsx)(i,{})})}))}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{t as r}from"./useTranslation-Cgy4JA_g.js";import{t as i}from"./declaration-B9kpCaYl.js";import{t as a}from"./check-Bvi71siz.js";import{t as o}from"./chevron-down-CI8A6tet.js";import{t as s}from"./utils-CE0lDWtb.js";import{i as c,o as l,t as u}from"./dropdown-classes-CgQ45JmQ.js";import{t as d}from"./use-click-outside-element-Bf4Omzot.js";var f=e(t(),1),p=n();function m({testId:e,value:t,onChange:n,options:m,labelKeyByValue:h}){let{t:g}=r(`openhands`),[_,v]=f.useState(!1),y=d(()=>v(!1)),b=m[0],x=g(h[t]);return(0,p.jsxs)(`div`,{ref:y,className:`relative shrink-0 w-auto`,"data-testid":e,children:[(0,p.jsxs)(`button`,{type:`button`,"data-testid":`dropdown-trigger`,"aria-haspopup":`menu`,"aria-expanded":_,"aria-label":g(i.CONVERSATION_PANEL$FILTER_LABEL),onClick:()=>v(e=>!e),className:s(u,b&&t!==b&&`border-white/60 bg-white/10`),children:[(0,p.jsx)(`span`,{className:`whitespace-nowrap`,children:x}),(0,p.jsx)(o,{className:s(`h-4 w-4 shrink-0 text-tertiary-alt transition-transform`,_&&`rotate-180`),"aria-hidden":!0})]}),_?(0,p.jsx)(`div`,{role:`menu`,"data-testid":`${e}-menu`,"aria-label":g(i.CONVERSATION_PANEL$FILTER_LABEL),className:s(`absolute right-0 top-full z-50 mt-1 min-w-full w-max`,`max-h-60 overflow-auto rounded-[6px] bg-tertiary p-1 context-menu-box-shadow`,c),children:m.map(r=>{let i=r===t;return(0,p.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":i,"data-testid":`${e}-${r}`,onClick:()=>{n(r),v(!1)},className:s(l,i&&`bg-[var(--oh-interactive-selected)]`),children:[(0,p.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:g(h[r])}),i?(0,p.jsx)(a,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0}):null]},r)})}):null]})}export{m as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n,xt as r}from"./vendor-styling-CI0PQ3ab.js";import{t as i}from"./useTranslation-Cgy4JA_g.js";import{t as a}from"./declaration-B9kpCaYl.js";import{a as o,i as s,n as c,o as l,r as u,s as d,t as f}from"./environment-switch-store-DkjlKWzN.js";var p=e(t(),1),m=e(r(),1),h=n();function g({className:e}){return(0,h.jsxs)(`svg`,{viewBox:`0 0 74.17 22`,xmlns:`http://www.w3.org/2000/svg`,className:e,"aria-hidden":!0,children:[(0,h.jsxs)(`g`,{children:[(0,h.jsx)(`rect`,{x:`1`,y:`1`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`rect`,{x:`1`,y:`13`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`line`,{x1:`5`,y1:`5`,x2:`5.01`,y2:`5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,h.jsx)(`line`,{x1:`5`,y1:`17`,x2:`5.01`,y2:`17`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}),(0,h.jsxs)(`g`,{children:[(0,h.jsx)(`rect`,{x:`53.17`,y:`1`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`rect`,{x:`53.17`,y:`13`,width:`20`,height:`8`,rx:`2`,ry:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,h.jsx)(`line`,{x1:`57.17`,y1:`5`,x2:`57.18`,y2:`5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`}),(0,h.jsx)(`line`,{x1:`57.17`,y1:`17`,x2:`57.18`,y2:`17`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]}),(0,h.jsxs)(`g`,{children:[(0,h.jsx)(`path`,{d:`M43.09,7l4,4-4,4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,h.jsx)(`path`,{d:`M27.09,11h20`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,h.jsx)(`path`,{d:`M31.09,7l-4,4,4,4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})]})}function _(){let{t:e}=i(`openhands`),{visible:t,target:n}=p.useSyncExternalStore(l,o,o);return!t||typeof document>`u`?null:(0,m.createPortal)((0,h.jsx)(`div`,{"data-testid":`environment-switch-overlay`,"data-target":n,className:`environment-switch-overlay pointer-events-none fixed inset-0 z-[2147483646] flex items-center justify-center`,"aria-live":`polite`,"aria-atomic":`true`,children:(0,h.jsxs)(`div`,{className:`pointer-events-none flex min-w-[280px] max-w-[420px] flex-col items-center gap-2 rounded-xl border border-[var(--oh-border)] bg-[var(--oh-surface)] px-5 py-4 text-[var(--oh-foreground)] shadow-2xl`,children:[(0,h.jsx)(g,{className:`mb-2 h-6 w-20 shrink-0 text-[var(--oh-foreground)]`}),(0,h.jsx)(`p`,{className:`text-center text-sm font-medium`,children:e(a.BACKEND$SWITCHING_TO,{environment:n})})]})}),document.body)}export{f as ENVIRONMENT_SWITCH_DURATION_MS,c as ENVIRONMENT_SWITCH_SETACTIVE_DELAY_MS,_ as EnvironmentSwitchOverlay,_ as default,u as __resetEnvironmentSwitchOverlayForTests,s as dismissEnvironmentSwitch,d as triggerEnvironmentSwitch};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bt as e}from"./vendor-styling-CI0PQ3ab.js";import{L as t,s as n}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~byh8a1g4-XNPdpuO8.js";import{t as r}from"./useTranslation-Cgy4JA_g.js";import{t as i}from"./declaration-B9kpCaYl.js";import{t as a}from"./sidebar-nav-link-CIB3NBRW.js";import{r as o}from"./typography-YGPBGzOG.js";import{t as s}from"./use-breakpoint-B-O0lQ84.js";import{t as c}from"./backend-synced-settings-badge-Bs3FSXsS.js";import{t as l}from"./extensions-navigation-Di9rJ-b5.js";var u=e();function d(){let{t:e}=r(`openhands`);return(0,u.jsxs)(`div`,{"data-testid":`extensions-mobile-hub`,className:`flex flex-col gap-4 px-4 py-2 md:hidden`,children:[(0,u.jsx)(o.H2,{children:e(i.NAV$CUSTOMIZE)}),(0,u.jsx)(`nav`,{className:`flex flex-col gap-0.5`,children:l.map(e=>(0,u.jsx)(a,{to:e.to,label:e.label,end:e.end,testId:`sidebar-extensions-${e.to}`,icon:e.icon,disabled:e.comingSoon},e.to))}),(0,u.jsx)(`div`,{className:`pt-1`,children:(0,u.jsx)(c,{})})]})}var f=t(function(){return s(768)?(0,u.jsx)(d,{}):(0,u.jsx)(n,{to:`/skills`,replace:!0})});export{f as default};
|
package/build/assets/{extensions-navigation-DfLHdTUC.js → extensions-navigation-Di9rJ-b5.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./useTranslation-Cgy4JA_g.js";import{t as r}from"./declaration-B9kpCaYl.js";import{t as i}from"./utils-CE0lDWtb.js";import{t as a}from"./navigation-link-D8hfwvxI.js";import{f as o,o as s}from"./sidebar-layout-BtpUSN3j.js";import{t as c}from"./skills-9cDZONKh.js";import{t as l}from"./backend-synced-settings-badge-Bs3FSXsS.js";e();var u=t(),d=[{to:`/skills`,label:`Skills`,icon:(0,u.jsx)(c,{width:16,height:16,"aria-hidden":`true`}),end:!0},{to:`/mcp`,label:`MCP Servers`,icon:(0,u.jsx)(e=>(0,u.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2.25 3H21.75L22.5 3.75V13.5H21V9H3V19.5H13.5V21H2.25L1.5 20.25V3.75L2.25 3ZM3 7.5H21V4.5H3V7.5ZM10.5 18V16.359C10.2451 16.2664 10.0074 16.132 9.7965 15.9615L8.379 16.77L7.629 15.48L9.0345 14.6595C8.98649 14.3881 8.98649 14.1104 9.0345 13.839L7.629 13.02L8.379 11.73L9.7965 12.54C10.023 12.36 10.2585 12.2265 10.5 12.141V10.5H12V12.141C12.2568 12.2293 12.4953 12.3641 12.7035 12.5385L14.121 11.73L14.871 13.02L13.4655 13.8405C13.5133 14.1114 13.5133 14.3886 13.4655 14.6595L14.871 15.48L14.121 16.77L12.7035 15.96C12.4903 16.1274 12.2531 16.2619 12 16.359V18H10.5ZM10.125 14.25C10.125 14.562 10.2345 14.8275 10.4535 15.0465C10.5568 15.1528 10.6807 15.2367 10.8177 15.2932C10.9547 15.3497 11.1018 15.3776 11.25 15.375C11.3982 15.3776 11.5453 15.3497 11.6823 15.2932C11.8193 15.2367 11.9432 15.1528 12.0465 15.0465C12.1528 14.9432 12.2367 14.8193 12.2932 14.6823C12.3497 14.5453 12.3776 14.3982 12.375 14.25C12.3776 14.1018 12.3497 13.9547 12.2932 13.8177C12.2367 13.6807 12.1528 13.5568 12.0465 13.4535C11.9432 13.3472 11.8193 13.2633 11.6823 13.2068C11.5453 13.1503 11.3982 13.1224 11.25 13.125C11.1018 13.1224 10.9547 13.1503 10.8177 13.2068C10.6807 13.2633 10.5568 13.3472 10.4535 13.4535C10.3472 13.5568 10.2633 13.6807 10.2068 13.8177C10.1503 13.9547 10.1224 14.1018 10.125 14.25ZM18.126 22.5V20.859C17.8711 20.7663 17.6334 20.632 17.4225 20.4615L16.005 21.27L15.255 19.98L16.662 19.1595C16.614 18.8881 16.614 18.6104 16.662 18.339L15.255 17.52L16.005 16.23L17.4225 17.04C17.649 16.86 17.8845 16.7265 18.1275 16.641V15H19.6275V16.641C19.8837 16.7297 20.1216 16.8644 20.3295 17.0385L21.747 16.23L22.497 17.52L21.0915 18.3405C21.1396 18.6114 21.1396 18.8886 21.0915 19.1595L22.497 19.98L21.747 21.27L20.3295 20.46C20.1163 20.6275 19.8791 20.762 19.626 20.859V22.5H18.126ZM17.751 18.75C17.751 19.062 17.8605 19.3275 18.0795 19.5465C18.1828 19.6528 18.3067 19.7367 18.4437 19.7932C18.5807 19.8497 18.7278 19.8776 18.876 19.875C19.0242 19.8776 19.1713 19.8497 19.3083 19.7932C19.4453 19.7367 19.5692 19.6528 19.6725 19.5465C19.779 19.4434 19.8633 19.3195 19.9201 19.1825C19.9768 19.0455 20.0049 18.8983 20.0025 18.75C20.0049 18.6017 19.9768 18.4545 19.9201 18.3175C19.8633 18.1805 19.779 18.0566 19.6725 17.9535C19.5694 17.8474 19.4457 17.7636 19.309 17.7071C19.1722 17.6506 19.0254 17.6226 18.8775 17.625C18.7291 17.6222 18.5817 17.65 18.4444 17.7065C18.3072 17.763 18.183 17.847 18.0795 17.9535C17.9732 18.0568 17.8893 18.1807 17.8328 18.3177C17.7763 18.4547 17.7484 18.6018 17.751 18.75Z`,fill:`currentColor`})}),{width:16,height:16}),end:!0},{to:`/plugins`,label:`Plugins`,icon:(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,width:16,height:16,"aria-hidden":`true`,children:[(0,u.jsx)(`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`}),(0,u.jsx)(`path`,{d:`m3.3 7 8.7 5 8.7-5`}),(0,u.jsx)(`path`,{d:`M12 22V12`})]}),end:!0}];function f(){let{t:e}=n(`openhands`);return(0,u.jsxs)(`aside`,{"data-testid":`extensions-navbar-desktop`,className:`hidden md:flex md:w-[260px] md:shrink-0 md:flex-col md:gap-2 md:sticky md:top-8 md:self-start`,children:[(0,u.jsx)(`span`,{className:`px-2 text-sm font-normal text-white`,children:e(r.NAV$CUSTOMIZE)}),(0,u.jsx)(`div`,{className:`flex flex-col gap-0.5 pt-0.5`,children:d.map(t=>{let n=(0,u.jsx)(`span`,{className:`shrink-0 flex items-center justify-center`,children:t.icon}),c=(0,u.jsx)(`span`,{className:`truncate`,children:t.label}),l=t.comingSoon&&(0,u.jsx)(`span`,{className:`ml-auto shrink-0 rounded-full border border-white/20 bg-white/5 px-1.5 py-0.5 text-[10px] font-medium text-[var(--oh-text-dim)]`,children:e(r.NAV$COMING_SOON)});return(0,u.jsxs)(a,{to:t.to,end:t.end,"data-testid":`sidebar-extensions-${t.to}`,className:({isActive:e})=>i(o(),`truncate`,e?s.active:s.idle),children:[n,c,l]},t.to)})}),(0,u.jsx)(`div`,{className:`px-2 pt-3`,children:(0,u.jsx)(l,{})})]})}export{f as n,d as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-
|
|
1
|
+
import{t as e}from"./createLucideIcon-CVAsW2Yo.js";var t=e(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~i3v2mlbw-BrJQ3XZH.js";import{t as i}from"./useQuery-CpjHYtZc.js";import{t as a}from"./useTranslation-Cgy4JA_g.js";import{t as o}from"./declaration-B9kpCaYl.js";import{d as s}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~ncdxw0bh-ClHnt5lR.js";import{N as c,n as l}from"./active-backend-context-u2tdYRgH.js";import{a as u,c as d,i as f,l as p,n as m,o as h,r as g,s as _,t as v}from"./vendor~files-tab-B02k3xvx.js";import{t as y}from"./mouse-pointer-click-PdEQPL6v.js";import{t as b,w as x}from"./utils-CE0lDWtb.js";import{a as S,c as C,n as w,y as T}from"./agent-server-client-options-DVLRd9sw.js";import{t as E}from"./proxy-CHmFkV16.js";import{t as D}from"./react-DPDgL6du.js";import{s as ee}from"./conversation-local-storage-F6zVMM--.js";import{t as O}from"./segmented-toggle-Cen5AMUc.js";import{i as k}from"./vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~enjl5xdm-mMKDm94D.js";import{a as te}from"./agent-server-conversation-service.api-BP73yONA.js";import{t as A}from"./folder-mMWFvaw0.js";import{t as j}from"./git-status-mapper-BI8FyUVp.js";import{r as ne}from"./typography-YGPBGzOG.js";import{n as M,r as re,t as N}from"./use-active-conversation-DI5S5M1w.js";import{n as ie,t as P}from"./files-tab-store-DJsPxYdg.js";import{t as ae}from"./use-agent-state-Buh3bQDh.js";import{t as oe}from"./use-event-store-YSOxy9FC.js";import{ot as se,st as ce}from"./vendor~home~conversation-panel~conversation~shared-conversation~planner-tab~files-tab-d8aETPbZ.js";import{t as le}from"./markdown-renderer-D8mayGjI.js";import{t as ue}from"./runtime-waiting-state-DkzLgvMn.js";import{t as de}from"./link-external-DfKQroKX.js";import{t as F}from"./use-runtime-is-ready-Diiq65Q-.js";import{n as fe,t as pe}from"./get-language-from-path-CPNnuVhI.js";import{t as I}from"./conversation-tab-empty-state-m8IUkfMj.js";var L=e(t(),1),R=n();function me(){let{t:e}=a(`openhands`);return(0,R.jsx)(I,{className:`h-full`,icon:(0,R.jsx)(y,{"aria-hidden":!0,strokeWidth:2,className:`size-full`}),children:e(o.FILES$NO_FILE_SELECTED)})}var z=class{static async executeCommand(e,t,n,r,i=30){let a=C().backend;if(a.kind===`cloud`&&e){let o=await E({backend:a,method:`POST`,hostOverride:S(e),path:`/api/bash/execute_bash_command`,body:{command:n,...r?{cwd:r}:{},timeout:Math.floor(i)},authMode:`session-api-key`,sessionApiKey:t,timeoutSeconds:i+10});return{exit_code:o.exit_code??-1,stdout:o.stdout??``,stderr:o.stderr??``}}let o=await new k(w({conversationUrl:e,sessionApiKey:t})).executeCommand(n,r,i);return{exit_code:o.exit_code,stdout:o.stdout,stderr:o.stderr}}static async downloadFile(e,t,n){let r=C().backend;return r.kind===`cloud`&&e?(await E({backend:r,method:`GET`,hostOverride:S(e),path:`/api/file/download?path=${encodeURIComponent(n)}`,authMode:`session-api-key`,sessionApiKey:t,responseType:`blob`})).arrayBuffer():new s(w({conversationUrl:e,sessionApiKey:t})).downloadFile(n)}},he=2e3,ge=[`.git`,`node_modules`,`.venv`,`venv`,`__pycache__`,`dist`,`build`,`.next`,`.cache`,`.pytest_cache`,`.mypy_cache`,`.turbo`,`.parcel-cache`,`target`];function _e(){return`find . \\( ${ge.map(e=>`-name '${e}' -prune`).join(` -o `)} \\) -o -type f -print 2>/dev/null | sort | head -n ${he}`}function ve(e){return e.startsWith(`./`)?e.slice(2):e}function ye(){let{data:e}=N(),t=F(),n=e?.id,r=e?.conversation_url,a=e?.session_api_key,o=e?.workspace?.working_dir?.trim();return i({queryKey:[`workspace-files`,n,r,a,o],queryFn:async()=>{let e=await z.executeCommand(r,a,_e(),o,30);if(e.exit_code!==0)throw Error(e.stderr?.trim()||`Failed to list workspace files`);let t=e.stdout.split(/\r?\n/).map(e=>e.trim()).filter(Boolean).map(ve);return Array.from(new Set(t)).slice(0,he)},enabled:t&&!!n&&!!o,retry:!1,staleTime:1e3*30,gcTime:1e3*60*5,meta:{disableToast:!0}})}function be(){let{data:e}=N(),t=F(),n=e?.id,r=e?.conversation_url,a=e?.session_api_key,o=C().backend.kind===`local`,s=i({queryKey:[`workspace-session`,n,r,a],queryFn:async()=>({baseUrl:await new k(w({conversationUrl:r,sessionApiKey:a})).startWorkspaceSession(n)}),enabled:t&&!!n&&o,staleTime:1/0,gcTime:1/0,retry:!1});return{data:s.data??null,isLoading:s.isLoading,isError:s.isError,error:s.error??null}}function xe(e,t){let n=(t??``).replace(/^\/+/,``);return n?`${e}${n.split(`/`).map(e=>encodeURIComponent(e)).join(`/`)}`:e}var B=D(e=>({count:0,bump:()=>e(e=>({count:e.count+1}))}));function V(e,t){return e===null?null:`${e}${e.includes(`?`)?`&`:`?`}v=${t}`}var Se=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`bmp`,`ico`,`svg`,`avif`]),Ce=new Set([`pdf`]);function H(e){let t=e.lastIndexOf(`.`);return t===-1?``:e.slice(t+1).toLowerCase()}function we(e){switch(H(e)){case`html`:case`htm`:return`text/html`;case`css`:return`text/css`;case`js`:case`mjs`:case`cjs`:return`text/javascript`;case`json`:return`application/json`;case`md`:case`markdown`:return`text/markdown`;case`svg`:return`image/svg+xml`;case`png`:return`image/png`;case`jpg`:case`jpeg`:return`image/jpeg`;case`gif`:return`image/gif`;case`webp`:return`image/webp`;case`bmp`:return`image/bmp`;case`ico`:return`image/x-icon`;case`avif`:return`image/avif`;case`pdf`:return`application/pdf`;default:return`text/plain`}}function Te(e){let t=H(e);return Se.has(t)?`image`:Ce.has(t)?`pdf`:`text`}function U(e){let t=new Uint8Array(e,0,Math.min(e.byteLength,8e3));for(let e=0;e<t.length;e+=1)if(t[e]===0)return!0;return!1}function W(e){let t=new Uint8Array(e),n=32768,r=``;for(let e=0;e<t.length;e+=n)r+=String.fromCharCode.apply(null,t.subarray(e,e+n));return btoa(r)}function G(e){let{data:t}=N(),n=F(),{data:r}=be(),a=B(e=>e.count),o=t?.id,s=t?.conversation_url,c=t?.session_api_key,l=r?.baseUrl,u=C().backend.kind===`cloud`;return i({queryKey:[`workspace-file-content`,o,s,c,u?`cloud`:l,e,a],queryFn:async()=>{if(!e)throw Error(`No path`);let t=Te(e),n=we(e);if(u){let r=await z.downloadFile(s,c,e);return t===`text`?U(r)?{path:e,kind:`binary`,text:null,staticUrl:`data:application/octet-stream;base64,${W(r)}`,mimeType:`application/octet-stream`}:{path:e,kind:`text`,text:new TextDecoder(`utf-8`,{fatal:!1}).decode(r),staticUrl:`data:${n};charset=utf-8;base64,${W(r)}`,mimeType:n}:{path:e,kind:t,text:null,staticUrl:`data:${n};base64,${W(r)}`,mimeType:n}}if(!l)throw Error(`No workspace session`);let r=xe(l,e);if(t!==`text`)return{path:e,kind:t,text:null,staticUrl:r,mimeType:n};let i=await fetch(r,{credentials:`include`});if(!i.ok)throw Error(`Failed to read ${e}: ${i.status}`);let a=await i.arrayBuffer();return U(a)?{path:e,kind:`binary`,text:null,staticUrl:r,mimeType:`application/octet-stream`}:{path:e,kind:`text`,text:new TextDecoder(`utf-8`,{fatal:!1}).decode(a),staticUrl:r,mimeType:n}},enabled:n&&!!o&&!!e&&(u||!!l),retry:!1,staleTime:1e3*5,gcTime:1e3*60,meta:{disableToast:!0}})}function Ee(){let{data:e,isLoading:t}=N(),n=e?.id?te(e.id):null;return{hasAttachedSource:!!e?.selected_repository||!!n?.selected_workspace,isLoading:t}}function De(e){let{data:t}=N(),n=F(),{backend:r}=l(),a=r.kind===`local`,o=t?.id,s=t?.conversation_url,c=t?.session_api_key,u=t?.workspace?.working_dir?.trim(),d=(e?.enabled??!0)&&a&&n&&!!o&&!!u,f=i({queryKey:[`has-git-commits`,o,s,c,u],queryFn:async()=>(await z.executeCommand(s,c,`git rev-parse --verify HEAD`,u,10)).exit_code===0,enabled:d,retry:!1,staleTime:6e4,gcTime:5*6e4,meta:{disableToast:!0}});return{hasCommits:f.data??null,isLoading:f.isLoading}}var Oe=new Set([`FileEditorObservation`,`StrReplaceEditorObservation`,`PlanningFileEditorObservation`]),ke=new Set([`view`]);function Ae(e){let t=e.observation;return!(!t||typeof t.kind!=`string`||!Oe.has(t.kind)||t.command&&ke.has(t.command))}function je(){let e=r(),t=oe(e=>e.events),n=B(e=>e.bump),i=(0,L.useRef)(new Set),a=(0,L.useRef)(new WeakSet);(0,L.useEffect)(()=>{let r=[];for(let e of t){let t=`id`in e?e.id:void 0;(t===void 0?a.current.has(e):i.current.has(t))||(t===void 0?a.current.add(e):i.current.add(t),Ae(e)&&r.push(e))}r.length!==0&&(e.invalidateQueries({queryKey:[`workspace-files`]}),e.invalidateQueries({queryKey:[`workspace-file-content`]}),e.invalidateQueries({queryKey:[`file_changes`]}),n())},[t,e,n])}function K(e){return e.startsWith(`/`)?e:`/${e}`}var q=class{static async getGitChanges(e,t,n,r){let i=C().backend;if(i.kind===`cloud`&&e){let t=new URLSearchParams;t.set(`path`,K(r));let n=await E({backend:i,method:`GET`,path:`/api/v1/app-conversations/${e}/git/changes?${t.toString()}`});if(!Array.isArray(n))throw Error(`Invalid response from runtime - runtime may be unavailable`);return n.map(e=>({status:j(String(e.status)),path:e.path}))}let a=await new k(w({conversationUrl:t,sessionApiKey:n})).gitChanges(r,{ref:`HEAD`});if(!Array.isArray(a))throw Error(`Invalid response from runtime - runtime may be unavailable`);return a.map(e=>({status:j(String(e.status)),path:e.path}))}static async getGitChangeDiff(e,t,n,r){let i=C().backend;if(i.kind===`cloud`&&e){let t=new URLSearchParams;t.set(`path`,K(r));let n=await E({backend:i,method:`GET`,path:`/api/v1/app-conversations/${e}/git/diff?${t.toString()}`});return{modified:n?.modified??``,original:n?.original??``,...n?.diff?{diff:n.diff}:{}}}let a=await new k(w({conversationUrl:t,sessionApiKey:n})).gitDiff(r,{ref:`HEAD`});return{modified:a.modified??``,original:a.original??``,...a.diff?{diff:a.diff}:{}}}};function J(e,t){let n=t?.trim();if(n)return n;if(!e)return T;let r=e.split(`/`);return`${T}/${r[r.length-1]}`}var Y=()=>{let{conversationId:e}=M(),{data:t}=N(),[n,r]=L.useState([]),a=L.useRef(null),o=F(),s=t?.conversation_url,c=t?.session_api_key,l=t?.selected_repository,u=t?.workspace?.working_dir?.trim(),d=L.useMemo(()=>J(l,u),[l,u]),f=i({queryKey:[`file_changes`,e,s,c,d],queryFn:async()=>{if(!e)throw Error(`No conversation ID`);return q.getGitChanges(e,s,c,d)},retry:!1,staleTime:1e3*60*5,gcTime:1e3*60*15,refetchOnMount:`always`,enabled:o&&!!e,meta:{disableToast:!0}});return L.useEffect(()=>{if(!f.isFetching&&f.isSuccess&&f.data){let e=f.data;if(e!==a.current)if(a.current=e,Array.isArray(e)){let t=new Set(e.map(e=>e.path)),i=new Set(n.map(e=>e.path)),a=e.filter(e=>!i.has(e.path)),o=n.filter(e=>t.has(e.path));r([...a,...o])}else r([e])}},[f.isFetching,f.isSuccess,f.data]),{data:n,isLoading:f.isLoading,isFetching:f.isFetching,isSuccess:f.isSuccess,isError:f.isError,error:f.error,refetch:f.refetch}},Me=[`index.html`,`index.htm`,`readme.md`,`readme`,`main.html`,`app.html`,`index.js`,`index.ts`,`index.tsx`,`index.jsx`,`main.py`,`app.py`,`main.go`,`main.rs`,`main.java`,`main.c`,`main.cpp`,`package.json`,`pyproject.toml`,`cargo.toml`,`go.mod`,`pom.xml`,`dockerfile`,`makefile`],Ne=[`license`,`license.md`,`license.txt`,`changelog.md`,`agents.md`,`tsconfig.json`,`.env.sample`,`.env.example`];function Pe(e){let t=e.lastIndexOf(`/`);return(t===-1?e:e.slice(t+1)).toLowerCase()}function X(e){return e.split(`/`).filter(Boolean).length-1}function Fe(e){let t=Pe(e),n=Me.indexOf(t);if(n!==-1)return n;let r=Ne.indexOf(t);return r===-1?1e4:1e3+r}function Ie(e){return[...e].sort((e,t)=>{let n=X(e)-X(t);if(n!==0)return n;let r=Fe(e)-Fe(t);return r===0?e.localeCompare(t):r})}function Le({paths:e,selectedPath:t,onSelectFile:n,isTreeVisible:r,onToggleTree:i}){let{t:s}=a(`openhands`),c=(0,L.useMemo)(()=>Ie(e),[e]);return(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5 border-b border-[var(--oh-border)] px-2 py-1.5 min-h-[34px]`,"data-testid":`file-quick-row`,children:[(0,R.jsx)(`button`,{type:`button`,onClick:i,"data-testid":`file-quick-row-tree-toggle`,"aria-pressed":r,"aria-label":s(r?o.FILES$HIDE_FILE_TREE:o.FILES$SHOW_FILE_TREE),title:s(r?o.FILES$HIDE_FILE_TREE:o.FILES$SHOW_FILE_TREE),className:b(`shrink-0 inline-flex items-center justify-center w-6 h-6 rounded-md cursor-pointer`,`text-[var(--oh-text-tertiary)] hover:bg-tertiary`,r&&`bg-[var(--oh-surface-raised)]`),children:(0,R.jsx)(p,{className:`w-3 h-3`,"aria-hidden":!0,strokeWidth:2})}),c.length>0&&(0,R.jsx)(`div`,{className:`flex flex-nowrap items-center gap-1.5 overflow-hidden flex-1 min-w-0`,children:c.map(e=>{let r=t===e;return(0,R.jsx)(`button`,{type:`button`,onClick:()=>n(e),title:e,"data-testid":`file-quick-row-item-${e}`,className:b(`inline-flex items-center px-2 py-0.5 text-xs whitespace-nowrap rounded-md cursor-pointer`,r?`bg-[var(--oh-interactive-hover)] text-white`:`bg-[var(--oh-surface-raised)] text-[var(--oh-text-tertiary)] hover:bg-tertiary`),children:e},e)})})]})}function Re(e){e.children.sort((e,t)=>e.isDirectory===t.isDirectory?e.name.localeCompare(t.name):e.isDirectory?-1:1);for(let t of e.children)t.isDirectory&&Re(t)}function ze(e,t,n,r,i){let a=t.get(e);a||(a=new Map,t.set(e,a));let o=a.get(n);if(o)return!i&&!o.isDirectory&&(o.isDirectory=!0),o;let s={name:n,path:r,isDirectory:!i,children:[]};return e.children.push(s),a.set(n,s),s}function Be(e){let t={name:``,path:``,isDirectory:!0,children:[]},n=new Map;for(let r of e){let e=r.split(`/`).filter(Boolean);if(e.length>0){let r=t,i=``;for(let t=0;t<e.length;t+=1){let a=e[t];i=i?`${i}/${a}`:a;let o=t===e.length-1;r=ze(r,n,a,i,o)}}}return Re(t),t}function Ve({node:e,depth:t,selectedPath:n,onSelectFile:r}){let[i,a]=(0,L.useState)(!1),o=8+t*12;if(e.isDirectory)return(0,R.jsxs)(`li`,{children:[(0,R.jsxs)(`button`,{type:`button`,onClick:()=>a(e=>!e),"aria-expanded":i,"data-testid":`file-tree-dir-${e.path}`,className:b(`flex w-full items-center gap-1.5 py-1 pr-2 text-left text-sm text-white`,`hover:bg-tertiary cursor-pointer`),style:{paddingLeft:`${o}px`},children:[(0,R.jsx)(`span`,{"aria-hidden":!0,className:b(`inline-block w-3 text-[10px] text-[var(--oh-muted)] transition-transform`,i?`rotate-90`:`rotate-0`),children:`▶`}),(0,R.jsx)(A,{className:`w-3.5 h-3.5 shrink-0`}),(0,R.jsx)(`span`,{className:`truncate`,children:e.name})]}),i&&e.children.length>0&&(0,R.jsx)(`ul`,{children:e.children.map(e=>(0,R.jsx)(Ve,{node:e,depth:t+1,selectedPath:n,onSelectFile:r},e.path))})]});let s=n===e.path;return(0,R.jsx)(`li`,{children:(0,R.jsxs)(`button`,{type:`button`,onClick:()=>r(e.path),"data-testid":`file-tree-file-${e.path}`,className:b(`flex w-full items-center gap-1.5 py-1 pr-2 text-left text-sm`,`hover:bg-tertiary cursor-pointer`,s?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-text-tertiary)]`),style:{paddingLeft:`${o+16}px`},children:[(0,R.jsx)(ie,{className:`w-3.5 h-3.5 shrink-0`}),(0,R.jsx)(`span`,{className:`truncate`,children:e.name})]})})}function He({paths:e,selectedPath:t,onSelectFile:n}){let{t:r}=a(`openhands`),i=(0,L.useMemo)(()=>Be(e),[e]);return i.children.length===0?(0,R.jsx)(`div`,{className:`px-3 py-4 text-sm text-[var(--oh-muted)]`,children:r(o.FILES$NO_FILES)}):(0,R.jsx)(`ul`,{className:`py-1 custom-scrollbar-always`,"data-testid":`file-tree-view`,children:i.children.map(e=>(0,R.jsx)(Ve,{node:e,depth:0,selectedPath:t,onSelectFile:n},e.path))})}var Ue={js:`javascript`,jsx:`jsx`,mjs:`javascript`,cjs:`javascript`,ts:`typescript`,tsx:`tsx`,py:`python`,pyi:`python`,pyw:`python`,html:`markup`,htm:`markup`,svg:`markup`,xml:`markup`,css:`css`,scss:`scss`,sass:`sass`,less:`less`,json:`json`,json5:`json5`,yaml:`yaml`,yml:`yaml`,toml:`toml`,ini:`ini`,cfg:`ini`,properties:`properties`,conf:`ini`,env:`bash`,md:`markdown`,markdown:`markdown`,mdx:`markdown`,sh:`bash`,bash:`bash`,zsh:`bash`,fish:`bash`,bat:`batch`,cmd:`batch`,ps1:`powershell`,ps:`powershell`,c:`c`,h:`c`,cpp:`cpp`,cc:`cpp`,cxx:`cpp`,hpp:`cpp`,hh:`cpp`,cs:`csharp`,java:`java`,kt:`kotlin`,kts:`kotlin`,scala:`scala`,rs:`rust`,go:`go`,rb:`ruby`,php:`php`,swift:`swift`,m:`objectivec`,mm:`objectivec`,hs:`haskell`,ex:`elixir`,exs:`elixir`,erl:`erlang`,fs:`fsharp`,fsx:`fsharp`,ml:`ocaml`,mli:`ocaml`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,lua:`lua`,pl:`perl`,pm:`perl`,r:`r`,jl:`julia`,dart:`dart`,groovy:`groovy`,gradle:`groovy`,tf:`hcl`,hcl:`hcl`,dockerfile:`docker`,sql:`sql`,graphql:`graphql`,gql:`graphql`,proto:`protobuf`,diff:`diff`,patch:`diff`,nix:`nix`,sol:`solidity`},We={dockerfile:`docker`,makefile:`makefile`,gnumakefile:`makefile`,".bashrc":`bash`,".zshrc":`bash`,".profile":`bash`,".env":`bash`,".gitignore":`bash`,".dockerignore":`bash`};function Ge(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`)),n=e.slice(t+1),r=n.lastIndexOf(`.`);return r<=0?``:n.slice(r+1).toLowerCase()}function Ke(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return e.slice(t+1).toLowerCase()}function qe(e,t){let n=We[Ke(e)];if(n)return n;let r=Ge(e);if(r&&Ue[r])return Ue[r];if(t){if(t===`text/html`)return`markup`;if(t===`text/css`)return`css`;if(t===`application/json`)return`json`;if(t===`text/markdown`)return`markdown`;if(t===`application/javascript`||t===`text/javascript`)return`javascript`;if(t===`application/x-yaml`||t===`text/yaml`)return`yaml`}return null}function Je({path:e,text:t,mimeType:n}){let r=qe(e,n);return r?(0,R.jsx)(`div`,{"data-testid":`file-content-viewer-highlighted`,"data-language":r,className:`h-full w-full overflow-auto bg-[var(--oh-surface)] custom-scrollbar-always`,children:(0,R.jsx)(se,{language:r,style:ce,showLineNumbers:!0,wrapLongLines:!1,customStyle:{margin:0,padding:`1rem`,background:`transparent`,fontSize:`0.75rem`,lineHeight:`1.25rem`,minHeight:`100%`},codeTagProps:{style:{background:`transparent`,fontFamily:`inherit`}},lineNumberStyle:{color:`var(--oh-border)`,minWidth:`2.5em`,paddingRight:`1em`,userSelect:`none`},children:t})}):(0,R.jsx)(`pre`,{"data-testid":`file-content-viewer-plain`,className:`h-full w-full overflow-auto whitespace-pre-wrap break-words bg-[var(--oh-surface)] p-4 text-xs leading-5 text-white custom-scrollbar-always`,children:t})}var Ye=new Set([`html`,`htm`,`svg`]),Xe=new Set([`md`,`markdown`,`mdx`]),Ze={pptx:`PowerPoint`,ppt:`PowerPoint`,docx:`Word`,doc:`Word`,xlsx:`Excel`,xls:`Excel`};function Z(e){let t=e.lastIndexOf(`.`);return t===-1?``:e.slice(t+1).toLowerCase()}function Q({path:e}){let{t}=a(`openhands`),n=Ze[Z(e)];return(0,R.jsx)(`div`,{className:`flex h-full w-full items-center justify-center text-sm text-[var(--oh-muted)]`,"data-testid":n?`file-content-viewer-unsupported-document`:`file-content-viewer-binary-fallback`,children:n?t(o.FILES$UNSUPPORTED_DOCUMENT,{type:n}):t(o.FILES$BINARY_FALLBACK)})}function Qe({path:e,viewMode:t}){let{t:n}=a(`openhands`),r=G(e),i=B(e=>e.count);if(r.isLoading)return(0,R.jsx)(`div`,{className:`flex h-full w-full items-center justify-center text-sm text-[var(--oh-muted)]`,children:n(o.FILES$LOADING_FILES)});if(r.isError||!r.data)return(0,R.jsx)(`div`,{className:`flex h-full w-full items-center justify-center text-sm text-[var(--oh-muted)]`,"data-testid":`file-content-viewer-error`,children:r.error?.message??n(o.FILES$LOAD_ERROR)});let{kind:s,text:c,staticUrl:l,mimeType:u}=r.data,d=V(l,i);return t===`plain`?s===`text`&&c!==null?(0,R.jsx)(Je,{path:e,text:c,mimeType:u??void 0}):(0,R.jsx)(Q,{path:e}):s===`image`?(0,R.jsx)(`div`,{className:`flex h-full w-full items-center justify-center bg-[var(--oh-surface)] p-4`,"data-testid":`file-content-viewer-image`,children:(0,R.jsx)(`img`,{src:d,alt:e,className:`max-h-full max-w-full object-contain`})}):s===`pdf`?(0,R.jsx)(`iframe`,{title:e,src:d,sandbox:`allow-same-origin`,"data-testid":`file-content-viewer-iframe`,className:`h-full w-full bg-white`}):s===`binary`?(0,R.jsx)(Q,{path:e}):u===`text/html`||Ye.has(Z(e))?(0,R.jsx)(`iframe`,{title:e,src:d,sandbox:`allow-same-origin`,"data-testid":`file-content-viewer-iframe`,className:`h-full w-full bg-white`}):s===`text`&&Xe.has(Z(e))?(0,R.jsx)(`div`,{"data-testid":`file-content-viewer-markdown`,className:`h-full w-full overflow-auto bg-[var(--oh-surface)] text-white custom-scrollbar-always`,children:(0,R.jsx)(`div`,{className:`prose prose-sm prose-invert max-w-none p-6 [--tw-prose-body:#fff] [--tw-prose-bold:#fff] [--tw-prose-headings:#fff] [--tw-prose-lead:#fff] [--tw-prose-counters:#fff] [--tw-prose-quotes:#fff] [--tw-prose-quote-borders:var(--oh-border-subtle)] [--tw-prose-bullets:var(--oh-muted)] [--tw-prose-hr:var(--oh-border-subtle)] [--tw-prose-captions:var(--oh-muted)] [--tw-prose-kbd:#fff]`,children:(0,R.jsx)(le,{content:c??``,includeStandard:!0,includeHeadings:!0})})}):s===`text`&&c!==null?(0,R.jsx)(Je,{path:e,text:c,mimeType:u??void 0}):(0,R.jsx)(Q,{path:e})}var $e=e=>(0,R.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 13 15`,fill:`none`,...e,children:(0,R.jsx)(`path`,{d:`M6.59467 0.21967C6.88756 -0.0732233 7.36244 -0.0732233 7.65533 0.21967L9.90533 2.46967C10.1982 2.76256 10.1982 3.23744 9.90533 3.53033L7.65533 5.78033C7.36244 6.07322 6.88756 6.07322 6.59467 5.78033C6.30178 5.48744 6.30178 5.01256 6.59467 4.71967L7.56434 3.75H6.375C3.71421 3.75 1.5 5.96421 1.5 8.625C1.5 11.2858 3.71421 13.5 6.375 13.5C9.03579 13.5 11.25 11.2858 11.25 8.625C11.25 8.21079 11.5858 7.875 12 7.875C12.4142 7.875 12.75 8.21079 12.75 8.625C12.75 12.1142 9.86421 15 6.375 15C2.88579 15 0 12.1142 0 8.625C0 5.13579 2.88579 2.25 6.375 2.25H7.56434L6.59467 1.28033C6.30178 0.987437 6.30178 0.512563 6.59467 0.21967Z`,fill:`currentColor`})}),et=e=>(0,R.jsx)(`svg`,{width:13,height:8,viewBox:`0 0 13 8`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,R.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M0.259766 6.17427L6.26425 0.715628L12.2688 6.17427L11.2597 7.28418L6.26425 2.74282L1.26878 7.28418L0.259766 6.17427Z`,fill:`currentColor`})}),tt=e=>{let{conversationId:t}=M(),{data:n}=N(),r=n?.conversation_url,a=n?.session_api_key,o=n?.selected_repository,s=n?.workspace?.working_dir?.trim(),c=L.useMemo(()=>`${J(o,s)}/${e.filePath}`,[o,e.filePath,s]),l=e.type===`D`;return i({queryKey:[`file_diff`,t,r,a,c],queryFn:async()=>{if(!t)throw Error(`No conversation ID`);return q.getGitChangeDiff(t,r,a,c)},enabled:e.enabled&&!l,staleTime:1e3*60*5,gcTime:1e3*60*15})};function nt({className:e}){let{t}=a(`openhands`);return(0,R.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,R.jsx)(`div`,{className:b(`animate-spin rounded-full border-4 border-transparent border-t-white`,e),role:`status`,"aria-label":t(o.HOME$LOADING)})})}function $({height:e,children:t}){return(0,R.jsx)(`div`,{"data-testid":`editor-container`,className:`w-full border-b border-[var(--oh-border)] overflow-hidden h-[var(--editor-height)]`,style:{"--editor-height":`${e}px`},children:t})}var rt=[{mode:`old`,icon:h},{mode:`diff`,icon:u},{mode:`new`,icon:v}],it={renderValidationDecorations:`off`,readOnly:!0,scrollBeyondLastLine:!1,minimap:{enabled:!1},automaticLayout:!0,scrollbar:{alwaysConsumeMouseWheel:!1}},at={A:f,D:g,M:m,R:`Renamed`,U:`Untracked`},ot=e=>{e.editor.defineTheme(`custom-diff-theme`,{base:`vs-dark`,inherit:!0,rules:[{token:`comment`,foreground:`6a9955`},{token:`keyword`,foreground:`569cd6`},{token:`string`,foreground:`ce9178`},{token:`number`,foreground:`b5cea8`}],colors:{"diffEditor.insertedTextBackground":`#014b01AA`,"diffEditor.removedTextBackground":`#750000AA`,"diffEditor.insertedLineBackground":`#003f00AA`,"diffEditor.removedLineBackground":`#5a0000AA`,"diffEditor.border":`var(--oh-border-subtle)`,"editorUnnecessaryCode.border":`#00000000`,"editorUnnecessaryCode.opacity":`rgba(0, 0, 0, 0.467)`}})};function st({path:e,type:t}){let{t:n}=a(`openhands`),[r,i]=L.useState(!0),[s,c]=L.useState(400),[l,u]=L.useState(`diff`),f=L.useRef(null),p=L.useRef(null),m=t===`A`||t===`U`,h=t===`D`,g=L.useMemo(()=>{if(t===`R`){let t=e.split(/\s+/).slice(1);return t[t.length-1]}return e},[e,t]),{data:v,isLoading:y,isSuccess:x,isRefetching:S}=tt({filePath:g,type:t,enabled:!r}),C=L.useCallback(()=>{if(!f.current)return;let e=f.current.getOriginalEditor(),t=f.current.getModifiedEditor();e&&t&&c(Math.max(e.getContentHeight(),t.getContentHeight())+20)},[]),w=L.useCallback(()=>{p.current&&c(p.current.getContentHeight()+20)},[]),T=e=>{f.current=e,C(),e.getOriginalEditor().onDidContentSizeChange(C),e.getModifiedEditor().onDidContentSizeChange(C)},E=e=>{p.current=e,w(),e.onDidContentSizeChange(w)},D=(t===`U`?at.A:at[t])||`?`,ee=typeof D==`string`?(0,R.jsx)(ne.Text,{children:D}):L.createElement(D,{className:`w-5 h-5`}),O=y||S,k=pe(g),te=k===`markdown`,A=l===`old`?v?.original??``:v?.modified??``;return(0,R.jsxs)(`div`,{"data-testid":`file-diff-viewer-outer`,className:`w-full flex flex-col`,children:[(0,R.jsx)(`div`,{className:`flex justify-between items-center px-3 py-2.5 border-b border-[var(--oh-border)] hover:cursor-pointer`,onClick:()=>i(e=>!e),children:(0,R.jsxs)(`span`,{className:`text-sm w-full text-content flex items-center gap-2`,children:[O?(0,R.jsx)(nt,{className:`w-4 h-4`}):ee,(0,R.jsx)(`strong`,{className:`w-full truncate font-medium`,children:g}),!r&&!h&&(0,R.jsx)(`span`,{className:`flex items-center gap-0.5 shrink-0`,onClick:e=>e.stopPropagation(),children:rt.map(({mode:e,icon:t})=>(0,R.jsx)(`button`,{"data-testid":`view-mode-${e}`,type:`button`,"aria-pressed":l===e,onClick:()=>u(e),className:b(`p-1 rounded transition-colors cursor-pointer`,l===e?`bg-[var(--oh-interactive-hover)] text-white`:`text-[var(--oh-muted)] hover:bg-[var(--oh-interactive-hover)] hover:text-white`),children:(0,R.jsx)(t,{className:`w-4 h-4`})},e))}),(0,R.jsx)(`button`,{"data-testid":`collapse`,type:`button`,children:(0,R.jsx)(et,{className:b(`w-4 h-4 transition-transform`,r&&`transform rotate-180`)})})]})}),!r&&h&&(0,R.jsx)(`div`,{"data-testid":`file-deleted-message`,className:`w-full border-b border-[var(--oh-border)] p-4 bg-base text-[var(--oh-text-dim)] text-sm`,children:n(o.DIFF_VIEWER$FILE_DELETED)}),!r&&!h&&x&&(l===`diff`?(0,R.jsx)($,{height:s,children:(0,R.jsx)(d,{"data-testid":`file-diff-viewer`,className:`w-full h-full`,language:k,original:m?``:v?.original??``,modified:h?``:v?.modified??``,theme:`custom-diff-theme`,onMount:T,beforeMount:ot,options:{...it,renderSideBySide:!m&&!h,hideUnchangedRegions:{enabled:!0}}})}):te?(0,R.jsx)(`div`,{className:`w-full border-b border-[var(--oh-border)] overflow-auto p-4 bg-base prose prose-invert max-w-none`,"data-testid":`markdown-preview`,children:(0,R.jsx)(le,{content:A,includeStandard:!0,includeHeadings:!0})}):(0,R.jsx)($,{height:s,children:(0,R.jsx)(_,{"data-testid":`file-single-viewer`,className:`w-full h-full`,language:k,value:A,theme:`custom-diff-theme`,beforeMount:ot,onMount:E,options:it})}))]})}function ct(){return(0,R.jsx)(m,{"aria-hidden":!0,className:`size-full`})}function lt(){let{t:e}=a(`openhands`);return(0,R.jsx)(I,{icon:(0,R.jsx)(ct,{}),children:e(o.DIFF_VIEWER$NO_CHANGES)})}var ut=[{key:o.TIPS$CUSTOMIZE_MICROAGENT,link:`https://docs.all-hands.dev/usage/prompting/microagents-repo`},{key:o.TIPS$SETUP_SCRIPT,link:`https://docs.all-hands.dev/usage/prompting/repository#setup-script`},{key:o.TIPS$VSCODE_INSTANCE},{key:o.TIPS$SAVE_WORK},{key:o.TIPS$SPECIFY_FILES,link:`https://docs.all-hands.dev/usage/prompting/prompting-best-practices`},{key:o.TIPS$HEADLESS_MODE,link:`https://docs.all-hands.dev/usage/how-to/headless-mode`},{key:o.TIPS$CLI_MODE,link:`https://docs.all-hands.dev/usage/how-to/cli-mode`},{key:o.TIPS$GITHUB_HOOK,link:`https://docs.all-hands.dev/usage/cloud/github-installation#working-on-github-issues-and-pull-requests-using-openhands`},{key:o.TIPS$BLOG_SIGNUP,link:`https://www.all-hands.dev/blog`},{key:o.TIPS$API_USAGE,link:`https://docs.all-hands.dev/api-reference/health-check`}];function dt(){return ut[Math.floor(Math.random()*ut.length)]}function ft(){let{t:e}=a(`openhands`),[t,n]=L.useState(dt());return L.useEffect(()=>{n(dt())},[]),(0,R.jsx)(`div`,{className:`w-full bg-tertiary p-4 text-left`,children:(0,R.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,R.jsx)(fe,{className:`mt-0.5 h-4 w-4 shrink-0 fill-[var(--oh-muted)]`,"aria-hidden":!0}),(0,R.jsxs)(`div`,{className:`min-w-0`,children:[(0,R.jsx)(`h4`,{className:`text-sm font-semibold text-[var(--oh-text-tertiary)]`,children:e(o.TIPS$PROTIP)}),(0,R.jsxs)(`p`,{className:`text-sm font-normal leading-5 text-[var(--oh-muted)]`,children:[e(t.key),t.link?(0,R.jsxs)(R.Fragment,{children:[` `,(0,R.jsx)(`a`,{href:t.link,target:`_blank`,rel:`noopener noreferrer`,className:`underline transition-colors hover:text-white`,children:e(o.TIPS$LEARN_MORE)})]}):null]})]})]})})}var pt=/not a git repository/i,mt=new Set([o.DIFF_VIEWER$WAITING_FOR_RUNTIME,o.DIFF_VIEWER$LOADING]);function ht({messages:e}){let{t}=a(`openhands`);return e.length===1&&mt.has(e[0])?(0,R.jsx)(ue,{testId:`changes-tab-status`,messageKey:e[0]}):(0,R.jsx)(I,{icon:(0,R.jsx)(ct,{}),children:e.map(e=>(0,R.jsx)(`span`,{className:`block`,children:t(e)},e))})}function gt(){let{data:e,isSuccess:t,isError:n,error:r,isLoading:i}=Y(),[a,s]=L.useState(null),{curAgentState:l}=ae(),u=!x.includes(l),d=r&&pt.test(c(r));return L.useEffect(()=>{if(!u)s([o.DIFF_VIEWER$WAITING_FOR_RUNTIME]);else if(r){let e=c(r);pt.test(e)?s([o.DIFF_VIEWER$NOT_A_GIT_REPO,o.DIFF_VIEWER$ASK_OH]):s([e])}else s(i?[o.DIFF_VIEWER$LOADING]:null)},[u,d,i,r,s]),(0,R.jsx)(`main`,{className:`h-full w-full flex flex-col items-stretch`,children:!t||!e.length?(0,R.jsxs)(`div`,{className:`flex flex-col h-full w-full`,children:[(0,R.jsxs)(`div`,{className:`flex-1 flex items-center justify-center`,children:[a&&(0,R.jsx)(ht,{messages:a}),!a&&t&&e.length===0&&(0,R.jsx)(lt,{})]}),!n&&t&&e.length===0&&(0,R.jsx)(ft,{})]}):(0,R.jsx)(`div`,{className:`h-full overflow-y-auto flex flex-col items-stretch custom-scrollbar-always`,children:e.slice(0,100).map(e=>(0,R.jsx)(st,{path:e.path,type:e.status},e.path))})})}function _t(){let{t:e}=a(`openhands`);je();let{hasAttachedSource:t,isLoading:n}=Ee(),{hasCommits:i}=De({enabled:t}),{conversationId:s}=re(),{state:c,setFilesTabDiffView:l,setFilesTabContentViewMode:u}=ee(s??``),d=(t||n)&&i!==!1,f=c.filesTabDiffView??d,p=c.filesTabContentViewMode,[m,h]=(0,L.useState)(!1),g=ye(),_=(0,L.useMemo)(()=>g.data??[],[g.data]),v=P(e=>e.selectedPath),y=P(e=>e.selectedConversationId),b=P(e=>e.setSelectedPath),x=y===s?v:null,S=(0,L.useCallback)(e=>b(e,s),[s,b]),C=G(x),w=B(e=>e.count),T=V(C.data?.staticUrl??null,w);(0,L.useEffect)(()=>{y!==s&&b(null,s)},[y,s,b]),(0,L.useEffect)(()=>{if(x||_.length===0)return;let[e]=Ie(_);e&&b(e,s)},[_,x,s,b]);let E=r(),{refetch:D,isFetching:k}=Y();return(0,R.jsxs)(`main`,{className:`h-full w-full flex flex-col items-stretch`,"data-testid":`files-tab`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-3 px-3 py-1.5 border-b border-[var(--oh-border)]`,children:[(0,R.jsx)(O,{ariaLabel:e(o.FILES$DIFF_VIEW),testId:`files-tab-diff-toggle`,value:f?`on`:`off`,options:[{value:`on`,label:e(o.FILES$DIFF_VIEW)},{value:`off`,label:e(o.COMMON$FILES)}],onChange:e=>l(e===`on`)}),!f&&(0,R.jsx)(O,{ariaLabel:e(o.FILES$RICH),testId:`files-tab-content-mode-toggle`,value:p,options:[{value:`rich`,label:e(o.FILES$RICH)},{value:`plain`,label:e(o.FILES$PLAIN)}],onChange:u}),(0,R.jsxs)(`div`,{className:`ml-auto flex items-center gap-1`,children:[!f&&T&&(0,R.jsx)(`a`,{href:T,target:`_blank`,rel:`noopener noreferrer`,"aria-label":e(o.FILES$OPEN_IN_NEW_WINDOW),title:e(o.FILES$OPEN_IN_NEW_WINDOW),"data-testid":`files-tab-open-in-new-window`,className:`flex items-center justify-center w-[26px] py-1 rounded-[7px] hover:bg-[var(--oh-interactive-hover)] cursor-pointer text-white`,children:(0,R.jsx)(de,{width:14,height:14})}),(0,R.jsx)(`button`,{type:`button`,onClick:()=>{D(),E.invalidateQueries({queryKey:[`workspace-files`]}),E.invalidateQueries({queryKey:[`workspace-file-content`]})},disabled:k,"aria-label":e(o.FILES$REFRESH),title:e(o.FILES$REFRESH),"data-testid":`files-tab-refresh`,className:`flex items-center justify-center w-[26px] py-1 rounded-[7px] hover:enabled:bg-[var(--oh-interactive-hover)] cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed`,children:(0,R.jsx)($e,{width:12.75,height:15,color:`#ffffff`,className:k?`animate-spin`:``})})]})]}),f?(0,R.jsx)(`div`,{className:`flex-1 min-h-0`,children:(0,R.jsx)(gt,{})}):(0,R.jsx)(`div`,{className:`flex flex-1 flex-col min-h-0`,children:g.isLoading?(0,R.jsx)(`div`,{className:`flex flex-1 items-center justify-center text-sm text-[var(--oh-muted)]`,children:e(o.FILES$LOADING_FILES)}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Le,{paths:_,selectedPath:x,onSelectFile:S,isTreeVisible:m,onToggleTree:()=>h(e=>!e)}),(0,R.jsxs)(`div`,{className:`flex h-full min-h-0 flex-1`,children:[m&&(0,R.jsx)(`aside`,{className:`w-56 shrink-0 border-r border-[var(--oh-border)] overflow-y-auto custom-scrollbar-always`,"data-testid":`files-tab-tree`,children:(0,R.jsx)(He,{paths:_,selectedPath:x,onSelectFile:S})}),(0,R.jsx)(`section`,{className:`flex h-full min-h-0 min-w-0 flex-1 flex-col`,"data-testid":`files-tab-content`,children:x?(0,R.jsx)(Qe,{path:x,viewMode:p}):(0,R.jsx)(me,{})})]})]})})]})}export{_t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";import{t as n}from"./react-DPDgL6du.js";e();var r=t(),i=e=>(0,r.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,r.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M20.565 6.435L16.065 1.935L15 1.5H6L4.5 3V21L6 22.5H19.5L21 21V7.5L20.565 6.435ZM19.5 21H6V3H13.5V9H19.5V21ZM15 7.5V3L19.5 7.5H15Z`,fill:`currentColor`})}),a=n(e=>({selectedPath:null,selectedConversationId:null,setSelectedPath:(t,n=null)=>e({selectedPath:t,selectedConversationId:n})}));export{i as n,a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";e();var n=t(),r=e=>(0,n.jsxs)(`svg`,{width:28,height:28,viewBox:`0 0 28 28`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,n.jsxs)(`g`,{clipPath:`url(#clip0_8760_4530)`,children:[(0,n.jsx)(`path`,{d:`M2.33496 6.99504C2.33496 5.70504 3.37496 4.66504 4.66496 4.66504H10.495C10.805 4.66504 11.105 4.78504 11.315 5.00504L13.305 6.99504H23.325C24.615 6.99504 25.655 8.03504 25.655 9.32504V20.995C25.655 22.285 24.615 23.325 23.325 23.325H4.66496C3.37496 23.325 2.33496 22.285 2.33496 20.995V6.99504ZM10.015 6.99504H4.66496V20.995H23.335V9.33504H12.835C12.525 9.33504 12.225 9.21504 12.015 8.99504L10.025 7.00504L10.015 6.99504Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M8.40279 11.4871C8.28576 11.4871 8.16873 11.4403 8.0829 11.3545L6.67853 9.95013C6.49908 9.77068 6.49908 9.482 6.67853 9.30255C6.85798 9.12311 7.14666 9.12311 7.3261 9.30255L8.73048 10.7069C8.90992 10.8864 8.90992 11.1751 8.73048 11.3545C8.64465 11.4403 8.52762 11.4871 8.41059 11.4871H8.40279Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M9.48901 12.5635H8.57617V16.7532H9.48901V12.5635Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M9.03627 13.0159C8.28727 13.0159 7.67871 12.4073 7.67871 11.6583C7.67871 10.9093 8.28727 10.3008 9.03627 10.3008C9.78527 10.3008 10.3938 10.9093 10.3938 11.6583C10.3938 12.4073 9.78527 13.0159 9.03627 13.0159ZM9.03627 11.2214C8.79441 11.2214 8.59936 11.4165 8.59936 11.6583C8.59936 11.9002 8.79441 12.0953 9.03627 12.0953C9.27814 12.0953 9.47319 11.9002 9.47319 11.6583C9.47319 11.4165 9.27814 11.2214 9.03627 11.2214Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M12.0324 16.012C11.2834 16.012 10.6748 15.4034 10.6748 14.6544C10.6748 13.9054 11.2834 13.2969 12.0324 13.2969C12.7814 13.2969 13.3899 13.9054 13.3899 14.6544C13.3899 15.4034 12.7814 16.012 12.0324 16.012ZM12.0324 14.2175C11.7905 14.2175 11.5954 14.4126 11.5954 14.6544C11.5954 14.8963 11.7905 15.0914 12.0324 15.0914C12.2742 15.0914 12.4693 14.8963 12.4693 14.6544C12.4693 14.4126 12.2742 14.2175 12.0324 14.2175Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M9.03627 19.0003C8.28727 19.0003 7.67871 18.3917 7.67871 17.6427C7.67871 16.8937 8.28727 16.2852 9.03627 16.2852C9.78527 16.2852 10.3938 16.8937 10.3938 17.6427C10.3938 18.3917 9.78527 19.0003 9.03627 19.0003ZM9.03627 17.2058C8.79441 17.2058 8.59936 17.4009 8.59936 17.6427C8.59936 17.8846 8.79441 18.0796 9.03627 18.0796C9.27814 18.0796 9.47319 17.8846 9.47319 17.6427C9.47319 17.4009 9.27814 17.2058 9.03627 17.2058Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M9.9902 11.9805L9.34473 12.626L11.066 14.3472L11.7115 13.7018L9.9902 11.9805Z`,fill:`currentColor`})]}),(0,n.jsx)(`defs`,{children:(0,n.jsx)(`clipPath`,{id:`clip0_8760_4530`,children:(0,n.jsx)(`rect`,{width:23.33,height:18.67,fill:`white`,transform:`translate(2.33496 4.66504)`})})})]});export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./utils-CE0lDWtb.js";var t=`h-9 min-h-9`,n=`rounded-lg`,r=`border border-[var(--oh-border)]`,i=`bg-base-secondary`,a=`duration-75`,o=`!duration-75`,s=`motion-reduce:transition-none`,c=e(`transition-[background-color,border-color,box-shadow,opacity]`,a,s),l=e(`!transition-[background-color,border-color,box-shadow,opacity]`,o,s),u=e(`transition-[transform] ease`,a,s),d=`hover:text-white hover:bg-white/10`,f=e(`inline-flex items-center gap-1 rounded-[100px] border border-transparent px-1.5`,`text-sm font-normal leading-5 text-[var(--oh-muted)] whitespace-nowrap min-w-0 cursor-pointer`,c,d),p=e(`flex items-center justify-center rounded-full text-[var(--oh-muted)] cursor-pointer`,c,d),m=`focus:border-white/40 focus:ring-1 focus:ring-white/20 focus:outline-none`,h=`focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`,g=`disabled:cursor-not-allowed disabled:opacity-60`,_=e(t,n,r,i,c,m,g,`w-full min-w-0 px-3 text-sm text-white placeholder:text-tertiary-alt`),v=e(_,`placeholder:italic`,l),y=e(n,r,i,c,m,g,`w-full min-w-0 px-3 py-2 text-sm text-white placeholder:text-tertiary-alt`),b=e(t,`relative flex min-w-0 items-center`,n,r,i,c,h),x=e(`min-w-0 flex-1 border-0 bg-transparent px-3 text-sm outline-none`,`placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`),S=e(t,`inline-flex w-fit cursor-pointer items-center justify-center gap-2 px-3`,n,c,`text-sm font-normal disabled:cursor-not-allowed disabled:opacity-30`),C=`pl-12`;e(S,r,i,`shrink-0 text-white`);var w=e(`inline-flex items-center gap-2 self-start rounded-lg p-2`,`text-sm font-normal leading-5 text-[var(--oh-muted)] cursor-pointer`,c,`hover:bg-tertiary hover:text-white`);export{c as _,S as a,x as c,n as d,v as f,u as g,C as h,r as i,y as l,i as m,f as n,g as o,b as p,w as r,_ as s,p as t,d as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";e();var n=t(),r=e=>(0,n.jsx)(`svg`,{width:16,height:16,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,n.jsx)(`path`,{d:`M11.3931 1.88021C10.78 1.37593 10.062 1.01489 9.29157 0.823438C8.52113 0.631981 7.71767 0.614934 6.9398 0.773542C5.90405 0.982756 4.95379 1.49492 4.20959 2.24506C3.46538 2.9952 2.96078 3.9495 2.7598 4.98688C2.61303 5.76469 2.6397 6.56531 2.83791 7.33163C3.03611 8.09795 3.40097 8.8111 3.90647 9.42021C4.37559 9.94959 4.64449 10.6266 4.66647 11.3335V13.3335C4.66647 13.864 4.87718 14.3727 5.25225 14.7478C5.62732 15.1228 6.13603 15.3335 6.66647 15.3335H9.33313C9.86356 15.3335 10.3723 15.1228 10.7473 14.7478C11.1224 14.3727 11.3331 13.864 11.3331 13.3335V11.4602C11.3555 10.6797 11.6423 9.92983 12.1465 9.33354C13.0299 8.24073 13.4463 6.84342 13.3052 5.44529C13.1642 4.04716 12.477 2.7612 11.3931 1.86687V1.88021ZM9.9998 13.3335C9.9998 13.5104 9.92956 13.6799 9.80454 13.8049C9.67951 13.93 9.50994 14.0002 9.33313 14.0002H6.66647C6.48965 14.0002 6.32009 13.93 6.19506 13.8049C6.07004 13.6799 5.9998 13.5104 5.9998 13.3335V12.6669H9.9998V13.3335ZM11.1131 8.50688C10.4428 9.30194 10.0517 10.2949 9.9998 11.3335H8.66647V9.33354C8.66647 9.15673 8.59623 8.98716 8.4712 8.86214C8.34618 8.73711 8.17661 8.66688 7.9998 8.66688C7.82299 8.66688 7.65342 8.73711 7.52839 8.86214C7.40337 8.98716 7.33313 9.15673 7.33313 9.33354V11.3335H5.9998C5.98221 10.3123 5.60443 9.33005 4.93313 8.56021C4.49023 8.02954 4.19239 7.39316 4.06867 6.71311C3.94495 6.03306 3.99957 5.33255 4.22719 4.6799C4.45481 4.02724 4.84768 3.4447 5.36748 2.98909C5.88728 2.53348 6.51627 2.22034 7.19313 2.08021C7.77483 1.96044 8.37591 1.9717 8.95271 2.11319C9.52952 2.25467 10.0676 2.52282 10.5278 2.89818C10.9881 3.27353 11.359 3.74666 11.6136 4.28322C11.8682 4.81978 12.0001 5.4063 11.9998 6.00021C12.0047 6.91345 11.6912 7.79985 11.1131 8.50688Z`,fill:`currentColor`})}),i=e=>{switch(e.split(`.`).pop()?.toLowerCase()){case`js`:case`jsx`:return`javascript`;case`ts`:case`tsx`:return`typescript`;case`py`:return`python`;case`html`:return`html`;case`css`:return`css`;case`json`:return`json`;case`md`:return`markdown`;case`yml`:case`yaml`:return`yaml`;case`sh`:case`bash`:return`bash`;case`dockerfile`:return`dockerfile`;case`rs`:return`rust`;case`go`:return`go`;case`java`:return`java`;case`cpp`:case`cc`:case`cxx`:return`cpp`;case`c`:return`c`;case`rb`:return`ruby`;case`php`:return`php`;case`sql`:return`sql`;default:return`text`}};export{r as n,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~i3v2mlbw-BrJQ3XZH.js";import{h as i,o as a,s as o}from"./path-utils-BeOmjIcE.js";import{n as s}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~d1e18dtv-5Q6lQJdE.js";import{t as c}from"./useMutation-DCE9RcgK.js";import{t as l}from"./useQuery-CpjHYtZc.js";import{t as u}from"./useTranslation-Cgy4JA_g.js";import{t as d}from"./declaration-B9kpCaYl.js";import{A as f,k as p,n as m}from"./active-backend-context-u2tdYRgH.js";import{_ as h,i as g,t as _}from"./utils-CE0lDWtb.js";import{t as v}from"./common-Dh7OqABE.js";import{c as y,n as b}from"./agent-server-client-options-DVLRd9sw.js";import{t as x}from"./proxy-CHmFkV16.js";import{n as ee}from"./navigation-context-DPs2G0X8.js";import{t as te}from"./dist-CodhvuAP.js";import{t as ne}from"./react-DPDgL6du.js";import{r as re,t as ie}from"./middleware-DYHYNAnP.js";import{t as S}from"./conversation-local-storage-F6zVMM--.js";import{r as ae}from"./use-settings-dX4fKUPF.js";import{t as oe}from"./use-tracking-GtXCHmTv.js";import{i as C}from"./vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~enjl5xdm-mMKDm94D.js";import{t as w}from"./agent-server-conversation-service.api-BP73yONA.js";import{t as T}from"./use-is-authed-_dhQ2Xuj.js";import{a as E,o as se,t as D}from"./vendor~root-layout~home~conversation-panel~conversation~shared-conversation~alert-banner~pl~rqjteh0a-CZM4hwUT.js";import{t as ce}from"./git-status-mapper-BI8FyUVp.js";var O=n(),k=te(`shrink-0 self-stretch min-w-full bg-[var(--oh-border)]`,{variants:{orientation:{horizontal:`h-[1px]`},color:{light:`bg-[var(--oh-border)]`},size:{thin:`h-[1px]`},inset:{none:``,menu:``}},defaultVariants:{orientation:`horizontal`,color:`light`,size:`thin`,inset:`none`}});function A({orientation:e,color:t,size:n,inset:r,className:i,testId:a}){return r===`menu`?(0,O.jsx)(`div`,{"data-testid":a,role:`separator`,className:_(`relative min-w-full shrink-0 self-stretch`,`h-3`,i),children:(0,O.jsx)(`div`,{"aria-hidden":!0,className:`absolute top-1/2 -left-1 -right-1 h-px -translate-y-1/2 bg-[var(--oh-border)]`})}):(0,O.jsx)(`div`,{"data-testid":a,role:`separator`,className:_(k({orientation:e,color:t,size:n,inset:r}),i)})}var j=()=>{let e=r();return c({mutationFn:e=>w.deleteConversation(e.conversationId),onMutate:async t=>{await e.cancelQueries({queryKey:[`user`,`conversations`]});let n=e.getQueryData([`user`,`conversations`]);return e.setQueryData([`user`,`conversations`],e=>e?.filter(e=>e.conversation_id!==t.conversationId)),{previousConversations:n}},onSuccess:(e,t)=>{S(t.conversationId)},onError:(t,n,r)=>{r?.previousConversations&&e.setQueryData([`user`,`conversations`],r.previousConversations)},onSettled:()=>{e.invalidateQueries({queryKey:[`user`,`conversations`]}),e.invalidateQueries({queryKey:[`start-tasks`]})}})},M=()=>{let{t:e}=u(`openhands`),t=r(),{conversationId:n,navigate:i}=ee();return c({mutationKey:[`stop-conversation`],mutationFn:async e=>o(e.conversationId),onMutate:async()=>{let n=s.loading(e(d.TOAST$STOPPING_CONVERSATION),p);return await t.cancelQueries({queryKey:[`user`,`conversations`]}),{previousConversations:t.getQueryData([`user`,`conversations`]),toastId:n}},onError:(n,r,i)=>{i?.toastId&&s.dismiss(i.toastId),f(e(d.TOAST$FAILED_TO_STOP_CONVERSATION)),i?.previousConversations&&t.setQueryData([`user`,`conversations`],i.previousConversations)},onSuccess:(r,o,c)=>{c?.toastId&&s.dismiss(c.toastId),s.success(e(d.TOAST$CONVERSATION_STOPPED),p),a(t,o.conversationId,{execution_status:v.PAUSED,sandbox_status:`PAUSED`}),n===o.conversationId&&i(`/conversations`)}})};function N(e){return e===`MISSING`||e===`ERROR`}var P=e(t()),F=e=>(0,O.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,O.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M22.1595 5.22752L20.9895 4.95152L17.8275 8.09552L16.0365 6.27152L19.1205 3.03602L18.8505 1.84802C18.1988 1.62999 17.5172 1.51461 16.83 1.50602C16.0804 1.49449 15.3365 1.63746 14.6445 1.92602C13.9764 2.22843 13.3725 2.65616 12.8655 3.18602C12.3011 3.72063 11.8542 4.36683 11.553 5.08352C10.9732 6.50984 10.9732 8.10619 11.553 9.53252C8.42587 12.609 5.3391 15.7263 2.29351 18.8835C1.97851 19.296 1.82851 19.8105 1.86751 20.328C1.89825 20.8846 2.14856 21.4063 2.56351 21.7785C2.74951 21.981 2.97151 22.149 3.21901 22.2705C3.47401 22.383 3.74851 22.4475 4.02601 22.461C4.50001 22.452 4.95451 22.272 5.30701 21.9555C7.62901 19.77 12.078 15.2805 14.6055 12.6495C15.291 12.9405 16.0275 13.0905 16.7715 13.089C17.5204 13.0884 18.2616 12.9377 18.9513 12.6458C19.641 12.3539 20.2652 11.9267 20.787 11.3895C21.8588 10.2964 22.4575 8.82543 22.4535 7.29452C22.4708 6.59398 22.3715 5.89544 22.1595 5.22752ZM4.39951 20.892C4.34178 20.9433 4.27218 20.9794 4.19701 20.997C4.12306 21.0098 4.04746 21.0098 3.97351 20.997C3.89598 20.9852 3.82213 20.956 3.75751 20.9115C3.68817 20.8709 3.62955 20.8144 3.58651 20.7465C3.37651 20.532 3.18001 20.124 3.37651 19.8945C5.43151 17.709 9.66301 13.437 12.309 10.8255C12.459 11.0235 12.624 11.2125 12.801 11.3895C12.978 11.574 13.1685 11.745 13.371 11.901C10.812 14.526 6.63901 18.747 4.40101 20.892H4.39951ZM21.0765 7.29452C21.0795 8.44202 20.6325 9.54452 19.8285 10.3665C19.0262 11.1536 17.9472 11.5944 16.8233 11.5944C15.6994 11.5944 14.6203 11.1536 13.818 10.3665C13.23 9.75286 12.8283 8.98485 12.6597 8.15183C12.4911 7.31882 12.5624 6.45505 12.8655 5.66102C13.0673 5.12062 13.3802 4.62858 13.784 4.21671C14.1879 3.80485 14.6737 3.48233 15.21 3.27002C15.7192 3.05688 16.266 2.94774 16.818 2.94902H17.199L14.4735 5.75852V6.80252L17.316 9.63152H18.306L21.0765 6.90752V7.29452ZM4.86001 10.032H7.15651L8.21401 11.1075L9.23101 10.0965L8.23351 9.07952V9.01502L8.31901 6.54152L7.98901 5.88602L3.69901 3.06302L2.81251 3.16202L1.56601 4.43552L1.46701 5.33402L4.22401 9.71102L4.86001 10.0335V10.032ZM3.44251 4.58402L6.91351 6.87002L6.85501 8.55452H5.24101L3.00301 5.01152L3.44251 4.58402ZM14.1 15.024L15.111 14.0145L19.77 18.792C20.1624 19.2045 20.3813 19.752 20.3813 20.3213C20.3813 20.8906 20.1624 21.4381 19.77 21.8505C19.4749 22.1535 19.0955 22.3605 18.6811 22.4448C18.2667 22.5291 17.8365 22.4866 17.4465 22.323C17.1976 22.2126 16.9744 22.0517 16.791 21.8505L12.078 17.046L13.0965 16.029L17.7945 20.82C17.8577 20.8897 17.9363 20.9436 18.024 20.9775C18.1967 21.0476 18.3899 21.0476 18.5625 20.9775C18.6502 20.9436 18.7288 20.8897 18.792 20.82C18.8577 20.755 18.9088 20.6768 18.942 20.5905C18.9764 20.5025 18.9947 20.409 18.996 20.3145C18.9945 20.2202 18.9767 20.1268 18.9435 20.0385C18.9103 19.9523 18.8592 19.8741 18.7935 19.809L14.1 15.024Z`,fill:`currentColor`})}),I=e=>(0,O.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,O.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 13.0605L17.469 18.531L18.531 17.4705L13.0605 12L18.531 6.53099L17.4705 5.46899L12 10.9395L6.53099 5.46899L5.47049 6.53099L10.9395 12L5.47049 17.469L6.53099 18.531L12 13.0605Z`,fill:`currentColor`})}),L=e=>(0,O.jsx)(`svg`,{height:24,viewBox:`0 0 24 24`,width:24,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,O.jsx)(`path`,{fill:`currentColor`,d:`m22 18-5 4-8-3v3l-4.19-5.75 12.91 1.05v-10.96l4.28-.69zm-17.19-1.75v-7.29l12.91-2.62-7.12-4.34v2.84l-6.63 1.92-1.97 2.62v5.69z`})}),R=e=>(0,O.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,O.jsx)(`path`,{d:`M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM7.79289 7.79289C8.18342 7.40237 8.81658 7.40237 9.20711 7.79289L12 10.5858L14.7929 7.79289C15.1834 7.40237 15.8166 7.40237 16.2071 7.79289C16.5976 8.18342 16.5976 8.81658 16.2071 9.20711L13.4142 12L16.2071 14.7929C16.5976 15.1834 16.5976 15.8166 16.2071 16.2071C15.8166 16.5976 15.1834 16.5976 14.7929 16.2071L12 13.4142L9.20711 16.2071C8.81658 16.5976 8.18342 16.5976 7.79289 16.2071C7.40237 15.8166 7.40237 15.1834 7.79289 14.7929L10.5858 12L7.79289 9.20711C7.40237 8.81658 7.40237 8.18342 7.79289 7.79289Z`,fill:`currentColor`})}),z=()=>{let{trackDownloadTrajectoryButtonClicked:e}=oe(),{t}=u(`openhands`);return c({mutationKey:[`conversations`,`download`],mutationFn:async t=>{e(),g(await w.downloadConversation(t),`conversation_${t}.zip`)},onError:()=>{f(t(d.CONVERSATION$DOWNLOAD_ERROR))}})},B=e=>(0,O.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,O.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M21 15V2.25L20.25 1.5H5.60999C5.26596 1.50381 4.92547 1.56987 4.60499 1.695C4.28194 1.83856 3.99081 2.0452 3.74868 2.30278C3.50656 2.56036 3.31831 2.8637 3.19499 3.195C3.07229 3.49004 3.00614 3.80552 2.99999 4.125V18.375C2.99638 18.7197 3.06272 19.0616 3.19499 19.38C3.46049 20.0205 3.96749 20.532 4.60499 20.805C4.92547 20.9301 5.26596 20.9962 5.60999 21H5.99999V19.5H5.60999C5.46032 19.5005 5.31218 19.4698 5.17499 19.41C4.90342 19.2974 4.68763 19.0816 4.57499 18.81C4.52706 18.6699 4.50174 18.5231 4.49999 18.375V17.625C4.50174 17.4769 4.52706 17.3301 4.57499 17.19C4.68763 16.9184 4.90342 16.7026 5.17499 16.59C5.31033 16.531 5.45634 16.5004 5.60399 16.5H19.5V19.5H13.5V21H20.25L21 20.25V15ZM5.99999 15V3H19.5V15H5.99999ZM7.49999 4.5H8.99999V6H7.49999V4.5ZM7.49999 7.5H8.99999V9H7.49999V7.5ZM8.99999 10.5H7.49999V12H8.99999V10.5ZM9.74999 20.235L7.91999 22.5H7.49999V18H12V22.5H11.58L9.74999 20.235Z`,fill:`currentColor`})}),V=e=>{if(!e)return[];let t=[];for(let n of Object.keys(e))n&&t.push(n);return t},H=()=>{let{data:e,isLoading:t}=ae();return{providers:P.useMemo(()=>V(e?.provider_tokens_set),[e?.provider_tokens_set]),isLoadingSettings:t}};function U(){let e=y().backend;if(e.kind!==`cloud`)throw Error(`Cloud git call requires a cloud backend.`);return e}async function W(e){let t=U(),n=new URLSearchParams;n.set(`provider`,e.provider),n.set(`limit`,String(e.limit??100)),e.query&&n.set(`query`,e.query),e.pageId&&n.set(`page_id`,e.pageId),e.installationId&&n.set(`installation_id`,e.installationId);let r=await x({backend:t,method:`GET`,path:`/api/v1/git/repositories/search?${n.toString()}`});return{items:r?.items??[],next_page_id:r?.next_page_id??null}}async function G(e){let t=U(),n=new URLSearchParams;n.set(`provider`,e.provider),n.set(`limit`,String(e.limit??100)),e.pageId&&n.set(`page_id`,e.pageId);let r=await x({backend:t,method:`GET`,path:`/api/v1/git/installations/search?${n.toString()}`});return{items:r?.items??[],next_page_id:r?.next_page_id??null}}async function K(e){let t=U(),n=new URLSearchParams;n.set(`provider`,e.provider),n.set(`repository`,e.repository),n.set(`limit`,String(e.limit??30)),n.set(`query`,e.query??``),e.pageId&&n.set(`page_id`,e.pageId);let r=await x({backend:t,method:`GET`,path:`/api/v1/git/branches/search?${n.toString()}`});return{items:r?.items??[],next_page_id:r?.next_page_id??null}}var q=e=>e,J=()=>y().backend.kind===`cloud`,Y=e=>!e||e===`undefined`||e===`null`,X={items:[],next_page_id:null},Z={items:[],next_page_id:null},Q={items:[],next_page_id:null},$=class{static async searchGitRepositories(e,t,n=100,r,i){return Y(t)||!J()?X:W({provider:q(t),query:e||void 0,limit:n,pageId:r,installationId:i})}static async retrieveUserGitRepositories(e,t,n=30,r){return Y(e)||!J()?X:W({provider:q(e),limit:n,pageId:t,installationId:r})}static async retrieveInstallationRepositories(e,t,n,r,i=30){if(Y(e)||!J())return X;let a=n[t];return a?W({provider:q(e),installationId:a,limit:i,pageId:r}):X}static async getRepositoryBranches(e,t,n=``,r,i=30){return Y(t)||!J()?Z:K({provider:q(t),repository:e,query:n||void 0,pageId:r,limit:i})}static async searchRepositoryBranches(e,t,n,r,i=30){return Y(t)||!J()?Z:K({provider:q(t),repository:e,query:n,pageId:r,limit:i})}static async getUserInstallations(e,t,n=100){return Y(e)||!J()?Q:G({provider:q(e),pageId:t,limit:n})}static async getGitChanges(e){let t=await w.resolveConversationWorkingDir(e);return(await new C(b({workingDir:t})).gitChanges(t,{ref:`HEAD`})).map(e=>({path:e.path,status:ce(String(e.status))}))}static async getGitChangeDiff(e,t){let n=await new C(b()).gitDiff(t,{ref:`HEAD`});return{modified:n.modified??``,original:n.original??``}}},le=e=>{let{data:t}=T(),{providers:n}=H(),r=m();return l({queryKey:[`installations`,e,r.backend.id,r.orgId],queryFn:()=>$.getUserInstallations(e),enabled:t&&!!e&&n.length>0&&h(e,r.backend.kind),staleTime:1e3*60*5,gcTime:1e3*60*15})};function ue(e){let{provider:t,pageSize:n=30,enabled:r=!0}=e,{providers:a}=H(),{data:o}=le(t),s=o?.items,c=m(),l=t?h(t,c.backend.kind):!1,u=i({queryKey:[`repositories`,t,l,n,c.backend.id,c.orgId,...l?[s||[]]:[]],queryFn:async({pageParam:e})=>{if(!t)throw Error(`Provider is required`);if(l){if(!s)throw Error(`Missing installation list`);let r=e;return await $.retrieveInstallationRepositories(t,r.installationIndex,s,r.pageId??void 0,n)}let r=e;return await $.retrieveUserGitRepositories(t,r??void 0,n)},getNextPageParam:(e,t,n)=>{if(l&&s){let t=n;if(e.next_page_id)return{installationIndex:t.installationIndex,pageId:e.next_page_id};let r=t.installationIndex+1;return r<s.length?{installationIndex:r,pageId:null}:void 0}return e.next_page_id},initialPageParam:l?{installationIndex:0,pageId:null}:null,enabled:r&&(a||[]).length>0&&!!t&&(!l||Array.isArray(s)&&s.length>0),staleTime:1e3*60*5,gcTime:1e3*60*15,refetchOnWindowFocus:!1});return{data:u.data,isLoading:u.isLoading,isError:u.isError,hasNextPage:u.hasNextPage,isFetchingNextPage:u.isFetchingNextPage,fetchNextPage:u.fetchNextPage,onLoadMore:()=>{u.hasNextPage&&!u.isFetchingNextPage&&u.fetchNextPage()}}}function de(e,t,n,r=100){return l({queryKey:[`repositories`,`search`,e,t,r],queryFn:async()=>t?(await $.searchGitRepositories(e,t,r)).items:[],enabled:!!e&&!!t&&!n,staleTime:1e3*60*5,gcTime:1e3*60*15})}function fe(e,t){let[n,r]=(0,P.useState)(e);return(0,P.useEffect)(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}var pe={recentRepositories:[],lastSelectedProvider:null},me=ne()(re((e,t)=>({...pe,addRecentRepository:t=>e(e=>({recentRepositories:[t,...e.recentRepositories.filter(e=>e.id!==t.id)].slice(0,3)})),clearRecentRepositories:()=>e(()=>({recentRepositories:[]})),getRecentRepositories:()=>t().recentRepositories,setLastSelectedProvider:t=>e(()=>({lastSelectedProvider:t})),getLastSelectedProvider:()=>t().lastSelectedProvider}),{name:`home-store`,storage:ie(()=>localStorage)}));function he({gitProvider:e,className:t}){return(0,O.jsxs)(O.Fragment,{children:[e===`github`&&(0,O.jsx)(E,{size:14,className:t}),e===`gitlab`&&(0,O.jsx)(se,{size:14,className:t}),e===`bitbucket`&&(0,O.jsx)(D,{size:14,className:t}),e===`bitbucket_data_center`&&(0,O.jsx)(D,{size:14,className:t}),e===`azure_devops`&&(0,O.jsx)(L,{className:_(t,`w-[14px] h-[14px]`)})]})}export{A as _,ue as a,B as c,L as d,I as f,j as g,M as h,de as i,z as l,N as m,me as n,$ as o,F as p,fe as r,H as s,he as t,R as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{L as r,k as i}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~byh8a1g4-XNPdpuO8.js";import{r as a}from"./path-utils-BeOmjIcE.js";import{n as o}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~d1e18dtv-5Q6lQJdE.js";import{t as s}from"./useTranslation-Cgy4JA_g.js";import{t as c}from"./declaration-B9kpCaYl.js";import{A as l,k as u,n as d}from"./active-backend-context-u2tdYRgH.js";import{t as f}from"./chevron-down-CI8A6tet.js";import{t as p}from"./vendor~root-layout~home~conversation-panel~conversation-Cn2jwSga.js";import{a as m,c as h,d as g,f as _,i as v,l as y,n as b,o as x,p as S,r as C,s as w,t as T,u as E}from"./onboarding-D32kiGME.js";import{t as D}from"./search-4DHskuhE.js";import{t as O}from"./x-Cb0WAtak.js";import{t as k}from"./utils-CE0lDWtb.js";import{t as A}from"./modal-backdrop-zVwfOJZr.js";import{n as j,r as M,t as N}from"./modal-body-Dcu5McCa.js";import{r as P}from"./base-modal-CC5Pp8CF.js";import{_ as F,i as I,m as L,s as R}from"./form-control-classes-9rkU4usZ.js";import{t as z}from"./brand-button-DKPMEKcW.js";import{n as B}from"./navigation-context-DPs2G0X8.js";import{t as V}from"./styled-tooltip-DsKsFjuq.js";import{i as H,n as U,o as ee,u as te}from"./dropdown-classes-CgQ45JmQ.js";import{c as ne,n as re,s as W}from"./git-provider-icon-aQRcUVI-.js";import{t as ie}from"./conversation-store-LptbOvKa.js";import{t as G}from"./modal-close-button-CTCX4nCH.js";import{t as K}from"./use-create-conversation-D9OWYcte.js";import{r as q}from"./recommended-automations-launcher-Bk8tQ-Cn.js";import{t as ae}from"./folder-mMWFvaw0.js";import{r as J}from"./typography-YGPBGzOG.js";import{i as Y,n as oe,t as se}from"./extension-module-card-classes-9V3J9J_b.js";import{n as ce}from"./circle-plus-check-toggle-T3eAIuPQ.js";import{A as le,B as ue,F as de,L as fe,R as pe,V as me,a as he,c as ge,d as _e,f as ve,h as ye,i as be,l as xe,m as Se,n as Ce,o as we,p as Te,r as Ee,s as De,t as Oe,u as ke}from"./llm-not-configured-banner-BrU5uHto.js";import{m as Ae}from"./lesson-plan-BtrZUCuj.js";import{t as je}from"./use-plugins-marketplace-BGb-KgfD.js";var X=e(t(),1);async function Me(e){let{imagesToEmbed:t}=me(e.images,e.imagesMarkedUploadAsFile),n=await Promise.all(t.map(e=>fe(e)));Ae.getState().enqueuePendingMessage({conversationId:e.conversationId,text:e.text,content:e.text,imageUrls:n,fileUrls:[]})}var Z=n();function Ne({plugin:e,isSelected:t,isDisabled:n=!1,onToggle:r}){return(0,Z.jsxs)(`div`,{"data-testid":`plugin-picker-card-${e.name}`,className:k(`flex min-w-0 items-start justify-between gap-3 rounded-lg bg-tertiary p-4`),children:[(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsx)(`h3`,{"data-testid":`plugin-picker-name-${e.name}`,className:`truncate text-sm font-semibold text-white`,children:e.name}),(0,Z.jsx)(`p`,{className:`mt-0.5 min-w-0 truncate text-xs text-tertiary-alt`,title:e.source,children:e.source}),e.description?(0,Z.jsx)(`p`,{className:`mt-1 line-clamp-2 text-xs text-tertiary-light`,children:e.description}):null,e.repo_path||e.ref?(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[e.repo_path?(0,Z.jsx)(`span`,{className:Y,children:e.repo_path}):null,e.ref?(0,Z.jsxs)(`span`,{className:Y,children:[`@`,e.ref]}):null]}):null]}),(0,Z.jsx)(ce,{testId:`plugin-picker-toggle-${e.name}`,isSelected:t,isDisabled:n,onToggle:r,enableLabelKey:c.BUTTON$ADD,disableLabelKey:c.COMMON$REMOVE,enableTooltipKey:c.BUTTON$ADD,disableTooltipKey:c.COMMON$REMOVE})]})}function Q(e){return[e.source,e.ref??``,e.repo_path??``].join(`\0`)}function Pe(e){return{source:e.source,ref:e.ref??null,repo_path:e.repo_path??null}}function Fe(e,t){let n=Q(t);return e.some(e=>Q(e)===n)}function Ie(e,t){let n=Q(t);return e.some(e=>Q(e)===n)?e.filter(e=>Q(e)!==n):[...e,Pe(t)]}function Le(e,t){let n=t.trim().toLowerCase();return n?[e.name,e.description,e.source,e.repo_path,e.ref].filter(e=>typeof e==`string`&&e.length>0).some(e=>e.toLowerCase().includes(n)):!0}function Re({selected:e,onChange:t,disabled:n=!1}){let{t:r}=s(`openhands`),{data:i,isLoading:a,isError:o}=je(),[l,u]=(0,X.useState)(``),d=(i??[]).filter(e=>Le(e,l));return(0,Z.jsxs)(`div`,{"data-testid":`plugin-picker`,className:`flex w-full flex-col gap-3`,children:[(0,Z.jsxs)(`div`,{className:k(`relative flex min-w-0 items-center`,`rounded-lg border border-[var(--oh-border)] bg-base-secondary`,`transition-colors focus-within:border-white/40 focus-within:ring-1 focus-within:ring-white/20`),children:[(0,Z.jsx)(D,{className:`ml-3 h-4 w-4 shrink-0 text-tertiary-alt`,"aria-hidden":!0}),(0,Z.jsx)(`input`,{"data-testid":`plugin-picker-search-input`,type:`search`,value:l,onChange:e=>u(e.target.value),placeholder:r(c.PLUGINS$PICKER_SEARCH_PLACEHOLDER),"aria-label":r(c.PLUGINS$PICKER_SEARCH_PLACEHOLDER),className:k(`min-w-0 flex-1 border-0 bg-transparent outline-none`,`px-3 py-2 text-sm placeholder:text-tertiary-alt`,`[&::-webkit-search-cancel-button]:hidden`)}),l?(0,Z.jsx)(`button`,{type:`button`,onClick:()=>u(``),"aria-label":r(c.MCP$SEARCH_CLEAR),className:`mr-2 cursor-pointer rounded p-1 text-tertiary-alt hover:text-white`,children:(0,Z.jsx)(O,{className:`h-4 w-4`,"aria-hidden":!0})}):null]}),a?(0,Z.jsx)(`p`,{"data-testid":`plugin-picker-loading`,className:`py-8 text-center text-sm text-tertiary-light`,children:r(c.PLUGINS$PICKER_LOADING)}):o?(0,Z.jsx)(`p`,{"data-testid":`plugin-picker-error`,className:`py-8 text-center text-sm text-tertiary-light`,children:r(c.PLUGINS$PICKER_ERROR)}):d.length===0?(0,Z.jsx)(`p`,{"data-testid":`plugin-picker-empty`,className:`py-8 text-center text-sm text-tertiary-light`,children:r(c.PLUGINS$PICKER_EMPTY)}):(0,Z.jsx)(`div`,{className:oe,children:(0,Z.jsx)(`div`,{className:se,children:d.map(r=>(0,Z.jsx)(Ne,{plugin:r,isSelected:Fe(e,r),isDisabled:n,onToggle:()=>t(Ie(e,r))},`${r.source} ${r.ref??``} ${r.repo_path??``} ${r.name}`))})})]})}function ze({selected:e,onChange:t,onClose:n}){let{t:r}=s(`openhands`);return(0,Z.jsx)(A,{onClose:n,children:(0,Z.jsxs)(`div`,{"data-testid":`plugin-picker-modal`,className:k(`relative flex max-h-[80vh] flex-col gap-4 rounded-xl border border-[var(--oh-border)] bg-base-secondary p-6`,M(`lg`),N),children:[(0,Z.jsx)(G,{onClose:n,testId:`plugin-picker-close`}),(0,Z.jsxs)(`div`,{className:`pr-6`,children:[(0,Z.jsx)(J.H2,{children:r(c.PLUGINS$PICKER_TITLE)}),(0,Z.jsx)(J.Text,{className:`mt-1 block text-sm text-tertiary-light`,children:r(c.PLUGINS$PICKER_SUBTITLE)})]}),(0,Z.jsx)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar`,children:(0,Z.jsx)(Re,{selected:e,onChange:t})}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-between border-t border-[var(--oh-border-subtle)] pt-4`,children:[(0,Z.jsx)(J.Text,{className:`text-sm text-tertiary-light`,children:r(c.PLUGINS$PICKER_SELECTED_COUNT,{count:e.length})}),(0,Z.jsx)(z,{testId:`plugin-picker-done`,type:`button`,variant:`primary`,onClick:n,className:`px-4`,children:r(c.PLUGINS$PICKER_DONE)})]})]})})}function Be({count:e,onClick:t,disabled:n=!1}){let{t:r}=s(`openhands`);return(0,Z.jsxs)(`button`,{type:`button`,"data-testid":`open-plugin-picker`,onClick:t,disabled:n,className:k(`flex flex-row items-center gap-2 rounded-full px-2.5 py-1 text-white`,I,L,F,n?`cursor-not-allowed opacity-50`:`cursor-pointer hover:bg-surface-raised`),children:[(0,Z.jsx)(`span`,{className:`flex h-4 w-4 shrink-0 items-center justify-center`,children:(0,Z.jsx)(le,{width:16,height:16,className:`shrink-0`,"aria-hidden":!0})}),(0,Z.jsx)(`span`,{className:`text-sm font-normal leading-5`,children:r(c.PLUGINS$PICKER_TRIGGER)}),e>0?(0,Z.jsx)(`span`,{"data-testid":`plugin-picker-count`,className:`inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-white px-1 text-[11px] font-semibold leading-none text-black`,children:e}):null]})}function Ve(){let{t:e}=s(`openhands`);return(0,Z.jsx)(`div`,{className:`flex min-h-[80px] w-full items-center justify-center py-2`,children:(0,Z.jsx)(J.H1,{className:`w-full text-center leading-normal`,children:e(c.HOME$LETS_START_BUILDING)})})}function He({kind:e,onClick:t,disabled:n=!1,disabledTooltip:r}){let{t:i}=s(`openhands`),o=e===`local`,l=i(o?c.HOME$OPEN_WORKSPACE:c.COMMON$OPEN_REPOSITORY),u=(0,Z.jsxs)(`button`,{type:`button`,"data-testid":o?`open-workspace-button`:`open-repository-button`,onClick:t,disabled:n,className:k(`flex flex-row items-center gap-2 rounded-full px-2.5 py-1 text-white`,I,L,F,n?`cursor-not-allowed opacity-50`:`cursor-pointer hover:bg-surface-raised`),children:[(0,Z.jsx)(`span`,{className:`flex h-4 w-4 shrink-0 items-center justify-center`,children:o?(0,Z.jsx)(S,{"aria-hidden":!0,className:`h-4 w-4`,strokeWidth:2}):(0,Z.jsx)(a,{width:16,height:16,className:`shrink-0`})}),(0,Z.jsx)(`span`,{className:`text-sm font-normal leading-5`,children:l})]});return r?(0,Z.jsx)(V,{content:r,placement:`top`,children:(0,Z.jsx)(`span`,{className:`inline-flex`,children:u})}):u}function Ue({workspaces:e,value:t,placeholder:n,className:r,disabled:i=!1,disabledTooltip:a,showManage:o,onChange:l,onAddClick:u,onManageClick:d}){let{t:f}=s(`openhands`),[m,h]=(0,X.useState)(t?.name??``),g=(0,X.useRef)(null),_=(0,X.useMemo)(()=>{let t=m.trim().toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)||e.path.toLowerCase().includes(t)):e},[e,m]),v=(0,X.useCallback)(e=>{l(e),e&&h(e.name)},[l]),y=(0,X.useCallback)(()=>{v(null),h(``)},[v]),{isOpen:b,getToggleButtonProps:x,getMenuProps:S,getInputProps:C,highlightedIndex:w,getItemProps:T,selectedItem:E,closeMenu:D}=p({items:_,itemToString:e=>e?.name??``,selectedItem:t,onSelectedItemChange:({selectedItem:e})=>{v(e??null)},inputValue:m,onIsOpenChange:({isOpen:e,selectedItem:t})=>{h(e?``:t?.name??``)},stateReducer:(e,t)=>t.type===p.stateChangeTypes.InputClick&&e.isOpen?{...t.changes,isOpen:!0}:t.changes}),O=(e,t,n,r,i)=>(0,Z.jsx)(xe,{item:e,index:t,isSelected:r?.id===e.id,getItemProps:i,getDisplayText:e=>e.name,getItemKey:e=>e.id},e.id),A=e=>(0,Z.jsx)(ge,{inputValue:e,searchMessage:f(c.HOME$NO_WORKSPACES),emptyMessage:f(c.HOME$NO_WORKSPACES),testId:`workspace-dropdown-empty`}),j=(0,X.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),M=(0,X.useCallback)(e=>{j(e),D(),u()},[D,u,j]),N=(0,X.useCallback)(e=>{j(e),D(),u()},[D,u,j]),P=(0,X.useCallback)(e=>{j(e),D(),d()},[D,d,j]),F=(0,X.useCallback)(e=>{j(e),D(),d()},[D,d,j]),I=(0,X.useMemo)(()=>(0,Z.jsxs)(`div`,{className:H,children:[(0,Z.jsx)(`button`,{type:`button`,"data-testid":`add-workspaces-button`,className:k(U,`cursor-pointer`),onMouseDown:j,onTouchStart:j,onTouchEnd:N,onClick:M,children:f(c.HOME$ADD_WORKSPACES)}),(o??e.length>0)&&(0,Z.jsx)(`button`,{type:`button`,"data-testid":`manage-workspaces-button`,className:k(U,`cursor-pointer`),onMouseDown:j,onTouchStart:j,onTouchEnd:F,onClick:P,children:f(c.HOME$MANAGE_WORKSPACES)})]}),[M,N,P,F,j,f,e.length,o]),L=(0,Z.jsxs)(`div`,{className:k(`relative`,r),children:[(0,Z.jsxs)(`div`,{className:`group relative text-[var(--oh-muted)] hover:text-white`,children:[(0,Z.jsx)(`div`,{className:`absolute left-2 top-1/2 transform -translate-y-1/2 z-10`,children:(0,Z.jsx)(ne,{width:16,height:16})}),(0,Z.jsx)(`input`,{...C({disabled:i,placeholder:b&&t?t.name:n??f(c.HOME$WORKSPACE_PLACEHOLDER),className:k(R,`text-inherit shadow-none pl-7 pr-16 text-sm font-normal leading-5`,`placeholder:text-[var(--oh-muted)]`,`disabled:cursor-not-allowed disabled:opacity-60`),onChange:e=>{h(e.target.value)}}),"data-testid":`workspace-dropdown`}),(0,Z.jsxs)(`div`,{className:`absolute right-1 top-1/2 transform -translate-y-1/2 flex items-center`,children:[t&&(0,Z.jsx)(_e,{disabled:i,onClear:y}),(0,Z.jsx)(ke,{isOpen:b,disabled:i,getToggleButtonProps:x})]})]}),(0,Z.jsx)(De,{isOpen:b,filteredItems:_,inputValue:m,highlightedIndex:w,selectedItem:E,getMenuProps:S,getItemProps:T,menuRef:g,renderItem:O,renderEmptyState:A,stickyFooterItem:I,testId:`workspace-dropdown-menu`,itemKey:e=>e.id})]});return a?(0,Z.jsx)(V,{content:a,placement:`top`,children:(0,Z.jsx)(`span`,{className:`block`,children:L})}):L}var $=`oh:home-selected-workspace-path`;function We(){if(typeof window>`u`)return null;try{let e=window.sessionStorage.getItem($);return e&&e.length>0?e:null}catch{return null}}function Ge(e){if(!(typeof window>`u`))try{e?window.sessionStorage.setItem($,e):window.sessionStorage.removeItem($)}catch{}}function Ke({isLoadingSettings:e=!1,onConfirm:t}){let{t:n}=s(`openhands`),{navigate:r}=B(),{data:i,error:a}=w(),o=i?.workspaceParents??[],{mutate:l}=y(),{mutate:u}=E(),{mutate:d}=h(),{mutate:f}=g(),{workspaces:p,isLoading:_,isError:b,error:S}=x(),T=m(a??S,n),[D,O]=X.useState(null),[k,A]=X.useState(!1),[j,M]=X.useState(!1),{mutate:N,isPending:P,isSuccess:F}=K(),I=q(),L=P||F||I,R=X.useCallback(e=>{O(e),Ge(e?.path??null)},[]);X.useEffect(()=>{let e=We();if(!e)return;let t=p.find(t=>t.path===e);if(t){O(e=>e?.path===t.path?e:t);return}!_&&!b&&!T&&(Ge(null),O(t=>t?.path===e?null:t))},[b,_,p,T]);let V=o.length>0||!!T,H=null;T?H=T:_?H=n(c.HOME$LOADING):b&&(H=n(c.HOME$WORKSPACE_SCAN_ERROR));let U=!!T||e||_&&p.length===0;return(0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[!t&&(0,Z.jsxs)(`div`,{className:`flex items-center gap-[10px] pb-4`,children:[(0,Z.jsx)(ae,{width:24,height:24}),(0,Z.jsx)(`span`,{className:`leading-5 font-bold text-base text-white`,children:n(c.HOME$WORKSPACES_TAB)})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-[10px] pb-4`,children:[(0,Z.jsx)(Ue,{workspaces:p,value:D,placeholder:T?n(c.HOME$WORKSPACES_UNSUPPORTED_PLACEHOLDER):U?n(c.HOME$LOADING):void 0,disabled:U,disabledTooltip:T,showManage:p.length>0||o.length>0,onChange:R,onAddClick:()=>A(!0),onManageClick:()=>M(!0),className:`max-w-auto`},D?.path??`empty-workspace-selection`),V&&H&&(0,Z.jsx)(`p`,{className:`px-1 text-xs text-[var(--oh-text-secondary)]`,"data-testid":`workspace-status-message`,children:H})]}),(0,Z.jsx)(z,{testId:`workspace-launch-button`,variant:`primary`,type:`button`,isDisabled:!D||!t&&L||e,onClick:()=>{if(D){if(t){t(D);return}N({workingDir:D.path,entryPoint:`home_workspace_form`},{onSuccess:e=>r(`/conversations/${e.conversation_id}`)})}},className:t?`w-full`:`w-auto absolute bottom-5 left-5 right-5`,children:n(t?c.BUTTON$CONFIRM:L?c.HOME$LOADING:c.BUTTON$LAUNCH)}),(0,Z.jsx)(v,{isOpen:k,onClose:()=>A(!1),onAdd:e=>{let t=e[e.length-1];l(e,{onSuccess:()=>{t&&R(t)}})},onAddParent:e=>d(e)}),(0,Z.jsx)(C,{isOpen:j,workspaces:p,workspaceParents:o,onClose:()=>M(!1),onRemove:e=>{D?.path===e&&R(null),u(e)},onRemoveParent:e=>{D?.parentPath===e&&R(null),f(e)}})]})}function qe({isOpen:e,onClose:t,onConfirm:n}){let{t:r}=s(`openhands`),{isLoadingSettings:i}=W();return e?(0,Z.jsx)(A,{onClose:t,children:(0,Z.jsxs)(j,{width:`sm`,className:`relative items-start border border-[var(--oh-border)] !gap-4`,children:[(0,Z.jsx)(G,{onClose:t,testId:`close-open-workspace-dialog`}),(0,Z.jsx)(`div`,{className:`w-full pr-6`,children:(0,Z.jsx)(P,{title:r(c.HOME$OPEN_WORKSPACE)})}),(0,Z.jsx)(`div`,{className:`w-full`,"data-testid":`open-workspace-dialog-body`,children:(0,Z.jsx)(Ke,{isLoadingSettings:i,onConfirm:e=>{n(e),t()}})})]})}):null}function Je({onRepoSelection:e,isLoadingSettings:t=!1,onConfirm:n}){let{navigate:r}=B(),[i,o]=X.useState(null),[l,u]=X.useState(null),[d,f]=X.useState(null),{providers:p}=W(),{addRecentRepository:m,setLastSelectedProvider:h,getLastSelectedProvider:g}=re(),{mutate:_,isPending:v,isSuccess:y}=K(),b=q(),{t:x}=s(`openhands`);X.useEffect(()=>{if(p.length!==0){if(p.length===1&&!d){f(p[0]);return}if(p.length>1&&!d){let e=g();e&&p.includes(e)&&f(e)}}},[p,d,g]);let S=v||y||b,C=t=>{t!==d&&(f(t),h(t),o(null),u(null),e?.(null))},w=X.useCallback(e=>{u(e)},[]);return(0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[!n&&(0,Z.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,Z.jsxs)(`div`,{className:`flex items-center gap-[10px] pb-4`,children:[(0,Z.jsx)(a,{width:24,height:24}),(0,Z.jsx)(`span`,{className:`leading-5 font-bold text-base text-white`,children:x(c.COMMON$OPEN_REPOSITORY)})]})}),(0,Z.jsxs)(`div`,{className:`flex flex-col gap-[10px] pb-4`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Z.jsx)(`span`,{className:`text-sm text-white font-normal leading-[22px]`,children:x(c.HOME$SELECT_OR_INSERT_URL)}),p.length<=1?null:(0,Z.jsx)(we,{providers:p,value:d,className:`max-w-[500px]`,onChange:C,disabled:t})]}),(0,Z.jsx)(be,{provider:d||p[0],value:i?.id||null,repositoryName:i?.full_name||null,placeholder:`user/repo`,disabled:!d||t,onChange:t=>{t?(e?.(t),o(t)):(e?.(null),o(null),u(null))},className:`max-w-auto`}),(()=>{let e=i?.main_branch||null;return(0,Z.jsx)(he,{repository:i?.full_name||null,provider:d||p[0],selectedBranch:l,onBranchSelect:w,defaultBranch:e,className:`max-w-full`,disabled:!i||t})})()]}),(0,Z.jsx)(z,{testId:`repo-launch-button`,variant:`primary`,type:`button`,isDisabled:!i||!l||!n&&S||p.length>1&&!d||t,onClick:()=>{if(!(!i||!l)){if(m(i),n){n({repository:i,branch:l,provider:d});return}_({repository:{name:i.full_name||``,gitProvider:i.git_provider||`github`,branch:l.name||`main`},entryPoint:`home_repo_form`},{onSuccess:e=>r(`/conversations/${e.conversation_id}`)})}},className:`w-full`,children:x(n?c.BUTTON$CONFIRM:S?c.HOME$LOADING:c.BUTTON$LAUNCH)})]})}function Ye({isOpen:e,onClose:t,onConfirm:n}){let{t:r}=s(`openhands`),{isLoadingSettings:i}=W();return e?(0,Z.jsx)(A,{onClose:t,children:(0,Z.jsxs)(j,{width:`sm`,className:`relative items-start border border-[var(--oh-border)] !gap-4`,children:[(0,Z.jsx)(G,{onClose:t,testId:`close-open-repository-dialog`}),(0,Z.jsx)(`div`,{className:`w-full pr-6`,children:(0,Z.jsx)(P,{title:r(c.COMMON$OPEN_REPOSITORY)})}),(0,Z.jsx)(`div`,{className:`w-full`,"data-testid":`open-repository-dialog-body`,children:(0,Z.jsx)(Je,{isLoadingSettings:i,onConfirm:e=>{n(e),t()}})})]})}):null}function Xe(e,t){return e===`new_worktree`?c.COMMON$WORKSPACE_MODE_NEW_WORKTREE:t===`cloud`?c.COMMON$WORKSPACE_MODE_CLOUD_REPO:c.COMMON$WORKSPACE_MODE_LOCAL_REPO}function Ze({mode:e}){return e===`new_worktree`?(0,Z.jsx)(_,{className:`size-3`,strokeWidth:2,"aria-hidden":!0}):(0,Z.jsx)(a,{width:12,height:12,color:`white`,"aria-hidden":!0})}var Qe=[`local_repo`,`new_worktree`];function $e({value:e,backendKind:t,onChange:n,disabled:r=!1,testId:i=`workspace-mode-selector`}){let{t:a}=s(`openhands`),[o,c]=(0,X.useState)(!1),l=(0,X.useRef)(null),u=a(Xe(e,t));return(0,X.useEffect)(()=>{if(!o)return;let e=e=>{l.current&&!l.current.contains(e.target)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[o]),(0,X.useEffect)(()=>{if(!o)return;let e=e=>{e.key===`Escape`&&c(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[o]),(0,Z.jsxs)(`div`,{ref:l,className:`relative inline-flex`,children:[(0,Z.jsxs)(`button`,{type:`button`,"data-testid":i,"aria-haspopup":`menu`,"aria-expanded":o,"aria-label":u,disabled:r,onClick:()=>c(e=>!e),className:k(`group flex flex-row items-center justify-between gap-2 pl-2.5 pr-2 py-1 rounded-[100px] truncate relative`,`border border-[rgba(71,74,84,0.50)] bg-transparent text-white`,r?`cursor-not-allowed opacity-50`:`cursor-pointer hover:border-[var(--oh-border-subtle)]`),children:[(0,Z.jsx)(`span`,{className:`flex size-3 shrink-0 items-center justify-center`,children:(0,Z.jsx)(Ze,{mode:e})}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-normal leading-5`,children:u}),(0,Z.jsx)(f,{className:`size-3 shrink-0 text-white`,"aria-hidden":!0})]}),o?(0,Z.jsx)(`div`,{role:`menu`,"data-testid":`${i}-menu`,className:k(`absolute left-0 top-full z-50 mt-1 min-w-[180px] rounded-lg border border-[var(--oh-border)] bg-[var(--oh-surface)] p-1 shadow-lg`,H),children:Qe.map(r=>{let o=a(Xe(r,t));return(0,Z.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":r===e,"data-testid":`${i}-option-${r}`,onClick:()=>{n(r),c(!1)},className:ee,children:[(0,Z.jsx)(`span`,{className:te,children:(0,Z.jsx)(Ze,{mode:r})}),(0,Z.jsx)(`span`,{className:`truncate`,children:o})]},r)})}):null]})}function et({workspace:e,repository:t,branch:n,provider:r,workspaceMode:i,backendKind:a,onRepoClick:o,onWorkspaceModeChange:s}){let c=e?e.path.replace(/\/+$/,``).split(`/`).pop()||e.path:null;return(0,Z.jsxs)(`div`,{className:`flex flex-row gap-2.5 items-center flex-wrap`,"data-testid":`home-git-control-bar-preview`,children:[(0,Z.jsx)(Ee,{selectedRepository:t?.full_name??null,gitProvider:r??null,workspaceName:c,onClick:o}),e?(0,Z.jsx)($e,{value:i,backendKind:a,onChange:s}):null,n?(0,Z.jsx)(Ce,{selectedBranch:n.name,selectedRepository:t?.full_name??null,gitProvider:r??null}):null]})}function tt(){let{t:e}=s(`openhands`),{backend:t}=d(),{navigate:n}=B(),r=t.kind===`local`,[i,a]=(0,X.useState)(!1),[f,p]=(0,X.useState)(null),[h,g]=(0,X.useState)(null),[_,v]=(0,X.useState)(null),[y,b]=(0,X.useState)(null),[x,S]=(0,X.useState)(`local_repo`),[C,T]=(0,X.useState)([]),[E,D]=(0,X.useState)(!1),{mutateAsync:O,isPending:k}=K(),A=q(),j=k||A,{isConfigured:M,isLoading:N}=Te(),P=!N&&!M,{images:F,files:I,imagesMarkedUploadAsFile:L,clearAllFiles:R}=ie(),{handleUpload:z}=ve(),{error:V}=w({enabled:r}),H=r?m(V,e):null,U=r?!!f:!!h&&!!_,ee=Se(null,t=>{let i=t.trim(),a=F.length>0||I.length>0;if(!i&&!a||j||P)return;let s={images:[...F],files:[...I]},d={query:a?void 0:i||void 0,entryPoint:`home_chat_launcher`};r&&f?d={...d,workingDir:f.path,workspaceMode:x}:!r&&h&&_&&(d={...d,repository:{name:h.full_name,gitProvider:h.git_provider,branch:_.name}}),C.length>0&&(d={...d,plugins:C});let p=o.loading(e(c.HOME$CREATING_CONVERSATION),u);(async()=>{try{let t=await O(d);o.dismiss(p);try{sessionStorage.removeItem(ue)}catch{}let c=t.conversation_id,u=c.startsWith(`task-`);if(a)if(!r||u){let e=t.task_id??(u?c.slice(5):null);if(!e){l(null);return}pe(e,{content:i,images:s.images,files:s.files,imagesMarkedUploadAsFile:[...L]}),R(),await Me({conversationId:c,text:i,images:s.images,imagesMarkedUploadAsFile:L}),n(`/conversations/${c}`);return}else try{await de({conversationId:c,content:i,images:s.images,files:s.files,imagesMarkedUploadAsFile:L,t:e}),R()}catch(e){l(e instanceof Error?e.message:null);return}u&&i&&await Me({conversationId:c,text:i,images:[],imagesMarkedUploadAsFile:[]}),n(`/conversations/${c}`)}catch(e){o.dismiss(p),l(e instanceof Error?e.message:null)}})()});return(0,Z.jsxs)(`div`,{"data-testid":`home-chat-launcher`,className:`flex w-full max-w-[800px] flex-col gap-4 md:px-4`,children:[(0,Z.jsx)(`div`,{className:`flex w-full justify-center`,children:(0,Z.jsx)(Ve,{})}),(0,Z.jsx)(`div`,{className:`w-full`,children:(0,Z.jsx)(ye,{onSubmit:ee,onFilesPaste:z,disabled:j||P})}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-start gap-2`,children:[U?(0,Z.jsx)(et,{workspace:f,repository:h,branch:_,provider:y,workspaceMode:x,backendKind:t.kind,onRepoClick:()=>a(!0),onWorkspaceModeChange:S}):(0,Z.jsx)(He,{kind:r?`local`:`cloud`,onClick:()=>a(!0),disabled:j||!!H,disabledTooltip:H}),(0,Z.jsx)(Be,{count:C.length,onClick:()=>D(!0),disabled:j})]}),r?(0,Z.jsx)(qe,{isOpen:i,onClose:()=>a(!1),onConfirm:e=>{p(e),g(null),v(null),b(null),S(`local_repo`)}}):(0,Z.jsx)(Ye,{isOpen:i,onClose:()=>a(!1),onConfirm:({repository:e,branch:t,provider:n})=>{g(e),v(t),b(n??e.git_provider),p(null),S(`local_repo`)}}),E&&(0,Z.jsx)(ze,{selected:C,onChange:T,onClose:()=>D(!1)})]})}function nt(){let e=b(i().search);return(0,Z.jsxs)(`div`,{"data-testid":`home-screen`,className:`custom-scrollbar-always flex h-full flex-col overflow-y-auto rounded-xl bg-transparent px-4 md:px-0 lg:px-[42px]`,children:[(0,Z.jsx)(`div`,{className:`md:px-4 lg:px-0`,children:(0,Z.jsx)(Oe,{})}),(0,Z.jsx)(`div`,{className:`flex flex-1 min-h-0 flex-col items-center justify-center`,children:(0,Z.jsx)(tt,{})}),e?null:(0,Z.jsx)(T,{})]})}var rt=r(nt);export{rt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t}from"./vendor-styling-CI0PQ3ab.js";var n=e(t(),1),r={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i=n.createContext&&n.createContext(r),a=[`attr`,`size`,`title`];function o(e,t){if(e==null)return{};var n,r,i=s(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function s(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(null,arguments)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?l(Object(n),!0).forEach(function(t){d(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){var t=p(e,`string`);return typeof t==`symbol`?t:t+``}function p(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function m(e){return e&&e.map((e,t)=>n.createElement(e.tag,u({key:t},e.attr),m(e.child)))}function h(e){return t=>n.createElement(g,c({attr:u({},e.attr)},t),m(e.child))}function g(e){var t=t=>{var{attr:r,size:i,title:s}=e,l=o(e,a),d=i||t.size||`1em`,f;return t.className&&(f=t.className),e.className&&(f=(f?f+` `:``)+e.className),n.createElement(`svg`,c({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,r,l,{className:f,style:u(u({color:e.color||t.color},t.style),e.style),height:d,width:d,xmlns:`http://www.w3.org/2000/svg`}),s&&n.createElement(`title`,null,s),e.children)};return i===void 0?t(r):n.createElement(i.Consumer,null,e=>t(e))}export{h as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e,L as t}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~byh8a1g4-XNPdpuO8.js";var n=()=>e(`/conversations`),r=t(function(){return null});export{n as clientLoader,r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~i3v2mlbw-BrJQ3XZH.js";import{t as i}from"./useMutation-DCE9RcgK.js";import{t as a}from"./useTranslation-Cgy4JA_g.js";import{t as o}from"./declaration-B9kpCaYl.js";import{c as s}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~ncdxw0bh-ClHnt5lR.js";import{A as c,N as l,f as u,j as d}from"./active-backend-context-u2tdYRgH.js";import{t as f}from"./bot-D7eUAuSB.js";import{t as p}from"./utils-CE0lDWtb.js";import{c as m,d as h,n as g}from"./agent-server-client-options-DVLRd9sw.js";import{t as ee}from"./modal-backdrop-zVwfOJZr.js";import{n as te}from"./modal-classes-DPqxSyuP.js";import{t as ne}from"./brand-button-DKPMEKcW.js";import{t as _}from"./styled-tooltip-DsKsFjuq.js";import{t as re}from"./modal-close-button-CTCX4nCH.js";import{t as v}from"./settings-input-DYs7t3oK.js";import{a as y,c as b,d as ie,i as x,o as S,r as C,s as w,t as T}from"./settings-service.api-DldkFI1x.js";import{r as E}from"./use-settings-dX4fKUPF.js";import{t as ae}from"./v4-DbCkTSoU.js";import{t as D}from"./secrets-service-CZYjNxFw.js";import{t as O}from"./vendor~root-layout~home~mcp~automations-list~onboarding-modal-CXyYYvYh.js";function k(e){return[...e.sse_servers.map((e,t)=>({id:`sse-${t}`,type:`sse`,name:typeof e==`object`?e.name:void 0,url:typeof e==`string`?e:e.url,headers:typeof e==`object`?e.headers:void 0,auth:typeof e==`object`?e.auth:void 0})),...e.stdio_servers.map((e,t)=>({id:`stdio-${t}`,type:`stdio`,name:e.name,command:e.command,args:e.args,env:e.env})),...e.shttp_servers.map((e,t)=>({id:`shttp-${t}`,type:`shttp`,name:typeof e==`object`?e.name:void 0,url:typeof e==`string`?e:e.url,headers:typeof e==`object`?e.headers:void 0,timeout:typeof e==`object`?e.timeout:void 0,auth:typeof e==`object`?e.auth:void 0}))]}var A=e(t()),j=n();function M(e){return e.connectionOptions.filter(e=>e.provider===`mcp`&&!!e.transport)}function N(e){return M(e)[0]}function oe(e){if(e.auth.strategy!==`oauth2`)return!0;let t=e.auth.oauth;return t?!t.authorizationUrl&&!t.tokenUrl&&!t.registrationUrl&&!t.additionalAuthorizationParams&&!t.additionalTokenParams:!1}function se(e){return M(e).find(oe)}function P(e){return N(e)?.transport}function ce(e){switch(e){case`none`:return`none`;case`body`:return`client_secret_post`;case`basic`:return`client_secret_basic`;default:return}}function le(e){if(e.auth.strategy!==`oauth2`)return;let t={type:`oauth`},n=ce(e.auth.oauth?.clientAuthentication);return n&&(t.client_auth_method=n),e.auth.oauth?.scopes?.length&&(t.scopes=e.auth.oauth.scopes),Object.keys(t).length>1?t:void 0}function F(e){return e.filter(e=>!!N(e))}var I=e=>{try{return new URL(e)}catch{return null}};function L(e,t){let n=typeof e==`string`?e:``,r=typeof t==`string`?t:``;if(!n||!r)return!1;let i=I(n),a=I(r);return!i||!a?n.replace(/\/+$/,``)===r.replace(/\/+$/,``):i.protocol===a.protocol&&i.host===a.host&&i.pathname.replace(/\/+$/,``)===a.pathname.replace(/\/+$/,``)}function ue(e,t){return t.find(t=>R(e,t))??null}function de(e,t){for(let n of M(e)){let e=ue(n.transport,t);if(e)return e}return null}function R(e,t){if(e.kind===`shttp`){let n=e.url;return t.type===`shttp`&&!!t.url&&L(t.url,n)}if(e.kind===`sse`){let n=e.url;return t.type===`sse`&&!!t.url&&L(t.url,n)}return t.type===`stdio`&&t.name===e.serverName}function z(e){return e.trim().toLowerCase()}function fe(e){return e.map((e,t)=>({entry:e,index:t})).sort((e,t)=>(t.entry.popularityRank??0)-(e.entry.popularityRank??0)||e.index-t.index).map(({entry:e})=>e)}function pe(e,t){return t.find(t=>t.id===e)}function me(e,t){let n=z(t);return n?[e.name,e.description,e.id,...e.keywords??[]].join(` `).toLowerCase().includes(n):!0}function he(e,t,n){let r=z(n);return r?[e.type,`name`in e?e.name:void 0,`command`in e?e.command:void 0,`args`in e?e.args?.join(` `):void 0,`url`in e?e.url:void 0,t?.name,t?.description,t?.id,...t?.keywords??[]].filter(Boolean).join(` `).toLowerCase().includes(r):!0}function B(e,t){return t.find(t=>M(t).some(t=>R(t.transport,e)))}function V({fieldKey:e,checked:t,onToggle:n}){let{t:r}=a(`openhands`);return(0,j.jsxs)(`label`,{"data-testid":`mcp-install-save-secret-${e}`,className:p(`flex items-center gap-2 px-3 py-2 mt-0.5 rounded-lg border cursor-pointer transition-colors`,t?`border-green-500/35 bg-green-500/10`:`border-[var(--oh-border)] bg-transparent hover:bg-white/[0.03]`),children:[(0,j.jsx)(`input`,{className:`sr-only`,id:`mcp-save-secret-checkbox-${e}`,type:`checkbox`,checked:t,onChange:e=>n(e.target.checked)}),(0,j.jsx)(`span`,{"aria-hidden":`true`,className:p(`relative inline-flex h-[22px] w-[40px] shrink-0 items-center rounded-full border transition-colors duration-200`,t?`border-green-500 bg-green-500`:`border-[var(--oh-border)] bg-surface-raised`),children:(0,j.jsx)(`span`,{className:p(`inline-block size-4 rounded-full transition-transform duration-200`,t?`translate-x-[21px] bg-white`:`translate-x-[2px] bg-[var(--oh-muted)]`)})}),(0,j.jsx)(`span`,{className:`text-sm`,children:r(o.MCP$ALSO_SAVE_AS_SECRET)}),(0,j.jsx)(`code`,{className:p(`ml-auto text-[11px] font-mono tracking-tight border rounded px-1.5 py-0.5`,t?`text-green-500 border-green-500/35 bg-white/[0.04]`:`text-tertiary-alt border-[var(--oh-border)]`),children:e}),(0,j.jsx)(_,{content:r(o.MCP$SAVE_AS_SECRET_TOOLTIP),placement:`top`,children:(0,j.jsx)(`button`,{type:`button`,"aria-label":r(o.MCP$SAVE_AS_SECRET_TOOLTIP),className:`flex items-center justify-center size-[15px] shrink-0 rounded-full border border-[var(--oh-muted)] text-tertiary-alt text-[9px] font-bold cursor-help`,onClick:e=>e.preventDefault(),children:`?`})})]})}var ge=e=>(0,j.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,j.jsx)(`path`,{d:`M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z`,fill:`currentColor`})}),_e={xs:`h-4 w-4 rounded [&>svg]:h-2.5 [&>svg]:w-2.5`,sm:`h-5 w-5 rounded-md [&>svg]:h-3 [&>svg]:w-3`,md:`h-10 w-10 rounded-lg [&>svg]:h-5 [&>svg]:w-5`},ve={slack:ge};function H({entry:e,size:t=`md`,className:n,fallback:r,testId:i}){let a=e?ve[e.id]:void 0;return(0,j.jsx)(`span`,{"aria-hidden":`true`,title:e?.name,"data-testid":i,className:p(`inline-flex shrink-0 items-center justify-center overflow-hidden`,`border border-white/10 shadow-[inset_0_1px_0_rgba(255,255,255,0.18)]`,_e[t],n),style:{backgroundColor:e?.iconBg??`var(--oh-color-tertiary)`,color:e?.iconColor??`#FFFFFF`},children:a?(0,j.jsx)(a,{}):e?.logoUrl?(0,j.jsx)(`img`,{src:e.logoUrl,alt:`${e.name} logo`,className:`h-full w-full object-contain p-[22%]`,onError:e=>{let t=e.currentTarget;t.style.display=`none`}}):r??(0,j.jsx)(f,{className:`h-5 w-5`,strokeWidth:2.25})})}function U(){let e=r(),{data:t}=E();return i({mutationFn:async e=>{if(!t)return;let n=x(t.agent_settings?.mcp_config),r={sse_servers:[...n.sse_servers],stdio_servers:[...n.stdio_servers],shttp_servers:[...n.shttp_servers]};e.type===`sse`?r.sse_servers.push(S(e)):e.type===`stdio`?r.stdio_servers.push(w(e)):e.type===`shttp`&&r.shttp_servers.push(y(e)),await T.saveSettings({agent_settings_diff:{mcp_config:b(r)}})},onSuccess:()=>{e.invalidateQueries({queryKey:u.personal()})}})}var ye=new Set([`invalid_auth`,`not_authed`,`account_inactive`,`token_revoked`,`token_expired`]),be={slack:{toolCall:{name:`slack_list_channels`,arguments:{limit:1}},interpret:e=>{if(e.is_error)return e.text||`tool call failed`;try{let t=JSON.parse(e.text);if(t?.ok===!1&&ye.has(t.error))return String(t.error)}catch{}return null}}};function W(e){let t=B(e,F(O));return t?be[t.id]:void 0}var xe=[`none`,`api_key`,`bearer`,`basic`,`header`,`oauth2`],Se=e=>!!e&&typeof e==`object`&&!Array.isArray(e),Ce=e=>Se(e)&&typeof e.strategy==`string`&&xe.includes(e.strategy),G=e=>!!e&&typeof e==`object`&&!Array.isArray(e),we=e=>{if(!G(e))return;let t=Object.entries(e).filter(e=>typeof e[1]==`string`);return t.length>0?Object.fromEntries(t):void 0},Te=e=>!!e&&Object.values(e).some(e=>e===`**********`),Ee=(e,t)=>e===`sse`?t===`sse`:e===`shttp`?t===void 0||t===`http`||t===`shttp`||t===`streamable-http`:!1,De=e=>{if(!e)return;let t=/^stdio-(\d+)$/.exec(e);return t?Number.parseInt(t[1],10):void 0},Oe=(e,t)=>{let n=De(e);if(n!==void 0)return Object.entries(t).filter(([,e])=>!e.url)[n]?.[1]},ke=(e,t)=>e.type===`stdio`?Oe(e.id,t)??(e.name?t[e.name]:void 0):e.name&&t[e.name]?t[e.name]:Object.values(t).find(t=>t.url===e.url&&Ee(e.type,t.transport));async function Ae(e){let t=(await T.fetchSettingsFromApi(`encrypted`)).agent_settings?.mcp_config;if(G(t))return ke(e,t)}async function K(e){let t=e.type===`stdio`&&Te(e.env),n=(e.type===`sse`||e.type===`shttp`)&&C(e.auth);if(!t&&!n)return e;try{let r=await Ae(e);if(!r)return e;if(t){let t=we(r.env)??{},n=Object.fromEntries(Object.entries(e.env??{}).map(([e,n])=>[e,n===`**********`&&typeof t[e]==`string`?t[e]:n]));return{...e,env:n}}return n&&Ce(r.auth)?{...e,auth:r.auth}:e}catch{return e}}var q=120;function je(e){return e.type===`stdio`?{transport:`stdio`,command:e.command,...e.args?.length&&{args:e.args},...e.env&&Object.keys(e.env).length>0&&{env:e.env}}:{transport:e.type===`sse`?`sse`:`http`,url:e.url,...e.headers&&Object.keys(e.headers).length>0&&{headers:e.headers},...e.auth?{auth:e.auth}:{}}}function Me(e){return e.auth?.strategy===`oauth2`?q:e.timeout}async function Ne(e){let t=W(e),n=je(await K(e)),r=Me(e);return{server:n,...e.name?{name:e.name}:{},...r===void 0?{}:{timeout:r},...t?{tool_call:t.toolCall}:{}}}function Pe(){if(m().backend.kind===`local`){let{host:e,apiKey:t}=g();return{host:e,...t?{apiKey:t}:{}}}let e=h().find(e=>e.kind===`local`&&e.host);if(e)return{host:e.host.replace(/\/+$/,``),...e.apiKey?{apiKey:e.apiKey}:{}};throw Error(`OAuth authorization requires a reachable local backend.`)}function J(){let{host:e,apiKey:t}=Pe();return new s({host:e,...t?{apiKey:t}:{},timeout:q*1e3+5e3})}function Fe(e){return e.status===`succeeded`?{ok:!0,tools:e.tools??[],...e.tool_result!==void 0&&{tool_result:e.tool_result},...e.oauth_state!==void 0&&{oauth_state:e.oauth_state}}:{ok:!1,error:e.error||`OAuth authorization did not complete`,error_kind:e.error_kind||`unknown`}}var Ie=e=>new Promise(t=>{window.setTimeout(t,e)}),Y=class e{static async testServer(e){if(m().backend.kind===`cloud`)return{ok:!0,tools:[]};let t=W(e),{host:n,apiKey:r}=g(),i=new s({host:n,...r?{apiKey:r}:{}});try{let n=await Ne(e),r=await i.testServer(n);if(r.ok&&t&&r.tool_result){let e=t.interpret(r.tool_result);if(e)return{ok:!1,error:e,error_kind:`credentials`}}return r}finally{i.close()}}static async startOAuth(t){let n=J();try{return await e.startOAuthWithClient(n,t)}finally{n.close()}}static async getOAuthStatus(t){let n=J();try{return await e.getOAuthStatusWithClient(n,t)}finally{n.close()}}static async submitOAuthCallback(t,n){let r=J();try{return await e.submitOAuthCallbackWithClient(r,t,n)}finally{r.close()}}static async authorizeOAuth(t){let n=window.open(`about:blank`,`_blank`),r=J();try{let i=await e.startOAuthWithClient(r,t);if(!i.ok||!i.job_id||!i.authorization_url)return n?.close(),{ok:!1,error:i.error||`Could not start OAuth authorization`,error_kind:i.error_kind||`unknown`};let a=await e.getOAuthStatusWithClient(r,i.job_id);for(let t=0;t<20;t+=1){if(a.status===`succeeded`||a.status===`failed`)return n?.close(),Fe(a);if(a.callback_ready)break;await Ie(250),a=await e.getOAuthStatusWithClient(r,i.job_id)}n&&(n.location.href=i.authorization_url);for(let t=0;t<q;t+=1)if(await Ie(1e3),a=await e.getOAuthStatusWithClient(r,i.job_id),a.status===`succeeded`||a.status===`failed`)return n?.close(),Fe(a);return{ok:!1,error:`OAuth authorization timed out`,error_kind:`timeout`}}finally{r.close()}}static async startOAuthWithClient(e,t){let n=await Ne(t);return e.startOAuth(n)}static async getOAuthStatusWithClient(e,t){return e.getOAuthStatus(t)}static async submitOAuthCallbackWithClient(e,t,n){return e.submitOAuthCallback(t,{callback_url:n})}};function Le(){return i({mutationFn:e=>Y.testServer(e)})}function X(e){return e.length<=3?e.join(`, `):`${e.slice(0,3).join(`, `)} … (+${e.length-3})`}function Re(){let{t:e}=a(`openhands`),t=r();return(0,A.useCallback)((n,r,i)=>{let a=n.filter(e=>i[e.key]&&(r[e.key]??``).trim());return a.length===0?Promise.resolve():Promise.allSettled(a.map(e=>D.createSecret(e.key,r[e.key].trim(),e.label))).then(n=>{let r=a.filter((e,t)=>n[t].status===`fulfilled`).map(e=>e.key),i=a.filter((e,t)=>n[t].status===`rejected`).map(e=>e.key);r.length>0&&(t.invalidateQueries({queryKey:[`secrets-search`]}),t.invalidateQueries({queryKey:[`secrets`]}),d(e(o.MCP$SECRETS_SAVED,{keys:X(r)}))),i.length>0&&c(e(o.MCP$SECRETS_SAVE_FAILED,{keys:X(i)}))})},[e,t])}function Z(e){let t=/\[([^\]]+)\]\(([^)]+)\)/g,n=[],r=0;for(let i of e.matchAll(t))i.index>r&&n.push(e.slice(r,i.index)),n.push((0,j.jsx)(`a`,{href:/^https?:\/\//i.test(i[2])?i[2]:`#`,target:`_blank`,rel:`noreferrer`,className:`underline hover:text-white transition-colors`,children:i[1]},i.index)),r=i.index+i[0].length;return r<e.length&&n.push(e.slice(r)),n}function Q(e){return e?.transport.kind!==`shttp`&&e?.transport.kind!==`sse`?!1:[`api_key`,`bearer`].includes(e.auth.strategy)}function ze(e){return!!e&&e.auth.strategy===`oauth2`}function Be(e){return e.transport.kind===`stdio`?e.auth.apiKeyOptional??!1:e.auth.apiKeyOptional??e.transport.apiKeyOptional??!1}function $(e){return e?.transport.kind!==`shttp`&&e?.transport.kind!==`sse`?[]:e.transport.headerFields??[]}function Ve(e){let t={},n={},r=se(e),i=r?.transport;if(i?.kind===`stdio`){for(let e of i.envFields??[])t[e.key]=``,n[e.key]=e.type===`password`;for(let e of i.argFields??[])t[e.key]=``}else if(i?.kind===`shttp`||i?.kind===`sse`){t.url=i.url;for(let e of $(r))t[e.key]=``,n[e.key]=e.type===`password`;Q(r)&&(t.api_key=``,r?.auth.credentialSecretName&&(n.api_key=r.auth.saveCredentialAsSecretByDefault??!1))}return{values:t,errors:{},savedAsSecret:n}}function He({entry:e,onClose:t,onSuccess:n}){let{t:r}=a(`openhands`),{mutate:i,isPending:s}=U(),{mutate:c,isPending:u}=Le(),f=Re(),[p,m]=A.useState(()=>Ve(e)),h=A.useRef(p);h.current=p;let[g,_]=A.useState(null),[y,b]=A.useState(!1),[x,S]=A.useState(!1),C=se(e),w=C?.transport,T=u||x||s||y,E=(e,t)=>{m(n=>({...n,values:{...n.values,[e]:t},errors:{...n.errors,[e]:null}})),_(null)},D=(e,t)=>{m(n=>({...n,savedAsSecret:{...n.savedAsSecret,[e]:t}}))},O=()=>{let e=C?.auth.credentialSecretName,t=h.current.values.api_key?.trim();return!e||!t||!h.current.savedAsSecret.api_key?Promise.resolve():f([{key:e,label:C.auth.credentialLabel??e,type:`password`}],{[e]:t},{[e]:!0})},k=()=>w?.kind===`stdio`?f(w.envFields??[],h.current.values,h.current.savedAsSecret):w?.kind===`shttp`||w?.kind===`sse`?Promise.all([O(),f($(C),h.current.values,h.current.savedAsSecret)]).then(()=>void 0):Promise.resolve(),M=e=>{switch(e.error_kind){case`timeout`:return r(o.MCP$TEST_ERROR_TIMEOUT);case`connection`:return r(o.MCP$TEST_ERROR_CONNECTION);case`credentials`:return r(o.MCP$TEST_ERROR_CREDENTIALS,{error:e.error});default:return r(o.MCP$TEST_ERROR_UNKNOWN,{error:e.error})}},N=a=>{if(a.auth?.strategy===`oauth2`){S(!0),Y.authorizeOAuth(a).then(s=>{if(!s.ok){_(M(s));return}i(s.oauth_state?{...a,auth:{...a.auth,state:s.oauth_state}}:a,{onSuccess:()=>{d(r(o.MCP$INSTALL_SUCCESS)),b(!0),(async()=>{try{await k()}finally{n?.(e),t()}})()},onError:e=>{_(l(e)||r(o.ERROR$GENERIC))}})}).catch(e=>{_(l(e)||r(o.ERROR$GENERIC))}).finally(()=>S(!1));return}c(a,{onSuccess:s=>{if(!s.ok){_(M(s));return}i(s.oauth_state&&a.auth?.strategy===`oauth2`?{...a,auth:{...a.auth,state:s.oauth_state}}:a,{onSuccess:()=>{d(r(o.MCP$INSTALL_SUCCESS)),b(!0),(async()=>{try{await k()}finally{n?.(e),t()}})()},onError:e=>{_(l(e)||r(o.ERROR$GENERIC))}})},onError:e=>{_(l(e)||r(o.ERROR$GENERIC))}})},oe=()=>{if(w?.kind!==`shttp`&&w?.kind!==`sse`||!C)return;let t=p.values.api_key?.trim()??``,n=w.urlEditable?p.values.url?.trim()??``:w.url,i=ze(C),a=Q(C),s=$(C),c={};if(!n)c.url=r(o.SETTINGS$MCP_ERROR_URL_REQUIRED);else try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(c.url=r(o.SETTINGS$MCP_ERROR_URL_INVALID_PROTOCOL))}catch{c.url=r(o.SETTINGS$MCP_ERROR_URL_INVALID)}for(let e of s)e.required&&!(p.values[e.key]??``).trim()&&(c[e.key]=r(o.MCP$ERROR_FIELD_REQUIRED));if(!i&&a&&!Be(C)&&!t&&(c.api_key=r(o.MCP$ERROR_FIELD_REQUIRED)),Object.values(c).some(Boolean)){m(e=>({...e,errors:c}));return}let l=i?le(C):void 0,u=Object.fromEntries(s.map(e=>[e.key,p.values[e.key]?.trim()??``]).filter(([,e])=>e)),d=Object.keys(u).length>0,f;i?f={strategy:`oauth2`,...l&&{authentication:l}}:a&&t?f=C.auth.strategy===`api_key`?{strategy:`api_key`,value:t,...C.auth.apiKeyHeaderName&&{header_name:C.auth.apiKeyHeaderName}}:{strategy:`bearer`,value:t}:d&&(f={strategy:`header`,headers:u}),N({id:`${w.kind}-${ae()}`,type:w.kind,name:ie(e.id),url:n,...f&&{auth:f},...d&&f?.strategy!==`header`&&{headers:u}})},P=()=>{if(w?.kind!==`stdio`)return;let e=w,t={};for(let n of e.envFields??[])n.required&&!(p.values[n.key]??``).trim()&&(t[n.key]=r(o.MCP$ERROR_FIELD_REQUIRED));for(let n of e.argFields??[])n.required&&!(p.values[n.key]??``).trim()&&(t[n.key]=r(o.MCP$ERROR_FIELD_REQUIRED));if(Object.values(t).some(Boolean)){m(e=>({...e,errors:t}));return}let n={};for(let t of e.envFields??[]){let e=p.values[t.key]?.trim();e&&(n[t.key]=e)}let i=[];for(let t of e.argFields??[]){let e=p.values[t.key]?.trim();if(e)for(let t of e.split(/\s+/))t&&i.push(t)}N({id:`stdio-${ae()}`,type:`stdio`,name:e.serverName,command:e.command,args:[...e.args,...i],...Object.keys(n).length>0&&{env:n}})};return(0,j.jsx)(ee,{onClose:t,"aria-label":e.name,children:(0,j.jsxs)(`form`,{"data-testid":`mcp-install-modal`,"data-marketplace-id":e.id,onSubmit:e=>(e.preventDefault(),_(null),w?.kind===`shttp`||w?.kind===`sse`?oe():P()),className:`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)] w-[520px] max-w-[90vw] max-h-[85vh] overflow-y-auto custom-scrollbar`,children:[(0,j.jsx)(re,{onClose:t,testId:`mcp-install-modal-close`,disabled:T}),(0,j.jsxs)(`div`,{className:`flex items-start gap-3 pr-6`,children:[(0,j.jsx)(H,{entry:e}),(0,j.jsxs)(`div`,{className:`flex flex-col flex-1`,children:[(0,j.jsx)(`h2`,{className:te,children:e.name}),(0,j.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:e.description})]})]}),e.installHint&&(0,j.jsx)(`p`,{className:`text-xs text-tertiary-light`,children:e.installHint}),e.docsUrl&&(0,j.jsx)(`a`,{href:e.docsUrl,target:`_blank`,rel:`noreferrer`,className:`text-xs text-[var(--oh-muted)] hover:text-white hover:underline self-start transition-colors`,children:r(o.MCP$VIEW_DOCS)}),(0,j.jsx)(`div`,{className:`flex flex-col gap-3`,children:(()=>{if(w?.kind===`shttp`||w?.kind===`sse`){let e=ze(C),t=Q(C),n=C?Be(C):!1,i=C?.auth.credentialSecretName,a=$(C);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(v,{testId:`mcp-install-field-url`,name:`url`,type:`url`,label:r(o.SETTINGS$MCP_URL),value:p.values.url??w.url,onChange:e=>E(`url`,e),isDisabled:!w.urlEditable,className:`w-full`}),p.errors.url&&(0,j.jsx)(`p`,{className:`text-xs text-red-500`,children:p.errors.url}),a.map(e=>(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(v,{testId:`mcp-install-field-${e.key}`,name:e.key,type:e.type===`password`?`password`:`text`,label:e.label,value:p.values[e.key]??``,onChange:t=>E(e.key,t),placeholder:e.placeholder,required:e.required,showOptionalTag:!e.required,className:`w-full`}),e.helperText&&(0,j.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Z(e.helperText)}),p.errors[e.key]&&(0,j.jsx)(`p`,{className:`text-xs text-red-500`,children:p.errors[e.key]}),e.key in p.savedAsSecret&&(0,j.jsx)(V,{fieldKey:e.key,checked:p.savedAsSecret[e.key]??!1,onToggle:t=>D(e.key,t)})]},e.key)),e?(0,j.jsxs)(`div`,{"data-testid":`mcp-install-oauth-info`,className:`flex flex-col gap-2 p-3 rounded-lg border border-[var(--oh-border)] bg-base-tertiary`,children:[(0,j.jsx)(`p`,{className:`text-sm text-secondary-light`,children:r(o.MCP$OAUTH_CONNECT_INFO)}),(0,j.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:r(o.MCP$OAUTH_CONNECT_HINT)})]}):t?(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(v,{testId:`mcp-install-field-api_key`,name:`api_key`,type:`password`,label:C?.auth.credentialLabel??r(o.SETTINGS$MCP_API_KEY),value:p.values.api_key??``,onChange:e=>E(`api_key`,e),placeholder:C?.auth.credentialPlaceholder??r(o.SETTINGS$MCP_API_KEY_PLACEHOLDER),showOptionalTag:n,required:!n,className:`w-full`}),C?.auth.credentialHelp&&(0,j.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Z(C.auth.credentialHelp)}),p.errors.api_key&&(0,j.jsx)(`p`,{className:`text-xs text-red-500`,children:p.errors.api_key}),i&&(0,j.jsx)(V,{fieldKey:i,checked:p.savedAsSecret.api_key??!1,onToggle:e=>D(`api_key`,e)})]}):null]})}if(w?.kind!==`stdio`)return null;let e=w;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(v,{testId:`mcp-install-field-command-readonly`,name:`command-readonly`,type:`text`,label:r(o.MCP$COMMAND_LABEL),value:`${e.command} ${e.args.join(` `)}`.trim(),onChange:()=>{},isDisabled:!0,className:`w-full`}),(e.envFields??[]).map(e=>(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(v,{testId:`mcp-install-field-${e.key}`,name:e.key,type:e.type===`password`?`password`:`text`,label:e.label,value:p.values[e.key]??``,onChange:t=>E(e.key,t),placeholder:e.placeholder,required:e.required,showOptionalTag:!e.required,className:`w-full`}),e.helperText&&(0,j.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Z(e.helperText)}),p.errors[e.key]&&(0,j.jsx)(`p`,{className:`text-xs text-red-500`,children:p.errors[e.key]}),e.key in p.savedAsSecret&&(0,j.jsx)(V,{fieldKey:e.key,checked:p.savedAsSecret[e.key],onToggle:t=>D(e.key,t)})]},e.key)),(e.argFields??[]).map(e=>(0,j.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsx)(v,{testId:`mcp-install-field-${e.key}`,name:e.key,type:e.type===`password`?`password`:`text`,label:e.label,value:p.values[e.key]??``,onChange:t=>E(e.key,t),placeholder:e.placeholder,required:e.required,showOptionalTag:!e.required,className:`w-full`}),e.helperText&&(0,j.jsx)(`p`,{className:`text-xs text-tertiary-alt`,children:Z(e.helperText)}),p.errors[e.key]&&(0,j.jsx)(`p`,{className:`text-xs text-red-500`,children:p.errors[e.key]})]},e.key))]})})()}),g&&(0,j.jsx)(`p`,{"data-testid":`mcp-install-modal-error`,className:`text-sm text-red-500 whitespace-pre-wrap`,children:g}),(0,j.jsxs)(`div`,{className:`flex justify-end gap-2 mt-2`,children:[(0,j.jsx)(ne,{type:`button`,variant:`secondary`,onClick:t,testId:`mcp-install-cancel`,isDisabled:T,children:r(o.BUTTON$CANCEL)}),(0,j.jsx)(ne,{type:`submit`,variant:`primary`,isDisabled:T,testId:`mcp-install-submit`,children:r(u||x?o.MCP$VERIFYING:s||y?o.SETTINGS$SAVING:o.MCP$INSTALL_BUTTON)})]})]})})}export{U as a,de as c,pe as d,F as f,k as h,K as i,P as l,me as m,Le as n,H as o,he as p,Y as r,B as s,He as t,fe as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{I as r,L as i,M as a}from"./vendor~entry.client~root~root-layout~index-redirect~home~conversation-panel~conversation~la~byh8a1g4-XNPdpuO8.js";import{t as o}from"./useTranslation-Cgy4JA_g.js";import{t as s}from"./declaration-B9kpCaYl.js";import{t as c}from"./utils-CE0lDWtb.js";import{t as l}from"./modal-backdrop-zVwfOJZr.js";import{r as u,t as d}from"./modal-body-Dcu5McCa.js";import{t as f}from"./brand-button-DKPMEKcW.js";import{t as p}from"./modal-close-button-CTCX4nCH.js";import{t as m}from"./settings-input-DYs7t3oK.js";import{t as h}from"./use-create-conversation-D9OWYcte.js";import{r as g}from"./typography-YGPBGzOG.js";import{n as _,t as v}from"./vendor~launch-CHXA9cJu.js";var y=e(t(),1),b=n();function x({pluginIndex:e,paramKey:t,paramValue:n,onParameterChange:r}){let i=`plugin-${e}-param-${t}`;return typeof n==`boolean`?(0,b.jsxs)(`label`,{htmlFor:i,className:`flex w-full cursor-pointer items-center gap-2.5`,children:[(0,b.jsx)(`input`,{id:i,"data-testid":i,type:`checkbox`,checked:n,onChange:n=>r(e,t,n.target.checked),className:`h-4 w-4 shrink-0 rounded`}),(0,b.jsx)(`span`,{className:`text-sm`,children:t})]}):typeof n==`number`?(0,b.jsx)(m,{testId:i,name:`plugin-${e}-param-${t}`,type:`number`,label:t,value:String(n),className:`w-full`,onChange:n=>r(e,t,n===``?0:parseFloat(n)||0)}):(0,b.jsx)(m,{testId:i,name:`plugin-${e}-param-${t}`,type:`text`,label:t,value:String(n??``),className:`w-full`,onChange:n=>r(e,t,n)})}function S({plugin:e,originalIndex:t,isExpanded:n,onToggle:r,getPluginDisplayName:i,onParameterChange:a}){let{t:c}=o(`openhands`);return e.parameters&&Object.keys(e.parameters).length>0?(0,b.jsxs)(`div`,{className:`rounded-lg border border-[var(--oh-border)] bg-tertiary`,children:[(0,b.jsxs)(`button`,{type:`button`,onClick:r,className:`flex w-full items-center justify-between px-4 py-3 text-left hover:bg-base-tertiary rounded-t-lg cursor-pointer`,"data-testid":`plugin-section-${t}`,children:[(0,b.jsx)(g.Text,{className:`text-base font-normal`,children:i(e)}),n?(0,b.jsx)(v,{className:`h-5 w-5 text-white`}):(0,b.jsx)(_,{className:`h-5 w-5 text-white`})]}),n&&(0,b.jsxs)(`div`,{className:`border-t border-[var(--oh-border-subtle)] px-4 pb-3`,children:[e.ref&&(0,b.jsxs)(`div`,{className:`mb-2 text-sm text-white`,children:[c(s.LAUNCH$PLUGIN_REF),` `,e.ref]}),e.repo_path&&(0,b.jsxs)(`div`,{className:`mb-2 text-sm text-white`,children:[c(s.LAUNCH$PLUGIN_PATH),` `,e.repo_path]}),(0,b.jsx)(`div`,{className:`flex flex-col gap-4`,children:Object.entries(e.parameters||{}).map(([e,n])=>(0,b.jsx)(x,{pluginIndex:t,paramKey:e,paramValue:n,onParameterChange:a},e))})]})]}):null}function C({plugins:e,message:t,isLoading:n=!1,onStartConversation:r,onClose:i}){let{t:a}=o(`openhands`),[m,h]=y.useState(e),[_,v]=y.useState(()=>{let t={};return e.forEach((e,n)=>{e.parameters&&Object.keys(e.parameters).length>0&&(t[n]=!0)}),t}),[x,C]=y.useState(!1),w=m.filter(e=>e.parameters&&Object.keys(e.parameters).length>0),T=m.filter(e=>!e.parameters||Object.keys(e.parameters).length===0),E=e=>{v(t=>({...t,[e]:!t[e]}))},D=(e,t,n)=>{h(r=>{let i=[...r],a={...i[e]};return a.parameters={...a.parameters,[t]:n},i[e]=a,i})},O=e=>{let{source:t,repo_path:n}=e;if(n){let e=n.split(`/`);return e[e.length-1]}if(t.startsWith(`github:`))return t.replace(`github:`,``);if(t.includes(`/`)){let e=t.split(`/`);return e[e.length-1].replace(`.git`,``)}return t},k=e=>{let{source:t}=e;return t.startsWith(`github:`)?t.replace(`github:`,``):t.includes(`github.com/`)&&t.split(`github.com/`)[1]?.replace(`.git`,``)||t},A=()=>{let e=m.map(e=>k(e));return[...new Set(e)]},j=()=>{r(m,t)},M=m.length===1?O(m[0]):a(s.LAUNCH$MODAL_TITLE_GENERIC);return(0,b.jsx)(l,{onClose:i,children:(0,b.jsxs)(`div`,{"data-testid":`plugin-launch-modal`,className:c(`relative bg-base-secondary p-6 rounded-xl flex flex-col gap-4 border border-[var(--oh-border)] max-h-[80vh]`,u(`md`),d),children:[(0,b.jsx)(p,{onClose:i,testId:`close-button`}),(0,b.jsxs)(g.H2,{className:`pr-6`,children:[a(s.LAUNCH$MODAL_TITLE),` `,M]}),t&&(0,b.jsx)(`p`,{className:`text-sm text-white`,children:t}),(0,b.jsxs)(`div`,{className:`flex-1 overflow-y-auto custom-scrollbar`,children:[w.length>0&&(0,b.jsx)(`div`,{className:`space-y-3`,children:m.map((e,t)=>(0,b.jsx)(S,{plugin:e,originalIndex:t,isExpanded:!!_[t],onToggle:()=>E(t),getPluginDisplayName:O,onParameterChange:D},`plugin-${t}`))}),T.length>0&&(0,b.jsxs)(`div`,{className:c(w.length>0&&`mt-4`),children:[(0,b.jsx)(g.H3,{className:`mb-2 text-white`,children:w.length>0?a(s.LAUNCH$ADDITIONAL_PLUGINS):a(s.LAUNCH$PLUGINS)}),(0,b.jsx)(`div`,{className:`space-y-2`,children:T.map((e,t)=>(0,b.jsxs)(`div`,{className:`rounded-md bg-tertiary px-3 py-2 text-sm`,children:[(0,b.jsx)(`div`,{className:`font-medium`,children:O(e)}),(0,b.jsxs)(`div`,{className:`text-xs text-white mt-1`,children:[k(e),e.repo_path&&(0,b.jsxs)(`span`,{className:`ml-1`,children:[`/ `,e.repo_path]}),e.ref&&(0,b.jsxs)(`span`,{className:`ml-2`,children:[`@ `,e.ref]})]})]},`simple-plugin-${t}`))})]})]}),(0,b.jsxs)(`div`,{className:`pt-4 border-t border-[var(--oh-border-subtle)]`,children:[(0,b.jsxs)(`div`,{className:`flex items-start gap-3 mb-4`,children:[(0,b.jsx)(`input`,{id:`trust-checkbox`,"data-testid":`trust-checkbox`,type:`checkbox`,checked:x,onChange:e=>C(e.target.checked),className:`mt-1 h-4 w-4 flex-shrink-0`}),(0,b.jsx)(`label`,{htmlFor:`trust-checkbox`,className:`text-sm text-white`,children:a(s.LAUNCH$TRUST_SKILL_CHECKBOX,{sources:A().join(`, `),interpolation:{escapeValue:!1}})})]}),(0,b.jsx)(`div`,{className:`flex w-full justify-end mt-8`,children:(0,b.jsx)(f,{testId:`start-conversation-button`,type:`button`,variant:`primary`,onClick:j,isDisabled:n||!x,className:`px-4`,children:a(n?s.LAUNCH$STARTING:s.LAUNCH$START_CONVERSATION)})})]})]})})}function w(e){if(e)return e.replace(/<[^>]*>/g,``).slice(0,500)||void 0}function T(e){let t=e.get(`plugins`);if(t)try{let n=atob(t),r=JSON.parse(n);if(!Array.isArray(r))return{plugins:[],error:`invalid_format`};let i=[];for(let e of r){if(typeof e!=`object`||!e||typeof e.source!=`string`)return{plugins:[],error:`invalid_format`};i.push({source:e.source,ref:e.ref??null,repo_path:e.repo_path??null,parameters:e.parameters??null})}return i.length===0?{plugins:[],error:`no_plugins`}:{plugins:i,message:w(e.get(`message`))}}catch{return{plugins:[],error:`invalid_format`}}let n=e.get(`plugin_source`);return n?{plugins:[{source:n,ref:e.get(`plugin_ref`)??null,repo_path:e.get(`plugin_repo_path`)??null,parameters:null}],message:w(e.get(`message`))}:{plugins:[],error:`no_plugins`}}function E({errorType:e,onGoHome:t,onTryAgain:n}){let{t:r}=o(`openhands`),i={no_plugins:r(s.LAUNCH$ERROR_NO_PLUGINS),invalid_format:r(s.LAUNCH$ERROR_INVALID_FORMAT),creation_failed:r(s.LAUNCH$ERROR_CREATION_FAILED)};return(0,b.jsx)(`div`,{className:`flex h-full items-center justify-center`,"data-testid":`launch-error`,children:(0,b.jsxs)(`div`,{className:`max-w-md rounded-lg bg-[var(--oh-surface)] p-6 text-center`,children:[(0,b.jsx)(`h2`,{className:`mb-4 text-xl font-medium text-red-400`,children:r(s.LAUNCH$ERROR_TITLE)}),(0,b.jsx)(`p`,{className:`mb-6 text-[var(--oh-text-tertiary)]`,children:i[e]}),(0,b.jsxs)(`div`,{className:`flex justify-center gap-3`,children:[(0,b.jsx)(`button`,{type:`button`,onClick:t,className:`rounded-md bg-tertiary px-4 py-2 text-sm text-[var(--oh-foreground)] hover:bg-[var(--oh-interactive-hover)]`,"data-testid":`go-home-button`,children:r(s.LAUNCH$GO_HOME)}),n&&(0,b.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-md bg-blue-600 px-4 py-2 text-sm text-white hover:bg-blue-700`,"data-testid":`try-again-button`,children:r(s.LAUNCH$TRY_AGAIN)})]})]})})}var D=i(function(){let[e]=r(),t=a(),{t:n}=o(`openhands`),i=h(),[c,l]=y.useState(null),u=y.useMemo(()=>T(e),[e]),d=async(e,r)=>{l(null);try{t(`/conversations/${(await i.mutateAsync({plugins:e,query:r,entryPoint:`launch_deeplink`})).conversation_id}`)}catch{l(n(s.LAUNCH$ERROR_CREATION_UNKNOWN))}},f=()=>{t(`/conversations`)};return u.error?(0,b.jsx)(E,{errorType:u.error,onGoHome:f}):c?(0,b.jsx)(E,{errorType:`creation_failed`,onGoHome:f,onTryAgain:()=>{l(null),window.location.reload()}}):(0,b.jsx)(`div`,{className:`h-full`,"data-testid":`launch-route`,children:(0,b.jsx)(C,{plugins:u.plugins,message:u.message,isLoading:i.isPending,onStartConversation:d,onClose:f})})});export{D as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-BFRubm34.js";import{Ct as t,bt as n}from"./vendor-styling-CI0PQ3ab.js";import{n as r}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~i3v2mlbw-BrJQ3XZH.js";import{a as i,n as a,p as o}from"./path-utils-BeOmjIcE.js";import{t as s}from"./useMutation-DCE9RcgK.js";import{t as c}from"./useQuery-CpjHYtZc.js";import{f as l}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~extensions~ncdxw0bh-ClHnt5lR.js";import{a as u,c as d,n as f,o as p,r as m}from"./agent-server-client-options-DVLRd9sw.js";import{n as h}from"./vendor~entry.client~root~root-layout~home~conversation-panel~conversation~launch~skills-set~nn5zty47-Zl0G1QCy.js";import{t as g}from"./proxy-CHmFkV16.js";import{t as _}from"./react-DPDgL6du.js";import{n as v}from"./middleware-DYHYNAnP.js";import{a as ee}from"./conversation-local-storage-F6zVMM--.js";import{t as y}from"./conversation-store-LptbOvKa.js";import{a as b}from"./vendor~root-layout~home~conversation-panel~conversation~launch~settings~settings-index~agen~enjl5xdm-mMKDm94D.js";import{t as x}from"./v4-DbCkTSoU.js";import{a as te,o as ne,t as S}from"./agent-server-conversation-service.api-BP73yONA.js";import{t as re}from"./use-user-conversation-6uOXFP95.js";import{t as ie}from"./conversation-state-store-B2Bp32XI.js";import{t as C}from"./files-tab-store-DJsPxYdg.js";import{C as ae,E as oe,O as w,S as T,T as E,_ as se,b as D,c as ce,d as le,f as ue,g as de,h as fe,l as pe,m as me,o as O,p as he,s as ge,t as k,u as _e,v as ve,w as ye,x as A,y as be}from"./use-event-store-YSOxy9FC.js";import{t as xe}from"./command-store-D8J5LMW1.js";import{t as j}from"./browser-store-BI6uklCG.js";var M=e(t(),1),Se=(e,t)=>{let[n,r]=M.useState(!1),[i,a]=M.useState(null),[o,s]=M.useState(null),[c,l]=M.useState(!1),u=M.useRef(null),d=M.useRef(0),f=M.useRef(null),p=M.useRef(!0),m=M.useRef(new WeakSet),h=M.useRef(t);M.useEffect(()=>{h.current=t},[t]);let g=M.useCallback(()=>{let t=e;if(h.current?.queryParams){let n=Object.entries(h.current.queryParams).reduce((e,[t,n])=>(e[t]=String(n),e),{});t=`${e}?${new URLSearchParams(n).toString()}`}let n=new WebSocket(t);u.current=n,m.current.add(n),n.onopen=e=>{r(!0),s(null),l(!1),d.current=0,h.current?.onOpen?.(e)},n.onmessage=e=>{a(e.data),h.current?.onMessage?.(e)},n.onclose=e=>{let t=m.current.has(n);r(!1),e.code!==1e3&&(s(Error(`WebSocket closed with code ${e.code}: ${e.reason||`Connection closed unexpectedly`}`)),t&&h.current?.onError?.(e)),h.current?.onClose?.(e);let i=h.current?.reconnect?.enabled??!1,a=h.current?.reconnect?.maxAttempts??1/0;i&&t&&p.current&&d.current<a?(l(!0),d.current+=1,f.current=setTimeout(()=>{g()},3e3)):l(!1)},n.onerror=e=>{r(!1),h.current?.onError?.(e)}},[e]);M.useEffect(()=>(p.current=!0,d.current=0,e&&e.trim()!==``&&g(),()=>{if(p.current=!1,f.current&&=(clearTimeout(f.current),null),u.current){let{readyState:e}=u.current;m.current.delete(u.current),(e===WebSocket.CONNECTING||e===WebSocket.OPEN)&&u.current.close(),u.current=null}}),[e,g]);let _=M.useCallback(e=>{u.current?.readyState===WebSocket.OPEN&&u.current.send(e)},[]),v=M.useCallback(()=>{p.current=!1,l(!1),f.current&&=(clearTimeout(f.current),null),u.current&&(m.current.delete(u.current),u.current.close())},[]),ee=M.useCallback(()=>{if(p.current=!0,d.current=0,l(!0),s(null),f.current&&=(clearTimeout(f.current),null),u.current){let e=u.current;m.current.delete(e),u.current=null,(e.readyState===WebSocket.CONNECTING||e.readyState===WebSocket.OPEN)&&e.close()}g()},[g]);return{isConnected:n,lastMessage:i,error:o,socket:u.current,sendMessage:_,isReconnecting:c,attemptCount:d.current,disconnect:v,reconnect:ee}},N=`Unable to connect to server`,P={errorMessage:null,errorType:null,errorCode:null},Ce=_(e=>({...P,setErrorMessage:(t,n=`conversation`,r=null)=>e(()=>({errorMessage:t,errorType:n,errorCode:r})),removeErrorMessage:()=>e(()=>({...P})),clearConnectionError:()=>e(e=>e.errorType===`connection`?{...P}:e)})),F=15e4,I={pendingMessages:[]},L=()=>`pending-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,we=_((e,t)=>({...I,enqueuePendingMessage:n=>{let r=L(),i={id:r,conversationId:n.conversationId,text:n.text,content:n.content??n.text,status:`sending`,imageUrls:n.imageUrls??[],fileUrls:n.fileUrls??[],timestamp:n.timestamp??new Date().toISOString()};return e(e=>({pendingMessages:[...e.pendingMessages,i]})),setTimeout(()=>{t().pendingMessages.find(e=>e.id===r)?.status===`sending`&&t().markPendingMessageError(r,`Send timed out`)},F),r},markPendingMessageError:(t,n)=>e(e=>({pendingMessages:e.pendingMessages.map(e=>e.id===t?{...e,status:`error`,errorMessage:n}:e)})),markPendingMessageSending:t=>e(e=>({pendingMessages:e.pendingMessages.map(e=>e.id===t?{...e,status:`sending`,errorMessage:void 0}:e)})),removePendingMessage:t=>e(e=>({pendingMessages:e.pendingMessages.filter(e=>e.id!==t)})),consumeMatchingPendingMessage:(t,n)=>{let r=null;return e(e=>{let i=e.pendingMessages.map((e,t)=>({m:e,i:t})).filter(({m:e})=>e.status===`sending`&&e.conversationId===t);if(i.length===0)return e;let a=i.find(({m:e})=>e.content===n)??i[0];return r=a.m,{pendingMessages:[...e.pendingMessages.slice(0,a.i),...e.pendingMessages.slice(a.i+1)]}}),r},clearPendingMessages:()=>e(()=>({...I})),reassignPendingMessages:(t,n)=>e(e=>({pendingMessages:e.pendingMessages.map(e=>e.conversationId===t?{...e,conversationId:n}:e)}))})),R={statusByConversation:{}},Te=_()(v(e=>({...R,setStatus:(t,n)=>e(e=>({statusByConversation:{...e.statusByConversation,[t]:n}}))}),{name:`GoalStore`})),z=new Set([`files`,`browser`,`terminal`,`planner`,`tasklist`]);function B(e){let t=y.getState();t.setSelectedTab(e),t.isRightPanelShown||(t.setHasRightPanelToggled(!0),t.setIsRightPanelShown(!0))}function V(e){return z.has(e)}function Ee(e,t=null){switch(e.command){case`navigate_to_file`:case`show_preview`:B(`files`),e.path&&C.getState().setSelectedPath(e.path,t);return;case`open_tab`:e.tab===`vscode`?B(`files`):e.tab&&V(e.tab)?B(e.tab):e.tab&&console.warn(`[canvas_ui] Ignoring open_tab with unknown tab: ${e.tab}`);return}}var H=(e,t,n)=>({entriesByConversation:{...e.entriesByConversation,[t]:[...e.entriesByConversation[t]??[],n]}}),U=_()(v(e=>({entriesByConversation:{},activeProfileByConversation:{},show:(t,n,r)=>e(e=>H(e,t,{id:x(),anchorEventId:n,profiles:r})),recordSwitch:(t,n,r)=>e(e=>({...H(e,t,{id:x(),anchorEventId:n,profiles:[],switchedTo:r}),activeProfileByConversation:{...e.activeProfileByConversation,[t]:r}})),seedSwitches:(t,n)=>e(e=>{let r=e.entriesByConversation[t]??[],i=new Set(r.map(e=>e.id)),a=n.filter(e=>!i.has(e.id)).map(e=>({id:e.id,anchorEventId:e.anchorEventId,profiles:[],switchedTo:e.profileName}));return a.length===0?e:{entriesByConversation:{...e.entriesByConversation,[t]:[...r,...a]}}}),clearActiveProfile:t=>e(e=>{if(!(t in e.activeProfileByConversation))return e;let n={...e.activeProfileByConversation};return delete n[t],{activeProfileByConversation:n}}),clear:t=>e(e=>{let n={...e.entriesByConversation};delete n[t];let r={...e.activeProfileByConversation};return delete r[t],{entriesByConversation:n,activeProfileByConversation:r}}),clearAll:()=>e({entriesByConversation:{},activeProfileByConversation:{}})}),{name:`ModelStore`})),De=(e,t,n)=>{let{action:r}=e;if((r.kind===`StrReplaceEditorAction`||r.kind===`FileEditorAction`||r.kind===`ExecuteBashAction`)&&n.invalidateQueries({queryKey:[`file_changes`,t]},{cancelRefetch:!1}),(r.kind===`StrReplaceEditorAction`||r.kind===`FileEditorAction`)&&r.path){let e=a(r.path);n.invalidateQueries({queryKey:[`file_diff`,t,e]})}e.tool_name===`SwitchLLMTool`&&(n.invalidateQueries({queryKey:[`user`,`conversation`,t]}),U.getState().clearActiveProfile(t))},Oe=class{static async respondToConfirmation(e,t,n,r){let i=d().backend;return i.kind===`cloud`?g({backend:i,method:`POST`,hostOverride:u(t),path:`/api/conversations/${e}/events/respond_to_confirmation`,body:n,authMode:`session-api-key`,sessionApiKey:r}):new l(f({conversationUrl:t,sessionApiKey:r})).respondToConfirmation(e,n)}static async getEventCount(e,t,n){let r=d().backend;return r.kind===`cloud`?g({backend:r,method:`GET`,hostOverride:u(t),path:`/api/conversations/${e}/events/count`,authMode:`session-api-key`,sessionApiKey:n}):new l(f({conversationUrl:t,sessionApiKey:n})).getEventCount(e)}static async searchEvents(e,t,n,r={}){let i=d().backend,a=r.limit??100;if(i.kind===`cloud`){let t=Math.min(a,100),n=!!(r.sortOrder||r.pageId||r.timestampGte||r.timestampLt),o=new URLSearchParams;o.set(`limit`,String(t)),r.sortOrder&&o.set(`sort_order`,r.sortOrder),r.pageId&&o.set(`page_id`,r.pageId),r.timestampGte&&o.set(`timestamp__gte`,r.timestampGte),r.timestampLt&&o.set(`timestamp__lt`,r.timestampLt);let s=t=>g({backend:i,method:`GET`,path:`/api/v1/conversation/${e}/events/search?${t.toString()}`});try{let e=await s(o);return{items:e?.items??[],next_page_id:e?.next_page_id??null}}catch(e){if(!n)throw e;return console.warn(`[EventService] Cloud backend doesn't support pagination filters. Falling back to initial load only. Server needs OpenHands/OpenHands#14399.`),{items:[],next_page_id:null}}}let o=await new b(m({conversationUrl:t,sessionApiKey:n}),e).search({limit:a,...r.pageId?{page_id:r.pageId}:{},...r.sortOrder?{sort_order:r.sortOrder}:{},...r.timestampGte?{timestamp__gte:r.timestampGte}:{},...r.timestampLt?{timestamp__lt:r.timestampLt}:{}});return{items:o?.items??[],next_page_id:o?.next_page_id??null}}};function W({message:e,source:t,metadata:n={},posthog:r}){if(!r)return;let i=Error(e);r.captureException(i,{error_source:t||`unknown`,...n})}var ke=()=>s({mutationKey:[`read-conversation-file`],mutationFn:async({conversationId:e,filePath:t})=>S.readConversationFile(e,t)}),Ae=_(e=>({cost:null,max_budget_per_task:null,usage:null,setMetrics:t=>e(t)})),je=e=>{let{data:t}=re(e??null);return c({queryKey:[`conversation-history`,e,t?.conversation_url??null,t?.session_api_key??null],enabled:!!e&&!!t,queryFn:async()=>{if(!e)return{events:[],hasMore:!1,nextPageId:null};let n=await Oe.searchEvents(e,t?.conversation_url??null,t?.session_api_key??null,{limit:50,sortOrder:`TIMESTAMP_DESC`});if(!Array.isArray(n.items))throw Error(`Invalid conversation history response: expected page.items to be an array.`);return{events:[...n.items].reverse(),hasMore:!!n.next_page_id||n.items.length>=50,nextPageId:n.next_page_id??null}},staleTime:0,gcTime:1800*1e3,refetchOnMount:`always`,refetchOnWindowFocus:!1})},G=[`The goal is NOT yet complete (audit iteration`,`Resuming a goal that was paused or interrupted.`],Me=e=>{if(e.llm_message?.role!==`user`)return!1;let t=e.llm_message.content,n=Array.isArray(t)?t.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
2
|
+
`):``;return G.some(e=>n.startsWith(e))},K=e=>{if(me(e))return be(e)&&!e.value.active;if(ge(e)){let t=e.action.kind;return!(!t||t===`ExecuteBashAction`&&e.source===`user`||t===`PlanningFileEditorAction`||t===`SwitchLLMAction`)}return T(e)?!(e.observation.kind===`SwitchLLMObservation`&&!e.observation.is_error):A(e)?!Me(e):ce(e)||D(e)||O(e)?!0:E(e)?e.content!==null||e.reasoning_content!==null:!1},q=e=>e.some(e=>e.source===`user`),J=()=>{let{uiEvents:e}=k.getState();for(let t=e.length-1;t>=0;--t){let n=e[t];if(K(n))return String(n.id)}return null};function Ne(e,t,n=J()){U.getState().recordSwitch(e,n,t)}function Pe(e,t){let n=[],r=null;for(let e of t)oe(e)&&!e.observation.is_error&&n.push({id:`history-switch:${e.id}`,anchorEventId:r,profileName:e.observation.profile_name}),K(e)&&(r=String(e.id));n.length>0&&U.getState().seedSwitches(e,n)}var Y=n(),Fe=(0,M.createContext)(void 0);function Ie(e){return e.llm_message.content.filter(e=>e.type===`text`).map(e=>e.text).join(``)}function Le({children:e,conversationId:t,conversationUrl:n,sessionApiKey:a,subConversations:s,subConversationIds:c}){let[u,d]=(0,M.useState)(`CONNECTING`),[m,g]=(0,M.useState)(`CONNECTING`),_=M.useRef(!1),v=M.useRef(!1),b=h(),x=r(),S=k(e=>e.addEvent),re=k(e=>e.addEvents),C=k(e=>e.clearEventsForConversation),{setErrorMessage:T,removeErrorMessage:E,clearConnectionError:D}=Ce(),O=we(e=>e.consumeMatchingPendingMessage),{setExecutionStatus:A}=ie(),{appendInput:P,appendOutput:F}=xe(),I=j(e=>e.reset),[L,R]=(0,M.useState)(!0),[z,B]=(0,M.useState)(null),{setPlanContent:V}=y(),{mutate:H}=ke(),U=(0,M.useRef)(0),G=(0,M.useRef)(null),Me=e=>e?.toUpperCase().endsWith(`PLAN.MD`)??!1,K=(0,M.useCallback)(()=>{D()},[D]),q=(0,M.useCallback)(e=>{if(e.value.usage_to_metrics?.agent){let t=e.value.usage_to_metrics.agent,n={cost:t.accumulated_cost,max_budget_per_task:t.max_budget_per_task??null,usage:t.accumulated_token_usage?{prompt_tokens:t.accumulated_token_usage.prompt_tokens,completion_tokens:t.accumulated_token_usage.completion_tokens,cache_read_tokens:t.accumulated_token_usage.cache_read_tokens,cache_write_tokens:t.accumulated_token_usage.cache_write_tokens,context_window:t.accumulated_token_usage.context_window,per_turn_token:t.accumulated_token_usage.per_turn_token}:null};Ae.getState().setMetrics(n)}},[]),{data:J,isPending:Le,isFetching:X,isError:Re}=je(t),ze=!!t&&Le;(0,M.useLayoutEffect)(()=>{let e=t??null;k.getState().loadedConversationId!==e&&(C(e),I())},[t,C,I]),(0,M.useLayoutEffect)(()=>{if(!(!J||J.events.length===0)&&(re(J.events),t)){Pe(t,k.getState().uiEvents);for(let e of J.events)w(e)&&O(t,Ie(e))}},[J,re,t,O]);let Be=(0,M.useMemo)(()=>{if(X)return null;let e=J?.events??[],t=e[e.length-1];return!t||!(`timestamp`in t)||!t.timestamp?null:t.timestamp},[J,X]),Ve=(0,M.useMemo)(()=>!t||!n||X&&!Re?null:p(t,n),[t,n,X,Re]),Z=(0,M.useMemo)(()=>{if(!s?.length)return null;let e=s[0];return!e?.id||!e.conversation_url?null:p(e.id,e.conversation_url)},[s]),He=(0,M.useMemo)(()=>Z?u===`CONNECTING`||m===`CONNECTING`?`CONNECTING`:u===`OPEN`&&m===`OPEN`?`OPEN`:u===`CLOSED`&&m===`CLOSED`?`CLOSED`:u===`CLOSING`||m===`CLOSING`?`CLOSING`:`CLOSED`:u,[u,m,Z]);(0,M.useEffect)(()=>{z!==null&&U.current>=z&&L&&R(!1)},[z,L,U]),(0,M.useEffect)(()=>{if(!L&&G.current){let{path:e,conversationId:t}=G.current;H({conversationId:t,filePath:e},{onSuccess:e=>{V(e)},onError:e=>{console.warn(`Failed to read conversation file:`,e)}}),G.current=null}},[L,H,V]),(0,M.useEffect)(()=>{_.current=!1,R(!!c?.length),B(null),U.current=0,G.current=null},[c]),(0,M.useEffect)(()=>{_.current=!1,v.current=!1,G.current=null},[t]);let Ue=(0,M.useMemo)(()=>ze||L,[ze,L]),We=(0,M.useCallback)(e=>{try{let n=JSON.parse(e.data);if(pe(n)){let e=!k.getState().eventIds.has(n.id)&&oe(n)?n:null;if(S(n),fe(n)){let e=n;W({message:e.detail,source:`conversation`,metadata:{eventId:e.id,errorCode:e.code},posthog:b}),T(e.detail,`conversation`,e.code)}else K();if(ce(n)&&W({message:n.error,source:`agent`,metadata:{eventId:n.id,toolName:n.tool_name,toolCallId:n.tool_call_id},posthog:b}),w(n)&&t&&(O(t,Ie(n)),ee(t,{draftMessage:null})),ge(n)&&De(n,t||`test-conversation-id`,x),me(n)&&(ve(n)&&A(n.value.execution_status),_e(n)&&A(n.value),ye(n)&&q(n),be(n)&&t&&Te.getState().setStatus(t,n.value)),de(n)&&P(n.action.command),se(n)&&F(n.observation.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
3
|
+
`)),ue(n)){let{screenshot_data:e}=n.observation;if(e){let t=e.startsWith(`data:`)?e:`data:image/png;base64,${e}`;j.getState().setScreenshotSrc(t)}}if(le(n)&&j.getState().setUrl(n.action.url),t&&e&&!e.observation.is_error){Ne(t,e.observation.profile_name);let n=te(t);ne(t,{selected_repository:n?.selected_repository??null,selected_branch:n?.selected_branch??null,git_provider:n?.git_provider??null,selected_workspace:n?.selected_workspace??null,active_profile:e.observation.profile_name,plugins:n?.plugins??null}),e.observation.active_model&&o(x,t,e.observation.active_model),i(x,t)}he(n)&&Ee(n.action,t??null)}}catch(e){console.warn(`Failed to parse WebSocket message as JSON:`,e)}},[S,T,O,x,t,A,P,F,q,K,b]),Ge=(0,M.useCallback)(e=>{try{let n=JSON.parse(e.data);if(L&&(U.current+=1,z!==null&&U.current>=z&&R(!1)),pe(n)){if(S({...n,isFromPlanningAgent:!0}),fe(n)){let e=n;W({message:e.detail,source:`planning_conversation`,metadata:{eventId:e.id,errorCode:e.code},posthog:b}),T(e.detail,`conversation`,e.code)}else K();if(ce(n)&&W({message:n.error,source:`planning_agent`,metadata:{eventId:n.id,toolName:n.tool_name,toolCallId:n.tool_call_id},posthog:b}),w(n)&&t&&(O(t,Ie(n)),ee(t,{draftMessage:null})),ge(n)&&De(n,s?.[0]?.id||`test-conversation-id`,x),me(n)&&(ve(n)&&A(n.value.execution_status),_e(n)&&A(n.value),ye(n)&&q(n),be(n)&&t&&Te.getState().setStatus(t,n.value)),de(n)&&P(n.action.command),se(n)&&F(n.observation.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
4
|
+
`)),ae(n)){let{path:e}=n.observation;if(Me(e)){let t=s?.[0]?.id;t&&e&&(L?G.current={path:e,conversationId:t}:H({conversationId:t,filePath:e},{onSuccess:e=>{V(e)},onError:e=>{console.warn(`Failed to read conversation file:`,e)}}))}}}}catch(e){console.warn(`Failed to parse WebSocket message as JSON:`,e)}},[S,L,z,T,O,x,s,t,A,P,F,H,V,q,K,b]),Ke=(0,M.useMemo)(()=>{let e=Be?{resend_mode:`since`,after_timestamp:Be}:{resend_mode:`all`};return a&&(e.session_api_key=a),{queryParams:e,reconnect:{enabled:!0},onOpen:()=>{d(`OPEN`),_.current=!0,D()},onClose:()=>{d(`CLOSED`)},onError:()=>{d(`CLOSED`),_.current&&T(N,`connection`)},onMessage:We}},[We,T,D,a,Be]),qe=(0,M.useMemo)(()=>{let e={resend_all:!0};a&&(e.session_api_key=a);let t=s?.[0];return{queryParams:e,reconnect:{enabled:!0},onOpen:async()=>{if(g(`OPEN`),v.current=!0,D(),t?.id&&t.conversation_url)try{let e=await Oe.getEventCount(t.id,t.conversation_url,t.session_api_key);B(e),e===0&&R(!1)}catch{R(!1)}},onClose:()=>{g(`CLOSED`)},onError:()=>{g(`CLOSED`),v.current&&T(N,`connection`)},onMessage:Ge}},[Ge,T,D,a,s]),{socket:Q,reconnect:Je}=Se(Ve||``,Ke),{socket:$,reconnect:Ye}=Se(Z||``,qe),Xe=(0,M.useCallback)(()=>{if(E(),y.getState().conversationMode===`plan`&&Z){Ye();return}Je()},[Z,Je,Ye,E]),Ze=(0,M.useCallback)(async e=>{let n=y.getState().conversationMode===`plan`?$:Q;if(n?.readyState!==WebSocket.OPEN){if(!t){let e=Error(`No conversation ID available`);throw T(e.message),e}try{return await new l(f()).sendEvent(t,{role:`user`,content:e.content},{run:!0}),{queued:!0}}catch(e){throw T(e instanceof Error?e.message:`Failed to queue message for delivery`),e}}try{return n.send(JSON.stringify({...e,run:!0})),{queued:!1}}catch(e){throw T(e instanceof Error?e.message:`Failed to send message`),e}},[Q,$,T,t]);(0,M.useEffect)(()=>{Q&&Ve&&(()=>{switch(Q.readyState){case WebSocket.CONNECTING:d(`CONNECTING`);break;case WebSocket.OPEN:d(`OPEN`);break;case WebSocket.CLOSING:d(`CLOSING`);break;case WebSocket.CLOSED:d(`CLOSED`);break;default:d(`CLOSED`);break}})()},[Q,Ve]),(0,M.useEffect)(()=>{$&&Z&&(()=>{switch($.readyState){case WebSocket.CONNECTING:g(`CONNECTING`);break;case WebSocket.OPEN:g(`OPEN`);break;case WebSocket.CLOSING:g(`CLOSING`);break;case WebSocket.CLOSED:g(`CLOSED`);break;default:g(`CLOSED`);break}})()},[$,Z]);let Qe=(0,M.useMemo)(()=>({connectionState:He,sendMessage:Ze,isLoadingHistory:Ue,reconnect:Xe}),[He,Ze,Ue,Xe]);return(0,Y.jsx)(Fe.Provider,{value:Qe,children:e})}var X=()=>(0,M.useContext)(Fe)||null,Re=e=>(0,Y.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:109,height:109,viewBox:`0 0 109 109`,fill:`none`,...e,children:[(0,Y.jsx)(`path`,{d:`M40.1979 21.8969L34.7311 17.832L25.2691 30.5574L20.2094 26.784L16.1367 32.2451L26.6653 40.0969L40.1979 21.8969Z`,fill:`currentColor`}),(0,Y.jsx)(`path`,{d:`M90.8342 35.1983H50.4639V28.3858H90.8342V35.1983Z`,fill:`currentColor`}),(0,Y.jsx)(`path`,{d:`M90.8342 57.9067H50.4638V51.0942H90.8342V57.9067Z`,fill:`currentColor`}),(0,Y.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M27.2508 63.5837C32.2674 63.5837 36.3342 59.517 36.3342 54.5004C36.3342 49.4838 32.2674 45.4171 27.2508 45.4171C22.2342 45.4171 18.1675 49.4838 18.1675 54.5004C18.1675 59.517 22.2342 63.5837 27.2508 63.5837ZM27.2508 59.0421C29.7591 59.0421 31.7925 57.0087 31.7925 54.5004C31.7925 51.9921 29.7591 49.9587 27.2508 49.9587C24.7425 49.9587 22.7092 51.9921 22.7092 54.5004C22.7092 57.0087 24.7425 59.0421 27.2508 59.0421Z`,fill:`currentColor`}),(0,Y.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M36.3342 77.2087C36.3342 82.2253 32.2674 86.2921 27.2508 86.2921C22.2342 86.2921 18.1675 82.2253 18.1675 77.2087C18.1675 72.1922 22.2342 68.1254 27.2508 68.1254C32.2674 68.1254 36.3342 72.1922 36.3342 77.2087ZM31.7925 77.2087C31.7925 79.717 29.7591 81.7504 27.2508 81.7504C24.7425 81.7504 22.7092 79.717 22.7092 77.2087C22.7092 74.7005 24.7425 72.6671 27.2508 72.6671C29.7591 72.6671 31.7925 74.7005 31.7925 77.2087Z`,fill:`currentColor`}),(0,Y.jsx)(`path`,{d:`M50.4637 80.615H90.834V73.8025H50.4637V80.615Z`,fill:`currentColor`})]});export{Pe as a,K as c,Oe as d,U as f,N as g,Ce as h,Ne as i,je as l,we as m,Le as n,J as o,Te as p,X as r,q as s,Re as t,Ae as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime-BFRubm34.js";import{Ct as e,bt as t}from"./vendor-styling-CI0PQ3ab.js";e();var n=t(),r=e=>(0,n.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,n.jsx)(`path`,{d:`M2.25 1.5H9V3H3V21H21V15H22.5V21.75L21.75 22.5H2.25L1.5 21.75V2.25L2.25 1.5Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M22.5 2.25V12H21V4.0605L10.8645 14.1975L9.80402 13.1355L19.9395 3H12V1.5H21.75L22.5 2.25Z`,fill:`currentColor`})]});export{r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-
|
|
1
|
+
import{t as e}from"./createLucideIcon-CVAsW2Yo.js";var t=e(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]);export{t};
|