decocms 4.105.0 → 4.106.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-492EEp2A.js → AlertCircle-DY_zDIC_.js} +1 -1
- package/dist/client/assets/{AreaChart-DEAqBgfK.js → AreaChart-DVPFgrTE.js} +1 -1
- package/dist/client/assets/{ArrowRight-Ddlybx70.js → ArrowRight-4rUEqKVq.js} +1 -1
- package/dist/client/assets/{ArrowUp-D_gyGK0X.js → ArrowUp-CJPXZRX0.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-Chggeoxo.js → ArrowUpRight-DQ1ltOUw.js} +1 -1
- package/dist/client/assets/{Check-B5KuwkVX.js → Check-Cnez_IQh.js} +1 -1
- package/dist/client/assets/{CheckCircle-D3ZmgI8t.js → CheckCircle-pA7GzUJX.js} +1 -1
- package/dist/client/assets/{ChevronDown-DTXciC2Y.js → ChevronDown-ncA3h8F6.js} +1 -1
- package/dist/client/assets/{ChevronRight-BTtZur33.js → ChevronRight-DBBXusFc.js} +1 -1
- package/dist/client/assets/{ChevronUp-BOcmGc7e.js → ChevronUp-C9y04a8F.js} +1 -1
- package/dist/client/assets/{Copy01-CAaBoZr7.js → Copy01-CnQ9-KvL.js} +1 -1
- package/dist/client/assets/{DotsVertical-B8seWlU9.js → DotsVertical-nghs-9ch.js} +1 -1
- package/dist/client/assets/{Eye-BMnoA72h.js → Eye-NAV4B6_7.js} +1 -1
- package/dist/client/assets/{FilterLines-CpAgznVL.js → FilterLines-BVMKJFk4.js} +1 -1
- package/dist/client/assets/{Globe01-B-1bG2yF.js → Globe01-DoUM29Rz.js} +1 -1
- package/dist/client/assets/{Globe04-CCEFQFJh.js → Globe04-Cy3T2xAT.js} +1 -1
- package/dist/client/assets/{HardDrive-D1ThzSZL.js → HardDrive-CtHSCDeQ.js} +1 -1
- package/dist/client/assets/{Image01-396lPFTh.js → Image01-Dp9MuRd0.js} +1 -1
- package/dist/client/assets/{Key01-B6k80syQ.js → Key01-BZIwkIt-.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DrmvAZtO.js → LayoutLeft-B2dvdNWS.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Bj-DHKZ2.js → LinkExternal01-CSt2aBCB.js} +1 -1
- package/dist/client/assets/{Monitor01-BGhWWzLO.js → Monitor01-DlBaUGbP.js} +1 -1
- package/dist/client/assets/{Package-CkO_i381.js → Package-C_IRn5e4.js} +1 -1
- package/dist/client/assets/{Palette-DXYpYsID.js → Palette-BG4jjoTd.js} +1 -1
- package/dist/client/assets/{Play-BRYEOEKR.js → Play-tkSNItqO.js} +1 -1
- package/dist/client/assets/{Plus-n0d6qLEa.js → Plus-BjwUeIOu.js} +1 -1
- package/dist/client/assets/{SearchLg-CWL4NO6j.js → SearchLg-LcQ3wPaj.js} +1 -1
- package/dist/client/assets/{SearchMd-mEQCCGF2.js → SearchMd-DYFHECi9.js} +1 -1
- package/dist/client/assets/{Settings02-1z5a1jSn.js → Settings02-B8qG_3kP.js} +1 -1
- package/dist/client/assets/{Shield01-6qmS4aUT.js → Shield01-Dd4sDT_o.js} +1 -1
- package/dist/client/assets/{Star01-DVVpP6Mt.js → Star01-DY1NWiTb.js} +1 -1
- package/dist/client/assets/{Stars01-Byvzs38L.js → Stars01-1MV8ElRx.js} +1 -1
- package/dist/client/assets/{Stars02-vHkWqwAy.js → Stars02-CgAzcj_M.js} +1 -1
- package/dist/client/assets/{Sun-rLSQUUKZ.js → Sun-CUhaoFhq.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CQHdcmBH.js → SwitchHorizontal01-0Kq847c5.js} +1 -1
- package/dist/client/assets/{Tool01-DM0uV1pi.js → Tool01-DFAsyNUU.js} +1 -1
- package/dist/client/assets/{Tool02-B0-LSNq8.js → Tool02-RKDZaiJk.js} +1 -1
- package/dist/client/assets/{Trash01-DpAfQYpB.js → Trash01-DXzlmJ34.js} +1 -1
- package/dist/client/assets/{TrendUp01-BBNetlbH.js → TrendUp01-0srLzsOh.js} +1 -1
- package/dist/client/assets/{Upload01-CCm1ioeI.js → Upload01-BylKJ3WB.js} +1 -1
- package/dist/client/assets/{User01-CIB_r_NM.js → User01-xn3joisa.js} +1 -1
- package/dist/client/assets/{Users01-sXy9V9nC.js → Users01-DeKf9ivH.js} +1 -1
- package/dist/client/assets/{Users03-CAcpBuhQ.js → Users03-Dh_yamMu.js} +1 -1
- package/dist/client/assets/{X-DKUaOMiG.js → X-B-U9vY4e.js} +1 -1
- package/dist/client/assets/{XCircle-D6ezyvCf.js → XCircle-BNxdXQeR.js} +1 -1
- package/dist/client/assets/{XClose-D59rN56m.js → XClose-BIVjAPO7.js} +1 -1
- package/dist/client/assets/{Zap-FhQNjqjY.js → Zap-DLI-HN8x.js} +1 -1
- package/dist/client/assets/{ZapSquare-BEOr1Qo2.js → ZapSquare-C8QQPbrq.js} +1 -1
- package/dist/client/assets/{ZoomOut-9c6sHVLZ.js → ZoomOut-C_iv5T7a.js} +1 -1
- package/dist/client/assets/{access-gate-axaZ1vUD.js → access-gate-DoRnqeAN.js} +1 -1
- package/dist/client/assets/{add-section-modal-DokvGJIt.js → add-section-modal-BopI2eId.js} +1 -1
- package/dist/client/assets/{agent-icon-JkG_B24O.js → agent-icon-BnGJPmET.js} +1 -1
- package/dist/client/assets/agents-list-BEkZ8SA8.js +1 -0
- package/dist/client/assets/{ai-providers-DVZGLcnx.js → ai-providers-CoOLwd4Q.js} +1 -1
- package/dist/client/assets/{alert-C4kpJoy4.js → alert-KDufTM8R.js} +1 -1
- package/dist/client/assets/{alert-dialog-ByGGCVaW.js → alert-dialog-wCHBPMgf.js} +1 -1
- package/dist/client/assets/app-editor-Bg3iSXd6.js +1 -0
- package/dist/client/assets/{auth-DYlyeYuK.js → auth-Bkh-2aIu.js} +1 -1
- package/dist/client/assets/{auth-catchall-yLacPHoj.js → auth-catchall-BEGXdoCZ.js} +1 -1
- package/dist/client/assets/{auth-entry-DDBfLf77.js → auth-entry-DSEtXMqf.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CqqeWuFf.js → auth-split-layout-NXKBpHJt.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Cs_ey_Si.js → authenticate-and-persist-oauth-DM0vv-ut.js} +1 -1
- package/dist/client/assets/{automation-list-row-CThb8tG3.js → automation-list-row-EUdIsHnf.js} +1 -1
- package/dist/client/assets/{automation-runs-BXiPs_VZ.js → automation-runs-DlDnbzVo.js} +1 -1
- package/dist/client/assets/{automations-CgMxz4Pb.js → automations-BcVzcRj2.js} +1 -1
- package/dist/client/assets/{autosend-CEnJWoYu.js → autosend-6si99-kP.js} +1 -1
- package/dist/client/assets/{avatar-h4p7JkEM.js → avatar-D-XB1bPv.js} +1 -1
- package/dist/client/assets/{badge-Bp_khuBP.js → badge-CIuy-tuu.js} +1 -1
- package/dist/client/assets/{block-document-DFy6dXPM.js → block-document--FuBFCwM.js} +1 -1
- package/dist/client/assets/{brand-context-fZVDwuzx.js → brand-context-xzUxgxTN.js} +1 -1
- package/dist/client/assets/{buckets-B4aetspo.js → buckets-BvuEc8o_.js} +1 -1
- package/dist/client/assets/bulk-category-panel-y6kpzyhI.js +1 -0
- package/dist/client/assets/{calendar-B3zsx3QX.js → calendar-DmxrSWLN.js} +1 -1
- package/dist/client/assets/{capability-load-error-Azqebb7t.js → capability-load-error-BmWjgACv.js} +1 -1
- package/dist/client/assets/{card-D2g28w4T.js → card-cDcO8pqf.js} +1 -1
- package/dist/client/assets/category-editor-bL-IE2xw.js +1 -0
- package/dist/client/assets/{chat-context-CB8jbSht.js → chat-context-CuCijtZ1.js} +1 -1
- package/dist/client/assets/{checkbox-BY_iLtFn.js → checkbox-IKaHw5Sh.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BvR7NCLC.js → cli-auth-success-CqjvHcoW.js} +1 -1
- package/dist/client/assets/{collection-detail-nENYDdvy.js → collection-detail-JQP_kejq.js} +1 -1
- package/dist/client/assets/{collection-display-button-C5l35Zv5.js → collection-display-button-BWuPUEJH.js} +1 -1
- package/dist/client/assets/{collection-search-CnSAD3aA.js → collection-search-CXWHt_gZ.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CmAtnFvh.js → collection-table-wrapper-DoZwoCNS.js} +1 -1
- package/dist/client/assets/{collection-tabs-Caaa8VYN.js → collection-tabs-1Vmi5jiO.js} +1 -1
- package/dist/client/assets/{command-BfdqzURV.js → command-BOxyJvkQ.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-Bb3mAsEa.js → commerce-onboarding-Bqa-QcZ0.js} +1 -1
- package/dist/client/assets/{companions-core-BkvWSECf.js → companions-core-Dh0Lubu9.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-kJLqahzj.js → connect-desktop-dialog-B7zmuhEM.js} +1 -1
- package/dist/client/assets/{connect-DaaAOtif.js → connect-llUfgd77.js} +1 -1
- package/dist/client/assets/{connection-card-F8nXjLqn.js → connection-card--LroopWJ.js} +1 -1
- package/dist/client/assets/{connection-detail-DUSprILA.js → connection-detail-xFcxOBhE.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-C9rI-4sl.js → connection-form-helpers-CzrFES2G.js} +1 -1
- package/dist/client/assets/{connections-ClHUezf0.js → connections-DPsMVF-m.js} +1 -1
- package/dist/client/assets/deco-site-production-url-CaKZ7xBn.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-Cbh8qGU5.js → decopilot-sse-pool-Baab5vaV.js} +1 -1
- package/dist/client/assets/{dialog-CfZpY_2q.js → dialog-DRW5Z6kg.js} +1 -1
- package/dist/client/assets/{domain-settings-BPHG1eY7.js → domain-settings-ByeSQQ2j.js} +1 -1
- package/dist/client/assets/{drawer-FjwmDRnN.js → drawer-B2XvIIAe.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Co3SNGsi.js → dropdown-menu-CqLN4WnX.js} +1 -1
- package/dist/client/assets/{empty-state-BmD_9SdS.js → empty-state-Bb0NBhmq.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C6WAUA-A.js → extract-connection-data-DOMEDQks.js} +1 -1
- package/dist/client/assets/file-explorer-BqzbHsNq.js +2 -0
- package/dist/client/assets/{file-type-icon-CkvpmZpM.js → file-type-icon-BoXrEv8-.js} +1 -1
- package/dist/client/assets/{files-DqIz0vBK.js → files-BZ0ExIG_.js} +1 -1
- package/dist/client/assets/{form-D9b_xMf4.js → form-BDz4mzCI.js} +1 -1
- package/dist/client/assets/{general-B1teWa2G.js → general-wSFMY7ZS.js} +1 -1
- package/dist/client/assets/{github-repo-picker-DKILGua9.js → github-repo-picker-Cf7WxVaD.js} +1 -1
- package/dist/client/assets/{hooks-DX67BKd6.js → hooks-BBLaeAIm.js} +1 -1
- package/dist/client/assets/{index-DRA8GwsZ.js → index-B515rC-W.js} +1 -1
- package/dist/client/assets/{index-BUv3Mmxm.js → index-BkAHmUua.js} +27 -27
- package/dist/client/assets/{index-BTACFcn3.js → index-Byz54suu.js} +1 -1
- package/dist/client/assets/{index-vlkNtRf9.js → index-CYBuqj-B.js} +1 -1
- package/dist/client/assets/{index-DHV3B5K5.js → index-CaHnwqJ5.js} +1 -1
- package/dist/client/assets/{index-C0goCxJd.js → index-CmDlyqXv.js} +1 -1
- package/dist/client/assets/{index-DUDC1cQm.js → index-CpjGdekK.js} +1 -1
- package/dist/client/assets/{index-80l59WlJ.js → index-DKqSqqBL.js} +1 -1
- package/dist/client/assets/{index-Dyk7ikoX.js → index-DPUSzQFm.js} +27 -27
- package/dist/client/assets/{index-CXYm1db3.js → index-DPm1wrvx.js} +1 -1
- package/dist/client/assets/{index-CNjiAiv0.js → index-DjiPLxSv.js} +1 -1
- package/dist/client/assets/{index-C0pe4Aj2.js → index-I0yOjx7S.js} +3 -3
- package/dist/client/assets/{index-DpBmVLF2.js → index-cX02Wkot.js} +1 -1
- package/dist/client/assets/{index-redirect-vLff4NOz.js → index-redirect-COcF7DoT.js} +1 -1
- package/dist/client/assets/{input-CrADDofK.js → input-C6HduerO.js} +1 -1
- package/dist/client/assets/{integration-icon-CucAI7jv.js → integration-icon-D4PGsH2F.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-D4NuIerI.js → invite-member-dialog-Bejbrcbz.js} +1 -1
- package/dist/client/assets/{label-CgRI3EAv.js → label-CGAP8lVf.js} +1 -1
- package/dist/client/assets/{layout-BLasXy5s.js → layout-DrnUKgNU.js} +1 -1
- package/dist/client/assets/{login-DNMfeoOI.js → login-A6XZUv1X.js} +1 -1
- package/dist/client/assets/{mcp-oauth-W2q9PxhY.js → mcp-oauth-BfBEuniq.js} +1 -1
- package/dist/client/assets/{members-gkvguwUu.js → members-DiEYkGBN.js} +1 -1
- package/dist/client/assets/{monaco-editor-BtyI72zE.js → monaco-editor-Da497IIr.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DEwAdd22.js → monitoring-stats-row-DZqUxWwZ.js} +1 -1
- package/dist/client/assets/{multi-select-CvUZtk1N.js → multi-select-DDYBF_ep.js} +1 -1
- package/dist/client/assets/{oauth-callback-BoqqypMU.js → oauth-callback-DFYta4AR.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-D34gLcnd.js → oauth-callback-ai-provider-CfnPJ6yF.js} +1 -1
- package/dist/client/assets/{onboarding-WOkgg_xq.js → onboarding-BHO_Rnzq.js} +1 -1
- package/dist/client/assets/{org-install-qJDeUsWL.js → org-install-2TXEdZlz.js} +1 -1
- package/dist/client/assets/{org-layout-xRPdPHsF.js → org-layout-Cjj7Fm4r.js} +1 -1
- package/dist/client/assets/{organization-choice-DLt3vbdn.js → organization-choice-CkWg9KNH.js} +1 -1
- package/dist/client/assets/{orgs-r8WNelqp.js → orgs-KlPXlyiP.js} +1 -1
- package/dist/client/assets/{page-seo-form-Z4BD-gHj.js → page-seo-form-DjriBZMx.js} +1 -1
- package/dist/client/assets/page-seo-sheet-DD3urSRp.js +1 -0
- package/dist/client/assets/{popover-DLFsO9ql.js → popover-B3xv6k0f.js} +1 -1
- package/dist/client/assets/post-editor-BavM-_1w.js +1 -0
- package/dist/client/assets/{primitives-DymvxVoH.js → primitives-4r5UvWxF.js} +1 -1
- package/dist/client/assets/{profile-3e8Rritk.js → profile-DCVo9oBR.js} +1 -1
- package/dist/client/assets/project-app-view-CIsYoev0.js +1 -0
- package/dist/client/assets/record-editor-DaQl56m6.js +1 -0
- package/dist/client/assets/redirect-editor-B6fqsY-U.js +1 -0
- package/dist/client/assets/registry-CnzeAXf6.js +2 -0
- package/dist/client/assets/{registry-layout-CueA0Phw.js → registry-layout-fNbPN3WV.js} +1 -1
- package/dist/client/assets/{reports-BvwvhCgB.js → reports-jXwe3eD7.js} +1 -1
- package/dist/client/assets/{require-capability-DEQ0QqLK.js → require-capability-CHlf1rTn.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Cx4vAYLa.js → required-auth-layout-DFIfQpbY.js} +1 -1
- package/dist/client/assets/{reset-password-BJ4m64S2.js → reset-password-DbCY-Kmq.js} +1 -1
- package/dist/client/assets/{roles-BDblC0hV.js → roles-BNMbLFNf.js} +1 -1
- package/dist/client/assets/{search-input-A-rUbWgA.js → search-input-BDbpjvkV.js} +1 -1
- package/dist/client/assets/{secrets-YwMUYNpK.js → secrets-BlxKtTsE.js} +1 -1
- package/dist/client/assets/{sections-editor-QZQZe38v.js → sections-editor-DZ6I4T5H.js} +2 -2
- package/dist/client/assets/{select-BpDhPcun.js → select-DmXTa4oO.js} +1 -1
- package/dist/client/assets/{select-model-CatZPcMe.js → select-model-CdVm102U.js} +1 -1
- package/dist/client/assets/{self-tool-result-CR7hwEPJ.js → self-tool-result-C7Qwny0_.js} +1 -1
- package/dist/client/assets/seo-editor-BjIwY6PS.js +1 -0
- package/dist/client/assets/{settings-layout-DF7IHwQP.js → settings-layout-BzzXOvqO.js} +1 -1
- package/dist/client/assets/{settings-section-BMZXZlUy.js → settings-section-Dz9Hgc5z.js} +1 -1
- package/dist/client/assets/{shell-controls-rjSUQvGy.js → shell-controls-DfAgWbzA.js} +1 -1
- package/dist/client/assets/{shell-layout-CXlEJw1W.js → shell-layout-D8oi0xqO.js} +1 -1
- package/dist/client/assets/{sidebar-B5e9YFZV.js → sidebar-BPtwSHPU.js} +1 -1
- package/dist/client/assets/{skeleton-iIH-l5ge.js → skeleton-DL2SpY2q.js} +1 -1
- package/dist/client/assets/{sso-DXqtVqzR.js → sso-2ehoRgV-.js} +1 -1
- package/dist/client/assets/store-registry-By05kKAJ.js +2 -0
- package/dist/client/assets/{store-CBMWVYX8.js → store-rfQUPJd5.js} +1 -1
- package/dist/client/assets/{studio-tools-BMu9ujdK.js → studio-tools-NTdqO4cY.js} +1 -1
- package/dist/client/assets/{switch-Bm3cV4VT.js → switch-BV4z0b9T.js} +1 -1
- package/dist/client/assets/{table-11-lI2-U.js → table-CnZR0VSr.js} +1 -1
- package/dist/client/assets/{tabs-B1IIhvpI.js → tabs-BAuVnieJ.js} +1 -1
- package/dist/client/assets/{textarea-C7Ka9--4.js → textarea-BfGzPoPY.js} +1 -1
- package/dist/client/assets/{toggle-group-aVQoPUrJ.js → toggle-group-CYMdMteR.js} +1 -1
- package/dist/client/assets/{toolbar-Cl3ZgcxS.js → toolbar-PLpyNcZI.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DXJqGPLR.js → toolbar-icon-button-CeJ-M4Lq.js} +1 -1
- package/dist/client/assets/{tooltip-CXgiQhhm.js → tooltip-DWRiLMWp.js} +1 -1
- package/dist/client/assets/{use-ai-providers-MB5_8NZz.js → use-ai-providers-BjwhishN.js} +1 -1
- package/dist/client/assets/{use-api-keys-DqQKr5gb.js → use-api-keys-DDbCgoYH.js} +1 -1
- package/dist/client/assets/{use-automations-BadyXyvk.js → use-automations-CmDGzCKs.js} +1 -1
- package/dist/client/assets/{use-autosave-aQZAMQ3d.js → use-autosave-2cLkLrpA.js} +1 -1
- package/dist/client/assets/{use-capability-DOkFocRF.js → use-capability-D6Cr5XLD.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DH_5Vx8H.js → use-clock-tick-YX4GFMxo.js} +1 -1
- package/dist/client/assets/{use-connection-CvtYxdhN.js → use-connection-DZt9M_kE.js} +1 -1
- package/dist/client/assets/{use-copy-B8XjwaPC.js → use-copy-D-oq_4A-.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BMw67F1n.js → use-create-virtual-mcp-CkptpNw0.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Ca3ejIda.js → use-debounced-autosave-BRdvgfun.js} +1 -1
- package/dist/client/assets/{use-debounced-value-uO_bm41c.js → use-debounced-value-nEW22WWj.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BWO36018.js → use-deco-credits-B7d_ENOZ.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CGYwsG7F.js → use-decopilot-events-Bt_io3vc.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B45LKTd-.js → use-delete-connection-C9ZwRw1E.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-TjdSAKBI.js → use-deployment-admin-CaK-Wxy5.js} +1 -1
- package/dist/client/assets/{use-file-configs-D0UXwKC-.js → use-file-configs-CI89wAsg.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Hw6OI4g1.js → use-infinite-scroll-CshkwFkA.js} +1 -1
- package/dist/client/assets/{use-join-requests-lAPAhnwD.js → use-join-requests-HMxdQYrC.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DUmtbF9a.js → use-mcp-auth-status-DUifxaiD.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DmQaIOOa.js → use-mcp-client-D4kRoqsh.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-a_XYf5q4.js → use-mcp-tools-BYxoQiZ3.js} +1 -1
- package/dist/client/assets/{use-members-BV0XC_mc.js → use-members-D4YIm-jB.js} +1 -1
- package/dist/client/assets/{use-mobile-Drq4EVlE.js → use-mobile-C_lJg_dg.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Bot51FWx.js → use-navigate-to-agent-DjMxrQKV.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CBYYA83j.js → use-org-auth-client-DgP2VDdS.js} +1 -1
- package/dist/client/assets/{use-org-sso-8BJQP_6U.js → use-org-sso-QZb4zZJx.js} +1 -1
- package/dist/client/assets/{use-organization-roles-FQaweo2A.js → use-organization-roles-FhltwO5c.js} +1 -1
- package/dist/client/assets/{use-organization-settings-C_BR8EF_.js → use-organization-settings-vlBvr0tn.js} +1 -1
- package/dist/client/assets/{use-registry-app-ZmEmrGrH.js → use-registry-app-K85L0rUl.js} +1 -1
- package/dist/client/assets/{use-registry-connections-C3-SU_T2.js → use-registry-connections-B3nNZ4qn.js} +1 -1
- package/dist/client/assets/{use-secrets-BcAG0HqF.js → use-secrets-B0jJgRIg.js} +1 -1
- package/dist/client/assets/{use-status-sounds-rDer6b7Q.js → use-status-sounds-z4VxJ46O.js} +1 -1
- package/dist/client/assets/{use-view-mode-nVUSu4-W.js → use-view-mode-DQq45P_3.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Cf1nyRqm.js → use-virtual-mcp-GuNcK9nz.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BXBurSQ0.js +1 -0
- package/dist/client/assets/{useQueries-BoKQ4HCM.js → useQueries-DRp_cFJk.js} +1 -1
- package/dist/client/assets/{useRouterState-DPiq3iqZ.js → useRouterState-B-qu9Nmh.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CLVVU3Ta.js +1 -0
- package/dist/client/assets/{users-C_J62pbJ.js → users-Cg-wv6bv.js} +1 -1
- package/dist/client/assets/{variant-calendar-DehNI1DC.js → variant-calendar-BFuuTNsI.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-VHJQUsyn.js → view-mode-toggle-Byh8oua5.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +175 -126
- package/dist/server/server.js +14 -14
- package/package.json +1 -1
- package/dist/client/assets/agents-list-B1NKYkwk.js +0 -1
- package/dist/client/assets/app-editor-BeXRyBkE.js +0 -1
- package/dist/client/assets/bulk-category-panel-gIdN0C2r.js +0 -1
- package/dist/client/assets/category-editor-BpvOF675.js +0 -1
- package/dist/client/assets/file-explorer-DqNiOL8G.js +0 -2
- package/dist/client/assets/page-seo-sheet-BI8dc_BJ.js +0 -1
- package/dist/client/assets/post-editor-Cpt2UCzl.js +0 -1
- package/dist/client/assets/project-app-view-CAalALic.js +0 -1
- package/dist/client/assets/record-editor-CUXDJmZd.js +0 -1
- package/dist/client/assets/redirect-editor-C90Qs93V.js +0 -1
- package/dist/client/assets/registry-DoqNLs97.js +0 -2
- package/dist/client/assets/seo-editor-BFPg6rGR.js +0 -1
- package/dist/client/assets/store-registry-DN6ZDMrJ.js +0 -2
- package/dist/client/assets/useInfiniteQuery-CVGu7rzp.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CjrVCjrM.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as J,b as Z,j as i,r as V,E as pe,F as ue,o as Se,B as X,d as xe,f as he,q as ae,K as ye,e as je,t as ge}from"./index-Dyk7ikoX.js";import{i as ve}from"./AlertCircle-492EEp2A.js";import{i as Ce}from"./ChevronRight-BTtZur33.js";import{s as be}from"./Plus-n0d6qLEa.js";import{s as _e}from"./Trash01-DpAfQYpB.js";import{I as re}from"./input-CrADDofK.js";import{S as de}from"./switch-Bm3cV4VT.js";import{S as Re}from"./skeleton-iIH-l5ge.js";import{A as me}from"./avatar-h4p7JkEM.js";import{b as ke,P as Ne,a as Pe}from"./popover-DLFsO9ql.js";import{b as fe}from"./use-connection-CvtYxdhN.js";import{W as ne}from"./use-mcp-client-DmQaIOOa.js";import{P as te}from"./index-DpBmVLF2.js";import{u as Te}from"./use-registry-connections-C3-SU_T2.js";import{g as we,h as Ae}from"./use-organization-settings-C_BR8EF_.js";import{c as ze,b as H,a as ie,S as le}from"./settings-section-BMZXZlUy.js";import{R as Ee}from"./require-capability-DEQ0QqLK.js";import"./User01-CIB_r_NM.js";import"./auth-DYlyeYuK.js";import"./sidebar-B5e9YFZV.js";import"./LayoutLeft-DrmvAZtO.js";import"./use-mobile-Drq4EVlE.js";import"./X-DKUaOMiG.js";import"./tooltip-CXgiQhhm.js";import"./studio-tools-BMu9ujdK.js";import"./card-D2g28w4T.js";import"./ArrowUpRight-Chggeoxo.js";import"./use-capability-DOkFocRF.js";import"./access-gate-axaZ1vUD.js";import"./capability-load-error-Azqebb7t.js";function Me(t){const e=J.c(6),{error:l}=t,c=Z();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(ve,{size:16}),e[0]=s):s=e[0];let o;e[1]!==c?(o=c("settings.orgStore.failedLoadStoreSettings"),e[1]=c,e[2]=o):o=e[2];let r;return e[3]!==l.message||e[4]!==o?(r=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[s,i.jsxs("span",{className:"text-sm font-medium",children:[o," ",l.message]})]}),e[3]=l.message,e[4]=o,e[5]=r):r=e[5],r}function $e(t){const e=J.c(74),{onCancel:l,onSuccess:c}=t,s=Z(),o=fe(),[r,u]=V.useState(""),[a,A]=V.useState(""),[S,_]=V.useState("");let j;e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==S||e[4]!==a?(j=async()=>(await o.create.mutateAsync({title:r||s("settings.orgStore.privateRegistry"),description:s("settings.orgStore.privateMcpRegistry"),connection_type:"HTTP",connection_url:a,connection_token:S||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=o,e[1]=r,e[2]=s,e[3]=S,e[4]=a,e[5]=j):j=e[5];let d;e[6]!==c||e[7]!==s?(d=y=>{ae("store_private_registry_added",{connection_id:y}),ge.success(s("settings.orgStore.privateRegistryAdded")),c(y)},e[6]=c,e[7]=s,e[8]=d):d=e[8];let x;e[9]!==s?(x=y=>{ge.error(s("settings.orgStore.failedAddRegistry",{error:y.message}))},e[9]=s,e[10]=x):x=e[10];let m;e[11]!==j||e[12]!==d||e[13]!==x?(m={mutationFn:j,onSuccess:d,onError:x},e[11]=j,e[12]=d,e[13]=x,e[14]=m):m=e[14];const{mutate:v,isPending:g}=je(m);let h;e[15]!==s?(h=s("settings.orgStore.nameLabel"),e[15]=s,e[16]=h):h=e[16];let f;e[17]!==s?(f=s("settings.orgStore.namePlaceholder"),e[17]=s,e[18]=f):f=e[18];let p;e[19]===Symbol.for("react.memo_cache_sentinel")?(p=y=>u(y.target.value),e[19]=p):p=e[19];let C;e[20]!==r||e[21]!==f?(C=i.jsx(re,{placeholder:f,value:r,onChange:p,className:"w-[280px]"}),e[20]=r,e[21]=f,e[22]=C):C=e[22];let R;e[23]!==h||e[24]!==C?(R=i.jsx(H,{title:h,action:C}),e[23]=h,e[24]=C,e[25]=R):R=e[25];let F;e[26]!==s?(F=s("settings.orgStore.registryUrlLabel"),e[26]=s,e[27]=F):F=e[27];let U;e[28]!==s?(U=s("settings.orgStore.registryUrlPlaceholder"),e[28]=s,e[29]=U):U=e[29];let Y;e[30]===Symbol.for("react.memo_cache_sentinel")?(Y=y=>A(y.target.value),e[30]=Y):Y=e[30];let q;e[31]!==U||e[32]!==a?(q=i.jsx(re,{placeholder:U,value:a,onChange:Y,className:"w-[280px]"}),e[31]=U,e[32]=a,e[33]=q):q=e[33];let B;e[34]!==F||e[35]!==q?(B=i.jsx(H,{title:F,action:q}),e[34]=F,e[35]=q,e[36]=B):B=e[36];let z;e[37]!==s?(z=s("settings.orgStore.authTokenLabel"),e[37]=s,e[38]=z):z=e[38];let b;e[39]!==s?(b=s("settings.orgStore.optional"),e[39]=s,e[40]=b):b=e[40];let E;e[41]!==s?(E=s("settings.orgStore.authTokenPlaceholder"),e[41]=s,e[42]=E):E=e[42];let O;e[43]===Symbol.for("react.memo_cache_sentinel")?(O=y=>_(y.target.value),e[43]=O):O=e[43];let M;e[44]!==E||e[45]!==S?(M=i.jsx(re,{type:"password",placeholder:E,value:S,onChange:O,className:"w-[280px]"}),e[44]=E,e[45]=S,e[46]=M):M=e[46];let I;e[47]!==z||e[48]!==b||e[49]!==M?(I=i.jsx(H,{title:z,description:b,action:M}),e[47]=z,e[48]=b,e[49]=M,e[50]=I):I=e[50];let k;e[51]!==s?(k=s("settings.orgStore.cancel"),e[51]=s,e[52]=k):k=e[52];let D;e[53]!==g||e[54]!==l||e[55]!==k?(D=i.jsx(X,{variant:"ghost",size:"sm",onClick:l,disabled:g,children:k}),e[53]=g,e[54]=l,e[55]=k,e[56]=D):D=e[56];let N;e[57]!==v?(N=()=>v(),e[57]=v,e[58]=N):N=e[58];const L=!a||g;let P;e[59]!==g||e[60]!==s?(P=s(g?"settings.orgStore.adding":"settings.orgStore.addRegistry"),e[59]=g,e[60]=s,e[61]=P):P=e[61];let T;e[62]!==N||e[63]!==L||e[64]!==P?(T=i.jsx(X,{size:"sm",onClick:N,disabled:L,children:P}),e[62]=N,e[63]=L,e[64]=P,e[65]=T):T=e[65];let w;e[66]!==D||e[67]!==T?(w=i.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[D,T]}),e[66]=D,e[67]=T,e[68]=w):w=e[68];let $;return e[69]!==B||e[70]!==I||e[71]!==w||e[72]!==R?($=i.jsxs(ie,{children:[R,B,I,w]}),e[69]=B,e[70]=I,e[71]=w,e[72]=R,e[73]=$):$=e[73],$}function se(t){const e=J.c(30),{name:l,description:c,icon:s,enabled:o,onToggle:r,onDelete:u,href:a}=t,A=Z(),S=xe();let _;e[0]===Symbol.for("react.memo_cache_sentinel")?(_={from:"/shell/$org"},e[0]=_):_=e[0];const{org:j}=he(_);let d;e[1]!==o||e[2]!==a||e[3]!==S||e[4]!==r||e[5]!==j?(d=()=>{a?S({to:a,params:{org:j}}):r(!o)},e[1]=o,e[2]=a,e[3]=S,e[4]=r,e[5]=j,e[6]=d):d=e[6];const x=d;let m;e[7]!==s||e[8]!==l?(m=s?i.jsx("img",{src:s,alt:l,className:"size-8 rounded-md object-contain"}):i.jsx(me,{fallback:l.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=s,e[8]=l,e[9]=m):m=e[9];let v;e[10]!==u||e[11]!==A?(v=u&&i.jsxs(ke,{children:[i.jsx(Ne,{asChild:!0,children:i.jsx(X,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Ie,children:i.jsx(_e,{size:14})})}),i.jsx(Pe,{className:"w-auto p-2",align:"end",children:i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("p",{className:"text-xs font-medium",children:A("settings.orgStore.removeRegistry")}),i.jsx(X,{variant:"destructive",size:"xs",onClick:R=>{R.stopPropagation(),u()},children:A("settings.orgStore.remove")})]})})]}),e[10]=u,e[11]=A,e[12]=v):v=e[12];let g;e[13]!==r?(g=R=>r(R),e[13]=r,e[14]=g):g=e[14];let h;e[15]!==o||e[16]!==g?(h=i.jsx(de,{checked:o,onClick:Fe,onCheckedChange:g}),e[15]=o,e[16]=g,e[17]=h):h=e[17];let f;e[18]!==a?(f=a&&i.jsx(Ce,{size:14,className:"text-muted-foreground"}),e[18]=a,e[19]=f):f=e[19];let p;e[20]!==v||e[21]!==h||e[22]!==f?(p=i.jsxs("div",{className:"flex items-center gap-2",children:[v,h,f]}),e[20]=v,e[21]=h,e[22]=f,e[23]=p):p=e[23];let C;return e[24]!==c||e[25]!==x||e[26]!==l||e[27]!==m||e[28]!==p?(C=i.jsx(H,{title:l,description:c,onClick:x,icon:m,action:p}),e[24]=c,e[25]=x,e[26]=l,e[27]=m,e[28]=p,e[29]=C):C=e[29],C}function Fe(t){return t.stopPropagation()}function Ie(t){return t.stopPropagation()}function De(){const t=J.c(78),e=Z(),{org:l}=ue(),c=Te(),s=fe(),o=we(),{mutateAsync:r}=Ae(),u=Se(),[a,A]=V.useState(!1);let S,_,j,d,x,m;if(t[0]!==s||t[1]!==l.id||t[2]!==u||t[3]!==o||t[4]!==c||t[5]!==a||t[6]!==e||t[7]!==r){const f=ne.REGISTRY(l.id),p=n=>{if(!o)return n===f;const K=o.registries[n];return K?K.enabled:n===f},C=ne.COMMUNITY_REGISTRY(l.id),R=c.find(n=>n.id===f),F=c.find(n=>n.id===C||n.id==="community-registry"),U=F?.id??C,Y=ne.SELF(l.id),q=new Set([f,C,"community-registry",Y]),B=c.filter(n=>!q.has(n.id));let z;t[14]!==o||t[15]!==r?(z=async(n,K)=>{ae("store_registry_toggled",{connection_id:n,enabled:K});const ce=o??{registries:{},blockedMcps:[]};await r({...ce,registries:{...ce.registries,[n]:{enabled:K}}})},t[14]=o,t[15]=r,t[16]=z):z=t[16];const b=z;let E;t[17]!==s||t[18]!==l.id||t[19]!==u?(E=async n=>{ae("store_private_registry_removed",{connection_id:n}),await s.delete.mutateAsync(n),u.invalidateQueries({queryKey:ye.organizationSettings(l.id)})},t[17]=s,t[18]=l.id,t[19]=u,t[20]=E):E=t[20];const O=E;let M;t[21]!==o||t[22]!==r?(M=async n=>{A(!1);const K=o??{registries:{},blockedMcps:[]};await r({...K,registries:{...K.registries,[n]:{enabled:!0}}})},t[21]=o,t[22]=r,t[23]=M):M=t[23];const I=M;let k;t[24]!==e?(k=e("settings.orgStore.decoStoreSection"),t[24]=e,t[25]=k):k=t[25];const D=R?i.jsx(se,{name:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.decoStoreDescription"),icon:R.icon,enabled:p(f),onToggle:n=>b(f,n)}):i.jsx(H,{title:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.connectionNotFound")});let N;t[26]!==D?(N=i.jsx(ie,{children:D}),t[26]=D,t[27]=N):N=t[27],t[28]!==k||t[29]!==N?(x=i.jsx(le,{title:k,children:N}),t[28]=k,t[29]=N,t[30]=x):x=t[30];let L;t[31]!==e?(L=e("settings.orgStore.privateRegistriesSection"),t[31]=e,t[32]=L):L=t[32];let P;t[33]!==a||t[34]!==e?(P=a?void 0:i.jsxs(X,{variant:"outline",size:"sm",onClick:()=>A(!0),children:[i.jsx(be,{size:14}),e("settings.orgStore.addRegistry")]}),t[33]=a,t[34]=e,t[35]=P):P=t[35];let T;t[36]!==I||t[37]!==a?(T=a&&i.jsx($e,{onCancel:()=>A(!1),onSuccess:I}),t[36]=I,t[37]=a,t[38]=T):T=t[38];let w;t[39]!==e?(w=e("settings.orgStore.privateRegistry"),t[39]=e,t[40]=w):w=t[40];let $;t[41]!==e?($=e("settings.orgStore.privateRegistryDescription"),t[41]=e,t[42]=$):$=t[42];let y;t[43]!==p?(y=p("self"),t[43]=p,t[44]=y):y=t[44];let G;t[45]!==b?(G=n=>b("self",n),t[45]=b,t[46]=G):G=t[46];let Q;t[47]!==w||t[48]!==$||t[49]!==y||t[50]!==G?(Q=i.jsx(se,{name:w,description:$,enabled:y,onToggle:G,href:"/$org/settings/store/registry"}),t[47]=w,t[48]=$,t[49]=y,t[50]=G,t[51]=Q):Q=t[51];let ee;t[52]!==O||t[53]!==b||t[54]!==p||t[55]!==e?(ee=n=>i.jsx(se,{name:n.title,description:n.description??e("settings.orgStore.privateMcpRegistry"),icon:n.icon,enabled:p(n.id),onToggle:K=>b(n.id,K),onDelete:()=>O(n.id)},n.id),t[52]=O,t[53]=b,t[54]=p,t[55]=e,t[56]=ee):ee=t[56];const oe=B.map(ee);let W;t[57]!==Q||t[58]!==oe?(W=i.jsxs(ie,{children:[Q,oe]}),t[57]=Q,t[58]=oe,t[59]=W):W=t[59],t[60]!==L||t[61]!==P||t[62]!==T||t[63]!==W?(m=i.jsxs(le,{title:L,actions:P,children:[T,W]}),t[60]=L,t[61]=P,t[62]=T,t[63]=W,t[64]=m):m=t[64],_=le,t[65]!==e?(d=e("settings.orgStore.communitySection"),t[65]=e,t[66]=d):d=t[66],S=ie,j=F?i.jsx(se,{name:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryDescription"),icon:F.icon,enabled:p(U),onToggle:n=>b(U,n)}):i.jsx(H,{title:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryNotAdded"),icon:i.jsx(me,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:i.jsx(de,{checked:!1,disabled:!0,onCheckedChange:Le})}),t[0]=s,t[1]=l.id,t[2]=u,t[3]=o,t[4]=c,t[5]=a,t[6]=e,t[7]=r,t[8]=S,t[9]=_,t[10]=j,t[11]=d,t[12]=x,t[13]=m}else S=t[8],_=t[9],j=t[10],d=t[11],x=t[12],m=t[13];let v;t[67]!==S||t[68]!==j?(v=i.jsx(S,{children:j}),t[67]=S,t[68]=j,t[69]=v):v=t[69];let g;t[70]!==_||t[71]!==d||t[72]!==v?(g=i.jsx(_,{title:d,children:v}),t[70]=_,t[71]=d,t[72]=v,t[73]=g):g=t[73];let h;return t[74]!==x||t[75]!==m||t[76]!==g?(h=i.jsxs(i.Fragment,{children:[x,m,g]}),t[74]=x,t[75]=m,t[76]=g,t[77]=h):h=t[77],h}function Le(){}function Ke(){const t=J.c(13),e=Z();let l;t[0]!==e?(l=A=>{const{error:S}=A;return i.jsx(Me,{error:S??new Error(e("settings.orgStore.failedLoadStoreSettings"))})},t[0]=e,t[1]=l):l=t[1];let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(Re,{className:"h-64 w-full"}),t[2]=c):c=t[2];let s;t[3]!==e?(s=e("settings.orgStore.pageTitle"),t[3]=e,t[4]=s):s=t[4];let o;t[5]!==s?(o=i.jsx(te.Title,{children:s}),t[5]=s,t[6]=o):o=t[6];let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(De,{}),t[7]=r):r=t[7];let u;t[8]!==o?(u=i.jsx(V.Suspense,{fallback:c,children:i.jsx(te,{children:i.jsx(te.Content,{children:i.jsx(te.Body,{children:i.jsxs(ze,{children:[o,r]})})})})}),t[8]=o,t[9]=u):u=t[9];let a;return t[10]!==l||t[11]!==u?(a=i.jsx(pe,{fallback:l,children:u}),t[10]=l,t[11]=u,t[12]=a):a=t[12],a}function xt(){const t=J.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(Ee,{capability:"registry:manage",area:"the store",children:i.jsx(Ke,{})}),t[0]=e):e=t[0],e}export{xt as default};
|
|
1
|
+
import{c as J,b as Z,j as i,r as V,E as pe,F as ue,o as Se,B as X,d as xe,f as he,q as ae,K as ye,e as je,t as ge}from"./index-DPUSzQFm.js";import{i as ve}from"./AlertCircle-DY_zDIC_.js";import{i as Ce}from"./ChevronRight-DBBXusFc.js";import{s as be}from"./Plus-BjwUeIOu.js";import{s as _e}from"./Trash01-DXzlmJ34.js";import{I as re}from"./input-C6HduerO.js";import{S as de}from"./switch-BV4z0b9T.js";import{S as Re}from"./skeleton-DL2SpY2q.js";import{A as me}from"./avatar-D-XB1bPv.js";import{b as ke,P as Ne,a as Pe}from"./popover-B3xv6k0f.js";import{b as fe}from"./use-connection-DZt9M_kE.js";import{W as ne}from"./use-mcp-client-D4kRoqsh.js";import{P as te}from"./index-cX02Wkot.js";import{u as Te}from"./use-registry-connections-B3nNZ4qn.js";import{g as we,h as Ae}from"./use-organization-settings-vlBvr0tn.js";import{c as ze,b as H,a as ie,S as le}from"./settings-section-Dz9Hgc5z.js";import{R as Ee}from"./require-capability-CHlf1rTn.js";import"./User01-xn3joisa.js";import"./auth-Bkh-2aIu.js";import"./sidebar-BPtwSHPU.js";import"./LayoutLeft-B2dvdNWS.js";import"./use-mobile-C_lJg_dg.js";import"./X-B-U9vY4e.js";import"./tooltip-DWRiLMWp.js";import"./studio-tools-NTdqO4cY.js";import"./card-cDcO8pqf.js";import"./ArrowUpRight-DQ1ltOUw.js";import"./use-capability-D6Cr5XLD.js";import"./access-gate-DoRnqeAN.js";import"./capability-load-error-BmWjgACv.js";function Me(t){const e=J.c(6),{error:l}=t,c=Z();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(ve,{size:16}),e[0]=s):s=e[0];let o;e[1]!==c?(o=c("settings.orgStore.failedLoadStoreSettings"),e[1]=c,e[2]=o):o=e[2];let r;return e[3]!==l.message||e[4]!==o?(r=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[s,i.jsxs("span",{className:"text-sm font-medium",children:[o," ",l.message]})]}),e[3]=l.message,e[4]=o,e[5]=r):r=e[5],r}function $e(t){const e=J.c(74),{onCancel:l,onSuccess:c}=t,s=Z(),o=fe(),[r,u]=V.useState(""),[a,A]=V.useState(""),[S,_]=V.useState("");let j;e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==S||e[4]!==a?(j=async()=>(await o.create.mutateAsync({title:r||s("settings.orgStore.privateRegistry"),description:s("settings.orgStore.privateMcpRegistry"),connection_type:"HTTP",connection_url:a,connection_token:S||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=o,e[1]=r,e[2]=s,e[3]=S,e[4]=a,e[5]=j):j=e[5];let d;e[6]!==c||e[7]!==s?(d=y=>{ae("store_private_registry_added",{connection_id:y}),ge.success(s("settings.orgStore.privateRegistryAdded")),c(y)},e[6]=c,e[7]=s,e[8]=d):d=e[8];let x;e[9]!==s?(x=y=>{ge.error(s("settings.orgStore.failedAddRegistry",{error:y.message}))},e[9]=s,e[10]=x):x=e[10];let m;e[11]!==j||e[12]!==d||e[13]!==x?(m={mutationFn:j,onSuccess:d,onError:x},e[11]=j,e[12]=d,e[13]=x,e[14]=m):m=e[14];const{mutate:v,isPending:g}=je(m);let h;e[15]!==s?(h=s("settings.orgStore.nameLabel"),e[15]=s,e[16]=h):h=e[16];let f;e[17]!==s?(f=s("settings.orgStore.namePlaceholder"),e[17]=s,e[18]=f):f=e[18];let p;e[19]===Symbol.for("react.memo_cache_sentinel")?(p=y=>u(y.target.value),e[19]=p):p=e[19];let C;e[20]!==r||e[21]!==f?(C=i.jsx(re,{placeholder:f,value:r,onChange:p,className:"w-[280px]"}),e[20]=r,e[21]=f,e[22]=C):C=e[22];let R;e[23]!==h||e[24]!==C?(R=i.jsx(H,{title:h,action:C}),e[23]=h,e[24]=C,e[25]=R):R=e[25];let F;e[26]!==s?(F=s("settings.orgStore.registryUrlLabel"),e[26]=s,e[27]=F):F=e[27];let U;e[28]!==s?(U=s("settings.orgStore.registryUrlPlaceholder"),e[28]=s,e[29]=U):U=e[29];let Y;e[30]===Symbol.for("react.memo_cache_sentinel")?(Y=y=>A(y.target.value),e[30]=Y):Y=e[30];let q;e[31]!==U||e[32]!==a?(q=i.jsx(re,{placeholder:U,value:a,onChange:Y,className:"w-[280px]"}),e[31]=U,e[32]=a,e[33]=q):q=e[33];let B;e[34]!==F||e[35]!==q?(B=i.jsx(H,{title:F,action:q}),e[34]=F,e[35]=q,e[36]=B):B=e[36];let z;e[37]!==s?(z=s("settings.orgStore.authTokenLabel"),e[37]=s,e[38]=z):z=e[38];let b;e[39]!==s?(b=s("settings.orgStore.optional"),e[39]=s,e[40]=b):b=e[40];let E;e[41]!==s?(E=s("settings.orgStore.authTokenPlaceholder"),e[41]=s,e[42]=E):E=e[42];let O;e[43]===Symbol.for("react.memo_cache_sentinel")?(O=y=>_(y.target.value),e[43]=O):O=e[43];let M;e[44]!==E||e[45]!==S?(M=i.jsx(re,{type:"password",placeholder:E,value:S,onChange:O,className:"w-[280px]"}),e[44]=E,e[45]=S,e[46]=M):M=e[46];let I;e[47]!==z||e[48]!==b||e[49]!==M?(I=i.jsx(H,{title:z,description:b,action:M}),e[47]=z,e[48]=b,e[49]=M,e[50]=I):I=e[50];let k;e[51]!==s?(k=s("settings.orgStore.cancel"),e[51]=s,e[52]=k):k=e[52];let D;e[53]!==g||e[54]!==l||e[55]!==k?(D=i.jsx(X,{variant:"ghost",size:"sm",onClick:l,disabled:g,children:k}),e[53]=g,e[54]=l,e[55]=k,e[56]=D):D=e[56];let N;e[57]!==v?(N=()=>v(),e[57]=v,e[58]=N):N=e[58];const L=!a||g;let P;e[59]!==g||e[60]!==s?(P=s(g?"settings.orgStore.adding":"settings.orgStore.addRegistry"),e[59]=g,e[60]=s,e[61]=P):P=e[61];let T;e[62]!==N||e[63]!==L||e[64]!==P?(T=i.jsx(X,{size:"sm",onClick:N,disabled:L,children:P}),e[62]=N,e[63]=L,e[64]=P,e[65]=T):T=e[65];let w;e[66]!==D||e[67]!==T?(w=i.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[D,T]}),e[66]=D,e[67]=T,e[68]=w):w=e[68];let $;return e[69]!==B||e[70]!==I||e[71]!==w||e[72]!==R?($=i.jsxs(ie,{children:[R,B,I,w]}),e[69]=B,e[70]=I,e[71]=w,e[72]=R,e[73]=$):$=e[73],$}function se(t){const e=J.c(30),{name:l,description:c,icon:s,enabled:o,onToggle:r,onDelete:u,href:a}=t,A=Z(),S=xe();let _;e[0]===Symbol.for("react.memo_cache_sentinel")?(_={from:"/shell/$org"},e[0]=_):_=e[0];const{org:j}=he(_);let d;e[1]!==o||e[2]!==a||e[3]!==S||e[4]!==r||e[5]!==j?(d=()=>{a?S({to:a,params:{org:j}}):r(!o)},e[1]=o,e[2]=a,e[3]=S,e[4]=r,e[5]=j,e[6]=d):d=e[6];const x=d;let m;e[7]!==s||e[8]!==l?(m=s?i.jsx("img",{src:s,alt:l,className:"size-8 rounded-md object-contain"}):i.jsx(me,{fallback:l.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=s,e[8]=l,e[9]=m):m=e[9];let v;e[10]!==u||e[11]!==A?(v=u&&i.jsxs(ke,{children:[i.jsx(Ne,{asChild:!0,children:i.jsx(X,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Ie,children:i.jsx(_e,{size:14})})}),i.jsx(Pe,{className:"w-auto p-2",align:"end",children:i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("p",{className:"text-xs font-medium",children:A("settings.orgStore.removeRegistry")}),i.jsx(X,{variant:"destructive",size:"xs",onClick:R=>{R.stopPropagation(),u()},children:A("settings.orgStore.remove")})]})})]}),e[10]=u,e[11]=A,e[12]=v):v=e[12];let g;e[13]!==r?(g=R=>r(R),e[13]=r,e[14]=g):g=e[14];let h;e[15]!==o||e[16]!==g?(h=i.jsx(de,{checked:o,onClick:Fe,onCheckedChange:g}),e[15]=o,e[16]=g,e[17]=h):h=e[17];let f;e[18]!==a?(f=a&&i.jsx(Ce,{size:14,className:"text-muted-foreground"}),e[18]=a,e[19]=f):f=e[19];let p;e[20]!==v||e[21]!==h||e[22]!==f?(p=i.jsxs("div",{className:"flex items-center gap-2",children:[v,h,f]}),e[20]=v,e[21]=h,e[22]=f,e[23]=p):p=e[23];let C;return e[24]!==c||e[25]!==x||e[26]!==l||e[27]!==m||e[28]!==p?(C=i.jsx(H,{title:l,description:c,onClick:x,icon:m,action:p}),e[24]=c,e[25]=x,e[26]=l,e[27]=m,e[28]=p,e[29]=C):C=e[29],C}function Fe(t){return t.stopPropagation()}function Ie(t){return t.stopPropagation()}function De(){const t=J.c(78),e=Z(),{org:l}=ue(),c=Te(),s=fe(),o=we(),{mutateAsync:r}=Ae(),u=Se(),[a,A]=V.useState(!1);let S,_,j,d,x,m;if(t[0]!==s||t[1]!==l.id||t[2]!==u||t[3]!==o||t[4]!==c||t[5]!==a||t[6]!==e||t[7]!==r){const f=ne.REGISTRY(l.id),p=n=>{if(!o)return n===f;const K=o.registries[n];return K?K.enabled:n===f},C=ne.COMMUNITY_REGISTRY(l.id),R=c.find(n=>n.id===f),F=c.find(n=>n.id===C||n.id==="community-registry"),U=F?.id??C,Y=ne.SELF(l.id),q=new Set([f,C,"community-registry",Y]),B=c.filter(n=>!q.has(n.id));let z;t[14]!==o||t[15]!==r?(z=async(n,K)=>{ae("store_registry_toggled",{connection_id:n,enabled:K});const ce=o??{registries:{},blockedMcps:[]};await r({...ce,registries:{...ce.registries,[n]:{enabled:K}}})},t[14]=o,t[15]=r,t[16]=z):z=t[16];const b=z;let E;t[17]!==s||t[18]!==l.id||t[19]!==u?(E=async n=>{ae("store_private_registry_removed",{connection_id:n}),await s.delete.mutateAsync(n),u.invalidateQueries({queryKey:ye.organizationSettings(l.id)})},t[17]=s,t[18]=l.id,t[19]=u,t[20]=E):E=t[20];const O=E;let M;t[21]!==o||t[22]!==r?(M=async n=>{A(!1);const K=o??{registries:{},blockedMcps:[]};await r({...K,registries:{...K.registries,[n]:{enabled:!0}}})},t[21]=o,t[22]=r,t[23]=M):M=t[23];const I=M;let k;t[24]!==e?(k=e("settings.orgStore.decoStoreSection"),t[24]=e,t[25]=k):k=t[25];const D=R?i.jsx(se,{name:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.decoStoreDescription"),icon:R.icon,enabled:p(f),onToggle:n=>b(f,n)}):i.jsx(H,{title:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.connectionNotFound")});let N;t[26]!==D?(N=i.jsx(ie,{children:D}),t[26]=D,t[27]=N):N=t[27],t[28]!==k||t[29]!==N?(x=i.jsx(le,{title:k,children:N}),t[28]=k,t[29]=N,t[30]=x):x=t[30];let L;t[31]!==e?(L=e("settings.orgStore.privateRegistriesSection"),t[31]=e,t[32]=L):L=t[32];let P;t[33]!==a||t[34]!==e?(P=a?void 0:i.jsxs(X,{variant:"outline",size:"sm",onClick:()=>A(!0),children:[i.jsx(be,{size:14}),e("settings.orgStore.addRegistry")]}),t[33]=a,t[34]=e,t[35]=P):P=t[35];let T;t[36]!==I||t[37]!==a?(T=a&&i.jsx($e,{onCancel:()=>A(!1),onSuccess:I}),t[36]=I,t[37]=a,t[38]=T):T=t[38];let w;t[39]!==e?(w=e("settings.orgStore.privateRegistry"),t[39]=e,t[40]=w):w=t[40];let $;t[41]!==e?($=e("settings.orgStore.privateRegistryDescription"),t[41]=e,t[42]=$):$=t[42];let y;t[43]!==p?(y=p("self"),t[43]=p,t[44]=y):y=t[44];let G;t[45]!==b?(G=n=>b("self",n),t[45]=b,t[46]=G):G=t[46];let Q;t[47]!==w||t[48]!==$||t[49]!==y||t[50]!==G?(Q=i.jsx(se,{name:w,description:$,enabled:y,onToggle:G,href:"/$org/settings/store/registry"}),t[47]=w,t[48]=$,t[49]=y,t[50]=G,t[51]=Q):Q=t[51];let ee;t[52]!==O||t[53]!==b||t[54]!==p||t[55]!==e?(ee=n=>i.jsx(se,{name:n.title,description:n.description??e("settings.orgStore.privateMcpRegistry"),icon:n.icon,enabled:p(n.id),onToggle:K=>b(n.id,K),onDelete:()=>O(n.id)},n.id),t[52]=O,t[53]=b,t[54]=p,t[55]=e,t[56]=ee):ee=t[56];const oe=B.map(ee);let W;t[57]!==Q||t[58]!==oe?(W=i.jsxs(ie,{children:[Q,oe]}),t[57]=Q,t[58]=oe,t[59]=W):W=t[59],t[60]!==L||t[61]!==P||t[62]!==T||t[63]!==W?(m=i.jsxs(le,{title:L,actions:P,children:[T,W]}),t[60]=L,t[61]=P,t[62]=T,t[63]=W,t[64]=m):m=t[64],_=le,t[65]!==e?(d=e("settings.orgStore.communitySection"),t[65]=e,t[66]=d):d=t[66],S=ie,j=F?i.jsx(se,{name:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryDescription"),icon:F.icon,enabled:p(U),onToggle:n=>b(U,n)}):i.jsx(H,{title:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryNotAdded"),icon:i.jsx(me,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:i.jsx(de,{checked:!1,disabled:!0,onCheckedChange:Le})}),t[0]=s,t[1]=l.id,t[2]=u,t[3]=o,t[4]=c,t[5]=a,t[6]=e,t[7]=r,t[8]=S,t[9]=_,t[10]=j,t[11]=d,t[12]=x,t[13]=m}else S=t[8],_=t[9],j=t[10],d=t[11],x=t[12],m=t[13];let v;t[67]!==S||t[68]!==j?(v=i.jsx(S,{children:j}),t[67]=S,t[68]=j,t[69]=v):v=t[69];let g;t[70]!==_||t[71]!==d||t[72]!==v?(g=i.jsx(_,{title:d,children:v}),t[70]=_,t[71]=d,t[72]=v,t[73]=g):g=t[73];let h;return t[74]!==x||t[75]!==m||t[76]!==g?(h=i.jsxs(i.Fragment,{children:[x,m,g]}),t[74]=x,t[75]=m,t[76]=g,t[77]=h):h=t[77],h}function Le(){}function Ke(){const t=J.c(13),e=Z();let l;t[0]!==e?(l=A=>{const{error:S}=A;return i.jsx(Me,{error:S??new Error(e("settings.orgStore.failedLoadStoreSettings"))})},t[0]=e,t[1]=l):l=t[1];let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(Re,{className:"h-64 w-full"}),t[2]=c):c=t[2];let s;t[3]!==e?(s=e("settings.orgStore.pageTitle"),t[3]=e,t[4]=s):s=t[4];let o;t[5]!==s?(o=i.jsx(te.Title,{children:s}),t[5]=s,t[6]=o):o=t[6];let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(De,{}),t[7]=r):r=t[7];let u;t[8]!==o?(u=i.jsx(V.Suspense,{fallback:c,children:i.jsx(te,{children:i.jsx(te.Content,{children:i.jsx(te.Body,{children:i.jsxs(ze,{children:[o,r]})})})})}),t[8]=o,t[9]=u):u=t[9];let a;return t[10]!==l||t[11]!==u?(a=i.jsx(pe,{fallback:l,children:u}),t[10]=l,t[11]=u,t[12]=a):a=t[12],a}function xt(){const t=J.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(Ee,{capability:"registry:manage",area:"the store",children:i.jsx(Ke,{})}),t[0]=e):e=t[0],e}export{xt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,F as i}from"./index-
|
|
1
|
+
import{c,F as i}from"./index-DPUSzQFm.js";class l extends Error{constructor(r,s){super(r),this.status=s,this.name="StudioToolError"}status}async function u(o,r,s){const t=await fetch(`/api/${encodeURIComponent(o)}/tools/${encodeURIComponent(r)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s??{})});if(!t.ok){let e=`${r} failed (${t.status})`;try{const n=await t.json();n?.error&&(e=n.error)}catch{}throw new l(e,t.status)}return await t.json()}function p(){const o=c.c(5),{org:r}=i(),s=r.slug;let t;o[0]!==s?(t=(n,a)=>u(s,n,a),o[0]=s,o[1]=t):t=o[1];let e;return o[2]!==s||o[3]!==t?(e={orgSlug:s,call:t},o[2]=s,o[3]=t,o[4]=e):e=o[4],e}export{u as c,p as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as i,aE as C,aI as y,aH as I,aK as T,bH as H,bG as M,aG as z,c as A,m as g}from"./index-
|
|
1
|
+
import{r as c,j as i,aE as C,aI as y,aH as I,aK as T,bH as H,bG as M,aG as z,c as A,m as g}from"./index-DPUSzQFm.js";var m="Switch",[U]=z(m),[q,G]=U(m),E=c.forwardRef((r,e)=>{const{__scopeSwitch:t,name:s,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=r,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=I({prop:a,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:T(r.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:s,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((r,e)=>{const{__scopeSwitch:t,...s}=r,a=G(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:e})});R.displayName=P;var L="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:r,control:e,checked:t,bubbles:s=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=H(t),k=M(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:s});h.call(l,t),l.dispatchEvent(v)}},[u,t,s]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=L;function j(r){return r?"checked":"unchecked"}var O=E,$=R;function F(r){const e=A.c(9);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx($,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==s||e[7]!==a?(o=i.jsx(O,{"data-slot":"switch",className:a,...s,children:n}),e[6]=s,e[7]=a,e[8]=o):o=e[8],o}export{F as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,m as i,j as r}from"./index-
|
|
1
|
+
import{c,m as i,j as r}from"./index-DPUSzQFm.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{x as T,m as a,b,d as c,p as d,f as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as v,j as d,bI as k,aE as p,bL as M,bK as y,bJ as P,aK as T,aG as S,aJ as F,aH as V,aL as D,c as x,m as g}from"./index-
|
|
1
|
+
import{r as v,j as d,bI as k,aE as p,bL as M,bK as y,bJ as P,aK as T,aG as S,aJ as F,aH as V,aL as D,c as x,m as g}from"./index-DPUSzQFm.js";var m="Tabs",[G]=S(m,[y]),w=y(),[L,h]=G(m),C=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=F(i),[c,b]=V({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:D(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...f,ref:e})})});C.displayName=m;var N="TabsList",I=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=h(N,a),o=w(a);return d.jsx(k,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:t,children:d.jsx(p.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});I.displayName=N;var j="TabsTrigger",_=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=h(j,a),i=w(a),l=A(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(P,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:e,onMouseDown:T(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:T(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:T(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=j;var R="TabsContent",E=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(R,a),l=A(i.baseId,t),f=$(i.baseId,t),u=t===i.value,c=v.useRef(u);return v.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(M,{present:r||u,children:({present:b})=>d.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:f,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:c.current?"0s":void 0},children:b&&s})})});E.displayName=R;function A(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var K=C,z=I,B=_,H=E;function q(n){const e=x.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=g("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(K,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function O(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(z,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function Q(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(B,{"data-slot":"tabs-trigger","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function U(n){const e=x.c(8);let a,t;e[0]!==n?({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let r;e[3]!==a?(r=g("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=d.jsx(H,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{U as T,q as a,O as b,Q as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,m as l,j as n}from"./index-
|
|
1
|
+
import{c as o,m as l,j as n}from"./index-DPUSzQFm.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=l("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,aH as b,j as c,aE as m,aK as k,aC as p,bJ as M,bK as T,aJ as S,bI as A,aG as F,bB as $,c as C,m as P}from"./index-
|
|
1
|
+
import{r as x,aH as b,j as c,aE as m,aK as k,aC as p,bJ as M,bK as T,aJ as S,bI as A,aG as F,bB as $,c as C,m as P}from"./index-DPUSzQFm.js";var j="Toggle",_=x.forwardRef((a,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...r}=a,[t,o]=b({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...r,ref:e,onClick:k(a.onClick,()=>{a.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[I]=F(v,[T]),w=T(),h=p.forwardRef((a,e)=>{const{type:l,...s}=a;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});h.displayName=v;var[z,y]=I(v),D=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:a.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(R,{...r,ref:e})})}),B=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=b({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(V=>V!==u)),[o]);return c.jsx(z,{scope:a.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(R,{...r,ref:e})})});h.displayName=v;var[H,J]=I(v),R=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:r,dir:t,loop:o=!0,...i}=a,d=w(l),u=S(t),g={role:"group",dir:u,...i};return c.jsx(H,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:r,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",E=p.forwardRef((a,e)=>{const l=y(f,a.__scopeToggleGroup),s=J(f,a.__scopeToggleGroup),n=w(a.__scopeToggleGroup),r=l.value.includes(a.value),t=s.disabled||a.disabled,o={...a,pressed:r,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:r,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});E.displayName=f;var G=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,value:s,...n}=a,r=y(f,l),t={role:"radio","aria-checked":a.pressed,"aria-pressed":void 0},o=r.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?r.onItemActivate(s):r.onItemDeactivate(s)}})}),K=h,O=E;const L=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),N=x.createContext({size:"default",variant:"default"});function q(a){const e=C.c(20);let l,s,n,r,t;e[0]!==a?({className:s,variant:t,size:r,children:l,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);let o;e[6]!==s?(o=P("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==r||e[9]!==t?(i={variant:t,size:r},e[8]=r,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(N.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==r||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(K,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:o,...n,children:d}),e[14]=n,e[15]=r,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function Q(a){const e=C.c(18);let l,s,n,r,t;e[0]!==a?({className:s,children:l,variant:t,size:r,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);const o=x.useContext(N),i=o.variant||t,d=o.size||r;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==r||e[10]!==t?(u=P(L({variant:o.variant||t,size:o.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=r,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(O,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{Q as T,q as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as i,r as b,j as c,m as j,b as p,f as k,ai as T,L,ab as N,b2 as y}from"./index-
|
|
1
|
+
import{c as i,r as b,j as c,m as j,b as p,f as k,ai as T,L,ab as N,b2 as y}from"./index-DPUSzQFm.js";const E=b.createContext(null);function m(){const t=b.use(E);if(!t)throw new Error("Toolbar.* must be used inside <Toolbar>");return t}function S(t){const e=i.c(8),{children:s}=t,[l,o]=b.useState(null),[n,r]=b.useState(null),[a,u]=b.useState(null),[g,h]=b.useState(null);let d;e[0]!==a||e[1]!==g||e[2]!==n||e[3]!==l?(d={togglesEl:l,setTogglesEl:o,tabsEl:n,setTabsEl:r,centerEl:a,setCenterEl:u,rightEl:g,setRightEl:h},e[0]=a,e[1]=g,e[2]=n,e[3]=l,e[4]=d):d=e[4];let x;return e[5]!==s||e[6]!==d?(x=c.jsx(E,{value:d,children:s}),e[5]=s,e[6]=d,e[7]=x):x=e[7],x}function f(t){const e=i.c(2),{children:s}=t;let l;return e[0]!==s?(l=c.jsx(S,{children:c.jsx("div",{className:"flex flex-col h-full min-h-0",children:s})}),e[0]=s,e[1]=l):l=e[1],l}function C(t){const e=i.c(10);let s,l,o;e[0]!==t?({children:s,className:l,...o}=t,e[0]=t,e[1]=s,e[2]=l,e[3]=o):(s=e[1],l=e[2],o=e[3]);let n;e[4]!==l?(n=j("app-titlebar wco-drag relative z-10 shrink-0 grid grid-cols-3 items-center pl-1 pr-2 h-12 bg-sidebar",l),e[4]=l,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=c.jsx("div",{className:n,...o,children:s}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function v(t){const e=i.c(2),{children:s}=t;let l;return e[0]!==s?(l=c.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:s}),e[0]=s,e[1]=l):l=e[1],l}function R(t){const e=i.c(2),{children:s}=t;let l;return e[0]!==s?(l=c.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:s}),e[0]=s,e[1]=l):l=e[1],l}function w(){const t=i.c(13),e=p(),l=N().logo??y,o=typeof l=="string"?l:l.light,n=typeof l=="string"?l:l.dark;let r;t[0]!==e?(r=e("agentShellLayout.toolbar.logo"),t[0]=e,t[1]=r):r=t[1];let a;t[2]!==o||t[3]!==r?(a=c.jsx("img",{src:o,alt:r,className:"size-6 object-contain dark:hidden"}),t[2]=o,t[3]=r,t[4]=a):a=t[4];let u;t[5]!==e?(u=e("agentShellLayout.toolbar.logo"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==n||t[8]!==u?(g=c.jsx("img",{src:n,alt:u,className:"size-6 object-contain hidden dark:block"}),t[7]=n,t[8]=u,t[9]=g):g=t[9];let h;return t[10]!==a||t[11]!==g?(h=c.jsxs("span",{className:"wco-hide flex items-center shrink-0 px-2",children:[a,g]}),t[10]=a,t[11]=g,t[12]=h):h=t[12],h}function $(){const t=i.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=c.jsx(b.Suspense,{fallback:c.jsx("span",{className:"wco-hide shrink-0 size-6 mx-2"}),children:c.jsx(w,{})}),t[0]=e):e=t[0],e}function P(){const t=i.c(12),e=p();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},t[0]=s):s=t[0];const{org:l}=k(s);let o;t[1]!==l?(o={org:l},t[1]=l,t[2]=o):o=t[2];let n;t[3]!==e?(n=e("agentShellLayout.toolbar.backToHome"),t[3]=e,t[4]=n):n=t[4];let r;t[5]!==e?(r=e("agentShellLayout.toolbar.backToHome"),t[5]=e,t[6]=r):r=t[6];let a;t[7]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx($,{}),t[7]=a):a=t[7];let u;return t[8]!==o||t[9]!==n||t[10]!==r?(u=c.jsx(L,{to:"/$org",params:o,"aria-label":n,title:r,className:"wco-no-drag flex items-center shrink-0 cursor-pointer pl-1",children:a}),t[8]=o,t[9]=n,t[10]=r,t[11]=u):u=t[11],u}function _(){const t=i.c(2),{setCenterEl:e}=m();let s;return t[0]!==e?(s=c.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),t[0]=e,t[1]=s):s=t[1],s}function z(t){const e=i.c(3),{children:s}=t,{centerEl:l}=m();if(!l)return null;let o;return e[0]!==l||e[1]!==s?(o=T.createPortal(s,l),e[0]=l,e[1]=s,e[2]=o):o=e[2],o}function H(t){const e=i.c(5),{className:s}=t,{setTabsEl:l}=m();let o;e[0]!==s?(o=j("shrink-0 flex items-center",s),e[0]=s,e[1]=o):o=e[1];let n;return e[2]!==l||e[3]!==o?(n=c.jsx("div",{ref:l,className:o}),e[2]=l,e[3]=o,e[4]=n):n=e[4],n}function D(t){const e=i.c(3),{children:s}=t,{tabsEl:l}=m();if(!l)return null;let o;return e[0]!==s||e[1]!==l?(o=T.createPortal(s,l),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}function I(t){const e=i.c(5),{className:s}=t,{setTogglesEl:l}=m();let o;e[0]!==s?(o=j("contents",s),e[0]=s,e[1]=o):o=e[1];let n;return e[2]!==l||e[3]!==o?(n=c.jsx("div",{ref:l,className:o}),e[2]=l,e[3]=o,e[4]=n):n=e[4],n}function O(t){const e=i.c(3),{children:s}=t,{togglesEl:l}=m();if(!l)return null;let o;return e[0]!==s||e[1]!==l?(o=T.createPortal(s,l),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}function A(){const t=i.c(2),{setRightEl:e}=m();let s;return t[0]!==e?(s=c.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),t[0]=e,t[1]=s):s=t[1],s}function F(t){const e=i.c(3),{children:s}=t,{rightEl:l}=m();if(!l)return null;let o;return e[0]!==s||e[1]!==l?(o=T.createPortal(s,l),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}f.Provider=S;f.Header=C;f.LeftColumn=v;f.RightColumn=R;f.Logo=$;f.LogoLink=P;f.CenterSlot=_;f.Center=z;f.TabsSlot=H;f.Tabs=D;f.TogglesSlot=I;f.Toggles=O;f.RightSlot=A;f.Right=F;export{f as T};
|
package/dist/client/assets/{toolbar-icon-button-DXJqGPLR.js → toolbar-icon-button-CeJ-M4Lq.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,m as f,j as b}from"./index-
|
|
1
|
+
import{c as d,m as f,j as b}from"./index-DPUSzQFm.js";function x(l){const e=d.c(14);let n,t,s,o,r;e[0]!==l?({active:n,className:t,ref:o,type:r,...s}=l,e[0]=l,e[1]=n,e[2]=t,e[3]=s,e[4]=o,e[5]=r):(n=e[1],t=e[2],s=e[3],o=e[4],r=e[5]);const a=r===void 0?"button":r,u=n?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let i;e[6]!==t||e[7]!==u?(i=f("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md transition-colors","max-md:[&_svg]:size-5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",u,t),e[6]=t,e[7]=u,e[8]=i):i=e[8];let c;return e[9]!==s||e[10]!==o||e[11]!==i||e[12]!==a?(c=b.jsx("button",{ref:o,type:a,className:i,...s}),e[9]=s,e[10]=o,e[11]=i,e[12]=a,e[13]=c):c=e[13],c}export{x as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,j as c,aE as M,aL as Z,aH as J,cV as Q,aI as S,cW as ee,aK as C,bL as $,cX as te,cY as G,cZ as oe,c_ as re,aG as ne,c$ as se,d0 as ae,c as j,m as ie}from"./index-
|
|
1
|
+
import{r as a,j as c,aE as M,aL as Z,aH as J,cV as Q,aI as S,cW as ee,aK as C,bL as $,cX as te,cY as G,cZ as oe,c_ as re,aG as ne,c$ as se,d0 as ae,c as j,m as ie}from"./index-DPUSzQFm.js";var le=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ce="VisuallyHidden",V=a.forwardRef((o,e)=>c.jsx(M.span,{...o,ref:e,style:{...le,...o.style}}));V.displayName=ce;var ue=V,[O]=ne("Tooltip",[G]),D=G(),z="TooltipProvider",de=700,L="tooltip.open",[pe,k]=O(z),F=o=>{const{__scopeTooltip:e,delayDuration:t=de,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=a.useRef(!0),d=a.useRef(!1),i=a.useRef(0);return a.useEffect(()=>{const p=i.current;return()=>window.clearTimeout(p)},[]),c.jsx(pe,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(i.current),l.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};F.displayName=z;var R="Tooltip",[fe,_]=O(R),Y=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=o,i=k(R,o.__scopeTooltip),p=D(e),[u,v]=a.useState(null),x=Z(),f=a.useRef(0),h=l??i.disableHoverableContent,T=d??i.delayDuration,g=a.useRef(!1),[y,m]=J({prop:r,defaultProp:n??!1,onChange:H=>{H?(i.onOpen(),document.dispatchEvent(new CustomEvent(L))):i.onClose(),s?.(H)},caller:R}),w=a.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,m(!0)},[m]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,m(!1)},[m]),I=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,m(!0),f.current=0},T)},[T,m]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(Q,{...p,children:c.jsx(fe,{scope:e,contentId:x,open:y,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?I():E()},[i.isOpenDelayedRef,I,E]),onTriggerLeave:a.useCallback(()=>{h?P():(window.clearTimeout(f.current),f.current=0)},[P,h]),onOpen:E,onClose:P,disableHoverableContent:h,children:t})})};Y.displayName=R;var A="TooltipTrigger",B=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(A,t),s=k(A,t),l=D(t),d=a.useRef(null),i=S(e,d,n.onTriggerChange),p=a.useRef(!1),u=a.useRef(!1),v=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(ee,{asChild:!0,...l,children:c.jsx(M.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:C(o.onPointerMove,x=>{x.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});B.displayName=A;var N="TooltipPortal",[ve,xe]=O(N,{forceMount:void 0}),U=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(N,e);return c.jsx(ve,{scope:e,forceMount:t,children:c.jsx($,{present:t||s.open,children:c.jsx(te,{asChild:!0,container:n,children:r})})})};U.displayName=N;var b="TooltipContent",W=a.forwardRef((o,e)=>{const t=xe(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(b,o.__scopeTooltip);return c.jsx($,{present:r||l.open,children:l.disableHoverableContent?c.jsx(X,{side:n,...s,ref:e}):c.jsx(he,{side:n,...s,ref:e})})}),he=a.forwardRef((o,e)=>{const t=_(b,o.__scopeTooltip),r=k(b,o.__scopeTooltip),n=a.useRef(null),s=S(e,n),[l,d]=a.useState(null),{trigger:i,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,x=a.useCallback(()=>{d(null),v(!1)},[v]),f=a.useCallback((h,T)=>{const g=h.currentTarget,y={x:h.clientX,y:h.clientY},m=ye(y,g.getBoundingClientRect()),w=Ce(y,m),E=be(T.getBoundingClientRect()),P=Ee([...w,...E]);d(P),v(!0)},[v]);return a.useEffect(()=>()=>x(),[x]),a.useEffect(()=>{if(i&&u){const h=g=>f(g,u),T=g=>f(g,i);return i.addEventListener("pointerleave",h),u.addEventListener("pointerleave",T),()=>{i.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",T)}}},[i,u,f,x]),a.useEffect(()=>{if(l){const h=T=>{const g=T.target,y={x:T.clientX,y:T.clientY},m=i?.contains(g)||u?.contains(g),w=!we(y,l);m?x():w&&(x(),p())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[i,u,l,p,x]),c.jsx(X,{...o,ref:s})}),[ge,Te]=O(R,{isInside:!1}),me=se("TooltipContent"),X=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...d}=o,i=_(b,t),p=D(t),{onClose:u}=i;return a.useEffect(()=>(document.addEventListener(L,u),()=>document.removeEventListener(L,u)),[u]),a.useEffect(()=>{if(i.trigger){const v=x=>{x.target?.contains(i.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[i.trigger,u]),c.jsx(oe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(re,{"data-state":i.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(me,{children:r}),c.jsx(ge,{scope:t,isInside:!0,children:c.jsx(ue,{id:i.contentId,role:"tooltip",children:n||r})})]})})});W.displayName=b;var q="TooltipArrow",K=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return Te(q,t).isInside?null:c.jsx(ae,{...n,...r,ref:e})});K.displayName=q;function ye(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Ce(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function be(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function we(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const d=e[s],i=e[l],p=d.x,u=d.y,v=i.x,x=i.y;u>r!=x>r&&t<(v-p)*(r-u)/(x-u)+p&&(n=!n)}return n}function Ee(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Pe(e)}function Pe(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Re=F,_e=Y,je=B,Oe=U,De=W,Le=K;function Ae(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(Re,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Ne(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Ae,{children:c.jsx(_e,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Ie(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(je,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function He(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let d;e[5]!==r?(d=ie("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=c.jsx(Le,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=i):i=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==d?(p=c.jsx(Oe,{children:c.jsxs(De,{"data-slot":"tooltip-content",sideOffset:l,className:d,...n,children:[t,i]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=d,e[12]=p):p=e[12],p}export{Ie as T,le as V,He as a,Ne as b,Ae as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,F as f,x as P,K as m,n as K}from"./index-
|
|
1
|
+
import{c as d,F as f,x as P,K as m,n as K}from"./index-DPUSzQFm.js";import{u as S,c as T}from"./studio-tools-NTdqO4cY.js";function g(s,e){return{queryKey:m.aiProviderKeys(e),staleTime:6e4,queryFn:async()=>await T(s,"AI_PROVIDER_KEY_LIST",{})}}function R(){const s=d.c(7),{org:e}=f(),o=S();let i;s[0]!==e.id?(i=m.aiProviders(e.id),s[0]=e.id,s[1]=i):i=s[1];let t;s[2]!==o?(t=async()=>await o.call("AI_PROVIDERS_LIST",{}),s[2]=o,s[3]=t):t=s[3];let l;s[4]!==i||s[5]!==t?(l={queryKey:i,staleTime:1/0,queryFn:t},s[4]=i,s[5]=t,s[6]=l):l=s[6];const{data:n}=P(l);return n}function p(){const s=d.c(5),{org:e}=f();let o;s[0]!==e.id||s[1]!==e.slug?(o=g(e.slug,e.id),s[0]=e.id,s[1]=e.slug,s[2]=o):o=s[2];const{data:i}=P(o);let t;return s[3]!==i?.keys?(t=i?.keys??[],s[3]=i?.keys,s[4]=t):t=s[4],t}function q(s){const e=d.c(15),{org:o}=f(),i=S();let t;e[0]!==s||e[1]!==o.id?(t=m.aiProviderModels(o.id,s??""),e[0]=s,e[1]=o.id,e[2]=t):t=e[2];const l=!!s;let n;e[3]!==s||e[4]!==i?(n=async()=>await i.call("AI_PROVIDERS_LIST_MODELS",{keyId:s??""}),e[3]=s,e[4]=i,e[5]=n):n=e[5];let r;e[6]!==t||e[7]!==l||e[8]!==n?(r={queryKey:t,enabled:l,staleTime:6e4,queryFn:n},e[6]=t,e[7]=l,e[8]=n,e[9]=r):r=e[9];const{data:a,isLoading:_}=K(r);let u;e[10]!==a?.models?(u=a?.models??[],e[10]=a?.models,e[11]=u):u=e[11];const y=!!s&&_;let c;return e[12]!==u||e[13]!==y?(c={models:u,isLoading:y},e[12]=u,e[13]=y,e[14]=c):c=e[14],c}function A(s){const e=d.c(11),{org:o}=f(),i=S();let t;e[0]!==s||e[1]!==o.id?(t=m.aiProviderModels(o.id,s),e[0]=s,e[1]=o.id,e[2]=t):t=e[2];let l;e[3]!==s||e[4]!==i?(l=async()=>await i.call("AI_PROVIDERS_LIST_MODELS",{keyId:s}),e[3]=s,e[4]=i,e[5]=l):l=e[5];let n;e[6]!==t||e[7]!==l?(n={queryKey:t,staleTime:6e4,queryFn:l},e[6]=t,e[7]=l,e[8]=n):n=e[8];const{data:r}=P(n);let a;return e[9]!==r?.models?(a=r?.models??[],e[9]=r?.models,e[10]=a):a=e[10],a}export{q as a,R as b,A as c,p as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,F as d,o as p,e as w,K as g,n as I}from"./index-
|
|
1
|
+
import{c,F as d,o as p,e as w,K as g,n as I}from"./index-DPUSzQFm.js";import{S as m,u as f}from"./use-mcp-client-D4kRoqsh.js";function K(){return(typeof window>"u"?"":window.location.hostname||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"studio"}function C(e){return`${typeof window>"u"?"http://localhost:3000":window.location.origin}/api/${e}/mcp/self`}function h(e,t){return`claude mcp add --transport http --scope user ${K()} ${C(e)} --header "Authorization: Bearer ${t}"`}function y(e,t){if(e?.isError)throw new Error(e.content?.[0]?.text??t);if(!e.structuredContent)throw new Error(t);return e.structuredContent}function S(){const e=c.c(10),{org:t}=d();let s;e[0]!==t.id||e[1]!==t.slug?(s={connectionId:m,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=s):s=e[2];const r=f(s);let o;e[3]!==t.id?(o=g.apiKeysList(t.id),e[3]=t.id,e[4]=o):o=e[4];let n;e[5]!==r?(n=async()=>{const l=await r.callTool({name:"API_KEY_LIST",arguments:{}});return y(l,"Failed to list API keys").items},e[5]=r,e[6]=n):n=e[6];let i;return e[7]!==o||e[8]!==n?(i={queryKey:o,queryFn:n,staleTime:3e4},e[7]=o,e[8]=n,e[9]=i):i=e[9],I(i)}function L(){const e=c.c(11),{org:t}=d();let s;e[0]!==t.id||e[1]!==t.slug?(s={connectionId:m,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=s):s=e[2];const r=f(s),o=p();let n;e[3]!==r?(n=async a=>{const u=await r.callTool({name:"API_KEY_CREATE",arguments:{name:a.name,permissions:a.permissions??{"*":["*"]}}});return y(u,"Failed to create API key")},e[3]=r,e[4]=n):n=e[4];let i;e[5]!==t.id||e[6]!==o?(i=()=>{o.invalidateQueries({queryKey:g.apiKeysList(t.id)})},e[5]=t.id,e[6]=o,e[7]=i):i=e[7];let l;return e[8]!==n||e[9]!==i?(l={mutationFn:n,onSuccess:i},e[8]=n,e[9]=i,e[10]=l):l=e[10],w(l)}function P(){const e=c.c(11),{org:t}=d();let s;e[0]!==t.id||e[1]!==t.slug?(s={connectionId:m,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=s):s=e[2];const r=f(s),o=p();let n;e[3]!==r?(n=async a=>{const u=await r.callTool({name:"API_KEY_DELETE",arguments:{keyId:a}});return y(u,"Failed to delete API key")},e[3]=r,e[4]=n):n=e[4];let i;e[5]!==t.id||e[6]!==o?(i=()=>{o.invalidateQueries({queryKey:g.apiKeysList(t.id)})},e[5]=t.id,e[6]=o,e[7]=i):i=e[7];let l;return e[8]!==n||e[9]!==i?(l={mutationFn:n,onSuccess:i},e[8]=n,e[9]=i,e[10]=l):l=e[10],w(l)}export{K as a,S as b,h as c,P as d,C as m,L as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as U,F as q,K as T,n as I,o as x,e as y,t as m}from"./index-
|
|
1
|
+
import{c as U,F as q,K as T,n as I,o as x,e as y,t as m}from"./index-DPUSzQFm.js";import{S as z,u as J}from"./use-mcp-client-D4kRoqsh.js";import{u as Q}from"./studio-tools-NTdqO4cY.js";function V(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const s of t.params)e[s.name]={type:s.type,description:s.description,enum:s.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function st(t){const e=U.c(12),{org:s}=q(),l=t??z;let a;e[0]!==s.id||e[1]!==s.slug||e[2]!==l?(a={connectionId:l,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l,e[3]=a):a=e[3];const i=J(a);let n;e[4]!==t?(n=T.toolCall(t??"","TRIGGER_LIST",""),e[4]=t,e[5]=n):n=e[5];let o;e[6]!==i?(o=async()=>{const d=await i.callTool({name:"TRIGGER_LIST",arguments:{}});return(d.structuredContent??d).triggers.map(V)},e[6]=i,e[7]=o):o=e[7];const c=!!t;let r;return e[8]!==n||e[9]!==o||e[10]!==c?(r={queryKey:n,queryFn:o,enabled:c,staleTime:3e4},e[8]=n,e[9]=o,e[10]=c,e[11]=r):r=e[11],I(r)}function it(t){const e=U.c(9),{org:s}=q(),l=Q();let a;e[0]!==s.id||e[1]!==t?(a=T.automations(s.id,t),e[0]=s.id,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==l||e[4]!==t?(i=async()=>(await l.call("AUTOMATION_LIST",t!=null?{virtual_mcp_id:t}:{})).automations,e[3]=l,e[4]=t,e[5]=i):i=e[5];let n;return e[6]!==a||e[7]!==i?(n={queryKey:a,queryFn:i,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n):n=e[8],I(n)}function ot(t){const e=U.c(10),{org:s}=q(),l=Q();let a;e[0]!==t||e[1]!==s.id?(a=T.automation(s.id,t),e[0]=t,e[1]=s.id,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==l?(i=async()=>(await l.call("AUTOMATION_GET",{id:t})).automation,e[3]=t,e[4]=l,e[5]=i):i=e[5];const n=!!t;let o;return e[6]!==a||e[7]!==i||e[8]!==n?(o={queryKey:a,queryFn:i,enabled:n,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n,e[9]=o):o=e[9],I(o)}function at(t,e){const s=U.c(12),{org:l}=q(),a=Q();let i;s[0]!==t||s[1]!==l.id||s[2]!==e?(i=T.automationRunStats(l.id,t,JSON.stringify(e??{})),s[0]=t,s[1]=l.id,s[2]=e,s[3]=i):i=s[3];let n;s[4]!==t||s[5]!==e||s[6]!==a?(n=async()=>await a.call("AUTOMATION_RUN_STATS",{automation_id:t,...e?.startDate?{startDate:e.startDate}:{},...e?.endDate?{endDate:e.endDate}:{}}),s[4]=t,s[5]=e,s[6]=a,s[7]=n):n=s[7];const o=!!t;let c;return s[8]!==i||s[9]!==n||s[10]!==o?(c={queryKey:i,queryFn:n,enabled:o,staleTime:3e4},s[8]=i,s[9]=n,s[10]=o,s[11]=c):c=s[11],I(c)}function nt(t){return{name:"New Automation",messages:[],models:{tier:"smart"},temperature:.5,active:!0,virtual_mcp_id:t}}function lt(){const t=U.c(64),{org:e}=q(),s=Q(),l=x();let a;t[0]!==e||t[1]!==l?(a=()=>l.invalidateQueries({queryKey:T.automationsAll(e.id)}),t[0]=e,t[1]=l,t[2]=a):a=t[2];const i=a;let n;t[3]!==e||t[4]!==l?(n=u=>l.invalidateQueries({queryKey:T.automation(e.id,u)}),t[3]=e,t[4]=l,t[5]=n):n=t[5];const o=n;let c;t[6]!==s?(c=async u=>await s.call("AUTOMATION_CREATE",u),t[6]=s,t[7]=c):c=t[7];let r;t[8]!==i?(r=()=>{i(),m.success("Automation created successfully")},t[8]=i,t[9]=r):r=t[9];let d;t[10]!==c||t[11]!==r?(d={mutationFn:c,onSuccess:r,onError:X},t[10]=c,t[11]=r,t[12]=d):d=t[12];const D=y(d);let A;t[13]!==s?(A=async u=>await s.call("AUTOMATION_UPDATE",u),t[13]=s,t[14]=A):A=t[14];let p;t[15]!==i||t[16]!==o?(p=(u,f)=>{i(),typeof f.id=="string"&&o(f.id),m.success("Automation updated successfully")},t[15]=i,t[16]=o,t[17]=p):p=t[17];let G;t[18]!==A||t[19]!==p?(G={mutationFn:A,onSuccess:p,onError:W},t[18]=A,t[19]=p,t[20]=G):G=t[20];const j=y(G);let g;t[21]!==s?(g=async u=>await s.call("AUTOMATION_DELETE",{id:u}),t[21]=s,t[22]=g):g=t[22];let _;t[23]!==i||t[24]!==e||t[25]!==l?(_=(u,f)=>{l.removeQueries({queryKey:T.automation(e.id,f)}),i(),m.success("Automation deleted successfully")},t[23]=i,t[24]=e,t[25]=l,t[26]=_):_=t[26];let $;t[27]!==g||t[28]!==_?($={mutationFn:g,onSuccess:_,onError:H},t[27]=g,t[28]=_,t[29]=$):$=t[29];const k=y($);let S;t[30]!==s?(S=async u=>await s.call("AUTOMATION_TRIGGER_ADD",u),t[30]=s,t[31]=S):S=t[31];let E;t[32]!==i||t[33]!==o?(E=u=>{i(),o(u.automation_id)},t[32]=i,t[33]=o,t[34]=E):E=t[34];let K;t[35]!==S||t[36]!==E?(K={mutationFn:S,onSuccess:E},t[35]=S,t[36]=E,t[37]=K):K=t[37];const P=y(K);let O;t[38]!==s?(O=async u=>await s.call("AUTOMATION_TRIGGER_ROTATE_TOKEN",{trigger_id:u.trigger_id}),t[38]=s,t[39]=O):O=t[39];let R;t[40]!==i||t[41]!==o?(R=(u,f)=>{i(),o(f.automation_id)},t[40]=i,t[41]=o,t[42]=R):R=t[42];let C;t[43]!==O||t[44]!==R?(C={mutationFn:O,onSuccess:R},t[43]=O,t[44]=R,t[45]=C):C=t[45];const h=y(C);let F;t[46]!==s?(F=async u=>await s.call("AUTOMATION_TRIGGER_REMOVE",{trigger_id:u.trigger_id}),t[46]=s,t[47]=F):F=t[47];let N;t[48]!==i||t[49]!==o?(N=(u,f)=>{i(),o(f.automation_id)},t[48]=i,t[49]=o,t[50]=N):N=t[50];let b;t[51]!==F||t[52]!==N?(b={mutationFn:F,onSuccess:N},t[51]=F,t[52]=N,t[53]=b):b=t[53];const v=y(b);let L;t[54]!==s?(L={mutationFn:async u=>await s.call("AUTOMATION_RUN",{id:u}),onSuccess:B,onError:Y},t[54]=s,t[55]=L):L=t[55];const w=y(L);let M;return t[56]!==D||t[57]!==k||t[58]!==w||t[59]!==P||t[60]!==v||t[61]!==h||t[62]!==j?(M={create:D,update:j,remove:k,triggerAdd:P,triggerRemove:v,triggerRotateToken:h,run:w},t[56]=D,t[57]=k,t[58]=w,t[59]=P,t[60]=v,t[61]=h,t[62]=j,t[63]=M):M=t[63],M}function Y(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to run automation: ${e}`)}function B(t){t.skipped?m.info(`Automation skipped: ${t.skipped}`):t.error?m.error(`Automation failed: ${t.error}`):m.success("Automation triggered")}function H(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to delete automation: ${e}`)}function W(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to update automation: ${e}`)}function X(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to create automation: ${e}`)}export{st as a,ot as b,it as c,nt as d,at as e,lt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as T,r as o}from"./index-
|
|
1
|
+
import{c as T,r as o}from"./index-DPUSzQFm.js";const y=700;function x(r,l,_){const e=T.c(7),f=y,[a,m]=o.useState(r),[i,S]=o.useState(r),[A,d]=o.useState(!1),t=o.useRef(null);r!==i&&(S(r),A||m(r));let s;e[0]!==f||e[1]!==l?(s=u=>{m(u),d(!0),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{t.current=null,d(!1),l(u)},f)},e[0]=f,e[1]=l,e[2]=s):s=e[2];const p=s;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=u=>{m(u),t.current&&clearTimeout(t.current),t.current=null,d(!1)},e[3]=c):c=e[3];const E=c;let n;return e[4]!==a||e[5]!==p?(n=[a,p,E],e[4]=a,e[5]=p,e[6]=n):n=e[6],n}export{x as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,F as m,n as g,K as p}from"./index-
|
|
1
|
+
import{c as u,F as m,n as g,K as p}from"./index-DPUSzQFm.js";const b=new Set(["owner","admin"]);function d(){const e=u.c(11),{org:r,locator:c}=m();let o;e[0]!==c?(o=p.myCapabilities(c),e[0]=c,e[1]=o):o=e[1];let a;e[2]!==r?(a=async()=>{const f=await fetch(`/api/auth/custom/my-capabilities/${encodeURIComponent(r.slug)}`,{credentials:"include"});if(!f.ok)throw new Error(`my-capabilities request failed: ${f.status}`);return await f.json()},e[2]=r,e[3]=a):a=e[3];let i;e[4]!==o||e[5]!==a?(i={queryKey:o,queryFn:a,staleTime:3e4,retry:2},e[4]=o,e[5]=a,e[6]=i):i=e[6];const{data:s,isLoading:l,isError:n}=g(i);let t;return e[7]!==s||e[8]!==n||e[9]!==l?(t={data:s,loading:l,error:n},e[7]=s,e[8]=n,e[9]=l,e[10]=t):t=e[10],t}function _(e){const r=u.c(8),{data:c,loading:o,error:a}=d();if(o){let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!0,error:!1,reason:"loading"},r[0]=t):t=r[0],t}if(a){let t;return r[1]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!1,error:!0,reason:"error"},r[1]=t):t=r[1],t}const i=c?.role??null;if(!i){let t;return r[2]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!1,loading:!1,error:!1,reason:"denied"},r[2]=t):t=r[2],t}if(i==="owner"){let t;return r[3]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!0,loading:!1,error:!1,reason:"owner"},r[3]=t):t=r[3],t}if(i==="admin"){let t;return r[4]===Symbol.for("react.memo_cache_sentinel")?(t={granted:!0,loading:!1,error:!1,reason:"admin"},r[4]=t):t=r[4],t}const s=c?.capabilities?.[e]===!0,l=s?"role":"denied";let n;return r[5]!==s||r[6]!==l?(n={granted:s,loading:!1,error:!1,reason:l},r[5]=s,r[6]=l,r[7]=n):n=r[7],n}function S(){const e=u.c(10),{data:r,loading:c,error:o}=d(),a=r?.role??void 0;let i;e[0]!==a?(i=a?b.has(a):!1,e[0]=a,e[1]=i):i=e[1];const s=i;let l;e[2]!==r?.capabilities?(l=r?.capabilities??{},e[2]=r?.capabilities,e[3]=l):l=e[3];const n=l;let t;return e[4]!==o||e[5]!==s||e[6]!==c||e[7]!==a||e[8]!==n?(t={capabilities:n,loading:c,error:o,isPrivileged:s,roleSlug:a},e[4]=o,e[5]=s,e[6]=c,e[7]=a,e[8]=n,e[9]=t):t=e[9],t}export{S as a,_ as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as a}from"./AlertCircle-
|
|
1
|
+
import{i as a}from"./AlertCircle-DY_zDIC_.js";import{i as c}from"./CheckCircle-pA7GzUJX.js";import{i as u}from"./DotsVertical-nghs-9ch.js";import{aK as m}from"./agent-icon-BnGJPmET.js";import{k as b,c as d,r as f}from"./index-DPUSzQFm.js";import{i as p}from"./XCircle-BNxdXQeR.js";const g={requires_action:{label:"Needs review",verb:"Waiting for your review",icon:a,iconClassName:"text-warning",labelColor:"text-warning"},failed:{label:"Failed",verb:"Something went wrong",icon:p,iconClassName:"text-destructive",labelColor:"text-destructive"},expired:{label:"Timed out",verb:"Stopped responding",icon:m,iconClassName:"text-warning",labelColor:"text-warning"},in_progress:{label:"Running",verb:"Agent is working",icon:b,iconClassName:"text-primary",labelColor:"text-primary"},completed:{label:"Done",verb:"Completed",icon:c,iconClassName:"text-muted-foreground/50",labelColor:"text-muted-foreground"}},v={label:"Unknown",verb:"Unknown status",icon:u,iconClassName:"text-muted-foreground",labelColor:"text-muted-foreground"};function y(r){return g[r??"completed"]??v}const i=new Map;function s(r){let t=i.get(r);return t||(t={tick:0,subscribers:new Set,intervalId:null},i.set(r,t)),t}function x(r,t){const e=s(r);return e.subscribers.add(t),e.intervalId===null&&(e.intervalId=setInterval(()=>{e.tick+=1;for(const o of e.subscribers)o()},r)),()=>{e.subscribers.delete(t),e.subscribers.size===0&&e.intervalId!==null&&(clearInterval(e.intervalId),e.intervalId=null)}}function T(r){const t=d.c(3),e=r===void 0?6e4:r;let o,n;return t[0]!==e?(o=l=>x(e,l),n=()=>s(e).tick,t[0]=e,t[1]=o,t[2]=n):(o=t[1],n=t[2]),f.useSyncExternalStore(o,n,C)}function C(){return 0}export{g as S,y as g,T as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,F as C,dY as S,bc as p,bb as T}from"./index-
|
|
1
|
+
import{c as f,F as C,dY as S,bc as p,bb as T}from"./index-DPUSzQFm.js";import{S as I,u as A}from"./use-mcp-client-D4kRoqsh.js";function v(t){const o=f.c(20);let i;o[0]!==t?(i=t===void 0?{}:t,o[0]=t,o[1]=i):i=o[1];const n=i;let l,s,c,d;o[2]!==n?({binding:l,includeVirtual:c,slug:d,...s}=n,o[2]=n,o[3]=l,o[4]=s,o[5]=c,o[6]=d):(l=o[3],s=o[4],c=o[5],d=o[6]);let e;o[7]!==l||o[8]!==s.additionalToolArgs||o[9]!==c||o[10]!==d?(e={...s.additionalToolArgs},l!==void 0&&(e.binding=l),c!==void 0&&(e.include_virtual=c),d!==void 0&&(e.slug=d),o[7]=l,o[8]=s.additionalToolArgs,o[9]=c,o[10]=d,o[11]=e):e=o[11];let g;o[12]!==e?(g=Object.keys(e).length>0?e:void 0,o[12]=e,o[13]=g):g=o[13];let r;o[14]!==s||o[15]!==g?(r={...s,additionalToolArgs:g},o[14]=s,o[15]=g,o[16]=r):r=o[16];const N=r,{org:u}=C();let a;o[17]!==u.id||o[18]!==u.slug?(a={connectionId:I,orgId:u.id,orgSlug:u.slug},o[17]=u.id,o[18]=u.slug,o[19]=a):a=o[19];const O=A(a);return S(u.id,"CONNECTIONS",O,N)}function E(t){const o=f.c(3),{org:i}=C();let n;o[0]!==i.id||o[1]!==i.slug?(n={connectionId:I,orgId:i.id,orgSlug:i.slug},o[0]=i.id,o[1]=i.slug,o[2]=n):n=o[2];const l=A(n);return T(i.id,"CONNECTIONS",t,l)}function _(){const t=f.c(3),{org:o}=C();let i;t[0]!==o.id||t[1]!==o.slug?(i={connectionId:I,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=i):i=t[2];const n=A(i);return p(o.id,"CONNECTIONS",n)}export{E as a,_ as b,v as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as i,r as n}from"./index-
|
|
1
|
+
import{c as i,r as n}from"./index-DPUSzQFm.js";function p(){const e=i.c(3),[s,a]=n.useState(!1);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=async c=>{await navigator.clipboard.writeText(c),a(!0),setTimeout(()=>a(!1),2e3)},e[0]=t):t=e[0];const r=t;let o;return e[1]!==s?(o={handleCopy:r,copied:s},e[1]=s,e[2]=o):o=e[2],o}export{p as u};
|
package/dist/client/assets/{use-create-virtual-mcp-BMw67F1n.js → use-create-virtual-mcp-CkptpNw0.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g}from"./index-
|
|
1
|
+
import{c as g}from"./index-DPUSzQFm.js";import{b as f}from"./use-virtual-mcp-GuNcK9nz.js";import{c as p}from"./use-navigate-to-agent-DjMxrQKV.js";function A(i){const e=g.c(9);let n;e[0]!==i?(n=i===void 0?{}:i,e[0]=i,e[1]=n):n=e[1];const d=n,{navigateOnCreate:u}=d,c=u===void 0?!1:u,t=f(),r=p();let s;e[2]!==t.create||e[3]!==c||e[4]!==r?(s=async()=>{const l=await t.create.mutateAsync({title:"New Agent",description:"AI-driven assistant designed to handle specific tasks",status:"active",connections:[],pinned:!1});return c&&r(l.id,{search:{main:"instructions"}}),{id:l.id,virtualMcp:l}},e[2]=t.create,e[3]=c,e[4]=r,e[5]=s):s=e[5];const o=s;let a;return e[6]!==t.create.isPending||e[7]!==o?(a={createVirtualMCP:o,isCreating:t.create.isPending},e[6]=t.create.isPending,e[7]=o,e[8]=a):a=e[8],a}export{A as u};
|
package/dist/client/assets/{use-debounced-autosave-Ca3ejIda.js → use-debounced-autosave-BRdvgfun.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u}from"./index-
|
|
1
|
+
import{r as u}from"./index-DPUSzQFm.js";function l({save:t,delayMs:n=1e3}){const e=u.useRef(t);e.current=t;const r=u.useRef(null),c=()=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{r.current=null,e.current()},n)},o=()=>(r.current&&(clearTimeout(r.current),r.current=null),e.current());return u.useEffect(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null,e.current())},[]),{schedule:c,flush:o}}export{l as u};
|
package/dist/client/assets/{use-debounced-value-uO_bm41c.js → use-debounced-value-nEW22WWj.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,r as n}from"./index-
|
|
1
|
+
import{c as m,r as n}from"./index-DPUSzQFm.js";function p(e,o){const t=m.c(4),[s,u]=n.useState(e);let c,r;return t[0]!==o||t[1]!==e?(c=()=>{const i=setTimeout(()=>u(e),o);return()=>clearTimeout(i)},r=[e,o],t[0]=o,t[1]=e,t[2]=c,t[3]=r):(c=t[2],r=t[3]),n.useEffect(c,r),s}export{p as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as Ue,F as Ie,a as tn,D as mn,R as gn,P as hn,j as e,B as Z,t as U,c as fn,r as ue,I as xn,G as vn,K as Xe,q as S,m as jn,k as we,o as Cn,d as yn,n as Dn}from"./index-Dyk7ikoX.js";import{C as _n}from"./collection-search-CnSAD3aA.js";import{g as bn,a as Nn,b as wn,e as Sn}from"./extract-connection-data-C6WAUA-A.js";import{u as on,a as sn,g as In,C as Oe}from"./connection-card-F8nXjLqn.js";import{e as an,d as cn,a as rn,b as ln,h as kn,c as An}from"./dialog-CfZpY_2q.js";import{D as Tn,a as Pn,c as Mn,b as Fn,d as Ln,e as Bn,f as Vn}from"./drawer-FjwmDRnN.js";import{u as On}from"./use-mobile-Drq4EVlE.js";import{F as O,b as E,c as R,d as z,f as H,a as Ye}from"./form-D9b_xMf4.js";import{I as J}from"./input-CrADDofK.js";import{S as En,a as Rn,b as zn,c as Hn,d as ge}from"./select-BpDhPcun.js";import{T as Kn}from"./textarea-C7Ka9--4.js";import{b as dn}from"./use-connection-CvtYxdhN.js";import{n as Se,i as Ee}from"./Tool02-B0-LSNq8.js";import{s as Re}from"./Star01-DVVpP6Mt.js";import{b as $n}from"./agent-icon-JkG_B24O.js";import{s as Un}from"./XClose-D59rN56m.js";import{c as Xn,i as be,a as Je,E as qn,p as Gn,b as Qn,d as Wn}from"./connection-form-helpers-C9rI-4sl.js";import{a as ze}from"./authenticate-and-persist-oauth-Cs_ey_Si.js";import{g as Yn}from"./connection-slug-eyAPH6o3.js";import{C as Jn}from"./collection-tabs-Caaa8VYN.js";import{u as Ze}from"./use-infinite-scroll-Hw6OI4g1.js";import{B as Ne}from"./badge-Bp_khuBP.js";import{b as He,T as Ke,a as $e}from"./tooltip-CXgiQhhm.js";import{u as Zn}from"./useSuspenseInfiniteQuery-CjrVCjrM.js";import{S as et,u as nt}from"./use-mcp-client-DmQaIOOa.js";import{i as en}from"./Check-B5KuwkVX.js";import{s as tt}from"./Plus-n0d6qLEa.js";import{u as ot}from"./studio-tools-BMu9ujdK.js";import{u as st}from"./use-ai-providers-MB5_8NZz.js";function qe(o){const n=o?.metadata?.githubRepo;if(!n?.url)return{status:"none"};const m=n.connectionId;return!!m&&!!o?.connections?.some(f=>f.connection_id===m)?{status:"attached",repo:n,connectionId:m}:!!m||n.installationId!=null?{status:"detached",repo:n}:{status:"public-clone",repo:n}}function $t(o){const n=qe(o);return n.status==="attached"||n.status==="public-clone"?n.repo:null}function Ut(o){if(typeof o!="object"||o===null)return!1;const m=o.githubRepo?.url;return typeof m=="string"&&m.length>0}function Xt(o){return qe(o).status==="attached"}function qt(o){const n=qe(o).status;return n==="attached"||n==="detached"}function Gt(o){const n=new Set;for(const m of o??[]){const i=m.metadata?.liveAgentId;typeof i=="string"&&i&&n.add(m.id)}return n}function Qt(o,n){if(!o)return null;const m=o.metadata?.liveAgentId;if(typeof m=="string"&&m)return{mode:"dev",targetId:m};const i=(n??[]).find(j=>j.metadata?.liveAgentId===o.id);return i?{mode:"live",targetId:i.id}:null}function it({open:o,onOpenChange:n,onCreated:m}){const i=Ue(),{org:j}=Ie(),{data:f}=tn.useSession(),{stdioEnabled:k}=mn(),A=On(),p=dn(),_=on(),L=sn(_,"").items,s=gn({resolver:hn(Xn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=s.watch("ui_type"),T=s.watch("connection_url"),l=s.watch("npx_package"),u=be({uiType:g,connectionUrl:T??"",npxPackage:l??""})??Je({uiType:g,connectionUrl:T??"",registryItems:L}),h=t=>{const d=t.trim();if(!d)return;const C=!!s.formState.dirtyFields.title,c=!!s.formState.dirtyFields.description,r=!!s.formState.dirtyFields.env_vars,y=x=>{if(x&&(!C&&!s.getValues("title").trim()&&x.title&&s.setValue("title",x.title,{shouldDirty:!1}),!c&&!(s.getValues("description")??"").trim()&&x.description&&s.setValue("description",x.description,{shouldDirty:!1}),!r&&x.envVarKeys?.length)){const D=s.getValues("env_vars")??[],M=new Set(D.map(B=>B.key)),ee=x.envVarKeys.filter(B=>!M.has(B));ee.length>0&&s.setValue("env_vars",[...D,...ee.map(B=>({key:B,value:""}))],{shouldDirty:!0})}},G=Gn(d);if(G&&k){s.setValue("ui_type","NPX",{shouldDirty:!0}),s.setValue("npx_package",G.packageName,{shouldDirty:!0}),s.setValue("connection_url","",{shouldDirty:!0}),s.setValue("connection_token",null,{shouldDirty:!0}),y(be({uiType:"NPX",npxPackage:G.packageName}));return}if(d.startsWith("http://")||d.startsWith("https://")){const x=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";s.setValue("ui_type",x,{shouldDirty:!0}),s.setValue("connection_url",d,{shouldDirty:!0}),y(be({uiType:x,connectionUrl:d})??Je({uiType:x,connectionUrl:d,registryItems:L}));return}g==="NPX"&&y(be({uiType:"NPX",npxPackage:d}))},X=t=>{t||s.reset(),n(t)},N=async t=>{let d,C=null,c=null,r=null;t.ui_type==="NPX"?(d="STDIO",C="",r=Qn(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(d="STDIO",C="",r=Wn(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(d=t.ui_type,C=t.connection_url||"",c=t.connection_token||null);const y=bn("conn");try{await p.create.mutateAsync({id:y,title:t.title,description:t.description||null,connection_type:d,connection_url:C,connection_token:c,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:f?.user?.id||"system",organization_id:j.id,icon:t.icon??null,app_name:null,app_id:null,connection_headers:r,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),s.reset(),n(!1),m?.(y)}catch{U.error(i("connections.createConnectionDialog.failedToCreateConnection"))}},P=i("connections.createConnectionDialog.title"),K=i("connections.createConnectionDialog.description"),b=s.formState.isSubmitting?i("connections.createConnectionDialog.saving"):i("connections.createConnectionDialog.createButton"),q=e.jsxs("div",{className:"grid gap-4",children:[e.jsx(O,{control:s.control,name:"ui_type",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.typeLabel")}),e.jsxs(En,{value:t.value,onValueChange:t.onChange,children:[e.jsx(z,{children:e.jsx(Rn,{children:e.jsx(zn,{})})}),e.jsxs(Hn,{children:[e.jsx(ge,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Re,{className:"w-4 h-4"}),i("connections.createConnectionDialog.httpType")]})}),e.jsx(ge,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Re,{className:"w-4 h-4"}),i("connections.createConnectionDialog.sseType")]})}),e.jsx(ge,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Re,{className:"w-4 h-4"}),i("connections.createConnectionDialog.websocketType")]})}),k&&e.jsxs(e.Fragment,{children:[e.jsx(ge,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Se,{className:"w-4 h-4"}),i("connections.createConnectionDialog.npxPackageType")]})}),e.jsx(ge,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($n,{className:"w-4 h-4"}),i("connections.createConnectionDialog.customCommandType")]})})]})]})]}),e.jsx(H,{})]})}),g==="NPX"&&e.jsx(O,{control:s.control,name:"npx_package",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.npmPackageLabel")}),e.jsx(z,{children:e.jsx(J,{placeholder:i("connections.createConnectionDialog.npmPackagePlaceholder"),...t,value:t.value??"",onPaste:d=>{const C=d.clipboardData.getData("text");C&&(d.preventDefault(),s.setValue("npx_package",C.trim(),{shouldDirty:!0}),h(C))},onBlur:d=>{h(d.target.value),t.onBlur()}})}),e.jsx(H,{})]})}),g==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(O,{control:s.control,name:"stdio_command",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.commandLabel")}),e.jsx(z,{children:e.jsx(J,{placeholder:i("connections.createConnectionDialog.commandPlaceholder"),...t,value:t.value??""})}),e.jsx(H,{})]})}),e.jsx(O,{control:s.control,name:"stdio_args",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.argumentsLabel")}),e.jsx(z,{children:e.jsx(J,{placeholder:i("connections.createConnectionDialog.argumentsPlaceholder"),...t,value:t.value??""})}),e.jsx(H,{})]})})]}),e.jsx(O,{control:s.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.workingDirectoryLabel")}),e.jsx(z,{children:e.jsx(J,{placeholder:i("connections.createConnectionDialog.workingDirectoryPlaceholder"),...t,value:t.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:i("connections.createConnectionDialog.workingDirectoryDescription")}),e.jsx(H,{})]})})]}),(g==="NPX"||g==="STDIO")&&e.jsx(O,{control:s.control,name:"env_vars",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.environmentVariablesLabel")}),e.jsx(z,{children:e.jsx(qn,{value:t.value??[],onChange:t.onChange})}),e.jsx(H,{})]})}),g!=="NPX"&&g!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(O,{control:s.control,name:"connection_url",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.urlLabel")}),e.jsx(z,{children:e.jsx(J,{placeholder:i("connections.createConnectionDialog.urlPlaceholder"),...t,value:t.value??"",onPaste:d=>{const C=d.clipboardData.getData("text");C&&(d.preventDefault(),s.setValue("connection_url",C.trim(),{shouldDirty:!0}),h(C))},onBlur:d=>{h(d.target.value),t.onBlur()}})}),e.jsx(H,{})]})}),e.jsx(O,{control:s.control,name:"connection_token",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:u?.token?.label??i("connections.createConnectionDialog.tokenLabelDefault")}),e.jsx(z,{children:e.jsx(J,{type:"password",placeholder:u?.token?.placeholder??i("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...t,value:t.value??""})}),u?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[u.token.helperText,u.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:i("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),e.jsx(H,{})]})})]}),e.jsx(O,{control:s.control,name:"title",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.nameLabel")}),e.jsx(z,{children:e.jsx(J,{placeholder:i("connections.createConnectionDialog.namePlaceholder"),...t})}),e.jsx(H,{})]})}),e.jsx(O,{control:s.control,name:"description",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.descriptionLabel")}),e.jsx(z,{children:e.jsx(Kn,{placeholder:i("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...t,value:t.value??""})}),e.jsx(H,{})]})})]});return A?e.jsx(Tn,{open:o,onOpenChange:X,children:e.jsxs(Pn,{className:"max-h-[90vh]",children:[e.jsx(Mn,{className:"pb-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx(Fn,{children:P}),e.jsx(Ln,{className:"mt-1",children:K})]}),e.jsx(Bn,{asChild:!0,children:e.jsx(Z,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:e.jsx(Un,{size:16})})})]})}),e.jsx(Ye,{...s,children:e.jsxs("form",{onSubmit:s.handleSubmit(N),children:[e.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:q}),e.jsx(Vn,{children:e.jsx(Z,{type:"submit",disabled:s.formState.isSubmitting,className:"w-full",children:b})})]})})]})}):e.jsx(an,{open:o,onOpenChange:X,children:e.jsxs(cn,{className:"sm:max-w-[525px]",children:[e.jsxs(rn,{children:[e.jsx(ln,{children:P}),e.jsx(kn,{children:K})]}),e.jsx(Ye,{...s,children:e.jsxs("form",{onSubmit:s.handleSubmit(N),children:[e.jsx("div",{className:"py-4",children:q}),e.jsxs(An,{children:[e.jsx(Z,{type:"button",variant:"outline",onClick:()=>X(!1),children:i("connections.createConnectionDialog.cancelButton")}),e.jsx(Z,{type:"submit",disabled:s.formState.isSubmitting,className:"min-w-40",children:b})]})]})})]})})}function at(o){const n=fn.c(72),{mode:m,agentId:i,addedConnectionIds:j,onAdd:f,onCloneAndAdd:k,onConnectAndAdd:A,connectingItemId:p,search:_,onCreateConnection:w,onBrowseNavigate:L,defaultTab:s}=o,g=m===void 0?"add":m,T=s===void 0?"connected":s,l=Ue(),{org:u}=Ie(),h=ue.useDeferredValue(_),X=_!==h;let N;n[0]!==h?(N=h.trim().toLowerCase(),n[0]=h,n[1]=N):N=n[1];const P=N;let K;n[2]!==T?(K=a=>a??T,n[2]=T,n[3]=K):K=n[3];const[b,q]=xn(vn.connectionsTab(u.slug)+(T==="all"?":home-modal":":agent-modal"),K);let t;n[4]!==b||n[5]!==q?(t=a=>{a!==b&&S("connections_dialog_tab_changed",{to_tab:a}),q(a)},n[4]=b,n[5]=q,n[6]=t):t=n[6];const d=t;let C;n[7]!==u.id||n[8]!==u.slug?(C={connectionId:et,orgId:u.id,orgSlug:u.slug},n[7]=u.id,n[8]=u.slug,n[9]=C):C=n[9];const c=nt(C),r=h?.trim().split(/\s+/).filter(Boolean)??[],y=r.length>0?{operator:"or",conditions:r.flatMap(gt)}:void 0,G={...y&&{where:y},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},x=JSON.stringify(G),{data:D,fetchNextPage:M,hasNextPage:ee,isFetchingNextPage:B}=Zn({queryKey:Xe.collectionListInfinite(c,u.id,"","CONNECTIONS",x),queryFn:async a=>{const{pageParam:v}=a,$=v===void 0?0:v;return(await c.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...y&&{where:y},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:$}})).structuredContent},initialPageParam:0,getNextPageParam:pt,staleTime:3e4}),Ge=D?.pages.flatMap(ut)??[],he=In(Ge),un=new Set(Ge.filter(dt).map(lt)),fe=on(),Q=sn(fe,h),ke=Ze(Q.loadMore,Q.hasMore,Q.isLoadingMore),Ae=Ze(M,ee??!1,B),F=b==="all"||!!P,Qe=F?Q.items.filter(a=>{const v=Nn(a);if(v&&un.has(v))return!1;if(!P)return!0;const $=a._meta?.["mcp.mesh"],W=[a.title,a.description,a.name,a.server?.title,a.server?.description,a.server?.name,$?.friendly_name,$?.friendlyName].filter(Boolean).join(" ").toLowerCase();return r.some(V=>W.includes(V.toLowerCase()))}):[],pe=Qe.filter(rt),me=Qe.filter(ct);let xe;n[10]!==j?(xe=a=>a.some(v=>j.has(v.id)),n[10]=j,n[11]=xe):xe=n[11];const Te=xe;let ve;n[12]!==j||n[13]!==i||n[14]!==p||n[15]!==Te||n[16]!==g||n[17]!==f||n[18]!==L||n[19]!==k||n[20]!==l?(ve=(a,v,$,W,V)=>{const _e=Te(V),de=V.find(Y=>!j.has(Y.id)),I=V[0];if(g==="browse"){const Y=Yn(I);return e.jsx(Oe,{connection:{title:v,icon:$,description:V.length>1?`${V.length} instances`:W??void 0},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(en,{size:11})," ",l("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{S("connection_browse_clicked",{app_name:I.app_name??null,connection_id:I.id,instances_count:V.length}),L?.(Y)}},a)}return e.jsx(Oe,{connection:{title:v,icon:$,description:W},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[_e&&e.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(en,{size:11})," ",l("virtualMcp.connectionDialogContent.added")]}),e.jsx(Z,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:p!==null,onClick:Y=>{Y.stopPropagation(),de?(S("connection_add_clicked",{action:"use_existing",app_name:I.app_name??null,connection_id:de.id}),i&&S("agent_connection_attached",{agent_id:i,connection_id:de.id,app_name:I.app_name??null,mode:"existing"}),f(de.id)):(S("connection_add_clicked",{action:"clone",app_name:I.app_name??null,base_connection_id:I.id}),k(I))},children:l("virtualMcp.connectionDialogContent.add")})]})},a)},n[12]=j,n[13]=i,n[14]=p,n[15]=Te,n[16]=g,n[17]=f,n[18]=L,n[19]=k,n[20]=l,n[21]=ve):ve=n[21];const je=ve;let Ce;n[22]!==p||n[23]!==g||n[24]!==A||n[25]!==l?(Ce=a=>{const v=a._meta?.["mcp.mesh"],$=v?.friendlyName||v?.friendly_name||a.server?.title||a.title||a.server?.name||a.name||a.id||"",W=a.server?.description||a.description||null,V=a.server?.icons?.[0]?.src||wn(a.server?.repository)||null,_e=v?.official===!0,de=v?.verified===!0,I=v?.owner==="deco";return e.jsx(Oe,{connection:{title:$,description:W,icon:V},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[I&&e.jsxs(He,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:l("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),e.jsx($e,{children:l("virtualMcp.connectionDialogContent.builtByDeco")})]}),!I&&_e&&e.jsxs(He,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx(Ne,{variant:"outline",size:"icon",children:e.jsx(Ee,{})})}),e.jsx($e,{children:l("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!I&&!_e&&de&&e.jsxs(He,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx(Ne,{variant:"outline",size:"icon",children:e.jsx(Ee,{})})}),e.jsx($e,{children:l("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),e.jsx(Z,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:p!==null,onClick:Y=>{Y.stopPropagation(),S("connection_add_clicked",{action:"connect_new",registry_item_id:a.id,app_name:v?.friendlyName||a.server?.name||a.name||null}),A(a)},children:p===a.id?e.jsx(we,{size:14,className:"animate-spin"}):l(g==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${a.id}`)},n[22]=p,n[23]=g,n[24]=A,n[25]=l,n[26]=Ce):Ce=n[26];const We=Ce;let ne;n[27]!==b||n[28]!==d||n[29]!==w||n[30]!==P||n[31]!==l?(ne=!P&&e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsx(Jn,{tabs:[{id:"all",label:l("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:l("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:b,onTabChange:a=>d(a)}),e.jsxs(Z,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{S("connections_dialog_custom_clicked"),w()},children:[e.jsx(tt,{size:12}),l("virtualMcp.connectionDialogContent.customConnection")]})]}),n[27]=b,n[28]=d,n[29]=w,n[30]=P,n[31]=l,n[32]=ne):ne=n[32];const Pe=X&&"opacity-50 pointer-events-none";let te;n[33]!==Pe?(te=jn("flex-1 overflow-auto p-5 transition-opacity duration-150",Pe),n[33]=Pe,n[34]=te):te=n[34];const pn="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ye;n[35]!==je?(ye=a=>{if(a.type==="group")return je(a.key,a.title,a.icon,null,a.connections);const v=a.connection;return je(v.id,v.title,v.icon,v.description??null,[v])},n[35]=je,n[36]=ye):ye=n[36];const Me=he.map(ye);let oe;n[37]!==Ae?(oe=e.jsx("div",{ref:Ae,className:"col-span-full h-1"}),n[37]=Ae,n[38]=oe):oe=n[38];let se;n[39]!==B?(se=B&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),n[39]=B,n[40]=se):se=n[40];const Fe=F&&pe.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx(Ee,{size:13,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:l("virtualMcp.connectionDialogContent.sectionVerified")}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Le=F&&pe.map(We),Be=F&&me.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:l("virtualMcp.connectionDialogContent.sectionAllConnections")}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Ve=F&&me.map(We);let ie;n[41]!==ke||n[42]!==fe||n[43]!==F?(ie=F&&fe.length>0&&e.jsx("div",{ref:ke,className:"col-span-full h-1"}),n[41]=ke,n[42]=fe,n[43]=F,n[44]=ie):ie=n[44];let ae;n[45]!==Q.isLoadingMore||n[46]!==F?(ae=F&&Q.isLoadingMore&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),n[45]=Q.isLoadingMore,n[46]=F,n[47]=ae):ae=n[47];let ce;n[48]!==Me||n[49]!==oe||n[50]!==se||n[51]!==Fe||n[52]!==Le||n[53]!==Be||n[54]!==Ve||n[55]!==ie||n[56]!==ae?(ce=e.jsxs("div",{className:pn,children:[Me,oe,se,Fe,Le,Be,Ve,ie,ae]}),n[48]=Me,n[49]=oe,n[50]=se,n[51]=Fe,n[52]=Le,n[53]=Be,n[54]=Ve,n[55]=ie,n[56]=ae,n[57]=ce):ce=n[57];let re;n[58]!==b||n[59]!==he.length||n[60]!==me||n[61]!==_||n[62]!==l||n[63]!==pe?(re=he.length===0&&pe.length===0&&me.length===0&&e.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:_?l("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:_}):l(b==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),n[58]=b,n[59]=he.length,n[60]=me,n[61]=_,n[62]=l,n[63]=pe,n[64]=re):re=n[64];let le;n[65]!==te||n[66]!==ce||n[67]!==re?(le=e.jsxs("div",{className:te,children:[ce,re]}),n[65]=te,n[66]=ce,n[67]=re,n[68]=le):le=n[68];let De;return n[69]!==ne||n[70]!==le?(De=e.jsxs(e.Fragment,{children:[ne,le]}),n[69]=ne,n[70]=le,n[71]=De):De=n[71],De}function ct(o){return!o.verified&&!o._meta?.["mcp.mesh"]?.verified&&!o.meta?.verified}function rt(o){return o.verified||o._meta?.["mcp.mesh"]?.verified||o.meta?.verified}function lt(o){return o.app_name}function dt(o){return o.app_name}function ut(o){return o?.items??[]}function pt(o,n){if(o?.hasMore)return n.reduce(mt,0)}function mt(o,n){return o+(n?.items?.length??0)}function gt(o){return[{field:["title"],operator:"contains",value:o},{field:["description"],operator:"contains",value:o}]}function Wt({open:o,onOpenChange:n,defaultTab:m,initialSearch:i="",...j}){const f=Ue(),k=j.mode??"add",A="agentId"in j?j.agentId:void 0,p="addedConnectionIds"in j?j.addedConnectionIds??new Set:new Set,_="onAdd"in j&&j.onAdd?j.onAdd:c=>{},w=(c,r,y)=>{A&&S("agent_connection_attached",{agent_id:A,connection_id:c,app_name:r,mode:y})},[L,s]=ue.useState(null),[g,T]=ue.useState(i),[l,u]=ue.useState(!1),{org:h}=Ie(),{data:X}=tn.useSession(),N=dn(),P=Cn(),K=yn(),b=c=>{n(!1),K({to:"/$org/settings/connections/$appSlug",params:{org:h.slug,appSlug:c}})},q=()=>{P.invalidateQueries({predicate:c=>{const r=c.queryKey;return r[1]===h.id&&r[3]==="collection"&&r[4]==="CONNECTIONS"}})},t=async(c,r)=>{S("connection_oauth_succeeded",{connection_id:c,flow:r});const y=new URL(`/api/${h.slug}/mcp/${c}`,window.location.origin);await P.invalidateQueries({queryKey:Xe.isMCPAuthenticated(y.href,null)}),q()},d=async c=>{s(c.app_name??c.id);try{const y=`${c.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,x=(await N.create.mutateAsync({title:y,description:c.description??null,connection_type:c.connection_type,connection_url:c.connection_url??null,connection_token:null,icon:c.icon??null,app_name:c.app_name??null,app_id:c.app_id??null,connection_headers:c.connection_headers??null})).id,D=await ze({connectionId:x,orgId:h.id,orgSlug:h.slug,persistFallback:M=>N.update.mutateAsync({id:x,data:{connection_token:M}}).then(()=>{})});if(D.ran&&!D.ok){S("connection_oauth_failed",{connection_id:x,flow:"clone",error:D.error??"no_token"}),U.error(f("virtualMcp.addConnectionDialog.authenticationFailedError",{error:D.error??"no token received"})),await N.delete.mutateAsync(x);return}D.ran&&await t(x,"clone"),w(x,c.app_name??null,"clone"),_(x)}catch(r){console.error("Failed to add connection:",r),U.error(f("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{s(null)}},C=async c=>{if(!(!h||!X?.user?.id)){s(c.id);try{const r=Sn(c,h.id,X.user.id,{remoteIndex:0}),y=r.connection_type==="STDIO",G=!!r.connection_url,x=y&&r.connection_headers&&typeof r.connection_headers=="object"&&"command"in r.connection_headers;if(!G&&!x){U.error(f("virtualMcp.addConnectionDialog.mcpServerConnectionError")),s(null);return}const{id:D}=await N.create.mutateAsync(r),M=await ze({connectionId:D,orgId:h.id,orgSlug:h.slug,persistFallback:ee=>N.update.mutateAsync({id:D,data:{connection_token:ee}}).then(()=>{})});if(M.ran&&!M.ok){S("connection_oauth_failed",{connection_id:D,flow:"connect_new",error:M.error??"no_token"}),U.warning(f("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:f("virtualMcp.addConnectionDialog.signInFailedDescription",{error:M.error??"no token received"})}),w(D,r.app_name??null,"new"),_(D);return}M.ran?(await t(D,"connect_new"),U.success(f("virtualMcp.addConnectionDialog.connectedAuthenticated"))):U.success(f("virtualMcp.addConnectionDialog.connected")),w(D,r.app_name??null,"new"),_(D)}catch(r){console.error("Failed to connect:",r),U.error(f("virtualMcp.addConnectionDialog.failedToConnect"))}finally{s(null)}}};return e.jsxs(an,{open:o,onOpenChange:n,children:[e.jsxs(cn,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[e.jsx(rn,{className:"px-6 pt-5 pb-0 shrink-0",children:e.jsx(ln,{className:"text-base font-semibold",children:f(k==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),e.jsx("div",{className:"pt-3 shrink-0",children:e.jsx(_n,{value:g,onChange:T,placeholder:f("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),e.jsx(ue.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),children:e.jsx(at,{mode:k,agentId:A,addedConnectionIds:p,onAdd:_,onCloneAndAdd:d,onConnectAndAdd:C,connectingItemId:L,search:g,onCreateConnection:()=>u(!0),onBrowseNavigate:b,defaultTab:m})})]}),e.jsx(it,{open:l,onOpenChange:u,onCreated:async c=>{u(!1);const r=await ze({connectionId:c,orgId:h.id,orgSlug:h.slug,persistFallback:y=>N.update.mutateAsync({id:c,data:{connection_token:y}}).then(()=>{})});if(r.ran&&!r.ok){S("connection_oauth_failed",{connection_id:c,flow:"custom_create",error:r.error??"no_token"}),U.warning(f("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:f("virtualMcp.addConnectionDialog.signInFailedDescription",{error:r.error??"no token received"})}),w(c,null,"custom"),_(c),n(!1);return}r.ran&&await t(c,"custom_create"),w(c,null,"custom"),_(c),n(!1)}})]})}const nn=new Map;function Yt(){const{org:o}=Ie(),n=ot(),m=st(),i=m.find(u=>u.providerId==="deco"),{data:j,isLoading:f,refetch:k,isFetching:A}=Dn({queryKey:Xe.aiProviderCredits(o.id,"deco"),enabled:!!i,staleTime:6e4,queryFn:async()=>{try{return await n.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),p=j?.balanceCents??null,_=p!=null?p/100:null,w=ue.useRef(new Map);if(p!=null){const u=nn.get(o.id);w.current.get(o.id)&&u!=null&&p>u&&S("credits_topped_up_detected",{organization_id:o.id,delta_cents:p-u,previous_balance_cents:u,new_balance_cents:p}),nn.set(o.id,p),w.current.set(o.id,!0)}const L=!!i,s=p!=null&&p>0,g=p!=null&&p===0,T=p!=null&&p===200,l=m.length>0&&m.every(u=>u.providerId==="deco");return{hasDecoKey:L,decoKeyId:i?.id??null,balanceCents:p,balanceDollars:_,hasCredits:s,isZeroBalance:g,isInitialFreeCredit:T,hasOnlyDecoProvider:l,isLoading:f,isFetching:A,refetch:k}}export{Wt as A,Ut as a,$t as b,Xt as c,qt as d,Qt as f,Gt as g,qe as r,Yt as u};
|
|
1
|
+
import{b as Ue,F as Ie,a as tn,D as mn,R as gn,P as hn,j as e,B as Z,t as U,c as fn,r as ue,I as xn,G as vn,K as Xe,q as S,m as jn,k as we,o as Cn,d as yn,n as Dn}from"./index-DPUSzQFm.js";import{C as _n}from"./collection-search-CXWHt_gZ.js";import{g as bn,a as Nn,b as wn,e as Sn}from"./extract-connection-data-DOMEDQks.js";import{u as on,a as sn,g as In,C as Oe}from"./connection-card--LroopWJ.js";import{e as an,d as cn,a as rn,b as ln,h as kn,c as An}from"./dialog-DRW5Z6kg.js";import{D as Tn,a as Pn,c as Mn,b as Fn,d as Ln,e as Bn,f as Vn}from"./drawer-B2XvIIAe.js";import{u as On}from"./use-mobile-C_lJg_dg.js";import{F as O,b as E,c as R,d as z,f as H,a as Ye}from"./form-BDz4mzCI.js";import{I as J}from"./input-C6HduerO.js";import{S as En,a as Rn,b as zn,c as Hn,d as ge}from"./select-DmXTa4oO.js";import{T as Kn}from"./textarea-BfGzPoPY.js";import{b as dn}from"./use-connection-DZt9M_kE.js";import{n as Se,i as Ee}from"./Tool02-RKDZaiJk.js";import{s as Re}from"./Star01-DY1NWiTb.js";import{b as $n}from"./agent-icon-BnGJPmET.js";import{s as Un}from"./XClose-BIVjAPO7.js";import{c as Xn,i as be,a as Je,E as qn,p as Gn,b as Qn,d as Wn}from"./connection-form-helpers-CzrFES2G.js";import{a as ze}from"./authenticate-and-persist-oauth-DM0vv-ut.js";import{g as Yn}from"./connection-slug-eyAPH6o3.js";import{C as Jn}from"./collection-tabs-1Vmi5jiO.js";import{u as Ze}from"./use-infinite-scroll-CshkwFkA.js";import{B as Ne}from"./badge-CIuy-tuu.js";import{b as He,T as Ke,a as $e}from"./tooltip-DWRiLMWp.js";import{u as Zn}from"./useSuspenseInfiniteQuery-CLVVU3Ta.js";import{S as et,u as nt}from"./use-mcp-client-D4kRoqsh.js";import{i as en}from"./Check-Cnez_IQh.js";import{s as tt}from"./Plus-BjwUeIOu.js";import{u as ot}from"./studio-tools-NTdqO4cY.js";import{u as st}from"./use-ai-providers-BjwhishN.js";function qe(o){const n=o?.metadata?.githubRepo;if(!n?.url)return{status:"none"};const m=n.connectionId;return!!m&&!!o?.connections?.some(f=>f.connection_id===m)?{status:"attached",repo:n,connectionId:m}:!!m||n.installationId!=null?{status:"detached",repo:n}:{status:"public-clone",repo:n}}function $t(o){const n=qe(o);return n.status==="attached"||n.status==="public-clone"?n.repo:null}function Ut(o){if(typeof o!="object"||o===null)return!1;const m=o.githubRepo?.url;return typeof m=="string"&&m.length>0}function Xt(o){return qe(o).status==="attached"}function qt(o){const n=qe(o).status;return n==="attached"||n==="detached"}function Gt(o){const n=new Set;for(const m of o??[]){const i=m.metadata?.liveAgentId;typeof i=="string"&&i&&n.add(m.id)}return n}function Qt(o,n){if(!o)return null;const m=o.metadata?.liveAgentId;if(typeof m=="string"&&m)return{mode:"dev",targetId:m};const i=(n??[]).find(j=>j.metadata?.liveAgentId===o.id);return i?{mode:"live",targetId:i.id}:null}function it({open:o,onOpenChange:n,onCreated:m}){const i=Ue(),{org:j}=Ie(),{data:f}=tn.useSession(),{stdioEnabled:k}=mn(),A=On(),p=dn(),_=on(),L=sn(_,"").items,s=gn({resolver:hn(Xn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=s.watch("ui_type"),T=s.watch("connection_url"),l=s.watch("npx_package"),u=be({uiType:g,connectionUrl:T??"",npxPackage:l??""})??Je({uiType:g,connectionUrl:T??"",registryItems:L}),h=t=>{const d=t.trim();if(!d)return;const C=!!s.formState.dirtyFields.title,c=!!s.formState.dirtyFields.description,r=!!s.formState.dirtyFields.env_vars,y=x=>{if(x&&(!C&&!s.getValues("title").trim()&&x.title&&s.setValue("title",x.title,{shouldDirty:!1}),!c&&!(s.getValues("description")??"").trim()&&x.description&&s.setValue("description",x.description,{shouldDirty:!1}),!r&&x.envVarKeys?.length)){const D=s.getValues("env_vars")??[],M=new Set(D.map(B=>B.key)),ee=x.envVarKeys.filter(B=>!M.has(B));ee.length>0&&s.setValue("env_vars",[...D,...ee.map(B=>({key:B,value:""}))],{shouldDirty:!0})}},G=Gn(d);if(G&&k){s.setValue("ui_type","NPX",{shouldDirty:!0}),s.setValue("npx_package",G.packageName,{shouldDirty:!0}),s.setValue("connection_url","",{shouldDirty:!0}),s.setValue("connection_token",null,{shouldDirty:!0}),y(be({uiType:"NPX",npxPackage:G.packageName}));return}if(d.startsWith("http://")||d.startsWith("https://")){const x=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";s.setValue("ui_type",x,{shouldDirty:!0}),s.setValue("connection_url",d,{shouldDirty:!0}),y(be({uiType:x,connectionUrl:d})??Je({uiType:x,connectionUrl:d,registryItems:L}));return}g==="NPX"&&y(be({uiType:"NPX",npxPackage:d}))},X=t=>{t||s.reset(),n(t)},N=async t=>{let d,C=null,c=null,r=null;t.ui_type==="NPX"?(d="STDIO",C="",r=Qn(t.npx_package||"",t.env_vars||[])):t.ui_type==="STDIO"?(d="STDIO",C="",r=Wn(t.stdio_command||"",t.stdio_args||"",t.stdio_cwd,t.env_vars||[])):(d=t.ui_type,C=t.connection_url||"",c=t.connection_token||null);const y=bn("conn");try{await p.create.mutateAsync({id:y,title:t.title,description:t.description||null,connection_type:d,connection_url:C,connection_token:c,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:f?.user?.id||"system",organization_id:j.id,icon:t.icon??null,app_name:null,app_id:null,connection_headers:r,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),s.reset(),n(!1),m?.(y)}catch{U.error(i("connections.createConnectionDialog.failedToCreateConnection"))}},P=i("connections.createConnectionDialog.title"),K=i("connections.createConnectionDialog.description"),b=s.formState.isSubmitting?i("connections.createConnectionDialog.saving"):i("connections.createConnectionDialog.createButton"),q=e.jsxs("div",{className:"grid gap-4",children:[e.jsx(O,{control:s.control,name:"ui_type",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.typeLabel")}),e.jsxs(En,{value:t.value,onValueChange:t.onChange,children:[e.jsx(z,{children:e.jsx(Rn,{children:e.jsx(zn,{})})}),e.jsxs(Hn,{children:[e.jsx(ge,{value:"HTTP",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Re,{className:"w-4 h-4"}),i("connections.createConnectionDialog.httpType")]})}),e.jsx(ge,{value:"SSE",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Re,{className:"w-4 h-4"}),i("connections.createConnectionDialog.sseType")]})}),e.jsx(ge,{value:"Websocket",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Re,{className:"w-4 h-4"}),i("connections.createConnectionDialog.websocketType")]})}),k&&e.jsxs(e.Fragment,{children:[e.jsx(ge,{value:"NPX",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Se,{className:"w-4 h-4"}),i("connections.createConnectionDialog.npxPackageType")]})}),e.jsx(ge,{value:"STDIO",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($n,{className:"w-4 h-4"}),i("connections.createConnectionDialog.customCommandType")]})})]})]})]}),e.jsx(H,{})]})}),g==="NPX"&&e.jsx(O,{control:s.control,name:"npx_package",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.npmPackageLabel")}),e.jsx(z,{children:e.jsx(J,{placeholder:i("connections.createConnectionDialog.npmPackagePlaceholder"),...t,value:t.value??"",onPaste:d=>{const C=d.clipboardData.getData("text");C&&(d.preventDefault(),s.setValue("npx_package",C.trim(),{shouldDirty:!0}),h(C))},onBlur:d=>{h(d.target.value),t.onBlur()}})}),e.jsx(H,{})]})}),g==="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[e.jsx(O,{control:s.control,name:"stdio_command",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.commandLabel")}),e.jsx(z,{children:e.jsx(J,{placeholder:i("connections.createConnectionDialog.commandPlaceholder"),...t,value:t.value??""})}),e.jsx(H,{})]})}),e.jsx(O,{control:s.control,name:"stdio_args",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.argumentsLabel")}),e.jsx(z,{children:e.jsx(J,{placeholder:i("connections.createConnectionDialog.argumentsPlaceholder"),...t,value:t.value??""})}),e.jsx(H,{})]})})]}),e.jsx(O,{control:s.control,name:"stdio_cwd",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.workingDirectoryLabel")}),e.jsx(z,{children:e.jsx(J,{placeholder:i("connections.createConnectionDialog.workingDirectoryPlaceholder"),...t,value:t.value??""})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:i("connections.createConnectionDialog.workingDirectoryDescription")}),e.jsx(H,{})]})})]}),(g==="NPX"||g==="STDIO")&&e.jsx(O,{control:s.control,name:"env_vars",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.environmentVariablesLabel")}),e.jsx(z,{children:e.jsx(qn,{value:t.value??[],onChange:t.onChange})}),e.jsx(H,{})]})}),g!=="NPX"&&g!=="STDIO"&&e.jsxs(e.Fragment,{children:[e.jsx(O,{control:s.control,name:"connection_url",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.urlLabel")}),e.jsx(z,{children:e.jsx(J,{placeholder:i("connections.createConnectionDialog.urlPlaceholder"),...t,value:t.value??"",onPaste:d=>{const C=d.clipboardData.getData("text");C&&(d.preventDefault(),s.setValue("connection_url",C.trim(),{shouldDirty:!0}),h(C))},onBlur:d=>{h(d.target.value),t.onBlur()}})}),e.jsx(H,{})]})}),e.jsx(O,{control:s.control,name:"connection_token",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:u?.token?.label??i("connections.createConnectionDialog.tokenLabelDefault")}),e.jsx(z,{children:e.jsx(J,{type:"password",placeholder:u?.token?.placeholder??i("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...t,value:t.value??""})}),u?.token?.helperText&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[u.token.helperText,u.id==="github"&&e.jsxs(e.Fragment,{children:[" ","·"," ",e.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:i("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),e.jsx(H,{})]})})]}),e.jsx(O,{control:s.control,name:"title",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.nameLabel")}),e.jsx(z,{children:e.jsx(J,{placeholder:i("connections.createConnectionDialog.namePlaceholder"),...t})}),e.jsx(H,{})]})}),e.jsx(O,{control:s.control,name:"description",render:({field:t})=>e.jsxs(E,{children:[e.jsx(R,{children:i("connections.createConnectionDialog.descriptionLabel")}),e.jsx(z,{children:e.jsx(Kn,{placeholder:i("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...t,value:t.value??""})}),e.jsx(H,{})]})})]});return A?e.jsx(Tn,{open:o,onOpenChange:X,children:e.jsxs(Pn,{className:"max-h-[90vh]",children:[e.jsx(Mn,{className:"pb-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx(Fn,{children:P}),e.jsx(Ln,{className:"mt-1",children:K})]}),e.jsx(Bn,{asChild:!0,children:e.jsx(Z,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:e.jsx(Un,{size:16})})})]})}),e.jsx(Ye,{...s,children:e.jsxs("form",{onSubmit:s.handleSubmit(N),children:[e.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:q}),e.jsx(Vn,{children:e.jsx(Z,{type:"submit",disabled:s.formState.isSubmitting,className:"w-full",children:b})})]})})]})}):e.jsx(an,{open:o,onOpenChange:X,children:e.jsxs(cn,{className:"sm:max-w-[525px]",children:[e.jsxs(rn,{children:[e.jsx(ln,{children:P}),e.jsx(kn,{children:K})]}),e.jsx(Ye,{...s,children:e.jsxs("form",{onSubmit:s.handleSubmit(N),children:[e.jsx("div",{className:"py-4",children:q}),e.jsxs(An,{children:[e.jsx(Z,{type:"button",variant:"outline",onClick:()=>X(!1),children:i("connections.createConnectionDialog.cancelButton")}),e.jsx(Z,{type:"submit",disabled:s.formState.isSubmitting,className:"min-w-40",children:b})]})]})})]})})}function at(o){const n=fn.c(72),{mode:m,agentId:i,addedConnectionIds:j,onAdd:f,onCloneAndAdd:k,onConnectAndAdd:A,connectingItemId:p,search:_,onCreateConnection:w,onBrowseNavigate:L,defaultTab:s}=o,g=m===void 0?"add":m,T=s===void 0?"connected":s,l=Ue(),{org:u}=Ie(),h=ue.useDeferredValue(_),X=_!==h;let N;n[0]!==h?(N=h.trim().toLowerCase(),n[0]=h,n[1]=N):N=n[1];const P=N;let K;n[2]!==T?(K=a=>a??T,n[2]=T,n[3]=K):K=n[3];const[b,q]=xn(vn.connectionsTab(u.slug)+(T==="all"?":home-modal":":agent-modal"),K);let t;n[4]!==b||n[5]!==q?(t=a=>{a!==b&&S("connections_dialog_tab_changed",{to_tab:a}),q(a)},n[4]=b,n[5]=q,n[6]=t):t=n[6];const d=t;let C;n[7]!==u.id||n[8]!==u.slug?(C={connectionId:et,orgId:u.id,orgSlug:u.slug},n[7]=u.id,n[8]=u.slug,n[9]=C):C=n[9];const c=nt(C),r=h?.trim().split(/\s+/).filter(Boolean)??[],y=r.length>0?{operator:"or",conditions:r.flatMap(gt)}:void 0,G={...y&&{where:y},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},x=JSON.stringify(G),{data:D,fetchNextPage:M,hasNextPage:ee,isFetchingNextPage:B}=Zn({queryKey:Xe.collectionListInfinite(c,u.id,"","CONNECTIONS",x),queryFn:async a=>{const{pageParam:v}=a,$=v===void 0?0:v;return(await c.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...y&&{where:y},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:$}})).structuredContent},initialPageParam:0,getNextPageParam:pt,staleTime:3e4}),Ge=D?.pages.flatMap(ut)??[],he=In(Ge),un=new Set(Ge.filter(dt).map(lt)),fe=on(),Q=sn(fe,h),ke=Ze(Q.loadMore,Q.hasMore,Q.isLoadingMore),Ae=Ze(M,ee??!1,B),F=b==="all"||!!P,Qe=F?Q.items.filter(a=>{const v=Nn(a);if(v&&un.has(v))return!1;if(!P)return!0;const $=a._meta?.["mcp.mesh"],W=[a.title,a.description,a.name,a.server?.title,a.server?.description,a.server?.name,$?.friendly_name,$?.friendlyName].filter(Boolean).join(" ").toLowerCase();return r.some(V=>W.includes(V.toLowerCase()))}):[],pe=Qe.filter(rt),me=Qe.filter(ct);let xe;n[10]!==j?(xe=a=>a.some(v=>j.has(v.id)),n[10]=j,n[11]=xe):xe=n[11];const Te=xe;let ve;n[12]!==j||n[13]!==i||n[14]!==p||n[15]!==Te||n[16]!==g||n[17]!==f||n[18]!==L||n[19]!==k||n[20]!==l?(ve=(a,v,$,W,V)=>{const _e=Te(V),de=V.find(Y=>!j.has(Y.id)),I=V[0];if(g==="browse"){const Y=Yn(I);return e.jsx(Oe,{connection:{title:v,icon:$,description:V.length>1?`${V.length} instances`:W??void 0},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(en,{size:11})," ",l("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{S("connection_browse_clicked",{app_name:I.app_name??null,connection_id:I.id,instances_count:V.length}),L?.(Y)}},a)}return e.jsx(Oe,{connection:{title:v,icon:$,description:W},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[_e&&e.jsxs(Ne,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[e.jsx(en,{size:11})," ",l("virtualMcp.connectionDialogContent.added")]}),e.jsx(Z,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:p!==null,onClick:Y=>{Y.stopPropagation(),de?(S("connection_add_clicked",{action:"use_existing",app_name:I.app_name??null,connection_id:de.id}),i&&S("agent_connection_attached",{agent_id:i,connection_id:de.id,app_name:I.app_name??null,mode:"existing"}),f(de.id)):(S("connection_add_clicked",{action:"clone",app_name:I.app_name??null,base_connection_id:I.id}),k(I))},children:l("virtualMcp.connectionDialogContent.add")})]})},a)},n[12]=j,n[13]=i,n[14]=p,n[15]=Te,n[16]=g,n[17]=f,n[18]=L,n[19]=k,n[20]=l,n[21]=ve):ve=n[21];const je=ve;let Ce;n[22]!==p||n[23]!==g||n[24]!==A||n[25]!==l?(Ce=a=>{const v=a._meta?.["mcp.mesh"],$=v?.friendlyName||v?.friendly_name||a.server?.title||a.title||a.server?.name||a.name||a.id||"",W=a.server?.description||a.description||null,V=a.server?.icons?.[0]?.src||wn(a.server?.repository)||null,_e=v?.official===!0,de=v?.verified===!0,I=v?.owner==="deco";return e.jsx(Oe,{connection:{title:$,description:W,icon:V},fallbackIcon:e.jsx(Se,{}),headerActionsAlwaysVisible:!0,headerActions:e.jsxs("div",{className:"flex items-center gap-1.5",children:[I&&e.jsxs(He,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:l("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),e.jsx($e,{children:l("virtualMcp.connectionDialogContent.builtByDeco")})]}),!I&&_e&&e.jsxs(He,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx(Ne,{variant:"outline",size:"icon",children:e.jsx(Ee,{})})}),e.jsx($e,{children:l("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!I&&!_e&&de&&e.jsxs(He,{children:[e.jsx(Ke,{asChild:!0,children:e.jsx(Ne,{variant:"outline",size:"icon",children:e.jsx(Ee,{})})}),e.jsx($e,{children:l("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),e.jsx(Z,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:p!==null,onClick:Y=>{Y.stopPropagation(),S("connection_add_clicked",{action:"connect_new",registry_item_id:a.id,app_name:v?.friendlyName||a.server?.name||a.name||null}),A(a)},children:p===a.id?e.jsx(we,{size:14,className:"animate-spin"}):l(g==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${a.id}`)},n[22]=p,n[23]=g,n[24]=A,n[25]=l,n[26]=Ce):Ce=n[26];const We=Ce;let ne;n[27]!==b||n[28]!==d||n[29]!==w||n[30]!==P||n[31]!==l?(ne=!P&&e.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[e.jsx(Jn,{tabs:[{id:"all",label:l("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:l("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:b,onTabChange:a=>d(a)}),e.jsxs(Z,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{S("connections_dialog_custom_clicked"),w()},children:[e.jsx(tt,{size:12}),l("virtualMcp.connectionDialogContent.customConnection")]})]}),n[27]=b,n[28]=d,n[29]=w,n[30]=P,n[31]=l,n[32]=ne):ne=n[32];const Pe=X&&"opacity-50 pointer-events-none";let te;n[33]!==Pe?(te=jn("flex-1 overflow-auto p-5 transition-opacity duration-150",Pe),n[33]=Pe,n[34]=te):te=n[34];const pn="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let ye;n[35]!==je?(ye=a=>{if(a.type==="group")return je(a.key,a.title,a.icon,null,a.connections);const v=a.connection;return je(v.id,v.title,v.icon,v.description??null,[v])},n[35]=je,n[36]=ye):ye=n[36];const Me=he.map(ye);let oe;n[37]!==Ae?(oe=e.jsx("div",{ref:Ae,className:"col-span-full h-1"}),n[37]=Ae,n[38]=oe):oe=n[38];let se;n[39]!==B?(se=B&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),n[39]=B,n[40]=se):se=n[40];const Fe=F&&pe.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx(Ee,{size:13,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:l("virtualMcp.connectionDialogContent.sectionVerified")}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Le=F&&pe.map(We),Be=F&&me.length>0&&e.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[e.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:l("virtualMcp.connectionDialogContent.sectionAllConnections")}),e.jsx("div",{className:"flex-1 h-px bg-border"})]}),Ve=F&&me.map(We);let ie;n[41]!==ke||n[42]!==fe||n[43]!==F?(ie=F&&fe.length>0&&e.jsx("div",{ref:ke,className:"col-span-full h-1"}),n[41]=ke,n[42]=fe,n[43]=F,n[44]=ie):ie=n[44];let ae;n[45]!==Q.isLoadingMore||n[46]!==F?(ae=F&&Q.isLoadingMore&&e.jsx("div",{className:"col-span-full flex justify-center py-6",children:e.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),n[45]=Q.isLoadingMore,n[46]=F,n[47]=ae):ae=n[47];let ce;n[48]!==Me||n[49]!==oe||n[50]!==se||n[51]!==Fe||n[52]!==Le||n[53]!==Be||n[54]!==Ve||n[55]!==ie||n[56]!==ae?(ce=e.jsxs("div",{className:pn,children:[Me,oe,se,Fe,Le,Be,Ve,ie,ae]}),n[48]=Me,n[49]=oe,n[50]=se,n[51]=Fe,n[52]=Le,n[53]=Be,n[54]=Ve,n[55]=ie,n[56]=ae,n[57]=ce):ce=n[57];let re;n[58]!==b||n[59]!==he.length||n[60]!==me||n[61]!==_||n[62]!==l||n[63]!==pe?(re=he.length===0&&pe.length===0&&me.length===0&&e.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:_?l("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:_}):l(b==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),n[58]=b,n[59]=he.length,n[60]=me,n[61]=_,n[62]=l,n[63]=pe,n[64]=re):re=n[64];let le;n[65]!==te||n[66]!==ce||n[67]!==re?(le=e.jsxs("div",{className:te,children:[ce,re]}),n[65]=te,n[66]=ce,n[67]=re,n[68]=le):le=n[68];let De;return n[69]!==ne||n[70]!==le?(De=e.jsxs(e.Fragment,{children:[ne,le]}),n[69]=ne,n[70]=le,n[71]=De):De=n[71],De}function ct(o){return!o.verified&&!o._meta?.["mcp.mesh"]?.verified&&!o.meta?.verified}function rt(o){return o.verified||o._meta?.["mcp.mesh"]?.verified||o.meta?.verified}function lt(o){return o.app_name}function dt(o){return o.app_name}function ut(o){return o?.items??[]}function pt(o,n){if(o?.hasMore)return n.reduce(mt,0)}function mt(o,n){return o+(n?.items?.length??0)}function gt(o){return[{field:["title"],operator:"contains",value:o},{field:["description"],operator:"contains",value:o}]}function Wt({open:o,onOpenChange:n,defaultTab:m,initialSearch:i="",...j}){const f=Ue(),k=j.mode??"add",A="agentId"in j?j.agentId:void 0,p="addedConnectionIds"in j?j.addedConnectionIds??new Set:new Set,_="onAdd"in j&&j.onAdd?j.onAdd:c=>{},w=(c,r,y)=>{A&&S("agent_connection_attached",{agent_id:A,connection_id:c,app_name:r,mode:y})},[L,s]=ue.useState(null),[g,T]=ue.useState(i),[l,u]=ue.useState(!1),{org:h}=Ie(),{data:X}=tn.useSession(),N=dn(),P=Cn(),K=yn(),b=c=>{n(!1),K({to:"/$org/settings/connections/$appSlug",params:{org:h.slug,appSlug:c}})},q=()=>{P.invalidateQueries({predicate:c=>{const r=c.queryKey;return r[1]===h.id&&r[3]==="collection"&&r[4]==="CONNECTIONS"}})},t=async(c,r)=>{S("connection_oauth_succeeded",{connection_id:c,flow:r});const y=new URL(`/api/${h.slug}/mcp/${c}`,window.location.origin);await P.invalidateQueries({queryKey:Xe.isMCPAuthenticated(y.href,null)}),q()},d=async c=>{s(c.app_name??c.id);try{const y=`${c.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,x=(await N.create.mutateAsync({title:y,description:c.description??null,connection_type:c.connection_type,connection_url:c.connection_url??null,connection_token:null,icon:c.icon??null,app_name:c.app_name??null,app_id:c.app_id??null,connection_headers:c.connection_headers??null})).id,D=await ze({connectionId:x,orgId:h.id,orgSlug:h.slug,persistFallback:M=>N.update.mutateAsync({id:x,data:{connection_token:M}}).then(()=>{})});if(D.ran&&!D.ok){S("connection_oauth_failed",{connection_id:x,flow:"clone",error:D.error??"no_token"}),U.error(f("virtualMcp.addConnectionDialog.authenticationFailedError",{error:D.error??"no token received"})),await N.delete.mutateAsync(x);return}D.ran&&await t(x,"clone"),w(x,c.app_name??null,"clone"),_(x)}catch(r){console.error("Failed to add connection:",r),U.error(f("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{s(null)}},C=async c=>{if(!(!h||!X?.user?.id)){s(c.id);try{const r=Sn(c,h.id,X.user.id,{remoteIndex:0}),y=r.connection_type==="STDIO",G=!!r.connection_url,x=y&&r.connection_headers&&typeof r.connection_headers=="object"&&"command"in r.connection_headers;if(!G&&!x){U.error(f("virtualMcp.addConnectionDialog.mcpServerConnectionError")),s(null);return}const{id:D}=await N.create.mutateAsync(r),M=await ze({connectionId:D,orgId:h.id,orgSlug:h.slug,persistFallback:ee=>N.update.mutateAsync({id:D,data:{connection_token:ee}}).then(()=>{})});if(M.ran&&!M.ok){S("connection_oauth_failed",{connection_id:D,flow:"connect_new",error:M.error??"no_token"}),U.warning(f("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:f("virtualMcp.addConnectionDialog.signInFailedDescription",{error:M.error??"no token received"})}),w(D,r.app_name??null,"new"),_(D);return}M.ran?(await t(D,"connect_new"),U.success(f("virtualMcp.addConnectionDialog.connectedAuthenticated"))):U.success(f("virtualMcp.addConnectionDialog.connected")),w(D,r.app_name??null,"new"),_(D)}catch(r){console.error("Failed to connect:",r),U.error(f("virtualMcp.addConnectionDialog.failedToConnect"))}finally{s(null)}}};return e.jsxs(an,{open:o,onOpenChange:n,children:[e.jsxs(cn,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[e.jsx(rn,{className:"px-6 pt-5 pb-0 shrink-0",children:e.jsx(ln,{className:"text-base font-semibold",children:f(k==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),e.jsx("div",{className:"pt-3 shrink-0",children:e.jsx(_n,{value:g,onChange:T,placeholder:f("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),e.jsx(ue.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(we,{size:24,className:"animate-spin text-muted-foreground"})}),children:e.jsx(at,{mode:k,agentId:A,addedConnectionIds:p,onAdd:_,onCloneAndAdd:d,onConnectAndAdd:C,connectingItemId:L,search:g,onCreateConnection:()=>u(!0),onBrowseNavigate:b,defaultTab:m})})]}),e.jsx(it,{open:l,onOpenChange:u,onCreated:async c=>{u(!1);const r=await ze({connectionId:c,orgId:h.id,orgSlug:h.slug,persistFallback:y=>N.update.mutateAsync({id:c,data:{connection_token:y}}).then(()=>{})});if(r.ran&&!r.ok){S("connection_oauth_failed",{connection_id:c,flow:"custom_create",error:r.error??"no_token"}),U.warning(f("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:f("virtualMcp.addConnectionDialog.signInFailedDescription",{error:r.error??"no token received"})}),w(c,null,"custom"),_(c),n(!1);return}r.ran&&await t(c,"custom_create"),w(c,null,"custom"),_(c),n(!1)}})]})}const nn=new Map;function Yt(){const{org:o}=Ie(),n=ot(),m=st(),i=m.find(u=>u.providerId==="deco"),{data:j,isLoading:f,refetch:k,isFetching:A}=Dn({queryKey:Xe.aiProviderCredits(o.id,"deco"),enabled:!!i,staleTime:6e4,queryFn:async()=>{try{return await n.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),p=j?.balanceCents??null,_=p!=null?p/100:null,w=ue.useRef(new Map);if(p!=null){const u=nn.get(o.id);w.current.get(o.id)&&u!=null&&p>u&&S("credits_topped_up_detected",{organization_id:o.id,delta_cents:p-u,previous_balance_cents:u,new_balance_cents:p}),nn.set(o.id,p),w.current.set(o.id,!0)}const L=!!i,s=p!=null&&p>0,g=p!=null&&p===0,T=p!=null&&p===200,l=m.length>0&&m.every(u=>u.providerId==="deco");return{hasDecoKey:L,decoKeyId:i?.id??null,balanceCents:p,balanceDollars:_,hasCredits:s,isZeroBalance:g,isInitialFreeCredit:T,hasOnlyDecoProvider:l,isLoading:f,isFetching:A,refetch:k}}export{Wt as A,Ut as a,$t as b,Xt as c,qt as d,Qt as f,Gt as g,qe as r,Yt as u};
|
package/dist/client/assets/{use-decopilot-events-CGYwsG7F.js → use-decopilot-events-Bt_io3vc.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-DPUSzQFm.js";import{d as R,D as u}from"./decopilot-sse-pool-Baab5vaV.js";const f=()=>0;function g(E){const{orgSlug:t,taskId:a,enabled:n=!0,onStep:o,onFinish:S,onTaskStatus:i}=E,l=s.useRef({taskId:a,onStep:o,onFinish:S,onTaskStatus:i});l.current={taskId:a,onStep:o,onFinish:S,onTaskStatus:i};const c=s.useRef(null),p=s.useRef(n),b=s.useRef(t);(!c.current||p.current!==n||b.current!==t)&&(p.current=n,b.current=t,c.current=d=>{if(!n||!t)return()=>{};const k=T=>{let e;try{e=JSON.parse(T.data)}catch{return}const r=l.current;if(!(r.taskId&&e.subject!==r.taskId)){switch(e.type){case u.STEP:r.onStep?.(e);break;case u.FINISH:r.onFinish?.(e);break;case u.THREAD_STATUS:r.onTaskStatus?.(e);break}d()}};return R.subscribe(t,k)}),s.useSyncExternalStore(c.current,f,f)}export{g as u};
|
package/dist/client/assets/{use-delete-connection-B45LKTd-.js → use-delete-connection-C9ZwRw1E.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as oe,b as le,j as n,F as se,o as ie,r as ce,t as Y,b9 as re,ba as ae}from"./index-
|
|
1
|
+
import{c as oe,b as le,j as n,F as se,o as ie,r as ce,t as Y,b9 as re,ba as ae}from"./index-DPUSzQFm.js";import{A as z,a as G,b as V,c as X,g as Z,d as ee,e as te,f as ne}from"./alert-dialog-wCHBPMgf.js";import{u as de}from"./studio-tools-NTdqO4cY.js";function ue(B){const e=oe.c(86),{deleteState:s,cancelDelete:a,confirmDelete:d,confirmForceDelete:c}=B,t=le(),w=s.mode==="deleting";let m;e[0]!==a?(m=W=>{W||a()},e[0]=a,e[1]=m):m=e[1];let u;e[2]!==t?(u=t("common.deleteConnectionDialogs.title"),e[2]=t,e[3]=u):u=e[3];let D;e[4]!==u?(D=n.jsx(z,{children:u}),e[4]=u,e[5]=D):D=e[5];let C;e[6]!==t?(C=t("common.deleteConnectionDialogs.description"),e[6]=t,e[7]=C):C=e[7];const H=s.mode==="deleting"&&s.connection.title;let o;e[8]!==H?(o=n.jsx("span",{className:"font-medium text-foreground",children:H}),e[8]=H,e[9]=o):o=e[9];let l;e[10]!==C||e[11]!==o?(l=n.jsxs(G,{children:[C," ",o,"."]}),e[10]=C,e[11]=o,e[12]=l):l=e[12];let i;e[13]!==D||e[14]!==l?(i=n.jsxs(V,{children:[D,l]}),e[13]=D,e[14]=l,e[15]=i):i=e[15];let f;e[16]!==t?(f=t("common.deleteConnectionDialogs.cancel"),e[16]=t,e[17]=f):f=e[17];let r;e[18]!==f?(r=n.jsx(X,{children:f}),e[18]=f,e[19]=r):r=e[19];let g;e[20]!==t?(g=t("common.deleteConnectionDialogs.delete"),e[20]=t,e[21]=g):g=e[21];let x;e[22]!==d||e[23]!==g?(x=n.jsx(Z,{onClick:d,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:g}),e[22]=d,e[23]=g,e[24]=x):x=e[24];let h;e[25]!==r||e[26]!==x?(h=n.jsxs(ee,{children:[r,x]}),e[25]=r,e[26]=x,e[27]=h):h=e[27];let j;e[28]!==h||e[29]!==i?(j=n.jsxs(te,{children:[i,h]}),e[28]=h,e[29]=i,e[30]=j):j=e[30];let p;e[31]!==w||e[32]!==j||e[33]!==m?(p=n.jsx(ne,{open:w,onOpenChange:m,children:j}),e[31]=w,e[32]=j,e[33]=m,e[34]=p):p=e[34];const J=s.mode==="force-deleting";let N;e[35]!==a?(N=W=>{W||a()},e[35]=a,e[36]=N):N=e[36];let E;e[37]!==t?(E=t("common.deleteConnectionDialogs.forceDeleteTitle"),e[37]=t,e[38]=E):E=e[38];let y;e[39]!==E?(y=n.jsx(z,{children:E}),e[39]=E,e[40]=y):y=e[40];let O;e[41]!==t?(O=t("common.deleteConnectionDialogs.forceDeleteDescription"),e[41]=t,e[42]=O):O=e[42];const M=s.mode==="force-deleting"&&s.connection.title;let v;e[43]!==M?(v=n.jsx("span",{className:"font-medium text-foreground",children:M}),e[43]=M,e[44]=v):v=e[44];let S;e[45]!==t?(S=t("common.deleteConnectionDialogs.isUsedByAgents"),e[45]=t,e[46]=S):S=e[46];const P=s.mode==="force-deleting"&&s.agentNames;let T;e[47]!==P?(T=n.jsx("span",{className:"font-medium text-foreground",children:P}),e[47]=P,e[48]=T):T=e[48];let A;e[49]!==O||e[50]!==v||e[51]!==S||e[52]!==T?(A=n.jsxs("p",{children:[O," ",v," ",S," ",T,"."]}),e[49]=O,e[50]=v,e[51]=S,e[52]=T,e[53]=A):A=e[53];let _;e[54]!==t?(_=t("common.deleteConnectionDialogs.forceDeleteWarning"),e[54]=t,e[55]=_):_=e[55];let F;e[56]!==_?(F=n.jsx("p",{className:"mt-2",children:_}),e[56]=_,e[57]=F):F=e[57];let b;e[58]!==A||e[59]!==F?(b=n.jsx(G,{asChild:!0,children:n.jsxs("div",{children:[A,F]})}),e[58]=A,e[59]=F,e[60]=b):b=e[60];let I;e[61]!==y||e[62]!==b?(I=n.jsxs(V,{children:[y,b]}),e[61]=y,e[62]=b,e[63]=I):I=e[63];let L;e[64]!==t?(L=t("common.deleteConnectionDialogs.cancel"),e[64]=t,e[65]=L):L=e[65];let R;e[66]!==L?(R=n.jsx(X,{children:L}),e[66]=L,e[67]=R):R=e[67];let q;e[68]!==t?(q=t("common.deleteConnectionDialogs.deleteAnyway"),e[68]=t,e[69]=q):q=e[69];let U;e[70]!==c||e[71]!==q?(U=n.jsx(Z,{onClick:c,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:q}),e[70]=c,e[71]=q,e[72]=U):U=e[72];let K;e[73]!==R||e[74]!==U?(K=n.jsxs(ee,{children:[R,U]}),e[73]=R,e[74]=U,e[75]=K):K=e[75];let $;e[76]!==I||e[77]!==K?($=n.jsxs(te,{children:[I,K]}),e[76]=I,e[77]=K,e[78]=$):$=e[78];let k;e[79]!==J||e[80]!==N||e[81]!==$?(k=n.jsx(ne,{open:J,onOpenChange:N,children:$}),e[79]=J,e[80]=N,e[81]=$,e[82]=k):k=e[82];let Q;return e[83]!==p||e[84]!==k?(Q=n.jsxs(n.Fragment,{children:[p,k]}),e[83]=p,e[84]=k,e[85]=Q):Q=e[85],Q}function De({onSuccess:B}={}){const{org:e}=se(),s=ie(),a=de(),[d,c]=ce.useState({mode:"idle"}),t=()=>{s.invalidateQueries({predicate:o=>{const l=o.queryKey;return l[1]===e.id&&l[3]==="collection"&&l[4]==="CONNECTIONS"}})},w=o=>{re(o),s.invalidateQueries({predicate:l=>l.queryKey[1]===ae&&l.queryKey[3]===o})},m=o=>{t(),w(o),Y.success("Connection deleted successfully"),c({mode:"idle"}),B?.()};return{deleteState:d,requestDelete:o=>{c({mode:"deleting",connection:o})},cancelDelete:()=>{c({mode:"idle"})},confirmDelete:async()=>{if(d.mode!=="deleting")return;const o=d.connection;c({mode:"idle"});try{await a.call("COLLECTION_CONNECTIONS_DELETE",{id:o.id}),m(o.id)}catch(l){const i=l instanceof Error?l.message:String(l),f=i.replace(/^Error:\s*/,"");try{const r=JSON.parse(f);if(r.code==="CONNECTION_IN_USE"&&r.agentNames){c({mode:"force-deleting",connection:o,agentNames:r.agentNames.map(g=>`"${g}"`).join(", ")});return}}catch{}Y.error(`Failed to delete connection: ${i}`)}},confirmForceDelete:async()=>{if(d.mode!=="force-deleting")return;const o=d.connection.id;c({mode:"idle"});try{await a.call("COLLECTION_CONNECTIONS_DELETE",{id:o,force:!0}),m(o)}catch(l){const i=l instanceof Error?l.message:String(l);Y.error(`Failed to delete connection: ${i}`)}}}}export{ue as D,De as u};
|