decocms 4.105.0 → 4.107.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-492EEp2A.js → AlertCircle-BgOvr6C3.js} +1 -1
- package/dist/client/assets/{AreaChart-DEAqBgfK.js → AreaChart-BtiNWMq5.js} +1 -1
- package/dist/client/assets/{ArrowRight-Ddlybx70.js → ArrowRight-CD-yxEoW.js} +1 -1
- package/dist/client/assets/{ArrowUp-D_gyGK0X.js → ArrowUp-n4lTr9AL.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-Chggeoxo.js → ArrowUpRight-DOaigyNW.js} +1 -1
- package/dist/client/assets/{Check-B5KuwkVX.js → Check-DLfbWJgd.js} +1 -1
- package/dist/client/assets/{CheckCircle-D3ZmgI8t.js → CheckCircle-BfBY_ZV7.js} +1 -1
- package/dist/client/assets/{ChevronDown-DTXciC2Y.js → ChevronDown-CiMDALYY.js} +1 -1
- package/dist/client/assets/{ChevronRight-BTtZur33.js → ChevronRight-D_OV-Pgj.js} +1 -1
- package/dist/client/assets/{ChevronUp-BOcmGc7e.js → ChevronUp-DUJJlt98.js} +1 -1
- package/dist/client/assets/{Copy01-CAaBoZr7.js → Copy01-ufvFPJZB.js} +1 -1
- package/dist/client/assets/{DotsVertical-B8seWlU9.js → DotsVertical-PfZMNZ6Z.js} +1 -1
- package/dist/client/assets/{Eye-BMnoA72h.js → Eye-BkgODIRu.js} +1 -1
- package/dist/client/assets/{FilterLines-CpAgznVL.js → FilterLines-B_-lVDA9.js} +1 -1
- package/dist/client/assets/{Globe01-B-1bG2yF.js → Globe01-BDiifXXa.js} +1 -1
- package/dist/client/assets/{Globe04-CCEFQFJh.js → Globe04-DNBwnUrJ.js} +1 -1
- package/dist/client/assets/{HardDrive-D1ThzSZL.js → HardDrive-CFkobxZC.js} +1 -1
- package/dist/client/assets/{Image01-396lPFTh.js → Image01-Bb8Bqa-8.js} +1 -1
- package/dist/client/assets/{Key01-B6k80syQ.js → Key01-CrcuMaIc.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DrmvAZtO.js → LayoutLeft-BdRICE8_.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Bj-DHKZ2.js → LinkExternal01-CmiDrc-Y.js} +1 -1
- package/dist/client/assets/{Monitor01-BGhWWzLO.js → Monitor01-4gLeXT94.js} +1 -1
- package/dist/client/assets/{Package-CkO_i381.js → Package-D-_mb9f6.js} +1 -1
- package/dist/client/assets/{Palette-DXYpYsID.js → Palette-CEmFqzz3.js} +1 -1
- package/dist/client/assets/{Play-BRYEOEKR.js → Play-JoLlrBky.js} +1 -1
- package/dist/client/assets/{Plus-n0d6qLEa.js → Plus-CnGOZ87E.js} +1 -1
- package/dist/client/assets/{SearchLg-CWL4NO6j.js → SearchLg-B2zx-gpy.js} +1 -1
- package/dist/client/assets/{SearchMd-mEQCCGF2.js → SearchMd-BRbsyVK_.js} +1 -1
- package/dist/client/assets/{Settings02-1z5a1jSn.js → Settings02-DIfwzzdL.js} +1 -1
- package/dist/client/assets/{Shield01-6qmS4aUT.js → Shield01-6OBXuIGG.js} +1 -1
- package/dist/client/assets/{Star01-DVVpP6Mt.js → Star01-Y-VR-ljm.js} +1 -1
- package/dist/client/assets/{Stars01-Byvzs38L.js → Stars01-Bxt-84SE.js} +1 -1
- package/dist/client/assets/{Stars02-vHkWqwAy.js → Stars02-Cvx98bRC.js} +1 -1
- package/dist/client/assets/{Sun-rLSQUUKZ.js → Sun-D5toVjoa.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CQHdcmBH.js → SwitchHorizontal01-wfVR2RF-.js} +1 -1
- package/dist/client/assets/{Tool01-DM0uV1pi.js → Tool01-CDoizCz_.js} +1 -1
- package/dist/client/assets/{Tool02-B0-LSNq8.js → Tool02-DaXb6bvN.js} +1 -1
- package/dist/client/assets/{Trash01-DpAfQYpB.js → Trash01-5FKeehFd.js} +1 -1
- package/dist/client/assets/{TrendUp01-BBNetlbH.js → TrendUp01-Bq5oMnNN.js} +1 -1
- package/dist/client/assets/{Upload01-CCm1ioeI.js → Upload01-Bgk9SC5P.js} +1 -1
- package/dist/client/assets/{User01-CIB_r_NM.js → User01-C3m685Hv.js} +1 -1
- package/dist/client/assets/{Users01-sXy9V9nC.js → Users01-8GsW-xQB.js} +1 -1
- package/dist/client/assets/{Users03-CAcpBuhQ.js → Users03-CLtCdC_N.js} +1 -1
- package/dist/client/assets/{X-DKUaOMiG.js → X-BneQMKy6.js} +1 -1
- package/dist/client/assets/{XCircle-D6ezyvCf.js → XCircle-BEDdiGXa.js} +1 -1
- package/dist/client/assets/{XClose-D59rN56m.js → XClose-DfDurzro.js} +1 -1
- package/dist/client/assets/{Zap-FhQNjqjY.js → Zap-BcW2LXOZ.js} +1 -1
- package/dist/client/assets/{ZapSquare-BEOr1Qo2.js → ZapSquare-Bf2lkXds.js} +1 -1
- package/dist/client/assets/{ZoomOut-9c6sHVLZ.js → ZoomOut-CPd0ZmnV.js} +1 -1
- package/dist/client/assets/{access-gate-axaZ1vUD.js → access-gate-D03bHH-o.js} +1 -1
- package/dist/client/assets/{add-section-modal-DokvGJIt.js → add-section-modal-B-xyv2wp.js} +1 -1
- package/dist/client/assets/{agent-icon-JkG_B24O.js → agent-icon-_J02_S5C.js} +1 -1
- package/dist/client/assets/agents-list-BN1rQcJK.js +1 -0
- package/dist/client/assets/{ai-providers-DVZGLcnx.js → ai-providers-C8lNoc3f.js} +1 -1
- package/dist/client/assets/{alert-C4kpJoy4.js → alert-DK9xSfaW.js} +1 -1
- package/dist/client/assets/{alert-dialog-ByGGCVaW.js → alert-dialog-DK3qE0Of.js} +1 -1
- package/dist/client/assets/app-editor-Dlu-CQR3.js +1 -0
- package/dist/client/assets/{auth-DYlyeYuK.js → auth-B8T8w8Kc.js} +1 -1
- package/dist/client/assets/{auth-catchall-yLacPHoj.js → auth-catchall-kVd8puVJ.js} +1 -1
- package/dist/client/assets/{auth-entry-DDBfLf77.js → auth-entry-n8X49rjR.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CqqeWuFf.js → auth-split-layout-jSlBJ3su.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Cs_ey_Si.js → authenticate-and-persist-oauth-DAaLyzK1.js} +1 -1
- package/dist/client/assets/{automation-list-row-CThb8tG3.js → automation-list-row-dkUP4RF_.js} +1 -1
- package/dist/client/assets/{automation-runs-BXiPs_VZ.js → automation-runs-CEI5hhQJ.js} +1 -1
- package/dist/client/assets/{automations-CgMxz4Pb.js → automations-B_3tlI1-.js} +1 -1
- package/dist/client/assets/{autosend-CEnJWoYu.js → autosend-DO7dHORD.js} +1 -1
- package/dist/client/assets/{avatar-h4p7JkEM.js → avatar-DaQidAiV.js} +1 -1
- package/dist/client/assets/{badge-Bp_khuBP.js → badge-BgZczEsZ.js} +1 -1
- package/dist/client/assets/{block-document-DFy6dXPM.js → block-document-BVeQ7WEA.js} +1 -1
- package/dist/client/assets/{brand-context-fZVDwuzx.js → brand-context-BpxLnmBE.js} +1 -1
- package/dist/client/assets/{buckets-B4aetspo.js → buckets-EQwVkBJ4.js} +1 -1
- package/dist/client/assets/bulk-category-panel-V7uo-eoq.js +1 -0
- package/dist/client/assets/{calendar-B3zsx3QX.js → calendar-BTGECjqm.js} +1 -1
- package/dist/client/assets/{capability-load-error-Azqebb7t.js → capability-load-error-CDsQYnZW.js} +1 -1
- package/dist/client/assets/{card-D2g28w4T.js → card-DJ2H_e0s.js} +1 -1
- package/dist/client/assets/category-editor-Bd1pYXGG.js +1 -0
- package/dist/client/assets/{chat-context-CB8jbSht.js → chat-context-vcu7L1K0.js} +1 -1
- package/dist/client/assets/{checkbox-BY_iLtFn.js → checkbox-B9JHA5SH.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BvR7NCLC.js → cli-auth-success-DWgWCAwR.js} +1 -1
- package/dist/client/assets/{collection-detail-nENYDdvy.js → collection-detail-BrNw8UH7.js} +1 -1
- package/dist/client/assets/{collection-display-button-C5l35Zv5.js → collection-display-button-DB6gqVZr.js} +1 -1
- package/dist/client/assets/{collection-search-CnSAD3aA.js → collection-search-X2FY2Zbx.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CmAtnFvh.js → collection-table-wrapper-DSPbsSLt.js} +1 -1
- package/dist/client/assets/{collection-tabs-Caaa8VYN.js → collection-tabs-B924qkdP.js} +1 -1
- package/dist/client/assets/{command-BfdqzURV.js → command-Bv8_7Vkk.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-Bb3mAsEa.js → commerce-onboarding-C3Y6vT8o.js} +1 -1
- package/dist/client/assets/{companions-core-BkvWSECf.js → companions-core-DFmy9vYz.js} +1 -1
- package/dist/client/assets/{connect-DaaAOtif.js → connect-B_ncrfAW.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-kJLqahzj.js → connect-desktop-dialog-U5aCPAJV.js} +1 -1
- package/dist/client/assets/{connection-card-F8nXjLqn.js → connection-card-e_UptrRV.js} +1 -1
- package/dist/client/assets/{connection-detail-DUSprILA.js → connection-detail-DAZdgYg9.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-C9rI-4sl.js → connection-form-helpers-7ZowEE1h.js} +1 -1
- package/dist/client/assets/{connections-ClHUezf0.js → connections-BrTnVZek.js} +1 -1
- package/dist/client/assets/deco-site-production-url-CaKZ7xBn.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-Cbh8qGU5.js → decopilot-sse-pool-BbYyKeE8.js} +1 -1
- package/dist/client/assets/{dialog-CfZpY_2q.js → dialog-D8i1UzS-.js} +1 -1
- package/dist/client/assets/{domain-settings-BPHG1eY7.js → domain-settings-D0f6P-Yd.js} +1 -1
- package/dist/client/assets/{drawer-FjwmDRnN.js → drawer-CQ47roJi.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Co3SNGsi.js → dropdown-menu-pzwlVi5v.js} +1 -1
- package/dist/client/assets/{empty-state-BmD_9SdS.js → empty-state-D1gApRgf.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C6WAUA-A.js → extract-connection-data-Di_VGvf2.js} +1 -1
- package/dist/client/assets/file-explorer-BzPp8gW_.js +2 -0
- package/dist/client/assets/{file-type-icon-CkvpmZpM.js → file-type-icon-BzOczfLZ.js} +1 -1
- package/dist/client/assets/{files-DqIz0vBK.js → files-CPkeTq1Q.js} +1 -1
- package/dist/client/assets/{form-D9b_xMf4.js → form-DA7Gn6Qj.js} +1 -1
- package/dist/client/assets/{general-B1teWa2G.js → general-BOsZxYAn.js} +1 -1
- package/dist/client/assets/github-repo-picker-DtffXMxi.js +1 -0
- package/dist/client/assets/{hooks-DX67BKd6.js → hooks-CLn7whNX.js} +1 -1
- package/dist/client/assets/{index-CNjiAiv0.js → index-BG3V0_h7.js} +1 -1
- package/dist/client/assets/{index-C0goCxJd.js → index-BQGGGvcR.js} +1 -1
- package/dist/client/assets/{index-C0pe4Aj2.js → index-Bb180K0D.js} +3 -3
- package/dist/client/assets/index-BjPBDyuZ.css +1 -0
- package/dist/client/assets/{index-DpBmVLF2.js → index-BkXly30e.js} +1 -1
- package/dist/client/assets/{index-DUDC1cQm.js → index-BzxFOMNA.js} +1 -1
- package/dist/client/assets/{index-DHV3B5K5.js → index-C1MWdBLB.js} +1 -1
- package/dist/client/assets/{index-Dyk7ikoX.js → index-C2lDm-Fu.js} +29 -29
- package/dist/client/assets/{index-BUv3Mmxm.js → index-CHFqNeWt.js} +27 -27
- package/dist/client/assets/{index-vlkNtRf9.js → index-CWkP4cIl.js} +1 -1
- package/dist/client/assets/{index-DRA8GwsZ.js → index-D2IDu0ny.js} +1 -1
- package/dist/client/assets/{index-BTACFcn3.js → index-D4tbLXeg.js} +1 -1
- package/dist/client/assets/{index-CXYm1db3.js → index-Df7n-xLC.js} +1 -1
- package/dist/client/assets/{index-redirect-vLff4NOz.js → index-redirect-B8Cu_k9n.js} +1 -1
- package/dist/client/assets/{index-80l59WlJ.js → index-vRerb3aZ.js} +1 -1
- package/dist/client/assets/{input-CrADDofK.js → input-DDPoRg-v.js} +1 -1
- package/dist/client/assets/{integration-icon-CucAI7jv.js → integration-icon-Jx0Gseo5.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-D4NuIerI.js → invite-member-dialog-D0FA1HYx.js} +1 -1
- package/dist/client/assets/{label-CgRI3EAv.js → label-DORHussN.js} +1 -1
- package/dist/client/assets/{layout-BLasXy5s.js → layout-Bp1-fsR1.js} +1 -1
- package/dist/client/assets/{login-DNMfeoOI.js → login-mz9v3aLJ.js} +1 -1
- package/dist/client/assets/{mcp-oauth-W2q9PxhY.js → mcp-oauth-CDOke2D8.js} +1 -1
- package/dist/client/assets/{members-gkvguwUu.js → members-CCppKfMW.js} +1 -1
- package/dist/client/assets/{monaco-editor-BtyI72zE.js → monaco-editor-BqXIMIrc.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DEwAdd22.js → monitoring-stats-row-INFqDojQ.js} +1 -1
- package/dist/client/assets/{multi-select-CvUZtk1N.js → multi-select-BvgAxTBG.js} +1 -1
- package/dist/client/assets/{oauth-callback-BoqqypMU.js → oauth-callback-CLiiTaO3.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-D34gLcnd.js → oauth-callback-ai-provider-BteXJBa1.js} +1 -1
- package/dist/client/assets/{onboarding-WOkgg_xq.js → onboarding-BYOE_0oz.js} +1 -1
- package/dist/client/assets/{org-install-qJDeUsWL.js → org-install-Bg3JySfe.js} +1 -1
- package/dist/client/assets/{org-layout-xRPdPHsF.js → org-layout-umzmwel1.js} +1 -1
- package/dist/client/assets/{organization-choice-DLt3vbdn.js → organization-choice-CK0nX2Gs.js} +1 -1
- package/dist/client/assets/{orgs-r8WNelqp.js → orgs-DBNfhOAO.js} +1 -1
- package/dist/client/assets/{page-seo-form-Z4BD-gHj.js → page-seo-form-DqSVA_3F.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CT3qwVq8.js +1 -0
- package/dist/client/assets/{popover-DLFsO9ql.js → popover-DpJn-hfv.js} +1 -1
- package/dist/client/assets/post-editor-RVK0GsJa.js +1 -0
- package/dist/client/assets/{primitives-DymvxVoH.js → primitives-RixphQ2l.js} +1 -1
- package/dist/client/assets/{profile-3e8Rritk.js → profile-D71PPS4Y.js} +1 -1
- package/dist/client/assets/project-app-view-D0DquJWq.js +1 -0
- package/dist/client/assets/record-editor-ydGdXixD.js +1 -0
- package/dist/client/assets/redirect-editor-C4bjtMBQ.js +1 -0
- package/dist/client/assets/registry-Bd4j5SLF.js +2 -0
- package/dist/client/assets/{registry-layout-CueA0Phw.js → registry-layout-BLwuHhFv.js} +1 -1
- package/dist/client/assets/{reports-BvwvhCgB.js → reports-sHmfgm3J.js} +1 -1
- package/dist/client/assets/{require-capability-DEQ0QqLK.js → require-capability-C5Tpbb0b.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Cx4vAYLa.js → required-auth-layout-CA8bSKcc.js} +1 -1
- package/dist/client/assets/{reset-password-BJ4m64S2.js → reset-password-DZkq5uSD.js} +1 -1
- package/dist/client/assets/{roles-BDblC0hV.js → roles-sP8CxN0A.js} +1 -1
- package/dist/client/assets/{search-input-A-rUbWgA.js → search-input-CTZse0zE.js} +1 -1
- package/dist/client/assets/{secrets-YwMUYNpK.js → secrets-B86ovfdq.js} +1 -1
- package/dist/client/assets/{sections-editor-QZQZe38v.js → sections-editor-Dnxwy2YN.js} +2 -2
- package/dist/client/assets/{select-BpDhPcun.js → select-DQa0u3Wr.js} +1 -1
- package/dist/client/assets/{select-model-CatZPcMe.js → select-model-D_LWNCOH.js} +1 -1
- package/dist/client/assets/{self-tool-result-CR7hwEPJ.js → self-tool-result-BMnjwY9E.js} +1 -1
- package/dist/client/assets/seo-editor-1pwwU0lh.js +1 -0
- package/dist/client/assets/{settings-layout-DF7IHwQP.js → settings-layout-cLumzJBy.js} +1 -1
- package/dist/client/assets/{settings-section-BMZXZlUy.js → settings-section-LWEA5smB.js} +1 -1
- package/dist/client/assets/{shell-controls-rjSUQvGy.js → shell-controls-B597PXF9.js} +1 -1
- package/dist/client/assets/{shell-layout-CXlEJw1W.js → shell-layout-CAdbpC_v.js} +1 -1
- package/dist/client/assets/{sidebar-B5e9YFZV.js → sidebar-DBp9xHQF.js} +1 -1
- package/dist/client/assets/{skeleton-iIH-l5ge.js → skeleton-B8Q9j7FB.js} +1 -1
- package/dist/client/assets/{sso-DXqtVqzR.js → sso-Dlg3UVD4.js} +1 -1
- package/dist/client/assets/{store-CBMWVYX8.js → store-DTh75LPO.js} +1 -1
- package/dist/client/assets/store-registry-BhQfMuNE.js +2 -0
- package/dist/client/assets/{studio-tools-BMu9ujdK.js → studio-tools-C4Usw4UV.js} +1 -1
- package/dist/client/assets/{switch-Bm3cV4VT.js → switch-CBwu2UEH.js} +1 -1
- package/dist/client/assets/{table-11-lI2-U.js → table-C8SLyJqk.js} +1 -1
- package/dist/client/assets/{tabs-B1IIhvpI.js → tabs-BOWoDzx2.js} +1 -1
- package/dist/client/assets/{textarea-C7Ka9--4.js → textarea-YD6ojdbb.js} +1 -1
- package/dist/client/assets/{toggle-group-aVQoPUrJ.js → toggle-group-BVOOkb1D.js} +1 -1
- package/dist/client/assets/{toolbar-Cl3ZgcxS.js → toolbar-BYbAHqEE.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DXJqGPLR.js → toolbar-icon-button-CeCEqnkt.js} +1 -1
- package/dist/client/assets/{tooltip-CXgiQhhm.js → tooltip-Cf5IIxed.js} +1 -1
- package/dist/client/assets/{use-ai-providers-MB5_8NZz.js → use-ai-providers-D95HMcE1.js} +1 -1
- package/dist/client/assets/{use-api-keys-DqQKr5gb.js → use-api-keys-DccW02ZG.js} +1 -1
- package/dist/client/assets/{use-automations-BadyXyvk.js → use-automations-DQ2AXV7d.js} +1 -1
- package/dist/client/assets/{use-autosave-aQZAMQ3d.js → use-autosave-DuU08nFM.js} +1 -1
- package/dist/client/assets/{use-capability-DOkFocRF.js → use-capability-2yaB1S7K.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DH_5Vx8H.js → use-clock-tick-BL4RRJLv.js} +1 -1
- package/dist/client/assets/{use-connection-CvtYxdhN.js → use-connection-IOdIfyNM.js} +1 -1
- package/dist/client/assets/{use-copy-B8XjwaPC.js → use-copy-DH-6VdHl.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BMw67F1n.js → use-create-virtual-mcp-CCOdLGdZ.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Ca3ejIda.js → use-debounced-autosave-d3ImB89t.js} +1 -1
- package/dist/client/assets/{use-debounced-value-uO_bm41c.js → use-debounced-value-DfmYY9h8.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BWO36018.js → use-deco-credits-CeughIHv.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CGYwsG7F.js → use-decopilot-events-Cz_9qjiK.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B45LKTd-.js → use-delete-connection-CVE0ABn3.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-TjdSAKBI.js → use-deployment-admin-DBcp8zX3.js} +1 -1
- package/dist/client/assets/{use-file-configs-D0UXwKC-.js → use-file-configs-D8coXxxJ.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Hw6OI4g1.js → use-infinite-scroll-R3ERkLYs.js} +1 -1
- package/dist/client/assets/{use-join-requests-lAPAhnwD.js → use-join-requests-C0AQHabL.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DUmtbF9a.js → use-mcp-auth-status-DRXXO9jm.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DmQaIOOa.js → use-mcp-client-BCJf1yZD.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-a_XYf5q4.js → use-mcp-tools-B4xIaBOl.js} +1 -1
- package/dist/client/assets/{use-members-BV0XC_mc.js → use-members-mFgeHZ7B.js} +1 -1
- package/dist/client/assets/{use-mobile-Drq4EVlE.js → use-mobile-Bu_e96Zy.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Bot51FWx.js → use-navigate-to-agent-BjKvGU9f.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CBYYA83j.js → use-org-auth-client-DM7hBlQJ.js} +1 -1
- package/dist/client/assets/{use-org-sso-8BJQP_6U.js → use-org-sso-uyr8-H4R.js} +1 -1
- package/dist/client/assets/{use-organization-roles-FQaweo2A.js → use-organization-roles-BPHhqiJA.js} +1 -1
- package/dist/client/assets/{use-organization-settings-C_BR8EF_.js → use-organization-settings-5oZ7bCWy.js} +1 -1
- package/dist/client/assets/{use-registry-app-ZmEmrGrH.js → use-registry-app-yrb5wpje.js} +1 -1
- package/dist/client/assets/{use-registry-connections-C3-SU_T2.js → use-registry-connections-DMgh_nU5.js} +1 -1
- package/dist/client/assets/{use-secrets-BcAG0HqF.js → use-secrets-BZOngvD_.js} +1 -1
- package/dist/client/assets/{use-status-sounds-rDer6b7Q.js → use-status-sounds-DIeE6cxg.js} +1 -1
- package/dist/client/assets/{use-view-mode-nVUSu4-W.js → use-view-mode-BvN2e2dN.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Cf1nyRqm.js → use-virtual-mcp-h3eec0jk.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-RF_P8egn.js +1 -0
- package/dist/client/assets/{useQueries-BoKQ4HCM.js → useQueries-CvM-9uxn.js} +1 -1
- package/dist/client/assets/{useRouterState-DPiq3iqZ.js → useRouterState-UQc9Qnjn.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CNtHu_k0.js +1 -0
- package/dist/client/assets/{users-C_J62pbJ.js → users-D2PX-Sr0.js} +1 -1
- package/dist/client/assets/{variant-calendar-DehNI1DC.js → variant-calendar-DfoopQZb.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-VHJQUsyn.js → view-mode-toggle-nNQFoSKU.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +175 -126
- package/dist/server/server.js +14 -14
- package/package.json +1 -1
- package/dist/client/assets/agents-list-B1NKYkwk.js +0 -1
- package/dist/client/assets/app-editor-BeXRyBkE.js +0 -1
- package/dist/client/assets/bulk-category-panel-gIdN0C2r.js +0 -1
- package/dist/client/assets/category-editor-BpvOF675.js +0 -1
- package/dist/client/assets/file-explorer-DqNiOL8G.js +0 -2
- package/dist/client/assets/github-repo-picker-DKILGua9.js +0 -1
- package/dist/client/assets/index-BfpiUr3Z.css +0 -1
- package/dist/client/assets/page-seo-sheet-BI8dc_BJ.js +0 -1
- package/dist/client/assets/post-editor-Cpt2UCzl.js +0 -1
- package/dist/client/assets/project-app-view-CAalALic.js +0 -1
- package/dist/client/assets/record-editor-CUXDJmZd.js +0 -1
- package/dist/client/assets/redirect-editor-C90Qs93V.js +0 -1
- package/dist/client/assets/registry-DoqNLs97.js +0 -2
- package/dist/client/assets/seo-editor-BFPg6rGR.js +0 -1
- package/dist/client/assets/store-registry-DN6ZDMrJ.js +0 -2
- package/dist/client/assets/useInfiniteQuery-CVGu7rzp.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CjrVCjrM.js +0 -1
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as ge,b as ce,j as o,v as ve,B as ie,F as be,o as Ne,a as Se,r as Y,n as Ie,K as me,e as Ae,q as H,t as de,m as Le}from"./index-Dyk7ikoX.js";import{a as re,b as Ce,D as ue,c as pe}from"./dropdown-menu-Co3SNGsi.js";import{a as Te}from"./Users03-CAcpBuhQ.js";import{G as De}from"./use-registry-app-ZmEmrGrH.js";import{u as Ee,b as Fe,c as ke}from"./use-virtual-mcp-Cf1nyRqm.js";import{P as ae}from"./index-DpBmVLF2.js";import{a as Ge}from"./DotsVertical-B8seWlU9.js";import{a as Pe,b as Oe}from"./Settings02-1z5a1jSn.js";import{s as Me}from"./Trash01-DpAfQYpB.js";import{p as ze,f as fe}from"./pt-BR-CLy76QW2.js";import{A as Be,aL as Re}from"./agent-icon-JkG_B24O.js";import{c as ye}from"./use-navigate-to-agent-Bot51FWx.js";import{C as $e}from"./card-D2g28w4T.js";import{u as Ue}from"./use-capability-DOkFocRF.js";import{E as Ve}from"./empty-state-BmD_9SdS.js";import{u as He}from"./use-create-virtual-mcp-BMw67F1n.js";import{u as Ke}from"./use-connection-CvtYxdhN.js";import{u as he,S as qe}from"./use-mcp-client-DmQaIOOa.js";import{u as Qe,G as Je}from"./github-repo-picker-DKILGua9.js";import{g as Ye}from"./github-repo-scope-DjMZbiKa.js";import{f as We,a as Xe,p as Ze}from"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import{e as et,d as tt,a as ot,b as st,c as it}from"./dialog-CfZpY_2q.js";import{C as nt}from"./collection-search-CnSAD3aA.js";import{A as rt,a as lt,b as at,c as ct,g as mt,d as dt,e as ut,f as pt}from"./alert-dialog-ByGGCVaW.js";import{S as gt}from"./search-input-A-rUbWgA.js";import{s as xe}from"./Plus-n0d6qLEa.js";import"./Check-B5KuwkVX.js";import"./ChevronRight-BTtZur33.js";import"./use-mcp-tools-a_XYf5q4.js";import"./sidebar-B5e9YFZV.js";import"./LayoutLeft-DrmvAZtO.js";import"./use-mobile-Drq4EVlE.js";import"./X-DKUaOMiG.js";import"./tooltip-CXgiQhhm.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./AlertCircle-492EEp2A.js";import"./Tool01-DM0uV1pi.js";import"./ArrowUp-D_gyGK0X.js";import"./Tool02-B0-LSNq8.js";import"./ArrowRight-Ddlybx70.js";import"./ArrowUpRight-Chggeoxo.js";import"./TrendUp01-BBNetlbH.js";import"./ZapSquare-BEOr1Qo2.js";import"./ZoomOut-9c6sHVLZ.js";import"./CheckCircle-D3ZmgI8t.js";import"./ChevronDown-DTXciC2Y.js";import"./ChevronUp-BOcmGc7e.js";import"./Stars02-vHkWqwAy.js";import"./Copy01-CAaBoZr7.js";import"./Globe01-B-1bG2yF.js";import"./Eye-BMnoA72h.js";import"./FilterLines-CpAgznVL.js";import"./Star01-DVVpP6Mt.js";import"./Globe04-CCEFQFJh.js";import"./SwitchHorizontal01-CQHdcmBH.js";import"./HardDrive-D1ThzSZL.js";import"./Image01-396lPFTh.js";import"./Key01-B6k80syQ.js";import"./XCircle-D6ezyvCf.js";import"./LinkExternal01-Bj-DHKZ2.js";import"./Monitor01-BGhWWzLO.js";import"./Sun-rLSQUUKZ.js";import"./Package-CkO_i381.js";import"./Palette-DXYpYsID.js";import"./Play-BRYEOEKR.js";import"./SearchLg-CWL4NO6j.js";import"./SearchMd-mEQCCGF2.js";import"./Shield01-6qmS4aUT.js";import"./Stars01-Byvzs38L.js";import"./Upload01-CCm1ioeI.js";import"./User01-CIB_r_NM.js";import"./Users01-sXy9V9nC.js";import"./XClose-D59rN56m.js";import"./Zap-FhQNjqjY.js";import"./hooks-DX67BKd6.js";import"./decopilot-sse-pool-Cbh8qGU5.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./auth-DYlyeYuK.js";import"./use-debounced-value-uO_bm41c.js";import"./authenticate-and-persist-oauth-Cs_ey_Si.js";import"./mcp-oauth-W2q9PxhY.js";import"./extract-connection-data-C6WAUA-A.js";function je(t){const e=ge.c(28),{onCreateFromScratch:n,onImportGitHub:i,onImportDeco:r,isCreating:u,align:L,side:E,showBetaBadge:f}=t,b=L===void 0?"end":L,c=ce();let C;e[0]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(Te,{size:14}),e[0]=C):C=e[0];let h;e[1]!==c?(h=c("common.createAgentDropdown.createFromScratch"),e[1]=c,e[2]=h):h=e[2];let p;e[3]!==u||e[4]!==n||e[5]!==h?(p=o.jsxs(re,{disabled:u,onClick:n,children:[C,h]}),e[3]=u,e[4]=n,e[5]=h,e[6]=p):p=e[6];let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(De,{className:"size-3.5"}),e[7]=g):g=e[7];let j;e[8]!==c?(j=c("common.createAgentDropdown.importFromGitHub"),e[8]=c,e[9]=j):j=e[9];let a;e[10]!==f?(a=f&&o.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"}),e[10]=f,e[11]=a):a=e[11];let l;e[12]!==i||e[13]!==j||e[14]!==a?(l=o.jsxs(re,{onClick:i,children:[g,j,a]}),e[12]=i,e[13]=j,e[14]=a,e[15]=l):l=e[15];let m;e[16]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),e[16]=m):m=e[16];let x;e[17]!==c?(x=c("common.createAgentDropdown.importFromDeco"),e[17]=c,e[18]=x):x=e[18];let y;e[19]!==r||e[20]!==x?(y=o.jsxs(re,{onClick:r,children:[m,x]}),e[19]=r,e[20]=x,e[21]=y):y=e[21];let d;return e[22]!==b||e[23]!==E||e[24]!==y||e[25]!==p||e[26]!==l?(d=o.jsxs(Ce,{side:E,align:b,className:"w-48",children:[p,l,y]}),e[22]=b,e[23]=E,e[24]=y,e[25]=p,e[26]=l,e[27]=d):d=e[27],d}function ft(t){const e=ge.c(47),{project:n,lastUsedAt:i,onDeleteClick:r}=t,u=ye(),L=ce(),[E]=ve(),f=E.language==="pt-BR"?ze:void 0;let b;e[0]!==u||e[1]!==n.id?(b=()=>u(n.id),e[0]=u,e[1]=n.id,e[2]=b):b=e[2];let c;e[3]!==n.title||e[4]!==b?(c=o.jsx("button",{type:"button",onClick:b,className:"absolute inset-0 z-0","aria-label":n.title}),e[3]=n.title,e[4]=b,e[5]=c):c=e[5];let C;e[6]!==n.icon||e[7]!==n.title?(C=o.jsx(Be,{icon:n.icon,name:n.title,size:"sm",className:"shrink-0 shadow-sm"}),e[6]=n.icon,e[7]=n.title,e[8]=C):C=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(ue,{asChild:!0,children:o.jsx(ie,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:o.jsx(Ge,{size:20})})}),e[9]=h):h=e[9];let p;e[10]!==u||e[11]!==n.id?(p=()=>u(n.id,{search:{main:"settings"}}),e[10]=u,e[11]=n.id,e[12]=p):p=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Pe,{size:16}),e[13]=g):g=e[13];let j;e[14]!==p?(j=o.jsxs(re,{onClick:p,children:[g,"Settings"]}),e[14]=p,e[15]=j):j=e[15];let a;e[16]!==r?(a=r&&o.jsxs(re,{variant:"destructive",onClick:K=>{K.stopPropagation(),r(K)},children:[o.jsx(Me,{size:16}),"Delete"]}),e[16]=r,e[17]=a):a=e[17];let l;e[18]!==j||e[19]!==a?(l=o.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:o.jsxs(pe,{children:[h,o.jsxs(Ce,{align:"end",children:[j,a]})]})}),e[18]=j,e[19]=a,e[20]=l):l=e[20];let m;e[21]!==C||e[22]!==l?(m=o.jsxs("div",{className:"flex items-start justify-between",children:[C,l]}),e[21]=C,e[22]=l,e[23]=m):m=e[23];let x;e[24]!==n.title?(x=o.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[24]=n.title,e[25]=x):x=e[25];const y=n.description||"No description";let d;e[26]!==y?(d=o.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:y}),e[26]=y,e[27]=d):d=e[27];let k;e[28]!==x||e[29]!==d?(k=o.jsxs("div",{className:"flex flex-col gap-1",children:[x,d]}),e[28]=x,e[29]=d,e[30]=k):k=e[30];let v;e[31]!==m||e[32]!==k?(v=o.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[m,k]}),e[31]=m,e[32]=k,e[33]=v):v=e[33];let G;e[34]!==i||e[35]!==f||e[36]!==n.updated_at||e[37]!==L?(G=i?L("home.projectCard.lastUsed",{time:fe(new Date(i),{addSuffix:!0,locale:f})}):L("home.projectCard.updated",{time:fe(new Date(n.updated_at),{addSuffix:!0,locale:f})}),e[34]=i,e[35]=f,e[36]=n.updated_at,e[37]=L,e[38]=G):G=e[38];let D;e[39]!==G?(D=o.jsx("div",{className:"border-t border-border mt-auto",children:o.jsx("div",{className:"h-10 flex items-center px-4.5",children:o.jsx("p",{className:"text-xs text-muted-foreground",children:G})})}),e[39]=G,e[40]=D):D=e[40];let w;e[41]!==v||e[42]!==D?(w=o.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[v,D]}),e[41]=v,e[42]=D,e[43]=w):w=e[43];let N;return e[44]!==w||e[45]!==c?(N=o.jsxs($e,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[c,w]}),e[44]=w,e[45]=c,e[46]=N):N=e[46],N}const ht="deco-sites";function xt(t){if(!t||typeof t!="object")return null;const e=t.github;if(!e||typeof e!="object")return null;const n=e.owner,i=e.repo;return typeof n!="string"||typeof i!="string"||n.length===0||i.length===0?null:{owner:n,repo:i}}function jt(t,e){const n=e?xt(e):null,i=n?.owner??ht,r=n?.repo??t;return{owner:i,name:r,url:`https://github.com/${i}/${r}`}}function bt(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function we(t,e,n){const i=await fetch(t,e),r=await i.json().catch(()=>({}));if(!i.ok)throw new Error(r.error??`${n} (${i.status})`);return r}function Ct(t){return we(`/api/${t}/deco-sites`,void 0,"Failed to load sites")}function Dt({open:t,onOpenChange:e,onBack:n}){const i=ce(),{org:r}=be(),u=ye(),L=Ne(),{data:E}=Se.useSession(),[f,b]=Y.useState(null),[c,C]=Y.useState(null),[h,p]=Y.useState(""),g=he({connectionId:qe,orgId:r.id,orgSlug:r.slug}),j=Ke({slug:"mcp-github"}),a=Ye(j),l=Qe({enabled:t&&a.length===0}),m=a.length===1?a[0]??null:c,x=a.length>1&&!m,y=he({connectionId:m?.id??"",orgId:r.id,orgSlug:r.slug}),d=t&&a.length===0&&(l.status==="installing"||l.status==="authenticating"||l.status==="idle"),{data:k,isLoading:v,error:G}=Ie({queryKey:me.decoSites(E?.user?.email),queryFn:()=>Ct(r.slug),enabled:t&&!!E?.user?.email,staleTime:6e4,retry:!1}),D=k?.sites??[],w=s=>{s||(b(null),C(null),p("")),e(s)},N=D.filter(s=>s.name.toLowerCase().includes(h.toLowerCase())||(s.domains?.[0]?.domain?.toLowerCase().includes(h.toLowerCase())??!1)),K=!f||N.some(s=>s.name===f),P=Ae({mutationFn:async s=>{if(!m)throw new Error(i("common.importFromDecoDialog.githubNotConnected"));H("deco_site_import_started",{site_name:s});const{installations:S,appSlug:T}=await We(A=>g.callTool(A),m.id),M=D.find(A=>A.name===s);if(!M)throw new Error(i("common.importFromDecoDialog.siteNoLongerAvailable"));const I=jt(s,M.metadata),z=Xe(S,I.owner);if(!z){const A=T?`https://github.com/apps/${T}/installations/new`:"https://github.com/settings/installations";throw new Error(i("common.importFromDecoDialog.installGithubApp",{owner:I.owner,installUrl:A}))}let B=null,R=null,$=null;const ne=async()=>{$&&await g.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:$}}).catch(()=>{}),R&&await g.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:R,force:!0}}).catch(()=>{}),B&&await g.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:B,force:!0}}).catch(()=>{})};try{const A=await we(`/api/${r.slug}/deco-sites/connection`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:s})},i("common.importFromDecoDialog.failedToCreateConnection")),F=A.connId;if(!F)throw new Error(i("common.importFromDecoDialog.noConnectionId"));B=F;const{childConnectionId:U}=await Ze({orgSlug:r.slug,sourceConnection:m,installationId:z.installationId,owner:I.owner,repo:I.name,githubCallTool:V=>y.callTool(V),selfCallTool:V=>g.callTool(V)});R=U;const q=A.icon??null,W=bt(s),J=s.toLowerCase(),Q=await g.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:s,description:"Imported from deco.cx",pinned:!1,icon:q??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],siteSlug:J,githubRepo:{owner:I.owner,name:I.name,url:I.url,installationId:z.installationId,connectionId:U},ui:{banner:null,bannerColor:"#22C55E",icon:q,themeColor:"#22C55E",slug:W,pinnedViews:[{connectionId:F,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:F,toolName:"get_monitor_data",label:"Monitor",icon:null}],layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:F},{connection_id:U}]}}}),O=Q.structuredContent??Q;if(!O.item?.id)throw new Error(i("common.importFromDecoDialog.failedToCreateAgent"));return $=O.item.id,{slug:W,virtualMcpId:O.item.id,connId:F,item:O.item}}catch(A){throw await ne(),A}},onSuccess:({slug:s,virtualMcpId:S,item:T})=>{H("deco_site_import_succeeded",{site_name:T.title,virtual_mcp_id:S,slug:s}),L.setQueryData(me.collectionItem(g,r.id,"","VIRTUAL_MCP",S),{item:T}),L.invalidateQueries({predicate:M=>{const I=M.queryKey;return I[1]===r.id&&I[3]==="collection"&&I[4]==="VIRTUAL_MCP"}}),L.invalidateQueries({queryKey:me.projects(r.id)}),de.success(i("common.importFromDecoDialog.importSuccess",{slug:s})),w(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),u(S)},onError:s=>{H("deco_site_import_failed",{error:s instanceof Error?s.message:"Unknown error"}),de.error(i("common.importFromDecoDialog.importFailed",{error:(s instanceof Error?s.message:i("common.importFromDecoDialog.unknownError"))??""}))}});return o.jsx(et,{open:t,onOpenChange:w,children:o.jsxs(tt,{className:"sm:max-w-[900px] p-0 gap-0 overflow-hidden",children:[o.jsx(ot,{className:"sr-only",children:o.jsx(st,{children:i("common.importFromDecoDialog.title")})}),o.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[n&&o.jsx("button",{type:"button",onClick:n,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":i("common.importFromDecoDialog.goBack"),children:o.jsx(Oe,{size:18})}),o.jsx("span",{className:"text-sm font-medium text-foreground",children:i("common.importFromDecoDialog.title")})]}),o.jsx("div",{children:o.jsx(nt,{value:h,onChange:p,placeholder:i("common.importFromDecoDialog.searchPlaceholder"),onKeyDown:s=>{s.key==="Escape"&&p("")}})}),o.jsxs("div",{className:"pb-0 min-h-[300px]",children:[l.status==="error"&&o.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 h-48 px-8 text-center",children:[o.jsx("p",{className:"text-sm text-destructive",children:l.error??i("common.importFromDecoDialog.failedToConnectGithub")}),o.jsx(ie,{variant:"outline",size:"sm",onClick:l.retry,children:i("common.importFromDecoDialog.retryGithubSetup")})]}),d&&l.status!=="error"&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:i("common.importFromDecoDialog.settingUpGithub")}),x&&!d&&l.status!=="error"&&o.jsxs("div",{className:"flex flex-col py-2",children:[o.jsx("div",{className:"px-8 py-2",children:o.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:i("common.importFromDecoDialog.selectGithubConnection")})}),a.map(s=>o.jsxs("button",{type:"button",onClick:()=>C(s),className:"flex items-center gap-3 px-8 py-3 hover:bg-accent transition-colors text-left",children:[s.icon?o.jsx("img",{src:s.icon,alt:s.title,className:"size-7 rounded-full shrink-0"}):o.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:o.jsx(De,{className:"size-3.5 text-muted-foreground"})}),o.jsx("span",{className:"text-sm font-medium",children:s.title})]},s.id))]}),v&&!d&&l.status!=="error"&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:i("common.importFromDecoDialog.loadingSites")}),!v&&!d&&!x&&l.status!=="error"&&!G&&D.length===0&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:i("common.importFromDecoDialog.noSitesFound")}),!v&&!d&&!x&&l.status!=="error"&&D.length>0&&o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[N.length===0&&o.jsx("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:i("common.importFromDecoDialog.noSitesMatch",{search:h})}),N.map(s=>{const S=s.domains?.find(M=>M.production)?.domain??s.domains?.[0]?.domain,T=f===s.name;return o.jsxs("button",{type:"button",onClick:()=>b(s.name),className:Le("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",T?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[o.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:s.thumb_url?o.jsx("img",{src:s.thumb_url,alt:s.name,className:"w-full h-full object-cover",loading:"lazy"}):o.jsx("div",{className:"w-full h-full bg-muted"})}),o.jsxs("div",{className:"px-4 py-3",children:[o.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.name}),S&&o.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:S})]})]},s.name)})]})]}),o.jsxs(it,{className:"px-8 py-5 border-t border-border",children:[o.jsx(ie,{variant:"outline",onClick:()=>w(!1),disabled:P.isPending,children:i("common.importFromDecoDialog.cancel")}),o.jsx(ie,{disabled:!f||!K||P.isPending||v||d||x||!m||l.status==="error",onClick:()=>f&&P.mutate(f),children:P.isPending?i("common.importFromDecoDialog.importing"):i("common.importFromDecoDialog.import")})]})]})})}function es(){const t=ge.c(77),e=ce(),{org:n}=be(),i=Ee(),r=Fe(),[u,L]=Y.useState("");let E;t[0]===Symbol.for("react.memo_cache_sentinel")?(E={navigateOnCreate:!0},t[0]=E):E=t[0];const{createVirtualMCP:f,isCreating:b}=He(E),[c,C]=Y.useState(null),[h,p]=Y.useState(!1),[g,j]=Y.useState(!1),{granted:a}=Ue("agents:manage"),l=u.toLowerCase(),m=i.filter(_=>_.id!==n.id&&(_.title.toLowerCase().includes(l)||_.description?.toLowerCase().includes(l))),{data:x}=ke(m.map(yt));let y;t[1]!==r||t[2]!==c||t[3]!==e?(y=async()=>{if(!c)return;const{id:_,title:_e}=c;C(null);try{await r.delete.mutateAsync(_),H("agent_deleted",{agent_id:_,source:"agents_list"}),de.success(e("routes.agentsList.deletedAgent",{title:_e}))}catch{}},t[1]=r,t[2]=c,t[3]=e,t[4]=y):y=t[4];const d=y,k=ae,v=ae,G=ae;let D;t[5]!==e?(D=e("routes.agentsList.title"),t[5]=e,t[6]=D):D=t[6];let w;t[7]!==D?(w=o.jsx(ae.Title,{children:D}),t[7]=D,t[8]=w):w=t[8];let N;t[9]!==e?(N=e("routes.agentsList.searchPlaceholder"),t[9]=e,t[10]=N):N=t[10];let K;t[11]===Symbol.for("react.memo_cache_sentinel")?(K=_=>{_.key==="Escape"&&(L(""),_.target.blur())},t[11]=K):K=t[11];let P;t[12]!==u||t[13]!==N?(P=o.jsx(gt,{value:u,onChange:L,placeholder:N,className:"w-full md:w-[375px]",onKeyDown:K}),t[12]=u,t[13]=N,t[14]=P):P=t[14];let s;t[15]!==a||t[16]!==f||t[17]!==b||t[18]!==e?(s=a&&o.jsxs(pe,{children:[o.jsx(ue,{asChild:!0,children:o.jsxs(ie,{size:"sm",children:[o.jsx(xe,{size:14}),e("routes.agentsList.createAgent")]})}),o.jsx(je,{onCreateFromScratch:()=>{H("agent_create_clicked",{source:"agents_list",method:"scratch"}),f()},onImportGitHub:()=>{H("agent_create_clicked",{source:"agents_list",method:"github"}),j(!0)},onImportDeco:()=>{H("agent_create_clicked",{source:"agents_list",method:"deco"}),p(!0)},isCreating:b,align:"end"})]}),t[15]=a,t[16]=f,t[17]=b,t[18]=e,t[19]=s):s=t[19];let S;t[20]!==P||t[21]!==s?(S=o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[P,s]}),t[20]=P,t[21]=s,t[22]=S):S=t[22];let T;t[23]!==S||t[24]!==w?(T=o.jsxs("div",{className:"flex flex-col gap-6",children:[w,S]}),t[23]=S,t[24]=w,t[25]=T):T=t[25];const M=m.length===0&&o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(Ve,{image:o.jsx(Re,{size:48,className:"text-muted-foreground"}),title:e(u?"routes.agentsList.noAgentsFound":"routes.agentsList.noAgentsYet"),description:u?e("routes.agentsList.noAgentsMatchSearch",{search:u}):e(a?"routes.agentsList.createAgentToGetStarted":"routes.agentsList.askAdminToCreate"),actions:!u&&a&&o.jsxs(pe,{children:[o.jsx(ue,{asChild:!0,children:o.jsxs(ie,{size:"sm",children:[o.jsx(xe,{size:14}),e("routes.agentsList.createAgent")]})}),o.jsx(je,{onCreateFromScratch:()=>{H("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),f()},onImportGitHub:()=>{H("agent_create_clicked",{source:"agents_list_empty",method:"github"}),j(!0)},onImportDeco:()=>{H("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),p(!0)},isCreating:b,align:"center",showBetaBadge:!0})]})})}),I=m.length>0&&o.jsxs("div",{className:"mt-6 @container",children:[o.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:e("routes.agentsList.agentsHeading")}),o.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:m.map(_=>o.jsx(ft,{project:_,lastUsedAt:x?.get(_.id)?.last_used_at,onDeleteClick:a?()=>C({id:_.id,title:_.title}):void 0},_.id))})]});let z;t[26]!==T||t[27]!==M||t[28]!==I||t[29]!==G.Body?(z=o.jsxs(G.Body,{children:[T,M,I]}),t[26]=T,t[27]=M,t[28]=I,t[29]=G.Body,t[30]=z):z=t[30];let B;t[31]!==z||t[32]!==v.Content?(B=o.jsx(v.Content,{children:z}),t[31]=z,t[32]=v.Content,t[33]=B):B=t[33];let R;t[34]!==g?(R=o.jsx(Je,{open:g,onOpenChange:j}),t[34]=g,t[35]=R):R=t[35];let $;t[36]!==h?($=o.jsx(Dt,{open:h,onOpenChange:p}),t[36]=h,t[37]=$):$=t[37];const ne=!!c;let A;t[38]===Symbol.for("react.memo_cache_sentinel")?(A=_=>!_&&C(null),t[38]=A):A=t[38];let F;t[39]!==e?(F=e("routes.agentsList.deleteAgentTitle"),t[39]=e,t[40]=F):F=t[40];let U;t[41]!==F?(U=o.jsx(rt,{children:F}),t[41]=F,t[42]=U):U=t[42];let q;t[43]!==e?(q=e("routes.agentsList.deleteAgentDescription"),t[43]=e,t[44]=q):q=t[44];const W=c?.title;let J;t[45]!==W?(J=o.jsx("span",{className:"font-medium text-foreground",children:W}),t[45]=W,t[46]=J):J=t[46];let Q;t[47]!==q||t[48]!==J?(Q=o.jsxs(lt,{children:[q," ",J,"."]}),t[47]=q,t[48]=J,t[49]=Q):Q=t[49];let O;t[50]!==U||t[51]!==Q?(O=o.jsxs(at,{children:[U,Q]}),t[50]=U,t[51]=Q,t[52]=O):O=t[52];let V;t[53]!==e?(V=e("routes.agentsList.cancelButton"),t[53]=e,t[54]=V):V=t[54];let X;t[55]!==V?(X=o.jsx(ct,{children:V}),t[55]=V,t[56]=X):X=t[56];let Z;t[57]!==e?(Z=e("routes.agentsList.deleteButton"),t[57]=e,t[58]=Z):Z=t[58];let ee;t[59]!==d||t[60]!==Z?(ee=o.jsx(mt,{onClick:d,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Z}),t[59]=d,t[60]=Z,t[61]=ee):ee=t[61];let te;t[62]!==X||t[63]!==ee?(te=o.jsxs(dt,{children:[X,ee]}),t[62]=X,t[63]=ee,t[64]=te):te=t[64];let oe;t[65]!==O||t[66]!==te?(oe=o.jsxs(ut,{children:[O,te]}),t[65]=O,t[66]=te,t[67]=oe):oe=t[67];let se;t[68]!==ne||t[69]!==oe?(se=o.jsx(pt,{open:ne,onOpenChange:A,children:oe}),t[68]=ne,t[69]=oe,t[70]=se):se=t[70];let le;return t[71]!==k||t[72]!==B||t[73]!==R||t[74]!==$||t[75]!==se?(le=o.jsxs(k,{children:[B,R,$,se]}),t[71]=k,t[72]=B,t[73]=R,t[74]=$,t[75]=se,t[76]=le):le=t[76],le}function yt(t){return t.id}export{es as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as gt,b as yt,r as A,j as o,m as kt,k as jt,t as xt}from"./index-Dyk7ikoX.js";import{i as _t}from"./ChevronRight-BTtZur33.js";import{m as Bt}from"./automation-runs-BXiPs_VZ.js";import{A as wt}from"./add-section-modal-DokvGJIt.js";import{n as At,h as Et,j as Nt,e as Rt,k as Kt,l as Ct,S as Tt,m as Ft,o as $t}from"./index-BUv3Mmxm.js";import"./select-BpDhPcun.js";import"./tooltip-CXgiQhhm.js";import"./Check-B5KuwkVX.js";import"./ChevronDown-DTXciC2Y.js";import"./ChevronUp-BOcmGc7e.js";import"./useInfiniteQuery-CVGu7rzp.js";import"./use-infinite-scroll-Hw6OI4g1.js";import"./use-connection-CvtYxdhN.js";import"./use-mcp-client-DmQaIOOa.js";import"./auth-DYlyeYuK.js";import"./use-virtual-mcp-Cf1nyRqm.js";import"./card-D2g28w4T.js";import"./sidebar-B5e9YFZV.js";import"./LayoutLeft-DrmvAZtO.js";import"./use-mobile-Drq4EVlE.js";import"./X-DKUaOMiG.js";import"./table-11-lI2-U.js";import"./empty-state-BmD_9SdS.js";import"./use-members-BV0XC_mc.js";import"./use-org-auth-client-CBYYA83j.js";import"./use-clock-tick-DH_5Vx8H.js";import"./AlertCircle-492EEp2A.js";import"./CheckCircle-D3ZmgI8t.js";import"./DotsVertical-B8seWlU9.js";import"./agent-icon-JkG_B24O.js";import"./Tool01-DM0uV1pi.js";import"./ArrowUp-D_gyGK0X.js";import"./Settings02-1z5a1jSn.js";import"./Tool02-B0-LSNq8.js";import"./ArrowRight-Ddlybx70.js";import"./ArrowUpRight-Chggeoxo.js";import"./TrendUp01-BBNetlbH.js";import"./ZapSquare-BEOr1Qo2.js";import"./ZoomOut-9c6sHVLZ.js";import"./Users03-CAcpBuhQ.js";import"./Stars02-vHkWqwAy.js";import"./Copy01-CAaBoZr7.js";import"./Globe01-B-1bG2yF.js";import"./Eye-BMnoA72h.js";import"./FilterLines-CpAgznVL.js";import"./Star01-DVVpP6Mt.js";import"./Globe04-CCEFQFJh.js";import"./SwitchHorizontal01-CQHdcmBH.js";import"./HardDrive-D1ThzSZL.js";import"./Image01-396lPFTh.js";import"./Key01-B6k80syQ.js";import"./XCircle-D6ezyvCf.js";import"./LinkExternal01-Bj-DHKZ2.js";import"./Monitor01-BGhWWzLO.js";import"./Sun-rLSQUUKZ.js";import"./Package-CkO_i381.js";import"./Palette-DXYpYsID.js";import"./Play-BRYEOEKR.js";import"./Plus-n0d6qLEa.js";import"./SearchLg-CWL4NO6j.js";import"./SearchMd-mEQCCGF2.js";import"./Shield01-6qmS4aUT.js";import"./Stars01-Byvzs38L.js";import"./Trash01-DpAfQYpB.js";import"./Upload01-CCm1ioeI.js";import"./User01-CIB_r_NM.js";import"./Users01-sXy9V9nC.js";import"./XClose-D59rN56m.js";import"./Zap-FhQNjqjY.js";import"./use-automations-BadyXyvk.js";import"./studio-tools-BMu9ujdK.js";import"./useSuspenseInfiniteQuery-CjrVCjrM.js";import"./avatar-h4p7JkEM.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-B8XjwaPC.js";import"./file-type-icon-CkvpmZpM.js";import"./dialog-CfZpY_2q.js";import"./tab-id-BijBBRwE.js";import"./hooks-DX67BKd6.js";import"./decopilot-sse-pool-Cbh8qGU5.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-CB8jbSht.js";import"./autosend-CEnJWoYu.js";import"./use-ai-providers-MB5_8NZz.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-CGYwsG7F.js";import"./use-organization-settings-C_BR8EF_.js";import"./monaco-editor-BtyI72zE.js";import"./index-C0goCxJd.js";import"./index-CXYm1db3.js";import"./calendar-B3zsx3QX.js";import"./shell-layout-CXlEJw1W.js";import"./required-auth-layout-Cx4vAYLa.js";import"./use-org-sso-8BJQP_6U.js";import"./integration-icon-CucAI7jv.js";import"./use-navigate-to-agent-Bot51FWx.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-DEAqBgfK.js";import"./form-D9b_xMf4.js";import"./label-CgRI3EAv.js";import"./input-CrADDofK.js";import"./drawer-FjwmDRnN.js";import"./collection-search-CnSAD3aA.js";import"./index-C0pe4Aj2.js";import"./get-initials-D-f_fDFw.js";import"./popover-DLFsO9ql.js";import"./use-registry-app-ZmEmrGrH.js";import"./use-mcp-tools-a_XYf5q4.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-Cs_ey_Si.js";import"./mcp-oauth-W2q9PxhY.js";import"./extract-connection-data-C6WAUA-A.js";import"./dropdown-menu-Co3SNGsi.js";import"./command-BfdqzURV.js";import"./index-DUDC1cQm.js";import"./companions-core-BkvWSECf.js";import"./tabs-B1IIhvpI.js";import"./toggle-group-aVQoPUrJ.js";import"./use-deco-credits-BWO36018.js";import"./connection-card-F8nXjLqn.js";import"./use-registry-connections-C3-SU_T2.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-C7Ka9--4.js";import"./connection-form-helpers-C9rI-4sl.js";import"./collection-tabs-Caaa8VYN.js";import"./badge-Bp_khuBP.js";import"./connect-desktop-dialog-kJLqahzj.js";import"./select-model-CatZPcMe.js";import"./checkbox-BY_iLtFn.js";import"./skeleton-iIH-l5ge.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BMZXZlUy.js";import"./index-BTACFcn3.js";import"./alert-dialog-ByGGCVaW.js";import"./toolbar-Cl3ZgcxS.js";import"./use-debounced-value-uO_bm41c.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-rDer6b7Q.js";import"./use-capability-DOkFocRF.js";import"./toolbar-icon-button-DXJqGPLR.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-DUmtbF9a.js";import"./use-debounced-autosave-Ca3ejIda.js";import"./index-DpBmVLF2.js";import"./search-input-A-rUbWgA.js";import"./switch-Bm3cV4VT.js";import"./github-repo-picker-DKILGua9.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-BcAG0HqF.js";import"./useQueries-BoKQ4HCM.js";import"./use-file-configs-D0UXwKC-.js";import"./automation-list-row-CThb8tG3.js";function Pt(l,t){const p=(l.title||l.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),u=/^[A-Za-z]/.test(p)&&p.length>0?p:"Section",n=At(t,u);return{blockKey:n,data:{__resolveType:l.resolveType,name:n}}}function Tr(l){const t=gt.c(80),{orgSlug:p,virtualMcpId:u,branch:n,blockKey:i,block:c,meta:m,decofile:d,title:H,excludeFields:G,schemaPending:nt,previewBaseUrl:ct}=l,J=nt===void 0?!1:nt,x=ct===void 0?null:ct,s=yt(),b=typeof c?.__resolveType=="string"?c.__resolveType:"";let R;t[0]!==G||t[1]!==m||t[2]!==b?(R=Et(b,m,G),t[0]=G,t[1]=m,t[2]=b,t[3]=R):R=t[3];const h=R;let K;t[4]!==h?(K=!!h&&Object.keys(h.properties??{}).length>0,t[4]=h,t[5]=K):K=t[5];const Q=K;let C;t[6]!==c||t[7]!==i||t[8]!==m||t[9]!==H?(C=H??(c?Nt(i,c,m):i),t[6]=c,t[7]=i,t[8]=m,t[9]=H,t[10]=C):C=t[10];const v=C;let T;t[11]!==n||t[12]!==p||t[13]!==u?(T={orgSlug:p,virtualMcpId:u,branch:n},t[11]=n,t[12]=p,t[13]=u,t[14]=T):T=t[14];const{save:S,flush:W,isPending:X}=Rt(T);let F;t[15]!==n||t[16]!==p||t[17]!==u?(F={orgSlug:p,virtualMcpId:u,branch:n},t[15]=n,t[16]=p,t[17]=u,t[18]=F):F=t[18];const Y=Kt(F);let $;t[19]!==S?($=Ft((e,r)=>S(e,r)),t[19]=S,t[20]=$):$=t[20];const tt=$,[ht,bt]=A.useState(i),[et,dt]=A.useState(null),[ot,ft]=A.useState(0);let P;t[21]===Symbol.for("react.memo_cache_sentinel")?(P=[],t[21]=P):P=t[21];const[a,ut]=A.useState(P),[rt,it]=A.useState(!1),O=A.useRef(null);ht!==i&&(bt(i),dt(null),ft(zt),ut([]));let z;t[22]!==c?(z=c??{},t[22]=c,t[23]=z):z=t[23];const mt=z;let g;t[24]!==et?(g=et??{},t[24]=et,t[25]=g):g=t[25];let V;t[26]!==mt||t[27]!==g?(V={...mt,...g},t[26]=mt,t[27]=g,t[28]=V):V=t[28];const st=V;let q;t[29]!==i||t[30]!==b||t[31]!==S?(q=e=>{const r=e;dt(r),S(i,{...r,__resolveType:b})},t[29]=i,t[30]=b,t[31]=S,t[32]=q):q=t[32];const pt=q;let I;t[33]===Symbol.for("react.memo_cache_sentinel")?(I=e=>{ut(e)},t[33]=I):I=t[33];const at=I;let L;t[34]!==d||t[35]!==W||t[36]!==Y||t[37]!==s?(L=async(e,r)=>{try{const{blockKey:f,data:N}=Pt(e,d);await Y.mutateAsync({blockKey:f,data:N}),xt.success(s("sandbox.appEditor.createdSection",{name:f})),r({__resolveType:f}),W()}catch(f){const N=f,St=N instanceof Error?N.message:s("sandbox.appEditor.failedAddSection");throw xt.error(St),N}},t[34]=d,t[35]=W,t[36]=Y,t[37]=s,t[38]=L):L=t[38];const y=L;let U;t[39]===Symbol.for("react.memo_cache_sentinel")?(U=e=>{O.current=e.append,it(!0)},t[39]=U):U=t[39];const vt=U;let M;t[40]!==y?(M=async e=>{const r=O.current;if(r)try{await y(e,f=>{r(f),it(!1),O.current=null})}catch{}},t[40]=y,t[41]=M):M=t[41];const lt=M;let Z;t[42]!==a||t[43]!==v?(Z=a.length>0?[v,...a]:[],t[42]=a,t[43]=v,t[44]=Z):Z=t[44];const E=Z;let k;t[45]!==a||t[46]!==E||t[47]!==s||t[48]!==v?(k=E.length>0?o.jsx("nav",{"aria-label":s("sandbox.appEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:E.map((e,r)=>{const f=r===E.length-1;return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[r>0&&o.jsx(_t,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>{at(r===0?[]:Ct(a,r)),ft(Ot)},title:e,className:kt("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",f?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:e})]},`${e}-${r}`)})}):o.jsx("span",{className:"text-sm font-medium",children:v}),t[45]=a,t[46]=E,t[47]=s,t[48]=v,t[49]=k):k=t[49];let j;t[50]!==X?(j=o.jsx($t,{isPending:X,isError:!1}),t[50]=X,t[51]=j):j=t[51];let _;t[52]!==k||t[53]!==j?(_=o.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[k,j]}),t[52]=k,t[53]=j,t[54]=_):_=t[54];let B;t[55]!==i||t[56]!==a||t[57]!==d||t[58]!==st||t[59]!==ot||t[60]!==y||t[61]!==pt||t[62]!==Q||t[63]!==m||t[64]!==x||t[65]!==tt||t[66]!==h||t[67]!==J||t[68]!==s?(B=o.jsx(Bt,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-6 py-6",children:o.jsx("div",{className:"mx-auto max-w-xl",children:Q?o.jsx(Tt,{schema:h,value:st,onChange:pt,basePath:"",breadcrumbPath:a,onBreadcrumbChange:at,decofile:d,meta:m,onSaveReferencedBlock:tt,previewBaseUrl:x,onAddSectionItem:y,onRequestAddSection:vt},`${i}:${ot}`):J?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(jt,{size:16,className:"animate-spin"}),s("sandbox.appEditor.loadingSchema")]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:s("sandbox.appEditor.noEditableSchema")})})})}),t[55]=i,t[56]=a,t[57]=d,t[58]=st,t[59]=ot,t[60]=y,t[61]=pt,t[62]=Q,t[63]=m,t[64]=x,t[65]=tt,t[66]=h,t[67]=J,t[68]=s,t[69]=B):B=t[69];let w;t[70]!==rt||t[71]!==d||t[72]!==lt||t[73]!==m||t[74]!==x?(w=x&&o.jsx(wt,{open:rt,onOpenChange:e=>{it(e),e||(O.current=null)},meta:m,decofile:d,previewBaseUrl:x,onSelect:e=>{lt(e)}}),t[70]=rt,t[71]=d,t[72]=lt,t[73]=m,t[74]=x,t[75]=w):w=t[75];let D;return t[76]!==_||t[77]!==B||t[78]!==w?(D=o.jsxs("div",{className:"flex h-full flex-col",children:[_,B,w]}),t[76]=_,t[77]=B,t[78]=w,t[79]=D):D=t[79],D}function Ot(l){return l+1}function zt(l){return l+1}export{Tr as AppEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as he,b as je,r as de,j as t,k as ye,B as ne}from"./index-Dyk7ikoX.js";import{c as ue}from"./ZoomOut-9c6sHVLZ.js";import{i as Ne}from"./X-DKUaOMiG.js";import{L as ce}from"./label-CgRI3EAv.js";import{a1 as xe,a2 as ke}from"./index-BUv3Mmxm.js";import{S as Ce,a as Pe,b as Se,c as ve,d as _e}from"./select-BpDhPcun.js";import{T as Te,a as we,b as Be}from"./tooltip-CXgiQhhm.js";import"./ArrowUp-D_gyGK0X.js";import"./chat-context-CB8jbSht.js";import"./autosend-CEnJWoYu.js";import"./hooks-DX67BKd6.js";import"./use-mcp-client-DmQaIOOa.js";import"./auth-DYlyeYuK.js";import"./decopilot-sse-pool-Cbh8qGU5.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-BMu9ujdK.js";import"./use-virtual-mcp-Cf1nyRqm.js";import"./use-ai-providers-MB5_8NZz.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-CGYwsG7F.js";import"./use-organization-settings-C_BR8EF_.js";import"./automation-runs-BXiPs_VZ.js";import"./useInfiniteQuery-CVGu7rzp.js";import"./use-infinite-scroll-Hw6OI4g1.js";import"./use-connection-CvtYxdhN.js";import"./card-D2g28w4T.js";import"./sidebar-B5e9YFZV.js";import"./LayoutLeft-DrmvAZtO.js";import"./use-mobile-Drq4EVlE.js";import"./table-11-lI2-U.js";import"./empty-state-BmD_9SdS.js";import"./use-members-BV0XC_mc.js";import"./use-org-auth-client-CBYYA83j.js";import"./use-clock-tick-DH_5Vx8H.js";import"./AlertCircle-492EEp2A.js";import"./CheckCircle-D3ZmgI8t.js";import"./DotsVertical-B8seWlU9.js";import"./agent-icon-JkG_B24O.js";import"./Tool01-DM0uV1pi.js";import"./Settings02-1z5a1jSn.js";import"./Tool02-B0-LSNq8.js";import"./ArrowRight-Ddlybx70.js";import"./ArrowUpRight-Chggeoxo.js";import"./TrendUp01-BBNetlbH.js";import"./ZapSquare-BEOr1Qo2.js";import"./Users03-CAcpBuhQ.js";import"./Check-B5KuwkVX.js";import"./ChevronDown-DTXciC2Y.js";import"./ChevronRight-BTtZur33.js";import"./ChevronUp-BOcmGc7e.js";import"./Stars02-vHkWqwAy.js";import"./Copy01-CAaBoZr7.js";import"./Globe01-B-1bG2yF.js";import"./Eye-BMnoA72h.js";import"./FilterLines-CpAgznVL.js";import"./Star01-DVVpP6Mt.js";import"./Globe04-CCEFQFJh.js";import"./SwitchHorizontal01-CQHdcmBH.js";import"./HardDrive-D1ThzSZL.js";import"./Image01-396lPFTh.js";import"./Key01-B6k80syQ.js";import"./XCircle-D6ezyvCf.js";import"./LinkExternal01-Bj-DHKZ2.js";import"./Monitor01-BGhWWzLO.js";import"./Sun-rLSQUUKZ.js";import"./Package-CkO_i381.js";import"./Palette-DXYpYsID.js";import"./Play-BRYEOEKR.js";import"./Plus-n0d6qLEa.js";import"./SearchLg-CWL4NO6j.js";import"./SearchMd-mEQCCGF2.js";import"./Shield01-6qmS4aUT.js";import"./Stars01-Byvzs38L.js";import"./Trash01-DpAfQYpB.js";import"./Upload01-CCm1ioeI.js";import"./User01-CIB_r_NM.js";import"./Users01-sXy9V9nC.js";import"./XClose-D59rN56m.js";import"./Zap-FhQNjqjY.js";import"./use-automations-BadyXyvk.js";import"./useSuspenseInfiniteQuery-CjrVCjrM.js";import"./avatar-h4p7JkEM.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-B8XjwaPC.js";import"./file-type-icon-CkvpmZpM.js";import"./dialog-CfZpY_2q.js";import"./monaco-editor-BtyI72zE.js";import"./index-C0goCxJd.js";import"./index-CXYm1db3.js";import"./calendar-B3zsx3QX.js";import"./shell-layout-CXlEJw1W.js";import"./required-auth-layout-Cx4vAYLa.js";import"./use-org-sso-8BJQP_6U.js";import"./integration-icon-CucAI7jv.js";import"./use-navigate-to-agent-Bot51FWx.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-DEAqBgfK.js";import"./form-D9b_xMf4.js";import"./input-CrADDofK.js";import"./drawer-FjwmDRnN.js";import"./collection-search-CnSAD3aA.js";import"./index-C0pe4Aj2.js";import"./get-initials-D-f_fDFw.js";import"./popover-DLFsO9ql.js";import"./use-registry-app-ZmEmrGrH.js";import"./use-mcp-tools-a_XYf5q4.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-Cs_ey_Si.js";import"./mcp-oauth-W2q9PxhY.js";import"./extract-connection-data-C6WAUA-A.js";import"./dropdown-menu-Co3SNGsi.js";import"./command-BfdqzURV.js";import"./index-DUDC1cQm.js";import"./companions-core-BkvWSECf.js";import"./tabs-B1IIhvpI.js";import"./toggle-group-aVQoPUrJ.js";import"./use-deco-credits-BWO36018.js";import"./connection-card-F8nXjLqn.js";import"./use-registry-connections-C3-SU_T2.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-C7Ka9--4.js";import"./connection-form-helpers-C9rI-4sl.js";import"./collection-tabs-Caaa8VYN.js";import"./badge-Bp_khuBP.js";import"./connect-desktop-dialog-kJLqahzj.js";import"./select-model-CatZPcMe.js";import"./checkbox-BY_iLtFn.js";import"./skeleton-iIH-l5ge.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BMZXZlUy.js";import"./index-BTACFcn3.js";import"./alert-dialog-ByGGCVaW.js";import"./toolbar-Cl3ZgcxS.js";import"./use-debounced-value-uO_bm41c.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-rDer6b7Q.js";import"./use-capability-DOkFocRF.js";import"./toolbar-icon-button-DXJqGPLR.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-DUmtbF9a.js";import"./use-debounced-autosave-Ca3ejIda.js";import"./index-DpBmVLF2.js";import"./search-input-A-rUbWgA.js";import"./switch-Bm3cV4VT.js";import"./github-repo-picker-DKILGua9.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-BcAG0HqF.js";import"./useQueries-BoKQ4HCM.js";import"./use-file-configs-D0UXwKC-.js";import"./automation-list-row-CThb8tG3.js";function vi(i){const e=he.c(121),{posts:X,categories:l,initialSlug:re,isPending:s,onApply:le,onClose:p}=i,o=je(),[m,fe]=de.useState(re&&l.some(a=>a.slug===re)?re:l[0]?.slug??""),[n,be]=de.useState("add");let Y;if(e[0]!==l||e[1]!==m){let a;e[3]!==m?(a=ge=>ge.slug===m,e[3]=m,e[4]=a):a=e[4],Y=l.find(a),e[0]=l,e[1]=m,e[2]=Y}else Y=e[2];const c=Y,r=X.length,me=String(r);let d;e[5]!==o||e[6]!==me?(d=o("sandbox.bulkCategoryPanel.selectedCount",{count:me}),e[5]=o,e[6]=me,e[7]=d):d=e[7];let x;e[8]!==d?(x=t.jsx("span",{className:"truncate text-sm font-medium",children:d}),e[8]=d,e[9]=x):x=e[9];let u;e[10]!==o?(u=o("sandbox.bulkCategoryPanel.exitSelection"),e[10]=o,e[11]=u):u=e[11];let Z;e[12]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx(Ne,{size:14}),e[12]=Z):Z=e[12];let f;e[13]!==s||e[14]!==p||e[15]!==u?(f=t.jsx(Te,{asChild:!0,children:t.jsx(ne,{type:"button",variant:"ghost",size:"icon",disabled:s,onClick:p,"aria-label":u,children:Z})}),e[13]=s,e[14]=p,e[15]=u,e[16]=f):f=e[16];let b;e[17]!==o?(b=o("sandbox.bulkCategoryPanel.exitSelection"),e[17]=o,e[18]=b):b=e[18];let g;e[19]!==b?(g=t.jsx(we,{side:"bottom",children:b}),e[19]=b,e[20]=g):g=e[20];let h;e[21]!==f||e[22]!==g?(h=t.jsxs(Be,{children:[f,g]}),e[21]=f,e[22]=g,e[23]=h):h=e[23];let j;e[24]!==h||e[25]!==x?(j=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[x,h]}),e[24]=h,e[25]=x,e[26]=j):j=e[26];let y;e[27]!==o?(y=o("sandbox.bulkCategoryPanel.title"),e[27]=o,e[28]=y):y=e[28];let N;e[29]!==y?(N=t.jsx("h2",{className:"text-2xl font-bold text-foreground",children:y}),e[29]=y,e[30]=N):N=e[30];let k;e[31]!==r||e[32]!==o?(k=r===0?o("sandbox.bulkCategoryPanel.descriptionEmpty"):o("sandbox.bulkCategoryPanel.descriptionWithCount",{count:String(r)}),e[31]=r,e[32]=o,e[33]=k):k=e[33];let C;e[34]!==k?(C=t.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:k}),e[34]=k,e[35]=C):C=e[35];let P;e[36]!==o?(P=o("sandbox.bulkCategoryPanel.categoryLabel"),e[36]=o,e[37]=P):P=e[37];let S;e[38]!==P?(S=t.jsx(ce,{children:P}),e[38]=P,e[39]=S):S=e[39];let v;e[40]!==l||e[41]!==m||e[42]!==o?(v=l.length===0?t.jsx("p",{className:"text-sm text-muted-foreground",children:o("sandbox.bulkCategoryPanel.noCategoriesMessage")}):t.jsxs(Ce,{value:m,onValueChange:fe,children:[t.jsx(Pe,{className:"w-full",children:t.jsx(Se,{placeholder:o("sandbox.bulkCategoryPanel.selectCategoryPlaceholder")})}),t.jsx(ve,{children:l.map(ze)})]}),e[40]=l,e[41]=m,e[42]=o,e[43]=v):v=e[43];let _;e[44]!==S||e[45]!==v?(_=t.jsxs("div",{className:"space-y-2",children:[S,v]}),e[44]=S,e[45]=v,e[46]=_):_=e[46];let ee;e[47]===Symbol.for("react.memo_cache_sentinel")?(ee=a=>be(a),e[47]=ee):ee=e[47];let te;e[48]===Symbol.for("react.memo_cache_sentinel")?(te=t.jsx(xe,{value:"add",id:"cat-mode-add",className:"mt-0.5"}),e[48]=te):te=e[48];let T;e[49]!==o?(T=o("sandbox.bulkCategoryPanel.modeAddTitle"),e[49]=o,e[50]=T):T=e[50];let w;e[51]!==T?(w=t.jsx("span",{className:"block text-sm font-medium",children:T}),e[51]=T,e[52]=w):w=e[52];let B;e[53]!==o?(B=o("sandbox.bulkCategoryPanel.modeAddDescription"),e[53]=o,e[54]=B):B=e[54];let R;e[55]!==B?(R=t.jsx("span",{className:"block text-xs text-muted-foreground",children:B}),e[55]=B,e[56]=R):R=e[56];let z;e[57]!==w||e[58]!==R?(z=t.jsxs(ce,{htmlFor:"cat-mode-add",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3",children:[te,t.jsxs("span",{className:"space-y-0.5",children:[w,R]})]}),e[57]=w,e[58]=R,e[59]=z):z=e[59];let oe;e[60]===Symbol.for("react.memo_cache_sentinel")?(oe=t.jsx(xe,{value:"replace",id:"cat-mode-replace",className:"mt-0.5"}),e[60]=oe):oe=e[60];let E;e[61]!==o?(E=o("sandbox.bulkCategoryPanel.modeReplaceTitle"),e[61]=o,e[62]=E):E=e[62];let L;e[63]!==E?(L=t.jsx("span",{className:"block text-sm font-medium",children:E}),e[63]=E,e[64]=L):L=e[64];let A;e[65]!==o?(A=o("sandbox.bulkCategoryPanel.modeReplaceDescription"),e[65]=o,e[66]=A):A=e[66];let F;e[67]!==A?(F=t.jsx("span",{className:"block text-xs text-muted-foreground",children:A}),e[67]=A,e[68]=F):F=e[68];let M;e[69]!==L||e[70]!==F?(M=t.jsxs(ce,{htmlFor:"cat-mode-replace",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3",children:[oe,t.jsxs("span",{className:"space-y-0.5",children:[L,F]})]}),e[69]=L,e[70]=F,e[71]=M):M=e[71];let V;e[72]!==n||e[73]!==z||e[74]!==M?(V=t.jsxs(ke,{value:n,onValueChange:ee,className:"gap-2",children:[z,M]}),e[72]=n,e[73]=z,e[74]=M,e[75]=V):V=e[75];let $;e[76]!==o?($=o("sandbox.bulkCategoryPanel.cancelButton"),e[76]=o,e[77]=$):$=e[77];let D;e[78]!==s||e[79]!==p||e[80]!==$?(D=t.jsx(ne,{type:"button",variant:"outline",onClick:p,disabled:s,children:$}),e[78]=s,e[79]=p,e[80]=$,e[81]=D):D=e[81];const ae=!c||s||r===0;let G;e[82]!==n||e[83]!==le||e[84]!==c?(G=()=>c&&le(n,{name:c.name,slug:c.slug}),e[82]=n,e[83]=le,e[84]=c,e[85]=G):G=e[85];let I;e[86]!==s||e[87]!==o?(I=s?t.jsxs(t.Fragment,{children:[t.jsx(ye,{size:14,className:"animate-spin"}),o("sandbox.bulkCategoryPanel.updatingButton")]}):o("sandbox.bulkCategoryPanel.applyButton"),e[86]=s,e[87]=o,e[88]=I):I=e[88];let W;e[89]!==ae||e[90]!==G||e[91]!==I?(W=t.jsx(ne,{type:"button",disabled:ae,onClick:G,children:I}),e[89]=ae,e[90]=G,e[91]=I,e[92]=W):W=e[92];let q;e[93]!==D||e[94]!==W?(q=t.jsxs("div",{className:"flex justify-end gap-2",children:[D,W]}),e[93]=D,e[94]=W,e[95]=q):q=e[95];let H;e[96]!==_||e[97]!==V||e[98]!==q?(H=t.jsxs("div",{className:"mt-6 space-y-4",children:[_,V,q]}),e[96]=_,e[97]=V,e[98]=q,e[99]=H):H=e[99];let ie;e[100]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ue,{size:16,className:"shrink-0 text-muted-foreground"}),e[100]=ie):ie=e[100];const pe=String(r);let J;e[101]!==o||e[102]!==pe?(J=o("sandbox.bulkCategoryPanel.selectedPostsLabel",{count:pe}),e[101]=o,e[102]=pe,e[103]=J):J=e[103];let K;e[104]!==J?(K=t.jsxs("div",{className:"flex items-center gap-2 px-4 py-3",children:[ie,t.jsx("span",{className:"text-sm",children:J})]}),e[104]=J,e[105]=K):K=e[105];let O;e[106]!==r||e[107]!==X||e[108]!==o?(O=r===0?t.jsx("p",{className:"border-t bg-background px-4 py-3 text-sm text-muted-foreground",children:o("sandbox.bulkCategoryPanel.noPostsSelectedMessage")}):t.jsx("ul",{className:"divide-y border-t bg-background",children:X.map(Re)}),e[106]=r,e[107]=X,e[108]=o,e[109]=O):O=e[109];let Q;e[110]!==K||e[111]!==O?(Q=t.jsxs("div",{className:"mt-8 overflow-hidden rounded-lg border bg-muted/30",children:[K,O]}),e[110]=K,e[111]=O,e[112]=Q):Q=e[112];let U;e[113]!==N||e[114]!==C||e[115]!==H||e[116]!==Q?(U=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-2xl px-8 py-8",children:[N,C,H,Q]})}),e[113]=N,e[114]=C,e[115]=H,e[116]=Q,e[117]=U):U=e[117];let se;return e[118]!==j||e[119]!==U?(se=t.jsxs("div",{className:"flex h-full flex-col",children:[j,U]}),e[118]=j,e[119]=U,e[120]=se):se=e[120],se}function Re(i){return t.jsxs("li",{className:"flex items-center gap-2.5 px-4 py-2.5",children:[t.jsx(ue,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:i.title}),i.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:i.slug})]})]},i.key)}function ze(i){return t.jsx(_e,{value:i.slug,children:t.jsx("span",{className:"truncate",children:i.name})},i.slug)}export{vi as BulkCategoryPanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as Q,r as w,m as V,j as t,b as X,B as $,k as Y,t as I}from"./index-Dyk7ikoX.js";import{i as Z}from"./ArrowRight-Ddlybx70.js";import{c as U}from"./ZoomOut-9c6sHVLZ.js";import{n as _}from"./LinkExternal01-Bj-DHKZ2.js";import{aO as K}from"./agent-icon-JkG_B24O.js";import{f as tt,e as ot,b as et,A as rt,a as it,d as st,c as at,g as nt}from"./alert-dialog-ByGGCVaW.js";import{I as W}from"./input-CrADDofK.js";import{L as q}from"./label-CgRI3EAv.js";import{w as mt,v as lt,x as pt,$ as ct,o as dt,z as B,C as gt,a0 as ut,A as xt}from"./index-BUv3Mmxm.js";import{c as ft,B as ht,a as yt}from"./block-document-DFy6dXPM.js";import{u as bt}from"./use-autosave-aQZAMQ3d.js";import{t as jt}from"./ChevronDown-DTXciC2Y.js";import{p as vt,q as Et,o as Ct}from"./automation-runs-BXiPs_VZ.js";import{s as b,E as Nt}from"./primitives-DymvxVoH.js";import"./AlertCircle-492EEp2A.js";import"./Tool01-DM0uV1pi.js";import"./ArrowUp-D_gyGK0X.js";import"./Settings02-1z5a1jSn.js";import"./Tool02-B0-LSNq8.js";import"./ArrowUpRight-Chggeoxo.js";import"./TrendUp01-BBNetlbH.js";import"./ZapSquare-BEOr1Qo2.js";import"./Users03-CAcpBuhQ.js";import"./CheckCircle-D3ZmgI8t.js";import"./Check-B5KuwkVX.js";import"./ChevronRight-BTtZur33.js";import"./ChevronUp-BOcmGc7e.js";import"./DotsVertical-B8seWlU9.js";import"./Stars02-vHkWqwAy.js";import"./Copy01-CAaBoZr7.js";import"./Globe01-B-1bG2yF.js";import"./Eye-BMnoA72h.js";import"./FilterLines-CpAgznVL.js";import"./Star01-DVVpP6Mt.js";import"./Globe04-CCEFQFJh.js";import"./SwitchHorizontal01-CQHdcmBH.js";import"./HardDrive-D1ThzSZL.js";import"./Image01-396lPFTh.js";import"./Key01-B6k80syQ.js";import"./LayoutLeft-DrmvAZtO.js";import"./XCircle-D6ezyvCf.js";import"./Monitor01-BGhWWzLO.js";import"./Sun-rLSQUUKZ.js";import"./Package-CkO_i381.js";import"./Palette-DXYpYsID.js";import"./Play-BRYEOEKR.js";import"./Plus-n0d6qLEa.js";import"./SearchLg-CWL4NO6j.js";import"./SearchMd-mEQCCGF2.js";import"./Shield01-6qmS4aUT.js";import"./Stars01-Byvzs38L.js";import"./Trash01-DpAfQYpB.js";import"./Upload01-CCm1ioeI.js";import"./User01-CIB_r_NM.js";import"./Users01-sXy9V9nC.js";import"./XClose-D59rN56m.js";import"./X-DKUaOMiG.js";import"./Zap-FhQNjqjY.js";import"./chat-context-CB8jbSht.js";import"./autosend-CEnJWoYu.js";import"./hooks-DX67BKd6.js";import"./use-mcp-client-DmQaIOOa.js";import"./auth-DYlyeYuK.js";import"./decopilot-sse-pool-Cbh8qGU5.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-BMu9ujdK.js";import"./use-virtual-mcp-Cf1nyRqm.js";import"./use-ai-providers-MB5_8NZz.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-CGYwsG7F.js";import"./use-organization-settings-C_BR8EF_.js";import"./tooltip-CXgiQhhm.js";import"./dialog-CfZpY_2q.js";import"./drawer-FjwmDRnN.js";import"./collection-search-CnSAD3aA.js";import"./use-mobile-Drq4EVlE.js";import"./AreaChart-DEAqBgfK.js";import"./index-CXYm1db3.js";import"./calendar-B3zsx3QX.js";import"./shell-layout-CXlEJw1W.js";import"./avatar-h4p7JkEM.js";import"./required-auth-layout-Cx4vAYLa.js";import"./use-org-sso-8BJQP_6U.js";import"./index-C0pe4Aj2.js";import"./get-initials-D-f_fDFw.js";import"./popover-DLFsO9ql.js";import"./use-registry-app-ZmEmrGrH.js";import"./use-mcp-tools-a_XYf5q4.js";import"./use-connection-CvtYxdhN.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-Cs_ey_Si.js";import"./mcp-oauth-W2q9PxhY.js";import"./extract-connection-data-C6WAUA-A.js";import"./use-members-BV0XC_mc.js";import"./use-org-auth-client-CBYYA83j.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dropdown-menu-Co3SNGsi.js";import"./use-copy-B8XjwaPC.js";import"./command-BfdqzURV.js";import"./index-DUDC1cQm.js";import"./companions-core-BkvWSECf.js";import"./form-D9b_xMf4.js";import"./select-BpDhPcun.js";import"./tabs-B1IIhvpI.js";import"./toggle-group-aVQoPUrJ.js";import"./use-deco-credits-BWO36018.js";import"./connection-card-F8nXjLqn.js";import"./use-registry-connections-C3-SU_T2.js";import"./useInfiniteQuery-CVGu7rzp.js";import"./use-infinite-scroll-Hw6OI4g1.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-D2g28w4T.js";import"./integration-icon-CucAI7jv.js";import"./textarea-C7Ka9--4.js";import"./connection-form-helpers-C9rI-4sl.js";import"./collection-tabs-Caaa8VYN.js";import"./badge-Bp_khuBP.js";import"./useSuspenseInfiniteQuery-CjrVCjrM.js";import"./connect-desktop-dialog-kJLqahzj.js";import"./select-model-CatZPcMe.js";import"./checkbox-BY_iLtFn.js";import"./skeleton-iIH-l5ge.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BMZXZlUy.js";import"./index-BTACFcn3.js";import"./file-type-icon-CkvpmZpM.js";import"./toolbar-Cl3ZgcxS.js";import"./use-debounced-value-uO_bm41c.js";import"./index-C0goCxJd.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-rDer6b7Q.js";import"./empty-state-BmD_9SdS.js";import"./use-capability-DOkFocRF.js";import"./toolbar-icon-button-DXJqGPLR.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-DUmtbF9a.js";import"./use-debounced-autosave-Ca3ejIda.js";import"./index-DpBmVLF2.js";import"./sidebar-B5e9YFZV.js";import"./search-input-A-rUbWgA.js";import"./switch-Bm3cV4VT.js";import"./github-repo-picker-DKILGua9.js";import"./use-navigate-to-agent-Bot51FWx.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-BcAG0HqF.js";import"./useQueries-BoKQ4HCM.js";import"./monaco-editor-BtyI72zE.js";import"./use-file-configs-D0UXwKC-.js";import"./use-automations-BadyXyvk.js";import"./automation-list-row-CThb8tG3.js";import"./table-11-lI2-U.js";import"./use-clock-tick-DH_5Vx8H.js";function St(j){const o=Q.c(18),{icon:x,title:m,defaultOpen:v,children:u}=j,k=v===void 0?!1:v,[f,P]=w.useState(k);let l;o[0]!==x?(l=t.jsx(x,{size:15}),o[0]=x,o[1]=l):l=o[1];let r;o[2]!==m?(r=t.jsx("span",{className:"flex-1 text-left",children:m}),o[2]=m,o[3]=r):r=o[3];const a=f&&"rotate-180";let p;o[4]!==a?(p=V("transition-transform",a),o[4]=a,o[5]=p):p=o[5];let i;o[6]!==p?(i=t.jsx(jt,{size:15,className:p}),o[6]=p,o[7]=i):i=o[7];let c;o[8]!==l||o[9]!==r||o[10]!==i?(c=t.jsx(vt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,r,i]})}),o[8]=l,o[9]=r,o[10]=i,o[11]=c):c=o[11];let d;o[12]!==u?(d=t.jsx(Et,{className:"px-2 pt-4",children:u}),o[12]=u,o[13]=d):d=o[13];let n;return o[14]!==f||o[15]!==c||o[16]!==d?(n=t.jsxs(Ct,{open:f,onOpenChange:P,className:"mt-4",children:[c,d]}),o[14]=f,o[15]=c,o[16]=d,o[17]=n):n=o[17],n}function Er({orgSlug:j,virtualMcpId:o,branch:x,blockKey:m,block:v,decofile:u,meta:k,onManagePosts:f,onOpenPost:P,previewBaseUrl:l}){const r=X(),a=mt({orgSlug:j,virtualMcpId:o,branch:x,packagePath:lt(o)}),p=pt(v,"categories"),[i,c,d]=bt(p,e=>{a.mutate({blockKey:m,data:B(m,"categories",e)})}),n=(e,S)=>c({...i,[e]:S}),A=ft({decofile:u,category:i,previewBaseUrl:l}),s=b(i.slug),[D,y]=w.useState(s),[g,E]=w.useState(null),[C,z]=w.useState(!1),T=s?ct(u).filter(e=>e.categorySlugs.includes(s)):[],N=T.length,H=e=>n("slug",e),M=async(e,S)=>{const J=b(i.name);z(!0);try{let h=0;for(const{key:O,payload:R}of gt(u,"posts")){const L=ut(R,e,{name:J,slug:S});L!==R&&(await a.mutateAsync({blockKey:O,data:B(O,"posts",xt(L))}),h+=1)}const F={...i,slug:S};await a.mutateAsync({blockKey:m,data:B(m,"categories",F)}),d(F),I.success(h>0?r("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(h)}):r("sandbox.categoryEditor.renameSuccessNoPosts")),E(null)}catch(h){y(e),E(null),I.error(h instanceof Error?h.message:r("sandbox.categoryEditor.renameFailed"))}finally{z(!1)}},G=()=>{const e=D.trim();if(e===s){D!==e&&y(e);return}if(!e){y(s);return}if(N===0){H(e);return}E({oldSlug:s,newSlug:e,count:N})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:b(i.name)||r("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(dt,{isPending:a.isPending,isError:a.isError}),A&&t.jsxs($,{type:"button",variant:"outline",size:"sm",title:r("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(A,"_blank","noopener,noreferrer"),children:[t.jsx(_,{size:14}),r("sandbox.categoryEditor.seeCategoryPreview")]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(Nt,{value:b(i.name),onChange:e=>n("name",e),placeholder:r("sandbox.categoryEditor.categoryNamePlaceholder"),className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(q,{htmlFor:"category-slug",children:r("sandbox.categoryEditor.slugLabel")}),t.jsx(W,{id:"category-slug",value:D,onChange:e=>y(e.target.value),onBlur:G,placeholder:r("sandbox.categoryEditor.slugPlaceholder"),className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(q,{htmlFor:"category-description",children:r("sandbox.categoryEditor.descriptionLabel")}),t.jsx(W,{id:"category-description",value:b(i.description),onChange:e=>n("description",e.target.value),placeholder:r("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(St,{icon:K,title:r("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(ht,{value:yt(i.sections),onChange:e=>n("sections",e),meta:k,sandboxRef:{orgSlug:j,virtualMcpId:o,branch:x},emptyMessage:r("sandbox.categoryEditor.noContentEmpty")})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(U,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:r("sandbox.categoryEditor.postsInCategory",{count:String(N)})})]}),t.jsxs($,{type:"button",variant:"outline",size:"sm",disabled:!s,title:r(s?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>f(s),children:[r("sandbox.categoryEditor.addPostsButton"),t.jsx(Z,{size:14})]})]}),N>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:T.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>P(e.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(U,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:e.title||r("sandbox.categoryEditor.untitledPost")}),e.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.slug})]})]})},e.key))})]})]})})]}),t.jsx(tt,{open:!!g,onOpenChange:e=>{e||C||(y(s),E(null))},children:t.jsxs(ot,{children:[t.jsxs(et,{children:[t.jsx(rt,{children:r("sandbox.categoryEditor.renameDialogTitle")}),t.jsx(it,{children:g?r("sandbox.categoryEditor.renameDialogDescription",{oldSlug:g.oldSlug,newSlug:g.newSlug,count:String(g.count)}):null})]}),t.jsxs(st,{children:[t.jsx(at,{disabled:C,children:r("sandbox.categoryEditor.cancelButton")}),t.jsx(nt,{onClick:e=>{e.preventDefault(),g&&M(g.oldSlug,g.newSlug)},disabled:C,children:C?t.jsxs(t.Fragment,{children:[t.jsx(Y,{size:14,className:"animate-spin"}),r("sandbox.categoryEditor.renamingLabel")]}):r("sandbox.categoryEditor.renameActionButton")})]})]})})]})}export{Er as CategoryEditor};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as se,b as $e,r as u,j as r,k as fe,B as Me,e5 as Yt,aE as Jt,aK as xe,e6 as Zt,e7 as en,e8 as tn,e9 as nn,bO as rn,ea as on,eb as lt,aG as sn,ec as an,ed as ln,ee as cn,ef as dn,eg as un,eh as fn,ei as pn,ej as mn,ek as xn,m as le,o as hn,t as ne,K as Ze}from"./index-Dyk7ikoX.js";import{F as gn,l as bn}from"./index-C0goCxJd.js";import{h as yn,aM as vn,aN as Cn}from"./agent-icon-JkG_B24O.js";import{s as wn}from"./XClose-D59rN56m.js";import{m as Nn}from"./automation-runs-BXiPs_VZ.js";import{b as et,T as tt,a as nt}from"./tooltip-CXgiQhhm.js";import{b as jn}from"./chat-context-CB8jbSht.js";import{u as En}from"./shell-layout-CXlEJw1W.js";import{s as we,a as rt,f as Sn}from"./index-BUv3Mmxm.js";import{b as Mn,h as Dn,a as Rn,c as Tn,d as Pn,e as kn}from"./dialog-CfZpY_2q.js";import{I as ot}from"./input-CrADDofK.js";import{A as Fn,a as An,b as On,c as Ln,g as In,d as Kn,e as $n,f as zn}from"./alert-dialog-ByGGCVaW.js";import{t as _n}from"./ChevronDown-DTXciC2Y.js";import{i as Gn}from"./ChevronRight-BTtZur33.js";import{a as Bn}from"./ZoomOut-9c6sHVLZ.js";import{w as Vn,E as Un,x as Fe,y as Ae,z as Hn,A as Wn,C as qn,D as Qn,G as re,I as Ne,J as Oe,K as je,g as Le,M as Ie,N as Xn,s as Yn,O as Jn,P as Ee,Q as Ke,U as Zn,V as er,W as tr,X as nr}from"./index-BTACFcn3.js";import"./AlertCircle-492EEp2A.js";import"./Tool01-DM0uV1pi.js";import"./ArrowUp-D_gyGK0X.js";import"./Settings02-1z5a1jSn.js";import"./Tool02-B0-LSNq8.js";import"./ArrowRight-Ddlybx70.js";import"./ArrowUpRight-Chggeoxo.js";import"./TrendUp01-BBNetlbH.js";import"./ZapSquare-BEOr1Qo2.js";import"./Users03-CAcpBuhQ.js";import"./CheckCircle-D3ZmgI8t.js";import"./Check-B5KuwkVX.js";import"./ChevronUp-BOcmGc7e.js";import"./DotsVertical-B8seWlU9.js";import"./Stars02-vHkWqwAy.js";import"./Copy01-CAaBoZr7.js";import"./Globe01-B-1bG2yF.js";import"./Eye-BMnoA72h.js";import"./FilterLines-CpAgznVL.js";import"./Star01-DVVpP6Mt.js";import"./Globe04-CCEFQFJh.js";import"./SwitchHorizontal01-CQHdcmBH.js";import"./HardDrive-D1ThzSZL.js";import"./Image01-396lPFTh.js";import"./Key01-B6k80syQ.js";import"./LayoutLeft-DrmvAZtO.js";import"./XCircle-D6ezyvCf.js";import"./LinkExternal01-Bj-DHKZ2.js";import"./Monitor01-BGhWWzLO.js";import"./Sun-rLSQUUKZ.js";import"./Package-CkO_i381.js";import"./Palette-DXYpYsID.js";import"./Play-BRYEOEKR.js";import"./Plus-n0d6qLEa.js";import"./SearchLg-CWL4NO6j.js";import"./SearchMd-mEQCCGF2.js";import"./Shield01-6qmS4aUT.js";import"./Stars01-Byvzs38L.js";import"./Trash01-DpAfQYpB.js";import"./Upload01-CCm1ioeI.js";import"./User01-CIB_r_NM.js";import"./Users01-sXy9V9nC.js";import"./X-DKUaOMiG.js";import"./Zap-FhQNjqjY.js";import"./select-BpDhPcun.js";import"./useInfiniteQuery-CVGu7rzp.js";import"./use-infinite-scroll-Hw6OI4g1.js";import"./use-connection-CvtYxdhN.js";import"./use-mcp-client-DmQaIOOa.js";import"./auth-DYlyeYuK.js";import"./use-virtual-mcp-Cf1nyRqm.js";import"./card-D2g28w4T.js";import"./sidebar-B5e9YFZV.js";import"./use-mobile-Drq4EVlE.js";import"./table-11-lI2-U.js";import"./empty-state-BmD_9SdS.js";import"./use-members-BV0XC_mc.js";import"./use-org-auth-client-CBYYA83j.js";import"./use-clock-tick-DH_5Vx8H.js";import"./use-automations-BadyXyvk.js";import"./studio-tools-BMu9ujdK.js";import"./useSuspenseInfiniteQuery-CjrVCjrM.js";import"./avatar-h4p7JkEM.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-B8XjwaPC.js";import"./file-type-icon-CkvpmZpM.js";import"./tab-id-BijBBRwE.js";import"./hooks-DX67BKd6.js";import"./decopilot-sse-pool-Cbh8qGU5.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./monaco-editor-BtyI72zE.js";import"./index-CXYm1db3.js";import"./calendar-B3zsx3QX.js";import"./integration-icon-CucAI7jv.js";import"./use-navigate-to-agent-Bot51FWx.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-DEAqBgfK.js";import"./form-D9b_xMf4.js";import"./label-CgRI3EAv.js";import"./autosend-CEnJWoYu.js";import"./use-ai-providers-MB5_8NZz.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-CGYwsG7F.js";import"./use-organization-settings-C_BR8EF_.js";import"./required-auth-layout-Cx4vAYLa.js";import"./use-org-sso-8BJQP_6U.js";import"./drawer-FjwmDRnN.js";import"./collection-search-CnSAD3aA.js";import"./index-C0pe4Aj2.js";import"./get-initials-D-f_fDFw.js";import"./popover-DLFsO9ql.js";import"./use-registry-app-ZmEmrGrH.js";import"./use-mcp-tools-a_XYf5q4.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-Cs_ey_Si.js";import"./mcp-oauth-W2q9PxhY.js";import"./extract-connection-data-C6WAUA-A.js";import"./dropdown-menu-Co3SNGsi.js";import"./command-BfdqzURV.js";import"./index-DUDC1cQm.js";import"./companions-core-BkvWSECf.js";import"./tabs-B1IIhvpI.js";import"./toggle-group-aVQoPUrJ.js";import"./use-deco-credits-BWO36018.js";import"./connection-card-F8nXjLqn.js";import"./use-registry-connections-C3-SU_T2.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-C7Ka9--4.js";import"./connection-form-helpers-C9rI-4sl.js";import"./collection-tabs-Caaa8VYN.js";import"./badge-Bp_khuBP.js";import"./connect-desktop-dialog-kJLqahzj.js";import"./select-model-CatZPcMe.js";import"./checkbox-BY_iLtFn.js";import"./skeleton-iIH-l5ge.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BMZXZlUy.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-rDer6b7Q.js";import"./toolbar-Cl3ZgcxS.js";import"./use-capability-DOkFocRF.js";import"./toolbar-icon-button-DXJqGPLR.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-DUmtbF9a.js";import"./use-debounced-autosave-Ca3ejIda.js";import"./index-DpBmVLF2.js";import"./search-input-A-rUbWgA.js";import"./switch-Bm3cV4VT.js";import"./github-repo-picker-DKILGua9.js";import"./use-debounced-value-uO_bm41c.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-BcAG0HqF.js";import"./useQueries-BoKQ4HCM.js";import"./use-file-configs-D0UXwKC-.js";import"./automation-list-row-CThb8tG3.js";const rr={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function or(i){const e=se.c(71),{open:s,mode:a,initialName:l,parentLabel:p,isPending:h,onSubmit:x,onOpenChange:C}=i,w=l===void 0?"":l,d=h===void 0?!1:h,m=$e(),[g,S]=u.useState(w),[I,U]=u.useState(s),b=rr[a];s!==I&&(U(s),s&&S(w));let y;e[0]!==d||e[1]!==C?(y=L=>{!L&&!d&&C(!1)},e[0]=d,e[1]=C,e[2]=y):y=e[2];const M=y;let D;e[3]!==d||e[4]!==g||e[5]!==x?(D=async L=>{L.preventDefault();const ee=g.trim();!ee||d||await x(ee)},e[3]=d,e[4]=g,e[5]=x,e[6]=D):D=e[6];const P=D;let j;e[7]!==b.titleKey||e[8]!==m?(j=m(b.titleKey),e[7]=b.titleKey,e[8]=m,e[9]=j):j=e[9];let E;e[10]!==j?(E=r.jsx(Mn,{children:j}),e[10]=j,e[11]=E):E=e[11];let K;e[12]!==b.descriptionKey||e[13]!==m?(K=m(b.descriptionKey),e[12]=b.descriptionKey,e[13]=m,e[14]=K):K=e[14];let q;e[15]!==K?(q=r.jsx(Dn,{children:K}),e[15]=K,e[16]=q):q=e[16];let k;e[17]!==E||e[18]!==q?(k=r.jsxs(Rn,{children:[E,q]}),e[17]=E,e[18]=q,e[19]=k):k=e[19];let Q;e[20]!==p||e[21]!==m?(Q=p&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:m("sandbox.fileExplorerNameDialog.location")}),r.jsx(ot,{value:p,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=p,e[21]=m,e[22]=Q):Q=e[22];let H;e[23]!==m?(H=m("sandbox.fileExplorerNameDialog.name"),e[23]=m,e[24]=H):H=e[24];let $;e[25]!==H?($=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:H}),e[25]=H,e[26]=$):$=e[26];let te;e[27]===Symbol.for("react.memo_cache_sentinel")?(te=L=>S(L.target.value),e[27]=te):te=e[27];let X;e[28]!==b.placeholderKey||e[29]!==m?(X=m(b.placeholderKey),e[28]=b.placeholderKey,e[29]=m,e[30]=X):X=e[30];let Y;e[31]!==d||e[32]!==g||e[33]!==X?(Y=r.jsx(ot,{id:"file-explorer-name",value:g,onChange:te,placeholder:X,autoFocus:!0,disabled:d}),e[31]=d,e[32]=g,e[33]=X,e[34]=Y):Y=e[34];let z;e[35]!==$||e[36]!==Y?(z=r.jsxs("div",{className:"space-y-1.5",children:[$,Y]}),e[35]=$,e[36]=Y,e[37]=z):z=e[37];let F;e[38]!==Q||e[39]!==z?(F=r.jsxs("div",{className:"space-y-4 py-4",children:[Q,z]}),e[38]=Q,e[39]=z,e[40]=F):F=e[40];let W;e[41]!==C?(W=()=>C(!1),e[41]=C,e[42]=W):W=e[42];let A;e[43]!==m?(A=m("sandbox.fileExplorerNameDialog.cancel"),e[43]=m,e[44]=A):A=e[44];let O;e[45]!==d||e[46]!==W||e[47]!==A?(O=r.jsx(Me,{type:"button",variant:"outline",onClick:W,disabled:d,children:A}),e[45]=d,e[46]=W,e[47]=A,e[48]=O):O=e[48];let _;e[49]!==d||e[50]!==g?(_=!g.trim()||d,e[49]=d,e[50]=g,e[51]=_):_=e[51];let R;e[52]!==b.submitKey||e[53]!==d||e[54]!==m?(R=d?r.jsxs(r.Fragment,{children:[r.jsx(fe,{size:14,className:"animate-spin"}),m("sandbox.fileExplorerNameDialog.saving")]}):m(b.submitKey),e[52]=b.submitKey,e[53]=d,e[54]=m,e[55]=R):R=e[55];let G;e[56]!==_||e[57]!==R?(G=r.jsx(Me,{type:"submit",disabled:_,children:R}),e[56]=_,e[57]=R,e[58]=G):G=e[58];let T;e[59]!==O||e[60]!==G?(T=r.jsxs(Tn,{children:[O,G]}),e[59]=O,e[60]=G,e[61]=T):T=e[61];let B;e[62]!==P||e[63]!==F||e[64]!==T||e[65]!==k?(B=r.jsx(Pn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:P,children:[k,F,T]})}),e[62]=P,e[63]=F,e[64]=T,e[65]=k,e[66]=B):B=e[66];let Z;return e[67]!==M||e[68]!==s||e[69]!==B?(Z=r.jsx(kn,{open:s,onOpenChange:M,children:B}),e[67]=M,e[68]=s,e[69]=B,e[70]=Z):Z=e[70],Z}function sr(i){const e=se.c(31),{deleteTarget:s,deleteDirtyPaths:a,fsActionPending:l,onOpenChange:p,onConfirm:h}=i,x=s!==null,C=s?.kind==="directory"?"folder":"file";let w;e[0]!==C?(w=r.jsxs(Fn,{children:["Delete ",C,"?"]}),e[0]=C,e[1]=w):w=e[1];const d=s?.name;let m;e[2]!==d?(m=r.jsx("span",{className:"font-mono",children:d}),e[2]=d,e[3]=m):m=e[3];const g=s?.kind==="directory"?" and everything inside it.":".";let S;e[4]!==a.length?(S=a.length>0&&r.jsxs(r.Fragment,{children:[" ",a.length===1?"One open file has unsaved changes that will be lost.":`${a.length} open files have unsaved changes that will be lost.`]}),e[4]=a.length,e[5]=S):S=e[5];let I;e[6]!==m||e[7]!==g||e[8]!==S?(I=r.jsxs(An,{children:["This will permanently delete"," ",m,g,S]}),e[6]=m,e[7]=g,e[8]=S,e[9]=I):I=e[9];let U;e[10]!==w||e[11]!==I?(U=r.jsxs(On,{children:[w,I]}),e[10]=w,e[11]=I,e[12]=U):U=e[12];let b;e[13]!==l?(b=r.jsx(Ln,{disabled:l,children:"Cancel"}),e[13]=l,e[14]=b):b=e[14];const y=l||!s;let M;e[15]!==s||e[16]!==h?(M=K=>{K.preventDefault(),s&&h(s)},e[15]=s,e[16]=h,e[17]=M):M=e[17];let D;e[18]!==y||e[19]!==M?(D=r.jsx(In,{disabled:y,onClick:M,children:"Delete"}),e[18]=y,e[19]=M,e[20]=D):D=e[20];let P;e[21]!==b||e[22]!==D?(P=r.jsxs(Kn,{children:[b,D]}),e[21]=b,e[22]=D,e[23]=P):P=e[23];let j;e[24]!==P||e[25]!==U?(j=r.jsxs($n,{children:[U,P]}),e[24]=P,e[25]=U,e[26]=j):j=e[26];let E;return e[27]!==p||e[28]!==x||e[29]!==j?(E=r.jsx(zn,{open:x,onOpenChange:p,children:j}),e[27]=p,e[28]=x,e[29]=j,e[30]=E):E=e[30],E}var ze="ContextMenu",[ar]=sn(ze,[lt]),J=lt(),[ir,ct]=ar(ze),dt=i=>{const{__scopeContextMenu:e,children:s,onOpenChange:a,dir:l,modal:p=!0}=i,[h,x]=u.useState(!1),C=J(e),w=rn(a),d=u.useCallback(m=>{x(m),w(m)},[w]);return r.jsx(ir,{scope:e,open:h,onOpenChange:d,modal:p,children:r.jsx(on,{...C,dir:l,open:h,onOpenChange:d,modal:p,children:s})})};dt.displayName=ze;var ut="ContextMenuTrigger",ft=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,disabled:a=!1,...l}=i,p=ct(ut,s),h=J(s),x=u.useRef({x:0,y:0}),C=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...x.current})}),w=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(w.current),[]),m=g=>{x.current={x:g.clientX,y:g.clientY},p.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(Yt,{...h,virtualRef:C}),r.jsx(Jt.span,{"data-state":p.open?"open":"closed","data-disabled":a?"":void 0,...l,ref:e,style:{WebkitTouchCallout:"none",...i.style},onContextMenu:a?i.onContextMenu:xe(i.onContextMenu,g=>{d(),m(g),g.preventDefault()}),onPointerDown:a?i.onPointerDown:xe(i.onPointerDown,Se(g=>{d(),w.current=window.setTimeout(()=>m(g),700)})),onPointerMove:a?i.onPointerMove:xe(i.onPointerMove,Se(d)),onPointerCancel:a?i.onPointerCancel:xe(i.onPointerCancel,Se(d)),onPointerUp:a?i.onPointerUp:xe(i.onPointerUp,Se(d))})]})});ft.displayName=ut;var lr="ContextMenuPortal",pt=i=>{const{__scopeContextMenu:e,...s}=i,a=J(e);return r.jsx(tn,{...a,...s})};pt.displayName=lr;var mt="ContextMenuContent",xt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=ct(mt,s),p=J(s),h=u.useRef(!1);return r.jsx(nn,{...p,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:x=>{i.onCloseAutoFocus?.(x),!x.defaultPrevented&&h.current&&x.preventDefault(),h.current=!1},onInteractOutside:x=>{i.onInteractOutside?.(x),!x.defaultPrevented&&!l.modal&&(h.current=!0)},style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xt.displayName=mt;var cr="ContextMenuGroup",dr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(an,{...l,...a,ref:e})});dr.displayName=cr;var ur="ContextMenuLabel",fr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(ln,{...l,...a,ref:e})});fr.displayName=ur;var pr="ContextMenuItem",ht=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(Zt,{...l,...a,ref:e})});ht.displayName=pr;var mr="ContextMenuCheckboxItem",xr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(cn,{...l,...a,ref:e})});xr.displayName=mr;var hr="ContextMenuRadioGroup",gr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(dn,{...l,...a,ref:e})});gr.displayName=hr;var br="ContextMenuRadioItem",yr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(un,{...l,...a,ref:e})});yr.displayName=br;var vr="ContextMenuItemIndicator",Cr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(fn,{...l,...a,ref:e})});Cr.displayName=vr;var wr="ContextMenuSeparator",gt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(en,{...l,...a,ref:e})});gt.displayName=wr;var Nr="ContextMenuArrow",jr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(pn,{...l,...a,ref:e})});jr.displayName=Nr;var Er="ContextMenuSubTrigger",Sr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(mn,{...l,...a,ref:e})});Sr.displayName=Er;var Mr="ContextMenuSubContent",Dr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(xn,{...l,...a,ref:e,style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Dr.displayName=Mr;function Se(i){return e=>e.pointerType!=="mouse"?i(e):void 0}var Rr=dt,Tr=ft,Pr=pt,kr=xt,Fr=ht,Ar=gt;function Or(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Rr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=a):a=e[3],a}function Lr(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Tr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Ir(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=l):l=e[4];let p;return e[5]!==a||e[6]!==l?(p=r.jsx(Pr,{children:r.jsx(kr,{"data-slot":"context-menu-content",className:l,...a})}),e[5]=a,e[6]=l,e[7]=p):p=e[7],p}function ue(i){const e=se.c(12);let s,a,l,p;e[0]!==i?({className:s,inset:a,variant:p,...l}=i,e[0]=i,e[1]=s,e[2]=a,e[3]=l,e[4]=p):(s=e[1],a=e[2],l=e[3],p=e[4]);const h=p===void 0?"default":p;let x;e[5]!==s?(x=le("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[5]=s,e[6]=x):x=e[6];let C;return e[7]!==a||e[8]!==l||e[9]!==x||e[10]!==h?(C=r.jsx(Fr,{"data-slot":"context-menu-item","data-inset":a,"data-variant":h,className:x,...l}),e[7]=a,e[8]=l,e[9]=x,e[10]=h,e[11]=C):C=e[11],C}function st(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=l):l=e[4];let p;return e[5]!==a||e[6]!==l?(p=r.jsx(Ar,{"data-slot":"context-menu-separator",className:l,...a}),e[5]=a,e[6]=l,e[7]=p):p=e[7],p}const Kr="#d9a441";function $r(i){const e=se.c(63),{node:s,depth:a,isExpanded:l,isSelected:p,isLoading:h,fileVisual:x,onOpen:C,onSelect:w,onNewFile:d,onNewFolder:m,onCopyPath:g,onCopyRelativePath:S,onRename:I,onDelete:U}=i,b=h===void 0?!1:h,y=$e(),M=s.kind==="directory",{Icon:D,color:P}=x,j=p&&"bg-accent";let E;e[0]!==j?(E=le("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",j),e[0]=j,e[1]=E):E=e[1];const K=`${a*14+8}px`;let q;e[2]!==K?(q={paddingLeft:K},e[2]=K,e[3]=q):q=e[3];let k;e[4]!==C||e[5]!==w?(k=()=>{w(),C()},e[4]=C,e[5]=w,e[6]=k):k=e[6];let Q;e[7]!==D||e[8]!==P||e[9]!==M||e[10]!==l||e[11]!==b?(Q=M?r.jsxs(r.Fragment,{children:[b?r.jsx(fe,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):l?r.jsx(_n,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(Gn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(Bn,{size:16,className:"shrink-0",style:{color:Kr}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(D,{size:16,className:"shrink-0",style:{color:P}})]}),e[7]=D,e[8]=P,e[9]=M,e[10]=l,e[11]=b,e[12]=Q):Q=e[12];let H;e[13]!==s.name?(H=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=H):H=e[14];let $;e[15]!==E||e[16]!==q||e[17]!==k||e[18]!==Q||e[19]!==H?($=r.jsx(Lr,{asChild:!0,children:r.jsxs("button",{type:"button",className:E,style:q,onClick:k,children:[Q,H]})}),e[15]=E,e[16]=q,e[17]=k,e[18]=Q,e[19]=H,e[20]=$):$=e[20];let te;e[21]!==y?(te=y("sandbox.fileTreeRow.newFile"),e[21]=y,e[22]=te):te=e[22];let X;e[23]!==d||e[24]!==te?(X=r.jsx(ue,{onSelect:d,children:te}),e[23]=d,e[24]=te,e[25]=X):X=e[25];let Y;e[26]!==y?(Y=y("sandbox.fileTreeRow.newFolder"),e[26]=y,e[27]=Y):Y=e[27];let z;e[28]!==m||e[29]!==Y?(z=r.jsx(ue,{onSelect:m,children:Y}),e[28]=m,e[29]=Y,e[30]=z):z=e[30];let F;e[31]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsx(st,{}),e[31]=F):F=e[31];let W;e[32]!==y?(W=y("sandbox.fileTreeRow.copyPath"),e[32]=y,e[33]=W):W=e[33];let A;e[34]!==g||e[35]!==W?(A=r.jsx(ue,{onSelect:g,children:W}),e[34]=g,e[35]=W,e[36]=A):A=e[36];let O;e[37]!==y?(O=y("sandbox.fileTreeRow.copyRelativePath"),e[37]=y,e[38]=O):O=e[38];let _;e[39]!==S||e[40]!==O?(_=r.jsx(ue,{onSelect:S,children:O}),e[39]=S,e[40]=O,e[41]=_):_=e[41];let R;e[42]===Symbol.for("react.memo_cache_sentinel")?(R=r.jsx(st,{}),e[42]=R):R=e[42];let G;e[43]!==y?(G=y("sandbox.fileTreeRow.rename"),e[43]=y,e[44]=G):G=e[44];let T;e[45]!==I||e[46]!==G?(T=r.jsx(ue,{onSelect:I,children:G}),e[45]=I,e[46]=G,e[47]=T):T=e[47];let B;e[48]!==y?(B=y("sandbox.fileTreeRow.delete"),e[48]=y,e[49]=B):B=e[49];let Z;e[50]!==U||e[51]!==B?(Z=r.jsx(ue,{variant:"destructive",onSelect:U,children:B}),e[50]=U,e[51]=B,e[52]=Z):Z=e[52];let L;e[53]!==X||e[54]!==z||e[55]!==A||e[56]!==_||e[57]!==T||e[58]!==Z?(L=r.jsxs(Ir,{className:"w-52",children:[X,z,F,A,_,R,T,Z]}),e[53]=X,e[54]=z,e[55]=A,e[56]=_,e[57]=T,e[58]=Z,e[59]=L):L=e[59];let ee;return e[60]!==L||e[61]!==$?(ee=r.jsxs(Or,{children:[$,L]}),e[60]=L,e[61]=$,e[62]=ee):ee=e[62],ee}bn.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});const at=200,zr=2,_r=250,it=200;function Gr(i,e,s,a){return`/api/${i}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(s)}/${a}`}function Br(i){const e=se.c(9),{text:s,query:a}=i;let l,p,h;if(e[0]!==a||e[1]!==s){const{leadingEllipsis:C,segments:w}=Xn(s,a);l="truncate font-mono text-muted-foreground",p=C&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),h=w.map(Vr),e[0]=a,e[1]=s,e[2]=l,e[3]=p,e[4]=h}else l=e[2],p=e[3],h=e[4];let x;return e[5]!==l||e[6]!==p||e[7]!==h?(x=r.jsxs("span",{className:l,children:[p,h]}),e[5]=l,e[6]=p,e[7]=h,e[8]=x):x=e[8],x}function Vr(i,e){return i.match?r.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:i.text},e):r.jsx("span",{children:i.text},e)}function Ka({orgSlug:i,virtualMcpId:e,branch:s,openPath:a}){const[l,p]=u.useState({files:[],directories:[],truncated:!1}),{files:h,directories:x}=l,[C,w]=u.useState(new Set),[d,m]=u.useState(null),[g,S]=u.useState(null),[I,U]=u.useState([]),[b,y]=u.useState(""),[M,D]=u.useState(null),[P,j]=u.useState(null),[E,K]=u.useState(!1),[q,k]=u.useState(!1),[Q,H]=u.useState(!1),[$,te]=u.useState(!1),[,X]=u.useState(new Set),[Y,z]=u.useState(new Set),F=u.useRef(0),W=u.useRef(null),A=u.useRef(new Set),O=u.useRef(new Map),_=u.useRef(null),R=u.useRef(0),G=u.useRef(null),T=u.useRef(null),B=u.useRef(null);function Z(t){X(n=>{const o=typeof t=="function"?t(n):t;return A.current=o,o})}const[L,ee]=u.useState(new Map),De=u.useRef(null),[ae,he]=u.useState(null),{sendMessage:bt}=jn(),{openSidePanel:yt}=En(),ge=hn(),[V,oe]=u.useState(null),[Re,Te]=u.useState(null),[be,ye]=u.useState(!1);async function ie(t,n){const o=await fetch(Gr(i,e,s,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const c=await o.json().catch(()=>({}));throw new Error(c.error??`Request failed (${o.status})`)}return o.json()}async function ve(){ge.invalidateQueries({queryKey:rt(i,e,s)})}function _e(t,n,o){navigator.clipboard.writeText(o).then(()=>ne.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>ne.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function vt(t){const n=tr(t);if(!n)return;const o=`${i}/${e}/${s}`;ge.setQueryData(Ze.decofile(o),c=>{if(!c)return c;const{[n]:f,...v}=c;return v}),ge.invalidateQueries({queryKey:Ze.liveMeta(i,e,s)})}function Ct(t){const n=t.kind==="file"?[t.path]:h.filter(o=>o.startsWith(".deco/blocks/")).map(o=>Ne(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)vt(o)}function wt(t){const n=Ne(t);return I.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const c=L.get(o);return!!(c?.loaded&&c.editorValue!==c.savedContent)})}function Ge(t){U(n=>n.map(o=>t(o)).filter(o=>o!==null)),m(n=>n&&t(n)),ee(n=>{const o=new Map;for(const[c,f]of n){const v=t(c);v&&o.set(v,f)}return o}),S(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function Nt(t){const n=Ne(t);S(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Ge(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function jt(t,n){if(!V)return;const o=Ee(V.parentDir,n);if(Ke(o,h,x))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:re(o),content:""}),await pe(),await ve(),oe(null),me(o)}async function Et(t,n){if(!V)return;const o=Ee(V.parentDir,n);if(Ke(o,h,x))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const c=re(o);await ie("mkdir",{path:c}),p(f=>({...f,directories:f.directories.includes(c)?f.directories:[...f.directories,c]})),await pe(),await ve(),oe(null),w(f=>{const v=new Set(f);for(const ce of Ae(o))v.add(ce);return v.add(o),v}),S({name:n,path:o,kind:"directory",children:[]})}async function St(t,n){if(!V)return;const o=V.node.path,c=je(o),f=Ee(c,n);if(f===o){oe(null);return}if(Ke(f,h,x))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("rename",{from:re(o),to:re(f)}),Ge(v=>v===o?f:v.startsWith(`${o}/`)?Ee(f,v.slice(o.length+1)):v),await pe(),await ve(),oe(null)}async function Mt(t,n){ye(!0);try{await ie("unlink",{path:re(n.path),recursive:n.kind==="directory"}),Ct(n),Nt(n.path),await pe(),await ve(),Te(null),ne.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(o){ne.error(o instanceof Error?o.message:t("sandbox.fileExplorer.deleteFailed"))}finally{ye(!1)}}async function Dt(t,n){const o=Jn(n);if(o){ne.error(o);return}ye(!0);try{V?.mode==="new-file"?(await jt(t,n),ne.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):V?.mode==="new-folder"?(await Et(t,n),ne.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):V?.mode==="rename"&&(await St(t,n),ne.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(c){ne.error(c instanceof Error?c.message:t("sandbox.fileExplorer.operationFailed"))}finally{ye(!1)}}const Be=u.useRef(!1);Be.current||(Be.current=!0,W.current=pe());const[Rt,Tt]=u.useState(null),N=$e();if(a&&a!==Rt){Tt(a);const t=a;queueMicrotask(()=>{Vn(t)&&me(t).catch(n=>{ne.error(n instanceof Error?n.message:N("sandbox.fileExplorer.failedToOpenFile"))})})}async function Pe(t){const n=await ie("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ve(t,n,o){if(o!==F.current)return!1;let c=!1;return p(f=>{const v=n?nr(f.files,f.directories,t,f.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return c=!!v.truncated,{files:v.files,directories:v.directories,truncated:c}}),c&&ne.warning(N("sandbox.fileExplorer.fileListTruncated")),c}async function Pt(t){const n=O.current.get(t);if(n)return n;const o=F.current,c=(async()=>{const f=await Pe({pattern:"**/*",path:re(t),limit:Fe}),v=Ve(f,!0,o);return!v&&o===F.current&&Z(ce=>{const Ce=new Set(ce);return Ce.add(t),Ce}),v})();O.current.set(t,c);try{return await c}finally{O.current.delete(t)}}async function Ue(t){if(!Ie(t,A.current))return!1;z(n=>new Set(n).add(t));try{return await Pt(t)}finally{z(n=>{const o=new Set(n);return o.delete(t),o})}}async function kt(t,n){const o=new Set(A.current);for(const c of Ae(n)){if(!Ie(c,o))continue;if(await Ue(c))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));o.add(c)}}async function pe(){const t=++F.current;G.current=null,T.current=null,O.current.clear(),H(!0),Z(new Set),w(new Set),z(new Set);try{const n=await Pe({pattern:"**/*",limit:Fe,maxDepth:Un});Ve(n,!1,t),te(!0)}catch{$&&ne.error(N("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{H(!1)}}async function He(t){if(!L.get(t)?.loaded){ee(o=>{const c=new Map(o);return c.set(t,{savedContent:"",editorValue:"",loaded:!1}),c});try{const o=await ie("read",{path:re(t),full:!0}),c=Yn(o.content??"");ee(f=>{const v=new Map(f);return v.set(t,{savedContent:c,editorValue:c,loaded:!0}),v})}catch{}}}function Ft(){R.current++,D(null),j(null),K(!1),k(!1)}async function At(){const t=F.current,n=G.current;if(n&&n.generation===t)return n.files;const o=T.current;if(o&&o.generation===t)return o.promise;const c=(async()=>{const f=await Pe({pattern:"**/*",limit:Fe});return F.current===t&&(G.current={generation:t,files:f.files}),f.files})();T.current={generation:t,promise:c};try{return await c}finally{T.current?.generation===t&&(T.current=null)}}async function Ot(t,n){try{const o=await At();if(n!==R.current)return;D(Zn(o,t,it))}catch{if(n!==R.current)return;D([])}}async function Lt(t,n){K(!0);try{const o=await ie("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:at});if(n!==R.current)return;j(er(o.results??"")),k((o.matchCount??0)>=at)}catch{if(n!==R.current)return;j([]),k(!1)}finally{n===R.current&&K(!1)}}function It(t){const n=t.trim(),o=++R.current;Ot(n,o),n.length<zr?(j(null),K(!1),k(!1)):Lt(n,o)}function Kt(t){if(y(t),_.current&&clearTimeout(_.current),!t.trim()){Ft();return}_.current=setTimeout(()=>{It(t)},_r)}function We(t){const n=B.current;if(!n||n.path!==d)return;B.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function $t(t){B.current={path:t.path,line:t.line};const n=d===t.path&&L.get(t.path)?.loaded;me(t.path),n&&De.current&&We(De.current)}async function zt(t,n){try{await ie("write",{path:re(t),content:n}),we("file saved via sandbox /write",{path:t}),ge.invalidateQueries({queryKey:rt(i,e,s)});try{const o=await Sn(i,e,s);we("git status after save",o)}catch(o){we("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}ee(o=>{const c=new Map(o),f=c.get(t);return f&&c.set(t,{...f,savedContent:n}),c})}catch(o){we("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function _t(t){m(t),S({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),he(null),I.includes(t)||U(n=>[...n,t]),He(t)}function Gt(t){U(n=>{const o=n.filter(c=>c!==t);return d===t&&m(o[o.length-1]??null),o}),ee(n=>{const o=new Map(n);return o.delete(t),o})}function qe(t){w(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Bt(t){if(Ie(t,A.current))try{if(await Ue(t))return}catch(n){ne.error(n instanceof Error?n.message:N("sandbox.fileExplorer.failedToLoadFolder"));return}qe(t)}async function Vt(t,n){if(n){qe(t);return}await Bt(t)}async function me(t){await W.current,await kt(N,t);const n=Ae(t);w(o=>{const c=new Set(o);for(const f of n)c.add(f);return c}),_t(t)}function Ut(){return g?.kind==="directory"?g.path:g?.kind==="file"?je(g.path):d?je(d):"/"}function Qe(t){const n=Ut();oe({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Ht=Hn(h,x),Xe=Wn(Ht,C),ke=M?.length??0,Ye=qn(P??[]),Je=P?.length??0,de=d?L.get(d):null,Wt=de?.loaded&&de.editorValue!==de.savedContent,qt=Re?wt(Re.path):[],Qt=(t,n)=>{De.current=t,We(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await zt(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),c=t.getModel();if(!o||!c||!d)return;const f=c.getValueInRange(o);he({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:f})})};function Xt(t){if(!ae)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${ae.filePath}\``,`**Lines:** ${ae.lineStart}–${ae.lineEnd}`];if(ae.selectedCode){const o=Le(ae.filePath),c=ae.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,c,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),yt("chat"),bt({parts:[{type:"text",text:n.join(`
|
|
2
|
-
`)}]}),he(null)}return Q&&!$?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(yn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:b,onChange:t=>Kt(t.target.value),placeholder:N("sandbox.fileExplorer.searchFilesPlaceholder"),"aria-label":N("sandbox.fileExplorer.searchFilesLabel"),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"})]}),r.jsxs(et,{children:[r.jsx(tt,{asChild:!0,children:r.jsx(Me,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":N("sandbox.fileExplorer.newFileLabel"),onClick:()=>Qe("new-file"),children:r.jsx(vn,{size:14})})}),r.jsx(nt,{side:"bottom",children:N("sandbox.fileExplorer.newFile")})]}),r.jsxs(et,{children:[r.jsx(tt,{asChild:!0,children:r.jsx(Me,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":N("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Qe("new-folder"),children:r.jsx(Cn,{size:14})})}),r.jsx(nt,{side:"bottom",children:N("sandbox.fileExplorer.newFolder")})]})]}),r.jsx(Nn,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[!b&&Xe.map(t=>{const{node:n,depth:o}=t,c=n.kind==="directory",f=C.has(n.path),v=g?.path===n.path,ce=Qn(n.path,n.kind),Ce=c&&Y.has(n.path);return r.jsx($r,{node:n,depth:o,isExpanded:f,isSelected:v,isLoading:Ce,fileVisual:Oe(n.name),onSelect:()=>S(n),onOpen:()=>{c?Vt(n.path,f):me(n.path)},onNewFile:()=>oe({mode:"new-file",node:n,parentDir:ce}),onNewFolder:()=>oe({mode:"new-folder",node:n,parentDir:ce}),onCopyPath:()=>_e(N,"Path",Ne(n.path)),onCopyRelativePath:()=>_e(N,"Relative path",re(n.path)),onRename:()=>oe({mode:"rename",node:n,parentDir:ce}),onDelete:()=>Te(n)},n.path)}),!b&&$&&Xe.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:N("sandbox.fileExplorer.noFilesFound")}),b&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:N("sandbox.fileExplorer.files")}),ke>0&&r.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[ke,ke>=it?"+":""]})]}),M!==null&&M.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:N("sandbox.fileExplorer.noFileNamesMatch")}),M?.map(t=>{const n=t.split("/").pop()??t,o=je(t),{Icon:c,color:f}=Oe(n),v=d===t;return r.jsxs("button",{type:"button",onClick:()=>{me(t)},title:t,className:le("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",v&&"bg-accent"),children:[r.jsx(c,{size:14,className:le("shrink-0",f)}),r.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),o!=="/"&&r.jsx("span",{className:"truncate text-muted-foreground/60",children:o})]},t)})]}),b&&r.jsxs("div",{className:"mt-1 border-t pt-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:N("sandbox.fileExplorer.inFiles")}),Je>0&&r.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[Je,q?"+":""]}),E&&r.jsx(fe,{size:10,className:"animate-spin"})]}),!E&&P!==null&&Ye.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:N("sandbox.fileExplorer.noMatchesInFileContents")}),Ye.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:o,color:c}=Oe(n);return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[r.jsx(o,{size:14,className:le("shrink-0",c)}),r.jsx("span",{className:"truncate",children:n}),r.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(f=>r.jsxs("button",{type:"button",onClick:()=>$t(f),title:`${t.path}:${f.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[r.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:f.line}),r.jsx(Br,{text:f.text,query:b})]},`${t.path}:${f.line}`))]},t.path)})]})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[I.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:I.map(t=>{const n=L.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,c=d===t,f=t.split("/").pop()??t;return r.jsxs("div",{className:le("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",c?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{m(t),He(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":c,children:[r.jsx("span",{className:"truncate max-w-32",children:f}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:v=>{v.stopPropagation(),Gt(t)},children:r.jsx(wn,{size:12})})]},t)})}),ae&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.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 o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&Xt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:N("sandbox.fileExplorer.askTheAiPlaceholder"),className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&he(null)}}),r.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:N("sandbox.fileExplorer.send"),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:N("sandbox.fileExplorer.send")}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:d&&de?.loaded?r.jsx(gn,{language:Le(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:de.editorValue,path:d,onChange:t=>{const n=d;n&&ee(o=>{const c=new Map(o),f=c.get(n);return f&&c.set(n,{...f,editorValue:t??""}),c})},onMount:Qt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{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}}},d):d&&!de?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:N("sandbox.fileExplorer.selectFileToEdit")})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:d}),r.jsxs("span",{children:[N(Wt?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Le(d)]})]})]}),r.jsx(or,{open:V!==null,mode:V?.mode??"new-file",initialName:V?.mode==="rename"?V.node.name:"",parentLabel:V&&V.mode!=="rename"?V.parentDir==="/"?"/":re(V.parentDir):void 0,isPending:be,onSubmit:t=>Dt(N,t),onOpenChange:t=>{!t&&!be&&oe(null)}}),r.jsx(sr,{deleteTarget:Re,deleteDirtyPaths:qt,fsActionPending:be,onOpenChange:t=>{!t&&!be&&Te(null)},onConfirm:t=>{Mt(N,t)}})]})}export{Ka as FileExplorer};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as ee,a as re,o as Z,r as z,$ as V,c as M,b as $,j as t,k as Q,e as te,t as K,dZ as ae,K as q,n as ce,m as Y,B as ue,x as de,y as me}from"./index-Dyk7ikoX.js";import{a as fe,b as ge,d as xe,e as pe}from"./dialog-CfZpY_2q.js";import{C as he}from"./collection-search-CnSAD3aA.js";import{u as be}from"./use-debounced-value-uO_bm41c.js";import{b as ne,u as ye}from"./use-connection-CvtYxdhN.js";import{u as J,S as se}from"./use-mcp-client-DmQaIOOa.js";import{a as oe}from"./authenticate-and-persist-oauth-Cs_ey_Si.js";import{b as ie}from"./Settings02-1z5a1jSn.js";import{Q as je}from"./agent-icon-JkG_B24O.js";import{u as Ne,G as H}from"./use-registry-app-ZmEmrGrH.js";import{e as ve}from"./extract-connection-data-C6WAUA-A.js";import{c as ke}from"./use-navigate-to-agent-Bot51FWx.js";import{p as X,f as Ce}from"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import{g as we}from"./github-repo-scope-DjMZbiKa.js";const Re="deco/mcp-github";function Se(P){const{org:e}=ee(),{data:a}=re.useSession(),p=ne(),k=Z(),[o,d]=z.useState("idle"),[i,s]=z.useState(null),[f,v]=z.useState(null),{data:b,isLoading:C}=Ne(Re,{enabled:P.enabled}),c=z.useRef(!1);P.enabled&&b&&!C&&!c.current&&a?.user?.id&&o==="idle"&&(c.current=!0,l());async function l(){if(!(!b||!a?.user?.id||!e))try{d("installing"),s(null);const u=ve(b,e.id,a.user.id,{remoteIndex:0});if(!u.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await p.create.mutateAsync(u);d("authenticating");const h=await oe({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:m=>p.update.mutateAsync({id:g,data:{connection_token:m}}).then(()=>{})});if(h.ran&&!h.ok){try{await p.delete.mutateAsync(g)}catch{}throw new Error(h.error&&h.error!=="no token received"?h.error:"No token received from GitHub")}V(k,e.id),v(u),d("ready")}catch(u){s(u instanceof Error?u.message:String(u)),d("error")}}function r(){d("idle"),s(null),v(null),c.current=!1}return P.enabled&&C&&o==="idle"?{status:"installing",error:null,connection:null,retry:r}:{status:o,error:i,connection:f,retry:r}}function Ke(P){const e=M.c(27),{open:a,onOpenChange:p,title:k,onImportComplete:o,mode:d}=P,i=d===void 0?"agent":d,s=$();let f;e[0]!==i||e[1]!==s||e[2]!==k?(f=k??s(i==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=i,e[1]=s,e[2]=k,e[3]=f):f=e[3];const v=f,[b,C]=z.useState(null);let c;e[4]!==v?(c=t.jsx(fe,{className:"sr-only",children:t.jsx(ge,{children:v})}),e[4]=v,e[5]=c):c=e[5];let l;e[6]!==v||e[7]!==b||e[8]!==s?(l=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:b?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>C(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":s("common.githubRepoPicker.backToAccounts"),children:t.jsx(ie,{size:16})}),t.jsx("img",{src:b.avatarUrl,alt:b.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:b.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(H,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v})]})}),e[6]=v,e[7]=b,e[8]=s,e[9]=l):l=e[9];let r;e[10]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Q,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=r):r=e[10];let u;e[11]!==p?(u=()=>p(!1),e[11]=p,e[12]=u):u=e[12];let x;e[13]!==i||e[14]!==o||e[15]!==a||e[16]!==b||e[17]!==u?(x=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(z.Suspense,{fallback:r,children:t.jsx(Pe,{open:a,onComplete:u,selectedInstallation:b,onSelectInstallation:C,onImportComplete:o,mode:i})})}),e[13]=i,e[14]=o,e[15]=a,e[16]=b,e[17]=u,e[18]=x):x=e[18];let g;e[19]!==c||e[20]!==l||e[21]!==x?(g=t.jsxs(xe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[c,l,x]}),e[19]=c,e[20]=l,e[21]=x,e[22]=g):g=e[22];let h;return e[23]!==p||e[24]!==a||e[25]!==g?(h=t.jsx(pe,{open:a,onOpenChange:p,children:g}),e[23]=p,e[24]=a,e[25]=g,e[26]=h):h=e[26],h}function Pe({open:P,onComplete:e,selectedInstallation:a,onSelectInstallation:p,onImportComplete:k,mode:o="agent"}){const d=$(),{org:i}=ee(),s=Z(),f=ke(),[v,b]=z.useState(null),C=ye({slug:"mcp-github"}),c=we(C),l=Se({enabled:P&&c.length===0}),r=c.length===1?c[0]??null:v,u=J({connectionId:r?.id??"",orgId:i.id,orgSlug:i.slug}),x=J({connectionId:se,orgId:i.id,orgSlug:i.slug}),g=async(n,y)=>{try{const w=await u.callTool({name:"get_file_contents",arguments:{owner:n.owner,repo:n.name,path:y}});if(w.isError)return null;const S=w.content?.find(I=>I.type==="resource")?.resource?.text;if(!S)return null;try{const I=JSON.parse(S);return typeof I=="string"?I:JSON.stringify(I)}catch{return S}}catch{return null}},h=(n,y)=>{Promise.all([g(y,"AGENTS.md"),g(y,"CLAUDE.md")]).then(async([j,w])=>{const R=j??w??null;R&&(await x.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:n,data:{metadata:{instructions:R}}}}),V(s,i.id))}).catch(j=>{console.error("GitHub instructions fetch failed:",j)})},m=te({mutationFn:async n=>{if(!r||!a)throw new Error("No GitHub connection or installation");const y=a.installationId;if(o==="connection"){const{childConnectionId:R}=await X({orgSlug:i.slug,sourceConnection:r,installationId:y,owner:n.owner,repo:n.name,githubCallTool:S=>u.callTool(S),selfCallTool:S=>x.callTool(S),orgShared:!0});return{virtualMcpId:null,repo:n,connectionId:R,item:null}}const{childConnectionId:j}=await X({orgSlug:i.slug,sourceConnection:r,installationId:y,owner:n.owner,repo:n.name,githubCallTool:R=>u.callTool(R),selfCallTool:R=>x.callTool(R)});let w=null;try{const R=await x.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:n.name,description:n.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:n.owner,name:n.name,url:n.url,installationId:y,connectionId:j},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:j}]}}}),S=R.structuredContent??R,I=S.item?.id;if(!S.item||!I)throw new Error("Failed to create the imported agent");return w=I,{virtualMcpId:I,repo:n,connectionId:j,item:S.item}}catch(R){throw w&&await x.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:w}}).catch(()=>{}),await x.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:j,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:n,repo:y,connectionId:j,item:w})=>{if(o==="connection"||!n||!w){V(s,i.id),ae(s,i.id),K.success(d("common.githubRepoPicker.addedRepo",{name:y.name})),e();return}if(s.setQueryData(q.collectionItem(x,i.id,"","VIRTUAL_MCP",n),{item:w}),V(s,i.id),h(n,y),k){k({virtualMcpId:n,repo:y,connectionId:j});return}K.success(d("common.githubRepoPicker.importedRepo",{name:y.name})),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),f(n)},onError:n=>{K.error(d("common.githubRepoPicker.failedImport",{error:n instanceof Error?n.message:d("common.githubRepoPicker.unknownError")}))}});return l.status==="installing"||l.status==="authenticating"?t.jsx(W,{status:l.status,error:null,retry:l.retry}):l.status==="error"?t.jsx(W,{status:"error",error:l.error,retry:l.retry}):c.length===0&&l.status==="idle"?t.jsx(W,{status:"installing",error:null,retry:l.retry}):c.length>1&&!r?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:d("common.githubRepoPicker.selectConnection")})}),c.map(n=>t.jsxs("button",{type:"button",onClick:()=>b(n),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[n.icon?t.jsx("img",{src:n.icon,alt:n.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(H,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:n.title})]},n.id))]}):r?a?t.jsx(Te,{connectionId:r.id,orgId:i.id,orgSlug:i.slug,installation:a,onSelectRepo:n=>m.mutate(n),isSaving:m.isPending}):t.jsx(Ie,{connectionId:r.id,orgId:i.id,orgSlug:i.slug,onSelect:p,showBackButton:c.length>1,onBack:()=>b(null)}):null}function Ie(P){const e=M.c(75),{connectionId:a,orgId:p,orgSlug:k,onSelect:o,showBackButton:d,onBack:i}=P,s=$();let f;e[0]!==p||e[1]!==k?(f={connectionId:se,orgId:p,orgSlug:k},e[0]=p,e[1]=k,e[2]=f):f=e[2];const v=J(f),b=Z(),C=ne();let c;e[3]!==a||e[4]!==p?(c=q.githubUserOrgs(p,a),e[3]=a,e[4]=p,e[5]=c):c=e[5];let l;e[6]!==a||e[7]!==v?(l=()=>Ce(N=>v.callTool(N),a),e[6]=a,e[7]=v,e[8]=l):l=e[8];let r;e[9]!==c||e[10]!==l?(r={queryKey:c,queryFn:l},e[9]=c,e[10]=l,e[11]=r):r=e[11];const u=ce(r);let x;e[12]!==C||e[13]!==a||e[14]!==u||e[15]!==p||e[16]!==k||e[17]!==b?(x=async()=>{const N=await oe({connectionId:a,orgId:p,orgSlug:k,persistFallback:L=>C.update.mutateAsync({id:a,data:{connection_token:L}}).then(Ee)});if(N.ran&&!N.ok)throw new Error(N.error??"no token received");const E=new URL(`/api/${k}/mcp/${a}`,window.location.origin);await b.invalidateQueries({queryKey:q.isMCPAuthenticated(E.href,null)}),await b.invalidateQueries({queryKey:q.mcpClientPrefix()}),await u.refetch()},e[12]=C,e[13]=a,e[14]=u,e[15]=p,e[16]=k,e[17]=b,e[18]=x):x=e[18];let g;e[19]!==s?(g=N=>{K.error(s("common.githubRepoPicker.failedReconnect",{error:N instanceof Error?N.message:s("common.githubRepoPicker.unknownError")}))},e[19]=s,e[20]=g):g=e[20];let h;e[21]!==x||e[22]!==g?(h={mutationFn:x,onError:g},e[21]=x,e[22]=g,e[23]=h):h=e[23];const m=te(h);if(u.isLoading){let N;return e[24]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Q,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=N):N=e[24],N}if(u.isError){let N;e[25]!==s?(N=s("common.githubRepoPicker.failedLoadAccounts"),e[25]=s,e[26]=N):N=e[26];let E;e[27]!==N?(E=t.jsx("p",{className:"text-sm text-destructive",children:N}),e[27]=N,e[28]=E):E=e[28];let L;e[29]!==s?(L=s("common.githubRepoPicker.connectionExpiredMessage"),e[29]=s,e[30]=L):L=e[30];let G;e[31]!==L?(G=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:L}),e[31]=L,e[32]=G):G=e[32];let O;e[33]!==m?(O=()=>m.mutate(),e[33]=m,e[34]=O):O=e[34];const le=m.isPending;let U;e[35]!==m.isPending?(U=m.isPending?t.jsx(Q,{size:14,className:"animate-spin"}):t.jsx(H,{className:"size-3.5"}),e[35]=m.isPending,e[36]=U):U=e[36];let F;e[37]!==s?(F=s("common.githubRepoPicker.reconnectGitHub"),e[37]=s,e[38]=F):F=e[38];let D;e[39]!==m.isPending||e[40]!==O||e[41]!==U||e[42]!==F?(D=t.jsxs(ue,{type:"button",variant:"outline",size:"sm",onClick:O,disabled:le,children:[U,F]}),e[39]=m.isPending,e[40]=O,e[41]=U,e[42]=F,e[43]=D):D=e[43];let B;return e[44]!==G||e[45]!==D||e[46]!==E?(B=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[E,G,D]}),e[44]=G,e[45]=D,e[46]=E,e[47]=B):B=e[47],B}const n=u.data;if(!n)return null;let y;e[48]!==i||e[49]!==d||e[50]!==s?(y=d&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ie,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[48]=i,e[49]=d,e[50]=s,e[51]=y):y=e[51];let j;if(e[52]!==n.installations||e[53]!==o||e[54]!==s){let N;e[56]!==o||e[57]!==s?(N=E=>t.jsxs("button",{type:"button",onClick:()=>o(E),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:E.avatarUrl,alt:E.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:E.login}),E.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:s("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[s("common.githubRepoPicker.select")," →"]})]},E.installationId),e[56]=o,e[57]=s,e[58]=N):N=e[58],j=n.installations.map(N),e[52]=n.installations,e[53]=o,e[54]=s,e[55]=j}else j=e[55];let w;e[59]!==j?(w=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:j}),e[59]=j,e[60]=w):w=e[60];const R=n.appSlug?`https://github.com/apps/${n.appSlug}/installations/new`:"https://github.com/settings/installations";let S;e[61]!==s?(S=s("common.githubRepoPicker.accountNotListed"),e[61]=s,e[62]=S):S=e[62];let I;e[63]!==s?(I=s("common.githubRepoPicker.installGitHubApp"),e[63]=s,e[64]=I):I=e[64];let T;e[65]!==I?(T=t.jsx("span",{className:"underline underline-offset-2",children:I}),e[65]=I,e[66]=T):T=e[66];let A;e[67]!==R||e[68]!==S||e[69]!==T?(A=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:R,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[S," ",T]})}),e[67]=R,e[68]=S,e[69]=T,e[70]=A):A=e[70];let _;return e[71]!==w||e[72]!==A||e[73]!==y?(_=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[y,w,A]}),e[71]=w,e[72]=A,e[73]=y,e[74]=_):_=e[74],_}function Ee(){}function Te(P){const e=M.c(23),{connectionId:a,orgId:p,orgSlug:k,installation:o,onSelectRepo:d,isSaving:i}=P,s=$(),[f,v]=z.useState(""),b=be(f,300),C=z.useDeferredValue(b),c=f!==C;let l;e[0]!==s?(l=s("common.githubRepoPicker.searchRepositories"),e[0]=s,e[1]=l):l=e[1];let r;e[2]!==c||e[3]!==f||e[4]!==l?(r=t.jsx(he,{placeholder:l,value:f,onChange:v,isSearching:c}),e[2]=c,e[3]=f,e[4]=l,e[5]=r):r=e[5];const u=c?"opacity-40":"opacity-100";let x;e[6]!==u?(x=Y("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",u),e[6]=u,e[7]=x):x=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Q,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=g):g=e[8];let h;e[9]!==a||e[10]!==C||e[11]!==o||e[12]!==i||e[13]!==d||e[14]!==p||e[15]!==k?(h=t.jsx(z.Suspense,{fallback:g,children:t.jsx(Ae,{connectionId:a,orgId:p,orgSlug:k,installation:o,query:C,onSelectRepo:d,isSaving:i})}),e[9]=a,e[10]=C,e[11]=o,e[12]=i,e[13]=d,e[14]=p,e[15]=k,e[16]=h):h=e[16];let m;e[17]!==x||e[18]!==h?(m=t.jsx("div",{className:x,children:h}),e[17]=x,e[18]=h,e[19]=m):m=e[19];let n;return e[20]!==r||e[21]!==m?(n=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r,m]}),e[20]=r,e[21]=m,e[22]=n):n=e[22],n}function Ae(P){const e=M.c(36),{connectionId:a,orgId:p,orgSlug:k,installation:o,query:d,onSelectRepo:i,isSaving:s}=P,f=$();let v;e[0]!==a||e[1]!==p||e[2]!==k?(v={connectionId:a,orgId:p,orgSlug:k},e[0]=a,e[1]=p,e[2]=k,e[3]=v):v=e[3];const b=J(v),C=o.type==="User"?"user":"org",c=d?`${C}:${o.login} ${d} in:name`:`${C}:${o.login}`;let l;e[4]!==a||e[5]!==o.login||e[6]!==p||e[7]!==d?(l=q.githubOrgRepos(p,a,o.login,d),e[4]=a,e[5]=o.login,e[6]=p,e[7]=d,e[8]=l):l=e[8];let r;e[9]!==b||e[10]!==c?(r=async m=>{const{signal:n}=m,j=(await b.callTool({name:"search_repositories",arguments:{query:c,page:1,perPage:30}},void 0,{signal:n})).content?.[0]?.text;if(!j)throw new Error("No response from search_repositories");return(JSON.parse(j).items??[]).map(_e)},e[9]=b,e[10]=c,e[11]=r):r=e[11];let u;e[12]!==l||e[13]!==r?(u={queryKey:l,queryFn:r},e[12]=l,e[13]=r,e[14]=u):u=e[14];const{data:x}=de(u);if(x.length===0){let m;e[15]!==f?(m=f("common.githubRepoPicker.noRepositoriesFound"),e[15]=f,e[16]=m):m=e[16];let n;e[17]!==m?(n=t.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[17]=m,e[18]=n):n=e[18];let y;e[19]!==d||e[20]!==f?(y=d&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:f("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=d,e[20]=f,e[21]=y):y=e[21];let j;return e[22]!==n||e[23]!==y?(j=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[n,y]}),e[22]=n,e[23]=y,e[24]=j):j=e[24],j}let g;if(e[25]!==s||e[26]!==i||e[27]!==x||e[28]!==f){let m;e[30]!==s||e[31]!==i||e[32]!==f?(m=n=>t.jsxs("button",{type:"button",onClick:()=>i(n),disabled:s,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(H,{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:n.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:[n.private?t.jsx(me,{size:10}):t.jsx(je,{size:10}),n.private?f("common.githubRepoPicker.private"):f("common.githubRepoPicker.public")]})]},n.fullName),e[30]=s,e[31]=i,e[32]=f,e[33]=m):m=e[33],g=x.map(m),e[25]=s,e[26]=i,e[27]=x,e[28]=f,e[29]=g}else g=e[29];let h;return e[34]!==g?(h=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:g}),e[34]=g,e[35]=h):h=e[35],h}function _e(P){return{name:P.name,fullName:P.full_name,owner:P.full_name.split("/")[0]??"",url:P.html_url,private:P.private,description:P.description,updatedAt:P.updated_at}}function W(P){const e=M.c(51),{status:a,error:p,retry:k}=P,o=$();if(a==="error"){let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(H,{className:"size-5 text-destructive"})}),e[0]=j):j=e[0];let w;e[1]!==o?(w=o("common.githubRepoPicker.connectionFailed"),e[1]=o,e[2]=w):w=e[2];let R;e[3]!==w?(R=t.jsx("p",{className:"text-sm font-medium",children:w}),e[3]=w,e[4]=R):R=e[4];let S;e[5]!==p||e[6]!==o?(S=p??o("common.githubRepoPicker.somethingWentWrong"),e[5]=p,e[6]=o,e[7]=S):S=e[7];let I;e[8]!==S?(I=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:S}),e[8]=S,e[9]=I):I=e[9];let T;e[10]!==R||e[11]!==I?(T=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[R,I]}),e[10]=R,e[11]=I,e[12]=T):T=e[12];let A;e[13]!==o?(A=o("common.githubRepoPicker.tryAgain"),e[13]=o,e[14]=A):A=e[14];let _;e[15]!==k||e[16]!==A?(_=t.jsx("button",{type:"button",onClick:k,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:A}),e[15]=k,e[16]=A,e[17]=_):_=e[17];let N;return e[18]!==T||e[19]!==_?(N=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[j,T,_]}),e[18]=T,e[19]=_,e[20]=N):N=e[20],N}const d=a==="authenticating";let i;e[21]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(H,{className:"size-5 text-foreground"})}),e[21]=i):i=e[21];let s;e[22]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"relative size-10",children:[i,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(Q,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=s):s=e[22];let f;e[23]!==d||e[24]!==o?(f=o(d?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=d,e[24]=o,e[25]=f):f=e[25];let v;e[26]!==f?(v=t.jsx("p",{className:"text-sm font-medium",children:f}),e[26]=f,e[27]=v):v=e[27];let b;e[28]!==d||e[29]!==o?(b=o(d?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=d,e[29]=o,e[30]=b):b=e[30];let C;e[31]!==b?(C=t.jsx("p",{className:"text-xs text-muted-foreground",children:b}),e[31]=b,e[32]=C):C=e[32];let c;e[33]!==v||e[34]!==C?(c=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[v,C]}),e[33]=v,e[34]=C,e[35]=c):c=e[35];const l=d?"bg-muted-foreground/30":"bg-foreground animate-pulse";let r;e[36]!==l?(r=Y("size-1.5 rounded-full",l),e[36]=l,e[37]=r):r=e[37];let u;e[38]!==r?(u=t.jsx("span",{className:r}),e[38]=r,e[39]=u):u=e[39];const x=d?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==x?(g=Y("size-1.5 rounded-full",x),e[40]=x,e[41]=g):g=e[41];let h;e[42]!==g?(h=t.jsx("span",{className:g}),e[42]=g,e[43]=h):h=e[43];let m;e[44]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=m):m=e[44];let n;e[45]!==u||e[46]!==h?(n=t.jsxs("div",{className:"flex items-center gap-1.5",children:[u,h,m]}),e[45]=u,e[46]=h,e[47]=n):n=e[47];let y;return e[48]!==n||e[49]!==c?(y=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[s,c,n]}),e[48]=n,e[49]=c,e[50]=y):y=e[50],y}export{Ke as G,Se as u};
|