decocms 3.30.0 → 3.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-C2JPSNIc.js → AlertCircle-BQLR7I4E.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-Dtm-fMoi.js → ArrowUpRight-DSaWSvAP.js} +1 -1
- package/dist/client/assets/{Check-CJuLJZRg.js → Check-DCDpfG7m.js} +1 -1
- package/dist/client/assets/{CheckCircle-B1gk6AbW.js → CheckCircle-BBK-3Pzt.js} +1 -1
- package/dist/client/assets/{ChevronDown-BbO00aHm.js → ChevronDown-BD0G-h2k.js} +1 -1
- package/dist/client/assets/{ChevronLeft-CyC6kPhn.js → ChevronLeft-DtP_Ayjz.js} +1 -1
- package/dist/client/assets/{ChevronRight-D4rmSZYg.js → ChevronRight-DUzhuedZ.js} +1 -1
- package/dist/client/assets/{ChevronUp-DC9Fz2he.js → ChevronUp-D5M0geM5.js} +1 -1
- package/dist/client/assets/{Container-Ck07PAMh.js → Container-Catp9d2q.js} +1 -1
- package/dist/client/assets/{DotsVertical-DVI2JfBT.js → DotsVertical-Dok1GVxI.js} +1 -1
- package/dist/client/assets/{Eye-8SpX7ax1.js → Eye-Dmik5hYP.js} +1 -1
- package/dist/client/assets/{FilterLines-DXoB5fi6.js → FilterLines-C37LaXJ1.js} +1 -1
- package/dist/client/assets/{Globe01-_Gozs0-K.js → Globe01-D1c-3J9t.js} +1 -1
- package/dist/client/assets/{HardDrive-D6YFkngp.js → HardDrive-C1vRZoAn.js} +1 -1
- package/dist/client/assets/{Key01-DtPyr_d4.js → Key01-CdveS1HN.js} +1 -1
- package/dist/client/assets/{LayoutLeft-zPlWqXYO.js → LayoutLeft-Bfxz6P9F.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CMKC3Ppc.js → LinkExternal01-CxEkPs1F.js} +1 -1
- package/dist/client/assets/{Monitor01-Dg9LYm9U.js → Monitor01-Bkoa3Nbe.js} +1 -1
- package/dist/client/assets/{Palette-DvOu8iad.js → Palette-C74Da44y.js} +1 -1
- package/dist/client/assets/{Play-BGgNLf1z.js → Play-BERjgeke.js} +1 -1
- package/dist/client/assets/{Plus-D3Yt_klI.js → Plus-CdvauR8B.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-De11YcWY.js → RefreshCcw01-4ELQWtuB.js} +1 -1
- package/dist/client/assets/{SearchMd-CkwYmYFX.js → SearchMd-DvX2rzEB.js} +1 -1
- package/dist/client/assets/{Settings02-RkWi-oHt.js → Settings02-Cqwfv4FN.js} +1 -1
- package/dist/client/assets/{Shield01-BkzImfUK.js → Shield01-6id4oLiZ.js} +1 -1
- package/dist/client/assets/{Star01-CROTt7h-.js → Star01--MeVNqbA.js} +1 -1
- package/dist/client/assets/{Stars01-BZ01dqEy.js → Stars01-C2BTpZeS.js} +1 -1
- package/dist/client/assets/{Stars02-Bb_Lb3Iw.js → Stars02-D6zEAnUT.js} +1 -1
- package/dist/client/assets/{Sun--jg0YyzU.js → Sun-BGVsB7Cm.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-uOesGvrj.js → SwitchHorizontal01-DC97OO23.js} +1 -1
- package/dist/client/assets/{Tool01-CHRhaVsB.js → Tool01-DQ4cTbeu.js} +1 -1
- package/dist/client/assets/{Trash01-D9jT6VSX.js → Trash01-Biurgfq6.js} +1 -1
- package/dist/client/assets/{Upload01-B6COGlQo.js → Upload01-B-0o1yeU.js} +1 -1
- package/dist/client/assets/{User01-CWJ4O2R8.js → User01-CZ5ejYDg.js} +1 -1
- package/dist/client/assets/{Users01-Bsb338aB.js → Users01-CKNLJr4G.js} +1 -1
- package/dist/client/assets/{Users03-BZnIYCM1.js → Users03-CA9cu5qb.js} +1 -1
- package/dist/client/assets/{X-CH7nrxK3.js → X-DlMQL-XM.js} +1 -1
- package/dist/client/assets/{XCircle-DSNLgcsz.js → XCircle-G0WrPq0g.js} +1 -1
- package/dist/client/assets/{XClose-B2Xxw9ZV.js → XClose-LNW85JIs.js} +1 -1
- package/dist/client/assets/{Zap-CtPT7vkQ.js → Zap-CbtV6Vvm.js} +1 -1
- package/dist/client/assets/{ZapSquare-B7LKxpnQ.js → ZapSquare-C9LhFrIW.js} +1 -1
- package/dist/client/assets/{ZoomOut-BhGMK1ir.js → ZoomOut-CImzlj9g.js} +1 -1
- package/dist/client/assets/{access-gate-CBfdxByI.js → access-gate-DR0BZ9Yv.js} +1 -1
- package/dist/client/assets/{accordion-CMUFrLXB.js → accordion-CiWkTYYE.js} +1 -1
- package/dist/client/assets/add-section-modal-Dv2cxIh1.js +1 -0
- package/dist/client/assets/{agent-capabilities-v4Rwjpb1.js → agent-capabilities-l_XcUqX-.js} +1 -1
- package/dist/client/assets/{agent-icon-BL0Zyuef.js → agent-icon-CjlB-XbA.js} +1 -1
- package/dist/client/assets/{agent-icons-AMlXFz_9.js → agent-icons-COjGtXRX.js} +1 -1
- package/dist/client/assets/{agents-list-D6JCtAI6.js → agents-list-BbpQy40q.js} +1 -1
- package/dist/client/assets/ai-providers-YKtufrsd.js +1 -0
- package/dist/client/assets/{alert-Br2JNJoK.js → alert-DUOzDLz2.js} +1 -1
- package/dist/client/assets/{alert-dialog-DzLqwXYd.js → alert-dialog-ZB1-0uWA.js} +1 -1
- package/dist/client/assets/app-editor-CFm4rW9v.js +1 -0
- package/dist/client/assets/{auth-catchall-Bh2wbrjs.js → auth-catchall-p-9cQrp4.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CKbPPfx6.js → auth-split-layout-DCQZj1x8.js} +1 -1
- package/dist/client/assets/{automation-list-row-6z14sJQm.js → automation-list-row-1QBzAyda.js} +1 -1
- package/dist/client/assets/{automation-runs-DAMwdbwt.js → automation-runs-CbXniThO.js} +1 -1
- package/dist/client/assets/{automations-oTAQWsS7.js → automations-DXbm14M-.js} +1 -1
- package/dist/client/assets/{avatar-BL6j7EM4.js → avatar-DdrKHW7Q.js} +1 -1
- package/dist/client/assets/{badge-Cc4XouWa.js → badge-GxV01_sa.js} +1 -1
- package/dist/client/assets/{brand-context-BCHQoNph.js → brand-context-CckU9jvo.js} +1 -1
- package/dist/client/assets/{buckets-CLBLkzZh.js → buckets-BXxpFWbP.js} +1 -1
- package/dist/client/assets/{calendar-DXmim9-f.js → calendar-ndWEDvWe.js} +1 -1
- package/dist/client/assets/{capability-load-error-S5ghjE3y.js → capability-load-error-C1lcmzPk.js} +1 -1
- package/dist/client/assets/{card-OOIE0uKL.js → card-B7vNztnP.js} +1 -1
- package/dist/client/assets/{chat-context-C10uFg_9.js → chat-context-Dr8mURNn.js} +1 -1
- package/dist/client/assets/{checkbox-EJ-FS6-O.js → checkbox-CvlqSsv8.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BYusj1Yo.js → cli-auth-success-DbBnzJkW.js} +1 -1
- package/dist/client/assets/collection-detail-dh1JPTkf.js +1 -0
- package/dist/client/assets/{collection-display-button-B9EwJigp.js → collection-display-button-ByiFEfVE.js} +1 -1
- package/dist/client/assets/{collection-search-CVFFSy0S.js → collection-search-B62hBYcH.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-C1Fi6DAM.js → collection-table-wrapper-p305Tve_.js} +1 -1
- package/dist/client/assets/{collection-tabs-CArtFM6T.js → collection-tabs-BoWbncvo.js} +1 -1
- package/dist/client/assets/{collections-BMUil3in.js → collections-BU-b7Qnp.js} +1 -1
- package/dist/client/assets/{command-BeSVNuhP.js → command-DeymMKPH.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-nMepiraO.js → connect-desktop-dialog-B6fCPmnk.js} +1 -1
- package/dist/client/assets/{connection-card-BAVVkgt5.js → connection-card-BdHs3sI8.js} +1 -1
- package/dist/client/assets/{connection-detail-BTh_x2Hu.js → connection-detail-1bfT9skO.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-C7w-EHHd.js → connection-form-helpers-Cl8WE-Wv.js} +1 -1
- package/dist/client/assets/{connections-CrTg-ish.js → connections-CQfywKkf.js} +1 -1
- package/dist/client/assets/decopilot-sse-pool-TF6jERkV.js +1 -0
- package/dist/client/assets/{dialog-DlK91HiY.js → dialog-Bug5LYvY.js} +1 -1
- package/dist/client/assets/{domain-settings-B7UAGOxI.js → domain-settings-CiVW_jUc.js} +1 -1
- package/dist/client/assets/{drawer-We__DvM1.js → drawer-Ckfnpw8I.js} +1 -1
- package/dist/client/assets/{dropdown-menu-9oUOEimm.js → dropdown-menu-CggnBdjt.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-D7rRlhnh.js → dynamic-plugin-layout-yS0CT9hK.js} +1 -1
- package/dist/client/assets/{empty-state-CwB2rEHC.js → empty-state-C6yeON6c.js} +1 -1
- package/dist/client/assets/{empty-state-DWre-pls.js → empty-state-DtTBbW_W.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Deygnaxj.js → extract-connection-data-BR7VTC2M.js} +1 -1
- package/dist/client/assets/{features-C1SyNqJm.js → features-fQ1ChqbW.js} +1 -1
- package/dist/client/assets/file-explorer-Bpe6MxXV.js +2 -0
- package/dist/client/assets/{file-type-icon-g69R8oLw.js → file-type-icon-Dg4vNCbL.js} +1 -1
- package/dist/client/assets/{files-C6FoCY_v.js → files-C7GL35WM.js} +1 -1
- package/dist/client/assets/{form-8fnZRdSd.js → form-Bkkvnz-_.js} +1 -1
- package/dist/client/assets/{general-XtW1kUDP.js → general-T2AFh9Ye.js} +1 -1
- package/dist/client/assets/{generate-id-DHU56BsF.js → generate-id-DfnWKozM.js} +1 -1
- package/dist/client/assets/github-repo-picker-BKJVsWG6.js +4 -0
- package/dist/client/assets/{header-tab-button-B8CWwAih.js → header-tab-button-CfuW1KOG.js} +1 -1
- package/dist/client/assets/{hover-card-DwcwURxp.js → hover-card-7wnR4X6J.js} +1 -1
- package/dist/client/assets/{image-field-DmhpoXrw.js → image-field-DsnvgvCV.js} +1 -1
- package/dist/client/assets/{index-C2l1dIiW.js → index-BD68Poau.js} +1 -1
- package/dist/client/assets/{index-CFHtQMhz.js → index-BDwe75Ed.js} +2 -2
- package/dist/client/assets/{index-DnaxJsHb.js → index-BL9vKovB.js} +4 -4
- package/dist/client/assets/{index-DxEUOQQs.js → index-BjoOIgbb.js} +3 -3
- package/dist/client/assets/{index-BATH3mQn.js → index-C6AFi5aI.js} +1 -1
- package/dist/client/assets/{index-C5kgHpFv.js → index-CCldjkHi.js} +1 -1
- package/dist/client/assets/{index-ZOhZPSgS.js → index-CV7TX6uY.js} +1 -1
- package/dist/client/assets/{index-oexgDee9.js → index-C_NDVGp1.js} +1 -1
- package/dist/client/assets/index-CoS-DNLH.js +1 -0
- package/dist/client/assets/{index-BZ_pIRwf.js → index-CvubZqsl.js} +1 -1
- package/dist/client/assets/index-DHXKcvHJ.js +1 -0
- package/dist/client/assets/{index-PvfjkUpw.js → index-Dow8MSuu.js} +1 -1
- package/dist/client/assets/{index-DBE0AwRo.js → index-K-cFrJme.js} +1 -1
- package/dist/client/assets/{index-Daxt8Oww.js → index-M8U0QO9V.js} +1 -1
- package/dist/client/assets/{index-redirect-HOxoe50M.js → index-redirect-CDKs11B5.js} +1 -1
- package/dist/client/assets/{index-Cxw5N6xu.js → index-uM9cBeAz.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-_wx8vha2.js → infiniteQueryObserver-DjRZQa58.js} +1 -1
- package/dist/client/assets/{input-CzgGcI3V.js → input-CAytkUdm.js} +1 -1
- package/dist/client/assets/{integration-icon-TXgAkIpf.js → integration-icon-BxZqCPgY.js} +1 -1
- package/dist/client/assets/{label-Bz4-Isgq.js → label-_bcDhrPn.js} +1 -1
- package/dist/client/assets/{layout-CJmh1JYB.js → layout-D6JyUu-W.js} +1 -1
- package/dist/client/assets/{login-CqLFGKun.js → login-D_Y894-5.js} +1 -1
- package/dist/client/assets/{members-CkjIPrxM.js → members-BiZDHDwm.js} +1 -1
- package/dist/client/assets/{monaco-editor-H7pARgsv.js → monaco-editor-DR1buwuA.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DS1hvbdH.js → monitoring-stats-row-BH1n8Qao.js} +1 -1
- package/dist/client/assets/{oauth-callback-HUP2iLBH.js → oauth-callback-Bwrh5dBF.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Dd9lClDY.js → oauth-callback-ai-provider-DnFWhV-5.js} +1 -1
- package/dist/client/assets/{onboarding-CkoQ7XPG.js → onboarding-0pY55b33.js} +1 -1
- package/dist/client/assets/{org-install-BXFenQeY.js → org-install-CfS-9owX.js} +1 -1
- package/dist/client/assets/{org-layout-CWtH4lkJ.js → org-layout-WjhxFhVG.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-3y1WMApX.js → org-plugin-layout-CBd88Pps.js} +1 -1
- package/dist/client/assets/{page-seo-form-S_9vd5c_.js → page-seo-form-DA-M0CRU.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BGJM5zp7.js +1 -0
- package/dist/client/assets/{pair-Dqpt4Jli.js → pair-rWOsLIRO.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-LQMx4SEB.js → plugin-empty-state-BC-cPjsG.js} +1 -1
- package/dist/client/assets/{plugin-header-BZ1oWLb9.js → plugin-header-CZ1sX2n9.js} +1 -1
- package/dist/client/assets/{plugin-layout-BY7Ar40U.js → plugin-layout-egGFGy3C.js} +1 -1
- package/dist/client/assets/{popover-7ZV_x738.js → popover-H1IIsqsO.js} +1 -1
- package/dist/client/assets/{post-editor-CbtQkJeo.js → post-editor-D8Amc377.js} +1 -1
- package/dist/client/assets/{primitives-B1fkoae3.js → primitives-DXNs_riQ.js} +1 -1
- package/dist/client/assets/{profile-BIgGVZDN.js → profile-jQNt2qst.js} +1 -1
- package/dist/client/assets/project-app-view-CByPW7cJ.js +1 -0
- package/dist/client/assets/record-editor-BoDJjFQA.js +1 -0
- package/dist/client/assets/registry-aermVrqm.js +2 -0
- package/dist/client/assets/{registry-layout-Bp8ThmJv.js → registry-layout-CC29q8fz.js} +1 -1
- package/dist/client/assets/{require-capability-Cu6FsDEP.js → require-capability-g-UPmpGK.js} +1 -1
- package/dist/client/assets/{required-auth-layout-s-nnIbb3.js → required-auth-layout-B5sViZsY.js} +1 -1
- package/dist/client/assets/{reset-password-BfEM853p.js → reset-password-BC3ZM7w0.js} +1 -1
- package/dist/client/assets/{resizable-D2JXsfXz.js → resizable-DaIe2JEk.js} +1 -1
- package/dist/client/assets/{roles-cALq3Qwx.js → roles-C5M6mJ4v.js} +1 -1
- package/dist/client/assets/save-referenced-block-BLu5E_fA.js +1 -0
- package/dist/client/assets/{save-status-BcFNfyWL.js → save-status-DaG-SHKI.js} +1 -1
- package/dist/client/assets/{schema-form-B407z7tS.js → schema-form-BBSGBJV6.js} +1 -1
- package/dist/client/assets/{scroll-area-ChPJ-NEF.js → scroll-area-7dB1B4gR.js} +1 -1
- package/dist/client/assets/{search-input-Cray-A1q.js → search-input-DwwxFJsd.js} +1 -1
- package/dist/client/assets/{secrets-CSi3922A.js → secrets-BVqejBQE.js} +1 -1
- package/dist/client/assets/{sections-editor-Dn33QM0Q.js → sections-editor-B1P_XWwE.js} +1 -1
- package/dist/client/assets/{select-BhUuCBjD.js → select-Dn6Da_1F.js} +1 -1
- package/dist/client/assets/{select-model-C941S1nf.js → select-model-W59Bilmt.js} +1 -1
- package/dist/client/assets/seo-editor-CBSOqlcM.js +1 -0
- package/dist/client/assets/settings-layout-DypT7z1u.js +1 -0
- package/dist/client/assets/{settings-section-BmqyawBS.js → settings-section-BkgYqxH8.js} +1 -1
- package/dist/client/assets/{sheet-Devtg9cX.js → sheet-CxiAY8T5.js} +1 -1
- package/dist/client/assets/{shell-controls-3zx-sXr7.js → shell-controls-rZ6L5v7J.js} +1 -1
- package/dist/client/assets/{shell-layout-DRNHZhhH.js → shell-layout-B5B3hmRp.js} +1 -1
- package/dist/client/assets/{shell-route-loading-CDKyU1Jg.js → shell-route-loading-BURh1jIH.js} +1 -1
- package/dist/client/assets/{sidebar-D_Yb-5nE.js → sidebar-CIJpOENy.js} +1 -1
- package/dist/client/assets/{skeleton-DU4Yk3QQ.js → skeleton-B0e2OkSv.js} +1 -1
- package/dist/client/assets/{sortable.esm-DLnTPF68.js → sortable.esm-B6-kJBUo.js} +1 -1
- package/dist/client/assets/{spinner-DJudGYoz.js → spinner-C2ljLkNd.js} +1 -1
- package/dist/client/assets/{sso-Bc1ESWi6.js → sso-DutRn6kP.js} +1 -1
- package/dist/client/assets/{store-Ble4KI2L.js → store-CuKFTdG_.js} +1 -1
- package/dist/client/assets/store-registry-CRmNQ4V9.js +2 -0
- package/dist/client/assets/{studio-tools-CdiIGNug.js → studio-tools-DfxdEEgB.js} +1 -1
- package/dist/client/assets/{switch-CbDNpyYj.js → switch-DDGBJlE2.js} +1 -1
- package/dist/client/assets/{tab-id-CixUfikt.js → tab-id-TBSp1YxU.js} +3 -3
- package/dist/client/assets/{table-C7al_g9w.js → table-GnXYzms9.js} +1 -1
- package/dist/client/assets/{tabs-DpPbTcOX.js → tabs-BajnAGhM.js} +1 -1
- package/dist/client/assets/{task-status-B4xhXa10.js → task-status-fWcsMePP.js} +1 -1
- package/dist/client/assets/{textarea-CHCvnh_8.js → textarea-JAS7Y9kw.js} +1 -1
- package/dist/client/assets/{toggle-group-DUH3UCsh.js → toggle-group-Bv21I6Mc.js} +1 -1
- package/dist/client/assets/{toolbar-Dje6lkWt.js → toolbar-CkGflKXn.js} +1 -1
- package/dist/client/assets/{tools-list-BYNSxX2E.js → tools-list-DKrbt2O-.js} +1 -1
- package/dist/client/assets/{tooltip-BIymZbyc.js → tooltip-CKtclZb-.js} +1 -1
- package/dist/client/assets/{types-CmWRxh2O.js → types-2N8PTdbg.js} +1 -1
- package/dist/client/assets/{use-ai-providers-i1tqdzqX.js → use-ai-providers-CGLipwx3.js} +1 -1
- package/dist/client/assets/{use-automations-DGwM8rjk.js → use-automations-BChOAOA6.js} +1 -1
- package/dist/client/assets/{use-capability-C6m2-0Ci.js → use-capability-czp9i90U.js} +1 -1
- package/dist/client/assets/{use-clock-tick-B8zeuW9S.js → use-clock-tick-_Fh5zTFQ.js} +1 -1
- package/dist/client/assets/{use-collections-CPla-8Z_.js → use-collections-CrAY0KoX.js} +1 -1
- package/dist/client/assets/{use-connection-7yE-FpPg.js → use-connection-NiFefepq.js} +1 -1
- package/dist/client/assets/{use-copy-CMgaIgR7.js → use-copy-CQfxrmWX.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BWWSVfRV.js → use-create-virtual-mcp-DwKQGNi1.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DtXHyjU0.js → use-debounced-autosave-DCM6oAgZ.js} +1 -1
- package/dist/client/assets/{use-delete-connection-v7_IOcbu.js → use-delete-connection-bIYVec_d.js} +1 -1
- package/dist/client/assets/{use-file-configs-BmBPsN9j.js → use-file-configs-CqXWCLQv.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-COS9eomA.js → use-infinite-scroll-CNFLUrB_.js} +1 -1
- package/dist/client/assets/{use-list-state-Cl12C-eO.js → use-list-state-DRxXstLB.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BW6MR0tW.js → use-mcp-client-B46VYAN_.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DauhYIMV.js → use-mcp-prompts-BfYOND3X.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BdvRRDeD.js → use-mcp-tools-wPegb5Xs.js} +1 -1
- package/dist/client/assets/{use-members-UnrPTEyo.js → use-members-DTpTFucv.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-7tEptzcr.js → use-navigate-to-agent-DL0_jMva.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-D_nAk9Nf.js → use-org-auth-client-DFhI1mXp.js} +1 -1
- package/dist/client/assets/{use-org-sso-BZSKGD_q.js → use-org-sso-B2JHlDcL.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DDLxus16.js → use-organization-roles-Do917bwO.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Ds8za6ZV.js → use-organization-settings-CGdaVuD7.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Bo5wHKtk.js → use-registry-connections-B7_YY-15.js} +1 -1
- package/dist/client/assets/{use-secrets-3j7bfIX7.js → use-secrets-qOLSEePj.js} +1 -1
- package/dist/client/assets/use-status-sounds-EA9ENH60.js +1 -0
- package/dist/client/assets/{use-view-mode-CdHjt_dk.js → use-view-mode-C2K6zcu8.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-C5aNldwS.js → use-virtual-mcp-DHileccV.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-vMxng0_U.js +1 -0
- package/dist/client/assets/{useRouterState-CKqJqhNS.js → useRouterState-93R-QVdz.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-_hGeqDYv.js +1 -0
- package/dist/client/assets/{user-D4kiCnS_.js → user-T0gsPnBH.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-D6mTnqbc.js → view-mode-toggle-BvPi1TV1.js} +1 -1
- package/dist/client/assets/watch-sse-pool-BSePGeIN.js +1 -0
- package/dist/client/assets/{workflow-YStE-9Wj.js → workflow-aar8VltW.js} +1 -1
- package/dist/client/assets/workflow-detail-Cyps73VW.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/add-section-modal-BCNLSlG_.js +0 -1
- package/dist/client/assets/ai-providers-DwCvc_zL.js +0 -1
- package/dist/client/assets/app-editor-DUutwvll.js +0 -1
- package/dist/client/assets/collection-detail-jnv2JHtL.js +0 -1
- package/dist/client/assets/create-sse-subscription-BS5983N4.js +0 -1
- package/dist/client/assets/decopilot-sse-pool-C9YWBszR.js +0 -1
- package/dist/client/assets/file-explorer-B31Paeha.js +0 -2
- package/dist/client/assets/github-repo-picker-CA1Lsyag.js +0 -4
- package/dist/client/assets/index-Beg4zk5F.js +0 -1
- package/dist/client/assets/index-Dlen5TT1.js +0 -1
- package/dist/client/assets/page-seo-sheet-A616YBcI.js +0 -1
- package/dist/client/assets/project-app-view-C7vmMA1u.js +0 -1
- package/dist/client/assets/record-editor-Sic5IUJ0.js +0 -1
- package/dist/client/assets/registry-CNVAuq_t.js +0 -2
- package/dist/client/assets/save-referenced-block-CL_4PMgI.js +0 -1
- package/dist/client/assets/seo-editor-CSQJAMXP.js +0 -1
- package/dist/client/assets/settings-layout-mUcXrMvm.js +0 -1
- package/dist/client/assets/store-registry-Csepzf8q.js +0 -2
- package/dist/client/assets/use-status-sounds-TuoDiwSP.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CMP19UQ8.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Dsr82JBj.js +0 -1
- package/dist/client/assets/workflow-detail-Vo_71HSM.js +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e as Ke,r as l,j as i,l as re,B as fe,c as Ve,G as ut,o as $,K as Te}from"./index-DxEUOQQs.js";import{F as mt,l as pt}from"./index-BATH3mQn.js";import{_ as ht,ar as xt,as as gt,at as ae,au as yt,H as $e}from"./agent-icon-BL0Zyuef.js";import{a as wt}from"./Tool01-CHRhaVsB.js";import{s as jt}from"./XClose-B2Xxw9ZV.js";import{S as bt}from"./scroll-area-ChPJ-NEF.js";import{b as Re,T as Oe,a as ze}from"./tooltip-BIymZbyc.js";import{A as vt,a as Ct,b as Nt,c as St,d as Dt,e as kt,f as Ft,g as Lt}from"./alert-dialog-DzLqwXYd.js";import{a as Et}from"./chat-context-C10uFg_9.js";import{u as Pt}from"./shell-layout-DRNHZhhH.js";import{a7 as le,a8 as Ae,a9 as Tt}from"./index-DnaxJsHb.js";import{c as $t,e as Rt,b as Ot,d as zt,a as At,D as Wt}from"./dialog-DlK91HiY.js";import{I as We}from"./input-CzgGcI3V.js";import{C as It,c as _,d as Ie,e as Mt,f as Kt}from"./shell-route-loading-CDKyU1Jg.js";import{t as Vt}from"./ChevronDown-BbO00aHm.js";import{i as Bt}from"./ChevronRight-D4rmSZYg.js";import{i as Gt}from"./ZoomOut-BhGMK1ir.js";import{E as qt,q as Me,r as he,s as Qt,t as Ut,v as Ht,w as M,x as ce,g as xe,y as ge,z as Jt,A as Xt,B as ye,C as de,D as we,G as Yt,I as Zt}from"./header-tab-button-B8CWwAih.js";import"./AlertCircle-C2JPSNIc.js";import"./SwitchHorizontal01-uOesGvrj.js";import"./RefreshCcw01-De11YcWY.js";import"./XCircle-DSNLgcsz.js";import"./ArrowUpRight-Dtm-fMoi.js";import"./ZapSquare-B7LKxpnQ.js";import"./Users03-BZnIYCM1.js";import"./CheckCircle-B1gk6AbW.js";import"./Check-CJuLJZRg.js";import"./ChevronLeft-CyC6kPhn.js";import"./ChevronUp-DC9Fz2he.js";import"./DotsVertical-DVI2JfBT.js";import"./Container-Ck07PAMh.js";import"./Eye-8SpX7ax1.js";import"./Globe01-_Gozs0-K.js";import"./FilterLines-DXoB5fi6.js";import"./Star01-CROTt7h-.js";import"./Palette-DvOu8iad.js";import"./HardDrive-D6YFkngp.js";import"./Stars02-Bb_Lb3Iw.js";import"./Key01-DtPyr_d4.js";import"./LayoutLeft-zPlWqXYO.js";import"./LinkExternal01-CMKC3Ppc.js";import"./Monitor01-Dg9LYm9U.js";import"./Sun--jg0YyzU.js";import"./Play-BGgNLf1z.js";import"./Plus-D3Yt_klI.js";import"./SearchMd-CkwYmYFX.js";import"./Settings02-RkWi-oHt.js";import"./Shield01-BkzImfUK.js";import"./Stars01-BZ01dqEy.js";import"./Trash01-D9jT6VSX.js";import"./Upload01-B6COGlQo.js";import"./User01-CWJ4O2R8.js";import"./Users01-Bsb338aB.js";import"./X-CH7nrxK3.js";import"./Zap-CtPT7vkQ.js";import"./select-BhUuCBjD.js";import"./tab-id-CixUfikt.js";import"./use-mcp-client-BW6MR0tW.js";import"./decopilot-sse-pool-C9YWBszR.js";import"./create-sse-subscription-BS5983N4.js";import"./studio-tools-CdiIGNug.js";import"./use-virtual-mcp-C5aNldwS.js";import"./use-collections-CPla-8Z_.js";import"./use-ai-providers-i1tqdzqX.js";import"./use-organization-settings-Ds8za6ZV.js";import"./avatar-BL6j7EM4.js";import"./required-auth-layout-s-nnIbb3.js";import"./useRouterState-CKqJqhNS.js";import"./use-org-sso-BZSKGD_q.js";import"./agent-capabilities-v4Rwjpb1.js";import"./pair-Dqpt4Jli.js";import"./use-clock-tick-B8zeuW9S.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CMgaIgR7.js";import"./file-type-icon-g69R8oLw.js";import"./content-blocks-o63cs2vh.js";import"./types-CmWRxh2O.js";import"./integration-icon-TXgAkIpf.js";import"./use-navigate-to-agent-7tEptzcr.js";import"./use-connection-7yE-FpPg.js";import"./use-mcp-prompts-DauhYIMV.js";import"./form-8fnZRdSd.js";import"./label-Bz4-Isgq.js";import"./spinner-DJudGYoz.js";import"./drawer-We__DvM1.js";import"./collection-search-CVFFSy0S.js";import"./tabs-DpPbTcOX.js";import"./toggle-group-DUH3UCsh.js";import"./connect-desktop-dialog-nMepiraO.js";import"./agent-icons-AMlXFz_9.js";import"./checkbox-EJ-FS6-O.js";import"./skeleton-DU4Yk3QQ.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BmqyawBS.js";import"./card-OOIE0uKL.js";import"./popover-7ZV_x738.js";import"./command-BeSVNuhP.js";import"./index-ZOhZPSgS.js";import"./useInfiniteQuery-CMP19UQ8.js";import"./infiniteQueryObserver-_wx8vha2.js";import"./sortable.esm-DLnTPF68.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BAVVkgt5.js";import"./use-registry-connections-Bo5wHKtk.js";import"./extract-connection-data-Deygnaxj.js";import"./generate-id-DHU56BsF.js";import"./collections-BMUil3in.js";import"./collection-tabs-CArtFM6T.js";import"./badge-Cc4XouWa.js";import"./textarea-CHCvnh_8.js";import"./connection-form-helpers-C7w-EHHd.js";import"./use-infinite-scroll-COS9eomA.js";import"./useSuspenseInfiniteQuery-Dsr82JBj.js";import"./index-DBE0AwRo.js";import"./dropdown-menu-9oUOEimm.js";import"./question-004-sINsf4GQ.js";import"./sidebar-D_Yb-5nE.js";import"./sheet-Devtg9cX.js";import"./use-status-sounds-TuoDiwSP.js";import"./empty-state-DWre-pls.js";import"./toolbar-Dje6lkWt.js";import"./resizable-D2JXsfXz.js";import"./use-mcp-tools-BdvRRDeD.js";import"./use-capability-C6m2-0Ci.js";import"./user-D4kiCnS_.js";import"./tools-list-BYNSxX2E.js";import"./switch-CbDNpyYj.js";import"./use-debounced-autosave-DtXHyjU0.js";import"./index-Daxt8Oww.js";import"./search-input-Cray-A1q.js";import"./use-secrets-3j7bfIX7.js";import"./github-repo-picker-CA1Lsyag.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-CMUFrLXB.js";import"./view-mode-toggle-D6mTnqbc.js";import"./select-model-C941S1nf.js";import"./use-automations-DGwM8rjk.js";import"./monaco-editor-H7pARgsv.js";import"./automation-runs-DAMwdbwt.js";import"./table-C7al_g9w.js";import"./use-members-UnrPTEyo.js";import"./use-org-auth-client-D_nAk9Nf.js";import"./task-status-B4xhXa10.js";import"./automation-list-row-6z14sJQm.js";import"./use-create-virtual-mcp-BWWSVfRV.js";import"./index-C5kgHpFv.js";import"./hover-card-DwcwURxp.js";const _t={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function en(y){const e=Ke.c(51),{open:c,mode:K,initialName:X,parentLabel:Q,isPending:A,onSubmit:V,onOpenChange:P}=y,W=X===void 0?"":X,o=A===void 0?!1:A,[p,R]=l.useState(W),[I,B]=l.useState(c),f=_t[K];c!==I&&(B(c),c&&R(W));let F;e[0]!==o||e[1]!==P?(F=E=>{!E&&!o&&P(!1)},e[0]=o,e[1]=P,e[2]=F):F=e[2];const U=F;let G;e[3]!==o||e[4]!==p||e[5]!==V?(G=async E=>{E.preventDefault();const z=p.trim();!z||o||await V(z)},e[3]=o,e[4]=p,e[5]=V,e[6]=G):G=e[6];const q=G;let L;e[7]!==f.title?(L=i.jsx($t,{children:f.title}),e[7]=f.title,e[8]=L):L=e[8];let N;e[9]!==f.description?(N=i.jsx(Rt,{children:f.description}),e[9]=f.description,e[10]=N):N=e[10];let O;e[11]!==L||e[12]!==N?(O=i.jsxs(Ot,{children:[L,N]}),e[11]=L,e[12]=N,e[13]=O):O=e[13];let S;e[14]!==Q?(S=Q&&i.jsxs("div",{className:"space-y-1.5",children:[i.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),i.jsx(We,{value:Q,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=Q,e[15]=S):S=e[15];let D;e[16]===Symbol.for("react.memo_cache_sentinel")?(D=i.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=D):D=e[16];let j;e[17]===Symbol.for("react.memo_cache_sentinel")?(j=E=>R(E.target.value),e[17]=j):j=e[17];let b;e[18]!==f.placeholder||e[19]!==o||e[20]!==p?(b=i.jsxs("div",{className:"space-y-1.5",children:[D,i.jsx(We,{id:"file-explorer-name",value:p,onChange:j,placeholder:f.placeholder,autoFocus:!0,disabled:o})]}),e[18]=f.placeholder,e[19]=o,e[20]=p,e[21]=b):b=e[21];let h;e[22]!==b||e[23]!==S?(h=i.jsxs("div",{className:"space-y-4 py-4",children:[S,b]}),e[22]=b,e[23]=S,e[24]=h):h=e[24];let x;e[25]!==P?(x=()=>P(!1),e[25]=P,e[26]=x):x=e[26];let v;e[27]!==o||e[28]!==x?(v=i.jsx(fe,{type:"button",variant:"outline",onClick:x,disabled:o,children:"Cancel"}),e[27]=o,e[28]=x,e[29]=v):v=e[29];let C;e[30]!==o||e[31]!==p?(C=!p.trim()||o,e[30]=o,e[31]=p,e[32]=C):C=e[32];let u;e[33]!==f.submit||e[34]!==o?(u=o?i.jsxs(i.Fragment,{children:[i.jsx(re,{size:14,className:"animate-spin"}),"Saving…"]}):f.submit,e[33]=f.submit,e[34]=o,e[35]=u):u=e[35];let k;e[36]!==C||e[37]!==u?(k=i.jsx(fe,{type:"submit",disabled:C,children:u}),e[36]=C,e[37]=u,e[38]=k):k=e[38];let m;e[39]!==v||e[40]!==k?(m=i.jsxs(zt,{children:[v,k]}),e[39]=v,e[40]=k,e[41]=m):m=e[41];let g;e[42]!==q||e[43]!==h||e[44]!==m||e[45]!==O?(g=i.jsx(At,{className:"sm:max-w-md",children:i.jsxs("form",{onSubmit:q,children:[O,h,m]})}),e[42]=q,e[43]=h,e[44]=m,e[45]=O,e[46]=g):g=e[46];let T;return e[47]!==U||e[48]!==c||e[49]!==g?(T=i.jsx(Wt,{open:c,onOpenChange:U,children:g}),e[47]=U,e[48]=c,e[49]=g,e[50]=T):T=e[50],T}const tn="#d9a441";function nn(y){const e=Ke.c(45),{node:c,depth:K,isExpanded:X,isSelected:Q,isLoading:A,fileVisual:V,onOpen:P,onSelect:W,onNewFile:o,onNewFolder:p,onCopyPath:R,onCopyRelativePath:I,onRename:B,onDelete:f}=y,F=A===void 0?!1:A,U=c.kind==="directory",{Icon:G,color:q}=V,L=Q&&"bg-accent";let N;e[0]!==L?(N=Ve("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",L),e[0]=L,e[1]=N):N=e[1];const O=`${K*14+8}px`;let S;e[2]!==O?(S={paddingLeft:O},e[2]=O,e[3]=S):S=e[3];let D;e[4]!==P||e[5]!==W?(D=()=>{W(),P()},e[4]=P,e[5]=W,e[6]=D):D=e[6];let j;e[7]!==G||e[8]!==q||e[9]!==U||e[10]!==X||e[11]!==F?(j=U?i.jsxs(i.Fragment,{children:[F?i.jsx(re,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):X?i.jsx(Vt,{size:14,className:"shrink-0 text-muted-foreground"}):i.jsx(Bt,{size:14,className:"shrink-0 text-muted-foreground"}),i.jsx(Gt,{size:16,className:"shrink-0",style:{color:tn}})]}):i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"w-3.5 shrink-0"}),i.jsx(G,{size:16,className:"shrink-0",style:{color:q}})]}),e[7]=G,e[8]=q,e[9]=U,e[10]=X,e[11]=F,e[12]=j):j=e[12];let b;e[13]!==c.name?(b=i.jsx("span",{className:"truncate",children:c.name}),e[13]=c.name,e[14]=b):b=e[14];let h;e[15]!==N||e[16]!==S||e[17]!==D||e[18]!==j||e[19]!==b?(h=i.jsx(It,{asChild:!0,children:i.jsxs("button",{type:"button",className:N,style:S,onClick:D,children:[j,b]})}),e[15]=N,e[16]=S,e[17]=D,e[18]=j,e[19]=b,e[20]=h):h=e[20];let x;e[21]!==o?(x=i.jsx(_,{onSelect:o,children:"New File"}),e[21]=o,e[22]=x):x=e[22];let v;e[23]!==p?(v=i.jsx(_,{onSelect:p,children:"New Folder"}),e[23]=p,e[24]=v):v=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(Ie,{}),e[25]=C):C=e[25];let u;e[26]!==R?(u=i.jsx(_,{onSelect:R,children:"Copy Path"}),e[26]=R,e[27]=u):u=e[27];let k;e[28]!==I?(k=i.jsx(_,{onSelect:I,children:"Copy Relative Path"}),e[28]=I,e[29]=k):k=e[29];let m;e[30]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Ie,{}),e[30]=m):m=e[30];let g;e[31]!==B?(g=i.jsx(_,{onSelect:B,children:"Rename"}),e[31]=B,e[32]=g):g=e[32];let T;e[33]!==f?(T=i.jsx(_,{variant:"destructive",onSelect:f,children:"Delete"}),e[33]=f,e[34]=T):T=e[34];let E;e[35]!==x||e[36]!==v||e[37]!==u||e[38]!==k||e[39]!==g||e[40]!==T?(E=i.jsxs(Mt,{className:"w-52",children:[x,v,C,u,k,m,g,T]}),e[35]=x,e[36]=v,e[37]=u,e[38]=k,e[39]=g,e[40]=T,e[41]=E):E=e[41];let z;return e[42]!==E||e[43]!==h?(z=i.jsxs(Kt,{children:[h,E]}),e[42]=E,e[43]=h,e[44]=z):z=e[44],z}pt.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function je(y,e,c,K){return`/api/${y}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(c)}/${K}`}function rn(y){const e=M(y);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}const sn="#94a3b8";function on(y){const e=y.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?{Icon:ae,color:"#3b82f6"}:e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?{Icon:ae,color:"#d9a441"}:e.endsWith(".json")?{Icon:yt,color:"#cb9b3f"}:e.endsWith(".css")||e.endsWith(".scss")?{Icon:ae,color:"#06b6d4"}:e.endsWith(".html")||e.endsWith(".xml")?{Icon:ae,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(e)?{Icon:wt,color:"#a855f7"}:e.endsWith(".md")||e.endsWith(".mdx")?{Icon:$e,color:"#64748b"}:{Icon:$e,color:sn}}function Qi({orgSlug:y,virtualMcpId:e,branch:c,openPath:K}){const[X,Q]=l.useState({files:[],directories:[],truncated:!1}),{files:A,directories:V}=X,[P,W]=l.useState(new Set),[o,p]=l.useState(null),[R,I]=l.useState(null),[B,f]=l.useState([]),[F,U]=l.useState(""),[G,q]=l.useState(!1),[L,N]=l.useState(!1),[,O]=l.useState(new Set),[S,D]=l.useState(new Set),j=l.useRef(0),b=l.useRef(null),h=l.useRef(new Set),x=l.useRef(new Map);function v(t){O(n=>{const r=typeof t=="function"?t(n):t;return h.current=r,r})}const[C,u]=l.useState(new Map),k=l.useRef(null),[m,g]=l.useState(null),{sendMessage:T}=Et(),{setChatOpen:E}=Pt(),z=ut(),[w,H]=l.useState(null),[J,ue]=l.useState(null),[ee,ie]=l.useState(!1);async function te(t,n){const r=await fetch(je(y,e,c,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const s=await r.json().catch(()=>({}));throw new Error(s.error??`Request failed (${r.status})`)}return r.json()}async function se(){z.invalidateQueries({queryKey:Ae(y,e,c)})}function be(t,n){navigator.clipboard.writeText(n).then(()=>$.success(`${t} copied`),()=>$.error(`Failed to copy ${t.toLowerCase()}`))}function Be(t){const n=Yt(t);if(!n)return;const r=`${y}/${e}/${c}`;z.setQueryData(Te.decofile(r),s=>{if(!s)return s;const{[n]:a,...d}=s;return d}),z.invalidateQueries({queryKey:Te.liveMeta(r)})}function Ge(t){const n=t.kind==="file"?[t.path]:A.filter(r=>r.startsWith(".deco/blocks/")).map(r=>ce(r)).filter(r=>r===t.path||r.startsWith(`${t.path}/`));for(const r of n)Be(r)}function qe(t){const n=ce(t);return B.filter(r=>{if(r!==n&&!r.startsWith(`${n}/`))return!1;const s=C.get(r);return!!(s?.loaded&&s.editorValue!==s.savedContent)})}function ve(t){f(n=>n.map(r=>t(r)).filter(r=>r!==null)),p(n=>n&&t(n)),u(n=>{const r=new Map;for(const[s,a]of n){const d=t(s);d&&r.set(d,a)}return r}),I(n=>{if(!n)return n;const r=t(n.path);return r?r===n.path?n:{...n,path:r,name:r.split("/").pop()??r}:null})}function Qe(t){const n=ce(t);I(r=>r&&(r.path===n||r.path.startsWith(`${n}/`)?null:r)),ve(r=>r===n||r.startsWith(`${n}/`)?null:r)}async function Ue(t){if(!w)return;const n=de(w.parentDir,t);if(we(n,A,V))throw new Error(`"${t}" already exists`);await te("write",{path:M(n),content:""}),await ne(),await se(),H(null),me(n)}async function He(t){if(!w)return;const n=de(w.parentDir,t);if(we(n,A,V))throw new Error(`"${t}" already exists`);const r=M(n);await te("mkdir",{path:r}),Q(s=>({...s,directories:s.directories.includes(r)?s.directories:[...s.directories,r]})),await ne(),await se(),H(null),W(s=>{const a=new Set(s);for(const d of he(n))a.add(d);return a.add(n),a}),I({name:t,path:n,kind:"directory",children:[]})}async function Je(t){if(!w)return;const n=w.node.path,r=ye(n),s=de(r,t);if(s===n){H(null);return}if(we(s,A,V))throw new Error(`"${t}" already exists`);await te("rename",{from:M(n),to:M(s)}),ve(a=>a===n?s:a.startsWith(`${n}/`)?de(s,a.slice(n.length+1)):a),await ne(),await se(),H(null)}async function Xe(t){ie(!0);try{await te("unlink",{path:M(t.path),recursive:t.kind==="directory"}),Ge(t),Qe(t.path),await ne(),await se(),ue(null),$.success(`Deleted "${t.name}"`)}catch(n){$.error(n instanceof Error?n.message:"Delete failed")}finally{ie(!1)}}async function Ye(t){const n=Xt(t);if(n){$.error(n);return}ie(!0);try{w?.mode==="new-file"?(await Ue(t),$.success(`Created "${t}"`)):w?.mode==="new-folder"?(await He(t),$.success(`Created folder "${t}"`)):w?.mode==="rename"&&(await Je(t),$.success(`Renamed to "${t}"`))}catch(r){$.error(r instanceof Error?r.message:"Operation failed")}finally{ie(!1)}}const Ce=l.useRef(!1);Ce.current||(Ce.current=!0,b.current=ne());const[Ze,_e]=l.useState(null);if(K&&K!==Ze){_e(K);const t=K;queueMicrotask(()=>{rn(t)&&me(t).catch(n=>{$.error(n instanceof Error?n.message:"Failed to open file")})})}async function Ne(t){const n=await te("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Se(t,n,r){if(r!==j.current)return!1;let s=!1;return Q(a=>{const d=n?Zt(a.files,a.directories,t,a.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return s=!!d.truncated,{files:d.files,directories:d.directories,truncated:s}}),s&&$.warning("File list truncated — some files may be hidden"),s}async function et(t){const n=x.current.get(t);if(n)return n;const r=j.current,s=(async()=>{const a=await Ne({pattern:"**/*",path:M(t),limit:Me}),d=Se(a,!0,r);return!d&&r===j.current&&v(Y=>{const oe=new Set(Y);return oe.add(t),oe}),d})();x.current.set(t,s);try{return await s}finally{x.current.delete(t)}}async function De(t){if(!ge(t,h.current))return!1;D(n=>new Set(n).add(t));try{return await et(t)}finally{D(n=>{const r=new Set(n);return r.delete(t),r})}}async function tt(t){const n=new Set(h.current);for(const r of he(t)){if(!ge(r,n))continue;if(await De(r))throw new Error("Folder listing truncated — expand again to load more");n.add(r)}}async function ne(){const t=++j.current;x.current.clear(),q(!0),v(new Set),W(new Set),D(new Set);try{const n=await Ne({pattern:"**/*",limit:Me,maxDepth:qt});Se(n,!1,t),N(!0)}catch{L&&$.error("Failed to refresh file tree")}finally{q(!1)}}async function ke(t){if(!C.get(t)?.loaded){u(r=>{const s=new Map(r);return s.set(t,{savedContent:"",editorValue:"",loaded:!1}),s});try{const r=await fetch(je(y,e,c,"read"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:M(t),full:!0})});if(!r.ok)return;const s=await r.json(),a=Jt(s.content??"");u(d=>{const Y=new Map(d);return Y.set(t,{savedContent:a,editorValue:a,loaded:!0}),Y})}catch{}}}async function nt(t,n){try{const r=await fetch(je(y,e,c,"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:M(t),content:n})});if(!r.ok){le("file save failed",{path:t,status:r.status});return}le("file saved via sandbox /write",{path:t}),z.invalidateQueries({queryKey:Ae(y,e,c)});try{const s=await Tt(y,e,c);le("git status after save",s)}catch(s){le("git status after save failed",{path:t,error:s instanceof Error?s.message:String(s)})}u(s=>{const a=new Map(s),d=a.get(t);return d&&a.set(t,{...d,savedContent:n}),a})}catch{}}function rt(t){p(t),I({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),g(null),B.includes(t)||f(n=>[...n,t]),ke(t)}function it(t){f(n=>{const r=n.filter(s=>s!==t);return o===t&&p(r[r.length-1]??null),r}),u(n=>{const r=new Map(n);return r.delete(t),r})}function Fe(t){W(n=>{const r=new Set(n);return r.has(t)?r.delete(t):r.add(t),r})}async function st(t){if(ge(t,h.current))try{if(await De(t))return}catch(n){$.error(n instanceof Error?n.message:"Failed to load folder");return}Fe(t)}async function ot(t,n){if(n){Fe(t);return}await st(t)}async function me(t){await b.current,await tt(t);const n=he(t);W(r=>{const s=new Set(r);for(const a of n)s.add(a);return s}),rt(t)}function at(){return R?.kind==="directory"?R.path:R?.kind==="file"?ye(R.path):o?ye(o):"/"}function Le(t){const n=at();H({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const lt=Qt(A,V),Ee=Ut(lt,P),Pe=F?Ee.filter(t=>t.node.name.toLowerCase().includes(F.toLowerCase())):Ee,Z=o?C.get(o):null,ct=Z?.loaded&&Z.editorValue!==Z.savedContent,pe=J?qe(J.path):[],dt=(t,n)=>{k.current=t,t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!o)return;const r=t.getValue();await nt(o,r)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const r=t.getSelection(),s=t.getModel();if(!r||!s||!o)return;const a=s.getValueInRange(r);g({filePath:o,lineStart:r.startLineNumber,lineEnd:r.endLineNumber,selectedCode:a})})};function ft(t){if(!m)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${m.filePath}\``,`**Lines:** ${m.lineStart}–${m.lineEnd}`];if(m.selectedCode){const r=xe(m.filePath),s=m.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+r,s,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),E(!0),T({parts:[{type:"text",text:n.join(`
|
|
2
|
-
`)}]}),g(null)}return G&&!L?i.jsx("div",{className:"flex items-center justify-center h-full w-full",children:i.jsx(re,{size:20,className:"animate-spin text-muted-foreground"})}):i.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[i.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[i.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[i.jsxs("div",{className:"relative min-w-0 flex-1",children:[i.jsx(ht,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),i.jsx("input",{type:"text",value:F,onChange:t=>U(t.target.value),placeholder:"Search files...","aria-label":"Search files",className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),i.jsxs(Re,{children:[i.jsx(Oe,{asChild:!0,children:i.jsx(fe,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New file",onClick:()=>Le("new-file"),children:i.jsx(xt,{size:14})})}),i.jsx(ze,{side:"bottom",children:"New file"})]}),i.jsxs(Re,{children:[i.jsx(Oe,{asChild:!0,children:i.jsx(fe,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New folder",onClick:()=>Le("new-folder"),children:i.jsx(gt,{size:14})})}),i.jsx(ze,{side:"bottom",children:"New folder"})]})]}),i.jsx(bt,{className:"flex-1",children:i.jsxs("div",{className:"py-1",children:[Pe.map(t=>{const{node:n,depth:r}=t,s=n.kind==="directory",a=P.has(n.path),d=R?.path===n.path,Y=Ht(n.path,n.kind),oe=s&&S.has(n.path);return i.jsx(nn,{node:n,depth:r,isExpanded:a,isSelected:d,isLoading:oe,fileVisual:on(n.name),onSelect:()=>I(n),onOpen:()=>{s?ot(n.path,a):me(n.path)},onNewFile:()=>H({mode:"new-file",node:n,parentDir:Y}),onNewFolder:()=>H({mode:"new-folder",node:n,parentDir:Y}),onCopyPath:()=>be("Path",ce(n.path)),onCopyRelativePath:()=>be("Relative path",M(n.path)),onRename:()=>H({mode:"rename",node:n,parentDir:Y}),onDelete:()=>ue(n)},n.path)}),L&&Pe.length===0&&i.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:F?`No files match "${F}"`:"No files found"})]})})]}),i.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[B.length>0&&i.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:B.map(t=>{const n=C.get(t),r=n?.loaded&&n.editorValue!==n.savedContent,s=o===t,a=t.split("/").pop()??t;return i.jsxs("div",{className:Ve("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",s?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{p(t),ke(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":s,children:[i.jsx("span",{className:"truncate max-w-32",children:a}),r&&i.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),i.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:d=>{d.stopPropagation(),it(t)},children:i.jsx(jt,{size:12})})]},t)})}),m&&i.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:i.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const r=t.currentTarget.elements.namedItem("askAiInput");r.value.trim()&&ft(r.value)},children:[i.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:"Ask the AI...",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&g(null)}}),i.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:"Send",children:i.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[i.jsx("title",{children:"Send"}),i.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),i.jsx("div",{className:"flex-1 overflow-hidden",children:o&&Z?.loaded?i.jsx(mt,{language:xe(o),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:Z.editorValue,path:o,onChange:t=>{const n=o;n&&u(r=>{const s=new Map(r),a=s.get(n);return a&&s.set(n,{...a,editorValue:t??""}),s})},onMount:dt,loading:i.jsx("div",{className:"flex items-center justify-center h-full w-full",children:i.jsx(re,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},o):o&&!Z?.loaded?i.jsx("div",{className:"flex items-center justify-center h-full w-full",children:i.jsx(re,{size:20,className:"animate-spin text-muted-foreground"})}):i.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:"Select a file to edit"})}),o&&i.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[i.jsx("span",{className:"truncate",children:o}),i.jsxs("span",{children:[ct?"Modified":"Saved"," ·"," ",xe(o)]})]})]}),i.jsx(en,{open:w!==null,mode:w?.mode??"new-file",initialName:w?.mode==="rename"?w.node.name:"",parentLabel:w&&w.mode!=="rename"?w.parentDir==="/"?"/":M(w.parentDir):void 0,isPending:ee,onSubmit:Ye,onOpenChange:t=>{!t&&!ee&&H(null)}}),i.jsx(vt,{open:J!==null,onOpenChange:t=>{!t&&!ee&&ue(null)},children:i.jsxs(Ct,{children:[i.jsxs(Nt,{children:[i.jsxs(St,{children:["Delete ",J?.kind==="directory"?"folder":"file","?"]}),i.jsxs(Dt,{children:["This will permanently delete"," ",i.jsx("span",{className:"font-mono",children:J?.name}),J?.kind==="directory"?" and everything inside it.":".",pe.length>0&&i.jsxs(i.Fragment,{children:[" ",pe.length===1?"One open file has unsaved changes that will be lost.":`${pe.length} open files have unsaved changes that will be lost.`]})]})]}),i.jsxs(kt,{children:[i.jsx(Ft,{disabled:ee,children:"Cancel"}),i.jsx(Lt,{disabled:ee||!J,onClick:t=>{t.preventDefault(),J&&Xe(J)},children:"Delete"})]})]})})]})}export{Qi as FileExplorer};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{e as $,j as t,q as J,b as he,G as ae,r as L,M as ke,J as Re,R as ie,n as xe,K as U,a as be,t as oe,o as D,B as se,c as V,l as Y,s as Ae,F as Oe}from"./index-DxEUOQQs.js";import{b as Ge}from"./use-virtual-mcp-C5aNldwS.js";import{k as le}from"./use-navigate-to-agent-7tEptzcr.js";import{b as Le,u as ye}from"./use-connection-7yE-FpPg.js";import{W as Pe,u as H,a as ce}from"./use-mcp-client-BW6MR0tW.js";import{D as we,a as Ce,b as Ie,c as Ne,d as $e}from"./dialog-DlK91HiY.js";import{i as ue}from"./RefreshCcw01-De11YcWY.js";import{C as je}from"./collection-search-CVFFSy0S.js";import{C as pe}from"./checkbox-EJ-FS6-O.js";import{n as He}from"./agent-icon-BL0Zyuef.js";import{u as Me}from"./use-mcp-tools-BdvRRDeD.js";import{e as De}from"./extract-connection-data-Deygnaxj.js";const Ue=`<svg width="74" height="84" viewBox="0 0 74 84" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M63.4462 15.3005C63.1414 15.2764 57.2333 15.1845 57.2333 15.1845C57.2333 15.1845 52.2906 10.3849 51.8019 9.89426C51.6127 9.71981 51.3729 9.60981 51.1172 9.58008V83.0253L73.2664 77.5175C73.2664 77.5175 64.2277 16.3953 64.1696 15.9772C64.1417 15.7997 64.055 15.6366 63.9235 15.5139C63.7919 15.3913 63.6255 15.3162 63.4462 15.3005Z" fill="#171717"/>
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M32.748 0.00356357C34.8334 -0.0568526 36.5759 0.651298 37.9307 2.10122C38.0276 2.20613 38.1209 2.31463 38.2109 2.42544L38.2354 2.42349C38.4434 2.40657 38.6494 2.38638 38.8574 2.38638H38.8672C41.9831 2.3913 44.5571 4.16796 46.3184 7.527C46.8023 8.4621 47.2004 9.43976 47.5068 10.4469L49.9883 9.67837C50.3609 9.56961 51.315 9.42163 51.8037 9.90981L51.9922 82.3883L51.1162 83.0387L0 74.1979C0.0195597 74.0466 6.09952 27.0238 6.3291 25.3629C6.63636 23.1661 6.70922 23.0933 9.03906 22.361L16.957 19.9079C17.4531 16.377 19.1884 11.8165 21.4746 8.18423C24.7237 3.02487 28.7273 0.119714 32.748 0.00356357ZM38.8408 26.7077C38.8133 26.694 36.5926 25.6009 32.2842 25.8747C21.032 26.5853 15.9341 34.4515 16.4229 42.2213C17.0059 51.4485 26.2283 51.1199 26.584 56.734C26.6686 58.0922 25.8271 60.0114 23.4658 60.1588C19.8562 60.3883 15.3438 56.9831 15.3438 56.9831L13.6191 64.3249C13.6191 64.3249 18.1021 69.1296 26.2432 68.6149C33.027 68.1895 37.7351 62.759 37.2344 54.8249C36.5981 44.7397 25.2729 43.7966 25.002 39.4948C24.9512 38.7038 25.0055 35.556 29.9932 35.2418C33.3786 35.0279 36.2354 36.3195 36.2666 36.3336L38.8408 26.7077ZM32.8262 2.6813C26.6181 2.86014 21.2028 12.5587 19.8213 19.0211L26.8311 16.8512C27.6101 12.7476 29.5648 8.48928 32.1221 5.74868C33.0162 4.76667 34.0719 3.94401 35.2432 3.31704H35.2451C34.5654 2.87005 33.7695 2.66203 32.8262 2.6813ZM36.9775 5.46548C35.7921 5.95366 34.7952 6.80972 34.0791 7.57583C32.1608 9.63716 30.5951 12.7807 29.7725 15.9391L38.3057 13.2956C38.3322 11.0721 38.0904 7.7854 36.9775 5.46548ZM39.7568 5.14907C40.7052 7.59721 40.9505 10.4321 40.9795 12.4694L44.9473 11.2389C44.3133 9.17981 42.8075 5.72907 39.7568 5.14907Z" fill="#393939"/>
|
|
4
|
-
</svg>`,Fe=`data:image/svg+xml,${encodeURIComponent(Ue)}`,Nt={title:"New Website",description:"Website cloned from a public template",url:"https://github.com/decocms/webapp-template",owner:"decocms",name:"webapp-template"},jt={title:"Shopify Headless Store",description:"Shopify Headless Store cloned from a public template",url:"https://github.com/Shopify/hydrogen-demo-store",owner:"Shopify",name:"hydrogen-demo-store",icon:Fe};function St(){const o=$.c(6),e=Ge(),n=le();let s;o[0]!==e.create||o[1]!==n?(s=async r=>{const f=await e.create.mutateAsync({title:r.title,description:r.description,icon:r.icon??null,status:"active",pinned:!1,connections:[],metadata:{githubRepo:{url:r.url,owner:r.owner,name:r.name},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}}});return f.id&&n(f.id),f},o[0]=e.create,o[1]=n,o[2]=s):s=o[2];const l=s;let i;return o[3]!==e.create.isPending||o[4]!==l?(i={createFromTemplate:l,isCreating:e.create.isPending},o[3]=e.create.isPending,o[4]=l,o[5]=i):i=o[5],i}function F(o){const e=$.c(4),{size:n,className:s}=o;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=l):l=e[0];let i;return e[1]!==s||e[2]!==n?(i=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:s,children:l}),e[1]=s,e[2]=n,e[3]=i):i=e[3],i}function ze(o,e){const n=$.c(12),{org:s}=J();let l;n[0]!==s.id?(l=Pe.REGISTRY(s.id),n[0]=s.id,n[1]=l):l=n[1];const i=l;let r;n[2]!==s.id||n[3]!==s.slug||n[4]!==i?(r={connectionId:i,orgId:s.id,orgSlug:s.slug},n[2]=s.id,n[3]=s.slug,n[4]=i,n[5]=r):r=n[5];const f=H(r);let b;n[6]!==o?(b={name:o},n[6]=o,n[7]=b):b=n[7];const a=e?.enabled??!0;let C;return n[8]!==f||n[9]!==b||n[10]!==a?(C={client:f,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:b,enabled:a,staleTime:3e5,select:qe},n[8]=f,n[9]=b,n[10]=a,n[11]=C):C=n[11],Me(C)}function qe(o){return o.structuredContent?.item??null}const Be="deco/mcp-github";function Se(o){const{org:e}=J(),{data:n}=he.useSession(),s=Le(),l=ae(),[i,r]=L.useState("idle"),[f,b]=L.useState(null),[a,C]=L.useState(null),{data:h,isLoading:m}=ze(Be,{enabled:o.enabled}),x=L.useRef(!1);o.enabled&&h&&!m&&!x.current&&n?.user?.id&&i==="idle"&&(x.current=!0,N());async function N(){if(!(!h||!n?.user?.id||!e))try{r("installing"),b(null);const p=De(h,e.id,n.user.id,{remoteIndex:0});if(!p.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:w}=await s.create.mutateAsync(p);r("authenticating");const j=new URL(`/api/${e.slug}/mcp/${w}`,window.location.origin),d=await ke({url:j.href,token:null,orgId:e.id});if(d.supportsOAuth&&!d.isAuthenticated){const{token:S,tokenInfo:c,error:v}=await Re({connectionId:w,orgSlug:e.slug,scope:"offline_access"});if(v||!S){try{await s.delete.mutateAsync(w)}catch{}throw new Error(v??"No token received from GitHub")}if(c)try{(await fetch(`/api/${e.slug}/connections/${w}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:c.accessToken,refreshToken:c.refreshToken,expiresIn:c.expiresIn,scope:c.scope,clientId:c.clientId,clientSecret:c.clientSecret,tokenEndpoint:c.tokenEndpoint})})).ok||await s.update.mutateAsync({id:w,data:{connection_token:S}})}catch{await s.update.mutateAsync({id:w,data:{connection_token:S}})}}ie(l,e.id),C(p),r("ready")}catch(p){b(p instanceof Error?p.message:String(p)),r("error")}}function y(){r("idle"),b(null),C(null),x.current=!1}return o.enabled&&m&&i==="idle"?{status:"installing",error:null,connection:null,retry:y}:{status:i,error:f,connection:a,retry:y}}const Ve="deco-sites";function Ke(o){if(!o||typeof o!="object")return null;const e=o.github;if(!e||typeof e!="object")return null;const n=e.owner,s=e.repo;return typeof n!="string"||typeof s!="string"||n.length===0||s.length===0?null:{owner:n,repo:s}}function Qe(o,e){const n=e?Ke(e):null,s=n?.owner??Ve,l=n?.repo??o;return{owner:s,name:l,url:`https://github.com/${s}/${l}`}}const K={contents:"write",metadata:"read",pull_requests:"write",issues:"write"};function Je(o){if(!o||typeof o!="object"||Array.isArray(o))return K;const e=o;return Object.values(e).some(n=>typeof n!="string")?K:e}function Ye(o){if(!(typeof o!="number"||!Number.isFinite(o)||!Number.isInteger(o)||o<=0))return o}function We(o){const e=o.metadata?.repoScope;if(!e||typeof e.installationId!="number"||!Number.isFinite(e.installationId)||!Number.isInteger(e.installationId)||e.installationId<=0||typeof e.owner!="string"||typeof e.repo!="string"||e.owner.length===0||e.repo.length===0)return null;const n=Ye(e.repositoryId);return{sourceConnectionId:typeof e.sourceConnectionId=="string"?e.sourceConnectionId:void 0,installationId:e.installationId,repositoryId:n,owner:e.owner,repo:e.repo,permissions:Je(e.permissions),grantProvider:e.grantProvider==="github-mcp"?"github-mcp":void 0}}function ve(o){return o.filter(e=>We(e)===null)}async function Ee(o,e){const s=(await o({name:"GITHUB_LIST_USER_ORGS",arguments:{connectionId:e}})).content?.[0]?.text;if(!s)throw new Error("No response from GITHUB_LIST_USER_ORGS");try{return JSON.parse(s)}catch{throw new Error("Invalid response from GITHUB_LIST_USER_ORGS")}}function Ze(o,e){const n=e.toLowerCase();return o.find(s=>s.login.toLowerCase()===n)}const ge="GitHub MCP did not return refreshable repo grant metadata";function q(o){if(typeof o!="string")return null;const e=o.trim();return e.length>0?e:null}function Xe(o){try{const e=new URL(o);return(e.protocol==="http:"||e.protocol==="https:")&&!e.username&&!e.password}catch{return!1}}function et(o){return typeof o=="number"&&Number.isFinite(o)&&Number.isInteger(o)&&o>0?o:void 0}async function Te(o){const{orgSlug:e,sourceConnection:n,installationId:s,owner:l,repo:i,githubCallTool:r,selfCallTool:f}=o,b=await r({name:"MINT_REPO_TOKEN",arguments:{installationId:s,owner:l,repo:i,permissions:K}}),a=b.structuredContent;if(b.isError||!a?.token){const A=b.content?.find(T=>T.type==="text")?.text;throw new Error(A?`Failed to mint a repo-scoped GitHub token: ${A}`:"Failed to mint a repo-scoped GitHub token")}const C=q(a.refreshToken),h=q(a.tokenEndpoint),m=q(a.clientId);if(!C||!h||!m)throw new Error(ge);if(!Xe(h))throw new Error(ge);const x=q(a.repository?.owner),N=q(a.repository?.name),y="GitHub MCP returned refresh metadata for a different repository";if(a.repository?.owner!==void 0&&(!x||x.toLowerCase()!==l.toLowerCase()))throw new Error(y);if(a.repository?.name!==void 0&&(!N||N.toLowerCase()!==i.toLowerCase()))throw new Error(y);const p=et(a.repository?.id),I=a.expiresAt?Date.parse(a.expiresAt):NaN,w=Number.isFinite(I)?Math.max(0,Math.floor((I-Date.now())/1e3)):null,d=(typeof a.expiresIn=="number"&&Number.isFinite(a.expiresIn)&&Number.isInteger(a.expiresIn)&&a.expiresIn>0?a.expiresIn:null)??w,S=await f({name:"COLLECTION_CONNECTIONS_CREATE",arguments:{data:{title:`GitHub: ${l}/${i}`,description:`Repo-scoped GitHub access for ${l}/${i}`,icon:n.icon,app_name:n.app_name,app_id:n.app_id,connection_type:n.connection_type,connection_url:n.connection_url,metadata:{repoScope:{installationId:s,repositoryId:p,owner:l,repo:i,permissions:K,grantProvider:"github-mcp"}}}}}),c=S.structuredContent??S,v=c.item?.id??c.id;if(!v)throw new Error("Failed to create the repo-scoped GitHub connection");if(!(await fetch(`/api/${e}/connections/${v}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:a.token,refreshToken:C,expiresIn:d,scope:a.scope??null,clientId:m,tokenEndpoint:h})})).ok)throw await f({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:v,force:!0}}).catch(()=>{}),new Error("Failed to persist the repo-scoped token");return{childConnectionId:v}}function tt(o){return o.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function nt(o){const e=await fetch(`/api/${o}/deco-sites`);if(!e.ok){const n=await e.json().catch(()=>({}));throw new Error(n.error??`Failed to load sites (${e.status})`)}return e.json()}function vt({open:o,onOpenChange:e,onBack:n}){const{org:s}=J(),l=le(),i=ae(),{data:r}=he.useSession(),[f,b]=L.useState(null),[a,C]=L.useState(null),[h,m]=L.useState(""),x=H({connectionId:ce,orgId:s.id,orgSlug:s.slug}),N=ye({slug:"mcp-github"}),y=ve(N),p=Se({enabled:o&&y.length===0}),I=y.length===1?y[0]??null:a,w=y.length>1&&!I,j=H({connectionId:I?.id??"",orgId:s.id,orgSlug:s.slug}),d=o&&y.length===0&&(p.status==="installing"||p.status==="authenticating"||p.status==="idle"),{data:S,isLoading:c,error:v}=xe({queryKey:U.decoSites(r?.user?.email),queryFn:()=>nt(s.slug),enabled:o&&!!r?.user?.email,staleTime:6e4,retry:!1}),O=S?.sites??[],A=u=>{u||(b(null),C(null),m("")),e(u)},T=O.filter(u=>u.name.toLowerCase().includes(h.toLowerCase())||(u.domains?.[0]?.domain?.toLowerCase().includes(h.toLowerCase())??!1)),g=!f||T.some(u=>u.name===f),k=be({mutationFn:async u=>{if(!I)throw new Error("GitHub is not connected. Complete GitHub setup and try again.");oe("deco_site_import_started",{site_name:u});const{installations:R,appSlug:_}=await Ee(P=>x.callTool(P),I.id),G=O.find(P=>P.name===u);if(!G)throw new Error("Selected site is no longer available");const E=Qe(u,G.metadata),z=Ze(R,E.owner);if(!z){const P=_?`https://github.com/apps/${_}/installations/new`:"https://github.com/settings/installations";throw new Error(`Install the GitHub App on the "${E.owner}" organization to import this site. ${P}`)}let W=null,Z=null,X=null;const _e=async()=>{X&&await x.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:X}}).catch(()=>{}),Z&&await x.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:Z,force:!0}}).catch(()=>{}),W&&await x.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:W,force:!0}}).catch(()=>{})};try{const P=await fetch(`/api/${s.slug}/deco-sites/connection`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:u})}),ee=await P.json().catch(()=>({}));if(!P.ok)throw new Error(ee.error??`Failed to create connection (${P.status})`);const M=ee.connId;if(!M)throw new Error("Server did not return a connection ID");W=M;const{childConnectionId:te}=await Te({orgSlug:s.slug,sourceConnection:I,installationId:z.installationId,owner:E.owner,repo:E.name,githubCallTool:ne=>j.callTool(ne),selfCallTool:ne=>x.callTool(ne)});Z=te;const de=ee.icon??null,me=tt(u),fe=await x.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:u,description:"Imported from deco.cx",pinned:!1,icon:de??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],githubRepo:{owner:E.owner,name:E.name,url:E.url,installationId:z.installationId,connectionId:te},ui:{banner:null,bannerColor:"#22C55E",icon:de,themeColor:"#22C55E",slug:me,pinnedViews:[{connectionId:M,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:M,toolName:"get_monitor_data",label:"Monitor",icon:null}],layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:M},{connection_id:te}]}}}),B=fe.structuredContent??fe;if(!B.item?.id)throw new Error("Failed to create the imported agent");return X=B.item.id,{slug:me,virtualMcpId:B.item.id,connId:M,item:B.item}}catch(P){throw await _e(),P}},onSuccess:({slug:u,virtualMcpId:R,item:_})=>{oe("deco_site_import_succeeded",{site_name:_.title,virtual_mcp_id:R,slug:u}),i.setQueryData(U.collectionItem(x,s.id,"","VIRTUAL_MCP",R),{item:_}),i.invalidateQueries({predicate:G=>{const E=G.queryKey;return E[1]===s.id&&E[3]==="collection"&&E[4]==="VIRTUAL_MCP"}}),i.invalidateQueries({queryKey:U.projects(s.id)}),D.success(`Imported ${u} from deco.cx`),A(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),l(R)},onError:u=>{oe("deco_site_import_failed",{error:u instanceof Error?u.message:"Unknown error"}),D.error("Import failed: "+(u instanceof Error?u.message:"Unknown error"))}});return t.jsx(we,{open:o,onOpenChange:A,children:t.jsxs(Ce,{className:"sm:max-w-[900px] p-0 gap-0 overflow-hidden",children:[t.jsx(Ie,{className:"sr-only",children:t.jsx(Ne,{children:"Import from deco.cx"})}),t.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[n&&t.jsx("button",{type:"button",onClick:n,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":"Go back",children:t.jsx(ue,{size:18})}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"})]}),t.jsx("div",{children:t.jsx(je,{value:h,onChange:m,placeholder:"Search sites...",onKeyDown:u=>{u.key==="Escape"&&m("")}})}),t.jsxs("div",{className:"pb-0 min-h-[300px]",children:[p.status==="error"&&t.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 h-48 px-8 text-center",children:[t.jsx("p",{className:"text-sm text-destructive",children:p.error??"Failed to connect GitHub"}),t.jsx(se,{variant:"outline",size:"sm",onClick:p.retry,children:"Retry GitHub setup"})]}),d&&p.status!=="error"&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Setting up GitHub connection..."}),w&&!d&&p.status!=="error"&&t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-8 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a GitHub connection"})}),y.map(u=>t.jsxs("button",{type:"button",onClick:()=>C(u),className:"flex items-center gap-3 px-8 py-3 hover:bg-accent transition-colors text-left",children:[u.icon?t.jsx("img",{src:u.icon,alt:u.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(F,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:u.title})]},u.id))]}),c&&!d&&p.status!=="error"&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),!c&&!d&&!w&&p.status!=="error"&&!v&&O.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),!c&&!d&&!w&&p.status!=="error"&&O.length>0&&t.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:[T.length===0&&t.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",h,"”"]}),T.map(u=>{const R=u.domains?.find(G=>G.production)?.domain??u.domains?.[0]?.domain,_=f===u.name;return t.jsxs("button",{type:"button",onClick:()=>b(u.name),className:V("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",_?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[t.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:u.thumb_url?t.jsx("img",{src:u.thumb_url,alt:u.name,className:"w-full h-full object-cover",loading:"lazy"}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsxs("div",{className:"px-4 py-3",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:u.name}),R&&t.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:R})]})]},u.name)})]})]}),t.jsxs($e,{className:"px-8 py-5 border-t border-border",children:[t.jsx(se,{variant:"outline",onClick:()=>A(!1),disabled:k.isPending,children:"Cancel"}),t.jsx(se,{disabled:!f||!g||k.isPending||c||d||w||!I||p.status==="error",onClick:()=>f&&k.mutate(f),children:k.isPending?"Importing...":"Import"})]})]})})}function ot(o,e){const n=$.c(4),[s,l]=L.useState(o);let i,r;return n[0]!==e||n[1]!==o?(i=()=>{const f=setTimeout(()=>l(o),e);return()=>clearTimeout(f)},r=[o,e],n[0]=e,n[1]=o,n[2]=i,n[3]=r):(i=n[2],r=n[3]),L.useEffect(i,r),s}const Q=[{key:"auto-respond-to-issues",triggerType:"github.issues.opened",nameSuffix:"auto-respond to issues",label:"Auto-respond to new issues",defaultEnabled:!0,instructions:({owner:o,name:e})=>`A new GitHub issue has been opened in ${o}/${e}. Read the issue, explore relevant code, create a branch, implement the fix, and open a PR referencing the issue number.`},{key:"review-incoming-prs",triggerType:"github.pull_request.opened",nameSuffix:"review incoming PRs",label:"Review incoming pull requests",defaultEnabled:!0,instructions:({owner:o,name:e})=>`A pull request was opened in ${o}/${e}. Read the diff, summarize what changed, flag risks (security, perf, breaking changes), and leave a review comment.`},{key:"note-merged-prs",triggerType:"github.pull_request.closed",nameSuffix:"note merged/closed PRs",label:"Note merged or closed PRs",defaultEnabled:!1,instructions:({owner:o,name:e})=>`A pull request was closed in ${o}/${e}. If it was merged, update changelog/release notes as appropriate.`}];function st(o,e){const n=new Set;if(o.paramsSchema)for(const l of Object.keys(o.paramsSchema))n.add(l);if(Array.isArray(o.params))for(const l of o.params)n.add(l.name);else if(o.params&&typeof o.params=="object")for(const l of Object.keys(o.params))n.add(l);if(n.has("repo"))return{repo:`${e.owner}/${e.name}`};const s={};return n.has("owner")&&(s.owner=e.owner),n.has("name")&&(s.name=e.name),n.has("repository")&&(s.repository=`${e.owner}/${e.name}`),s}async function rt({githubCallTool:o,selfCallTool:e,virtualMcpId:n,repo:s,connectionId:l,selectedKeys:i}){const r=await o({name:"TRIGGER_LIST",arguments:{}}),f=r.structuredContent??r,b=new Map((f.triggers??[]).map(m=>[m.type,m])),a=Q.filter(m=>i.has(m.key)),C=await Promise.allSettled(a.map(async m=>{const x=b.get(m.triggerType);if(!x)throw new Error(`Trigger ${m.triggerType} not exposed`);const N=await e({name:"AUTOMATION_CREATE",arguments:{name:`${s.name}: ${m.nameSuffix}`,virtual_mcp_id:n,messages:m.instructions(s),active:!0}}),y=(N.structuredContent??N).id;if(!y)throw new Error(`AUTOMATION_CREATE returned no id for ${m.key}`);await e({name:"AUTOMATION_TRIGGER_ADD",arguments:{automation_id:y,type:"event",connection_id:l,event_type:m.triggerType,params:st(x,s)}})})),h=C.filter(m=>m.status==="rejected").length;return h>0&&console.error("Some GitHub automations failed to set up:",C.filter(m=>m.status==="rejected")),{total:C.length,failed:h}}function Et(o){const e=$.c(22),{open:n,onOpenChange:s,title:l,hideAutoRespondCheckbox:i,onImportComplete:r}=o,f=l===void 0?"Import from GitHub":l,b=i===void 0?!1:i,[a,C]=L.useState(null);let h;e[0]!==f?(h=t.jsx(Ie,{className:"sr-only",children:t.jsx(Ne,{children:f})}),e[0]=f,e[1]=h):h=e[1];let m;e[2]!==a||e[3]!==f?(m=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>C(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(ue,{size:16})}),t.jsx("img",{src:a.avatarUrl,alt:a.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:a.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(F,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:f})]})}),e[2]=a,e[3]=f,e[4]=m):m=e[4];let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Y,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=x):x=e[5];let N;e[6]!==s?(N=()=>s(!1),e[6]=s,e[7]=N):N=e[7];let y;e[8]!==b||e[9]!==r||e[10]!==n||e[11]!==a||e[12]!==N?(y=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(L.Suspense,{fallback:x,children:t.jsx(it,{open:n,onComplete:N,selectedInstallation:a,onSelectInstallation:C,hideAutoRespondCheckbox:b,onImportComplete:r})})}),e[8]=b,e[9]=r,e[10]=n,e[11]=a,e[12]=N,e[13]=y):y=e[13];let p;e[14]!==h||e[15]!==m||e[16]!==y?(p=t.jsxs(Ce,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[h,m,y]}),e[14]=h,e[15]=m,e[16]=y,e[17]=p):p=e[17];let I;return e[18]!==s||e[19]!==n||e[20]!==p?(I=t.jsx(we,{open:n,onOpenChange:s,children:p}),e[18]=s,e[19]=n,e[20]=p,e[21]=I):I=e[21],I}function it({open:o,onComplete:e,selectedInstallation:n,onSelectInstallation:s,hideAutoRespondCheckbox:l,onImportComplete:i}){const{org:r}=J(),f=ae(),b=le(),[a,C]=L.useState(null),[h,m]=L.useState(!0),[x,N]=L.useState(()=>new Set(Q.filter(g=>g.defaultEnabled).map(g=>g.key))),y=Q.filter(g=>g.defaultEnabled).map(g=>g.key),p=l?new Set(y):h?x:new Set,I=ye({slug:"mcp-github"}),w=ve(I),j=Se({enabled:o&&w.length===0}),d=w.length===1?w[0]??null:a,S=H({connectionId:d?.id??"",orgId:r.id,orgSlug:r.slug}),c=H({connectionId:ce,orgId:r.id,orgSlug:r.slug}),v=async(g,k)=>{try{const R=await S.callTool({name:"get_file_contents",arguments:{owner:g.owner,repo:g.name,path:k}});if(R.isError)return null;const G=R.content?.find(E=>E.type==="resource")?.resource?.text;if(!G)return null;try{const E=JSON.parse(G);return typeof E=="string"?E:JSON.stringify(E)}catch{return G}}catch{return null}},O=(g,k)=>{Promise.all([v(k,"AGENTS.md"),v(k,"CLAUDE.md")]).then(async([u,R])=>{const _=u??R??null;_&&(await c.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:g,data:{metadata:{instructions:_}}}}),ie(f,r.id))}).catch(u=>{console.error("GitHub instructions fetch failed:",u)})},A=async({virtualMcpId:g,repo:k,connectionId:u,selectedKeys:R})=>{const{total:_,failed:G}=await rt({githubCallTool:E=>S.callTool(E),selfCallTool:E=>c.callTool(E),virtualMcpId:g,repo:k,connectionId:u,selectedKeys:R});G>0&&D.warning(`Set up ${_-G}/${_} GitHub automations. Add the rest from the automations view.`)},T=be({mutationFn:async g=>{if(!d||!n)throw new Error("No GitHub connection or installation");const k=n.installationId,{childConnectionId:u}=await Te({orgSlug:r.slug,sourceConnection:d,installationId:k,owner:g.owner,repo:g.name,githubCallTool:_=>S.callTool(_),selfCallTool:_=>c.callTool(_)});let R=null;try{const _=await c.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:g.name,description:g.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:g.owner,name:g.name,url:g.url,installationId:k,connectionId:u},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:u}]}}}),G=_.structuredContent??_,E=G.item?.id;if(!G.item||!E)throw new Error("Failed to create the imported agent");return R=E,p.size>0&&await A({virtualMcpId:E,repo:g,connectionId:u,selectedKeys:p}).catch(z=>{console.error("Failed to set up GitHub automations:",z),D.warning("Imported repo, but failed to set up GitHub automations. You can add triggers manually from the automations view.")}),{virtualMcpId:E,repo:g,connectionId:u,item:G.item}}catch(_){throw R&&await c.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:R}}).catch(()=>{}),await c.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:u,force:!0}}).catch(()=>{}),_}},onSuccess:({virtualMcpId:g,repo:k,connectionId:u,item:R})=>{if(f.setQueryData(U.collectionItem(c,r.id,"","VIRTUAL_MCP",g),{item:R}),ie(f,r.id),O(g,k),i){i({virtualMcpId:g,repo:k,connectionId:u});return}D.success(`Imported ${k.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),b(g)},onError:g=>{D.error("Failed to import repo: "+(g instanceof Error?g.message:"Unknown error"))}});return j.status==="installing"||j.status==="authenticating"?t.jsx(re,{status:j.status,error:null,retry:j.retry}):j.status==="error"?t.jsx(re,{status:"error",error:j.error,retry:j.retry}):w.length===0&&j.status==="idle"?t.jsx(re,{status:"installing",error:null,retry:j.retry}):w.length>1&&!d?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),w.map(g=>t.jsxs("button",{type:"button",onClick:()=>C(g),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[g.icon?t.jsx("img",{src:g.icon,alt:g.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(F,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:g.title})]},g.id))]}):d?n?t.jsx(lt,{connectionId:d.id,orgId:r.id,orgSlug:r.slug,installation:n,onSelectRepo:g=>T.mutate(g),isSaving:T.isPending,autoRespondEnabled:h,onAutoRespondChange:m,selectedAutomationKeys:x,onAutomationKeysChange:N,hideAutoRespondCheckbox:l}):t.jsx(at,{connectionId:d.id,orgId:r.id,orgSlug:r.slug,onSelect:s,showBackButton:w.length>1,onBack:()=>C(null)}):null}function at(o){const e=$.c(31),{connectionId:n,orgId:s,orgSlug:l,onSelect:i,showBackButton:r,onBack:f}=o;let b;e[0]!==s||e[1]!==l?(b={connectionId:ce,orgId:s,orgSlug:l},e[0]=s,e[1]=l,e[2]=b):b=e[2];const a=H(b);let C;e[3]!==n||e[4]!==s?(C=U.githubUserOrgs(s,n),e[3]=n,e[4]=s,e[5]=C):C=e[5];let h;e[6]!==n||e[7]!==a?(h=()=>Ee(c=>a.callTool(c),n),e[6]=n,e[7]=a,e[8]=h):h=e[8];let m;e[9]!==C||e[10]!==h?(m={queryKey:C,queryFn:h},e[9]=C,e[10]=h,e[11]=m):m=e[11];const x=xe(m);if(x.isLoading){let c;return e[12]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Y,{size:18,className:"animate-spin text-muted-foreground"})}),e[12]=c):c=e[12],c}if(x.isError){let c;return e[13]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"})}),e[13]=c):c=e[13],c}const N=x.data;if(!N)return null;let y;e[14]!==f||e[15]!==r?(y=r&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:f,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),"Change connection"]})}),e[14]=f,e[15]=r,e[16]=y):y=e[16];let p;if(e[17]!==N.installations||e[18]!==i){let c;e[20]!==i?(c=v=>t.jsxs("button",{type:"button",onClick:()=>i(v),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:v.avatarUrl,alt:v.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:v.login}),v.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},v.installationId),e[20]=i,e[21]=c):c=e[21],p=N.installations.map(c),e[17]=N.installations,e[18]=i,e[19]=p}else p=e[19];let I;e[22]!==p?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:p}),e[22]=p,e[23]=I):I=e[23];const w=N.appSlug?`https://github.com/apps/${N.appSlug}/installations/new`:"https://github.com/settings/installations";let j;e[24]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[24]=j):j=e[24];let d;e[25]!==w?(d=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:w,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",j]})}),e[25]=w,e[26]=d):d=e[26];let S;return e[27]!==d||e[28]!==y||e[29]!==I?(S=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[y,I,d]}),e[27]=d,e[28]=y,e[29]=I,e[30]=S):S=e[30],S}function lt(o){const e=$.c(27),{connectionId:n,orgId:s,orgSlug:l,installation:i,onSelectRepo:r,isSaving:f,autoRespondEnabled:b,onAutoRespondChange:a,selectedAutomationKeys:C,onAutomationKeysChange:h,hideAutoRespondCheckbox:m}=o,[x,N]=L.useState(""),y=ot(x,300),p=L.useDeferredValue(y),I=x!==p;let w;e[0]!==I||e[1]!==x?(w=t.jsx(je,{placeholder:"Search repositories...",value:x,onChange:N,isSearching:I}),e[0]=I,e[1]=x,e[2]=w):w=e[2];const j=I?"opacity-40":"opacity-100";let d;e[3]!==j?(d=V("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",j),e[3]=j,e[4]=d):d=e[4];let S;e[5]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Y,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=S):S=e[5];let c;e[6]!==n||e[7]!==p||e[8]!==i||e[9]!==f||e[10]!==r||e[11]!==s||e[12]!==l?(c=t.jsx(L.Suspense,{fallback:S,children:t.jsx(ct,{connectionId:n,orgId:s,orgSlug:l,installation:i,query:p,onSelectRepo:r,isSaving:f})}),e[6]=n,e[7]=p,e[8]=i,e[9]=f,e[10]=r,e[11]=s,e[12]=l,e[13]=c):c=e[13];let v;e[14]!==d||e[15]!==c?(v=t.jsx("div",{className:d,children:c}),e[14]=d,e[15]=c,e[16]=v):v=e[16];let O;e[17]!==b||e[18]!==m||e[19]!==a||e[20]!==h||e[21]!==C?(O=!m&&t.jsxs("div",{className:"border-t border-border shrink-0",children:[t.jsxs("label",{className:"flex items-center gap-2 px-4 py-3 cursor-pointer select-none",children:[t.jsx(pe,{checked:b,onCheckedChange:T=>a(T===!0)}),t.jsx("span",{className:"text-xs text-foreground",children:"Set up GitHub automations for this repo"})]}),b&&t.jsx("div",{className:"px-4 pb-3 pl-9 flex flex-col gap-1.5",children:Q.map(T=>t.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[t.jsx(pe,{checked:C.has(T.key),onCheckedChange:g=>{const k=new Set(C);g===!0?k.add(T.key):k.delete(T.key),h(k)}}),t.jsx("span",{className:"text-xs text-muted-foreground",children:T.label})]},T.key))})]}),e[17]=b,e[18]=m,e[19]=a,e[20]=h,e[21]=C,e[22]=O):O=e[22];let A;return e[23]!==w||e[24]!==v||e[25]!==O?(A=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[w,v,O]}),e[23]=w,e[24]=v,e[25]=O,e[26]=A):A=e[26],A}function ct(o){const e=$.c(29),{connectionId:n,orgId:s,orgSlug:l,installation:i,query:r,onSelectRepo:f,isSaving:b}=o;let a;e[0]!==n||e[1]!==s||e[2]!==l?(a={connectionId:n,orgId:s,orgSlug:l},e[0]=n,e[1]=s,e[2]=l,e[3]=a):a=e[3];const C=H(a),h=i.type==="User"?"user":"org",m=r?`${h}:${i.login} ${r} in:name`:`${h}:${i.login}`;let x;e[4]!==n||e[5]!==i.login||e[6]!==s||e[7]!==r?(x=U.githubOrgRepos(s,n,i.login,r),e[4]=n,e[5]=i.login,e[6]=s,e[7]=r,e[8]=x):x=e[8];let N;e[9]!==C||e[10]!==m?(N=async j=>{const{signal:d}=j,c=(await C.callTool({name:"search_repositories",arguments:{query:m,page:1,perPage:30}},void 0,{signal:d})).content?.[0]?.text;if(!c)throw new Error("No response from search_repositories");return(JSON.parse(c).items??[]).map(ut)},e[9]=C,e[10]=m,e[11]=N):N=e[11];let y;e[12]!==x||e[13]!==N?(y={queryKey:x,queryFn:N},e[12]=x,e[13]=N,e[14]=y):y=e[14];const{data:p}=Ae(y);if(p.length===0){let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=j):j=e[15];let d;e[16]!==r?(d=r&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=r,e[17]=d):d=e[17];let S;return e[18]!==d?(S=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[j,d]}),e[18]=d,e[19]=S):S=e[19],S}let I;if(e[20]!==b||e[21]!==f||e[22]!==p){let j;e[24]!==b||e[25]!==f?(j=d=>t.jsxs("button",{type:"button",onClick:()=>f(d),disabled:b,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(F,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:d.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[d.private?t.jsx(Oe,{size:10}):t.jsx(He,{size:10}),d.private?"Private":"Public"]})]},d.fullName),e[24]=b,e[25]=f,e[26]=j):j=e[26],I=p.map(j),e[20]=b,e[21]=f,e[22]=p,e[23]=I}else I=e[23];let w;return e[27]!==I?(w=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:I}),e[27]=I,e[28]=w):w=e[28],w}function ut(o){return{name:o.name,fullName:o.full_name,owner:o.full_name.split("/")[0]??"",url:o.html_url,private:o.private,description:o.description,updatedAt:o.updated_at}}function re(o){const e=$.c(33),{status:n,error:s,retry:l}=o;if(n==="error"){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(F,{className:"size-5 text-destructive"})}),e[0]=c):c=e[0];let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=v):v=e[1];const O=s??"Something went wrong while connecting to GitHub.";let A;e[2]!==O?(A=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[v,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:O})]}),e[2]=O,e[3]=A):A=e[3];let T;e[4]!==l?(T=t.jsx("button",{type:"button",onClick:l,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=l,e[5]=T):T=e[5];let g;return e[6]!==A||e[7]!==T?(g=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[c,A,T]}),e[6]=A,e[7]=T,e[8]=g):g=e[8],g}const i=n==="authenticating";let r;e[9]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(F,{className:"size-5 text-foreground"})}),e[9]=r):r=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(Y,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=f):f=e[10];const b=i?"Authenticating with GitHub":"Setting up GitHub";let a;e[11]!==b?(a=t.jsx("p",{className:"text-sm font-medium",children:b}),e[11]=b,e[12]=a):a=e[12];const C=i?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let h;e[13]!==C?(h=t.jsx("p",{className:"text-xs text-muted-foreground",children:C}),e[13]=C,e[14]=h):h=e[14];let m;e[15]!==a||e[16]!==h?(m=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[a,h]}),e[15]=a,e[16]=h,e[17]=m):m=e[17];const x=i?"bg-muted-foreground/30":"bg-foreground animate-pulse";let N;e[18]!==x?(N=V("size-1.5 rounded-full",x),e[18]=x,e[19]=N):N=e[19];let y;e[20]!==N?(y=t.jsx("span",{className:N}),e[20]=N,e[21]=y):y=e[21];const p=i?"bg-foreground animate-pulse":"bg-muted-foreground/30";let I;e[22]!==p?(I=V("size-1.5 rounded-full",p),e[22]=p,e[23]=I):I=e[23];let w;e[24]!==I?(w=t.jsx("span",{className:I}),e[24]=I,e[25]=w):w=e[25];let j;e[26]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=j):j=e[26];let d;e[27]!==y||e[28]!==w?(d=t.jsxs("div",{className:"flex items-center gap-1.5",children:[y,w,j]}),e[27]=y,e[28]=w,e[29]=d):d=e[29];let S;return e[30]!==d||e[31]!==m?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[f,m,d]}),e[30]=d,e[31]=m,e[32]=S):S=e[32],S}export{F as G,jt as H,vt as I,Fe as S,Nt as W,Et as a,St as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as k,j as o,p as T,r as N,O as D}from"./index-DxEUOQQs.js";import{u as z,S as E,a as I,b as L}from"./sidebar-D_Yb-5nE.js";import{T as M,a as O,b as A,u as P}from"./tooltip-BIymZbyc.js";import{S as $,a as W,b as B}from"./shell-route-loading-CDKyU1Jg.js";import{u as X,C as H}from"./chat-context-C10uFg_9.js";import{T as F}from"./tab-id-CixUfikt.js";import{i as q}from"./Monitor01-Dg9LYm9U.js";import{v as G,C as K}from"./connect-desktop-dialog-nMepiraO.js";import{T as Y,a as b}from"./toolbar-Dje6lkWt.js";import{S as U,M as J}from"./shell-controls-3zx-sXr7.js";import"./LayoutLeft-zPlWqXYO.js";import"./sheet-Devtg9cX.js";import"./X-CH7nrxK3.js";import"./useRouterState-CKqJqhNS.js";import"./ZoomOut-BhGMK1ir.js";import"./skeleton-DU4Yk3QQ.js";import"./popover-7ZV_x738.js";import"./drawer-We__DvM1.js";import"./SearchMd-CkwYmYFX.js";import"./Star01-CROTt7h-.js";import"./Plus-D3Yt_klI.js";import"./use-mcp-client-BW6MR0tW.js";import"./use-virtual-mcp-C5aNldwS.js";import"./use-collections-CPla-8Z_.js";import"./use-create-virtual-mcp-BWWSVfRV.js";import"./use-navigate-to-agent-7tEptzcr.js";import"./github-repo-picker-CA1Lsyag.js";import"./use-connection-7yE-FpPg.js";import"./dialog-DlK91HiY.js";import"./RefreshCcw01-De11YcWY.js";import"./collection-search-CVFFSy0S.js";import"./checkbox-EJ-FS6-O.js";import"./Check-CJuLJZRg.js";import"./agent-icon-BL0Zyuef.js";import"./AlertCircle-C2JPSNIc.js";import"./Tool01-CHRhaVsB.js";import"./SwitchHorizontal01-uOesGvrj.js";import"./XCircle-DSNLgcsz.js";import"./ArrowUpRight-Dtm-fMoi.js";import"./ZapSquare-B7LKxpnQ.js";import"./Users03-BZnIYCM1.js";import"./CheckCircle-B1gk6AbW.js";import"./ChevronDown-BbO00aHm.js";import"./ChevronLeft-CyC6kPhn.js";import"./ChevronRight-D4rmSZYg.js";import"./ChevronUp-DC9Fz2he.js";import"./DotsVertical-DVI2JfBT.js";import"./Container-Ck07PAMh.js";import"./Eye-8SpX7ax1.js";import"./Globe01-_Gozs0-K.js";import"./FilterLines-DXoB5fi6.js";import"./Palette-DvOu8iad.js";import"./HardDrive-D6YFkngp.js";import"./Stars02-Bb_Lb3Iw.js";import"./Key01-DtPyr_d4.js";import"./LinkExternal01-CMKC3Ppc.js";import"./Sun--jg0YyzU.js";import"./Play-BGgNLf1z.js";import"./Settings02-RkWi-oHt.js";import"./Shield01-BkzImfUK.js";import"./Stars01-BZ01dqEy.js";import"./Trash01-D9jT6VSX.js";import"./Upload01-B6COGlQo.js";import"./User01-CWJ4O2R8.js";import"./Users01-Bsb338aB.js";import"./XClose-B2Xxw9ZV.js";import"./Zap-CtPT7vkQ.js";import"./use-mcp-tools-BdvRRDeD.js";import"./extract-connection-data-Deygnaxj.js";import"./generate-id-DHU56BsF.js";import"./collections-BMUil3in.js";import"./shell-layout-DRNHZhhH.js";import"./avatar-BL6j7EM4.js";import"./required-auth-layout-s-nnIbb3.js";import"./use-organization-settings-Ds8za6ZV.js";import"./use-org-sso-BZSKGD_q.js";import"./alert-dialog-DzLqwXYd.js";import"./form-8fnZRdSd.js";import"./label-Bz4-Isgq.js";import"./input-CzgGcI3V.js";import"./spinner-DJudGYoz.js";import"./index-C5kgHpFv.js";import"./sortable.esm-DLnTPF68.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BAVVkgt5.js";import"./use-registry-connections-Bo5wHKtk.js";import"./useInfiniteQuery-CMP19UQ8.js";import"./infiniteQueryObserver-_wx8vha2.js";import"./card-OOIE0uKL.js";import"./integration-icon-TXgAkIpf.js";import"./collection-tabs-CArtFM6T.js";import"./badge-Cc4XouWa.js";import"./select-BhUuCBjD.js";import"./textarea-CHCvnh_8.js";import"./connection-form-helpers-C7w-EHHd.js";import"./use-infinite-scroll-COS9eomA.js";import"./useSuspenseInfiniteQuery-Dsr82JBj.js";import"./use-ai-providers-i1tqdzqX.js";import"./command-BeSVNuhP.js";import"./index-ZOhZPSgS.js";import"./studio-tools-CdiIGNug.js";import"./use-org-auth-client-D_nAk9Nf.js";import"./hover-card-DwcwURxp.js";import"./task-status-B4xhXa10.js";import"./use-clock-tick-B8zeuW9S.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./decopilot-sse-pool-C9YWBszR.js";import"./create-sse-subscription-BS5983N4.js";function Q(e){const t=k.c(5),{onPointerDown:r,onDoubleClick:d}=e,{state:f,isMobile:u}=z();if(u||f==="collapsed")return null;let s,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={left:"var(--sidebar-width)"},n=o.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),t[0]=s,t[1]=n):(s=t[0],n=t[1]);let i;return t[2]!==d||t[3]!==r?(i=o.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:r,onDoubleClick:d,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:s,children:n}),t[2]=d,t[3]=r,t[4]=i):i=t[4],i}const R=240,V=400,Z="sidebar.width";function _(e){return Math.max(R,Math.min(V,e))}function ee(){const e=k.c(11),[t,r]=T(Z,te),d=N.useRef(null);let f;e[0]!==r||e[1]!==t?(f=a=>{a.preventDefault();const m=a.clientX,p=_(t),c=d.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),h=c?Array.from(c.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const x of h)x.style.transition="none";const j=x=>{const g=_(p+(x.clientX-m));c?.style.setProperty("--sidebar-width",`${g}px`)},S=x=>{const g=_(p+(x.clientX-m));r(g);for(const v of h)v.style.transition="";window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",S),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",j),window.addEventListener("pointerup",S)},e[0]=r,e[1]=t,e[2]=f):f=e[2];const u=f;let s;e[3]!==r?(s=()=>{r(R)},e[3]=r,e[4]=s):s=e[4];const n=s;let i;e[5]!==t?(i=_(t),e[5]=t,e[6]=i):i=e[6];let l;return e[7]!==u||e[8]!==n||e[9]!==i?(l={width:i,wrapperRef:d,onStartResize:u,resetWidth:n},e[7]=u,e[8]=n,e[9]=i,e[10]=l):l=e[10],l}function te(e){return typeof e=="number"?_(e):R}function oe(){const e=k.c(22),t=X(),[r,d]=N.useState(!1);let f;if(e[0]!==t.capabilities||e[1]!==t.hostname||e[2]!==t.machineId||e[3]!==t.online){const j=G(t.capabilities);f=t.online?o.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[o.jsx("span",{className:"font-medium",children:t.hostname??t.machineId??"Desktop linked"}),o.jsx("span",{className:"text-muted-foreground",children:j.length>0?`Available: ${j.join(", ")}`:"No CLI agents detected"})]}):o.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=t.capabilities,e[1]=t.hostname,e[2]=t.machineId,e[3]=t.online,e[4]=f}else f=e[4];const u=f;let s;e[5]===Symbol.for("react.memo_cache_sentinel")?(s=()=>d(!0),e[5]=s):s=e[5];const n=t.online?"Desktop linked":"Connect your desktop";let i;e[6]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(q,{size:16}),e[6]=i):i=e[6];let l;e[7]!==t.online?(l=t.online&&o.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[7]=t.online,e[8]=l):l=e[8];let a;e[9]!==n||e[10]!==l?(a=o.jsx(M,{asChild:!0,children:o.jsxs(Y,{onClick:s,"aria-label":n,children:[i,l]})}),e[9]=n,e[10]=l,e[11]=a):a=e[11];let m;e[12]!==u?(m=o.jsx(O,{side:"bottom",children:u}),e[12]=u,e[13]=m):m=e[13];let p;e[14]!==a||e[15]!==m?(p=o.jsxs(A,{children:[a,m]}),e[14]=a,e[15]=m,e[16]=p):p=e[16];let c;e[17]!==r?(c=o.jsx(K,{open:r,onOpenChange:d}),e[17]=r,e[18]=c):c=e[18];let h;return e[19]!==p||e[20]!==c?(h=o.jsxs(o.Fragment,{children:[p,c]}),e[19]=p,e[20]=c,e[21]=h):h=e[21],h}const ie="sidebar.open";function re(){const e=k.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(B,{}),e[0]=t):t=e[0],t}function no(){const e=k.c(26),t=P(),[r,d]=T(ie,!1),{width:f,wrapperRef:u,onStartResize:s,resetWidth:n}=ee();let i,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(b.LogoLink,{}),l=o.jsx(U,{}),e[0]=i,e[1]=l):(i=e[0],l=e[1]);let a,m;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsxs(b.LeftColumn,{children:[i,l,o.jsx("span",{className:"hidden md:contents",children:o.jsx(b.Nav,{})}),o.jsx(b.TogglesSlot,{}),o.jsx(oe,{})]}),m=o.jsx(b.CenterSlot,{}),e[2]=a,e[3]=m):(a=e[2],m=e[3]);let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs(b.Header,{children:[a,m,o.jsxs(b.RightColumn,{children:[o.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end",children:o.jsx(b.TabsSlot,{})}),o.jsx(b.RightSlot,{})]})]}),e[4]=p):p=e[4];const c=`${f}px`;let h;e[5]!==c?(h={"--sidebar-width":c,"--sidebar-width-icon":"3.5rem"},e[5]=c,e[6]=h):h=e[6];const j=h;let S;e[7]!==t||e[8]!==s||e[9]!==n?(S=!t&&o.jsxs(o.Fragment,{children:[o.jsx($,{}),o.jsx(Q,{onPointerDown:s,onDoubleClick:n})]}),e[7]=t,e[8]=s,e[9]=n,e[10]=S):S=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x={background:"transparent",containerType:"inline-size"},e[11]=x):x=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(E,{className:"flex flex-col",style:x,children:o.jsx("div",{className:"flex flex-col h-full min-h-0",children:o.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:o.jsx(N.Suspense,{fallback:o.jsx(re,{}),children:o.jsx(D,{})})})})}),e[12]=g):g=e[12];let v;e[13]!==j||e[14]!==S||e[15]!==u?(v=o.jsxs(I,{ref:u,className:"flex-1 bg-sidebar relative min-h-0",style:j,children:[S,g]}),e[13]=j,e[14]=S,e[15]=u,e[16]=v):v=e[16];let y;e[17]!==t?(y=t&&o.jsx(J,{renderSidebar:se}),e[17]=t,e[18]=y):y=e[18];let w;e[19]!==v||e[20]!==y?(w=o.jsx(H,{children:o.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[p,v,y]})}),e[19]=v,e[20]=y,e[21]=w):w=e[21];let C;return e[22]!==d||e[23]!==r||e[24]!==w?(C=o.jsx(F,{children:o.jsx(b.Provider,{children:o.jsx(L,{open:r,onOpenChange:d,children:w})})}),e[22]=d,e[23]=r,e[24]=w,e[25]=C):C=e[25],C}function se(e){const{onClose:t}=e;return o.jsx("div",{className:"flex h-full",children:o.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:o.jsx(W,{onClose:t})})})}export{no as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ar as Ze,as as de,at as Ye,au as et,av as $e,G as he,aw as tt,ax as st,r as A,ay as it,az as nt,aA as rt,aB as ot,aC as ve,aD as lt,aE as at,aF as ct,e as T,j as i,q as J,c as q,l as Ie,aG as pe,o as W,K as ne,n as re,a as dt,v as mt,E as ut,b as ft,B as je}from"./index-DxEUOQQs.js";import{u as xe}from"./tooltip-BIymZbyc.js";import{i as ht,u as oe,g as pt,a as xt}from"./use-mcp-client-BW6MR0tW.js";import{a as gt,b as bt,v as yt,u as vt}from"./use-virtual-mcp-C5aNldwS.js";import{i as jt}from"./Check-CJuLJZRg.js";import{_ as wt,A as Y,a0 as Nt,v as St,c as _t}from"./agent-icon-BL0Zyuef.js";import{s as ge}from"./Plus-D3Yt_klI.js";import{i as Te}from"./X-CH7nrxK3.js";import{u as Ct,b as kt,h as Et,C as se}from"./agent-capabilities-v4Rwjpb1.js";import{u as $t,c as It}from"./chat-context-C10uFg_9.js";import{N as Tt}from"./agent-icons-AMlXFz_9.js";import{u as Ae,a as ie,K as Me,P as Oe,D as Re,c as At,S as Mt,v as Ot,b as Rt,C as zt,s as Pt,d as Dt,e as Ht,f as Lt}from"./sortable.esm-DLnTPF68.js";import{u as ze,a as Pe,o as Ut}from"./use-organization-settings-Ds8za6ZV.js";import{c as be,u as Bt,h as Ft}from"./shell-layout-DRNHZhhH.js";import{I as Qt}from"./input-CzgGcI3V.js";import{S as Wt}from"./scroll-area-ChPJ-NEF.js";import{S as qt,c as Kt,d as Gt,a as Vt,b as Jt}from"./sheet-Devtg9cX.js";import{S as H}from"./skeleton-DU4Yk3QQ.js";import{t as De}from"./ChevronDown-BbO00aHm.js";import{d as He}from"./ZoomOut-BhGMK1ir.js";import{g as Xt,M as Zt}from"./types-CmWRxh2O.js";import{I as Yt}from"./integration-icon-TXgAkIpf.js";import{u as es}from"./studio-tools-CdiIGNug.js";import{t as Le,P as ts,e as ss,s as is,g as ns}from"./pair-Dqpt4Jli.js";import{a as rs}from"./XCircle-DSNLgcsz.js";import{g as os}from"./use-mcp-prompts-DauhYIMV.js";import{u as ls,w as as}from"./tab-id-CixUfikt.js";import{a as cs,g as ds,c as ms,b as us,D as fs}from"./dropdown-menu-9oUOEimm.js";import{s as hs}from"./Trash01-D9jT6VSX.js";import{a as ps,u as xs}from"./use-ai-providers-i1tqdzqX.js";import{a as gs}from"./toolbar-Dje6lkWt.js";import"./use-collections-CPla-8Z_.js";import"./AlertCircle-C2JPSNIc.js";import"./Tool01-CHRhaVsB.js";import"./SwitchHorizontal01-uOesGvrj.js";import"./RefreshCcw01-De11YcWY.js";import"./ArrowUpRight-Dtm-fMoi.js";import"./ZapSquare-B7LKxpnQ.js";import"./Users03-BZnIYCM1.js";import"./CheckCircle-B1gk6AbW.js";import"./ChevronLeft-CyC6kPhn.js";import"./ChevronRight-D4rmSZYg.js";import"./ChevronUp-DC9Fz2he.js";import"./DotsVertical-DVI2JfBT.js";import"./Container-Ck07PAMh.js";import"./Eye-8SpX7ax1.js";import"./Globe01-_Gozs0-K.js";import"./FilterLines-DXoB5fi6.js";import"./Star01-CROTt7h-.js";import"./Palette-DvOu8iad.js";import"./HardDrive-D6YFkngp.js";import"./Stars02-Bb_Lb3Iw.js";import"./Key01-DtPyr_d4.js";import"./LayoutLeft-zPlWqXYO.js";import"./LinkExternal01-CMKC3Ppc.js";import"./Monitor01-Dg9LYm9U.js";import"./Sun--jg0YyzU.js";import"./Play-BGgNLf1z.js";import"./SearchMd-CkwYmYFX.js";import"./Settings02-RkWi-oHt.js";import"./Shield01-BkzImfUK.js";import"./Stars01-BZ01dqEy.js";import"./Upload01-B6COGlQo.js";import"./User01-CWJ4O2R8.js";import"./Users01-Bsb338aB.js";import"./XClose-B2Xxw9ZV.js";import"./Zap-CtPT7vkQ.js";import"./spinner-DJudGYoz.js";import"./dialog-DlK91HiY.js";import"./drawer-We__DvM1.js";import"./collection-search-CVFFSy0S.js";import"./form-8fnZRdSd.js";import"./label-Bz4-Isgq.js";import"./select-BhUuCBjD.js";import"./tabs-DpPbTcOX.js";import"./toggle-group-DUH3UCsh.js";import"./connect-desktop-dialog-nMepiraO.js";import"./popover-7ZV_x738.js";import"./command-BeSVNuhP.js";import"./index-ZOhZPSgS.js";import"./useInfiniteQuery-CMP19UQ8.js";import"./infiniteQueryObserver-_wx8vha2.js";import"./index-DBE0AwRo.js";import"./question-004-sINsf4GQ.js";import"./checkbox-EJ-FS6-O.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-BL6j7EM4.js";import"./settings-section-BmqyawBS.js";import"./card-OOIE0uKL.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BAVVkgt5.js";import"./use-registry-connections-Bo5wHKtk.js";import"./use-connection-7yE-FpPg.js";import"./extract-connection-data-Deygnaxj.js";import"./generate-id-DHU56BsF.js";import"./collections-BMUil3in.js";import"./collection-tabs-CArtFM6T.js";import"./badge-Cc4XouWa.js";import"./textarea-CHCvnh_8.js";import"./connection-form-helpers-C7w-EHHd.js";import"./use-infinite-scroll-COS9eomA.js";import"./useSuspenseInfiniteQuery-Dsr82JBj.js";import"./required-auth-layout-s-nnIbb3.js";import"./useRouterState-CKqJqhNS.js";import"./use-org-sso-BZSKGD_q.js";import"./use-clock-tick-B8zeuW9S.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CMgaIgR7.js";import"./file-type-icon-g69R8oLw.js";import"./content-blocks-o63cs2vh.js";import"./use-navigate-to-agent-7tEptzcr.js";import"./decopilot-sse-pool-C9YWBszR.js";import"./create-sse-subscription-BS5983N4.js";function we(t,e){const s=new Set(e);return t.filter(r=>!s.has(r))}function bs(t,e,s){const r=t.slice(0);return r[e]=s,r}var ys=class extends Ze{#n;#e;#r;#i;#t;#s;#o;#l;#a;#c=[];constructor(t,e,s){super(),this.#n=t,this.#i=s,this.#r=[],this.#t=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#t.forEach(t=>{t.subscribe(e=>{this.#f(t,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#t.forEach(t=>{t.destroy()})}setQueries(t,e){this.#r=t,this.#i=e,de.batch(()=>{const s=this.#t,r=this.#u(this.#r);r.forEach(m=>m.observer.setOptions(m.defaultedQueryOptions));const n=r.map(m=>m.observer),a=n.map(m=>m.getCurrentResult()),l=s.length!==n.length,c=n.some((m,u)=>m!==s[u]),o=l||c,d=o?!0:a.some((m,u)=>{const f=this.#e[u];return!f||!Ye(m,f)});!o&&!d||(o&&(this.#c=r,this.#t=n),this.#e=a,this.hasListeners()&&(o&&(we(s,n).forEach(m=>{m.destroy()}),we(n,s).forEach(m=>{m.subscribe(u=>{this.#f(m,u)})})),this.#h()))})}getCurrentResult(){return this.#e}getQueries(){return this.#t.map(t=>t.getCurrentQuery())}getObservers(){return this.#t}getOptimisticResult(t,e){const s=this.#u(t),r=s.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),n=s.map(a=>a.defaultedQueryOptions.queryHash);return[r,a=>this.#m(a??r,e,n),()=>this.#d(r,s)]}#d(t,e){return e.map((s,r)=>{const n=t[r];return s.defaultedQueryOptions.notifyOnChangeProps?n:s.observer.trackResult(n,a=>{e.forEach(l=>{l.observer.trackProp(a)})})})}#m(t,e,s){if(e){const r=this.#a,n=s!==void 0&&r!==void 0&&(r.length!==s.length||s.some((a,l)=>a!==r[l]));return(!this.#s||this.#e!==this.#l||n||e!==this.#o)&&(this.#o=e,this.#l=this.#e,s!==void 0&&(this.#a=s),this.#s=et(this.#s,e(t))),this.#s}return t}#p(){return this.#i?.combine!==void 0&&this.#t.some((t,e)=>t.options.suspense&&this.#e[e]?.data===void 0)}#u(t){const e=new Map;this.#t.forEach(r=>{const n=r.options.queryHash;if(!n)return;const a=e.get(n);a?a.push(r):e.set(n,[r])});const s=[];return t.forEach(r=>{const n=this.#n.defaultQueryOptions(r),l=e.get(n.queryHash)?.shift()??new $e(this.#n,n);s.push({defaultedQueryOptions:n,observer:l})}),s}#f(t,e){const s=this.#t.indexOf(t);s!==-1&&(this.#e=bs(this.#e,s,e),this.#h())}#h(){if(this.hasListeners()){const t=this.#d(this.#e,this.#c),e=this.#p(),s=this.#s,r=e?s:this.#m(t,this.#i?.combine);(e||s!==r)&&de.batch(()=>{this.listeners.forEach(n=>{n(this.#e)})})}}};function vs({queries:t,...e},s){const r=he(s),n=tt(),a=st(),l=A.useMemo(()=>t.map(h=>{const p=r.defaultQueryOptions(h);return p._optimisticResults=n?"isRestoring":"optimistic",p}),[t,r,n]);l.forEach(h=>{it(h);const p=r.getQueryCache().get(h.queryHash);nt(h,a,p)}),rt(a);const[c]=A.useState(()=>new ys(r,l,e)),[o,d,m]=c.getOptimisticResult(l,e.combine),u=!n&&e.subscribed!==!1;A.useSyncExternalStore(A.useCallback(h=>u?c.subscribe(de.batchCalls(h)):ot,[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),A.useEffect(()=>{c.setQueries(l,e)},[l,e,c]);const x=o.some((h,p)=>ve(l[p],h))?o.flatMap((h,p)=>{const b=l[p];if(b&&ve(b,h)){const v=new $e(r,b);return lt(b,v,a)}return[]}):[];if(x.length>0)throw Promise.all(x);const g=o.find((h,p)=>{const b=l[p];return b&&at({result:h,errorResetBoundary:a,throwOnError:b.throwOnError,query:r.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(g?.error)throw g.error;return d(m())}function js(t,e){return vs({...t,queries:t.queries.map(s=>({...s,suspense:!0,throwOnError:ct,enabled:!0,placeholderData:void 0}))},e)}const ee=8;function ws(t){const e=T.c(16),{open:s,onOpenChange:r}=t,[n,a]=A.useState("");let l,c;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(qt,{children:"Manage home"}),c=i.jsx(Kt,{children:"Add agents to the home board and pin their interactive UIs or prompts."}),e[0]=l,e[1]=c):(l=e[0],c=e[1]);let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(wt,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none","aria-hidden":!0}),e[2]=o):o=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=h=>a(h.target.value),e[3]=d):d=e[3];let m;e[4]!==n?(m=i.jsxs(Gt,{className:"px-5 py-4 border-b border-border",children:[l,c,i.jsxs("div",{className:"relative mt-3",children:[o,i.jsx(Qt,{value:n,onChange:d,placeholder:"Search agents…",className:"pl-8 h-8 text-sm"})]})]}),e[4]=n,e[5]=m):m=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(Js,{}),e[6]=u):u=e[6];let f;e[7]!==n?(f=i.jsx(Wt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:i.jsx("div",{className:"p-3 flex flex-col gap-4",children:i.jsx(A.Suspense,{fallback:u,children:i.jsx(Ss,{search:n})})})}),e[7]=n,e[8]=f):f=e[8];let x;e[9]!==m||e[10]!==f?(x=i.jsxs(Vt,{side:"right",className:"w-full sm:max-w-md p-0 flex flex-col",children:[m,f]}),e[9]=m,e[10]=f,e[11]=x):x=e[11];let g;return e[12]!==r||e[13]!==s||e[14]!==x?(g=i.jsx(Jt,{open:s,onOpenChange:r,children:x}),e[12]=r,e[13]=s,e[14]=x,e[15]=g):g=e[15],g}function Ns(t){const e=T.c(32),{org:s}=J(),r=ze();let n;e[0]!==r?.ids?(n=r?.ids??[],e[0]=r?.ids,e[1]=n):n=e[1];const a=n,l=Pe(),c=bt(),o=he();let d;e[2]!==s||e[3]!==o?(d=()=>o.refetchQueries({queryKey:ne.homeNextActions(s.slug),type:"active"}),e[2]=s,e[3]=o,e[4]=d):d=e[4];const m=d;let u;e[5]!==a?(u=C=>a.includes(C),e[5]=a,e[6]=u):u=e[6];const f=u;let x;e[7]!==a||e[8]!==t?(x=t?a.filter(C=>t.has(C)).length:a.length,e[7]=a,e[8]=t,e[9]=x):x=e[9];const h=x>=ee;let p;e[10]!==h||e[11]!==f||e[12]!==l?(p=C=>f(C)||h?Promise.resolve():l.apply($=>$.includes(C)?null:[...$,C]),e[10]=h,e[11]=f,e[12]=l,e[13]=p):p=e[13];const b=p;let v;e[14]!==l?(v=C=>l.apply($=>$.filter(E=>E!==C)),e[14]=l,e[15]=v):v=e[15];const w=v;let y;e[16]!==l?(y=C=>l.apply(()=>C),e[16]=l,e[17]=y):y=e[17];const j=y;let N;e[18]!==c||e[19]!==h||e[20]!==f||e[21]!==m||e[22]!==l?(N=async(C,$)=>{await c.update.mutateAsync({id:C.id,data:{metadata:$}}),!f(C.id)&&!h&&await l.apply(E=>E.includes(C.id)?null:[...E,C.id]),await m()},e[18]=c,e[19]=h,e[20]=f,e[21]=m,e[22]=l,e[23]=N):N=e[23];const S=N;let k;return e[24]!==b||e[25]!==h||e[26]!==a||e[27]!==f||e[28]!==w||e[29]!==j||e[30]!==S?(k={homeIds:a,isOnHome:f,atLimit:h,addAgent:b,removeAgent:w,reorder:j,saveAgentMetadata:S},e[24]=b,e[25]=h,e[26]=a,e[27]=f,e[28]=w,e[29]=j,e[30]=S,e[31]=k):k=e[31],k}function Ss(t){const e=T.c(21),{search:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={pageSize:1e3},e[0]=r):r=e[0];const n=gt(r);let a;e[1]!==n?(a=new Set(n.map($s)),e[1]=n,e[2]=a):a=e[2];const l=Ns(a);let c,o,d;if(e[3]!==n||e[4]!==l||e[5]!==s){const h=new Map(n.map(Es));c=s.trim().toLowerCase();const p=v=>!c||v.title?.toLowerCase().includes(c);o=l.homeIds.map(v=>h.get(v)).filter(ks).filter(p);let b;e[9]!==l?(b=v=>!l.isOnHome(v.id),e[9]=l,e[10]=b):b=e[10],d=n.filter(Cs).filter(b).filter(p).sort(_s),e[3]=n,e[4]=l,e[5]=s,e[6]=c,e[7]=o,e[8]=d}else c=e[6],o=e[7],d=e[8];const m=d;let u;e[11]!==l||e[12]!==o?(u=i.jsx(Is,{home:l,agents:o}),e[11]=l,e[12]=o,e[13]=u):u=e[13];const f=!!c;let x;e[14]!==m||e[15]!==l||e[16]!==f?(x=i.jsx(Ms,{home:l,agents:m,hasSearch:f}),e[14]=m,e[15]=l,e[16]=f,e[17]=x):x=e[17];let g;return e[18]!==u||e[19]!==x?(g=i.jsxs(i.Fragment,{children:[u,x]}),e[18]=u,e[19]=x,e[20]=g):g=e[20],g}function _s(t,e){return(t.title??"").localeCompare(e.title??"")}function Cs(t){return t.id&&!ht(t.id)}function ks(t){return!!t}function Es(t){return[t.id,t]}function $s(t){return t.id}function Ue(t){const e=T.c(7),{title:s,hint:r}=t;let n;e[0]!==s?(n=i.jsx("span",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:s}),e[0]=s,e[1]=n):n=e[1];let a;e[2]!==r?(a=r&&i.jsx("span",{className:"text-xs text-muted-foreground",children:r}),e[2]=r,e[3]=a):a=e[3];let l;return e[4]!==n||e[5]!==a?(l=i.jsxs("div",{className:"flex items-center justify-between px-1",children:[n,a]}),e[4]=n,e[5]=a,e[6]=l):l=e[6],l}function Is(t){const e=T.c(14),{home:s,agents:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={activationConstraint:{distance:5}},e[0]=n):n=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={coordinateGetter:Pt},e[1]=a):a=e[1];const l=Ae(ie(Oe,n),ie(Me,a));let c;e[2]!==s?(c=x=>{const{active:g,over:h}=x;if(!h||g.id===h.id)return;const p=s.homeIds,b=p.indexOf(g.id),v=p.indexOf(h.id);b===-1||v===-1||s.reorder(Dt([...p],b,v)).catch(As)},e[2]=s,e[3]=c):c=e[3];const o=c,d=`${s.homeIds.length}/${ee}`;let m;e[4]!==d?(m=i.jsx(Ue,{title:"On home",hint:d}),e[4]=d,e[5]=m):m=e[5];let u;e[6]!==r||e[7]!==o||e[8]!==s||e[9]!==l?(u=r.length===0?i.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:"No agents on the home yet."}):i.jsx(Re,{sensors:l,collisionDetection:At,onDragEnd:o,children:i.jsx(Mt,{items:r.map(Ts),strategy:Ot,children:i.jsx("div",{className:"flex flex-col gap-1",children:r.map(x=>i.jsx(Rs,{agent:x,home:s},x.id))})})}),e[6]=r,e[7]=o,e[8]=s,e[9]=l,e[10]=u):u=e[10];let f;return e[11]!==m||e[12]!==u?(f=i.jsxs("div",{className:"flex flex-col gap-1.5",children:[m,u]}),e[11]=m,e[12]=u,e[13]=f):f=e[13],f}function Ts(t){return t.id}function As(){return W.error("Couldn't reorder home — please try again.")}function Ms(t){const e=T.c(6),{home:s,agents:r,hasSearch:n}=t,[a,l]=A.useState(20);let c;if(e[0]!==r||e[1]!==n||e[2]!==s||e[3]!==a){const o=r.slice(0,a);let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(Ue,{title:"Add to home"}),e[5]=d):d=e[5],c=i.jsxs("div",{className:"flex flex-col gap-1.5",children:[d,r.length===0?i.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:n?"No agents match.":"Every agent is on the home."}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex flex-col gap-1",children:o.map(m=>i.jsx(Ds,{agent:m,home:s},m.id))}),r.length>a&&i.jsxs("button",{type:"button",onClick:()=>l(Os),className:"mt-1 self-center rounded-md px-3 py-1.5 text-xs text-muted-foreground hover:bg-accent/40 hover:text-foreground",children:["Load more (",r.length-a,")"]})]})]}),e[0]=r,e[1]=n,e[2]=s,e[3]=a,e[4]=c}else c=e[4];return c}function Os(t){return t+20}function Be(t){const e=pe(t.metadata?.ui).filter(a=>!!a.resourceUri).length,s=t.metadata?.ui?.homePrompts,r=Array.isArray(s)?s.length:null,n=[];return e>0&&n.push(`${e} tile${e===1?"":"s"}`),r!==null&&r>0&&n.push(`${r} prompt${r===1?"":"s"}`),r===0&&n.push("prompts off"),n.join(" · ")}function Rs(t){const e=T.c(57),{agent:s,home:r}=t,[n,a]=A.useState(!1);let l;e[0]!==s.id?(l={id:s.id},e[0]=s.id,e[1]=l):l=e[1];const{attributes:c,listeners:o,setNodeRef:d,transform:m,transition:u,isDragging:f}=Rt(l),x=Be(s)||"Quick access";let g;e[2]!==m?(g=zt.Transform.toString(m),e[2]=m,e[3]=g):g=e[3];const h=f?.5:void 0,p=f?100:void 0;let b;e[4]!==g||e[5]!==h||e[6]!==p||e[7]!==u?(b={transform:g,transition:u,opacity:h,zIndex:p},e[4]=g,e[5]=h,e[6]=p,e[7]=u,e[8]=b):b=e[8];const v=b,w=f&&"shadow-lg";let y;e[9]!==w?(y=q("rounded-lg border border-border bg-card",w),e[9]=w,e[10]=y):y=e[10];const j=`Drag to reorder ${s.title??s.id}`;let N;e[11]===Symbol.for("react.memo_cache_sentinel")?(N=i.jsx(He,{size:14}),e[11]=N):N=e[11];let S;e[12]!==c||e[13]!==o||e[14]!==j?(S=i.jsx("button",{type:"button",...c,...o,className:"shrink-0 text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing outline-none focus-visible:ring-2 focus-visible:ring-ring rounded","aria-label":j,children:N}),e[12]=c,e[13]=o,e[14]=j,e[15]=S):S=e[15];let k;e[16]===Symbol.for("react.memo_cache_sentinel")?(k=()=>a(Ps),e[16]=k):k=e[16];const C=s.title??s.id;let $;e[17]!==s.icon||e[18]!==C?($=i.jsx(Y,{icon:s.icon,name:C,size:"sm"}),e[17]=s.icon,e[18]=C,e[19]=$):$=e[19];const E=s.title??s.id;let _;e[20]!==E?(_=i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:E}),e[20]=E,e[21]=_):_=e[21];let I;e[22]!==x?(I=i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:x}),e[22]=x,e[23]=I):I=e[23];let O;e[24]!==_||e[25]!==I?(O=i.jsxs("div",{className:"min-w-0 flex-1",children:[_,I]}),e[24]=_,e[25]=I,e[26]=O):O=e[26];const B=n&&"rotate-180";let z;e[27]!==B?(z=q("shrink-0 text-muted-foreground transition-transform",B),e[27]=B,e[28]=z):z=e[28];let P;e[29]!==z?(P=i.jsx(De,{size:16,className:z}),e[29]=z,e[30]=P):P=e[30];let Q;e[31]!==n||e[32]!==$||e[33]!==O||e[34]!==P?(Q=i.jsxs("button",{type:"button",onClick:k,className:"flex min-w-0 flex-1 items-center gap-2.5 text-left outline-none","aria-expanded":n,children:[$,O,P]}),e[31]=n,e[32]=$,e[33]=O,e[34]=P,e[35]=Q):Q=e[35];let M;e[36]!==s.id||e[37]!==r?(M=()=>r.removeAgent(s.id).catch(zs),e[36]=s.id,e[37]=r,e[38]=M):M=e[38];const F=`Remove ${s.title??s.id} from home`;let D;e[39]===Symbol.for("react.memo_cache_sentinel")?(D=i.jsx(Te,{size:14}),e[39]=D):D=e[39];let R;e[40]!==M||e[41]!==F?(R=i.jsx("button",{type:"button",onClick:M,"aria-label":F,title:"Remove from home",className:"shrink-0 inline-flex size-7 items-center justify-center rounded-md text-muted-foreground hover:bg-destructive/10 hover:text-destructive",children:D}),e[40]=M,e[41]=F,e[42]=R):R=e[42];let L;e[43]!==S||e[44]!==Q||e[45]!==R?(L=i.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-2.5",children:[S,Q,R]}),e[43]=S,e[44]=Q,e[45]=R,e[46]=L):L=e[46];let U;e[47]!==s||e[48]!==n||e[49]!==r?(U=n&&i.jsx(Fe,{agent:s,home:r}),e[47]=s,e[48]=n,e[49]=r,e[50]=U):U=e[50];let G;return e[51]!==d||e[52]!==v||e[53]!==L||e[54]!==U||e[55]!==y?(G=i.jsxs("div",{ref:d,style:v,className:y,children:[L,U]}),e[51]=d,e[52]=v,e[53]=L,e[54]=U,e[55]=y,e[56]=G):G=e[56],G}function zs(){return W.error("Couldn't remove from home — please try again.")}function Ps(t){return!t}function Ds({agent:t,home:e}){const[s,r]=A.useState(!1),[n,a]=A.useState(!1),l=Be(t),c=async()=>{if(!e.atLimit){a(!0);try{await e.addAgent(t.id)}catch{W.error("Couldn't add to home — please try again.")}finally{a(!1)}}};return i.jsxs("div",{className:"rounded-lg border border-border bg-card",children:[i.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5",children:[i.jsxs("button",{type:"button",onClick:()=>r(o=>!o),className:"flex min-w-0 flex-1 items-center gap-3 text-left outline-none","aria-expanded":s,children:[i.jsx(Y,{icon:t.icon,name:t.title??t.id,size:"sm"}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:t.title??t.id}),l&&i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:l})]}),i.jsx(De,{size:16,className:q("shrink-0 text-muted-foreground transition-transform",s&&"rotate-180")})]}),i.jsx("button",{type:"button",onClick:c,disabled:n||e.atLimit,"aria-label":"Add to home",title:e.atLimit?`Home is full (${ee}) — remove an agent first`:"Add to home",className:"shrink-0 inline-flex size-7 items-center justify-center rounded-md bg-foreground text-background text-xs hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed",children:n?i.jsx(Ie,{size:12,className:"animate-spin"}):i.jsx(ge,{size:14})})]}),s&&i.jsx(Fe,{agent:t,home:e})]})}function Fe(t){const e=T.c(26),{agent:s,home:r}=t;let n,a,l,c,o,d,m;if(e[0]!==s||e[1]!==r){const p=pe(s.metadata?.ui);let b;e[9]!==s.connections?(b=(s.connections??[]).map(Ls).sort(),e[9]=s.connections,e[10]=b):b=e[10];const v=b;a=s.metadata?.ui?.homePrompts,m="border-t border-border px-3 py-2 flex flex-col gap-3",n=Bs,l=s,c=r,o=v,d=new Set(p.map(Hs)),e[0]=s,e[1]=r,e[2]=n,e[3]=a,e[4]=l,e[5]=c,e[6]=o,e[7]=d,e[8]=m}else n=e[2],a=e[3],l=e[4],c=e[5],o=e[6],d=e[7],m=e[8];let u;e[11]!==n||e[12]!==l||e[13]!==c||e[14]!==o||e[15]!==d?(u=i.jsx(n,{agent:l,home:c,connectionIds:o,pinnedResourceUris:d}),e[11]=n,e[12]=l,e[13]=c,e[14]=o,e[15]=d,e[16]=u):u=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(Us,{}),e[17]=f):f=e[17];const x=a??null;let g;e[18]!==s||e[19]!==r||e[20]!==x?(g=i.jsx(A.Suspense,{fallback:f,children:i.jsx(Qs,{agent:s,home:r,curated:x})}),e[18]=s,e[19]=r,e[20]=x,e[21]=g):g=e[21];let h;return e[22]!==m||e[23]!==u||e[24]!==g?(h=i.jsxs("div",{className:m,children:[u,g]}),e[22]=m,e[23]=u,e[24]=g,e[25]=h):h=e[25],h}function Hs(t){return t.resourceUri}function Ls(t){return t.connection_id}function Us(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsxs("div",{className:"flex flex-col gap-2 py-1",children:[i.jsx(H,{className:"h-8 w-full"}),i.jsx(H,{className:"h-8 w-2/3"})]}),t[0]=e):e=t[0],e}function Bs({agent:t,home:e,connectionIds:s,pinnedResourceUris:r}){const n=es(),{data:a,isLoading:l}=re({queryKey:ne.projectConnectionDetails(t.id,s),enabled:s.length>0,queryFn:async()=>(await Promise.all(s.map(async o=>{try{const{item:d}=await n.call("COLLECTION_CONNECTIONS_GET",{id:o}),m=(d?.tools??[]).flatMap(u=>{const f=Xt(u._meta);return f?[{name:u.name,description:u.description,resourceUri:f}]:[]});return{id:o,title:d?.title??o,icon:d?.icon??null,uiTools:m}}catch{return{id:o,title:o,icon:null,uiTools:[]}}}))).filter(o=>o.uiTools.length>0)});return s.length===0?null:l?i.jsxs("div",{className:"flex flex-col gap-1 py-0.5",children:[i.jsx(H,{className:"h-7 w-full"}),i.jsx(H,{className:"h-7 w-2/3"})]}):!a||a.length===0?null:i.jsx("div",{className:"flex flex-col gap-0.5",children:a.map(c=>c.uiTools.map(o=>i.jsx(Fs,{agent:t,home:e,connection:c,tool:o,isPinned:r.has(o.resourceUri)},`${c.id}:${o.name}`)))})}function Fs({agent:t,home:e,connection:s,tool:r,isPinned:n}){const[a,l]=A.useState(!1),c=async()=>{if(!n&&!e.isOnHome(t.id)&&e.atLimit){W.error(`Home is full (${ee}) — remove an agent first`);return}l(!0);try{const o=pe(t.metadata?.ui),d=n?o.filter(u=>u.resourceUri!==r.resourceUri):[...o,{connectionId:s.id,resourceUri:r.resourceUri}],m={...t.metadata??{},ui:{...t.metadata?.ui??{},homeTile:null,homeTiles:d}};await e.saveAgentMetadata(t,m)}catch(o){console.error("[home-tiles] failed to toggle tile",o),W.error("Couldn't update home — please try again.")}finally{l(!1)}};return i.jsxs("div",{className:"flex items-center gap-2.5 rounded-md px-2 py-1 hover:bg-accent/40",children:[i.jsx(Yt,{icon:s.icon,name:s.title,size:"xs"}),i.jsx("div",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:Le(r.name)}),i.jsx(Qe,{isPinned:n,submitting:a,onClick:c,label:n?"Remove from home":"Add to home"})]})}function Qe(t){const e=T.c(11),{isPinned:s,submitting:r,onClick:n,label:a}=t,l=s?"text-muted-foreground hover:bg-destructive/10 hover:text-destructive":"bg-foreground text-background hover:opacity-90";let c;e[0]!==l?(c=q("inline-flex size-7 shrink-0 items-center justify-center rounded-md text-xs transition-colors disabled:opacity-50 disabled:cursor-progress",l),e[0]=l,e[1]=c):c=e[1];let o;e[2]!==s||e[3]!==r?(o=r?i.jsx(Ie,{size:12,className:"animate-spin"}):s?i.jsx(Nt,{size:14}):i.jsx(ge,{size:14}),e[2]=s,e[3]=r,e[4]=o):o=e[4];let d;return e[5]!==a||e[6]!==n||e[7]!==r||e[8]!==c||e[9]!==o?(d=i.jsx("button",{type:"button",onClick:n,disabled:r,"aria-label":a,title:a,className:c,children:o}),e[5]=a,e[6]=n,e[7]=r,e[8]=c,e[9]=o,e[10]=d):d=e[10],d}function Qs(t){const e=T.c(32),{agent:s,home:r,curated:n}=t,{org:a}=J();let l;e[0]!==s.id||e[1]!==a.id||e[2]!==a.slug?(l={connectionId:s.id,orgId:a.id,orgSlug:a.slug},e[0]=s.id,e[1]=a.id,e[2]=a.slug,e[3]=l):l=e[3];const c=oe(l);let o;e[4]!==s.id||e[5]!==a.id?(o=ne.agentPrompts(a.id,s.id),e[4]=s.id,e[5]=a.id,e[6]=o):o=e[6];let d;e[7]!==c?(d=async()=>{const{prompts:j}=await c.listPrompts();return j.map(Gs)},e[7]=c,e[8]=d):d=e[8];let m;e[9]!==o||e[10]!==d?(m={queryKey:o,queryFn:d,staleTime:3e4,retry:!1},e[9]=o,e[10]=d,e[11]=m):m=e[11];const{data:u,isLoading:f,error:x}=re(m),g=be(a.slug);let h,p;if(e[12]!==s.id||e[13]!==u||e[14]!==g.prompts){let j;e[17]!==s.id?(j=S=>S.agentId===s.id&&S.promptName,e[17]=s.id,e[18]=j):j=e[18],h=g.prompts.filter(j).map(Ks);let N;e[19]!==u?(N=u??[],e[19]=u,e[20]=N):N=e[20],p=[...N];for(const S of h)p.some(k=>k.name===S.name)||p.push(S);e[12]=s.id,e[13]=u,e[14]=g.prompts,e[15]=h,e[16]=p}else h=e[15],p=e[16];if(f&&h.length===0){let j;return e[21]===Symbol.for("react.memo_cache_sentinel")?(j=i.jsxs("div",{className:"flex flex-col gap-1",children:[i.jsx(H,{className:"h-7 w-full"}),i.jsx(H,{className:"h-7 w-2/3"})]}),e[21]=j):j=e[21],j}if(x&&h.length===0)return console.error("[home-tiles] listPrompts failed for agent",s.id,x),null;if(p.length===0)return null;let b;e[22]!==n||e[23]!==p?(b=n??p.map(qs),e[22]=n,e[23]=p,e[24]=b):b=e[24];let v;e[25]!==b?(v=new Set(b),e[25]=b,e[26]=v):v=e[26];const w=v;let y;return e[27]!==s||e[28]!==r||e[29]!==p||e[30]!==w?(y=i.jsx("div",{className:"flex flex-col gap-0.5",children:p.map(j=>i.jsx(Vs,{agent:s,home:r,prompt:j,allPromptNames:p.map(Ws),isPinned:w.has(j.name)},j.name))}),e[27]=s,e[28]=r,e[29]=p,e[30]=w,e[31]=y):y=e[31],y}function Ws(t){return t.name}function qs(t){return t.name}function Ks(t){return{name:t.promptName,title:t.title,description:t.description}}function Gs(t){return{name:t.name,title:t.title,description:t.description}}function Vs({agent:t,home:e,prompt:s,allPromptNames:r,isPinned:n}){const[a,l]=A.useState(!1),c=async()=>{if(!n&&!e.isOnHome(t.id)&&e.atLimit){W.error(`Home is full (${ee}) — remove an agent first`);return}l(!0);try{const o=t.metadata?.ui?.homePrompts;let d;Array.isArray(o)?d=n?o.filter(u=>u!==s.name):[...o,s.name]:d=n?r.filter(u=>u!==s.name):r;const m={...t.metadata??{},ui:{...t.metadata?.ui??{},homePrompts:d}};await e.saveAgentMetadata(t,m)}catch(o){console.error("[home-tiles] failed to toggle prompt",o),W.error("Couldn't update home — please try again.")}finally{l(!1)}};return i.jsxs("div",{className:"flex items-center gap-2.5 rounded-md px-2 py-1 hover:bg-accent/40",children:[i.jsx("div",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:s.title??Le(s.name)}),i.jsx(Qe,{isPinned:n,submitting:a,onClick:c,label:n?"Remove from home":"Add to home"})]})}function Js(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"flex flex-col gap-2 p-2",children:Array.from({length:4},Xs)}),t[0]=e):e=t[0],e}function Xs(t,e){return i.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-border p-2.5",children:[i.jsx(H,{className:"size-8 rounded-md"}),i.jsxs("div",{className:"flex-1 space-y-1.5",children:[i.jsx(H,{className:"h-3 w-1/2"}),i.jsx(H,{className:"h-2.5 w-1/3"})]})]},e)}const Z=1,We=`home-board.layout.v${Z}`;function qe(t){return`home-board.layout.v${Z}.${t}`}const Ke={version:Z,tiles:{},hidden:[]};function me(t){return!t||t.version!==Z?Ke:{version:Z,tiles:t.tiles??{},hidden:Array.isArray(t.hidden)?t.hidden:[]}}function Zs(t){return Object.keys(t.tiles).length>0||t.hidden.length>0}function Ys(t){try{const e=localStorage.getItem(qe(t));return e?me(JSON.parse(e)):void 0}catch{return}}function Ne(t,e){try{localStorage.setItem(qe(t),JSON.stringify(e))}catch{}}async function Se(t,e){if(!(await fetch(`/api/${t}/kv/${We}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok)throw new Error("Failed to save board layout")}function ei(t){const e=T.c(24),s=he();let r;e[0]!==t?(r=ne.boardLayout(t),e[0]=t,e[1]=r):r=e[1];const n=r;let a;e[2]!==t?(a=Ys(t),e[2]=t,e[3]=a):a=e[3];const l=a;let c;e[4]!==l||e[5]!==t?(c=async()=>{const b=await fetch(`/api/${t}/kv/${We}`);if(b.status===404)return l&&Zs(l)?(await Se(t,l),l):Ke;if(!b.ok)throw new Error("Failed to load board layout");const v=await b.json(),w=me(v.value);return Ne(t,w),w},e[4]=l,e[5]=t,e[6]=c):c=e[6];let o;e[7]!==l||e[8]!==n||e[9]!==c?(o={queryKey:n,queryFn:c,initialData:l,staleTime:0,refetchOnWindowFocus:!1},e[7]=l,e[8]=n,e[9]=c,e[10]=o):o=e[10];const{data:d,isLoading:m}=re(o);let u;e[11]!==t?(u={mutationFn:b=>Se(t,b)},e[11]=t,e[12]=u):u=e[12];const f=dt(u);let x;e[13]!==f||e[14]!==t||e[15]!==s||e[16]!==n?(x=b=>{Ne(t,b),s.setQueryData(n,b),f.mutate(b)},e[13]=f,e[14]=t,e[15]=s,e[16]=n,e[17]=x):x=e[17];const g=x;let h;e[18]!==d?(h=me(d),e[18]=d,e[19]=h):h=e[19];let p;return e[20]!==m||e[21]!==g||e[22]!==h?(p={layout:h,isLoading:m,save:g},e[20]=m,e[21]=g,e[22]=h,e[23]=p):p=e[23],p}const Ge=A.createContext(null);function ti(t){const e=T.c(24),{children:s}=t,{org:r}=J(),n=ei(r.slug),[a,l]=A.useState(!1),[c,o]=A.useState(null);let d;e[0]!==n.layout?(d=()=>{o(n.layout),l(!0)},e[0]=n.layout,e[1]=d):d=e[1];const m=d;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{o(null),l(!1)},e[2]=u):u=e[2];const f=u;let x;e[3]!==c||e[4]!==n?(x=()=>{c&&n.save(c),o(null),l(!1)},e[3]=c,e[4]=n,e[5]=x):x=e[5];const g=x,h=a&&c!==null,p=h?c:n.layout;let b;e[6]!==c||e[7]!==h||e[8]!==n.layout?(b=h?JSON.stringify(c)!==JSON.stringify(n.layout):!1,e[6]=c,e[7]=h,e[8]=n.layout,e[9]=b):b=e[9];const v=b;let w;e[10]!==a||e[11]!==n?(w=S=>{a?o(S):n.save(S)},e[10]=a,e[11]=n,e[12]=w):w=e[12];const y=w;let j;e[13]!==y||e[14]!==m||e[15]!==v||e[16]!==a||e[17]!==p||e[18]!==g||e[19]!==n.isLoading?(j={isEditMode:a,enter:m,cancel:f,save:g,hasChanges:v,layout:p,isLayoutLoading:n.isLoading,commitLayout:y},e[13]=y,e[14]=m,e[15]=v,e[16]=a,e[17]=p,e[18]=g,e[19]=n.isLoading,e[20]=j):j=e[20];let N;return e[21]!==s||e[22]!==j?(N=i.jsx(Ge.Provider,{value:j,children:s}),e[21]=s,e[22]=j,e[23]=N):N=e[23],N}function Ve(){const t=A.useContext(Ge);if(!t)throw new Error("useHomeEdit must be used within a HomeEditProvider");return t}function si({agentId:t}){const{org:e,locator:s}=J(),r=oe({connectionId:t,orgId:e.id,orgSlug:e.slug}),{create:n}=ls(),{setTaskId:a}=Bt(),[l,c]=A.useState(null),[o,d]=A.useState(!1),m=A.useRef(!1),u=async(p,b)=>{if(!r){W.error("MCP client not available");return}if(!m.current){m.current=!0,d(!0);try{const v=await os(r,p.name,b),w={type:"doc",content:[{type:"paragraph",content:[ss({id:p.name,name:is(p.name,ns(p._meta)),metadata:v.messages,char:"/",kind:"prompt",args:b}),{type:"text",text:" "}]}]},y=crypto.randomUUID();as(sessionStorage,s,y,{tiptapDoc:w}),await n({id:y,virtual_mcp_id:t}),a(y,t,{autosend:!0})}catch(v){console.error("[start-thread-from-prompt] failed",v),W.error("Failed to start thread. Please try again.")}finally{m.current=!1,d(!1)}}},f=async p=>{if(!m.current){if(p.arguments&&p.arguments.length>0){c(p);return}await u(p)}},x=async p=>{if(!l)return;const b=l;c(null),await u(b,p)};return{start:f,startBlank:async()=>{if(!m.current){m.current=!0,d(!0);try{const p=crypto.randomUUID();await n({id:p,virtual_mcp_id:t}),a(p,t)}catch(p){console.error("[start-thread-from-prompt] startBlank failed",p),W.error("Failed to start thread. Please try again.")}finally{m.current=!1,d(!1)}}},dialog:i.jsx(ts,{prompt:l,setPrompt:p=>c(p),onSubmit:x}),dialogPrompt:l,starting:o}}const K=4,V=100,_e=12,ii=5,ni={w:2,h:2};class ue extends A.Component{state={hasError:!1};static getDerivedStateFromError(e){return{hasError:!0,message:e instanceof Error?e.message:"Unknown error"}}componentDidCatch(e,s){console.error("[home-tiles] tile crashed:",e,s.componentStack)}render(){return this.state.hasError?i.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-4 text-center",children:[i.jsx("span",{className:"flex size-8 items-center justify-center rounded-md bg-destructive/10 text-destructive",children:i.jsx(mt,{size:16})}),i.jsx("p",{className:"text-sm font-medium text-foreground",children:"This tile crashed"}),i.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:this.state.message??"Something went wrong rendering this tile."})]}):this.props.children}}function ri(t){const e=T.c(72),{tiles:s,isEditMode:r,renderTile:n,onMove:a,onResize:l,onRemove:c}=t,o=xe(),d=A.useRef(null),[m,u]=A.useState(null),[f,x]=A.useState(null);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={activationConstraint:{distance:4}},e[0]=g):g=e[0];const h=Ae(ie(Oe,g),ie(Me)),p=s.reduce(oi,0),b=r?Math.max(p+2,4):Math.max(p,1);let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{const M=d.current?.getBoundingClientRect();return M?{cellWidth:M.width/K,cellHeight:V}:null},e[1]=v):v=e[1];const w=v;let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=M=>{u(String(M.active.id)),x(w())},e[2]=y):y=e[2];const j=y;let N;e[3]!==f||e[4]!==a||e[5]!==s?(N=M=>{const F=String(M.active.id),D=f??w();if(u(null),x(null),!D||D.cellWidth<=0)return;const R=s.find(G=>G.id===F);if(!R)return;const L=Math.round(M.delta.x/D.cellWidth),U=Math.round(M.delta.y/D.cellHeight);L===0&&U===0||a(F,{x:R.x+L,y:R.y+U})},e[3]=f,e[4]=a,e[5]=s,e[6]=N):N=e[6];const S=N;if(o){let M;if(e[7]!==n||e[8]!==s){let D;e[10]!==n?(D=R=>i.jsx("div",{className:"bg-card card-shadow rounded-2xl overflow-hidden",style:{minHeight:V},children:i.jsx(ue,{children:n(R)})},R.id),e[10]=n,e[11]=D):D=e[11],M=s.map(D),e[7]=n,e[8]=s,e[9]=M}else M=e[9];let F;return e[12]!==M?(F=i.jsx("div",{className:"flex flex-col gap-3 px-4 pb-8",children:M}),e[12]=M,e[13]=F):F=e[13],F}let k,C,$,E,_,I,O,B,z;if(e[14]!==m||e[15]!==f||e[16]!==r||e[17]!==S||e[18]!==c||e[19]!==l||e[20]!==n||e[21]!==h||e[22]!==s||e[23]!==b){const M=m?s.find(X=>X.id===m):null;C=Re,B=h,z=j,$=S;const F=b*V,D=r?V*4:V;let R;e[33]!==F||e[34]!==D?(R={height:F,minHeight:D},e[33]=F,e[34]=D,e[35]=R):R=e[35];let L;e[36]!==r||e[37]!==s||e[38]!==b?(L=r&&i.jsx(li,{rows:b,tiles:s}),e[36]=r,e[37]=s,e[38]=b,e[39]=L):L=e[39];let U;if(e[40]!==m||e[41]!==r||e[42]!==c||e[43]!==l||e[44]!==n||e[45]!==s){let X;e[47]!==m||e[48]!==r||e[49]!==c||e[50]!==l||e[51]!==n?(X=te=>i.jsx(ci,{tile:te,isEditMode:r,isDragging:m===te.id,onResize:l,onRemove:c,children:n(te)},te.id),e[47]=m,e[48]=r,e[49]=c,e[50]=l,e[51]=n,e[52]=X):X=e[52],U=s.map(X),e[40]=m,e[41]=r,e[42]=c,e[43]=l,e[44]=n,e[45]=s,e[46]=U}else U=e[46];e[53]!==R||e[54]!==L||e[55]!==U?(E=i.jsxs("div",{ref:d,className:"relative w-full",style:R,children:[L,U]}),e[53]=R,e[54]=L,e[55]=U,e[56]=E):E=e[56],k=Ht,_=null;const G=M&&f?M.w*f.cellWidth-_e:void 0,le=M&&f?M.h*f.cellHeight-_e:void 0;e[57]!==G||e[58]!==le?(I={width:G,height:le},e[57]=G,e[58]=le,e[59]=I):I=e[59],O=M&&i.jsx("div",{className:"bg-card card-shadow rounded-2xl shadow-2xl ring-2 ring-primary/40 h-full overflow-hidden opacity-95",children:i.jsx(ue,{children:n(M)})}),e[14]=m,e[15]=f,e[16]=r,e[17]=S,e[18]=c,e[19]=l,e[20]=n,e[21]=h,e[22]=s,e[23]=b,e[24]=k,e[25]=C,e[26]=$,e[27]=E,e[28]=_,e[29]=I,e[30]=O,e[31]=B,e[32]=z}else k=e[24],C=e[25],$=e[26],E=e[27],_=e[28],I=e[29],O=e[30],B=e[31],z=e[32];let P;e[60]!==k||e[61]!==_||e[62]!==I||e[63]!==O?(P=i.jsx(k,{dropAnimation:_,style:I,children:O}),e[60]=k,e[61]=_,e[62]=I,e[63]=O,e[64]=P):P=e[64];let Q;return e[65]!==C||e[66]!==$||e[67]!==E||e[68]!==P||e[69]!==B||e[70]!==z?(Q=i.jsxs(C,{sensors:B,onDragStart:z,onDragEnd:$,children:[E,P]}),e[65]=C,e[66]=$,e[67]=E,e[68]=P,e[69]=B,e[70]=z,e[71]=Q):Q=e[71],Q}function oi(t,e){return Math.max(t,e.y+e.h)}function li(t){const e=T.c(7),{rows:s,tiles:r}=t;let n;e[0]!==r?(n=(o,d)=>r.some(m=>o>=m.x&&o<m.x+m.w&&d>=m.y&&d<m.y+m.h),e[0]=r,e[1]=n):n=e[1];const a=n;let l;if(e[2]!==a||e[3]!==s){l=[];for(let o=0;o<s;o++)for(let d=0;d<K;d++)a(d,o)||l.push({x:d,y:o});e[2]=a,e[3]=s,e[4]=l}else l=e[4];let c;return e[5]!==l?(c=i.jsx("div",{className:"absolute inset-0 pointer-events-none",children:l.map(ai)}),e[5]=l,e[6]=c):c=e[6],c}function ai(t){return i.jsx("div",{className:"absolute p-1",style:{left:`${t.x/K*100}%`,top:t.y*V,width:`${1/K*100}%`,height:V},children:i.jsx("div",{className:"h-full w-full rounded-2xl border border-dashed border-border/60"})},`${t.x}-${t.y}`)}function ci(t){const e=T.c(31),{tile:s,isEditMode:r,isDragging:n,onResize:a,onRemove:l,children:c}=t,o=!r;let d;e[0]!==o||e[1]!==s.id?(d={id:s.id,disabled:o},e[0]=o,e[1]=s.id,e[2]=d):d=e[2];const{setNodeRef:m,attributes:u,listeners:f,isDragging:x}=Lt(d),g=`${s.x/K*100}%`,h=`${s.w/K*100}%`,p=s.y*V,b=s.h*V,v=x||n,w=!v&&"transition-[left,top,width,height,opacity] duration-200 ease-out",y=v&&"opacity-30";let j;e[3]!==w||e[4]!==y?(j=q("absolute p-1 will-change-[left,top,width,height,opacity]",w,y),e[3]=w,e[4]=y,e[5]=j):j=e[5];let N;e[6]!==b||e[7]!==g||e[8]!==p||e[9]!==h?(N={left:g,top:p,width:h,height:b},e[6]=b,e[7]=g,e[8]=p,e[9]=h,e[10]=N):N=e[10];const S=r&&"outline outline-1 outline-transparent hover:outline-primary/40";let k;e[11]!==S?(k=q("relative h-full bg-card card-shadow rounded-2xl overflow-hidden",S),e[11]=S,e[12]=k):k=e[12];let C;e[13]!==u||e[14]!==r||e[15]!==f||e[16]!==l||e[17]!==a||e[18]!==s?(C=r&&i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",...u,...f,className:"absolute top-2 left-2 z-10 flex size-8 items-center justify-center rounded-md bg-background/90 border border-border text-muted-foreground hover:text-foreground hover:bg-muted cursor-grab active:cursor-grabbing","aria-label":"Drag tile",children:i.jsx(He,{size:16})}),i.jsx("div",{className:"absolute top-2 right-2 z-10 flex items-center gap-1",children:i.jsx(di,{tile:s,onResize:a,onRemove:l})})]}),e[13]=u,e[14]=r,e[15]=f,e[16]=l,e[17]=a,e[18]=s,e[19]=C):C=e[19];let $;e[20]!==c?($=i.jsx("div",{className:"h-full overflow-hidden",children:i.jsx(ue,{children:c})}),e[20]=c,e[21]=$):$=e[21];let E;e[22]!==$||e[23]!==k||e[24]!==C?(E=i.jsxs("div",{className:k,children:[C,$]}),e[22]=$,e[23]=k,e[24]=C,e[25]=E):E=e[25];let _;return e[26]!==m||e[27]!==E||e[28]!==j||e[29]!==N?(_=i.jsx("div",{ref:m,className:j,style:N,children:E}),e[26]=m,e[27]=E,e[28]=j,e[29]=N,e[30]=_):_=e[30],_}function di(t){const e=T.c(20),{tile:s,onResize:r,onRemove:n}=t,[a,l]=A.useState(!1);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(cs,{asChild:!0,children:i.jsx("button",{type:"button",className:"flex size-8 items-center justify-center rounded-md bg-background/90 border border-border text-muted-foreground hover:text-foreground hover:bg-muted","aria-label":"Tile options",children:i.jsx(St,{size:16})})}),e[0]=c):c=e[0];let o;e[1]!==r||e[2]!==s.id?(o=p=>{r(s.id,p),l(!1)},e[1]=r,e[2]=s.id,e[3]=o):o=e[3];let d;e[4]!==o||e[5]!==s?(d=i.jsx(mi,{tile:s,onPick:o}),e[4]=o,e[5]=s,e[6]=d):d=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(ds,{}),e[7]=m):m=e[7];let u;e[8]!==n||e[9]!==s.id?(u=()=>n(s.id),e[8]=n,e[9]=s.id,e[10]=u):u=e[10];let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(hs,{size:14,className:"mr-2"}),e[11]=f):f=e[11];let x;e[12]!==u?(x=i.jsxs(ms,{onSelect:u,className:"text-destructive focus:text-destructive",children:[f,"Remove tile"]}),e[12]=u,e[13]=x):x=e[13];let g;e[14]!==d||e[15]!==x?(g=i.jsxs(us,{align:"end",className:"w-auto",children:[d,m,x]}),e[14]=d,e[15]=x,e[16]=g):g=e[16];let h;return e[17]!==a||e[18]!==g?(h=i.jsxs(fs,{open:a,onOpenChange:l,children:[c,g]}),e[17]=a,e[18]=g,e[19]=h):h=e[19],h}function mi(t){const e=T.c(19),{tile:s,onPick:r}=t,n=s.minW??1,a=s.minH??1,[l,c]=A.useState(null);let o;e[0]!==l||e[1]!==s.h||e[2]!==s.w?(o=l??{w:s.w,h:s.h},e[0]=l,e[1]=s.h,e[2]=s.w,e[3]=o):o=e[3];const d=o;let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx("span",{className:"text-xs text-muted-foreground",children:"Size"}),e[4]=m):m=e[4];let u;e[5]!==d.h||e[6]!==d.w?(u=i.jsxs("div",{className:"mb-2 flex items-center justify-between gap-4",children:[m,i.jsxs("span",{className:"text-xs font-medium tabular-nums",children:[d.w," × ",d.h]})]}),e[5]=d.h,e[6]=d.w,e[7]=u):u=e[7];let f,x;e[8]===Symbol.for("react.memo_cache_sentinel")?(f={gridTemplateColumns:`repeat(${K}, 1.25rem)`},x=()=>c(null),e[8]=f,e[9]=x):(f=e[8],x=e[9]);let g;e[10]!==d.h||e[11]!==d.w||e[12]!==a||e[13]!==n||e[14]!==r?(g=i.jsx("div",{className:"grid w-max gap-1",style:f,onPointerLeave:x,children:Array.from({length:ii},(p,b)=>Array.from({length:K},(v,w)=>{const y=w+1,j=b+1,N=y<n||j<a,S=y<=d.w&&j<=d.h;return i.jsx("button",{type:"button",disabled:N,"aria-label":`${y} by ${j}`,onPointerEnter:()=>c({w:y,h:j}),onClick:()=>r({w:y,h:j}),className:q("size-5 rounded-sm border transition-colors",S?"border-primary bg-primary/30":"border-border bg-muted",N?"cursor-not-allowed opacity-40":"cursor-pointer hover:border-primary/60")},`${y}x${j}`)}))}),e[10]=d.h,e[11]=d.w,e[12]=a,e[13]=n,e[14]=r,e[15]=g):g=e[15];let h;return e[16]!==u||e[17]!==g?(h=i.jsxs("div",{className:"px-2 py-1.5",children:[u,g]}),e[16]=u,e[17]=g,e[18]=h):h=e[18],h}function ui(t,e,s){return t.some(r=>e>=r.x&&e<r.x+r.w&&s>=r.y&&s<r.y+r.h)}function fe(t,e,s){for(let r=0;r<100;r++)for(let n=0;n<=K-e;n++){let a=!0;for(let l=0;l<s&&a;l++)for(let c=0;c<e&&a;c++)ui(t,n+c,r+l)&&(a=!1);if(a)return{x:n,y:r}}return{x:0,y:0}}function ae(t,e,s={w:1,h:1}){const r=Math.max(s.w,Math.min(K,t)),n=Math.max(s.h,Math.min(6,e));return{w:r,h:n}}function ce(t,e,s){const r=Math.max(0,Math.min(K-s,t)),n=Math.max(0,e);return{x:r,y:n}}function fi(t,e,s){const r=t.find(o=>o.id===e);if(!r)return t;const n=t.filter(o=>o.id!==e),a=n.find(o=>s.x>=o.x&&s.x<o.x+o.w&&s.y>=o.y&&s.y<o.y+o.h);if(a&&a.w===r.w&&a.h===r.h)return t.map(o=>o.id===e?{...o,x:a.x,y:a.y}:o.id===a.id?{...o,x:r.x,y:r.y}:o);const c=[{...r,x:s.x,y:s.y}];for(const o of n){const d=fe(c,o.w,o.h);c.push({...o,x:d.x,y:d.y})}return c}function hi(t){const e=T.c(35),{layout:s,isLayoutLoading:r,commitLayout:n}=Ve();let a;e[0]!==s.hidden?(a=new Set(s.hidden),e[0]=s.hidden,e[1]=a):a=e[1];const l=a;let c,o;if(e[2]!==t||e[3]!==l||e[4]!==s.tiles){o=[];let v;e[7]!==l?(v=y=>y.pinned||!l.has(y.id),e[7]=l,e[8]=v):v=e[8];const w=t.filter(v);c=new Map;for(const y of t)y.minSize&&c.set(y.id,y.minSize);for(const y of w){const j=s.tiles[y.id];if(!j)continue;const N=c.get(y.id),{w:S,h:k}=ae(j.w,j.h,N),{x:C,y:$}=ce(j.x,j.y,S);o.push({id:y.id,x:C,y:$,w:S,h:k,minW:N?.w,minH:N?.h})}for(const y of w){if(o.some($=>$.id===y.id))continue;const j=y.defaultSize??ni,N=c.get(y.id),{w:S,h:k}=ae(j.w,j.h,N),C=fe(o,S,k);o.push({id:y.id,x:C.x,y:C.y,w:S,h:k,minW:N?.w,minH:N?.h})}e[2]=t,e[3]=l,e[4]=s.tiles,e[5]=c,e[6]=o}else c=e[5],o=e[6];let d;e[9]!==t?(d=new Set(t.map(pi)),e[9]=t,e[10]=d):d=e[10];const m=d;let u;e[11]!==m||e[12]!==n?(u=(v,w)=>{const y={};for(const j of v)y[j.id]={x:j.x,y:j.y,w:j.w,h:j.h};n({version:Z,tiles:y,hidden:w.filter(j=>m.has(j))})},e[11]=m,e[12]=n,e[13]=u):u=e[13];const f=u;let x;e[14]!==o?(x={visible:o},e[14]=o,e[15]=x):x=e[15];let g;e[16]!==f||e[17]!==s||e[18]!==o?(g=(v,w)=>{const y=o.find(S=>S.id===v);if(!y)return;const j=ce(w.x,w.y,y.w);if(j.x===y.x&&j.y===y.y)return;const N=fi(o,v,j);f(N,s.hidden)},e[16]=f,e[17]=s,e[18]=o,e[19]=g):g=e[19];let h;e[20]!==f||e[21]!==s||e[22]!==c||e[23]!==o?(h=(v,w)=>{const y=o.find(E=>E.id===v);if(!y)return;const j=c.get(v),{w:N,h:S}=ae(w.w,w.h,j);if(N===y.w&&S===y.h)return;const k={...y,w:N,h:S,x:ce(y.x,y.y,N).x},C=o.filter(E=>E.id!==v),$=[k];for(const E of C){const _=fe($,E.w,E.h);$.push({...E,x:_.x,y:_.y})}f($,s.hidden)},e[20]=f,e[21]=s,e[22]=c,e[23]=o,e[24]=h):h=e[24];let p;e[25]!==f||e[26]!==s||e[27]!==o?(p=v=>{const w=o.filter(y=>y.id!==v);f(w,Array.from(new Set([...s.hidden,v])))},e[25]=f,e[26]=s,e[27]=o,e[28]=p):p=e[28];let b;return e[29]!==r||e[30]!==x||e[31]!==g||e[32]!==h||e[33]!==p?(b={snapshot:x,isLoading:r,moveTile:g,resizeTile:h,hideTile:p},e[29]=r,e[30]=x,e[31]=g,e[32]=h,e[33]=p,e[34]=b):b=e[34],b}function pi(t){return t.id}const xi={w:2,h:4},gi={w:1,h:2},bi={w:1,h:1};function yi(t){return`prompt:${t.agentId}:${t.promptName||"blank"}`}function vi(t){return`tile:${t.agentId}:${t.resourceUri}`}function ji(t){return t.promptName?t.agentName:t.description}function wi(t){return{name:t.promptName,title:t.title,description:t.description,arguments:t.arguments,_meta:t._meta}}function ye(t){const e=T.c(10);let s;e[0]!==t?(s={agentId:t},e[0]=t,e[1]=s):s=e[1];const{start:r,startBlank:n,dialog:a,starting:l}=si(s);let c;e[2]!==r||e[3]!==n?(c=m=>{if(!m.promptName){n();return}r(wi(m))},e[2]=r,e[3]=n,e[4]=c):c=e[4];const o=c;let d;return e[5]!==a||e[6]!==o||e[7]!==n||e[8]!==l?(d={open:o,startBlank:n,dialog:a,starting:l},e[5]=a,e[6]=o,e[7]=n,e[8]=l,e[9]=d):d=e[9],d}function Ni(t){const e=T.c(32),{entry:s,isEditMode:r}=t,{open:n,dialog:a,starting:l}=ye(s.agentId);let c;e[0]!==s||e[1]!==n?(c=()=>n(s),e[0]=s,e[1]=n,e[2]=c):c=e[2];const o=l||r,d=!r&&"cursor-pointer transition-colors hover:bg-accent/40",m=r&&"cursor-default pl-12",u=l&&"opacity-60";let f;e[3]!==d||e[4]!==m||e[5]!==u?(f=q("group/tile relative flex h-full w-full items-center gap-3 px-4 py-3 text-left bg-card",d,m,u),e[3]=d,e[4]=m,e[5]=u,e[6]=f):f=e[6];let x;e[7]!==s.agentIcon||e[8]!==s.agentName?(x=i.jsx(Y,{icon:s.agentIcon,name:s.agentName,size:"sm+"}),e[7]=s.agentIcon,e[8]=s.agentName,e[9]=x):x=e[9];let g;e[10]!==s.title?(g=i.jsx("div",{className:"line-clamp-2 text-sm font-medium text-foreground leading-snug",children:s.title}),e[10]=s.title,e[11]=g):g=e[11];let h;e[12]!==s?(h=ji(s),e[12]=s,e[13]=h):h=e[13];let p;e[14]!==h?(p=i.jsx("div",{className:"truncate text-xs text-muted-foreground mt-0.5",children:h}),e[14]=h,e[15]=p):p=e[15];let b;e[16]!==p||e[17]!==g?(b=i.jsxs("div",{className:"min-w-0 flex-1",children:[g,p]}),e[16]=p,e[17]=g,e[18]=b):b=e[18];let v;e[19]!==r?(v=!r&&i.jsx(rs,{size:16,className:"shrink-0 text-muted-foreground opacity-0 -translate-x-1 transition-all duration-200 group-hover/tile:opacity-100 group-hover/tile:translate-x-0","aria-hidden":!0}),e[19]=r,e[20]=v):v=e[20];let w;e[21]!==l||e[22]!==c||e[23]!==b||e[24]!==v||e[25]!==o||e[26]!==f||e[27]!==x?(w=i.jsxs("button",{type:"button",onClick:c,disabled:o,"aria-busy":l,className:f,children:[x,b,v]}),e[21]=l,e[22]=c,e[23]=b,e[24]=v,e[25]=o,e[26]=f,e[27]=x,e[28]=w):w=e[28];let y;return e[29]!==a||e[30]!==w?(y=i.jsxs(i.Fragment,{children:[w,a]}),e[29]=a,e[30]=w,e[31]=y):y=e[31],y}function Si(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"mt-4 grid w-full grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:Array.from({length:3},_i)}),t[0]=e):e=t[0],e}function _i(t,e){return i.jsxs("div",{className:"flex w-full items-center gap-3 rounded-2xl bg-card card-shadow px-3 py-2.5",children:[i.jsx(H,{className:"size-10 rounded-xl"}),i.jsxs("div",{className:"flex-1 space-y-1.5",children:[i.jsx(H,{className:"h-3 w-2/3"}),i.jsx(H,{className:"h-2.5 w-1/3"})]})]},`chip-skeleton-${e}`)}function Ci(t){const e=T.c(49),{tile:s,prompts:r,isEditMode:n,tileWidth:a}=t,{org:l}=J(),{open:c,startBlank:o,dialog:d,starting:m}=ye(s.agentId);let u,f,x,g,h;if(e[0]!==n||e[1]!==c||e[2]!==l.id||e[3]!==l.slug||e[4]!==r||e[5]!==o||e[6]!==m||e[7]!==s||e[8]!==a){const v=r.filter(ki);g="flex h-full w-full flex-col gap-3 p-3";let w;e[14]!==o?(w=()=>{o()},e[14]=o,e[15]=w):w=e[15];const y=m||n,j=n&&"pl-10 pr-10";let N;e[16]!==j?(N=q("flex items-center gap-3 rounded-lg text-left outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-progress disabled:opacity-60",j),e[16]=j,e[17]=N):N=e[17];let S;e[18]!==s.agentIcon||e[19]!==s.agentName?(S=i.jsx(Y,{icon:s.agentIcon,name:s.agentName,size:"sm+"}),e[18]=s.agentIcon,e[19]=s.agentName,e[20]=S):S=e[20];let k;e[21]!==s.agentName?(k=i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:s.agentName}),e[21]=s.agentName,e[22]=k):k=e[22];const C=n?"Drag to rearrange":"Open chat";let $;e[23]!==C?($=i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:C}),e[23]=C,e[24]=$):$=e[24];let E;e[25]!==k||e[26]!==$?(E=i.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[k,$]}),e[25]=k,e[26]=$,e[27]=E):E=e[27],e[28]!==m||e[29]!==S||e[30]!==E||e[31]!==w||e[32]!==y||e[33]!==N?(h=i.jsxs("button",{type:"button",onClick:w,disabled:y,"aria-busy":m,className:N,children:[S,E]}),e[28]=m,e[29]=S,e[30]=E,e[31]=w,e[32]=y,e[33]=N,e[34]=h):h=e[34],u="flex min-h-0 flex-1 gap-3 overflow-hidden";let _;e[35]===Symbol.for("react.memo_cache_sentinel")?(_=i.jsx($i,{}),e[35]=_):_=e[35],e[36]!==l.id||e[37]!==l.slug||e[38]!==s?(f=i.jsx("div",{className:"min-h-0 flex-1 overflow-hidden rounded-lg border border-border",children:i.jsx(A.Suspense,{fallback:_,children:i.jsx(Ei,{tile:s,orgId:l.id,orgSlug:l.slug})})}),e[36]=l.id,e[37]=l.slug,e[38]=s,e[39]=f):f=e[39],x=v.length>0&&!n&&a>=2&&i.jsx("div",{className:"flex w-44 shrink-0 flex-col gap-2 overflow-hidden",children:v.map(I=>i.jsx("button",{type:"button",onClick:()=>c(I),disabled:m,className:"shrink-0 rounded-lg border border-border bg-background px-2.5 py-2 text-left text-xs leading-snug text-foreground transition-colors hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-progress disabled:opacity-60",children:i.jsx("span",{className:"line-clamp-2",children:I.title})},I.promptName))}),e[0]=n,e[1]=c,e[2]=l.id,e[3]=l.slug,e[4]=r,e[5]=o,e[6]=m,e[7]=s,e[8]=a,e[9]=u,e[10]=f,e[11]=x,e[12]=g,e[13]=h}else u=e[9],f=e[10],x=e[11],g=e[12],h=e[13];let p;e[40]!==u||e[41]!==f||e[42]!==x?(p=i.jsxs("div",{className:u,children:[f,x]}),e[40]=u,e[41]=f,e[42]=x,e[43]=p):p=e[43];let b;return e[44]!==d||e[45]!==g||e[46]!==h||e[47]!==p?(b=i.jsxs("div",{className:g,children:[h,p,d]}),e[44]=d,e[45]=g,e[46]=h,e[47]=p,e[48]=b):b=e[48],b}function ki(t){return!!t.promptName}function Ei(t){const e=T.c(12),{tile:s,orgId:r,orgSlug:n}=t;let a;e[0]!==r||e[1]!==n||e[2]!==s.connectionId?(a={connectionId:s.connectionId,orgId:r,orgSlug:n},e[0]=r,e[1]=n,e[2]=s.connectionId,e[3]=a):a=e[3];const l=oe(a),c=s.minHeight??200,o=s.maxHeight??4e3;let d;return e[4]!==l||e[5]!==r||e[6]!==n||e[7]!==c||e[8]!==o||e[9]!==s.connectionId||e[10]!==s.resourceUri?(d=i.jsx(Zt,{resourceURI:s.resourceUri,orgId:r,orgSlug:n,connectionId:s.connectionId,client:l,displayMode:"fullscreen",minHeight:c,maxHeight:o,className:"h-full"}),e[4]=l,e[5]=r,e[6]=n,e[7]=c,e[8]=o,e[9]=s.connectionId,e[10]=s.resourceUri,e[11]=d):d=e[11],d}function $i(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsxs("div",{className:"flex h-full w-full flex-col gap-2 p-4",children:[i.jsx(H,{className:"h-3 w-2/3"}),i.jsx(H,{className:"h-3 w-1/2"}),i.jsx(H,{className:"mt-1 h-full w-full rounded-md"})]}),t[0]=e):e=t[0],e}function Ii(t){const e=T.c(14),{icon:s,name:r}=t;let n;e[0]!==s||e[1]!==r?(n=i.jsx(Y,{icon:s,name:r,size:"sm+"}),e[0]=s,e[1]=r,e[2]=n):n=e[2];let a;e[3]!==r?(a=i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:r}),e[3]=r,e[4]=a):a=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:"Loading tile…"}),e[5]=l):l=e[5];let c;e[6]!==a?(c=i.jsxs("div",{className:"min-w-0 flex-1",children:[a,l]}),e[6]=a,e[7]=c):c=e[7];let o;e[8]!==n||e[9]!==c?(o=i.jsxs("div",{className:"flex items-center gap-2.5",children:[n,c]}),e[8]=n,e[9]=c,e[10]=o):o=e[10];let d;e[11]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsxs("div",{className:"flex flex-1 flex-col gap-2 pt-1",children:[i.jsx(H,{className:"h-3 w-3/4"}),i.jsx(H,{className:"h-3 w-1/2"}),i.jsx(H,{className:"h-3 w-2/3"})]}),e[11]=d):d=e[11];let m;return e[12]!==o?(m=i.jsxs("div",{className:"flex h-full w-full flex-col gap-3 p-5 opacity-60",children:[o,d]}),e[12]=o,e[13]=m):m=e[13],m}function Ti(t){const e=T.c(33),{tile:s,prompts:r,isEditMode:n}=t,{open:a,startBlank:l,dialog:c,starting:o}=ye(s.agentId);let d,m,u;if(e[0]!==n||e[1]!==a||e[2]!==r||e[3]!==l||e[4]!==o||e[5]!==s.agentIcon||e[6]!==s.agentName){const x=r.filter(Ai);d="flex h-full w-full flex-col gap-3 p-4";let g;e[10]!==l?(g=()=>{l()},e[10]=l,e[11]=g):g=e[11];const h=o||n,p=n&&"pl-10 pr-10";let b;e[12]!==p?(b=q("flex items-center gap-3 rounded-lg text-left outline-none focus-visible:ring-2 focus-visible:ring-ring",p),e[12]=p,e[13]=b):b=e[13];let v;e[14]!==s.agentIcon||e[15]!==s.agentName?(v=i.jsx(Y,{icon:s.agentIcon,name:s.agentName,size:"sm+"}),e[14]=s.agentIcon,e[15]=s.agentName,e[16]=v):v=e[16];let w;e[17]!==s.agentName?(w=i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:s.agentName}),e[17]=s.agentName,e[18]=w):w=e[18];let y;e[19]===Symbol.for("react.memo_cache_sentinel")?(y=i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:"UI unavailable — open chat"}),e[19]=y):y=e[19];let j;e[20]!==w?(j=i.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[w,y]}),e[20]=w,e[21]=j):j=e[21],e[22]!==j||e[23]!==g||e[24]!==h||e[25]!==b||e[26]!==v?(m=i.jsxs("button",{type:"button",onClick:g,disabled:h,className:b,children:[v,j]}),e[22]=j,e[23]=g,e[24]=h,e[25]=b,e[26]=v,e[27]=m):m=e[27],u=x.length>0&&!n&&i.jsx("div",{className:"grid grid-cols-1 gap-2 overflow-hidden sm:grid-cols-2",children:x.map(N=>i.jsx("button",{type:"button",onClick:()=>!n&&a(N),disabled:o,className:"rounded-lg border border-border bg-background px-2.5 py-2 text-left text-xs leading-snug text-foreground transition-colors hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-progress disabled:opacity-60",children:i.jsx("span",{className:"line-clamp-2",children:N.title})},N.promptName))}),e[0]=n,e[1]=a,e[2]=r,e[3]=l,e[4]=o,e[5]=s.agentIcon,e[6]=s.agentName,e[7]=d,e[8]=m,e[9]=u}else d=e[7],m=e[8],u=e[9];let f;return e[28]!==c||e[29]!==d||e[30]!==m||e[31]!==u?(f=i.jsxs("div",{className:d,children:[m,u,c]}),e[28]=c,e[29]=d,e[30]=m,e[31]=u,e[32]=f):f=e[32],f}function Ai(t){return!!t.promptName}function Je(t){const e=T.c(36),{isEditMode:s}=t,{org:r}=J(),{isLoading:n,prompts:a,tiles:l}=be(r.slug),c=ze()?.ids??[];let o;e[0]!==c?(o=new Set(c),e[0]=c,e[1]=o):o=e[1];const d=o,m=Pe();let u;e[2]!==l?(u=new Set(l.map(Pi)),e[2]=l,e[3]=u):u=e[3];const f=u;let x;if(e[4]!==a){x=new Map;for(const _ of a){const I=x.get(_.agentId);I?I.push(_):x.set(_.agentId,[_])}e[4]=a,e[5]=x}else x=e[5];let g;if(e[6]!==a||e[7]!==f||e[8]!==l){let _;e[10]!==f?(_=O=>!f.has(O.agentId),e[10]=f,e[11]=_):_=e[11];const I=a.filter(_);g=[...l.map(zi),...I.map(Ri)],e[6]=a,e[7]=f,e[8]=l,e[9]=g}else g=e[9];const h=g;let p;e[12]!==h?(p=new Map(h.map(Oi)),e[12]=h,e[13]=p):p=e[13];const b=p;let v;e[14]!==h||e[15]!==d?(v=h.map(_=>({id:_.id,defaultSize:_.kind==="tile"?xi:bi,minSize:_.kind==="tile"?gi:void 0,pinned:d.has(_.data.agentId)})),e[14]=h,e[15]=d,e[16]=v):v=e[16];const w=hi(v);let y;e[17]!==m?(y=_=>{m.apply(I=>I.filter(O=>O!==_)).catch(Mi)},e[17]=m,e[18]=y):y=e[18];const j=y;let N;e[19]!==b||e[20]!==w||e[21]!==d||e[22]!==j?(N=_=>{const I=b.get(_);I&&d.has(I.data.agentId)?j(I.data.agentId):w.hideTile(_)},e[19]=b,e[20]=w,e[21]=d,e[22]=j,e[23]=N):N=e[23];const S=N;let k;e[24]!==b||e[25]!==s||e[26]!==x?(k=_=>{const I=b.get(_.id);if(!I)return null;if(I.kind==="tile"){const O=x.get(I.data.agentId)??[];return i.jsx(ut,{fallback:i.jsx(Ti,{tile:I.data,prompts:O,isEditMode:s}),children:i.jsx(A.Suspense,{fallback:i.jsx(Ii,{icon:I.data.agentIcon,name:I.data.agentName}),children:i.jsx(Ci,{tile:I.data,prompts:O,isEditMode:s,tileWidth:_.w})})})}return i.jsx(Ni,{entry:I.data,isEditMode:s})},e[24]=b,e[25]=s,e[26]=x,e[27]=k):k=e[27];const C=k;if(n||w.isLoading){let _;return e[28]===Symbol.for("react.memo_cache_sentinel")?(_=i.jsx(Si,{}),e[28]=_):_=e[28],_}if(w.snapshot.visible.length===0&&!s)return null;let E;return e[29]!==s||e[30]!==w.moveTile||e[31]!==w.resizeTile||e[32]!==w.snapshot.visible||e[33]!==S||e[34]!==C?(E=i.jsx("div",{className:"mt-4 flex w-full max-w-7xl flex-col gap-4",children:i.jsx(ri,{tiles:w.snapshot.visible,isEditMode:s,renderTile:C,onMove:w.moveTile,onResize:w.resizeTile,onRemove:S})}),e[29]=s,e[30]=w.moveTile,e[31]=w.resizeTile,e[32]=w.snapshot.visible,e[33]=S,e[34]=C,e[35]=E):E=e[35],E}function Mi(){return W.error("Couldn't remove from home — please try again.")}function Oi(t){return[t.id,t]}function Ri(t){return{kind:"prompt",id:yi(t),data:t}}function zi(t){return{kind:"tile",id:vi(t),data:t}}function Pi(t){return t.agentId}function Di(t){const e=T.c(2),{prompts:s,tiles:r}=be(t),n=r.length>0||s.length>0;let a;return e[0]!==n?(a={hasVisibleTiles:n},e[0]=n,e[1]=a):a=e[1],a}const Ce=420,ke=305;function Xe(){const t=T.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("img",{src:"/home/bg-top-left.svg",alt:"",className:"absolute top-0 left-0 h-auto select-none opacity-80 dark:hidden",style:{width:Ce}}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("img",{src:"/home/bg-top-left-dark.svg",alt:"",className:"absolute top-0 left-0 hidden h-auto select-none opacity-80 dark:block",style:{width:Ce}}),t[1]=s):s=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("img",{src:"/home/bg-bottom-right.svg",alt:"",className:"absolute bottom-0 right-0 h-auto select-none opacity-80 dark:hidden",style:{width:ke}}),t[2]=r):r=t[2];let n;return t[3]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsxs("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 overflow-hidden",children:[e,s,r,i.jsx("img",{src:"/home/bg-bottom-right-dark.svg",alt:"",className:"absolute bottom-0 right-0 hidden h-auto select-none opacity-80 dark:block",style:{width:ke}})]}),t[3]=n):n=t[3],n}function Ee(){const t=T.c(33),{data:e}=ft.useSession(),{org:s}=J(),r=xe(),n=$t(),{selectedVirtualMcp:a}=It();let l;t[0]!==s.id?(l=pt(s.id),t[0]=s.id,t[1]=l):l=t[1];const o=a??l;let d;t[2]!==s.slug?(d=Ft(s.slug),t[2]=s.slug,t[3]=d):d=t[3],re(d);let m;t[4]!==s.id||t[5]!==s.slug?(m={connectionId:xt,orgId:s.id,orgSlug:s.slug},t[4]=s.id,t[5]=s.slug,t[6]=m):m=t[6];const u=oe(m);let f;t[7]!==s.id||t[8]!==u?(f=ps(u,s.id),t[7]=s.id,t[8]=u,t[9]=f):f=t[9];let x;t[10]!==s.id||t[11]!==u?(x=Ut(u,s.id),t[10]=s.id,t[11]=u,t[12]=x):x=t[12];let g;t[13]!==o.id||t[14]!==s.id||t[15]!==u?(g=yt(s.id,o.id,u),t[13]=o.id,t[14]=s.id,t[15]=u,t[16]=g):g=t[16];let h;t[17]!==f||t[18]!==x||t[19]!==g?(h={queries:[f,x,g]},t[17]=f,t[18]=x,t[19]=g,t[20]=h):h=t[20],js(h);const p=xs(),b=vt(o.id),{hasDecoKey:v,isZeroBalance:w,isInitialFreeCredit:y,balanceDollars:j,hasOnlyDecoProvider:N}=Ct(),{hasVisibleTiles:S}=Di(s.slug),k=kt(b?.metadata);if(p.length===0&&!(k&&Et(n))){let P;return t[21]===Symbol.for("react.memo_cache_sentinel")?(P=i.jsx("div",{className:"flex-1 overflow-y-auto",children:i.jsx("div",{className:"min-h-full flex items-center justify-center px-4 py-10",children:i.jsx(Tt,{})})}),t[21]=P):P=t[21],P}let $;t[22]!==e?.user?.name?($=e?.user?.name?.split(" ")[0]||"there",t[22]=e?.user?.name,t[23]=$):$=t[23];const E=$,_=v&&y&&j!=null,I=v&&w&&N;let O;t[24]!==j||t[25]!==_||t[26]!==I?(O=_?i.jsx(se.CreditsEyebrow,{balanceDollars:j}):I?i.jsx(se.NoCreditsEyebrow,{}):null,t[24]=j,t[25]=_,t[26]=I,t[27]=O):O=t[27];const B=O;let z;return t[28]!==B||t[29]!==S||t[30]!==r||t[31]!==E?(z=i.jsx(ti,{children:r?i.jsx(Hi,{eyebrow:B,userName:E}):i.jsx(Li,{eyebrow:B,userName:E,hasVisibleTiles:S})}),t[28]=B,t[29]=S,t[30]=r,t[31]=E,t[32]=z):z=t[32],z}function Hi(t){const e=T.c(12),{eyebrow:s,userName:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(Xe,{}),e[0]=n):n=e[0];let a;e[1]!==s?(a=s&&i.jsx("div",{className:"mb-4",children:s}),e[1]=s,e[2]=a):a=e[2];let l;e[3]!==r?(l=i.jsxs("p",{className:"text-3xl font-medium text-foreground text-center max-w-[280px]",children:["What's on your mind, ",r,"?"]}),e[3]=r,e[4]=l):l=e[4];let c;e[5]!==a||e[6]!==l?(c=i.jsxs("div",{className:"relative flex flex-col items-center justify-center w-full pt-28 pb-8 px-4",children:[a,l]}),e[5]=a,e[6]=l,e[7]=c):c=e[7];let o;e[8]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx("div",{className:"relative w-full flex flex-col gap-4 pb-8 px-4",children:i.jsx(se.Input,{showConnectionsBanner:!0})}),e[8]=o):o=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("div",{className:"relative w-full px-4 pb-8",children:i.jsx(Je,{isEditMode:!1})}),e[9]=d):d=e[9];let m;return e[10]!==c?(m=i.jsxs("div",{className:"flex-1 relative flex flex-col items-center overflow-y-auto",children:[n,c,o,d]}),e[10]=c,e[11]=m):m=e[11],m}function Li(t){const e=T.c(32),{eyebrow:s,userName:r,hasVisibleTiles:n}=t,{isEditMode:a,enter:l,save:c,cancel:o,hasChanges:d}=Ve(),[m,u]=A.useState(!1);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>u(!0),e[0]=f):f=e[0];let x;e[1]!==o||e[2]!==l||e[3]!==d||e[4]!==a||e[5]!==c?(x=i.jsx(gs.Right,{children:i.jsx(Ui,{isEditMode:a,hasChanges:d,onEnter:l,onSave:c,onCancel:o,onAddTile:f})}),e[1]=o,e[2]=l,e[3]=d,e[4]=a,e[5]=c,e[6]=x):x=e[6];let g;e[7]!==m?(g=i.jsx(ws,{open:m,onOpenChange:u}),e[7]=m,e[8]=g):g=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx(Xe,{}),e[9]=h):h=e[9];const p=n||a?"pt-32":"flex-1 justify-center";let b;e[10]!==p?(b=q("relative flex flex-col items-center px-10 pb-4",p),e[10]=p,e[11]=b):b=e[11];let v;e[12]!==s?(v=s&&i.jsx("div",{className:"mb-4",children:s}),e[12]=s,e[13]=v):v=e[13];let w;e[14]!==r?(w=i.jsxs("p",{className:"text-3xl font-medium text-foreground",children:["What's on your mind, ",r,"?"]}),e[14]=r,e[15]=w):w=e[15];let y;e[16]!==v||e[17]!==w?(y=i.jsxs("div",{className:"text-center mb-10",children:[v,w]}),e[16]=v,e[17]=w,e[18]=y):y=e[18];let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j=i.jsxs("div",{className:"relative w-full",children:[i.jsx(Bi,{}),i.jsx(se.Input,{showConnectionsBanner:!0})]}),e[19]=j):j=e[19];let N;e[20]!==y?(N=i.jsxs("div",{className:"flex flex-col items-center w-full max-w-[672px]",children:[y,j]}),e[20]=y,e[21]=N):N=e[21];let S;e[22]!==a?(S=i.jsx("div",{className:"relative w-full mt-10 mx-auto max-w-[1280px] px-2 pb-16",children:i.jsx(Je,{isEditMode:a})}),e[22]=a,e[23]=S):S=e[23];let k;e[24]!==N||e[25]!==S||e[26]!==b?(k=i.jsxs("div",{className:"flex-1 relative flex flex-col min-h-0",children:[h,i.jsx("div",{className:"flex-1 relative flex flex-col overflow-y-auto",children:i.jsxs("div",{className:b,children:[N,S]})})]}),e[24]=N,e[25]=S,e[26]=b,e[27]=k):k=e[27];let C;return e[28]!==k||e[29]!==x||e[30]!==g?(C=i.jsxs(i.Fragment,{children:[x,g,k]}),e[28]=k,e[29]=x,e[30]=g,e[31]=C):C=e[31],C}function Ui(t){const e=T.c(17),{isEditMode:s,hasChanges:r,onEnter:n,onSave:a,onCancel:l,onAddTile:c}=t;if(s){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(ge,{size:14}),e[0]=m):m=e[0];let u;e[1]!==c?(u=i.jsxs("button",{type:"button",onClick:c,className:"flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Add a tile from any agent",children:[m,"Add tile"]}),e[1]=c,e[2]=u):u=e[2];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(Te,{size:14}),e[3]=f):f=e[3];let x;e[4]!==l?(x=i.jsxs(je,{size:"sm",variant:"ghost",onClick:l,className:"gap-1.5 h-7 text-xs",children:[f,"Cancel"]}),e[4]=l,e[5]=x):x=e[5];const g=!r;let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx(jt,{size:14}),e[6]=h):h=e[6];let p;e[7]!==a||e[8]!==g?(p=i.jsxs(je,{size:"sm",onClick:a,disabled:g,className:"gap-1.5 h-7 text-xs",children:[h,"Save"]}),e[7]=a,e[8]=g,e[9]=p):p=e[9];let b;return e[10]!==u||e[11]!==x||e[12]!==p?(b=i.jsxs(i.Fragment,{children:[u,x,p]}),e[10]=u,e[11]=x,e[12]=p,e[13]=b):b=e[13],b}let o;e[14]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(_t,{size:14}),e[14]=o):o=e[14];let d;return e[15]!==n?(d=i.jsxs("button",{type:"button",onClick:n,className:"flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Customize your home",children:[o,"Customize"]}),e[15]=n,e[16]=d):d=e[16],d}function Bi(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("img",{src:"/home/capybara.png",alt:"","aria-hidden":!0,className:"pointer-events-none absolute -top-16 right-6 z-20 h-20 w-auto select-none"}),t[0]=e):e=t[0],e}function Vr(){const t=T.c(2);if(xe()){let r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("div",{className:"flex-1 min-h-0 flex flex-col bg-background overflow-hidden",children:i.jsx(Ee,{})}),t[0]=r):r=t[0],r}let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("div",{className:"flex-1 min-h-0 pb-1 pr-1 pl-0 pt-0",children:i.jsx("div",{className:"h-full p-0.5 pt-0.25",children:i.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:i.jsx(Ee,{})})})}),t[1]=s):s=t[1],s}export{Vr as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as it,r as E,j as e,l as rt}from"./index-DxEUOQQs.js";import{S as mt,d as pt,a as st,b as at}from"./sheet-Devtg9cX.js";import{S as nt}from"./scroll-area-ChPJ-NEF.js";import{r as lt,c as ct,u as dt,a as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-S_9vd5c_.js";import{m as xt}from"./index-DnaxJsHb.js";import"./X-CH7nrxK3.js";import"./select-BhUuCBjD.js";import"./tooltip-BIymZbyc.js";import"./Check-CJuLJZRg.js";import"./ChevronDown-BbO00aHm.js";import"./ChevronUp-DC9Fz2he.js";import"./label-Bz4-Isgq.js";import"./switch-CbDNpyYj.js";import"./schema-form-B407z7tS.js";import"./agent-icon-BL0Zyuef.js";import"./AlertCircle-C2JPSNIc.js";import"./Tool01-CHRhaVsB.js";import"./SwitchHorizontal01-uOesGvrj.js";import"./RefreshCcw01-De11YcWY.js";import"./XCircle-DSNLgcsz.js";import"./ArrowUpRight-Dtm-fMoi.js";import"./ZapSquare-B7LKxpnQ.js";import"./Users03-BZnIYCM1.js";import"./CheckCircle-B1gk6AbW.js";import"./ChevronLeft-CyC6kPhn.js";import"./ChevronRight-D4rmSZYg.js";import"./DotsVertical-DVI2JfBT.js";import"./Container-Ck07PAMh.js";import"./Eye-8SpX7ax1.js";import"./ZoomOut-BhGMK1ir.js";import"./Globe01-_Gozs0-K.js";import"./FilterLines-DXoB5fi6.js";import"./Star01-CROTt7h-.js";import"./Palette-DvOu8iad.js";import"./HardDrive-D6YFkngp.js";import"./Stars02-Bb_Lb3Iw.js";import"./Key01-DtPyr_d4.js";import"./LayoutLeft-zPlWqXYO.js";import"./LinkExternal01-CMKC3Ppc.js";import"./Monitor01-Dg9LYm9U.js";import"./Sun--jg0YyzU.js";import"./Play-BGgNLf1z.js";import"./Plus-D3Yt_klI.js";import"./SearchMd-CkwYmYFX.js";import"./Settings02-RkWi-oHt.js";import"./Shield01-BkzImfUK.js";import"./Stars01-BZ01dqEy.js";import"./Trash01-D9jT6VSX.js";import"./Upload01-B6COGlQo.js";import"./User01-CWJ4O2R8.js";import"./Users01-Bsb338aB.js";import"./XClose-B2Xxw9ZV.js";import"./Zap-CtPT7vkQ.js";import"./calendar-DXmim9-f.js";import"./input-CzgGcI3V.js";import"./popover-7ZV_x738.js";import"./textarea-CHCvnh_8.js";import"./dropdown-menu-9oUOEimm.js";import"./image-field-DmhpoXrw.js";import"./dialog-DlK91HiY.js";import"./skeleton-DU4Yk3QQ.js";import"./tabs-DpPbTcOX.js";import"./use-file-configs-BmBPsN9j.js";import"./studio-tools-CdiIGNug.js";import"./useInfiniteQuery-CMP19UQ8.js";import"./infiniteQueryObserver-_wx8vha2.js";import"./agent-capabilities-v4Rwjpb1.js";import"./chat-context-C10uFg_9.js";import"./tab-id-CixUfikt.js";import"./use-mcp-client-BW6MR0tW.js";import"./decopilot-sse-pool-C9YWBszR.js";import"./create-sse-subscription-BS5983N4.js";import"./use-virtual-mcp-C5aNldwS.js";import"./use-collections-CPla-8Z_.js";import"./use-ai-providers-i1tqdzqX.js";import"./use-organization-settings-Ds8za6ZV.js";import"./pair-Dqpt4Jli.js";import"./use-clock-tick-B8zeuW9S.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CMgaIgR7.js";import"./file-type-icon-g69R8oLw.js";import"./content-blocks-o63cs2vh.js";import"./types-CmWRxh2O.js";import"./shell-layout-DRNHZhhH.js";import"./avatar-BL6j7EM4.js";import"./required-auth-layout-s-nnIbb3.js";import"./useRouterState-CKqJqhNS.js";import"./use-org-sso-BZSKGD_q.js";import"./integration-icon-TXgAkIpf.js";import"./use-navigate-to-agent-7tEptzcr.js";import"./use-connection-7yE-FpPg.js";import"./use-mcp-prompts-DauhYIMV.js";import"./form-8fnZRdSd.js";import"./spinner-DJudGYoz.js";import"./drawer-We__DvM1.js";import"./collection-search-CVFFSy0S.js";import"./toggle-group-DUH3UCsh.js";import"./connect-desktop-dialog-nMepiraO.js";import"./agent-icons-AMlXFz_9.js";import"./checkbox-EJ-FS6-O.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BmqyawBS.js";import"./card-OOIE0uKL.js";import"./command-BeSVNuhP.js";import"./index-ZOhZPSgS.js";import"./sortable.esm-DLnTPF68.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BAVVkgt5.js";import"./use-registry-connections-Bo5wHKtk.js";import"./extract-connection-data-Deygnaxj.js";import"./generate-id-DHU56BsF.js";import"./collections-BMUil3in.js";import"./collection-tabs-CArtFM6T.js";import"./badge-Cc4XouWa.js";import"./connection-form-helpers-C7w-EHHd.js";import"./use-infinite-scroll-COS9eomA.js";import"./useSuspenseInfiniteQuery-Dsr82JBj.js";import"./index-DBE0AwRo.js";import"./question-004-sINsf4GQ.js";import"./shell-route-loading-CDKyU1Jg.js";import"./sidebar-D_Yb-5nE.js";import"./toolbar-Dje6lkWt.js";import"./use-create-virtual-mcp-BWWSVfRV.js";import"./github-repo-picker-CA1Lsyag.js";import"./use-mcp-tools-BdvRRDeD.js";import"./alert-dialog-DzLqwXYd.js";import"./index-C5kgHpFv.js";import"./use-org-auth-client-D_nAk9Nf.js";import"./hover-card-DwcwURxp.js";import"./task-status-B4xhXa10.js";import"./use-status-sounds-TuoDiwSP.js";import"./empty-state-DWre-pls.js";import"./resizable-D2JXsfXz.js";import"./use-capability-C6m2-0Ci.js";import"./header-tab-button-B8CWwAih.js";import"./index-BATH3mQn.js";import"./user-D4kiCnS_.js";import"./tools-list-BYNSxX2E.js";import"./use-debounced-autosave-DtXHyjU0.js";import"./index-Daxt8Oww.js";import"./search-input-Cray-A1q.js";import"./use-secrets-3j7bfIX7.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-CMUFrLXB.js";import"./view-mode-toggle-D6mTnqbc.js";import"./select-model-C941S1nf.js";import"./use-automations-DGwM8rjk.js";import"./monaco-editor-H7pARgsv.js";import"./automation-runs-DAMwdbwt.js";import"./table-C7al_g9w.js";import"./use-members-UnrPTEyo.js";import"./automation-list-row-6z14sJQm.js";function Si(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 M=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 V=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 z=F,A=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,B=m.kind==="site"&&o&&n,H=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 $=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const q=O;let l;t[13]!==A?(l=e.jsx(mt,{className:"text-sm font-semibold",children:A}),t[13]=A,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]!==q||t[22]!==$||t[23]!==M||t[24]!==v||t[25]!==h||t[26]!==H||t[27]!==x||t[28]!==V||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==B||t[37]!==_?(S=!o||!T&&!B?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:H}):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:M,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:$,onBumpFormKey:q}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:V})})})}),t[20]=p,t[21]=q,t[22]=$,t[23]=M,t[24]=v,t[25]=h,t[26]=H,t[27]=x,t[28]=V,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=B,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]!==z||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:z,children:f}),t[42]=z,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{Si as SeoSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as H,q as $,j}from"./index-DxEUOQQs.js";import{h as q,g as O,s as b}from"./pair-Dqpt4Jli.js";import{u as v}from"./use-mcp-client-BW6MR0tW.js";import{a as L,c as B}from"./use-mcp-tools-BdvRRDeD.js";import{c as Y}from"./content-blocks-o63cs2vh.js";import{g as k,M as G,a as E}from"./types-CmWRxh2O.js";import{a as V,c as z}from"./chat-context-C10uFg_9.js";import{u as F}from"./shell-layout-DRNHZhhH.js";import"./agent-icon-BL0Zyuef.js";import"./AlertCircle-C2JPSNIc.js";import"./Tool01-CHRhaVsB.js";import"./SwitchHorizontal01-uOesGvrj.js";import"./RefreshCcw01-De11YcWY.js";import"./XCircle-DSNLgcsz.js";import"./ArrowUpRight-Dtm-fMoi.js";import"./ZapSquare-B7LKxpnQ.js";import"./Users03-BZnIYCM1.js";import"./CheckCircle-B1gk6AbW.js";import"./Check-CJuLJZRg.js";import"./ChevronDown-BbO00aHm.js";import"./ChevronLeft-CyC6kPhn.js";import"./ChevronRight-D4rmSZYg.js";import"./ChevronUp-DC9Fz2he.js";import"./DotsVertical-DVI2JfBT.js";import"./Container-Ck07PAMh.js";import"./Eye-8SpX7ax1.js";import"./ZoomOut-BhGMK1ir.js";import"./Globe01-_Gozs0-K.js";import"./FilterLines-DXoB5fi6.js";import"./Star01-CROTt7h-.js";import"./Palette-DvOu8iad.js";import"./HardDrive-D6YFkngp.js";import"./Stars02-Bb_Lb3Iw.js";import"./Key01-DtPyr_d4.js";import"./LayoutLeft-zPlWqXYO.js";import"./LinkExternal01-CMKC3Ppc.js";import"./Monitor01-Dg9LYm9U.js";import"./Sun--jg0YyzU.js";import"./Play-BGgNLf1z.js";import"./Plus-D3Yt_klI.js";import"./SearchMd-CkwYmYFX.js";import"./Settings02-RkWi-oHt.js";import"./Shield01-BkzImfUK.js";import"./Stars01-BZ01dqEy.js";import"./Trash01-D9jT6VSX.js";import"./Upload01-B6COGlQo.js";import"./User01-CWJ4O2R8.js";import"./Users01-Bsb338aB.js";import"./XClose-B2Xxw9ZV.js";import"./X-CH7nrxK3.js";import"./Zap-CtPT7vkQ.js";import"./use-clock-tick-B8zeuW9S.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./scroll-area-ChPJ-NEF.js";import"./select-BhUuCBjD.js";import"./tooltip-BIymZbyc.js";import"./use-copy-CMgaIgR7.js";import"./file-type-icon-g69R8oLw.js";import"./dialog-DlK91HiY.js";import"./tab-id-CixUfikt.js";import"./decopilot-sse-pool-C9YWBszR.js";import"./create-sse-subscription-BS5983N4.js";import"./studio-tools-CdiIGNug.js";import"./integration-icon-TXgAkIpf.js";import"./use-virtual-mcp-C5aNldwS.js";import"./use-collections-CPla-8Z_.js";import"./use-navigate-to-agent-7tEptzcr.js";import"./use-connection-7yE-FpPg.js";import"./use-mcp-prompts-DauhYIMV.js";import"./form-8fnZRdSd.js";import"./label-Bz4-Isgq.js";import"./input-CzgGcI3V.js";import"./spinner-DJudGYoz.js";import"./use-ai-providers-i1tqdzqX.js";import"./use-organization-settings-Ds8za6ZV.js";import"./avatar-BL6j7EM4.js";import"./required-auth-layout-s-nnIbb3.js";import"./useRouterState-CKqJqhNS.js";import"./use-org-sso-BZSKGD_q.js";const J={};function K(S){const t=H.c(37),{client:r,resourceURI:g,tool:e,connectionId:s,orgId:a,args:c}=S,{sendMessage:u}=V(),{setAppContext:d,clearAppContext:o}=z(),{setChatOpen:f,openTab:m}=F(),p=`${s}:${e.name}`;let l;t[0]!==m?(l=h=>h==="inline"?(m("0"),"inline"):"fullscreen",t[0]=m,t[1]=l):l=t[1];const i=l,n=c??J;let T;t[2]!==r||t[3]!==e.name||t[4]!==n?(T={client:r,toolName:e.name,toolArguments:n},t[2]=r,t[3]=e.name,t[4]=n,t[5]=T):T=t[5];const{data:x}=B(T);let R;if(t[6]!==e._meta||t[7]!==e.name){const h=O(e._meta);R=b(e.name,h),t[6]=e._meta,t[7]=e.name,t[8]=R}else R=t[8];const U=R;let I;t[9]!==e.inputSchema?(I=e.inputSchema??{type:"object"},t[9]=e.inputSchema,t[10]=I):I=t[10];let N;t[11]!==U||t[12]!==I||t[13]!==e?(N={...e,name:U,inputSchema:I},t[11]=U,t[12]=I,t[13]=e,t[14]=N):N=t[14];const y=N;let _;t[15]!==u||t[16]!==f?(_=h=>{const w=Y(h.content);w.content.length>0&&(f(!0),u({tiptapDoc:w}))},t[15]=u,t[16]=f,t[17]=_):_=t[17];const D=_;let C;t[18]!==y?(C={tool:y},t[18]=y,t[19]=C):C=t[19];let M;t[20]!==d||t[21]!==p?(M=h=>d(p,h),t[20]=d,t[21]=p,t[22]=M):M=t[22];let P;t[23]!==o||t[24]!==p?(P=()=>o(p),t[23]=o,t[24]=p,t[25]=P):P=t[25];let A;return t[26]!==r||t[27]!==D||t[28]!==i||t[29]!==a||t[30]!==g||t[31]!==C||t[32]!==M||t[33]!==P||t[34]!==n||t[35]!==x?(A=j.jsx(G,{resourceURI:g,orgId:a,toolInfo:C,toolInput:n,toolResult:x,displayMode:"fullscreen",minHeight:E.fullscreen.minHeight,maxHeight:E.fullscreen.maxHeight,client:r,onMessage:D,onUpdateModelContext:M,onTeardown:P,onRequestDisplayMode:i,className:"h-full"}),t[26]=r,t[27]=D,t[28]=i,t[29]=a,t[30]=g,t[31]=C,t[32]=M,t[33]=P,t[34]=n,t[35]=x,t[36]=A):A=t[36],A}function Pe(S){const t=H.c(20),{connectionId:r,toolName:g,args:e}=S,{org:s}=$();let a;t[0]!==r||t[1]!==s.id||t[2]!==s.slug?(a={connectionId:r,orgId:s.id,orgSlug:s.slug},t[0]=r,t[1]=s.id,t[2]=s.slug,t[3]=a):a=t[3];const c=v(a);let u;t[4]!==c?(u={client:c},t[4]=c,t[5]=u):u=t[5];const{data:d}=L(u);let o,f,m;t[6]!==g||t[7]!==d.tools?(o=q(decodeURIComponent(g)),m=d.tools.find(i=>i.name===o)??d.tools.find(i=>{const n=O(i._meta);if(!n)return!1;if(b(i.name,n)===o)return!0;const x=b(o,n);return x!==o&&i.name===x}),f=m?._meta?k(m._meta):void 0,t[6]=g,t[7]=d.tools,t[8]=o,t[9]=f,t[10]=m):(o=t[8],f=t[9],m=t[10]);const p=f;if(!m||!p){let i;return t[11]!==o?(i=j.jsx("div",{className:"flex items-center justify-center h-full w-full",children:j.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',o,'" not found or has no UI']})}),t[11]=o,t[12]=i):i=t[12],i}let l;return t[13]!==e||t[14]!==c||t[15]!==r||t[16]!==s.id||t[17]!==p||t[18]!==m?(l=j.jsx(K,{client:c,resourceURI:p,tool:m,connectionId:r,orgId:s.id,args:e}),t[13]=e,t[14]=c,t[15]=r,t[16]=s.id,t[17]=p,t[18]=m,t[19]=l):l=t[19],l}export{Pe as AppViewContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as C,j as r}from"./index-DxEUOQQs.js";import{I as F}from"./input-CzgGcI3V.js";import{L as T}from"./label-Bz4-Isgq.js";import{T as L}from"./textarea-CHCvnh_8.js";import{I as A}from"./image-field-DmhpoXrw.js";import{ae as R,af as D,ah as J}from"./index-DnaxJsHb.js";import{u as K,s as S}from"./primitives-B1fkoae3.js";import{S as M}from"./save-status-BcFNfyWL.js";import"./Tool01-CHRhaVsB.js";import"./Trash01-D9jT6VSX.js";import"./Upload01-B6COGlQo.js";import"./AlertCircle-C2JPSNIc.js";import"./Check-CJuLJZRg.js";import"./Eye-8SpX7ax1.js";import"./DotsVertical-DVI2JfBT.js";import"./agent-icon-BL0Zyuef.js";import"./SwitchHorizontal01-uOesGvrj.js";import"./RefreshCcw01-De11YcWY.js";import"./XCircle-DSNLgcsz.js";import"./ArrowUpRight-Dtm-fMoi.js";import"./ZapSquare-B7LKxpnQ.js";import"./Users03-BZnIYCM1.js";import"./CheckCircle-B1gk6AbW.js";import"./ChevronDown-BbO00aHm.js";import"./ChevronLeft-CyC6kPhn.js";import"./ChevronRight-D4rmSZYg.js";import"./ChevronUp-DC9Fz2he.js";import"./Container-Ck07PAMh.js";import"./ZoomOut-BhGMK1ir.js";import"./Globe01-_Gozs0-K.js";import"./FilterLines-DXoB5fi6.js";import"./Star01-CROTt7h-.js";import"./Palette-DvOu8iad.js";import"./HardDrive-D6YFkngp.js";import"./Stars02-Bb_Lb3Iw.js";import"./Key01-DtPyr_d4.js";import"./LayoutLeft-zPlWqXYO.js";import"./LinkExternal01-CMKC3Ppc.js";import"./Monitor01-Dg9LYm9U.js";import"./Sun--jg0YyzU.js";import"./Play-BGgNLf1z.js";import"./Plus-D3Yt_klI.js";import"./SearchMd-CkwYmYFX.js";import"./Settings02-RkWi-oHt.js";import"./Shield01-BkzImfUK.js";import"./Stars01-BZ01dqEy.js";import"./User01-CWJ4O2R8.js";import"./Users01-Bsb338aB.js";import"./XClose-B2Xxw9ZV.js";import"./X-CH7nrxK3.js";import"./Zap-CtPT7vkQ.js";import"./dialog-DlK91HiY.js";import"./dropdown-menu-9oUOEimm.js";import"./skeleton-DU4Yk3QQ.js";import"./tabs-DpPbTcOX.js";import"./use-file-configs-BmBPsN9j.js";import"./studio-tools-CdiIGNug.js";import"./useInfiniteQuery-CMP19UQ8.js";import"./infiniteQueryObserver-_wx8vha2.js";import"./agent-capabilities-v4Rwjpb1.js";import"./chat-context-C10uFg_9.js";import"./tab-id-CixUfikt.js";import"./use-mcp-client-BW6MR0tW.js";import"./decopilot-sse-pool-C9YWBszR.js";import"./create-sse-subscription-BS5983N4.js";import"./use-virtual-mcp-C5aNldwS.js";import"./use-collections-CPla-8Z_.js";import"./use-ai-providers-i1tqdzqX.js";import"./use-organization-settings-Ds8za6ZV.js";import"./pair-Dqpt4Jli.js";import"./use-clock-tick-B8zeuW9S.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./scroll-area-ChPJ-NEF.js";import"./select-BhUuCBjD.js";import"./tooltip-BIymZbyc.js";import"./use-copy-CMgaIgR7.js";import"./file-type-icon-g69R8oLw.js";import"./content-blocks-o63cs2vh.js";import"./types-CmWRxh2O.js";import"./shell-layout-DRNHZhhH.js";import"./avatar-BL6j7EM4.js";import"./required-auth-layout-s-nnIbb3.js";import"./useRouterState-CKqJqhNS.js";import"./use-org-sso-BZSKGD_q.js";import"./integration-icon-TXgAkIpf.js";import"./use-navigate-to-agent-7tEptzcr.js";import"./use-connection-7yE-FpPg.js";import"./use-mcp-prompts-DauhYIMV.js";import"./form-8fnZRdSd.js";import"./spinner-DJudGYoz.js";import"./drawer-We__DvM1.js";import"./collection-search-CVFFSy0S.js";import"./toggle-group-DUH3UCsh.js";import"./connect-desktop-dialog-nMepiraO.js";import"./agent-icons-AMlXFz_9.js";import"./checkbox-EJ-FS6-O.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BmqyawBS.js";import"./card-OOIE0uKL.js";import"./popover-7ZV_x738.js";import"./command-BeSVNuhP.js";import"./index-ZOhZPSgS.js";import"./sortable.esm-DLnTPF68.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BAVVkgt5.js";import"./use-registry-connections-Bo5wHKtk.js";import"./extract-connection-data-Deygnaxj.js";import"./generate-id-DHU56BsF.js";import"./collections-BMUil3in.js";import"./collection-tabs-CArtFM6T.js";import"./badge-Cc4XouWa.js";import"./connection-form-helpers-C7w-EHHd.js";import"./use-infinite-scroll-COS9eomA.js";import"./useSuspenseInfiniteQuery-Dsr82JBj.js";import"./index-DBE0AwRo.js";import"./question-004-sINsf4GQ.js";import"./shell-route-loading-CDKyU1Jg.js";import"./sidebar-D_Yb-5nE.js";import"./sheet-Devtg9cX.js";import"./toolbar-Dje6lkWt.js";import"./use-create-virtual-mcp-BWWSVfRV.js";import"./github-repo-picker-CA1Lsyag.js";import"./use-mcp-tools-BdvRRDeD.js";import"./alert-dialog-DzLqwXYd.js";import"./index-C5kgHpFv.js";import"./use-org-auth-client-D_nAk9Nf.js";import"./hover-card-DwcwURxp.js";import"./task-status-B4xhXa10.js";import"./use-status-sounds-TuoDiwSP.js";import"./empty-state-DWre-pls.js";import"./resizable-D2JXsfXz.js";import"./use-capability-C6m2-0Ci.js";import"./header-tab-button-B8CWwAih.js";import"./index-BATH3mQn.js";import"./user-D4kiCnS_.js";import"./tools-list-BYNSxX2E.js";import"./switch-CbDNpyYj.js";import"./use-debounced-autosave-DtXHyjU0.js";import"./index-Daxt8Oww.js";import"./search-input-Cray-A1q.js";import"./use-secrets-3j7bfIX7.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-CMUFrLXB.js";import"./view-mode-toggle-D6mTnqbc.js";import"./select-model-C941S1nf.js";import"./use-automations-DGwM8rjk.js";import"./monaco-editor-H7pARgsv.js";import"./automation-runs-DAMwdbwt.js";import"./table-C7al_g9w.js";import"./use-members-UnrPTEyo.js";import"./automation-list-row-6z14sJQm.js";const $={authors:[{key:"name",label:"Name",widget:"text"},{key:"email",label:"Email",widget:"text",placeholder:"author@example.com"},{key:"jobTitle",label:"Job title",widget:"text"},{key:"company",label:"Company",widget:"text"},{key:"avatar",label:"Avatar",widget:"image"}],categories:[{key:"name",label:"Name",widget:"text"},{key:"slug",label:"Slug",widget:"text",placeholder:"my-category"}]},q={authors:"Author",categories:"Category"};function Tr(P){const t=C.c(34),{orgSlug:v,virtualMcpId:j,branch:f,kind:p,blockKey:y,block:w}=P;let u;t[0]!==f||t[1]!==v||t[2]!==j?(u={orgSlug:v,virtualMcpId:j,branch:f},t[0]=f,t[1]=v,t[2]=j,t[3]=u):u=t[3];const m=R(u);let d;t[4]!==w||t[5]!==p?(d=D(w,p),t[4]=w,t[5]=p,t[6]=d):d=t[6];const B=d;let h;t[7]!==y||t[8]!==p||t[9]!==m?(h=e=>{m.mutate({blockKey:y,data:J(y,p,e)})},t[7]=y,t[8]=p,t[9]=m,t[10]=h):h=t[10];const[i,E]=K(B,h);let k;t[11]!==i||t[12]!==E?(k=(e,o)=>E({...i,[e]:o}),t[11]=i,t[12]=E,t[13]=k):k=t[13];const a=k,N=q[p];let s;t[14]!==N?(s=r.jsx("span",{className:"text-sm font-medium",children:N}),t[14]=N,t[15]=s):s=t[15];let l;t[16]!==m.isError||t[17]!==m.isPending?(l=r.jsx(M,{isPending:m.isPending,isError:m.isError}),t[16]=m.isError,t[17]=m.isPending,t[18]=l):l=t[18];let n;t[19]!==s||t[20]!==l?(n=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[s,l]}),t[19]=s,t[20]=l,t[21]=n):n=t[21];const I=$[p];let c;if(t[22]!==i||t[23]!==a||t[24]!==I){let e;t[26]!==i||t[27]!==a?(e=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(A,{schema:{type:"string",format:"image-uri",title:o.label},value:i[o.key],onChange:x=>a(o.key,x),path:o.key,label:o.label}):r.jsxs(r.Fragment,{children:[r.jsx(T,{htmlFor:o.key,children:o.label}),o.widget==="textarea"?r.jsx(L,{id:o.key,value:S(i[o.key]),onChange:x=>a(o.key,x.target.value),rows:3}):r.jsx(F,{id:o.key,value:S(i[o.key]),placeholder:o.placeholder,onChange:x=>a(o.key,x.target.value),className:"h-10"})]})},o.key),t[26]=i,t[27]=a,t[28]=e):e=t[28],c=I.map(e),t[22]=i,t[23]=a,t[24]=I,t[25]=c}else c=t[25];let g;t[29]!==c?(g=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:c})}),t[29]=c,t[30]=g):g=t[30];let b;return t[31]!==g||t[32]!==n?(b=r.jsxs("div",{className:"flex h-full flex-col",children:[n,g]}),t[31]=g,t[32]=n,t[33]=b):b=t[33],b}export{Tr as RecordEditor};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-Bp8ThmJv.js","assets/index-DxEUOQQs.js","assets/index-DfYyH4IW.css","assets/XCircle-DSNLgcsz.js","assets/CheckCircle-B1gk6AbW.js","assets/Container-Ck07PAMh.js","assets/Settings02-RkWi-oHt.js","assets/use-mcp-client-BW6MR0tW.js","assets/useInfiniteQuery-CMP19UQ8.js","assets/infiniteQueryObserver-_wx8vha2.js","assets/studio-tools-CdiIGNug.js","assets/badge-Cc4XouWa.js","assets/input-CzgGcI3V.js","assets/dropdown-menu-9oUOEimm.js","assets/Check-CJuLJZRg.js","assets/ChevronRight-D4rmSZYg.js","assets/DotsVertical-DVI2JfBT.js","assets/table-C7al_g9w.js","assets/toggle-group-DUH3UCsh.js","assets/use-view-mode-CdHjt_dk.js","assets/tooltip-BIymZbyc.js","assets/FilterLines-DXoB5fi6.js","assets/Globe01-_Gozs0-K.js","assets/SearchMd-CkwYmYFX.js","assets/dialog-DlK91HiY.js","assets/X-CH7nrxK3.js","assets/AlertCircle-C2JPSNIc.js","assets/Upload01-B6COGlQo.js","assets/alert-dialog-DzLqwXYd.js","assets/card-OOIE0uKL.js","assets/Trash01-D9jT6VSX.js","assets/label-Bz4-Isgq.js","assets/select-BhUuCBjD.js","assets/ChevronDown-BbO00aHm.js","assets/ChevronUp-DC9Fz2he.js","assets/switch-CbDNpyYj.js","assets/textarea-CHCvnh_8.js","assets/RefreshCcw01-De11YcWY.js","assets/checkbox-EJ-FS6-O.js","assets/Eye-8SpX7ax1.js","assets/LinkExternal01-CMKC3Ppc.js","assets/use-copy-CMgaIgR7.js","assets/Key01-DtPyr_d4.js","assets/Plus-D3Yt_klI.js","assets/Play-BGgNLf1z.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{e as i,j as e,r as s,l as a,_ as o}from"./index-DxEUOQQs.js";import{R as l}from"./require-capability-Cu6FsDEP.js";import"./use-capability-C6m2-0Ci.js";import"./access-gate-CBfdxByI.js";import"./capability-load-error-S5ghjE3y.js";const m=s.lazy(()=>o(()=>import("./registry-layout-Bp8ThmJv.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])));function f(){const r=i.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(l,{capability:"registry:manage",area:"the registry",children:e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(m,{})})}),r[0]=t):t=r[0],t}export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as c}from"./header-tab-button-B8CWwAih.js";function t(r){return(e,a)=>{c(e),r(e,a)}}export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as F,j as t,r as Q,B as je,l as Se}from"./index-DxEUOQQs.js";import{i as be}from"./ChevronRight-D4rmSZYg.js";import{F as fe}from"./agent-icon-BL0Zyuef.js";import{S as ue}from"./scroll-area-ChPJ-NEF.js";import{r as Ne,c as ke,u as _e,a as we,i as Ce,d as Fe,f as Te,P as Re,S as Ee}from"./page-seo-form-S_9vd5c_.js";import{m as ze}from"./index-DnaxJsHb.js";import{a as ge}from"./Tool01-CHRhaVsB.js";import{s as xe}from"./schema-form-B407z7tS.js";import"./AlertCircle-C2JPSNIc.js";import"./SwitchHorizontal01-uOesGvrj.js";import"./RefreshCcw01-De11YcWY.js";import"./XCircle-DSNLgcsz.js";import"./ArrowUpRight-Dtm-fMoi.js";import"./ZapSquare-B7LKxpnQ.js";import"./Users03-BZnIYCM1.js";import"./CheckCircle-B1gk6AbW.js";import"./Check-CJuLJZRg.js";import"./ChevronDown-BbO00aHm.js";import"./ChevronLeft-CyC6kPhn.js";import"./ChevronUp-DC9Fz2he.js";import"./DotsVertical-DVI2JfBT.js";import"./Container-Ck07PAMh.js";import"./Eye-8SpX7ax1.js";import"./ZoomOut-BhGMK1ir.js";import"./Globe01-_Gozs0-K.js";import"./FilterLines-DXoB5fi6.js";import"./Star01-CROTt7h-.js";import"./Palette-DvOu8iad.js";import"./HardDrive-D6YFkngp.js";import"./Stars02-Bb_Lb3Iw.js";import"./Key01-DtPyr_d4.js";import"./LayoutLeft-zPlWqXYO.js";import"./LinkExternal01-CMKC3Ppc.js";import"./Monitor01-Dg9LYm9U.js";import"./Sun--jg0YyzU.js";import"./Play-BGgNLf1z.js";import"./Plus-D3Yt_klI.js";import"./SearchMd-CkwYmYFX.js";import"./Settings02-RkWi-oHt.js";import"./Shield01-BkzImfUK.js";import"./Stars01-BZ01dqEy.js";import"./Trash01-D9jT6VSX.js";import"./Upload01-B6COGlQo.js";import"./User01-CWJ4O2R8.js";import"./Users01-Bsb338aB.js";import"./XClose-B2Xxw9ZV.js";import"./X-CH7nrxK3.js";import"./Zap-CtPT7vkQ.js";import"./select-BhUuCBjD.js";import"./tooltip-BIymZbyc.js";import"./label-Bz4-Isgq.js";import"./switch-CbDNpyYj.js";import"./agent-capabilities-v4Rwjpb1.js";import"./chat-context-C10uFg_9.js";import"./tab-id-CixUfikt.js";import"./use-mcp-client-BW6MR0tW.js";import"./decopilot-sse-pool-C9YWBszR.js";import"./create-sse-subscription-BS5983N4.js";import"./studio-tools-CdiIGNug.js";import"./use-virtual-mcp-C5aNldwS.js";import"./use-collections-CPla-8Z_.js";import"./use-ai-providers-i1tqdzqX.js";import"./use-organization-settings-Ds8za6ZV.js";import"./pair-Dqpt4Jli.js";import"./use-clock-tick-B8zeuW9S.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CMgaIgR7.js";import"./file-type-icon-g69R8oLw.js";import"./dialog-DlK91HiY.js";import"./content-blocks-o63cs2vh.js";import"./types-CmWRxh2O.js";import"./shell-layout-DRNHZhhH.js";import"./avatar-BL6j7EM4.js";import"./required-auth-layout-s-nnIbb3.js";import"./useRouterState-CKqJqhNS.js";import"./use-org-sso-BZSKGD_q.js";import"./integration-icon-TXgAkIpf.js";import"./use-navigate-to-agent-7tEptzcr.js";import"./use-connection-7yE-FpPg.js";import"./use-mcp-prompts-DauhYIMV.js";import"./form-8fnZRdSd.js";import"./input-CzgGcI3V.js";import"./spinner-DJudGYoz.js";import"./drawer-We__DvM1.js";import"./collection-search-CVFFSy0S.js";import"./tabs-DpPbTcOX.js";import"./toggle-group-DUH3UCsh.js";import"./connect-desktop-dialog-nMepiraO.js";import"./agent-icons-AMlXFz_9.js";import"./checkbox-EJ-FS6-O.js";import"./skeleton-DU4Yk3QQ.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BmqyawBS.js";import"./card-OOIE0uKL.js";import"./popover-7ZV_x738.js";import"./command-BeSVNuhP.js";import"./index-ZOhZPSgS.js";import"./useInfiniteQuery-CMP19UQ8.js";import"./infiniteQueryObserver-_wx8vha2.js";import"./sortable.esm-DLnTPF68.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BAVVkgt5.js";import"./use-registry-connections-Bo5wHKtk.js";import"./extract-connection-data-Deygnaxj.js";import"./generate-id-DHU56BsF.js";import"./collections-BMUil3in.js";import"./collection-tabs-CArtFM6T.js";import"./badge-Cc4XouWa.js";import"./textarea-CHCvnh_8.js";import"./connection-form-helpers-C7w-EHHd.js";import"./use-infinite-scroll-COS9eomA.js";import"./useSuspenseInfiniteQuery-Dsr82JBj.js";import"./index-DBE0AwRo.js";import"./dropdown-menu-9oUOEimm.js";import"./question-004-sINsf4GQ.js";import"./shell-route-loading-CDKyU1Jg.js";import"./sidebar-D_Yb-5nE.js";import"./sheet-Devtg9cX.js";import"./toolbar-Dje6lkWt.js";import"./use-create-virtual-mcp-BWWSVfRV.js";import"./github-repo-picker-CA1Lsyag.js";import"./use-mcp-tools-BdvRRDeD.js";import"./alert-dialog-DzLqwXYd.js";import"./index-C5kgHpFv.js";import"./use-org-auth-client-D_nAk9Nf.js";import"./hover-card-DwcwURxp.js";import"./task-status-B4xhXa10.js";import"./use-status-sounds-TuoDiwSP.js";import"./empty-state-DWre-pls.js";import"./resizable-D2JXsfXz.js";import"./use-capability-C6m2-0Ci.js";import"./header-tab-button-B8CWwAih.js";import"./index-BATH3mQn.js";import"./user-D4kiCnS_.js";import"./tools-list-BYNSxX2E.js";import"./use-debounced-autosave-DtXHyjU0.js";import"./index-Daxt8Oww.js";import"./search-input-Cray-A1q.js";import"./use-secrets-3j7bfIX7.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-CMUFrLXB.js";import"./view-mode-toggle-D6mTnqbc.js";import"./select-model-C941S1nf.js";import"./use-automations-DGwM8rjk.js";import"./monaco-editor-H7pARgsv.js";import"./automation-runs-DAMwdbwt.js";import"./table-C7al_g9w.js";import"./use-members-UnrPTEyo.js";import"./automation-list-row-6z14sJQm.js";import"./calendar-DXmim9-f.js";import"./image-field-DmhpoXrw.js";import"./use-file-configs-BmBPsN9j.js";function U(n){return typeof n=="string"&&n.trim()?n:void 0}function he(n,e){if(n){if(e)try{const i=new URL(n,e).href;return xe(i)}catch{return}return xe(n)}}function Pe(n){if(!n)return{};const e=U(n.title),i=U(n.titleTemplate);return{title:e&&i?.includes("%s")?i.replace(/%s/g,e):e,description:U(n.description),image:U(n.image),favicon:U(n.favicon)}}function Oe(n){if(!n)return"example.com";try{return new URL(n).host}catch{return"example.com"}}const Z="Your page title",ee="Your meta description will appear here.",Le=[{id:"google",label:"Google",color:"#4285F4",layout:"search"},{id:"facebook",label:"Facebook",color:"#1877F2",layout:"card"},{id:"twitter",label:"X (Twitter)",color:"#0f1419",layout:"card"},{id:"linkedin",label:"LinkedIn",color:"#0A66C2",layout:"card"},{id:"whatsapp",label:"WhatsApp",color:"#25D366",layout:"chat"},{id:"telegram",label:"Telegram",color:"#229ED9",layout:"chat"},{id:"slack",label:"Slack",color:"#611f69",layout:"attachment"},{id:"discord",label:"Discord",color:"#5865F2",layout:"attachment"}];function pe(n){const e=F.c(10),{src:i,className:r,iconSize:h}=n,a=h===void 0?20:h;if(i){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==r||e[2]!==i?(p=t.jsx("img",{src:i,alt:"",referrerPolicy:"no-referrer",className:r,style:m}),e[1]=r,e[2]=i,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let o;e[5]!==a?(o=t.jsx(ge,{size:a}),e[5]=a,e[6]=o):o=e[6];let l;return e[7]!==r||e[8]!==o?(l=t.jsx("div",{className:r,style:s,children:o}),e[7]=r,e[8]=o,e[9]=l):l=e[9],l}function $e(n){const e=F.c(27),{seo:i,host:r,path:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#fff",border:"1px solid #dadce0"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f1f3f4"},e[1]=s):s=e[1];let o;e[2]!==i.favicon?(o=t.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:s,children:i.favicon?t.jsx("img",{src:i.favicon,alt:"",className:"size-full object-cover"}):t.jsx(ge,{size:12,color:"#9aa0a6"})}),e[2]=i.favicon,e[3]=o):o=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={color:"#202124"},e[4]=l):l=e[4];let m;e[5]!==r?(m=t.jsx("div",{className:"truncate text-[13px] leading-tight",style:l,children:r}),e[5]=r,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#4d5156"},e[7]=p):p=e[7];let d;e[8]!==r||e[9]!==h?(d=t.jsxs("div",{className:"truncate text-[12px] leading-tight",style:p,children:[r,h]}),e[8]=r,e[9]=h,e[10]=d):d=e[10];let c;e[11]!==m||e[12]!==d?(c=t.jsxs("div",{className:"min-w-0",children:[m,d]}),e[11]=m,e[12]=d,e[13]=c):c=e[13];let g;e[14]!==o||e[15]!==c?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[o,c]}),e[14]=o,e[15]=c,e[16]=g):g=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#1a0dab"},e[17]=f):f=e[17];const x=i.title??Z;let u;e[18]!==x?(u=t.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:f,children:x}),e[18]=x,e[19]=u):u=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j={color:"#4d5156"},e[20]=j):j=e[20];const v=i.description??ee;let y;e[21]!==v?(y=t.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:j,children:v}),e[21]=v,e[22]=y):y=e[22];let S;return e[23]!==u||e[24]!==y||e[25]!==g?(S=t.jsxs("div",{className:"rounded-lg p-3 text-left",style:a,children:[g,u,y]}),e[23]=u,e[24]=y,e[25]=g,e[26]=S):S=e[26],S}function De(n){const e=F.c(20),{seo:i,host:r}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={background:"#fff",border:"1px solid #e2e8f0"},e[0]=h):h=e[0];let a;e[1]!==i.image?(a=t.jsx(pe,{src:i.image,className:"h-40 w-full"}),e[1]=i.image,e[2]=a):a=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={borderTop:"1px solid #e2e8f0"},e[3]=s):s=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={color:"#8a9099"},e[4]=o):o=e[4];let l;e[5]!==r?(l=t.jsx("div",{className:"truncate text-[11px]",style:o,children:r}),e[5]=r,e[6]=l):l=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#1c2024"},e[7]=m):m=e[7];const p=i.title??Z;let d;e[8]!==p?(d=t.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:m,children:p}),e[8]=p,e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[10]=c):c=e[10];const g=i.description??ee;let f;e[11]!==g?(f=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:g}),e[11]=g,e[12]=f):f=e[12];let x;e[13]!==f||e[14]!==l||e[15]!==d?(x=t.jsxs("div",{className:"px-3 py-2",style:s,children:[l,d,f]}),e[13]=f,e[14]=l,e[15]=d,e[16]=x):x=e[16];let u;return e[17]!==x||e[18]!==a?(u=t.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:h,children:[a,x]}),e[17]=x,e[18]=a,e[19]=u):u=e[19],u}function Ie(n){const e=F.c(23),{seo:i,host:r,accent:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#f0f2f5"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:{color:"#3b4045"},children:"Here's a post you might write with the link of your website:"}),e[1]=s):s=e[1];const o=`3px solid ${h}`;let l;e[2]!==o?(l={background:"#fff",borderLeft:o},e[2]=o,e[3]=l):l=e[3];let m;e[4]!==i.image?(m=t.jsx(pe,{src:i.image,className:"h-28 w-full",iconSize:18}),e[4]=i.image,e[5]=m):m=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[6]=p):p=e[6];const d=i.title??Z;let c;e[7]!==d?(c=t.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:p,children:d}),e[7]=d,e[8]=c):c=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#60666c"},e[9]=g):g=e[9];const f=i.description??ee;let x;e[10]!==f?(x=t.jsx("div",{className:"line-clamp-2 text-[11px]",style:g,children:f}),e[10]=f,e[11]=x):x=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#8a9099"},e[12]=u):u=e[12];let j;e[13]!==r?(j=t.jsx("div",{className:"mt-0.5 text-[10px]",style:u,children:r}),e[13]=r,e[14]=j):j=e[14];let v;e[15]!==x||e[16]!==j||e[17]!==c?(v=t.jsxs("div",{className:"px-2.5 py-1.5",children:[c,x,j]}),e[15]=x,e[16]=j,e[17]=c,e[18]=v):v=e[18];let y;return e[19]!==v||e[20]!==l||e[21]!==m?(y=t.jsxs("div",{className:"rounded-lg p-2 text-left",style:a,children:[s,t.jsxs("div",{className:"overflow-hidden rounded-md",style:l,children:[m,v]})]}),e[19]=v,e[20]=l,e[21]=m,e[22]=y):y=e[22],y}function Ae(n){const e=F.c(33),{seo:i,host:r,accent:h,dark:a}=n,s=a?"#2b2d31":"#fff",o=a?"#00a8fc":"#1264a3",l=a?"#dbdee1":"#3b4045",m=a?"#949ba4":"#8a9099",p=a?"none":"1px solid #e2e8f0";let d;e[0]!==s||e[1]!==p?(d={background:s,border:p},e[0]=s,e[1]=p,e[2]=d):d=e[2];const c=`3px solid ${h}`;let g;e[3]!==c?(g={borderLeft:c,borderRadius:2},e[3]=c,e[4]=g):g=e[4];let f;e[5]!==m?(f={color:m},e[5]=m,e[6]=f):f=e[6];let x;e[7]!==r||e[8]!==f?(x=t.jsx("div",{className:"text-[10px]",style:f,children:r}),e[7]=r,e[8]=f,e[9]=x):x=e[9];let u;e[10]!==o?(u={color:o},e[10]=o,e[11]=u):u=e[11];const j=i.title??Z;let v;e[12]!==u||e[13]!==j?(v=t.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:u,children:j}),e[12]=u,e[13]=j,e[14]=v):v=e[14];let y;e[15]!==l?(y={color:l},e[15]=l,e[16]=y):y=e[16];const S=i.description??ee;let _;e[17]!==y||e[18]!==S?(_=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:y,children:S}),e[17]=y,e[18]=S,e[19]=_):_=e[19];let N;e[20]!==_||e[21]!==x||e[22]!==v?(N=t.jsxs("div",{className:"min-w-0 flex-1",children:[x,v,_]}),e[20]=_,e[21]=x,e[22]=v,e[23]=N):N=e[23];let b;e[24]!==i.image?(b=t.jsx(pe,{src:i.image,className:"size-14 shrink-0 rounded",iconSize:16}),e[24]=i.image,e[25]=b):b=e[25];let k;e[26]!==N||e[27]!==b||e[28]!==g?(k=t.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:g,children:[N,b]}),e[26]=N,e[27]=b,e[28]=g,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==d?(C=t.jsx("div",{className:"rounded-lg p-2.5 text-left",style:d,children:k}),e[30]=k,e[31]=d,e[32]=C):C=e[32],C}function Be(n){const e=F.c(17),{platform:i,seo:r,host:h,path:a}=n;let s;e[0]!==h||e[1]!==a||e[2]!==i.color||e[3]!==i.id||e[4]!==i.layout||e[5]!==r?(s=i.layout==="search"?t.jsx($e,{seo:r,host:h,path:a}):i.layout==="card"?t.jsx(De,{seo:r,host:h,path:a}):i.layout==="chat"?t.jsx(Ie,{seo:r,host:h,path:a,accent:i.color}):t.jsx(Ae,{seo:r,host:h,path:a,accent:i.color,dark:i.id==="discord"}),e[0]=h,e[1]=a,e[2]=i.color,e[3]=i.id,e[4]=i.layout,e[5]=r,e[6]=s):s=e[6];const o=s;let l;e[7]!==i.color?(l=t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:i.color}}),e[7]=i.color,e[8]=l):l=e[8];let m;e[9]!==i.label?(m=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i.label}),e[9]=i.label,e[10]=m):m=e[10];let p;e[11]!==l||e[12]!==m?(p=t.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[l,m]}),e[11]=l,e[12]=m,e[13]=p):p=e[13];let d;return e[14]!==o||e[15]!==p?(d=t.jsxs("div",{children:[p,o]}),e[14]=o,e[15]=p,e[16]=d):d=e[16],d}function Ue(n){const e=F.c(17),{seo:i,url:r,path:h}=n,a=h===void 0?"/":h;let s,o,l;if(e[0]!==i||e[1]!==r){const u=Pe(i);s=u,o=he(u.image,r),l=he(u.favicon,r),e[0]=i,e[1]=r,e[2]=s,e[3]=o,e[4]=l}else s=e[2],o=e[3],l=e[4];let m;e[5]!==s||e[6]!==o||e[7]!==l?(m={...s,image:o,favicon:l},e[5]=s,e[6]=o,e[7]=l,e[8]=m):m=e[8];const p=m;let d;e[9]!==r?(d=Oe(r),e[9]=r,e[10]=d):d=e[10];const c=d,g=a==="/"?"":a;let f;e[11]!==g||e[12]!==c||e[13]!==p?(f=Le.map(u=>t.jsx(Be,{platform:u,seo:p,host:c,path:g},u.id)),e[11]=g,e[12]=c,e[13]=p,e[14]=f):f=e[14];let x;return e[15]!==f?(x=t.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:f}),e[15]=f,e[16]=x):x=e[16],x}function Di(n){const e=F.c(63),{orgSlug:i,virtualMcpId:r,branch:h,decofile:a,meta:s,target:o,previewBaseUrl:l,onSaved:m,onEditDefaultSeo:p,onBack:d}=n,c=Ne(a,o,s),g=c?.seoData,f=o.kind==="site"?"site":o.pageKey,[x,u]=Q.useState(f),[j,v]=Q.useState(null),[y,S]=Q.useState(0),[_,N]=Q.useState(void 0);x!==f&&(u(f),v(null),N(void 0),S(Me));const{persistSeo:b,persistRawSeo:k,flush:C,isPending:te}=ke({orgSlug:i,virtualMcpId:r,branch:h,target:o,resolved:c,onSaved:m}),K=o.kind==="page",ve=K?c?.rawSeoData:void 0,B=_!==void 0?_:ve,ye=K?_e(B)??void 0:void 0,w=j??ye??g??{},T=c?we(w,c):null,z=T&&(!K||Ce(B))?ze(T,s):null;let M;e[0]!==s?(M=Fe(s),e[0]=s,e[1]=M):M=e[1];const oe=M;let R,G;e[2]!==a||e[3]!==w||e[4]!==s||e[5]!==o.kind?(R=o.kind==="page"?Te(a,s)?.seoData??{}:{},G=o.kind==="page"?Ve(R,w):w,e[2]=a,e[3]=w,e[4]=s,e[5]=o.kind,e[6]=R,e[7]=G):(R=e[6],G=e[7]);const ie=G;let V;e[8]!==b||e[9]!==c||e[10]!==v?(V=E=>{if(!c)return;const de=E;v(de),b(de)},e[8]=b,e[9]=c,e[10]=v,e[11]=V):V=e[11];const se=V;let Y;e[12]!==v?(Y=()=>v(null),e[12]=v,e[13]=Y):Y=e[13];const le=Y;let H;e[14]!==S?(H=()=>S(Ke),e[14]=S,e[15]=H):H=e[15];const re=H;let W;e[16]!==C||e[17]!==d?(W=()=>{C(),d?.()},e[16]=C,e[17]=d,e[18]=W):W=e[18];const ae=W,P=o.kind==="page"?o.path:"/";let X;e[19]!==P||e[20]!==l||e[21]!==o.kind?(X=o.kind==="page"&&l?Ge(P,l):l??null,e[19]=P,e[20]=l,e[21]=o.kind,e[22]=X):X=e[22];const ne=X,ce=o.kind==="site"?"No site-level SEO block found.":c?"SEO schema not found for this page.":"Could not load page SEO.",q=K&&c,me=o.kind==="site"&&c&&z;let O;e[23]!==ae||e[24]!==o.kind||e[25]!==o.pageName?(O=o.kind==="page"?t.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[t.jsx("button",{type:"button",onClick:ae,title:o.pageName,className:"min-w-0 truncate rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:o.pageName}),t.jsx(be,{className:"size-3 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm font-medium",children:"Default SEO"}),t.jsx("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:"· applied to every page unless overridden"})]}),e[23]=ae,e[24]=o.kind,e[25]=o.pageName,e[26]=O):O=e[26];let L;e[27]!==te?(L=te&&t.jsx(Se,{size:14,className:"animate-spin text-muted-foreground"}),e[27]=te,e[28]=L):L=e[28];let $;e[29]!==p||e[30]!==o.kind?($=o.kind==="page"&&p&&t.jsxs(je,{type:"button",variant:"outline",size:"sm",onClick:p,children:[t.jsx(fe,{size:14}),"Edit default SEO"]}),e[29]=p,e[30]=o.kind,e[31]=$):$=e[31];let D;e[32]!==$||e[33]!==L?(D=t.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[L,$]}),e[32]=$,e[33]=L,e[34]=D):D=e[34];let I;e[35]!==D||e[36]!==O?(I=t.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[O,D]}),e[35]=D,e[36]=O,e[37]=I):I=e[37];let A;e[38]!==T||e[39]!==re||e[40]!==le||e[41]!==oe||e[42]!==B||e[43]!==w||e[44]!==ce||e[45]!==y||e[46]!==se||e[47]!==P||e[48]!==k||e[49]!==b||e[50]!==ie||e[51]!==ne||e[52]!==c||e[53]!==z||e[54]!==v||e[55]!==N||e[56]!==q||e[57]!==me||e[58]!==R?(A=!c||!q&&!me?t.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ce}):t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsx(ue,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"px-5 py-4",children:q?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Empty fields inherit the default SEO. The preview shows the resolved result."}),t.jsx(Re,{rawSeo:B,innerSeo:w,defaultResolveType:oe,seoSchema:z,activeResolveType:T,seoTypeOptions:c.seoTypeOptions,formResetKey:y,siteDefaultSeo:R,onPersistRaw:E=>{N(E),k(E)},onInnerChange:E=>{v(E),b(E)},onClearForm:le,onBumpFormKey:re})]}):z&&T&&t.jsx(Ee,{schema:z,resolveType:T,value:w,formResetKey:y,onChange:se})})}),t.jsx(ue,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"@container px-5 py-4",children:t.jsx(Ue,{seo:ie,url:ne,path:P})})})]}),e[38]=T,e[39]=re,e[40]=le,e[41]=oe,e[42]=B,e[43]=w,e[44]=ce,e[45]=y,e[46]=se,e[47]=P,e[48]=k,e[49]=b,e[50]=ie,e[51]=ne,e[52]=c,e[53]=z,e[54]=v,e[55]=N,e[56]=q,e[57]=me,e[58]=R,e[59]=A):A=e[59];let J;return e[60]!==I||e[61]!==A?(J=t.jsxs("div",{className:"flex h-full w-full flex-col",children:[I,A]}),e[60]=I,e[61]=A,e[62]=J):J=e[62],J}function Ke(n){return n+1}function Me(n){return n+1}function Ge(n,e){try{return new URL(n,e).href}catch{return e}}function Ve(n,e){const i=e.__resolveType,r=n.__resolveType;if(typeof i=="string"&&typeof r=="string"&&i!==r)return{...e};const h={...n};for(const[a,s]of Object.entries(e))a!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(h[a]=s));return h}export{Di as SeoEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as S,g as T,j as s,q as W,b7 as X,c as w,F as Y,P as F,t as H,a2 as Q,b as D,l as Z,r as ee,O as se}from"./index-DxEUOQQs.js";import{u as J}from"./useRouterState-CKqJqhNS.js";import{S as te,a as le,b as re,e as I,f as A,g as L,c as B,d as R,i as ie,j as ne}from"./sidebar-D_Yb-5nE.js";import{a as oe}from"./index-Daxt8Oww.js";import{n as ae,b as ce,a as me,c as fe,d as de,i as K}from"./ZapSquare-B7LKxpnQ.js";import{t as be,a as E}from"./Users03-BZnIYCM1.js";import{i as xe}from"./HardDrive-D6YFkngp.js";import{i as ue}from"./Key01-DtPyr_d4.js";import{i as he}from"./Shield01-BkzImfUK.js";import{s as ge}from"./User01-CWJ4O2R8.js";import{i as G}from"./Zap-CtPT7vkQ.js";import{a as pe}from"./use-capability-C6m2-0Ci.js";import{u as U}from"./tooltip-BIymZbyc.js";import{u as je}from"./use-status-sounds-TuoDiwSP.js";import{a as y}from"./toolbar-Dje6lkWt.js";import{S as _e,M as ye}from"./shell-controls-3zx-sXr7.js";import"./LayoutLeft-zPlWqXYO.js";import"./sheet-Devtg9cX.js";import"./X-CH7nrxK3.js";import"./question-004-sINsf4GQ.js";import"./decopilot-sse-pool-C9YWBszR.js";import"./create-sse-subscription-BS5983N4.js";import"./ChevronLeft-CyC6kPhn.js";import"./ChevronRight-D4rmSZYg.js";function V(){const e=S.c(26),t=W().project;let n;e[0]!==t.enabledPlugins?(n=t.enabledPlugins??[],e[0]=t.enabledPlugins,e[1]=n):n=e[1];const l=n,{capabilities:i,isPrivileged:r,loading:o,error:a}=pe();let c,d;if(e[2]!==i||e[3]!==l||e[4]!==a||e[5]!==r||e[6]!==o){d=Symbol.for("react.early_return_sentinel");e:{let m;e[9]!==l?(m=q=>l.includes(q.pluginId),e[9]=l,e[10]=m):m=e[10];const h=X.filter(m).map(ve);let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(be,{size:14}),e[11]=b):b=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ae,{size:14}),e[12]=f):f=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ce,{size:14}),e[13]=x):x=e[13];let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ue,{size:14}),e[14]=g):g=e[14];let p;e[15]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{size:14}),e[15]=p):p=e[15];let u;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(me,{size:14}),e[16]=u):u=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(E,{size:14}),e[17]=_):_=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(G,{size:14}),e[18]=j):j=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(fe,{size:14}),e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(de,{size:14}),e[20]=N):N=e[20];let k;e[21]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(E,{size:14}),e[21]=k):k=e[21];let $;e[22]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(he,{size:14}),e[22]=$):$=e[22];let z;e[23]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(Y,{size:14}),e[23]=z):z=e[23];let C;e[24]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(G,{size:14}),e[24]=C):C=e[24];let P;e[25]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(ge,{size:14}),e[25]=P):P=e[25];const O=[{label:"Organization",items:[{key:"general",label:"General",icon:b,to:"/$org/settings/general",requires:"org:manage"},{key:"brand-context",label:"Brand Context",icon:f,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:"AI Providers",icon:x,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:"Secrets",icon:g,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:"Buckets",icon:p,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{label:"Build",items:[{key:"connections",label:"Connections",icon:u,to:"/$org/settings/connections"},{key:"agents",label:"Agents",icon:_,to:"/$org/settings/agents"},{key:"automations",label:"Automations",icon:j,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:"Store",icon:v,to:"/$org/settings/store",requires:"registry:manage"}]},{label:"Manage",items:[{key:"monitor",label:"Monitor",icon:N,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:"Members",icon:k,to:"/$org/settings/members",requires:"members:manage"},{key:"roles",label:"Roles",icon:$,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:"Security",icon:z,to:"/$org/settings/sso",requires:"org:manage"}]},{label:"Extensions",items:[{key:"features",label:"Plugins",icon:C,to:"/$org/settings/features",requires:"org:manage"},...h]},{label:"Account",items:[{key:"profile",label:"Profile & Preferences",icon:P,to:"/$org/settings/profile"}]}];if(o||a){d=O;break e}c=O.map(q=>({...q,items:q.items.filter(M=>M.privilegedOnly?r:M.requires?r||i[M.requires]:!0)})).filter(Se)}e[2]=i,e[3]=l,e[4]=a,e[5]=r,e[6]=o,e[7]=c,e[8]=d}else c=e[7],d=e[8];return d!==Symbol.for("react.early_return_sentinel")?d:c}function Se(e){return e.items.length>0}function ve(e){const{key:t,label:n,icon:l,to:i}=e;return{key:t,label:n,icon:l,to:i}}function Ne(){const e=S.c(19),t=V();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org"},e[0]=n):n=e[0];const{org:l}=T(n);let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={select:$e},e[1]=i):i=e[1];const r=J(i);let o;e[2]!==l||e[3]!==r?(o=x=>{const g=x.replace("$org",l);return r.startsWith(g)},e[2]=l,e[3]=r,e[4]=o):o=e[4];const a=o;let c;if(e[5]!==t||e[6]!==a||e[7]!==l){let x;e[9]!==a||e[10]!==l?(x=(g,p)=>s.jsxs(I,{className:"pt-0 pr-0 pb-0 pl-0",children:[g.label&&s.jsx("p",{className:w("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",p>0&&"mt-3"),children:g.label}),s.jsx(A,{children:s.jsx(L,{className:"gap-0.5",children:g.items.map(u=>s.jsx(B,{children:s.jsx(R,{asChild:!0,isActive:a(u.to),children:s.jsxs(F,{to:u.to,params:{org:l},onClick:()=>H("settings_nav_clicked",{section_key:u.key,section_label:u.label,group_label:g.label||"main"}),className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:u.icon}),s.jsx("span",{className:"truncate",children:u.label})]})})},u.key))})})]},`${g.label}-${p}`),e[9]=a,e[10]=l,e[11]=x):x=e[11],c=t.map(x),e[5]=t,e[6]=a,e[7]=l,e[8]=c}else c=e[8];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[12]=d):d=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsxs(I,{className:"pt-0 pr-0 pb-0 pl-0",children:[d,s.jsx(A,{children:s.jsx(L,{className:"gap-0.5",children:s.jsx(B,{children:s.jsxs(R,{onClick:ke,className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(K,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})})})})]}),e[13]=m):m=e[13];let h;e[14]!==c?(h=s.jsxs(ie,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[c,m]}),e[14]=c,e[15]=h):h=e[15];let b;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","3.30.0"]})}),e[16]=b):b=e[16];let f;return e[17]!==h?(f=s.jsxs(ne,{variant:"sidebar",children:[h,b]}),e[17]=h,e[18]=f):f=e[18],f}function ke(){H("signed_out",{source:"settings_sidebar"}),Q(),D.signOut()}function $e(e){return e.location.pathname}function ze(e){const t=S.c(21),{onClose:n}=e,l=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org"},t[0]=i):i=t[0];const{org:r}=T(i);let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o={select:Pe},t[1]=o):o=t[1];const a=J(o);let c;t[2]!==r||t[3]!==a?(c=p=>{const u=p.replace("$org",r);return a.startsWith(u)},t[2]=r,t[3]=a,t[4]=c):c=t[4];const d=c;let m;if(t[5]!==l||t[6]!==d||t[7]!==n||t[8]!==r){let p;t[10]!==d||t[11]!==n||t[12]!==r?(p=(u,_)=>s.jsxs("div",{className:"flex flex-col gap-0.5",children:[u.label&&s.jsx("p",{className:w("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",_>0&&"mt-3"),children:u.label}),u.items.map(j=>s.jsxs(F,{to:j.to,params:{org:r},onClick:n,className:w("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",d(j.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[s.jsx("span",{className:"shrink-0",children:j.icon}),s.jsx("span",{className:"truncate",children:j.label})]},j.key))]},`${u.label}-${_}`),t[10]=d,t[11]=n,t[12]=r,t[13]=p):p=t[13],m=l.map(p),t[5]=l,t[6]=d,t[7]=n,t[8]=r,t[9]=m}else m=t[9];let h;t[14]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("div",{className:"h-px bg-border/50 my-2"}),t[14]=h):h=t[14];let b;t[15]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[h,s.jsxs("button",{type:"button",onClick:Ce,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(K,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})]}),t[15]=b):b=t[15];let f;t[16]!==m?(f=s.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[m,b]}),t[16]=m,t[17]=f):f=t[17];let x;t[18]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","3.30.0"]})}),t[18]=x):x=t[18];let g;return t[19]!==f?(g=s.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[f,x]}),t[19]=f,t[20]=g):g=t[20],g}function Ce(){Q(),D.signOut()}function Pe(e){return e.location.pathname}function qe(){const e=S.c(4),t=U(),{org:n}=W();je(n.slug);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(Z,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ee.Suspense,{fallback:l,children:s.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:s.jsx(oe,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(se,{})})})})}),e[1]=i):i=e[1];const r=i;if(t){let a;return e[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:r}),e[2]=a):a=e[2],a}let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1 min-h-0 p-1",children:s.jsx("div",{className:w("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:r})}),e[3]=o):o=e[3],o}function ts(){const e=S.c(22),t=U();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(y.LogoLink,{}),e[0]=n):n=e[0];let l;e[1]!==t?(l=t&&s.jsx(_e,{}),e[1]=t,e[2]=l):l=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("span",{className:"hidden md:contents",children:s.jsx(y.Nav,{})}),e[3]=i):i=e[3];let r;e[4]!==l?(r=s.jsxs(y.LeftColumn,{children:[n,l,i]}),e[4]=l,e[5]=r):r=e[5];let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(y.CenterSlot,{}),e[6]=o):o=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(y.RightColumn,{children:s.jsx("span",{})}),e[7]=a):a=e[7];let c;e[8]!==r?(c=s.jsxs(y.Header,{children:[r,o,a]}),e[8]=r,e[9]=c):c=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d={"--sidebar-width-icon":"3.5rem"},e[10]=d):d=e[10];let m;e[11]!==t?(m=!t&&s.jsx(Ne,{}),e[11]=t,e[12]=m):m=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(te,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:s.jsx(qe,{})}),e[13]=h):h=e[13];let b;e[14]!==m?(b=s.jsxs(le,{className:"flex-1 bg-sidebar min-h-0",style:d,children:[m,h]}),e[14]=m,e[15]=b):b=e[15];let f;e[16]!==t?(f=t&&s.jsx(ye,{renderSidebar:we}),e[16]=t,e[17]=f):f=e[17];let x;return e[18]!==b||e[19]!==f||e[20]!==c?(x=s.jsx(y.Provider,{children:s.jsx(re,{defaultOpen:!0,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[c,b,f]})})}),e[18]=b,e[19]=f,e[20]=c,e[21]=x):x=e[21],x}function we(e){const{onClose:t}=e;return s.jsx(ze,{onClose:t})}export{Ne as SettingsSidebar,ze as SettingsSidebarMobile,ts as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-Bp8ThmJv.js","assets/index-DxEUOQQs.js","assets/index-DfYyH4IW.css","assets/XCircle-DSNLgcsz.js","assets/CheckCircle-B1gk6AbW.js","assets/Container-Ck07PAMh.js","assets/Settings02-RkWi-oHt.js","assets/use-mcp-client-BW6MR0tW.js","assets/useInfiniteQuery-CMP19UQ8.js","assets/infiniteQueryObserver-_wx8vha2.js","assets/studio-tools-CdiIGNug.js","assets/badge-Cc4XouWa.js","assets/input-CzgGcI3V.js","assets/dropdown-menu-9oUOEimm.js","assets/Check-CJuLJZRg.js","assets/ChevronRight-D4rmSZYg.js","assets/DotsVertical-DVI2JfBT.js","assets/table-C7al_g9w.js","assets/toggle-group-DUH3UCsh.js","assets/use-view-mode-CdHjt_dk.js","assets/tooltip-BIymZbyc.js","assets/FilterLines-DXoB5fi6.js","assets/Globe01-_Gozs0-K.js","assets/SearchMd-CkwYmYFX.js","assets/dialog-DlK91HiY.js","assets/X-CH7nrxK3.js","assets/AlertCircle-C2JPSNIc.js","assets/Upload01-B6COGlQo.js","assets/alert-dialog-DzLqwXYd.js","assets/card-OOIE0uKL.js","assets/Trash01-D9jT6VSX.js","assets/label-Bz4-Isgq.js","assets/select-BhUuCBjD.js","assets/ChevronDown-BbO00aHm.js","assets/ChevronUp-DC9Fz2he.js","assets/switch-CbDNpyYj.js","assets/textarea-CHCvnh_8.js","assets/RefreshCcw01-De11YcWY.js","assets/checkbox-EJ-FS6-O.js","assets/Eye-8SpX7ax1.js","assets/LinkExternal01-CMKC3Ppc.js","assets/use-copy-CMgaIgR7.js","assets/Key01-DtPyr_d4.js","assets/Plus-D3Yt_klI.js","assets/Play-BGgNLf1z.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{e as m,f as n,g as c,j as t,l as f,r as l,_ as p}from"./index-DxEUOQQs.js";import{R as u}from"./require-capability-Cu6FsDEP.js";import"./use-capability-C6m2-0Ci.js";import"./access-gate-CBfdxByI.js";import"./capability-load-error-S5ghjE3y.js";const g=l.lazy(()=>p(()=>import("./registry-layout-Bp8ThmJv.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,e as m,a0 as h}from"./index-DxEUOQQs.js";import{p as R,q as I}from"./question-004-sINsf4GQ.js";import{d as y,D as S}from"./decopilot-sse-pool-C9YWBszR.js";const b=()=>0;function D(s){const{orgSlug:e,taskId:r,enabled:t=!0,onStep:n,onFinish:u,onTaskStatus:f}=s,l=o.useRef({taskId:r,onStep:n,onFinish:u,onTaskStatus:f});l.current={taskId:r,onStep:n,onFinish:u,onTaskStatus:f};const i=o.useRef(null),p=o.useRef(t),d=o.useRef(e);(!i.current||p.current!==t||d.current!==e)&&(p.current=t,d.current=e,i.current=E=>{if(!t||!e)return()=>{};const k=T=>{let a;try{a=JSON.parse(T.data)}catch{return}const c=l.current;if(!(c.taskId&&a.subject!==c.taskId)){switch(a.type){case S.STEP:c.onStep?.(a);break;case S.FINISH:c.onFinish?.(a);break;case S.THREAD_STATUS:c.onTaskStatus?.(a);break}E()}};return y.subscribe(e,k)}),o.useSyncExternalStore(i.current,b,b)}const O=new Set(["completed","failed","requires_action"]);function U(s){const e=m.c(5),[r]=h();let t;e[0]!==r?(t=u=>{r.enableSounds&&O.has(u.data.status)&&R(I.dataUri).catch(_)},e[0]=r,e[1]=t):t=e[1];let n;e[2]!==s||e[3]!==t?(n={orgSlug:s,onTaskStatus:t},e[2]=s,e[3]=t,e[4]=n):n=e[4],D(n)}function _(s){console.warn("[status-sounds] playback failed:",s)}export{U as u};
|