decocms 4.185.0 → 4.185.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-V085S0Pa.js → AlertCircle-KPguPBGm.js} +1 -1
- package/dist/client/assets/{AreaChart-Dk805qn_.js → AreaChart-CAk9izFg.js} +1 -1
- package/dist/client/assets/{ArrowUp-C9UWPdVM.js → ArrowUp-5-vE3Y-t.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-C8ZO6yTj.js → ArrowUpRight-BX-0UQAB.js} +1 -1
- package/dist/client/assets/{Check-Cqu1sm5i.js → Check-zUd_QT2q.js} +1 -1
- package/dist/client/assets/{CheckCircle-58nsPrz3.js → CheckCircle-DxrvyQ5A.js} +1 -1
- package/dist/client/assets/{ChevronDown-CWZ3qf02.js → ChevronDown-CaJA92Nc.js} +1 -1
- package/dist/client/assets/{ChevronRight-ClixI25K.js → ChevronRight-Dd5gQ2v2.js} +1 -1
- package/dist/client/assets/{ChevronUp-BCfyXEAY.js → ChevronUp-DGesdzht.js} +1 -1
- package/dist/client/assets/{Copy01-89aQXb7e.js → Copy01-E3-Dm-1Y.js} +1 -1
- package/dist/client/assets/{CpuChip01-DvaYOhxd.js → CpuChip01-CyKtAuV2.js} +1 -1
- package/dist/client/assets/{CreditCard01--RHiUbi0.js → CreditCard01-Cy5s4DS_.js} +1 -1
- package/dist/client/assets/{DotsVertical-baaFmJMo.js → DotsVertical-l751O1wE.js} +1 -1
- package/dist/client/assets/{Eye-DxFQatat.js → Eye-DU1yPSl0.js} +1 -1
- package/dist/client/assets/{FilterLines-Dc-pqizf.js → FilterLines-Dc641UWn.js} +1 -1
- package/dist/client/assets/{HardDrive-C0i1Llub.js → HardDrive-BLYFa0ED.js} +1 -1
- package/dist/client/assets/{Key01-oNriuSfC.js → Key01-SLQn2Q6-.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DqZQYyx2.js → LayoutLeft-B-KueF_z.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Bgj6Xen5.js → LinkExternal01-nYBgTsY7.js} +1 -1
- package/dist/client/assets/{LogOut01-CFBzaCRF.js → LogOut01-CYUCmD4z.js} +1 -1
- package/dist/client/assets/{Monitor01-WABvYToh.js → Monitor01-DONjZei2.js} +1 -1
- package/dist/client/assets/{Palette-CkTgNE83.js → Palette-DMhGF54s.js} +1 -1
- package/dist/client/assets/{Play-BsgE30l1.js → Play-B4agzwa_.js} +1 -1
- package/dist/client/assets/{Plus-B4ad1Xzu.js → Plus-DHWL-5ue.js} +1 -1
- package/dist/client/assets/{SearchLg-C-KlruU1.js → SearchLg-D3suIJQB.js} +1 -1
- package/dist/client/assets/{SearchMd-rT38ISix.js → SearchMd-9sYqUfQr.js} +1 -1
- package/dist/client/assets/{Settings02-DB25sFsF.js → Settings02-BiLqURxm.js} +1 -1
- package/dist/client/assets/{Shield01-BylB6rER.js → Shield01-CdPtQ9oE.js} +1 -1
- package/dist/client/assets/{Star01--sqF6mpt.js → Star01-DHNoUZ8W.js} +1 -1
- package/dist/client/assets/{Stars01-NIErpwdy.js → Stars01-DguxstxU.js} +1 -1
- package/dist/client/assets/{Stars02-CcT6UTOD.js → Stars02-B0pwMUal.js} +1 -1
- package/dist/client/assets/{Sun-C95T18Lj.js → Sun-CBfsI5sL.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CZ_I6szQ.js → SwitchHorizontal01-BnrpN_pd.js} +1 -1
- package/dist/client/assets/{Tool01-CS7usoIz.js → Tool01-C54-EP2l.js} +1 -1
- package/dist/client/assets/{Tool02-CTuV70QB.js → Tool02-5QUathTf.js} +1 -1
- package/dist/client/assets/{Trash01-CG7LoM8O.js → Trash01-CA5lV2TJ.js} +1 -1
- package/dist/client/assets/{TrendUp01-CIsNY6CN.js → TrendUp01-BKgaFjOl.js} +1 -1
- package/dist/client/assets/{Upload01-DcmkD5kc.js → Upload01-CpBrfLko.js} +1 -1
- package/dist/client/assets/{User01-DZkrYOhm.js → User01-9aFmgZ1-.js} +1 -1
- package/dist/client/assets/{Users01-C7ex4BR1.js → Users01-BiWt2vwl.js} +1 -1
- package/dist/client/assets/{Users03-C4Ud2US3.js → Users03-CgRazaEZ.js} +1 -1
- package/dist/client/assets/{X-DpuJ_Jz0.js → X-CygpQK3F.js} +1 -1
- package/dist/client/assets/{XCircle-DI1tEi91.js → XCircle-5JjMDtMQ.js} +1 -1
- package/dist/client/assets/{XClose-Cr7wdfRL.js → XClose-DmlfG_Tn.js} +1 -1
- package/dist/client/assets/{Zap-BQVen7xN.js → Zap-CPqtpdBH.js} +1 -1
- package/dist/client/assets/{ZapSquare-FefSSr5u.js → ZapSquare-Wi28ZGpq.js} +1 -1
- package/dist/client/assets/{access-gate-BZKafDXH.js → access-gate-BVOsRzSt.js} +1 -1
- package/dist/client/assets/{add-section-modal-C8cUIbZA.js → add-section-modal-DKX3WnuQ.js} +1 -1
- package/dist/client/assets/{agent-icon-D7Gh_Q1A.js → agent-icon-yFrZRWWC.js} +1 -1
- package/dist/client/assets/{agents-list-BkE_0HIA.js → agents-list-BgxDLokx.js} +1 -1
- package/dist/client/assets/{ai-providers-XwtrfgWc.js → ai-providers-BCT0n2Ca.js} +1 -1
- package/dist/client/assets/{alert-BXi4BHby.js → alert-BtYUPb11.js} +1 -1
- package/dist/client/assets/{alert-dialog-BoFINk0L.js → alert-dialog-BnmHaW6m.js} +1 -1
- package/dist/client/assets/{app-editor-DIjcRLYw.js → app-editor-BJHAR9sZ.js} +1 -1
- package/dist/client/assets/{auth-VOng5GIV.js → auth-DaH3Xdo-.js} +1 -1
- package/dist/client/assets/{auth-catchall-Bp3q4MsQ.js → auth-catchall-HFDwhseW.js} +1 -1
- package/dist/client/assets/{auth-entry-D8k5tpw8.js → auth-entry-CitKt3rP.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CiU5Qi4j.js → auth-split-layout-4RrlfS_7.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DcejIP47.js → authenticate-and-persist-oauth-Ca6Benyo.js} +1 -1
- package/dist/client/assets/{automation-list-row-CIceR1Sb.js → automation-list-row-BX-cuq9v.js} +1 -1
- package/dist/client/assets/{automation-runs-CpA2veTM.js → automation-runs-pZOpKz6Z.js} +1 -1
- package/dist/client/assets/{automations-B0Pw0_ty.js → automations-Vgdn5zds.js} +1 -1
- package/dist/client/assets/{avatar-BROFoyC0.js → avatar-D8e1g_MN.js} +1 -1
- package/dist/client/assets/{badge-BLjTnm5D.js → badge-DABYk3BN.js} +1 -1
- package/dist/client/assets/{billing-BKX1yKrV.js → billing-DRfj7G_8.js} +1 -1
- package/dist/client/assets/{block-document-CYGqdKWr.js → block-document-NRxYA6HX.js} +1 -1
- package/dist/client/assets/{brand-context-C35BgeXD.js → brand-context-CLkkdQIG.js} +1 -1
- package/dist/client/assets/{buckets-Bj3iG8Wr.js → buckets-yqre6Oih.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CIxpzp-a.js → bulk-category-panel-ChSdQYRb.js} +1 -1
- package/dist/client/assets/{calendar-BF2oF791.js → calendar-xZEo2Y-B.js} +1 -1
- package/dist/client/assets/{capability-load-error-Dp1Om1oX.js → capability-load-error-BnhXf7Av.js} +1 -1
- package/dist/client/assets/{card-Coa4wNbO.js → card-Da7YFGrp.js} +1 -1
- package/dist/client/assets/{category-editor-Cu6zGcng.js → category-editor-DJAkYua7.js} +1 -1
- package/dist/client/assets/{chat-context-CXkstrYM.js → chat-context-T8Q2DCIv.js} +1 -1
- package/dist/client/assets/{checkbox-DIpcufAb.js → checkbox-7p3M-m7Q.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CJm98zHz.js → cli-auth-success-t1Bj7H7o.js} +1 -1
- package/dist/client/assets/{collection-detail-DJUynLOP.js → collection-detail-gGKzNx3W.js} +1 -1
- package/dist/client/assets/{collection-display-button-uBI2AIT5.js → collection-display-button-B6YwI0vw.js} +1 -1
- package/dist/client/assets/{collection-search-B3KKPIB9.js → collection-search-CcSLBLyE.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-k41FK7S4.js → collection-table-wrapper-CjKnUuXu.js} +1 -1
- package/dist/client/assets/{collection-tabs-Bi0FlI8a.js → collection-tabs-CsS3RP5T.js} +1 -1
- package/dist/client/assets/{command-WpgNBnc2.js → command-BBw98-F7.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-D8AQ4VKB.js → commerce-onboarding-BViY9ty1.js} +1 -1
- package/dist/client/assets/{companions-core-CFVll6Bf.js → companions-core-C2JhQAYq.js} +1 -1
- package/dist/client/assets/{connect-CTqNL_Ym.js → connect-B-l6KjGD.js} +1 -1
- package/dist/client/assets/{connection-ei83FdSP.js → connection-0aqTjq3P.js} +1 -1
- package/dist/client/assets/{connection-card-nLj5nbVg.js → connection-card-BGIH-0Vq.js} +1 -1
- package/dist/client/assets/{connection-detail-sPst4s2S.js → connection-detail-B4dZ81mt.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CeQpx7MT.js → connection-form-helpers-QlvN2-A_.js} +1 -1
- package/dist/client/assets/{connections-dBFZBurH.js → connections-BAwxW3HZ.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-BmtYuZmd.js → decopilot-sse-pool-YTmC0fCs.js} +1 -1
- package/dist/client/assets/{dialog-2nTD6kuI.js → dialog-CjCOnsFl.js} +1 -1
- package/dist/client/assets/{domain-settings-L3LeYceQ.js → domain-settings-BbZqPfOd.js} +1 -1
- package/dist/client/assets/{drawer-rbQfHOO1.js → drawer-6SoD0sL8.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DmdPtTwS.js → dropdown-menu-QQ02DMhM.js} +1 -1
- package/dist/client/assets/{empty-state-DjFwkp1m.js → empty-state-DcrL-N1F.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Cq8QzV7f.js → extract-connection-data-DqgEVneY.js} +1 -1
- package/dist/client/assets/{file-explorer-DTi7XMfy.js → file-explorer-BCaoEznc.js} +1 -1
- package/dist/client/assets/{form-8wzS9l69.js → form-BQvRBaeE.js} +1 -1
- package/dist/client/assets/{general-BRDNqzE0.js → general-XRuhUSpj.js} +1 -1
- package/dist/client/assets/{github-repo-picker-sR97GYma.js → github-repo-picker-Dca4SayG.js} +1 -1
- package/dist/client/assets/{hooks-EUE8Lqb7.js → hooks-CVnG0-B1.js} +1 -1
- package/dist/client/assets/{index-YhlrNQ24.js → index-B7uLESEz.js} +1 -1
- package/dist/client/assets/{index-BYFv2F-Q.js → index-BU0UJNRB.js} +3 -3
- package/dist/client/assets/{index-WiMeebBR.js → index-BdpKzPSs.js} +1 -1
- package/dist/client/assets/{index-CM8cE8Rw.js → index-CB1UjAUC.js} +1 -1
- package/dist/client/assets/{index-BEICz9lN.js → index-CH9GT6b8.js} +1 -1
- package/dist/client/assets/{index-DklqYEeT.js → index-CkT3wPKC.js} +1 -1
- package/dist/client/assets/{index-DLFzQzyI.js → index-D4g7g9hv.js} +1 -1
- package/dist/client/assets/{index-CNqUH5Px.js → index-DJ_EZar7.js} +1 -1
- package/dist/client/assets/{index-BRNCnKUf.js → index-DWxK3lE9.js} +36 -36
- package/dist/client/assets/{index-D0MtYpa_.js → index-DZCZPjEx.js} +3 -3
- package/dist/client/assets/{index-B-iEqSLP.js → index-DvN0YsQl.js} +1 -1
- package/dist/client/assets/{index-redirect-BZjy7s0n.js → index-redirect-CYE5toHZ.js} +1 -1
- package/dist/client/assets/{index-CUymriQl.js → index-ylvXBbzV.js} +1 -1
- package/dist/client/assets/{input-DkIop2Qy.js → input-MpmfFVHD.js} +1 -1
- package/dist/client/assets/{integration-icon-347yAb5X.js → integration-icon-DNsPnmBk.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-Da5GRBtU.js → invite-member-dialog-CluYniV9.js} +1 -1
- package/dist/client/assets/{label-BDEnqf7j.js → label-CQD0oV03.js} +1 -1
- package/dist/client/assets/{layout-CJDpvFEC.js → layout-CjJz0dsg.js} +1 -1
- package/dist/client/assets/{login-BlaoThly.js → login-DlrRvYBt.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CchZWCXC.js → mcp-oauth-B0yFBPVK.js} +1 -1
- package/dist/client/assets/{members-DIppIc_X.js → members-Cv5kfwpD.js} +1 -1
- package/dist/client/assets/{monaco-editor-aCXlVkJM.js → monaco-editor-PDb4Y2lB.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Ddg7lG23.js → monitoring-stats-row-D1xQ1aQq.js} +1 -1
- package/dist/client/assets/{multi-select-Bigh7FnP.js → multi-select-B4cJBGV4.js} +1 -1
- package/dist/client/assets/{oauth-callback-XIZAeINW.js → oauth-callback-7IWkrv4z.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-B4KVa6hX.js → oauth-callback-ai-provider-DTi54vkb.js} +1 -1
- package/dist/client/assets/{onboarding-C0WCY2Zg.js → onboarding-l1JIgc9e.js} +1 -1
- package/dist/client/assets/{org-layout-BksITo3b.js → org-layout-wehCwMa-.js} +1 -1
- package/dist/client/assets/{organization-choice-BQDOUzaG.js → organization-choice-DvVVB11o.js} +1 -1
- package/dist/client/assets/{orgs-D9h9ceC8.js → orgs-DPI3ntba.js} +1 -1
- package/dist/client/assets/{page-seo-form-BgMtyEyw.js → page-seo-form-B9FHgo4T.js} +1 -1
- package/dist/client/assets/{popover-p3i6fRNM.js → popover-Cn0TvbaV.js} +1 -1
- package/dist/client/assets/{post-editor-Dy7IbbFs.js → post-editor-CBnotm8v.js} +1 -1
- package/dist/client/assets/{primitives-CzyRHqXD.js → primitives-BK416DDh.js} +1 -1
- package/dist/client/assets/{profile-Dml9wk8T.js → profile-Bnl1nLiO.js} +1 -1
- package/dist/client/assets/project-app-view-CMI2Hy0m.js +1 -0
- package/dist/client/assets/record-editor-BNkogOhR.js +1 -0
- package/dist/client/assets/{redirect-editor-B58bSaJ8.js → redirect-editor-CzfDLthR.js} +1 -1
- package/dist/client/assets/registry-C5jQPerQ.js +2 -0
- package/dist/client/assets/{registry-layout-DcMavOwC.js → registry-layout-DfnSFjyg.js} +1 -1
- package/dist/client/assets/{reports-B6b2CIl_.js → reports-CwNFwau5.js} +1 -1
- package/dist/client/assets/{require-capability-CBHqSknu.js → require-capability-CMb_3iCv.js} +1 -1
- package/dist/client/assets/{required-auth-layout-D09Ls--w.js → required-auth-layout-9IgJ3i--.js} +1 -1
- package/dist/client/assets/{reset-password-CZdEUJIF.js → reset-password-BJ6TKkRf.js} +1 -1
- package/dist/client/assets/{roles-C0Fyj9ow.js → roles-Ds-MjXaU.js} +1 -1
- package/dist/client/assets/{search-input-DEvkqrly.js → search-input-DKp0U_HN.js} +1 -1
- package/dist/client/assets/{secrets-DvtLuM9q.js → secrets-C99WyqSb.js} +1 -1
- package/dist/client/assets/{sections-editor-QPK36tiU.js → sections-editor-BjCje3TN.js} +1 -1
- package/dist/client/assets/{select-7vCEMiqL.js → select-DLzazPIv.js} +1 -1
- package/dist/client/assets/{select-model-B0Rtytw1.js → select-model-CELjIaRZ.js} +1 -1
- package/dist/client/assets/{self-tool-result-za_4Yvt1.js → self-tool-result-BGWHekSV.js} +1 -1
- package/dist/client/assets/{seo-editor-CUXrkmLA.js → seo-editor-B3W3or0_.js} +1 -1
- package/dist/client/assets/{settings-layout-DjnNOc9x.js → settings-layout-ut9Z6uVI.js} +1 -1
- package/dist/client/assets/{settings-section-DldCtl7r.js → settings-section-CeDZRUFa.js} +1 -1
- package/dist/client/assets/{shell-controls-Dn1bzliw.js → shell-controls-BAe3c758.js} +1 -1
- package/dist/client/assets/{shell-layout-BOoDcQ7s.js → shell-layout-DaMW0IXW.js} +1 -1
- package/dist/client/assets/{sidebar-DRvWK2Ea.js → sidebar-BgjDT4ns.js} +1 -1
- package/dist/client/assets/{skeleton-BYbzmvXZ.js → skeleton-CLnfhQZc.js} +1 -1
- package/dist/client/assets/{spinner-bMuJIZjw.js → spinner-CkAPHrqj.js} +1 -1
- package/dist/client/assets/{sso-D7KugfpW.js → sso-DunJvNHr.js} +1 -1
- package/dist/client/assets/{store-CO6cAkyl.js → store-dk74v5Xb.js} +1 -1
- package/dist/client/assets/store-registry-ej_XbDn8.js +2 -0
- package/dist/client/assets/{studio-tools-BkYUkkXB.js → studio-tools-UwhrjoHk.js} +1 -1
- package/dist/client/assets/{switch-ZAofmEnR.js → switch-CHZI77s0.js} +1 -1
- package/dist/client/assets/{tab-id-D5rI6vVb.js → tab-id-uNBvNUga.js} +1 -1
- package/dist/client/assets/{table-Dno7EMp1.js → table-6DaA6SQK.js} +1 -1
- package/dist/client/assets/{tabs-BOIXOLYE.js → tabs-CJKnxP-q.js} +1 -1
- package/dist/client/assets/{textarea-CRxE7M7J.js → textarea-7-pkLaXM.js} +1 -1
- package/dist/client/assets/{toggle-group-DeAKEpbg.js → toggle-group-BD4Fa4SW.js} +1 -1
- package/dist/client/assets/{toolbar-CXgOn6y9.js → toolbar-COUDWDH-.js} +1 -1
- package/dist/client/assets/{tooltip-fl1xzViS.js → tooltip-CiKgrihk.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Bb64oFKS.js → use-ai-providers-BZ4P1fFj.js} +1 -1
- package/dist/client/assets/{use-automations-Bhs4wNxc.js → use-automations-Bbhajq1I.js} +1 -1
- package/dist/client/assets/{use-autosave-CEdct9dQ.js → use-autosave-BJ8tIAZS.js} +1 -1
- package/dist/client/assets/{use-capability-BnycW9CT.js → use-capability-CAPfBvXw.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DLykrXFL.js → use-clock-tick-CidpHbDE.js} +1 -1
- package/dist/client/assets/{use-connection-Df3y6AO1.js → use-connection-CCA94TK7.js} +1 -1
- package/dist/client/assets/{use-copy-aVHJtjAw.js → use-copy-Dbq23Z1X.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-C_CY0w7m.js → use-create-virtual-mcp-CZGbnZRo.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Bb6h4dQ2.js → use-debounced-autosave-7mj7mgjC.js} +1 -1
- package/dist/client/assets/{use-debounced-value-jnidUBIv.js → use-debounced-value-CHetsZoF.js} +1 -1
- package/dist/client/assets/{use-deco-credits-B2dXM2_l.js → use-deco-credits-7mtPxTfw.js} +1 -1
- package/dist/client/assets/{use-decopilot-events--g_MduAT.js → use-decopilot-events-FEQ0L8D5.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Crs7O1-T.js → use-delete-connection-aDO3qdIV.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-2H23kJxF.js → use-deployment-admin-C-zR7dBj.js} +1 -1
- package/dist/client/assets/{use-file-configs-qKumaJ2B.js → use-file-configs-CtjiooR-.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-B4ZgI6uy.js → use-infinite-scroll-jqE08chT.js} +1 -1
- package/dist/client/assets/{use-join-requests-dcYN8JB8.js → use-join-requests-Bgv0C8Lo.js} +1 -1
- package/dist/client/assets/{use-mcp-client-D9UGONLu.js → use-mcp-client-CBRXR7eT.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-FBmzZbPl.js → use-mcp-tools-BmMiJ_2j.js} +1 -1
- package/dist/client/assets/{use-members-D_nOcmS_.js → use-members-BCfZ4LAI.js} +1 -1
- package/dist/client/assets/{use-mobile-DknLG6Ru.js → use-mobile-qPOiMB-b.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CcrKawbg.js → use-navigate-to-agent-C59CFCDz.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-DyN8EUU-.js → use-open-billing-url-CnXcizij.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BPaqoCNz.js → use-org-auth-client-B5WdYrqx.js} +1 -1
- package/dist/client/assets/{use-org-sso-CbObV4Jy.js → use-org-sso-BPxK6HlO.js} +1 -1
- package/dist/client/assets/{use-organization-roles-a6_ShiPq.js → use-organization-roles-DmTyt72e.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CgndneJg.js → use-organization-settings-BcJNy70X.js} +1 -1
- package/dist/client/assets/{use-registry-connections-D14lN-e9.js → use-registry-connections-CT90ldX0.js} +1 -1
- package/dist/client/assets/{use-secrets-Db3rlvJY.js → use-secrets-BHoJ1aX6.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CvdfxQWf.js → use-status-sounds-Bt4U-SE7.js} +1 -1
- package/dist/client/assets/{use-tags-DNCqx0kn.js → use-tags-BKe_5noX.js} +1 -1
- package/dist/client/assets/{use-view-mode-C7Za1ElL.js → use-view-mode-Dco18NdH.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BoBOLkTK.js → use-virtual-mcp-fzQMdInp.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-By-ZOXlj.js +1 -0
- package/dist/client/assets/{useRouterState-BxqnPUql.js → useRouterState-DmEDg2uk.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Cedej5A0.js +1 -0
- package/dist/client/assets/{users-Y8Lfdd61.js → users-C9iAgfLC.js} +1 -1
- package/dist/client/assets/{variant-calendar-zeyNWlli.js → variant-calendar-atES2ut5.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-OLN4pw9l.js → view-mode-toggle-DoZTVC9i.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/project-app-view-b2xvSZO9.js +0 -1
- package/dist/client/assets/record-editor-CqsDr4v5.js +0 -1
- package/dist/client/assets/registry-DHbVpAxH.js +0 -2
- package/dist/client/assets/store-registry-DKSW3dHB.js +0 -2
- package/dist/client/assets/useInfiniteQuery-UZ4MS_PK.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D0yeSOC6.js +0 -1
package/dist/client/assets/{github-repo-picker-sR97GYma.js → github-repo-picker-Dca4SayG.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,j as t,F as de,a as ye,o as me,r as $,ar as le,b as ee,k as Z,e as ge,t as te,d$ as Ne,K as ne,G as ke,n as ve,m as ae,B as re,x as Ce,y as Re}from"./index-D0MtYpa_.js";import{a as we,b as Pe,d as Se,e as Ie}from"./dialog-2nTD6kuI.js";import{C as _e}from"./collection-search-B3KKPIB9.js";import{u as Te}from"./use-debounced-value-jnidUBIv.js";import{b as he,u as Ee}from"./use-connection-Df3y6AO1.js";import{W as Ae,u as se,S as pe}from"./use-mcp-client-D9UGONLu.js";import{a as be}from"./authenticate-and-persist-oauth-DcejIP47.js";import{i as ue}from"./Settings02-DB25sFsF.js";import{n as ze}from"./LinkExternal01-Bgj6Xen5.js";import{R as Le}from"./agent-icon-D7Gh_Q1A.js";import{u as Ge}from"./use-mcp-tools-FBmzZbPl.js";import{e as Oe}from"./extract-connection-data-Cq8QzV7f.js";import{c as Fe}from"./use-navigate-to-agent-CcrKawbg.js";import{g as Ue,p as fe,f as $e,G as xe}from"./provision-repo-scoped-github-connection-B2s3ApVy.js";function D(C){const e=M.c(4),{size:s,className:l}=C;let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=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]=p):p=e[0];let o;return e[1]!==l||e[2]!==s?(o=t.jsx("svg",{width:s,height:s,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:l,children:p}),e[1]=l,e[2]=s,e[3]=o):o=e[3],o}function He(C,e){const s=M.c(12),{org:l}=de();let p;s[0]!==l.id?(p=Ae.REGISTRY(l.id),s[0]=l.id,s[1]=p):p=s[1];const o=p;let a;s[2]!==l.id||s[3]!==l.slug||s[4]!==o?(a={connectionId:o,orgId:l.id,orgSlug:l.slug},s[2]=l.id,s[3]=l.slug,s[4]=o,s[5]=a):a=s[5];const r=se(a);let n;s[6]!==C?(n={name:C},s[6]=C,s[7]=n):n=s[7];const u=e?.enabled??!0;let N;return s[8]!==r||s[9]!==n||s[10]!==u?(N={client:r,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:n,enabled:u,staleTime:3e5,select:De},s[8]=r,s[9]=n,s[10]=u,s[11]=N):N=s[11],Ge(N)}function De(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function Be(C){const{org:e}=de(),{data:s}=ye.useSession(),l=he(),p=me(),[o,a]=$.useState("idle"),[r,n]=$.useState(null),[u,N]=$.useState(null),{data:k,isLoading:P}=He(Me,{enabled:C.enabled}),f=$.useRef(!1);C.enabled&&k&&!P&&!f.current&&s?.user?.id&&o==="idle"&&(f.current=!0,d());async function d(){if(!(!k||!s?.user?.id||!e))try{a("installing"),n(null);const c=Oe(k,e.id,s.user.id,{remoteIndex:0});if(!c.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await l.create.mutateAsync(c);a("authenticating");const j=await be({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:x=>l.update.mutateAsync({id:g,data:{connection_token:x}}).then(()=>{})});if(j.ran&&!j.ok){try{await l.delete.mutateAsync(g)}catch{}throw new Error(j.error&&j.error!=="no token received"?j.error:"No token received from GitHub")}le(p,e.id),N(c),a("ready")}catch(c){n(c instanceof Error?c.message:String(c)),a("error")}}function m(){a("idle"),n(null),N(null),f.current=!1}return C.enabled&&P&&o==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:o,error:r,connection:u,retry:m}}function dt(C){const e=M.c(27),{open:s,onOpenChange:l,title:p,onImportComplete:o,mode:a}=C,r=a===void 0?"agent":a,n=ee();let u;e[0]!==r||e[1]!==n||e[2]!==p?(u=p??n(r==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=r,e[1]=n,e[2]=p,e[3]=u):u=e[3];const N=u,[k,P]=$.useState(null);let f;e[4]!==N?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Pe,{children:N})}),e[4]=N,e[5]=f):f=e[5];let d;e[6]!==N||e[7]!==k||e[8]!==n?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:k?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":n("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:k.avatarUrl,alt:k.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(D,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:N})]})}),e[6]=N,e[7]=k,e[8]=n,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let c;e[11]!==l?(c=()=>l(!1),e[11]=l,e[12]=c):c=e[12];let b;e[13]!==r||e[14]!==o||e[15]!==s||e[16]!==k||e[17]!==c?(b=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx($.Suspense,{fallback:m,children:t.jsx(qe,{open:s,onComplete:c,selectedInstallation:k,onSelectInstallation:P,onImportComplete:o,mode:r})})}),e[13]=r,e[14]=o,e[15]=s,e[16]=k,e[17]=c,e[18]=b):b=e[18];let g;e[19]!==f||e[20]!==d||e[21]!==b?(g=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,b]}),e[19]=f,e[20]=d,e[21]=b,e[22]=g):g=e[22];let j;return e[23]!==l||e[24]!==s||e[25]!==g?(j=t.jsx(Ie,{open:s,onOpenChange:l,children:g}),e[23]=l,e[24]=s,e[25]=g,e[26]=j):j=e[26],j}function qe({open:C,onComplete:e,selectedInstallation:s,onSelectInstallation:l,onImportComplete:p,mode:o="agent"}){const a=ee(),{org:r}=de(),n=me(),u=Fe(),[N,k]=$.useState(null),P=Ee({slug:"mcp-github"}),f=Ue(P),d=Be({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:N,c=se({connectionId:m?.id??"",orgId:r.id,orgSlug:r.slug}),b=se({connectionId:pe,orgId:r.id,orgSlug:r.slug}),g=async(i,y)=>{try{const I=await c.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:y}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},j=(i,y)=>{Promise.all([g(y,"AGENTS.md"),g(y,"CLAUDE.md")]).then(async([v,I])=>{const _=v??I??null;_&&(await b.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:_}}}}),le(n,r.id))}).catch(v=>{console.error("GitHub instructions fetch failed:",v)})},x=ge({mutationFn:async i=>{if(!m||!s)throw new Error("No GitHub connection or installation");const y=s.installationId;if(o==="connection"){const{childConnectionId:R}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:y,owner:i.owner,repo:i.name,githubCallTool:w=>c.callTool(w),selfCallTool:w=>b.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:i,connectionId:R,item:null}}const{childConnectionId:v,reused:I}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:y,owner:i.owner,repo:i.name,githubCallTool:R=>c.callTool(R),selfCallTool:R=>b.callTool(R)});let _=null;try{const R=await b.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:y,connectionId:v},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:v}]}}}),w=R.structuredContent??R,T=w.item?.id;if(!w.item||!T)throw new Error("Failed to create the imported agent");return _=T,{virtualMcpId:T,repo:i,connectionId:v,item:w.item}}catch(R){throw _&&await b.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:_}}).catch(()=>{}),I||await b.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:v,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:i,repo:y,connectionId:v,item:I})=>{if(o==="connection"||!i||!I){le(n,r.id),Ne(n,r.id),te.success(a("common.githubRepoPicker.addedRepo",{name:y.name})),e();return}if(n.setQueryData(ne.collectionItem(b,r.id,"","VIRTUAL_MCP",i),{item:I}),le(n,r.id),j(i,y),p){p({virtualMcpId:i,repo:y,connectionId:v});return}te.success(a("common.githubRepoPicker.importedRepo",{name:y.name})),e(),localStorage.setItem(ke.sidebarOpen(),JSON.stringify(!1)),u(i)},onError:(i,y)=>{console.error("GitHub import failed:",i);const v=i instanceof Error?i.message:a("common.githubRepoPicker.unknownError");if(y.fork&&v.toLowerCase().includes("mint")){te.error(a("common.githubRepoPicker.failedImportFork",{name:y.name}));return}te.error(a("common.githubRepoPicker.failedImport",{error:v}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?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:a("common.githubRepoPicker.selectConnection")})}),f.map(i=>t.jsxs("button",{type:"button",onClick:()=>k(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.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(D,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):m?s?t.jsx(Ke,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,installation:s,onSelectRepo:i=>x.mutate(i),isSaving:x.isPending}):t.jsx(Qe,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,onSelect:l,showBackButton:f.length>1,onBack:()=>k(null)}):null}function Qe(C){const e=M.c(124),{connectionId:s,orgId:l,orgSlug:p,onSelect:o,showBackButton:a,onBack:r}=C,n=ee();let u;e[0]!==l||e[1]!==p?(u={connectionId:pe,orgId:l,orgSlug:p},e[0]=l,e[1]=p,e[2]=u):u=e[2];const N=se(u),k=me(),P=he();let f;e[3]!==s||e[4]!==l?(f=ne.githubUserOrgs(l,s),e[3]=s,e[4]=l,e[5]=f):f=e[5];let d;e[6]!==s||e[7]!==N?(d=()=>$e(h=>N.callTool(h),s),e[6]=s,e[7]=N,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const c=ve(m);let b;e[12]!==P||e[13]!==s||e[14]!==c||e[15]!==l||e[16]!==p||e[17]!==k?(b=async()=>{const h=await be({connectionId:s,orgId:l,orgSlug:p,persistFallback:E=>P.update.mutateAsync({id:s,data:{connection_token:E}}).then(Ve)});if(h.ran&&!h.ok)throw new Error(h.error??"no token received");const S=new URL(`/api/${p}/mcp/${s}`,window.location.origin);await k.invalidateQueries({queryKey:ne.isMCPAuthenticated(S.href,null)}),await k.invalidateQueries({queryKey:ne.mcpClientPrefix()}),await c.refetch()},e[12]=P,e[13]=s,e[14]=c,e[15]=l,e[16]=p,e[17]=k,e[18]=b):b=e[18];let g;e[19]!==n?(g=h=>{te.error(n("common.githubRepoPicker.failedReconnect",{error:h instanceof Error?h.message:n("common.githubRepoPicker.unknownError")}))},e[19]=n,e[20]=g):g=e[20];let j;e[21]!==b||e[22]!==g?(j={mutationFn:b,onError:g},e[21]=b,e[22]=g,e[23]=j):j=e[23];const x=ge(j);if(c.isLoading){let h;return e[24]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=h):h=e[24],h}if(c.isError){let h;e[25]!==n?(h=n("common.githubRepoPicker.failedLoadAccounts"),e[25]=n,e[26]=h):h=e[26];let S;e[27]!==h?(S=t.jsx("p",{className:"text-sm text-destructive",children:h}),e[27]=h,e[28]=S):S=e[28];let E;e[29]!==n?(E=n("common.githubRepoPicker.connectionExpiredMessage"),e[29]=n,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==x?(z=()=>x.mutate(),e[33]=x,e[34]=z):z=e[34];const H=x.isPending;let L;e[35]!==x.isPending?(L=x.isPending?t.jsx(Z,{size:14,className:"animate-spin"}):t.jsx(D,{className:"size-3.5"}),e[35]=x.isPending,e[36]=L):L=e[36];let G;e[37]!==n?(G=n("common.githubRepoPicker.reconnectGitHub"),e[37]=n,e[38]=G):G=e[38];let O;e[39]!==x.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(O=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:H,children:[L,G]}),e[39]=x.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=O):O=e[43];let U;return e[44]!==A||e[45]!==O||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,O]}),e[44]=A,e[45]=O,e[46]=S,e[47]=U):U=e[47],U}const i=c.data;if(!i)return null;if(i.installations.length===0){let h;e[48]!==r||e[49]!==a||e[50]!==n?(h=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[48]=r,e[49]=a,e[50]=n,e[51]=h):h=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==n?(A=n("common.githubRepoPicker.githubConnected"),e[54]=n,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let H;e[58]!==n?(H=n("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=n,e[59]=H):H=e[59];let L;e[60]!==H?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:H}),e[60]=H,e[61]=L):L=e[61];let G;e[62]!==n?(G=n("common.githubRepoPicker.noRepositoriesShared"),e[62]=n,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let U;e[66]!==n?(U=n("common.githubRepoPicker.chooseRepositories"),e[66]=n,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let B;e[69]!==U?(B=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=B):B=e[70];let q;e[71]!==c?(q=()=>{c.refetch()},e[71]=c,e[72]=q):q=e[72];const je=c.isFetching;let Q;e[73]!==c.isFetching?(Q=c.isFetching&&t.jsx(Z,{size:14,className:"animate-spin"}),e[73]=c.isFetching,e[74]=Q):Q=e[74];let V;e[75]!==n?(V=n("common.githubRepoPicker.checkAgain"),e[75]=n,e[76]=V):V=e[76];let K;e[77]!==c.isFetching||e[78]!==q||e[79]!==Q||e[80]!==V?(K=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:q,disabled:je,children:[Q,V]}),e[77]=c.isFetching,e[78]=q,e[79]=Q,e[80]=V,e[81]=K):K=e[81];let J;e[82]!==B||e[83]!==K?(J=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[B,K]}),e[82]=B,e[83]=K,e[84]=J):J=e[84];let W;e[85]!==n?(W=n("common.githubRepoPicker.repositoryAccessNote"),e[85]=n,e[86]=W):W=e[86];let Y;e[87]!==W?(Y=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:W}),e[87]=W,e[88]=Y):Y=e[88];let X;e[89]!==z||e[90]!==L||e[91]!==O||e[92]!==J||e[93]!==Y?(X=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,O,J,Y]}),e[89]=z,e[90]=L,e[91]=O,e[92]=J,e[93]=Y,e[94]=X):X=e[94];let oe;return e[95]!==X||e[96]!==h?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,X]}),e[95]=X,e[96]=h,e[97]=oe):oe=e[97],oe}let y;e[98]!==r||e[99]!==a||e[100]!==n?(y=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[98]=r,e[99]=a,e[100]=n,e[101]=y):y=e[101];let v;if(e[102]!==i.installations||e[103]!==o||e[104]!==n){let h;e[106]!==o||e[107]!==n?(h=S=>t.jsxs("button",{type:"button",onClick:()=>o(S),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:S.avatarUrl,alt:S.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:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:n("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[n("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=o,e[107]=n,e[108]=h):h=e[108],v=i.installations.map(h),e[102]=i.installations,e[103]=o,e[104]=n,e[105]=v}else v=e[105];let I;e[109]!==v?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:v}),e[109]=v,e[110]=I):I=e[110];let _;e[111]!==n?(_=n("common.githubRepoPicker.accountNotListed"),e[111]=n,e[112]=_):_=e[112];let R;e[113]!==n?(R=n("common.githubRepoPicker.installGitHubApp"),e[113]=n,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let T;e[117]!==_||e[118]!==w?(T=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[_," ",w]})}),e[117]=_,e[118]=w,e[119]=T):T=e[119];let F;return e[120]!==I||e[121]!==T||e[122]!==y?(F=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[y,I,T]}),e[120]=I,e[121]=T,e[122]=y,e[123]=F):F=e[123],F}function Ve(){}function Ke(C){const e=M.c(23),{connectionId:s,orgId:l,orgSlug:p,installation:o,onSelectRepo:a,isSaving:r}=C,n=ee(),[u,N]=$.useState(""),k=Te(u,300),P=$.useDeferredValue(k),f=u!==P;let d;e[0]!==n?(d=n("common.githubRepoPicker.searchRepositories"),e[0]=n,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(_e,{placeholder:d,value:u,onChange:N,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const c=f?"opacity-40":"opacity-100";let b;e[6]!==c?(b=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",c),e[6]=c,e[7]=b):b=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=g):g=e[8];let j;e[9]!==s||e[10]!==P||e[11]!==o||e[12]!==r||e[13]!==a||e[14]!==l||e[15]!==p?(j=t.jsx($.Suspense,{fallback:g,children:t.jsx(Je,{connectionId:s,orgId:l,orgSlug:p,installation:o,query:P,onSelectRepo:a,isSaving:r})}),e[9]=s,e[10]=P,e[11]=o,e[12]=r,e[13]=a,e[14]=l,e[15]=p,e[16]=j):j=e[16];let x;e[17]!==b||e[18]!==j?(x=t.jsx("div",{className:b,children:j}),e[17]=b,e[18]=j,e[19]=x):x=e[19];let i;return e[20]!==m||e[21]!==x?(i=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x]}),e[20]=m,e[21]=x,e[22]=i):i=e[22],i}function Je(C){const e=M.c(36),{connectionId:s,orgId:l,orgSlug:p,installation:o,query:a,onSelectRepo:r,isSaving:n}=C,u=ee();let N;e[0]!==s||e[1]!==l||e[2]!==p?(N={connectionId:s,orgId:l,orgSlug:p},e[0]=s,e[1]=l,e[2]=p,e[3]=N):N=e[3];const k=se(N),P=o.type==="User"?"user":"org",f=a?`${P}:${o.login} ${a} in:name fork:true`:`${P}:${o.login} fork:true`;let d;e[4]!==s||e[5]!==o.login||e[6]!==l||e[7]!==a?(d=ne.githubOrgRepos(l,s,o.login,a),e[4]=s,e[5]=o.login,e[6]=l,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==k||e[10]!==f?(m=async x=>{const{signal:i}=x,v=(await k.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:i})).content?.[0]?.text;if(!v)throw new Error("No response from search_repositories");return(JSON.parse(v).items??[]).map(We)},e[9]=k,e[10]=f,e[11]=m):m=e[11];let c;e[12]!==d||e[13]!==m?(c={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=c):c=e[14];const{data:b}=Ce(c);if(b.length===0){let x;e[15]!==u?(x=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=x):x=e[16];let i;e[17]!==x?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[17]=x,e[18]=i):i=e[18];let y;e[19]!==a||e[20]!==u?(y=a&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=a,e[20]=u,e[21]=y):y=e[21];let v;return e[22]!==i||e[23]!==y?(v=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[i,y]}),e[22]=i,e[23]=y,e[24]=v):v=e[24],v}let g;if(e[25]!==n||e[26]!==r||e[27]!==b||e[28]!==u){let x;e[30]!==n||e[31]!==r||e[32]!==u?(x=i=>t.jsxs("button",{type:"button",onClick:()=>r(i),disabled:n,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(D,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:i.name}),i.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),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:[i.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),i.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},i.fullName),e[30]=n,e[31]=r,e[32]=u,e[33]=x):x=e[33],g=b.map(x),e[25]=n,e[26]=r,e[27]=b,e[28]=u,e[29]=g}else g=e[29];let j;return e[34]!==g?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:g}),e[34]=g,e[35]=j):j=e[35],j}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=M.c(51),{status:s,error:l,retry:p}=C,o=ee();if(s==="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(D,{className:"size-5 text-destructive"})}),e[0]=v):v=e[0];let I;e[1]!==o?(I=o("common.githubRepoPicker.connectionFailed"),e[1]=o,e[2]=I):I=e[2];let _;e[3]!==I?(_=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=_):_=e[4];let R;e[5]!==l||e[6]!==o?(R=l??o("common.githubRepoPicker.somethingWentWrong"),e[5]=l,e[6]=o,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let T;e[10]!==_||e[11]!==w?(T=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[_,w]}),e[10]=_,e[11]=w,e[12]=T):T=e[12];let F;e[13]!==o?(F=o("common.githubRepoPicker.tryAgain"),e[13]=o,e[14]=F):F=e[14];let h;e[15]!==p||e[16]!==F?(h=t.jsx("button",{type:"button",onClick:p,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:F}),e[15]=p,e[16]=F,e[17]=h):h=e[17];let S;return e[18]!==T||e[19]!==h?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[v,T,h]}),e[18]=T,e[19]=h,e[20]=S):S=e[20],S}const a=s==="authenticating";let r;e[21]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-foreground"})}),e[21]=r):r=e[21];let n;e[22]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(Z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=n):n=e[22];let u;e[23]!==a||e[24]!==o?(u=o(a?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=a,e[24]=o,e[25]=u):u=e[25];let N;e[26]!==u?(N=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=N):N=e[27];let k;e[28]!==a||e[29]!==o?(k=o(a?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=a,e[29]=o,e[30]=k):k=e[30];let P;e[31]!==k?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:k}),e[31]=k,e[32]=P):P=e[32];let f;e[33]!==N||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[N,P]}),e[33]=N,e[34]=P,e[35]=f):f=e[35];const d=a?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let c;e[38]!==m?(c=t.jsx("span",{className:m}),e[38]=m,e[39]=c):c=e[39];const b=a?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==b?(g=ae("size-1.5 rounded-full",b),e[40]=b,e[41]=g):g=e[41];let j;e[42]!==g?(j=t.jsx("span",{className:g}),e[42]=g,e[43]=j):j=e[43];let x;e[44]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=x):x=e[44];let i;e[45]!==c||e[46]!==j?(i=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,j,x]}),e[45]=c,e[46]=j,e[47]=i):i=e[47];let y;return e[48]!==i||e[49]!==f?(y=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[n,f,i]}),e[48]=i,e[49]=f,e[50]=y):y=e[50],y}export{D as G,dt as a,Be as b,He as u};
|
|
1
|
+
import{c as M,j as t,F as de,a as ye,o as me,r as $,ar as le,b as ee,k as Z,e as ge,t as te,d$ as Ne,K as ne,G as ke,n as ve,m as ae,B as re,x as Ce,y as Re}from"./index-DZCZPjEx.js";import{a as we,b as Pe,d as Se,e as Ie}from"./dialog-CjCOnsFl.js";import{C as _e}from"./collection-search-CcSLBLyE.js";import{u as Te}from"./use-debounced-value-CHetsZoF.js";import{b as he,u as Ee}from"./use-connection-CCA94TK7.js";import{W as Ae,u as se,S as pe}from"./use-mcp-client-CBRXR7eT.js";import{a as be}from"./authenticate-and-persist-oauth-Ca6Benyo.js";import{i as ue}from"./Settings02-BiLqURxm.js";import{n as ze}from"./LinkExternal01-nYBgTsY7.js";import{R as Le}from"./agent-icon-yFrZRWWC.js";import{u as Ge}from"./use-mcp-tools-BmMiJ_2j.js";import{e as Oe}from"./extract-connection-data-DqgEVneY.js";import{c as Fe}from"./use-navigate-to-agent-C59CFCDz.js";import{g as Ue,p as fe,f as $e,G as xe}from"./provision-repo-scoped-github-connection-B2s3ApVy.js";function D(C){const e=M.c(4),{size:s,className:l}=C;let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=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]=p):p=e[0];let o;return e[1]!==l||e[2]!==s?(o=t.jsx("svg",{width:s,height:s,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:l,children:p}),e[1]=l,e[2]=s,e[3]=o):o=e[3],o}function He(C,e){const s=M.c(12),{org:l}=de();let p;s[0]!==l.id?(p=Ae.REGISTRY(l.id),s[0]=l.id,s[1]=p):p=s[1];const o=p;let a;s[2]!==l.id||s[3]!==l.slug||s[4]!==o?(a={connectionId:o,orgId:l.id,orgSlug:l.slug},s[2]=l.id,s[3]=l.slug,s[4]=o,s[5]=a):a=s[5];const r=se(a);let n;s[6]!==C?(n={name:C},s[6]=C,s[7]=n):n=s[7];const u=e?.enabled??!0;let N;return s[8]!==r||s[9]!==n||s[10]!==u?(N={client:r,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:n,enabled:u,staleTime:3e5,select:De},s[8]=r,s[9]=n,s[10]=u,s[11]=N):N=s[11],Ge(N)}function De(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function Be(C){const{org:e}=de(),{data:s}=ye.useSession(),l=he(),p=me(),[o,a]=$.useState("idle"),[r,n]=$.useState(null),[u,N]=$.useState(null),{data:k,isLoading:P}=He(Me,{enabled:C.enabled}),f=$.useRef(!1);C.enabled&&k&&!P&&!f.current&&s?.user?.id&&o==="idle"&&(f.current=!0,d());async function d(){if(!(!k||!s?.user?.id||!e))try{a("installing"),n(null);const c=Oe(k,e.id,s.user.id,{remoteIndex:0});if(!c.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await l.create.mutateAsync(c);a("authenticating");const j=await be({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:x=>l.update.mutateAsync({id:g,data:{connection_token:x}}).then(()=>{})});if(j.ran&&!j.ok){try{await l.delete.mutateAsync(g)}catch{}throw new Error(j.error&&j.error!=="no token received"?j.error:"No token received from GitHub")}le(p,e.id),N(c),a("ready")}catch(c){n(c instanceof Error?c.message:String(c)),a("error")}}function m(){a("idle"),n(null),N(null),f.current=!1}return C.enabled&&P&&o==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:o,error:r,connection:u,retry:m}}function dt(C){const e=M.c(27),{open:s,onOpenChange:l,title:p,onImportComplete:o,mode:a}=C,r=a===void 0?"agent":a,n=ee();let u;e[0]!==r||e[1]!==n||e[2]!==p?(u=p??n(r==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=r,e[1]=n,e[2]=p,e[3]=u):u=e[3];const N=u,[k,P]=$.useState(null);let f;e[4]!==N?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Pe,{children:N})}),e[4]=N,e[5]=f):f=e[5];let d;e[6]!==N||e[7]!==k||e[8]!==n?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:k?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":n("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:k.avatarUrl,alt:k.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(D,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:N})]})}),e[6]=N,e[7]=k,e[8]=n,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let c;e[11]!==l?(c=()=>l(!1),e[11]=l,e[12]=c):c=e[12];let b;e[13]!==r||e[14]!==o||e[15]!==s||e[16]!==k||e[17]!==c?(b=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx($.Suspense,{fallback:m,children:t.jsx(qe,{open:s,onComplete:c,selectedInstallation:k,onSelectInstallation:P,onImportComplete:o,mode:r})})}),e[13]=r,e[14]=o,e[15]=s,e[16]=k,e[17]=c,e[18]=b):b=e[18];let g;e[19]!==f||e[20]!==d||e[21]!==b?(g=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,b]}),e[19]=f,e[20]=d,e[21]=b,e[22]=g):g=e[22];let j;return e[23]!==l||e[24]!==s||e[25]!==g?(j=t.jsx(Ie,{open:s,onOpenChange:l,children:g}),e[23]=l,e[24]=s,e[25]=g,e[26]=j):j=e[26],j}function qe({open:C,onComplete:e,selectedInstallation:s,onSelectInstallation:l,onImportComplete:p,mode:o="agent"}){const a=ee(),{org:r}=de(),n=me(),u=Fe(),[N,k]=$.useState(null),P=Ee({slug:"mcp-github"}),f=Ue(P),d=Be({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:N,c=se({connectionId:m?.id??"",orgId:r.id,orgSlug:r.slug}),b=se({connectionId:pe,orgId:r.id,orgSlug:r.slug}),g=async(i,y)=>{try{const I=await c.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:y}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},j=(i,y)=>{Promise.all([g(y,"AGENTS.md"),g(y,"CLAUDE.md")]).then(async([v,I])=>{const _=v??I??null;_&&(await b.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:_}}}}),le(n,r.id))}).catch(v=>{console.error("GitHub instructions fetch failed:",v)})},x=ge({mutationFn:async i=>{if(!m||!s)throw new Error("No GitHub connection or installation");const y=s.installationId;if(o==="connection"){const{childConnectionId:R}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:y,owner:i.owner,repo:i.name,githubCallTool:w=>c.callTool(w),selfCallTool:w=>b.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:i,connectionId:R,item:null}}const{childConnectionId:v,reused:I}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:y,owner:i.owner,repo:i.name,githubCallTool:R=>c.callTool(R),selfCallTool:R=>b.callTool(R)});let _=null;try{const R=await b.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:y,connectionId:v},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:v}]}}}),w=R.structuredContent??R,T=w.item?.id;if(!w.item||!T)throw new Error("Failed to create the imported agent");return _=T,{virtualMcpId:T,repo:i,connectionId:v,item:w.item}}catch(R){throw _&&await b.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:_}}).catch(()=>{}),I||await b.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:v,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:i,repo:y,connectionId:v,item:I})=>{if(o==="connection"||!i||!I){le(n,r.id),Ne(n,r.id),te.success(a("common.githubRepoPicker.addedRepo",{name:y.name})),e();return}if(n.setQueryData(ne.collectionItem(b,r.id,"","VIRTUAL_MCP",i),{item:I}),le(n,r.id),j(i,y),p){p({virtualMcpId:i,repo:y,connectionId:v});return}te.success(a("common.githubRepoPicker.importedRepo",{name:y.name})),e(),localStorage.setItem(ke.sidebarOpen(),JSON.stringify(!1)),u(i)},onError:(i,y)=>{console.error("GitHub import failed:",i);const v=i instanceof Error?i.message:a("common.githubRepoPicker.unknownError");if(y.fork&&v.toLowerCase().includes("mint")){te.error(a("common.githubRepoPicker.failedImportFork",{name:y.name}));return}te.error(a("common.githubRepoPicker.failedImport",{error:v}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?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:a("common.githubRepoPicker.selectConnection")})}),f.map(i=>t.jsxs("button",{type:"button",onClick:()=>k(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.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(D,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):m?s?t.jsx(Ke,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,installation:s,onSelectRepo:i=>x.mutate(i),isSaving:x.isPending}):t.jsx(Qe,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,onSelect:l,showBackButton:f.length>1,onBack:()=>k(null)}):null}function Qe(C){const e=M.c(124),{connectionId:s,orgId:l,orgSlug:p,onSelect:o,showBackButton:a,onBack:r}=C,n=ee();let u;e[0]!==l||e[1]!==p?(u={connectionId:pe,orgId:l,orgSlug:p},e[0]=l,e[1]=p,e[2]=u):u=e[2];const N=se(u),k=me(),P=he();let f;e[3]!==s||e[4]!==l?(f=ne.githubUserOrgs(l,s),e[3]=s,e[4]=l,e[5]=f):f=e[5];let d;e[6]!==s||e[7]!==N?(d=()=>$e(h=>N.callTool(h),s),e[6]=s,e[7]=N,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const c=ve(m);let b;e[12]!==P||e[13]!==s||e[14]!==c||e[15]!==l||e[16]!==p||e[17]!==k?(b=async()=>{const h=await be({connectionId:s,orgId:l,orgSlug:p,persistFallback:E=>P.update.mutateAsync({id:s,data:{connection_token:E}}).then(Ve)});if(h.ran&&!h.ok)throw new Error(h.error??"no token received");const S=new URL(`/api/${p}/mcp/${s}`,window.location.origin);await k.invalidateQueries({queryKey:ne.isMCPAuthenticated(S.href,null)}),await k.invalidateQueries({queryKey:ne.mcpClientPrefix()}),await c.refetch()},e[12]=P,e[13]=s,e[14]=c,e[15]=l,e[16]=p,e[17]=k,e[18]=b):b=e[18];let g;e[19]!==n?(g=h=>{te.error(n("common.githubRepoPicker.failedReconnect",{error:h instanceof Error?h.message:n("common.githubRepoPicker.unknownError")}))},e[19]=n,e[20]=g):g=e[20];let j;e[21]!==b||e[22]!==g?(j={mutationFn:b,onError:g},e[21]=b,e[22]=g,e[23]=j):j=e[23];const x=ge(j);if(c.isLoading){let h;return e[24]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=h):h=e[24],h}if(c.isError){let h;e[25]!==n?(h=n("common.githubRepoPicker.failedLoadAccounts"),e[25]=n,e[26]=h):h=e[26];let S;e[27]!==h?(S=t.jsx("p",{className:"text-sm text-destructive",children:h}),e[27]=h,e[28]=S):S=e[28];let E;e[29]!==n?(E=n("common.githubRepoPicker.connectionExpiredMessage"),e[29]=n,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==x?(z=()=>x.mutate(),e[33]=x,e[34]=z):z=e[34];const H=x.isPending;let L;e[35]!==x.isPending?(L=x.isPending?t.jsx(Z,{size:14,className:"animate-spin"}):t.jsx(D,{className:"size-3.5"}),e[35]=x.isPending,e[36]=L):L=e[36];let G;e[37]!==n?(G=n("common.githubRepoPicker.reconnectGitHub"),e[37]=n,e[38]=G):G=e[38];let O;e[39]!==x.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(O=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:H,children:[L,G]}),e[39]=x.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=O):O=e[43];let U;return e[44]!==A||e[45]!==O||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,O]}),e[44]=A,e[45]=O,e[46]=S,e[47]=U):U=e[47],U}const i=c.data;if(!i)return null;if(i.installations.length===0){let h;e[48]!==r||e[49]!==a||e[50]!==n?(h=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[48]=r,e[49]=a,e[50]=n,e[51]=h):h=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==n?(A=n("common.githubRepoPicker.githubConnected"),e[54]=n,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let H;e[58]!==n?(H=n("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=n,e[59]=H):H=e[59];let L;e[60]!==H?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:H}),e[60]=H,e[61]=L):L=e[61];let G;e[62]!==n?(G=n("common.githubRepoPicker.noRepositoriesShared"),e[62]=n,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let U;e[66]!==n?(U=n("common.githubRepoPicker.chooseRepositories"),e[66]=n,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let B;e[69]!==U?(B=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=B):B=e[70];let q;e[71]!==c?(q=()=>{c.refetch()},e[71]=c,e[72]=q):q=e[72];const je=c.isFetching;let Q;e[73]!==c.isFetching?(Q=c.isFetching&&t.jsx(Z,{size:14,className:"animate-spin"}),e[73]=c.isFetching,e[74]=Q):Q=e[74];let V;e[75]!==n?(V=n("common.githubRepoPicker.checkAgain"),e[75]=n,e[76]=V):V=e[76];let K;e[77]!==c.isFetching||e[78]!==q||e[79]!==Q||e[80]!==V?(K=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:q,disabled:je,children:[Q,V]}),e[77]=c.isFetching,e[78]=q,e[79]=Q,e[80]=V,e[81]=K):K=e[81];let J;e[82]!==B||e[83]!==K?(J=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[B,K]}),e[82]=B,e[83]=K,e[84]=J):J=e[84];let W;e[85]!==n?(W=n("common.githubRepoPicker.repositoryAccessNote"),e[85]=n,e[86]=W):W=e[86];let Y;e[87]!==W?(Y=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:W}),e[87]=W,e[88]=Y):Y=e[88];let X;e[89]!==z||e[90]!==L||e[91]!==O||e[92]!==J||e[93]!==Y?(X=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,O,J,Y]}),e[89]=z,e[90]=L,e[91]=O,e[92]=J,e[93]=Y,e[94]=X):X=e[94];let oe;return e[95]!==X||e[96]!==h?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,X]}),e[95]=X,e[96]=h,e[97]=oe):oe=e[97],oe}let y;e[98]!==r||e[99]!==a||e[100]!==n?(y=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[98]=r,e[99]=a,e[100]=n,e[101]=y):y=e[101];let v;if(e[102]!==i.installations||e[103]!==o||e[104]!==n){let h;e[106]!==o||e[107]!==n?(h=S=>t.jsxs("button",{type:"button",onClick:()=>o(S),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:S.avatarUrl,alt:S.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:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:n("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[n("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=o,e[107]=n,e[108]=h):h=e[108],v=i.installations.map(h),e[102]=i.installations,e[103]=o,e[104]=n,e[105]=v}else v=e[105];let I;e[109]!==v?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:v}),e[109]=v,e[110]=I):I=e[110];let _;e[111]!==n?(_=n("common.githubRepoPicker.accountNotListed"),e[111]=n,e[112]=_):_=e[112];let R;e[113]!==n?(R=n("common.githubRepoPicker.installGitHubApp"),e[113]=n,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let T;e[117]!==_||e[118]!==w?(T=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[_," ",w]})}),e[117]=_,e[118]=w,e[119]=T):T=e[119];let F;return e[120]!==I||e[121]!==T||e[122]!==y?(F=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[y,I,T]}),e[120]=I,e[121]=T,e[122]=y,e[123]=F):F=e[123],F}function Ve(){}function Ke(C){const e=M.c(23),{connectionId:s,orgId:l,orgSlug:p,installation:o,onSelectRepo:a,isSaving:r}=C,n=ee(),[u,N]=$.useState(""),k=Te(u,300),P=$.useDeferredValue(k),f=u!==P;let d;e[0]!==n?(d=n("common.githubRepoPicker.searchRepositories"),e[0]=n,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(_e,{placeholder:d,value:u,onChange:N,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const c=f?"opacity-40":"opacity-100";let b;e[6]!==c?(b=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",c),e[6]=c,e[7]=b):b=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=g):g=e[8];let j;e[9]!==s||e[10]!==P||e[11]!==o||e[12]!==r||e[13]!==a||e[14]!==l||e[15]!==p?(j=t.jsx($.Suspense,{fallback:g,children:t.jsx(Je,{connectionId:s,orgId:l,orgSlug:p,installation:o,query:P,onSelectRepo:a,isSaving:r})}),e[9]=s,e[10]=P,e[11]=o,e[12]=r,e[13]=a,e[14]=l,e[15]=p,e[16]=j):j=e[16];let x;e[17]!==b||e[18]!==j?(x=t.jsx("div",{className:b,children:j}),e[17]=b,e[18]=j,e[19]=x):x=e[19];let i;return e[20]!==m||e[21]!==x?(i=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x]}),e[20]=m,e[21]=x,e[22]=i):i=e[22],i}function Je(C){const e=M.c(36),{connectionId:s,orgId:l,orgSlug:p,installation:o,query:a,onSelectRepo:r,isSaving:n}=C,u=ee();let N;e[0]!==s||e[1]!==l||e[2]!==p?(N={connectionId:s,orgId:l,orgSlug:p},e[0]=s,e[1]=l,e[2]=p,e[3]=N):N=e[3];const k=se(N),P=o.type==="User"?"user":"org",f=a?`${P}:${o.login} ${a} in:name fork:true`:`${P}:${o.login} fork:true`;let d;e[4]!==s||e[5]!==o.login||e[6]!==l||e[7]!==a?(d=ne.githubOrgRepos(l,s,o.login,a),e[4]=s,e[5]=o.login,e[6]=l,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==k||e[10]!==f?(m=async x=>{const{signal:i}=x,v=(await k.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:i})).content?.[0]?.text;if(!v)throw new Error("No response from search_repositories");return(JSON.parse(v).items??[]).map(We)},e[9]=k,e[10]=f,e[11]=m):m=e[11];let c;e[12]!==d||e[13]!==m?(c={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=c):c=e[14];const{data:b}=Ce(c);if(b.length===0){let x;e[15]!==u?(x=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=x):x=e[16];let i;e[17]!==x?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[17]=x,e[18]=i):i=e[18];let y;e[19]!==a||e[20]!==u?(y=a&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=a,e[20]=u,e[21]=y):y=e[21];let v;return e[22]!==i||e[23]!==y?(v=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[i,y]}),e[22]=i,e[23]=y,e[24]=v):v=e[24],v}let g;if(e[25]!==n||e[26]!==r||e[27]!==b||e[28]!==u){let x;e[30]!==n||e[31]!==r||e[32]!==u?(x=i=>t.jsxs("button",{type:"button",onClick:()=>r(i),disabled:n,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(D,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:i.name}),i.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),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:[i.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),i.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},i.fullName),e[30]=n,e[31]=r,e[32]=u,e[33]=x):x=e[33],g=b.map(x),e[25]=n,e[26]=r,e[27]=b,e[28]=u,e[29]=g}else g=e[29];let j;return e[34]!==g?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:g}),e[34]=g,e[35]=j):j=e[35],j}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=M.c(51),{status:s,error:l,retry:p}=C,o=ee();if(s==="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(D,{className:"size-5 text-destructive"})}),e[0]=v):v=e[0];let I;e[1]!==o?(I=o("common.githubRepoPicker.connectionFailed"),e[1]=o,e[2]=I):I=e[2];let _;e[3]!==I?(_=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=_):_=e[4];let R;e[5]!==l||e[6]!==o?(R=l??o("common.githubRepoPicker.somethingWentWrong"),e[5]=l,e[6]=o,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let T;e[10]!==_||e[11]!==w?(T=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[_,w]}),e[10]=_,e[11]=w,e[12]=T):T=e[12];let F;e[13]!==o?(F=o("common.githubRepoPicker.tryAgain"),e[13]=o,e[14]=F):F=e[14];let h;e[15]!==p||e[16]!==F?(h=t.jsx("button",{type:"button",onClick:p,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:F}),e[15]=p,e[16]=F,e[17]=h):h=e[17];let S;return e[18]!==T||e[19]!==h?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[v,T,h]}),e[18]=T,e[19]=h,e[20]=S):S=e[20],S}const a=s==="authenticating";let r;e[21]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-foreground"})}),e[21]=r):r=e[21];let n;e[22]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(Z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=n):n=e[22];let u;e[23]!==a||e[24]!==o?(u=o(a?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=a,e[24]=o,e[25]=u):u=e[25];let N;e[26]!==u?(N=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=N):N=e[27];let k;e[28]!==a||e[29]!==o?(k=o(a?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=a,e[29]=o,e[30]=k):k=e[30];let P;e[31]!==k?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:k}),e[31]=k,e[32]=P):P=e[32];let f;e[33]!==N||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[N,P]}),e[33]=N,e[34]=P,e[35]=f):f=e[35];const d=a?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let c;e[38]!==m?(c=t.jsx("span",{className:m}),e[38]=m,e[39]=c):c=e[39];const b=a?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==b?(g=ae("size-1.5 rounded-full",b),e[40]=b,e[41]=g):g=e[41];let j;e[42]!==g?(j=t.jsx("span",{className:g}),e[42]=g,e[43]=j):j=e[43];let x;e[44]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=x):x=e[44];let i;e[45]!==c||e[46]!==j?(i=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,j,x]}),e[45]=c,e[46]=j,e[47]=i):i=e[47];let y;return e[48]!==i||e[49]!==f?(y=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[n,f,i]}),e[48]=i,e[49]=f,e[50]=y):y=e[50],y}export{D as G,dt as a,Be as b,He as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{dE as It,dF as Tt,bi as R,$ as c,dG as de,bo as Je,dH as wt,bh as At,aG as Mt,a4 as O,a3 as G,_ as oe,Z as S,bj as h,b8 as F,cw as Ot,dI as E,a0 as Ct,t as ge,c as Te,r as H,F as Rt,j as Nt}from"./index-
|
|
1
|
+
import{dE as It,dF as Tt,bi as R,$ as c,dG as de,bo as Je,dH as wt,bh as At,aG as Mt,a4 as O,a3 as G,_ as oe,Z as S,bj as h,b8 as F,cw as Ot,dI as E,a0 as Ct,t as ge,c as Te,r as H,F as Rt,j as Nt}from"./index-DZCZPjEx.js";import{S as xt,u as Pt}from"./use-mcp-client-CBRXR7eT.js";import{d as We,D as ve}from"./decopilot-sse-pool-YTmC0fCs.js";import{d as Dt}from"./delay-CnY5UFtP.js";import{e as Lt}from"./backoff-CrEUbyZT.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(n=>typeof s[s[n]]!="number"),i={};for(const n of o)i[n]=s[n];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},t.find=(s,o)=>{for(const i of s)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(re||(re={}));var Oe;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Oe||(Oe={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let n=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(n[u]=n[u]||{_errors:[]},n[u]._errors.push(a(i))):n[u]=n[u]||{_errors:[]},n=n[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];a[o]=a[o]||[],a[o].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Ce;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Ce||(Ce={}));var m;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(m||(m={}));var He="vercel.ai.error",kt=Symbol.for(He),Re,Ne,Z=class Ge extends(Ne=Error,Re=kt,Ne){constructor({name:e,message:a,cause:r}){super(a),this[Re]=!0,this.name=e,this.cause=r}static isInstance(e){return Ge.hasMarker(e,He)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ye(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var qe="AI_InvalidArgumentError",Xe=`vercel.ai.error.${qe}`,jt=Symbol.for(Xe),xe,Pe,Zt=class extends(Pe=Z,xe=jt,Pe){constructor({message:t,cause:e,argument:a}){super({name:qe,message:t,cause:e}),this[xe]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,Xe)}},Qe="AI_JSONParseError",Ke=`vercel.ai.error.${Qe}`,$t=Symbol.for(Ke),De,Le,ke=class extends(Le=Z,De=$t,Le){constructor({text:t,cause:e}){super({name:Qe,message:`JSON parsing failed: Text: ${t}.
|
|
2
2
|
Error message: ${Ye(e)}`,cause:e}),this[De]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Ke)}},et="AI_TypeValidationError",tt=`vercel.ai.error.${et}`,Ut=Symbol.for(tt),je,Ze,X=class ye extends(Ze=Z,je=Ut,Ze){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const o=[];r.entityName&&o.push(r.entityName),r.entityId&&o.push(`id: "${r.entityId}"`),s+=o.join(", "),s+=")"}super({name:et,message:`${s}: Value: ${JSON.stringify(e)}.
|
|
3
3
|
Error message: ${Ye(a)}`,cause:a}),this[je]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,tt)}static wrap({value:e,cause:a,context:r}){var s,o,i;return ye.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((o=a.context)==null?void 0:o.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ye({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const o=a.length,i=new Array(e);for(let n=0;n<e;n++)i[n]=a[Math.random()*o|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new Zt({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Ft=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Bt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function $e(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Ft.test(t)===!1&&Bt.test(t)===!1?e:Vt(e)}function Vt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const o=r[s];o&&typeof o=="object"&&e.push(o)}}}return t}function zt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return $e(t)}try{return $e(t)}finally{Error.stackTraceLimit=e}}function we(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=z(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(z):z(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(z)),t.allOf!=null&&(t.allOf=t.allOf.map(z)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(z));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=z(e[a]);return t}function z(t){return typeof t=="boolean"?t:we(t)}var Jt=Symbol("Let zodToJsonSchema decide on which parser to use"),Ue={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Wt=t=>typeof t=="string"?{...Ue,name:t}:{...Ue,...t};function N(){return{}}function Ht(t,e){var a,r,s;const o={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==m.ZodAny&&(o.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(o.minItems=t.minLength.value),t.maxLength&&(o.maxItems=t.maxLength.value),t.exactLength&&(o.minItems=t.exactLength.value,o.maxItems=t.exactLength.value),o}function Gt(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function Yt(){return{type:"boolean"}}function at(t,e){return b(t.type._def,e)}var qt=(t,e)=>b(t.innerType._def,e);function rt(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,o)=>rt(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Xt(t)}}var Xt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Qt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function Kt(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):N()}function ea(t){return{type:"string",enum:Array.from(t.values)}}var ta=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function aa(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(ta(s))r.push(...s.allOf);else{let o=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...n}=s;o=n}r.push(o)}}),r.length?{allOf:r}:void 0}function ra(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var he=void 0,P={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(he===void 0&&(he=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),he),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function st(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":M(a,P.email,r.message,e);break}break;case"url":D(a,"uri",r.message,e);break;case"uuid":D(a,"uuid",r.message,e);break;case"regex":M(a,r.regex,r.message,e);break;case"cuid":M(a,P.cuid,r.message,e);break;case"cuid2":M(a,P.cuid2,r.message,e);break;case"startsWith":M(a,RegExp(`^${me(r.value,e)}`),r.message,e);break;case"endsWith":M(a,RegExp(`${me(r.value,e)}$`),r.message,e);break;case"datetime":D(a,"date-time",r.message,e);break;case"date":D(a,"date",r.message,e);break;case"time":D(a,"time",r.message,e);break;case"duration":D(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{M(a,RegExp(me(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&D(a,"ipv4",r.message,e),r.version!=="v4"&&D(a,"ipv6",r.message,e);break}case"base64url":M(a,P.base64url,r.message,e);break;case"jwt":M(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&M(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&M(a,P.ipv6Cidr,r.message,e);break}case"emoji":M(a,P.emoji(),r.message,e);break;case"ulid":{M(a,P.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{D(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{M(a,P.base64,r.message,e);break}}break}case"nanoid":M(a,P.nanoid,r.message,e)}return a}function me(t,e){return e.patternStrategy==="escape"?na(t):t}var sa=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function na(t){let e="";for(let a=0;a<t.length;a++)sa.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function M(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(o=>o.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Fe(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Fe(e,r)}function Fe(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let o="",i=!1,n=!1,p=!1;for(let u=0;u<s.length;u++){if(i){o+=s[u],i=!1;continue}if(r.i){if(n){if(s[u].match(/[a-z]/)){p?(o+=s[u],o+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(o+=s[u],p=!0):o+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){o+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){o+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(s[u]==="$"){o+=`($|(?=[\r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as w,b as z,z as V,av as W,j as a,F as Y,K as J,x as Q,r as R,aC as X,aA as Z,bJ as ee,ax as x,aB as I,bK as oe,aD as C,bL as S,bM as te,az as A,bI as re,bH as se}from"./index-
|
|
1
|
+
import{c as w,b as z,z as V,av as W,j as a,F as Y,K as J,x as Q,r as R,aC as X,aA as Z,bJ as ee,ax as x,aB as I,bK as oe,aD as C,bL as S,bM as te,az as A,bI as re,bH as se}from"./index-DZCZPjEx.js";import{B as _}from"./badge-DABYk3BN.js";import{c as k,T as E,a as P,b as ae}from"./tooltip-CiKgrihk.js";import{g as ne}from"./index-D4g7g9hv.js";import{s as ie}from"./Eye-DU1yPSl0.js";import{s as ce}from"./Star01-DHNoUZ8W.js";import{aM as le}from"./agent-icon-yFrZRWWC.js";import{i as de}from"./mcp-oauth-B0yFBPVK.js";const ue=[{key:"readOnlyHint",labelKey:"tools.toolsList.readOnly",Icon:ie,variant:"secondary"},{key:"destructiveHint",labelKey:"tools.toolsList.destructive",Icon:V,variant:"destructive"},{key:"idempotentHint",labelKey:"tools.toolsList.idempotent",Icon:W,variant:"secondary"},{key:"openWorldHint",labelKey:"tools.toolsList.openWorld",Icon:ce,variant:"outline"}];function we(d){const e=w.c(22),{annotations:t,_meta:n}=d,o=z();let r;e[0]!==n?(r=ne(n),e[0]=n,e[1]=r):r=e[1];const s=!!r;let i,c,l,f,u;if(e[2]!==t||e[3]!==s||e[4]!==o){u=Symbol.for("react.early_return_sentinel");e:{const m=t?ue.filter(y=>t[y.key]===!0):[];if(m.length===0&&!s){u=null;break e}i=ae,c="flex gap-1 flex-nowrap",e[10]!==s||e[11]!==o?(l=s&&a.jsxs(k,{children:[a.jsx(E,{asChild:!0,children:a.jsx(_,{asChild:!0,variant:"secondary",className:"size-6 p-1",children:a.jsx(le,{})})}),a.jsx(P,{children:o("tools.toolsList.interactive")})]}),e[10]=s,e[11]=o,e[12]=l):l=e[12];let h;e[13]!==o?(h=y=>{const{labelKey:j,Icon:q,variant:$}=y;return a.jsxs(k,{children:[a.jsx(E,{asChild:!0,children:a.jsx(_,{asChild:!0,variant:$,className:"size-6 p-1",children:a.jsx(q,{})})}),a.jsx(P,{children:o(j)})]},j)},e[13]=o,e[14]=h):h=e[14],f=m.map(h)}e[2]=t,e[3]=s,e[4]=o,e[5]=i,e[6]=c,e[7]=l,e[8]=f,e[9]=u}else i=e[5],c=e[6],l=e[7],f=e[8],u=e[9];if(u!==Symbol.for("react.early_return_sentinel"))return u;let v;e[15]!==c||e[16]!==l||e[17]!==f?(v=a.jsxs("div",{className:c,children:[l,f]}),e[15]=c,e[16]=l,e[17]=f,e[18]=v):v=e[18];let p;return e[19]!==i||e[20]!==v?(p=a.jsx(i,{children:v}),e[19]=i,e[20]=v,e[21]=p):p=e[21],p}function Se(d){const e=w.c(11),{connectionId:t}=d,{org:n}=Y();let o,r,s;e[0]!==t||e[1]!==n.slug?(o=new URL(`/api/${n.slug}/mcp/${t}`,window.location.origin),s=Q,r=J.isMCPAuthenticated(o.href,null),e[0]=t,e[1]=n.slug,e[2]=o,e[3]=r,e[4]=s):(o=e[2],r=e[3],s=e[4]);let i;e[5]!==o||e[6]!==n.id?(i=()=>de({url:o.href,token:null,orgId:n.id}),e[5]=o,e[6]=n.id,e[7]=i):i=e[7];let c;e[8]!==r||e[9]!==i?(c={queryKey:r,queryFn:i},e[8]=r,e[9]=i,e[10]=c):c=e[10];const{data:l}=s(c);return l}var g="Radio",[pe,N]=A(g),[fe,ve]=pe(g),T=R.forwardRef((d,e)=>{const{__scopeRadio:t,name:n,checked:o=!1,required:r,disabled:s,value:i="on",onCheck:c,form:l,...f}=d,[u,v]=R.useState(null),p=I(e,y=>v(y)),m=R.useRef(!1),h=u?l||!!u.closest("form"):!0;return a.jsxs(fe,{scope:t,checked:o,disabled:s,children:[a.jsx(x.button,{type:"button",role:"radio","aria-checked":o,"data-state":M(o),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:p,onClick:C(d.onClick,y=>{o||c?.(),h&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})}),h&&a.jsx(L,{control:u,bubbles:!m.current,name:n,value:i,checked:o,required:r,disabled:s,form:l,style:{transform:"translateX(-100%)"}})]})});T.displayName=g;var G="RadioIndicator",K=R.forwardRef((d,e)=>{const{__scopeRadio:t,forceMount:n,...o}=d,r=ve(G,t);return a.jsx(te,{present:n||r.checked,children:a.jsx(x.span,{"data-state":M(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:e})})});K.displayName=G;var me="RadioBubbleInput",L=R.forwardRef(({__scopeRadio:d,control:e,checked:t,bubbles:n=!0,...o},r)=>{const s=R.useRef(null),i=I(s,r),c=re(t),l=se(e);return R.useEffect(()=>{const f=s.current;if(!f)return;const u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(c!==t&&p){const m=new Event("click",{bubbles:n});p.call(f,t),f.dispatchEvent(m)}},[c,t,n]),a.jsx(x.input,{type:"radio","aria-hidden":!0,defaultChecked:t,...o,tabIndex:-1,ref:i,style:{...o.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});L.displayName=me;function M(d){return d?"checked":"unchecked"}var Re=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],b="RadioGroup",[he]=A(b,[S,N]),D=S(),O=N(),[ye,xe]=he(b),B=R.forwardRef((d,e)=>{const{__scopeRadioGroup:t,name:n,defaultValue:o,value:r,required:s=!1,disabled:i=!1,orientation:c,dir:l,loop:f=!0,onValueChange:u,...v}=d,p=D(t),m=X(l),[h,y]=Z({prop:r,defaultProp:o??null,onChange:u,caller:b});return a.jsx(ye,{scope:t,name:n,required:s,disabled:i,value:h,onValueChange:y,children:a.jsx(ee,{asChild:!0,...p,orientation:c,dir:m,loop:f,children:a.jsx(x.div,{role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":i?"":void 0,dir:m,...v,ref:e})})})});B.displayName=b;var U="RadioGroupItem",F=R.forwardRef((d,e)=>{const{__scopeRadioGroup:t,disabled:n,...o}=d,r=xe(U,t),s=r.disabled||n,i=D(t),c=O(t),l=R.useRef(null),f=I(e,l),u=r.value===o.value,v=R.useRef(!1);return R.useEffect(()=>{const p=h=>{Re.includes(h.key)&&(v.current=!0)},m=()=>v.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",m)}},[]),a.jsx(oe,{asChild:!0,...i,focusable:!s,active:u,children:a.jsx(T,{disabled:s,required:r.required,checked:u,...c,...o,name:r.name,ref:f,onCheck:()=>r.onValueChange(o.value),onKeyDown:C(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:C(o.onFocus,()=>{v.current&&l.current?.click()})})})});F.displayName=U;var be="RadioGroupIndicator",H=R.forwardRef((d,e)=>{const{__scopeRadioGroup:t,...n}=d,o=O(t);return a.jsx(K,{...o,...n,ref:e})});H.displayName=be;var Ae=B,Ne=F,Te=H;export{Ne as I,Ae as R,we as T,Te as a,Se as u};
|