decocms 3.77.0 → 3.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BYmwGQCf.js → AlertCircle-CKei65yQ.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DpeEXraR.js → ArrowUpRight-BygwtcZ2.js} +1 -1
- package/dist/client/assets/{CheckCircle-Bf3Z61R3.js → CheckCircle-BZlFJbF8.js} +1 -1
- package/dist/client/assets/{ChevronDown-DbkPHjH7.js → ChevronDown-DXOZkIso.js} +1 -1
- package/dist/client/assets/{ChevronLeft-7WikNK_I.js → ChevronLeft-DPLHregZ.js} +1 -1
- package/dist/client/assets/{ChevronRight-CUrrZIqG.js → ChevronRight-BkBgwZxs.js} +1 -1
- package/dist/client/assets/{ChevronUp-BT7nyl6k.js → ChevronUp-BCwumcyZ.js} +1 -1
- package/dist/client/assets/{DotsVertical-BpkGXLrP.js → DotsVertical-DQDEDjEX.js} +1 -1
- package/dist/client/assets/{Eye-D3915Vo9.js → Eye-IocHlobo.js} +1 -1
- package/dist/client/assets/{FilterLines-BDTdg3RE.js → FilterLines-dauCx8Za.js} +1 -1
- package/dist/client/assets/{Globe01-BxZmquSL.js → Globe01-CQy0Cxa-.js} +1 -1
- package/dist/client/assets/{Globe04-CkBzX8xL.js → Globe04-CBuYvlRn.js} +1 -1
- package/dist/client/assets/{HardDrive-Cko4CWL8.js → HardDrive-DSj8WeP3.js} +1 -1
- package/dist/client/assets/{Key01-CAY-Xxyp.js → Key01-ktWRCkRP.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CJuGELXN.js → LayoutLeft-TAhoC2xE.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DluIM9mv.js → LinkExternal01-BenQb5F0.js} +1 -1
- package/dist/client/assets/{Monitor01-bbyGUKmR.js → Monitor01-CF5y8J9X.js} +1 -1
- package/dist/client/assets/{Palette-DLCudjOT.js → Palette-ZSzAttfE.js} +1 -1
- package/dist/client/assets/{Play-I5x_JKdj.js → Play-BrJBHlm8.js} +1 -1
- package/dist/client/assets/{Plus-DOSjIlBe.js → Plus-DptVePQj.js} +1 -1
- package/dist/client/assets/{SearchMd-q-mL98uP.js → SearchMd-DmrRiPsU.js} +1 -1
- package/dist/client/assets/{Settings02-C0s-saqA.js → Settings02-BynaGT2l.js} +1 -1
- package/dist/client/assets/{Shield01-DA5SmW0P.js → Shield01-CGOi4o3B.js} +1 -1
- package/dist/client/assets/{Star01-1ZF9aI5Y.js → Star01-G7bzpuzw.js} +1 -1
- package/dist/client/assets/{Stars01-CWQtskKI.js → Stars01-BxW6Ze_W.js} +1 -1
- package/dist/client/assets/{Stars02-DMdFpBOz.js → Stars02-CJJhFv2L.js} +1 -1
- package/dist/client/assets/{Sun-CVp19c6p.js → Sun-CUZqy0kq.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BMk8DM55.js → SwitchHorizontal01-D04vL0_f.js} +1 -1
- package/dist/client/assets/{Tool01-CHEQOI-w.js → Tool01-hkwqrr6Q.js} +1 -1
- package/dist/client/assets/{Trash01-jgpaQcTh.js → Trash01-Ds3jbDQE.js} +1 -1
- package/dist/client/assets/{Upload01-DmPHnKxK.js → Upload01-Cuswrale.js} +1 -1
- package/dist/client/assets/{User01-CQqeHCY8.js → User01-DJhz4tmk.js} +1 -1
- package/dist/client/assets/{Users01-3CAb_L9A.js → Users01-D1GekRvz.js} +1 -1
- package/dist/client/assets/{Users03-BtWBA-oP.js → Users03-CjtA3d84.js} +1 -1
- package/dist/client/assets/{X-BTPYHIvY.js → X-CvnlrpyG.js} +1 -1
- package/dist/client/assets/XCircle-CTJX6MKF.js +1 -0
- package/dist/client/assets/{XClose-qC8Lq_ms.js → XClose-BbKrO-bh.js} +1 -1
- package/dist/client/assets/{Zap-CVq2f6J2.js → Zap-B-ccy6C4.js} +1 -1
- package/dist/client/assets/{ZapSquare-C3NGLDu-.js → ZapSquare-bUJqwnW3.js} +1 -1
- package/dist/client/assets/{ZoomOut-CjZnoT-b.js → ZoomOut-DRnFWZo9.js} +1 -1
- package/dist/client/assets/{access-gate-CBINLd7U.js → access-gate-CAr_jPZ4.js} +1 -1
- package/dist/client/assets/add-section-modal-DpjAnzTC.js +1 -0
- package/dist/client/assets/agent-icon-BB2_1lHd.js +1 -0
- package/dist/client/assets/agents-list-DhbMkPNU.js +1 -0
- package/dist/client/assets/{ai-providers-47bmrarJ.js → ai-providers-B6285-0G.js} +1 -1
- package/dist/client/assets/{alert-CHc3FYZF.js → alert-B39DYg6q.js} +1 -1
- package/dist/client/assets/{alert-dialog-D2GL5qBd.js → alert-dialog-gK63ktIU.js} +1 -1
- package/dist/client/assets/app-editor-CB02ERjc.js +1 -0
- package/dist/client/assets/{auth-BX6flE6a.js → auth-DxKMCtEO.js} +1 -1
- package/dist/client/assets/{auth-catchall-BpjOaSW9.js → auth-catchall-DAcTzerO.js} +1 -1
- package/dist/client/assets/auth-entry-Bu3ut1b9.js +1 -0
- package/dist/client/assets/{auth-split-layout-HWtMmGAh.js → auth-split-layout-Bo7x5X53.js} +1 -1
- package/dist/client/assets/authenticate-and-persist-oauth-CXYJ_57C.js +1 -0
- package/dist/client/assets/{automation-list-row-CAkQUGBC.js → automation-list-row-BYfl9414.js} +1 -1
- package/dist/client/assets/{automation-runs-BO1vGgx9.js → automation-runs-DiHYOI-G.js} +1 -1
- package/dist/client/assets/automations-Bqn5XkdY.js +1 -0
- package/dist/client/assets/{avatar-BS-jv_DR.js → avatar-CfKY2_hs.js} +1 -1
- package/dist/client/assets/{badge-BcU0uhl8.js → badge-tlnu_6T3.js} +1 -1
- package/dist/client/assets/{block-document-CF604YR_.js → block-document-D35IO4X3.js} +1 -1
- package/dist/client/assets/brand-context-CkTeGoic.js +1 -0
- package/dist/client/assets/{buckets-DVC4Kohh.js → buckets-CDBAN8NB.js} +1 -1
- package/dist/client/assets/{calendar-CbxSTdbI.js → calendar-CaxcRF1k.js} +1 -1
- package/dist/client/assets/{capability-load-error-D-aRp7QN.js → capability-load-error-Bab-5zvo.js} +1 -1
- package/dist/client/assets/{card-BIfVO_jW.js → card-DU2I8eHH.js} +1 -1
- package/dist/client/assets/category-editor-CL_UxJoz.js +1 -0
- package/dist/client/assets/{chat-context-EpSQJI2R.js → chat-context-CdOsOHQ0.js} +6 -6
- package/dist/client/assets/{checkbox-B76UlBUd.js → checkbox-H7xxQ3iC.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BZa-itTp.js → cli-auth-success-K-z0R_Ah.js} +1 -1
- package/dist/client/assets/collection-detail-C5Wn5oY4.js +1 -0
- package/dist/client/assets/{collection-display-button-BP4c4hrD.js → collection-display-button-DTs9IB7s.js} +1 -1
- package/dist/client/assets/{collection-search-DYVCc599.js → collection-search-ClGGT1KV.js} +1 -1
- package/dist/client/assets/{collection-tabs-C0YJH8OQ.js → collection-tabs-xD0Ry7Iv.js} +1 -1
- package/dist/client/assets/{command-Cx31xkYn.js → command-CLZq7t6J.js} +1 -1
- package/dist/client/assets/commerce-onboarding-3oBhw9NK.js +1 -0
- package/dist/client/assets/{connect-desktop-dialog-C3zpTl9v.js → connect-desktop-dialog-BCsFp2qg.js} +1 -1
- package/dist/client/assets/{connection-card-C3_U3j25.js → connection-card-CrUjfVJB.js} +1 -1
- package/dist/client/assets/connection-detail-BaKSwWVH.js +1 -0
- package/dist/client/assets/{connection-form-helpers-QpFovVZo.js → connection-form-helpers-BqpyRjgd.js} +1 -1
- package/dist/client/assets/connections-W9DsG8aw.js +1 -0
- package/dist/client/assets/{context-menu-DX4dPYJO.js → context-menu-CqLno4KJ.js} +1 -1
- package/dist/client/assets/{decopilot-DaDKMLey.js → decopilot-B2PnahSO.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CcKrM-Xv.js → decopilot-sse-pool-D8ZetksK.js} +1 -1
- package/dist/client/assets/{dialog-DGhL6eBy.js → dialog-9Dal6l7D.js} +1 -1
- package/dist/client/assets/{domain-settings-C1EU9nuj.js → domain-settings-L_Aj9ndM.js} +1 -1
- package/dist/client/assets/{drawer-B9Cs5iI_.js → drawer-DW4IYbB1.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CiC9tTdb.js → dropdown-menu-DveShRRm.js} +1 -1
- package/dist/client/assets/{empty-state-yOW3dSH7.js → empty-state-b7tnb7q2.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Cmd1hHZE.js → extract-connection-data-BL81V9PY.js} +1 -1
- package/dist/client/assets/file-explorer-0kznGCON.js +2 -0
- package/dist/client/assets/{file-type-icon-C0VVPUpN.js → file-type-icon-hjib5alc.js} +1 -1
- package/dist/client/assets/{files-BJZQ0FpY.js → files-x3Ne7hb6.js} +1 -1
- package/dist/client/assets/{form-CaHcodeJ.js → form-6Nre8f-k.js} +1 -1
- package/dist/client/assets/{general-DvXPbO2X.js → general-BuYCdj0r.js} +1 -1
- package/dist/client/assets/github-repo-picker-CdGt5INt.js +1 -0
- package/dist/client/assets/{hooks-DX86YvO8.js → hooks-Gm6nJHH5.js} +1 -1
- package/dist/client/assets/{image-field-D_fZia_E.js → image-field-CfVmwwEw.js} +1 -1
- package/dist/client/assets/{import-from-deco-dialog-Dn6_-blC.js → import-from-deco-dialog-COzfTmtE.js} +2 -2
- package/dist/client/assets/{index-lWXyO72r.js → index-ARPJar1Z.js} +2 -2
- package/dist/client/assets/{index-CS96E1bw.js → index-BsTDFmrB.js} +1 -1
- package/dist/client/assets/{index-CQF6lVUo.js → index-C5uKx36f.js} +1 -1
- package/dist/client/assets/{index-BiSv4wgs.js → index-C6QaS0Zh.js} +4 -4
- package/dist/client/assets/index-CaL7muMy.js +1 -0
- package/dist/client/assets/{index-D-jSeUPY.js → index-DB4Y8lPy.js} +1 -1
- package/dist/client/assets/{index-m_lmKMTo.js → index-DXWbUTbb.js} +1 -1
- package/dist/client/assets/index-DYNdZRHD.css +1 -0
- package/dist/client/assets/{index-DLBSEic_.js → index-DcLVAN0f.js} +1 -1
- package/dist/client/assets/{index-Cyq8kOmo.js → index-DllFGtwL.js} +1 -1
- package/dist/client/assets/{index-BbdyUut8.js → index-SIbEiNOY.js} +1 -1
- package/dist/client/assets/{index-Bzfd3S0P.js → index-_NByWM-i.js} +2 -2
- package/dist/client/assets/index-gAhVY6Qu.js +1 -0
- package/dist/client/assets/{index-DAfY2rvi.js → index-ki8HSB2c.js} +12 -12
- package/dist/client/assets/{index-redirect--cQpprvo.js → index-redirect-ChQQXx0A.js} +1 -1
- package/dist/client/assets/{index-BdFUyuzp.js → index-royGCF58.js} +1 -1
- package/dist/client/assets/{input-Ta_Y1lvO.js → input-szhd6Snj.js} +1 -1
- package/dist/client/assets/integration-icon-XSMgSpds.js +1 -0
- package/dist/client/assets/{label-C8gqICzJ.js → label-Bjb_vEVQ.js} +1 -1
- package/dist/client/assets/{login-15LhOBnr.js → login-C6SDd68X.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D0PDq8qp.js → mcp-oauth-8Oqz2kjD.js} +1 -1
- package/dist/client/assets/{members-BCHlqZ_l.js → members-BZMsTuPj.js} +2 -2
- package/dist/client/assets/{monaco-editor-B83AZ8GN.js → monaco-editor-Bzp2tCW_.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CH_Ju-wa.js → monitoring-stats-row-Q-gDhXN7.js} +1 -1
- package/dist/client/assets/{oauth-callback-ix708N30.js → oauth-callback-C41rH1zN.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BB5BJd2l.js → oauth-callback-ai-provider-L9Z7KnVB.js} +1 -1
- package/dist/client/assets/{onboarding-CMCNAluc.js → onboarding-sxFOChym.js} +1 -1
- package/dist/client/assets/{org-install-DrK1M64X.js → org-install-DjUJMgS3.js} +1 -1
- package/dist/client/assets/{org-layout-C6zhzHkR.js → org-layout-C4CQO9nz.js} +1 -1
- package/dist/client/assets/{organization-choice-B6-OJzO9.js → organization-choice-CPVuyoim.js} +1 -1
- package/dist/client/assets/{page-seo-form-BzBYlYXK.js → page-seo-form--ih05Y7N.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BGthAy6g.js +1 -0
- package/dist/client/assets/{popover-BlGotCa-.js → popover-CJ-idfVW.js} +1 -1
- package/dist/client/assets/post-editor-BhGUUjQx.js +1 -0
- package/dist/client/assets/{preview-dialog-BTdQ1TvF.js → preview-dialog-WfNb4k8L.js} +1 -1
- package/dist/client/assets/{primitives-CKYU8UlB.js → primitives-BmQhQ3Bl.js} +1 -1
- package/dist/client/assets/{profile-B5aimk1S.js → profile-C2hbZXR_.js} +1 -1
- package/dist/client/assets/project-app-view-QWISlKTP.js +1 -0
- package/dist/client/assets/record-editor-D9nFQqRP.js +1 -0
- package/dist/client/assets/registry-C4EXobcg.js +2 -0
- package/dist/client/assets/{registry-layout-DsXkT4KV.js → registry-layout-BSbINHnj.js} +4 -4
- package/dist/client/assets/{require-capability-XP_1zPNl.js → require-capability-D2kIyw8V.js} +1 -1
- package/dist/client/assets/{required-auth-layout-qIDzSGtQ.js → required-auth-layout-BbLd1LMa.js} +1 -1
- package/dist/client/assets/{reset-password-RZU_bfNW.js → reset-password-lidTRlgJ.js} +1 -1
- package/dist/client/assets/roles-7cj_C6tf.js +1 -0
- package/dist/client/assets/save-referenced-block-Dw7QM0hK.js +1 -0
- package/dist/client/assets/{save-status-Bwyidu0s.js → save-status-BkW3fzUs.js} +1 -1
- package/dist/client/assets/{schema-form-CTQz2kTF.js → schema-form-Cg7Lxy8-.js} +1 -1
- package/dist/client/assets/{scroll-area-iBbwLoaH.js → scroll-area-Dz-FqKWj.js} +7 -7
- package/dist/client/assets/{search-input-CHOe8stk.js → search-input-DjVPTtCb.js} +1 -1
- package/dist/client/assets/{secrets-DqovOx3Q.js → secrets-BJZgSFDD.js} +1 -1
- package/dist/client/assets/{sections-editor-PK5zsI1T.js → sections-editor-ez2BbDtS.js} +1 -1
- package/dist/client/assets/{select-D9WchHFw.js → select-FwtHY18v.js} +1 -1
- package/dist/client/assets/{select-model-D4uK7qW2.js → select-model-Bf7O5MiJ.js} +1 -1
- package/dist/client/assets/seo-editor-BtQCMu5l.js +1 -0
- package/dist/client/assets/{settings-layout-CtPsdD9d.js → settings-layout-DDlBA-ta.js} +1 -1
- package/dist/client/assets/{settings-section-XLADU1Ft.js → settings-section-PIk2gDH0.js} +1 -1
- package/dist/client/assets/{sheet-DcscOrN-.js → sheet-BvSpiY2r.js} +1 -1
- package/dist/client/assets/{shell-controls-DCNtyoPf.js → shell-controls-C08RpHmT.js} +1 -1
- package/dist/client/assets/{shell-layout-78V1nK9o.js → shell-layout-BWQLmjyW.js} +1 -1
- package/dist/client/assets/{shell-route-loading-Drp-Ml9n.js → shell-route-loading-Cf96p6By.js} +1 -1
- package/dist/client/assets/{sidebar-BHU7Y-eK.js → sidebar-LVNues-1.js} +1 -1
- package/dist/client/assets/{skeleton-DYsLWJ4s.js → skeleton-B8_-zyKb.js} +1 -1
- package/dist/client/assets/{sortable.esm-DYnQaz_O.js → sortable.esm-DHMK7_tT.js} +1 -1
- package/dist/client/assets/{sso-CUKcu8bh.js → sso-CRuWYtBt.js} +1 -1
- package/dist/client/assets/{store-D0RG8VnF.js → store-73nRfAHP.js} +1 -1
- package/dist/client/assets/store-registry-Dj2QFrh5.js +2 -0
- package/dist/client/assets/{studio-tools-B6e1wIqk.js → studio-tools-CJMVZA0W.js} +1 -1
- package/dist/client/assets/{switch-B0g5vIO8.js → switch-YOR9drgK.js} +1 -1
- package/dist/client/assets/{table-CuanbdKo.js → table-COWO-rWc.js} +1 -1
- package/dist/client/assets/{tabs-DfpltS-P.js → tabs-CsXXbMGG.js} +1 -1
- package/dist/client/assets/task-status-D4qDcTy4.js +1 -0
- package/dist/client/assets/{textarea-ji5jId4g.js → textarea-BTbunR8j.js} +1 -1
- package/dist/client/assets/{toggle-group-B5UDI72A.js → toggle-group-CSMS4HAA.js} +1 -1
- package/dist/client/assets/{toolbar-BMWZipjQ.js → toolbar-CvxN3T7P.js} +1 -1
- package/dist/client/assets/{tooltip-BIAup3vg.js → tooltip-BdbfQCYl.js} +1 -1
- package/dist/client/assets/{types-DmsJ1dgA.js → types-D18PqArI.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CSwg9ID-.js → use-ai-providers-CiBlqHeC.js} +1 -1
- package/dist/client/assets/{use-automations-Cm2EUHDJ.js → use-automations-44dHfXzj.js} +1 -1
- package/dist/client/assets/use-capability-DH5i0nun.js +1 -0
- package/dist/client/assets/{use-clock-tick-BH2ii9Ri.js → use-clock-tick-bD6VBNNM.js} +1 -1
- package/dist/client/assets/{use-collections-DYVhZ6LZ.js → use-collections-DaAI2dS_.js} +1 -1
- package/dist/client/assets/{use-connection-CYq4sTpp.js → use-connection-z93iohVP.js} +1 -1
- package/dist/client/assets/{use-copy-BL1Gi5Ma.js → use-copy-_XYMvM2G.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BbTDDIhz.js → use-create-virtual-mcp-BA4rAHKP.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BWXIh3Xt.js → use-debounced-autosave-CaWQv8Ap.js} +1 -1
- package/dist/client/assets/use-deco-credits-C3sjfJyT.js +1 -0
- package/dist/client/assets/{use-delete-connection-BP0n__7X.js → use-delete-connection-ftKt28t_.js} +1 -1
- package/dist/client/assets/{use-file-configs-3VHkoOl7.js → use-file-configs-CS1kf1Mx.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CsW5GqEa.js → use-infinite-scroll-CUe3Elw1.js} +1 -1
- package/dist/client/assets/{use-join-requests-BtpSJ5cA.js → use-join-requests-iCFOb_l5.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BcfXwx2l.js → use-mcp-client-DZQbnef-.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-h_GWEUu_.js → use-mcp-prompts-CDHTi3et.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DhZgsJaJ.js → use-mcp-tools-DOD2Zkcv.js} +1 -1
- package/dist/client/assets/{use-members-K1wagpAk.js → use-members-Cgp-qtNm.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-GOxU3Hpn.js → use-navigate-to-agent-DUbEZuBm.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CMUSTibk.js → use-org-auth-client-TLh9Nsd6.js} +1 -1
- package/dist/client/assets/{use-org-sso-BJNpFjMG.js → use-org-sso-BhXMb9mL.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CnWjq4nf.js → use-organization-roles-Dua0G_kp.js} +1 -1
- package/dist/client/assets/use-organization-settings-Bjk_kH1I.js +1 -0
- package/dist/client/assets/{use-registry-connections-CQIqYcvJ.js → use-registry-connections-DfipPXqa.js} +1 -1
- package/dist/client/assets/{use-secrets-B69dGKd4.js → use-secrets-DCPSjnYq.js} +1 -1
- package/dist/client/assets/{use-status-sounds-B38RTJiB.js → use-status-sounds-DFtMiuOm.js} +1 -1
- package/dist/client/assets/{use-view-mode-DyryORIA.js → use-view-mode-tunDtZ1F.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-B9JwuB8w.js → use-virtual-mcp-BCkbHrLW.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CX9x55X-.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-C_SaQkGF.js +1 -0
- package/dist/client/assets/variant-calendar-hE6C_kQd.js +1 -0
- package/dist/client/assets/{view-mode-toggle-Bt_jVM0U.js → view-mode-toggle-B1Thrh1l.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/ArrowRight-CvF16wpP.js +0 -1
- package/dist/client/assets/XCircle-BODgW7sH.js +0 -1
- package/dist/client/assets/add-section-modal-A1TEpk88.js +0 -1
- package/dist/client/assets/agent-icon-s6bX_I9L.js +0 -1
- package/dist/client/assets/agents-list-yRMR0cF5.js +0 -1
- package/dist/client/assets/app-editor-DjZhxnMe.js +0 -1
- package/dist/client/assets/auth-entry-DfGml_TH.js +0 -1
- package/dist/client/assets/automations-DQeUsmtv.js +0 -1
- package/dist/client/assets/brand-context-2XxEjOnF.js +0 -1
- package/dist/client/assets/category-editor-BfrojdBX.js +0 -1
- package/dist/client/assets/collection-detail-BNS2Iwl7.js +0 -1
- package/dist/client/assets/commerce-onboarding-Bx2cQDUo.js +0 -1
- package/dist/client/assets/connection-detail-DttTci9g.js +0 -1
- package/dist/client/assets/connections-4YYDTDW3.js +0 -1
- package/dist/client/assets/file-explorer-CRI6MNvr.js +0 -2
- package/dist/client/assets/github-repo-picker-CtfOBr8M.js +0 -1
- package/dist/client/assets/index-BITgxoqa.css +0 -1
- package/dist/client/assets/index-CAejfhLf.js +0 -1
- package/dist/client/assets/index-IC_7I4E3.js +0 -1
- package/dist/client/assets/integration-icon-DDugmSqH.js +0 -1
- package/dist/client/assets/page-seo-sheet-BI1e3r-Y.js +0 -1
- package/dist/client/assets/post-editor-DayUNdZ0.js +0 -1
- package/dist/client/assets/project-app-view-Dnb_LmK_.js +0 -1
- package/dist/client/assets/record-editor-BY0yu0r9.js +0 -1
- package/dist/client/assets/registry-CcuEWwCn.js +0 -2
- package/dist/client/assets/roles-CT6FH28_.js +0 -1
- package/dist/client/assets/save-referenced-block-CMl5gaJM.js +0 -1
- package/dist/client/assets/seo-editor-Dwigxdky.js +0 -1
- package/dist/client/assets/store-registry-l1zQEo3-.js +0 -2
- package/dist/client/assets/task-status-B9Z3_U-A.js +0 -1
- package/dist/client/assets/use-capability-jAHdTjWn.js +0 -1
- package/dist/client/assets/use-deco-credits-CjVry_TJ.js +0 -1
- package/dist/client/assets/use-organization-settings-CbMA9tyx.js +0 -1
- package/dist/client/assets/useInfiniteQuery-nR5oOHHR.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-mFFPqXZc.js +0 -1
- package/dist/client/assets/variant-calendar-CisCsFL5.js +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as Ke,r as l,j as i,i as re,B as fe,l as Ve,I as ut,t as $,K as Te}from"./index-BiSv4wgs.js";import{F as mt,l as pt}from"./index-BbdyUut8.js";import{e as ht,at as xt,au as gt,av as ae,aw as yt,N as $e}from"./agent-icon-s6bX_I9L.js";import{a as wt}from"./Tool01-CHEQOI-w.js";import{s as jt}from"./XClose-qC8Lq_ms.js";import{S as bt}from"./scroll-area-iBbwLoaH.js";import{b as Oe,T as Re,a as ze}from"./tooltip-BIAup3vg.js";import{f as vt,a as Ct,b as Nt,c as St,d as Dt,e as kt,A as Ft,g as Lt}from"./alert-dialog-D2GL5qBd.js";import{u as Et}from"./chat-context-EpSQJI2R.js";import{b as Pt}from"./shell-layout-78V1nK9o.js";import{ae as le,af as Ae,ag as Tt}from"./index-DAfY2rvi.js";import{a as $t,b as Ot,D as Rt,e as zt,c as At,d as It}from"./dialog-DGhL6eBy.js";import{I as Ie}from"./input-Ta_Y1lvO.js";import{b as Wt,C as _,a as We,c as Mt,d as Kt}from"./context-menu-DX4dPYJO.js";import{t as Vt}from"./ChevronDown-DbkPHjH7.js";import{i as Bt}from"./ChevronRight-CUrrZIqG.js";import{a as Gt}from"./ZoomOut-CjZnoT-b.js";import{E as qt,z as Me,A as he,B as Qt,C as Ut,D as Jt,G as M,I as ce,g as xe,J as ge,K as Ht,M as Xt,N as ye,O as de,P as we,Q as Yt,U as Zt}from"./preview-dialog-BTdQ1TvF.js";import"./AlertCircle-BYmwGQCf.js";import"./SwitchHorizontal01-BMk8DM55.js";import"./Settings02-C0s-saqA.js";import"./XCircle-BODgW7sH.js";import"./ArrowRight-CvF16wpP.js";import"./ArrowUpRight-DpeEXraR.js";import"./ZapSquare-C3NGLDu-.js";import"./Users03-BtWBA-oP.js";import"./CheckCircle-Bf3Z61R3.js";import"./ChevronUp-BT7nyl6k.js";import"./ChevronLeft-7WikNK_I.js";import"./DotsVertical-BpkGXLrP.js";import"./Stars02-DMdFpBOz.js";import"./Eye-D3915Vo9.js";import"./Globe01-BxZmquSL.js";import"./FilterLines-BDTdg3RE.js";import"./Star01-1ZF9aI5Y.js";import"./Globe04-CkBzX8xL.js";import"./HardDrive-Cko4CWL8.js";import"./Key01-CAY-Xxyp.js";import"./LayoutLeft-CJuGELXN.js";import"./LinkExternal01-DluIM9mv.js";import"./Monitor01-bbyGUKmR.js";import"./Sun-CVp19c6p.js";import"./Palette-DLCudjOT.js";import"./Play-I5x_JKdj.js";import"./Plus-DOSjIlBe.js";import"./SearchMd-q-mL98uP.js";import"./Shield01-DA5SmW0P.js";import"./Stars01-CWQtskKI.js";import"./Trash01-jgpaQcTh.js";import"./Upload01-DmPHnKxK.js";import"./User01-CQqeHCY8.js";import"./Users01-3CAb_L9A.js";import"./X-BTPYHIvY.js";import"./Zap-CVq2f6J2.js";import"./use-clock-tick-BH2ii9Ri.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BL1Gi5Ma.js";import"./file-type-icon-C0VVPUpN.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-DmsJ1dgA.js";import"./use-mcp-client-BcfXwx2l.js";import"./auth-BX6flE6a.js";import"./hooks-DX86YvO8.js";import"./decopilot-sse-pool-CcKrM-Xv.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-B6e1wIqk.js";import"./sheet-DcscOrN-.js";import"./integration-icon-DDugmSqH.js";import"./use-virtual-mcp-B9JwuB8w.js";import"./use-collections-DYVhZ6LZ.js";import"./use-navigate-to-agent-GOxU3Hpn.js";import"./use-connection-CYq4sTpp.js";import"./use-mcp-prompts-h_GWEUu_.js";import"./form-CaHcodeJ.js";import"./label-C8gqICzJ.js";import"./select-D9WchHFw.js";import"./use-ai-providers-CSwg9ID-.js";import"./use-organization-settings-CbMA9tyx.js";import"./avatar-BS-jv_DR.js";import"./required-auth-layout-qIDzSGtQ.js";import"./use-org-sso-BJNpFjMG.js";import"./index-lWXyO72r.js";import"./drawer-B9Cs5iI_.js";import"./collection-search-DYVCc599.js";import"./tabs-DfpltS-P.js";import"./toggle-group-B5UDI72A.js";import"./use-deco-credits-CjVry_TJ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-C3_U3j25.js";import"./use-registry-connections-CQIqYcvJ.js";import"./useInfiniteQuery-nR5oOHHR.js";import"./use-infinite-scroll-CsW5GqEa.js";import"./extract-connection-data-Cmd1hHZE.js";import"./card-BIfVO_jW.js";import"./collection-tabs-C0YJH8OQ.js";import"./badge-BcU0uhl8.js";import"./textarea-ji5jId4g.js";import"./connection-form-helpers-QpFovVZo.js";import"./useSuspenseInfiniteQuery-mFFPqXZc.js";import"./mcp-oauth-D0PDq8qp.js";import"./connect-desktop-dialog-C3zpTl9v.js";import"./decopilot-DaDKMLey.js";import"./checkbox-B76UlBUd.js";import"./skeleton-DYsLWJ4s.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-XLADU1Ft.js";import"./popover-BlGotCa-.js";import"./command-Cx31xkYn.js";import"./index-DLBSEic_.js";import"./dropdown-menu-CiC9tTdb.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B38RTJiB.js";import"./empty-state-yOW3dSH7.js";import"./toolbar-BMWZipjQ.js";import"./use-mcp-tools-DhZgsJaJ.js";import"./use-capability-jAHdTjWn.js";import"./shell-route-loading-Drp-Ml9n.js";import"./index-Cyq8kOmo.js";import"./switch-B0g5vIO8.js";import"./use-debounced-autosave-BWXIh3Xt.js";import"./index-D-jSeUPY.js";import"./sidebar-BHU7Y-eK.js";import"./search-input-CHOe8stk.js";import"./github-repo-picker-CtfOBr8M.js";import"./use-secrets-B69dGKd4.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./view-mode-toggle-Bt_jVM0U.js";import"./select-model-D4uK7qW2.js";import"./use-automations-Cm2EUHDJ.js";import"./monaco-editor-B83AZ8GN.js";import"./automation-runs-BO1vGgx9.js";import"./table-CuanbdKo.js";import"./use-members-K1wagpAk.js";import"./use-org-auth-client-CMUSTibk.js";import"./task-status-B9Z3_U-A.js";import"./automation-list-row-CAkQUGBC.js";const _t={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function en(y){const e=Ke.c(51),{open:c,mode:K,initialName:X,parentLabel:Q,isPending:A,onSubmit:V,onOpenChange:P}=y,I=X===void 0?"":X,o=A===void 0?!1:A,[p,O]=l.useState(I),[W,B]=l.useState(c),f=_t[K];c!==W&&(B(c),c&&O(I));let F;e[0]!==o||e[1]!==P?(F=E=>{!E&&!o&&P(!1)},e[0]=o,e[1]=P,e[2]=F):F=e[2];const U=F;let G;e[3]!==o||e[4]!==p||e[5]!==V?(G=async E=>{E.preventDefault();const z=p.trim();!z||o||await V(z)},e[3]=o,e[4]=p,e[5]=V,e[6]=G):G=e[6];const q=G;let L;e[7]!==f.title?(L=i.jsx($t,{children:f.title}),e[7]=f.title,e[8]=L):L=e[8];let N;e[9]!==f.description?(N=i.jsx(Ot,{children:f.description}),e[9]=f.description,e[10]=N):N=e[10];let R;e[11]!==L||e[12]!==N?(R=i.jsxs(Rt,{children:[L,N]}),e[11]=L,e[12]=N,e[13]=R):R=e[13];let S;e[14]!==Q?(S=Q&&i.jsxs("div",{className:"space-y-1.5",children:[i.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),i.jsx(Ie,{value:Q,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=Q,e[15]=S):S=e[15];let D;e[16]===Symbol.for("react.memo_cache_sentinel")?(D=i.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=D):D=e[16];let j;e[17]===Symbol.for("react.memo_cache_sentinel")?(j=E=>O(E.target.value),e[17]=j):j=e[17];let b;e[18]!==f.placeholder||e[19]!==o||e[20]!==p?(b=i.jsxs("div",{className:"space-y-1.5",children:[D,i.jsx(Ie,{id:"file-explorer-name",value:p,onChange:j,placeholder:f.placeholder,autoFocus:!0,disabled:o})]}),e[18]=f.placeholder,e[19]=o,e[20]=p,e[21]=b):b=e[21];let h;e[22]!==b||e[23]!==S?(h=i.jsxs("div",{className:"space-y-4 py-4",children:[S,b]}),e[22]=b,e[23]=S,e[24]=h):h=e[24];let x;e[25]!==P?(x=()=>P(!1),e[25]=P,e[26]=x):x=e[26];let v;e[27]!==o||e[28]!==x?(v=i.jsx(fe,{type:"button",variant:"outline",onClick:x,disabled:o,children:"Cancel"}),e[27]=o,e[28]=x,e[29]=v):v=e[29];let C;e[30]!==o||e[31]!==p?(C=!p.trim()||o,e[30]=o,e[31]=p,e[32]=C):C=e[32];let u;e[33]!==f.submit||e[34]!==o?(u=o?i.jsxs(i.Fragment,{children:[i.jsx(re,{size:14,className:"animate-spin"}),"Saving…"]}):f.submit,e[33]=f.submit,e[34]=o,e[35]=u):u=e[35];let k;e[36]!==C||e[37]!==u?(k=i.jsx(fe,{type:"submit",disabled:C,children:u}),e[36]=C,e[37]=u,e[38]=k):k=e[38];let m;e[39]!==v||e[40]!==k?(m=i.jsxs(zt,{children:[v,k]}),e[39]=v,e[40]=k,e[41]=m):m=e[41];let g;e[42]!==q||e[43]!==h||e[44]!==m||e[45]!==R?(g=i.jsx(At,{className:"sm:max-w-md",children:i.jsxs("form",{onSubmit:q,children:[R,h,m]})}),e[42]=q,e[43]=h,e[44]=m,e[45]=R,e[46]=g):g=e[46];let T;return e[47]!==U||e[48]!==c||e[49]!==g?(T=i.jsx(It,{open:c,onOpenChange:U,children:g}),e[47]=U,e[48]=c,e[49]=g,e[50]=T):T=e[50],T}const tn="#d9a441";function nn(y){const e=Ke.c(45),{node:c,depth:K,isExpanded:X,isSelected:Q,isLoading:A,fileVisual:V,onOpen:P,onSelect:I,onNewFile:o,onNewFolder:p,onCopyPath:O,onCopyRelativePath:W,onRename:B,onDelete:f}=y,F=A===void 0?!1:A,U=c.kind==="directory",{Icon:G,color:q}=V,L=Q&&"bg-accent";let N;e[0]!==L?(N=Ve("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",L),e[0]=L,e[1]=N):N=e[1];const R=`${K*14+8}px`;let S;e[2]!==R?(S={paddingLeft:R},e[2]=R,e[3]=S):S=e[3];let D;e[4]!==P||e[5]!==I?(D=()=>{I(),P()},e[4]=P,e[5]=I,e[6]=D):D=e[6];let j;e[7]!==G||e[8]!==q||e[9]!==U||e[10]!==X||e[11]!==F?(j=U?i.jsxs(i.Fragment,{children:[F?i.jsx(re,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):X?i.jsx(Vt,{size:14,className:"shrink-0 text-muted-foreground"}):i.jsx(Bt,{size:14,className:"shrink-0 text-muted-foreground"}),i.jsx(Gt,{size:16,className:"shrink-0",style:{color:tn}})]}):i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"w-3.5 shrink-0"}),i.jsx(G,{size:16,className:"shrink-0",style:{color:q}})]}),e[7]=G,e[8]=q,e[9]=U,e[10]=X,e[11]=F,e[12]=j):j=e[12];let b;e[13]!==c.name?(b=i.jsx("span",{className:"truncate",children:c.name}),e[13]=c.name,e[14]=b):b=e[14];let h;e[15]!==N||e[16]!==S||e[17]!==D||e[18]!==j||e[19]!==b?(h=i.jsx(Wt,{asChild:!0,children:i.jsxs("button",{type:"button",className:N,style:S,onClick:D,children:[j,b]})}),e[15]=N,e[16]=S,e[17]=D,e[18]=j,e[19]=b,e[20]=h):h=e[20];let x;e[21]!==o?(x=i.jsx(_,{onSelect:o,children:"New File"}),e[21]=o,e[22]=x):x=e[22];let v;e[23]!==p?(v=i.jsx(_,{onSelect:p,children:"New Folder"}),e[23]=p,e[24]=v):v=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(We,{}),e[25]=C):C=e[25];let u;e[26]!==O?(u=i.jsx(_,{onSelect:O,children:"Copy Path"}),e[26]=O,e[27]=u):u=e[27];let k;e[28]!==W?(k=i.jsx(_,{onSelect:W,children:"Copy Relative Path"}),e[28]=W,e[29]=k):k=e[29];let m;e[30]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(We,{}),e[30]=m):m=e[30];let g;e[31]!==B?(g=i.jsx(_,{onSelect:B,children:"Rename"}),e[31]=B,e[32]=g):g=e[32];let T;e[33]!==f?(T=i.jsx(_,{variant:"destructive",onSelect:f,children:"Delete"}),e[33]=f,e[34]=T):T=e[34];let E;e[35]!==x||e[36]!==v||e[37]!==u||e[38]!==k||e[39]!==g||e[40]!==T?(E=i.jsxs(Mt,{className:"w-52",children:[x,v,C,u,k,m,g,T]}),e[35]=x,e[36]=v,e[37]=u,e[38]=k,e[39]=g,e[40]=T,e[41]=E):E=e[41];let z;return e[42]!==E||e[43]!==h?(z=i.jsxs(Kt,{children:[h,E]}),e[42]=E,e[43]=h,e[44]=z):z=e[44],z}pt.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function je(y,e,c,K){return`/api/${y}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(c)}/${K}`}function rn(y){const e=M(y);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}const sn="#94a3b8";function on(y){const e=y.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?{Icon:ae,color:"#3b82f6"}:e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?{Icon:ae,color:"#d9a441"}:e.endsWith(".json")?{Icon:yt,color:"#cb9b3f"}:e.endsWith(".css")||e.endsWith(".scss")?{Icon:ae,color:"#06b6d4"}:e.endsWith(".html")||e.endsWith(".xml")?{Icon:ae,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(e)?{Icon:wt,color:"#a855f7"}:e.endsWith(".md")||e.endsWith(".mdx")?{Icon:$e,color:"#64748b"}:{Icon:$e,color:sn}}function Ai({orgSlug:y,virtualMcpId:e,branch:c,openPath:K}){const[X,Q]=l.useState({files:[],directories:[],truncated:!1}),{files:A,directories:V}=X,[P,I]=l.useState(new Set),[o,p]=l.useState(null),[O,W]=l.useState(null),[B,f]=l.useState([]),[F,U]=l.useState(""),[G,q]=l.useState(!1),[L,N]=l.useState(!1),[,R]=l.useState(new Set),[S,D]=l.useState(new Set),j=l.useRef(0),b=l.useRef(null),h=l.useRef(new Set),x=l.useRef(new Map);function v(t){R(n=>{const r=typeof t=="function"?t(n):t;return h.current=r,r})}const[C,u]=l.useState(new Map),k=l.useRef(null),[m,g]=l.useState(null),{sendMessage:T}=Et(),{setChatOpen:E}=Pt(),z=ut(),[w,J]=l.useState(null),[H,ue]=l.useState(null),[ee,ie]=l.useState(!1);async function te(t,n){const r=await fetch(je(y,e,c,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const s=await r.json().catch(()=>({}));throw new Error(s.error??`Request failed (${r.status})`)}return r.json()}async function se(){z.invalidateQueries({queryKey:Ae(y,e,c)})}function be(t,n){navigator.clipboard.writeText(n).then(()=>$.success(`${t} copied`),()=>$.error(`Failed to copy ${t.toLowerCase()}`))}function Be(t){const n=Yt(t);if(!n)return;const r=`${y}/${e}/${c}`;z.setQueryData(Te.decofile(r),s=>{if(!s)return s;const{[n]:a,...d}=s;return d}),z.invalidateQueries({queryKey:Te.liveMeta(r)})}function Ge(t){const n=t.kind==="file"?[t.path]:A.filter(r=>r.startsWith(".deco/blocks/")).map(r=>ce(r)).filter(r=>r===t.path||r.startsWith(`${t.path}/`));for(const r of n)Be(r)}function qe(t){const n=ce(t);return B.filter(r=>{if(r!==n&&!r.startsWith(`${n}/`))return!1;const s=C.get(r);return!!(s?.loaded&&s.editorValue!==s.savedContent)})}function ve(t){f(n=>n.map(r=>t(r)).filter(r=>r!==null)),p(n=>n&&t(n)),u(n=>{const r=new Map;for(const[s,a]of n){const d=t(s);d&&r.set(d,a)}return r}),W(n=>{if(!n)return n;const r=t(n.path);return r?r===n.path?n:{...n,path:r,name:r.split("/").pop()??r}:null})}function Qe(t){const n=ce(t);W(r=>r&&(r.path===n||r.path.startsWith(`${n}/`)?null:r)),ve(r=>r===n||r.startsWith(`${n}/`)?null:r)}async function Ue(t){if(!w)return;const n=de(w.parentDir,t);if(we(n,A,V))throw new Error(`"${t}" already exists`);await te("write",{path:M(n),content:""}),await ne(),await se(),J(null),me(n)}async function Je(t){if(!w)return;const n=de(w.parentDir,t);if(we(n,A,V))throw new Error(`"${t}" already exists`);const r=M(n);await te("mkdir",{path:r}),Q(s=>({...s,directories:s.directories.includes(r)?s.directories:[...s.directories,r]})),await ne(),await se(),J(null),I(s=>{const a=new Set(s);for(const d of he(n))a.add(d);return a.add(n),a}),W({name:t,path:n,kind:"directory",children:[]})}async function He(t){if(!w)return;const n=w.node.path,r=ye(n),s=de(r,t);if(s===n){J(null);return}if(we(s,A,V))throw new Error(`"${t}" already exists`);await te("rename",{from:M(n),to:M(s)}),ve(a=>a===n?s:a.startsWith(`${n}/`)?de(s,a.slice(n.length+1)):a),await ne(),await se(),J(null)}async function Xe(t){ie(!0);try{await te("unlink",{path:M(t.path),recursive:t.kind==="directory"}),Ge(t),Qe(t.path),await ne(),await se(),ue(null),$.success(`Deleted "${t.name}"`)}catch(n){$.error(n instanceof Error?n.message:"Delete failed")}finally{ie(!1)}}async function Ye(t){const n=Xt(t);if(n){$.error(n);return}ie(!0);try{w?.mode==="new-file"?(await Ue(t),$.success(`Created "${t}"`)):w?.mode==="new-folder"?(await Je(t),$.success(`Created folder "${t}"`)):w?.mode==="rename"&&(await He(t),$.success(`Renamed to "${t}"`))}catch(r){$.error(r instanceof Error?r.message:"Operation failed")}finally{ie(!1)}}const Ce=l.useRef(!1);Ce.current||(Ce.current=!0,b.current=ne());const[Ze,_e]=l.useState(null);if(K&&K!==Ze){_e(K);const t=K;queueMicrotask(()=>{rn(t)&&me(t).catch(n=>{$.error(n instanceof Error?n.message:"Failed to open file")})})}async function Ne(t){const n=await te("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Se(t,n,r){if(r!==j.current)return!1;let s=!1;return Q(a=>{const d=n?Zt(a.files,a.directories,t,a.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return s=!!d.truncated,{files:d.files,directories:d.directories,truncated:s}}),s&&$.warning("File list truncated — some files may be hidden"),s}async function et(t){const n=x.current.get(t);if(n)return n;const r=j.current,s=(async()=>{const a=await Ne({pattern:"**/*",path:M(t),limit:Me}),d=Se(a,!0,r);return!d&&r===j.current&&v(Y=>{const oe=new Set(Y);return oe.add(t),oe}),d})();x.current.set(t,s);try{return await s}finally{x.current.delete(t)}}async function De(t){if(!ge(t,h.current))return!1;D(n=>new Set(n).add(t));try{return await et(t)}finally{D(n=>{const r=new Set(n);return r.delete(t),r})}}async function tt(t){const n=new Set(h.current);for(const r of he(t)){if(!ge(r,n))continue;if(await De(r))throw new Error("Folder listing truncated — expand again to load more");n.add(r)}}async function ne(){const t=++j.current;x.current.clear(),q(!0),v(new Set),I(new Set),D(new Set);try{const n=await Ne({pattern:"**/*",limit:Me,maxDepth:qt});Se(n,!1,t),N(!0)}catch{L&&$.error("Failed to refresh file tree")}finally{q(!1)}}async function ke(t){if(!C.get(t)?.loaded){u(r=>{const s=new Map(r);return s.set(t,{savedContent:"",editorValue:"",loaded:!1}),s});try{const r=await fetch(je(y,e,c,"read"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:M(t),full:!0})});if(!r.ok)return;const s=await r.json(),a=Ht(s.content??"");u(d=>{const Y=new Map(d);return Y.set(t,{savedContent:a,editorValue:a,loaded:!0}),Y})}catch{}}}async function nt(t,n){try{const r=await fetch(je(y,e,c,"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:M(t),content:n})});if(!r.ok){le("file save failed",{path:t,status:r.status});return}le("file saved via sandbox /write",{path:t}),z.invalidateQueries({queryKey:Ae(y,e,c)});try{const s=await Tt(y,e,c);le("git status after save",s)}catch(s){le("git status after save failed",{path:t,error:s instanceof Error?s.message:String(s)})}u(s=>{const a=new Map(s),d=a.get(t);return d&&a.set(t,{...d,savedContent:n}),a})}catch{}}function rt(t){p(t),W({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),g(null),B.includes(t)||f(n=>[...n,t]),ke(t)}function it(t){f(n=>{const r=n.filter(s=>s!==t);return o===t&&p(r[r.length-1]??null),r}),u(n=>{const r=new Map(n);return r.delete(t),r})}function Fe(t){I(n=>{const r=new Set(n);return r.has(t)?r.delete(t):r.add(t),r})}async function st(t){if(ge(t,h.current))try{if(await De(t))return}catch(n){$.error(n instanceof Error?n.message:"Failed to load folder");return}Fe(t)}async function ot(t,n){if(n){Fe(t);return}await st(t)}async function me(t){await b.current,await tt(t);const n=he(t);I(r=>{const s=new Set(r);for(const a of n)s.add(a);return s}),rt(t)}function at(){return O?.kind==="directory"?O.path:O?.kind==="file"?ye(O.path):o?ye(o):"/"}function Le(t){const n=at();J({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const lt=Qt(A,V),Ee=Ut(lt,P),Pe=F?Ee.filter(t=>t.node.name.toLowerCase().includes(F.toLowerCase())):Ee,Z=o?C.get(o):null,ct=Z?.loaded&&Z.editorValue!==Z.savedContent,pe=H?qe(H.path):[],dt=(t,n)=>{k.current=t,t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!o)return;const r=t.getValue();await nt(o,r)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const r=t.getSelection(),s=t.getModel();if(!r||!s||!o)return;const a=s.getValueInRange(r);g({filePath:o,lineStart:r.startLineNumber,lineEnd:r.endLineNumber,selectedCode:a})})};function ft(t){if(!m)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${m.filePath}\``,`**Lines:** ${m.lineStart}–${m.lineEnd}`];if(m.selectedCode){const r=xe(m.filePath),s=m.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+r,s,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),E(!0),T({parts:[{type:"text",text:n.join(`
|
|
2
|
-
`)}]}),g(null)}return G&&!L?i.jsx("div",{className:"flex items-center justify-center h-full w-full",children:i.jsx(re,{size:20,className:"animate-spin text-muted-foreground"})}):i.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[i.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[i.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[i.jsxs("div",{className:"relative min-w-0 flex-1",children:[i.jsx(ht,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),i.jsx("input",{type:"text",value:F,onChange:t=>U(t.target.value),placeholder:"Search files...","aria-label":"Search files",className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),i.jsxs(Oe,{children:[i.jsx(Re,{asChild:!0,children:i.jsx(fe,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New file",onClick:()=>Le("new-file"),children:i.jsx(xt,{size:14})})}),i.jsx(ze,{side:"bottom",children:"New file"})]}),i.jsxs(Oe,{children:[i.jsx(Re,{asChild:!0,children:i.jsx(fe,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New folder",onClick:()=>Le("new-folder"),children:i.jsx(gt,{size:14})})}),i.jsx(ze,{side:"bottom",children:"New folder"})]})]}),i.jsx(bt,{className:"flex-1",children:i.jsxs("div",{className:"py-1",children:[Pe.map(t=>{const{node:n,depth:r}=t,s=n.kind==="directory",a=P.has(n.path),d=O?.path===n.path,Y=Jt(n.path,n.kind),oe=s&&S.has(n.path);return i.jsx(nn,{node:n,depth:r,isExpanded:a,isSelected:d,isLoading:oe,fileVisual:on(n.name),onSelect:()=>W(n),onOpen:()=>{s?ot(n.path,a):me(n.path)},onNewFile:()=>J({mode:"new-file",node:n,parentDir:Y}),onNewFolder:()=>J({mode:"new-folder",node:n,parentDir:Y}),onCopyPath:()=>be("Path",ce(n.path)),onCopyRelativePath:()=>be("Relative path",M(n.path)),onRename:()=>J({mode:"rename",node:n,parentDir:Y}),onDelete:()=>ue(n)},n.path)}),L&&Pe.length===0&&i.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:F?`No files match "${F}"`:"No files found"})]})})]}),i.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[B.length>0&&i.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:B.map(t=>{const n=C.get(t),r=n?.loaded&&n.editorValue!==n.savedContent,s=o===t,a=t.split("/").pop()??t;return i.jsxs("div",{className:Ve("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",s?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{p(t),ke(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":s,children:[i.jsx("span",{className:"truncate max-w-32",children:a}),r&&i.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),i.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:d=>{d.stopPropagation(),it(t)},children:i.jsx(jt,{size:12})})]},t)})}),m&&i.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:i.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const r=t.currentTarget.elements.namedItem("askAiInput");r.value.trim()&&ft(r.value)},children:[i.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:"Ask the AI...",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&g(null)}}),i.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:"Send",children:i.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[i.jsx("title",{children:"Send"}),i.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),i.jsx("div",{className:"flex-1 overflow-hidden",children:o&&Z?.loaded?i.jsx(mt,{language:xe(o),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:Z.editorValue,path:o,onChange:t=>{const n=o;n&&u(r=>{const s=new Map(r),a=s.get(n);return a&&s.set(n,{...a,editorValue:t??""}),s})},onMount:dt,loading:i.jsx("div",{className:"flex items-center justify-center h-full w-full",children:i.jsx(re,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},o):o&&!Z?.loaded?i.jsx("div",{className:"flex items-center justify-center h-full w-full",children:i.jsx(re,{size:20,className:"animate-spin text-muted-foreground"})}):i.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:"Select a file to edit"})}),o&&i.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[i.jsx("span",{className:"truncate",children:o}),i.jsxs("span",{children:[ct?"Modified":"Saved"," ·"," ",xe(o)]})]})]}),i.jsx(en,{open:w!==null,mode:w?.mode??"new-file",initialName:w?.mode==="rename"?w.node.name:"",parentLabel:w&&w.mode!=="rename"?w.parentDir==="/"?"/":M(w.parentDir):void 0,isPending:ee,onSubmit:Ye,onOpenChange:t=>{!t&&!ee&&J(null)}}),i.jsx(vt,{open:H!==null,onOpenChange:t=>{!t&&!ee&&ue(null)},children:i.jsxs(Ct,{children:[i.jsxs(Nt,{children:[i.jsxs(St,{children:["Delete ",H?.kind==="directory"?"folder":"file","?"]}),i.jsxs(Dt,{children:["This will permanently delete"," ",i.jsx("span",{className:"font-mono",children:H?.name}),H?.kind==="directory"?" and everything inside it.":".",pe.length>0&&i.jsxs(i.Fragment,{children:[" ",pe.length===1?"One open file has unsaved changes that will be lost.":`${pe.length} open files have unsaved changes that will be lost.`]})]})]}),i.jsxs(kt,{children:[i.jsx(Ft,{disabled:ee,children:"Cancel"}),i.jsx(Lt,{disabled:ee||!H,onClick:t=>{t.preventDefault(),H&&Xe(H)},children:"Delete"})]})]})})]})}export{Ai as FileExplorer};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as P,j as t,s as Q,a as te,I as W,r as O,a4 as B,i as F,d as ne,t as z,K as V,k as se,l as K,a5 as oe,ae as re}from"./index-BiSv4wgs.js";import{D as ie,a as ae,c as le,d as ce}from"./dialog-DGhL6eBy.js";import{C as J}from"./checkbox-B76UlBUd.js";import{C as ue}from"./collection-search-DYVCc599.js";import{b as de,u as me}from"./use-connection-CYq4sTpp.js";import{W as fe,u as H,S as X}from"./use-mcp-client-BcfXwx2l.js";import{i as Z}from"./Settings02-C0s-saqA.js";import{v as pe}from"./agent-icon-s6bX_I9L.js";import{i as ge,a as he}from"./mcp-oauth-D0PDq8qp.js";import{u as xe}from"./use-mcp-tools-DhZgsJaJ.js";import{e as ye}from"./extract-connection-data-Cmd1hHZE.js";import{m as be}from"./use-navigate-to-agent-GOxU3Hpn.js";function U(s){const e=P.c(4),{size:n,className:o}=s;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=u):u=e[0];let a;return e[1]!==o||e[2]!==n?(a=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:o,children:u}),e[1]=o,e[2]=n,e[3]=a):a=e[3],a}function we(s,e){const n=P.c(12),{org:o}=Q();let u;n[0]!==o.id?(u=fe.REGISTRY(o.id),n[0]=o.id,n[1]=u):u=n[1];const a=u;let r;n[2]!==o.id||n[3]!==o.slug||n[4]!==a?(r={connectionId:a,orgId:o.id,orgSlug:o.slug},n[2]=o.id,n[3]=o.slug,n[4]=a,n[5]=r):r=n[5];const f=H(r);let p;n[6]!==s?(p={name:s},n[6]=s,n[7]=p):p=n[7];const i=e?.enabled??!0;let h;return n[8]!==f||n[9]!==p||n[10]!==i?(h={client:f,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:p,enabled:i,staleTime:3e5,select:Ie},n[8]=f,n[9]=p,n[10]=i,n[11]=h):h=n[11],xe(h)}function Ie(s){return s.structuredContent?.item??null}const Ne="deco/mcp-github";function Se(s){const{org:e}=Q(),{data:n}=te.useSession(),o=de(),u=W(),[a,r]=O.useState("idle"),[f,p]=O.useState(null),[i,h]=O.useState(null),{data:g,isLoading:c}=we(Ne,{enabled:s.enabled}),w=O.useRef(!1);s.enabled&&g&&!c&&!w.current&&n?.user?.id&&a==="idle"&&(w.current=!0,y());async function y(){if(!(!g||!n?.user?.id||!e))try{r("installing"),p(null);const x=ye(g,e.id,n.user.id,{remoteIndex:0});if(!x.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:b}=await o.create.mutateAsync(x);r("authenticating");const N=new URL(`/api/${e.slug}/mcp/${b}`,window.location.origin),d=await ge({url:N.href,token:null,orgId:e.id});if(d.supportsOAuth&&!d.isAuthenticated){const{token:j,tokenInfo:l,error:C}=await he({connectionId:b,orgSlug:e.slug,scope:"offline_access"});if(C||!j){try{await o.delete.mutateAsync(b)}catch{}throw new Error(C??"No token received from GitHub")}if(l)try{(await fetch(`/api/${e.slug}/connections/${b}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:l.accessToken,refreshToken:l.refreshToken,expiresIn:l.expiresIn,scope:l.scope,clientId:l.clientId,clientSecret:l.clientSecret,tokenEndpoint:l.tokenEndpoint})})).ok||await o.update.mutateAsync({id:b,data:{connection_token:j}})}catch{await o.update.mutateAsync({id:b,data:{connection_token:j}})}}B(u,e.id),h(x),r("ready")}catch(x){p(x instanceof Error?x.message:String(x)),r("error")}}function I(){r("idle"),p(null),h(null),w.current=!1}return s.enabled&&c&&a==="idle"?{status:"installing",error:null,connection:null,retry:I}:{status:a,error:f,connection:i,retry:I}}const M={contents:"write",metadata:"read",pull_requests:"write",issues:"write"};function je(s){if(!s||typeof s!="object"||Array.isArray(s))return M;const e=s;return Object.values(e).some(n=>typeof n!="string")?M:e}function Ce(s){if(!(typeof s!="number"||!Number.isFinite(s)||!Number.isInteger(s)||s<=0))return s}function Te(s){const e=s.metadata?.repoScope;if(!e||typeof e.installationId!="number"||!Number.isFinite(e.installationId)||!Number.isInteger(e.installationId)||e.installationId<=0||typeof e.owner!="string"||typeof e.repo!="string"||e.owner.length===0||e.repo.length===0)return null;const n=Ce(e.repositoryId);return{sourceConnectionId:typeof e.sourceConnectionId=="string"?e.sourceConnectionId:void 0,installationId:e.installationId,repositoryId:n,owner:e.owner,repo:e.repo,permissions:je(e.permissions),grantProvider:e.grantProvider==="github-mcp"?"github-mcp":void 0}}function Ee(s){return(s??[]).filter(e=>Te(e)===null)}async function ve(s,e){const o=(await s({name:"GITHUB_LIST_USER_ORGS",arguments:{connectionId:e}})).content?.[0]?.text;if(!o)throw new Error("No response from GITHUB_LIST_USER_ORGS");try{return JSON.parse(o)}catch{throw new Error("Invalid response from GITHUB_LIST_USER_ORGS")}}function Xe(s,e){const n=e.toLowerCase();return s.find(o=>o.login.toLowerCase()===n)}const Y="GitHub MCP did not return refreshable repo grant metadata";function L(s){if(typeof s!="string")return null;const e=s.trim();return e.length>0?e:null}function _e(s){try{const e=new URL(s);return(e.protocol==="http:"||e.protocol==="https:")&&!e.username&&!e.password}catch{return!1}}function ke(s){return typeof s=="number"&&Number.isFinite(s)&&Number.isInteger(s)&&s>0?s:void 0}async function Re(s){const{orgSlug:e,sourceConnection:n,installationId:o,owner:u,repo:a,githubCallTool:r,selfCallTool:f}=s,p=await r({name:"MINT_REPO_TOKEN",arguments:{installationId:o,owner:u,repo:a,permissions:M}}),i=p.structuredContent;if(p.isError||!i?.token){const v=p.content?.find(T=>T.type==="text")?.text;throw new Error(v?`Failed to mint a repo-scoped GitHub token: ${v}`:"Failed to mint a repo-scoped GitHub token")}const h=L(i.refreshToken),g=L(i.tokenEndpoint),c=L(i.clientId);if(!h||!g||!c)throw new Error(Y);if(!_e(g))throw new Error(Y);const w=L(i.repository?.owner),y=L(i.repository?.name),I="GitHub MCP returned refresh metadata for a different repository";if(i.repository?.owner!==void 0&&(!w||w.toLowerCase()!==u.toLowerCase()))throw new Error(I);if(i.repository?.name!==void 0&&(!y||y.toLowerCase()!==a.toLowerCase()))throw new Error(I);const x=ke(i.repository?.id),S=i.expiresAt?Date.parse(i.expiresAt):NaN,b=Number.isFinite(S)?Math.max(0,Math.floor((S-Date.now())/1e3)):null,d=(typeof i.expiresIn=="number"&&Number.isFinite(i.expiresIn)&&Number.isInteger(i.expiresIn)&&i.expiresIn>0?i.expiresIn:null)??b,j=await f({name:"COLLECTION_CONNECTIONS_CREATE",arguments:{data:{title:`GitHub: ${u}/${a}`,description:`Repo-scoped GitHub access for ${u}/${a}`,icon:n.icon,app_name:n.app_name,app_id:n.app_id,connection_type:n.connection_type,connection_url:n.connection_url,metadata:{repoScope:{installationId:o,repositoryId:x,owner:u,repo:a,permissions:M,grantProvider:"github-mcp"}}}}}),l=j.structuredContent??j,C=l.item?.id??l.id;if(!C)throw new Error("Failed to create the repo-scoped GitHub connection");if(!(await fetch(`/api/${e}/connections/${C}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:i.token,refreshToken:h,expiresIn:d,scope:i.scope??null,clientId:c,tokenEndpoint:g})})).ok)throw await f({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:C,force:!0}}).catch(()=>{}),new Error("Failed to persist the repo-scoped token");return{childConnectionId:C}}function Ae(s,e){const n=P.c(4),[o,u]=O.useState(s);let a,r;return n[0]!==e||n[1]!==s?(a=()=>{const f=setTimeout(()=>u(s),e);return()=>clearTimeout(f)},r=[s,e],n[0]=e,n[1]=s,n[2]=a,n[3]=r):(a=n[2],r=n[3]),O.useEffect(a,r),o}const D=[{key:"auto-respond-to-issues",triggerType:"github.issues.opened",nameSuffix:"auto-respond to issues",label:"Auto-respond to new issues",defaultEnabled:!0,instructions:({owner:s,name:e})=>`A new GitHub issue has been opened in ${s}/${e}. Read the issue, explore relevant code, create a branch, implement the fix, and open a PR referencing the issue number.`},{key:"review-incoming-prs",triggerType:"github.pull_request.opened",nameSuffix:"review incoming PRs",label:"Review incoming pull requests",defaultEnabled:!0,instructions:({owner:s,name:e})=>`A pull request was opened in ${s}/${e}. Read the diff, summarize what changed, flag risks (security, perf, breaking changes), and leave a review comment.`},{key:"note-merged-prs",triggerType:"github.pull_request.closed",nameSuffix:"note merged/closed PRs",label:"Note merged or closed PRs",defaultEnabled:!1,instructions:({owner:s,name:e})=>`A pull request was closed in ${s}/${e}. If it was merged, update changelog/release notes as appropriate.`}];function Oe(s,e){const n=new Set;if(s.paramsSchema)for(const u of Object.keys(s.paramsSchema))n.add(u);if(Array.isArray(s.params))for(const u of s.params)n.add(u.name);else if(s.params&&typeof s.params=="object")for(const u of Object.keys(s.params))n.add(u);if(n.has("repo"))return{repo:`${e.owner}/${e.name}`};const o={};return n.has("owner")&&(o.owner=e.owner),n.has("name")&&(o.name=e.name),n.has("repository")&&(o.repository=`${e.owner}/${e.name}`),o}async function Ge({githubCallTool:s,selfCallTool:e,virtualMcpId:n,repo:o,connectionId:u,selectedKeys:a}){const r=await s({name:"TRIGGER_LIST",arguments:{}}),f=r.structuredContent??r,p=new Map((f.triggers??[]).map(c=>[c.type,c])),i=D.filter(c=>a.has(c.key)),h=await Promise.allSettled(i.map(async c=>{const w=p.get(c.triggerType);if(!w)throw new Error(`Trigger ${c.triggerType} not exposed`);const y=await e({name:"AUTOMATION_CREATE",arguments:{name:`${o.name}: ${c.nameSuffix}`,virtual_mcp_id:n,messages:c.instructions(o),active:!0}}),I=(y.structuredContent??y).id;if(!I)throw new Error(`AUTOMATION_CREATE returned no id for ${c.key}`);await e({name:"AUTOMATION_TRIGGER_ADD",arguments:{automation_id:I,type:"event",connection_id:u,event_type:c.triggerType,params:Oe(w,o)}})})),g=h.filter(c=>c.status==="rejected").length;return g>0&&console.error("Some GitHub automations failed to set up:",h.filter(c=>c.status==="rejected")),{total:h.length,failed:g}}function Ze(s){const e=P.c(22),{open:n,onOpenChange:o,title:u,hideAutoRespondCheckbox:a,onImportComplete:r}=s,f=u===void 0?"Import from GitHub":u,p=a===void 0?!1:a,[i,h]=O.useState(null);let g;e[0]!==f?(g=t.jsx(ie,{className:"sr-only",children:t.jsx(ae,{children:f})}),e[0]=f,e[1]=g):g=e[1];let c;e[2]!==i||e[3]!==f?(c=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:i?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>h(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(Z,{size:16})}),t.jsx("img",{src:i.avatarUrl,alt:i.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:i.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(U,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:f})]})}),e[2]=i,e[3]=f,e[4]=c):c=e[4];let w;e[5]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(F,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=w):w=e[5];let y;e[6]!==o?(y=()=>o(!1),e[6]=o,e[7]=y):y=e[7];let I;e[8]!==p||e[9]!==r||e[10]!==n||e[11]!==i||e[12]!==y?(I=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(O.Suspense,{fallback:w,children:t.jsx($e,{open:n,onComplete:y,selectedInstallation:i,onSelectInstallation:h,hideAutoRespondCheckbox:p,onImportComplete:r})})}),e[8]=p,e[9]=r,e[10]=n,e[11]=i,e[12]=y,e[13]=I):I=e[13];let x;e[14]!==g||e[15]!==c||e[16]!==I?(x=t.jsxs(le,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[g,c,I]}),e[14]=g,e[15]=c,e[16]=I,e[17]=x):x=e[17];let S;return e[18]!==o||e[19]!==n||e[20]!==x?(S=t.jsx(ce,{open:n,onOpenChange:o,children:x}),e[18]=o,e[19]=n,e[20]=x,e[21]=S):S=e[21],S}function $e({open:s,onComplete:e,selectedInstallation:n,onSelectInstallation:o,hideAutoRespondCheckbox:u,onImportComplete:a}){const{org:r}=Q(),f=W(),p=be(),[i,h]=O.useState(null),[g,c]=O.useState(!0),[w,y]=O.useState(()=>new Set(D.filter(m=>m.defaultEnabled).map(m=>m.key))),I=D.filter(m=>m.defaultEnabled).map(m=>m.key),x=u?new Set(I):g?w:new Set,S=me({slug:"mcp-github"}),b=Ee(S),N=Se({enabled:s&&b.length===0}),d=b.length===1?b[0]??null:i,j=H({connectionId:d?.id??"",orgId:r.id,orgSlug:r.slug}),l=H({connectionId:X,orgId:r.id,orgSlug:r.slug}),C=async(m,E)=>{try{const G=await j.callTool({name:"get_file_contents",arguments:{owner:m.owner,repo:m.name,path:E}});if(G.isError)return null;const $=G.content?.find(A=>A.type==="resource")?.resource?.text;if(!$)return null;try{const A=JSON.parse($);return typeof A=="string"?A:JSON.stringify(A)}catch{return $}}catch{return null}},k=(m,E)=>{Promise.all([C(E,"AGENTS.md"),C(E,"CLAUDE.md")]).then(async([R,G])=>{const _=R??G??null;_&&(await l.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:m,data:{metadata:{instructions:_}}}}),B(f,r.id))}).catch(R=>{console.error("GitHub instructions fetch failed:",R)})},v=async({virtualMcpId:m,repo:E,connectionId:R,selectedKeys:G})=>{const{total:_,failed:$}=await Ge({githubCallTool:A=>j.callTool(A),selfCallTool:A=>l.callTool(A),virtualMcpId:m,repo:E,connectionId:R,selectedKeys:G});$>0&&z.warning(`Set up ${_-$}/${_} GitHub automations. Add the rest from the automations view.`)},T=ne({mutationFn:async m=>{if(!d||!n)throw new Error("No GitHub connection or installation");const E=n.installationId,{childConnectionId:R}=await Re({orgSlug:r.slug,sourceConnection:d,installationId:E,owner:m.owner,repo:m.name,githubCallTool:_=>j.callTool(_),selfCallTool:_=>l.callTool(_)});let G=null;try{const _=await l.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:m.name,description:m.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:m.owner,name:m.name,url:m.url,installationId:E,connectionId:R},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:R}]}}}),$=_.structuredContent??_,A=$.item?.id;if(!$.item||!A)throw new Error("Failed to create the imported agent");return G=A,x.size>0&&await v({virtualMcpId:A,repo:m,connectionId:R,selectedKeys:x}).catch(ee=>{console.error("Failed to set up GitHub automations:",ee),z.warning("Imported repo, but failed to set up GitHub automations. You can add triggers manually from the automations view.")}),{virtualMcpId:A,repo:m,connectionId:R,item:$.item}}catch(_){throw G&&await l.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:G}}).catch(()=>{}),await l.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:R,force:!0}}).catch(()=>{}),_}},onSuccess:({virtualMcpId:m,repo:E,connectionId:R,item:G})=>{if(f.setQueryData(V.collectionItem(l,r.id,"","VIRTUAL_MCP",m),{item:G}),B(f,r.id),k(m,E),a){a({virtualMcpId:m,repo:E,connectionId:R});return}z.success(`Imported ${E.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),p(m)},onError:m=>{z.error("Failed to import repo: "+(m instanceof Error?m.message:"Unknown error"))}});return N.status==="installing"||N.status==="authenticating"?t.jsx(q,{status:N.status,error:null,retry:N.retry}):N.status==="error"?t.jsx(q,{status:"error",error:N.error,retry:N.retry}):b.length===0&&N.status==="idle"?t.jsx(q,{status:"installing",error:null,retry:N.retry}):b.length>1&&!d?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),b.map(m=>t.jsxs("button",{type:"button",onClick:()=>h(m),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[m.icon?t.jsx("img",{src:m.icon,alt:m.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(U,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:m.title})]},m.id))]}):d?n?t.jsx(Le,{connectionId:d.id,orgId:r.id,orgSlug:r.slug,installation:n,onSelectRepo:m=>T.mutate(m),isSaving:T.isPending,autoRespondEnabled:g,onAutoRespondChange:c,selectedAutomationKeys:w,onAutomationKeysChange:y,hideAutoRespondCheckbox:u}):t.jsx(Pe,{connectionId:d.id,orgId:r.id,orgSlug:r.slug,onSelect:o,showBackButton:b.length>1,onBack:()=>h(null)}):null}function Pe(s){const e=P.c(31),{connectionId:n,orgId:o,orgSlug:u,onSelect:a,showBackButton:r,onBack:f}=s;let p;e[0]!==o||e[1]!==u?(p={connectionId:X,orgId:o,orgSlug:u},e[0]=o,e[1]=u,e[2]=p):p=e[2];const i=H(p);let h;e[3]!==n||e[4]!==o?(h=V.githubUserOrgs(o,n),e[3]=n,e[4]=o,e[5]=h):h=e[5];let g;e[6]!==n||e[7]!==i?(g=()=>ve(l=>i.callTool(l),n),e[6]=n,e[7]=i,e[8]=g):g=e[8];let c;e[9]!==h||e[10]!==g?(c={queryKey:h,queryFn:g},e[9]=h,e[10]=g,e[11]=c):c=e[11];const w=se(c);if(w.isLoading){let l;return e[12]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(F,{size:18,className:"animate-spin text-muted-foreground"})}),e[12]=l):l=e[12],l}if(w.isError){let l;return e[13]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"})}),e[13]=l):l=e[13],l}const y=w.data;if(!y)return null;let I;e[14]!==f||e[15]!==r?(I=r&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:f,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(Z,{size:12}),"Change connection"]})}),e[14]=f,e[15]=r,e[16]=I):I=e[16];let x;if(e[17]!==y.installations||e[18]!==a){let l;e[20]!==a?(l=C=>t.jsxs("button",{type:"button",onClick:()=>a(C),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:C.avatarUrl,alt:C.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:C.login}),C.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},C.installationId),e[20]=a,e[21]=l):l=e[21],x=y.installations.map(l),e[17]=y.installations,e[18]=a,e[19]=x}else x=e[19];let S;e[22]!==x?(S=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:x}),e[22]=x,e[23]=S):S=e[23];const b=y.appSlug?`https://github.com/apps/${y.appSlug}/installations/new`:"https://github.com/settings/installations";let N;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[24]=N):N=e[24];let d;e[25]!==b?(d=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:b,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",N]})}),e[25]=b,e[26]=d):d=e[26];let j;return e[27]!==d||e[28]!==I||e[29]!==S?(j=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[I,S,d]}),e[27]=d,e[28]=I,e[29]=S,e[30]=j):j=e[30],j}function Le(s){const e=P.c(27),{connectionId:n,orgId:o,orgSlug:u,installation:a,onSelectRepo:r,isSaving:f,autoRespondEnabled:p,onAutoRespondChange:i,selectedAutomationKeys:h,onAutomationKeysChange:g,hideAutoRespondCheckbox:c}=s,[w,y]=O.useState(""),I=Ae(w,300),x=O.useDeferredValue(I),S=w!==x;let b;e[0]!==S||e[1]!==w?(b=t.jsx(ue,{placeholder:"Search repositories...",value:w,onChange:y,isSearching:S}),e[0]=S,e[1]=w,e[2]=b):b=e[2];const N=S?"opacity-40":"opacity-100";let d;e[3]!==N?(d=K("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",N),e[3]=N,e[4]=d):d=e[4];let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(F,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=j):j=e[5];let l;e[6]!==n||e[7]!==x||e[8]!==a||e[9]!==f||e[10]!==r||e[11]!==o||e[12]!==u?(l=t.jsx(O.Suspense,{fallback:j,children:t.jsx(He,{connectionId:n,orgId:o,orgSlug:u,installation:a,query:x,onSelectRepo:r,isSaving:f})}),e[6]=n,e[7]=x,e[8]=a,e[9]=f,e[10]=r,e[11]=o,e[12]=u,e[13]=l):l=e[13];let C;e[14]!==d||e[15]!==l?(C=t.jsx("div",{className:d,children:l}),e[14]=d,e[15]=l,e[16]=C):C=e[16];let k;e[17]!==p||e[18]!==c||e[19]!==i||e[20]!==g||e[21]!==h?(k=!c&&t.jsxs("div",{className:"border-t border-border shrink-0",children:[t.jsxs("label",{className:"flex items-center gap-2 px-4 py-3 cursor-pointer select-none",children:[t.jsx(J,{checked:p,onCheckedChange:T=>i(T===!0)}),t.jsx("span",{className:"text-xs text-foreground",children:"Set up GitHub automations for this repo"})]}),p&&t.jsx("div",{className:"px-4 pb-3 pl-9 flex flex-col gap-1.5",children:D.map(T=>t.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[t.jsx(J,{checked:h.has(T.key),onCheckedChange:m=>{const E=new Set(h);m===!0?E.add(T.key):E.delete(T.key),g(E)}}),t.jsx("span",{className:"text-xs text-muted-foreground",children:T.label})]},T.key))})]}),e[17]=p,e[18]=c,e[19]=i,e[20]=g,e[21]=h,e[22]=k):k=e[22];let v;return e[23]!==b||e[24]!==C||e[25]!==k?(v=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[b,C,k]}),e[23]=b,e[24]=C,e[25]=k,e[26]=v):v=e[26],v}function He(s){const e=P.c(29),{connectionId:n,orgId:o,orgSlug:u,installation:a,query:r,onSelectRepo:f,isSaving:p}=s;let i;e[0]!==n||e[1]!==o||e[2]!==u?(i={connectionId:n,orgId:o,orgSlug:u},e[0]=n,e[1]=o,e[2]=u,e[3]=i):i=e[3];const h=H(i),g=a.type==="User"?"user":"org",c=r?`${g}:${a.login} ${r} in:name`:`${g}:${a.login}`;let w;e[4]!==n||e[5]!==a.login||e[6]!==o||e[7]!==r?(w=V.githubOrgRepos(o,n,a.login,r),e[4]=n,e[5]=a.login,e[6]=o,e[7]=r,e[8]=w):w=e[8];let y;e[9]!==h||e[10]!==c?(y=async N=>{const{signal:d}=N,l=(await h.callTool({name:"search_repositories",arguments:{query:c,page:1,perPage:30}},void 0,{signal:d})).content?.[0]?.text;if(!l)throw new Error("No response from search_repositories");return(JSON.parse(l).items??[]).map(Ue)},e[9]=h,e[10]=c,e[11]=y):y=e[11];let I;e[12]!==w||e[13]!==y?(I={queryKey:w,queryFn:y},e[12]=w,e[13]=y,e[14]=I):I=e[14];const{data:x}=oe(I);if(x.length===0){let N;e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=N):N=e[15];let d;e[16]!==r?(d=r&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=r,e[17]=d):d=e[17];let j;return e[18]!==d?(j=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[N,d]}),e[18]=d,e[19]=j):j=e[19],j}let S;if(e[20]!==p||e[21]!==f||e[22]!==x){let N;e[24]!==p||e[25]!==f?(N=d=>t.jsxs("button",{type:"button",onClick:()=>f(d),disabled:p,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(U,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:d.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[d.private?t.jsx(re,{size:10}):t.jsx(pe,{size:10}),d.private?"Private":"Public"]})]},d.fullName),e[24]=p,e[25]=f,e[26]=N):N=e[26],S=x.map(N),e[20]=p,e[21]=f,e[22]=x,e[23]=S}else S=e[23];let b;return e[27]!==S?(b=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:S}),e[27]=S,e[28]=b):b=e[28],b}function Ue(s){return{name:s.name,fullName:s.full_name,owner:s.full_name.split("/")[0]??"",url:s.html_url,private:s.private,description:s.description,updatedAt:s.updated_at}}function q(s){const e=P.c(33),{status:n,error:o,retry:u}=s;if(n==="error"){let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(U,{className:"size-5 text-destructive"})}),e[0]=l):l=e[0];let C;e[1]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=C):C=e[1];const k=o??"Something went wrong while connecting to GitHub.";let v;e[2]!==k?(v=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[C,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:k})]}),e[2]=k,e[3]=v):v=e[3];let T;e[4]!==u?(T=t.jsx("button",{type:"button",onClick:u,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=u,e[5]=T):T=e[5];let m;return e[6]!==v||e[7]!==T?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[l,v,T]}),e[6]=v,e[7]=T,e[8]=m):m=e[8],m}const a=n==="authenticating";let r;e[9]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(U,{className:"size-5 text-foreground"})}),e[9]=r):r=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(F,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=f):f=e[10];const p=a?"Authenticating with GitHub":"Setting up GitHub";let i;e[11]!==p?(i=t.jsx("p",{className:"text-sm font-medium",children:p}),e[11]=p,e[12]=i):i=e[12];const h=a?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let g;e[13]!==h?(g=t.jsx("p",{className:"text-xs text-muted-foreground",children:h}),e[13]=h,e[14]=g):g=e[14];let c;e[15]!==i||e[16]!==g?(c=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[i,g]}),e[15]=i,e[16]=g,e[17]=c):c=e[17];const w=a?"bg-muted-foreground/30":"bg-foreground animate-pulse";let y;e[18]!==w?(y=K("size-1.5 rounded-full",w),e[18]=w,e[19]=y):y=e[19];let I;e[20]!==y?(I=t.jsx("span",{className:y}),e[20]=y,e[21]=I):I=e[21];const x=a?"bg-foreground animate-pulse":"bg-muted-foreground/30";let S;e[22]!==x?(S=K("size-1.5 rounded-full",x),e[22]=x,e[23]=S):S=e[23];let b;e[24]!==S?(b=t.jsx("span",{className:S}),e[24]=S,e[25]=b):b=e[25];let N;e[26]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=N):N=e[26];let d;e[27]!==I||e[28]!==b?(d=t.jsxs("div",{className:"flex items-center gap-1.5",children:[I,b,N]}),e[27]=I,e[28]=b,e[29]=d):d=e[29];let j;return e[30]!==d||e[31]!==c?(j=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[f,c,d]}),e[30]=d,e[31]=c,e[32]=j):j=e[32],j}export{Ze as G,U as a,Xe as b,ve as f,Ee as g,Re as p,Se as u};
|