decocms 4.40.0 → 4.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BQoAJ7Pc.js → AlertCircle-alrsw5sb.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CfcRtZ8o.js → ArrowUpRight-BYn37fLS.js} +1 -1
- package/dist/client/assets/{Check-ByMMRPdN.js → Check-BoClJlGr.js} +1 -1
- package/dist/client/assets/{CheckCircle-uSDvDj68.js → CheckCircle-DU5VsEiy.js} +1 -1
- package/dist/client/assets/{ChevronDown-Ds93wwRe.js → ChevronDown-Brul_emp.js} +1 -1
- package/dist/client/assets/{ChevronRight-BUqzT2AZ.js → ChevronRight-CPjbrY1z.js} +1 -1
- package/dist/client/assets/{ChevronUp-hSMVM7_9.js → ChevronUp-bdu2geyR.js} +1 -1
- package/dist/client/assets/{Circle-CIBa1C-R.js → Circle-BOYi0Xck.js} +1 -1
- package/dist/client/assets/{Copy01-Dn74k5DV.js → Copy01-CmYZk_Oi.js} +1 -1
- package/dist/client/assets/{DotsVertical-OqISO6nN.js → DotsVertical-DO_6KMLL.js} +1 -1
- package/dist/client/assets/{Eye-DMTaYgfE.js → Eye-BvH_DPVP.js} +1 -1
- package/dist/client/assets/{FilterLines-BmSHEouM.js → FilterLines-DO_aU8_D.js} +1 -1
- package/dist/client/assets/{Globe01-DCyvmziv.js → Globe01-CRp5QOra.js} +1 -1
- package/dist/client/assets/{Globe04-iXXVu6cY.js → Globe04-B4Ko9COZ.js} +1 -1
- package/dist/client/assets/{HardDrive-BOMqphCJ.js → HardDrive-DuDQqVUp.js} +1 -1
- package/dist/client/assets/{Key01-CyxwtgAw.js → Key01-BQ6DQsHX.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Lv2ZhZwN.js → LayoutLeft--MRcuBrS.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CqYi3PbY.js → LinkExternal01-CZdZ3Gp9.js} +1 -1
- package/dist/client/assets/{List-CjQLqVV2.js → List-CLefXpG9.js} +1 -1
- package/dist/client/assets/{Loading02-Br4Qsbis.js → Loading02-CfrU2bHj.js} +1 -1
- package/dist/client/assets/{Monitor01-Dj7mHFbg.js → Monitor01-C7sxGC0d.js} +1 -1
- package/dist/client/assets/{Palette-CYfpdldc.js → Palette-ByeXYG5e.js} +1 -1
- package/dist/client/assets/{Play-Ct1jkZWO.js → Play-Du9xpw0U.js} +1 -1
- package/dist/client/assets/{Plus-BdYdKkzh.js → Plus-1psGuynD.js} +1 -1
- package/dist/client/assets/{SearchLg-BKceB_7Q.js → SearchLg-BmO74DiK.js} +1 -1
- package/dist/client/assets/{SearchMd-CIebSZD2.js → SearchMd-CSePLCcA.js} +1 -1
- package/dist/client/assets/{Settings02-CO032VQ5.js → Settings02-MYpqMtoa.js} +1 -1
- package/dist/client/assets/{Shield01-BOKAaJ_3.js → Shield01-C1_5VC4J.js} +1 -1
- package/dist/client/assets/{Star01-BEjXt6EU.js → Star01-DR542MT0.js} +1 -1
- package/dist/client/assets/{Stars01-CCdr3QPh.js → Stars01-DFxlT01N.js} +1 -1
- package/dist/client/assets/{Stars02-RAKDMyiv.js → Stars02-BEUdLZEv.js} +1 -1
- package/dist/client/assets/{Sun-CZYFQMTR.js → Sun-DdMchr6Q.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-ypxOAaEV.js → SwitchHorizontal01-DmcI1SxK.js} +1 -1
- package/dist/client/assets/{Tool01-BjsyNNOX.js → Tool01-CLxmN9mS.js} +1 -1
- package/dist/client/assets/{Trash01-CkdTj_48.js → Trash01-D0Cq2EdB.js} +1 -1
- package/dist/client/assets/{Upload01-pwMs2gu0.js → Upload01-u7texoe_.js} +1 -1
- package/dist/client/assets/{User01-CJUJXUar.js → User01-C6Q6FZ5h.js} +1 -1
- package/dist/client/assets/{Users01-DXfhOPWM.js → Users01-BaAnt9k2.js} +1 -1
- package/dist/client/assets/{Users03-BgboQghl.js → Users03-BWAP9RHq.js} +1 -1
- package/dist/client/assets/{X-BsHMY5bm.js → X-OMJfEq4b.js} +1 -1
- package/dist/client/assets/{XCircle-C_yScwcR.js → XCircle-CZr5n04C.js} +1 -1
- package/dist/client/assets/{XClose-CAJh-urJ.js → XClose-DN4fuk7G.js} +1 -1
- package/dist/client/assets/{Zap-dPP-v905.js → Zap-DR-fQuEw.js} +1 -1
- package/dist/client/assets/{ZapSquare-BXCU0Zkc.js → ZapSquare-B6bJc7NY.js} +1 -1
- package/dist/client/assets/{ZoomOut-Z_A5DKtk.js → ZoomOut-DZtqvzaF.js} +1 -1
- package/dist/client/assets/{access-gate-AdoS_2mp.js → access-gate-D0Yziy4K.js} +1 -1
- package/dist/client/assets/{add-section-modal-D_ZZ5oen.js → add-section-modal-7QHISFHk.js} +1 -1
- package/dist/client/assets/{agent-capabilities-Bbkrqncd.js → agent-capabilities-CdrlnYho.js} +1 -1
- package/dist/client/assets/{agent-icon-7Bw2_U9B.js → agent-icon-DvxUJZQr.js} +1 -1
- package/dist/client/assets/agents-list-DqGbI6wK.js +1 -0
- package/dist/client/assets/{ai-providers-Dz-kVb5L.js → ai-providers-BXjxg9pA.js} +1 -1
- package/dist/client/assets/{alert-Bkzkh_iw.js → alert-CpvYl4NL.js} +1 -1
- package/dist/client/assets/{alert-dialog-Byb-84-w.js → alert-dialog-eNWhkEoy.js} +1 -1
- package/dist/client/assets/{app-editor-BHj37cnk.js → app-editor-hzVyG0y7.js} +1 -1
- package/dist/client/assets/{auth-B4QHxlg3.js → auth-CsnJqa1F.js} +1 -1
- package/dist/client/assets/{auth-catchall-BzSqMvEC.js → auth-catchall-DdCNV_zX.js} +1 -1
- package/dist/client/assets/{auth-entry-D_mlfJVE.js → auth-entry-bPX7Q_6Z.js} +1 -1
- package/dist/client/assets/{auth-split-layout-B8OLwRqq.js → auth-split-layout-CmbqYndx.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BnshO0o5.js → authenticate-and-persist-oauth-B_9_tvH8.js} +1 -1
- package/dist/client/assets/{automation-list-row-BaV_jeUH.js → automation-list-row-BW7BWI_0.js} +1 -1
- package/dist/client/assets/{automation-runs-BTJrtjXJ.js → automation-runs-DuxW2iQ2.js} +1 -1
- package/dist/client/assets/{automations-Biqrif9W.js → automations-CtC6XnpR.js} +1 -1
- package/dist/client/assets/{autosend-DQZl8KyP.js → autosend-7cnPPC-f.js} +1 -1
- package/dist/client/assets/{avatar-Btcoxp_w.js → avatar-ClX7LKnq.js} +1 -1
- package/dist/client/assets/{badge-Be_N2FuK.js → badge-DjjYK3hM.js} +1 -1
- package/dist/client/assets/{block-document-DxWYxLCB.js → block-document-DK7lTXBo.js} +1 -1
- package/dist/client/assets/{brand-context-Dgf9CN4T.js → brand-context-DlN9CIFW.js} +1 -1
- package/dist/client/assets/{breadcrumb-C8UiQMDq.js → breadcrumb-PniBBMek.js} +1 -1
- package/dist/client/assets/{buckets-CybWqIzM.js → buckets-gxzaiz2d.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-BoL-CJ9Q.js → bulk-category-panel-C3uWZXv5.js} +1 -1
- package/dist/client/assets/{calendar-C4lHCPAe.js → calendar-CK3Sat10.js} +1 -1
- package/dist/client/assets/{capability-load-error-pQOhA0uu.js → capability-load-error-DyHBZvtv.js} +1 -1
- package/dist/client/assets/{card-DhyAaYbH.js → card-B59c-zKl.js} +1 -1
- package/dist/client/assets/{category-editor-Bf6cCUx0.js → category-editor-Nlp7pH1k.js} +1 -1
- package/dist/client/assets/{chat-context-CSDQ2V59.js → chat-context-A7nmjc6x.js} +1 -1
- package/dist/client/assets/{checkbox-CAOM_6bX.js → checkbox-B9H3Kcg1.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Dpmw0i2r.js → cli-auth-success-DlMGgqe7.js} +1 -1
- package/dist/client/assets/{collection-detail-Dn9SOp1e.js → collection-detail-BOn69uPs.js} +1 -1
- package/dist/client/assets/{collection-display-button-CHYrGfBD.js → collection-display-button-s_3IDVT0.js} +1 -1
- package/dist/client/assets/{collection-search-Dq5OTSM6.js → collection-search-C1a7Zgcm.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-VRqIBkXR.js → collection-table-wrapper-ByYKvUqb.js} +1 -1
- package/dist/client/assets/{collection-tabs-C-L6t4af.js → collection-tabs-DkseRL6k.js} +1 -1
- package/dist/client/assets/{command-CzaPqse4.js → command-B9xNHDhN.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CCMdnsEm.js → commerce-onboarding-Bbw-pZSR.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-B05P9T9A.js → connect-desktop-dialog-D7Moybni.js} +1 -1
- package/dist/client/assets/{connection-card-uIsG5TxJ.js → connection-card-DeB2bj2L.js} +1 -1
- package/dist/client/assets/{connection-detail-BdYVs7Y7.js → connection-detail-B7hMgi8f.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BEcWB5x3.js → connection-form-helpers-Bi9IvJ4z.js} +1 -1
- package/dist/client/assets/{connections-Can6s0sB.js → connections-rsSwh4TC.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-C_JJ7Vcr.js → decopilot-sse-pool-DRCw2_hc.js} +1 -1
- package/dist/client/assets/{dialog-DCS2OMH4.js → dialog-BZT5GyRD.js} +1 -1
- package/dist/client/assets/{domain-settings-DWf_GZRj.js → domain-settings-DI0pyWvk.js} +1 -1
- package/dist/client/assets/{drawer-3OE7N_2G.js → drawer-B1mbeoBW.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DcvaX3-F.js → dropdown-menu-VYc_jtsE.js} +1 -1
- package/dist/client/assets/{empty-state-hC3dFQXj.js → empty-state-DdYIETDL.js} +1 -1
- package/dist/client/assets/{extract-connection-data-qlF7ZWrt.js → extract-connection-data-i1upuIiY.js} +1 -1
- package/dist/client/assets/{file-explorer-QRM6gqgi.js → file-explorer-grrkdCaR.js} +1 -1
- package/dist/client/assets/{file-type-icon-DOhIggRJ.js → file-type-icon-BBIUqTz8.js} +1 -1
- package/dist/client/assets/{files-DMPByaM3.js → files-4OV5RCUC.js} +1 -1
- package/dist/client/assets/{form-TXHpDJV5.js → form-DsC2p383.js} +1 -1
- package/dist/client/assets/{general-CBUVeNez.js → general-CyBCG4y2.js} +1 -1
- package/dist/client/assets/github-repo-picker-kM8XNde1.js +1 -0
- package/dist/client/assets/{hooks-BQcGIBer.js → hooks-sbzuLwH3.js} +1 -1
- package/dist/client/assets/{index-CXah3T6b.js → index-5CO29rZe.js} +1 -1
- package/dist/client/assets/{index-BS7P87_E.js → index-93HCuWf6.js} +1 -1
- package/dist/client/assets/{index-7o2IzKac.js → index-BH17km_1.js} +1 -1
- package/dist/client/assets/{index-CZiyq9bL.js → index-BrDZHTLR.js} +3 -3
- package/dist/client/assets/{index-2kogngRp.js → index-Bwu7f1fJ.js} +1 -1
- package/dist/client/assets/{index-AQ-qvM9M.js → index-CIOAd4qO.js} +5 -5
- package/dist/client/assets/{index-BveuunA1.js → index-CYUBf2mm.js} +1 -1
- package/dist/client/assets/index-Ca1LwOX2.js +1 -0
- package/dist/client/assets/{index-Jx11C7Wo.js → index-Ca_J943o.js} +1 -1
- package/dist/client/assets/{index-v5fWJqXW.js → index-CcToIFKw.js} +1 -1
- package/dist/client/assets/{index-BbP2mJoY.js → index-UEam1TE5.js} +1 -1
- package/dist/client/assets/{index-CN-uq_6E.js → index-c1JpYe_A.js} +1 -1
- package/dist/client/assets/{index-CbYZTRTc.js → index-mC3b7Drk.js} +1 -1
- package/dist/client/assets/{index-DBpZEK7p.js → index-qeTrhZ5z.js} +1 -1
- package/dist/client/assets/{index-redirect-D0BYIrK2.js → index-redirect-CLndP6tO.js} +1 -1
- package/dist/client/assets/{input-DnW5bl5u.js → input-C1Kmo3vK.js} +1 -1
- package/dist/client/assets/{integration-icon-BSkS97aB.js → integration-icon-Bpdl0ZYs.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BaE04Tgl.js → invite-member-dialog-xOG3iMjC.js} +1 -1
- package/dist/client/assets/{label-DeNhnW1K.js → label-DYYJC9Z1.js} +1 -1
- package/dist/client/assets/{login-D7-Umlvc.js → login-Ck3ThVnx.js} +1 -1
- package/dist/client/assets/{mcp-oauth-B6n4lY5H.js → mcp-oauth-D84eIMFG.js} +1 -1
- package/dist/client/assets/{members-D6b_SyPY.js → members-CGpbseRw.js} +1 -1
- package/dist/client/assets/{monaco-editor-CP8nMfPS.js → monaco-editor-fHkuT6U5.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Bx24pOuR.js → monitoring-stats-row-D_ab5fuA.js} +1 -1
- package/dist/client/assets/{oauth-callback-DpPxlohU.js → oauth-callback-DjpZ1CHA.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DI_CjOsa.js → oauth-callback-ai-provider-DMGr3Yxu.js} +1 -1
- package/dist/client/assets/{onboarding-DatxqVBu.js → onboarding-DaiEBZfh.js} +1 -1
- package/dist/client/assets/{org-install-CN9xltsE.js → org-install-B592i53z.js} +1 -1
- package/dist/client/assets/{org-layout-CkUoNFto.js → org-layout-BqQo4_yS.js} +1 -1
- package/dist/client/assets/{organization-choice-DsGaGCSI.js → organization-choice-DPAHeOTx.js} +1 -1
- package/dist/client/assets/{page-seo-form-BAwWoCrB.js → page-seo-form-D8fbKZ1h.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CXtm2wdS.js +1 -0
- package/dist/client/assets/{popover-BtkVBk9O.js → popover-CgDNpU8B.js} +1 -1
- package/dist/client/assets/{post-editor-DSGnoUmA.js → post-editor-NfJoTyDC.js} +1 -1
- package/dist/client/assets/{primitives-DaNtYP9L.js → primitives--tVK20cV.js} +1 -1
- package/dist/client/assets/{profile-C0fMGjjc.js → profile-CJ4VFOtj.js} +1 -1
- package/dist/client/assets/project-app-view-C9GFnxtU.js +1 -0
- package/dist/client/assets/record-editor-CgHrbjzN.js +1 -0
- package/dist/client/assets/{registry-layout-BOz2CQvs.js → registry-layout-2FJLNRL3.js} +1 -1
- package/dist/client/assets/registry-ykorVpcK.js +2 -0
- package/dist/client/assets/{require-capability-x8Fj1OOf.js → require-capability-DgRedFhr.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DGg5Hfsv.js → required-auth-layout-DrLP3sOL.js} +1 -1
- package/dist/client/assets/{reset-password-DS17zoPA.js → reset-password-BcmEhh5v.js} +1 -1
- package/dist/client/assets/{roles-Dkepi16W.js → roles-DIxwwmPK.js} +1 -1
- package/dist/client/assets/{search-input-DbIhh1K9.js → search-input-CjSpFSFv.js} +1 -1
- package/dist/client/assets/{secrets-D3_ZBUEY.js → secrets-CbLWjCnY.js} +1 -1
- package/dist/client/assets/{sections-editor-BXA6IVl3.js → sections-editor-BIBNvxJf.js} +1 -1
- package/dist/client/assets/{select-BloW6tH6.js → select-YjEses9D.js} +1 -1
- package/dist/client/assets/{select-model-CXs0fKE0.js → select-model-CgdZqY7t.js} +1 -1
- package/dist/client/assets/{seo-editor-gYApNiNE.js → seo-editor-Cxn7J1o3.js} +1 -1
- package/dist/client/assets/{settings-layout-Dijgs1Xz.js → settings-layout-DTnHKxHy.js} +1 -1
- package/dist/client/assets/{settings-section-C9xZekaQ.js → settings-section-DizG3l8Q.js} +1 -1
- package/dist/client/assets/{shell-controls--WEatP4X.js → shell-controls-J_MoYL7U.js} +1 -1
- package/dist/client/assets/{shell-layout-DzGqfR6q.js → shell-layout-B82J_KPo.js} +1 -1
- package/dist/client/assets/{sidebar-Dvoriw7V.js → sidebar-DFX-m3oC.js} +1 -1
- package/dist/client/assets/{skeleton-Ky3jBeUP.js → skeleton-DqDfsqHy.js} +1 -1
- package/dist/client/assets/{sso-DQVCony7.js → sso-stL1wU3z.js} +1 -1
- package/dist/client/assets/{store-6qk4XsXB.js → store-Xq2n79iO.js} +1 -1
- package/dist/client/assets/store-registry-D6m7tbUD.js +2 -0
- package/dist/client/assets/{studio-tools-rhnNh1x_.js → studio-tools-D0ghBj1q.js} +1 -1
- package/dist/client/assets/{switch-BSaVqgeH.js → switch-C2fH9o8L.js} +1 -1
- package/dist/client/assets/{table-BPvxLDuP.js → table-DbIpX7-0.js} +1 -1
- package/dist/client/assets/{tabs-BwxHAAl0.js → tabs-CVnXbEbf.js} +1 -1
- package/dist/client/assets/{textarea-ByYUJCqn.js → textarea-DiiyNZoM.js} +1 -1
- package/dist/client/assets/{toggle-group-Dh7bEZa1.js → toggle-group-t0AjASu3.js} +1 -1
- package/dist/client/assets/{toolbar-BR5ie4nh.js → toolbar-BiSenxgj.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CD0nzSrw.js → toolbar-icon-button-Putd7Z1P.js} +1 -1
- package/dist/client/assets/{tools-list-CfZBf99o.js → tools-list-BKRJivYX.js} +1 -1
- package/dist/client/assets/{tooltip-BvZsaZo1.js → tooltip-Cn3wVH17.js} +1 -1
- package/dist/client/assets/{types-tGK3rxv3.js → types-DJxzgNPE.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Df_6Lv76.js → use-ai-providers-D3-RoSuB.js} +1 -1
- package/dist/client/assets/{use-automations-CX4ke4Gn.js → use-automations-BR5JBwGL.js} +1 -1
- package/dist/client/assets/{use-capability-WrhvLN3Q.js → use-capability-DHjmgTGt.js} +1 -1
- package/dist/client/assets/{use-clock-tick-Co2laZ_v.js → use-clock-tick-DH0G_lc3.js} +1 -1
- package/dist/client/assets/{use-collections-0y8z6h6B.js → use-collections-BYXy-R3E.js} +1 -1
- package/dist/client/assets/{use-connection-D6vKxP6c.js → use-connection-CRDT9Ldi.js} +1 -1
- package/dist/client/assets/{use-copy-DEsN1JWA.js → use-copy-Cz3O5WiP.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CjfdEFEm.js → use-create-virtual-mcp-4Ix0bA_M.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-ykAA77u8.js → use-debounced-autosave-B0vb-HYP.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BpYGxCFi.js → use-debounced-value-BmUV4CbZ.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DepdMgPX.js → use-decopilot-events-BaYxDi6g.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DRyaCpbw.js → use-delete-connection-Dr8YUydr.js} +1 -1
- package/dist/client/assets/{use-file-configs-DKRnyJ3w.js → use-file-configs-ChSgKNGP.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CAwsvAnT.js → use-infinite-scroll-Cc-eI5dW.js} +1 -1
- package/dist/client/assets/{use-join-requests-DDC__CaF.js → use-join-requests-DdIBSZSe.js} +1 -1
- package/dist/client/assets/{use-mcp-client-B3WRhZdt.js → use-mcp-client-Tn0EaYl-.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-C1R-WVFz.js → use-mcp-prompts-D2ADBynP.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BVxAk373.js → use-mcp-tools-B0s72NAd.js} +1 -1
- package/dist/client/assets/{use-members-Cf18JViN.js → use-members-DQ95-jnU.js} +1 -1
- package/dist/client/assets/{use-mobile-Cpcc36Em.js → use-mobile-KpS88y1x.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-IHN5iTDI.js → use-navigate-to-agent-D9dmHsrm.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-C3YxdmcM.js → use-org-auth-client-Bt8pW8tY.js} +1 -1
- package/dist/client/assets/{use-org-sso-reL-KJxj.js → use-org-sso-Bj7oxuZp.js} +1 -1
- package/dist/client/assets/{use-organization-roles--3C-OX-U.js → use-organization-roles-syk5pt4r.js} +1 -1
- package/dist/client/assets/{use-organization-settings-D6NjaCfk.js → use-organization-settings-CpKXAWmk.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Cs9PospA.js → use-registry-connections-CSbURcZz.js} +1 -1
- package/dist/client/assets/{use-secrets-kk5sLuVp.js → use-secrets--hJvdN8v.js} +1 -1
- package/dist/client/assets/{use-status-sounds-I1tajHMm.js → use-status-sounds-C0yOb1Wm.js} +1 -1
- package/dist/client/assets/{use-view-mode-CEB4Lc4b.js → use-view-mode-C43sfWHy.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-vpIsUoOg.js → use-virtual-mcp-BY7edM8i.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DMTZr3Km.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-CCpKF6B-.js +1 -0
- package/dist/client/assets/{variant-calendar-BMmdw5vi.js → variant-calendar-FLrb-T5o.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CjXL0rHJ.js → view-mode-toggle-DbhZEvJk.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agents-list-B7x2LOrI.js +0 -1
- package/dist/client/assets/github-repo-picker-ks7lf0Ye.js +0 -1
- package/dist/client/assets/index-B_hBmOqK.js +0 -1
- package/dist/client/assets/page-seo-sheet-DlP_RlkU.js +0 -1
- package/dist/client/assets/project-app-view-D3NA74TU.js +0 -1
- package/dist/client/assets/record-editor-BDKvL12x.js +0 -1
- package/dist/client/assets/registry-DqY4gr9J.js +0 -2
- package/dist/client/assets/store-registry-CBjkyCS6.js +0 -2
- package/dist/client/assets/useInfiniteQuery-oZPFa0FQ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-fOtFcKQk.js +0 -1
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as ie,j as s,B as Q,$ as de,p as fe,a as he,r as q,k as ge,K as te,d as xe,M as $,t as se,l as je}from"./index-CZiyq9bL.js";import{d as W,c as me,a as oe,D as ne}from"./dropdown-menu-DcvaX3-F.js";import{a as be}from"./Users03-BgboQghl.js";import{a as ue,g as Ce,u as ye,p as we,G as _e}from"./github-repo-picker-ks7lf0Ye.js";import{a as Ne,b as Se,c as ve}from"./use-virtual-mcp-vpIsUoOg.js";import{P as Z}from"./index-v5fWJqXW.js";import{i as Ie}from"./DotsVertical-OqISO6nN.js";import{a as De,b as Ee}from"./Settings02-CO032VQ5.js";import{s as Ae}from"./Trash01-CkdTj_48.js";import{A as Te,aB as ke}from"./agent-icon-7Bw2_U9B.js";import{c as pe}from"./use-navigate-to-agent-IHN5iTDI.js";import{C as Le}from"./card-DhyAaYbH.js";import{f as re}from"./formatDistanceToNow-Cb2QZZJn.js";import{u as Ge}from"./use-capability-WrhvLN3Q.js";import{E as Oe}from"./empty-state-hC3dFQXj.js";import{u as Pe}from"./use-create-virtual-mcp-CjfdEFEm.js";import{u as ze}from"./use-connection-D6vKxP6c.js";import{u as le}from"./use-mcp-client-B3WRhZdt.js";import{S as Me}from"./constants-B72Xmt_K.js";import{f as $e,a as He}from"./github-installations-DzN1UQ4x.js";import{e as Re,d as Fe,c as Be,a as Ue,D as Ve}from"./dialog-DCS2OMH4.js";import{C as Ke}from"./collection-search-Dq5OTSM6.js";import{c as qe,b as Qe,d as Je,A as We,e as Ye,g as Xe,a as Ze,f as et}from"./alert-dialog-Byb-84-w.js";import{S as tt}from"./search-input-DbIhh1K9.js";import{s as ae}from"./Plus-BdYdKkzh.js";import"./Check-ByMMRPdN.js";import"./ChevronRight-BUqzT2AZ.js";import"./Circle-CIBa1C-R.js";import"./checkbox-CAOM_6bX.js";import"./use-debounced-value-BpYGxCFi.js";import"./authenticate-and-persist-oauth-BnshO0o5.js";import"./mcp-oauth-B6n4lY5H.js";import"./auth-B4QHxlg3.js";import"./use-mcp-tools-BVxAk373.js";import"./extract-connection-data-qlF7ZWrt.js";import"./use-collections-0y8z6h6B.js";import"./sidebar-Dvoriw7V.js";import"./LayoutLeft-Lv2ZhZwN.js";import"./use-mobile-Cpcc36Em.js";import"./X-BsHMY5bm.js";import"./tooltip-BvZsaZo1.js";import"./AlertCircle-BQoAJ7Pc.js";import"./Tool01-BjsyNNOX.js";import"./SwitchHorizontal01-ypxOAaEV.js";import"./XCircle-C_yScwcR.js";import"./ArrowUpRight-CfcRtZ8o.js";import"./ZapSquare-BXCU0Zkc.js";import"./Loading02-Br4Qsbis.js";import"./CheckCircle-uSDvDj68.js";import"./ChevronDown-Ds93wwRe.js";import"./ChevronUp-hSMVM7_9.js";import"./Stars02-RAKDMyiv.js";import"./Copy01-Dn74k5DV.js";import"./ZoomOut-Z_A5DKtk.js";import"./Globe01-DCyvmziv.js";import"./Eye-DMTaYgfE.js";import"./FilterLines-BmSHEouM.js";import"./Star01-BEjXt6EU.js";import"./Globe04-iXXVu6cY.js";import"./HardDrive-BOMqphCJ.js";import"./Key01-CyxwtgAw.js";import"./LinkExternal01-CqYi3PbY.js";import"./List-CjQLqVV2.js";import"./Monitor01-Dj7mHFbg.js";import"./Sun-CZYFQMTR.js";import"./Palette-CYfpdldc.js";import"./Play-Ct1jkZWO.js";import"./SearchLg-BKceB_7Q.js";import"./SearchMd-CIebSZD2.js";import"./Shield01-BOKAaJ_3.js";import"./Stars01-CCdr3QPh.js";import"./Upload01-pwMs2gu0.js";import"./User01-CJUJXUar.js";import"./Users01-DXfhOPWM.js";import"./XClose-CAJh-urJ.js";import"./Zap-dPP-v905.js";import"./hooks-BQcGIBer.js";import"./decopilot-sse-pool-C_JJ7Vcr.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-qqWu133U.js";import"./differenceInSeconds-NQ4PDo0z.js";function ce(t){const e=ie.c(19),{onCreateFromScratch:n,onImportGitHub:i,onImportDeco:c,isCreating:C,align:y,side:d,showBetaBadge:g}=t,w=y===void 0?"end":y;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(be,{size:14}),e[0]=x):x=e[0];let m;e[1]!==C||e[2]!==n?(m=s.jsxs(W,{disabled:C,onClick:n,children:[x,"Create from scratch"]}),e[1]=C,e[2]=n,e[3]=m):m=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ue,{className:"size-3.5"}),e[4]=p):p=e[4];let l;e[5]!==g?(l=g&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"}),e[5]=g,e[6]=l):l=e[6];let f;e[7]!==i||e[8]!==l?(f=s.jsxs(W,{onClick:i,children:[p,"Import from GitHub",l]}),e[7]=i,e[8]=l,e[9]=f):f=e[9];let a;e[10]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),e[10]=a):a=e[10];let r;e[11]!==c?(r=s.jsxs(W,{onClick:c,children:[a,"Import from deco.cx"]}),e[11]=c,e[12]=r):r=e[12];let u;return e[13]!==w||e[14]!==d||e[15]!==m||e[16]!==f||e[17]!==r?(u=s.jsxs(me,{side:d,align:w,className:"w-48",children:[m,f,r]}),e[13]=w,e[14]=d,e[15]=m,e[16]=f,e[17]=r,e[18]=u):u=e[18],u}function st(t){const e=ie.c(45),{project:n,lastUsedAt:i,onDeleteClick:c}=t,C=pe();let y;e[0]!==C||e[1]!==n.id?(y=()=>C(n.id),e[0]=C,e[1]=n.id,e[2]=y):y=e[2];let d;e[3]!==n.title||e[4]!==y?(d=s.jsx("button",{type:"button",onClick:y,className:"absolute inset-0 z-0","aria-label":n.title}),e[3]=n.title,e[4]=y,e[5]=d):d=e[5];let g;e[6]!==n.icon||e[7]!==n.title?(g=s.jsx(Te,{icon:n.icon,name:n.title,size:"sm",className:"shrink-0 shadow-sm"}),e[6]=n.icon,e[7]=n.title,e[8]=g):g=e[8];let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(oe,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx(Ie,{size:20})})}),e[9]=w):w=e[9];let x;e[10]!==C||e[11]!==n.id?(x=()=>C(n.id,{search:{main:"settings"}}),e[10]=C,e[11]=n.id,e[12]=x):x=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(De,{size:16}),e[13]=m):m=e[13];let p;e[14]!==x?(p=s.jsxs(W,{onClick:x,children:[m,"Settings"]}),e[14]=x,e[15]=p):p=e[15];let l;e[16]!==c?(l=c&&s.jsxs(W,{variant:"destructive",onClick:G=>{G.stopPropagation(),c(G)},children:[s.jsx(Ae,{size:16}),"Delete"]}),e[16]=c,e[17]=l):l=e[17];let f;e[18]!==p||e[19]!==l?(f=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(ne,{children:[w,s.jsxs(me,{align:"end",children:[p,l]})]})}),e[18]=p,e[19]=l,e[20]=f):f=e[20];let a;e[21]!==g||e[22]!==f?(a=s.jsxs("div",{className:"flex items-start justify-between",children:[g,f]}),e[21]=g,e[22]=f,e[23]=a):a=e[23];let r;e[24]!==n.title?(r=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[24]=n.title,e[25]=r):r=e[25];const u=n.description||"No description";let I;e[26]!==u?(I=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:u}),e[26]=u,e[27]=I):I=e[27];let D;e[28]!==r||e[29]!==I?(D=s.jsxs("div",{className:"flex flex-col gap-1",children:[r,I]}),e[28]=r,e[29]=I,e[30]=D):D=e[30];let _;e[31]!==a||e[32]!==D?(_=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[a,D]}),e[31]=a,e[32]=D,e[33]=_):_=e[33];let T;e[34]!==i||e[35]!==n.updated_at?(T=i?`Last used ${re(new Date(i),{addSuffix:!0})}`:`Updated ${re(new Date(n.updated_at),{addSuffix:!0})}`,e[34]=i,e[35]=n.updated_at,e[36]=T):T=e[36];let N;e[37]!==T?(N=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:T})})}),e[37]=T,e[38]=N):N=e[38];let k;e[39]!==_||e[40]!==N?(k=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[_,N]}),e[39]=_,e[40]=N,e[41]=k):k=e[41];let S;return e[42]!==k||e[43]!==d?(S=s.jsxs(Le,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[d,k]}),e[42]=k,e[43]=d,e[44]=S):S=e[44],S}const ot="deco-sites";function nt(t){if(!t||typeof t!="object")return null;const e=t.github;if(!e||typeof e!="object")return null;const n=e.owner,i=e.repo;return typeof n!="string"||typeof i!="string"||n.length===0||i.length===0?null:{owner:n,repo:i}}function it(t,e){const n=e?nt(e):null,i=n?.owner??ot,c=n?.repo??t;return{owner:i,name:c,url:`https://github.com/${i}/${c}`}}function rt(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function lt(t){const e=await fetch(`/api/${t}/deco-sites`);if(!e.ok){const n=await e.json().catch(()=>({}));throw new Error(n.error??`Failed to load sites (${e.status})`)}return e.json()}function at({open:t,onOpenChange:e,onBack:n}){const{org:i}=de(),c=pe(),C=fe(),{data:y}=he.useSession(),[d,g]=q.useState(null),[w,x]=q.useState(null),[m,p]=q.useState(""),l=le({connectionId:Me,orgId:i.id,orgSlug:i.slug}),f=ze({slug:"mcp-github"}),a=Ce(f),r=ye({enabled:t&&a.length===0}),u=a.length===1?a[0]??null:w,I=a.length>1&&!u,D=le({connectionId:u?.id??"",orgId:i.id,orgSlug:i.slug}),_=t&&a.length===0&&(r.status==="installing"||r.status==="authenticating"||r.status==="idle"),{data:T,isLoading:N,error:k}=ge({queryKey:te.decoSites(y?.user?.email),queryFn:()=>lt(i.slug),enabled:t&&!!y?.user?.email,staleTime:6e4,retry:!1}),S=T?.sites??[],G=o=>{o||(g(null),x(null),p("")),e(o)},P=S.filter(o=>o.name.toLowerCase().includes(m.toLowerCase())||(o.domains?.[0]?.domain?.toLowerCase().includes(m.toLowerCase())??!1)),R=!d||P.some(o=>o.name===d),O=xe({mutationFn:async o=>{if(!u)throw new Error("GitHub is not connected. Complete GitHub setup and try again.");$("deco_site_import_started",{site_name:o});const{installations:L,appSlug:v}=await $e(b=>l.callTool(b),u.id),E=S.find(b=>b.name===o);if(!E)throw new Error("Selected site is no longer available");const j=it(o,E.metadata),z=He(L,j.owner);if(!z){const b=v?`https://github.com/apps/${v}/installations/new`:"https://github.com/settings/installations";throw new Error(`Install the GitHub App on the "${j.owner}" organization to import this site. ${b}`)}let V=null,F=null,B=null;const J=async()=>{B&&await l.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:B}}).catch(()=>{}),F&&await l.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:F,force:!0}}).catch(()=>{}),V&&await l.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:V,force:!0}}).catch(()=>{})};try{const b=await fetch(`/api/${i.slug}/deco-sites/connection`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:o})}),U=await b.json().catch(()=>({}));if(!b.ok)throw new Error(U.error??`Failed to create connection (${b.status})`);const A=U.connId;if(!A)throw new Error("Server did not return a connection ID");V=A;const{childConnectionId:M}=await we({orgSlug:i.slug,sourceConnection:u,installationId:z.installationId,owner:j.owner,repo:j.name,githubCallTool:ee=>D.callTool(ee),selfCallTool:ee=>l.callTool(ee)});F=M;const H=U.icon??null,K=rt(o),h=o.toLowerCase(),Y=await l.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:o,description:"Imported from deco.cx",pinned:!1,icon:H??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],siteSlug:h,githubRepo:{owner:j.owner,name:j.name,url:j.url,installationId:z.installationId,connectionId:M},ui:{banner:null,bannerColor:"#22C55E",icon:H,themeColor:"#22C55E",slug:K,pinnedViews:[{connectionId:A,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:A,toolName:"get_monitor_data",label:"Monitor",icon:null}],layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:A},{connection_id:M}]}}}),X=Y.structuredContent??Y;if(!X.item?.id)throw new Error("Failed to create the imported agent");return B=X.item.id,{slug:K,virtualMcpId:X.item.id,connId:A,item:X.item}}catch(b){throw await J(),b}},onSuccess:({slug:o,virtualMcpId:L,item:v})=>{$("deco_site_import_succeeded",{site_name:v.title,virtual_mcp_id:L,slug:o}),C.setQueryData(te.collectionItem(l,i.id,"","VIRTUAL_MCP",L),{item:v}),C.invalidateQueries({predicate:E=>{const j=E.queryKey;return j[1]===i.id&&j[3]==="collection"&&j[4]==="VIRTUAL_MCP"}}),C.invalidateQueries({queryKey:te.projects(i.id)}),se.success(`Imported ${o} from deco.cx`),G(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),c(L)},onError:o=>{$("deco_site_import_failed",{error:o instanceof Error?o.message:"Unknown error"}),se.error("Import failed: "+(o instanceof Error?o.message:"Unknown error"))}});return s.jsx(Re,{open:t,onOpenChange:G,children:s.jsxs(Fe,{className:"sm:max-w-[900px] p-0 gap-0 overflow-hidden",children:[s.jsx(Be,{className:"sr-only",children:s.jsx(Ue,{children:"Import from deco.cx"})}),s.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[n&&s.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:s.jsx(Ee,{size:18})}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"})]}),s.jsx("div",{children:s.jsx(Ke,{value:m,onChange:p,placeholder:"Search sites...",onKeyDown:o=>{o.key==="Escape"&&p("")}})}),s.jsxs("div",{className:"pb-0 min-h-[300px]",children:[r.status==="error"&&s.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 h-48 px-8 text-center",children:[s.jsx("p",{className:"text-sm text-destructive",children:r.error??"Failed to connect GitHub"}),s.jsx(Q,{variant:"outline",size:"sm",onClick:r.retry,children:"Retry GitHub setup"})]}),_&&r.status!=="error"&&s.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Setting up GitHub connection..."}),I&&!_&&r.status!=="error"&&s.jsxs("div",{className:"flex flex-col py-2",children:[s.jsx("div",{className:"px-8 py-2",children:s.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a GitHub connection"})}),a.map(o=>s.jsxs("button",{type:"button",onClick:()=>x(o),className:"flex items-center gap-3 px-8 py-3 hover:bg-accent transition-colors text-left",children:[o.icon?s.jsx("img",{src:o.icon,alt:o.title,className:"size-7 rounded-full shrink-0"}):s.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:s.jsx(ue,{className:"size-3.5 text-muted-foreground"})}),s.jsx("span",{className:"text-sm font-medium",children:o.title})]},o.id))]}),N&&!_&&r.status!=="error"&&s.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),!N&&!_&&!I&&r.status!=="error"&&!k&&S.length===0&&s.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),!N&&!_&&!I&&r.status!=="error"&&S.length>0&&s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[P.length===0&&s.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",m,"”"]}),P.map(o=>{const L=o.domains?.find(E=>E.production)?.domain??o.domains?.[0]?.domain,v=d===o.name;return s.jsxs("button",{type:"button",onClick:()=>g(o.name),className:je("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",v?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[s.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:o.thumb_url?s.jsx("img",{src:o.thumb_url,alt:o.name,className:"w-full h-full object-cover",loading:"lazy"}):s.jsx("div",{className:"w-full h-full bg-muted"})}),s.jsxs("div",{className:"px-4 py-3",children:[s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:o.name}),L&&s.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:L})]})]},o.name)})]})]}),s.jsxs(Ve,{className:"px-8 py-5 border-t border-border",children:[s.jsx(Q,{variant:"outline",onClick:()=>G(!1),disabled:O.isPending,children:"Cancel"}),s.jsx(Q,{disabled:!d||!R||O.isPending||N||_||I||!u||r.status==="error",onClick:()=>d&&O.mutate(d),children:O.isPending?"Importing...":"Import"})]})]})})}function Ms(){const t=ie.c(46),{org:e}=de(),n=Ne(),i=Se(),[c,C]=q.useState("");let y;t[0]===Symbol.for("react.memo_cache_sentinel")?(y={navigateOnCreate:!0},t[0]=y):y=t[0];const{createVirtualMCP:d,isCreating:g}=Pe(y),[w,x]=q.useState(null),[m,p]=q.useState(!1),[l,f]=q.useState(!1),{granted:a}=Ge("agents:manage"),r=c.toLowerCase(),u=n.filter(h=>h.id!==e.id&&(h.title.toLowerCase().includes(r)||h.description?.toLowerCase().includes(r))),{data:I}=ve(u.map(ct));let D;t[1]!==i||t[2]!==w?(D=async()=>{if(!w)return;const{id:h,title:Y}=w;x(null);try{await i.delete.mutateAsync(h),$("agent_deleted",{agent_id:h,source:"agents_list"}),se.success(`Deleted "${Y}"`)}catch{}},t[1]=i,t[2]=w,t[3]=D):D=t[3];const _=D,T=Z,N=Z,k=Z;let S;t[4]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Z.Title,{children:"Agents"}),t[4]=S):S=t[4];let G;t[5]===Symbol.for("react.memo_cache_sentinel")?(G=h=>{h.key==="Escape"&&(C(""),h.target.blur())},t[5]=G):G=t[5];let P;t[6]!==c?(P=s.jsx(tt,{value:c,onChange:C,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:G}),t[6]=c,t[7]=P):P=t[7];let R;t[8]!==a||t[9]!==d||t[10]!==g?(R=a&&s.jsxs(ne,{children:[s.jsx(oe,{asChild:!0,children:s.jsxs(Q,{size:"sm",children:[s.jsx(ae,{size:14}),"Create Agent"]})}),s.jsx(ce,{onCreateFromScratch:()=>{$("agent_create_clicked",{source:"agents_list",method:"scratch"}),d()},onImportGitHub:()=>{$("agent_create_clicked",{source:"agents_list",method:"github"}),f(!0)},onImportDeco:()=>{$("agent_create_clicked",{source:"agents_list",method:"deco"}),p(!0)},isCreating:g,align:"end"})]}),t[8]=a,t[9]=d,t[10]=g,t[11]=R):R=t[11];let O;t[12]!==P||t[13]!==R?(O=s.jsxs("div",{className:"flex flex-col gap-6",children:[S,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[P,R]})]}),t[12]=P,t[13]=R,t[14]=O):O=t[14];const o=u.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Oe,{image:s.jsx(ke,{size:48,className:"text-muted-foreground"}),title:c?"No agents found":"No agents yet",description:c?`No agents match "${c}"`:a?"Create an agent to get started.":"Ask an organization admin to create one.",actions:!c&&a&&s.jsxs(ne,{children:[s.jsx(oe,{asChild:!0,children:s.jsxs(Q,{size:"sm",children:[s.jsx(ae,{size:14}),"Create Agent"]})}),s.jsx(ce,{onCreateFromScratch:()=>{$("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),d()},onImportGitHub:()=>{$("agent_create_clicked",{source:"agents_list_empty",method:"github"}),f(!0)},onImportDeco:()=>{$("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),p(!0)},isCreating:g,align:"center",showBetaBadge:!0})]})})}),L=u.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:u.map(h=>s.jsx(st,{project:h,lastUsedAt:I?.get(h.id)?.last_used_at,onDeleteClick:a?()=>x({id:h.id,title:h.title}):void 0},h.id))})]});let v;t[15]!==L||t[16]!==k.Body||t[17]!==O||t[18]!==o?(v=s.jsxs(k.Body,{children:[O,o,L]}),t[15]=L,t[16]=k.Body,t[17]=O,t[18]=o,t[19]=v):v=t[19];let E;t[20]!==v||t[21]!==N.Content?(E=s.jsx(N.Content,{children:v}),t[20]=v,t[21]=N.Content,t[22]=E):E=t[22];let j;t[23]!==l?(j=s.jsx(_e,{open:l,onOpenChange:f}),t[23]=l,t[24]=j):j=t[24];let z;t[25]!==m?(z=s.jsx(at,{open:m,onOpenChange:p}),t[25]=m,t[26]=z):z=t[26];const V=!!w;let F;t[27]===Symbol.for("react.memo_cache_sentinel")?(F=h=>!h&&x(null),t[27]=F):F=t[27];let B;t[28]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(qe,{children:"Delete Agent?"}),t[28]=B):B=t[28];const J=w?.title;let b;t[29]!==J?(b=s.jsxs(Qe,{children:[B,s.jsxs(Je,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:J}),"."]})]}),t[29]=J,t[30]=b):b=t[30];let U;t[31]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(We,{children:"Cancel"}),t[31]=U):U=t[31];let A;t[32]!==_?(A=s.jsxs(Ye,{children:[U,s.jsx(Xe,{onClick:_,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[32]=_,t[33]=A):A=t[33];let M;t[34]!==b||t[35]!==A?(M=s.jsxs(Ze,{children:[b,A]}),t[34]=b,t[35]=A,t[36]=M):M=t[36];let H;t[37]!==V||t[38]!==M?(H=s.jsx(et,{open:V,onOpenChange:F,children:M}),t[37]=V,t[38]=M,t[39]=H):H=t[39];let K;return t[40]!==T||t[41]!==E||t[42]!==j||t[43]!==z||t[44]!==H?(K=s.jsxs(T,{children:[E,j,z,H]}),t[40]=T,t[41]=E,t[42]=j,t[43]=z,t[44]=H,t[45]=K):K=t[45],K}function ct(t){return t.id}export{Ms as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as H,j as t,$ as J,a as ie,p as Y,r as $,ai as q,i as U,d as ee,t as L,dH as ae,K as F,k as le,B as ce,l as V,L as ue,aC as de}from"./index-CZiyq9bL.js";import{c as me,a as fe,d as pe,e as ge}from"./dialog-DCS2OMH4.js";import{C as W}from"./checkbox-CAOM_6bX.js";import{C as xe}from"./collection-search-Dq5OTSM6.js";import{u as he}from"./use-debounced-value-BpYGxCFi.js";import{b as te,u as ye}from"./use-connection-D6vKxP6c.js";import{u as D}from"./use-mcp-client-B3WRhZdt.js";import{W as be,S as ne}from"./constants-B72Xmt_K.js";import{a as se}from"./authenticate-and-persist-oauth-BnshO0o5.js";import{b as oe}from"./Settings02-CO032VQ5.js";import{a7 as we}from"./agent-icon-7Bw2_U9B.js";import{u as Ne}from"./use-mcp-tools-BVxAk373.js";import{e as Ce}from"./extract-connection-data-qlF7ZWrt.js";import{c as je}from"./use-navigate-to-agent-IHN5iTDI.js";import{f as Ie}from"./github-installations-DzN1UQ4x.js";function z(s){const e=H.c(4),{size:n,className:o}=s;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 d;return e[1]!==o||e[2]!==n?(d=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:o,children:l}),e[1]=o,e[2]=n,e[3]=d):d=e[3],d}function Se(s,e){const n=H.c(12),{org:o}=J();let l;n[0]!==o.id?(l=be.REGISTRY(o.id),n[0]=o.id,n[1]=l):l=n[1];const d=l;let f;n[2]!==o.id||n[3]!==o.slug||n[4]!==d?(f={connectionId:d,orgId:o.id,orgSlug:o.slug},n[2]=o.id,n[3]=o.slug,n[4]=d,n[5]=f):f=n[5];const m=D(f);let p;n[6]!==s?(p={name:s},n[6]=s,n[7]=p):p=n[7];const b=e?.enabled??!0;let i;return n[8]!==m||n[9]!==p||n[10]!==b?(i={client:m,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:p,enabled:b,staleTime:3e5,select:ve},n[8]=m,n[9]=p,n[10]=b,n[11]=i):i=n[11],Ne(i)}function ve(s){return s.structuredContent?.item??null}const Ee="deco/mcp-github";function Te(s){const{org:e}=J(),{data:n}=ie.useSession(),o=te(),l=Y(),[d,f]=$.useState("idle"),[m,p]=$.useState(null),[b,i]=$.useState(null),{data:h,isLoading:c}=Se(Ee,{enabled:s.enabled}),g=$.useRef(!1);s.enabled&&h&&!c&&!g.current&&n?.user?.id&&d==="idle"&&(g.current=!0,w());async function w(){if(!(!h||!n?.user?.id||!e))try{f("installing"),p(null);const N=Ce(h,e.id,n.user.id,{remoteIndex:0});if(!N.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:x}=await o.create.mutateAsync(N);f("authenticating");const u=await se({connectionId:x,orgId:e.id,orgSlug:e.slug,persistFallback:a=>o.update.mutateAsync({id:x,data:{connection_token:a}}).then(()=>{})});if(u.ran&&!u.ok){try{await o.delete.mutateAsync(x)}catch{}throw new Error(u.error&&u.error!=="no token received"?u.error:"No token received from GitHub")}q(l,e.id),i(N),f("ready")}catch(N){p(N instanceof Error?N.message:String(N)),f("error")}}function j(){f("idle"),p(null),i(null),g.current=!1}return s.enabled&&c&&d==="idle"?{status:"installing",error:null,connection:null,retry:j}:{status:d,error:m,connection:b,retry:j}}const B=[{key:"auto-respond-to-issues",triggerType:"github.issues.opened",nameSuffix:"auto-respond to issues",label:"Auto-respond to new issues",defaultEnabled:!0,instructions:({owner:s,name:e})=>`A new GitHub issue has been opened in ${s}/${e}. Read the issue, explore relevant code, create a branch, implement the fix, and open a PR referencing the issue number.`},{key:"review-incoming-prs",triggerType:"github.pull_request.opened",nameSuffix:"review incoming PRs",label:"Review incoming pull requests",defaultEnabled:!0,instructions:({owner:s,name:e})=>`A pull request was opened in ${s}/${e}. Read the diff, summarize what changed, flag risks (security, perf, breaking changes), and leave a review comment.`},{key:"note-merged-prs",triggerType:"github.pull_request.closed",nameSuffix:"note merged/closed PRs",label:"Note merged or closed PRs",defaultEnabled:!1,instructions:({owner:s,name:e})=>`A pull request was closed in ${s}/${e}. If it was merged, update changelog/release notes as appropriate.`}];function ke(s,e){const n=new Set;if(s.paramsSchema)for(const l of Object.keys(s.paramsSchema))n.add(l);if(Array.isArray(s.params))for(const l of s.params)n.add(l.name);else if(s.params&&typeof s.params=="object")for(const l of Object.keys(s.params))n.add(l);if(n.has("repo"))return{repo:`${e.owner}/${e.name}`};const o={};return n.has("owner")&&(o.owner=e.owner),n.has("name")&&(o.name=e.name),n.has("repository")&&(o.repository=`${e.owner}/${e.name}`),o}async function _e({githubCallTool:s,selfCallTool:e,virtualMcpId:n,repo:o,connectionId:l,selectedKeys:d}){const f=await s({name:"TRIGGER_LIST",arguments:{}}),m=f.structuredContent??f,p=new Map((m.triggers??[]).map(c=>[c.type,c])),b=B.filter(c=>d.has(c.key)),i=await Promise.allSettled(b.map(async c=>{const g=p.get(c.triggerType);if(!g)throw new Error(`Trigger ${c.triggerType} not exposed`);const w=await e({name:"AUTOMATION_CREATE",arguments:{name:`${o.name}: ${c.nameSuffix}`,virtual_mcp_id:n,messages:c.instructions(o),active:!0}}),j=(w.structuredContent??w).id;if(!j)throw new Error(`AUTOMATION_CREATE returned no id for ${c.key}`);await e({name:"AUTOMATION_TRIGGER_ADD",arguments:{automation_id:j,type:"event",connection_id:l,event_type:c.triggerType,params:ke(g,o)}})})),h=i.filter(c=>c.status==="rejected").length;return h>0&&console.error("Some GitHub automations failed to set up:",i.filter(c=>c.status==="rejected")),{total:i.length,failed:h}}const K={contents:"write",metadata:"read",pull_requests:"write",issues:"write"};function Ae(s){if(!s||typeof s!="object"||Array.isArray(s))return K;const e=s;return Object.values(e).some(n=>typeof n!="string")?K:e}function Re(s){if(!(typeof s!="number"||!Number.isFinite(s)||!Number.isInteger(s)||s<=0))return s}function Oe(s){const e=s.metadata?.repoScope;if(!e||typeof e.installationId!="number"||!Number.isFinite(e.installationId)||!Number.isInteger(e.installationId)||e.installationId<=0||typeof e.owner!="string"||typeof e.repo!="string"||e.owner.length===0||e.repo.length===0)return null;const n=Re(e.repositoryId);return{sourceConnectionId:typeof e.sourceConnectionId=="string"?e.sourceConnectionId:void 0,installationId:e.installationId,repositoryId:n,owner:e.owner,repo:e.repo,permissions:Ae(e.permissions),grantProvider:e.grantProvider==="github-mcp"?"github-mcp":void 0}}function Ge(s){return(s??[]).filter(e=>Oe(e)===null)}const X="GitHub MCP did not return refreshable repo grant metadata";function M(s){if(typeof s!="string")return null;const e=s.trim();return e.length>0?e:null}function Pe(s){try{const e=new URL(s);return(e.protocol==="http:"||e.protocol==="https:")&&!e.username&&!e.password}catch{return!1}}function $e(s){return typeof s=="number"&&Number.isFinite(s)&&Number.isInteger(s)&&s>0?s:void 0}async function Z(s){const{orgSlug:e,sourceConnection:n,installationId:o,owner:l,repo:d,githubCallTool:f,selfCallTool:m,orgShared:p}=s,b=await f({name:"MINT_REPO_TOKEN",arguments:{installationId:o,owner:l,repo:d,permissions:K}}),i=b.structuredContent;if(b.isError||!i?.token){const y=b.content?.find(T=>T.type==="text")?.text;throw new Error(y?`Failed to mint a repo-scoped GitHub token: ${y}`:"Failed to mint a repo-scoped GitHub token")}const h=M(i.refreshToken),c=M(i.tokenEndpoint),g=M(i.clientId);if(!h||!c||!g)throw new Error(X);if(!Pe(c))throw new Error(X);const w=M(i.repository?.owner),j=M(i.repository?.name),N="GitHub MCP returned refresh metadata for a different repository";if(i.repository?.owner!==void 0&&(!w||w.toLowerCase()!==l.toLowerCase()))throw new Error(N);if(i.repository?.name!==void 0&&(!j||j.toLowerCase()!==d.toLowerCase()))throw new Error(N);const C=$e(i.repository?.id),x=i.expiresAt?Date.parse(i.expiresAt):NaN,u=Number.isFinite(x)?Math.max(0,Math.floor((x-Date.now())/1e3)):null,I=(typeof i.expiresIn=="number"&&Number.isFinite(i.expiresIn)&&Number.isInteger(i.expiresIn)&&i.expiresIn>0?i.expiresIn:null)??u,v=await m({name:"COLLECTION_CONNECTIONS_CREATE",arguments:{data:{title:`GitHub: ${l}/${d}`,description:`Repo-scoped GitHub access for ${l}/${d}`,icon:n.icon,app_name:n.app_name,app_id:n.app_id,connection_type:n.connection_type,connection_url:n.connection_url,metadata:{...p?{orgShared:!0}:{},repoScope:{installationId:o,repositoryId:C,owner:l,repo:d,permissions:K,grantProvider:"github-mcp"}}}}}),S=v.structuredContent??v,E=S.item?.id??S.id;if(!E)throw new Error("Failed to create the repo-scoped GitHub connection");if(!(await fetch(`/api/${e}/connections/${E}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:i.token,refreshToken:h,expiresIn:I,scope:i.scope??null,clientId:g,tokenEndpoint:c})})).ok)throw await m({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:E,force:!0}}).catch(()=>{}),new Error("Failed to persist the repo-scoped token");return{childConnectionId:E}}function rt(s){const e=H.c(23),{open:n,onOpenChange:o,title:l,hideAutoRespondCheckbox:d,onImportComplete:f,mode:m}=s,p=d===void 0?!1:d,b=m===void 0?"agent":m,i=l??(b==="connection"?"Add repo":"Import from GitHub"),[h,c]=$.useState(null);let g;e[0]!==i?(g=t.jsx(me,{className:"sr-only",children:t.jsx(fe,{children:i})}),e[0]=i,e[1]=g):g=e[1];let w;e[2]!==i||e[3]!==h?(w=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:h?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(oe,{size:16})}),t.jsx("img",{src:h.avatarUrl,alt:h.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:h.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(z,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:i})]})}),e[2]=i,e[3]=h,e[4]=w):w=e[4];let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(U,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=j):j=e[5];let N;e[6]!==o?(N=()=>o(!1),e[6]=o,e[7]=N):N=e[7];const C=p||b==="connection";let x;e[8]!==b||e[9]!==f||e[10]!==n||e[11]!==h||e[12]!==N||e[13]!==C?(x=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx($.Suspense,{fallback:j,children:t.jsx(He,{open:n,onComplete:N,selectedInstallation:h,onSelectInstallation:c,hideAutoRespondCheckbox:C,onImportComplete:f,mode:b})})}),e[8]=b,e[9]=f,e[10]=n,e[11]=h,e[12]=N,e[13]=C,e[14]=x):x=e[14];let u;e[15]!==g||e[16]!==w||e[17]!==x?(u=t.jsxs(pe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[g,w,x]}),e[15]=g,e[16]=w,e[17]=x,e[18]=u):u=e[18];let a;return e[19]!==o||e[20]!==n||e[21]!==u?(a=t.jsx(ge,{open:n,onOpenChange:o,children:u}),e[19]=o,e[20]=n,e[21]=u,e[22]=a):a=e[22],a}function He({open:s,onComplete:e,selectedInstallation:n,onSelectInstallation:o,hideAutoRespondCheckbox:l,onImportComplete:d,mode:f="agent"}){const{org:m}=J(),p=Y(),b=je(),[i,h]=$.useState(null),[c,g]=$.useState(!0),[w,j]=$.useState(()=>new Set(B.filter(r=>r.defaultEnabled).map(r=>r.key))),N=B.filter(r=>r.defaultEnabled).map(r=>r.key),C=l?new Set(N):c?w:new Set,x=ye({slug:"mcp-github"}),u=Ge(x),a=Te({enabled:s&&u.length===0}),I=u.length===1?u[0]??null:i,v=D({connectionId:I?.id??"",orgId:m.id,orgSlug:m.slug}),S=D({connectionId:ne,orgId:m.id,orgSlug:m.slug}),E=async(r,k)=>{try{const P=await v.callTool({name:"get_file_contents",arguments:{owner:r.owner,repo:r.name,path:k}});if(P.isError)return null;const O=P.content?.find(G=>G.type==="resource")?.resource?.text;if(!O)return null;try{const G=JSON.parse(O);return typeof G=="string"?G:JSON.stringify(G)}catch{return O}}catch{return null}},_=(r,k)=>{Promise.all([E(k,"AGENTS.md"),E(k,"CLAUDE.md")]).then(async([A,P])=>{const R=A??P??null;R&&(await S.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:r,data:{metadata:{instructions:R}}}}),q(p,m.id))}).catch(A=>{console.error("GitHub instructions fetch failed:",A)})},y=async({virtualMcpId:r,repo:k,connectionId:A,selectedKeys:P})=>{const{total:R,failed:O}=await _e({githubCallTool:G=>v.callTool(G),selfCallTool:G=>S.callTool(G),virtualMcpId:r,repo:k,connectionId:A,selectedKeys:P});O>0&&L.warning(`Set up ${R-O}/${R} GitHub automations. Add the rest from the automations view.`)},T=ee({mutationFn:async r=>{if(!I||!n)throw new Error("No GitHub connection or installation");const k=n.installationId;if(f==="connection"){const{childConnectionId:R}=await Z({orgSlug:m.slug,sourceConnection:I,installationId:k,owner:r.owner,repo:r.name,githubCallTool:O=>v.callTool(O),selfCallTool:O=>S.callTool(O),orgShared:!0});return{virtualMcpId:null,repo:r,connectionId:R,item:null}}const{childConnectionId:A}=await Z({orgSlug:m.slug,sourceConnection:I,installationId:k,owner:r.owner,repo:r.name,githubCallTool:R=>v.callTool(R),selfCallTool:R=>S.callTool(R)});let P=null;try{const R=await S.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:r.name,description:r.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:r.owner,name:r.name,url:r.url,installationId:k,connectionId:A},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:A}]}}}),O=R.structuredContent??R,G=O.item?.id;if(!O.item||!G)throw new Error("Failed to create the imported agent");return P=G,C.size>0&&await y({virtualMcpId:G,repo:r,connectionId:A,selectedKeys:C}).catch(re=>{console.error("Failed to set up GitHub automations:",re),L.warning("Imported repo, but failed to set up GitHub automations. You can add triggers manually from the automations view.")}),{virtualMcpId:G,repo:r,connectionId:A,item:O.item}}catch(R){throw P&&await S.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:P}}).catch(()=>{}),await S.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:A,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:r,repo:k,connectionId:A,item:P})=>{if(f==="connection"||!r||!P){q(p,m.id),ae(p,m.id),L.success(`Added ${k.name}`),e();return}if(p.setQueryData(F.collectionItem(S,m.id,"","VIRTUAL_MCP",r),{item:P}),q(p,m.id),_(r,k),d){d({virtualMcpId:r,repo:k,connectionId:A});return}L.success(`Imported ${k.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),b(r)},onError:r=>{L.error("Failed to import repo: "+(r instanceof Error?r.message:"Unknown error"))}});return a.status==="installing"||a.status==="authenticating"?t.jsx(Q,{status:a.status,error:null,retry:a.retry}):a.status==="error"?t.jsx(Q,{status:"error",error:a.error,retry:a.retry}):u.length===0&&a.status==="idle"?t.jsx(Q,{status:"installing",error:null,retry:a.retry}):u.length>1&&!I?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"})}),u.map(r=>t.jsxs("button",{type:"button",onClick:()=>h(r),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[r.icon?t.jsx("img",{src:r.icon,alt:r.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(z,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:r.title})]},r.id))]}):I?n?t.jsx(Fe,{connectionId:I.id,orgId:m.id,orgSlug:m.slug,installation:n,onSelectRepo:r=>T.mutate(r),isSaving:T.isPending,autoRespondEnabled:c,onAutoRespondChange:g,selectedAutomationKeys:w,onAutomationKeysChange:j,hideAutoRespondCheckbox:l}):t.jsx(Le,{connectionId:I.id,orgId:m.id,orgSlug:m.slug,onSelect:o,showBackButton:u.length>1,onBack:()=>h(null)}):null}function Le(s){const e=H.c(47),{connectionId:n,orgId:o,orgSlug:l,onSelect:d,showBackButton:f,onBack:m}=s;let p;e[0]!==o||e[1]!==l?(p={connectionId:ne,orgId:o,orgSlug:l},e[0]=o,e[1]=l,e[2]=p):p=e[2];const b=D(p),i=Y(),h=te();let c;e[3]!==n||e[4]!==o?(c=F.githubUserOrgs(o,n),e[3]=n,e[4]=o,e[5]=c):c=e[5];let g;e[6]!==n||e[7]!==b?(g=()=>Ie(y=>b.callTool(y),n),e[6]=n,e[7]=b,e[8]=g):g=e[8];let w;e[9]!==c||e[10]!==g?(w={queryKey:c,queryFn:g},e[9]=c,e[10]=g,e[11]=w):w=e[11];const j=le(w);let N;e[12]!==h||e[13]!==n||e[14]!==j||e[15]!==o||e[16]!==l||e[17]!==i?(N={mutationFn:async()=>{const y=await se({connectionId:n,orgId:o,orgSlug:l,persistFallback:r=>h.update.mutateAsync({id:n,data:{connection_token:r}}).then(Me)});if(y.ran&&!y.ok)throw new Error(y.error??"no token received");const T=new URL(`/api/${l}/mcp/${n}`,window.location.origin);await i.invalidateQueries({queryKey:F.isMCPAuthenticated(T.href,null)}),await i.invalidateQueries({queryKey:F.mcpClientPrefix()}),await j.refetch()},onError:ze},e[12]=h,e[13]=n,e[14]=j,e[15]=o,e[16]=l,e[17]=i,e[18]=N):N=e[18];const C=ee(N);if(j.isLoading){let y;return e[19]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(U,{size:18,className:"animate-spin text-muted-foreground"})}),e[19]=y):y=e[19],y}if(j.isError){let y,T;e[20]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"}),T=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:"Your GitHub connection may have expired. Reconnect to restore access."}),e[20]=y,e[21]=T):(y=e[20],T=e[21]);let r;e[22]!==C?(r=()=>C.mutate(),e[22]=C,e[23]=r):r=e[23];let k;e[24]!==C.isPending?(k=C.isPending?t.jsx(U,{size:14,className:"animate-spin"}):t.jsx(z,{className:"size-3.5"}),e[24]=C.isPending,e[25]=k):k=e[25];let A;return e[26]!==C.isPending||e[27]!==r||e[28]!==k?(A=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[y,T,t.jsxs(ce,{type:"button",variant:"outline",size:"sm",onClick:r,disabled:C.isPending,children:[k,"Reconnect GitHub"]})]}),e[26]=C.isPending,e[27]=r,e[28]=k,e[29]=A):A=e[29],A}const x=j.data;if(!x)return null;let u;e[30]!==m||e[31]!==f?(u=f&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(oe,{size:12}),"Change connection"]})}),e[30]=m,e[31]=f,e[32]=u):u=e[32];let a;if(e[33]!==x.installations||e[34]!==d){let y;e[36]!==d?(y=T=>t.jsxs("button",{type:"button",onClick:()=>d(T),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:T.avatarUrl,alt:T.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:T.login}),T.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 →"})]},T.installationId),e[36]=d,e[37]=y):y=e[37],a=x.installations.map(y),e[33]=x.installations,e[34]=d,e[35]=a}else a=e[35];let I;e[38]!==a?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:a}),e[38]=a,e[39]=I):I=e[39];const v=x.appSlug?`https://github.com/apps/${x.appSlug}/installations/new`:"https://github.com/settings/installations";let S;e[40]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[40]=S):S=e[40];let E;e[41]!==v?(E=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",S]})}),e[41]=v,e[42]=E):E=e[42];let _;return e[43]!==E||e[44]!==u||e[45]!==I?(_=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[u,I,E]}),e[43]=E,e[44]=u,e[45]=I,e[46]=_):_=e[46],_}function ze(s){L.error("Failed to reconnect GitHub: "+(s instanceof Error?s.message:"Unknown error"))}function Me(){}function Fe(s){const e=H.c(27),{connectionId:n,orgId:o,orgSlug:l,installation:d,onSelectRepo:f,isSaving:m,autoRespondEnabled:p,onAutoRespondChange:b,selectedAutomationKeys:i,onAutomationKeysChange:h,hideAutoRespondCheckbox:c}=s,[g,w]=$.useState(""),j=he(g,300),N=$.useDeferredValue(j),C=g!==N;let x;e[0]!==C||e[1]!==g?(x=t.jsx(xe,{placeholder:"Search repositories...",value:g,onChange:w,isSearching:C}),e[0]=C,e[1]=g,e[2]=x):x=e[2];const u=C?"opacity-40":"opacity-100";let a;e[3]!==u?(a=V("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",u),e[3]=u,e[4]=a):a=e[4];let I;e[5]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(U,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=I):I=e[5];let v;e[6]!==n||e[7]!==N||e[8]!==d||e[9]!==m||e[10]!==f||e[11]!==o||e[12]!==l?(v=t.jsx($.Suspense,{fallback:I,children:t.jsx(Ue,{connectionId:n,orgId:o,orgSlug:l,installation:d,query:N,onSelectRepo:f,isSaving:m})}),e[6]=n,e[7]=N,e[8]=d,e[9]=m,e[10]=f,e[11]=o,e[12]=l,e[13]=v):v=e[13];let S;e[14]!==a||e[15]!==v?(S=t.jsx("div",{className:a,children:v}),e[14]=a,e[15]=v,e[16]=S):S=e[16];let E;e[17]!==p||e[18]!==c||e[19]!==b||e[20]!==h||e[21]!==i?(E=!c&&t.jsxs("div",{className:"border-t border-border shrink-0",children:[t.jsxs("label",{className:"flex items-center gap-2 px-4 py-3 cursor-pointer select-none",children:[t.jsx(W,{checked:p,onCheckedChange:y=>b(y===!0)}),t.jsx("span",{className:"text-xs text-foreground",children:"Set up GitHub automations for this repo"})]}),p&&t.jsx("div",{className:"px-4 pb-3 pl-9 flex flex-col gap-1.5",children:B.map(y=>t.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[t.jsx(W,{checked:i.has(y.key),onCheckedChange:T=>{const r=new Set(i);T===!0?r.add(y.key):r.delete(y.key),h(r)}}),t.jsx("span",{className:"text-xs text-muted-foreground",children:y.label})]},y.key))})]}),e[17]=p,e[18]=c,e[19]=b,e[20]=h,e[21]=i,e[22]=E):E=e[22];let _;return e[23]!==x||e[24]!==S||e[25]!==E?(_=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[x,S,E]}),e[23]=x,e[24]=S,e[25]=E,e[26]=_):_=e[26],_}function Ue(s){const e=H.c(29),{connectionId:n,orgId:o,orgSlug:l,installation:d,query:f,onSelectRepo:m,isSaving:p}=s;let b;e[0]!==n||e[1]!==o||e[2]!==l?(b={connectionId:n,orgId:o,orgSlug:l},e[0]=n,e[1]=o,e[2]=l,e[3]=b):b=e[3];const i=D(b),h=d.type==="User"?"user":"org",c=f?`${h}:${d.login} ${f} in:name`:`${h}:${d.login}`;let g;e[4]!==n||e[5]!==d.login||e[6]!==o||e[7]!==f?(g=F.githubOrgRepos(o,n,d.login,f),e[4]=n,e[5]=d.login,e[6]=o,e[7]=f,e[8]=g):g=e[8];let w;e[9]!==i||e[10]!==c?(w=async u=>{const{signal:a}=u,v=(await i.callTool({name:"search_repositories",arguments:{query:c,page:1,perPage:30}},void 0,{signal:a})).content?.[0]?.text;if(!v)throw new Error("No response from search_repositories");return(JSON.parse(v).items??[]).map(De)},e[9]=i,e[10]=c,e[11]=w):w=e[11];let j;e[12]!==g||e[13]!==w?(j={queryKey:g,queryFn:w},e[12]=g,e[13]=w,e[14]=j):j=e[14];const{data:N}=ue(j);if(N.length===0){let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=u):u=e[15];let a;e[16]!==f?(a=f&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=f,e[17]=a):a=e[17];let I;return e[18]!==a?(I=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[u,a]}),e[18]=a,e[19]=I):I=e[19],I}let C;if(e[20]!==p||e[21]!==m||e[22]!==N){let u;e[24]!==p||e[25]!==m?(u=a=>t.jsxs("button",{type:"button",onClick:()=>m(a),disabled:p,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(z,{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:a.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:[a.private?t.jsx(de,{size:10}):t.jsx(we,{size:10}),a.private?"Private":"Public"]})]},a.fullName),e[24]=p,e[25]=m,e[26]=u):u=e[26],C=N.map(u),e[20]=p,e[21]=m,e[22]=N,e[23]=C}else C=e[23];let x;return e[27]!==C?(x=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:C}),e[27]=C,e[28]=x):x=e[28],x}function De(s){return{name:s.name,fullName:s.full_name,owner:s.full_name.split("/")[0]??"",url:s.html_url,private:s.private,description:s.description,updatedAt:s.updated_at}}function Q(s){const e=H.c(33),{status:n,error:o,retry:l}=s;if(n==="error"){let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(z,{className:"size-5 text-destructive"})}),e[0]=v):v=e[0];let S;e[1]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=S):S=e[1];const E=o??"Something went wrong while connecting to GitHub.";let _;e[2]!==E?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[S,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:E})]}),e[2]=E,e[3]=_):_=e[3];let y;e[4]!==l?(y=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]=y):y=e[5];let T;return e[6]!==_||e[7]!==y?(T=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[v,_,y]}),e[6]=_,e[7]=y,e[8]=T):T=e[8],T}const d=n==="authenticating";let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(z,{className:"size-5 text-foreground"})}),e[9]=f):f=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"relative size-10",children:[f,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(U,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=m):m=e[10];const p=d?"Authenticating with GitHub":"Setting up GitHub";let b;e[11]!==p?(b=t.jsx("p",{className:"text-sm font-medium",children:p}),e[11]=p,e[12]=b):b=e[12];const i=d?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let h;e[13]!==i?(h=t.jsx("p",{className:"text-xs text-muted-foreground",children:i}),e[13]=i,e[14]=h):h=e[14];let c;e[15]!==b||e[16]!==h?(c=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[b,h]}),e[15]=b,e[16]=h,e[17]=c):c=e[17];const g=d?"bg-muted-foreground/30":"bg-foreground animate-pulse";let w;e[18]!==g?(w=V("size-1.5 rounded-full",g),e[18]=g,e[19]=w):w=e[19];let j;e[20]!==w?(j=t.jsx("span",{className:w}),e[20]=w,e[21]=j):j=e[21];const N=d?"bg-foreground animate-pulse":"bg-muted-foreground/30";let C;e[22]!==N?(C=V("size-1.5 rounded-full",N),e[22]=N,e[23]=C):C=e[23];let x;e[24]!==C?(x=t.jsx("span",{className:C}),e[24]=C,e[25]=x):x=e[25];let u;e[26]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=u):u=e[26];let a;e[27]!==j||e[28]!==x?(a=t.jsxs("div",{className:"flex items-center gap-1.5",children:[j,x,u]}),e[27]=j,e[28]=x,e[29]=a):a=e[29];let I;return e[30]!==a||e[31]!==c?(I=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[m,c,a]}),e[30]=a,e[31]=c,e[32]=I):I=e[32],I}export{rt as G,z as a,Ge as g,Z as p,Te as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as $,j as s,Y as He,r as E,l as F,M as oe,Z as bs,_ as js,a as he,$ as se,b as xe,a0 as vs,a1 as ys,t as re,a2 as Ss,a3 as Ns,K as _s,k as Cs,a4 as ws,i as Lt,e as lt,u as rt,P as Rt,G as ks,H as As,I as Is,J as zs,d as $s,B as Je,a5 as Ts,T as Ms,U as Os,a6 as Ps,X as Ds,a7 as Fs}from"./index-CZiyq9bL.js";import{u as pe,S as ot,a as at,b as ae,c as J,d as K,e as Bt,f as Ht,g as Es,h as Ls,i as Ze,j as Rs,k as Bs,l as Hs}from"./sidebar-Dvoriw7V.js";import{u as ct}from"./use-mobile-Cpcc36Em.js";import{S as te}from"./skeleton-Ky3jBeUP.js";import{i as Gt}from"./LayoutLeft-Lv2ZhZwN.js";import{T as ve}from"./toolbar-icon-button-CD0nzSrw.js";import{P as Ge,a as ze,b as Ue}from"./popover-BtkVBk9O.js";import{D as Ut,a as Wt,b as qt}from"./drawer-3OE7N_2G.js";import{A as Le}from"./avatar-Btcoxp_w.js";import{a as ce,b as de,c as et,T as me}from"./tooltip-BvZsaZo1.js";import{a as gt}from"./Copy01-Dn74k5DV.js";import{n as Gs,i as Us}from"./Globe01-DCyvmziv.js";import{i as Ws}from"./ZoomOut-Z_A5DKtk.js";import{i as qs,a as Ks}from"./ZapSquare-BXCU0Zkc.js";import{i as tt}from"./Monitor01-Dj7mHFbg.js";import{n as Xs,a as Vs}from"./Sun-CZYFQMTR.js";import{a as dt}from"./Settings02-CO032VQ5.js";import{i as Ys}from"./Shield01-BOKAaJ_3.js";import{a as Qs}from"./Users03-BgboQghl.js";import{a as bt,b as jt,c as Js,d as Zs,A as ye,e as vt,i as en,s as tn,f as sn}from"./agent-icon-7Bw2_U9B.js";import"./index-Jx11C7Wo.js";import{I as nn}from"./invite-member-dialog-BaE04Tgl.js";import{u as ln,A as rn,g as on,a as an,b as Kt}from"./agent-capabilities-Bbkrqncd.js";import{u as cn,v as dn,C as yt}from"./connect-desktop-dialog-B05P9T9A.js";import{i as mn}from"./FilterLines-BmSHEouM.js";import{T as un,a as fn}from"./toggle-group-Dh7bEZa1.js";import{u as hn}from"./use-mcp-client-B3WRhZdt.js";import{S as xn,a as Re,i as pn,b as gn}from"./constants-B72Xmt_K.js";import{u as mt,a as Xt}from"./use-virtual-mcp-vpIsUoOg.js";import{u as bn,a as ut,b as Vt,T as jn}from"./hooks-BQcGIBer.js";import{u as ft,r as vn}from"./shell-layout-DzGqfR6q.js";import{c as yn,a as Sn,b as Nn,d as _n,e as Cn}from"./dialog-DCS2OMH4.js";import{C as wn,a as kn,b as An,c as In,d as zn}from"./command-CzaPqse4.js";import{u as Yt}from"./studio-tools-rhnNh1x_.js";import{i as Qt}from"./Zap-dPP-v905.js";import{S as Jt,M as $n}from"./shell-controls--WEatP4X.js";import{n as Tn}from"./Stars02-RAKDMyiv.js";import{g as Mn,u as On,S as Pn}from"./use-clock-tick-Co2laZ_v.js";import{f as Dn}from"./format-time-Cy7tTmZp.js";import{t as ht}from"./ChevronDown-Ds93wwRe.js";import{i as Fn}from"./ChevronRight-BUqzT2AZ.js";import{S as Zt,u as En,g as Ln,a as Rn,b as Bn}from"./use-navigate-to-agent-IHN5iTDI.js";import{S as Hn,C as Gn}from"./chat-context-CSDQ2V59.js";import{B as St,a as Un,b as Wn}from"./breadcrumb-C8UiQMDq.js";import{i as es}from"./Check-ByMMRPdN.js";import{s as $e}from"./Plus-BdYdKkzh.js";import{i as ts}from"./SearchMd-CIebSZD2.js";import{s as qn}from"./XClose-CAJh-urJ.js";import{A as Kn,a as Xn,b as Vn,c as Yn,d as Qn,e as Jn,f as Zn}from"./alert-dialog-Byb-84-w.js";import{F as ei,a as ti,b as si,c as ni,d as ii,f as li,e as ri}from"./form-TXHpDJV5.js";import{I as oi}from"./input-DnW5bl5u.js";import{G as ai,a as ci}from"./github-repo-picker-ks7lf0Ye.js";import{f as di}from"./reusable-new-chat-qqWu133U.js";import{T as Q}from"./toolbar-BR5ie4nh.js";import{u as mi}from"./use-organization-settings-D6NjaCfk.js";import"./X-BsHMY5bm.js";import"./User01-CJUJXUar.js";import"./AlertCircle-BQoAJ7Pc.js";import"./Tool01-BjsyNNOX.js";import"./SwitchHorizontal01-ypxOAaEV.js";import"./XCircle-C_yScwcR.js";import"./ArrowUpRight-CfcRtZ8o.js";import"./Loading02-Br4Qsbis.js";import"./CheckCircle-uSDvDj68.js";import"./ChevronUp-hSMVM7_9.js";import"./Circle-CIBa1C-R.js";import"./DotsVertical-OqISO6nN.js";import"./Eye-DMTaYgfE.js";import"./Star01-BEjXt6EU.js";import"./Globe04-iXXVu6cY.js";import"./HardDrive-BOMqphCJ.js";import"./Key01-CyxwtgAw.js";import"./LinkExternal01-CqYi3PbY.js";import"./List-CjQLqVV2.js";import"./Palette-CYfpdldc.js";import"./Play-Ct1jkZWO.js";import"./SearchLg-BKceB_7Q.js";import"./Stars01-CCdr3QPh.js";import"./Trash01-CkdTj_48.js";import"./Upload01-pwMs2gu0.js";import"./Users01-DXfhOPWM.js";import"./select-BloW6tH6.js";import"./textarea-ByYUJCqn.js";import"./use-org-auth-client-C3YxdmcM.js";import"./use-organization-roles--3C-OX-U.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-uIsG5TxJ.js";import"./use-registry-connections-Cs9PospA.js";import"./use-connection-D6vKxP6c.js";import"./use-collections-0y8z6h6B.js";import"./useInfiniteQuery-oZPFa0FQ.js";import"./use-infinite-scroll-CAwsvAnT.js";import"./extract-connection-data-qlF7ZWrt.js";import"./card-DhyAaYbH.js";import"./integration-icon-BSkS97aB.js";import"./collection-search-Dq5OTSM6.js";import"./collection-tabs-C-L6t4af.js";import"./badge-Be_N2FuK.js";import"./connection-form-helpers-BEcWB5x3.js";import"./authenticate-and-persist-oauth-BnshO0o5.js";import"./mcp-oauth-B6n4lY5H.js";import"./auth-B4QHxlg3.js";import"./useSuspenseInfiniteQuery-fOtFcKQk.js";import"./use-ai-providers-Df_6Lv76.js";import"./decopilot-sse-pool-C_JJ7Vcr.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./tab-id-C4S0EPFu.js";import"./required-auth-layout-DGg5Hfsv.js";import"./autosend-DQZl8KyP.js";import"./use-org-sso-reL-KJxj.js";import"./index-DBpZEK7p.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-decopilot-events-DepdMgPX.js";import"./label-DeNhnW1K.js";import"./checkbox-CAOM_6bX.js";import"./use-debounced-value-BpYGxCFi.js";import"./use-mcp-tools-BVxAk373.js";import"./github-installations-DzN1UQ4x.js";function ui(t){const e=$.c(5),{onPointerDown:n,onDoubleClick:l}=t,{state:i,isMobile:r}=pe();if(r||i==="collapsed")return null;let a,o;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={left:"var(--sidebar-width)"},o=s.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"}),e[0]=a,e[1]=o):(a=e[0],o=e[1]);let d;return e[2]!==l||e[3]!==n?(d=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:n,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:a,children:o}),e[2]=l,e[3]=n,e[4]=d):d=e[4],d}const xt=240,fi=400,hi="sidebar.width";function Te(t){return Math.max(xt,Math.min(fi,t))}function xi(){const t=$.c(11),[e,n]=He(hi,pi),l=E.useRef(null);let i;t[0]!==n||t[1]!==e?(i=m=>{m.preventDefault();const u=m.clientX,f=Te(e),h=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),g=h?Array.from(h.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const p of g)p.style.transition="none";const j=p=>{const b=Te(f+(p.clientX-u));h?.style.setProperty("--sidebar-width",`${b}px`)},x=p=>{const b=Te(f+(p.clientX-u));n(b);for(const v of g)v.style.transition="";window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",x),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",x)},t[0]=n,t[1]=e,t[2]=i):i=t[2];const r=i;let a;t[3]!==n?(a=()=>{n(xt)},t[3]=n,t[4]=a):a=t[4];const o=a;let d;t[5]!==e?(d=Te(e),t[5]=e,t[6]=d):d=t[6];let c;return t[7]!==r||t[8]!==o||t[9]!==d?(c={width:d,wrapperRef:l,onStartResize:r,resetWidth:o},t[7]=r,t[8]=o,t[9]=d,t[10]=c):c=t[10],c}function pi(t){return typeof t=="number"?Te(t):xt}function ss(){return[]}function ns(t){const e=$.c(3),{children:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=l):l=e[0];let i;return e[1]!==n?(i=s.jsxs(ot,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[l,s.jsx(at,{children:s.jsx(ae,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=i):i=e[2],i}function is(t){const e=$.c(18),{item:n}=t,{isMobile:l,setOpenMobile:i}=pe();let r;e[0]!==l||e[1]!==n||e[2]!==i?(r=()=>{oe("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:l}),n.onClick?.(),l&&i(!1)},e[0]=l,e[1]=n,e[2]=i,e[3]=r):r=e[3];const a=r,o=n.key,d=n.isActive&&"z-10";let c;e[4]!==d?(c=F(d),e[4]=d,e[5]=c):c=e[5];let m;e[6]!==n.label?(m=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=m):m=e[7];let u;e[8]!==a||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==m?(u=s.jsxs(J,{onClick:a,isActive:n.isActive,tooltip:n.label,children:[n.icon,m]}),e[8]=a,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=m,e[13]=u):u=e[13];let f;return e[14]!==n.key||e[15]!==c||e[16]!==u?(f=s.jsx(K,{className:c,children:u},o),e[14]=n.key,e[15]=c,e[16]=u,e[17]=f):f=e[17],f}function gi(t){const e=$.c(12),{section:n}=t;switch(n.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Bt,{className:"my-2"}),e[0]=l):l=e[0],l}case"spacer":{let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1"}),e[1]=l):l=e[1],l}case"group":{const l=n.group.label,i=n.group.defaultExpanded;let r;e[2]!==n.group.items?(r=n.group.items.map(ji),e[2]=n.group.items,e[3]=r):r=e[3];let a;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==r?(a=s.jsx(ns,{label:l,defaultExpanded:i,children:r}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=r,e[7]=a):a=e[7],a}case"items":{let l;e[8]!==n.items?(l=n.items.map(bi),e[8]=n.items,e[9]=l):l=e[9];let i;return e[10]!==l?(i=s.jsx(ot,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(at,{children:s.jsx(ae,{className:"gap-1.5",children:l})})}),e[10]=l,e[11]=i):i=e[11],i}case"custom":return n.content}}function bi(t){return s.jsx(is,{item:t},t.key)}function ji(t){return s.jsx(is,{item:t},t.key)}function vi(t){const e=$.c(14),{sections:n,footer:l,additionalContent:i,variant:r,contentClassName:a}=t,o=r===void 0?"sidebar":r;let d;e[0]!==a?(d=F("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[0]=a,e[1]=d):d=e[1];let c;e[2]!==n?(c=n.map(yi),e[2]=n,e[3]=c):c=e[3];let m;e[4]!==i?(m=i&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:i}),e[4]=i,e[5]=m):m=e[5];let u;e[6]!==d||e[7]!==c||e[8]!==m?(u=s.jsxs(Ht,{className:d,children:[c,m]}),e[6]=d,e[7]=c,e[8]=m,e[9]=u):u=e[9];let f;return e[10]!==l||e[11]!==u||e[12]!==o?(f=s.jsxs(Es,{variant:o,children:[u,l]}),e[10]=l,e[11]=u,e[12]=o,e[13]=f):f=e[13],f}function yi(t,e){return s.jsx(gi,{section:t},e)}function ls(t){const e=$.c(2);let n;return e[0]!==t?(n=s.jsx(vi,{...t}),e[0]=t,e[1]=n):n=e[1],n}ls.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(te,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function Si(t){const e=$.c(16),{onToggle:n,className:l}=t,r=bs().logo??js,a=typeof r=="string"?r:r.light,o=typeof r=="string"?r:r.dark;let d;e[0]!==l?(d=F("flex flex-row items-center gap-2 md:gap-0.5 shrink-0 h-12 pl-1 pr-2 pt-0.25 pb-0","group-data-[collapsible=icon]/sidebar:hidden",l),e[0]=l,e[1]=d):d=e[1];let c;e[2]!==a?(c=s.jsx("img",{src:a,alt:"Logo",className:"size-6 object-contain dark:hidden"}),e[2]=a,e[3]=c):c=e[3];let m;e[4]!==o?(m=s.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),e[4]=o,e[5]=m):m=e[5];let u;e[6]!==c||e[7]!==m?(u=s.jsx("span",{className:"flex items-center shrink-0 pl-1",children:s.jsxs("span",{className:"flex items-center shrink-0 px-2",children:[c,m]})}),e[6]=c,e[7]=m,e[8]=u):u=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Gt,{size:16}),e[9]=f):f=e[9];let h;e[10]!==n?(h=s.jsx(ve,{onClick:n,"aria-label":"Toggle sidebar",children:f}),e[10]=n,e[11]=h):h=e[11];let g;return e[12]!==d||e[13]!==u||e[14]!==h?(g=s.jsxs(Ls,{className:d,children:[u,h]}),e[12]=d,e[13]=u,e[14]=h,e[15]=g):g=e[15],g}function Nt(t){const e=$.c(18),{item:n,onClose:l}=t,i=n.isActive&&"z-10";let r;e[0]!==i?(r=F(i),e[0]=i,e[1]=r):r=e[1];let a;e[2]!==n||e[3]!==l?(a=()=>{n.onClick?.(),l()},e[2]=n,e[3]=l,e[4]=a):a=e[4];let o;e[5]!==n.icon?(o=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=o):o=e[6];let d;e[7]!==n.label?(d=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=d):d=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==a||e[12]!==o||e[13]!==d?(c=s.jsxs(J,{onClick:a,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[o,d]}),e[9]=n.isActive,e[10]=n.label,e[11]=a,e[12]=o,e[13]=d,e[14]=c):c=e[14];let m;return e[15]!==r||e[16]!==c?(m=s.jsx(K,{className:r,children:c}),e[15]=r,e[16]=c,e[17]=m):m=e[17],m}function Ni(t){const e=$.c(18),{section:n,onClose:l}=t;switch(n.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Bt,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=n.group.label,r=n.group.defaultExpanded;let a;if(e[2]!==l||e[3]!==n.group.items){let d;e[5]!==l?(d=c=>s.jsx(Nt,{item:c,onClose:l},c.key),e[5]=l,e[6]=d):d=e[6],a=n.group.items.map(d),e[2]=l,e[3]=n.group.items,e[4]=a}else a=e[4];let o;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==a?(o=s.jsx(ns,{label:i,defaultExpanded:r,children:a}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=a,e[10]=o):o=e[10],o}case"items":{let i;if(e[11]!==l||e[12]!==n.items){let a;e[14]!==l?(a=o=>s.jsx(Nt,{item:o,onClose:l},o.key),e[14]=l,e[15]=a):a=e[15],i=n.items.map(a),e[11]=l,e[12]=n.items,e[13]=i}else i=e[13];let r;return e[16]!==i?(r=s.jsx(ot,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(at,{children:s.jsx(ae,{className:"gap-1.5",children:i})})}),e[16]=i,e[17]=r):r=e[17],r}case"custom":return n.content}}function _i(t){const e=$.c(17),{sections:n,onClose:l,footer:i,additionalContent:r}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"h-12 shrink-0"}),e[0]=a):a=e[0];let o;e[1]!==l?(o=s.jsx(E.Suspense,{fallback:a,children:s.jsx(Si,{onToggle:l})}),e[1]=l,e[2]=o):o=e[2];let d;if(e[3]!==l||e[4]!==n){let f;e[6]!==l?(f=(h,g)=>s.jsx(Ni,{section:h,onClose:l},g),e[6]=l,e[7]=f):f=e[7],d=n.map(f),e[3]=l,e[4]=n,e[5]=d}else d=e[5];let c;e[8]!==r?(c=r&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:r}),e[8]=r,e[9]=c):c=e[9];let m;e[10]!==d||e[11]!==c?(m=s.jsxs(Ht,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[d,c]}),e[10]=d,e[11]=c,e[12]=m):m=e[12];let u;return e[13]!==i||e[14]!==o||e[15]!==m?(u=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[o,m,i]}),e[13]=i,e[14]=o,e[15]=m,e[16]=u):u=e[16],u}function De(t){const e=$.c(22),{item:n,onClose:l}=t;if(n.href){const d=n.external?"_blank":void 0,c=n.external?"noopener noreferrer":void 0;let m;e[0]!==n.icon?(m=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[0]=n.icon,e[1]=m):m=e[1];let u;e[2]!==n.label?(u=s.jsx("span",{className:"flex-1",children:n.label}),e[2]=n.label,e[3]=u):u=e[3];let f;return e[4]!==n.href||e[5]!==l||e[6]!==d||e[7]!==c||e[8]!==m||e[9]!==u?(f=s.jsxs("a",{href:n.href,target:d,rel:c,className:"flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",onClick:l,children:[m,u]}),e[4]=n.href,e[5]=l,e[6]=d,e[7]=c,e[8]=m,e[9]=u,e[10]=f):f=e[10],f}let i;e[11]!==n||e[12]!==l?(i=()=>{n.onClick?.(),l()},e[11]=n,e[12]=l,e[13]=i):i=e[13];let r;e[14]!==n.icon?(r=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[14]=n.icon,e[15]=r):r=e[15];let a;e[16]!==n.label?(a=s.jsx("span",{className:"flex-1",children:n.label}),e[16]=n.label,e[17]=a):a=e[17];let o;return e[18]!==i||e[19]!==r||e[20]!==a?(o=s.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",children:[r,a]}),e[18]=i,e[19]=r,e[20]=a,e[21]=o):o=e[21],o}function _t(t){const e=$.c(126),{user:n,userImage:l,menuItems:i,signOutItem:r,themeOptions:a,preferences:o,setPreferences:d,close:c,isMobile:m}=t;if(m){const U=n?.name??"U";let q;e[0]!==U||e[1]!==l?(q=s.jsx(Le,{url:l,fallback:U,shape:"circle",size:"sm",className:"shrink-0"}),e[0]=U,e[1]=l,e[2]=q):q=e[2];const B=n?.name??"User";let Z;e[3]!==B?(Z=s.jsx("p",{className:"text-sm font-medium truncate",children:B}),e[3]=B,e[4]=Z):Z=e[4];const ge=n?.email;let ee;e[5]!==ge?(ee=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:ge}),e[5]=ge,e[6]=ee):ee=e[6];let ue;e[7]!==Z||e[8]!==ee?(ue=s.jsxs("div",{className:"flex-1 min-w-0",children:[Z,ee]}),e[7]=Z,e[8]=ee,e[9]=ue):ue=e[9];let be;e[10]!==n?(be=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Ai)},e[10]=n,e[11]=be):be=e[11];let ne;e[12]===Symbol.for("react.memo_cache_sentinel")?(ne=s.jsx(gt,{size:14}),e[12]=ne):ne=e[12];let fe;e[13]!==be?(fe=s.jsx(ce,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:be,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:ne})}),e[13]=be,e[14]=fe):fe=e[14];let je;e[15]===Symbol.for("react.memo_cache_sentinel")?(je=s.jsx(de,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[15]=je):je=e[15];let T;e[16]!==fe?(T=s.jsx(et,{delayDuration:300,children:s.jsxs(me,{children:[fe,je]})}),e[16]=fe,e[17]=T):T=e[17];let H;e[18]!==T||e[19]!==q||e[20]!==ue?(H=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b border-border",children:[q,ue,T]}),e[18]=T,e[19]=q,e[20]=ue,e[21]=H):H=e[21];let X;if(e[22]!==c||e[23]!==i){let le;e[25]!==c?(le=Pe=>s.jsx(De,{item:Pe,onClose:c},Pe.key),e[25]=c,e[26]=le):le=e[26],X=i.map(le),e[22]=c,e[23]=i,e[24]=X}else X=e[24];let W;e[27]!==c||e[28]!==r?(W=s.jsx(De,{item:r,onClose:c}),e[27]=c,e[28]=r,e[29]=W):W=e[29];let ie;e[30]!==X||e[31]!==W?(ie=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[X,W]})}),e[30]=X,e[31]=W,e[32]=ie):ie=e[32];let Se;if(e[33]!==o.theme||e[34]!==d||e[35]!==a){let le;e[37]!==o.theme||e[38]!==d?(le=Pe=>{const{value:Xe,icon:xs,label:ps}=Pe;return s.jsx("button",{type:"button","aria-label":ps,onClick:()=>d(gs=>({...gs,theme:Xe})),className:F("size-8 rounded-md flex items-center justify-center transition-colors",o.theme===Xe?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:xs},Xe)},e[37]=o.theme,e[38]=d,e[39]=le):le=e[39],Se=a.map(le),e[33]=o.theme,e[34]=d,e[35]=a,e[36]=Se}else Se=e[36];let Ne;e[40]!==Se?(Ne=s.jsx("div",{className:"flex items-center gap-0.5",children:Se}),e[40]=Se,e[41]=Ne):Ne=e[41];const qe=o.enableSounds?"Disable sounds":"Enable sounds";let _e;e[42]!==d?(_e=()=>d(ki),e[42]=d,e[43]=_e):_e=e[43];const Ke=o.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let Ce;e[44]!==Ke?(Ce=F("size-8 rounded-md flex items-center justify-center transition-colors",Ke),e[44]=Ke,e[45]=Ce):Ce=e[45];let we;e[46]!==o.enableSounds?(we=o.enableSounds?s.jsx(bt,{size:14}):s.jsx(jt,{size:14}),e[46]=o.enableSounds,e[47]=we):we=e[47];let ke;e[48]!==qe||e[49]!==_e||e[50]!==Ce||e[51]!==we?(ke=s.jsx("button",{type:"button","aria-label":qe,onClick:_e,className:Ce,children:we}),e[48]=qe,e[49]=_e,e[50]=Ce,e[51]=we,e[52]=ke):ke=e[52];let Me;e[53]===Symbol.for("react.memo_cache_sentinel")?(Me=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.40.0"]}),e[53]=Me):Me=e[53];let Ae;e[54]!==ke?(Ae=s.jsxs("div",{className:"flex items-center gap-2",children:[ke,Me]}),e[54]=ke,e[55]=Ae):Ae=e[55];let Ie;e[56]!==Ne||e[57]!==Ae?(Ie=s.jsxs("div",{className:"flex items-center justify-between px-3 py-3 border-t border-border/50",children:[Ne,Ae]}),e[56]=Ne,e[57]=Ae,e[58]=Ie):Ie=e[58];let Oe;return e[59]!==H||e[60]!==ie||e[61]!==Ie?(Oe=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[H,ie,Ie]}),e[59]=H,e[60]=ie,e[61]=Ie,e[62]=Oe):Oe=e[62],Oe}const u=n?.name??"U";let f;e[63]!==u||e[64]!==l?(f=s.jsx(Le,{url:l,fallback:u,shape:"circle",size:"sm",className:"shrink-0"}),e[63]=u,e[64]=l,e[65]=f):f=e[65];const h=n?.name??"User";let g;e[66]!==h?(g=s.jsx("p",{className:"text-sm font-medium truncate",children:h}),e[66]=h,e[67]=g):g=e[67];const j=n?.email;let x;e[68]!==j?(x=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:j}),e[68]=j,e[69]=x):x=e[69];let p;e[70]!==g||e[71]!==x?(p=s.jsxs("div",{className:"flex-1 min-w-0",children:[g,x]}),e[70]=g,e[71]=x,e[72]=p):p=e[72];let b;e[73]!==n?(b=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(wi)},e[73]=n,e[74]=b):b=e[74];let v;e[75]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(gt,{size:14}),e[75]=v):v=e[75];let y;e[76]!==b?(y=s.jsx(ce,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:b,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:v})}),e[76]=b,e[77]=y):y=e[77];let w;e[78]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(de,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[78]=w):w=e[78];let C;e[79]!==y?(C=s.jsx(et,{delayDuration:300,children:s.jsxs(me,{children:[y,w]})}),e[79]=y,e[80]=C):C=e[80];let N;e[81]!==C||e[82]!==f||e[83]!==p?(N=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mx-1 mt-1",children:[f,p,C]}),e[81]=C,e[82]=f,e[83]=p,e[84]=N):N=e[84];let S;if(e[85]!==c||e[86]!==i){let U;e[88]!==c?(U=q=>s.jsx(De,{item:q,onClose:c},q.key),e[88]=c,e[89]=U):U=e[89],S=i.map(U),e[85]=c,e[86]=i,e[87]=S}else S=e[87];let A;e[90]!==c||e[91]!==r?(A=s.jsx(De,{item:r,onClose:c}),e[90]=c,e[91]=r,e[92]=A):A=e[92];let k;e[93]!==S||e[94]!==A?(k=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[S,A]}),e[93]=S,e[94]=A,e[95]=k):k=e[95];let z;if(e[96]!==o.theme||e[97]!==d||e[98]!==a){let U;e[100]!==o.theme||e[101]!==d?(U=q=>{const{value:B,icon:Z,label:ge}=q;return s.jsx("button",{type:"button","aria-label":ge,onClick:()=>d(ee=>({...ee,theme:B})),className:F("size-7 rounded-md flex items-center justify-center transition-colors",o.theme===B?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:Z},B)},e[100]=o.theme,e[101]=d,e[102]=U):U=e[102],z=a.map(U),e[96]=o.theme,e[97]=d,e[98]=a,e[99]=z}else z=e[99];let _;e[103]!==z?(_=s.jsx("div",{className:"flex items-center gap-0.5",children:z}),e[103]=z,e[104]=_):_=e[104];const I=o.enableSounds?"Disable sounds":"Enable sounds";let M;e[105]!==d?(M=()=>d(Ci),e[105]=d,e[106]=M):M=e[106];const L=o.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let P;e[107]!==L?(P=F("size-7 rounded-md flex items-center justify-center transition-colors",L),e[107]=L,e[108]=P):P=e[108];let D;e[109]!==o.enableSounds?(D=o.enableSounds?s.jsx(bt,{size:14}):s.jsx(jt,{size:14}),e[109]=o.enableSounds,e[110]=D):D=e[110];let O;e[111]!==I||e[112]!==M||e[113]!==P||e[114]!==D?(O=s.jsx("button",{type:"button","aria-label":I,onClick:M,className:P,children:D}),e[111]=I,e[112]=M,e[113]=P,e[114]=D,e[115]=O):O=e[115];let R;e[116]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.40.0"]}),e[116]=R):R=e[116];let G;e[117]!==O?(G=s.jsxs("div",{className:"flex items-center gap-2",children:[O,R]}),e[117]=O,e[118]=G):G=e[118];let V;e[119]!==_||e[120]!==G?(V=s.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-t border-border/50",children:[_,G]}),e[119]=_,e[120]=G,e[121]=V):V=e[121];let Y;return e[122]!==N||e[123]!==k||e[124]!==V?(Y=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[N,k,V]})}),e[122]=N,e[123]=k,e[124]=V,e[125]=Y):Y=e[125],Y}function Ci(t){return{...t,enableSounds:!t.enableSounds}}function wi(){re.success("User ID copied")}function ki(t){return{...t,enableSounds:!t.enableSounds}}function Ai(){re.success("User ID copied")}function st(){const t=$.c(34),{data:e}=he.useSession(),{org:n}=se(),l=xe();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org",shouldThrow:!1},t[0]=i):i=t[0];const a=vs(i)?.params.org,[o,d]=ys(),c=ct(),[m,u]=E.useState(!1),f=e?.user,h=f?.image;let g;t[1]===Symbol.for("react.memo_cache_sentinel")?(g=()=>u(!1),t[1]=g):g=t[1];const j=g;let x;t[2]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(dt,{size:16}),t[2]=x):x=t[2];let p;t[3]!==l||t[4]!==a?(p={key:"preferences",label:"Preferences",icon:x,onClick:()=>{l({to:"/$org/settings/profile",params:{org:a??""}})}},t[3]=l,t[4]=a,t[5]=p):p=t[5];let b;t[6]!==n||t[7]!==l?(b=n?[{key:"install-app",label:"Add to Home Screen",icon:s.jsx(Gs,{size:16}),onClick:()=>{l({to:"/$org/install",params:{org:n.slug}})}}]:[],t[6]=n,t[7]=l,t[8]=b):b=t[8];let v;t[9]===Symbol.for("react.memo_cache_sentinel")?(v={key:"terms",label:"Terms of Use",icon:s.jsx(Ws,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[9]=v):v=t[9];let y;t[10]===Symbol.for("react.memo_cache_sentinel")?(y={key:"privacy",label:"Privacy Policy",icon:s.jsx(Ys,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[10]=y):y=t[10];let w;t[11]===Symbol.for("react.memo_cache_sentinel")?(w={key:"github",label:"decocms/studio",icon:s.jsx(Ss,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[11]=w):w=t[11];let C;t[12]===Symbol.for("react.memo_cache_sentinel")?(C={key:"community",label:"Community",icon:s.jsx(Qs,{size:16}),href:"https://decocms.com/discord",external:!0},t[12]=C):C=t[12];let N;t[13]===Symbol.for("react.memo_cache_sentinel")?(N={key:"homepage",label:"Homepage",icon:s.jsx(Us,{size:16}),href:"https://decocms.com",external:!0},t[13]=N):N=t[13];let S;t[14]!==p||t[15]!==b?(S=[p,...b,v,y,w,C,N],t[14]=p,t[15]=b,t[16]=S):S=t[16];const A=S;let k;t[17]===Symbol.for("react.memo_cache_sentinel")?(k={key:"logout",label:"Sign out",icon:s.jsx(qs,{size:16}),onClick:zi},t[17]=k):k=t[17];const z=k;let _;t[18]===Symbol.for("react.memo_cache_sentinel")?(_={value:"light",icon:s.jsx(Xs,{size:14}),label:"Light theme"},t[18]=_):_=t[18];let I;t[19]===Symbol.for("react.memo_cache_sentinel")?(I={value:"dark",icon:s.jsx(Vs,{size:14}),label:"Dark theme"},t[19]=I):I=t[19];let M;t[20]===Symbol.for("react.memo_cache_sentinel")?(M=[_,I,{value:"system",icon:s.jsx(tt,{size:14}),label:"System theme"}],t[20]=M):M=t[20];const L=M;let P;t[21]!==c||t[22]!==A||t[23]!==o||t[24]!==d||t[25]!==f||t[26]!==h?(P={user:f,userImage:h,menuItems:A,signOutItem:z,themeOptions:L,preferences:o,setPreferences:d,close:j,isMobile:c},t[21]=c,t[22]=A,t[23]=o,t[24]=d,t[25]=f,t[26]=h,t[27]=P):P=t[27];const D=P;let O;return t[28]!==c||t[29]!==m||t[30]!==D||t[31]!==f?.name||t[32]!==h?(O=s.jsx(s.Fragment,{children:c?s.jsxs(Ut,{open:m,onOpenChange:u,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>u(!0),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(Le,{url:h,fallback:f?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??"Account"})]}),s.jsxs(Wt,{className:"h-[80dvh] p-0",children:[s.jsx(qt,{className:"sr-only",children:"Account"}),s.jsx(_t,{...D})]})]}):s.jsxs(Ge,{open:m,onOpenChange:u,children:[s.jsx(ze,{asChild:!0,children:s.jsxs(J,{tooltip:f?.name??"Account",className:"rounded-md",children:[s.jsx(Le,{url:h,fallback:f?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??"Account"})]})}),s.jsx(Ue,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Ii,children:s.jsx(_t,{...D})})]})}),t[28]=c,t[29]=m,t[30]=D,t[31]=f?.name,t[32]=h,t[33]=O):O=t[33],O}function Ii(t){return t.preventDefault()}function zi(){oe("signed_out",{source:"account_popover"}),Ns(),he.signOut()}function nt(t){const e=$.c(43),{variant:n}=t===void 0?{}:t,l=n===void 0?"icon":n,i=cn(),[r,a]=E.useState(!1);let o,d;if(e[0]!==i.capabilities||e[1]!==i.hostname||e[2]!==i.machineId||e[3]!==i.online){const v=dn(i.capabilities);o=i.online?"Desktop linked":"Connect desktop",d=i.online?s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[s.jsx("span",{className:"font-medium",children:i.hostname??i.machineId??"Desktop linked"}),s.jsx("span",{className:"text-muted-foreground",children:v.length>0?`Available: ${v.join(", ")}`:"No CLI agents detected"})]}):s.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=i.capabilities,e[1]=i.hostname,e[2]=i.machineId,e[3]=i.online,e[4]=o,e[5]=d}else o=e[4],d=e[5];const c=d;if(l==="full"){let v,y;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=()=>a(!0),y=s.jsx(tt,{}),e[6]=v,e[7]=y):(v=e[6],y=e[7]);let w;e[8]!==o?(w=s.jsx("span",{children:o}),e[8]=o,e[9]=w):w=e[9];let C;e[10]!==i.online?(C=i.online&&s.jsx("span",{className:"ml-auto size-2 rounded-full bg-success animate-pulse"}),e[10]=i.online,e[11]=C):C=e[11];let N;e[12]!==o||e[13]!==w||e[14]!==C?(N=s.jsx(ce,{asChild:!0,children:s.jsxs(J,{tooltip:o,onClick:v,children:[y,w,C]})}),e[12]=o,e[13]=w,e[14]=C,e[15]=N):N=e[15];let S;e[16]!==c?(S=s.jsx(de,{side:"right",children:c}),e[16]=c,e[17]=S):S=e[17];let A;e[18]!==N||e[19]!==S?(A=s.jsxs(me,{children:[N,S]}),e[18]=N,e[19]=S,e[20]=A):A=e[20];let k;e[21]!==r?(k=s.jsx(yt,{open:r,onOpenChange:a}),e[21]=r,e[22]=k):k=e[22];let z;return e[23]!==k||e[24]!==A?(z=s.jsxs(s.Fragment,{children:[A,k]}),e[23]=k,e[24]=A,e[25]=z):z=e[25],z}let m;e[26]===Symbol.for("react.memo_cache_sentinel")?(m=()=>a(!0),e[26]=m):m=e[26];const u=i.online?"Desktop linked":"Connect your desktop";let f;e[27]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(tt,{size:16}),e[27]=f):f=e[27];let h;e[28]!==i.online?(h=i.online&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[28]=i.online,e[29]=h):h=e[29];let g;e[30]!==u||e[31]!==h?(g=s.jsx(ce,{asChild:!0,children:s.jsxs(ve,{onClick:m,"aria-label":u,children:[f,h]})}),e[30]=u,e[31]=h,e[32]=g):g=e[32];let j;e[33]!==c?(j=s.jsx(de,{side:"bottom",children:c}),e[33]=c,e[34]=j):j=e[34];let x;e[35]!==g||e[36]!==j?(x=s.jsxs(me,{children:[g,j]}),e[35]=g,e[36]=j,e[37]=x):x=e[37];let p;e[38]!==r?(p=s.jsx(yt,{open:r,onOpenChange:a}),e[38]=r,e[39]=p):p=e[39];let b;return e[40]!==p||e[41]!==x?(b=s.jsxs(s.Fragment,{children:[x,p]}),e[40]=p,e[41]=x,e[42]=b):b=e[42],b}class $i extends E.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function Ti(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function Mi(){const t=$.c(17),e=xe(),{org:n}=se(),{hasDecoKey:l,balanceDollars:i}=ln();if(!l)return null;let r;t[0]!==i?(r=i!=null?`Credits: $${i.toFixed(2)}`:"Credits",t[0]=i,t[1]=r):r=t[1];let a;t[2]!==i?(a=F(i!=null&&Ti(i)),t[2]=i,t[3]=a):a=t[3];let o;t[4]!==e||t[5]!==n.slug?(o=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=o):o=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Js,{}),t[7]=d):d=t[7];let c;t[8]!==i?(c=i!=null?`$${i.toFixed(2)}`:"Credits",t[8]=i,t[9]=c):c=t[9];let m;t[10]!==c?(m=s.jsx("span",{children:c}),t[10]=c,t[11]=m):m=t[11];let u;return t[12]!==r||t[13]!==a||t[14]!==o||t[15]!==m?(u=s.jsx(ae,{children:s.jsx(K,{children:s.jsxs(J,{tooltip:r,className:a,onClick:o,children:[d,m]})})}),t[12]=r,t[13]=a,t[14]=o,t[15]=m,t[16]=u):u=t[16],u}function Ct(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx($i,{children:s.jsx(E.Suspense,{fallback:null,children:s.jsx(Mi,{})})}),t[0]=e):e=t[0],e}function wt(){const t=$.c(7),e=xe(),{org:n}=se();let l;t[0]!==e||t[1]!==n.slug?(l=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=l):l=t[2];let i,r;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(dt,{}),r=s.jsx("span",{children:"Settings"}),t[3]=i,t[4]=r):(i=t[3],r=t[4]);let a;return t[5]!==l?(a=s.jsxs(J,{tooltip:"Settings",onClick:l,children:[i,r]}),t[5]=l,t[6]=a):a=t[6],a}function kt(){const t=$.c(4),[e,n]=E.useState(!1);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(K,{children:s.jsx(nn,{trigger:s.jsxs(J,{tooltip:"Invite members",children:[s.jsx(Zs,{}),s.jsx("span",{children:"Invite members"})]})})}),t[0]=l):l=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(ae,{className:"gap-0.5",children:[l,s.jsx(K,{children:s.jsxs(J,{tooltip:"Add connection",onClick:()=>n(!0),children:[s.jsx(Ks,{}),s.jsx("span",{children:"Add connection"})]})})]}),t[1]=i):i=t[1];let r;return t[2]!==e?(r=s.jsxs(s.Fragment,{children:[i,s.jsx(rn,{open:e,onOpenChange:n,mode:"browse"})]}),t[2]=e,t[3]=r):r=t[3],r}function Oi(){const t=$.c(10),{state:e}=pe();if(e==="collapsed"){let d,c;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(kt,{}),c=s.jsx(Ct,{}),t[0]=d,t[1]=c):(d=t[0],c=t[1]);let m;t[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(K,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(nt,{})})}),t[2]=m):m=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(K,{children:s.jsx(wt,{})}),t[3]=u):u=t[3];let f;return t[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs(Ze,{className:"px-2 pb-3 gap-1",children:[d,c,s.jsxs(ae,{children:[m,u,s.jsx(K,{children:s.jsx(st,{})})]})]}),t[4]=f):f=t[4],f}let l,i;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(kt,{}),i=s.jsx(Ct,{}),t[5]=l,t[6]=i):(l=t[5],i=t[6]);let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(K,{children:s.jsx(nt,{variant:"full"})}),t[7]=r):r=t[7];let a;t[8]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(K,{children:s.jsx(wt,{})}),t[8]=a):a=t[8];let o;return t[9]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs(Ze,{className:"px-2 pb-3 gap-0.5",children:[l,i,s.jsxs(ae,{className:"gap-0.5",children:[r,a,s.jsx(K,{children:s.jsx(st,{})})]})]}),t[9]=o):o=t[9],o}function Pi(){const t=$.c(8),e=xe(),{org:n}=se(),{setOpenMobile:l}=pe();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(ae,{children:s.jsx(K,{children:s.jsx(st,{})})})}),t[0]=i):i=t[0];let r;t[1]!==e||t[2]!==n.slug||t[3]!==l?(r=()=>{e({to:"/$org/settings",params:{org:n.slug}}),l(!1)},t[1]=e,t[2]=n.slug,t[3]=l,t[4]=r):r=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(dt,{className:"size-4"}),t[5]=a):a=t[5];let o;return t[6]!==r?(o=s.jsx(Ze,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[i,s.jsx(ve,{"aria-label":"Settings",onClick:r,children:a})]})}),t[6]=r,t[7]=o):o=t[7],o}function At(t){const e=$.c(15),{className:n,wrapperClassName:l,children:i}=t,[r,a]=E.useState(!1);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=p=>{p&&a(p.scrollHeight>p.clientHeight+1)},e[0]=o):o=e[0];const d=o;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=p=>{const b=p.currentTarget;a(b.scrollHeight-b.scrollTop>b.clientHeight+1)},e[1]=c):c=e[1];const m=c;let u;e[2]!==l?(u=F("relative",l),e[2]=l,e[3]=u):u=e[3];let f;e[4]!==i||e[5]!==n?(f=s.jsx("div",{ref:d,onScroll:m,className:n,children:i}),e[4]=i,e[5]=n,e[6]=f):f=e[6];const h=r?"opacity-100":"opacity-0";let g;e[7]!==h?(g=F("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",h),e[7]=h,e[8]=g):g=e[8];let j;e[9]!==g?(j=s.jsx("div",{"aria-hidden":!0,className:g}),e[9]=g,e[10]=j):j=e[10];let x;return e[11]!==u||e[12]!==f||e[13]!==j?(x=s.jsxs("div",{className:u,children:[f,j]}),e[11]=u,e[12]=f,e[13]=j,e[14]=x):x=e[14],x}function Di(t){const e=$.c(8),{virtualMcpId:n,size:l,showAutomationBadge:i}=t,r=l===void 0?"sm":l;let a;e[0]!==r||e[1]!==n?(a=n?s.jsx(Fi,{virtualMcpId:n,size:r}):s.jsx(ye,{icon:null,name:"?",size:r}),e[0]=r,e[1]=n,e[2]=a):a=e[2];let o;e[3]!==i?(o=i&&s.jsx("span",{"aria-label":"Automation-triggered",className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-blue-500 border border-blue-600 text-white",children:s.jsx(Qt,{size:10,className:"text-white"})}),e[3]=i,e[4]=o):o=e[4];let d;return e[5]!==a||e[6]!==o?(d=s.jsxs("div",{className:"relative shrink-0",children:[a,o]}),e[5]=a,e[6]=o,e[7]=d):d=e[7],d}function Fi(t){const e=$.c(6),{virtualMcpId:n,size:l}=t,i=mt(n);if(!i){let o;return e[0]!==l?(o=s.jsx(ye,{icon:null,name:"?",size:l}),e[0]=l,e[1]=o):o=e[1],o}const r=i.icon??null;let a;return e[2]!==i.title||e[3]!==l||e[4]!==r?(a=s.jsx(ye,{icon:r,name:i.title,size:l}),e[2]=i.title,e[3]=l,e[4]=r,e[5]=a):a=e[5],a}function It(t){const e=$.c(36),{open:n,onOpenChange:l}=t,[i,r]=E.useState(""),{org:a}=se(),{setTaskId:o}=ft(),d=Yt();let c,m,u;e[0]!==a.id||e[1]!==i?(u=i.trim(),m=Cs,c=_s.globalSearch(a.id,u),e[0]=a.id,e[1]=i,e[2]=c,e[3]=m,e[4]=u):(c=e[2],m=e[3],u=e[4]);const f=n&&u.length>0;let h;e[5]!==d||e[6]!==u?(h=async()=>await d.call("GLOBAL_SEARCH",{query:u,limit:20}),e[5]=d,e[6]=u,e[7]=h):h=e[7];let g;e[8]!==c||e[9]!==f||e[10]!==h?(g={queryKey:c,enabled:f,queryFn:h,staleTime:1e4},e[8]=c,e[9]=f,e[10]=h,e[11]=g):g=e[11];const{data:j,isFetching:x}=m(g);let p;e[12]!==j?.items?(p=j?.items??[],e[12]=j?.items,e[13]=p):p=e[13];const b=p;let v;e[14]!==l?(v=I=>{I||r(""),l(I)},e[14]=l,e[15]=v):v=e[15];const y=v;let w;e[16]!==y||e[17]!==o?(w=I=>{y(!1),o(I.id,I.virtual_mcp_id??void 0)},e[16]=y,e[17]=o,e[18]=w):w=e[18];const C=w;let N;e[19]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsxs(yn,{className:"sr-only",children:[s.jsx(Sn,{children:"Search"}),s.jsx(Nn,{children:"Search across your organization's resources."})]}),e[19]=N):N=e[19];let S;e[20]!==i?(S=s.jsx(An,{value:i,onValueChange:r,placeholder:"Search..."}),e[20]=i,e[21]=S):S=e[21];let A;e[22]!==C||e[23]!==x||e[24]!==b||e[25]!==u?(A=u?x&&b.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Searching…"}):b.length===0?s.jsx(wn,{children:"No results."}):b.map(I=>I.type==="thread"?s.jsxs(kn,{value:`thread:${I.id}:${I.title}`,onSelect:()=>C(I),className:"gap-2.5",children:[s.jsx(Di,{virtualMcpId:I.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:I.title||"Untitled thread"})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(I.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${I.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Start typing to search."}),e[22]=C,e[23]=x,e[24]=b,e[25]=u,e[26]=A):A=e[26];let k;e[27]!==A?(k=s.jsx(In,{children:A}),e[27]=A,e[28]=k):k=e[28];let z;e[29]!==S||e[30]!==k?(z=s.jsxs(_n,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[N,s.jsxs(zn,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[S,k]})]}),e[29]=S,e[30]=k,e[31]=z):z=e[31];let _;return e[32]!==y||e[33]!==n||e[34]!==z?(_=s.jsx(Cn,{open:n,onOpenChange:y,children:z}),e[32]=y,e[33]=n,e[34]=z,e[35]=_):_=e[35],_}function Ei(t){return t==="ephemeral"||t.startsWith("thread:")}function rs(t){const e=$.c(40),{task:n,isActive:l,onClick:i,onArchive:r,showAutomationBadge:a,showAgentIcon:o,hideStatusIdle:d,indented:c}=t,m=Mn(n.status),u=m.icon,f=n.metadata?.kind==="tool_call_run",h=mt(f?void 0:n.virtual_mcp_id);let g;e[0]!==h?(g=on(h),e[0]=h,e[1]=g):g=e[1];const j=g;On(6e4);const x=a||!!n.trigger_id,p=n.id,b="button",v=0;let y;e[2]!==i?(y=G=>{G.target===G.currentTarget&&(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),i())},e[2]=i,e[3]=y):y=e[3];const w=c?"-ml-4 pl-6":"pl-2",C=l?"bg-accent text-accent-foreground":"hover:bg-accent/60";let N;e[4]!==w||e[5]!==C?(N=F("group/row flex items-center gap-2 py-1.5 pr-2 rounded-md cursor-pointer transition-colors",w,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",C),e[4]=w,e[5]=C,e[6]=N):N=e[6];let S;e[7]!==f||e[8]!==o||e[9]!==h?.icon||e[10]!==h?.title?(S=o&&!f&&s.jsx(ye,{icon:h?.icon??null,name:h?.title??"?",size:"2xs"}),e[7]=f,e[8]=o,e[9]=h?.icon,e[10]=h?.title,e[11]=S):S=e[11];let A;e[12]!==x?(A=x&&s.jsx(Qt,{size:12,"aria-label":"Automation-triggered",className:"shrink-0 text-blue-500"}),e[12]=x,e[13]=A):A=e[13];const k=n.title||"Untitled task";let z;e[14]!==k?(z=s.jsx("div",{className:"text-sm text-foreground truncate",children:k}),e[14]=k,e[15]=z):z=e[15];let _;e[16]!==A||e[17]!==z?(_=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[A,z]}),e[16]=A,e[17]=z,e[18]=_):_=e[18];let I;e[19]!==j||e[20]!==l||e[21]!==n.branch||e[22]!==n.updated_at?(I=n.updated_at&&s.jsxs("div",{className:F("flex items-center gap-1 text-[11px] min-w-0",l?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!Ei(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):j?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[j.owner,"/",j.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:Dn(new Date(n.updated_at))})]}),e[19]=j,e[20]=l,e[21]=n.branch,e[22]=n.updated_at,e[23]=I):I=e[23];let M;e[24]!==_||e[25]!==I?(M=s.jsxs("div",{className:"flex-1 min-w-0",children:[_,I]}),e[24]=_,e[25]=I,e[26]=M):M=e[26];const L="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",P=!d&&s.jsx("span",{className:F("[grid-area:slot] flex size-7 items-center justify-center pointer-events-none transition-opacity",r&&"group-hover/row:opacity-0"),"aria-label":m.label,children:s.jsx(u,{size:14,className:F(m.iconClassName,n.status==="in_progress"&&"animate-spin")})});let D;e[27]!==r?(D=r&&s.jsxs(me,{children:[s.jsx(ce,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":"Archive task",onClick:G=>{G.stopPropagation(),r()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-7 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(ws,{size:14})})}),s.jsx(de,{side:"right",children:"Archive"})]}),e[27]=r,e[28]=D):D=e[28];let O;e[29]!==P||e[30]!==D?(O=s.jsxs("div",{className:L,children:[P,D]}),e[29]=P,e[30]=D,e[31]=O):O=e[31];let R;return e[32]!==i||e[33]!==M||e[34]!==O||e[35]!==y||e[36]!==N||e[37]!==S||e[38]!==n.id?(R=s.jsxs("div",{"data-task-id":p,role:b,tabIndex:v,onClick:i,onKeyDown:y,className:N,children:[S,M,O]}),e[32]=i,e[33]=M,e[34]=O,e[35]=y,e[36]=N,e[37]=S,e[38]=n.id,e[39]=R):R=e[39],R}const zt=["requires_action","in_progress","failed","expired","completed"];function Li(t){const e=new Map(zt.map(n=>[n,[]]));for(const n of t){const l=n.status??"completed";(e.get(l)??e.get("completed")).push(n)}return zt.map(n=>({status:n,threads:e.get(n)}))}const Ri="sidebar.group.expanded.";function Bi(t,e){const n=$.c(3),[l,i]=He(`${Ri}${t}`,e);let r;return n[0]!==l||n[1]!==i?(r=[l,i],n[0]=l,n[1]=i,n[2]=r):r=n[2],r}function os(t){const e=$.c(12),{onClick:n,isFetching:l,indented:i}=t,r=i?"-ml-4 pl-6 pr-2":"px-2";let a;e[0]!==r?(a=F("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",r,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[0]=r,e[1]=a):a=e[1];let o;e[2]!==l?(o=l&&s.jsx(Lt,{size:14,className:"animate-spin"}),e[2]=l,e[3]=o):o=e[3];const d=l?"Loading…":"Show more";let c;e[4]!==d?(c=s.jsx("span",{children:d}),e[4]=d,e[5]=c):c=e[5];let m;return e[6]!==l||e[7]!==n||e[8]!==a||e[9]!==o||e[10]!==c?(m=s.jsxs("button",{type:"button","aria-label":"Show more tasks",onClick:n,disabled:l,className:a,children:[o,c]}),e[6]=l,e[7]=n,e[8]=a,e[9]=o,e[10]=c,e[11]=m):m=e[11],m}function Hi(t,e,n,l){return[t,e,n,l.type,l.member,l.currentUserId??""].join("|")}function Gi(t){return t.member==="mine"&&!t.currentUserId}const as=4;let Ee=0;const it=[];function Ui(){for(;Ee<as&&it.length>0;){const t=it.shift();t&&t()}}function cs(t){return new Promise((e,n)=>{const l=()=>{Ee++,t().then(e,n).finally(()=>{Ee--,Ui()})};Ee<as?l():it.push(l)})}const We=10;function $t(t,e,n,l,i){const r={hidden:!1};l.member==="mine"&&l.currentUserId&&(r.created_by=l.currentUserId),l.type==="automation"&&(r.has_trigger=!0),l.type==="manual"&&(r.has_trigger=!1);const a={where:r,limit:i,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return a.status=e,a}function Wi(t,e,n,l){let i=0;for(const r of t)ds(r,e,n,l)&&i++;return i}function Ve(t,e,n,l){return Wi(t,e,n,l)}function qi(t,e){return!!(t>=We||t===0&&e)}function Tt(t,e){return t<e}function Ki(t,e){return e===!1?!1:e===!0?!0:t}function ds(t,e,n,l){return!(t.hidden||(t.status??"completed")!==n||l.member==="mine"&&l.currentUserId&&t.created_by!==l.currentUserId||l.type==="automation"&&!t.trigger_id||l.type==="manual"&&t.trigger_id)}const Be=new Map,Fe=new Map;function Xi(t,e){return e?t>=We?!0:null:!1}function Mt(t){return Be.get(t)}function Vi(t,e){Be.set(t,e)}function Yi(t,e,n){const l=Be.get(t);if(l!==void 0){n(l);return}let i=Fe.get(t);i||(i=cs(e).then(r=>(Be.set(t,r),Fe.delete(t),r)).catch(()=>(Fe.delete(t),Promise.reject(new Error("group probe failed")))),Fe.set(t,i)),i.then(n,()=>n(!1))}function Ot(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===We,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Qi(t,e,n,l,i){let r=0;for(const a of t)e.has(a.id)||ds(a,n,l,i)&&r++;return r}function Ji(t,e,n,l){const i=$.c(8),{org:r}=se(),a=Hi(r.id,t,e,n);let o;i[0]!==n?(o=Gi(n),i[0]=n,i[1]=o):o=i[1];const d=o,[c,m]=E.useState({isFetching:!1,isProbing:!1,identity:a,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==a&&m({isFetching:!1,isProbing:!1,identity:a,probeSubscribedIdentity:null,serverHasMore:null});const u=bn(),{threads:f,hasMore:h}=ut(),g=Ve(f,t,e,n),j=qi(g,h),x=Xi(g,h),p=Yt();if(c.identity===a&&c.serverHasMore===null){const N=x??Mt(a);N!==void 0&&m({isFetching:!1,isProbing:!1,identity:a,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:N})}!d&&c.identity===a&&c.serverHasMore===null&&x===null&&Mt(a)===void 0&&c.probeSubscribedIdentity!==a&&(m(N=>N.identity===a?{...N,isProbing:!0,probeSubscribedIdentity:a}:N),Yi(a,async()=>{const N=$t(t,e,0,n,1),S=await p.call("COLLECTION_THREADS_LIST",N),{totalCount:A}=Ot(S),k=Ve(u.threads.get(),t,e,n);return A===void 0?!1:Tt(k,A)},N=>{m(S=>S.identity!==a?S:{...S,isProbing:!1,serverHasMore:N})}));const v=async function(){if(c.isFetching||c.isProbing||d)return;const S=a;m(A=>A.identity===S?{...A,isFetching:!0}:A);try{const A=Ve(f,t,e,n),k=$t(t,e,A,n,We),z=await cs(()=>p.call("COLLECTION_THREADS_LIST",k)),{items:_,hasMore:I,totalCount:M}=Ot(z),L=new Set(f.map(Zi)),P=Qi(_,L,t,e,n),D=A;u.mergeThreads(_),m(O=>{if(O.identity!==S)return O;let R;return M!==void 0?R=Tt(D+P,M):R=_.length===0||P===0?!1:I,Vi(S,R),{...O,isFetching:!1,serverHasMore:R}})}catch(A){const k=A,z=k instanceof Error?k.message:String(k);re.error(`Could not load more tasks: ${z}`),m(_=>_.identity===S?{..._,isFetching:!1}:_)}},y=c.isFetching||c.isProbing,w=!d&&!y&&Ki(j,c.serverHasMore);let C;return i[2]!==y||i[3]!==v||i[4]!==w||i[5]!==c.isProbing||i[6]!==c.serverHasMore?(C={hasMore:w,isFetching:y,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:v},i[2]=y,i[3]=v,i[4]=w,i[5]=c.isProbing,i[6]=c.serverHasMore,i[7]=C):C=i[7],C}function Zi(t){return t.id}function el(t){const e=$.c(20),{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:a,canArchive:o,filters:d}=t,{isFetching:c,isProbing:m,loadMore:u,hasMore:f,serverHasMore:h}=Ji("status",n,d),[g,j]=E.useState(!1);!g&&l.length===0&&h===!0&&!c&&!m&&(j(!0),queueMicrotask(()=>{u()}));let x;if(e[0]!==i||e[1]!==o||e[2]!==d||e[3]!==a||e[4]!==r||e[5]!==l){let v;e[7]!==i||e[8]!==o||e[9]!==d||e[10]!==a||e[11]!==r?(v=y=>s.jsx(rs,{task:y,isActive:i===y.id,onClick:()=>r(y),onArchive:o&&y.created_by===d.currentUserId?()=>a(y):void 0,showAutomationBadge:!!y.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},y.id),e[7]=i,e[8]=o,e[9]=d,e[10]=a,e[11]=r,e[12]=v):v=e[12],x=l.map(v),e[0]=i,e[1]=o,e[2]=d,e[3]=a,e[4]=r,e[5]=l,e[6]=x}else x=e[6];let p;e[13]!==f||e[14]!==c||e[15]!==u?(p=(f||c)&&s.jsx(os,{onClick:()=>{u()},isFetching:c,indented:!0}),e[13]=f,e[14]=c,e[15]=u,e[16]=p):p=e[16];let b;return e[17]!==x||e[18]!==p?(b=s.jsxs(s.Fragment,{children:[x,p]}),e[17]=x,e[18]=p,e[19]=b):b=e[19],b}function tl(t){const e=$.c(36),{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:a,canArchive:o,filters:d}=t,c=Pn[n],m=c.icon,[u,f]=Bi(`status-${n}`,!1);let h;e[0]!==u||e[1]!==f?(h=function(){f(!u)},e[0]=u,e[1]=f,e[2]=h):h=e[2];const g=h;let j;e[3]!==g?(j=S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),g())},e[3]=g,e[4]=j):j=e[4];let x;e[5]!==m||e[6]!==c.iconClassName?(x=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(m,{size:12,className:c.iconClassName})}),e[5]=m,e[6]=c.iconClassName,e[7]=x):x=e[7];let p;e[8]!==u?(p=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:u?s.jsx(ht,{size:14}):s.jsx(Fn,{size:14})}),e[8]=u,e[9]=p):p=e[9];let b;e[10]!==x||e[11]!==p?(b=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[x,p]}),e[10]=x,e[11]=p,e[12]=b):b=e[12];let v;e[13]!==c.label?(v=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=v):v=e[14];let y;e[15]!==l.length?(y=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:l.length})}),e[15]=l.length,e[16]=y):y=e[16];let w;e[17]!==u||e[18]!==g||e[19]!==j||e[20]!==b||e[21]!==v||e[22]!==y?(w=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":u,onClick:g,onKeyDown:j,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[b,v,y]}),e[17]=u,e[18]=g,e[19]=j,e[20]=b,e[21]=v,e[22]=y,e[23]=w):w=e[23];let C;e[24]!==i||e[25]!==o||e[26]!==u||e[27]!==d||e[28]!==a||e[29]!==r||e[30]!==n||e[31]!==l?(C=u&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(el,{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:a,canArchive:o,filters:d})}),e[24]=i,e[25]=o,e[26]=u,e[27]=d,e[28]=a,e[29]=r,e[30]=n,e[31]=l,e[32]=C):C=e[32];let N;return e[33]!==w||e[34]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[w,C]}),e[33]=w,e[34]=C,e[35]=N):N=e[35],N}function Pt(t){const e=$.c(38),{threads:n,groupBy:l,activeTaskId:i,onSelectTask:r,onArchiveTask:a,filters:o,hasMore:d,isFetchingMore:c,onLoadMore:m,filtersActive:u}=t;if(n.length===0&&!d&&!c){let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Tn,{className:"size-6 opacity-60"}),e[0]=x):x=e[0];const p=u?"No threads match your filters":"No threads yet";let b;return e[1]!==p?(b=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[x,s.jsx("p",{className:"text-sm",children:p})]}),e[1]=p,e[2]=b):b=e[2],b}const f=n.length>1||d;if(l==="status"){let x;if(e[3]!==i||e[4]!==f||e[5]!==o||e[6]!==a||e[7]!==r||e[8]!==n){let b;e[10]!==i||e[11]!==f||e[12]!==o||e[13]!==a||e[14]!==r?(b=v=>s.jsx(tl,{status:v.status,threads:v.threads,activeTaskId:i,onSelectTask:r,onArchiveTask:a,canArchive:f,filters:o},v.status),e[10]=i,e[11]=f,e[12]=o,e[13]=a,e[14]=r,e[15]=b):b=e[15],x=Li(n).map(b),e[3]=i,e[4]=f,e[5]=o,e[6]=a,e[7]=r,e[8]=n,e[9]=x}else x=e[9];let p;return e[16]!==x?(p=s.jsx(s.Fragment,{children:x}),e[16]=x,e[17]=p):p=e[17],p}let h;if(e[18]!==i||e[19]!==f||e[20]!==o||e[21]!==a||e[22]!==r||e[23]!==n){let x;e[25]!==i||e[26]!==f||e[27]!==o||e[28]!==a||e[29]!==r?(x=p=>s.jsx(rs,{task:p,isActive:i===p.id,onClick:()=>r(p),onArchive:f&&p.created_by===o.currentUserId?()=>a(p):void 0,showAutomationBadge:!!p.trigger_id,showAgentIcon:!0},p.id),e[25]=i,e[26]=f,e[27]=o,e[28]=a,e[29]=r,e[30]=x):x=e[30],h=n.map(x),e[18]=i,e[19]=f,e[20]=o,e[21]=a,e[22]=r,e[23]=n,e[24]=h}else h=e[24];let g;e[31]!==d||e[32]!==c||e[33]!==m?(g=(d||c)&&s.jsx(os,{onClick:m,isFetching:c}),e[31]=d,e[32]=c,e[33]=m,e[34]=g):g=e[34];let j;return e[35]!==h||e[36]!==g?(j=s.jsxs(s.Fragment,{children:[h,g]}),e[35]=h,e[36]=g,e[37]=j):j=e[37],j}function Dt(t){const e=$.c(17),{label:n,onClick:l,active:i,children:r}=t,[a,o]=E.useState(!1);let d,c,m,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>o(!0),c=()=>o(!1),m=()=>o(!0),u=()=>o(!1),e[0]=d,e[1]=c,e[2]=m,e[3]=u):(d=e[0],c=e[1],m=e[2],u=e[3]);const f=i&&"bg-sidebar-accent text-foreground";let h;e[4]!==f?(h=F(f),e[4]=f,e[5]=h):h=e[5];let g;e[6]!==r||e[7]!==n||e[8]!==l||e[9]!==h?(g=s.jsx(ce,{asChild:!0,children:s.jsx(ve,{"aria-label":n,onClick:l,onPointerEnter:d,onPointerLeave:c,onFocus:m,onBlur:u,className:h,children:r})}),e[6]=r,e[7]=n,e[8]=l,e[9]=h,e[10]=g):g=e[10];let j;e[11]!==n?(j=s.jsx(de,{side:"bottom",children:n}),e[11]=n,e[12]=j):j=e[12];let x;return e[13]!==a||e[14]!==g||e[15]!==j?(x=s.jsxs(me,{open:a,children:[g,j]}),e[13]=a,e[14]=g,e[15]=j,e[16]=x):x=e[16],x}function Ye(t){const e=$.c(13),{label:n,value:l,onChange:i,options:r}=t;let a;e[0]!==n?(a=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=a):a=e[1];let o;e[2]!==i?(o=u=>u&&i(u),e[2]=i,e[3]=o):o=e[3];let d;e[4]!==r?(d=r.map(sl),e[4]=r,e[5]=d):d=e[5];let c;e[6]!==o||e[7]!==d||e[8]!==l?(c=s.jsx(fn,{type:"single",size:"sm",value:l,onValueChange:o,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:d}),e[6]=o,e[7]=d,e[8]=l,e[9]=c):c=e[9];let m;return e[10]!==a||e[11]!==c?(m=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[a,c]}),e[10]=a,e[11]=c,e[12]=m):m=e[12],m}function sl(t){return s.jsxs(un,{value:t.value,className:"h-6 gap-1.5 rounded-md border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function ms({onNavigate:t}={}){const{data:e}=he.useSession(),n=e?.user?.id,{org:l}=se(),i=hn({connectionId:xn,orgId:l.id,orgSlug:l.slug}),r=Re(l.id).id,a=Xt(),{threads:o,hasMore:d,isFetchingMore:c,fetchNextPage:m}=ut(),u=o.filter(T=>!T.hidden),{hide:f}=Vt(),h=xe(),{setTaskId:g,createNewTask:j}=ft(),x=lt({strict:!1}),p=rt({strict:!1}),b=x.taskId??null,v=p.virtualmcpid??o.find(T=>T.id===b)?.virtual_mcp_id??null,y=()=>{t?.()},w=[...u].sort((T,H)=>(H.updated_at??"").localeCompare(T.updated_at??"")),[C,N]=E.useState("all"),[S,A]=E.useState("flat"),[k,z]=He("sidebar-threads-scope-all",!1),[_,I]=E.useState(!1),[M,L]=E.useState(!1),P={type:C,member:"mine",currentUserId:n??null},D=T=>n?T.filter(H=>H.created_by===n):[],O=T=>C==="automation"?T.filter(H=>!!H.trigger_id):C==="manual"?T.filter(H=>!H.trigger_id):T,R=D(w),G=O(R),V=O(w),Y=k?V:G,U=T=>{if(n&&T.created_by&&T.created_by!==n)return;const H=T.id===b;if(f(T.id),!H)return;const X=R.find(W=>W.id!==T.id&&W.virtual_mcp_id===T.virtual_mcp_id);y(),X?g(X.id,X.virtual_mcp_id):h({to:"/$org",params:{org:l.slug}})},q=T=>{y(),g(T.id,T.virtual_mcp_id)},B=async T=>{try{const H=await i.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:T,limit:1,offset:0}});return((H.structuredContent??H).items?.length??0)===0}catch{return!1}},Z=async()=>{const T=v??r;oe("sidebar_new_thread_clicked",{virtual_mcp_id:T});const H=R.find(X=>X.virtual_mcp_id===T&&X.title==="New chat");if(H&&await B(H.id)){y(),g(H.id,T);return}y(),j(T)},{state:ge,isMobile:ee,toggleSidebar:ue}=pe();if(ge==="collapsed"&&!ee){const T=Re(l.id),H=new Map((a??[]).map(W=>[W.id,W])),X=W=>(W?H.get(W):void 0)??(W===r?T:void 0);return s.jsxs(ae,{className:"min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[s.jsx(K,{children:s.jsx(J,{"aria-label":"Toggle sidebar",tooltip:"Toggle sidebar",onClick:ue,children:s.jsx(Gt,{size:16})})}),s.jsx(K,{children:s.jsx(J,{tooltip:"New thread",onClick:()=>{Z()},children:s.jsx(vt,{size:16})})}),Y.map(W=>{const ie=X(W.virtual_mcp_id);return s.jsx(K,{children:s.jsx(J,{tooltip:W.title||"New chat",isActive:W.id===b,onClick:()=>q(W),children:s.jsx(ye,{icon:ie?.icon??null,name:ie?.title??"Agent",size:"2xs"})})},W.id)})]})}const ne=S!=="flat"||C!=="all"||k===!0,fe=s.jsxs(Ge,{children:[s.jsxs(me,{children:[s.jsx(ce,{asChild:!0,children:s.jsx(ze,{asChild:!0,children:s.jsxs(ve,{"aria-label":"Filter threads",active:ne,children:[s.jsx(mn,{size:16}),ne&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"})]})})}),s.jsx(de,{side:"bottom",children:"Filter threads"})]}),s.jsxs(Ue,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(Ye,{label:"View",value:S,onChange:T=>{oe("tasks_panel_group_by_changed",{to_value:T}),A(T)},options:[{value:"flat",label:"List",icon:s.jsx(tn,{size:13})},{value:"status",label:"Status",icon:s.jsx(sn,{size:13})}]}),s.jsx(Ye,{label:"Type",value:C,onChange:T=>{oe("tasks_panel_filter_changed",{to_value:T}),N(T)},options:[{value:"all",label:"All"},{value:"manual",label:"Chats"},{value:"automation",label:"Auto"}]}),s.jsx(Ye,{label:"Scope",value:k?"team":"mine",onChange:T=>z(T==="team"),options:[{value:"mine",label:"Mine"},{value:"team",label:"Team"}]})]})]}),je=T=>s.jsx(et,{delayDuration:300,children:s.jsxs("div",{className:F("shrink-0 px-1 flex items-center justify-between",T?"h-10":"h-10 md:h-7 mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!T&&s.jsx(Jt,{}),fe]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(Dt,{label:"Search threads",onClick:()=>{oe("tasks_panel_search_opened"),L(!0),I(!0)},children:s.jsx(en,{size:16})}),s.jsx(Dt,{label:"New thread",onClick:()=>{Z()},children:s.jsx(vt,{size:16})})]})]})});return ee?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[je(!0),s.jsx(At,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:s.jsx(Pt,{threads:Y,groupBy:S,activeTaskId:b,onSelectTask:q,onArchiveTask:U,filters:P,hasMore:d,isFetchingMore:c,onLoadMore:()=>{m()},filtersActive:ne})}),M&&s.jsx(It,{open:_,onOpenChange:I})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[je(!1),s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(At,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(Pt,{threads:Y,groupBy:S,activeTaskId:b,onSelectTask:q,onArchiveTask:U,filters:P,hasMore:d,isFetchingMore:c,onLoadMore:()=>{m()},filtersActive:ne})})}),M&&s.jsx(It,{open:_,onOpenChange:I})]})}const nl=5,il=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function us(){const t=$.c(3),{state:e}=pe();if(e==="collapsed"){let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:nl}).map(ol)}),t[0]=i):i=t[0],i}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(te,{className:"size-6 rounded-md"}),s.jsx(te,{className:"size-6 rounded-md"}),s.jsx(te,{className:"size-6 rounded-md"})]}),s.jsx(te,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:il.map(ll)})]}),t[2]=l):l=t[2],l}function ll(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(te,{className:"size-5 rounded-full shrink-0"}),s.jsx(te,{className:F("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(rl)})]},e)}function rl(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(te,{className:"h-3 flex-1 rounded-sm"})},e)}function ol(t,e){return s.jsx(te,{className:"size-10 rounded-lg mx-auto"},e)}function al(){const t=$.c(4),e=ss();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Oi,{}),t[0]=n):n=t[0];let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Rt,{children:s.jsx(E.Suspense,{fallback:s.jsx(us,{}),children:s.jsx(ms,{})})}),t[1]=l):l=t[1];let i;return t[2]!==e?(i=s.jsx(Zt,{children:s.jsx(ls,{sections:e,footer:n,additionalContent:l})}),t[2]=e,t[3]=i):i=t[3],i}function cl(t){const e=$.c(8),{onClose:n}=t,l=ss();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Pi,{}),e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(us,{}),e[1]=r):r=e[1];let a;e[2]!==n?(a=s.jsx(Rt,{children:s.jsx(E.Suspense,{fallback:r,children:s.jsx(ms,{onNavigate:n})})}),e[2]=n,e[3]=a):a=e[3];let o;return e[4]!==n||e[5]!==l||e[6]!==a?(o=s.jsx(Zt,{children:s.jsx(_i,{sections:l,onClose:n,footer:i,additionalContent:a})}),e[4]=n,e[5]=l,e[6]=a,e[7]=o):o=e[7],o}function fs(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const dl=ks({name:As().min(2,"Organization name is required")});function ml(t){const e=$.c(41),{open:n,onOpenChange:l}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={resolver:Is(dl),defaultValues:{name:""}},e[0]=i):i=e[0];const r=zs(i);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={mutationFn:fl,onSuccess:ul},e[1]=a):a=e[1];const o=$s(a),d=o.error instanceof Error?o.error.message:o.error?"Failed to create organization.":null;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(Vn,{children:[s.jsx(Yn,{children:"Create a new organization"}),s.jsx(Qn,{children:"Set up a new organization to collaborate with others."})]}),e[2]=c):c=e[2];let m;if(e[3]!==o||e[4]!==r){let N;e[6]!==o?(N=S=>o.mutateAsync(S),e[6]=o,e[7]=N):N=e[7],m=r.handleSubmit(N),e[3]=o,e[4]=r,e[5]=m}else m=e[5];let u;e[8]!==r.formState.isSubmitting?(u=N=>{const{field:S}=N;return s.jsxs(si,{children:[s.jsx(ni,{children:"Organization Name"}),s.jsx(ii,{children:s.jsx(oi,{...S,placeholder:"Acme Inc.",disabled:r.formState.isSubmitting})}),s.jsx(li,{children:"The name of your company or organization"}),S.value&&s.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",s.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",fs(S.value)]})]}),s.jsx(ri,{})]})},e[8]=r.formState.isSubmitting,e[9]=u):u=e[9];let f;e[10]!==r.control||e[11]!==u?(f=s.jsx(ei,{control:r.control,name:"name",render:u}),e[10]=r.control,e[11]=u,e[12]=f):f=e[12];let h;e[13]!==d?(h=d&&s.jsx("div",{className:"text-destructive text-sm mt-2",children:d}),e[13]=d,e[14]=h):h=e[14];let g;e[15]!==o||e[16]!==r?(g=()=>{o.reset(),r.reset()},e[15]=o,e[16]=r,e[17]=g):g=e[17];let j;e[18]!==r.formState.isSubmitting||e[19]!==g?(j=s.jsx(Kn,{disabled:r.formState.isSubmitting,onClick:g,children:"Cancel"}),e[18]=r.formState.isSubmitting,e[19]=g,e[20]=j):j=e[20];const x=!r.formState.isValid||r.formState.isSubmitting;let p;e[21]!==r.formState.isSubmitting?(p=r.formState.isSubmitting?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(Hn,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=r.formState.isSubmitting,e[22]=p):p=e[22];let b;e[23]!==x||e[24]!==p?(b=s.jsx(Je,{type:"submit",variant:"default",disabled:x,children:p}),e[23]=x,e[24]=p,e[25]=b):b=e[25];let v;e[26]!==b||e[27]!==j?(v=s.jsxs(Jn,{children:[j,b]}),e[26]=b,e[27]=j,e[28]=v):v=e[28];let y;e[29]!==v||e[30]!==m||e[31]!==f||e[32]!==h?(y=s.jsxs("form",{className:"space-y-6",onSubmit:m,autoComplete:"off",children:[f,h,v]}),e[29]=v,e[30]=m,e[31]=f,e[32]=h,e[33]=y):y=e[33];let w;e[34]!==r||e[35]!==y?(w=s.jsxs(Xn,{children:[c,s.jsx(ti,{...r,children:y})]}),e[34]=r,e[35]=y,e[36]=w):w=e[36];let C;return e[37]!==l||e[38]!==n||e[39]!==w?(C=s.jsx(Zn,{open:n,onOpenChange:l,children:w}),e[37]=l,e[38]=n,e[39]=w,e[40]=C):C=e[40],C}function ul(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function fl(t){const e=fs(t.name);if(!e)throw new Error("Organization slug is invalid");const n=await he.organization.create({name:t.name,slug:e});if(n?.error)throw new Error(n.error.message||"Failed to create organization");const l=n?.data?.slug??e;if(!l)throw new Error("Failed to create organization");return{orgSlug:l}}function hs(){const t=E.useContext(Ts),{data:e,refetch:n}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(i=>i.status==="pending"&&new Date(i.expiresAt)>new Date),refetch:()=>n?.()}}function hl(t){let e=0;for(let l=0;l<t.length;l++)e=t.charCodeAt(l)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function pt(t){const e=$.c(13),{org:n,size:l}=t,i=l===void 0?"sm":l,r=i==="xs"?"size-5":"size-6",a=i==="xs"?"text-[9px]":"text-xs";let o;e[0]!==r?(o=F(r,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=r,e[1]=o):o=e[1];let d;e[2]!==n.logo||e[3]!==n.name?(d=n.logo?void 0:hl(n.name),e[2]=n.logo,e[3]=n.name,e[4]=d):d=e[4];let c;e[5]!==n.logo||e[6]!==n.name||e[7]!==a?(c=n.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:F("font-semibold leading-none",a),children:n.name.slice(0,2).toUpperCase()}),e[5]=n.logo,e[6]=n.name,e[7]=a,e[8]=c):c=e[8];let m;return e[9]!==o||e[10]!==d||e[11]!==c?(m=s.jsx("div",{className:o,style:d,children:c}),e[9]=o,e[10]=d,e[11]=c,e[12]=m):m=e[12],m}function xl({invitation:t,onChanged:e}){const[n,l]=E.useState(!1),i=t.organizationName??"Unknown organization",r=async()=>{l(!0);try{const d=await he.organization.acceptInvitation({invitationId:t.id});if(d.error){re.error(d.error.message),l(!1);return}}catch{re.error("Failed to accept invitation"),l(!1);return}re.success(`Joined ${i}`),Os();let o;try{o=(await he.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=o?`/${o}`:"/"},a=async()=>{l(!0);try{const o=await he.organization.rejectInvitation({invitationId:t.id});if(o.error){re.error(o.error.message),l(!1);return}re.success("Invitation declined"),l(!1),e()}catch{re.error("Failed to decline invitation"),l(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[s.jsx(pt,{org:{name:i},size:"sm"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"truncate text-sm font-medium",children:i}),s.jsx("p",{className:"truncate text-xs text-muted-foreground",children:"Invited to join"})]}),s.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[s.jsx(Je,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:r,disabled:n,children:"Accept"}),s.jsx(Je,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:a,disabled:n,"aria-label":`Decline invitation to ${i}`,children:s.jsx(qn,{size:14})})]})]})}function pl(t){const e=$.c(29),{orgParam:n,onSelectOrg:l,onCreateOrg:i}=t,{data:r}=Ms(),{invitations:a,refetch:o}=hs();let d;e[0]!==n?(d=(_,I)=>_.slug===n?-1:I.slug===n?1:_.name.localeCompare(I.name),e[0]=n,e[1]=d):d=e[1];const c=[...r??[]].sort(d),[m,u]=E.useState(""),f=m.toLowerCase(),h=f?c.filter(_=>_.name.toLowerCase().includes(f)||_.slug.toLowerCase().includes(f)):c;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ts,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=g):g=e[2];let j;e[3]===Symbol.for("react.memo_cache_sentinel")?(j=_=>u(_.target.value),e[3]=j):j=e[3];let x;e[4]!==m?(x=_=>_.key==="Escape"&&m&&u(""),e[4]=m,e[5]=x):x=e[5];let p;e[6]!==m||e[7]!==x?(p=s.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:m,onChange:j,onKeyDown:x,placeholder:"Search organizations...",className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[6]=m,e[7]=x,e[8]=p):p=e[8];let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx($e,{size:16}),e[9]=b):b=e[9];let v;e[10]!==i?(v=s.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:b}),e[10]=i,e[11]=v):v=e[11];let y;e[12]!==p||e[13]!==v?(y=s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[g,p,v]}),e[12]=p,e[13]=v,e[14]=y):y=e[14];const w="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let C;e[15]!==a||e[16]!==m||e[17]!==o?(C=!m&&a.map(_=>s.jsx(xl,{invitation:_,onChanged:o},_.id)),e[15]=a,e[16]=m,e[17]=o,e[18]=C):C=e[18];const N=h.length===0&&s.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:m?`No organizations match "${m}"`:"No organizations available"});let S;e[19]!==l||e[20]!==n?(S=_=>s.jsxs("button",{type:"button",onClick:()=>l(_.slug),className:F("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",_.slug===n?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[s.jsx(pt,{org:_,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:_.name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:_.slug})]}),_.slug===n&&s.jsx(es,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},_.id),e[19]=l,e[20]=n,e[21]=S):S=e[21];const A=h.map(S);let k;e[22]!==C||e[23]!==N||e[24]!==A?(k=s.jsxs("div",{className:w,children:[C,N,A]}),e[22]=C,e[23]=N,e[24]=A,e[25]=k):k=e[25];let z;return e[26]!==k||e[27]!==y?(z=s.jsxs(s.Fragment,{children:[y,k]}),e[26]=k,e[27]=y,e[28]=z):z=e[28],z}function gl(t){const e=$.c(22),{trigger:n,orgParam:l,align:i,side:r}=t,a=i===void 0?"start":i,o=r===void 0?"bottom":r,d=xe(),[c,m]=E.useState(!1),[u,f]=E.useState(!1);let h;e[0]!==n?(h=s.jsx(ze,{asChild:!0,children:n}),e[0]=n,e[1]=h):h=e[1];const g=String(c);let j;e[2]!==d?(j=C=>{m(!1),d({to:"/$org",params:{org:C}})},e[2]=d,e[3]=j):j=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=()=>{m(!1),f(!0)},e[4]=x):x=e[4];let p;e[5]!==l||e[6]!==g||e[7]!==j?(p=s.jsx(pl,{orgParam:l,onSelectOrg:j,onCreateOrg:x},g),e[5]=l,e[6]=g,e[7]=j,e[8]=p):p=e[8];let b;e[9]!==a||e[10]!==o||e[11]!==p?(b=s.jsx(Ue,{side:o,align:a,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:jl,onCloseAutoFocus:bl,children:p}),e[9]=a,e[10]=o,e[11]=p,e[12]=b):b=e[12];let v;e[13]!==c||e[14]!==h||e[15]!==b?(v=s.jsxs(Ge,{open:c,onOpenChange:m,children:[h,b]}),e[13]=c,e[14]=h,e[15]=b,e[16]=v):v=e[16];let y;e[17]!==u?(y=s.jsx(ml,{open:u,onOpenChange:f}),e[17]=u,e[18]=y):y=e[18];let w;return e[19]!==y||e[20]!==v?(w=s.jsxs(s.Fragment,{children:[v,y]}),e[19]=y,e[20]=v,e[21]=w):w=e[21],w}function bl(t){return t.preventDefault()}function jl(t){t.preventDefault(),t.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function vl(t){const e=$.c(21),{value:n,onChange:l,placeholder:i,onKeyDown:r,className:a,isSearching:o,disabled:d}=t,c=i===void 0?"Search...":i;let m;e[0]!==a?(m=F("shrink-0 w-full border-b border-border h-12",a),e[0]=a,e[1]=m):m=e[1];const u=d?"cursor-not-allowed opacity-50":"cursor-text";let f;e[2]!==u?(f=F("flex items-center gap-2.5 h-12 px-4",u),e[2]=u,e[3]=f):f=e[3];let h;e[4]!==o?(h=o?s.jsx(Lt,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(ts,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=o,e[5]=h):h=e[5];let g;e[6]!==l?(g=b=>l(b.target.value),e[6]=l,e[7]=g):g=e[7];let j;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==g||e[12]!==n?(j=s.jsx("input",{type:"text",value:n,onChange:g,onKeyDown:r,placeholder:c,disabled:d,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=d,e[9]=r,e[10]=c,e[11]=g,e[12]=n,e[13]=j):j=e[13];let x;e[14]!==f||e[15]!==h||e[16]!==j?(x=s.jsxs("label",{className:f,children:[h,j]}),e[14]=f,e[15]=h,e[16]=j,e[17]=x):x=e[17];let p;return e[18]!==m||e[19]!==x?(p=s.jsx("div",{className:m,children:x}),e[18]=m,e[19]=x,e[20]=p):p=e[20],p}const yl="Select an existing agent";function Sl(t){const e=$.c(5),{children:n}=t;let l;e[0]!==n?(l=s.jsx(ce,{asChild:!0,children:n}),e[0]=n,e[1]=l):l=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(de,{side:"right",sideOffset:8,children:yl}),e[2]=i):i=e[2];let r;return e[3]!==l?(r=s.jsxs(me,{defaultOpen:!0,delayDuration:0,children:[l,i]}),e[3]=l,e[4]=r):r=e[4],r}function Nl(t){const e=xe(),{create:n}=Vt(),{locator:l}=se(),i=lt({strict:!1}),r=rt({strict:!1});return async a=>{const o=crypto.randomUUID(),d=a===r.virtualmcpid?vn(t,l,i.taskId??""):null;try{await n({id:o,virtual_mcp_id:a,...d?{branch:d}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:o},search:{virtualmcpid:a}})}}function Qe(t){const e=$.c(20),{agent:n,selected:l,onClick:i}=t,r=l?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let a;e[0]!==r?(a=F("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",r),e[0]=r,e[1]=a):a=e[1];let o;e[2]!==n.icon||e[3]!==n.title?(o=s.jsx(ye,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[2]=n.icon,e[3]=n.title,e[4]=o):o=e[4];let d;e[5]!==n.title?(d=s.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[5]=n.title,e[6]=d):d=e[6];let c;e[7]!==n.description?(c=n.description&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.description}),e[7]=n.description,e[8]=c):c=e[8];let m;e[9]!==d||e[10]!==c?(m=s.jsxs("div",{className:"flex-1 min-w-0",children:[d,c]}),e[9]=d,e[10]=c,e[11]=m):m=e[11];let u;e[12]!==l?(u=l&&s.jsx(es,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=l,e[13]=u):u=e[13];let f;return e[14]!==i||e[15]!==a||e[16]!==o||e[17]!==m||e[18]!==u?(f=s.jsxs("button",{type:"button",onClick:i,className:a,children:[o,m,u]}),e[14]=i,e[15]=a,e[16]=o,e[17]=m,e[18]=u,e[19]=f):f=e[19],f}function Ft(t){const e=$.c(5),{children:n,action:l}=t;let i;e[0]!==n?(i=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),e[0]=n,e[1]=i):i=e[1];let r;return e[2]!==l||e[3]!==i?(r=s.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[i,l]}),e[2]=l,e[3]=i,e[4]=r):r=e[4],r}function _l(t){const e=$.c(27),{onClose:n,onSelectAgent:l,selectedAgentId:i,onImportFromGithub:r}=t,[a,o]=E.useState(""),d=Xt(),c=d??[],{org:m}=se(),{data:u}=he.useSession(),f=u?.user?.id??"anon",h=Ln(d),g=Rn(),j=Nl(m.slug),x=an(d),p=a.toLowerCase(),b=c.filter(Al).filter(B=>!x.has(B.id)).filter(kl).filter(B=>!a||B.title.toLowerCase().includes(p)),v=b.filter(wl),y=b.filter(Cl),w=Re(m.id),C=!a||w.title.toLowerCase().includes(p),N=!!(l&&C);let S;e[0]!==n||e[1]!==l?(S=()=>{l?.(null),n(),o("")},e[0]=n,e[1]=l,e[2]=S):S=e[2];const A=S,k=B=>{if(l){l(B.id),n(),o("");return}Bn({orgId:m.id,userId:f},B.id,h),g(),n(),o(""),j(B.id)},z="flex flex-col max-h-[min(640px,80dvh)]";let _;e[3]!==a?(_=s.jsx(vl,{value:a,onChange:o,placeholder:"Search agents..."}),e[3]=a,e[4]=_):_=e[4];const I="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",M=l&&C&&w&&s.jsx(Qe,{agent:w,selected:!i||i===w.id,onClick:A}),L=y.length>0&&s.jsx(Ft,{children:"Agents"}),P=y.map(B=>s.jsx(Qe,{agent:B,selected:l?i===B.id:void 0,onClick:()=>k(B)},B.id)),D=(v.length>0||!a)&&s.jsx(Ft,{action:s.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[s.jsx(ci,{className:"size-3.5"}),"Import"]}),children:"Code Agents"}),O=v.map(B=>s.jsx(Qe,{agent:B,selected:l?i===B.id:void 0,onClick:()=>k(B)},B.id));let R;e[5]!==N||e[6]!==a||e[7]!==b.length?(R=b.length===0&&!N&&a&&s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:"No agents found"}),e[5]=N,e[6]=a,e[7]=b.length,e[8]=R):R=e[8];let G;e[9]!==R||e[10]!==M||e[11]!==L||e[12]!==P||e[13]!==D||e[14]!==O?(G=s.jsxs("div",{className:I,children:[M,L,P,D,O,R]}),e[9]=R,e[10]=M,e[11]=L,e[12]=P,e[13]=D,e[14]=O,e[15]=G):G=e[15];let V;e[16]!==m.slug?(V={org:m.slug},e[16]=m.slug,e[17]=V):V=e[17];let Y;e[18]!==n?(Y=()=>n(),e[18]=n,e[19]=Y):Y=e[19];let U;e[20]!==V||e[21]!==Y?(U=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(Ps,{to:"/$org/settings/agents",params:V,onClick:Y,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[20]=V,e[21]=Y,e[22]=U):U=e[22];let q;return e[23]!==G||e[24]!==U||e[25]!==_?(q=s.jsxs("div",{className:z,children:[_,G,U]}),e[23]=G,e[24]=U,e[25]=_,e[26]=q):q=e[26],q}function Cl(t){return!Kt(t.metadata)}function wl(t){return Kt(t.metadata)}function kl(t){return!gn(t.id)}function Al(t){return!pn(t.id)}function Il(t){const e=$.c(31);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{compact:l,trigger:i,onSelectAgent:r,selectedAgentId:a,side:o,align:d}=n,c=l===void 0?!1:l,m=o===void 0?"right":o,u=d===void 0?"start":d,[f,h]=E.useState(!1),[g,j]=E.useState(!1),x=ct(),{setOpenMobile:p}=pe(),b=En(),v=b?"border border-border":void 0;let y;e[2]!==b?(y=L=>b?s.jsx(Sl,{children:L}):L,e[2]=b,e[3]=y):y=e[3];const w=y;let C;e[4]!==x||e[5]!==p?(C=()=>{h(!1),x&&p(!1)},e[4]=x,e[5]=p,e[6]=C):C=e[6];const N=C;let S;e[7]!==N?(S=()=>{N(),j(!0)},e[7]=N,e[8]=S):S=e[8];const A=S;let k;e[9]!==N||e[10]!==A||e[11]!==r||e[12]!==f||e[13]!==a?(k=f&&s.jsx(E.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(te,{className:"h-4 w-24"})}),children:s.jsx(_l,{onClose:N,onSelectAgent:r,selectedAgentId:a,onImportFromGithub:A})}),e[9]=N,e[10]=A,e[11]=r,e[12]=f,e[13]=a,e[14]=k):k=e[14];const z=k;let _;e[15]!==u||e[16]!==c||e[17]!==v||e[18]!==b||e[19]!==x||e[20]!==f||e[21]!==z||e[22]!==m||e[23]!==i||e[24]!==w?(_=x?s.jsxs(s.Fragment,{children:[i?s.jsx("button",{type:"button",onClick:()=>h(!0),className:"contents",children:i}):c?w(s.jsx(ve,{"aria-label":"Browse agents",className:F(v),onClick:()=>{oe("agent_browser_opened",{surface:"mobile_drawer"}),h(!0)},children:s.jsx($e,{className:"size-4"})})):s.jsx(K,{children:w(s.jsxs(J,{tooltip:b?void 0:"Browse agents",className:F(v),onClick:()=>{oe("agent_browser_opened",{surface:"mobile_drawer"}),h(!0)},children:[s.jsx($e,{}),s.jsx("span",{children:"New agent"})]}))}),s.jsx(Ut,{open:f,onOpenChange:h,direction:"bottom",children:s.jsxs(Wt,{className:"max-h-[85dvh] p-0",children:[s.jsx(qt,{className:"sr-only",children:"Browse agents"}),z]})})]}):s.jsxs(Ge,{open:f,onOpenChange:L=>{L&&!f&&oe("agent_browser_opened",{surface:"desktop_popover"}),h(L)},children:[i?s.jsx(ze,{asChild:!0,children:i}):c?w(s.jsx(ze,{asChild:!0,children:s.jsx(ve,{"aria-label":"Browse agents",className:F(v),children:s.jsx($e,{className:"size-4"})})})):s.jsx(K,{children:w(s.jsx(ze,{asChild:!0,children:s.jsxs(J,{tooltip:b?void 0:"Browse agents",className:F(v),children:[s.jsx($e,{}),s.jsx("span",{children:"New agent"})]})}))}),s.jsx(Ue,{className:"w-[380px] p-0 overflow-hidden",side:m,align:u,children:z})]}),e[15]=u,e[16]=c,e[17]=v,e[18]=b,e[19]=x,e[20]=f,e[21]=z,e[22]=m,e[23]=i,e[24]=w,e[25]=_):_=e[25];let I;e[26]!==g?(I=s.jsx(ai,{open:g,onOpenChange:j,mode:"agent"}),e[26]=g,e[27]=I):I=e[27];let M;return e[28]!==I||e[29]!==_?(M=s.jsxs(s.Fragment,{children:[_,I]}),e[28]=I,e[29]=_,e[30]=M):M=e[30],M}const zl="wco-no-drag inline-flex items-center gap-1.5 min-w-0 rounded-md px-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function $l(t){const e=$.c(19),{agentId:n,fallback:l,onOpenHome:i,onPick:r}=t,a=mt(n)??l??null,o=a?.title??"Super Agent",d=`Open ${o} home`,c=a?.icon??null;let m;e[0]!==c||e[1]!==o?(m=s.jsx(ye,{icon:c,name:o,size:"xs"}),e[0]=c,e[1]=o,e[2]=m):m=e[2];let u;e[3]!==i||e[4]!==d||e[5]!==m?(u=s.jsx("button",{type:"button",onClick:i,"aria-label":d,className:"wco-no-drag flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:m}),e[3]=i,e[4]=d,e[5]=m,e[6]=u):u=e[6];let f;e[7]!==o?(f=s.jsx("span",{className:"truncate font-medium max-w-[10rem]",children:o}),e[7]=o,e[8]=f):f=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ht,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[9]=h):h=e[9];let g;e[10]!==f?(g=s.jsxs("button",{type:"button",className:zl,children:[f,h]}),e[10]=f,e[11]=g):g=e[11];let j;e[12]!==n||e[13]!==r||e[14]!==g?(j=s.jsx(Il,{side:"bottom",align:"start",selectedAgentId:n,onSelectAgent:r,trigger:g}),e[12]=n,e[13]=r,e[14]=g,e[15]=j):j=e[15];let x;return e[16]!==u||e[17]!==j?(x=s.jsxs("div",{className:"flex items-center gap-1",children:[u,j]}),e[16]=u,e[17]=j,e[18]=x):x=e[18],x}function Et(){const t=$.c(43),{org:e}=se(),{state:n,isMobile:l}=pe(),i=xe();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const a=lt(r);let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},t[1]=o):o=t[1];const d=rt(o),{threads:c}=ut(),{setTaskId:m,createNewTask:u}=ft(),f=hs().invitations.length>0,h=n==="collapsed"||l;let g;t[2]!==e.id?(g=Re(e.id),t[2]=e.id,t[3]=g):g=t[3];const j=g,x=j.id,p=a.taskId?d.virtualmcpid??x:x;let b;t[4]!==u||t[5]!==x||t[6]!==i||t[7]!==e.slug||t[8]!==m||t[9]!==c?(b=O=>{if(!O||O===x){i({to:"/$org",params:{org:e.slug}});return}const R=di(c,O);R?m(R.id,O):u(O)},t[4]=u,t[5]=x,t[6]=i,t[7]=e.slug,t[8]=m,t[9]=c,t[10]=b):b=t[10];const v=b,y=f?`${e.name} — switch organization (pending invitation)`:`${e.name} — switch organization`;let w;t[11]!==e?(w=s.jsx(pt,{org:e,size:"sm"}),t[11]=e,t[12]=w):w=t[12];let C;t[13]!==f||t[14]!==h?(C=f&&s.jsx("span",{className:F("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",h?"-top-1":"top-1/2 -translate-y-1/2")}),t[13]=f,t[14]=h,t[15]=C):C=t[15];let N;t[16]!==w||t[17]!==C?(N=s.jsxs("span",{className:"relative inline-flex",children:[w,C]}),t[16]=w,t[17]=C,t[18]=N):N=t[18];let S;t[19]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ht,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[19]=S):S=t[19];let A;t[20]!==y||t[21]!==N?(A=s.jsx(ce,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":y,className:"wco-no-drag flex items-center gap-1.5 shrink-0 rounded-md pl-3 pr-1.5 py-1.5 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[N,S]})}),t[20]=y,t[21]=N,t[22]=A):A=t[22];let k;t[23]!==e.slug||t[24]!==A?(k=s.jsx(gl,{orgParam:e.slug,trigger:A}),t[23]=e.slug,t[24]=A,t[25]=k):k=t[25];let z;t[26]!==e.name?(z=s.jsx(de,{side:"bottom",children:e.name}),t[26]=e.name,t[27]=z):z=t[27];let _;t[28]!==k||t[29]!==z?(_=s.jsx(St,{children:s.jsxs(me,{children:[k,z]})}),t[28]=k,t[29]=z,t[30]=_):_=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),t[31]=I):I=t[31];const M=p===x?j:void 0;let L;t[32]!==p||t[33]!==v?(L=()=>v(p),t[32]=p,t[33]=v,t[34]=L):L=t[34];let P;t[35]!==p||t[36]!==v||t[37]!==M||t[38]!==L?(P=s.jsx(St,{children:s.jsx(E.Suspense,{fallback:I,children:s.jsx($l,{agentId:p,fallback:M,onOpenHome:L,onPick:v})})}),t[35]=p,t[36]=v,t[37]=M,t[38]=L,t[39]=P):P=t[39];let D;return t[40]!==_||t[41]!==P?(D=s.jsx(Un,{className:"wco-no-drag",children:s.jsxs(Wn,{className:"flex-nowrap gap-1.5 sm:gap-1.5",children:[_,P]})}),t[40]=_,t[41]=P,t[42]=D):D=t[42],D}const Tl="sidebar.open";function Ml(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Fs,{}),t[0]=e):e=t[0],e}function Ko(){const t=$.c(27),e=ct(),n=mi(),[l,i]=He(Tl,!1),{width:r,wrapperRef:a,onStartResize:o,resetWidth:d}=xi();let c;t[0]!==e||t[1]!==n?(c=e?s.jsxs(Q.Header,{className:"grid-cols-1 px-1 pr-1",children:[s.jsxs("div",{className:"grid w-full grid-cols-[auto_auto_auto_1fr_auto_auto] items-center gap-2",children:[!n&&s.jsx(Jt,{}),!n&&s.jsx(Et,{}),!n&&s.jsx(nt,{}),s.jsx("div",{"aria-hidden":!0,className:"min-w-0"}),s.jsx(Q.TogglesSlot,{}),!n&&s.jsx(Q.TabsSlot,{className:"min-w-0 justify-self-end"})]}),!n&&s.jsx(Q.CenterSlot,{}),!n&&s.jsx(Q.RightSlot,{})]}):s.jsxs(Q.Header,{children:[s.jsxs(Q.LeftColumn,{children:[!n&&s.jsx(Et,{}),s.jsx(Q.TogglesSlot,{})]}),n?s.jsx("div",{"aria-hidden":!0}):s.jsx(Q.CenterSlot,{}),s.jsx(Q.RightColumn,{children:!n&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end items-center gap-0.5",children:s.jsx(Q.TabsSlot,{})}),s.jsx(Q.RightSlot,{})]})})]}),t[0]=e,t[1]=n,t[2]=c):c=t[2];const m=`${r}px`;let u;t[3]!==m?(u={"--sidebar-width":m,"--sidebar-width-icon":"3.5rem"},t[3]=m,t[4]=u):u=t[4];const f=u;let h;t[5]!==e||t[6]!==o||t[7]!==n||t[8]!==d?(h=!e&&!n&&s.jsxs(s.Fragment,{children:[s.jsx(al,{}),s.jsx(ui,{onPointerDown:o,onDoubleClick:d})]}),t[5]=e,t[6]=o,t[7]=n,t[8]=d,t[9]=h):h=t[9];let g;t[10]===Symbol.for("react.memo_cache_sentinel")?(g={background:"transparent",containerType:"inline-size"},t[10]=g):g=t[10];let j;t[11]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Rs,{className:"flex flex-col",style:g,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(E.Suspense,{fallback:s.jsx(Ml,{}),children:s.jsx(Ds,{})})})})}),t[11]=j):j=t[11];let x;t[12]!==f||t[13]!==h||t[14]!==a?(x=s.jsxs(Bs,{ref:a,className:"flex-1 bg-sidebar relative min-h-0",style:f,children:[h,j]}),t[12]=f,t[13]=h,t[14]=a,t[15]=x):x=t[15];let p;t[16]!==e||t[17]!==n?(p=e&&!n&&s.jsx($n,{renderSidebar:Ol}),t[16]=e,t[17]=n,t[18]=p):p=t[18];let b;t[19]!==c||t[20]!==x||t[21]!==p?(b=s.jsx(Gn,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[c,x,p]})}),t[19]=c,t[20]=x,t[21]=p,t[22]=b):b=t[22];let v;return t[23]!==i||t[24]!==l||t[25]!==b?(v=s.jsx(jn,{children:s.jsx(Q.Provider,{children:s.jsx(Hs,{open:l,onOpenChange:i,children:b})})}),t[23]=i,t[24]=l,t[25]=b,t[26]=v):v=t[26],v}function Ol(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(cl,{onClose:e})})})}export{Ko as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as it,r as b,j as e,i as rt}from"./index-CZiyq9bL.js";import{m as mt,o as pt,p as st,q as at}from"./sidebar-Dvoriw7V.js";import{B as nt}from"./automation-runs-BTJrtjXJ.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-BAwWoCrB.js";import{v as xt}from"./index-AQ-qvM9M.js";import"./LayoutLeft-Lv2ZhZwN.js";import"./use-mobile-Cpcc36Em.js";import"./X-BsHMY5bm.js";import"./tooltip-BvZsaZo1.js";import"./select-BloW6tH6.js";import"./Check-ByMMRPdN.js";import"./ChevronDown-Ds93wwRe.js";import"./ChevronUp-hSMVM7_9.js";import"./useInfiniteQuery-oZPFa0FQ.js";import"./use-infinite-scroll-CAwsvAnT.js";import"./use-connection-D6vKxP6c.js";import"./use-collections-0y8z6h6B.js";import"./use-mcp-client-B3WRhZdt.js";import"./constants-B72Xmt_K.js";import"./auth-B4QHxlg3.js";import"./use-virtual-mcp-vpIsUoOg.js";import"./card-DhyAaYbH.js";import"./table-BPvxLDuP.js";import"./empty-state-hC3dFQXj.js";import"./use-members-Cf18JViN.js";import"./use-org-auth-client-C3YxdmcM.js";import"./use-clock-tick-Co2laZ_v.js";import"./AlertCircle-BQoAJ7Pc.js";import"./CheckCircle-uSDvDj68.js";import"./Circle-CIBa1C-R.js";import"./agent-icon-7Bw2_U9B.js";import"./Tool01-BjsyNNOX.js";import"./SwitchHorizontal01-ypxOAaEV.js";import"./Settings02-CO032VQ5.js";import"./XCircle-C_yScwcR.js";import"./ArrowUpRight-CfcRtZ8o.js";import"./ZapSquare-BXCU0Zkc.js";import"./Users03-BgboQghl.js";import"./Loading02-Br4Qsbis.js";import"./ChevronRight-BUqzT2AZ.js";import"./Stars02-RAKDMyiv.js";import"./Copy01-Dn74k5DV.js";import"./ZoomOut-Z_A5DKtk.js";import"./DotsVertical-OqISO6nN.js";import"./Globe01-DCyvmziv.js";import"./Eye-DMTaYgfE.js";import"./FilterLines-BmSHEouM.js";import"./Star01-BEjXt6EU.js";import"./Globe04-iXXVu6cY.js";import"./HardDrive-BOMqphCJ.js";import"./Key01-CyxwtgAw.js";import"./LinkExternal01-CqYi3PbY.js";import"./List-CjQLqVV2.js";import"./Monitor01-Dj7mHFbg.js";import"./Sun-CZYFQMTR.js";import"./Palette-CYfpdldc.js";import"./Play-Ct1jkZWO.js";import"./Plus-BdYdKkzh.js";import"./SearchLg-BKceB_7Q.js";import"./SearchMd-CIebSZD2.js";import"./Shield01-BOKAaJ_3.js";import"./Stars01-CCdr3QPh.js";import"./Trash01-CkdTj_48.js";import"./Upload01-pwMs2gu0.js";import"./User01-CJUJXUar.js";import"./Users01-DXfhOPWM.js";import"./XClose-CAJh-urJ.js";import"./Zap-dPP-v905.js";import"./use-automations-CX4ke4Gn.js";import"./studio-tools-rhnNh1x_.js";import"./useSuspenseInfiniteQuery-fOtFcKQk.js";import"./badge-Be_N2FuK.js";import"./checkbox-CAOM_6bX.js";import"./command-CzaPqse4.js";import"./index-DBpZEK7p.js";import"./dialog-DCS2OMH4.js";import"./popover-BtkVBk9O.js";import"./avatar-Btcoxp_w.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DEsN1JWA.js";import"./file-type-icon-DOhIggRJ.js";import"./tab-id-C4S0EPFu.js";import"./monaco-editor-CP8nMfPS.js";import"./index-BS7P87_E.js";import"./chat-context-CSDQ2V59.js";import"./autosend-DQZl8KyP.js";import"./hooks-BQcGIBer.js";import"./decopilot-sse-pool-C_JJ7Vcr.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-Df_6Lv76.js";import"./use-decopilot-events-DepdMgPX.js";import"./use-organization-settings-D6NjaCfk.js";import"./types-tGK3rxv3.js";import"./shell-layout-DzGqfR6q.js";import"./alert-dialog-Byb-84-w.js";import"./required-auth-layout-DGg5Hfsv.js";import"./use-org-sso-reL-KJxj.js";import"./integration-icon-BSkS97aB.js";import"./use-navigate-to-agent-IHN5iTDI.js";import"./reusable-new-chat-qqWu133U.js";import"./use-mcp-prompts-C1R-WVFz.js";import"./form-TXHpDJV5.js";import"./label-DeNhnW1K.js";import"./input-DnW5bl5u.js";import"./switch-BSaVqgeH.js";import"./drawer-3OE7N_2G.js";import"./collection-search-Dq5OTSM6.js";import"./tabs-BwxHAAl0.js";import"./toggle-group-Dh7bEZa1.js";import"./agent-capabilities-Bbkrqncd.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-uIsG5TxJ.js";import"./use-registry-connections-Cs9PospA.js";import"./extract-connection-data-qlF7ZWrt.js";import"./collection-tabs-C-L6t4af.js";import"./textarea-ByYUJCqn.js";import"./connection-form-helpers-BEcWB5x3.js";import"./authenticate-and-persist-oauth-BnshO0o5.js";import"./mcp-oauth-B6n4lY5H.js";import"./connect-desktop-dialog-B05P9T9A.js";import"./select-model-CXs0fKE0.js";import"./skeleton-Ky3jBeUP.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C9xZekaQ.js";import"./dropdown-menu-DcvaX3-F.js";import"./index-CN-uq_6E.js";import"./toolbar-BR5ie4nh.js";import"./use-debounced-value-BpYGxCFi.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-I1tajHMm.js";import"./use-mcp-tools-BVxAk373.js";import"./use-capability-WrhvLN3Q.js";import"./tools-list-CfZBf99o.js";import"./use-debounced-autosave-ykAA77u8.js";import"./index-v5fWJqXW.js";import"./search-input-DbIhh1K9.js";import"./github-repo-picker-ks7lf0Ye.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-kk5sLuVp.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./index-BbP2mJoY.js";import"./get-initials-D-f_fDFw.js";import"./calendar-C4lHCPAe.js";import"./toolbar-icon-button-CD0nzSrw.js";import"./automation-list-row-BaV_jeUH.js";import"./use-file-configs-DKRnyJ3w.js";function ni(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]=b.useState(k),[tt,i]=b.useState(null),[J,g]=b.useState(void 0),[x,y]=b.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 B=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const M=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const V=F,q=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,z=m.kind==="site"&&o&&n,A=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const H=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const $=O;let l;t[13]!==q?(l=e.jsx(mt,{className:"text-sm font-semibold",children:q}),t[13]=q,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==$||t[22]!==H||t[23]!==B||t[24]!==v||t[25]!==h||t[26]!==A||t[27]!==x||t[28]!==M||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==z||t[37]!==_?(S=!o||!T&&!z?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:A}):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:B,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:H,onBumpFormKey:$}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:M})})})}),t[20]=p,t[21]=$,t[22]=H,t[23]=B,t[24]=v,t[25]=h,t[26]=A,t[27]=x,t[28]=M,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=z,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let E;return t[42]!==V||t[43]!==N||t[44]!==f?(E=e.jsx(at,{open:N,onOpenChange:V,children:f}),t[42]=V,t[43]=N,t[44]=f,t[45]=E):E=t[45],E}function yt(u){return u+1}function wt(u){return u+1}export{ni as SeoSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as w,$ as H,j as A}from"./index-CZiyq9bL.js";import{a as L,g as E,s as b}from"./automation-runs-BTJrtjXJ.js";import{u as O}from"./use-mcp-client-B3WRhZdt.js";import{p as k}from"./constants-B72Xmt_K.js";import{b as q,c as B}from"./use-mcp-tools-BVxAk373.js";import{u as Y}from"./index-AQ-qvM9M.js";import{c as G}from"./monaco-editor-CP8nMfPS.js";import{g as K,M as V,a as $}from"./types-tGK3rxv3.js";import{a as z,u as F}from"./chat-context-CSDQ2V59.js";import{u as J}from"./shell-layout-DzGqfR6q.js";import"./select-BloW6tH6.js";import"./tooltip-BvZsaZo1.js";import"./Check-ByMMRPdN.js";import"./ChevronDown-Ds93wwRe.js";import"./ChevronUp-hSMVM7_9.js";import"./useInfiniteQuery-oZPFa0FQ.js";import"./use-infinite-scroll-CAwsvAnT.js";import"./use-connection-D6vKxP6c.js";import"./use-collections-0y8z6h6B.js";import"./use-virtual-mcp-vpIsUoOg.js";import"./card-DhyAaYbH.js";import"./sidebar-Dvoriw7V.js";import"./LayoutLeft-Lv2ZhZwN.js";import"./use-mobile-Cpcc36Em.js";import"./X-BsHMY5bm.js";import"./table-BPvxLDuP.js";import"./empty-state-hC3dFQXj.js";import"./use-members-Cf18JViN.js";import"./use-org-auth-client-C3YxdmcM.js";import"./use-clock-tick-Co2laZ_v.js";import"./AlertCircle-BQoAJ7Pc.js";import"./CheckCircle-uSDvDj68.js";import"./Circle-CIBa1C-R.js";import"./agent-icon-7Bw2_U9B.js";import"./Tool01-BjsyNNOX.js";import"./SwitchHorizontal01-ypxOAaEV.js";import"./Settings02-CO032VQ5.js";import"./XCircle-C_yScwcR.js";import"./ArrowUpRight-CfcRtZ8o.js";import"./ZapSquare-BXCU0Zkc.js";import"./Users03-BgboQghl.js";import"./Loading02-Br4Qsbis.js";import"./ChevronRight-BUqzT2AZ.js";import"./Stars02-RAKDMyiv.js";import"./Copy01-Dn74k5DV.js";import"./ZoomOut-Z_A5DKtk.js";import"./DotsVertical-OqISO6nN.js";import"./Globe01-DCyvmziv.js";import"./Eye-DMTaYgfE.js";import"./FilterLines-BmSHEouM.js";import"./Star01-BEjXt6EU.js";import"./Globe04-iXXVu6cY.js";import"./HardDrive-BOMqphCJ.js";import"./Key01-CyxwtgAw.js";import"./LinkExternal01-CqYi3PbY.js";import"./List-CjQLqVV2.js";import"./Monitor01-Dj7mHFbg.js";import"./Sun-CZYFQMTR.js";import"./Palette-CYfpdldc.js";import"./Play-Ct1jkZWO.js";import"./Plus-BdYdKkzh.js";import"./SearchLg-BKceB_7Q.js";import"./SearchMd-CIebSZD2.js";import"./Shield01-BOKAaJ_3.js";import"./Stars01-CCdr3QPh.js";import"./Trash01-CkdTj_48.js";import"./Upload01-pwMs2gu0.js";import"./User01-CJUJXUar.js";import"./Users01-DXfhOPWM.js";import"./XClose-CAJh-urJ.js";import"./Zap-dPP-v905.js";import"./use-automations-CX4ke4Gn.js";import"./studio-tools-rhnNh1x_.js";import"./useSuspenseInfiniteQuery-fOtFcKQk.js";import"./badge-Be_N2FuK.js";import"./checkbox-CAOM_6bX.js";import"./command-CzaPqse4.js";import"./index-DBpZEK7p.js";import"./dialog-DCS2OMH4.js";import"./popover-BtkVBk9O.js";import"./avatar-Btcoxp_w.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DEsN1JWA.js";import"./file-type-icon-DOhIggRJ.js";import"./tab-id-C4S0EPFu.js";import"./hooks-BQcGIBer.js";import"./decopilot-sse-pool-C_JJ7Vcr.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./integration-icon-BSkS97aB.js";import"./use-navigate-to-agent-IHN5iTDI.js";import"./reusable-new-chat-qqWu133U.js";import"./use-mcp-prompts-C1R-WVFz.js";import"./form-TXHpDJV5.js";import"./label-DeNhnW1K.js";import"./input-DnW5bl5u.js";import"./auth-B4QHxlg3.js";import"./drawer-3OE7N_2G.js";import"./collection-search-Dq5OTSM6.js";import"./autosend-DQZl8KyP.js";import"./tabs-BwxHAAl0.js";import"./toggle-group-Dh7bEZa1.js";import"./agent-capabilities-Bbkrqncd.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-uIsG5TxJ.js";import"./use-registry-connections-Cs9PospA.js";import"./use-organization-settings-D6NjaCfk.js";import"./extract-connection-data-qlF7ZWrt.js";import"./collection-tabs-C-L6t4af.js";import"./textarea-ByYUJCqn.js";import"./connection-form-helpers-BEcWB5x3.js";import"./authenticate-and-persist-oauth-BnshO0o5.js";import"./mcp-oauth-B6n4lY5H.js";import"./use-ai-providers-Df_6Lv76.js";import"./connect-desktop-dialog-B05P9T9A.js";import"./select-model-CXs0fKE0.js";import"./skeleton-Ky3jBeUP.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C9xZekaQ.js";import"./dropdown-menu-DcvaX3-F.js";import"./index-CN-uq_6E.js";import"./alert-dialog-Byb-84-w.js";import"./toolbar-BR5ie4nh.js";import"./use-debounced-value-BpYGxCFi.js";import"./index-BS7P87_E.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-I1tajHMm.js";import"./use-decopilot-events-DepdMgPX.js";import"./use-capability-WrhvLN3Q.js";import"./tools-list-CfZBf99o.js";import"./switch-BSaVqgeH.js";import"./use-debounced-autosave-ykAA77u8.js";import"./index-v5fWJqXW.js";import"./search-input-DbIhh1K9.js";import"./github-repo-picker-ks7lf0Ye.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-kk5sLuVp.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./index-BbP2mJoY.js";import"./get-initials-D-f_fDFw.js";import"./calendar-C4lHCPAe.js";import"./toolbar-icon-button-CD0nzSrw.js";import"./automation-list-row-BaV_jeUH.js";import"./use-file-configs-DKRnyJ3w.js";import"./required-auth-layout-DGg5Hfsv.js";import"./use-org-sso-reL-KJxj.js";const Q={};function W(S){const t=w.c(37),{client:e,resourceURI:h,tool:o,connectionId:p,orgId:l,args:M}=S,{sendMessage:I}=z(),{setAppContext:d,clearAppContext:n}=F(),{setChatOpen:f,openTab:g}=J(),r=`${p}:${o.name}`;let a;t[0]!==g?(a=C=>C==="inline"?(g("0"),"inline"):"fullscreen",t[0]=g,t[1]=a):a=t[1];const m=a,s=M??Q;let c;t[2]!==e||t[3]!==o.name||t[4]!==s?(c={client:e,toolName:o.name,toolArguments:s},t[2]=e,t[3]=o.name,t[4]=s,t[5]=c):c=t[5];const{data:i}=B(c);let x;if(t[6]!==o._meta||t[7]!==o.name){const C=E(o._meta);x=b(o.name,C),t[6]=o._meta,t[7]=o.name,t[8]=x}else x=t[8];const U=x;let u;t[9]!==o.inputSchema?(u=o.inputSchema??{type:"object"},t[9]=o.inputSchema,t[10]=u):u=t[10];let N;t[11]!==U||t[12]!==u||t[13]!==o?(N={...o,name:U,inputSchema:u},t[11]=U,t[12]=u,t[13]=o,t[14]=N):N=t[14];const j=N;let _;t[15]!==I||t[16]!==f?(_=C=>{const D=G(C.content);D.content.length>0&&(f(!0),I({tiptapDoc:D}))},t[15]=I,t[16]=f,t[17]=_):_=t[17];const y=_;let P;t[18]!==j?(P={tool:j},t[18]=j,t[19]=P):P=t[19];let T;t[20]!==d||t[21]!==r?(T=C=>d(r,C),t[20]=d,t[21]=r,t[22]=T):T=t[22];let R;t[23]!==n||t[24]!==r?(R=()=>n(r),t[23]=n,t[24]=r,t[25]=R):R=t[25];let v;return t[26]!==e||t[27]!==y||t[28]!==m||t[29]!==l||t[30]!==h||t[31]!==P||t[32]!==T||t[33]!==R||t[34]!==s||t[35]!==i?(v=A.jsx(V,{resourceURI:h,orgId:l,toolInfo:P,toolInput:s,toolResult:i,displayMode:"fullscreen",minHeight:$.fullscreen.minHeight,maxHeight:$.fullscreen.maxHeight,client:e,onMessage:y,onUpdateModelContext:T,onTeardown:R,onRequestDisplayMode:m,className:"h-full"}),t[26]=e,t[27]=y,t[28]=m,t[29]=l,t[30]=h,t[31]=P,t[32]=T,t[33]=R,t[34]=s,t[35]=i,t[36]=v):v=t[36],v}function Lr(S){const t=w.c(24),{connectionId:e,toolName:h,args:o}=S,{org:p}=H(),l=Y();let M;t[0]!==e||t[1]!==l?(M=k(e)&&l.vmEntry?.sandboxProviderKind==="user-desktop"&&l.previewUrl?`${l.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=e,t[1]=l,t[2]=M):M=t[2];const I=M;let d;t[3]!==e||t[4]!==I||t[5]!==p.id||t[6]!==p.slug?(d={connectionId:e,orgId:p.id,orgSlug:p.slug,mcpUrl:I},t[3]=e,t[4]=I,t[5]=p.id,t[6]=p.slug,t[7]=d):d=t[7];const n=O(d);let f;t[8]!==n?(f={client:n},t[8]=n,t[9]=f):f=t[9];const{data:g}=q(f);let r,a,m;t[10]!==h||t[11]!==g.tools?(r=L(decodeURIComponent(h)),m=g.tools.find(i=>i.name===r)??g.tools.find(i=>{const x=E(i._meta);if(!x)return!1;if(b(i.name,x)===r)return!0;const u=b(r,x);return u!==r&&i.name===u}),a=m?._meta?K(m._meta):void 0,t[10]=h,t[11]=g.tools,t[12]=r,t[13]=a,t[14]=m):(r=t[12],a=t[13],m=t[14]);const s=a;if(!m||!s){let i;return t[15]!==r?(i=A.jsx("div",{className:"flex items-center justify-center h-full w-full",children:A.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',r,'" not found or has no UI']})}),t[15]=r,t[16]=i):i=t[16],i}let c;return t[17]!==o||t[18]!==n||t[19]!==e||t[20]!==p.id||t[21]!==s||t[22]!==m?(c=A.jsx(W,{client:n,resourceURI:s,tool:m,connectionId:e,orgId:p.id,args:o}),t[17]=o,t[18]=n,t[19]=e,t[20]=p.id,t[21]=s,t[22]=m,t[23]=c):c=t[23],c}export{Lr as AppViewContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as F,j as r}from"./index-CZiyq9bL.js";import{I as T}from"./input-DnW5bl5u.js";import{L as C}from"./label-DeNhnW1K.js";import{T as L}from"./textarea-ByYUJCqn.js";import{k as A,l as R,S as D,m as J,I as K}from"./index-AQ-qvM9M.js";import{u as M,s as P}from"./primitives-DaNtYP9L.js";import"./SwitchHorizontal01-ypxOAaEV.js";import"./chat-context-CSDQ2V59.js";import"./autosend-DQZl8KyP.js";import"./hooks-BQcGIBer.js";import"./use-mcp-client-B3WRhZdt.js";import"./constants-B72Xmt_K.js";import"./auth-B4QHxlg3.js";import"./decopilot-sse-pool-C_JJ7Vcr.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-vpIsUoOg.js";import"./use-collections-0y8z6h6B.js";import"./use-ai-providers-Df_6Lv76.js";import"./studio-tools-rhnNh1x_.js";import"./use-decopilot-events-DepdMgPX.js";import"./tab-id-C4S0EPFu.js";import"./use-organization-settings-D6NjaCfk.js";import"./automation-runs-BTJrtjXJ.js";import"./select-BloW6tH6.js";import"./tooltip-BvZsaZo1.js";import"./Check-ByMMRPdN.js";import"./ChevronDown-Ds93wwRe.js";import"./ChevronUp-hSMVM7_9.js";import"./useInfiniteQuery-oZPFa0FQ.js";import"./use-infinite-scroll-CAwsvAnT.js";import"./use-connection-D6vKxP6c.js";import"./card-DhyAaYbH.js";import"./sidebar-Dvoriw7V.js";import"./LayoutLeft-Lv2ZhZwN.js";import"./use-mobile-Cpcc36Em.js";import"./X-BsHMY5bm.js";import"./table-BPvxLDuP.js";import"./empty-state-hC3dFQXj.js";import"./use-members-Cf18JViN.js";import"./use-org-auth-client-C3YxdmcM.js";import"./use-clock-tick-Co2laZ_v.js";import"./AlertCircle-BQoAJ7Pc.js";import"./CheckCircle-uSDvDj68.js";import"./Circle-CIBa1C-R.js";import"./agent-icon-7Bw2_U9B.js";import"./Tool01-BjsyNNOX.js";import"./Settings02-CO032VQ5.js";import"./XCircle-C_yScwcR.js";import"./ArrowUpRight-CfcRtZ8o.js";import"./ZapSquare-BXCU0Zkc.js";import"./Users03-BgboQghl.js";import"./Loading02-Br4Qsbis.js";import"./ChevronRight-BUqzT2AZ.js";import"./Stars02-RAKDMyiv.js";import"./Copy01-Dn74k5DV.js";import"./ZoomOut-Z_A5DKtk.js";import"./DotsVertical-OqISO6nN.js";import"./Globe01-DCyvmziv.js";import"./Eye-DMTaYgfE.js";import"./FilterLines-BmSHEouM.js";import"./Star01-BEjXt6EU.js";import"./Globe04-iXXVu6cY.js";import"./HardDrive-BOMqphCJ.js";import"./Key01-CyxwtgAw.js";import"./LinkExternal01-CqYi3PbY.js";import"./List-CjQLqVV2.js";import"./Monitor01-Dj7mHFbg.js";import"./Sun-CZYFQMTR.js";import"./Palette-CYfpdldc.js";import"./Play-Ct1jkZWO.js";import"./Plus-BdYdKkzh.js";import"./SearchLg-BKceB_7Q.js";import"./SearchMd-CIebSZD2.js";import"./Shield01-BOKAaJ_3.js";import"./Stars01-CCdr3QPh.js";import"./Trash01-CkdTj_48.js";import"./Upload01-pwMs2gu0.js";import"./User01-CJUJXUar.js";import"./Users01-DXfhOPWM.js";import"./XClose-CAJh-urJ.js";import"./Zap-dPP-v905.js";import"./use-automations-CX4ke4Gn.js";import"./useSuspenseInfiniteQuery-fOtFcKQk.js";import"./badge-Be_N2FuK.js";import"./checkbox-CAOM_6bX.js";import"./command-CzaPqse4.js";import"./index-DBpZEK7p.js";import"./dialog-DCS2OMH4.js";import"./popover-BtkVBk9O.js";import"./avatar-Btcoxp_w.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DEsN1JWA.js";import"./file-type-icon-DOhIggRJ.js";import"./monaco-editor-CP8nMfPS.js";import"./index-BS7P87_E.js";import"./types-tGK3rxv3.js";import"./shell-layout-DzGqfR6q.js";import"./alert-dialog-Byb-84-w.js";import"./required-auth-layout-DGg5Hfsv.js";import"./use-org-sso-reL-KJxj.js";import"./integration-icon-BSkS97aB.js";import"./use-navigate-to-agent-IHN5iTDI.js";import"./reusable-new-chat-qqWu133U.js";import"./use-mcp-prompts-C1R-WVFz.js";import"./form-TXHpDJV5.js";import"./drawer-3OE7N_2G.js";import"./collection-search-Dq5OTSM6.js";import"./tabs-BwxHAAl0.js";import"./toggle-group-Dh7bEZa1.js";import"./agent-capabilities-Bbkrqncd.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-uIsG5TxJ.js";import"./use-registry-connections-Cs9PospA.js";import"./extract-connection-data-qlF7ZWrt.js";import"./collection-tabs-C-L6t4af.js";import"./connection-form-helpers-BEcWB5x3.js";import"./authenticate-and-persist-oauth-BnshO0o5.js";import"./mcp-oauth-B6n4lY5H.js";import"./connect-desktop-dialog-B05P9T9A.js";import"./select-model-CXs0fKE0.js";import"./skeleton-Ky3jBeUP.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-C9xZekaQ.js";import"./dropdown-menu-DcvaX3-F.js";import"./index-CN-uq_6E.js";import"./toolbar-BR5ie4nh.js";import"./use-debounced-value-BpYGxCFi.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-I1tajHMm.js";import"./use-mcp-tools-BVxAk373.js";import"./use-capability-WrhvLN3Q.js";import"./tools-list-CfZBf99o.js";import"./switch-BSaVqgeH.js";import"./use-debounced-autosave-ykAA77u8.js";import"./index-v5fWJqXW.js";import"./search-input-DbIhh1K9.js";import"./github-repo-picker-ks7lf0Ye.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-kk5sLuVp.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./index-BbP2mJoY.js";import"./get-initials-D-f_fDFw.js";import"./calendar-C4lHCPAe.js";import"./toolbar-icon-button-CD0nzSrw.js";import"./automation-list-row-BaV_jeUH.js";import"./use-file-configs-DKRnyJ3w.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"}]},q={authors:"Author"};function Br(S){const t=F.c(34),{orgSlug:v,virtualMcpId:j,branch:w,kind:p,blockKey:g,block:f}=S;let y;t[0]!==w||t[1]!==v||t[2]!==j?(y={orgSlug:v,virtualMcpId:j,branch:w},t[0]=w,t[1]=v,t[2]=j,t[3]=y):y=t[3];const m=A(y);let d;t[4]!==f||t[5]!==p?(d=R(f,p),t[4]=f,t[5]=p,t[6]=d):d=t[6];const B=d;let h;t[7]!==g||t[8]!==p||t[9]!==m?(h=e=>{m.mutate({blockKey:g,data:J(g,p,e)})},t[7]=g,t[8]=p,t[9]=m,t[10]=h):h=t[10];const[i,E]=M(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(D,{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(K,{schema:{type:"string",format:"image-uri",title:o.label},value:i[o.key],onChange:u=>a(o.key,u),path:o.key,label:o.label}):r.jsxs(r.Fragment,{children:[r.jsx(C,{htmlFor:o.key,children:o.label}),o.widget==="textarea"?r.jsx(L,{id:o.key,value:P(i[o.key]),onChange:u=>a(o.key,u.target.value),rows:3}):r.jsx(T,{id:o.key,value:P(i[o.key]),placeholder:o.placeholder,onChange:u=>a(o.key,u.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 x;t[29]!==c?(x=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]=x):x=t[30];let b;return t[31]!==x||t[32]!==n?(b=r.jsxs("div",{className:"flex h-full flex-col",children:[n,x]}),t[31]=x,t[32]=n,t[33]=b):b=t[33],b}export{Br as RecordEditor};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BOz2CQvs.js","assets/index-CZiyq9bL.js","assets/index-C2ybUFaX.css","assets/XCircle-C_yScwcR.js","assets/CheckCircle-uSDvDj68.js","assets/Settings02-CO032VQ5.js","assets/use-mcp-client-B3WRhZdt.js","assets/constants-B72Xmt_K.js","assets/auth-B4QHxlg3.js","assets/useInfiniteQuery-oZPFa0FQ.js","assets/use-infinite-scroll-CAwsvAnT.js","assets/studio-tools-rhnNh1x_.js","assets/badge-Be_N2FuK.js","assets/input-DnW5bl5u.js","assets/dropdown-menu-DcvaX3-F.js","assets/Check-ByMMRPdN.js","assets/ChevronRight-BUqzT2AZ.js","assets/Circle-CIBa1C-R.js","assets/table-BPvxLDuP.js","assets/toggle-group-Dh7bEZa1.js","assets/use-view-mode-CEB4Lc4b.js","assets/use-mobile-Cpcc36Em.js","assets/DotsVertical-OqISO6nN.js","assets/FilterLines-BmSHEouM.js","assets/Globe01-DCyvmziv.js","assets/SearchMd-CIebSZD2.js","assets/dialog-DCS2OMH4.js","assets/X-BsHMY5bm.js","assets/AlertCircle-BQoAJ7Pc.js","assets/Upload01-pwMs2gu0.js","assets/alert-dialog-Byb-84-w.js","assets/card-DhyAaYbH.js","assets/Trash01-CkdTj_48.js","assets/label-DeNhnW1K.js","assets/select-BloW6tH6.js","assets/tooltip-BvZsaZo1.js","assets/ChevronDown-Ds93wwRe.js","assets/ChevronUp-hSMVM7_9.js","assets/switch-BSaVqgeH.js","assets/textarea-ByYUJCqn.js","assets/checkbox-CAOM_6bX.js","assets/Eye-DMTaYgfE.js","assets/LinkExternal01-CqYi3PbY.js","assets/use-copy-DEsN1JWA.js","assets/Copy01-Dn74k5DV.js","assets/Key01-CyxwtgAw.js","assets/Plus-BdYdKkzh.js","assets/mcp-oauth-B6n4lY5H.js","assets/Play-Ct1jkZWO.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as s,j as e,r as i,i as a,aF as o}from"./index-CZiyq9bL.js";import{R as m}from"./require-capability-x8Fj1OOf.js";import"./use-capability-WrhvLN3Q.js";import"./access-gate-AdoS_2mp.js";import"./capability-load-error-pQOhA0uu.js";const n=i.lazy(()=>o(()=>import("./registry-layout-BOz2CQvs.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,45,46,47,48])));function f(){const r=s.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(i.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(n,{})})}),r[0]=t):t=r[0],t}export{f as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BOz2CQvs.js","assets/index-CZiyq9bL.js","assets/index-C2ybUFaX.css","assets/XCircle-C_yScwcR.js","assets/CheckCircle-uSDvDj68.js","assets/Settings02-CO032VQ5.js","assets/use-mcp-client-B3WRhZdt.js","assets/constants-B72Xmt_K.js","assets/auth-B4QHxlg3.js","assets/useInfiniteQuery-oZPFa0FQ.js","assets/use-infinite-scroll-CAwsvAnT.js","assets/studio-tools-rhnNh1x_.js","assets/badge-Be_N2FuK.js","assets/input-DnW5bl5u.js","assets/dropdown-menu-DcvaX3-F.js","assets/Check-ByMMRPdN.js","assets/ChevronRight-BUqzT2AZ.js","assets/Circle-CIBa1C-R.js","assets/table-BPvxLDuP.js","assets/toggle-group-Dh7bEZa1.js","assets/use-view-mode-CEB4Lc4b.js","assets/use-mobile-Cpcc36Em.js","assets/DotsVertical-OqISO6nN.js","assets/FilterLines-BmSHEouM.js","assets/Globe01-DCyvmziv.js","assets/SearchMd-CIebSZD2.js","assets/dialog-DCS2OMH4.js","assets/X-BsHMY5bm.js","assets/AlertCircle-BQoAJ7Pc.js","assets/Upload01-pwMs2gu0.js","assets/alert-dialog-Byb-84-w.js","assets/card-DhyAaYbH.js","assets/Trash01-CkdTj_48.js","assets/label-DeNhnW1K.js","assets/select-BloW6tH6.js","assets/tooltip-BvZsaZo1.js","assets/ChevronDown-Ds93wwRe.js","assets/ChevronUp-hSMVM7_9.js","assets/switch-BSaVqgeH.js","assets/textarea-ByYUJCqn.js","assets/checkbox-CAOM_6bX.js","assets/Eye-DMTaYgfE.js","assets/LinkExternal01-CqYi3PbY.js","assets/use-copy-DEsN1JWA.js","assets/Copy01-Dn74k5DV.js","assets/Key01-CyxwtgAw.js","assets/Plus-BdYdKkzh.js","assets/mcp-oauth-B6n4lY5H.js","assets/Play-Ct1jkZWO.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as m,b as n,e as c,j as t,i as p,r as l,aF as f}from"./index-CZiyq9bL.js";import{R as u}from"./require-capability-x8Fj1OOf.js";import"./use-capability-WrhvLN3Q.js";import"./access-gate-AdoS_2mp.js";import"./capability-load-error-pQOhA0uu.js";const g=l.lazy(()=>f(()=>import("./registry-layout-BOz2CQvs.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,45,46,47,48])));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(p,{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{I as u}from"./use-infinite-scroll-CAwsvAnT.js";import{cy as i}from"./index-CZiyq9bL.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as s}from"./use-infinite-scroll-CAwsvAnT.js";import{cy as u,F as n}from"./index-CZiyq9bL.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
|