decocms 4.76.43 → 4.76.45
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-CYnFm87k.js → AlertCircle-B947WyJr.js} +1 -1
- package/dist/client/assets/{AreaChart-BhV9uTIC.js → AreaChart-BfsmrOXE.js} +1 -1
- package/dist/client/assets/{ArrowUp-Ce-_ZrGn.js → ArrowUp-Bs_6P4Iu.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DYOvLwi-.js → ArrowUpRight-BxZoQJWz.js} +1 -1
- package/dist/client/assets/{Check-evpt16EA.js → Check-CcnPQW8L.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cw29V8Yd.js → CheckCircle-BU0_-3Q5.js} +1 -1
- package/dist/client/assets/{ChevronDown-Dg5I-IyP.js → ChevronDown-HIcxNu9L.js} +1 -1
- package/dist/client/assets/{ChevronRight-D_lkQ96x.js → ChevronRight-C5hCj-BJ.js} +1 -1
- package/dist/client/assets/{ChevronUp-XSOoP_Nn.js → ChevronUp-zg_HGLWR.js} +1 -1
- package/dist/client/assets/{Circle-BCcBwY3X.js → Circle-Bsy8_p9X.js} +1 -1
- package/dist/client/assets/{Copy01-ukzF2g5D.js → Copy01-CEOVwp8a.js} +1 -1
- package/dist/client/assets/{DotsVertical-BKwCKB4H.js → DotsVertical-BlOzCsHI.js} +1 -1
- package/dist/client/assets/{Eye-Rw2Lcj0d.js → Eye-CDNr9lij.js} +1 -1
- package/dist/client/assets/{FilterLines-Bk3fgVzt.js → FilterLines-CY9-eI6Z.js} +1 -1
- package/dist/client/assets/{Flag01-C_wN137m.js → Flag01-C5CmZtnc.js} +1 -1
- package/dist/client/assets/{Globe01-B-9XjG_y.js → Globe01-C0_GSmts.js} +1 -1
- package/dist/client/assets/{Globe04-DNSs6EXk.js → Globe04-blrjzALH.js} +1 -1
- package/dist/client/assets/{HardDrive-CljS-OyE.js → HardDrive-DDCNtQf8.js} +1 -1
- package/dist/client/assets/{Key01-CaIwkkK6.js → Key01-DhaQwTr9.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DsDSp7CT.js → LayoutLeft-CDGSUvFB.js} +1 -1
- package/dist/client/assets/{LinkExternal01-C7SNA6xk.js → LinkExternal01-wH6B14C5.js} +1 -1
- package/dist/client/assets/{List-B0zktlno.js → List-CT_BXxlG.js} +1 -1
- package/dist/client/assets/{Monitor01-kUiMqEFF.js → Monitor01-CGFN5sGg.js} +1 -1
- package/dist/client/assets/{Package-RGVJ3BIv.js → Package-Dl0Lfmce.js} +1 -1
- package/dist/client/assets/{Palette-D51YSINn.js → Palette-B0Atethk.js} +1 -1
- package/dist/client/assets/{Play-gkeg9Jqk.js → Play-Dz4heBw1.js} +1 -1
- package/dist/client/assets/{Plus-CT6paZ6Y.js → Plus-DkxBw62L.js} +1 -1
- package/dist/client/assets/{SearchLg-Ci14_nqQ.js → SearchLg-BxBwkXRA.js} +1 -1
- package/dist/client/assets/{SearchMd-DDsmGmx-.js → SearchMd-Ck8RI60i.js} +1 -1
- package/dist/client/assets/{Settings02-kiZvy_fn.js → Settings02-OSetn6ea.js} +1 -1
- package/dist/client/assets/{Shield01-mMv7jSi2.js → Shield01-Dq-HMUMk.js} +1 -1
- package/dist/client/assets/{Star01-B3Xobx84.js → Star01-BlQBW3oI.js} +1 -1
- package/dist/client/assets/{Stars01-D-xbM28c.js → Stars01-COr-0k43.js} +1 -1
- package/dist/client/assets/{Stars02-Du4pvaB9.js → Stars02-Uz2mjN30.js} +1 -1
- package/dist/client/assets/{Sun-Cq8zftWr.js → Sun-NMZSBMue.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Be6iAHDL.js → SwitchHorizontal01-aHLJ4VFM.js} +1 -1
- package/dist/client/assets/{Tool01-CcKyBYSb.js → Tool01-DPdDFdYA.js} +1 -1
- package/dist/client/assets/{Tool02-BTUXK138.js → Tool02-CIj3JzdV.js} +1 -1
- package/dist/client/assets/{Trash01-C7SUcgzf.js → Trash01-ZIY4ACli.js} +1 -1
- package/dist/client/assets/{TrendUp01-vYlS04gI.js → TrendUp01-DqQByDKq.js} +1 -1
- package/dist/client/assets/{Upload01-CFKVhcA1.js → Upload01-D1HGy3QV.js} +1 -1
- package/dist/client/assets/{User01-C9pHWMIN.js → User01-B2aITRRg.js} +1 -1
- package/dist/client/assets/{UserPlus01-yjW9fL-G.js → UserPlus01-CoO5zvRr.js} +1 -1
- package/dist/client/assets/{Users01-4r88txyu.js → Users01-HqZawgTe.js} +1 -1
- package/dist/client/assets/{Users03-DF3f2ZwS.js → Users03-C7WKxyUR.js} +1 -1
- package/dist/client/assets/{X-VIJVSyzC.js → X-Dmet8wMD.js} +1 -1
- package/dist/client/assets/{XCircle-BfHMsLh5.js → XCircle-BKwKlF9U.js} +1 -1
- package/dist/client/assets/{XClose-DZbEhf0R.js → XClose-iezakeMo.js} +1 -1
- package/dist/client/assets/{Zap-DEx1nSIp.js → Zap-CfXP7HDl.js} +1 -1
- package/dist/client/assets/{ZapSquare-BPLamaJH.js → ZapSquare-ChZlLfh_.js} +1 -1
- package/dist/client/assets/{ZoomOut-DyGQpwZF.js → ZoomOut-9DZqfrOE.js} +1 -1
- package/dist/client/assets/{access-gate-CmY0Vaq7.js → access-gate-w5g_NZJz.js} +1 -1
- package/dist/client/assets/{add-section-modal-D1tPhZ3a.js → add-section-modal-EZt3P0Xz.js} +1 -1
- package/dist/client/assets/{agent-icon-Mpp91bfB.js → agent-icon-3oSe4h7A.js} +1 -1
- package/dist/client/assets/agents-list--g3RXbon.js +1 -0
- package/dist/client/assets/{ai-providers-oScyWdCm.js → ai-providers-xzs6ey-5.js} +1 -1
- package/dist/client/assets/{alert-DVVesbQc.js → alert-BYCTaSqx.js} +1 -1
- package/dist/client/assets/{alert-dialog-CL004fe5.js → alert-dialog-DFA_nrL8.js} +1 -1
- package/dist/client/assets/app-editor-C2t8oVQ9.js +1 -0
- package/dist/client/assets/{auth-CeuFwPxM.js → auth-CYtv0_rL.js} +1 -1
- package/dist/client/assets/{auth-catchall-CNBMHmP9.js → auth-catchall-DYzFRFT-.js} +1 -1
- package/dist/client/assets/{auth-entry-00pp75eo.js → auth-entry-DA-DPJTf.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DGlwgd2W.js → auth-split-layout-hlCmxHcd.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CTnNYy7E.js → authenticate-and-persist-oauth-CRs0CnsY.js} +1 -1
- package/dist/client/assets/{automation-list-row-DPU1cfeC.js → automation-list-row-DjYgTsuk.js} +1 -1
- package/dist/client/assets/{automation-runs-buslfflw.js → automation-runs-Db6yr9QX.js} +1 -1
- package/dist/client/assets/automations-DTXTPNDC.js +1 -0
- package/dist/client/assets/{autosend-DoEB2J9-.js → autosend-DpuAJlz4.js} +1 -1
- package/dist/client/assets/{avatar-DudI_cM5.js → avatar-DGZ13TB0.js} +1 -1
- package/dist/client/assets/{badge-Ds5R9rAV.js → badge-BmdcYP2l.js} +1 -1
- package/dist/client/assets/{block-document-D1B6WRbV.js → block-document-gXgzA-JT.js} +1 -1
- package/dist/client/assets/{brand-context-CE4bEfXo.js → brand-context-D5LAfjNE.js} +1 -1
- package/dist/client/assets/{buckets-uBsHNsP_.js → buckets-BaIxp0Ei.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CgfTZXBl.js → bulk-category-panel-Dku6xKUm.js} +1 -1
- package/dist/client/assets/{calendar-i4xGe38i.js → calendar-CpBuBa24.js} +1 -1
- package/dist/client/assets/{capability-load-error-BLap3eYO.js → capability-load-error-CKORpXPj.js} +1 -1
- package/dist/client/assets/{card-Bi9zPbIV.js → card-COkVnQnP.js} +1 -1
- package/dist/client/assets/category-editor-CkzYWT7p.js +1 -0
- package/dist/client/assets/{chat-context-CkMKBD24.js → chat-context-DVVCYt3e.js} +1 -1
- package/dist/client/assets/{checkbox-BO2L3mp3.js → checkbox-BCHArcau.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DeE1Kk0f.js → cli-auth-success-CgPoi_vX.js} +1 -1
- package/dist/client/assets/collection-detail-DonuJ1ea.js +1 -0
- package/dist/client/assets/{collection-display-button-vE8XLrqL.js → collection-display-button-DX-E5s8i.js} +1 -1
- package/dist/client/assets/{collection-search-NkGhGdHi.js → collection-search-BwRybpDA.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BtGdI7Uq.js → collection-table-wrapper-Cm_vq1an.js} +1 -1
- package/dist/client/assets/{collection-tabs-BwuBKGur.js → collection-tabs-CGlZLNZG.js} +1 -1
- package/dist/client/assets/{command-CZFy5Z8z.js → command-DYuWdmIc.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CEGrHhUP.js → commerce-onboarding-oXX0RjMQ.js} +1 -1
- package/dist/client/assets/{companions-core-Ds_Fs5gE.js → companions-core-BN8wLX0q.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-BCaiIETn.js → connect-desktop-dialog-nlx1v20u.js} +1 -1
- package/dist/client/assets/{connection-card-D1p5KuRZ.js → connection-card-B2p6WHp7.js} +1 -1
- package/dist/client/assets/connection-detail-DNd225oV.js +1 -0
- package/dist/client/assets/{connection-form-helpers-D-SC2rCK.js → connection-form-helpers-CTe9zYBl.js} +1 -1
- package/dist/client/assets/{connections-DmQp28BG.js → connections-B2k7UMz9.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-Ch3YQMqQ.js → decopilot-sse-pool-yvpwgZWV.js} +1 -1
- package/dist/client/assets/{dialog-CuHfS0sp.js → dialog-CvMUMR16.js} +1 -1
- package/dist/client/assets/{domain-settings-BqNzYsxI.js → domain-settings-rz9NZ9fx.js} +1 -1
- package/dist/client/assets/{drawer-XTEWDOLT.js → drawer-CQuJuOwU.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Br5TT9qG.js → dropdown-menu-C_qDMDJc.js} +1 -1
- package/dist/client/assets/{empty-state-YbRoaSPS.js → empty-state-DFI2pRsv.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CJ9qZ9tu.js → extract-connection-data-BFt9JrM6.js} +1 -1
- package/dist/client/assets/file-explorer-CSMp40V7.js +2 -0
- package/dist/client/assets/{file-type-icon-CwUnpF6W.js → file-type-icon-DSufmAQ5.js} +1 -1
- package/dist/client/assets/{files-BKTS53qY.js → files-C_2xnvjf.js} +1 -1
- package/dist/client/assets/{form-DoFnwcqf.js → form-Bo-8Ln1U.js} +1 -1
- package/dist/client/assets/{general-Bmzbn_Ai.js → general-YPYBXJRf.js} +1 -1
- package/dist/client/assets/{github-repo-picker-DvJ8C_-g.js → github-repo-picker-DfirfuAT.js} +1 -1
- package/dist/client/assets/{hooks-Cs3wbrk0.js → hooks-DOkARyS2.js} +1 -1
- package/dist/client/assets/{index-CATpc9_Q.js → index-B5cMFR-y.js} +3 -3
- package/dist/client/assets/{index-qXXcgDB3.js → index-BALkJ2dx.js} +1 -1
- package/dist/client/assets/{index-Sns9ntjm.js → index-BBdtoWBk.js} +1 -1
- package/dist/client/assets/{index-ZYMQ4v5I.js → index-BPVYWTbD.js} +1 -1
- package/dist/client/assets/{index-ui47XAUN.js → index-C-wKLEZ2.js} +1 -1
- package/dist/client/assets/{index-DtyjY45a.js → index-CFF-0dHO.js} +1 -1
- package/dist/client/assets/{index-DwOhgdSM.js → index-CS4EwFaR.js} +1 -1
- package/dist/client/assets/{index-Ci_dhHUP.js → index-Ci3NpEBH.js} +2 -2
- package/dist/client/assets/{index-DacVqjl6.js → index-CpDqKOXJ.js} +1 -1
- package/dist/client/assets/{index-DbGg49Yd.js → index-CwVaTFWi.js} +1 -1
- package/dist/client/assets/{index-BMNH48Wq.js → index-DwqZiRTX.js} +11 -11
- package/dist/client/assets/{index-BO77c2t-.js → index-Oe3PDrxX.js} +1 -1
- package/dist/client/assets/{index-D3ZetWp6.js → index-YA1G0WAf.js} +1 -1
- package/dist/client/assets/{index-DA7PR0ZT.js → index-r5DmdNN7.js} +1 -1
- package/dist/client/assets/{index-redirect-C8DjXity.js → index-redirect-CIUk-Gax.js} +1 -1
- package/dist/client/assets/{input-BAWS9YOn.js → input-BsEx9qgh.js} +1 -1
- package/dist/client/assets/{integration-icon-BRTxQ4I-.js → integration-icon-BjKZxHyL.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DU_htK2h.js → invite-member-dialog-DfAJpHso.js} +1 -1
- package/dist/client/assets/{label-VUalQ4yB.js → label-itDnpE7k.js} +1 -1
- package/dist/client/assets/{layout-CUGpy6VF.js → layout-BeTn9gVm.js} +1 -1
- package/dist/client/assets/{login-DdaAR1Ab.js → login-BrNTuDDo.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D6TokJMF.js → mcp-oauth-DTAyDU2Q.js} +1 -1
- package/dist/client/assets/{members-BxhCDE5B.js → members-DyvIH1z_.js} +1 -1
- package/dist/client/assets/{monaco-editor-B8BOxibN.js → monaco-editor-D_6PkZ4D.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CqikJku1.js → monitoring-stats-row-qpSnjSHX.js} +1 -1
- package/dist/client/assets/{oauth-callback-BDC6FmJp.js → oauth-callback-Bx2hE0re.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DuKTbaPG.js → oauth-callback-ai-provider-CxI3pM83.js} +1 -1
- package/dist/client/assets/{onboarding-Dhcua64E.js → onboarding-BX2PevDl.js} +1 -1
- package/dist/client/assets/{org-install-BmpHOqc4.js → org-install-B8UtLZNk.js} +1 -1
- package/dist/client/assets/{org-layout-CaZvFGCr.js → org-layout-DLChqlHX.js} +1 -1
- package/dist/client/assets/organization-choice-BJmZA_ql.js +1 -0
- package/dist/client/assets/{orgs-Dh-57Rem.js → orgs-B_8qYm3m.js} +1 -1
- package/dist/client/assets/{page-seo-form-CLrMzLWz.js → page-seo-form-ZcfqdJ3r.js} +1 -1
- package/dist/client/assets/page-seo-sheet-DmyH2nwh.js +1 -0
- package/dist/client/assets/{popover-D2alhhTy.js → popover-DktOaoCj.js} +1 -1
- package/dist/client/assets/post-editor-Dy_-iCsZ.js +1 -0
- package/dist/client/assets/{primitives-EBvObhxE.js → primitives-B3tg18Ev.js} +1 -1
- package/dist/client/assets/{profile-kXlUByYC.js → profile-Cm9T7Soa.js} +1 -1
- package/dist/client/assets/project-app-view-DHGMtUxb.js +1 -0
- package/dist/client/assets/record-editor-225seTN8.js +1 -0
- package/dist/client/assets/redirect-editor-BWUzCv5f.js +1 -0
- package/dist/client/assets/registry-3lo6s_j5.js +2 -0
- package/dist/client/assets/{registry-layout-DWeasT9J.js → registry-layout-IoatJ7vG.js} +1 -1
- package/dist/client/assets/{reports-BdL97RRU.js → reports-_wvCcLC_.js} +1 -1
- package/dist/client/assets/{require-capability--O07fPTV.js → require-capability-DQnQYS51.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BubrwQcD.js → required-auth-layout-PXLv9yf-.js} +1 -1
- package/dist/client/assets/{reset-password-BZbZE0yO.js → reset-password-DalzN_iF.js} +1 -1
- package/dist/client/assets/{roles-D2gxcPNb.js → roles-D6U_2d-V.js} +1 -1
- package/dist/client/assets/{search-input-CvRN0hSz.js → search-input-DwylCsr-.js} +1 -1
- package/dist/client/assets/{secrets-BMaLzpfD.js → secrets-YNk1kWRi.js} +1 -1
- package/dist/client/assets/{sections-editor-BNncqnr-.js → sections-editor-DYDZI5jr.js} +2 -2
- package/dist/client/assets/{select-BNzv8bE0.js → select-CkNw5vmE.js} +1 -1
- package/dist/client/assets/{select-model-DVSYMGzL.js → select-model-DJy9oKx6.js} +1 -1
- package/dist/client/assets/{self-tool-result-DcIvml8S.js → self-tool-result-1X-Z7ZyX.js} +1 -1
- package/dist/client/assets/seo-editor-Cn3g21qw.js +1 -0
- package/dist/client/assets/{settings-layout-DPF3HDMr.js → settings-layout-B2pZI8PO.js} +1 -1
- package/dist/client/assets/{settings-section-CWE8axRi.js → settings-section-M1O3ge8Z.js} +1 -1
- package/dist/client/assets/{shell-controls-Bad0100x.js → shell-controls-CVfU7qci.js} +1 -1
- package/dist/client/assets/{shell-layout-BTgKP_tN.js → shell-layout-DoAVrerK.js} +1 -1
- package/dist/client/assets/{sidebar-8cYmIqg3.js → sidebar-BQFslZSt.js} +1 -1
- package/dist/client/assets/{skeleton-CYoyZmyw.js → skeleton-CKbIkp-i.js} +1 -1
- package/dist/client/assets/{sso-BshfQLMj.js → sso-Cw5YEeWo.js} +1 -1
- package/dist/client/assets/{store-DOaafk_B.js → store-BtFkKlkI.js} +1 -1
- package/dist/client/assets/store-registry-CRAi8gqB.js +2 -0
- package/dist/client/assets/{studio-tools-b3gOe5xj.js → studio-tools-C0FSNSO6.js} +1 -1
- package/dist/client/assets/{switch-BUEc-Zj-.js → switch-BOKpfG2a.js} +1 -1
- package/dist/client/assets/{table-D1nQ-wNh.js → table-B88p_wsC.js} +1 -1
- package/dist/client/assets/{tabs-BqvTvRv7.js → tabs-DDA7IPHD.js} +1 -1
- package/dist/client/assets/{textarea-PZIPdxV3.js → textarea-D9ia054b.js} +1 -1
- package/dist/client/assets/{toggle-group-DaqLlWvW.js → toggle-group-CisLBmfi.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CMK9jCFP.js → toolbar-icon-button-BdhEbL8g.js} +1 -1
- package/dist/client/assets/{toolbar-SkI9UHfs.js → toolbar-lHwKVbcz.js} +1 -1
- package/dist/client/assets/{tooltip-D3bYYanT.js → tooltip-Cm1Uo3tj.js} +1 -1
- package/dist/client/assets/{use-ai-providers-PAIwflDX.js → use-ai-providers-BSTSxr9f.js} +1 -1
- package/dist/client/assets/{use-automations-CNEZby3c.js → use-automations-z-3-_HVg.js} +1 -1
- package/dist/client/assets/{use-autosave-BvELNjO9.js → use-autosave-DOzBKdWx.js} +1 -1
- package/dist/client/assets/{use-capability-Cycc9ysK.js → use-capability-H0m9y9gf.js} +1 -1
- package/dist/client/assets/{use-clock-tick-Bh3IqoT0.js → use-clock-tick-DVjyQSN6.js} +1 -1
- package/dist/client/assets/{use-collections-BmbOO-kw.js → use-collections-IkbkyTPy.js} +1 -1
- package/dist/client/assets/{use-connection-BL5Htq-Q.js → use-connection-BjfpYHE7.js} +1 -1
- package/dist/client/assets/{use-copy-DqgQyLJe.js → use-copy-BhCEUwuV.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DiHcwodq.js → use-create-virtual-mcp-N2ZbWygG.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-9nyp1djE.js → use-debounced-autosave-DRL2Q2vw.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CgDMpgJ3.js → use-debounced-value-DYEvOfgl.js} +1 -1
- package/dist/client/assets/{use-deco-credits-Bg6aPI45.js → use-deco-credits-CAb1KNIs.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DOq7WDLE.js → use-decopilot-events-CssQ7XMz.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Cm0JPsuq.js → use-delete-connection-CJ6X4D3N.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-C4pfm58i.js → use-deployment-admin-DxlBCcMw.js} +1 -1
- package/dist/client/assets/{use-file-configs-Cu57xyoQ.js → use-file-configs-DniTn_7W.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-B-pqmsuO.js → use-infinite-scroll-BzjM30U0.js} +1 -1
- package/dist/client/assets/{use-join-requests-Bjm87DiE.js → use-join-requests-DH0ZVoBc.js} +1 -1
- package/dist/client/assets/use-mcp-auth-status-B-vnUxNV.js +1 -0
- package/dist/client/assets/{use-mcp-client-BxFsDRf1.js → use-mcp-client-lixd0gAV.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-11QvC1x0.js → use-mcp-tools-Cv_rmBI5.js} +1 -1
- package/dist/client/assets/{use-members-DhXdX-_i.js → use-members-XsfnxDj6.js} +1 -1
- package/dist/client/assets/{use-mobile-J9H9Qt6I.js → use-mobile-BYgIZfXj.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Bx9iFVCX.js → use-navigate-to-agent-BAQepcY9.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BNQda2IH.js → use-org-auth-client-DNG8tLX7.js} +1 -1
- package/dist/client/assets/{use-org-sso-BSgN5318.js → use-org-sso-CymoIsv4.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BR6HxqpU.js → use-organization-roles-pkqdjnMJ.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Cy2mrzMh.js → use-organization-settings-DxC5BT5e.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CuVe3lZK.js → use-registry-connections-DzCHf8MS.js} +1 -1
- package/dist/client/assets/{use-secrets-B1NLB7qI.js → use-secrets-j9NqCesQ.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DpCxUSxZ.js → use-status-sounds-C-YKbG5N.js} +1 -1
- package/dist/client/assets/{use-view-mode-OMqGMEK9.js → use-view-mode-C6YHDmgm.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-D49c-xG2.js → use-virtual-mcp-DUjw2r9s.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Bx9w5_18.js +1 -0
- package/dist/client/assets/{useRouterState-CaK_0Zm-.js → useRouterState-Cqq6ONsl.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DDY3jNH9.js +1 -0
- package/dist/client/assets/{users-CuRMnn9P.js → users-BlkgmN4u.js} +1 -1
- package/dist/client/assets/{variant-calendar-DVnA47I-.js → variant-calendar-DQDzXWUH.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-9Fm4_Atq.js → view-mode-toggle-CKsyyD3I.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agents-list-BQae6bDg.js +0 -1
- package/dist/client/assets/app-editor-DJk7uNJD.js +0 -1
- package/dist/client/assets/automations-C4FUmiva.js +0 -1
- package/dist/client/assets/category-editor-3YQESETB.js +0 -1
- package/dist/client/assets/collection-detail-8PtdNUuo.js +0 -1
- package/dist/client/assets/connection-detail-D_EAPqEt.js +0 -1
- package/dist/client/assets/file-explorer-4uKMz4q_.js +0 -2
- package/dist/client/assets/organization-choice-DfI6mPI8.js +0 -1
- package/dist/client/assets/page-seo-sheet-DwoOskYd.js +0 -1
- package/dist/client/assets/post-editor-DSoW0KmS.js +0 -1
- package/dist/client/assets/project-app-view-CbHRo0j5.js +0 -1
- package/dist/client/assets/record-editor-BduZQfMg.js +0 -1
- package/dist/client/assets/redirect-editor-C1Qi_mTL.js +0 -1
- package/dist/client/assets/registry-D3C87_LL.js +0 -2
- package/dist/client/assets/seo-editor-DH4XYlF4.js +0 -1
- package/dist/client/assets/store-registry-DTYAtKRx.js +0 -2
- package/dist/client/assets/tools-list-CAMhopuE.js +0 -1
- package/dist/client/assets/useInfiniteQuery-EUhFQPYl.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BkDxPy4m.js +0 -1
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as ne,j as s,B as Q,C as de,n as fe,a as he,r as q,m as ge,K as te,d as xe,p as $,t as se,l as je}from"./index-CATpc9_Q.js";import{d as W,c as me,a as oe,D as ie}from"./dropdown-menu-Br5TT9qG.js";import{a as be}from"./Users03-DF3f2ZwS.js";import{a as ue,b as Ce,G as ye}from"./github-repo-picker-DvJ8C_-g.js";import{u as we,b as _e,c as Ne}from"./use-virtual-mcp-D49c-xG2.js";import{P as Z}from"./index-qXXcgDB3.js";import{i as Se}from"./DotsVertical-BKwCKB4H.js";import{a as ve,b as Ie}from"./Settings02-kiZvy_fn.js";import{s as De}from"./Trash01-C7SUcgzf.js";import{A as Ee,ax as Ae}from"./agent-icon-Mpp91bfB.js";import{c as pe}from"./use-navigate-to-agent-Bx9iFVCX.js";import{C as Te}from"./card-Bi9zPbIV.js";import{f as re}from"./formatDistanceToNow-Cb2QZZJn.js";import{u as ke}from"./use-capability-Cycc9ysK.js";import{E as Le}from"./empty-state-YbRoaSPS.js";import{u as Ge}from"./use-create-virtual-mcp-DiHcwodq.js";import{u as Oe}from"./use-connection-BL5Htq-Q.js";import{u as le}from"./use-mcp-client-BxFsDRf1.js";import{S as Pe}from"./constants-D_FQAPnt.js";import{g as ze,f as Me,a as $e,p as He}from"./provision-repo-scoped-github-connection-CB4ICKHq.js";import{e as Re,d as Fe,D as Ue,a as Be,c as Ve}from"./dialog-CuHfS0sp.js";import{C as Ke}from"./collection-search-NkGhGdHi.js";import{c as qe,b as Qe,d as Je,A as We,e as Ye,g as Xe,a as Ze,f as et}from"./alert-dialog-CL004fe5.js";import{S as tt}from"./search-input-CvRN0hSz.js";import{s as ae}from"./Plus-CT6paZ6Y.js";import"./Check-evpt16EA.js";import"./ChevronRight-D_lkQ96x.js";import"./Circle-BCcBwY3X.js";import"./use-debounced-value-CgDMpgJ3.js";import"./authenticate-and-persist-oauth-CTnNYy7E.js";import"./mcp-oauth-D6TokJMF.js";import"./auth-CeuFwPxM.js";import"./use-mcp-tools-11QvC1x0.js";import"./extract-connection-data-CJ9qZ9tu.js";import"./use-collections-BmbOO-kw.js";import"./sidebar-8cYmIqg3.js";import"./LayoutLeft-DsDSp7CT.js";import"./use-mobile-J9H9Qt6I.js";import"./X-VIJVSyzC.js";import"./tooltip-D3bYYanT.js";import"./AlertCircle-CYnFm87k.js";import"./UserPlus01-yjW9fL-G.js";import"./Tool01-CcKyBYSb.js";import"./ArrowUp-Ce-_ZrGn.js";import"./Tool02-BTUXK138.js";import"./XCircle-BfHMsLh5.js";import"./ArrowUpRight-DYOvLwi-.js";import"./TrendUp01-vYlS04gI.js";import"./ZapSquare-BPLamaJH.js";import"./CheckCircle-Cw29V8Yd.js";import"./ChevronDown-Dg5I-IyP.js";import"./ChevronUp-XSOoP_Nn.js";import"./Stars02-Du4pvaB9.js";import"./Copy01-ukzF2g5D.js";import"./ZoomOut-DyGQpwZF.js";import"./Globe01-B-9XjG_y.js";import"./Eye-Rw2Lcj0d.js";import"./FilterLines-Bk3fgVzt.js";import"./Flag01-C_wN137m.js";import"./Star01-B3Xobx84.js";import"./Globe04-DNSs6EXk.js";import"./SwitchHorizontal01-Be6iAHDL.js";import"./HardDrive-CljS-OyE.js";import"./Key01-CaIwkkK6.js";import"./LinkExternal01-C7SNA6xk.js";import"./List-B0zktlno.js";import"./Monitor01-kUiMqEFF.js";import"./Sun-Cq8zftWr.js";import"./Package-RGVJ3BIv.js";import"./Palette-D51YSINn.js";import"./Play-gkeg9Jqk.js";import"./SearchLg-Ci14_nqQ.js";import"./SearchMd-DDsmGmx-.js";import"./Shield01-mMv7jSi2.js";import"./Stars01-D-xbM28c.js";import"./Upload01-CFKVhcA1.js";import"./User01-C9pHWMIN.js";import"./Users01-4r88txyu.js";import"./XClose-DZbEhf0R.js";import"./Zap-DEx1nSIp.js";import"./hooks-Cs3wbrk0.js";import"./decopilot-sse-pool-Ch3YQMqQ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./differenceInSeconds-NQ4PDo0z.js";function ce(t){const e=ne.c(19),{onCreateFromScratch:i,onImportGitHub:n,onImportDeco:c,isCreating:C,align:y,side:d,showBetaBadge:g}=t,w=y===void 0?"end":y;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(be,{size:14}),e[0]=x):x=e[0];let m;e[1]!==C||e[2]!==i?(m=s.jsxs(W,{disabled:C,onClick:i,children:[x,"Create from scratch"]}),e[1]=C,e[2]=i,e[3]=m):m=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ue,{className:"size-3.5"}),e[4]=p):p=e[4];let l;e[5]!==g?(l=g&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"}),e[5]=g,e[6]=l):l=e[6];let f;e[7]!==n||e[8]!==l?(f=s.jsxs(W,{onClick:n,children:[p,"Import from GitHub",l]}),e[7]=n,e[8]=l,e[9]=f):f=e[9];let a;e[10]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),e[10]=a):a=e[10];let r;e[11]!==c?(r=s.jsxs(W,{onClick:c,children:[a,"Import from deco.cx"]}),e[11]=c,e[12]=r):r=e[12];let u;return e[13]!==w||e[14]!==d||e[15]!==m||e[16]!==f||e[17]!==r?(u=s.jsxs(me,{side:d,align:w,className:"w-48",children:[m,f,r]}),e[13]=w,e[14]=d,e[15]=m,e[16]=f,e[17]=r,e[18]=u):u=e[18],u}function st(t){const e=ne.c(45),{project:i,lastUsedAt:n,onDeleteClick:c}=t,C=pe();let y;e[0]!==C||e[1]!==i.id?(y=()=>C(i.id),e[0]=C,e[1]=i.id,e[2]=y):y=e[2];let d;e[3]!==i.title||e[4]!==y?(d=s.jsx("button",{type:"button",onClick:y,className:"absolute inset-0 z-0","aria-label":i.title}),e[3]=i.title,e[4]=y,e[5]=d):d=e[5];let g;e[6]!==i.icon||e[7]!==i.title?(g=s.jsx(Ee,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),e[6]=i.icon,e[7]=i.title,e[8]=g):g=e[8];let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(oe,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx(Se,{size:20})})}),e[9]=w):w=e[9];let x;e[10]!==C||e[11]!==i.id?(x=()=>C(i.id,{search:{main:"settings"}}),e[10]=C,e[11]=i.id,e[12]=x):x=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ve,{size:16}),e[13]=m):m=e[13];let p;e[14]!==x?(p=s.jsxs(W,{onClick:x,children:[m,"Settings"]}),e[14]=x,e[15]=p):p=e[15];let l;e[16]!==c?(l=c&&s.jsxs(W,{variant:"destructive",onClick:G=>{G.stopPropagation(),c(G)},children:[s.jsx(De,{size:16}),"Delete"]}),e[16]=c,e[17]=l):l=e[17];let f;e[18]!==p||e[19]!==l?(f=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(ie,{children:[w,s.jsxs(me,{align:"end",children:[p,l]})]})}),e[18]=p,e[19]=l,e[20]=f):f=e[20];let a;e[21]!==g||e[22]!==f?(a=s.jsxs("div",{className:"flex items-start justify-between",children:[g,f]}),e[21]=g,e[22]=f,e[23]=a):a=e[23];let r;e[24]!==i.title?(r=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[24]=i.title,e[25]=r):r=e[25];const u=i.description||"No description";let I;e[26]!==u?(I=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:u}),e[26]=u,e[27]=I):I=e[27];let D;e[28]!==r||e[29]!==I?(D=s.jsxs("div",{className:"flex flex-col gap-1",children:[r,I]}),e[28]=r,e[29]=I,e[30]=D):D=e[30];let _;e[31]!==a||e[32]!==D?(_=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[a,D]}),e[31]=a,e[32]=D,e[33]=_):_=e[33];let T;e[34]!==n||e[35]!==i.updated_at?(T=n?`Last used ${re(new Date(n),{addSuffix:!0})}`:`Updated ${re(new Date(i.updated_at),{addSuffix:!0})}`,e[34]=n,e[35]=i.updated_at,e[36]=T):T=e[36];let N;e[37]!==T?(N=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:T})})}),e[37]=T,e[38]=N):N=e[38];let k;e[39]!==_||e[40]!==N?(k=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[_,N]}),e[39]=_,e[40]=N,e[41]=k):k=e[41];let S;return e[42]!==k||e[43]!==d?(S=s.jsxs(Te,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[d,k]}),e[42]=k,e[43]=d,e[44]=S):S=e[44],S}const ot="deco-sites";function it(t){if(!t||typeof t!="object")return null;const e=t.github;if(!e||typeof e!="object")return null;const i=e.owner,n=e.repo;return typeof i!="string"||typeof n!="string"||i.length===0||n.length===0?null:{owner:i,repo:n}}function nt(t,e){const i=e?it(e):null,n=i?.owner??ot,c=i?.repo??t;return{owner:n,name:c,url:`https://github.com/${n}/${c}`}}function rt(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function lt(t){const e=await fetch(`/api/${t}/deco-sites`);if(!e.ok){const i=await e.json().catch(()=>({}));throw new Error(i.error??`Failed to load sites (${e.status})`)}return e.json()}function at({open:t,onOpenChange:e,onBack:i}){const{org:n}=de(),c=pe(),C=fe(),{data:y}=he.useSession(),[d,g]=q.useState(null),[w,x]=q.useState(null),[m,p]=q.useState(""),l=le({connectionId:Pe,orgId:n.id,orgSlug:n.slug}),f=Oe({slug:"mcp-github"}),a=ze(f),r=Ce({enabled:t&&a.length===0}),u=a.length===1?a[0]??null:w,I=a.length>1&&!u,D=le({connectionId:u?.id??"",orgId:n.id,orgSlug:n.slug}),_=t&&a.length===0&&(r.status==="installing"||r.status==="authenticating"||r.status==="idle"),{data:T,isLoading:N,error:k}=ge({queryKey:te.decoSites(y?.user?.email),queryFn:()=>lt(n.slug),enabled:t&&!!y?.user?.email,staleTime:6e4,retry:!1}),S=T?.sites??[],G=o=>{o||(g(null),x(null),p("")),e(o)},P=S.filter(o=>o.name.toLowerCase().includes(m.toLowerCase())||(o.domains?.[0]?.domain?.toLowerCase().includes(m.toLowerCase())??!1)),R=!d||P.some(o=>o.name===d),O=xe({mutationFn:async o=>{if(!u)throw new Error("GitHub is not connected. Complete GitHub setup and try again.");$("deco_site_import_started",{site_name:o});const{installations:L,appSlug:v}=await Me(b=>l.callTool(b),u.id),E=S.find(b=>b.name===o);if(!E)throw new Error("Selected site is no longer available");const j=nt(o,E.metadata),z=$e(L,j.owner);if(!z){const b=v?`https://github.com/apps/${v}/installations/new`:"https://github.com/settings/installations";throw new Error(`Install the GitHub App on the "${j.owner}" organization to import this site. ${b}`)}let V=null,F=null,U=null;const J=async()=>{U&&await l.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:U}}).catch(()=>{}),F&&await l.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:F,force:!0}}).catch(()=>{}),V&&await l.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:V,force:!0}}).catch(()=>{})};try{const b=await fetch(`/api/${n.slug}/deco-sites/connection`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:o})}),B=await b.json().catch(()=>({}));if(!b.ok)throw new Error(B.error??`Failed to create connection (${b.status})`);const A=B.connId;if(!A)throw new Error("Server did not return a connection ID");V=A;const{childConnectionId:M}=await He({orgSlug:n.slug,sourceConnection:u,installationId:z.installationId,owner:j.owner,repo:j.name,githubCallTool:ee=>D.callTool(ee),selfCallTool:ee=>l.callTool(ee)});F=M;const H=B.icon??null,K=rt(o),h=o.toLowerCase(),Y=await l.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:o,description:"Imported from deco.cx",pinned:!1,icon:H??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],siteSlug:h,githubRepo:{owner:j.owner,name:j.name,url:j.url,installationId:z.installationId,connectionId:M},ui:{banner:null,bannerColor:"#22C55E",icon:H,themeColor:"#22C55E",slug:K,pinnedViews:[{connectionId:A,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:A,toolName:"get_monitor_data",label:"Monitor",icon:null}],layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:A},{connection_id:M}]}}}),X=Y.structuredContent??Y;if(!X.item?.id)throw new Error("Failed to create the imported agent");return U=X.item.id,{slug:K,virtualMcpId:X.item.id,connId:A,item:X.item}}catch(b){throw await J(),b}},onSuccess:({slug:o,virtualMcpId:L,item:v})=>{$("deco_site_import_succeeded",{site_name:v.title,virtual_mcp_id:L,slug:o}),C.setQueryData(te.collectionItem(l,n.id,"","VIRTUAL_MCP",L),{item:v}),C.invalidateQueries({predicate:E=>{const j=E.queryKey;return j[1]===n.id&&j[3]==="collection"&&j[4]==="VIRTUAL_MCP"}}),C.invalidateQueries({queryKey:te.projects(n.id)}),se.success(`Imported ${o} from deco.cx`),G(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),c(L)},onError:o=>{$("deco_site_import_failed",{error:o instanceof Error?o.message:"Unknown error"}),se.error("Import failed: "+(o instanceof Error?o.message:"Unknown error"))}});return s.jsx(Re,{open:t,onOpenChange:G,children:s.jsxs(Fe,{className:"sm:max-w-[900px] p-0 gap-0 overflow-hidden",children:[s.jsx(Ue,{className:"sr-only",children:s.jsx(Be,{children:"Import from deco.cx"})}),s.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[i&&s.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":"Go back",children:s.jsx(Ie,{size:18})}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"})]}),s.jsx("div",{children:s.jsx(Ke,{value:m,onChange:p,placeholder:"Search sites...",onKeyDown:o=>{o.key==="Escape"&&p("")}})}),s.jsxs("div",{className:"pb-0 min-h-[300px]",children:[r.status==="error"&&s.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 h-48 px-8 text-center",children:[s.jsx("p",{className:"text-sm text-destructive",children:r.error??"Failed to connect GitHub"}),s.jsx(Q,{variant:"outline",size:"sm",onClick:r.retry,children:"Retry GitHub setup"})]}),_&&r.status!=="error"&&s.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Setting up GitHub connection..."}),I&&!_&&r.status!=="error"&&s.jsxs("div",{className:"flex flex-col py-2",children:[s.jsx("div",{className:"px-8 py-2",children:s.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a GitHub connection"})}),a.map(o=>s.jsxs("button",{type:"button",onClick:()=>x(o),className:"flex items-center gap-3 px-8 py-3 hover:bg-accent transition-colors text-left",children:[o.icon?s.jsx("img",{src:o.icon,alt:o.title,className:"size-7 rounded-full shrink-0"}):s.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:s.jsx(ue,{className:"size-3.5 text-muted-foreground"})}),s.jsx("span",{className:"text-sm font-medium",children:o.title})]},o.id))]}),N&&!_&&r.status!=="error"&&s.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),!N&&!_&&!I&&r.status!=="error"&&!k&&S.length===0&&s.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),!N&&!_&&!I&&r.status!=="error"&&S.length>0&&s.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:[P.length===0&&s.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",m,"”"]}),P.map(o=>{const L=o.domains?.find(E=>E.production)?.domain??o.domains?.[0]?.domain,v=d===o.name;return s.jsxs("button",{type:"button",onClick:()=>g(o.name),className:je("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",v?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[s.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:o.thumb_url?s.jsx("img",{src:o.thumb_url,alt:o.name,className:"w-full h-full object-cover",loading:"lazy"}):s.jsx("div",{className:"w-full h-full bg-muted"})}),s.jsxs("div",{className:"px-4 py-3",children:[s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:o.name}),L&&s.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:L})]})]},o.name)})]})]}),s.jsxs(Ve,{className:"px-8 py-5 border-t border-border",children:[s.jsx(Q,{variant:"outline",onClick:()=>G(!1),disabled:O.isPending,children:"Cancel"}),s.jsx(Q,{disabled:!d||!R||O.isPending||N||_||I||!u||r.status==="error",onClick:()=>d&&O.mutate(d),children:O.isPending?"Importing...":"Import"})]})]})})}function Fs(){const t=ne.c(46),{org:e}=de(),i=we(),n=_e(),[c,C]=q.useState("");let y;t[0]===Symbol.for("react.memo_cache_sentinel")?(y={navigateOnCreate:!0},t[0]=y):y=t[0];const{createVirtualMCP:d,isCreating:g}=Ge(y),[w,x]=q.useState(null),[m,p]=q.useState(!1),[l,f]=q.useState(!1),{granted:a}=ke("agents:manage"),r=c.toLowerCase(),u=i.filter(h=>h.id!==e.id&&(h.title.toLowerCase().includes(r)||h.description?.toLowerCase().includes(r))),{data:I}=Ne(u.map(ct));let D;t[1]!==n||t[2]!==w?(D=async()=>{if(!w)return;const{id:h,title:Y}=w;x(null);try{await n.delete.mutateAsync(h),$("agent_deleted",{agent_id:h,source:"agents_list"}),se.success(`Deleted "${Y}"`)}catch{}},t[1]=n,t[2]=w,t[3]=D):D=t[3];const _=D,T=Z,N=Z,k=Z;let S;t[4]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Z.Title,{children:"Agents"}),t[4]=S):S=t[4];let G;t[5]===Symbol.for("react.memo_cache_sentinel")?(G=h=>{h.key==="Escape"&&(C(""),h.target.blur())},t[5]=G):G=t[5];let P;t[6]!==c?(P=s.jsx(tt,{value:c,onChange:C,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:G}),t[6]=c,t[7]=P):P=t[7];let R;t[8]!==a||t[9]!==d||t[10]!==g?(R=a&&s.jsxs(ie,{children:[s.jsx(oe,{asChild:!0,children:s.jsxs(Q,{size:"sm",children:[s.jsx(ae,{size:14}),"Create Agent"]})}),s.jsx(ce,{onCreateFromScratch:()=>{$("agent_create_clicked",{source:"agents_list",method:"scratch"}),d()},onImportGitHub:()=>{$("agent_create_clicked",{source:"agents_list",method:"github"}),f(!0)},onImportDeco:()=>{$("agent_create_clicked",{source:"agents_list",method:"deco"}),p(!0)},isCreating:g,align:"end"})]}),t[8]=a,t[9]=d,t[10]=g,t[11]=R):R=t[11];let O;t[12]!==P||t[13]!==R?(O=s.jsxs("div",{className:"flex flex-col gap-6",children:[S,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[P,R]})]}),t[12]=P,t[13]=R,t[14]=O):O=t[14];const o=u.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Le,{image:s.jsx(Ae,{size:48,className:"text-muted-foreground"}),title:c?"No agents found":"No agents yet",description:c?`No agents match "${c}"`:a?"Create an agent to get started.":"Ask an organization admin to create one.",actions:!c&&a&&s.jsxs(ie,{children:[s.jsx(oe,{asChild:!0,children:s.jsxs(Q,{size:"sm",children:[s.jsx(ae,{size:14}),"Create Agent"]})}),s.jsx(ce,{onCreateFromScratch:()=>{$("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),d()},onImportGitHub:()=>{$("agent_create_clicked",{source:"agents_list_empty",method:"github"}),f(!0)},onImportDeco:()=>{$("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),p(!0)},isCreating:g,align:"center",showBetaBadge:!0})]})})}),L=u.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:u.map(h=>s.jsx(st,{project:h,lastUsedAt:I?.get(h.id)?.last_used_at,onDeleteClick:a?()=>x({id:h.id,title:h.title}):void 0},h.id))})]});let v;t[15]!==L||t[16]!==k.Body||t[17]!==O||t[18]!==o?(v=s.jsxs(k.Body,{children:[O,o,L]}),t[15]=L,t[16]=k.Body,t[17]=O,t[18]=o,t[19]=v):v=t[19];let E;t[20]!==v||t[21]!==N.Content?(E=s.jsx(N.Content,{children:v}),t[20]=v,t[21]=N.Content,t[22]=E):E=t[22];let j;t[23]!==l?(j=s.jsx(ye,{open:l,onOpenChange:f}),t[23]=l,t[24]=j):j=t[24];let z;t[25]!==m?(z=s.jsx(at,{open:m,onOpenChange:p}),t[25]=m,t[26]=z):z=t[26];const V=!!w;let F;t[27]===Symbol.for("react.memo_cache_sentinel")?(F=h=>!h&&x(null),t[27]=F):F=t[27];let U;t[28]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(qe,{children:"Delete Agent?"}),t[28]=U):U=t[28];const J=w?.title;let b;t[29]!==J?(b=s.jsxs(Qe,{children:[U,s.jsxs(Je,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:J}),"."]})]}),t[29]=J,t[30]=b):b=t[30];let B;t[31]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(We,{children:"Cancel"}),t[31]=B):B=t[31];let A;t[32]!==_?(A=s.jsxs(Ye,{children:[B,s.jsx(Xe,{onClick:_,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[32]=_,t[33]=A):A=t[33];let M;t[34]!==b||t[35]!==A?(M=s.jsxs(Ze,{children:[b,A]}),t[34]=b,t[35]=A,t[36]=M):M=t[36];let H;t[37]!==V||t[38]!==M?(H=s.jsx(et,{open:V,onOpenChange:F,children:M}),t[37]=V,t[38]=M,t[39]=H):H=t[39];let K;return t[40]!==T||t[41]!==E||t[42]!==j||t[43]!==z||t[44]!==H?(K=s.jsxs(T,{children:[E,j,z,H]}),t[40]=T,t[41]=E,t[42]=j,t[43]=z,t[44]=H,t[45]=K):K=t[45],K}function ct(t){return t.id}export{Fs as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as gt,r as w,j as o,l as yt,t as ut,i as St}from"./index-CATpc9_Q.js";import{i as jt}from"./ChevronRight-D_lkQ96x.js";import{A as kt}from"./automation-runs-buslfflw.js";import{A as _t}from"./add-section-modal-D1tPhZ3a.js";import{n as Bt,h as wt,j as At,e as Nt,k as Rt,l as Ct,m as Et,o as Kt,S as Tt}from"./index-BMNH48Wq.js";import"./select-BNzv8bE0.js";import"./tooltip-D3bYYanT.js";import"./Check-evpt16EA.js";import"./ChevronDown-Dg5I-IyP.js";import"./ChevronUp-XSOoP_Nn.js";import"./useInfiniteQuery-EUhFQPYl.js";import"./use-infinite-scroll-B-pqmsuO.js";import"./use-connection-BL5Htq-Q.js";import"./use-collections-BmbOO-kw.js";import"./use-mcp-client-BxFsDRf1.js";import"./constants-D_FQAPnt.js";import"./auth-CeuFwPxM.js";import"./use-virtual-mcp-D49c-xG2.js";import"./card-Bi9zPbIV.js";import"./sidebar-8cYmIqg3.js";import"./LayoutLeft-DsDSp7CT.js";import"./use-mobile-J9H9Qt6I.js";import"./X-VIJVSyzC.js";import"./table-D1nQ-wNh.js";import"./empty-state-YbRoaSPS.js";import"./use-members-DhXdX-_i.js";import"./use-org-auth-client-BNQda2IH.js";import"./use-clock-tick-Bh3IqoT0.js";import"./AlertCircle-CYnFm87k.js";import"./CheckCircle-Cw29V8Yd.js";import"./Circle-BCcBwY3X.js";import"./agent-icon-Mpp91bfB.js";import"./UserPlus01-yjW9fL-G.js";import"./Tool01-CcKyBYSb.js";import"./ArrowUp-Ce-_ZrGn.js";import"./Settings02-kiZvy_fn.js";import"./Tool02-BTUXK138.js";import"./XCircle-BfHMsLh5.js";import"./ArrowUpRight-DYOvLwi-.js";import"./TrendUp01-vYlS04gI.js";import"./ZapSquare-BPLamaJH.js";import"./Users03-DF3f2ZwS.js";import"./Stars02-Du4pvaB9.js";import"./Copy01-ukzF2g5D.js";import"./ZoomOut-DyGQpwZF.js";import"./DotsVertical-BKwCKB4H.js";import"./Globe01-B-9XjG_y.js";import"./Eye-Rw2Lcj0d.js";import"./FilterLines-Bk3fgVzt.js";import"./Flag01-C_wN137m.js";import"./Star01-B3Xobx84.js";import"./Globe04-DNSs6EXk.js";import"./SwitchHorizontal01-Be6iAHDL.js";import"./HardDrive-CljS-OyE.js";import"./Key01-CaIwkkK6.js";import"./LinkExternal01-C7SNA6xk.js";import"./List-B0zktlno.js";import"./Monitor01-kUiMqEFF.js";import"./Sun-Cq8zftWr.js";import"./Package-RGVJ3BIv.js";import"./Palette-D51YSINn.js";import"./Play-gkeg9Jqk.js";import"./Plus-CT6paZ6Y.js";import"./SearchLg-Ci14_nqQ.js";import"./SearchMd-DDsmGmx-.js";import"./Shield01-mMv7jSi2.js";import"./Stars01-D-xbM28c.js";import"./Trash01-C7SUcgzf.js";import"./Upload01-CFKVhcA1.js";import"./User01-C9pHWMIN.js";import"./Users01-4r88txyu.js";import"./XClose-DZbEhf0R.js";import"./Zap-DEx1nSIp.js";import"./use-automations-CNEZby3c.js";import"./studio-tools-b3gOe5xj.js";import"./useSuspenseInfiniteQuery-BkDxPy4m.js";import"./badge-Ds5R9rAV.js";import"./checkbox-BO2L3mp3.js";import"./command-CZFy5Z8z.js";import"./index-DtyjY45a.js";import"./dialog-CuHfS0sp.js";import"./popover-D2alhhTy.js";import"./avatar-DudI_cM5.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DqgQyLJe.js";import"./file-type-icon-CwUnpF6W.js";import"./tab-id-BijBBRwE.js";import"./monaco-editor-B8BOxibN.js";import"./index-BO77c2t-.js";import"./chat-context-CkMKBD24.js";import"./autosend-DoEB2J9-.js";import"./hooks-Cs3wbrk0.js";import"./decopilot-sse-pool-Ch3YQMqQ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-PAIwflDX.js";import"./use-decopilot-events-DOq7WDLE.js";import"./use-organization-settings-Cy2mrzMh.js";import"./index-DwOhgdSM.js";import"./shell-layout-BTgKP_tN.js";import"./alert-dialog-CL004fe5.js";import"./required-auth-layout-BubrwQcD.js";import"./use-org-sso-BSgN5318.js";import"./integration-icon-BRTxQ4I-.js";import"./use-navigate-to-agent-Bx9iFVCX.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BhV9uTIC.js";import"./form-DoFnwcqf.js";import"./label-VUalQ4yB.js";import"./input-BAWS9YOn.js";import"./drawer-XTEWDOLT.js";import"./collection-search-NkGhGdHi.js";import"./tabs-BqvTvRv7.js";import"./toggle-group-DaqLlWvW.js";import"./use-deco-credits-Bg6aPI45.js";import"./extract-connection-data-CJ9qZ9tu.js";import"./connection-card-D1p5KuRZ.js";import"./use-registry-connections-CuVe3lZK.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-PZIPdxV3.js";import"./connection-form-helpers-D-SC2rCK.js";import"./authenticate-and-persist-oauth-CTnNYy7E.js";import"./mcp-oauth-D6TokJMF.js";import"./collection-tabs-BwuBKGur.js";import"./connect-desktop-dialog-BCaiIETn.js";import"./select-model-DVSYMGzL.js";import"./skeleton-CYoyZmyw.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CWE8axRi.js";import"./dropdown-menu-Br5TT9qG.js";import"./index-Sns9ntjm.js";import"./toolbar-SkI9UHfs.js";import"./use-debounced-value-CgDMpgJ3.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DpCxUSxZ.js";import"./use-mcp-tools-11QvC1x0.js";import"./use-capability-Cycc9ysK.js";import"./tools-list-CAMhopuE.js";import"./switch-BUEc-Zj-.js";import"./use-debounced-autosave-9nyp1djE.js";import"./index-qXXcgDB3.js";import"./search-input-CvRN0hSz.js";import"./github-repo-picker-DvJ8C_-g.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-B1NLB7qI.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-Ds_Fs5gE.js";import"./index-Ci_dhHUP.js";import"./get-initials-D-f_fDFw.js";import"./calendar-i4xGe38i.js";import"./toolbar-icon-button-CMK9jCFP.js";import"./use-file-configs-Cu57xyoQ.js";import"./automation-list-row-DPU1cfeC.js";function $t(l,t){const s=(l.title||l.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),f=/^[A-Za-z]/.test(s)&&s.length>0?s:"Section",n=Bt(t,f);return{blockKey:n,data:{__resolveType:l.resolveType,name:n}}}function Er(l){const t=gt.c(77),{orgSlug:s,virtualMcpId:f,branch:n,blockKey:i,block:a,meta:m,decofile:c,title:D,excludeFields:H,schemaPending:nt,previewBaseUrl:at}=l,G=nt===void 0?!1:nt,u=at===void 0?null:at,x=typeof a?.__resolveType=="string"?a.__resolveType:"";let R;t[0]!==H||t[1]!==m||t[2]!==x?(R=wt(x,m,H),t[0]=H,t[1]=m,t[2]=x,t[3]=R):R=t[3];const h=R;let C;t[4]!==h?(C=!!h&&Object.keys(h.properties??{}).length>0,t[4]=h,t[5]=C):C=t[5];const J=C;let E;t[6]!==a||t[7]!==i||t[8]!==m||t[9]!==D?(E=D??(a?At(i,a,m):i),t[6]=a,t[7]=i,t[8]=m,t[9]=D,t[10]=E):E=t[10];const v=E;let K;t[11]!==n||t[12]!==s||t[13]!==f?(K={orgSlug:s,virtualMcpId:f,branch:n},t[11]=n,t[12]=s,t[13]=f,t[14]=K):K=t[14];const{save:b,flush:Q,isPending:W}=Nt(K);let T;t[15]!==n||t[16]!==s||t[17]!==f?(T={orgSlug:s,virtualMcpId:f,branch:n},t[15]=n,t[16]=s,t[17]=f,t[18]=T):T=t[18];const X=Rt(T);let $;t[19]!==b?($=Et((e,r)=>b(e,r)),t[19]=b,t[20]=$):$=t[20];const Y=$,[ht,xt]=w.useState(i),[tt,ct]=w.useState(null),[et,dt]=w.useState(0);let F;t[21]===Symbol.for("react.memo_cache_sentinel")?(F=[],t[21]=F):F=t[21];const[p,ft]=w.useState(F),[ot,rt]=w.useState(!1),P=w.useRef(null);ht!==i&&(xt(i),ct(null),dt(Pt),ft([]));let O;t[22]!==a?(O=a??{},t[22]=a,t[23]=O):O=t[23];const it=O;let g;t[24]!==tt?(g=tt??{},t[24]=tt,t[25]=g):g=t[25];let z;t[26]!==it||t[27]!==g?(z={...it,...g},t[26]=it,t[27]=g,t[28]=z):z=t[28];const mt=z;let L;t[29]!==i||t[30]!==x||t[31]!==b?(L=e=>{const r=e;ct(r),b(i,{...r,__resolveType:x})},t[29]=i,t[30]=x,t[31]=b,t[32]=L):L=t[32];const st=L;let V;t[33]===Symbol.for("react.memo_cache_sentinel")?(V=e=>{ft(e)},t[33]=V):V=t[33];const pt=V;let q;t[34]!==c||t[35]!==Q||t[36]!==X?(q=async(e,r)=>{try{const{blockKey:d,data:N}=$t(e,c);await X.mutateAsync({blockKey:d,data:N}),ut.success(`Created section "${d}"`),r({__resolveType:d}),Q()}catch(d){const N=d,bt=N instanceof Error?N.message:"Could not add section";throw ut.error(bt),N}},t[34]=c,t[35]=Q,t[36]=X,t[37]=q):q=t[37];const y=q;let I;t[38]===Symbol.for("react.memo_cache_sentinel")?(I=e=>{P.current=e.append,rt(!0)},t[38]=I):I=t[38];const vt=I;let U;t[39]!==y?(U=async e=>{const r=P.current;if(r)try{await y(e,d=>{r(d),rt(!1),P.current=null})}catch{}},t[39]=y,t[40]=U):U=t[40];const lt=U;let M;t[41]!==p||t[42]!==v?(M=p.length>0?[v,...p]:[],t[41]=p,t[42]=v,t[43]=M):M=t[43];const A=M;let S;t[44]!==p||t[45]!==A||t[46]!==v?(S=A.length>0?o.jsx("nav",{"aria-label":"Editing breadcrumb",className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:A.map((e,r)=>{const d=r===A.length-1;return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[r>0&&o.jsx(jt,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>{pt(r===0?[]:Ct(p,r)),dt(Ft)},title:e,className:yt("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",d?"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[44]=p,t[45]=A,t[46]=v,t[47]=S):S=t[47];let j;t[48]!==W?(j=o.jsx(Kt,{isPending:W,isError:!1}),t[48]=W,t[49]=j):j=t[49];let k;t[50]!==S||t[51]!==j?(k=o.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[S,j]}),t[50]=S,t[51]=j,t[52]=k):k=t[52];let _;t[53]!==i||t[54]!==p||t[55]!==c||t[56]!==mt||t[57]!==et||t[58]!==y||t[59]!==st||t[60]!==J||t[61]!==m||t[62]!==u||t[63]!==Y||t[64]!==h||t[65]!==G?(_=o.jsx(kt,{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:J?o.jsx(Tt,{schema:h,value:mt,onChange:st,basePath:"",breadcrumbPath:p,onBreadcrumbChange:pt,decofile:c,meta:m,onSaveReferencedBlock:Y,previewBaseUrl:u,onAddSectionItem:y,onRequestAddSection:vt},`${i}:${et}`):G?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(St,{size:16,className:"animate-spin"}),"Loading app schema…"]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:"No editable schema found for this app."})})})}),t[53]=i,t[54]=p,t[55]=c,t[56]=mt,t[57]=et,t[58]=y,t[59]=st,t[60]=J,t[61]=m,t[62]=u,t[63]=Y,t[64]=h,t[65]=G,t[66]=_):_=t[66];let B;t[67]!==ot||t[68]!==c||t[69]!==lt||t[70]!==m||t[71]!==u?(B=u&&o.jsx(_t,{open:ot,onOpenChange:e=>{rt(e),e||(P.current=null)},meta:m,decofile:c,previewBaseUrl:u,onSelect:e=>{lt(e)}}),t[67]=ot,t[68]=c,t[69]=lt,t[70]=m,t[71]=u,t[72]=B):B=t[72];let Z;return t[73]!==k||t[74]!==_||t[75]!==B?(Z=o.jsxs("div",{className:"flex h-full flex-col",children:[k,_,B]}),t[73]=k,t[74]=_,t[75]=B,t[76]=Z):Z=t[76],Z}function Ft(l){return l+1}function Pt(l){return l+1}export{Er as AppEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as B,j as o,C as L,b as T,r as $,B as M,p as N}from"./index-CATpc9_Q.js";import{s as q}from"./Plus-CT6paZ6Y.js";import{i as S}from"./Zap-DEx1nSIp.js";import{S as D}from"./search-input-CvRN0hSz.js";import{P as l}from"./index-qXXcgDB3.js";import{E as b}from"./empty-state-YbRoaSPS.js";import{c as O}from"./use-automations-CNEZby3c.js";import{c as V}from"./use-navigate-to-agent-Bx9iFVCX.js";import{A as F}from"./automation-list-row-DPU1cfeC.js";import{f as G}from"./constants-D_FQAPnt.js";import{u as H}from"./use-virtual-mcp-D49c-xG2.js";import{R as J}from"./require-capability--O07fPTV.js";import"./SearchMd-DDsmGmx-.js";import"./sidebar-8cYmIqg3.js";import"./LayoutLeft-DsDSp7CT.js";import"./use-mobile-J9H9Qt6I.js";import"./X-VIJVSyzC.js";import"./tooltip-D3bYYanT.js";import"./use-mcp-client-BxFsDRf1.js";import"./auth-CeuFwPxM.js";import"./studio-tools-b3gOe5xj.js";import"./hooks-Cs3wbrk0.js";import"./decopilot-sse-pool-Ch3YQMqQ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./alert-dialog-CL004fe5.js";import"./dropdown-menu-Br5TT9qG.js";import"./Check-evpt16EA.js";import"./ChevronRight-D_lkQ96x.js";import"./Circle-BCcBwY3X.js";import"./Stars02-Du4pvaB9.js";import"./DotsVertical-BKwCKB4H.js";import"./Trash01-C7SUcgzf.js";import"./agent-icon-Mpp91bfB.js";import"./AlertCircle-CYnFm87k.js";import"./UserPlus01-yjW9fL-G.js";import"./Tool01-CcKyBYSb.js";import"./ArrowUp-Ce-_ZrGn.js";import"./Settings02-kiZvy_fn.js";import"./Tool02-BTUXK138.js";import"./XCircle-BfHMsLh5.js";import"./ArrowUpRight-DYOvLwi-.js";import"./TrendUp01-vYlS04gI.js";import"./ZapSquare-BPLamaJH.js";import"./Users03-DF3f2ZwS.js";import"./CheckCircle-Cw29V8Yd.js";import"./ChevronDown-Dg5I-IyP.js";import"./ChevronUp-XSOoP_Nn.js";import"./Copy01-ukzF2g5D.js";import"./ZoomOut-DyGQpwZF.js";import"./Globe01-B-9XjG_y.js";import"./Eye-Rw2Lcj0d.js";import"./FilterLines-Bk3fgVzt.js";import"./Flag01-C_wN137m.js";import"./Star01-B3Xobx84.js";import"./Globe04-DNSs6EXk.js";import"./SwitchHorizontal01-Be6iAHDL.js";import"./HardDrive-CljS-OyE.js";import"./Key01-CaIwkkK6.js";import"./LinkExternal01-C7SNA6xk.js";import"./List-B0zktlno.js";import"./Monitor01-kUiMqEFF.js";import"./Sun-Cq8zftWr.js";import"./Package-RGVJ3BIv.js";import"./Palette-D51YSINn.js";import"./Play-gkeg9Jqk.js";import"./SearchLg-Ci14_nqQ.js";import"./Shield01-mMv7jSi2.js";import"./Stars01-D-xbM28c.js";import"./Upload01-CFKVhcA1.js";import"./User01-C9pHWMIN.js";import"./Users01-4r88txyu.js";import"./XClose-DZbEhf0R.js";import"./use-collections-BmbOO-kw.js";import"./use-capability-Cycc9ysK.js";import"./access-gate-CmY0Vaq7.js";import"./capability-load-error-BLap3eYO.js";function K(){const t=B.c(16),{org:i}=L(),{data:w}=O(void 0),u=w===void 0?[]:w,R=H(),k=V(),d=T(),[f,E]=$.useState(""),g=f.toLowerCase(),y=new Map(R.map(Q)),C=u.filter(e=>{if(!g||e.name.toLowerCase().includes(g))return!0;if(e.virtual_mcp_id){const a=y.get(e.virtual_mcp_id);if(a&&a.title.toLowerCase().includes(g))return!0}return!1}),P=(e,a)=>{const A=a&&y.has(a)?a:G(i.id);N("automations_list_row_clicked",{automation_id:e,agent_id:A,source:"settings_automations"}),k(A,{search:{main:"automation:"+e}})};let n;t[0]!==d||t[1]!==i.slug?(n=()=>{N("automations_empty_state_browse_agents_clicked"),d({to:"/$org/settings/agents",params:{org:i.slug}})},t[0]=d,t[1]=i.slug,t[2]=n):n=t[2];const z=n,x=l,h=l,j=l;let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(l.Title,{children:"Automations"}),t[3]=p):p=t[3];const _=u.length>0&&o.jsx(D,{value:f,onChange:E,placeholder:"Search automations...",className:"w-full md:w-[375px]"});let r;t[4]!==_?(r=o.jsxs("div",{className:"flex flex-col gap-6",children:[p,_]}),t[4]=_,t[5]=r):r=t[5];const v=u.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations yet",description:"Automations are created per agent. Open an agent and add one from its Automations tab.",actions:o.jsxs(M,{size:"sm",onClick:z,children:[o.jsx(q,{size:14}),"Browse agents"]})})}):C.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${f}"`})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:C.map(e=>o.jsx(F,{automation:e,showAgent:!0,onClick:()=>P(e.id,e.virtual_mcp_id)},e.id))});let s;t[6]!==j.Body||t[7]!==r||t[8]!==v?(s=o.jsxs(j.Body,{children:[r,v]}),t[6]=j.Body,t[7]=r,t[8]=v,t[9]=s):s=t[9];let m;t[10]!==h.Content||t[11]!==s?(m=o.jsx(h.Content,{children:s}),t[10]=h.Content,t[11]=s,t[12]=m):m=t[12];let c;return t[13]!==x||t[14]!==m?(c=o.jsx(x,{children:m}),t[13]=x,t[14]=m,t[15]=c):c=t[15],c}function Q(t){return[t.id,t]}function _o(){const t=B.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(J,{capability:"automations:manage",area:"automations",children:o.jsx(K,{})}),t[0]=i):i=t[0],i}export{_o as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as q,r as S,l as G,j as t,B as I,i as Q,t as U}from"./index-CATpc9_Q.js";import{i as X}from"./XCircle-BfHMsLh5.js";import{aC as Y,a7 as T}from"./agent-icon-Mpp91bfB.js";import{n as Z}from"./LinkExternal01-C7SNA6xk.js";import{f as K,a as _,b as tt,c as et,d as ot,e as rt,A as it,g as st}from"./alert-dialog-CL004fe5.js";import{I as M}from"./input-BAWS9YOn.js";import{L}from"./label-VUalQ4yB.js";import{v as at,w as mt,V as nt,o as lt,x as R,A as pt,W as ct,y as dt}from"./index-BMNH48Wq.js";import{c as ut,B as gt,a as xt}from"./block-document-D1B6WRbV.js";import{u as ft}from"./use-autosave-BvELNjO9.js";import{t as ht}from"./ChevronDown-Dg5I-IyP.js";import{J as yt,K as jt,I as vt}from"./automation-runs-buslfflw.js";import{s as v,E as bt}from"./primitives-EBvObhxE.js";import"./AlertCircle-CYnFm87k.js";import"./UserPlus01-yjW9fL-G.js";import"./Tool01-CcKyBYSb.js";import"./ArrowUp-Ce-_ZrGn.js";import"./Settings02-kiZvy_fn.js";import"./Tool02-BTUXK138.js";import"./ArrowUpRight-DYOvLwi-.js";import"./TrendUp01-vYlS04gI.js";import"./ZapSquare-BPLamaJH.js";import"./Users03-DF3f2ZwS.js";import"./CheckCircle-Cw29V8Yd.js";import"./Check-evpt16EA.js";import"./ChevronRight-D_lkQ96x.js";import"./ChevronUp-XSOoP_Nn.js";import"./Circle-BCcBwY3X.js";import"./Stars02-Du4pvaB9.js";import"./Copy01-ukzF2g5D.js";import"./ZoomOut-DyGQpwZF.js";import"./DotsVertical-BKwCKB4H.js";import"./Globe01-B-9XjG_y.js";import"./Eye-Rw2Lcj0d.js";import"./FilterLines-Bk3fgVzt.js";import"./Flag01-C_wN137m.js";import"./Star01-B3Xobx84.js";import"./Globe04-DNSs6EXk.js";import"./SwitchHorizontal01-Be6iAHDL.js";import"./HardDrive-CljS-OyE.js";import"./Key01-CaIwkkK6.js";import"./LayoutLeft-DsDSp7CT.js";import"./List-B0zktlno.js";import"./Monitor01-kUiMqEFF.js";import"./Sun-Cq8zftWr.js";import"./Package-RGVJ3BIv.js";import"./Palette-D51YSINn.js";import"./Play-gkeg9Jqk.js";import"./Plus-CT6paZ6Y.js";import"./SearchLg-Ci14_nqQ.js";import"./SearchMd-DDsmGmx-.js";import"./Shield01-mMv7jSi2.js";import"./Stars01-D-xbM28c.js";import"./Trash01-C7SUcgzf.js";import"./Upload01-CFKVhcA1.js";import"./User01-C9pHWMIN.js";import"./Users01-4r88txyu.js";import"./XClose-DZbEhf0R.js";import"./X-VIJVSyzC.js";import"./Zap-DEx1nSIp.js";import"./chat-context-CkMKBD24.js";import"./autosend-DoEB2J9-.js";import"./hooks-Cs3wbrk0.js";import"./use-mcp-client-BxFsDRf1.js";import"./constants-D_FQAPnt.js";import"./auth-CeuFwPxM.js";import"./decopilot-sse-pool-Ch3YQMqQ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-b3gOe5xj.js";import"./use-virtual-mcp-D49c-xG2.js";import"./use-collections-BmbOO-kw.js";import"./use-ai-providers-PAIwflDX.js";import"./use-decopilot-events-DOq7WDLE.js";import"./tab-id-BijBBRwE.js";import"./use-organization-settings-Cy2mrzMh.js";import"./tooltip-D3bYYanT.js";import"./dialog-CuHfS0sp.js";import"./drawer-XTEWDOLT.js";import"./collection-search-NkGhGdHi.js";import"./use-mobile-J9H9Qt6I.js";import"./AreaChart-BhV9uTIC.js";import"./index-DwOhgdSM.js";import"./shell-layout-BTgKP_tN.js";import"./avatar-DudI_cM5.js";import"./required-auth-layout-BubrwQcD.js";import"./use-org-sso-BSgN5318.js";import"./form-DoFnwcqf.js";import"./select-BNzv8bE0.js";import"./tabs-BqvTvRv7.js";import"./toggle-group-DaqLlWvW.js";import"./use-deco-credits-Bg6aPI45.js";import"./extract-connection-data-CJ9qZ9tu.js";import"./connection-card-D1p5KuRZ.js";import"./use-registry-connections-CuVe3lZK.js";import"./use-connection-BL5Htq-Q.js";import"./useInfiniteQuery-EUhFQPYl.js";import"./use-infinite-scroll-B-pqmsuO.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-Bi9zPbIV.js";import"./integration-icon-BRTxQ4I-.js";import"./textarea-PZIPdxV3.js";import"./connection-form-helpers-D-SC2rCK.js";import"./authenticate-and-persist-oauth-CTnNYy7E.js";import"./mcp-oauth-D6TokJMF.js";import"./collection-tabs-BwuBKGur.js";import"./badge-Ds5R9rAV.js";import"./useSuspenseInfiniteQuery-BkDxPy4m.js";import"./connect-desktop-dialog-BCaiIETn.js";import"./select-model-DVSYMGzL.js";import"./checkbox-BO2L3mp3.js";import"./skeleton-CYoyZmyw.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CWE8axRi.js";import"./command-CZFy5Z8z.js";import"./index-DtyjY45a.js";import"./popover-D2alhhTy.js";import"./dropdown-menu-Br5TT9qG.js";import"./index-Sns9ntjm.js";import"./file-type-icon-CwUnpF6W.js";import"./toolbar-SkI9UHfs.js";import"./use-debounced-value-CgDMpgJ3.js";import"./index-BO77c2t-.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DpCxUSxZ.js";import"./empty-state-YbRoaSPS.js";import"./use-mcp-tools-11QvC1x0.js";import"./use-capability-Cycc9ysK.js";import"./tools-list-CAMhopuE.js";import"./switch-BUEc-Zj-.js";import"./use-debounced-autosave-9nyp1djE.js";import"./index-qXXcgDB3.js";import"./sidebar-8cYmIqg3.js";import"./search-input-CvRN0hSz.js";import"./github-repo-picker-DvJ8C_-g.js";import"./use-navigate-to-agent-Bx9iFVCX.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-B1NLB7qI.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./companions-core-Ds_Fs5gE.js";import"./format-time-BnbuEtat.js";import"./use-members-DhXdX-_i.js";import"./use-org-auth-client-BNQda2IH.js";import"./index-Ci_dhHUP.js";import"./get-initials-D-f_fDFw.js";import"./calendar-i4xGe38i.js";import"./use-copy-DqgQyLJe.js";import"./toolbar-icon-button-CMK9jCFP.js";import"./use-file-configs-Cu57xyoQ.js";import"./monaco-editor-B8BOxibN.js";import"./use-automations-CNEZby3c.js";import"./automation-list-row-DPU1cfeC.js";import"./table-D1nQ-wNh.js";import"./use-clock-tick-Bh3IqoT0.js";function Ct(k){const e=q.c(18),{icon:f,title:n,defaultOpen:b,children:d}=k,A=b===void 0?!1:b,[x,D]=S.useState(A);let l;e[0]!==f?(l=t.jsx(f,{size:15}),e[0]=f,e[1]=l):l=e[1];let i;e[2]!==n?(i=t.jsx("span",{className:"flex-1 text-left",children:n}),e[2]=n,e[3]=i):i=e[3];const h=x&&"rotate-180";let r;e[4]!==h?(r=G("transition-transform",h),e[4]=h,e[5]=r):r=e[5];let p;e[6]!==r?(p=t.jsx(ht,{size:15,className:r}),e[6]=r,e[7]=p):p=e[7];let c;e[8]!==l||e[9]!==i||e[10]!==p?(c=t.jsx(yt,{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,i,p]})}),e[8]=l,e[9]=i,e[10]=p,e[11]=c):c=e[11];let s;e[12]!==d?(s=t.jsx(jt,{className:"px-2 pt-4",children:d}),e[12]=d,e[13]=s):s=e[13];let u;return e[14]!==x||e[15]!==c||e[16]!==s?(u=t.jsxs(vt,{open:x,onOpenChange:D,className:"mt-4",children:[c,s]}),e[14]=x,e[15]=c,e[16]=s,e[17]=u):u=e[17],u}function jr({orgSlug:k,virtualMcpId:e,branch:f,blockKey:n,block:b,decofile:d,meta:A,onManagePosts:x,onOpenPost:D,previewBaseUrl:l}){const i=at({orgSlug:k,virtualMcpId:e,branch:f}),h=mt(b,"categories"),[r,p,c]=ft(h,o=>{i.mutate({blockKey:n,data:R(n,"categories",o)})}),s=(o,w)=>p({...r,[o]:w}),u=ut({decofile:d,category:r,previewBaseUrl:l}),a=v(r.slug),[B,y]=S.useState(a),[m,C]=S.useState(null),[N,P]=S.useState(!1),$=a?nt(d).filter(o=>o.categorySlugs.includes(a)):[],j=$.length,W=o=>s("slug",o),H=async(o,w)=>{const V=v(r.name);P(!0);try{let g=0;for(const{key:E,payload:O}of pt(d,"posts")){const F=ct(O,o,{name:V,slug:w});F!==O&&(await i.mutateAsync({blockKey:E,data:R(E,"posts",dt(F))}),g+=1)}const z={...r,slug:w};await i.mutateAsync({blockKey:n,data:R(n,"categories",z)}),c(z),U.success(g>0?`Renamed slug and updated ${g} ${g===1?"post":"posts"}`:"Renamed slug"),C(null)}catch(g){y(o),C(null),U.error(g instanceof Error?g.message:"Rename failed")}finally{P(!1)}},J=()=>{const o=B.trim();if(o===a){B!==o&&y(o);return}if(!o){y(a);return}if(j===0){W(o);return}C({oldSlug:a,newSlug:o,count:j})};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:v(r.name)||"Untitled category"}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(lt,{isPending:i.isPending,isError:i.isError}),u&&t.jsxs(I,{type:"button",variant:"outline",size:"sm",title:"Open the category preview in a new tab",onClick:()=>window.open(u,"_blank","noopener,noreferrer"),children:[t.jsx(Z,{size:14}),"See category preview"]})]})]}),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(bt,{value:v(r.name),onChange:o=>s("name",o),placeholder:"Category name",className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(L,{htmlFor:"category-slug",children:"Slug"}),t.jsx(M,{id:"category-slug",value:B,onChange:o=>y(o.target.value),onBlur:J,placeholder:"my-category",className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(L,{htmlFor:"category-description",children:"Description"}),t.jsx(M,{id:"category-description",value:v(r.description),onChange:o=>s("description",o.target.value),placeholder:"Short description for this category",className:"h-10"})]}),t.jsx(Ct,{icon:Y,title:"Content",defaultOpen:!0,children:t.jsx(gt,{value:xt(r.sections),onChange:o=>s("sections",o),meta:A,emptyMessage:"This category has no content yet. Use ⊕ to add your first block."})}),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(T,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"text-sm",children:[j," ",j===1?"post":"posts"," in this category"]})]}),t.jsxs(I,{type:"button",variant:"outline",size:"sm",disabled:!a,title:a?"Pick posts to add to this category":"Set a slug to add posts to this category",onClick:()=>x(a),children:["Add posts",t.jsx(X,{size:14})]})]}),j>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:$.map(o=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>D(o.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(T,{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:o.title||"Untitled post"}),o.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:o.slug})]})]})},o.key))})]})]})})]}),t.jsx(K,{open:!!m,onOpenChange:o=>{o||N||(y(a),C(null))},children:t.jsxs(_,{children:[t.jsxs(tt,{children:[t.jsx(et,{children:"Rename category slug?"}),t.jsx(ot,{children:m?`Changing the slug from "${m.oldSlug}" to "${m.newSlug}" will update ${m.count} ${m.count===1?"post":"posts"} that reference this category.`:null})]}),t.jsxs(rt,{children:[t.jsx(it,{disabled:N,children:"Cancel"}),t.jsx(st,{onClick:o=>{o.preventDefault(),m&&H(m.oldSlug,m.newSlug)},disabled:N,children:N?t.jsxs(t.Fragment,{children:[t.jsx(Q,{size:14,className:"animate-spin"}),"Renaming…"]}):"Rename & update posts"})]})]})})]})}export{jr as CategoryEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as y,j as t,B as F,i as Z,H as Qe,I as se,E as Pe,r as T,C as le,M as Ge,l as J,bd as Ye,u as Ze,L as Q,t as Xe,e as ae,aZ as ke}from"./index-CATpc9_Q.js";import{E as Ee}from"./empty-state-YbRoaSPS.js";import{u as et,a as Ae}from"./use-collections-BmbOO-kw.js";import{u as ce}from"./use-mcp-client-BxFsDRf1.js";import{F as ne,a as tt,b as de,d as me}from"./form-DoFnwcqf.js";import{I as ue}from"./input-BAWS9YOn.js";import{T as re}from"./textarea-PZIPdxV3.js";import{a as st,b as nt,V as pe,O as ot,M as it}from"./index-ZYMQ4v5I.js";import{am as rt,J as lt,ai as at,Q as ct,aa as dt,an as mt,U as be}from"./agent-icon-Mpp91bfB.js";import{g as ut,M as pt,a as Ne}from"./index-DwOhgdSM.js";import{A as xt,a as ft,b as ht}from"./alert-DVVesbQc.js";import{S as ve,a as Se,b as ye,c as we,d as oe}from"./select-BNzv8bE0.js";import{c as gt,b as Ce,T as Ie,a as $e}from"./tooltip-D3bYYanT.js";import{i as jt}from"./AlertCircle-CYnFm87k.js";import{s as bt}from"./Stars02-Du4pvaB9.js";import{a as Nt}from"./Copy01-ukzF2g5D.js";import{i as vt}from"./Play-gkeg9Jqk.js";import{i as St}from"./ChevronRight-D_lkQ96x.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./tools-list-CAMhopuE.js";import{a as Oe,u as Re}from"./use-connection-BL5Htq-Q.js";import{a as It}from"./use-mcp-tools-11QvC1x0.js";import{M as $t,c as Tt}from"./monaco-editor-B8BOxibN.js";import{I as Te}from"./integration-icon-BRTxQ4I-.js";import{h as Pt,m as kt}from"./chat-context-CkMKBD24.js";import{u as Et}from"./shell-layout-BTgKP_tN.js";import{n as At}from"./Tool02-BTUXK138.js";import"./constants-D_FQAPnt.js";import"./auth-CeuFwPxM.js";import"./label-VUalQ4yB.js";import"./index-qXXcgDB3.js";import"./sidebar-8cYmIqg3.js";import"./LayoutLeft-DsDSp7CT.js";import"./use-mobile-J9H9Qt6I.js";import"./X-VIJVSyzC.js";import"./ZoomOut-DyGQpwZF.js";import"./Key01-CaIwkkK6.js";import"./extract-connection-data-CJ9qZ9tu.js";import"./use-registry-connections-CuVe3lZK.js";import"./use-organization-settings-Cy2mrzMh.js";import"./studio-tools-b3gOe5xj.js";import"./Plus-CT6paZ6Y.js";import"./index-D3ZetWp6.js";import"./index-DtyjY45a.js";import"./popover-D2alhhTy.js";import"./use-virtual-mcp-D49c-xG2.js";import"./Check-evpt16EA.js";import"./SearchMd-DDsmGmx-.js";import"./Users03-DF3f2ZwS.js";import"./use-create-virtual-mcp-DiHcwodq.js";import"./use-navigate-to-agent-Bx9iFVCX.js";import"./hooks-Cs3wbrk0.js";import"./decopilot-sse-pool-Ch3YQMqQ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./UserPlus01-yjW9fL-G.js";import"./Tool01-CcKyBYSb.js";import"./ArrowUp-Ce-_ZrGn.js";import"./Settings02-kiZvy_fn.js";import"./XCircle-BfHMsLh5.js";import"./ArrowUpRight-DYOvLwi-.js";import"./TrendUp01-vYlS04gI.js";import"./ZapSquare-BPLamaJH.js";import"./CheckCircle-Cw29V8Yd.js";import"./ChevronDown-Dg5I-IyP.js";import"./ChevronUp-XSOoP_Nn.js";import"./Circle-BCcBwY3X.js";import"./DotsVertical-BKwCKB4H.js";import"./Globe01-B-9XjG_y.js";import"./Eye-Rw2Lcj0d.js";import"./FilterLines-Bk3fgVzt.js";import"./Flag01-C_wN137m.js";import"./Star01-B3Xobx84.js";import"./Globe04-DNSs6EXk.js";import"./SwitchHorizontal01-Be6iAHDL.js";import"./HardDrive-CljS-OyE.js";import"./LinkExternal01-C7SNA6xk.js";import"./List-B0zktlno.js";import"./Monitor01-kUiMqEFF.js";import"./Sun-Cq8zftWr.js";import"./Package-RGVJ3BIv.js";import"./Palette-D51YSINn.js";import"./SearchLg-Ci14_nqQ.js";import"./Shield01-mMv7jSi2.js";import"./Stars01-D-xbM28c.js";import"./Trash01-C7SUcgzf.js";import"./Upload01-CFKVhcA1.js";import"./User01-C9pHWMIN.js";import"./Users01-4r88txyu.js";import"./XClose-DZbEhf0R.js";import"./Zap-DEx1nSIp.js";import"./mcp-oauth-D6TokJMF.js";import"./badge-Ds5R9rAV.js";import"./index-BO77c2t-.js";import"./autosend-DoEB2J9-.js";import"./use-ai-providers-PAIwflDX.js";import"./use-decopilot-events-DOq7WDLE.js";import"./tab-id-BijBBRwE.js";import"./avatar-DudI_cM5.js";import"./dialog-CuHfS0sp.js";import"./alert-dialog-CL004fe5.js";import"./required-auth-layout-BubrwQcD.js";import"./use-org-sso-BSgN5318.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:i,isSaving:r,saveLabel:a,undoLabel:c}=s,l=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!i)return null;let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(rt,{size:14}),e[0]=p):p=e[0];let m;e[1]!==r||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:r,"aria-label":u,children:[p,u]}),e[1]=r,e[2]=n,e[3]=u,e[4]=m):m=e[4];let x;e[5]!==r?(x=r?t.jsx(Z,{size:14,className:"animate-spin"}):t.jsx(lt,{size:14}),e[5]=r,e[6]=x):x=e[6];let f;e[7]!==r||e[8]!==o||e[9]!==l||e[10]!==x?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:r,"aria-label":l,children:[x,l]}),e[7]=r,e[8]=o,e[9]=l,e[10]=x,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Qe({title:se().min(1),description:se().nullable(),body:se()});function ie(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let i;e[1]!==o.control?(i=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:zt}),t.jsx(ne,{control:o.control,name:"description",render:Dt})]})]}),e[1]=o.control,e[2]=i):i=e[2];let r,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=a):(r=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[r,a,t.jsx(ne,{control:o.control,name:"body",render:Mt})]}),e[5]=o.control,e[6]=c):c=e[6];let l;e[7]!==i||e[8]!==c?(l=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=l):l=e[9];let u;return e[10]!==o||e[11]!==l?(u=t.jsx(tt,{...o,children:l}),e[10]=o,e[11]=l,e[12]=u):u=e[12],u}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:i}=le(),r=o||null;let a;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(a={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=a):a=e[3];const c=ce(a),l=et(o,"PROMPT",n,c),u=Ae(o,"PROMPT",c),p=u.update.isPending;let m;e[4]!==l?(m=l?{title:l.title,description:l.description??null,body:ie(l)}:void 0,e[4]=l,e[5]=m):m=e[5];let x;e[6]!==m?(x={values:m},e[6]=m,e[7]=x):x=e[7];const f=Ge(x);let g;e[8]!==f||e[9]!==l?(g=()=>{l&&f.reset({title:l.title,description:l.description??null,body:ie(l)})},e[8]=f,e[9]=l,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const A=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:A.title,description:A.description??null,body:ie(A)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!l){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==l.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:l.title}),e[16]=l.title,e[17]=$):$=e[17];let E;e[18]!==l.description?(E=l.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:l.description})]}):null,e[18]=l.description,e[19]=E):E=e[19];let P;e[20]!==$||e[21]!==E?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,E]})}),e[20]=$,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==p||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:p})}),e[25]=f.formState.isDirty,e[26]=p,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(pe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const i=n;if(!i){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let r;return e[2]!==o?(r=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:i,promptId:o})})}),e[2]=o,e[3]=r):r=e[3],r}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=J("min-w-0 overflow-hidden",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=J("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("ol",{"data-slot":"breadcrumb-list",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=J("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("li",{"data-slot":"breadcrumb-item",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function G(s){const e=y.c(10);let o,n,i;e[0]!==s?({asChild:o,className:n,...i}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=i):(o=e[1],n=e[2],i=e[3]);const r=o?Ye:"a";let a;e[4]!==n?(a=J("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==r||e[7]!==i||e[8]!==a?(c=t.jsx(r,{"data-slot":"breadcrumb-link",className:a,...i}),e[6]=r,e[7]=i,e[8]=a,e[9]=c):c=e[9],c}function De(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=J("text-foreground font-medium truncate",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function Y(s){const e=y.c(12);let o,n,i;e[0]!==s?({children:o,className:n,...i}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=i):(o=e[1],n=e[2],i=e[3]);let r;e[4]!==n?(r=J("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=r):r=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==i||e[9]!==r||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:r,...i,children:a}),e[8]=i,e[9]=r,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:i,onSelectInstance:r,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const l=wt(c);if(!l.isAuthenticated){let m;return e[2]!==l.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:l.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(it,{hasReadme:!1})}),e[2]=l.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let p;return e[5]!==n||e[6]!==r||e[7]!==i||e[8]!==u||e[9]!==o?(p=t.jsx(Jt,{toolName:o,connectionId:n,siblings:i,onSelectInstance:r},u),e[5]=n,e[6]=r,e[7]=i,e[8]=u,e[9]=o,e[10]=p):p=e[10],p}function Jt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:i}=Ze({strict:!1}),r=(()=>{if(!i)return null;const d=`replay-${i}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!r)return null;const d={};for(const[h,v]of Object.entries(r))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,l]=T.useState(a??{}),[u,p]=T.useState(r?JSON.stringify(r,null,2):"{}"),[m,x]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[E,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=le(),k=Oe(e),N=Pt(),A=kt(),{openSidePanel:U}=Et(),z=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),V=d=>{if(!N)return;const h=Tt(d.content);h.content.length>0&&(U("chat"),N.sendMessage({tiptapDoc:h}))},[M,X]=T.useState("json"),[ze,Le]=T.useState(!1);O&&!ze&&(X("ui"),Le(!0));const xe=j?.inputSchema?.properties,fe=xe?Object.keys(xe):[],H=fe.length>0,K={};if(H&&j?.inputSchema?.properties)for(const d of fe)K[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),x(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...K,...c}:(()=>{const D=u.trim();if(!D)return{};const B=JSON.parse(D);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([D,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[D]=="string")try{h[D]=JSON.parse(h[D])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[D]=="string"&&h[D]!==""){const je=Number(h[D]);Number.isNaN(je)||(h[D]=je)}});const v=await _.callTool({name:s,arguments:h}),W=v.structuredContent??v,He=performance.now(),Ke=Math.round(He-d);x(W),g(v),I(h);const We=JSON.stringify(W),ge=new TextEncoder().encode(We).length;w({duration:`${Ke}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const W=performance.now();w({duration:`${Math.round(W-d)}ms`})}finally{P(!1)}},te=(d,h)=>{l(v=>({...v,[d]:h}))},Be=()=>{x(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Je=t.jsx(_e,{children:t.jsxs(Me,{children:[t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Y,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Y,{})]}),t.jsx(q,{children:t.jsx(De,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Ve=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>p(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:E?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(xt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&M==="ui"&&_?t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(pt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:V,onUpdateModelContext:d=>A?.setAppContext(z,d),onTeardown:()=>A?.clearAppContext(z),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx($t,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),Xe.success("Copied to clipboard")},children:t.jsx(Nt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(pe,{breadcrumb:Je,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Te,{icon:k?.icon||null,name:k?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):L.isLoading?t.jsx(Z,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Ve}),qe]})})]})})}function Vt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:i}=s,[r,a]=T.useState(n[0]?.id??"");let c;e[0]!==r||e[1]!==n?(c=n.find(x=>x.id===r)?.id??n[0]?.id??"",e[0]=r,e[1]=n,e[2]=c):c=e[2];const l=c;if(!Oe(l||void 0)||!l){let x;return e[3]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=x):x=e[3],x}let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Z,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=p):p=e[4];let m;return e[5]!==l||e[6]!==i||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:p,children:t.jsx(Ft,{toolName:o,connectionId:l,siblings:n,onSelectInstance:a,onBack:i})}),e[5]=l,e[6]=i,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:i,description:r,buttonProps:a,buttonComponent:c,className:l,children:u}=s;let p;e[0]!==l?(p=J("flex flex-col items-center justify-center py-16 text-center",l),e[0]=l,e[1]=p):p=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let x;e[5]!==i?(x=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:i}),e[5]=i,e[6]=x):x=e[6];let f;e[7]!==r?(f=r&&t.jsx("div",{className:"text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=f):f=e[8];let g;e[9]!==x||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[x,f]}),e[9]=x,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:J(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==p||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:p,children:[m,g,S,u]}),e[15]=u,e[16]=p,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Kt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),i=decodeURIComponent(n.itemId);let r;s[1]!==n.appSlug?(r={slug:n.appSlug},s[1]=n.appSlug,s[2]=r):r=s[2];const a=Re(r);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const l=c,u=Wt;let p;return s[5]!==l||s[6]!==i||s[7]!==a?(p=t.jsx(Vt,{itemId:i,siblings:a,onBack:l,onUpdate:u}),s[5]=l,s[6]=i,s[7]=a,s[8]=p):p=s[8],p}async function Wt(s){return Promise.resolve()}function Qt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Gt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),i=decodeURIComponent(n.collectionName),r=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:l}=le();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,x=m?.id??"",f=x||"no-connection",g=x??null;let S;s[5]!==l.id||s[6]!==l.slug||s[7]!==g?(S={connectionId:g,orgId:l.id,orgSlug:l.slug},s[5]=l.id,s[6]=l.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ae(f,i,I);let $;s[9]!==R||s[10]!==r?($=async M=>{r&&await R.update.mutateAsync({id:r,data:M})},s[9]=R,s[10]=r,s[11]=$):$=s[11];const E=$;let P;s[12]!==i?(P=i?.toLowerCase(),s[12]=i,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==i?(C=Qt(i),s[14]=i,s[15]=C):C=s[15];const k=C;let N;s[16]!==l.slug?(N=t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections",params:{org:l.slug},children:"Connections"})})}),s[16]=l.slug,s[17]=N):N=s[17];let A;s[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Y,{}),s[18]=A):A=s[18];let U;s[19]!==i||s[20]!==m||s[21]!==l.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections/$appSlug",params:{org:l.slug,appSlug:n.appSlug},search:{tab:i},children:m.title})})}),t.jsx(Y,{})]}),s[19]=i,s[20]=m,s[21]=l.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let z;s[24]!==k?(z=t.jsx(q,{children:t.jsx(De,{children:k})}),s[24]=k,s[25]=z):z=s[25];let _;s[26]!==U||s[27]!==z||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(Me,{children:[N,A,U,z]})}),s[26]=U,s[27]=z,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let M;return s[30]!==w||s[31]!==c||s[32]!==E||s[33]!==r?(M=t.jsx(w,{itemId:r,onBack:c,onUpdate:E}),s[30]=w,s[31]=c,s[32]=E,s[33]=r,s[34]=M):M=s[34],M}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(At,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let V;return s[38]!==L||s[39]!==O?(V=t.jsx(pe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=V):V=s[40],V}function Yt(){const s=y.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let r;return s[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Gt,{}),s[2]=r):r=s[2],r}function Qn(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Z,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{Qn as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{H as he,af as Ie,b3 as Ae,I as le,ad as $e,c as P,j as t,i as ge,B as V,r as G,l as je,C as J,v as De,K as ne,b as Y,aI as ce,z as Pe,b4 as Oe,E as Me,e as ze,b5 as Ee,n as Ve,M as Ue,J as Re,t as q,b6 as Fe}from"./index-CATpc9_Q.js";import{g as Le}from"./extract-connection-data-CJ9qZ9tu.js";import{E as ve}from"./empty-state-YbRoaSPS.js";import{E as He,c as Be,r as We,b as Xe,d as qe}from"./connection-form-helpers-D-SC2rCK.js";import{c as Ge,S as Ke,V as Qe}from"./index-ZYMQ4v5I.js";import{u as be,T as Je}from"./tools-list-CAMhopuE.js";import{u as Ye}from"./use-members-DhXdX-_i.js";import{A as Ze}from"./avatar-DudI_cM5.js";import{a as Ne,b as ye,u as et}from"./use-connection-BL5Htq-Q.js";import{u as _e}from"./use-mcp-client-BxFsDRf1.js";import{a as tt}from"./use-mcp-tools-11QvC1x0.js";import{c as st,C as nt,a as ot,d as it}from"./AreaChart-BhV9uTIC.js";import{i as rt,a as at}from"./mcp-oauth-D6TokJMF.js";import{I as oe}from"./integration-icon-BRTxQ4I-.js";import{s as lt}from"./Plus-CT6paZ6Y.js";import{L as ct,M as dt,al as mt,ah as ut}from"./agent-icon-Mpp91bfB.js";import{a as Ce,s as xt}from"./Settings02-kiZvy_fn.js";import{s as re}from"./Trash01-C7SUcgzf.js";import{q as pt,p as ft,o as ht,m as gt,n as jt}from"./sidebar-8cYmIqg3.js";import{F as L,b as H,c as B,d as E,f as W,e as vt,a as bt}from"./form-DoFnwcqf.js";import{I as X}from"./input-BAWS9YOn.js";import{u as Nt,D as yt}from"./use-delete-connection-Cm0JPsuq.js";import{c as _t,B as Ct,a as St,C as wt}from"./monitoring-stats-row-CqikJku1.js";import{u as kt}from"./studio-tools-b3gOe5xj.js";import{u as Tt}from"./use-virtual-mcp-D49c-xG2.js";import{i as Se}from"./ChevronRight-D_lkQ96x.js";import{a as we}from"./Users03-DF3f2ZwS.js";import{b as ee,c as It,T as te,a as At}from"./tabs-BqvTvRv7.js";import{g as ke}from"./connection-slug-eyAPH6o3.js";import{n as $t}from"./ZapSquare-BPLamaJH.js";import{d as Dt}from"./Tool01-CcKyBYSb.js";import{g as ae,M as Pt}from"./index-DwOhgdSM.js";import{C as Ot}from"./collection-search-NkGhGdHi.js";import{C as Mt}from"./card-Bi9zPbIV.js";import{B as zt}from"./badge-Ds5R9rAV.js";import{D as Et,a as Vt,c as Ut,d as de}from"./dropdown-menu-Br5TT9qG.js";import{S as me,a as ue,b as xe,c as pe,d as F}from"./select-BNzv8bE0.js";import{i as Rt}from"./CheckCircle-Cw29V8Yd.js";import{t as Ft}from"./ChevronDown-Dg5I-IyP.js";import{n as Lt}from"./Tool02-BTUXK138.js";import{s as se}from"./Star01-B3Xobx84.js";import{s as Ht}from"./XClose-DZbEhf0R.js";import"./constants-D_FQAPnt.js";import"./index-qXXcgDB3.js";import"./ZoomOut-DyGQpwZF.js";import"./Key01-CaIwkkK6.js";import"./auth-CeuFwPxM.js";import"./use-registry-connections-CuVe3lZK.js";import"./use-organization-settings-Cy2mrzMh.js";import"./index-D3ZetWp6.js";import"./index-DtyjY45a.js";import"./popover-D2alhhTy.js";import"./tooltip-D3bYYanT.js";import"./Check-evpt16EA.js";import"./SearchMd-DDsmGmx-.js";import"./use-mobile-J9H9Qt6I.js";import"./use-create-virtual-mcp-DiHcwodq.js";import"./use-navigate-to-agent-Bx9iFVCX.js";import"./hooks-Cs3wbrk0.js";import"./decopilot-sse-pool-Ch3YQMqQ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Eye-Rw2Lcj0d.js";import"./use-org-auth-client-BNQda2IH.js";import"./User01-C9pHWMIN.js";import"./use-collections-BmbOO-kw.js";import"./AlertCircle-CYnFm87k.js";import"./UserPlus01-yjW9fL-G.js";import"./ArrowUp-Ce-_ZrGn.js";import"./XCircle-BfHMsLh5.js";import"./ArrowUpRight-DYOvLwi-.js";import"./TrendUp01-vYlS04gI.js";import"./ChevronUp-XSOoP_Nn.js";import"./Circle-BCcBwY3X.js";import"./Stars02-Du4pvaB9.js";import"./Copy01-ukzF2g5D.js";import"./DotsVertical-BKwCKB4H.js";import"./Globe01-B-9XjG_y.js";import"./FilterLines-Bk3fgVzt.js";import"./Flag01-C_wN137m.js";import"./Globe04-DNSs6EXk.js";import"./SwitchHorizontal01-Be6iAHDL.js";import"./HardDrive-CljS-OyE.js";import"./LayoutLeft-DsDSp7CT.js";import"./LinkExternal01-C7SNA6xk.js";import"./List-B0zktlno.js";import"./Monitor01-kUiMqEFF.js";import"./Sun-Cq8zftWr.js";import"./Package-RGVJ3BIv.js";import"./Palette-D51YSINn.js";import"./Play-gkeg9Jqk.js";import"./SearchLg-Ci14_nqQ.js";import"./Shield01-mMv7jSi2.js";import"./Stars01-D-xbM28c.js";import"./Upload01-CFKVhcA1.js";import"./Users01-4r88txyu.js";import"./X-VIJVSyzC.js";import"./Zap-DEx1nSIp.js";import"./label-VUalQ4yB.js";import"./alert-dialog-CL004fe5.js";const Bt=he({scopes:$e(le()).describe("List of scopes available"),stateSchema:Ie(le(),Ae()).describe("JSON Schema (draft-07) defining the state structure")}),Wt=[{name:"MCP_CONFIGURATION",inputSchema:he({}),outputSchema:Bt}];function Xt(s){const e=P.c(46),{instance:n,onConfigure:i,onAuthenticate:r,onDelete:o,onToggleStatus:a}=s;let d;e[0]!==n.id?(d={connectionId:n.id},e[0]=n.id,e[1]=d):d=e[1];const l=be(d),x=!(n.connection_type==="VIRTUAL")&&l.supportsOAuth&&!l.isAuthenticated,p=n.status!=="active",c=x||p?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==c?(h=je("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",c),e[2]=c,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(oe,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let v;e[7]!==n.title?(v=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=v):v=e[8];let b;e[9]!==n.status||e[10]!==p||e[11]!==x?(b=x?t.jsx("span",{className:"text-xs text-destructive font-medium",children:"Needs authorization"}):p?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?"Disabled (error)":"Disabled"}):null,e[9]=n.status,e[10]=p,e[11]=x,e[12]=b):b=e[12];let j;e[13]!==v||e[14]!==b?(j=t.jsxs("div",{className:"flex-1 min-w-0",children:[v,b]}),e[13]=v,e[14]=b,e[15]=j):j=e[15];let N;e[16]!==n||e[17]!==x||e[18]!==r?(N=x&&t.jsx(V,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>r(n),children:"Authorize"}),e[16]=n,e[17]=x,e[18]=r,e[19]=N):N=e[19];let T;e[20]!==n||e[21]!==p||e[22]!==a?(T=p?t.jsxs(V,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>a(n,"active"),children:[t.jsx(ct,{size:13}),"Enable"]}):t.jsx(V,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>a(n,"inactive"),title:"Disable",children:t.jsx(dt,{size:13})}),e[20]=n,e[21]=p,e[22]=a,e[23]=T):T=e[23];let S;e[24]!==n||e[25]!==i?(S=()=>i(n),e[24]=n,e[25]=i,e[26]=S):S=e[26];let y;e[27]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(Ce,{size:13}),e[27]=y):y=e[27];let I;e[28]!==S?(I=t.jsx(V,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:S,title:"Configure",children:y}),e[28]=S,e[29]=I):I=e[29];let _;e[30]!==n||e[31]!==o?(_=()=>o(n),e[30]=n,e[31]=o,e[32]=_):_=e[32];let k;e[33]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(re,{size:13}),e[33]=k):k=e[33];let C;e[34]!==_?(C=t.jsx(V,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:_,title:"Delete",children:k}),e[34]=_,e[35]=C):C=e[35];let f;e[36]!==I||e[37]!==C||e[38]!==N||e[39]!==T?(f=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[N,T,I,C]}),e[36]=I,e[37]=C,e[38]=N,e[39]=T,e[40]=f):f=e[40];let w;return e[41]!==f||e[42]!==h||e[43]!==g||e[44]!==j?(w=t.jsxs("div",{className:h,children:[g,j,f]}),e[41]=f,e[42]=h,e[43]=g,e[44]=j,e[45]=w):w=e[45],w}function qt(s){const e=P.c(15),{instance:n,onConfigure:i}=s;let r;e[0]!==n.icon||e[1]!==n.title?(r=t.jsx(oe,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=r):r=e[2];let o;e[3]!==n.title?(o=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=o):o=e[4];let a;e[5]!==n||e[6]!==i?(a=()=>i(n),e[5]=n,e[6]=i,e[7]=a):a=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Ce,{size:13}),e[8]=d):d=e[8];let l;e[9]!==a?(l=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(V,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:a,title:"Configure",children:d})}),e[9]=a,e[10]=l):l=e[10];let u;return e[11]!==r||e[12]!==o||e[13]!==l?(u=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[r,o,l]}),e[11]=r,e[12]=o,e[13]=l,e[14]=u):u=e[14],u}function Gt(s){const e=P.c(27),{instances:n,onConfigure:i,onAuthenticate:r,onDelete:o,onToggleStatus:a,onAdd:d,isAdding:l}=s;if(n.length===0)return null;const u=n.length===1?"Instance":"Instances";let x;e[0]!==u?(x=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[0]=u,e[1]=x):x=e[1];let p;e[2]!==l?(p=l?t.jsx(ge,{size:13,className:"animate-spin"}):t.jsx(lt,{size:13}),e[2]=l,e[3]=p):p=e[3];let c;e[4]!==l||e[5]!==d||e[6]!==p?(c=t.jsxs(V,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:d,disabled:l,children:[p,"Add instance"]}),e[4]=l,e[5]=d,e[6]=p,e[7]=c):c=e[7];let h;e[8]!==x||e[9]!==c?(h=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[x,c]}),e[8]=x,e[9]=c,e[10]=h):h=e[10];let g;if(e[11]!==n||e[12]!==r||e[13]!==i||e[14]!==o||e[15]!==a){let j;e[17]!==r||e[18]!==i||e[19]!==o||e[20]!==a?(j=N=>t.jsx(G.Suspense,{fallback:t.jsx(qt,{instance:N,onConfigure:i}),children:t.jsx(Xt,{instance:N,onConfigure:i,onAuthenticate:r,onDelete:o,onToggleStatus:a})},N.id),e[17]=r,e[18]=i,e[19]=o,e[20]=a,e[21]=j):j=e[21],g=n.map(j),e[11]=n,e[12]=r,e[13]=i,e[14]=o,e[15]=a,e[16]=g}else g=e[16];let v;e[22]!==g?(v=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:g}),e[22]=g,e[23]=v):v=e[23];let b;return e[24]!==h||e[25]!==v?(b=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[h,v]}),e[24]=h,e[25]=v,e[26]=b):b=e[26],b}function Kt(s,e=3){const n=new Map;for(const i of s){if(!i.isError)continue;const r=(i.errorMessage??"").trim()||"Unknown error";n.set(r,(n.get(r)??0)+1)}return[...n.entries()].map(([i,r])=>({message:i,count:r})).sort((i,r)=>r.count-i.count).slice(0,e)}const Qt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function Jt(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const Yt={calls:{label:"Tool calls"},errors:{label:"Errors"}};function Zt(s){const e=P.c(1),{connectionId:n,orgId:i,timeframe:r}=s,o=kt(),a=Jt(r),{data:d}=De({queryKey:ne.connectionActivity(n,r,i),queryFn:async()=>await o.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),l=_t(d?.logs??[],a),u=l.data,x=l.totalCalls>0,p=Kt(d?.logs??[]),c=l.totalCalls>0?Math.round(l.totalErrors/l.totalCalls*100):0;let h;return e[0]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Tool calls"}),e[0]=h):h=e[0],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:l.totalCalls.toLocaleString()}),h]}),l.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:l.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Errors"})]}),l.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(l.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Avg latency"})]})]}),x?t.jsxs("div",{children:[t.jsx(st,{config:Yt,className:"h-16 w-full",children:t.jsxs(Ct,{data:u,barCategoryGap:"4%",children:[t.jsx(nt,{content:t.jsx(ot,{labelFormatter:ss}),cursor:{fill:"var(--muted)"}}),t.jsx(St,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:u.map(ts)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:u[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:u[u.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No activity in this period"})}),p.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:["Top errors",c>0?` · ${c}% of calls failed`:""]}),t.jsx("ul",{className:"space-y-1.5",children:p.map(es)})]})]})}function es(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function ts(s,e){return t.jsx(wt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function ss(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function ns(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function os(s){const e=P.c(13),{connectionId:n}=s,[i,r]=G.useState("14d"),{org:o}=J();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Activity"})}),e[0]=a):a=e[0];let d;e[1]!==i?(d=Qt.map(c=>t.jsx("button",{type:"button",onClick:()=>r(c.value),className:je("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",i===c.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:c.label},c.value)),e[1]=i,e[2]=d):d=e[2];let l;e[3]!==d?(l=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[a,t.jsx("div",{className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:d})]}),e[3]=d,e[4]=l):l=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(ns,{}),e[5]=u):u=e[5];let x;e[6]!==n||e[7]!==o.id||e[8]!==i?(x=t.jsx(G.Suspense,{fallback:u,children:t.jsx(Zt,{connectionId:n,orgId:o.id,timeframe:i})}),e[6]=n,e[7]=o.id,e[8]=i,e[9]=x):x=e[9];let p;return e[10]!==l||e[11]!==x?(p=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[l,x]}),e[10]=l,e[11]=x,e[12]=p):p=e[12],p}function is(s){const e=P.c(15),{virtualMcp:n,org:i}=s,r=Y();let o;e[0]!==r||e[1]!==i||e[2]!==n.id?(o=()=>{const p=crypto.randomUUID();r({to:"/$org/$taskId",params:{org:i,taskId:p},search:{virtualmcpid:n.id}})},e[0]=r,e[1]=i,e[2]=n.id,e[3]=o):o=e[3];let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(we,{size:16}),e[4]=a):a=e[4];let d;e[5]!==n.icon||e[6]!==n.title?(d=t.jsx(oe,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:a}),e[5]=n.icon,e[6]=n.title,e[7]=d):d=e[7];let l;e[8]!==n.title?(l=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=l):l=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Se,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=u):u=e[10];let x;return e[11]!==o||e[12]!==d||e[13]!==l?(x=t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[d,l,u]}),e[11]=o,e[12]=d,e[13]=l,e[14]=x):x=e[14],x}function rs(s){const e=P.c(7),{virtualMcps:n,org:i}=s;let r;if(e[0]!==i||e[1]!==n){let a;e[3]!==i?(a=d=>t.jsx(is,{virtualMcp:d,org:i},d.id),e[3]=i,e[4]=a):a=e[4],r=n.map(a),e[0]=i,e[1]=n,e[2]=r}else r=e[2];let o;return e[5]!==r?(o=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:r})}),e[5]=r,e[6]=o):o=e[6],o}function as(s){const e=P.c(7),{connection:n}=s,{org:i}=J();let r;e[0]!==n.id?(r={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=r):r=e[1];const o=Tt(r);if(!(o.length>0)){let u;return e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(t.Fragment,{}),e[2]=u):u=e[2],u}let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Used by agents"})}),e[3]=d):d=e[3];let l;return e[4]!==i.slug||e[5]!==o?(l=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[d,t.jsx("div",{className:"px-5 py-4",children:t.jsx(rs,{virtualMcps:o,org:i.slug})})]}),e[4]=i.slug,e[5]=o,e[6]=l):l=e[6],l}function ls(s){const e=P.c(31),{tools:n,connectionId:i,org:r}=s,o=Y(),{org:a}=J();let d;e[0]!==i||e[1]!==a.id||e[2]!==a.slug?(d={connectionId:i,orgId:a.id,orgSlug:a.slug},e[0]=i,e[1]=a.id,e[2]=a.slug,e[3]=d):d=e[3];const l=_e(d),u=Ne(i);let x;e[4]!==u||e[5]!==i?(x=u?ke(u):i,e[4]=u,e[5]=i,e[6]=x):x=e[6];const p=x,[c,h]=G.useState("");let g,v,b,j;if(e[7]!==p||e[8]!==l||e[9]!==o||e[10]!==r||e[11]!==c||e[12]!==n){const S=(n??[]).filter(cs),y=c.toLowerCase().trim(),I=y?S.filter(f=>f.name.toLowerCase().includes(y)||f.description&&f.description.toLowerCase().includes(y)):S;let _;e[17]!==p||e[18]!==o||e[19]!==r?(_=f=>{o({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:r,appSlug:p,collectionName:"tools",itemId:encodeURIComponent(f.name)}})},e[17]=p,e[18]=o,e[19]=r,e[20]=_):_=e[20];const k=_;b="flex flex-col h-full overflow-hidden";let C;e[21]===Symbol.for("react.memo_cache_sentinel")?(C=f=>{f.key==="Escape"&&(h(""),f.target.blur())},e[21]=C):C=e[21],e[22]!==c?(j=t.jsx(Ot,{value:c,onChange:h,placeholder:"Search apps...",onKeyDown:C}),e[22]=c,e[23]=j):j=e[23],g="flex-1 overflow-auto p-5",v=I.length===0?t.jsx(ve,{image:null,title:c?"No apps found":"No apps available",description:c?"Try adjusting your search terms":"This connection doesn't have any tools with interactive UIs yet."}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:I.map(f=>{const w=ae(f._meta);return t.jsxs(Mt,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>k(f),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Pt,{resourceURI:w,toolInfo:{tool:f},displayMode:"inline",minHeight:200,maxHeight:200,client:l})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:f.name}),t.jsx(Je,{annotations:f.annotations,_meta:f._meta})]}),f.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:f.description})]})]},f.name)})}),e[7]=p,e[8]=l,e[9]=o,e[10]=r,e[11]=c,e[12]=n,e[13]=g,e[14]=v,e[15]=b,e[16]=j}else g=e[13],v=e[14],b=e[15],j=e[16];let N;e[24]!==g||e[25]!==v?(N=t.jsx("div",{className:g,children:v}),e[24]=g,e[25]=v,e[26]=N):N=e[26];let T;return e[27]!==b||e[28]!==j||e[29]!==N?(T=t.jsxs("div",{className:b,children:[j,N]}),e[27]=b,e[28]=j,e[29]=N,e[30]=T):T=e[30],T}function cs(s){return!!ae(s._meta)}function Te(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=a=>a.charAt(0).toUpperCase()+a.slice(1),i=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),r=e.map(n),o=e[e.length-1];return r.length>=2&&o&&i.has(o)?[r.pop(),...r].join(" "):r.join(" ")}function ie(s){const e=P.c(2),{label:n}=s;let i;return e[0]!==n?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:["No ",n," available."]})}),e[0]=n,e[1]=i):i=e[1],i}function ds(s){const e=P.c(50),{tools:n,prompts:i,resources:r,connectionId:o,org:a}=s;let d;e[0]!==i?(d=i===void 0?[]:i,e[0]=i,e[1]=d):d=e[1];const l=d;let u;e[2]!==r?(u=r===void 0?[]:r,e[2]=r,e[3]=u):u=e[3];const x=u,p=Y(),c=Ne(o??"");let h;e[4]!==c||e[5]!==o?(h=c?ke(c):o,e[4]=c,e[5]=o,e[6]=h):h=e[6];const g=h;let v;e[7]!==g||e[8]!==o||e[9]!==p||e[10]!==a?(v=function($){!o||!a||p({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:a,appSlug:g,collectionName:"tools",itemId:encodeURIComponent($)}})},e[7]=g,e[8]=o,e[9]=p,e[10]=a,e[11]=v):v=e[11];const b=v;let j;e[12]!==o||e[13]!==a||e[14]!==n?(j=o&&a&&n.some(xs),e[12]=o,e[13]=a,e[14]=n,e[15]=j):j=e[15];const N=j;if(n.length+l.length+x.length===0){let m;return e[16]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:"Capabilities"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"No capabilities discovered yet. The connection may still be connecting."})]}),e[16]=m):m=e[16],m}let S;e[17]!==n.length?(S=t.jsxs(ee,{value:"tools",variant:"underline",children:["Tools (",n.length,")"]}),e[17]=n.length,e[18]=S):S=e[18];let y;e[19]!==N?(y=N&&t.jsx(ee,{value:"apps",variant:"underline",children:"UI"}),e[19]=N,e[20]=y):y=e[20];let I,_;e[21]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(ee,{value:"prompts",variant:"underline",children:"Prompts"}),_=t.jsx(ee,{value:"resources",variant:"underline",children:"Resources"}),e[21]=I,e[22]=_):(I=e[21],_=e[22]);let k;e[23]!==S||e[24]!==y?(k=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(It,{variant:"underline",className:"gap-1",children:[S,y,I,_]})}),e[23]=S,e[24]=y,e[25]=k):k=e[25];let C;e[26]!==b||e[27]!==n?(C=n.length>0?n.map(m=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>b(m.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Dt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Te(m.name)}),m.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:m.description})]}),t.jsx(Se,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},m.name)):t.jsx(ie,{label:"tools"}),e[26]=b,e[27]=n,e[28]=C):C=e[28];let f;e[29]!==C?(f=t.jsx(te,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:C})}),e[29]=C,e[30]=f):f=e[30];let w;e[31]!==o||e[32]!==N||e[33]!==a||e[34]!==n?(w=N&&t.jsx(te,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ls,{tools:n,connectionId:o,org:a})}),e[31]=o,e[32]=N,e[33]=a,e[34]=n,e[35]=w):w=e[35];let M;e[36]!==l?(M=l.length>0?l.map(us):t.jsx(ie,{label:"prompts"}),e[36]=l,e[37]=M):M=e[37];let O;e[38]!==M?(O=t.jsx(te,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:M})}),e[38]=M,e[39]=O):O=e[39];let A;e[40]!==x?(A=x.length>0?x.map(ms):t.jsx(ie,{label:"resources"}),e[40]=x,e[41]=A):A=e[41];let z;e[42]!==A?(z=t.jsx(te,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:A})}),e[42]=A,e[43]=z):z=e[43];let U;return e[44]!==k||e[45]!==f||e[46]!==w||e[47]!==O||e[48]!==z?(U=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(At,{defaultValue:"tools",variant:"underline",children:[k,f,w,O,z]})}),e[44]=k,e[45]=f,e[46]=w,e[47]=O,e[48]=z,e[49]=U):U=e[49],U}function ms(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(mt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function us(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx($t,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Te(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function xs(s){return ae(s._meta)}function ps(s){const e=P.c(13),{connection:n,displayTitle:i}=s,r=i??n.title;let o;e[0]!==n.icon||e[1]!==r?(o=t.jsx(oe,{icon:n.icon,name:r,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=r,e[2]=o):o=e[2];let a;e[3]!==r?(a=t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:r})}),e[3]=r,e[4]=a):a=e[4];let d;e[5]!==n.description?(d=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=d):d=e[6];let l;e[7]!==a||e[8]!==d?(l=t.jsxs("div",{className:"flex-1 min-w-0",children:[a,d]}),e[7]=a,e[8]=d,e[9]=l):l=e[9];let u;return e[10]!==o||e[11]!==l?(u=t.jsxs("div",{className:"flex items-center gap-4 md:gap-6 py-5 md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0",children:[o,l]}),e[10]=o,e[11]=l,e[12]=u):u=e[12],u}function fs({form:s,connection:e,hasOAuthToken:n,onReauthenticate:i,onRemoveOAuth:r}){const o=ce({control:s.control,name:"ui_type"}),a=ce({control:s.control,name:"connection_url"}),{stdioEnabled:d}=Pe(),l=(()=>{if(typeof a!="string"||!a)return!1;try{const c=new URL(a);return c.hostname==="api.githubcopilot.com"&&c.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),u=d||e.connection_type==="STDIO",x=e.connection_type==="VIRTUAL",p=x?Oe(e.connection_url):null;return x?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Type"}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(we,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:"Virtual MCP"})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"This connection references a Virtual MCP. Tools and resources are aggregated dynamically from the Virtual MCP's underlying connections."})]}),p&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Virtual MCP ID"}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:p})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(L,{control:s.control,name:"ui_type",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Connection"}),o!=="NPX"&&o!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(me,{value:c.value,onValueChange:c.onChange,children:[t.jsx(E,{children:t.jsxs(ue,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(se,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(xe,{})]})}),t.jsxs(pe,{children:[t.jsx(F,{value:"HTTP",children:"HTTP"}),t.jsx(F,{value:"SSE",children:"SSE"}),t.jsx(F,{value:"Websocket",children:"Websocket"}),u&&t.jsxs(t.Fragment,{children:[t.jsx(F,{value:"NPX",children:"NPX Package"}),t.jsx(F,{value:"STDIO",children:"Custom Command"})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(L,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(H,{className:"flex-1 min-w-0",children:t.jsx(E,{children:t.jsx(X,{placeholder:"https://example.com/mcp",...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(me,{value:c.value,onValueChange:c.onChange,children:[t.jsx(E,{children:t.jsx(ue,{className:"h-10",children:t.jsx(xe,{})})}),t.jsxs(pe,{children:[t.jsx(F,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(F,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(F,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(se,{className:"w-4 h-4"}),"Websocket"]})}),u&&t.jsxs(t.Fragment,{children:[t.jsx(F,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Lt,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(F,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ut,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(W,{})]})}),o==="NPX"&&t.jsx(L,{control:s.control,name:"npx_package",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"NPM Package"}),t.jsx(E,{children:t.jsx(X,{placeholder:"@perplexity-ai/mcp-server",...c,value:c.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),o==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(L,{control:s.control,name:"stdio_command",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Command"}),t.jsx(E,{children:t.jsx(X,{placeholder:"node, bun, python...",...c,value:c.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),t.jsx(L,{control:s.control,name:"stdio_args",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Arguments"}),t.jsx(E,{children:t.jsx(X,{placeholder:"arg1 arg2 --flag value",...c,value:c.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated arguments"}),t.jsx(W,{})]})})]}),t.jsx(L,{control:s.control,name:"stdio_cwd",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Working Directory"}),t.jsx(E,{children:t.jsx(X,{placeholder:"/path/to/project (optional)",...c,value:c.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})})]}),(o==="NPX"||o==="STDIO")&&t.jsx(L,{control:s.control,name:"env_vars",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:"Environment Variables"}),t.jsx(E,{children:t.jsx(He,{value:c.value??[],onChange:c.onChange})}),t.jsx(W,{})]})}),o!=="NPX"&&o!=="STDIO"&&t.jsx(L,{control:s.control,name:"connection_token",render:({field:c})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(B,{className:"text-xs text-muted-foreground font-medium",children:l?"GitHub Personal Access Token":"Token"}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Et,{children:[t.jsx(Vt,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(zt,{variant:"success",className:"gap-1.5",children:[t.jsx(Rt,{size:12}),"Authenticated via OAuth",t.jsx(Ft,{size:12})]})})}),t.jsxs(Ut,{align:"start",children:[t.jsxs(de,{onClick:i,children:[t.jsx(xt,{size:16}),"Re-authenticate"]}),t.jsxs(de,{variant:"destructive",onClick:r,children:[t.jsx(re,{size:16}),"Remove OAuth"]})]})]})}):e.connection_token&&c.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>c.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:"Clear and replace token",children:t.jsx(Ht,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(E,{children:t.jsx(X,{type:"password",placeholder:l?"Paste your GitHub PAT":"Enter access token...",...c,value:c.value||"",className:"h-10 rounded-lg"})}),l&&t.jsxs(vt,{children:["Create a PAT at"," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(W,{})]})})]})}function hs(s){return s.command==="npx"}function gs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function js(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function fe(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Fe(s.connection_headers)){const i=s.connection_headers,r=We(i.envVars);if(hs(i)){const a=gs(i);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:a,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:r}}const o=js(i);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:o.command,stdio_args:o.args,stdio_cwd:o.cwd,env_vars:r}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function vs(s){let e,n=null,i=null,r=null;return s.ui_type==="NPX"?(e="STDIO",n="",r=Xe(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",r=qe(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",i=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...i&&{connection_token:i},...r&&{connection_headers:r},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function bs({connection:s,connectionId:e,org:n,isUpdating:i,tools:r,prompts:o,resources:a,siblings:d}){const l=Y({from:"/$org/settings/connections/$appSlug"}),u=Ve(),x=ye(),{org:p}=J(),c=Nt({onSuccess:()=>{d.length<=1&&l({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=G.useState(null),[v,b]=G.useState(!1),j=be({connectionId:e}),{data:N}=Ye(),T=N?.data?.members??[],S=h??s,y=T.find(m=>m.userId===S.created_by),_=s?.connection_type==="VIRTUAL"||j.isAuthenticated,k={...s,tools:r},C=Ge(k,Wt),f=Ue({resolver:Re(Be),values:fe(h??s)}),w=f.formState.isDirty,M=async()=>{if(!await f.trigger())return;const $=f.getValues(),D=vs($),R=h?.id??e;await x.update.mutateAsync({id:R,data:D}),f.reset($)},O=()=>{f.reset(fe(h??s))},A=async m=>{const{token:$,tokenInfo:D,error:R}=await at({connectionId:m,orgSlug:p.slug,scope:"offline_access"});if(R||!$){q.error(`Authentication failed: ${R}`);return}if(D)try{const K=await fetch(`/api/${p.slug}/connections/${m}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:D.accessToken,refreshToken:D.refreshToken,expiresIn:D.expiresIn,scope:D.scope,clientId:D.clientId,clientSecret:D.clientSecret,tokenEndpoint:D.tokenEndpoint})});if(!K.ok)console.error("Failed to save OAuth token:",await K.text()),await x.update.mutateAsync({id:m,data:{connection_token:$}});else try{await x.update.mutateAsync({id:m,data:{}})}catch(Z){console.warn("Failed to refresh connection tools after OAuth:",Z)}}catch(K){console.error("Error saving OAuth token:",K),await x.update.mutateAsync({id:m,data:{connection_token:$}})}else await x.update.mutateAsync({id:m,data:{connection_token:$}});const Q=new URL(`/api/${p.slug}/mcp/${m}`,window.location.origin);await u.invalidateQueries({queryKey:ne.isMCPAuthenticated(Q.href,null)}),await u.invalidateQueries({queryKey:ne.mcpClientPrefix()}),q.success("Authentication successful")},z=()=>A(s.id),U=async()=>{try{const m=await fetch(`/api/${p.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!m.ok){const D=await m.text();q.error(`Failed to remove OAuth: ${D}`);return}const $=new URL(`/api/${p.slug}/mcp/${s.id}`,window.location.origin);await u.invalidateQueries({queryKey:ne.isMCPAuthenticated($.href,null)}),q.success("OAuth removed. You can now re-authenticate with a different account.")}catch(m){console.error("Error removing OAuth token:",m),q.error("Failed to remove OAuth")}};return t.jsxs(t.Fragment,{children:[t.jsx(yt,{...c}),t.jsx(pt,{open:h!==null,onOpenChange:m=>{m||g(null)},children:t.jsxs(ft,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(ht,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(gt,{className:"text-base",children:h?.title??s.title}),t.jsx(jt,{className:"text-xs",children:"Update URL, authentication, and other settings"}),y&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:"Connected by"}),t.jsx(Ze,{url:y.user?.image??void 0,fallback:y.user?.name??y.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:y.user?.name||y.user?.email})]})]}),t.jsxs(bt,{...f,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(L,{control:f.control,name:"title",render:({field:m})=>t.jsxs(H,{children:[t.jsx(B,{children:"Name"}),t.jsx(E,{children:t.jsx(X,{...m})}),t.jsx(W,{})]})}),t.jsx(L,{control:f.control,name:"description",render:({field:m})=>t.jsxs(H,{children:[t.jsx(B,{children:"Description"}),t.jsx(E,{children:t.jsx(X,{...m,value:m.value||""})}),t.jsx(W,{})]})})]}),t.jsx(fs,{form:f,connection:h??s,hasOAuthToken:j.hasOAuthToken,onReauthenticate:z,onRemoveOAuth:U}),t.jsx(Ke,{connection:h??s,form:f,hasMcpBinding:C,isMCPAuthenticated:_,supportsOAuth:j.supportsOAuth,isServerError:j.isServerError,onAuthenticate:z,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(V,{onClick:M,disabled:!w||i,className:"flex-1",children:i?"Saving…":"Save changes"}),w&&t.jsx(V,{variant:"outline",onClick:O,children:"Undo"}),t.jsxs(V,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const m=h??s;g(null),c.requestDelete(m)},children:[t.jsx(re,{size:15}),"Delete"]})]})]},h?.id??s.id)]})}),t.jsx(Qe,{hideHeader:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(ps,{connection:s,displayTitle:(()=>{const m=d[0]??s;return m.app_name?m.title.replace(/\s*\(\d+\)\s*$/,""):m.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(os,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Gt,{instances:d,onConfigure:m=>g(m),onAuthenticate:m=>A(m.id),onDelete:m=>c.requestDelete(m),onToggleStatus:async(m,$)=>{try{await x.update.mutateAsync({id:m.id,data:{status:$}}),q.success($==="active"?"Connection enabled":"Connection disabled")}catch{q.error("Failed to update connection")}},isAdding:v,onAdd:async()=>{b(!0);try{const m=d[0]??s,$=m.title.replace(/\s*\(\d+\)\s*$/,""),D=d.length+1,R=`${$} (${D})`,Q=Le("conn");await x.create.mutateAsync({id:Q,title:R,description:m.description??null,connection_type:m.connection_type,connection_url:m.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:m.created_by,organization_id:m.organization_id,icon:m.icon??null,app_name:m.app_name??null,app_id:m.app_id??null,connection_headers:m.connection_headers??null,oauth_config:null,configuration_state:m.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const K=new URL(`/api/${p.slug}/mcp/${Q}`,window.location.origin),Z=await rt({url:K.href,token:null,orgId:p.id});Z.supportsOAuth&&!Z.isAuthenticated&&await A(Q)}finally{b(!1)}}}),t.jsx(as,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(ds,{tools:r,prompts:o,resources:a,connectionId:e,org:n})})]})})]})})]})}function Ns(){const s=P.c(39);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/settings/connections/$appSlug"},s[0]=e):e=s[0];const n=Y(e);let i;s[1]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org/settings/connections/$appSlug"},s[1]=i):i=s[1];const{appSlug:r,org:o}=ze(i),{org:a}=J(),d=ye();let l;s[2]!==r?(l={slug:r},s[2]=r,s[3]=l):l=s[3];const u=et(l),x=u[0]??null,p=x?.id??"",c=p||null;let h;s[4]!==a.id||s[5]!==a.slug||s[6]!==c?(h={connectionId:c,orgId:a.id,orgSlug:a.slug},s[4]=a.id,s[5]=a.slug,s[6]=c,s[7]=h):h=s[7];const g=_e(h);let v;s[8]!==g?(v={client:g},s[8]=g,s[9]=v):v=s[9];const{data:b}=tt(v);let j;if(s[10]!==x?.tools||s[11]!==p||s[12]!==u||s[13]!==b){const A=b?b.tools.map(ks):(x?.tools??[]).map(ws);e:{if(u.length<=1){j=A;break e}const z=new Set,U=[],m=Cs;for(const $ of u){const D=$.id===p?A:m($.tools);for(const R of D)z.has(R.name)||(z.add(R.name),U.push(R))}j=U.length>0?U:A}s[10]=x?.tools,s[11]=p,s[12]=u,s[13]=b,s[14]=j}else j=s[14];const N=j;let T;s[15]!==g?(T={client:g},s[15]=g,s[16]=T):T=s[16];const{data:S}=it(T);let y;s[17]!==g?(y={client:g},s[17]=g,s[18]=y):y=s[18];const{data:I}=Ee(y);let _;s[19]!==S?.prompts?(_=S?.prompts??[],s[19]=S?.prompts,s[20]=_):_=s[20];let k;s[21]!==_?(k=_.map(_s),s[21]=_,s[22]=k):k=s[22];const C=k;let f;s[23]!==I?.resources?(f=I?.resources??[],s[23]=I?.resources,s[24]=f):f=s[24];let w;s[25]!==f?(w=f.map(ys),s[25]=f,s[26]=w):w=s[26];const M=w;if(!x){let A;return s[27]!==n||s[28]!==o?(A=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ve,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:t.jsx(V,{variant:"outline",onClick:()=>n({to:"/$org/settings/connections",params:{org:o}}),children:"Back to connections"})})}),s[27]=n,s[28]=o,s[29]=A):A=s[29],A}let O;return s[30]!==d.update.isPending||s[31]!==N||s[32]!==x||s[33]!==p||s[34]!==o||s[35]!==C||s[36]!==M||s[37]!==u?(O=t.jsx(bs,{org:o,connection:x,connectionId:p,isUpdating:d.update.isPending,tools:N,prompts:C,resources:M,siblings:u}),s[30]=d.update.isPending,s[31]=N,s[32]=x,s[33]=p,s[34]=o,s[35]=C,s[36]=M,s[37]=u,s[38]=O):O=s[38],O}function ys(s){return{name:s.name,description:s.description,uri:s.uri}}function _s(s){return{name:s.name,description:s.description}}function Cs(s){return(s??[]).map(Ss)}function Ss(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function ws(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function ks(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ts(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Me,{children:t.jsx(G.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(ge,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Ns,{})})}),s[0]=e):e=s[0],e}function Co(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ts,{}),s[0]=e):e=s[0],e}export{Co as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as Z,r as u,j as r,i as se,B as he,d$ as Mt,aO as Dt,aU as ie,e0 as Rt,e1 as Pt,e2 as Et,e3 as kt,bO as Ot,e4 as Tt,e5 as qe,aQ as At,e6 as Lt,e7 as Ft,e8 as It,e9 as $t,ea as _t,eb as zt,ec as Wt,ed as Gt,ee as Kt,l as ae,n as Bt,t as W,K as $e}from"./index-CATpc9_Q.js";import{F as Ut,l as Vt}from"./index-BO77c2t-.js";import{d as qt,ay as Qt,az as Ht,aA as ue,aB as Xt,a7 as _e}from"./agent-icon-Mpp91bfB.js";import{a as Jt}from"./Tool01-CcKyBYSb.js";import{s as Yt}from"./XClose-DZbEhf0R.js";import{A as Zt}from"./automation-runs-buslfflw.js";import{b as ze,T as We,a as Ge}from"./tooltip-D3bYYanT.js";import{f as en,a as tn,b as nn,c as rn,d as on,e as sn,A as an,g as ln}from"./alert-dialog-CL004fe5.js";import{b as cn}from"./chat-context-CkMKBD24.js";import{u as dn}from"./shell-layout-BTgKP_tN.js";import{s as fe,a as Ke,f as un}from"./index-BMNH48Wq.js";import{a as fn,h as mn,D as pn,c as xn,d as hn,e as gn}from"./dialog-CuHfS0sp.js";import{I as Be}from"./input-BAWS9YOn.js";import{t as vn}from"./ChevronDown-Dg5I-IyP.js";import{i as yn}from"./ChevronRight-D_lkQ96x.js";import{a as wn}from"./ZoomOut-DyGQpwZF.js";import{E as Cn,v as Ue,w as we,x as bn,y as jn,z as Nn,A as U,C as me,g as Ce,D as be,G as Sn,I as Mn,J as je,K as pe,M as Ne,N as Dn,O as Rn}from"./index-Sns9ntjm.js";import"./AlertCircle-CYnFm87k.js";import"./UserPlus01-yjW9fL-G.js";import"./ArrowUp-Ce-_ZrGn.js";import"./Settings02-kiZvy_fn.js";import"./Tool02-BTUXK138.js";import"./XCircle-BfHMsLh5.js";import"./ArrowUpRight-DYOvLwi-.js";import"./TrendUp01-vYlS04gI.js";import"./ZapSquare-BPLamaJH.js";import"./Users03-DF3f2ZwS.js";import"./CheckCircle-Cw29V8Yd.js";import"./Check-evpt16EA.js";import"./ChevronUp-XSOoP_Nn.js";import"./Circle-BCcBwY3X.js";import"./Stars02-Du4pvaB9.js";import"./Copy01-ukzF2g5D.js";import"./DotsVertical-BKwCKB4H.js";import"./Globe01-B-9XjG_y.js";import"./Eye-Rw2Lcj0d.js";import"./FilterLines-Bk3fgVzt.js";import"./Flag01-C_wN137m.js";import"./Star01-B3Xobx84.js";import"./Globe04-DNSs6EXk.js";import"./SwitchHorizontal01-Be6iAHDL.js";import"./HardDrive-CljS-OyE.js";import"./Key01-CaIwkkK6.js";import"./LayoutLeft-DsDSp7CT.js";import"./LinkExternal01-C7SNA6xk.js";import"./List-B0zktlno.js";import"./Monitor01-kUiMqEFF.js";import"./Sun-Cq8zftWr.js";import"./Package-RGVJ3BIv.js";import"./Palette-D51YSINn.js";import"./Play-gkeg9Jqk.js";import"./Plus-CT6paZ6Y.js";import"./SearchLg-Ci14_nqQ.js";import"./SearchMd-DDsmGmx-.js";import"./Shield01-mMv7jSi2.js";import"./Stars01-D-xbM28c.js";import"./Trash01-C7SUcgzf.js";import"./Upload01-CFKVhcA1.js";import"./User01-C9pHWMIN.js";import"./Users01-4r88txyu.js";import"./X-VIJVSyzC.js";import"./Zap-DEx1nSIp.js";import"./select-BNzv8bE0.js";import"./useInfiniteQuery-EUhFQPYl.js";import"./use-infinite-scroll-B-pqmsuO.js";import"./use-connection-BL5Htq-Q.js";import"./use-collections-BmbOO-kw.js";import"./use-mcp-client-BxFsDRf1.js";import"./constants-D_FQAPnt.js";import"./auth-CeuFwPxM.js";import"./use-virtual-mcp-D49c-xG2.js";import"./card-Bi9zPbIV.js";import"./sidebar-8cYmIqg3.js";import"./use-mobile-J9H9Qt6I.js";import"./table-D1nQ-wNh.js";import"./empty-state-YbRoaSPS.js";import"./use-members-DhXdX-_i.js";import"./use-org-auth-client-BNQda2IH.js";import"./use-clock-tick-Bh3IqoT0.js";import"./use-automations-CNEZby3c.js";import"./studio-tools-b3gOe5xj.js";import"./useSuspenseInfiniteQuery-BkDxPy4m.js";import"./badge-Ds5R9rAV.js";import"./checkbox-BO2L3mp3.js";import"./command-CZFy5Z8z.js";import"./index-DtyjY45a.js";import"./popover-D2alhhTy.js";import"./avatar-DudI_cM5.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DqgQyLJe.js";import"./file-type-icon-CwUnpF6W.js";import"./tab-id-BijBBRwE.js";import"./monaco-editor-B8BOxibN.js";import"./delay-CnY5UFtP.js";import"./index-DwOhgdSM.js";import"./hooks-Cs3wbrk0.js";import"./decopilot-sse-pool-Ch3YQMqQ.js";import"./backoff-CrEUbyZT.js";import"./integration-icon-BRTxQ4I-.js";import"./use-navigate-to-agent-Bx9iFVCX.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BhV9uTIC.js";import"./form-DoFnwcqf.js";import"./label-VUalQ4yB.js";import"./autosend-DoEB2J9-.js";import"./use-ai-providers-PAIwflDX.js";import"./use-decopilot-events-DOq7WDLE.js";import"./use-organization-settings-Cy2mrzMh.js";import"./required-auth-layout-BubrwQcD.js";import"./use-org-sso-BSgN5318.js";import"./drawer-XTEWDOLT.js";import"./collection-search-NkGhGdHi.js";import"./tabs-BqvTvRv7.js";import"./toggle-group-DaqLlWvW.js";import"./use-deco-credits-Bg6aPI45.js";import"./extract-connection-data-CJ9qZ9tu.js";import"./connection-card-D1p5KuRZ.js";import"./use-registry-connections-CuVe3lZK.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-PZIPdxV3.js";import"./connection-form-helpers-D-SC2rCK.js";import"./authenticate-and-persist-oauth-CTnNYy7E.js";import"./mcp-oauth-D6TokJMF.js";import"./collection-tabs-BwuBKGur.js";import"./connect-desktop-dialog-BCaiIETn.js";import"./select-model-DVSYMGzL.js";import"./skeleton-CYoyZmyw.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CWE8axRi.js";import"./dropdown-menu-Br5TT9qG.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DpCxUSxZ.js";import"./toolbar-SkI9UHfs.js";import"./use-mcp-tools-11QvC1x0.js";import"./use-capability-Cycc9ysK.js";import"./tools-list-CAMhopuE.js";import"./switch-BUEc-Zj-.js";import"./use-debounced-autosave-9nyp1djE.js";import"./index-qXXcgDB3.js";import"./search-input-CvRN0hSz.js";import"./github-repo-picker-DvJ8C_-g.js";import"./use-debounced-value-CgDMpgJ3.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-B1NLB7qI.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-Ds_Fs5gE.js";import"./index-Ci_dhHUP.js";import"./get-initials-D-f_fDFw.js";import"./calendar-i4xGe38i.js";import"./toolbar-icon-button-CMK9jCFP.js";import"./use-file-configs-Cu57xyoQ.js";import"./automation-list-row-DPU1cfeC.js";const Pn={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function En(s){const e=Z.c(51),{open:i,mode:a,initialName:c,parentLabel:m,isPending:x,onSubmit:p,onOpenChange:g}=s,M=c===void 0?"":c,d=x===void 0?!1:x,[h,y]=u.useState(M),[B,V]=u.useState(i),w=Pn[a];i!==B&&(V(i),i&&y(M));let I;e[0]!==d||e[1]!==g?(I=_=>{!_&&!d&&g(!1)},e[0]=d,e[1]=g,e[2]=I):I=e[2];const H=I;let q;e[3]!==d||e[4]!==h||e[5]!==p?(q=async _=>{_.preventDefault();const K=h.trim();!K||d||await p(K)},e[3]=d,e[4]=h,e[5]=p,e[6]=q):q=e[6];const Q=q;let $;e[7]!==w.title?($=r.jsx(fn,{children:w.title}),e[7]=w.title,e[8]=$):$=e[8];let O;e[9]!==w.description?(O=r.jsx(mn,{children:w.description}),e[9]=w.description,e[10]=O):O=e[10];let G;e[11]!==$||e[12]!==O?(G=r.jsxs(pn,{children:[$,O]}),e[11]=$,e[12]=O,e[13]=G):G=e[13];let T;e[14]!==m?(T=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),r.jsx(Be,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=m,e[15]=T):T=e[15];let A;e[16]===Symbol.for("react.memo_cache_sentinel")?(A=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=A):A=e[16];let R;e[17]===Symbol.for("react.memo_cache_sentinel")?(R=_=>y(_.target.value),e[17]=R):R=e[17];let P;e[18]!==w.placeholder||e[19]!==d||e[20]!==h?(P=r.jsxs("div",{className:"space-y-1.5",children:[A,r.jsx(Be,{id:"file-explorer-name",value:h,onChange:R,placeholder:w.placeholder,autoFocus:!0,disabled:d})]}),e[18]=w.placeholder,e[19]=d,e[20]=h,e[21]=P):P=e[21];let j;e[22]!==P||e[23]!==T?(j=r.jsxs("div",{className:"space-y-4 py-4",children:[T,P]}),e[22]=P,e[23]=T,e[24]=j):j=e[24];let N;e[25]!==g?(N=()=>g(!1),e[25]=g,e[26]=N):N=e[26];let E;e[27]!==d||e[28]!==N?(E=r.jsx(he,{type:"button",variant:"outline",onClick:N,disabled:d,children:"Cancel"}),e[27]=d,e[28]=N,e[29]=E):E=e[29];let k;e[30]!==d||e[31]!==h?(k=!h.trim()||d,e[30]=d,e[31]=h,e[32]=k):k=e[32];let C;e[33]!==w.submit||e[34]!==d?(C=d?r.jsxs(r.Fragment,{children:[r.jsx(se,{size:14,className:"animate-spin"}),"Saving…"]}):w.submit,e[33]=w.submit,e[34]=d,e[35]=C):C=e[35];let L;e[36]!==k||e[37]!==C?(L=r.jsx(he,{type:"submit",disabled:k,children:C}),e[36]=k,e[37]=C,e[38]=L):L=e[38];let b;e[39]!==E||e[40]!==L?(b=r.jsxs(xn,{children:[E,L]}),e[39]=E,e[40]=L,e[41]=b):b=e[41];let S;e[42]!==Q||e[43]!==j||e[44]!==b||e[45]!==G?(S=r.jsx(hn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:Q,children:[G,j,b]})}),e[42]=Q,e[43]=j,e[44]=b,e[45]=G,e[46]=S):S=e[46];let z;return e[47]!==H||e[48]!==i||e[49]!==S?(z=r.jsx(gn,{open:i,onOpenChange:H,children:S}),e[47]=H,e[48]=i,e[49]=S,e[50]=z):z=e[50],z}var Me="ContextMenu",[kn]=At(Me,[qe]),F=qe(),[On,Qe]=kn(Me),He=s=>{const{__scopeContextMenu:e,children:i,onOpenChange:a,dir:c,modal:m=!0}=s,[x,p]=u.useState(!1),g=F(e),M=Ot(a),d=u.useCallback(h=>{p(h),M(h)},[M]);return r.jsx(On,{scope:e,open:x,onOpenChange:d,modal:m,children:r.jsx(Tt,{...g,dir:c,open:x,onOpenChange:d,modal:m,children:i})})};He.displayName=Me;var Xe="ContextMenuTrigger",Je=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,disabled:a=!1,...c}=s,m=Qe(Xe,i),x=F(i),p=u.useRef({x:0,y:0}),g=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...p.current})}),M=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(M.current),[]),h=y=>{p.current={x:y.clientX,y:y.clientY},m.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(Mt,{...x,virtualRef:g}),r.jsx(Dt.span,{"data-state":m.open?"open":"closed","data-disabled":a?"":void 0,...c,ref:e,style:{WebkitTouchCallout:"none",...s.style},onContextMenu:a?s.onContextMenu:ie(s.onContextMenu,y=>{d(),h(y),y.preventDefault()}),onPointerDown:a?s.onPointerDown:ie(s.onPointerDown,xe(y=>{d(),M.current=window.setTimeout(()=>h(y),700)})),onPointerMove:a?s.onPointerMove:ie(s.onPointerMove,xe(d)),onPointerCancel:a?s.onPointerCancel:ie(s.onPointerCancel,xe(d)),onPointerUp:a?s.onPointerUp:ie(s.onPointerUp,xe(d))})]})});Je.displayName=Xe;var Tn="ContextMenuPortal",Ye=s=>{const{__scopeContextMenu:e,...i}=s,a=F(e);return r.jsx(Et,{...a,...i})};Ye.displayName=Tn;var Ze="ContextMenuContent",et=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=Qe(Ze,i),m=F(i),x=u.useRef(!1);return r.jsx(kt,{...m,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:p=>{s.onCloseAutoFocus?.(p),!p.defaultPrevented&&x.current&&p.preventDefault(),x.current=!1},onInteractOutside:p=>{s.onInteractOutside?.(p),!p.defaultPrevented&&!c.modal&&(x.current=!0)},style:{...s.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)"}})});et.displayName=Ze;var An="ContextMenuGroup",Ln=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Lt,{...c,...a,ref:e})});Ln.displayName=An;var Fn="ContextMenuLabel",In=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Ft,{...c,...a,ref:e})});In.displayName=Fn;var $n="ContextMenuItem",tt=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Rt,{...c,...a,ref:e})});tt.displayName=$n;var _n="ContextMenuCheckboxItem",zn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(It,{...c,...a,ref:e})});zn.displayName=_n;var Wn="ContextMenuRadioGroup",Gn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx($t,{...c,...a,ref:e})});Gn.displayName=Wn;var Kn="ContextMenuRadioItem",Bn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(_t,{...c,...a,ref:e})});Bn.displayName=Kn;var Un="ContextMenuItemIndicator",Vn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(zt,{...c,...a,ref:e})});Vn.displayName=Un;var qn="ContextMenuSeparator",nt=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Pt,{...c,...a,ref:e})});nt.displayName=qn;var Qn="ContextMenuArrow",Hn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Wt,{...c,...a,ref:e})});Hn.displayName=Qn;var Xn="ContextMenuSubTrigger",Jn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Gt,{...c,...a,ref:e})});Jn.displayName=Xn;var Yn="ContextMenuSubContent",Zn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Kt,{...c,...a,ref:e,style:{...s.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)"}})});Zn.displayName=Yn;function xe(s){return e=>e.pointerType!=="mouse"?s(e):void 0}var er=He,tr=Je,nr=Ye,rr=et,or=tt,ir=nt;function sr(s){const e=Z.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(er,{"data-slot":"context-menu",...i}),e[2]=i,e[3]=a):a=e[3],a}function ar(s){const e=Z.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(tr,{"data-slot":"context-menu-trigger",...i}),e[2]=i,e[3]=a):a=e[3],a}function lr(s){const e=Z.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ae("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",i),e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(nr,{children:r.jsx(rr,{"data-slot":"context-menu-content",className:c,...a})}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}function te(s){const e=Z.c(12);let i,a,c,m;e[0]!==s?({className:i,inset:a,variant:m,...c}=s,e[0]=s,e[1]=i,e[2]=a,e[3]=c,e[4]=m):(i=e[1],a=e[2],c=e[3],m=e[4]);const x=m===void 0?"default":m;let p;e[5]!==i?(p=ae("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",i),e[5]=i,e[6]=p):p=e[6];let g;return e[7]!==a||e[8]!==c||e[9]!==p||e[10]!==x?(g=r.jsx(or,{"data-slot":"context-menu-item","data-inset":a,"data-variant":x,className:p,...c}),e[7]=a,e[8]=c,e[9]=p,e[10]=x,e[11]=g):g=e[11],g}function Ve(s){const e=Z.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ae("bg-border -mx-1 my-1 h-px",i),e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(ir,{"data-slot":"context-menu-separator",className:c,...a}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}const cr="#d9a441";function dr(s){const e=Z.c(45),{node:i,depth:a,isExpanded:c,isSelected:m,isLoading:x,fileVisual:p,onOpen:g,onSelect:M,onNewFile:d,onNewFolder:h,onCopyPath:y,onCopyRelativePath:B,onRename:V,onDelete:w}=s,I=x===void 0?!1:x,H=i.kind==="directory",{Icon:q,color:Q}=p,$=m&&"bg-accent";let O;e[0]!==$?(O=ae("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",$),e[0]=$,e[1]=O):O=e[1];const G=`${a*14+8}px`;let T;e[2]!==G?(T={paddingLeft:G},e[2]=G,e[3]=T):T=e[3];let A;e[4]!==g||e[5]!==M?(A=()=>{M(),g()},e[4]=g,e[5]=M,e[6]=A):A=e[6];let R;e[7]!==q||e[8]!==Q||e[9]!==H||e[10]!==c||e[11]!==I?(R=H?r.jsxs(r.Fragment,{children:[I?r.jsx(se,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):c?r.jsx(vn,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(yn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(wn,{size:16,className:"shrink-0",style:{color:cr}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(q,{size:16,className:"shrink-0",style:{color:Q}})]}),e[7]=q,e[8]=Q,e[9]=H,e[10]=c,e[11]=I,e[12]=R):R=e[12];let P;e[13]!==i.name?(P=r.jsx("span",{className:"truncate",children:i.name}),e[13]=i.name,e[14]=P):P=e[14];let j;e[15]!==O||e[16]!==T||e[17]!==A||e[18]!==R||e[19]!==P?(j=r.jsx(ar,{asChild:!0,children:r.jsxs("button",{type:"button",className:O,style:T,onClick:A,children:[R,P]})}),e[15]=O,e[16]=T,e[17]=A,e[18]=R,e[19]=P,e[20]=j):j=e[20];let N;e[21]!==d?(N=r.jsx(te,{onSelect:d,children:"New File"}),e[21]=d,e[22]=N):N=e[22];let E;e[23]!==h?(E=r.jsx(te,{onSelect:h,children:"New Folder"}),e[23]=h,e[24]=E):E=e[24];let k;e[25]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Ve,{}),e[25]=k):k=e[25];let C;e[26]!==y?(C=r.jsx(te,{onSelect:y,children:"Copy Path"}),e[26]=y,e[27]=C):C=e[27];let L;e[28]!==B?(L=r.jsx(te,{onSelect:B,children:"Copy Relative Path"}),e[28]=B,e[29]=L):L=e[29];let b;e[30]===Symbol.for("react.memo_cache_sentinel")?(b=r.jsx(Ve,{}),e[30]=b):b=e[30];let S;e[31]!==V?(S=r.jsx(te,{onSelect:V,children:"Rename"}),e[31]=V,e[32]=S):S=e[32];let z;e[33]!==w?(z=r.jsx(te,{variant:"destructive",onSelect:w,children:"Delete"}),e[33]=w,e[34]=z):z=e[34];let _;e[35]!==N||e[36]!==E||e[37]!==C||e[38]!==L||e[39]!==S||e[40]!==z?(_=r.jsxs(lr,{className:"w-52",children:[N,E,k,C,L,b,S,z]}),e[35]=N,e[36]=E,e[37]=C,e[38]=L,e[39]=S,e[40]=z,e[41]=_):_=e[41];let K;return e[42]!==_||e[43]!==j?(K=r.jsxs(sr,{children:[j,_]}),e[42]=_,e[43]=j,e[44]=K):K=e[44],K}Vt.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function Se(s,e,i,a){return`/api/${s}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(i)}/${a}`}function ur(s){const e=U(s);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}const fr="#94a3b8";function mr(s){const e=s.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?{Icon:ue,color:"#3b82f6"}:e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?{Icon:ue,color:"#d9a441"}:e.endsWith(".json")?{Icon:Xt,color:"#cb9b3f"}:e.endsWith(".css")||e.endsWith(".scss")?{Icon:ue,color:"#06b6d4"}:e.endsWith(".html")||e.endsWith(".xml")?{Icon:ue,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(e)?{Icon:Jt,color:"#a855f7"}:e.endsWith(".md")||e.endsWith(".mdx")?{Icon:_e,color:"#64748b"}:{Icon:_e,color:fr}}function as({orgSlug:s,virtualMcpId:e,branch:i,openPath:a}){const[c,m]=u.useState({files:[],directories:[],truncated:!1}),{files:x,directories:p}=c,[g,M]=u.useState(new Set),[d,h]=u.useState(null),[y,B]=u.useState(null),[V,w]=u.useState([]),[I,H]=u.useState(""),[q,Q]=u.useState(!1),[$,O]=u.useState(!1),[,G]=u.useState(new Set),[T,A]=u.useState(new Set),R=u.useRef(0),P=u.useRef(null),j=u.useRef(new Set),N=u.useRef(new Map);function E(t){G(n=>{const o=typeof t=="function"?t(n):t;return j.current=o,o})}const[k,C]=u.useState(new Map),L=u.useRef(null),[b,S]=u.useState(null),{sendMessage:z}=cn(),{openSidePanel:_}=dn(),K=Bt(),[D,X]=u.useState(null),[J,ge]=u.useState(null),[ne,le]=u.useState(!1);async function re(t,n){const o=await fetch(Se(s,e,i,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const l=await o.json().catch(()=>({}));throw new Error(l.error??`Request failed (${o.status})`)}return o.json()}async function ce(){K.invalidateQueries({queryKey:Ke(s,e,i)})}function De(t,n){navigator.clipboard.writeText(n).then(()=>W.success(`${t} copied`),()=>W.error(`Failed to copy ${t.toLowerCase()}`))}function rt(t){const n=Dn(t);if(!n)return;const o=`${s}/${e}/${i}`;K.setQueryData($e.decofile(o),l=>{if(!l)return l;const{[n]:f,...v}=l;return v}),K.invalidateQueries({queryKey:$e.liveMeta(o)})}function ot(t){const n=t.kind==="file"?[t.path]:x.filter(o=>o.startsWith(".deco/blocks/")).map(o=>me(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)rt(o)}function it(t){const n=me(t);return V.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const l=k.get(o);return!!(l?.loaded&&l.editorValue!==l.savedContent)})}function Re(t){w(n=>n.map(o=>t(o)).filter(o=>o!==null)),h(n=>n&&t(n)),C(n=>{const o=new Map;for(const[l,f]of n){const v=t(l);v&&o.set(v,f)}return o}),B(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 st(t){const n=me(t);B(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Re(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function at(t){if(!D)return;const n=pe(D.parentDir,t);if(Ne(n,x,p))throw new Error(`"${t}" already exists`);await re("write",{path:U(n),content:""}),await oe(),await ce(),X(null),ve(n)}async function lt(t){if(!D)return;const n=pe(D.parentDir,t);if(Ne(n,x,p))throw new Error(`"${t}" already exists`);const o=U(n);await re("mkdir",{path:o}),m(l=>({...l,directories:l.directories.includes(o)?l.directories:[...l.directories,o]})),await oe(),await ce(),X(null),M(l=>{const f=new Set(l);for(const v of we(n))f.add(v);return f.add(n),f}),B({name:t,path:n,kind:"directory",children:[]})}async function ct(t){if(!D)return;const n=D.node.path,o=je(n),l=pe(o,t);if(l===n){X(null);return}if(Ne(l,x,p))throw new Error(`"${t}" already exists`);await re("rename",{from:U(n),to:U(l)}),Re(f=>f===n?l:f.startsWith(`${n}/`)?pe(l,f.slice(n.length+1)):f),await oe(),await ce(),X(null)}async function dt(t){le(!0);try{await re("unlink",{path:U(t.path),recursive:t.kind==="directory"}),ot(t),st(t.path),await oe(),await ce(),ge(null),W.success(`Deleted "${t.name}"`)}catch(n){W.error(n instanceof Error?n.message:"Delete failed")}finally{le(!1)}}async function ut(t){const n=Mn(t);if(n){W.error(n);return}le(!0);try{D?.mode==="new-file"?(await at(t),W.success(`Created "${t}"`)):D?.mode==="new-folder"?(await lt(t),W.success(`Created folder "${t}"`)):D?.mode==="rename"&&(await ct(t),W.success(`Renamed to "${t}"`))}catch(o){W.error(o instanceof Error?o.message:"Operation failed")}finally{le(!1)}}const Pe=u.useRef(!1);Pe.current||(Pe.current=!0,P.current=oe());const[ft,mt]=u.useState(null);if(a&&a!==ft){mt(a);const t=a;queueMicrotask(()=>{ur(t)&&ve(t).catch(n=>{W.error(n instanceof Error?n.message:"Failed to open file")})})}async function Ee(t){const n=await re("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function ke(t,n,o){if(o!==R.current)return!1;let l=!1;return m(f=>{const v=n?Rn(f.files,f.directories,t,f.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return l=!!v.truncated,{files:v.files,directories:v.directories,truncated:l}}),l&&W.warning("File list truncated — some files may be hidden"),l}async function pt(t){const n=N.current.get(t);if(n)return n;const o=R.current,l=(async()=>{const f=await Ee({pattern:"**/*",path:U(t),limit:Ue}),v=ke(f,!0,o);return!v&&o===R.current&&E(Y=>{const de=new Set(Y);return de.add(t),de}),v})();N.current.set(t,l);try{return await l}finally{N.current.delete(t)}}async function Oe(t){if(!be(t,j.current))return!1;A(n=>new Set(n).add(t));try{return await pt(t)}finally{A(n=>{const o=new Set(n);return o.delete(t),o})}}async function xt(t){const n=new Set(j.current);for(const o of we(t)){if(!be(o,n))continue;if(await Oe(o))throw new Error("Folder listing truncated — expand again to load more");n.add(o)}}async function oe(){const t=++R.current;N.current.clear(),Q(!0),E(new Set),M(new Set),A(new Set);try{const n=await Ee({pattern:"**/*",limit:Ue,maxDepth:Cn});ke(n,!1,t),O(!0)}catch{$&&W.error("Failed to refresh file tree")}finally{Q(!1)}}async function Te(t){if(!k.get(t)?.loaded){C(o=>{const l=new Map(o);return l.set(t,{savedContent:"",editorValue:"",loaded:!1}),l});try{const o=await fetch(Se(s,e,i,"read"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:U(t),full:!0})});if(!o.ok)return;const l=await o.json(),f=Sn(l.content??"");C(v=>{const Y=new Map(v);return Y.set(t,{savedContent:f,editorValue:f,loaded:!0}),Y})}catch{}}}async function ht(t,n){try{const o=await fetch(Se(s,e,i,"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:U(t),content:n})});if(!o.ok){fe("file save failed",{path:t,status:o.status});return}fe("file saved via sandbox /write",{path:t}),K.invalidateQueries({queryKey:Ke(s,e,i)});try{const l=await un(s,e,i);fe("git status after save",l)}catch(l){fe("git status after save failed",{path:t,error:l instanceof Error?l.message:String(l)})}C(l=>{const f=new Map(l),v=f.get(t);return v&&f.set(t,{...v,savedContent:n}),f})}catch{}}function gt(t){h(t),B({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),S(null),V.includes(t)||w(n=>[...n,t]),Te(t)}function vt(t){w(n=>{const o=n.filter(l=>l!==t);return d===t&&h(o[o.length-1]??null),o}),C(n=>{const o=new Map(n);return o.delete(t),o})}function Ae(t){M(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function yt(t){if(be(t,j.current))try{if(await Oe(t))return}catch(n){W.error(n instanceof Error?n.message:"Failed to load folder");return}Ae(t)}async function wt(t,n){if(n){Ae(t);return}await yt(t)}async function ve(t){await P.current,await xt(t);const n=we(t);M(o=>{const l=new Set(o);for(const f of n)l.add(f);return l}),gt(t)}function Ct(){return y?.kind==="directory"?y.path:y?.kind==="file"?je(y.path):d?je(d):"/"}function Le(t){const n=Ct();X({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const bt=bn(x,p),Fe=jn(bt,g),Ie=I?Fe.filter(t=>t.node.name.toLowerCase().includes(I.toLowerCase())):Fe,ee=d?k.get(d):null,jt=ee?.loaded&&ee.editorValue!==ee.savedContent,ye=J?it(J.path):[],Nt=(t,n)=>{L.current=t,t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await ht(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),l=t.getModel();if(!o||!l||!d)return;const f=l.getValueInRange(o);S({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:f})})};function St(t){if(!b)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${b.filePath}\``,`**Lines:** ${b.lineStart}–${b.lineEnd}`];if(b.selectedCode){const o=Ce(b.filePath),l=b.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,l,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),_("chat"),z({parts:[{type:"text",text:n.join(`
|
|
2
|
-
`)}]}),S(null)}return q&&!$?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{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(qt,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:I,onChange:t=>H(t.target.value),placeholder:"Search files...","aria-label":"Search files",className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(ze,{children:[r.jsx(We,{asChild:!0,children:r.jsx(he,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New file",onClick:()=>Le("new-file"),children:r.jsx(Qt,{size:14})})}),r.jsx(Ge,{side:"bottom",children:"New file"})]}),r.jsxs(ze,{children:[r.jsx(We,{asChild:!0,children:r.jsx(he,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New folder",onClick:()=>Le("new-folder"),children:r.jsx(Ht,{size:14})})}),r.jsx(Ge,{side:"bottom",children:"New folder"})]})]}),r.jsx(Zt,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[Ie.map(t=>{const{node:n,depth:o}=t,l=n.kind==="directory",f=g.has(n.path),v=y?.path===n.path,Y=Nn(n.path,n.kind),de=l&&T.has(n.path);return r.jsx(dr,{node:n,depth:o,isExpanded:f,isSelected:v,isLoading:de,fileVisual:mr(n.name),onSelect:()=>B(n),onOpen:()=>{l?wt(n.path,f):ve(n.path)},onNewFile:()=>X({mode:"new-file",node:n,parentDir:Y}),onNewFolder:()=>X({mode:"new-folder",node:n,parentDir:Y}),onCopyPath:()=>De("Path",me(n.path)),onCopyRelativePath:()=>De("Relative path",U(n.path)),onRename:()=>X({mode:"rename",node:n,parentDir:Y}),onDelete:()=>ge(n)},n.path)}),$&&Ie.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:I?`No files match "${I}"`:"No files found"})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[V.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:V.map(t=>{const n=k.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,l=d===t,f=t.split("/").pop()??t;return r.jsxs("div",{className:ae("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",l?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{h(t),Te(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":l,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(),vt(t)},children:r.jsx(Yt,{size:12})})]},t)})}),b&&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()&&St(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:"Ask the AI...",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&S(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:"Send",children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:"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&&ee?.loaded?r.jsx(Ut,{language:Ce(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:ee.editorValue,path:d,onChange:t=>{const n=d;n&&C(o=>{const l=new Map(o),f=l.get(n);return f&&l.set(n,{...f,editorValue:t??""}),l})},onMount:Nt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{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&&!ee?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{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:"Select a file to edit"})}),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:[jt?"Modified":"Saved"," ·"," ",Ce(d)]})]})]}),r.jsx(En,{open:D!==null,mode:D?.mode??"new-file",initialName:D?.mode==="rename"?D.node.name:"",parentLabel:D&&D.mode!=="rename"?D.parentDir==="/"?"/":U(D.parentDir):void 0,isPending:ne,onSubmit:ut,onOpenChange:t=>{!t&&!ne&&X(null)}}),r.jsx(en,{open:J!==null,onOpenChange:t=>{!t&&!ne&&ge(null)},children:r.jsxs(tn,{children:[r.jsxs(nn,{children:[r.jsxs(rn,{children:["Delete ",J?.kind==="directory"?"folder":"file","?"]}),r.jsxs(on,{children:["This will permanently delete"," ",r.jsx("span",{className:"font-mono",children:J?.name}),J?.kind==="directory"?" and everything inside it.":".",ye.length>0&&r.jsxs(r.Fragment,{children:[" ",ye.length===1?"One open file has unsaved changes that will be lost.":`${ye.length} open files have unsaved changes that will be lost.`]})]})]}),r.jsxs(sn,{children:[r.jsx(an,{disabled:ne,children:"Cancel"}),r.jsx(ln,{disabled:ne||!J,onClick:t=>{t.preventDefault(),J&&dt(J)},children:"Delete"})]})]})})]})}export{as as FileExplorer};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as L,r as B,d as O,j as t,B as M,i as F}from"./index-CATpc9_Q.js";import{A as U}from"./avatar-DudI_cM5.js";function I(r){const e=L.c(41),{organizations:i,domain:l,requestedSlugs:v,onRequestedSlug:y,onSelected:p,onJoined:c,onRequestCompleted:k,selectLabel:E}=r,x=E===void 0?"Select":E;let q;e[0]===Symbol.for("react.memo_cache_sentinel")?(q=new Set,e[0]=q):q=e[0];const[_,P]=B.useState(q);let b;e[1]!==y?(b=o=>{P(s=>new Set(s).add(o)),y?.(o)},e[1]=y,e[2]=b):b=e[2];const C=b;let w;e[3]!==c?(w={mutationFn:D,onSuccess:o=>{const{organization:s,slug:f}=o;c?.(s,f)}},e[3]=c,e[4]=w):w=e[4];const n=O(w);let z;e[5]!==C||e[6]!==c||e[7]!==k?(z={mutationFn:$,onSuccess:o=>{const{organization:s,slug:f,alreadyMember:J}=o;if(J&&f){c?.(s,f);return}C(s.slug),k?.(s)}},e[5]=C,e[6]=c,e[7]=k,e[8]=z):z=e[8];const a=O(z);let u;e[9]!==v?(u=v??[],e[9]=v,e[10]=u):u=e[10];let N;e[11]!==_||e[12]!==u?(N=new Set([...u,..._]),e[11]=_,e[12]=u,e[13]=N):N=e[13];const h=N,j=n.variables?.slug??null,S=a.variables?.slug??null;let d;if(e[14]!==l||e[15]!==h||e[16]!==n||e[17]!==p||e[18]!==i||e[19]!==j||e[20]!==S||e[21]!==a||e[22]!==x){let o;e[24]!==l||e[25]!==h||e[26]!==n||e[27]!==p||e[28]!==j||e[29]!==S||e[30]!==a||e[31]!==x?(o=s=>{const f=n.isPending&&j===s.slug,J=a.isPending&&S===s.slug,T=h.has(s.slug),A=s.logo??(l?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null);return t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx(U,{url:A??void 0,fallback:s.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:s.name}),l&&t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",l]})]}),s.joinMode==="auto"?t.jsx(M,{size:"default",onClick:()=>n.mutate(s),disabled:n.isPending,children:f?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(F,{size:14,className:"animate-spin"})," Joining..."]}):"Join"}):s.joinMode==="request"?T?t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Request sent"}):t.jsx(M,{size:"default",variant:"outline",onClick:()=>a.mutate(s),disabled:a.isPending,children:J?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(F,{size:14,className:"animate-spin"})," ","Requesting..."]}):"Request to join"}):t.jsx(M,{size:"default",onClick:()=>p?.(s),children:x})]},s.id)},e[24]=l,e[25]=h,e[26]=n,e[27]=p,e[28]=j,e[29]=S,e[30]=a,e[31]=x,e[32]=o):o=e[32],d=i.map(o),e[14]=l,e[15]=h,e[16]=n,e[17]=p,e[18]=i,e[19]=j,e[20]=S,e[21]=a,e[22]=x,e[23]=d}else d=e[23];let m;e[33]!==n.error?(m=n.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n.error instanceof Error?n.error.message:"Failed to join organization"}),e[33]=n.error,e[34]=m):m=e[34];let g;e[35]!==a.error?(g=a.error&&t.jsx("p",{className:"text-xs text-destructive",role:"alert",children:a.error instanceof Error?a.error.message:"Failed to request access"}),e[35]=a.error,e[36]=g):g=e[36];let R;return e[37]!==g||e[38]!==d||e[39]!==m?(R=t.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[d,m,g]}),e[37]=g,e[38]=d,e[39]=m,e[40]=R):R=e[40],R}async function $(r){const e=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r.slug})}),i=await e.json();if(!e.ok||!i.success)throw new Error(i.error||"Failed to request access");return{organization:r,slug:i.slug,alreadyMember:i.alreadyMember}}async function D(r){const e=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r.slug})}),i=await e.json();if(!e.ok||!i.success)throw new Error(i.error||"Failed to join organization");return{organization:r,slug:i.slug??r.slug}}export{I as O};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as it,r as E,j as e,i as rt}from"./index-CATpc9_Q.js";import{m as mt,o as pt,p as st,q as at}from"./sidebar-8cYmIqg3.js";import{A as nt}from"./automation-runs-buslfflw.js";import{r as lt,u as ct,a as dt,b as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-CLrMzLWz.js";import{r as xt}from"./index-BMNH48Wq.js";import"./LayoutLeft-DsDSp7CT.js";import"./use-mobile-J9H9Qt6I.js";import"./X-VIJVSyzC.js";import"./tooltip-D3bYYanT.js";import"./select-BNzv8bE0.js";import"./Check-evpt16EA.js";import"./ChevronDown-Dg5I-IyP.js";import"./ChevronUp-XSOoP_Nn.js";import"./useInfiniteQuery-EUhFQPYl.js";import"./use-infinite-scroll-B-pqmsuO.js";import"./use-connection-BL5Htq-Q.js";import"./use-collections-BmbOO-kw.js";import"./use-mcp-client-BxFsDRf1.js";import"./constants-D_FQAPnt.js";import"./auth-CeuFwPxM.js";import"./use-virtual-mcp-D49c-xG2.js";import"./card-Bi9zPbIV.js";import"./table-D1nQ-wNh.js";import"./empty-state-YbRoaSPS.js";import"./use-members-DhXdX-_i.js";import"./use-org-auth-client-BNQda2IH.js";import"./use-clock-tick-Bh3IqoT0.js";import"./AlertCircle-CYnFm87k.js";import"./CheckCircle-Cw29V8Yd.js";import"./Circle-BCcBwY3X.js";import"./agent-icon-Mpp91bfB.js";import"./UserPlus01-yjW9fL-G.js";import"./Tool01-CcKyBYSb.js";import"./ArrowUp-Ce-_ZrGn.js";import"./Settings02-kiZvy_fn.js";import"./Tool02-BTUXK138.js";import"./XCircle-BfHMsLh5.js";import"./ArrowUpRight-DYOvLwi-.js";import"./TrendUp01-vYlS04gI.js";import"./ZapSquare-BPLamaJH.js";import"./Users03-DF3f2ZwS.js";import"./ChevronRight-D_lkQ96x.js";import"./Stars02-Du4pvaB9.js";import"./Copy01-ukzF2g5D.js";import"./ZoomOut-DyGQpwZF.js";import"./DotsVertical-BKwCKB4H.js";import"./Globe01-B-9XjG_y.js";import"./Eye-Rw2Lcj0d.js";import"./FilterLines-Bk3fgVzt.js";import"./Flag01-C_wN137m.js";import"./Star01-B3Xobx84.js";import"./Globe04-DNSs6EXk.js";import"./SwitchHorizontal01-Be6iAHDL.js";import"./HardDrive-CljS-OyE.js";import"./Key01-CaIwkkK6.js";import"./LinkExternal01-C7SNA6xk.js";import"./List-B0zktlno.js";import"./Monitor01-kUiMqEFF.js";import"./Sun-Cq8zftWr.js";import"./Package-RGVJ3BIv.js";import"./Palette-D51YSINn.js";import"./Play-gkeg9Jqk.js";import"./Plus-CT6paZ6Y.js";import"./SearchLg-Ci14_nqQ.js";import"./SearchMd-DDsmGmx-.js";import"./Shield01-mMv7jSi2.js";import"./Stars01-D-xbM28c.js";import"./Trash01-C7SUcgzf.js";import"./Upload01-CFKVhcA1.js";import"./User01-C9pHWMIN.js";import"./Users01-4r88txyu.js";import"./XClose-DZbEhf0R.js";import"./Zap-DEx1nSIp.js";import"./use-automations-CNEZby3c.js";import"./studio-tools-b3gOe5xj.js";import"./useSuspenseInfiniteQuery-BkDxPy4m.js";import"./badge-Ds5R9rAV.js";import"./checkbox-BO2L3mp3.js";import"./command-CZFy5Z8z.js";import"./index-DtyjY45a.js";import"./dialog-CuHfS0sp.js";import"./popover-D2alhhTy.js";import"./avatar-DudI_cM5.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DqgQyLJe.js";import"./file-type-icon-CwUnpF6W.js";import"./tab-id-BijBBRwE.js";import"./monaco-editor-B8BOxibN.js";import"./index-BO77c2t-.js";import"./chat-context-CkMKBD24.js";import"./autosend-DoEB2J9-.js";import"./hooks-Cs3wbrk0.js";import"./decopilot-sse-pool-Ch3YQMqQ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-PAIwflDX.js";import"./use-decopilot-events-DOq7WDLE.js";import"./use-organization-settings-Cy2mrzMh.js";import"./index-DwOhgdSM.js";import"./shell-layout-BTgKP_tN.js";import"./alert-dialog-CL004fe5.js";import"./required-auth-layout-BubrwQcD.js";import"./use-org-sso-BSgN5318.js";import"./integration-icon-BRTxQ4I-.js";import"./use-navigate-to-agent-Bx9iFVCX.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BhV9uTIC.js";import"./form-DoFnwcqf.js";import"./label-VUalQ4yB.js";import"./input-BAWS9YOn.js";import"./switch-BUEc-Zj-.js";import"./drawer-XTEWDOLT.js";import"./collection-search-NkGhGdHi.js";import"./tabs-BqvTvRv7.js";import"./toggle-group-DaqLlWvW.js";import"./use-deco-credits-Bg6aPI45.js";import"./extract-connection-data-CJ9qZ9tu.js";import"./connection-card-D1p5KuRZ.js";import"./use-registry-connections-CuVe3lZK.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-PZIPdxV3.js";import"./connection-form-helpers-D-SC2rCK.js";import"./authenticate-and-persist-oauth-CTnNYy7E.js";import"./mcp-oauth-D6TokJMF.js";import"./collection-tabs-BwuBKGur.js";import"./connect-desktop-dialog-BCaiIETn.js";import"./select-model-DVSYMGzL.js";import"./skeleton-CYoyZmyw.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CWE8axRi.js";import"./dropdown-menu-Br5TT9qG.js";import"./index-Sns9ntjm.js";import"./toolbar-SkI9UHfs.js";import"./use-debounced-value-CgDMpgJ3.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DpCxUSxZ.js";import"./use-mcp-tools-11QvC1x0.js";import"./use-capability-Cycc9ysK.js";import"./tools-list-CAMhopuE.js";import"./use-debounced-autosave-9nyp1djE.js";import"./index-qXXcgDB3.js";import"./search-input-CvRN0hSz.js";import"./github-repo-picker-DvJ8C_-g.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-B1NLB7qI.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-Ds_Fs5gE.js";import"./index-Ci_dhHUP.js";import"./get-initials-D-f_fDFw.js";import"./calendar-i4xGe38i.js";import"./toolbar-icon-button-CMK9jCFP.js";import"./use-file-configs-Cu57xyoQ.js";import"./automation-list-row-DPU1cfeC.js";function vi(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const A=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const M=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const V=F,q=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,z=m.kind==="site"&&o&&n,B=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const H=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const $=O;let l;t[13]!==q?(l=e.jsx(mt,{className:"text-sm font-semibold",children:q}),t[13]=q,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==$||t[22]!==H||t[23]!==A||t[24]!==v||t[25]!==h||t[26]!==B||t[27]!==x||t[28]!==M||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==z||t[37]!==_?(S=!o||!T&&!z?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:B}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:A,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:H,onBumpFormKey:$}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:M})})})}),t[20]=p,t[21]=$,t[22]=H,t[23]=A,t[24]=v,t[25]=h,t[26]=B,t[27]=x,t[28]=M,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=z,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==V||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:V,children:f}),t[42]=V,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function wt(u){return u+1}export{vi as SeoSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as H,j as t,B as Z}from"./index-CATpc9_Q.js";import{n as ee}from"./LinkExternal01-C7SNA6xk.js";import{aC as te,g as ie}from"./agent-icon-Mpp91bfB.js";import{I as J}from"./input-BAWS9YOn.js";import{L as G}from"./label-VUalQ4yB.js";import{a1 as oe}from"./automation-runs-buslfflw.js";import{b as Q,c as se,T as W,a as re}from"./tabs-BqvTvRv7.js";import{T as le}from"./textarea-PZIPdxV3.js";import{v as ae,w as me,o as pe,x as ne,y as ce,I as de,z as fe,A as ue,B as xe}from"./index-BMNH48Wq.js";import{b as he,a as ge,B as ve}from"./block-document-D1B6WRbV.js";import{u as je}from"./use-autosave-BvELNjO9.js";import{s as E,E as be,R as ye,A as Ce}from"./primitives-EBvObhxE.js";import"./AlertCircle-CYnFm87k.js";import"./UserPlus01-yjW9fL-G.js";import"./Tool01-CcKyBYSb.js";import"./ArrowUp-Ce-_ZrGn.js";import"./Settings02-kiZvy_fn.js";import"./Tool02-BTUXK138.js";import"./XCircle-BfHMsLh5.js";import"./ArrowUpRight-DYOvLwi-.js";import"./TrendUp01-vYlS04gI.js";import"./ZapSquare-BPLamaJH.js";import"./Users03-DF3f2ZwS.js";import"./CheckCircle-Cw29V8Yd.js";import"./Check-evpt16EA.js";import"./ChevronDown-Dg5I-IyP.js";import"./ChevronRight-D_lkQ96x.js";import"./ChevronUp-XSOoP_Nn.js";import"./Circle-BCcBwY3X.js";import"./Stars02-Du4pvaB9.js";import"./Copy01-ukzF2g5D.js";import"./ZoomOut-DyGQpwZF.js";import"./DotsVertical-BKwCKB4H.js";import"./Globe01-B-9XjG_y.js";import"./Eye-Rw2Lcj0d.js";import"./FilterLines-Bk3fgVzt.js";import"./Flag01-C_wN137m.js";import"./Star01-B3Xobx84.js";import"./Globe04-DNSs6EXk.js";import"./SwitchHorizontal01-Be6iAHDL.js";import"./HardDrive-CljS-OyE.js";import"./Key01-CaIwkkK6.js";import"./LayoutLeft-DsDSp7CT.js";import"./List-B0zktlno.js";import"./Monitor01-kUiMqEFF.js";import"./Sun-Cq8zftWr.js";import"./Package-RGVJ3BIv.js";import"./Palette-D51YSINn.js";import"./Play-gkeg9Jqk.js";import"./Plus-CT6paZ6Y.js";import"./SearchLg-Ci14_nqQ.js";import"./SearchMd-DDsmGmx-.js";import"./Shield01-mMv7jSi2.js";import"./Stars01-D-xbM28c.js";import"./Trash01-C7SUcgzf.js";import"./Upload01-CFKVhcA1.js";import"./User01-C9pHWMIN.js";import"./Users01-4r88txyu.js";import"./XClose-DZbEhf0R.js";import"./X-VIJVSyzC.js";import"./Zap-DEx1nSIp.js";import"./select-BNzv8bE0.js";import"./tooltip-D3bYYanT.js";import"./useInfiniteQuery-EUhFQPYl.js";import"./use-infinite-scroll-B-pqmsuO.js";import"./use-connection-BL5Htq-Q.js";import"./use-collections-BmbOO-kw.js";import"./use-mcp-client-BxFsDRf1.js";import"./constants-D_FQAPnt.js";import"./auth-CeuFwPxM.js";import"./use-virtual-mcp-D49c-xG2.js";import"./card-Bi9zPbIV.js";import"./sidebar-8cYmIqg3.js";import"./use-mobile-J9H9Qt6I.js";import"./table-D1nQ-wNh.js";import"./empty-state-YbRoaSPS.js";import"./use-members-DhXdX-_i.js";import"./use-org-auth-client-BNQda2IH.js";import"./use-clock-tick-Bh3IqoT0.js";import"./use-automations-CNEZby3c.js";import"./studio-tools-b3gOe5xj.js";import"./useSuspenseInfiniteQuery-BkDxPy4m.js";import"./badge-Ds5R9rAV.js";import"./checkbox-BO2L3mp3.js";import"./command-CZFy5Z8z.js";import"./index-DtyjY45a.js";import"./dialog-CuHfS0sp.js";import"./popover-D2alhhTy.js";import"./avatar-DudI_cM5.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DqgQyLJe.js";import"./file-type-icon-CwUnpF6W.js";import"./tab-id-BijBBRwE.js";import"./monaco-editor-B8BOxibN.js";import"./index-BO77c2t-.js";import"./chat-context-CkMKBD24.js";import"./autosend-DoEB2J9-.js";import"./hooks-Cs3wbrk0.js";import"./decopilot-sse-pool-Ch3YQMqQ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-PAIwflDX.js";import"./use-decopilot-events-DOq7WDLE.js";import"./use-organization-settings-Cy2mrzMh.js";import"./index-DwOhgdSM.js";import"./shell-layout-BTgKP_tN.js";import"./alert-dialog-CL004fe5.js";import"./required-auth-layout-BubrwQcD.js";import"./use-org-sso-BSgN5318.js";import"./integration-icon-BRTxQ4I-.js";import"./use-navigate-to-agent-Bx9iFVCX.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BhV9uTIC.js";import"./form-DoFnwcqf.js";import"./drawer-XTEWDOLT.js";import"./collection-search-NkGhGdHi.js";import"./toggle-group-DaqLlWvW.js";import"./use-deco-credits-Bg6aPI45.js";import"./extract-connection-data-CJ9qZ9tu.js";import"./connection-card-D1p5KuRZ.js";import"./use-registry-connections-CuVe3lZK.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-D-SC2rCK.js";import"./authenticate-and-persist-oauth-CTnNYy7E.js";import"./mcp-oauth-D6TokJMF.js";import"./collection-tabs-BwuBKGur.js";import"./connect-desktop-dialog-BCaiIETn.js";import"./select-model-DVSYMGzL.js";import"./skeleton-CYoyZmyw.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CWE8axRi.js";import"./dropdown-menu-Br5TT9qG.js";import"./index-Sns9ntjm.js";import"./toolbar-SkI9UHfs.js";import"./use-debounced-value-CgDMpgJ3.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DpCxUSxZ.js";import"./use-mcp-tools-11QvC1x0.js";import"./use-capability-Cycc9ysK.js";import"./tools-list-CAMhopuE.js";import"./switch-BUEc-Zj-.js";import"./use-debounced-autosave-9nyp1djE.js";import"./index-qXXcgDB3.js";import"./search-input-CvRN0hSz.js";import"./github-repo-picker-DvJ8C_-g.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-B1NLB7qI.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-Ds_Fs5gE.js";import"./index-Ci_dhHUP.js";import"./get-initials-D-f_fDFw.js";import"./calendar-i4xGe38i.js";import"./toolbar-icon-button-CMK9jCFP.js";import"./use-file-configs-Cu57xyoQ.js";import"./automation-list-row-DPU1cfeC.js";function ke(g){return Array.isArray(g)?g.map(e=>({key:E(e?.key),value:E(e?.value)})):[]}function No(g){const e=H.c(66),{orgSlug:o,virtualMcpId:m,branch:i,blockKey:f,block:a,decofile:l,meta:c,previewBaseUrl:h}=g;let x;e[0]!==i||e[1]!==o||e[2]!==m?(x={orgSlug:o,virtualMcpId:m,branch:i},e[0]=i,e[1]=o,e[2]=m,e[3]=x):x=e[3];const r=ae(x);let p;e[4]!==a?(p=me(a,"posts"),e[4]=a,e[5]=p):p=e[5];const d=p;let n;e[6]!==f||e[7]!==r?(n=F=>{r.mutate({blockKey:f,data:ne(f,"posts",ce(F))})},e[6]=f,e[7]=r,e[8]=n):n=e[8];const[s,N]=je(d,n);let S;e[9]!==s||e[10]!==N?(S=(F,Y)=>N({...s,[F]:Y}),e[9]=s,e[10]=N,e[11]=S):S=e[11];const v=S;let w;e[12]!==l||e[13]!==s||e[14]!==h?(w=he({decofile:l,post:s,previewBaseUrl:h}),e[12]=l,e[13]=s,e[14]=h,e[15]=w):w=e[15];const j=w;let b;e[16]!==s.title?(b=E(s.title)||"Untitled post",e[16]=s.title,e[17]=b):b=e[17];let y;e[18]!==b?(y=t.jsx("span",{className:"truncate text-sm font-medium",children:b}),e[18]=b,e[19]=y):y=e[19];let C;e[20]!==r.isError||e[21]!==r.isPending?(C=t.jsx(pe,{isPending:r.isPending,isError:r.isError}),e[20]=r.isError,e[21]=r.isPending,e[22]=C):C=e[22];const P=!j,_=j?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let k;e[23]!==j?(k=()=>{j&&window.open(j,"_blank","noopener,noreferrer")},e[23]=j,e[24]=k):k=e[24];let B;e[25]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ee,{size:14}),e[25]=B):B=e[25];let u;e[26]!==_||e[27]!==k||e[28]!==P?(u=t.jsxs(Z,{type:"button",variant:"outline",size:"sm",disabled:P,title:_,onClick:k,children:[B,"See preview"]}),e[26]=_,e[27]=k,e[28]=P,e[29]=u):u=e[29];let T;e[30]!==u||e[31]!==C?(T=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[C,u]}),e[30]=u,e[31]=C,e[32]=T):T=e[32];let R;e[33]!==T||e[34]!==y?(R=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[y,T]}),e[33]=T,e[34]=y,e[35]=R):R=e[35];let A;e[36]!==s.title?(A=E(s.title),e[36]=s.title,e[37]=A):A=e[37];let L;e[38]!==v?(L=F=>v("title",F),e[38]=v,e[39]=L):L=e[39];let I;e[40]!==A||e[41]!==L?(I=t.jsx(be,{value:A,onChange:L,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[40]=A,e[41]=L,e[42]=I):I=e[42];let K;e[43]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsxs(Q,{value:"content",children:[t.jsx(te,{}),"Content"]}),e[43]=K):K=e[43];let O;e[44]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs(se,{children:[K,t.jsxs(Q,{value:"settings",children:[t.jsx(ie,{}),"Settings"]})]}),e[44]=O):O=e[44];let U;e[45]!==s.sections?(U=ge(s.sections),e[45]=s.sections,e[46]=U):U=e[46];let V;e[47]!==v?(V=F=>v("sections",F),e[47]=v,e[48]=V):V=e[48];let $;e[49]!==c||e[50]!==U||e[51]!==V?($=t.jsx(W,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(ve,{value:U,onChange:V,meta:c,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[49]=c,e[50]=U,e[51]=V,e[52]=$):$=e[52];let M;e[53]!==l||e[54]!==s||e[55]!==v?(M=t.jsx(W,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(Ne,{post:s,decofile:l,onChange:v})})}),e[53]=l,e[54]=s,e[55]=v,e[56]=M):M=e[56];let z;e[57]!==$||e[58]!==M?(z=t.jsxs(re,{defaultValue:"content",className:"mt-6 gap-4",children:[O,$,M]}),e[57]=$,e[58]=M,e[59]=z):z=e[59];let D;e[60]!==I||e[61]!==z?(D=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:[I,z]})}),e[60]=I,e[61]=z,e[62]=D):D=e[62];let q;return e[63]!==R||e[64]!==D?(q=t.jsxs("div",{className:"flex h-full flex-col",children:[R,D]}),e[63]=R,e[64]=D,e[65]=q):q=e[65],q}function Ne(g){const e=H.c(57),{post:o,decofile:m,onChange:i}=g;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(G,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=f):f=e[0];let a;e[1]!==o.excerpt?(a=E(o.excerpt),e[1]=o.excerpt,e[2]=a):a=e[2];let l;e[3]!==i?(l=u=>i("excerpt",u.target.value),e[3]=i,e[4]=l):l=e[4];let c;e[5]!==a||e[6]!==l?(c=t.jsxs("div",{className:"space-y-2",children:[f,t.jsx(le,{id:"post-excerpt",value:a,onChange:l,rows:2})]}),e[5]=a,e[6]=l,e[7]=c):c=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(G,{htmlFor:"post-slug",children:"Slug"}),e[8]=h):h=e[8];let x;e[9]!==o.slug?(x=E(o.slug),e[9]=o.slug,e[10]=x):x=e[10];let r;e[11]!==i?(r=u=>i("slug",u.target.value),e[11]=i,e[12]=r):r=e[12];let p;e[13]!==x||e[14]!==r?(p=t.jsxs("div",{className:"space-y-2",children:[h,t.jsx(J,{id:"post-slug",value:x,onChange:r,placeholder:"my-post",className:"h-10"})]}),e[13]=x,e[14]=r,e[15]=p):p=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d={type:"string",format:"date",title:"Date"},e[16]=d):d=e[16];let n;e[17]!==o.date?(n=E(o.date),e[17]=o.date,e[18]=n):n=e[18];let s;e[19]!==i?(s=u=>i("date",u),e[19]=i,e[20]=s):s=e[20];let N;e[21]!==n||e[22]!==s?(N=t.jsx(xe,{schema:d,value:n,onChange:s,path:"post-date",label:"Date"}),e[21]=n,e[22]=s,e[23]=N):N=e[23];let S;e[24]!==N||e[25]!==p?(S=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p,N]}),e[24]=N,e[25]=p,e[26]=S):S=e[26];let v;e[27]===Symbol.for("react.memo_cache_sentinel")?(v={type:"string",format:"image-uri",title:"Cover image"},e[27]=v):v=e[27];let w;e[28]!==i?(w=u=>i("image",u),e[28]=i,e[29]=w):w=e[29];let j;e[30]!==o.image||e[31]!==w?(j=t.jsx(de,{schema:v,value:o.image,onChange:w,path:"post-image",label:"Cover image"}),e[30]=o.image,e[31]=w,e[32]=j):j=e[32];let b;e[33]!==i?(b=u=>i("authors",u),e[33]=i,e[34]=b):b=e[34];let y;e[35]!==m||e[36]!==o.authors||e[37]!==b?(y=t.jsx(X,{label:"Authors",decofile:m,kind:"authors",valueField:"email",toRef:we,selected:o.authors,onChange:b}),e[35]=m,e[36]=o.authors,e[37]=b,e[38]=y):y=e[38];let C;e[39]!==i?(C=u=>i("categories",u),e[39]=i,e[40]=C):C=e[40];let P;e[41]!==m||e[42]!==o.categories||e[43]!==C?(P=t.jsx(X,{label:"Categories",decofile:m,kind:"categories",valueField:"slug",toRef:Se,selected:o.categories,onChange:C}),e[41]=m,e[42]=o.categories,e[43]=C,e[44]=P):P=e[44];let _;e[45]!==i?(_=u=>i("extraProps",u),e[45]=i,e[46]=_):_=e[46];let k;e[47]!==o.extraProps||e[48]!==_?(k=t.jsx(Pe,{value:o.extraProps,onChange:_}),e[47]=o.extraProps,e[48]=_,e[49]=k):k=e[49];let B;return e[50]!==S||e[51]!==j||e[52]!==y||e[53]!==P||e[54]!==k||e[55]!==c?(B=t.jsxs("div",{className:"space-y-5",children:[c,S,j,y,P,k]}),e[50]=S,e[51]=j,e[52]=y,e[53]=P,e[54]=k,e[55]=c,e[56]=B):B=e[56],B}function Se(g){return{name:E(g.name),slug:E(g.slug)}}function we(g){return{...g}}function Pe(g){const e=H.c(15),{value:o,onChange:m}=g;let i,f,a,l;if(e[0]!==m||e[1]!==o){i=ke(o);const x=(r,p)=>m(i.map((d,n)=>n===r?{...d,...p}:d));f="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(G,{children:"Extra props"}),e[6]=a):a=e[6],l=i.length>0&&t.jsx("ul",{className:"space-y-2",children:i.map((r,p)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(J,{value:r.key,onChange:d=>x(p,{key:d.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(J,{value:r.value,onChange:d=>x(p,{value:d.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(ye,{label:"Remove prop",onClick:()=>m(i.filter((d,n)=>n!==p))})]},p))}),e[0]=m,e[1]=o,e[2]=i,e[3]=f,e[4]=a,e[5]=l}else i=e[2],f=e[3],a=e[4],l=e[5];let c;e[7]!==i||e[8]!==m?(c=t.jsx(Ce,{label:"Add prop",onClick:()=>m([...i,{key:"",value:""}])}),e[7]=i,e[8]=m,e[9]=c):c=e[9];let h;return e[10]!==f||e[11]!==a||e[12]!==l||e[13]!==c?(h=t.jsxs("div",{className:f,children:[a,l,c]}),e[10]=f,e[11]=a,e[12]=l,e[13]=c,e[14]=h):h=e[14],h}function X(g){const e=H.c(17),{label:o,decofile:m,kind:i,valueField:f,toRef:a,selected:l,onChange:c}=g;let h;e[0]!==m||e[1]!==i||e[2]!==l||e[3]!==a||e[4]!==f?(h=fe({records:ue(m,i),selected:l,valueField:f,toRef:a}),e[0]=m,e[1]=i,e[2]=l,e[3]=a,e[4]=f,e[5]=h):h=e[5];const{options:x,selectedValues:r,refsForValues:p}=h;let d;e[6]!==o?(d=t.jsx(G,{children:o}),e[6]=o,e[7]=d):d=e[7];let n;e[8]!==o||e[9]!==c||e[10]!==x||e[11]!==p||e[12]!==r?(n=x.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",o.toLowerCase()," yet — create some in the"," ",o.toLowerCase()," collection."]}):t.jsx(oe,{options:x,defaultValue:r,onValueChange:N=>c(p(N)),placeholder:`Select ${o.toLowerCase()}`,maxCount:4}),e[8]=o,e[9]=c,e[10]=x,e[11]=p,e[12]=r,e[13]=n):n=e[13];let s;return e[14]!==d||e[15]!==n?(s=t.jsxs("div",{className:"space-y-2",children:[d,n]}),e[14]=d,e[15]=n,e[16]=s):s=e[16],s}export{No as PostEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as L,C as H,j as U}from"./index-CATpc9_Q.js";import{a as O,g as $,s as E}from"./automation-runs-buslfflw.js";import{u as k}from"./use-mcp-client-BxFsDRf1.js";import{p as B}from"./constants-D_FQAPnt.js";import{b as V,c as Y}from"./use-mcp-tools-11QvC1x0.js";import{u as q}from"./index-BMNH48Wq.js";import{c as G}from"./monaco-editor-B8BOxibN.js";import{g as K,M as W,a as D}from"./index-DwOhgdSM.js";import{b as z,a as F}from"./chat-context-CkMKBD24.js";import{u as J}from"./shell-layout-BTgKP_tN.js";import{O as Q}from"./tab-id-BijBBRwE.js";import"./select-BNzv8bE0.js";import"./tooltip-D3bYYanT.js";import"./Check-evpt16EA.js";import"./ChevronDown-Dg5I-IyP.js";import"./ChevronUp-XSOoP_Nn.js";import"./useInfiniteQuery-EUhFQPYl.js";import"./use-infinite-scroll-B-pqmsuO.js";import"./use-connection-BL5Htq-Q.js";import"./use-collections-BmbOO-kw.js";import"./use-virtual-mcp-D49c-xG2.js";import"./card-Bi9zPbIV.js";import"./sidebar-8cYmIqg3.js";import"./LayoutLeft-DsDSp7CT.js";import"./use-mobile-J9H9Qt6I.js";import"./X-VIJVSyzC.js";import"./table-D1nQ-wNh.js";import"./empty-state-YbRoaSPS.js";import"./use-members-DhXdX-_i.js";import"./use-org-auth-client-BNQda2IH.js";import"./use-clock-tick-Bh3IqoT0.js";import"./AlertCircle-CYnFm87k.js";import"./CheckCircle-Cw29V8Yd.js";import"./Circle-BCcBwY3X.js";import"./agent-icon-Mpp91bfB.js";import"./UserPlus01-yjW9fL-G.js";import"./Tool01-CcKyBYSb.js";import"./ArrowUp-Ce-_ZrGn.js";import"./Settings02-kiZvy_fn.js";import"./Tool02-BTUXK138.js";import"./XCircle-BfHMsLh5.js";import"./ArrowUpRight-DYOvLwi-.js";import"./TrendUp01-vYlS04gI.js";import"./ZapSquare-BPLamaJH.js";import"./Users03-DF3f2ZwS.js";import"./ChevronRight-D_lkQ96x.js";import"./Stars02-Du4pvaB9.js";import"./Copy01-ukzF2g5D.js";import"./ZoomOut-DyGQpwZF.js";import"./DotsVertical-BKwCKB4H.js";import"./Globe01-B-9XjG_y.js";import"./Eye-Rw2Lcj0d.js";import"./FilterLines-Bk3fgVzt.js";import"./Flag01-C_wN137m.js";import"./Star01-B3Xobx84.js";import"./Globe04-DNSs6EXk.js";import"./SwitchHorizontal01-Be6iAHDL.js";import"./HardDrive-CljS-OyE.js";import"./Key01-CaIwkkK6.js";import"./LinkExternal01-C7SNA6xk.js";import"./List-B0zktlno.js";import"./Monitor01-kUiMqEFF.js";import"./Sun-Cq8zftWr.js";import"./Package-RGVJ3BIv.js";import"./Palette-D51YSINn.js";import"./Play-gkeg9Jqk.js";import"./Plus-CT6paZ6Y.js";import"./SearchLg-Ci14_nqQ.js";import"./SearchMd-DDsmGmx-.js";import"./Shield01-mMv7jSi2.js";import"./Stars01-D-xbM28c.js";import"./Trash01-C7SUcgzf.js";import"./Upload01-CFKVhcA1.js";import"./User01-C9pHWMIN.js";import"./Users01-4r88txyu.js";import"./XClose-DZbEhf0R.js";import"./Zap-DEx1nSIp.js";import"./use-automations-CNEZby3c.js";import"./studio-tools-b3gOe5xj.js";import"./useSuspenseInfiniteQuery-BkDxPy4m.js";import"./badge-Ds5R9rAV.js";import"./checkbox-BO2L3mp3.js";import"./command-CZFy5Z8z.js";import"./index-DtyjY45a.js";import"./dialog-CuHfS0sp.js";import"./popover-D2alhhTy.js";import"./avatar-DudI_cM5.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DqgQyLJe.js";import"./file-type-icon-CwUnpF6W.js";import"./hooks-Cs3wbrk0.js";import"./decopilot-sse-pool-Ch3YQMqQ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./integration-icon-BRTxQ4I-.js";import"./use-navigate-to-agent-Bx9iFVCX.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BhV9uTIC.js";import"./form-DoFnwcqf.js";import"./label-VUalQ4yB.js";import"./input-BAWS9YOn.js";import"./auth-CeuFwPxM.js";import"./drawer-XTEWDOLT.js";import"./collection-search-NkGhGdHi.js";import"./autosend-DoEB2J9-.js";import"./tabs-BqvTvRv7.js";import"./toggle-group-DaqLlWvW.js";import"./use-deco-credits-Bg6aPI45.js";import"./extract-connection-data-CJ9qZ9tu.js";import"./connection-card-D1p5KuRZ.js";import"./use-registry-connections-CuVe3lZK.js";import"./use-organization-settings-Cy2mrzMh.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-PZIPdxV3.js";import"./connection-form-helpers-D-SC2rCK.js";import"./authenticate-and-persist-oauth-CTnNYy7E.js";import"./mcp-oauth-D6TokJMF.js";import"./collection-tabs-BwuBKGur.js";import"./use-ai-providers-PAIwflDX.js";import"./connect-desktop-dialog-BCaiIETn.js";import"./select-model-DVSYMGzL.js";import"./skeleton-CYoyZmyw.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CWE8axRi.js";import"./dropdown-menu-Br5TT9qG.js";import"./index-Sns9ntjm.js";import"./alert-dialog-CL004fe5.js";import"./toolbar-SkI9UHfs.js";import"./use-debounced-value-CgDMpgJ3.js";import"./index-BO77c2t-.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DpCxUSxZ.js";import"./use-decopilot-events-DOq7WDLE.js";import"./use-capability-Cycc9ysK.js";import"./tools-list-CAMhopuE.js";import"./switch-BUEc-Zj-.js";import"./use-debounced-autosave-9nyp1djE.js";import"./index-qXXcgDB3.js";import"./search-input-CvRN0hSz.js";import"./github-repo-picker-DvJ8C_-g.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-B1NLB7qI.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-Ds_Fs5gE.js";import"./index-Ci_dhHUP.js";import"./get-initials-D-f_fDFw.js";import"./calendar-i4xGe38i.js";import"./toolbar-icon-button-CMK9jCFP.js";import"./use-file-configs-Cu57xyoQ.js";import"./automation-list-row-DPU1cfeC.js";import"./required-auth-layout-BubrwQcD.js";import"./use-org-sso-BSgN5318.js";const X="studio://navigate";function Z(M){const[t]=M;if(M.length!==1||t?.type!=="resource_link"||!t.uri.startsWith(X))return{isNavigate:!1};let o=null;try{o=new URL(t.uri).searchParams.get("main")}catch{}return{isNavigate:!0,tab:o&&Q.has(o)?o:null}}const tt={};function ot(M){const t=L.c(38),{client:o,resourceURI:I,tool:i,connectionId:p,orgId:a,args:v}=M,{sendMessage:C}=z(),{setAppContext:d,clearAppContext:l}=F(),{openSidePanel:g,openTab:s}=J(),r=`${p}:${i.name}`;let c;t[0]!==s?(c=x=>x==="inline"?(s("0"),"inline"):"fullscreen",t[0]=s,t[1]=c):c=t[1];const m=c,n=v??tt;let u;t[2]!==o||t[3]!==i.name||t[4]!==n?(u={client:o,toolName:i.name,toolArguments:n},t[2]=o,t[3]=i.name,t[4]=n,t[5]=u):u=t[5];const{data:e}=Y(u);let h;if(t[6]!==i._meta||t[7]!==i.name){const x=$(i._meta);h=E(i.name,x),t[6]=i._meta,t[7]=i.name,t[8]=h}else h=t[8];const A=h;let f;t[9]!==i.inputSchema?(f=i.inputSchema??{type:"object"},t[9]=i.inputSchema,t[10]=f):f=t[10];let R;t[11]!==A||t[12]!==f||t[13]!==i?(R={...i,name:A,inputSchema:f},t[11]=A,t[12]=f,t[13]=i,t[14]=R):R=t[14];const b=R;let _;t[15]!==g||t[16]!==s||t[17]!==C?(_=x=>{const j=Z(x.content);if(j.isNavigate){j.tab&&s(j.tab);return}const w=G(x.content);w.content.length>0&&(g("chat"),C({tiptapDoc:w}))},t[15]=g,t[16]=s,t[17]=C,t[18]=_):_=t[18];const y=_;let P;t[19]!==b?(P={tool:b},t[19]=b,t[20]=P):P=t[20];let N;t[21]!==d||t[22]!==r?(N=x=>d(r,x),t[21]=d,t[22]=r,t[23]=N):N=t[23];let T;t[24]!==l||t[25]!==r?(T=()=>l(r),t[24]=l,t[25]=r,t[26]=T):T=t[26];let S;return t[27]!==o||t[28]!==y||t[29]!==m||t[30]!==a||t[31]!==I||t[32]!==P||t[33]!==N||t[34]!==T||t[35]!==n||t[36]!==e?(S=U.jsx(W,{resourceURI:I,orgId:a,toolInfo:P,toolInput:n,toolResult:e,displayMode:"fullscreen",minHeight:D.fullscreen.minHeight,maxHeight:D.fullscreen.maxHeight,client:o,onMessage:y,onUpdateModelContext:N,onTeardown:T,onRequestDisplayMode:m,className:"h-full"}),t[27]=o,t[28]=y,t[29]=m,t[30]=a,t[31]=I,t[32]=P,t[33]=N,t[34]=T,t[35]=n,t[36]=e,t[37]=S):S=t[37],S}function Fi(M){const t=L.c(24),{connectionId:o,toolName:I,args:i}=M,{org:p}=H(),a=q();let v;t[0]!==o||t[1]!==a?(v=B(o)&&a.vmEntry?.sandboxProviderKind==="user-desktop"&&a.previewUrl?`${a.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=o,t[1]=a,t[2]=v):v=t[2];const C=v;let d;t[3]!==o||t[4]!==C||t[5]!==p.id||t[6]!==p.slug?(d={connectionId:o,orgId:p.id,orgSlug:p.slug,mcpUrl:C},t[3]=o,t[4]=C,t[5]=p.id,t[6]=p.slug,t[7]=d):d=t[7];const l=k(d);let g;t[8]!==l?(g={client:l},t[8]=l,t[9]=g):g=t[9];const{data:s}=V(g);let r,c,m;t[10]!==I||t[11]!==s.tools?(r=O(decodeURIComponent(I)),m=s.tools.find(e=>e.name===r)??s.tools.find(e=>{const h=$(e._meta);if(!h)return!1;if(E(e.name,h)===r)return!0;const f=E(r,h);return f!==r&&e.name===f}),c=m?._meta?K(m._meta):void 0,t[10]=I,t[11]=s.tools,t[12]=r,t[13]=c,t[14]=m):(r=t[12],c=t[13],m=t[14]);const n=c;if(!m||!n){let e;return t[15]!==r?(e=U.jsx("div",{className:"flex items-center justify-center h-full w-full",children:U.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',r,'" not found or has no UI']})}),t[15]=r,t[16]=e):e=t[16],e}let u;return t[17]!==i||t[18]!==l||t[19]!==o||t[20]!==p.id||t[21]!==n||t[22]!==m?(u=U.jsx(ot,{client:l,resourceURI:n,tool:m,connectionId:o,orgId:p.id,args:i}),t[17]=i,t[18]=l,t[19]=o,t[20]=p.id,t[21]=n,t[22]=m,t[23]=u):u=t[23],u}export{Fi as AppViewContent};
|