decocms 4.454.1 → 4.455.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-3t4CitpU.js → AlertCircle-BOPAUEgU.js} +1 -1
- package/dist/client/assets/{AreaChart-B9ltWb3N.js → AreaChart-CJHdSsRl.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BbJmgkdx.js → ArrowLeft-DGlO1CKr.js} +1 -1
- package/dist/client/assets/{ArrowUp-DQk9lIXC.js → ArrowUp-Duh-8Vv0.js} +1 -1
- package/dist/client/assets/{Building02-FDWlk2dX.js → Building02-D_rXBsfQ.js} +1 -1
- package/dist/client/assets/{CartesianChart-BJJpA_Vw.js → CartesianChart-DIS9sPOp.js} +1 -1
- package/dist/client/assets/{Check-BhlN5Gfa.js → Check-CcPSzxsY.js} +1 -1
- package/dist/client/assets/{CheckCircle-DP_Yeb-b.js → CheckCircle-CxJ9MBI3.js} +1 -1
- package/dist/client/assets/{ChevronUp-BUjD5px7.js → ChevronUp-C9klasvw.js} +1 -1
- package/dist/client/assets/{Copy01-B7ecNUq1.js → Copy01-ByHdq7k3.js} +1 -1
- package/dist/client/assets/{CreditCard01-DylNWQDW.js → CreditCard01-D7Ll8vXp.js} +1 -1
- package/dist/client/assets/{DotsVertical-CMBMcjBX.js → DotsVertical-CXVrXTYw.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-DYl-NvRS.js → ErrorBarContext-D4SFBJLe.js} +1 -1
- package/dist/client/assets/{Image01-jyAhhinO.js → Image01-DAe5wd3u.js} +1 -1
- package/dist/client/assets/{Key01-DwEPbnXb.js → Key01-Dje7twgn.js} +1 -1
- package/dist/client/assets/{Line-98LUvvSk.js → Line-p8cNw9wz.js} +1 -1
- package/dist/client/assets/{Link01-D8H87QlU.js → Link01-BFa5_pnw.js} +1 -1
- package/dist/client/assets/{LinkBroken01-FGx4hlpz.js → LinkBroken01-BQ3rvf4O.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Chk3wQjH.js → LinkExternal01-ChFFafWR.js} +1 -1
- package/dist/client/assets/{Monitor01-C4DfOzWo.js → Monitor01-tvCvi4o_.js} +1 -1
- package/dist/client/assets/{Palette-92eAR3c0.js → Palette-BFtTwWPg.js} +1 -1
- package/dist/client/assets/{Plus-CLQei2e6.js → Plus-Dk5G0eGJ.js} +1 -1
- package/dist/client/assets/{SearchMd-B4g7zoIg.js → SearchMd-DJptVqPP.js} +1 -1
- package/dist/client/assets/{Sector-D4jvfeB8.js → Sector-CoYmht1l.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DJPwdB_I.js → ShoppingBag01-mUPmqGRd.js} +1 -1
- package/dist/client/assets/{Sun-D28dVpFO.js → Sun-Bl8Ky_if.js} +1 -1
- package/dist/client/assets/{Tool01-DyzplouF.js → Tool01-CGCC9pfF.js} +1 -1
- package/dist/client/assets/{Trash01-B2AvA9FK.js → Trash01-BA-bFjuS.js} +1 -1
- package/dist/client/assets/{Upload01-_iBVm55R.js → Upload01-C13aB89v.js} +1 -1
- package/dist/client/assets/{User01-DuKYzVz8.js → User01-B42bcRzQ.js} +1 -1
- package/dist/client/assets/{UserSquare-CI-KdVX2.js → UserSquare-B6-k4uk5.js} +1 -1
- package/dist/client/assets/{Users01-utuHNJ9R.js → Users01-BmXeKAri.js} +1 -1
- package/dist/client/assets/{X-BQXAAYgl.js → X-BdtW9stL.js} +1 -1
- package/dist/client/assets/{XAxis-OsjV83Ou.js → XAxis-G213xRid.js} +1 -1
- package/dist/client/assets/{XClose-KUaLXy6Q.js → XClose-Bsj_jKUE.js} +1 -1
- package/dist/client/assets/{ZoomOut-B0FMI__D.js → ZoomOut-BQf_lYpX.js} +1 -1
- package/dist/client/assets/{access-gate-DHNHQ9zE.js → access-gate-BtTwTt-9.js} +1 -1
- package/dist/client/assets/{add-connection-dialog--aaGSX_P.js → add-connection-dialog-CwnC8yt-.js} +1 -1
- package/dist/client/assets/{agent-analytics-HWaoA2oR.js → agent-analytics-CPj4bxgs.js} +1 -1
- package/dist/client/assets/agent-app-CjNO2lXq.js +1 -0
- package/dist/client/assets/{agent-assets-Cr-W811X.js → agent-assets-D5PkhLx3.js} +1 -1
- package/dist/client/assets/{agent-automation-l2cgkKU7.js → agent-automation-Cd6QYcZt.js} +1 -1
- package/dist/client/assets/{agent-automations-CHAZrKqa.js → agent-automations-WUChl97S.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-CWEmNdK2.js → agent-connect-sources-BTKe88uu.js} +1 -1
- package/dist/client/assets/agent-deck-BBsYONOP.js +1 -0
- package/dist/client/assets/{agent-e2e-NYmfDbZa.js → agent-e2e-D92Tz-G3.js} +1 -1
- package/dist/client/assets/{agent-experiments-CLCcfrbN.js → agent-experiments-B5NLiDa9.js} +1 -1
- package/dist/client/assets/{agent-file-BIEk1dmU.js → agent-file-BlaR5see.js} +1 -1
- package/dist/client/assets/{agent-hosting-CO_rhibd.js → agent-hosting-CoW01d6P.js} +1 -1
- package/dist/client/assets/{agent-icon-1OqzsUAE.js → agent-icon-QobcC4y1.js} +1 -1
- package/dist/client/assets/agent-library-DJDlIAqS.js +1 -0
- package/dist/client/assets/agent-library-file-CZjl7KSc.js +1 -0
- package/dist/client/assets/{agent-monitor-BmsHZAPv.js → agent-monitor-B-qOXS0c.js} +1 -1
- package/dist/client/assets/{agent-overview-Ct3DWuXE.js → agent-overview-CLWCQeaZ.js} +1 -1
- package/dist/client/assets/agent-settings-DhGEY9it.js +1 -0
- package/dist/client/assets/{agent-site-editor-CRZzqyQE.js → agent-site-editor-DFNItXi0.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-D1HLX1NJ.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-DSBHbBbR.js → agent-site-editor-content-DeSoO3Vu.js} +3 -3
- package/dist/client/assets/{agent-site-editor-preview-BxrT5UM7.js → agent-site-editor-preview-BQKa6vcQ.js} +3 -3
- package/dist/client/assets/agent-view-YbbJ0c-k.js +1 -0
- package/dist/client/assets/{agent-view-guard-mRjTZUSW.js → agent-view-guard-BggSlJ4I.js} +1 -1
- package/dist/client/assets/{agents-list-BK_MtQHd.js → agents-list-Ckh7S6i4.js} +1 -1
- package/dist/client/assets/{ai-providers-wWFphB_9.js → ai-providers-KNbVRi9R.js} +2 -2
- package/dist/client/assets/{alert-BDcbHG2K.js → alert-BZ6uRdL8.js} +1 -1
- package/dist/client/assets/{alert-dialog-BfxfbeRo.js → alert-dialog-13GPwGkk.js} +1 -1
- package/dist/client/assets/{analytics-sections-CCrJWAzF.js → analytics-sections-C4iGKBOV.js} +1 -1
- package/dist/client/assets/{api-keys-44_etvo0.js → api-keys-Btl9HmTY.js} +1 -1
- package/dist/client/assets/api-keys-C1C00ELj.js +1 -0
- package/dist/client/assets/app-editor-Cr-wsjho.js +1 -0
- package/dist/client/assets/{asset-utils-zoNZYT_Y.js → asset-utils-B4wnf4gp.js} +1 -1
- package/dist/client/assets/{auth-Be85fS22.js → auth-BMIwdKU8.js} +1 -1
- package/dist/client/assets/{auth-catchall-CTdxuzGz.js → auth-catchall-CsvXshlN.js} +1 -1
- package/dist/client/assets/{auth-entry-9WVbDTgn.js → auth-entry-BuNH69Nv.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Bd3Wv1Ul.js → auth-split-layout-rkoJUdAV.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DZ9TfDha.js → authenticate-and-persist-oauth-DWogyy0B.js} +1 -1
- package/dist/client/assets/{automation-list-row-BbKXgF-R.js → automation-list-row-db5LJ5pV.js} +1 -1
- package/dist/client/assets/{automation-runs-YorECl9g.js → automation-runs-_74LLZTB.js} +1 -1
- package/dist/client/assets/automations-qyXzvoeZ.js +1 -0
- package/dist/client/assets/{autosend-CRAaDm47.js → autosend-B5Obavo-.js} +1 -1
- package/dist/client/assets/{avatar-DPiZM9JI.js → avatar-Bpp_lL_f.js} +1 -1
- package/dist/client/assets/{badge-C70X12A9.js → badge-DTNkOzY0.js} +1 -1
- package/dist/client/assets/{block-document-Bb13K9Xx.js → block-document-BLOu51_T.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-tiBiDTnV.js → blocks-preview-workspace-context-BmjkHogK.js} +1 -1
- package/dist/client/assets/{blog-schema-CrmLbu-L.js → blog-schema-B4_qQgjF.js} +1 -1
- package/dist/client/assets/{buckets-BakoSY5F.js → buckets-CCNSYAgt.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BdY8sMUa.js → build-improve-prompt-doc-oJt1CVIT.js} +1 -1
- package/dist/client/assets/{calendar-Xr0_X-dJ.js → calendar-BRUBvVES.js} +1 -1
- package/dist/client/assets/{capability-load-error-DEOoZYRD.js → capability-load-error-th8zEGOp.js} +1 -1
- package/dist/client/assets/{category-editor-CUD3lDBR.js → category-editor-CRqB5ots.js} +1 -1
- package/dist/client/assets/{chart-CdkOOcwe.js → chart-DBFqaeAD.js} +1 -1
- package/dist/client/assets/{chat-context-SQR_HnrV.js → chat-context-BHWxNMFT.js} +6 -6
- package/dist/client/assets/{chat-draft-ClSxrs12.js → chat-draft-SnGEiSWm.js} +1 -1
- package/dist/client/assets/{checkbox-dRd9g2H5.js → checkbox-DuccoC4e.js} +1 -1
- package/dist/client/assets/{choose-editor-YVWzNcML.js → choose-editor-Blu_E7S8.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-CiHmryra.js → claim-phase-copy-J9IiJiw_.js} +1 -1
- package/dist/client/assets/{cli-auth-success-zKCh9sGG.js → cli-auth-success-g5vIj6jD.js} +1 -1
- package/dist/client/assets/{client-icons-wzblqipX.js → client-icons-ByIvBqps.js} +1 -1
- package/dist/client/assets/{collapsible-CgYSDpXy.js → collapsible-qdaAxaaw.js} +1 -1
- package/dist/client/assets/{collection-detail-DImjCLH0.js → collection-detail-CRpVPceB.js} +1 -1
- package/dist/client/assets/{collection-display-button-ySPfNWKF.js → collection-display-button-CAE4H1Z5.js} +1 -1
- package/dist/client/assets/{collection-search-Daq9kKuN.js → collection-search-BG7vK4NS.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CP9uIvN_.js → collection-table-wrapper-C-F_T5Eb.js} +1 -1
- package/dist/client/assets/{collection-tabs-DtjUs1A5.js → collection-tabs-DrZNeSEC.js} +1 -1
- package/dist/client/assets/{column-rules-Bo9Qbi1T.js → column-rules-C1VVvSzv.js} +1 -1
- package/dist/client/assets/{combobox-Ccd0xh39.js → combobox-B0tRCuGZ.js} +1 -1
- package/dist/client/assets/{command-a4IN63yc.js → command-D4xFqyr9.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BS-i6Wh4.js → companion-mcps-section-Cz5vCHft.js} +1 -1
- package/dist/client/assets/{config-BQQbHVQ7.js → config-DPczwNxh.js} +1 -1
- package/dist/client/assets/{connect-layout-BOuFTHKB.js → connect-layout-B5AnMnce.js} +1 -1
- package/dist/client/assets/{connect-vvgWKwgp.js → connect-pk9RQf7E.js} +1 -1
- package/dist/client/assets/{connection-CAG14zGZ.js → connection-BBVDOaSM.js} +1 -1
- package/dist/client/assets/{connection-card-ACWoimrM.js → connection-card-D1TMmLIT.js} +1 -1
- package/dist/client/assets/{connection-detail-B8Xtv2Ww.js → connection-detail-DQ776dHS.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BxVe0XvV.js → connection-form-helpers-CFQwZ1sv.js} +1 -1
- package/dist/client/assets/{connections-BX7Kd5-m.js → connections-D5_-1i7h.js} +1 -1
- package/dist/client/assets/{context-DuwSYB-v.js → context-BzZmRn5A.js} +1 -1
- package/dist/client/assets/{context-menu-Db5SVKVy.js → context-menu-Dt0_Wi5C.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-zyq81keC.js → create-organization-dialog-SVvYPMqI.js} +1 -1
- package/dist/client/assets/{daily-pulse-BLOj9QcX.js → daily-pulse-Dy2ScJNC.js} +1 -1
- package/dist/client/assets/{decopilot-DboBD55M.js → decopilot-Bh5nOuj8.js} +1 -1
- package/dist/client/assets/{device-hint-Czp4quXE.js → device-hint-BWrI1ZAV.js} +1 -1
- package/dist/client/assets/{dialog--2DE59f4.js → dialog-CwJ0Tacd.js} +1 -1
- package/dist/client/assets/{discover-Bh29hObV.js → discover-BN5fZmxX.js} +1 -1
- package/dist/client/assets/{domain-settings-ComV0r-h.js → domain-settings-C0ggYD-b.js} +1 -1
- package/dist/client/assets/{download-app-dialog-C3Ji56be.js → download-app-dialog-BlTQi4L1.js} +1 -1
- package/dist/client/assets/{drawer-CmCYRv71.js → drawer-LGekY388.js} +1 -1
- package/dist/client/assets/{editor-Q8fTwJVK.js → editor-DIJFF-Rn.js} +3 -3
- package/dist/client/assets/{empty-state-iV41QFUB.js → empty-state-Db66egMr.js} +1 -1
- package/dist/client/assets/{empty-state-Ba4Lmj53.js → empty-state-DdDKihxt.js} +1 -1
- package/dist/client/assets/{extract-connection-data-zlkqkzoy.js → extract-connection-data-BZKTCWVm.js} +1 -1
- package/dist/client/assets/{feature-gate-Bc3gv9R6.js → feature-gate-DIpT85T7.js} +1 -1
- package/dist/client/assets/{feature-paywall-COlGAU5V.js → feature-paywall--RganMza.js} +1 -1
- package/dist/client/assets/{file-explorer-D0NYENQh.js → file-explorer-B0caqImY.js} +1 -1
- package/dist/client/assets/{file-preview-BK6HWgQz.js → file-preview-BVUwkvqy.js} +1 -1
- package/dist/client/assets/{file-share-button-BSE3y3HH.js → file-share-button-Dfx-yCi-.js} +1 -1
- package/dist/client/assets/{file-type-icon-Hh_qpvql.js → file-type-icon-CYHSeMg9.js} +1 -1
- package/dist/client/assets/flat-project-CXofx1Tp.js +1 -0
- package/dist/client/assets/{folder-icon-CKdtOEi8.js → folder-icon-Bz05bjxQ.js} +1 -1
- package/dist/client/assets/{form-es3qsNvx.js → form-DXEENu_8.js} +1 -1
- package/dist/client/assets/{gateway-client-BI4FJ_tT.js → gateway-client-DafKkh5Q.js} +1 -1
- package/dist/client/assets/{general-B-jSci0b.js → general-P5nYRAWt.js} +1 -1
- package/dist/client/assets/{home-DQoJZrnn.js → home-C9qFKdi5.js} +1 -1
- package/dist/client/assets/{icon-button-BRiA9kiV.js → icon-button-c-SlONOU.js} +1 -1
- package/dist/client/assets/{index-0zdxHEgU.js → index-0glLJTM3.js} +1 -1
- package/dist/client/assets/{index-D7hYEfbN.js → index-BOGZM7Pw.js} +3 -3
- package/dist/client/assets/{index-DtMNfpk7.js → index-CaP5SDB2.js} +1 -1
- package/dist/client/assets/{index-CYlLocPz.js → index-Ccz5AaI_.js} +1 -1
- package/dist/client/assets/{index-DjtXLy0g.js → index-D9bgHbh-.js} +1 -1
- package/dist/client/assets/{index-CFDmgtf-.js → index-DGWe6sla.js} +1 -1
- package/dist/client/assets/{index-BabIEbYv.js → index-DK7oXPIL.js} +1 -1
- package/dist/client/assets/{index-BsC6xORW.js → index-Dl3JXElC.js} +1 -1
- package/dist/client/assets/{index-BX4WRpMk.js → index-DlDzsxeJ.js} +1 -1
- package/dist/client/assets/{index-C69CS_86.js → index-DuKSozhT.js} +1 -1
- package/dist/client/assets/{index-DsvD9a73.js → index-KD5FDUeP.js} +1 -1
- package/dist/client/assets/{index-DC6klush.js → index-ZDbB-PVr.js} +1 -1
- package/dist/client/assets/{index-B8VGzyyA.js → index-ehY3MQSN.js} +3 -3
- package/dist/client/assets/{index-nwj1WYdQ.js → index-mRG9os_M.js} +1 -1
- package/dist/client/assets/{index-redirect-DsGrdHfc.js → index-redirect-zukIYzlP.js} +1 -1
- package/dist/client/assets/{index-Bie3Yt7i.js → index-txkdKzZ6.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-rN5E5eR_.js → infiniteQueryObserver-CHVbl4Al.js} +1 -1
- package/dist/client/assets/{infra-billing-STGTbKqw.js → infra-billing-D94tvu0v.js} +1 -1
- package/dist/client/assets/{input-B5SM5NFH.js → input-C0ZWiiGy.js} +1 -1
- package/dist/client/assets/{input-BhyogJV0.js → input-Cbyu0LGy.js} +1 -1
- package/dist/client/assets/{input-C3UtPyeS.js → input-qBVmxar0.js} +3 -3
- package/dist/client/assets/{integration-icon-51EB-LjE.js → integration-icon-DUuPtqFs.js} +1 -1
- package/dist/client/assets/{label-BkKmAPrZ.js → label-CKukDnnz.js} +1 -1
- package/dist/client/assets/{layout-DIdrXHfY.js → layout-DZr1Z4Vi.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CuL-w8Ck.js → legacy-agents-deep-O_a0ihqp.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-CIckQwOA.js → legacy-main-redirect-B6sO18wU.js} +1 -1
- package/dist/client/assets/library-DOnOZswk.js +1 -0
- package/dist/client/assets/{library-tab-ayplxw28.js → library-tab-CGsiOX6E.js} +1 -1
- package/dist/client/assets/{login-Dh7dGGrt.js → login-hdkcuXfq.js} +1 -1
- package/dist/client/assets/{markdown-DI9weIuO.js → markdown-DNk_PyOf.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-B-h9M4vf.js → mcp-app-renderer-CJ5u3TPG.js} +1 -1
- package/dist/client/assets/{mcp-oauth-q_WDhaFd.js → mcp-oauth-cSH4PfZY.js} +1 -1
- package/dist/client/assets/{members-Duvbhxmd.js → members-C-_zRkLX.js} +1 -1
- package/dist/client/assets/{memory-B3Yr64no.js → memory-DLRzHb1w.js} +2 -2
- package/dist/client/assets/{mini-report-page-BYBUcf9i.js → mini-report-page-CFzUUmyT.js} +1 -1
- package/dist/client/assets/{mock-board-DkM9WLsL.js → mock-board-Si0mPE9y.js} +1 -1
- package/dist/client/assets/{monaco-editor-BlkFUb0T.js → monaco-editor-C4uDUO_q.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-D91cPMXx.js → monitoring-stats-row-CllZiW9E.js} +1 -1
- package/dist/client/assets/{multi-select-CljFfUTQ.js → multi-select-DiHVOPXR.js} +1 -1
- package/dist/client/assets/{mustache-Bit9MGJY.js → mustache-C7f92o5k.js} +1 -1
- package/dist/client/assets/{new-project-dialog-i2AjdXpL.js → new-project-dialog-CiCMTA1C.js} +1 -1
- package/dist/client/assets/{oauth-callback-Manl7zcf.js → oauth-callback-Cb4S9fwE.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BuFa1JC9.js → oauth-callback-ai-provider-CD_A5mvP.js} +1 -1
- package/dist/client/assets/{onboarding-Cw4aLFQT.js → onboarding-B2wyTbOl.js} +1 -1
- package/dist/client/assets/{openai-conversation-BiyOmfLa.js → openai-conversation-WSjKAhvH.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-C5dOi8KI.js → optimistic-project-sidebar-views-BBFtzDV4.js} +1 -1
- package/dist/client/assets/{org-file-open-context-CjL3Ry7C.js → org-file-open-context--_UQSpdl.js} +1 -1
- package/dist/client/assets/{organization-choice-CcPvavKF.js → organization-choice-Bs4XFXgS.js} +1 -1
- package/dist/client/assets/{orgs-5BU6BjBI.js → orgs-DzdQslwf.js} +1 -1
- package/dist/client/assets/{page-seo-form-BImxCgsk.js → page-seo-form-vON-l1GZ.js} +1 -1
- package/dist/client/assets/{pair-DULI5So-.js → pair-IorbWgZn.js} +1 -1
- package/dist/client/assets/{plan-ladder-Ct95x7_d.js → plan-ladder-DSodyL3Q.js} +1 -1
- package/dist/client/assets/{popover-Ddsbw8vr.js → popover-DvKxqM1r.js} +1 -1
- package/dist/client/assets/{post-calendar-Gh6FGDL8.js → post-calendar-DiEfiKrj.js} +1 -1
- package/dist/client/assets/{post-editor-CcE1K4mb.js → post-editor-HV3DNHNH.js} +1 -1
- package/dist/client/assets/{preview-content-CsmLbvef.js → preview-content-Bd42BahA.js} +1 -1
- package/dist/client/assets/{preview-dialog-Db2IsUqO.js → preview-dialog-DBXVi9mo.js} +1 -1
- package/dist/client/assets/{profile-gQCg01Pg.js → profile-C62VIFSL.js} +1 -1
- package/dist/client/assets/{project-app-view-D5z0m56j.js → project-app-view-DYaaNrnC.js} +1 -1
- package/dist/client/assets/{project-feed-CectffXQ.js → project-feed-DDiBGrsP.js} +1 -1
- package/dist/client/assets/{project-icon-zUFSPGzx.js → project-icon-DQrOXeEW.js} +1 -1
- package/dist/client/assets/project-reports-HuiRnlkO.js +1 -0
- package/dist/client/assets/project-tasks-Ck5F7vye.js +1 -0
- package/dist/client/assets/{projects-09qVLtvI.js → projects-C-62vsjh.js} +1 -1
- package/dist/client/assets/{projects-empty-state-DSuG10IT.js → projects-empty-state-DllkKglW.js} +1 -1
- package/dist/client/assets/{prompts-BlWGK9gm.js → prompts-53mGvQlZ.js} +1 -1
- package/dist/client/assets/record-editor-BAdOwM42.js +1 -0
- package/dist/client/assets/{redirect-editor-Dy4B9zEa.js → redirect-editor-C2CflIXw.js} +1 -1
- package/dist/client/assets/{reports-DwZ09kdh.js → reports-DQcmX2XK.js} +1 -1
- package/dist/client/assets/reports-Dyr-R6yJ.js +1 -0
- package/dist/client/assets/{reports-onboarding-BbuiybIk.js → reports-onboarding-DRfSptAM.js} +1 -1
- package/dist/client/assets/{reports-tab-CSSCOCZm.js → reports-tab-BGRnmmWF.js} +2 -2
- package/dist/client/assets/{repositories-DsV9QIrS.js → repositories-ltvP9f3v.js} +1 -1
- package/dist/client/assets/{repository-binding-BPtbugRj.js → repository-binding-CEDkA6og.js} +1 -1
- package/dist/client/assets/{repository-import-picker-DY8NkFcl.js → repository-import-picker-BT060hhl.js} +1 -1
- package/dist/client/assets/{repository-picker-Bu_60yv3.js → repository-picker-Bowb7b9f.js} +1 -1
- package/dist/client/assets/{require-capability-BO2WrDZB.js → require-capability-DN9BJlNM.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BgvVX7TS.js → required-auth-layout-CKgEUo-z.js} +1 -1
- package/dist/client/assets/{reset-password-BoH3BEyI.js → reset-password-B6iTpX4u.js} +1 -1
- package/dist/client/assets/{resizable-DMRcTvG9.js → resizable-Cd8jDRB7.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-CXAXH1c6.js → resolve-tab-icon-X0M-w-vv.js} +1 -1
- package/dist/client/assets/{review-settings-p3dyFLfh.js → review-settings-CsnvQ-Qq.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-CKnN__KM.js → rich-text-link-control-ClsuTwdo.js} +1 -1
- package/dist/client/assets/{roles-DO1mdKqZ.js → roles-CU8q7gVb.js} +1 -1
- package/dist/client/assets/{route-ChNMAp77.js → route-CIn0WnXQ.js} +1 -1
- package/dist/client/assets/route-NLnkR9WP.js +1 -0
- package/dist/client/assets/route-qm6cYbsf.js +1 -0
- package/dist/client/assets/{runnable-block-editor-BT8tgJo5.js → runnable-block-editor-2ItVAsl7.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-BJunzywm.js → sandbox-lifecycle-context-C0vkuH66.js} +1 -1
- package/dist/client/assets/{schema-gvXoFVGC.js → schema-W3hqtN1B.js} +1 -1
- package/dist/client/assets/{scroll-area-BGXFjpgk.js → scroll-area-BN7R6f0c.js} +1 -1
- package/dist/client/assets/{search-input-C9kf2QzG.js → search-input-dP8TWy_f.js} +1 -1
- package/dist/client/assets/{search-toggle-DxL1CEhR.js → search-toggle-BY33vUyT.js} +1 -1
- package/dist/client/assets/{secret-picker-CXDBfcj0.js → secret-picker-Bw0HhGwk.js} +1 -1
- package/dist/client/assets/{secrets-Bcm3gb-7.js → secrets-D3WU-wHx.js} +1 -1
- package/dist/client/assets/{sections-editor-7SLVjemW.js → sections-editor-Bnb_Ii_2.js} +1 -1
- package/dist/client/assets/{select-Bo385QnQ.js → select-CGC5E9nf.js} +1 -1
- package/dist/client/assets/{select-model-BtUoVLeN.js → select-model-B24PK9T9.js} +1 -1
- package/dist/client/assets/{seo-editor-Bws3I75q.js → seo-editor-C0eExFGM.js} +1 -1
- package/dist/client/assets/{separator-Bpa9Zb6K.js → separator-CJCi7EK2.js} +1 -1
- package/dist/client/assets/settings-tab-6YGWJaPP.js +5 -0
- package/dist/client/assets/{sheet-Bp0OaYM9.js → sheet-DOIzAtMq.js} +1 -1
- package/dist/client/assets/{shell-layout-DMqLVaPa.js → shell-layout-B9OaioSj.js} +1 -1
- package/dist/client/assets/{skills-CHvIydZj.js → skills-DdHXbE4c.js} +1 -1
- package/dist/client/assets/{sso-DzY1sSiB.js → sso-WAQdj9Pk.js} +1 -1
- package/dist/client/assets/{suggestion-jBsEBvox.js → suggestion-CotdwSyy.js} +2 -2
- package/dist/client/assets/{switch-O2yDEU3w.js → switch-Ctdc8it1.js} +1 -1
- package/dist/client/assets/{synced-repos-5PjWHzPH.js → synced-repos-DFq2CK-H.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph--RZwkrwS.js → tab-icon-glyph-CXhMb9aF.js} +1 -1
- package/dist/client/assets/{table-cs-obaRn.js → table-BCWfTyhH.js} +1 -1
- package/dist/client/assets/{tabs-PK9QS4Is.js → tabs-BCc9oqWy.js} +1 -1
- package/dist/client/assets/{task-board-B1uWZU9K.js → task-board-Dh6sWb9t.js} +1 -1
- package/dist/client/assets/{task-route-DRf0NxDf.js → task-route-BGcHuycG.js} +1 -1
- package/dist/client/assets/{task-status-UjMHpR3_.js → task-status-CjAgmdGY.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-DG49CdbS.js → taskboard-analytics-CgboMqfv.js} +1 -1
- package/dist/client/assets/{tasks-B5AEZlSg.js → tasks-CQrn-rBP.js} +1 -1
- package/dist/client/assets/tasks-L9jj-kWQ.js +1 -0
- package/dist/client/assets/{textarea-C8e48cUD.js → textarea-e3h0PKfc.js} +1 -1
- package/dist/client/assets/{thread-analytics-CfDkMr69.js → thread-analytics-u-mhBpUO.js} +1 -1
- package/dist/client/assets/{thread-button-RXmpO_s6.js → thread-button-D5H005fQ.js} +1 -1
- package/dist/client/assets/{thread-intent-DD3seycr.js → thread-intent-CNOpHUCE.js} +1 -1
- package/dist/client/assets/{thread-route-D5UsJN7V.js → thread-route-DU2TTrlu.js} +1 -1
- package/dist/client/assets/{thread-route-BurLlqRF.js → thread-route-esGiDSRu.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-CYr9C8k-.js → thread-sheet-body-Bn55RhIb.js} +1 -1
- package/dist/client/assets/{toggle-group-CWajsWIH.js → toggle-group-BUS82Kqf.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-ClIJFPkR.js → toolbar-icon-button-B8tRovqj.js} +1 -1
- package/dist/client/assets/{tooltip-Ch7JwSjZ.js → tooltip-DoWVDYxv.js} +1 -1
- package/dist/client/assets/{track-yFV_-KUI.js → track-slrdEZ2N.js} +1 -1
- package/dist/client/assets/{types-DCK-IvKM.js → types-BlCCVKMl.js} +3 -3
- package/dist/client/assets/{usage-stats-DHCINwxo.js → usage-stats-ELYwp3GN.js} +1 -1
- package/dist/client/assets/{use-ai-providers-shWbOxLc.js → use-ai-providers-BuwFLwdC.js} +1 -1
- package/dist/client/assets/{use-automations-BuTfAhMt.js → use-automations-B8HKsWEy.js} +1 -1
- package/dist/client/assets/{use-autosave-BPE7QfwG.js → use-autosave-77sC71ka.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-CNWV4oOZ.js → use-chat-layout-state-Cd1SDWUO.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CBfGh-8T.js → use-clock-tick-DkYE6iX2.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DBuhvmdP.js → use-connect-companion-sjR8VGIZ.js} +1 -1
- package/dist/client/assets/{use-connection-Roi-SyxA.js → use-connection-C4j2pJbz.js} +1 -1
- package/dist/client/assets/{use-copy-DNeNHO02.js → use-copy-BiyQhtNG.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-ylON-lmG.js → use-create-virtual-mcp-C0a_KTOz.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale--kApxv3j.js → use-date-fns-locale-dFt0Hwsj.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BGrGYaC5.js → use-debounced-autosave-D58XDw_5.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DtOEJwy7.js → use-debounced-value-C1TKx6na.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CxB_Tg6p.js → use-deco-credits--by3KJXE.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Dz93drkG.js → use-decopilot-events-DL6Ppxgb.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BHS_Ab_3.js → use-delete-connection-Cc8dNIWp.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-xqgTl_RK.js → use-deployment-admin-D0_O_QSr.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-D8zoxDMW.js → use-fast-preview-draft-url-KJgu2gHZ.js} +1 -1
- package/dist/client/assets/{use-file-configs-BHKDkTjC.js → use-file-configs-j21JL3yE.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CIbeXSaG.js → use-infinite-scroll-BAQqTty_.js} +1 -1
- package/dist/client/assets/{use-join-requests-Cs8YUxtJ.js → use-join-requests-B2449AYt.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-B2ztRrej.js → use-main-panel-tabs-NhZJRbOq.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BtDthgG6.js → use-mcp-auth-status-CG-b2BD1.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Dv0wmo61.js → use-mcp-client-9jF2B0Tz.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DaqWVfi5.js → use-mcp-prompts-DNAsQeJA.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DjBYc1XK.js → use-mcp-tools-Dbm0kb0W.js} +1 -1
- package/dist/client/assets/{use-members-CBbGro39.js → use-members-CmQfPBAn.js} +1 -1
- package/dist/client/assets/{use-mobile-DrPHToxA.js → use-mobile-9GiVme_1.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-CSgL519X.js +1 -0
- package/dist/client/assets/use-new-blocks-editor-CQ_89Cdt.js +1 -0
- package/dist/client/assets/{use-open-billing-url-Bk3SlqL_.js → use-open-billing-url-CIF0WByS.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CwT9KERJ.js → use-org-auth-client-BBAyh5Tz.js} +1 -1
- package/dist/client/assets/{use-org-fs-BONY9uyR.js → use-org-fs-DF_BlZtj.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-W4ado92l.js → use-org-repo-syncs-kX31P2gW.js} +1 -1
- package/dist/client/assets/{use-org-sso-B7-QiCKC.js → use-org-sso-BmivjhbI.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DGag2mZt.js → use-organization-roles-DEPf_2N_.js} +1 -1
- package/dist/client/assets/{use-organization-settings-C3-_kI_g.js → use-organization-settings-BgEtBsl7.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-Ck4N-ZB8.js → use-panel-navigate-4MoLzTpw.js} +1 -1
- package/dist/client/assets/{use-project-scope-Dy6ai4MQ.js → use-project-scope-CUYDg9gO.js} +1 -1
- package/dist/client/assets/{use-releases-_59HzI08.js → use-releases-Dgq67fk3.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BMuHEtbE.js → use-reports-diagnostic-D9eBWCCe.js} +1 -1
- package/dist/client/assets/{use-secrets-B6JGnS88.js → use-secrets-D-qkpxrJ.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DJojO_0E.js → use-section-preview-base-LT3afhUQ.js} +1 -1
- package/dist/client/assets/{use-session-runtime-DdeuwCmv.js → use-session-runtime-C1jT9-WF.js} +1 -1
- package/dist/client/assets/{use-tags-WETmD8h-.js → use-tags-D0iZ2cgD.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BjPzwnMF.js → use-task-board-analytics-B0Mv4i0Z.js} +1 -1
- package/dist/client/assets/{use-task-board-events-UvXF0OvU.js → use-task-board-events-Q5BqAnUD.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DQimkwOj.js → use-task-metadata-B9tqJ9GP.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-DdFSZ4lk.js → use-thread-analytics-D5tK9O4P.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-ByokR1-M.js → use-thread-outputs-CDQWo15F.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-pxyjNhep.js +1 -0
- package/dist/client/assets/{useQueries-B78AFarR.js → useQueries-DvMDA4qD.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Cf0qcKEf.js +1 -0
- package/dist/client/assets/{users-DBjWYDrd.js → users-BE1CJVdF.js} +1 -1
- package/dist/client/assets/{utils-rWt92hWs.js → utils-CZW3O45l.js} +1 -1
- package/dist/client/assets/{variant-calendar-7i4pMUsf.js → variant-calendar-C_oSHjpD.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-BPuvqb9t.js → variant-matcher-override-B9Dx0Ujt.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Chs9e6xz.js → view-mode-toggle-BjrOeE_u.js} +1 -1
- package/dist/client/assets/{virtual-mcp-Dd7G1yTs.js → virtual-mcp-DkCjKqhT.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-CFW3XJJ3.js +0 -1
- package/dist/client/assets/agent-deck-DIqTNfuK.js +0 -1
- package/dist/client/assets/agent-library-CmW5qoRR.js +0 -1
- package/dist/client/assets/agent-library-file-BQ1asGOw.js +0 -1
- package/dist/client/assets/agent-settings-5O8PNLg6.js +0 -1
- package/dist/client/assets/agent-site-editor-code-DuPdAn6O.js +0 -2
- package/dist/client/assets/agent-view-DmLqbwZt.js +0 -1
- package/dist/client/assets/api-keys-UL1ho-y-.js +0 -1
- package/dist/client/assets/app-editor-BzUJsQbn.js +0 -1
- package/dist/client/assets/automations-CT6RAEzt.js +0 -1
- package/dist/client/assets/flat-project-BHnqWyb1.js +0 -1
- package/dist/client/assets/library-omm_OeKO.js +0 -1
- package/dist/client/assets/project-reports-DHC_HSC0.js +0 -1
- package/dist/client/assets/project-tasks-DzL0VTL5.js +0 -1
- package/dist/client/assets/record-editor-kiS_ZZYd.js +0 -1
- package/dist/client/assets/reports-DqySdKN5.js +0 -1
- package/dist/client/assets/route-6cBqBEib.js +0 -1
- package/dist/client/assets/route-CkWpASRI.js +0 -1
- package/dist/client/assets/settings-tab-CrMl0HQX.js +0 -5
- package/dist/client/assets/tasks-B8F8Dqa0.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-B6Jnpp7k.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-BQYMR1qS.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CApTsxJ0.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery--aIXJiP3.js +0 -1
package/dist/client/assets/{companion-mcps-section-BS-i6Wh4.js → companion-mcps-section-Cz5vCHft.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as _,r as T,l as Q,j as s,Q as Y,E as Z,b as U,a as ee,z as te,B as ne}from"./index-
|
|
1
|
+
import{c as _,r as T,l as Q,j as s,Q as Y,E as Z,b as U,a as ee,z as te,B as ne}from"./index-BOGZM7Pw.js";import{n as se}from"./site-url-en5df9c-.js";import{u as oe}from"./use-mcp-client-9jF2B0Tz.js";import{u as re,a as le,C as ie,b as ae}from"./use-connect-companion-sjR8VGIZ.js";function ce(t){const e=_.c(14),{children:n,className:o,wrapperClassName:r}=t,[d,c]=T.useState(!0);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=u=>{if(!u)return;const y=()=>{const j=u.scrollHeight-u.scrollTop-u.clientHeight<8;c(j)};y(),u.addEventListener("scroll",y,{passive:!0});const b=new ResizeObserver(y);b.observe(u);for(const j of Array.from(u.children))b.observe(j);return()=>{u.removeEventListener("scroll",y),b.disconnect()}},e[0]=f):f=e[0];const p=f;let l;e[1]!==r?(l=Q("relative",r),e[1]=r,e[2]=l):l=e[2];let i;e[3]!==n||e[4]!==o?(i=s.jsx("div",{ref:p,className:o,children:n}),e[3]=n,e[4]=o,e[5]=i):i=e[5];const a=d?"opacity-0":"opacity-100";let x;e[6]!==a?(x=Q("pointer-events-none absolute inset-x-0 -bottom-px h-[72px]","bg-gradient-to-t from-sidebar from-[6px] to-transparent","backdrop-blur-[1px] [mask-image:linear-gradient(to_top,black_6px,transparent)]","transition-opacity duration-200",a),e[6]=a,e[7]=x):x=e[7];let m;e[8]!==x?(m=s.jsx("div",{"aria-hidden":!0,className:x}),e[8]=x,e[9]=m):m=e[9];let g;return e[10]!==l||e[11]!==i||e[12]!==m?(g=s.jsxs("div",{className:l,children:[i,m]}),e[10]=l,e[11]=i,e[12]=m,e[13]=g):g=e[13],g}const H="flex min-h-0 flex-1 flex-col gap-6 md:grid md:flex-none md:gap-6";function q(){const t=_.c(4),e=U();let n;t[0]!==e?(n=e("routes.reportsOnboarding.companionSection.title"),t[0]=e,t[1]=n):n=t[1];let o;return t[2]!==n?(o=s.jsx("h1",{className:"text-lg font-medium leading-6 text-foreground lg:text-xl lg:leading-7",children:n}),t[2]=n,t[3]=o):o=t[3],o}function de(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-col gap-4",children:[0,1,2,3].map(me)}),t[0]=e):e=t[0],e}function me(t){return s.jsx(ae,{},t)}function fe(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:H,children:[s.jsx(q,{}),s.jsx(de,{})]}),t[0]=e):e=t[0],e}function ue(t){const e=_.c(18),{onRetry:n}=t,o=U();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(q,{}),e[0]=r):r=e[0];let d;e[1]!==o?(d=o("routes.reportsOnboarding.companionSection.loadError"),e[1]=o,e[2]=d):d=e[2];let c;e[3]!==d?(c=s.jsx("p",{className:"text-sm text-foreground",children:d}),e[3]=d,e[4]=c):c=e[4];let f;e[5]!==o?(f=o("routes.reportsOnboarding.companionSection.loadErrorDescription"),e[5]=o,e[6]=f):f=e[6];let p;e[7]!==f?(p=s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:f}),e[7]=f,e[8]=p):p=e[8];let l;e[9]!==o?(l=o("routes.reportsOnboarding.companionSection.retry"),e[9]=o,e[10]=l):l=e[10];let i;e[11]!==n||e[12]!==l?(i=s.jsx(ne,{type:"button",variant:"outline",size:"sm",className:"mt-3",onClick:n,children:l}),e[11]=n,e[12]=l,e[13]=i):i=e[13];let a;return e[14]!==c||e[15]!==p||e[16]!==i?(a=s.jsxs("div",{className:H,children:[r,s.jsxs("div",{role:"alert",className:"rounded-2xl border border-border bg-card p-4",children:[c,p,i]})]}),e[14]=c,e[15]=p,e[16]=i,e[17]=a):a=e[17],a}function ve(t){const e=_.c(2);let n;return e[0]!==t?(n=s.jsx(Y,{children:o=>{const{reset:r}=o;return s.jsx(Z,{fallback:d=>{const{resetError:c}=d;return s.jsx(ue,{onRetry:()=>{r(),c()}})},children:s.jsx(T.Suspense,{fallback:s.jsx(fe,{}),children:s.jsx(pe,{...t})})})}}),e[0]=t,e[1]=n):n=e[1],n}function pe(t){const e=_.c(60),{org:n,cdConnectionId:o,siteUrl:r,onReadinessChange:d}=t,c=U(),{data:f}=ee.useSession(),p=f?.user?.id??"";let l;if(e[0]!==r){const $=r?se(r):null;if($?.ok)try{l=new URL($.value).hostname}catch{l=void 0}e[0]=r,e[1]=l}else l=e[1];let i;e[2]!==n.id||e[3]!==n.slug?(i={connectionId:te,orgId:n.id,orgSlug:n.slug},e[2]=n.id,e[3]=n.slug,e[4]=i):i=e[4];const a=oe(i);let x;e[5]!==o||e[6]!==n||e[7]!==a||e[8]!==r?(x={selfClient:a,org:n,cdConnectionId:o,siteUrl:r},e[5]=o,e[6]=n,e[7]=a,e[8]=r,e[9]=x):x=e[9];const{cards:m,saStatusUnavailable:g}=re(x);let u;e[10]!==o||e[11]!==n||e[12]!==a||e[13]!==l||e[14]!==r||e[15]!==p?(u={selfClient:a,org:n,userId:p,cdConnectionId:o,domain:l,siteUrl:r},e[10]=o,e[11]=n,e[12]=a,e[13]=l,e[14]=r,e[15]=p,e[16]=u):u=e[16];const{connect:y,connectingFieldKey:b,disconnect:j,disconnectingFieldKey:L,error:N}=le(u),[z,D]=T.useState(null),P=he;let E,R,C,k,K,O,I,w,S,v;if(e[17]!==z||e[18]!==m||e[19]!==y||e[20]!==N||e[21]!==b||e[22]!==j||e[23]!==L||e[24]!==d||e[25]!==n||e[26]!==g||e[27]!==a||e[28]!==r||e[29]!==c){k=Symbol.for("react.early_return_sentinel");e:{const $=m.filter(ge),G=m.filter(xe),J=g||($.length>0?$.every(P):m.length===0||m.some(P));if(d?.(J),m.length===0){k=null;break e}const V=b!==null||L!==null,W=h=>{const X=async()=>{await y(h)&&D(h.fieldKey)};return s.jsx(ie,{card:h,connecting:b===h.fieldKey,disconnecting:L===h.fieldKey,disabled:V&&b!==h.fieldKey&&L!==h.fieldKey,org:n,selfClient:a,siteUrl:r,autoOpenConfigFieldKey:z,onAutoOpenConfigHandled:()=>D(F=>F===h.fieldKey?null:F),onConnect:()=>{X()},onDisconnect:()=>{j(h)}},h.fieldKey)};R=H,e[40]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(q,{}),e[40]=C):C=e[40],E=ce,I="flex min-h-0 flex-1 flex-col md:block",w="-mx-1 min-h-0 flex-1 overflow-y-auto px-1 md:max-h-[min(60vh,calc(100dvh-330px))] md:flex-none",e[41]!==N?(S=N&&s.jsx("p",{role:"alert",className:"mb-3 text-sm text-destructive",children:N}),e[41]=N,e[42]=S):S=e[42],e[43]!==g||e[44]!==c?(v=g&&s.jsx("p",{role:"status",className:"mb-3 rounded-lg border border-warning/40 bg-warning/10 p-3 text-sm text-foreground",children:c("routes.reportsOnboarding.companionSection.statusUnavailable")}),e[43]=g,e[44]=c,e[45]=v):v=e[45],K="flex flex-col gap-4 pt-3",O=[...$,...G].map(W)}e[17]=z,e[18]=m,e[19]=y,e[20]=N,e[21]=b,e[22]=j,e[23]=L,e[24]=d,e[25]=n,e[26]=g,e[27]=a,e[28]=r,e[29]=c,e[30]=E,e[31]=R,e[32]=C,e[33]=k,e[34]=K,e[35]=O,e[36]=I,e[37]=w,e[38]=S,e[39]=v}else E=e[30],R=e[31],C=e[32],k=e[33],K=e[34],O=e[35],I=e[36],w=e[37],S=e[38],v=e[39];if(k!==Symbol.for("react.early_return_sentinel"))return k;let A;e[46]!==K||e[47]!==O?(A=s.jsx("div",{className:K,children:O}),e[46]=K,e[47]=O,e[48]=A):A=e[48];let B;e[49]!==E||e[50]!==A||e[51]!==I||e[52]!==w||e[53]!==S||e[54]!==v?(B=s.jsxs(E,{wrapperClassName:I,className:w,children:[S,v,A]}),e[49]=E,e[50]=A,e[51]=I,e[52]=w,e[53]=S,e[54]=v,e[55]=B):B=e[55];let M;return e[56]!==R||e[57]!==C||e[58]!==B?(M=s.jsxs("div",{className:R,children:[C,B]}),e[56]=R,e[57]=C,e[58]=B,e[59]=M):M=e[59],M}function xe(t){return!t.required}function ge(t){return t.required}function he(t){return t.satisfied&&t.configured}export{fe as C,ce as S,ve as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aO as se,c as F,l as ae,j as ne,dF as oe,X as Y,o as W,K as I,a2 as X,m as re,b as ie,e as K,q as le,t as j,aA as ce,d2 as J,$ as ue}from"./index-D7hYEfbN.js";import{u as de}from"./use-task-board-events-UvXF0OvU.js";import{b as fe}from"./use-decopilot-events-Dz93drkG.js";import{i as me}from"./AlertCircle-3t4CitpU.js";import{aD as ge,aE as ye,aF as V,aG as ke,t as pe,aH as _e,a3 as Ne,w as he,_ as Se,aI as Be}from"./agent-icon-1OqzsUAE.js";import{i as Ee}from"./CheckCircle-DP_Yeb-b.js";import{s as Ce}from"./Image01-jyAhhinO.js";import{j as Ae}from"./UserSquare-CI-KdVX2.js";import{C as G,d as Te,e as be}from"./task-board-B1uWZU9K.js";const xe=se("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);function Ve(e){const t=F.c(8),{size:a,className:s}=e,n=a===void 0?16:a;let o;t[0]!==n?(o={width:n,height:n},t[0]=n,t[1]=o):o=t[1];let r;t[2]!==s?(r=ae("shrink-0 rounded-full object-cover",s),t[2]=s,t[3]=r):r=t[3];let c;return t[4]!==n||t[5]!==o||t[6]!==r?(c=ne.jsx("img",{src:oe,alt:"Super Agent",width:n,height:n,style:o,className:r}),t[4]=n,t[5]=o,t[6]=r,t[7]=c):c=t[7],c}function Ke(e,t){return{queryKey:I.taskBoardItems(e),refetchInterval:6e4,queryFn:async()=>{const{items:a}=await t.call("TASK_BOARD_ITEM_LIST",{});return{items:a}}}}function Ie(){const e=F.c(21),{org:t,locator:a}=Y(),s=W();let n;e[0]!==a?(n=I.taskBoardItems(a),e[0]=a,e[1]=n):n=e[1];const o=n;let r;e[2]!==a||e[3]!==s||e[4]!==o?(r=y=>{s.cancelQueries({queryKey:o}),s.setQueryData(o,u=>u&&{...u,items:u.items.some(g=>g.id===y.id)?u.items.map(g=>g.id===y.id?y:g):[y,...u.items]}),s.invalidateQueries({queryKey:I.taskBoardActivity(a,y.id)})},e[2]=a,e[3]=s,e[4]=o,e[5]=r):r=e[5];let c,f;e[6]!==s||e[7]!==o?(c=()=>{s.invalidateQueries({queryKey:o})},f=y=>{s.cancelQueries({queryKey:o}),s.setQueryData(o,u=>u&&{...u,items:u.items.filter(g=>g.id!==y)})},e[6]=s,e[7]=o,e[8]=c,e[9]=f):(c=e[8],f=e[9]);let i;e[10]!==t.slug||e[11]!==r||e[12]!==c||e[13]!==f?(i={orgSlug:t.slug,onUpdate:r,onResync:c,onDelete:f},e[10]=t.slug,e[11]=r,e[12]=c,e[13]=f,e[14]=i):i=e[14],de(i);let d;e[15]!==s||e[16]!==o?(d=y=>{const u=y.subject,g=y.data.status;s.cancelQueries({queryKey:o}),s.setQueryData(o,p=>p&&{...p,items:p.items.map(_=>_.threads.some(k=>k.threadId===u)?{..._,threads:_.threads.map(k=>k.threadId===u?{...k,status:g}:k)}:_)})},e[15]=s,e[16]=o,e[17]=d):d=e[17];let h;e[18]!==t.slug||e[19]!==d?(h={orgSlug:t.slug,onTaskStatus:d},e[18]=t.slug,e[19]=d,e[20]=h):h=e[20],fe(h)}function ze(){const e=F.c(9),{locator:t}=Y(),a=X();let s;e[0]!==t||e[1]!==a?(s=Ke(t,a),e[0]=t,e[1]=a,e[2]=s):s=e[2];const n=re(s);Ie();let o;e[3]!==n.data?.items?(o=n.data?.items??[],e[3]=n.data?.items,e[4]=o):o=e[4];let r;return e[5]!==n.error||e[6]!==n.isLoading||e[7]!==o?(r={items:o,isLoading:n.isLoading,error:n.error},e[5]=n.error,e[6]=n.isLoading,e[7]=o,e[8]=r):r=e[8],r}function We(){const e=F.c(70),{org:t,locator:a}=Y(),s=X(),n=W(),o=ie();let r;e[0]!==a?(r=I.taskBoardItems(a),e[0]=a,e[1]=r):r=e[1];const c=r;let f;e[2]!==n||e[3]!==c?(f=()=>n.invalidateQueries({queryKey:c}),e[2]=n,e[3]=c,e[4]=f):f=e[4];const i=f;let d;e[5]!==s?(d=l=>s.call("TASK_BOARD_ITEM_CREATE",l),e[5]=s,e[6]=d):d=e[6];let h;e[7]!==i||e[8]!==d?(h={mutationFn:d,onSuccess:i},e[7]=i,e[8]=d,e[9]=h):h=e[9];const y=K(h);let u;e[10]!==s?(u=l=>s.call("TASK_BOARD_ITEM_UPDATE",l),e[10]=s,e[11]=u):u=e[11];let g;e[12]!==n||e[13]!==c?(g=async l=>{await n.cancelQueries({queryKey:c});const N=n.getQueryData(c);return n.setQueryData(c,m=>m&&{...m,items:m.items.map(M=>M.id===l.id?{...M,...l,...l.status!==void 0&&l.status!==M.status&&{statusSince:new Date().toISOString()}}:M)}),{previous:N}},e[12]=n,e[13]=c,e[14]=g):g=e[14];let p;e[15]!==t?(p=(l,N)=>{N.status==="done"&&le("task_marked_done",{organization_id:t.id,task_board_item_id:N.id})},e[15]=t,e[16]=p):p=e[16];let _;e[17]!==n||e[18]!==c?(_=(l,N,m)=>{m?.previous&&n.setQueryData(c,m.previous)},e[17]=n,e[18]=c,e[19]=_):_=e[19];let k;e[20]!==i||e[21]!==a||e[22]!==n?(k=(l,N,m)=>{i(),n.invalidateQueries({queryKey:I.taskBoardActivity(a,m.id)})},e[20]=i,e[21]=a,e[22]=n,e[23]=k):k=e[23];let D;e[24]!==u||e[25]!==g||e[26]!==p||e[27]!==_||e[28]!==k?(D={mutationFn:u,onMutate:g,onSuccess:p,onError:_,onSettled:k},e[24]=u,e[25]=g,e[26]=p,e[27]=_,e[28]=k,e[29]=D):D=e[29];const Q=K(D);let S;e[30]!==s?(S=l=>s.call("TASK_BOARD_ITEM_DELETE",{id:l}),e[30]=s,e[31]=S):S=e[31];let B;e[32]!==i||e[33]!==o?(B=l=>{j.error(l instanceof Error&&l.message?l.message:o("taskBoard.taskBoard.deleteError")),i()},e[32]=i,e[33]=o,e[34]=B):B=e[34];let v;e[35]!==i||e[36]!==S||e[37]!==B?(v={mutationFn:S,onSuccess:i,onError:B},e[35]=i,e[36]=S,e[37]=B,e[38]=v):v=e[38];const U=K(v);let E;e[39]!==s?(E=async l=>{const N=await Promise.allSettled(l.map(m=>s.call("TASK_BOARD_ITEM_DELETE",{id:m})));return{total:l.length,failed:N.filter(De).length}},e[39]=s,e[40]=E):E=e[40];let C,A;e[41]!==o?(C=l=>{const{total:N,failed:m}=l;m!==0&&j.error(o("taskBoard.taskBoard.deleteBulkError",{failed:String(m),total:String(N)}))},A=()=>j.error(o("taskBoard.taskBoard.deleteError")),e[41]=o,e[42]=C,e[43]=A):(C=e[42],A=e[43]);let O;e[44]!==i||e[45]!==E||e[46]!==C||e[47]!==A?(O={mutationFn:E,onSuccess:C,onError:A,onSettled:i},e[44]=i,e[45]=E,e[46]=C,e[47]=A,e[48]=O):O=e[48];const $=K(O);let T;e[49]!==s?(T=l=>s.call("TASK_BOARD_ITEM_UPDATE",l),e[49]=s,e[50]=T):T=e[50];let R;e[51]!==i||e[52]!==T?(R={mutationFn:T,onSuccess:i},e[51]=i,e[52]=T,e[53]=R):R=e[53];const q=K(R);let b;e[54]!==s?(b=l=>s.call("TASK_BOARD_ITEM_RERUN",l),e[54]=s,e[55]=b):b=e[55];let x;e[56]!==i||e[57]!==a||e[58]!==n?(x=(l,N,m)=>{i(),n.invalidateQueries({queryKey:I.taskBoardActivity(a,m.id)})},e[56]=i,e[57]=a,e[58]=n,e[59]=x):x=e[59];let w;e[60]!==b||e[61]!==x?(w={mutationFn:b,onSettled:x},e[60]=b,e[61]=x,e[62]=w):w=e[62];const P=K(w);let L;return e[63]!==y||e[64]!==q||e[65]!==U||e[66]!==$||e[67]!==P||e[68]!==Q?(L={create:y,update:Q,remove:U,removeMany:$,link:q,rerun:P},e[63]=y,e[64]=q,e[65]=U,e[66]=$,e[67]=P,e[68]=Q,e[69]=L):L=e[69],L}function De(e){return e.status==="rejected"}const ve=["ended_after_delivery","superseded"];function Oe(e){return!!e&&ve.includes(e)}function Xe(e){return!(e.action==="status_changed"&&typeof e.data?.retry=="number")}function Je(e){return e.failureKind!=="superseded"}function Z(e){return e.threads.some(t=>t.status==="requires_action")}function Ze(e){return e.status==="in_review"&&!e.assigneeId}function et(e){return Z(e)}function tt(e){return e.status==="in_progress"&&Z(e)?"text-warning animate-pulse":te(e.status).iconClassName}function st(e){return e.threads.some(a=>a.status==="in_progress")?"running":e.threads.some(a=>a.status==="failed"&&!Oe(a.failureKind))?"failed":null}function at(e,t,a){const s=e.findIndex(d=>d.id===a),n=t===a?e[s+1]?.id??null:t,o=e.filter(d=>d.id!==a),r=n?o.findIndex(d=>d.id===n):-1,c=r===-1?o.length:r,f=o[c-1],i=o[c];return f&&i?(f.sortOrder+i.sortOrder)/2:f?f.sortOrder+1:i?i.sortOrder-1:0}function nt(e,t){return Array.from({length:t},(a,s)=>e-(t-1-s)*1e-4)}const Re=["archived"],ee={triage:{labelKey:"taskBoard.config.statusBacklog",icon:me,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:J,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:Ne,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:Ce,iconClassName:"text-warning"},approved:{labelKey:"taskBoard.config.statusApproved",icon:_e,iconClassName:"text-success"},merged:{labelKey:"taskBoard.config.statusMerged",icon:Ae,iconClassName:"text-primary"},post_deploy_validation:{labelKey:"taskBoard.config.statusPostDeployValidation",icon:pe,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:Ee,iconClassName:"text-success"},archived:{labelKey:"taskBoard.config.statusArchived",icon:ce,iconClassName:"text-muted-foreground"}},we={icon:J,iconClassName:"text-muted-foreground"},Le=ee;function te(e){return Le[e]??we}function ot(e,t){const a=ee[e];return{label:a?t(a.labelKey):e,visual:te(e)}}const rt=["bug","feature","chore","spike","security"],it={bug:{labelKey:"taskBoard.config.typeBug",icon:xe,iconClassName:"text-destructive"},feature:{labelKey:"taskBoard.config.typeFeature",icon:Be,iconClassName:"text-success"},chore:{labelKey:"taskBoard.config.typeChore",icon:Se,iconClassName:"text-muted-foreground"},spike:{labelKey:"taskBoard.config.typeSpike",icon:he,iconClassName:"text-yellow-500"},security:{labelKey:"taskBoard.config.typeSecurity",icon:ue,iconClassName:"text-purple-500"}};function H(e){return be.includes(e)}function lt(e){return G.filter(t=>e||!H(t))}function ct({deliveryEnabled:e,shownLanes:t,occupied:a}){const s=G.filter(r=>e||!H(r)||a.includes(r)),n=s.filter(r=>Re.includes(r)||!e&&H(r)),o=n.filter(r=>!t.includes(r));return{lanes:s.filter(r=>!o.includes(r)),hidden:o,hideable:n}}const z="lane:";function Me(e){return G.includes(e)}function ut({overId:e,statusOf:t}){if(e===void 0)return null;const a=String(e),s=a.startsWith(z)?a.slice(z.length):t(a);return s!==void 0&&Me(s)?s:null}function dt(e,t){return Math.max(0,Math.floor((t-Date.parse(e))/864e5))}const ft=["none","low","medium","high","urgent"],mt={none:{labelKey:"taskBoard.config.priorityNone",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50",icon:V,iconClassName:"text-muted-foreground/40"},low:{labelKey:"taskBoard.config.priorityLow",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40",icon:ke,iconClassName:"text-muted-foreground"},medium:{labelKey:"taskBoard.config.priorityMedium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500",icon:V,iconClassName:"text-blue-500"},high:{labelKey:"taskBoard.config.priorityHigh",flagClassName:"text-warning",dotClassName:"bg-warning",icon:ye,iconClassName:"text-warning"},urgent:{labelKey:"taskBoard.config.priorityUrgent",flagClassName:"text-destructive",dotClassName:"bg-destructive",icon:ge,iconClassName:"text-destructive"}};function gt(e,t=Date.now()){const a=new Date(e).getTime();return Number.isNaN(a)?null:a<t?"overdue":a-t<=Fe*864e5?"soon":null}const Fe=3;function yt(e){return`color-mix(in oklab, ${e??Te} var(--user-color-strength), transparent)`}export{Re as H,z as L,ft as P,Ve as S,rt as T,Ze as a,We as b,mt as c,it as d,yt as e,te as f,Je as g,Xe as h,Z as i,Oe as j,ee as k,ot as l,lt as m,st as n,ze as o,ct as p,et as q,nt as r,tt as s,Ke as t,Ie as u,at as v,ut as w,gt as x,dt as y};
|
|
1
|
+
import{aO as se,c as Q,l as ae,j as ne,dG as oe,X as G,o as W,K as I,a2 as X,m as re,b as ie,e as K,q as le,t as j,aA as ce,d2 as J,$ as ue}from"./index-BOGZM7Pw.js";import{u as de}from"./use-task-board-events-Q5BqAnUD.js";import{b as fe}from"./use-decopilot-events-DL6Ppxgb.js";import{i as me}from"./AlertCircle-BOPAUEgU.js";import{aD as ge,aE as ye,aF as V,aG as ke,t as pe,aH as _e,a3 as Ne,w as he,_ as Se,aI as Be}from"./agent-icon-QobcC4y1.js";import{i as Ee}from"./CheckCircle-CxJ9MBI3.js";import{s as Ce}from"./Image01-DAe5wd3u.js";import{j as Ae}from"./UserSquare-B6-k4uk5.js";import{C as Y,d as Te,e as be}from"./task-board-Dh6sWb9t.js";const xe=se("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);function Ve(e){const t=Q.c(8),{size:a,className:s}=e,n=a===void 0?16:a;let o;t[0]!==n?(o={width:n,height:n},t[0]=n,t[1]=o):o=t[1];let r;t[2]!==s?(r=ae("shrink-0 rounded-full object-cover",s),t[2]=s,t[3]=r):r=t[3];let c;return t[4]!==n||t[5]!==o||t[6]!==r?(c=ne.jsx("img",{src:oe,alt:"Super Agent",width:n,height:n,style:o,className:r}),t[4]=n,t[5]=o,t[6]=r,t[7]=c):c=t[7],c}function Ke(e,t){return{queryKey:I.taskBoardItems(e),refetchInterval:6e4,queryFn:async()=>{const{items:a}=await t.call("TASK_BOARD_ITEM_LIST",{});return{items:a}}}}function Ie(){const e=Q.c(21),{org:t,locator:a}=G(),s=W();let n;e[0]!==a?(n=I.taskBoardItems(a),e[0]=a,e[1]=n):n=e[1];const o=n;let r;e[2]!==a||e[3]!==s||e[4]!==o?(r=y=>{s.cancelQueries({queryKey:o}),s.setQueryData(o,u=>u&&{...u,items:u.items.some(g=>g.id===y.id)?u.items.map(g=>g.id===y.id?y:g):[y,...u.items]}),s.invalidateQueries({queryKey:I.taskBoardActivity(a,y.id)})},e[2]=a,e[3]=s,e[4]=o,e[5]=r):r=e[5];let c,f;e[6]!==s||e[7]!==o?(c=()=>{s.invalidateQueries({queryKey:o})},f=y=>{s.cancelQueries({queryKey:o}),s.setQueryData(o,u=>u&&{...u,items:u.items.filter(g=>g.id!==y)})},e[6]=s,e[7]=o,e[8]=c,e[9]=f):(c=e[8],f=e[9]);let i;e[10]!==t.slug||e[11]!==r||e[12]!==c||e[13]!==f?(i={orgSlug:t.slug,onUpdate:r,onResync:c,onDelete:f},e[10]=t.slug,e[11]=r,e[12]=c,e[13]=f,e[14]=i):i=e[14],de(i);let d;e[15]!==s||e[16]!==o?(d=y=>{const u=y.subject,g=y.data.status;s.cancelQueries({queryKey:o}),s.setQueryData(o,p=>p&&{...p,items:p.items.map(_=>_.threads.some(k=>k.threadId===u)?{..._,threads:_.threads.map(k=>k.threadId===u?{...k,status:g}:k)}:_)})},e[15]=s,e[16]=o,e[17]=d):d=e[17];let h;e[18]!==t.slug||e[19]!==d?(h={orgSlug:t.slug,onTaskStatus:d},e[18]=t.slug,e[19]=d,e[20]=h):h=e[20],fe(h)}function ze(){const e=Q.c(9),{locator:t}=G(),a=X();let s;e[0]!==t||e[1]!==a?(s=Ke(t,a),e[0]=t,e[1]=a,e[2]=s):s=e[2];const n=re(s);Ie();let o;e[3]!==n.data?.items?(o=n.data?.items??[],e[3]=n.data?.items,e[4]=o):o=e[4];let r;return e[5]!==n.error||e[6]!==n.isLoading||e[7]!==o?(r={items:o,isLoading:n.isLoading,error:n.error},e[5]=n.error,e[6]=n.isLoading,e[7]=o,e[8]=r):r=e[8],r}function We(){const e=Q.c(70),{org:t,locator:a}=G(),s=X(),n=W(),o=ie();let r;e[0]!==a?(r=I.taskBoardItems(a),e[0]=a,e[1]=r):r=e[1];const c=r;let f;e[2]!==n||e[3]!==c?(f=()=>n.invalidateQueries({queryKey:c}),e[2]=n,e[3]=c,e[4]=f):f=e[4];const i=f;let d;e[5]!==s?(d=l=>s.call("TASK_BOARD_ITEM_CREATE",l),e[5]=s,e[6]=d):d=e[6];let h;e[7]!==i||e[8]!==d?(h={mutationFn:d,onSuccess:i},e[7]=i,e[8]=d,e[9]=h):h=e[9];const y=K(h);let u;e[10]!==s?(u=l=>s.call("TASK_BOARD_ITEM_UPDATE",l),e[10]=s,e[11]=u):u=e[11];let g;e[12]!==n||e[13]!==c?(g=async l=>{await n.cancelQueries({queryKey:c});const N=n.getQueryData(c);return n.setQueryData(c,m=>m&&{...m,items:m.items.map(M=>M.id===l.id?{...M,...l,...l.status!==void 0&&l.status!==M.status&&{statusSince:new Date().toISOString()}}:M)}),{previous:N}},e[12]=n,e[13]=c,e[14]=g):g=e[14];let p;e[15]!==t?(p=(l,N)=>{N.status==="done"&&le("task_marked_done",{organization_id:t.id,task_board_item_id:N.id})},e[15]=t,e[16]=p):p=e[16];let _;e[17]!==n||e[18]!==c?(_=(l,N,m)=>{m?.previous&&n.setQueryData(c,m.previous)},e[17]=n,e[18]=c,e[19]=_):_=e[19];let k;e[20]!==i||e[21]!==a||e[22]!==n?(k=(l,N,m)=>{i(),n.invalidateQueries({queryKey:I.taskBoardActivity(a,m.id)})},e[20]=i,e[21]=a,e[22]=n,e[23]=k):k=e[23];let D;e[24]!==u||e[25]!==g||e[26]!==p||e[27]!==_||e[28]!==k?(D={mutationFn:u,onMutate:g,onSuccess:p,onError:_,onSettled:k},e[24]=u,e[25]=g,e[26]=p,e[27]=_,e[28]=k,e[29]=D):D=e[29];const F=K(D);let S;e[30]!==s?(S=l=>s.call("TASK_BOARD_ITEM_DELETE",{id:l}),e[30]=s,e[31]=S):S=e[31];let B;e[32]!==i||e[33]!==o?(B=l=>{j.error(l instanceof Error&&l.message?l.message:o("taskBoard.taskBoard.deleteError")),i()},e[32]=i,e[33]=o,e[34]=B):B=e[34];let v;e[35]!==i||e[36]!==S||e[37]!==B?(v={mutationFn:S,onSuccess:i,onError:B},e[35]=i,e[36]=S,e[37]=B,e[38]=v):v=e[38];const U=K(v);let E;e[39]!==s?(E=async l=>{const N=await Promise.allSettled(l.map(m=>s.call("TASK_BOARD_ITEM_DELETE",{id:m})));return{total:l.length,failed:N.filter(De).length}},e[39]=s,e[40]=E):E=e[40];let C,A;e[41]!==o?(C=l=>{const{total:N,failed:m}=l;m!==0&&j.error(o("taskBoard.taskBoard.deleteBulkError",{failed:String(m),total:String(N)}))},A=()=>j.error(o("taskBoard.taskBoard.deleteError")),e[41]=o,e[42]=C,e[43]=A):(C=e[42],A=e[43]);let O;e[44]!==i||e[45]!==E||e[46]!==C||e[47]!==A?(O={mutationFn:E,onSuccess:C,onError:A,onSettled:i},e[44]=i,e[45]=E,e[46]=C,e[47]=A,e[48]=O):O=e[48];const $=K(O);let T;e[49]!==s?(T=l=>s.call("TASK_BOARD_ITEM_UPDATE",l),e[49]=s,e[50]=T):T=e[50];let R;e[51]!==i||e[52]!==T?(R={mutationFn:T,onSuccess:i},e[51]=i,e[52]=T,e[53]=R):R=e[53];const q=K(R);let b;e[54]!==s?(b=l=>s.call("TASK_BOARD_ITEM_RERUN",l),e[54]=s,e[55]=b):b=e[55];let x;e[56]!==i||e[57]!==a||e[58]!==n?(x=(l,N,m)=>{i(),n.invalidateQueries({queryKey:I.taskBoardActivity(a,m.id)})},e[56]=i,e[57]=a,e[58]=n,e[59]=x):x=e[59];let w;e[60]!==b||e[61]!==x?(w={mutationFn:b,onSettled:x},e[60]=b,e[61]=x,e[62]=w):w=e[62];const P=K(w);let L;return e[63]!==y||e[64]!==q||e[65]!==U||e[66]!==$||e[67]!==P||e[68]!==F?(L={create:y,update:F,remove:U,removeMany:$,link:q,rerun:P},e[63]=y,e[64]=q,e[65]=U,e[66]=$,e[67]=P,e[68]=F,e[69]=L):L=e[69],L}function De(e){return e.status==="rejected"}const ve=["ended_after_delivery","superseded"];function Oe(e){return!!e&&ve.includes(e)}function Xe(e){return!(e.action==="status_changed"&&typeof e.data?.retry=="number")}function Je(e){return e.failureKind!=="superseded"}function Z(e){return e.threads.some(t=>t.status==="requires_action")}function Ze(e){return e.status==="in_review"&&!e.assigneeId}function et(e){return Z(e)}function tt(e){return e.status==="in_progress"&&Z(e)?"text-warning animate-pulse":te(e.status).iconClassName}function st(e){return e.threads.some(a=>a.status==="in_progress")?"running":e.threads.some(a=>a.status==="failed"&&!Oe(a.failureKind))?"failed":null}function at(e,t,a){const s=e.findIndex(d=>d.id===a),n=t===a?e[s+1]?.id??null:t,o=e.filter(d=>d.id!==a),r=n?o.findIndex(d=>d.id===n):-1,c=r===-1?o.length:r,f=o[c-1],i=o[c];return f&&i?(f.sortOrder+i.sortOrder)/2:f?f.sortOrder+1:i?i.sortOrder-1:0}function nt(e,t){return Array.from({length:t},(a,s)=>e-(t-1-s)*1e-4)}const Re=["archived"],ee={triage:{labelKey:"taskBoard.config.statusBacklog",icon:me,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:J,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:Ne,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:Ce,iconClassName:"text-warning"},approved:{labelKey:"taskBoard.config.statusApproved",icon:_e,iconClassName:"text-success"},merged:{labelKey:"taskBoard.config.statusMerged",icon:Ae,iconClassName:"text-primary"},post_deploy_validation:{labelKey:"taskBoard.config.statusPostDeployValidation",icon:pe,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:Ee,iconClassName:"text-success"},archived:{labelKey:"taskBoard.config.statusArchived",icon:ce,iconClassName:"text-muted-foreground"}},we={icon:J,iconClassName:"text-muted-foreground"},Le=ee;function te(e){return Le[e]??we}function ot(e,t){const a=ee[e];return{label:a?t(a.labelKey):e,visual:te(e)}}const rt=["bug","feature","chore","spike","security"],it={bug:{labelKey:"taskBoard.config.typeBug",icon:xe,iconClassName:"text-destructive"},feature:{labelKey:"taskBoard.config.typeFeature",icon:Be,iconClassName:"text-success"},chore:{labelKey:"taskBoard.config.typeChore",icon:Se,iconClassName:"text-muted-foreground"},spike:{labelKey:"taskBoard.config.typeSpike",icon:he,iconClassName:"text-yellow-500"},security:{labelKey:"taskBoard.config.typeSecurity",icon:ue,iconClassName:"text-purple-500"}};function H(e){return be.includes(e)}function lt(e){return Y.filter(t=>e||!H(t))}function ct({deliveryEnabled:e,shownLanes:t,occupied:a}){const s=Y.filter(r=>e||!H(r)||a.includes(r)),n=s.filter(r=>Re.includes(r)||!e&&H(r)),o=n.filter(r=>!t.includes(r));return{lanes:s.filter(r=>!o.includes(r)),hidden:o,hideable:n}}const z="lane:";function Me(e){return Y.includes(e)}function ut({overId:e,statusOf:t}){if(e===void 0)return null;const a=String(e),s=a.startsWith(z)?a.slice(z.length):t(a);return s!==void 0&&Me(s)?s:null}function dt(e,t){return Math.max(0,Math.floor((t-Date.parse(e))/864e5))}const ft=["none","low","medium","high","urgent"],mt={none:{labelKey:"taskBoard.config.priorityNone",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50",icon:V,iconClassName:"text-muted-foreground/40"},low:{labelKey:"taskBoard.config.priorityLow",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40",icon:ke,iconClassName:"text-muted-foreground"},medium:{labelKey:"taskBoard.config.priorityMedium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500",icon:V,iconClassName:"text-blue-500"},high:{labelKey:"taskBoard.config.priorityHigh",flagClassName:"text-warning",dotClassName:"bg-warning",icon:ye,iconClassName:"text-warning"},urgent:{labelKey:"taskBoard.config.priorityUrgent",flagClassName:"text-destructive",dotClassName:"bg-destructive",icon:ge,iconClassName:"text-destructive"}};function gt(e,t=Date.now()){const a=new Date(e).getTime();return Number.isNaN(a)?null:a<t?"overdue":a-t<=Qe*864e5?"soon":null}const Qe=3;function yt(e){return`color-mix(in oklab, ${e??Te} var(--user-color-strength), transparent)`}export{Re as H,z as L,ft as P,Ve as S,rt as T,Ze as a,We as b,mt as c,it as d,yt as e,te as f,Je as g,Xe as h,Z as i,Oe as j,ee as k,ot as l,lt as m,st as n,ze as o,ct as p,et as q,nt as r,tt as s,Ke as t,Ie as u,at as v,ut as w,gt as x,dt as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,b as N,j as s,a7 as w,ak as k,B as y}from"./index-
|
|
1
|
+
import{c as v,b as N,j as s,a7 as w,ak as k,B as y}from"./index-BOGZM7Pw.js";import{i as z}from"./X-BdtW9stL.js";import{aJ as _,aw as C}from"./agent-icon-QobcC4y1.js";const S="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function $(){const t=v.c(13),e=N();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),t[0]=l):l=t[0];let n;t[1]!==e?(n=e("routes.reportsOnboarding.connectModal.quote"),t[1]=e,t[2]=n):n=t[2];let o;t[3]!==n?(o=s.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",n,"”"]}),t[3]=n,t[4]=o):o=t[4];let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("img",{src:S,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),t[5]=c):c=t[5];let r;t[6]!==e?(r=e("routes.reportsOnboarding.connectModal.quoteAuthor"),t[6]=e,t[7]=r):r=t[7];let i;t[8]!==r?(i=s.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[c,s.jsx("span",{className:"text-base font-medium",children:r})]}),t[8]=r,t[9]=i):i=t[9];let a;return t[10]!==o||t[11]!==i?(a=s.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[l,o,i]}),t[10]=o,t[11]=i,t[12]=a):a=t[12],a}function M(){const t=v.c(19),e=N();let l;t[0]!==e?(l=e("routes.reportsOnboarding.connectModal.trustRevoke"),t[0]=e,t[1]=l):l=t[1];let n;t[2]!==l?(n={Icon:_,label:l},t[2]=l,t[3]=n):n=t[3];let o;t[4]!==e?(o=e("routes.reportsOnboarding.connectModal.trustEncrypted"),t[4]=e,t[5]=o):o=t[5];let c;t[6]!==o?(c={Icon:w,label:o},t[6]=o,t[7]=c):c=t[7];let r;t[8]!==e?(r=e("routes.reportsOnboarding.connectModal.trustNeverSold"),t[8]=e,t[9]=r):r=t[9];let i;t[10]!==r?(i={Icon:C,label:r},t[10]=r,t[11]=i):i=t[11];let a;t[12]!==n||t[13]!==c||t[14]!==i?(a=[n,c,i],t[12]=n,t[13]=c,t[14]=i,t[15]=a):a=t[15];const m=a;let f;t[16]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"h-px w-full bg-white/15"}),t[16]=f):f=t[16];let d;return t[17]!==m?(d=s.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[f,s.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:m.map(q)})]}),t[17]=m,t[18]=d):d=t[18],d}function q(t){const{Icon:e,label:l}=t;return s.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[s.jsx(e,{className:"size-4 shrink-0 opacity-85"}),l]},l)}function A(t){const e=v.c(22),{siteHost:l,footer:n,onClose:o,children:c}=t,r=N(),i=l?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null;let a;e[0]!==o||e[1]!==r?(a=o&&s.jsx("button",{type:"button",onClick:o,"aria-label":r("routes.reportsOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:s.jsx(z,{size:18})}),e[0]=o,e[1]=r,e[2]=a):a=e[2];let m,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),f=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=m,e[4]=f):(m=e[3],f=e[4]);let d;e[5]!==i||e[6]!==l?(d=l&&s.jsxs(s.Fragment,{children:[s.jsx(k,{size:16,className:"shrink-0 text-foreground/25"}),i&&s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:s.jsx("img",{src:i,alt:"",className:"size-full"})}),s.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:l})]}),e[5]=i,e[6]=l,e[7]=d):d=e[7];let x;e[8]!==d?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[m,f,d]}),e[8]=d,e[9]=x):x=e[9];let g;e[10]!==n?(g=s.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:n}),e[10]=n,e[11]=g):g=e[11];let h;e[12]!==c||e[13]!==x||e[14]!==g?(h=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[x,c,g]}),e[12]=c,e[13]=x,e[14]=g,e[15]=h):h=e[15];let u,b;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),b=s.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=u,e[17]=b):(u=e[16],b=e[17]);let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[u,b,s.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[s.jsx("div",{className:"flex-1"}),s.jsx($,{}),s.jsx("div",{className:"flex-1"}),s.jsx(M,{})]})]}),e[18]=p):p=e[18];let j;return e[19]!==a||e[20]!==h?(j=s.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[a,h,p]}),e[19]=a,e[20]=h,e[21]=j):j=e[21],j}function I(t){const e=v.c(5),{ready:l,pending:n,label:o,onClick:c,children:r}=t,i=n||!l,a=l&&!n?r:null;let m;return e[0]!==o||e[1]!==c||e[2]!==i||e[3]!==a?(m=s.jsxs(y,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal py-3 text-center text-base font-medium leading-tight",onClick:c,disabled:i,children:[o,a]}),e[0]=o,e[1]=c,e[2]=i,e[3]=a,e[4]=m):m=e[4],m}export{A as C,I as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as _,b as D,r as G,l as ee,j as s,
|
|
1
|
+
import{c as _,b as D,r as G,l as ee,j as s,fI as te,X as se,ad as ne,Z as ie,B as F,t as q,e$ as oe,ed as le,ak as ae}from"./index-BOGZM7Pw.js";import{a as re,A as ce}from"./alert-BZ6uRdL8.js";import{a as de,b as ue,c as V,d as fe,S as pe}from"./select-CGC5E9nf.js";import{T as me,c as xe,a as ge,b as he}from"./tabs-BCc9oqWy.js";import{u as J}from"./use-copy-BiyQhtNG.js";import{i as Y}from"./Check-CcPSzxsY.js";import{a as Z}from"./Copy01-ByHdq7k3.js";import{i as ye}from"./Key01-Dje7twgn.js";import{i as Ce}from"./Link01-BFa5_pnw.js";import{C as je,a as be,b as ve}from"./client-icons-ByIvBqps.js";import{u as we,a as Ne,A as $e}from"./api-keys-Btl9HmTY.js";import{R as ke}from"./require-capability-DN9BJlNM.js";import"./index-0glLJTM3.js";import"./ChevronUp-C9klasvw.js";import"./AlertCircle-BOPAUEgU.js";import"./Plus-Dk5G0eGJ.js";import"./Trash01-BA-bFjuS.js";import"./alert-dialog-13GPwGkk.js";import"./dialog-CwJ0Tacd.js";import"./X-BdtW9stL.js";import"./input-C0ZWiiGy.js";import"./label-CKukDnnz.js";import"./use-mcp-client-9jF2B0Tz.js";import"./auth-BMIwdKU8.js";import"./access-gate-BtTwTt-9.js";import"./capability-load-error-th8zEGOp.js";function Se(){return(typeof window>"u"?"":window.location.hostname||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"studio"}function Ke(t){return`${typeof window>"u"?"http://localhost:3000":window.location.origin}/api/${t}/mcp/self`}function _e({client:t,mode:e,url:r,apiKey:c}){const i=c??"<paste-your-api-key>",a=Se();if(t==="claude-code")return e==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r} \\
|
|
2
2
|
--header "Authorization: Bearer ${i}"`};if(t==="cursor"){const n={url:r};return e==="api-key"&&(n.headers={Authorization:`Bearer ${i}`}),{language:"json",pathHint:"~/.cursor/mcp.json",code:JSON.stringify({mcpServers:{[a]:n}},null,2)}}if(t==="codex"){const n=[`[mcp_servers.${a}]`,`url = "${r}"`];return e==="api-key"&&n.push(`http_headers = { "Authorization" = "Bearer ${i}" }`),{language:"toml",pathHint:"~/.codex/config.toml",code:n.join(`
|
|
3
3
|
`)}}return e==="oauth"?{language:"text",code:`${r}
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{au as o,bL as a,bM as t,av as e,bN as i,bO as r,cU as p,
|
|
1
|
+
import{au as o,bL as a,bM as t,av as e,bN as i,bO as r,cU as p,dD as b,cQ as m}from"./index-BOGZM7Pw.js";const h=o({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:t(e()),grantType:a(["authorization_code","client_credentials"])}),s=o({type:p("object"),properties:i(e(),r()).optional(),required:t(e()).optional()}).catchall(r()),_=b.extend({inputSchema:s,outputSchema:s.optional()}),f=o({headers:i(e(),e()).optional()}),g=o({command:e().describe("Command to run (e.g., 'npx', 'node')"),args:t(e()).optional().describe("Command arguments"),cwd:e().optional().describe("Working directory"),envVars:i(e(),e()).optional().describe("Environment variables (encrypted in storage)")}),d=256*1024;function l(n){return i(e(),r()).nullable().refine(c=>c===null||JSON.stringify(c).length<=d,{message:`${n} must serialize to at most ${d} bytes`})}const u=o({id:e().describe("Unique identifier for the connection"),title:e().describe("Human-readable name for the connection"),created_at:e().describe("When the connection was created"),updated_at:e().describe("When the connection was last updated"),created_by:e().describe("User ID who created the connection"),updated_by:e().optional().describe("User ID who last updated the connection"),organization_id:e().describe("Organization ID this connection belongs to"),description:e().nullable().describe("Description of the connection"),icon:e().nullable().describe("Icon URL for the connection"),app_name:e().nullable().describe("Associated app name"),app_id:e().nullable().describe("Associated app ID"),slug:e().nullable().optional().describe("URL-safe slug derived from app_name, connection_url, or title"),connection_type:a(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:e().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:e().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:m([g,f]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:h.nullable().describe("OAuth configuration"),configuration_state:l("configuration_state").describe("Configuration state (decrypted)"),configuration_scopes:t(e()).nullable().optional().describe("Configuration scopes"),metadata:l("metadata").describe("Additional metadata (includes repository info)"),tools:t(_).nullable().describe("Discovered tools from MCP"),bindings:t(e()).nullable().describe("Detected bindings"),status:a(["active","inactive","error"]).describe("Current status")});u.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:e().nullish()});u.partial();function T(n){return n!=null&&"command"in n}function y(n){return!n||!n.startsWith("virtual://")?null:n.replace("virtual://","")}export{h as O,T as i,y as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as
|
|
1
|
+
import{c as D,X as M,a2 as S,K as F,a8 as R,b as K,l as $,j as c,e$ as q}from"./index-BOGZM7Pw.js";import{u as O}from"./useInfiniteQuery-pxyjNhep.js";import{g as A}from"./connection-slug-CITJ0kGN.js";import{I as V}from"./integration-icon-DUuPtqFs.js";function W(t){const e=D.c(21),{org:s}=M(),o=S();let l;e[0]!==t?(l=t?.trim().split(/\s+/).filter(Boolean)??[],e[0]=t,e[1]=l):l=e[1];const r=l;let n;e[2]!==s.id||e[3]!==t?(n=F.storeDiscovery(s.id,`deco-json:${t??""}`),e[2]=s.id,e[3]=t,e[4]=n):n=e[4];let a;e[5]!==o||e[6]!==r?(a=I=>{const{pageParam:_}=I;return o.call("COLLECTION_REGISTRY_APP_LIST",{limit:24,cursor:_,where:r.length?{operator:"or",conditions:r.flatMap(B)}:void 0})},e[5]=o,e[6]=r,e[7]=a):a=e[7];let u;e[8]!==n||e[9]!==a?(u={queryKey:n,queryFn:a,initialPageParam:void 0,getNextPageParam:z,staleTime:3e5,placeholderData:R,throwOnError:!0},e[8]=n,e[9]=a,e[10]=u):u=e[10];const i=O(u);let p;e[11]!==i.data?.pages?(p=i.data?.pages.flatMap(Y)??[],e[11]=i.data?.pages,e[12]=p):p=e[12];const m=p;let f;e[13]!==i?(f=()=>{i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},e[13]=i,e[14]=f):f=e[14];let d;return e[15]!==m||e[16]!==i.hasNextPage||e[17]!==i.isFetchingNextPage||e[18]!==i.isLoading||e[19]!==f?(d={items:m,hasMore:i.hasNextPage,isLoadingMore:i.isFetchingNextPage,isInitialLoading:i.isLoading,loadMore:f},e[15]=m,e[16]=i.hasNextPage,e[17]=i.isFetchingNextPage,e[18]=i.isLoading,e[19]=f,e[20]=d):d=e[20],d}function Y(t){return t.items}function z(t){return t.nextCursor}function B(t){return[["title"],["description"],["id"],["server","name"]].map(e=>({field:e,operator:"contains",value:t}))}function Z(t){const e=new Map;for(const l of t){const r=A(l),n=e.get(r);n?n.push(l):e.set(r,[l])}const s=[],o=new Set;for(const l of t){const r=A(l);if(o.has(r))continue;o.add(r);const n=e.get(r),a=n[0];n.length===1?s.push({type:"single",connection:a}):s.push({type:"group",key:r,icon:a.icon,title:a.app_name?a.title.replace(/\s*\(\d+\)\s*$/,""):a.title,connections:n})}return s}function ee(t){const e=D.c(43),{connection:s,onClick:o,headerActions:l,headerActionsAlwaysVisible:r,footer:n,className:a,fallbackIcon:u,selected:i}=t,p=r===void 0?!1:r,m=K(),f=o&&"cursor-pointer hover:bg-muted/50";let d;e[0]!==a||e[1]!==f?(d=$("transition-colors group overflow-hidden flex flex-col h-full",f,a),e[0]=a,e[1]=f,e[2]=d):d=e[2];const I=o?"button":void 0,_=o?0:void 0,T=o&&i!==void 0?i:void 0;let g;e[3]!==o?(g=o?L=>{L.target===L.currentTarget&&(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),o())}:void 0,e[3]=o,e[4]=g):g=e[4];let x;e[5]!==s.icon||e[6]!==s.title||e[7]!==u?(x=c.jsx(V,{icon:s.icon,name:s.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:u}),e[5]=s.icon,e[6]=s.title,e[7]=u,e[8]=x):x=e[8];let h;e[9]!==l||e[10]!==p?(h=l&&c.jsx("div",{className:$("transition-opacity",!p&&"sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"),onClick:Q,children:l}),e[9]=l,e[10]=p,e[11]=h):h=e[11];let v;e[12]!==h?(v=c.jsx("div",{className:"relative",children:h}),e[12]=h,e[13]=v):v=e[13];let N;e[14]!==v||e[15]!==x?(N=c.jsxs("div",{className:"flex items-start justify-between",children:[x,v]}),e[14]=v,e[15]=x,e[16]=N):N=e[16];let y;e[17]!==s.title?(y=c.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[17]=s.title,e[18]=y):y=e[18];let P;e[19]!==s.description||e[20]!==m?(P=s.description||m("connections.connectionCard.noDescription"),e[19]=s.description,e[20]=m,e[21]=P):P=e[21];let j;e[22]!==P?(j=c.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:P}),e[22]=P,e[23]=j):j=e[23];let C;e[24]!==y||e[25]!==j?(C=c.jsxs("div",{className:"flex flex-col gap-1",children:[y,j]}),e[24]=y,e[25]=j,e[26]=C):C=e[26];let b;e[27]!==N||e[28]!==C?(b=c.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[N,C]}),e[27]=N,e[28]=C,e[29]=b):b=e[29];let k;e[30]!==n?(k=n&&c.jsx("div",{className:"border-t border-border mt-auto",children:c.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:G,children:n})}),e[30]=n,e[31]=k):k=e[31];let w;e[32]!==b||e[33]!==k?(w=c.jsxs("div",{className:"flex flex-col flex-1",children:[b,k]}),e[32]=b,e[33]=k,e[34]=w):w=e[34];let E;return e[35]!==o||e[36]!==w||e[37]!==d||e[38]!==I||e[39]!==_||e[40]!==T||e[41]!==g?(E=c.jsx(q,{className:d,onClick:o,role:I,tabIndex:_,"aria-pressed":T,onKeyDown:g,children:w}),e[35]=o,e[36]=w,e[37]=d,e[38]=I,e[39]=_,e[40]=T,e[41]=g,e[42]=E):E=e[42],E}function G(t){return t.stopPropagation()}function Q(t){return t.stopPropagation()}export{ee as C,Z as g,W as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{au as ve,bN as Oe,bO as Me,av as de,bM as ze,c as U,b as V,j as t,h as Ne,B,r as Z,l as Se,X as te,a2 as Ee,D as me,K as ee,d as se,p as ye,ak as _e,e_ as Re,n as Ue,fl as ue,R as Fe,I as Ve,F as Le,H as Be,G as xe,E as qe,f as Ge,fu as He,o as Ke,at as Xe,as as Qe,t as J}from"./index-D7hYEfbN.js";import{g as We}from"./extract-connection-data-zlkqkzoy.js";import{E as Ce}from"./empty-state-Ba4Lmj53.js";import{E as Ye,c as Je,r as Ze,b as et,d as tt}from"./connection-form-helpers-BxVe0XvV.js";import{c as st,S as nt,D as it}from"./index-BX4WRpMk.js";import{u as we,T as ot}from"./use-mcp-auth-status-BtDthgG6.js";import{a as at}from"./use-members-CBbGro39.js";import{A as lt}from"./avatar-DPiZM9JI.js";import{a as ke,b as Ie,u as rt}from"./use-connection-Roi-SyxA.js";import{u as Te}from"./use-mcp-client-Dv0wmo61.js";import{u as ct}from"./use-mcp-tools-DjBYc1XK.js";import{a as dt}from"./use-mcp-prompts-DaqWVfi5.js";import{i as mt,a as ut}from"./mcp-oauth-q_WDhaFd.js";import{I as ae}from"./integration-icon-51EB-LjE.js";import{s as xt}from"./Plus-CLQei2e6.js";import{bb as pt,aw as ft,bv as ht,q as ne}from"./agent-icon-1OqzsUAE.js";import{a as Ae,f as gt,s as jt}from"./Tool01-DyzplouF.js";import{s as re}from"./Trash01-B2AvA9FK.js";import{b as bt,a as vt,c as Nt,S as St,d as yt}from"./sheet-Bp0OaYM9.js";import{F as G,b as H,c as K,d as L,f as X,e as _t,a as Ct}from"./form-es3qsNvx.js";import{I as W}from"./input-B5SM5NFH.js";import{u as wt,D as kt}from"./use-delete-connection-BHS_Ab_3.js";import{c as It,B as Tt,a as At,C as Pt}from"./monitoring-stats-row-D91cPMXx.js";import{d as Dt,C as $t,a as Ot}from"./chart-CdkOOcwe.js";import{b as Mt}from"./repository-binding-BPtbugRj.js";import{T as ie,a as zt,c as oe,b as Et}from"./tabs-PK9QS4Is.js";import{g as Pe}from"./connection-slug-CITJ0kGN.js";import{n as Rt}from"./ShoppingBag01-DJPwdB_I.js";import{g as ce}from"./types-DCK-IvKM.js";import{M as Ut}from"./mcp-app-renderer-B-h9M4vf.js";import{C as Ft}from"./collection-search-Daq9kKuN.js";import{B as Vt}from"./badge-C70X12A9.js";import{S as pe,b as fe,a as he,d as ge,c as q}from"./select-Bo385QnQ.js";import{i as Lt}from"./CheckCircle-DP_Yeb-b.js";import{t as Bt}from"./ChevronUp-BUjD5px7.js";import{n as qt}from"./LinkBroken01-FGx4hlpz.js";import{c as Gt}from"./UserSquare-CI-KdVX2.js";import{s as Ht}from"./XClose-KUaLXy6Q.js";import{p as Kt,i as Xt}from"./connection-CAG14zGZ.js";import"./metadata-D72DunRR.js";import"./Key01-DwEPbnXb.js";import"./auth-Be85fS22.js";import"./index-DtMNfpk7.js";import"./index-BsC6xORW.js";import"./index-CYlLocPz.js";import"./popover-Ddsbw8vr.js";import"./tooltip-Ch7JwSjZ.js";import"./index-0zdxHEgU.js";import"./Check-BhlN5Gfa.js";import"./SearchMd-B4g7zoIg.js";import"./use-mobile-DrPHToxA.js";import"./use-create-virtual-mcp-ylON-lmG.js";import"./use-navigate-to-agent-B6Jnpp7k.js";import"./thread-intent-DD3seycr.js";import"./backoff-8mStPHYB.js";import"./task-board-B1uWZU9K.js";import"./schema-gvXoFVGC.js";import"./slugify-CEUa2lfQ.js";import"./Image01-jyAhhinO.js";import"./use-org-auth-client-CwT9KERJ.js";import"./User01-DuKYzVz8.js";import"./AlertCircle-3t4CitpU.js";import"./ArrowUp-DQk9lIXC.js";import"./ArrowLeft-BbJmgkdx.js";import"./ZoomOut-B0FMI__D.js";import"./Building02-FDWlk2dX.js";import"./Copy01-B7ecNUq1.js";import"./CreditCard01-DylNWQDW.js";import"./DotsVertical-CMBMcjBX.js";import"./Palette-92eAR3c0.js";import"./Link01-D8H87QlU.js";import"./LinkExternal01-Chk3wQjH.js";import"./Monitor01-C4DfOzWo.js";import"./Sun-D28dVpFO.js";import"./Upload01-_iBVm55R.js";import"./Users01-utuHNJ9R.js";import"./X-BQXAAYgl.js";import"./label-BkKmAPrZ.js";import"./alert-dialog-BfxfbeRo.js";import"./CartesianChart-BJJpA_Vw.js";import"./XAxis-OsjV83Ou.js";import"./AreaChart-B9ltWb3N.js";import"./ErrorBarContext-DYl-NvRS.js";import"./Sector-D4jvfeB8.js";const Qt=ve({scopes:ze(de()).describe("List of scopes available"),stateSchema:Oe(de(),Me()).describe("JSON Schema (draft-07) defining the state structure")}),Wt=[{name:"MCP_CONFIGURATION",inputSchema:ve({}),outputSchema:Qt}];function Yt(s){const e=U.c(61),{instance:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l}=s,o=V();let r;e[0]!==n.id?(r={connectionId:n.id},e[0]=n.id,e[1]=r):r=e[1];const d=we(r),m=!(n.connection_type==="VIRTUAL")&&d.supportsOAuth&&!d.isAuthenticated,p=n.status!=="active",x=m||p?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==x?(h=Se("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",x),e[2]=x,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let j;e[7]!==n.title?(j=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=j):j=e[8];let S;e[9]!==n.status||e[10]!==p||e[11]!==m||e[12]!==o?(S=m?t.jsx("span",{className:"text-xs text-destructive font-medium",children:o("details.connectionInstancesPanel.needsAuthorization")}):p?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?o("details.connectionInstancesPanel.disabledError"):o("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=p,e[11]=m,e[12]=o,e[13]=S):S=e[13];let y;e[14]!==j||e[15]!==S?(y=t.jsxs("div",{className:"flex-1 min-w-0",children:[j,S]}),e[14]=j,e[15]=S,e[16]=y):y=e[16];let _;e[17]!==n||e[18]!==m||e[19]!==a||e[20]!==o?(_=m&&t.jsx(B,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>a(n),children:o("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=m,e[19]=a,e[20]=o,e[21]=_):_=e[21];let C;e[22]!==n||e[23]!==p||e[24]!==l||e[25]!==o?(C=p?t.jsxs(B,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>l(n,"active"),children:[t.jsx(pt,{size:13}),o("details.connectionInstancesPanel.enable")]}):t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>l(n,"inactive"),title:o("details.connectionInstancesPanel.disable"),"aria-label":o("details.connectionInstancesPanel.disable"),children:t.jsx(ft,{size:13})}),e[22]=n,e[23]=p,e[24]=l,e[25]=o,e[26]=C):C=e[26];let $;e[27]!==n||e[28]!==c?($=()=>c(n),e[27]=n,e[28]=c,e[29]=$):$=e[29];let w;e[30]!==o?(w=o("details.connectionInstancesPanel.configure"),e[30]=o,e[31]=w):w=e[31];let M;e[32]!==o?(M=o("details.connectionInstancesPanel.configure"),e[32]=o,e[33]=M):M=e[33];let A;e[34]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Ae,{size:13}),e[34]=A):A=e[34];let O;e[35]!==$||e[36]!==w||e[37]!==M?(O=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:$,title:w,"aria-label":M,children:A}),e[35]=$,e[36]=w,e[37]=M,e[38]=O):O=e[38];let I;e[39]!==n||e[40]!==i?(I=()=>i(n),e[39]=n,e[40]=i,e[41]=I):I=e[41];let v;e[42]!==o?(v=o("details.connectionInstancesPanel.delete"),e[42]=o,e[43]=v):v=e[43];let b;e[44]!==o?(b=o("details.connectionInstancesPanel.delete"),e[44]=o,e[45]=b):b=e[45];let E;e[46]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(re,{size:13}),e[46]=E):E=e[46];let z;e[47]!==I||e[48]!==v||e[49]!==b?(z=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:I,title:v,"aria-label":b,children:E}),e[47]=I,e[48]=v,e[49]=b,e[50]=z):z=e[50];let k;e[51]!==O||e[52]!==z||e[53]!==_||e[54]!==C?(k=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[_,C,O,z]}),e[51]=O,e[52]=z,e[53]=_,e[54]=C,e[55]=k):k=e[55];let P;return e[56]!==k||e[57]!==h||e[58]!==g||e[59]!==y?(P=t.jsxs("div",{className:h,children:[g,y,k]}),e[56]=k,e[57]=h,e[58]=g,e[59]=y,e[60]=P):P=e[60],P}function Jt(s){const e=U.c(21),{instance:n,onConfigure:c}=s,a=V();let i;e[0]!==n.icon||e[1]!==n.title?(i=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=i):i=e[2];let l;e[3]!==n.title?(l=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=l):l=e[4];let o;e[5]!==n||e[6]!==c?(o=()=>c(n),e[5]=n,e[6]=c,e[7]=o):o=e[7];let r;e[8]!==a?(r=a("details.connectionInstancesPanel.configure"),e[8]=a,e[9]=r):r=e[9];let d;e[10]!==a?(d=a("details.connectionInstancesPanel.configure"),e[10]=a,e[11]=d):d=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ae,{size:13}),e[12]=u):u=e[12];let m;e[13]!==o||e[14]!==r||e[15]!==d?(m=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:o,title:r,"aria-label":d,children:u})}),e[13]=o,e[14]=r,e[15]=d,e[16]=m):m=e[16];let p;return e[17]!==i||e[18]!==l||e[19]!==m?(p=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,l,m]}),e[17]=i,e[18]=l,e[19]=m,e[20]=p):p=e[20],p}function Zt(s){const e=U.c(33),{instances:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l,onAdd:o,isAdding:r}=s,d=V();if(n.length===0)return null;let u;e[0]!==n.length||e[1]!==d?(u=n.length===1?d("details.connectionInstancesPanel.instance"):d("details.connectionInstancesPanel.instances"),e[0]=n.length,e[1]=d,e[2]=u):u=e[2];let m;e[3]!==u?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[3]=u,e[4]=m):m=e[4];let p;e[5]!==r?(p=r?t.jsx(Ne,{className:"size-[13px]"}):t.jsx(xt,{size:13}),e[5]=r,e[6]=p):p=e[6];let x;e[7]!==d?(x=d("details.connectionInstancesPanel.addInstance"),e[7]=d,e[8]=x):x=e[8];let h;e[9]!==r||e[10]!==o||e[11]!==p||e[12]!==x?(h=t.jsxs(B,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:o,disabled:r,children:[p,x]}),e[9]=r,e[10]=o,e[11]=p,e[12]=x,e[13]=h):h=e[13];let g;e[14]!==m||e[15]!==h?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[m,h]}),e[14]=m,e[15]=h,e[16]=g):g=e[16];let j;if(e[17]!==n||e[18]!==a||e[19]!==c||e[20]!==i||e[21]!==l){let _;e[23]!==a||e[24]!==c||e[25]!==i||e[26]!==l?(_=C=>t.jsx(Z.Suspense,{fallback:t.jsx(Jt,{instance:C,onConfigure:c}),children:t.jsx(Yt,{instance:C,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l})},C.id),e[23]=a,e[24]=c,e[25]=i,e[26]=l,e[27]=_):_=e[27],j=n.map(_),e[17]=n,e[18]=a,e[19]=c,e[20]=i,e[21]=l,e[22]=j}else j=e[22];let S;e[28]!==j?(S=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:j}),e[28]=j,e[29]=S):S=e[29];let y;return e[30]!==g||e[31]!==S?(y=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[g,S]}),e[30]=g,e[31]=S,e[32]=y):y=e[32],y}function es(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const a=(c.errorMessage??"").trim()||"Unknown error";n.set(a,(n.get(a)??0)+1)}return[...n.entries()].map(([c,a])=>({message:c,count:a})).sort((c,a)=>a.count-c.count).slice(0,e)}const ts=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function ss(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const ns={calls:{label:"Tool calls"},errors:{label:"Errors"}};function is(s){const e=U.c(4),{connectionId:n,orgId:c,timeframe:a}=s,i=V(),l=Ee(),o=ss(a),{data:r}=me({queryKey:ee.connectionActivity(n,a,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),{data:d}=me({queryKey:ee.connectionActivityErrors(n,a,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),connectionId:n,isError:!0,limit:1,offset:0}),staleTime:3e5}),u=It(r?.logs??[],o,void 0,r?.total,d?.total),m=u.data,p=u.totalCalls>0,x=es(r?.logs??[]),h=u.totalCalls>0?Math.round(u.totalErrors/u.totalCalls*100):0;let g;e[0]!==i?(g=i("details.connectionActivity.toolCalls"),e[0]=i,e[1]=g):g=e[1];let j;return e[2]!==g?(j=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:g}),e[2]=g,e[3]=j):j=e[3],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:u.totalCalls.toLocaleString()}),j]}),u.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:u.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),u.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(u.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),p?t.jsxs("div",{children:[t.jsx(Dt,{config:ns,className:"h-16 w-full",children:t.jsxs(Tt,{data:m,barCategoryGap:"4%",children:[t.jsx($t,{content:t.jsx(Ot,{labelFormatter:ls}),cursor:{fill:"var(--muted)"}}),t.jsx(At,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:m.map(as)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:m[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:m[m.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:i("details.connectionActivity.noActivityInThisPeriod")})}),x.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:[i("details.connectionActivity.topErrors"),h>0?` · ${i("details.connectionActivity.errorRatePercentage",{errorRate:h.toString()})}`:""]}),t.jsx("ul",{className:"space-y-1.5",children:x.map(os)})]})]})}function os(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function as(s,e){return t.jsx(Pt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function ls(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function rs(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function cs(s){const e=U.c(22),{connectionId:n}=s,c=V(),[a,i]=Z.useState("14d"),{org:l}=te();let o;e[0]!==c?(o=c("details.connectionActivity.activity"),e[0]=c,e[1]=o):o=e[1];let r;e[2]!==o?(r=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o})}),e[2]=o,e[3]=r):r=e[3];let d;e[4]!==c?(d=c("details.connectionActivity.timeframe"),e[4]=c,e[5]=d):d=e[5];let u;e[6]!==a?(u=ts.map(j=>t.jsx("button",{type:"button","aria-pressed":a===j.value,onClick:()=>i(j.value),className:Se("px-2.5 py-1 text-xs font-medium rounded-lg transition-colors",a===j.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:j.label},j.value)),e[6]=a,e[7]=u):u=e[7];let m;e[8]!==d||e[9]!==u?(m=t.jsx("div",{role:"group","aria-label":d,className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:u}),e[8]=d,e[9]=u,e[10]=m):m=e[10];let p;e[11]!==r||e[12]!==m?(p=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[r,m]}),e[11]=r,e[12]=m,e[13]=p):p=e[13];let x;e[14]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rs,{}),e[14]=x):x=e[14];let h;e[15]!==n||e[16]!==l.id||e[17]!==a?(h=t.jsx(Z.Suspense,{fallback:x,children:t.jsx(is,{connectionId:n,orgId:l.id,timeframe:a})}),e[15]=n,e[16]=l.id,e[17]=a,e[18]=h):h=e[18];let g;return e[19]!==p||e[20]!==h?(g=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[p,h]}),e[19]=p,e[20]=h,e[21]=g):g=e[21],g}function ds(s){const e=U.c(15),{virtualMcp:n,org:c}=s,a=se();let i;e[0]!==a||e[1]!==c||e[2]!==n.id?(i=()=>{const m=crypto.randomUUID();a({to:"/$org/projects/$agentId",params:{org:c,agentId:n.id},search:{thread:m}})},e[0]=a,e[1]=c,e[2]=n.id,e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ye,{size:16}),e[4]=l):l=e[4];let o;e[5]!==n.icon||e[6]!==n.title?(o=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:l}),e[5]=n.icon,e[6]=n.title,e[7]=o):o=e[7];let r;e[8]!==n.title?(r=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=r):r=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(_e,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=d):d=e[10];let u;return e[11]!==i||e[12]!==o||e[13]!==r?(u=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[o,r,d]}),e[11]=i,e[12]=o,e[13]=r,e[14]=u):u=e[14],u}function ms(s){const e=U.c(7),{virtualMcps:n,org:c}=s;let a;if(e[0]!==c||e[1]!==n){let l;e[3]!==c?(l=o=>t.jsx(ds,{virtualMcp:o,org:c},o.id),e[3]=c,e[4]=l):l=e[4],a=n.map(l),e[0]=c,e[1]=n,e[2]=a}else a=e[2];let i;return e[5]!==a?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:a})}),e[5]=a,e[6]=i):i=e[6],i}function us(s){const e=U.c(13),{connection:n}=s,c=V(),{org:a}=te();let i;e[0]!==n.id?(i={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=i):i=e[1];const l=Mt(i);if(!(l.length>0)){let p;return e[2]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(t.Fragment,{}),e[2]=p):p=e[2],p}let r;e[3]!==c?(r=c("details.connectionAgentsPanel.usedByAgents"),e[3]=c,e[4]=r):r=e[4];let d;e[5]!==r?(d=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:r})}),e[5]=r,e[6]=d):d=e[6];let u;e[7]!==a.slug||e[8]!==l?(u=t.jsx("div",{className:"px-5 py-4",children:t.jsx(ms,{virtualMcps:l,org:a.slug})}),e[7]=a.slug,e[8]=l,e[9]=u):u=e[9];let m;return e[10]!==d||e[11]!==u?(m=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[d,u]}),e[10]=d,e[11]=u,e[12]=m):m=e[12],m}function xs(s){const e=U.c(35),{tools:n,connectionId:c,org:a}=s,i=V(),l=se(),{org:o}=te();let r;e[0]!==c||e[1]!==o.id||e[2]!==o.slug?(r={connectionId:c,orgId:o.id,orgSlug:o.slug},e[0]=c,e[1]=o.id,e[2]=o.slug,e[3]=r):r=e[3];const d=Te(r),u=ke(c);let m;e[4]!==u||e[5]!==c?(m=u?Pe(u):c,e[4]=u,e[5]=c,e[6]=m):m=e[6];const p=m,[x,h]=Z.useState("");let g,j,S,y;if(e[7]!==p||e[8]!==d||e[9]!==l||e[10]!==a||e[11]!==x||e[12]!==i||e[13]!==n){const $=(n??[]).filter(ps),w=x.toLowerCase().trim(),M=w?$.filter(b=>b.name.toLowerCase().includes(w)||b.description&&b.description.toLowerCase().includes(w)):$;let A;e[18]!==p||e[19]!==l||e[20]!==a?(A=b=>{l({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:a,appSlug:p,collectionName:"tools",itemId:encodeURIComponent(b.name)}})},e[18]=p,e[19]=l,e[20]=a,e[21]=A):A=e[21];const O=A;S="flex flex-col h-full overflow-hidden";let I;e[22]!==i?(I=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=I):I=e[23];let v;e[24]===Symbol.for("react.memo_cache_sentinel")?(v=b=>{b.key==="Escape"&&(h(""),b.target.blur())},e[24]=v):v=e[24],e[25]!==x||e[26]!==I?(y=t.jsx(Ft,{value:x,onChange:h,placeholder:I,onKeyDown:v}),e[25]=x,e[26]=I,e[27]=y):y=e[27],g="flex-1 overflow-auto p-5",j=M.length===0?t.jsx(Ce,{image:null,title:i(x?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(x?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:M.map(b=>{const E=ce(b._meta);return t.jsxs(Re,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>O(b),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Ut,{resourceURI:E,toolInfo:{tool:b},displayMode:"inline",minHeight:200,maxHeight:200,client:d})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:b.annotations?.title??b.name}),t.jsx(ot,{annotations:b.annotations,_meta:b._meta})]}),b.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:b.description})]})]},b.name)})}),e[7]=p,e[8]=d,e[9]=l,e[10]=a,e[11]=x,e[12]=i,e[13]=n,e[14]=g,e[15]=j,e[16]=S,e[17]=y}else g=e[14],j=e[15],S=e[16],y=e[17];let _;e[28]!==g||e[29]!==j?(_=t.jsx("div",{className:g,children:j}),e[28]=g,e[29]=j,e[30]=_):_=e[30];let C;return e[31]!==S||e[32]!==y||e[33]!==_?(C=t.jsxs("div",{className:S,children:[y,_]}),e[31]=S,e[32]=y,e[33]=_,e[34]=C):C=e[34],C}function ps(s){return!!ce(s._meta)}const je=[];function De(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=l=>l.charAt(0).toUpperCase()+l.slice(1),c=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),a=e.map(n),i=e[e.length-1];return a.length>=2&&i&&c.has(i)?[a.pop(),...a].join(" "):a.join(" ")}function le(s){const e=U.c(5),{label:n}=s,c=V();let a;e[0]!==n||e[1]!==c?(a=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=a):a=e[2];let i;return e[3]!==a?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:a})}),e[3]=a,e[4]=i):i=e[4],i}function fs(s){const e=U.c(68),{tools:n,prompts:c,resources:a,connectionId:i,org:l}=s,o=c===void 0?je:c,r=a===void 0?je:a,d=V(),u=se(),m=ke(i??"");let p;e[0]!==m||e[1]!==i?(p=m?Pe(m):i,e[0]=m,e[1]=i,e[2]=p):p=e[2];const x=p;let h;e[3]!==x||e[4]!==i||e[5]!==u||e[6]!==l?(h=function(T){!i||!l||u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:x,collectionName:"tools",itemId:encodeURIComponent(T)}})},e[3]=x,e[4]=i,e[5]=u,e[6]=l,e[7]=h):h=e[7];const g=h;let j;e[8]!==i||e[9]!==l||e[10]!==n?(j=i&&l&&n.some(js),e[8]=i,e[9]=l,e[10]=n,e[11]=j):j=e[11];const S=j;if(n.length+o.length+r.length===0){let N;e[12]!==d?(N=d("details.connectionCapabilities.capabilities"),e[12]=d,e[13]=N):N=e[13];let T;e[14]!==N?(T=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:N}),e[14]=N,e[15]=T):T=e[15];let D;e[16]!==d?(D=d("details.connectionCapabilities.noCapabilitiesDiscovered"),e[16]=d,e[17]=D):D=e[17];let F;e[18]!==D?(F=t.jsx("p",{className:"text-sm text-muted-foreground",children:D}),e[18]=D,e[19]=F):F=e[19];let Q;return e[20]!==T||e[21]!==F?(Q=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[T,F]}),e[20]=T,e[21]=F,e[22]=Q):Q=e[22],Q}let _;e[23]!==d||e[24]!==n.length?(_=d("details.connectionCapabilities.toolsTab",{count:n.length}),e[23]=d,e[24]=n.length,e[25]=_):_=e[25];let C;e[26]!==_?(C=t.jsx(ie,{value:"tools",variant:"underline",children:_}),e[26]=_,e[27]=C):C=e[27];let $;e[28]!==S||e[29]!==d?($=S&&t.jsx(ie,{value:"apps",variant:"underline",children:d("details.connectionCapabilities.uiTab")}),e[28]=S,e[29]=d,e[30]=$):$=e[30];let w;e[31]!==d?(w=d("details.connectionCapabilities.promptsTab"),e[31]=d,e[32]=w):w=e[32];let M;e[33]!==w?(M=t.jsx(ie,{value:"prompts",variant:"underline",children:w}),e[33]=w,e[34]=M):M=e[34];let A;e[35]!==d?(A=d("details.connectionCapabilities.resourcesTab"),e[35]=d,e[36]=A):A=e[36];let O;e[37]!==A?(O=t.jsx(ie,{value:"resources",variant:"underline",children:A}),e[37]=A,e[38]=O):O=e[38];let I;e[39]!==M||e[40]!==O||e[41]!==C||e[42]!==$?(I=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(zt,{variant:"underline",className:"gap-1",children:[C,$,M,O]})}),e[39]=M,e[40]=O,e[41]=C,e[42]=$,e[43]=I):I=e[43];let v;e[44]!==g||e[45]!==n?(v=n.length>0?n.map(N=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>g(N.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(gt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:De(N.name)}),N.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:N.description})]}),t.jsx(_e,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},N.name)):t.jsx(le,{label:"tools"}),e[44]=g,e[45]=n,e[46]=v):v=e[46];let b;e[47]!==v?(b=t.jsx(oe,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:v})}),e[47]=v,e[48]=b):b=e[48];let E;e[49]!==i||e[50]!==S||e[51]!==l||e[52]!==n?(E=S&&t.jsx(oe,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(xs,{tools:n,connectionId:i,org:l})}),e[49]=i,e[50]=S,e[51]=l,e[52]=n,e[53]=E):E=e[53];let z;e[54]!==o?(z=o.length>0?o.map(gs):t.jsx(le,{label:"prompts"}),e[54]=o,e[55]=z):z=e[55];let k;e[56]!==z?(k=t.jsx(oe,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:z})}),e[56]=z,e[57]=k):k=e[57];let P;e[58]!==r?(P=r.length>0?r.map(hs):t.jsx(le,{label:"resources"}),e[58]=r,e[59]=P):P=e[59];let R;e[60]!==P?(R=t.jsx(oe,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:P})}),e[60]=P,e[61]=R):R=e[61];let f;return e[62]!==I||e[63]!==b||e[64]!==E||e[65]!==k||e[66]!==R?(f=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(Et,{defaultValue:"tools",variant:"underline",children:[I,b,E,k,R]})}),e[62]=I,e[63]=b,e[64]=E,e[65]=k,e[66]=R,e[67]=f):f=e[67],f}function hs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(ht,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function gs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Rt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:De(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function js(s){return ce(s._meta)}function bs(s){const e=U.c(13),{connection:n,displayTitle:c}=s,a=c??n.title;let i;e[0]!==n.icon||e[1]!==a?(i=t.jsx(ae,{icon:n.icon,name:a,size:"md",className:"shrink-0"}),e[0]=n.icon,e[1]=a,e[2]=i):i=e[2];let l;e[3]!==a?(l=t.jsx(Ue.Title,{children:a}),e[3]=a,e[4]=l):l=e[4];let o;e[5]!==n.description?(o=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=o):o=e[6];let r;e[7]!==l||e[8]!==o?(r=t.jsxs("div",{className:"flex-1 min-w-0",children:[l,o]}),e[7]=l,e[8]=o,e[9]=r):r=e[9];let d;return e[10]!==i||e[11]!==r?(d=t.jsxs("div",{className:"flex items-center px-4 md:px-8 bg-background border-b border-border shrink-0 gap-3 py-4",children:[i,r]}),e[10]=i,e[11]=r,e[12]=d):d=e[12],d}function vs({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:a}){const i=V(),l=ue({control:s.control,name:"ui_type"}),o=ue({control:s.control,name:"connection_url"}),{stdioEnabled:r}=Fe(),d=(()=>{if(typeof o!="string"||!o)return!1;try{const x=new URL(o);return x.hostname==="api.githubcopilot.com"&&x.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),u=r||e.connection_type==="STDIO",m=e.connection_type==="VIRTUAL",p=m?Kt(e.connection_url):null;return m?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.type")}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(ye,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:i("details.connectionSidebar.virtualMcp")})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.virtualMcpDescription")})]}),p&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.virtualMcpId")}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:p})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(G,{control:s.control,name:"ui_type",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.connection")}),l!=="NPX"&&l!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(pe,{value:x.value,onValueChange:x.onChange,children:[t.jsx(L,{children:t.jsxs(fe,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(ne,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(he,{})]})}),t.jsxs(ge,{children:[t.jsx(q,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(q,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(q,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),u&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(q,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(G,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(H,{className:"flex-1 min-w-0",children:t.jsx(L,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.urlPlaceholder"),...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(pe,{value:x.value,onValueChange:x.onChange,children:[t.jsx(L,{children:t.jsx(fe,{className:"h-10",children:t.jsx(he,{})})}),t.jsxs(ge,{children:[t.jsx(q,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(q,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(q,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),u&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(qt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(q,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Gt,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(X,{})]})}),l==="NPX"&&t.jsx(G,{control:s.control,name:"npx_package",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(L,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),l==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(G,{control:s.control,name:"stdio_command",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(L,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),t.jsx(G,{control:s.control,name:"stdio_args",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(L,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(X,{})]})})]}),t.jsx(G,{control:s.control,name:"stdio_cwd",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(L,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})})]}),(l==="NPX"||l==="STDIO")&&t.jsx(G,{control:s.control,name:"env_vars",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(L,{children:t.jsx(Ye,{value:x.value??[],onChange:x.onChange})}),t.jsx(X,{})]})}),l!=="NPX"&&l!=="STDIO"&&t.jsx(G,{control:s.control,name:"connection_token",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i(d?"details.connectionSidebar.githubPersonalAccessToken":"details.connectionSidebar.token")}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Ve,{children:[t.jsx(Le,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Vt,{variant:"success",className:"gap-1.5",children:[t.jsx(Lt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Bt,{size:12})]})})}),t.jsxs(Be,{align:"start",children:[t.jsxs(xe,{onClick:c,children:[t.jsx(jt,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(xe,{variant:"destructive",onClick:a,children:[t.jsx(re,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&x.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>x.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity rounded-lg",title:i("details.connectionSidebar.clearAndReplaceToken"),"aria-label":i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(Ht,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(L,{children:t.jsx(W,{type:"password",placeholder:i(d?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),d&&t.jsxs(_t,{children:[i("details.connectionSidebar.createAPatAt")," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(X,{})]})})]})}function Ns(s){return s.command==="npx"}function Ss(s){return s.args?.find(e=>!e.startsWith("-"))??""}function ys(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function be(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Xt(s.connection_headers)){const c=s.connection_headers,a=Ze(c.envVars);if(Ns(c)){const l=Ss(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:l,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:a}}const i=ys(c);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:i.command,stdio_args:i.args,stdio_cwd:i.cwd,env_vars:a}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function _s(s){let e,n=null,c=!1,a=null,i=null;return s.ui_type==="NPX"?(e="STDIO",n="",i=et(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",i=tt(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",c=s.connection_token!==null&&s.connection_token!==void 0,a=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...c&&{connection_token:a},...i&&{connection_headers:i},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function Cs({connection:s,connectionId:e,org:n,isUpdating:c,tools:a,prompts:i,resources:l,siblings:o}){const r=V(),d=se({from:"/$org/settings/connections/$appSlug"}),u=Ke(),m=Ie(),{org:p}=te(),x=wt({onSuccess:()=>{o.length<=1&&d({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=Z.useState(null),[j,S]=Z.useState(!1),y=we({connectionId:e}),{data:_}=at(),C=_?.data?.members??[],$=h??s,w=C.find(f=>f.userId===$.created_by),A=s?.connection_type==="VIRTUAL"||y.isAuthenticated,O={...s,tools:a},I=st(O,Wt),v=Xe({resolver:Qe(Je),values:be(h??s)}),b=v.formState.isDirty,E=async()=>{if(!await v.trigger())return;const N=v.getValues(),T=_s(N),D=h?.id??e;await m.update.mutateAsync({id:D,data:T}),v.reset(N)},z=()=>{v.reset(be(h??s))},k=async f=>{const N=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:T,tokenInfo:D,error:F}=await ut({connectionId:f,orgSlug:p.slug,...N?{scope:N}:{}});if(F||!T){J.error(r("details.connection.authFailed",{error:F??""}));return}if(D)try{const Y=await fetch(`/api/${p.slug}/connections/${f}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:D.accessToken,refreshToken:D.refreshToken,expiresIn:D.expiresIn,scope:D.scope,clientId:D.clientId,clientSecret:D.clientSecret,tokenEndpoint:D.tokenEndpoint})});if(!Y.ok)console.error("Failed to save OAuth token:",await Y.text()),await m.update.mutateAsync({id:f,data:{connection_token:T}});else try{await m.update.mutateAsync({id:f,data:{}})}catch($e){console.warn("Failed to refresh connection tools after OAuth:",$e)}}catch(Y){console.error("Error saving OAuth token:",Y),await m.update.mutateAsync({id:f,data:{connection_token:T}})}else await m.update.mutateAsync({id:f,data:{connection_token:T}});const Q=new URL(`/api/${p.slug}/mcp/${f}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(Q.href,null)}),await u.invalidateQueries({queryKey:ee.mcpClientPrefix()}),J.success(r("details.connection.authSuccess"))},P=()=>k(s.id),R=async()=>{try{const f=await fetch(`/api/${p.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!f.ok){const T=await f.text();J.error(r("details.connection.failedRemoveOAuth",{error:T}));return}const N=new URL(`/api/${p.slug}/mcp/${s.id}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(N.href,null)}),J.success(r("details.connection.oauthRemoved"))}catch(f){console.error("Error removing OAuth token:",f),J.error(r("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(kt,{...x}),t.jsx(bt,{open:h!==null,onOpenChange:f=>{f||g(null)},children:t.jsxs(vt,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(Nt,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(St,{className:"text-base",children:h?.title??s.title}),t.jsx(yt,{className:"text-xs",children:r("details.connection.settingsDescription")}),w&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:r("details.connection.connectedBy")}),t.jsx(lt,{url:w.user?.image??void 0,fallback:w.user?.name??w.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:w.user?.name||w.user?.email})]})]}),t.jsxs(Ct,{...v,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(G,{control:v.control,name:"title",render:({field:f})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.nameLabel")}),t.jsx(L,{children:t.jsx(W,{...f})}),t.jsx(X,{})]})}),t.jsx(G,{control:v.control,name:"description",render:({field:f})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.descriptionLabel")}),t.jsx(L,{children:t.jsx(W,{...f,value:f.value||""})}),t.jsx(X,{})]})})]}),t.jsx(vs,{form:v,connection:h??s,hasOAuthToken:y.hasOAuthToken,onReauthenticate:P,onRemoveOAuth:R}),t.jsx(nt,{connection:h??s,form:v,hasMcpBinding:I,isMCPAuthenticated:A,supportsOAuth:y.supportsOAuth,isServerError:y.isServerError,onAuthenticate:P,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(B,{onClick:E,disabled:!b||c,className:"flex-1",children:r(c?"details.connection.savingButton":"details.connection.saveButton")}),b&&t.jsx(B,{variant:"outline",onClick:z,children:r("details.connection.undoButton")}),t.jsxs(B,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const f=h??s;g(null),x.requestDelete(f)},children:[t.jsx(re,{size:15}),r("details.connection.deleteButton")]})]})]},h?.id??s.id)]})}),t.jsx(it,{children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(bs,{connection:s,displayTitle:(()=>{const f=o[0]??s;return f.app_name?f.title.replace(/\s*\(\d+\)\s*$/,""):f.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(cs,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Zt,{instances:o,onConfigure:f=>g(f),onAuthenticate:f=>k(f.id),onDelete:f=>x.requestDelete(f),onToggleStatus:async(f,N)=>{try{await m.update.mutateAsync({id:f.id,data:{status:N}}),J.success(r(N==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{J.error(r("details.connection.failedUpdateConnection"))}},isAdding:j,onAdd:async()=>{S(!0);try{const f=o[0]??s,N=f.title.replace(/\s*\(\d+\)\s*$/,""),T=o.length+1,D=`${N} (${T})`,F=We("conn");await m.create.mutateAsync({id:F,title:D,description:f.description??null,connection_type:f.connection_type,connection_url:f.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:f.created_by,organization_id:f.organization_id,icon:f.icon??null,app_name:f.app_name??null,app_id:f.app_id??null,connection_headers:f.connection_headers??null,oauth_config:null,configuration_state:f.configuration_state??null,metadata:null,tools:null,bindings:null});const Q=new URL(`/api/${p.slug}/mcp/${F}`,window.location.origin),Y=await mt({url:Q.href,token:null,orgId:p.id});Y.supportsOAuth&&!Y.isAuthenticated&&await k(F)}finally{S(!1)}}}),t.jsx(us,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(fs,{tools:a,prompts:i,resources:l,connectionId:e,org:n})})]})})]})})]})}function ws(){const s=U.c(52),e=V();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/$org/settings/connections/$appSlug"},s[0]=n):n=s[0];const c=se(n);let a;s[1]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org/settings/connections/$appSlug"},s[1]=a):a=s[1];const{appSlug:i,org:l}=Ge(a),{org:o}=te(),r=Ie();let d;s[2]!==i?(d={slug:i},s[2]=i,s[3]=d):d=s[3];const u=rt(d),m=u[0]??null,p=m?.id??"",x=p||null;let h;s[4]!==o.id||s[5]!==o.slug||s[6]!==x?(h={connectionId:x,orgId:o.id,orgSlug:o.slug},s[4]=o.id,s[5]=o.slug,s[6]=x,s[7]=h):h=s[7];const g=Te(h);let j;s[8]!==g?(j={client:g},s[8]=g,s[9]=j):j=s[9];const{data:S}=ct(j);let y;if(s[10]!==m?.tools||s[11]!==p||s[12]!==u||s[13]!==S){const k=S?S.tools.map(Ds):(m?.tools??[]).map(Ps);e:{if(u.length<=1){y=k;break e}const P=new Set,R=[],f=Ts;for(const N of u){const T=N.id===p?k:f(N.tools);for(const D of T)P.has(D.name)||(P.add(D.name),R.push(D))}y=R.length>0?R:k}s[10]=m?.tools,s[11]=p,s[12]=u,s[13]=S,s[14]=y}else y=s[14];const _=y;let C;s[15]!==g?(C={client:g},s[15]=g,s[16]=C):C=s[16];const{data:$}=dt(C);let w;s[17]!==g?(w={client:g},s[17]=g,s[18]=w):w=s[18];const{data:M}=He(w);let A;s[19]!==$?.prompts?(A=$?.prompts??[],s[19]=$?.prompts,s[20]=A):A=s[20];let O;s[21]!==A?(O=A.map(Is),s[21]=A,s[22]=O):O=s[22];const I=O;let v;s[23]!==M?.resources?(v=M?.resources??[],s[23]=M?.resources,s[24]=v):v=s[24];let b;s[25]!==v?(b=v.map(ks),s[25]=v,s[26]=b):b=s[26];const E=b;if(!m){let k;s[27]!==e?(k=e("details.connection.notFoundTitle"),s[27]=e,s[28]=k):k=s[28];let P;s[29]!==e?(P=e("details.connection.notFoundDescription"),s[29]=e,s[30]=P):P=s[30];let R;s[31]!==c||s[32]!==l?(R=()=>c({to:"/$org/settings/connections",params:{org:l}}),s[31]=c,s[32]=l,s[33]=R):R=s[33];let f;s[34]!==e?(f=e("details.connection.backButton"),s[34]=e,s[35]=f):f=s[35];let N;s[36]!==R||s[37]!==f?(N=t.jsx(B,{variant:"outline",onClick:R,children:f}),s[36]=R,s[37]=f,s[38]=N):N=s[38];let T;return s[39]!==k||s[40]!==P||s[41]!==N?(T=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ce,{title:k,description:P,actions:N})}),s[39]=k,s[40]=P,s[41]=N,s[42]=T):T=s[42],T}let z;return s[43]!==r.update.isPending||s[44]!==_||s[45]!==m||s[46]!==p||s[47]!==l||s[48]!==I||s[49]!==E||s[50]!==u?(z=t.jsx(Cs,{org:l,connection:m,connectionId:p,isUpdating:r.update.isPending,tools:_,prompts:I,resources:E,siblings:u}),s[43]=r.update.isPending,s[44]=_,s[45]=m,s[46]=p,s[47]=l,s[48]=I,s[49]=E,s[50]=u,s[51]=z):z=s[51],z}function ks(s){return{name:s.name,description:s.description,uri:s.uri}}function Is(s){return{name:s.name,description:s.description}}function Ts(s){return(s??[]).map(As)}function As(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ps(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ds(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function $s(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(qe,{children:t.jsx(Z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Ne,{className:"size-8 text-muted-foreground"})}),children:t.jsx(ws,{})})}),s[0]=e):e=s[0],e}function mi(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx($s,{}),s[0]=e):e=s[0],e}export{mi as default};
|
|
1
|
+
import{au as ve,bN as Oe,bO as Me,av as de,bM as ze,c as U,b as V,j as t,h as Ne,B,r as Z,l as Se,X as te,a2 as Ee,D as me,K as ee,d as se,p as ye,ak as Ce,e$ as Re,n as Ue,fm as ue,R as Fe,I as Ve,F as Le,H as Be,G as xe,E as qe,f as Ge,fv as He,o as Ke,at as Xe,as as Qe,t as J}from"./index-BOGZM7Pw.js";import{g as We}from"./extract-connection-data-BZKTCWVm.js";import{E as _e}from"./empty-state-DdDKihxt.js";import{E as Ye,c as Je,r as Ze,b as et,d as tt}from"./connection-form-helpers-CFQwZ1sv.js";import{c as st,S as nt,D as it}from"./index-DlDzsxeJ.js";import{u as we,T as ot}from"./use-mcp-auth-status-CG-b2BD1.js";import{a as at}from"./use-members-CmQfPBAn.js";import{A as lt}from"./avatar-Bpp_lL_f.js";import{a as ke,b as Ie,u as rt}from"./use-connection-C4j2pJbz.js";import{u as Te}from"./use-mcp-client-9jF2B0Tz.js";import{u as ct}from"./use-mcp-tools-Dbm0kb0W.js";import{a as dt}from"./use-mcp-prompts-DNAsQeJA.js";import{i as mt,a as ut}from"./mcp-oauth-cSH4PfZY.js";import{I as ae}from"./integration-icon-DUuPtqFs.js";import{s as xt}from"./Plus-Dk5G0eGJ.js";import{bb as pt,aw as ft,bv as ht,q as ne}from"./agent-icon-QobcC4y1.js";import{a as Ae,f as gt,s as jt}from"./Tool01-CGCC9pfF.js";import{s as re}from"./Trash01-BA-bFjuS.js";import{b as bt,a as vt,c as Nt,S as St,d as yt}from"./sheet-DOIzAtMq.js";import{F as G,b as H,c as K,d as L,f as X,e as Ct,a as _t}from"./form-DXEENu_8.js";import{I as W}from"./input-C0ZWiiGy.js";import{u as wt,D as kt}from"./use-delete-connection-Cc8dNIWp.js";import{c as It,B as Tt,a as At,C as Pt}from"./monitoring-stats-row-CllZiW9E.js";import{d as Dt,C as $t,a as Ot}from"./chart-DBFqaeAD.js";import{b as Mt}from"./repository-binding-CEDkA6og.js";import{T as ie,a as zt,c as oe,b as Et}from"./tabs-BCc9oqWy.js";import{g as Pe}from"./connection-slug-CITJ0kGN.js";import{n as Rt}from"./ShoppingBag01-mUPmqGRd.js";import{g as ce}from"./types-BlCCVKMl.js";import{M as Ut}from"./mcp-app-renderer-CJ5u3TPG.js";import{C as Ft}from"./collection-search-BG7vK4NS.js";import{B as Vt}from"./badge-DTNkOzY0.js";import{S as pe,b as fe,a as he,d as ge,c as q}from"./select-CGC5E9nf.js";import{i as Lt}from"./CheckCircle-CxJ9MBI3.js";import{t as Bt}from"./ChevronUp-C9klasvw.js";import{n as qt}from"./LinkBroken01-BQ3rvf4O.js";import{c as Gt}from"./UserSquare-B6-k4uk5.js";import{s as Ht}from"./XClose-Bsj_jKUE.js";import{p as Kt,i as Xt}from"./connection-BBVDOaSM.js";import"./metadata-D72DunRR.js";import"./Key01-Dje7twgn.js";import"./auth-BMIwdKU8.js";import"./index-CaP5SDB2.js";import"./index-Dl3JXElC.js";import"./index-Ccz5AaI_.js";import"./popover-DvKxqM1r.js";import"./tooltip-DoWVDYxv.js";import"./index-0glLJTM3.js";import"./Check-CcPSzxsY.js";import"./SearchMd-DJptVqPP.js";import"./use-mobile-9GiVme_1.js";import"./use-create-virtual-mcp-C0a_KTOz.js";import"./use-navigate-to-agent-CSgL519X.js";import"./thread-intent-CNOpHUCE.js";import"./backoff-8mStPHYB.js";import"./task-board-Dh6sWb9t.js";import"./schema-W3hqtN1B.js";import"./slugify-CEUa2lfQ.js";import"./Image01-DAe5wd3u.js";import"./use-org-auth-client-BBAyh5Tz.js";import"./User01-B42bcRzQ.js";import"./AlertCircle-BOPAUEgU.js";import"./ArrowUp-Duh-8Vv0.js";import"./ArrowLeft-DGlO1CKr.js";import"./ZoomOut-BQf_lYpX.js";import"./Building02-D_rXBsfQ.js";import"./Copy01-ByHdq7k3.js";import"./CreditCard01-D7Ll8vXp.js";import"./DotsVertical-CXVrXTYw.js";import"./Palette-BFtTwWPg.js";import"./Link01-BFa5_pnw.js";import"./LinkExternal01-ChFFafWR.js";import"./Monitor01-tvCvi4o_.js";import"./Sun-Bl8Ky_if.js";import"./Upload01-C13aB89v.js";import"./Users01-BmXeKAri.js";import"./X-BdtW9stL.js";import"./label-CKukDnnz.js";import"./alert-dialog-13GPwGkk.js";import"./CartesianChart-DIS9sPOp.js";import"./XAxis-G213xRid.js";import"./AreaChart-CJHdSsRl.js";import"./ErrorBarContext-D4SFBJLe.js";import"./Sector-CoYmht1l.js";const Qt=ve({scopes:ze(de()).describe("List of scopes available"),stateSchema:Oe(de(),Me()).describe("JSON Schema (draft-07) defining the state structure")}),Wt=[{name:"MCP_CONFIGURATION",inputSchema:ve({}),outputSchema:Qt}];function Yt(s){const e=U.c(61),{instance:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l}=s,o=V();let r;e[0]!==n.id?(r={connectionId:n.id},e[0]=n.id,e[1]=r):r=e[1];const d=we(r),m=!(n.connection_type==="VIRTUAL")&&d.supportsOAuth&&!d.isAuthenticated,p=n.status!=="active",x=m||p?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==x?(h=Se("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",x),e[2]=x,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let j;e[7]!==n.title?(j=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=j):j=e[8];let S;e[9]!==n.status||e[10]!==p||e[11]!==m||e[12]!==o?(S=m?t.jsx("span",{className:"text-xs text-destructive font-medium",children:o("details.connectionInstancesPanel.needsAuthorization")}):p?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?o("details.connectionInstancesPanel.disabledError"):o("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=p,e[11]=m,e[12]=o,e[13]=S):S=e[13];let y;e[14]!==j||e[15]!==S?(y=t.jsxs("div",{className:"flex-1 min-w-0",children:[j,S]}),e[14]=j,e[15]=S,e[16]=y):y=e[16];let C;e[17]!==n||e[18]!==m||e[19]!==a||e[20]!==o?(C=m&&t.jsx(B,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>a(n),children:o("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=m,e[19]=a,e[20]=o,e[21]=C):C=e[21];let _;e[22]!==n||e[23]!==p||e[24]!==l||e[25]!==o?(_=p?t.jsxs(B,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>l(n,"active"),children:[t.jsx(pt,{size:13}),o("details.connectionInstancesPanel.enable")]}):t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>l(n,"inactive"),title:o("details.connectionInstancesPanel.disable"),"aria-label":o("details.connectionInstancesPanel.disable"),children:t.jsx(ft,{size:13})}),e[22]=n,e[23]=p,e[24]=l,e[25]=o,e[26]=_):_=e[26];let $;e[27]!==n||e[28]!==c?($=()=>c(n),e[27]=n,e[28]=c,e[29]=$):$=e[29];let w;e[30]!==o?(w=o("details.connectionInstancesPanel.configure"),e[30]=o,e[31]=w):w=e[31];let M;e[32]!==o?(M=o("details.connectionInstancesPanel.configure"),e[32]=o,e[33]=M):M=e[33];let A;e[34]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Ae,{size:13}),e[34]=A):A=e[34];let O;e[35]!==$||e[36]!==w||e[37]!==M?(O=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:$,title:w,"aria-label":M,children:A}),e[35]=$,e[36]=w,e[37]=M,e[38]=O):O=e[38];let I;e[39]!==n||e[40]!==i?(I=()=>i(n),e[39]=n,e[40]=i,e[41]=I):I=e[41];let v;e[42]!==o?(v=o("details.connectionInstancesPanel.delete"),e[42]=o,e[43]=v):v=e[43];let b;e[44]!==o?(b=o("details.connectionInstancesPanel.delete"),e[44]=o,e[45]=b):b=e[45];let E;e[46]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(re,{size:13}),e[46]=E):E=e[46];let z;e[47]!==I||e[48]!==v||e[49]!==b?(z=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:I,title:v,"aria-label":b,children:E}),e[47]=I,e[48]=v,e[49]=b,e[50]=z):z=e[50];let k;e[51]!==O||e[52]!==z||e[53]!==C||e[54]!==_?(k=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[C,_,O,z]}),e[51]=O,e[52]=z,e[53]=C,e[54]=_,e[55]=k):k=e[55];let P;return e[56]!==k||e[57]!==h||e[58]!==g||e[59]!==y?(P=t.jsxs("div",{className:h,children:[g,y,k]}),e[56]=k,e[57]=h,e[58]=g,e[59]=y,e[60]=P):P=e[60],P}function Jt(s){const e=U.c(21),{instance:n,onConfigure:c}=s,a=V();let i;e[0]!==n.icon||e[1]!==n.title?(i=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=i):i=e[2];let l;e[3]!==n.title?(l=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=l):l=e[4];let o;e[5]!==n||e[6]!==c?(o=()=>c(n),e[5]=n,e[6]=c,e[7]=o):o=e[7];let r;e[8]!==a?(r=a("details.connectionInstancesPanel.configure"),e[8]=a,e[9]=r):r=e[9];let d;e[10]!==a?(d=a("details.connectionInstancesPanel.configure"),e[10]=a,e[11]=d):d=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ae,{size:13}),e[12]=u):u=e[12];let m;e[13]!==o||e[14]!==r||e[15]!==d?(m=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:o,title:r,"aria-label":d,children:u})}),e[13]=o,e[14]=r,e[15]=d,e[16]=m):m=e[16];let p;return e[17]!==i||e[18]!==l||e[19]!==m?(p=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,l,m]}),e[17]=i,e[18]=l,e[19]=m,e[20]=p):p=e[20],p}function Zt(s){const e=U.c(33),{instances:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l,onAdd:o,isAdding:r}=s,d=V();if(n.length===0)return null;let u;e[0]!==n.length||e[1]!==d?(u=n.length===1?d("details.connectionInstancesPanel.instance"):d("details.connectionInstancesPanel.instances"),e[0]=n.length,e[1]=d,e[2]=u):u=e[2];let m;e[3]!==u?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[3]=u,e[4]=m):m=e[4];let p;e[5]!==r?(p=r?t.jsx(Ne,{className:"size-[13px]"}):t.jsx(xt,{size:13}),e[5]=r,e[6]=p):p=e[6];let x;e[7]!==d?(x=d("details.connectionInstancesPanel.addInstance"),e[7]=d,e[8]=x):x=e[8];let h;e[9]!==r||e[10]!==o||e[11]!==p||e[12]!==x?(h=t.jsxs(B,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:o,disabled:r,children:[p,x]}),e[9]=r,e[10]=o,e[11]=p,e[12]=x,e[13]=h):h=e[13];let g;e[14]!==m||e[15]!==h?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[m,h]}),e[14]=m,e[15]=h,e[16]=g):g=e[16];let j;if(e[17]!==n||e[18]!==a||e[19]!==c||e[20]!==i||e[21]!==l){let C;e[23]!==a||e[24]!==c||e[25]!==i||e[26]!==l?(C=_=>t.jsx(Z.Suspense,{fallback:t.jsx(Jt,{instance:_,onConfigure:c}),children:t.jsx(Yt,{instance:_,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l})},_.id),e[23]=a,e[24]=c,e[25]=i,e[26]=l,e[27]=C):C=e[27],j=n.map(C),e[17]=n,e[18]=a,e[19]=c,e[20]=i,e[21]=l,e[22]=j}else j=e[22];let S;e[28]!==j?(S=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:j}),e[28]=j,e[29]=S):S=e[29];let y;return e[30]!==g||e[31]!==S?(y=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[g,S]}),e[30]=g,e[31]=S,e[32]=y):y=e[32],y}function es(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const a=(c.errorMessage??"").trim()||"Unknown error";n.set(a,(n.get(a)??0)+1)}return[...n.entries()].map(([c,a])=>({message:c,count:a})).sort((c,a)=>a.count-c.count).slice(0,e)}const ts=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function ss(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const ns={calls:{label:"Tool calls"},errors:{label:"Errors"}};function is(s){const e=U.c(4),{connectionId:n,orgId:c,timeframe:a}=s,i=V(),l=Ee(),o=ss(a),{data:r}=me({queryKey:ee.connectionActivity(n,a,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),{data:d}=me({queryKey:ee.connectionActivityErrors(n,a,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),connectionId:n,isError:!0,limit:1,offset:0}),staleTime:3e5}),u=It(r?.logs??[],o,void 0,r?.total,d?.total),m=u.data,p=u.totalCalls>0,x=es(r?.logs??[]),h=u.totalCalls>0?Math.round(u.totalErrors/u.totalCalls*100):0;let g;e[0]!==i?(g=i("details.connectionActivity.toolCalls"),e[0]=i,e[1]=g):g=e[1];let j;return e[2]!==g?(j=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:g}),e[2]=g,e[3]=j):j=e[3],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:u.totalCalls.toLocaleString()}),j]}),u.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:u.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),u.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(u.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),p?t.jsxs("div",{children:[t.jsx(Dt,{config:ns,className:"h-16 w-full",children:t.jsxs(Tt,{data:m,barCategoryGap:"4%",children:[t.jsx($t,{content:t.jsx(Ot,{labelFormatter:ls}),cursor:{fill:"var(--muted)"}}),t.jsx(At,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:m.map(as)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:m[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:m[m.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:i("details.connectionActivity.noActivityInThisPeriod")})}),x.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:[i("details.connectionActivity.topErrors"),h>0?` · ${i("details.connectionActivity.errorRatePercentage",{errorRate:h.toString()})}`:""]}),t.jsx("ul",{className:"space-y-1.5",children:x.map(os)})]})]})}function os(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function as(s,e){return t.jsx(Pt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function ls(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function rs(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function cs(s){const e=U.c(22),{connectionId:n}=s,c=V(),[a,i]=Z.useState("14d"),{org:l}=te();let o;e[0]!==c?(o=c("details.connectionActivity.activity"),e[0]=c,e[1]=o):o=e[1];let r;e[2]!==o?(r=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o})}),e[2]=o,e[3]=r):r=e[3];let d;e[4]!==c?(d=c("details.connectionActivity.timeframe"),e[4]=c,e[5]=d):d=e[5];let u;e[6]!==a?(u=ts.map(j=>t.jsx("button",{type:"button","aria-pressed":a===j.value,onClick:()=>i(j.value),className:Se("px-2.5 py-1 text-xs font-medium rounded-lg transition-colors",a===j.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:j.label},j.value)),e[6]=a,e[7]=u):u=e[7];let m;e[8]!==d||e[9]!==u?(m=t.jsx("div",{role:"group","aria-label":d,className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:u}),e[8]=d,e[9]=u,e[10]=m):m=e[10];let p;e[11]!==r||e[12]!==m?(p=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[r,m]}),e[11]=r,e[12]=m,e[13]=p):p=e[13];let x;e[14]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rs,{}),e[14]=x):x=e[14];let h;e[15]!==n||e[16]!==l.id||e[17]!==a?(h=t.jsx(Z.Suspense,{fallback:x,children:t.jsx(is,{connectionId:n,orgId:l.id,timeframe:a})}),e[15]=n,e[16]=l.id,e[17]=a,e[18]=h):h=e[18];let g;return e[19]!==p||e[20]!==h?(g=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[p,h]}),e[19]=p,e[20]=h,e[21]=g):g=e[21],g}function ds(s){const e=U.c(15),{virtualMcp:n,org:c}=s,a=se();let i;e[0]!==a||e[1]!==c||e[2]!==n.id?(i=()=>{const m=crypto.randomUUID();a({to:"/$org/projects/$agentId",params:{org:c,agentId:n.id},search:{thread:m}})},e[0]=a,e[1]=c,e[2]=n.id,e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ye,{size:16}),e[4]=l):l=e[4];let o;e[5]!==n.icon||e[6]!==n.title?(o=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:l}),e[5]=n.icon,e[6]=n.title,e[7]=o):o=e[7];let r;e[8]!==n.title?(r=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=r):r=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Ce,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=d):d=e[10];let u;return e[11]!==i||e[12]!==o||e[13]!==r?(u=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[o,r,d]}),e[11]=i,e[12]=o,e[13]=r,e[14]=u):u=e[14],u}function ms(s){const e=U.c(7),{virtualMcps:n,org:c}=s;let a;if(e[0]!==c||e[1]!==n){let l;e[3]!==c?(l=o=>t.jsx(ds,{virtualMcp:o,org:c},o.id),e[3]=c,e[4]=l):l=e[4],a=n.map(l),e[0]=c,e[1]=n,e[2]=a}else a=e[2];let i;return e[5]!==a?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:a})}),e[5]=a,e[6]=i):i=e[6],i}function us(s){const e=U.c(13),{connection:n}=s,c=V(),{org:a}=te();let i;e[0]!==n.id?(i={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=i):i=e[1];const l=Mt(i);if(!(l.length>0)){let p;return e[2]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(t.Fragment,{}),e[2]=p):p=e[2],p}let r;e[3]!==c?(r=c("details.connectionAgentsPanel.usedByAgents"),e[3]=c,e[4]=r):r=e[4];let d;e[5]!==r?(d=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:r})}),e[5]=r,e[6]=d):d=e[6];let u;e[7]!==a.slug||e[8]!==l?(u=t.jsx("div",{className:"px-5 py-4",children:t.jsx(ms,{virtualMcps:l,org:a.slug})}),e[7]=a.slug,e[8]=l,e[9]=u):u=e[9];let m;return e[10]!==d||e[11]!==u?(m=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[d,u]}),e[10]=d,e[11]=u,e[12]=m):m=e[12],m}function xs(s){const e=U.c(35),{tools:n,connectionId:c,org:a}=s,i=V(),l=se(),{org:o}=te();let r;e[0]!==c||e[1]!==o.id||e[2]!==o.slug?(r={connectionId:c,orgId:o.id,orgSlug:o.slug},e[0]=c,e[1]=o.id,e[2]=o.slug,e[3]=r):r=e[3];const d=Te(r),u=ke(c);let m;e[4]!==u||e[5]!==c?(m=u?Pe(u):c,e[4]=u,e[5]=c,e[6]=m):m=e[6];const p=m,[x,h]=Z.useState("");let g,j,S,y;if(e[7]!==p||e[8]!==d||e[9]!==l||e[10]!==a||e[11]!==x||e[12]!==i||e[13]!==n){const $=(n??[]).filter(ps),w=x.toLowerCase().trim(),M=w?$.filter(b=>b.name.toLowerCase().includes(w)||b.description&&b.description.toLowerCase().includes(w)):$;let A;e[18]!==p||e[19]!==l||e[20]!==a?(A=b=>{l({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:a,appSlug:p,collectionName:"tools",itemId:encodeURIComponent(b.name)}})},e[18]=p,e[19]=l,e[20]=a,e[21]=A):A=e[21];const O=A;S="flex flex-col h-full overflow-hidden";let I;e[22]!==i?(I=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=I):I=e[23];let v;e[24]===Symbol.for("react.memo_cache_sentinel")?(v=b=>{b.key==="Escape"&&(h(""),b.target.blur())},e[24]=v):v=e[24],e[25]!==x||e[26]!==I?(y=t.jsx(Ft,{value:x,onChange:h,placeholder:I,onKeyDown:v}),e[25]=x,e[26]=I,e[27]=y):y=e[27],g="flex-1 overflow-auto p-5",j=M.length===0?t.jsx(_e,{image:null,title:i(x?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(x?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:M.map(b=>{const E=ce(b._meta);return t.jsxs(Re,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>O(b),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Ut,{resourceURI:E,toolInfo:{tool:b},displayMode:"inline",minHeight:200,maxHeight:200,client:d})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:b.annotations?.title??b.name}),t.jsx(ot,{annotations:b.annotations,_meta:b._meta})]}),b.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:b.description})]})]},b.name)})}),e[7]=p,e[8]=d,e[9]=l,e[10]=a,e[11]=x,e[12]=i,e[13]=n,e[14]=g,e[15]=j,e[16]=S,e[17]=y}else g=e[14],j=e[15],S=e[16],y=e[17];let C;e[28]!==g||e[29]!==j?(C=t.jsx("div",{className:g,children:j}),e[28]=g,e[29]=j,e[30]=C):C=e[30];let _;return e[31]!==S||e[32]!==y||e[33]!==C?(_=t.jsxs("div",{className:S,children:[y,C]}),e[31]=S,e[32]=y,e[33]=C,e[34]=_):_=e[34],_}function ps(s){return!!ce(s._meta)}const je=[];function De(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=l=>l.charAt(0).toUpperCase()+l.slice(1),c=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),a=e.map(n),i=e[e.length-1];return a.length>=2&&i&&c.has(i)?[a.pop(),...a].join(" "):a.join(" ")}function le(s){const e=U.c(5),{label:n}=s,c=V();let a;e[0]!==n||e[1]!==c?(a=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=a):a=e[2];let i;return e[3]!==a?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:a})}),e[3]=a,e[4]=i):i=e[4],i}function fs(s){const e=U.c(68),{tools:n,prompts:c,resources:a,connectionId:i,org:l}=s,o=c===void 0?je:c,r=a===void 0?je:a,d=V(),u=se(),m=ke(i??"");let p;e[0]!==m||e[1]!==i?(p=m?Pe(m):i,e[0]=m,e[1]=i,e[2]=p):p=e[2];const x=p;let h;e[3]!==x||e[4]!==i||e[5]!==u||e[6]!==l?(h=function(T){!i||!l||u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:x,collectionName:"tools",itemId:encodeURIComponent(T)}})},e[3]=x,e[4]=i,e[5]=u,e[6]=l,e[7]=h):h=e[7];const g=h;let j;e[8]!==i||e[9]!==l||e[10]!==n?(j=i&&l&&n.some(js),e[8]=i,e[9]=l,e[10]=n,e[11]=j):j=e[11];const S=j;if(n.length+o.length+r.length===0){let N;e[12]!==d?(N=d("details.connectionCapabilities.capabilities"),e[12]=d,e[13]=N):N=e[13];let T;e[14]!==N?(T=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:N}),e[14]=N,e[15]=T):T=e[15];let D;e[16]!==d?(D=d("details.connectionCapabilities.noCapabilitiesDiscovered"),e[16]=d,e[17]=D):D=e[17];let F;e[18]!==D?(F=t.jsx("p",{className:"text-sm text-muted-foreground",children:D}),e[18]=D,e[19]=F):F=e[19];let Q;return e[20]!==T||e[21]!==F?(Q=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[T,F]}),e[20]=T,e[21]=F,e[22]=Q):Q=e[22],Q}let C;e[23]!==d||e[24]!==n.length?(C=d("details.connectionCapabilities.toolsTab",{count:n.length}),e[23]=d,e[24]=n.length,e[25]=C):C=e[25];let _;e[26]!==C?(_=t.jsx(ie,{value:"tools",variant:"underline",children:C}),e[26]=C,e[27]=_):_=e[27];let $;e[28]!==S||e[29]!==d?($=S&&t.jsx(ie,{value:"apps",variant:"underline",children:d("details.connectionCapabilities.uiTab")}),e[28]=S,e[29]=d,e[30]=$):$=e[30];let w;e[31]!==d?(w=d("details.connectionCapabilities.promptsTab"),e[31]=d,e[32]=w):w=e[32];let M;e[33]!==w?(M=t.jsx(ie,{value:"prompts",variant:"underline",children:w}),e[33]=w,e[34]=M):M=e[34];let A;e[35]!==d?(A=d("details.connectionCapabilities.resourcesTab"),e[35]=d,e[36]=A):A=e[36];let O;e[37]!==A?(O=t.jsx(ie,{value:"resources",variant:"underline",children:A}),e[37]=A,e[38]=O):O=e[38];let I;e[39]!==M||e[40]!==O||e[41]!==_||e[42]!==$?(I=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(zt,{variant:"underline",className:"gap-1",children:[_,$,M,O]})}),e[39]=M,e[40]=O,e[41]=_,e[42]=$,e[43]=I):I=e[43];let v;e[44]!==g||e[45]!==n?(v=n.length>0?n.map(N=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>g(N.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(gt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:De(N.name)}),N.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:N.description})]}),t.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},N.name)):t.jsx(le,{label:"tools"}),e[44]=g,e[45]=n,e[46]=v):v=e[46];let b;e[47]!==v?(b=t.jsx(oe,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:v})}),e[47]=v,e[48]=b):b=e[48];let E;e[49]!==i||e[50]!==S||e[51]!==l||e[52]!==n?(E=S&&t.jsx(oe,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(xs,{tools:n,connectionId:i,org:l})}),e[49]=i,e[50]=S,e[51]=l,e[52]=n,e[53]=E):E=e[53];let z;e[54]!==o?(z=o.length>0?o.map(gs):t.jsx(le,{label:"prompts"}),e[54]=o,e[55]=z):z=e[55];let k;e[56]!==z?(k=t.jsx(oe,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:z})}),e[56]=z,e[57]=k):k=e[57];let P;e[58]!==r?(P=r.length>0?r.map(hs):t.jsx(le,{label:"resources"}),e[58]=r,e[59]=P):P=e[59];let R;e[60]!==P?(R=t.jsx(oe,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:P})}),e[60]=P,e[61]=R):R=e[61];let f;return e[62]!==I||e[63]!==b||e[64]!==E||e[65]!==k||e[66]!==R?(f=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(Et,{defaultValue:"tools",variant:"underline",children:[I,b,E,k,R]})}),e[62]=I,e[63]=b,e[64]=E,e[65]=k,e[66]=R,e[67]=f):f=e[67],f}function hs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(ht,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function gs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Rt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:De(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function js(s){return ce(s._meta)}function bs(s){const e=U.c(13),{connection:n,displayTitle:c}=s,a=c??n.title;let i;e[0]!==n.icon||e[1]!==a?(i=t.jsx(ae,{icon:n.icon,name:a,size:"md",className:"shrink-0"}),e[0]=n.icon,e[1]=a,e[2]=i):i=e[2];let l;e[3]!==a?(l=t.jsx(Ue.Title,{children:a}),e[3]=a,e[4]=l):l=e[4];let o;e[5]!==n.description?(o=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=o):o=e[6];let r;e[7]!==l||e[8]!==o?(r=t.jsxs("div",{className:"flex-1 min-w-0",children:[l,o]}),e[7]=l,e[8]=o,e[9]=r):r=e[9];let d;return e[10]!==i||e[11]!==r?(d=t.jsxs("div",{className:"flex items-center px-4 md:px-8 bg-background border-b border-border shrink-0 gap-3 py-4",children:[i,r]}),e[10]=i,e[11]=r,e[12]=d):d=e[12],d}function vs({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:a}){const i=V(),l=ue({control:s.control,name:"ui_type"}),o=ue({control:s.control,name:"connection_url"}),{stdioEnabled:r}=Fe(),d=(()=>{if(typeof o!="string"||!o)return!1;try{const x=new URL(o);return x.hostname==="api.githubcopilot.com"&&x.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),u=r||e.connection_type==="STDIO",m=e.connection_type==="VIRTUAL",p=m?Kt(e.connection_url):null;return m?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.type")}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(ye,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:i("details.connectionSidebar.virtualMcp")})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.virtualMcpDescription")})]}),p&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.virtualMcpId")}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:p})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(G,{control:s.control,name:"ui_type",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.connection")}),l!=="NPX"&&l!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(pe,{value:x.value,onValueChange:x.onChange,children:[t.jsx(L,{children:t.jsxs(fe,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(ne,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(he,{})]})}),t.jsxs(ge,{children:[t.jsx(q,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(q,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(q,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),u&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(q,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(G,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(H,{className:"flex-1 min-w-0",children:t.jsx(L,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.urlPlaceholder"),...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(pe,{value:x.value,onValueChange:x.onChange,children:[t.jsx(L,{children:t.jsx(fe,{className:"h-10",children:t.jsx(he,{})})}),t.jsxs(ge,{children:[t.jsx(q,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(q,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(q,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),u&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(qt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(q,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Gt,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(X,{})]})}),l==="NPX"&&t.jsx(G,{control:s.control,name:"npx_package",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(L,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),l==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(G,{control:s.control,name:"stdio_command",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(L,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),t.jsx(G,{control:s.control,name:"stdio_args",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(L,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(X,{})]})})]}),t.jsx(G,{control:s.control,name:"stdio_cwd",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(L,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})})]}),(l==="NPX"||l==="STDIO")&&t.jsx(G,{control:s.control,name:"env_vars",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(L,{children:t.jsx(Ye,{value:x.value??[],onChange:x.onChange})}),t.jsx(X,{})]})}),l!=="NPX"&&l!=="STDIO"&&t.jsx(G,{control:s.control,name:"connection_token",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i(d?"details.connectionSidebar.githubPersonalAccessToken":"details.connectionSidebar.token")}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Ve,{children:[t.jsx(Le,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Vt,{variant:"success",className:"gap-1.5",children:[t.jsx(Lt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Bt,{size:12})]})})}),t.jsxs(Be,{align:"start",children:[t.jsxs(xe,{onClick:c,children:[t.jsx(jt,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(xe,{variant:"destructive",onClick:a,children:[t.jsx(re,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&x.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>x.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity rounded-lg",title:i("details.connectionSidebar.clearAndReplaceToken"),"aria-label":i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(Ht,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(L,{children:t.jsx(W,{type:"password",placeholder:i(d?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),d&&t.jsxs(Ct,{children:[i("details.connectionSidebar.createAPatAt")," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(X,{})]})})]})}function Ns(s){return s.command==="npx"}function Ss(s){return s.args?.find(e=>!e.startsWith("-"))??""}function ys(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function be(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Xt(s.connection_headers)){const c=s.connection_headers,a=Ze(c.envVars);if(Ns(c)){const l=Ss(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:l,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:a}}const i=ys(c);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:i.command,stdio_args:i.args,stdio_cwd:i.cwd,env_vars:a}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function Cs(s){let e,n=null,c=!1,a=null,i=null;return s.ui_type==="NPX"?(e="STDIO",n="",i=et(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",i=tt(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",c=s.connection_token!==null&&s.connection_token!==void 0,a=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...c&&{connection_token:a},...i&&{connection_headers:i},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function _s({connection:s,connectionId:e,org:n,isUpdating:c,tools:a,prompts:i,resources:l,siblings:o}){const r=V(),d=se({from:"/$org/settings/connections/$appSlug"}),u=Ke(),m=Ie(),{org:p}=te(),x=wt({onSuccess:()=>{o.length<=1&&d({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=Z.useState(null),[j,S]=Z.useState(!1),y=we({connectionId:e}),{data:C}=at(),_=C?.data?.members??[],$=h??s,w=_.find(f=>f.userId===$.created_by),A=s?.connection_type==="VIRTUAL"||y.isAuthenticated,O={...s,tools:a},I=st(O,Wt),v=Xe({resolver:Qe(Je),values:be(h??s)}),b=v.formState.isDirty,E=async()=>{if(!await v.trigger())return;const N=v.getValues(),T=Cs(N),D=h?.id??e;await m.update.mutateAsync({id:D,data:T}),v.reset(N)},z=()=>{v.reset(be(h??s))},k=async f=>{const N=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:T,tokenInfo:D,error:F}=await ut({connectionId:f,orgSlug:p.slug,...N?{scope:N}:{}});if(F||!T){J.error(r("details.connection.authFailed",{error:F??""}));return}if(D)try{const Y=await fetch(`/api/${p.slug}/connections/${f}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:D.accessToken,refreshToken:D.refreshToken,expiresIn:D.expiresIn,scope:D.scope,clientId:D.clientId,clientSecret:D.clientSecret,tokenEndpoint:D.tokenEndpoint})});if(!Y.ok)console.error("Failed to save OAuth token:",await Y.text()),await m.update.mutateAsync({id:f,data:{connection_token:T}});else try{await m.update.mutateAsync({id:f,data:{}})}catch($e){console.warn("Failed to refresh connection tools after OAuth:",$e)}}catch(Y){console.error("Error saving OAuth token:",Y),await m.update.mutateAsync({id:f,data:{connection_token:T}})}else await m.update.mutateAsync({id:f,data:{connection_token:T}});const Q=new URL(`/api/${p.slug}/mcp/${f}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(Q.href,null)}),await u.invalidateQueries({queryKey:ee.mcpClientPrefix()}),J.success(r("details.connection.authSuccess"))},P=()=>k(s.id),R=async()=>{try{const f=await fetch(`/api/${p.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!f.ok){const T=await f.text();J.error(r("details.connection.failedRemoveOAuth",{error:T}));return}const N=new URL(`/api/${p.slug}/mcp/${s.id}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(N.href,null)}),J.success(r("details.connection.oauthRemoved"))}catch(f){console.error("Error removing OAuth token:",f),J.error(r("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(kt,{...x}),t.jsx(bt,{open:h!==null,onOpenChange:f=>{f||g(null)},children:t.jsxs(vt,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(Nt,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(St,{className:"text-base",children:h?.title??s.title}),t.jsx(yt,{className:"text-xs",children:r("details.connection.settingsDescription")}),w&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:r("details.connection.connectedBy")}),t.jsx(lt,{url:w.user?.image??void 0,fallback:w.user?.name??w.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:w.user?.name||w.user?.email})]})]}),t.jsxs(_t,{...v,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(G,{control:v.control,name:"title",render:({field:f})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.nameLabel")}),t.jsx(L,{children:t.jsx(W,{...f})}),t.jsx(X,{})]})}),t.jsx(G,{control:v.control,name:"description",render:({field:f})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.descriptionLabel")}),t.jsx(L,{children:t.jsx(W,{...f,value:f.value||""})}),t.jsx(X,{})]})})]}),t.jsx(vs,{form:v,connection:h??s,hasOAuthToken:y.hasOAuthToken,onReauthenticate:P,onRemoveOAuth:R}),t.jsx(nt,{connection:h??s,form:v,hasMcpBinding:I,isMCPAuthenticated:A,supportsOAuth:y.supportsOAuth,isServerError:y.isServerError,onAuthenticate:P,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(B,{onClick:E,disabled:!b||c,className:"flex-1",children:r(c?"details.connection.savingButton":"details.connection.saveButton")}),b&&t.jsx(B,{variant:"outline",onClick:z,children:r("details.connection.undoButton")}),t.jsxs(B,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const f=h??s;g(null),x.requestDelete(f)},children:[t.jsx(re,{size:15}),r("details.connection.deleteButton")]})]})]},h?.id??s.id)]})}),t.jsx(it,{children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(bs,{connection:s,displayTitle:(()=>{const f=o[0]??s;return f.app_name?f.title.replace(/\s*\(\d+\)\s*$/,""):f.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(cs,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Zt,{instances:o,onConfigure:f=>g(f),onAuthenticate:f=>k(f.id),onDelete:f=>x.requestDelete(f),onToggleStatus:async(f,N)=>{try{await m.update.mutateAsync({id:f.id,data:{status:N}}),J.success(r(N==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{J.error(r("details.connection.failedUpdateConnection"))}},isAdding:j,onAdd:async()=>{S(!0);try{const f=o[0]??s,N=f.title.replace(/\s*\(\d+\)\s*$/,""),T=o.length+1,D=`${N} (${T})`,F=We("conn");await m.create.mutateAsync({id:F,title:D,description:f.description??null,connection_type:f.connection_type,connection_url:f.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:f.created_by,organization_id:f.organization_id,icon:f.icon??null,app_name:f.app_name??null,app_id:f.app_id??null,connection_headers:f.connection_headers??null,oauth_config:null,configuration_state:f.configuration_state??null,metadata:null,tools:null,bindings:null});const Q=new URL(`/api/${p.slug}/mcp/${F}`,window.location.origin),Y=await mt({url:Q.href,token:null,orgId:p.id});Y.supportsOAuth&&!Y.isAuthenticated&&await k(F)}finally{S(!1)}}}),t.jsx(us,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(fs,{tools:a,prompts:i,resources:l,connectionId:e,org:n})})]})})]})})]})}function ws(){const s=U.c(52),e=V();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/$org/settings/connections/$appSlug"},s[0]=n):n=s[0];const c=se(n);let a;s[1]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org/settings/connections/$appSlug"},s[1]=a):a=s[1];const{appSlug:i,org:l}=Ge(a),{org:o}=te(),r=Ie();let d;s[2]!==i?(d={slug:i},s[2]=i,s[3]=d):d=s[3];const u=rt(d),m=u[0]??null,p=m?.id??"",x=p||null;let h;s[4]!==o.id||s[5]!==o.slug||s[6]!==x?(h={connectionId:x,orgId:o.id,orgSlug:o.slug},s[4]=o.id,s[5]=o.slug,s[6]=x,s[7]=h):h=s[7];const g=Te(h);let j;s[8]!==g?(j={client:g},s[8]=g,s[9]=j):j=s[9];const{data:S}=ct(j);let y;if(s[10]!==m?.tools||s[11]!==p||s[12]!==u||s[13]!==S){const k=S?S.tools.map(Ds):(m?.tools??[]).map(Ps);e:{if(u.length<=1){y=k;break e}const P=new Set,R=[],f=Ts;for(const N of u){const T=N.id===p?k:f(N.tools);for(const D of T)P.has(D.name)||(P.add(D.name),R.push(D))}y=R.length>0?R:k}s[10]=m?.tools,s[11]=p,s[12]=u,s[13]=S,s[14]=y}else y=s[14];const C=y;let _;s[15]!==g?(_={client:g},s[15]=g,s[16]=_):_=s[16];const{data:$}=dt(_);let w;s[17]!==g?(w={client:g},s[17]=g,s[18]=w):w=s[18];const{data:M}=He(w);let A;s[19]!==$?.prompts?(A=$?.prompts??[],s[19]=$?.prompts,s[20]=A):A=s[20];let O;s[21]!==A?(O=A.map(Is),s[21]=A,s[22]=O):O=s[22];const I=O;let v;s[23]!==M?.resources?(v=M?.resources??[],s[23]=M?.resources,s[24]=v):v=s[24];let b;s[25]!==v?(b=v.map(ks),s[25]=v,s[26]=b):b=s[26];const E=b;if(!m){let k;s[27]!==e?(k=e("details.connection.notFoundTitle"),s[27]=e,s[28]=k):k=s[28];let P;s[29]!==e?(P=e("details.connection.notFoundDescription"),s[29]=e,s[30]=P):P=s[30];let R;s[31]!==c||s[32]!==l?(R=()=>c({to:"/$org/settings/connections",params:{org:l}}),s[31]=c,s[32]=l,s[33]=R):R=s[33];let f;s[34]!==e?(f=e("details.connection.backButton"),s[34]=e,s[35]=f):f=s[35];let N;s[36]!==R||s[37]!==f?(N=t.jsx(B,{variant:"outline",onClick:R,children:f}),s[36]=R,s[37]=f,s[38]=N):N=s[38];let T;return s[39]!==k||s[40]!==P||s[41]!==N?(T=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(_e,{title:k,description:P,actions:N})}),s[39]=k,s[40]=P,s[41]=N,s[42]=T):T=s[42],T}let z;return s[43]!==r.update.isPending||s[44]!==C||s[45]!==m||s[46]!==p||s[47]!==l||s[48]!==I||s[49]!==E||s[50]!==u?(z=t.jsx(_s,{org:l,connection:m,connectionId:p,isUpdating:r.update.isPending,tools:C,prompts:I,resources:E,siblings:u}),s[43]=r.update.isPending,s[44]=C,s[45]=m,s[46]=p,s[47]=l,s[48]=I,s[49]=E,s[50]=u,s[51]=z):z=s[51],z}function ks(s){return{name:s.name,description:s.description,uri:s.uri}}function Is(s){return{name:s.name,description:s.description}}function Ts(s){return(s??[]).map(As)}function As(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ps(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ds(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function $s(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(qe,{children:t.jsx(Z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Ne,{className:"size-8 text-muted-foreground"})}),children:t.jsx(ws,{})})}),s[0]=e):e=s[0],e}function mi(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx($s,{}),s[0]=e):e=s[0],e}export{mi as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{au as R,bN as A,bO as I,av as o,bM as j,bL as L,c as z,j as u,B as C}from"./index-
|
|
1
|
+
import{au as R,bN as A,bO as I,av as o,bM as j,bL as L,c as z,j as u,B as C}from"./index-BOGZM7Pw.js";import{I as H}from"./input-C0ZWiiGy.js";import{s as W}from"./Plus-Dk5G0eGJ.js";import{s as q}from"./Trash01-BA-bFjuS.js";const K=R({key:o().min(1,"Key is required"),value:o()}),G=R({title:o().min(1,"Name is required"),description:o().nullable().optional(),icon:o().nullable().optional(),ui_type:L(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:o().optional(),connection_token:o().nullable().optional(),npx_package:o().optional(),stdio_command:o().optional(),stdio_args:o().optional(),stdio_cwd:o().optional(),env_vars:j(K).optional(),configuration_scopes:j(o()).nullable().optional(),configuration_state:A(o(),I()).nullable().optional()}).refine(n=>n.ui_type==="NPX"?!!n.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(n=>n.ui_type==="STDIO"?!!n.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(n=>n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket"?!!n.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]}).refine(n=>(n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket")&&n.connection_url?.trim()?o().url().safeParse(n.connection_url.trim()).success:!0,{message:"Enter a valid URL",path:["connection_url"]});function O(n){const e=n.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(i=>e.includes(i))||["sk_","rk_","whsec_","pk_live","sk_live"].some(i=>e.startsWith(i))||["_key","_secret","_token","_password","_auth","_pat"].some(i=>e.endsWith(i)))}function X(n){const e=z.c(34),{value:t,onChange:r,keyPlaceholder:a,valuePlaceholder:i,className:v}=n,m=a===void 0?"VARIABLE_NAME":a,h=i===void 0?"value...":i;let b;e[0]!==r||e[1]!==t?(b=()=>{r([...t,{key:"",value:""}])},e[0]=r,e[1]=t,e[2]=b):b=e[2];const S=b;let x;e[3]!==r||e[4]!==t?(x=l=>{r(t.filter((p,s)=>s!==l))},e[3]=r,e[4]=t,e[5]=x):x=e[5];const y=x;let P;e[6]!==r||e[7]!==t?(P=(l,p)=>{const s=[...t],c=s[l];c&&(s[l]={key:p,value:c.value},r(s))},e[6]=r,e[7]=t,e[8]=P):P=e[8];const g=P;let T;e[9]!==r||e[10]!==t?(T=(l,p)=>{const s=[...t],c=s[l];c&&(s[l]={key:c.key,value:p},r(s))},e[9]=r,e[10]=t,e[11]=T):T=e[11];const k=T;let f;if(e[12]!==g||e[13]!==y||e[14]!==k||e[15]!==m||e[16]!==t||e[17]!==h){let l;e[19]!==g||e[20]!==y||e[21]!==k||e[22]!==m||e[23]!==h?(l=(p,s)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(H,{placeholder:m,value:p.key,onChange:c=>g(s,c.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),u.jsx(H,{type:O(p.key)?"password":"text",placeholder:h,value:p.value,onChange:c=>k(s,c.target.value),className:"h-10 rounded-lg flex-1"}),u.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>y(s),children:u.jsx(q,{size:16})})]},s),e[19]=g,e[20]=y,e[21]=k,e[22]=m,e[23]=h,e[24]=l):l=e[24],f=t.map(l),e[12]=g,e[13]=y,e[14]=k,e[15]=m,e[16]=t,e[17]=h,e[18]=f}else f=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=u.jsx(W,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let d;e[26]!==S?(d=u.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:S,children:[w,"Add Environment Variable"]}),e[26]=S,e[27]=d):d=e[27];let _;e[28]!==f||e[29]!==d?(_=u.jsxs("div",{className:"flex flex-col gap-2",children:[f,d]}),e[28]=f,e[29]=d,e[30]=_):_=e[30];let E;return e[31]!==v||e[32]!==_?(E=u.jsx("div",{className:v,children:_}),e[31]=v,e[32]=_,e[33]=E):E=e[33],E}function V(n){const e={};for(const{key:t,value:r}of n)t.trim()&&(e[t.trim()]=r);return e}function D(n){return n?Object.entries(n).map(([e,t])=>({key:e,value:t})):[]}function N(n){const e=n.trim();if(!e)return"";try{const t=new URL(e),r=t.pathname.length>1?t.pathname.replace(/\/+$/,""):t.pathname;return`${t.origin}${r}`}catch{return e.replace(/\/+$/,"")}}function F(n){const e=n.trim().split(/\s+/).filter(Boolean);if(e.length<2)return null;const t=e[0]?.toLowerCase();if(t!=="npx"&&t!=="bunx")return null;const a=e.slice(1).find(i=>!i.startsWith("-"));return a?{packageName:a}:null}function Y(n){const{uiType:e}=n,t=N(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===N("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const r=(n.npxPackage??"").trim();return e==="NPX"&&r==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function J(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const e=N(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(i=>(i.server?.remotes??[]).some(m=>N(m.url??"")===e));if(!t)return null;const r=t.title||t.name||t.server?.title||t.server?.name||"",a=t.server?.description||t.description||t.summary||null;return r?{id:"registry",title:r,description:a}:null}function Q(n,e){const t={command:"npx",args:["-y",n]},r=V(e);return Object.keys(r).length>0&&(t.envVars=r),t}function Z(n,e,t,r){const a={command:n};e.trim()&&(a.args=e.trim().split(/\s+/)),t?.trim()&&(a.cwd=t.trim());const i=V(r);return Object.keys(i).length>0&&(a.envVars=i),a}export{X as E,J as a,Q as b,G as c,Z as d,Y as i,F as p,D as r};
|