decocms 2.175.1 → 2.175.2
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-De9oqjty.js → AlertCircle-CnfwZdxb.js} +1 -1
- package/dist/client/assets/{AlignLeft-BaG4OcCg.js → AlignLeft-zj1VrWVO.js} +1 -1
- package/dist/client/assets/{ArrowDown-PFFBPH3j.js → ArrowDown-BnnQhLmg.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CPWCs_Od.js → ArrowLeft-C3_bzjZf.js} +1 -1
- package/dist/client/assets/{ArrowUp-C6Q-EpUw.js → ArrowUp-BuKX1RSZ.js} +1 -1
- package/dist/client/assets/{Check-BfKCyKXX.js → Check-7kB05ju_.js} +1 -1
- package/dist/client/assets/{CheckCircle-DiRi76qb.js → CheckCircle-DrGaevdP.js} +1 -1
- package/dist/client/assets/{CheckDone01-ZekLHdFZ.js → CheckDone01-CVJEgdwq.js} +1 -1
- package/dist/client/assets/{CheckVerified02-DC3VT092.js → CheckVerified02-DmV5dzDn.js} +1 -1
- package/dist/client/assets/{ChevronDown-BHMaRWRt.js → ChevronDown-DHeagNGb.js} +1 -1
- package/dist/client/assets/{ChevronLeft-0cpA2yNq.js → ChevronLeft-W2gkpjgL.js} +1 -1
- package/dist/client/assets/{ChevronRight-1g9z-Z5h.js → ChevronRight-Blv21S_7.js} +1 -1
- package/dist/client/assets/{ChevronUp-1s_S3eDF.js → ChevronUp-J7upZD3-.js} +1 -1
- package/dist/client/assets/{Clock-rHd8cQAO.js → Clock-9Mm0U0Dg.js} +1 -1
- package/dist/client/assets/{Code01-CoTQP8pZ.js → Code01-DDbKsccR.js} +1 -1
- package/dist/client/assets/{Coins01-D7lfLTbO.js → Coins01-DTz6uYyF.js} +1 -1
- package/dist/client/assets/{Container-DwxLlgWA.js → Container-Ci_1Xm4L.js} +1 -1
- package/dist/client/assets/{Copy01-CIUDy0Hr.js → Copy01-BexEalI-.js} +1 -1
- package/dist/client/assets/{Dataflow03-T9TmjQN-.js → Dataflow03-CKfLDuKw.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-CmCKbvuJ.js → DotsHorizontal-3xIvFzgk.js} +1 -1
- package/dist/client/assets/{DotsVertical-Y8XpM2B_.js → DotsVertical-7N_NB6wt.js} +1 -1
- package/dist/client/assets/{Download01-LinNp3zy.js → Download01-D-oC1d8d.js} +1 -1
- package/dist/client/assets/{Edit01-Dw-lPBk-.js → Edit01-gYPHsLoC.js} +1 -1
- package/dist/client/assets/{Edit05-Bx682Mm6.js → Edit05-BA2Lz_6R.js} +1 -1
- package/dist/client/assets/{Eye-JuDcZhJz.js → Eye-Cn6YseXl.js} +1 -1
- package/dist/client/assets/{EyeOff-9_-SJWcU.js → EyeOff-L-SLicw9.js} +1 -1
- package/dist/client/assets/{File02-bFwU_wEK.js → File02-Dx1Iz50W.js} +1 -1
- package/dist/client/assets/{File06-CU5oU1OI.js → File06-Dqc-K1-5.js} +1 -1
- package/dist/client/assets/{FilterLines-BaTxnUjH.js → FilterLines-DCrzLWfV.js} +1 -1
- package/dist/client/assets/{Globe01-DUjsFcPS.js → Globe01-DW2rHI0i.js} +1 -1
- package/dist/client/assets/{Globe02-k3_A41kp.js → Globe02-CyGtzZ8k.js} +1 -1
- package/dist/client/assets/{Grid01-DBOkAm2V.js → Grid01-Dqz--q3o.js} +1 -1
- package/dist/client/assets/{Hash02-gqJDwuju.js → Hash02-pqCZ_ykD.js} +1 -1
- package/dist/client/assets/{Home02-DfEb-Myv.js → Home02-D2W6xjpZ.js} +1 -1
- package/dist/client/assets/{Image01-I9pAeT0N.js → Image01-U7ZIAIPc.js} +1 -1
- package/dist/client/assets/{Inbox01-BgDmihAV.js → Inbox01-DpRIO4ZY.js} +1 -1
- package/dist/client/assets/{InfoCircle-LX1SVC24.js → InfoCircle-CvSmMU6H.js} +1 -1
- package/dist/client/assets/{Key01-DAjAUWfr.js → Key01-Dq5b7fdA.js} +1 -1
- package/dist/client/assets/{LayersTwo01-C-XZtFtv.js → LayersTwo01-Li6JqY2K.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BvuIBX8d.js → LayoutLeft-BAk65lFq.js} +1 -1
- package/dist/client/assets/{Link01-q2vhCqdM.js → Link01-NJWLnzFs.js} +1 -1
- package/dist/client/assets/{LinkExternal01-QGWpvftd.js → LinkExternal01-B8e_Oa3I.js} +1 -1
- package/dist/client/assets/{List-CuV23QYs.js → List-Cc_Ri6eQ.js} +1 -1
- package/dist/client/assets/{Loading01-BNn4YU_K.js → Loading01-Cbk1oNZ2.js} +1 -1
- package/dist/client/assets/{Lock01-DJQX15kR.js → Lock01-dP10fLup.js} +1 -1
- package/dist/client/assets/{Play-C7yKo0dH.js → Play-DqxAqUbl.js} +1 -1
- package/dist/client/assets/{Plus-CT_Gcwl2.js → Plus-CqWob4tu.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-uL9q48A4.js → RefreshCcw01-B6R5Js1R.js} +1 -1
- package/dist/client/assets/{Save01-CuwI4Bxq.js → Save01-BfieBu6m.js} +1 -1
- package/dist/client/assets/{SearchMd-BLeX5weN.js → SearchMd-DJI6OMcD.js} +1 -1
- package/dist/client/assets/{Settings01-2AkYiqYr.js → Settings01-BWkL3Bf9.js} +1 -1
- package/dist/client/assets/{Shield01-D6IOCC-Z.js → Shield01-DMT1motk.js} +1 -1
- package/dist/client/assets/{Terminal-Dlvh4GS2.js → Terminal-zNrinv6B.js} +1 -1
- package/dist/client/assets/{Tool01-CjSIsyxE.js → Tool01-CUx5BAY-.js} +1 -1
- package/dist/client/assets/{Trash01-YPQczxci.js → Trash01-C0891dQq.js} +1 -1
- package/dist/client/assets/{Upload01-BlEN4mwB.js → Upload01-ngHWsp64.js} +1 -1
- package/dist/client/assets/{Users03-B7X28dbt.js → Users03-FsZwQwZq.js} +1 -1
- package/dist/client/assets/{X-B_f76BPZ.js → X-CeRZ6ROs.js} +1 -1
- package/dist/client/assets/{XAxis-Du5m1KMx.js → XAxis-B4Pxztvn.js} +1 -1
- package/dist/client/assets/{XCircle-DDLf4PgL.js → XCircle-X3Ds2fko.js} +1 -1
- package/dist/client/assets/{XClose-eeK1fS1n.js → XClose-BieEiV6P.js} +1 -1
- package/dist/client/assets/{Zap-DHey7Hu_.js → Zap-B-qa654H.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-D6uKmygR.js → agent-connections-preview-BXeLz6mJ.js} +1 -1
- package/dist/client/assets/agent-detail-2cFCKx9t.js +2 -0
- package/dist/client/assets/agents-DS-16MLo.js +1 -0
- package/dist/client/assets/ai-providers-logos-Bb5LHAPU.js +1 -0
- package/dist/client/assets/{alert-dialog-BVglQjyM.js → alert-dialog-DgTufZ_p.js} +1 -1
- package/dist/client/assets/{auth-catchall-Bfllc4Ni.js → auth-catchall-zO2o6cw1.js} +1 -1
- package/dist/client/assets/automation-detail-CyiDphKi.js +1 -0
- package/dist/client/assets/automations-CBvKrAy1.js +1 -0
- package/dist/client/assets/{avatar-OE2URZfM.js → avatar-w6QMWHVj.js} +1 -1
- package/dist/client/assets/{badge-CAg946Xk.js → badge-B-_hRtCy.js} +1 -1
- package/dist/client/assets/{binder-DTBFGqjl.js → binder-BEJ4wRzw.js} +1 -1
- package/dist/client/assets/{breadcrumb-aP02JuZO.js → breadcrumb-Dk9kRV2t.js} +1 -1
- package/dist/client/assets/{card-RQxLVCBk.js → card-BSGld6G2.js} +1 -1
- package/dist/client/assets/{chart-D9IwJUjP.js → chart-CEfru1MQ.js} +1 -1
- package/dist/client/assets/{checkbox-DLsMmmhu.js → checkbox-COsQJsO9.js} +1 -1
- package/dist/client/assets/{collapsible-CGr-TiAc.js → collapsible-BCGKc4Wz.js} +1 -1
- package/dist/client/assets/{collection-detail-CZQpkHig.js → collection-detail-BimbOEiL.js} +2 -2
- package/dist/client/assets/{collection-display-button-VOymjalV.js → collection-display-button-CuyLh-NC.js} +1 -1
- package/dist/client/assets/{collection-search-62vwaqdq.js → collection-search-aJlY7LHs.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DPJfuSg9.js → collection-table-wrapper-CcbJTCba.js} +1 -1
- package/dist/client/assets/{collection-tabs-FJx5TF4Z.js → collection-tabs-B2Xeppc1.js} +1 -1
- package/dist/client/assets/{command-ChmbB2jp.js → command-CyHipwcz.js} +1 -1
- package/dist/client/assets/connect-3nC8bK4k.js +1 -0
- package/dist/client/assets/{connection-card-D9I87KkT.js → connection-card-iA_b7WBI.js} +1 -1
- package/dist/client/assets/connection-detail-B4CoR-IH.js +1 -0
- package/dist/client/assets/{connection-status-D_iX92lK.js → connection-status-BddpcBJZ.js} +1 -1
- package/dist/client/assets/connections-B-zXLcDP.js +1 -0
- package/dist/client/assets/{constants-XtX-WKGm.js → constants-CDL9XClm.js} +1 -1
- package/dist/client/assets/constants-DxY-8FrK.js +1 -0
- package/dist/client/assets/{context-CtrnP3HC.js → context-DDV_uL9a.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-DlsDrfHE.js → create-organization-dialog-CG01zre5.js} +1 -1
- package/dist/client/assets/{create-project-dialog-BV-JjiBR.js → create-project-dialog-5e-piQzY.js} +1 -1
- package/dist/client/assets/{danger-B3KgXwQ9.js → danger-_ZcnVgTL.js} +1 -1
- package/dist/client/assets/{danger-zone-C_4VhnMp.js → danger-zone-e3foS_su.js} +1 -1
- package/dist/client/assets/{dependencies-BHUeYRA7.js → dependencies-DUviAtSp.js} +1 -1
- package/dist/client/assets/{dialog-_XYw8lZC.js → dialog-DxTRqiug.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DzFMEBVS.js → dropdown-menu-CdjuOUR6.js} +1 -1
- package/dist/client/assets/dynamic-plugin-layout-DszdejBu.js +1 -0
- package/dist/client/assets/{editable-task-title-B7Ktbs3r.js → editable-task-title-44X_8A19.js} +1 -1
- package/dist/client/assets/{empty-state-AMuFIqs3.js → empty-state-Bj_isc1T.js} +1 -1
- package/dist/client/assets/{empty-state-D4GX29pL.js → empty-state-v8jdj56V.js} +1 -1
- package/dist/client/assets/{env-vars-editor-DTKmdK-v.js → env-vars-editor-Bs6jziXp.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CS_Bn7Ri.js → extract-connection-data-Cyjq-Q5I.js} +1 -1
- package/dist/client/assets/{file-browser-OSAi_CZb.js → file-browser-4NMlO2k_.js} +2 -2
- package/dist/client/assets/{form-BN7_f2uj.js → form-BV3tSlED.js} +1 -1
- package/dist/client/assets/{general-B9J0F1Xq.js → general-LSfgt8-y.js} +1 -1
- package/dist/client/assets/{grid-view-BH674f3N.js → grid-view-BD9vYk3H.js} +1 -1
- package/dist/client/assets/{home-Dam4fMEZ.js → home-Ck605SqF.js} +1 -1
- package/dist/client/assets/{index-CuSj4QrF.js → index-B70G5L15.js} +1 -1
- package/dist/client/assets/{index-Cn8BPdHZ.js → index-BE93ZIdg.js} +1 -1
- package/dist/client/assets/{index-DsOJvxnb.js → index-BXUNq6d7.js} +3 -3
- package/dist/client/assets/{index-DxP-spTj.js → index-CZ7yh8sQ.js} +1 -1
- package/dist/client/assets/index-Ci8WAd55.css +1 -0
- package/dist/client/assets/{index-C-NLwTON.js → index-Dg_kVhT7.js} +1 -1
- package/dist/client/assets/{index-CcA_QriT.js → index-DlhaGZnK.js} +1 -1
- package/dist/client/assets/{index-zjV4p_E5.js → index-L6huQtcJ.js} +1 -1
- package/dist/client/assets/index-rWegviRE.js +1 -0
- package/dist/client/assets/{index-Da9ggy60.js → index-uQDoUdMq.js} +1 -1
- package/dist/client/assets/index-zJEaoyYS.js +25 -0
- package/dist/client/assets/{infiniteQueryObserver-BE0Fq7u7.js → infiniteQueryObserver-DXFe0xIV.js} +1 -1
- package/dist/client/assets/{input-CUT8DBv1.js → input-BFH8rk50.js} +1 -1
- package/dist/client/assets/{integration-icon-CVxvM4fR.js → integration-icon-D6SJHU0f.js} +1 -1
- package/dist/client/assets/{label-iPw5smAw.js → label-DE7vX487.js} +1 -1
- package/dist/client/assets/{layout-C2ZnDBkW.js → layout-B2GnF_Vp.js} +1 -1
- package/dist/client/assets/layout-B_GGomJW.js +1 -0
- package/dist/client/assets/{login-DJvdi7W3.js → login-CgzRmuxY.js} +1 -1
- package/dist/client/assets/{logo-upload-DlKQk0GB.js → logo-upload-Bfzj_LQV.js} +1 -1
- package/dist/client/assets/{markdown-CKKBcXcE.js → markdown-Da-6gcG9.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-IX_OR3wW.js → mcp-app-renderer-CNc9yMN5.js} +1 -1
- package/dist/client/assets/{mcp-server-card-Cq5E9kuT.js → mcp-server-card-s9NGsKpt.js} +1 -1
- package/dist/client/assets/mcp-server-detail-fMXGyX4W.js +2 -0
- package/dist/client/assets/members-BvBWfv9e.js +3 -0
- package/dist/client/assets/{monaco-editor-J8rInsT2.js → monaco-editor-VspAvYbk.js} +1 -1
- package/dist/client/assets/monitoring-B1jfqgQN.js +4 -0
- package/dist/client/assets/monitoring-dashboard-edit-Bdujw4Ym.js +1 -0
- package/dist/client/assets/{monitoring-dashboard-view-Dt4aILCV.js → monitoring-dashboard-view-CSfkxnkl.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-Dx_W_1nT.js → monitoring-stats-row-Ds_uiyYJ.js} +1 -1
- package/dist/client/assets/{oauth-callback-COUada1q.js → oauth-callback-BNPNdlSW.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CqS-ybCD.js → oauth-callback-ai-provider-CODmoIp9.js} +1 -1
- package/dist/client/assets/org-ai-providers-CQKU4ds_.js +1 -0
- package/dist/client/assets/page-Bbbh0c0Z.js +1 -0
- package/dist/client/assets/page-BfphKBfj.js +1 -0
- package/dist/client/assets/{plugin-empty-state-Dt2dvxD9.js → plugin-empty-state-BWhKyfJ8.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CRLH-_5S.js → plugin-empty-state-Cx_CuKe3.js} +1 -1
- package/dist/client/assets/{plugin-header-DLDBKovk.js → plugin-header-ET8DV5kQ.js} +1 -1
- package/dist/client/assets/{plugin-header-CkWzqJkZ.js → plugin-header-ncr8MkbN.js} +1 -1
- package/dist/client/assets/plugins-BdyM0ZUw.js +1 -0
- package/dist/client/assets/{popover-CF3EN_0o.js → popover-BcyJids_.js} +1 -1
- package/dist/client/assets/project-app-view-BdLdOYqG.js +1 -0
- package/dist/client/assets/project-layout-DReK69oR.js +1 -0
- package/dist/client/assets/{project-plugins-DRIvSpW5.js → project-plugins-CXWguN_r.js} +1 -1
- package/dist/client/assets/projects-list-CZANuMq5.js +1 -0
- package/dist/client/assets/{registry-layout-MGTBGYDW.js → registry-layout-CqXQ571U.js} +1 -1
- package/dist/client/assets/{registry-utils-Cd3t_Kmp.js → registry-utils-CaVl1vKg.js} +1 -1
- package/dist/client/assets/{reports-layout-Cu0HmCBt.js → reports-layout-CQyNOFqA.js} +1 -1
- package/dist/client/assets/{reset-password-Dwr8terU.js → reset-password-Bt_v8_59.js} +1 -1
- package/dist/client/assets/{resizable-D4LJctEl.js → resizable-B4X_WbHf.js} +1 -1
- package/dist/client/assets/{save-actions-MzYbolsq.js → save-actions-Py9YKTe0.js} +1 -1
- package/dist/client/assets/{scroll-area-B5XbONJS.js → scroll-area-R7PT492V.js} +1 -1
- package/dist/client/assets/{select-DRPG5csU.js → select-B-f7jgVG.js} +1 -1
- package/dist/client/assets/{select-virtual-mcp-B8NgSgPI.js → select-virtual-mcp-YanYQUBn.js} +1 -1
- package/dist/client/assets/{sheet-BQuKOEiL.js → sheet-7nFLkS7G.js} +1 -1
- package/dist/client/assets/shell-layout-Dp8xiQMR.js +3 -0
- package/dist/client/assets/{sidebar-settings-BqDjI96r.js → sidebar-settings-w0p27D0n.js} +1 -1
- package/dist/client/assets/{skeleton-DJFpR-1P.js → skeleton-CK2-6UkT.js} +1 -1
- package/dist/client/assets/{spinner-CqAVfcvO.js → spinner-B1-EIDBS.js} +1 -1
- package/dist/client/assets/{store-invite-JCf8JSic.js → store-invite-DVPM6U-x.js} +1 -1
- package/dist/client/assets/{switch-BQjzAGvm.js → switch-4UL4iV3X.js} +1 -1
- package/dist/client/assets/{table-DJbHB5IL.js → table-Bu98B5a-.js} +1 -1
- package/dist/client/assets/{tabs-CkPDQzeX.js → tabs-Cif80TZ4.js} +1 -1
- package/dist/client/assets/{task-status-wkv2GdSY.js → task-status-BWKjAgiX.js} +16 -16
- package/dist/client/assets/{tasks-panel-TN0GeEUK.js → tasks-panel-D6Bb-wiS.js} +1 -1
- package/dist/client/assets/tasks-tenjlvFT.js +1 -0
- package/dist/client/assets/{textarea-CTzX43MZ.js → textarea-DPLd5P1K.js} +1 -1
- package/dist/client/assets/{time-range-picker-DNJ6dRiN.js → time-range-picker-FJd_w9AH.js} +1 -1
- package/dist/client/assets/{toggle-group-y2h19HHT.js → toggle-group-B4QQy8X1.js} +1 -1
- package/dist/client/assets/{tools-list-Db7zzadA.js → tools-list-BgmW-tI4.js} +1 -1
- package/dist/client/assets/{tooltip-XyKE4lZa.js → tooltip-BGPUMzDS.js} +1 -1
- package/dist/client/assets/{topbar-portal-D3fRQWai.js → topbar-portal-CLOTo-7w.js} +1 -1
- package/dist/client/assets/{types-B3niHy47.js → types-DZ5M-eMJ.js} +1 -1
- package/dist/client/assets/{use-automations-C4CL-jAO.js → use-automations-D7j59hRT.js} +1 -1
- package/dist/client/assets/{use-binding-BfjFWpEn.js → use-binding-CZ8osTa1.js} +1 -1
- package/dist/client/assets/{use-collections-DSWhP4jg.js → use-collections-yY78nnLx.js} +1 -1
- package/dist/client/assets/{use-connection-DmR852Js.js → use-connection-lXrlfojY.js} +1 -1
- package/dist/client/assets/{use-copy-dSR0w-bG.js → use-copy-DZJI58oZ.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DXWAjide.js → use-create-virtual-mcp-DK_WDS9Y.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CvaIKLMy.js → use-infinite-scroll-C-TK62Eo.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-_FQYQGQx.js → use-install-from-registry-C24f0cqa.js} +1 -1
- package/dist/client/assets/{use-list-state-Ck8sSm9J.js → use-list-state-D6LU1koz.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-C-XU_-dc.js → use-mcp-prompts-DT9l3i02.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-Bxkx1Ub1.js → use-mcp-resources-DhBJVSsg.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BXmfFmar.js → use-mcp-tools-CwVNqTmj.js} +1 -1
- package/dist/client/assets/{use-members-B-Cx3SpJ.js → use-members-fpZqw1dy.js} +1 -1
- package/dist/client/assets/{use-mobile-O8KVzGuv.js → use-mobile-B0lEbMk3.js} +1 -1
- package/dist/client/assets/{use-project-Bg5pX2Ab.js → use-project-BnRSDoVD.js} +1 -1
- package/dist/client/assets/{use-store-discovery-DPE_0zuT.js → use-store-discovery-C9fJhQ4Y.js} +1 -1
- package/dist/client/assets/{use-view-mode-ve-Q_Sd0.js → use-view-mode-0w9n1sJ-.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-C9XdHCA_.js → use-virtual-mcp-CyoGC0aH.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BlrmUHYA.js +1 -0
- package/dist/client/assets/{useMutation-B_cFG709.js → useMutation-CkdHuTyE.js} +1 -1
- package/dist/client/assets/useQuery-Bmc4jnG2.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DD4jjrsx.js +1 -0
- package/dist/client/assets/{user-rS26WEu1.js → user-sbKkVV9F.js} +1 -1
- package/dist/client/assets/workflow-CpP3zoVI.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/node_modules/async-exit-hook/CHANGELOG.md +62 -0
- package/dist/server/node_modules/async-exit-hook/index.js +171 -0
- package/dist/server/node_modules/async-exit-hook/license +21 -0
- package/dist/server/node_modules/async-exit-hook/package.json +66 -0
- package/dist/server/node_modules/async-exit-hook/readme.md +118 -0
- package/dist/server/node_modules/postgres-date/index.js +116 -0
- package/dist/server/node_modules/postgres-date/license +21 -0
- package/dist/server/node_modules/postgres-date/package.json +33 -0
- package/dist/server/node_modules/postgres-date/readme.md +49 -0
- package/dist/server/node_modules/split2/LICENSE +13 -0
- package/dist/server/node_modules/split2/README.md +85 -0
- package/dist/server/node_modules/split2/bench.js +27 -0
- package/dist/server/node_modules/split2/index.js +141 -0
- package/dist/server/node_modules/split2/package.json +39 -0
- package/dist/server/node_modules/split2/test.js +409 -0
- package/dist/server/node_modules/xtend/.jshintrc +30 -0
- package/dist/server/node_modules/xtend/LICENSE +20 -0
- package/dist/server/node_modules/xtend/README.md +32 -0
- package/dist/server/node_modules/xtend/immutable.js +19 -0
- package/dist/server/node_modules/xtend/mutable.js +17 -0
- package/dist/server/node_modules/xtend/package.json +55 -0
- package/dist/server/node_modules/xtend/test.js +103 -0
- package/package.json +1 -1
- package/dist/client/assets/agent-detail-BS4g93cA.js +0 -2
- package/dist/client/assets/agents-BuWI7PBX.js +0 -1
- package/dist/client/assets/ai-providers-logos-W57Qm-EN.js +0 -1
- package/dist/client/assets/automation-detail-DNo-sbc_.js +0 -1
- package/dist/client/assets/automations-CCXftgU_.js +0 -1
- package/dist/client/assets/circle-alert-DCE_cWKa.js +0 -1
- package/dist/client/assets/connect-Cak7aHsQ.js +0 -1
- package/dist/client/assets/connection-detail-ZRvu6X4P.js +0 -1
- package/dist/client/assets/connections-Bi0oPT3Y.js +0 -1
- package/dist/client/assets/constants-B4Swgi3d.js +0 -1
- package/dist/client/assets/dynamic-plugin-layout-b0Zt6Dxk.js +0 -1
- package/dist/client/assets/index-D5cL24p_.css +0 -1
- package/dist/client/assets/index-MKlLgXIW.js +0 -25
- package/dist/client/assets/index-X4FDee1r.js +0 -1
- package/dist/client/assets/layout-CA_pUlCy.js +0 -1
- package/dist/client/assets/mcp-server-detail-CTGb-hF0.js +0 -2
- package/dist/client/assets/members-CYtrIFR5.js +0 -3
- package/dist/client/assets/monitoring-dashboard-edit-6gWIXCOX.js +0 -1
- package/dist/client/assets/monitoring-gb_hJ2kW.js +0 -4
- package/dist/client/assets/org-ai-providers-BDwPbfg4.js +0 -1
- package/dist/client/assets/page-BrXIXidh.js +0 -1
- package/dist/client/assets/page-s-fs9Bly.js +0 -1
- package/dist/client/assets/plugins-DkI_FXfU.js +0 -1
- package/dist/client/assets/project-app-view-Boof680i.js +0 -1
- package/dist/client/assets/project-layout-CxwbtNi5.js +0 -1
- package/dist/client/assets/projects-list-DmvsbHJl.js +0 -1
- package/dist/client/assets/shell-layout-ZGvfzjfQ.js +0 -3
- package/dist/client/assets/tasks-zu-x8h5W.js +0 -1
- package/dist/client/assets/use-llm-BkLbMZPM.js +0 -1
- package/dist/client/assets/use-local-storage-CxC8ozOe.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DEfXPFTs.js +0 -1
- package/dist/client/assets/useQuery-D2ShO4od.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CT40dICu.js +0 -1
- package/dist/client/assets/workflow-C4-p-dLU.js +0 -1
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{r as w,c7 as ss,c as re,y as fe,j as s,u as pe,E as Fe,x as as,e as Ve,v as rs,K as Pe,B as ue,w as Ee,O as gt,d as ns}from"./index-DsOJvxnb.js";import{C as ls}from"./collection-search-62vwaqdq.js";import{P as xe}from"./index-X4FDee1r.js";import{B as vt,a as bt,b as jt,c as Nt}from"./breadcrumb-aP02JuZO.js";import{E as We}from"./empty-state-D4GX29pL.js";import{E as os,d as is,e as Je,b as cs,T as ds,M as He,p as ke,s as je,a as Ze}from"./time-range-picker-DNJ6dRiN.js";import{I as Ae}from"./integration-icon-CVxvM4fR.js";import{B as Le}from"./badge-CAg946Xk.js";import{t as Re}from"./ChevronDown-BHMaRWRt.js";import{i as ms}from"./ChevronRight-1g9z-Z5h.js";import{e as de,b as we,d as yt,T as wt,a as St,c as ne}from"./table-DJbHB5IL.js";import{S as us,b as xs,H as Ne,M as fs,K as Ct}from"./monitoring-stats-row-Dx_W_1nT.js";import{a as Ie,u as De,W as ps}from"./constants-XtX-WKGm.js";import{u as Ue}from"./use-mcp-tools-BXmfFmar.js";import{i as hs}from"./DotsVertical-Y8XpM2B_.js";import{i as gs}from"./Edit05-Bx682Mm6.js";import{s as It}from"./Plus-CT_Gcwl2.js";import{s as Dt}from"./Trash01-YPQczxci.js";import{C as vs}from"./connection-card-D9I87KkT.js";import{D as bs,a as js,b as Ns,c as Xe}from"./dropdown-menu-DzFMEBVS.js";import{f as ys,a as ws,b as Ss,c as Cs,d as Is,e as Ds,A as Ts,h as ks}from"./alert-dialog-BVglQjyM.js";import{u as Ms}from"./use-infinite-scroll-CvaIKLMy.js";import{u as _s}from"./use-members-B-Cx3SpJ.js";import{u as Ps}from"./useSuspenseInfiniteQuery-CT40dICu.js";import{b as Tt}from"./use-connection-DmR852Js.js";import{b as As}from"./use-virtual-mcp-C9XdHCA_.js";import{i as Ls}from"./Code01-CoTQP8pZ.js";import{n as $e}from"./Container-DwxLlgWA.js";import{i as Es}from"./FilterLines-BaTxnUjH.js";import{c as Os}from"./Grid01-DBOkAm2V.js";import{I as Oe}from"./input-CUT8DBv1.js";import{C as Ye}from"./checkbox-DLsMmmhu.js";import{c as Rs,d as $s,e as et,a as zs,C as Ks,b as Bs}from"./command-ChmbB2jp.js";import{P as kt,a as Mt,b as _t}from"./popover-CF3EN_0o.js";import{S as tt,a as st,b as at,c as rt,d as Me}from"./select-DRPG5csU.js";import{T as Fs}from"./textarea-CTzX43MZ.js";import{c as Vs,a as Ws,T as Hs}from"./tooltip-XyKE4lZa.js";import{C as Pt}from"./collection-tabs-FJx5TF4Z.js";import{S as Us}from"./switch-BQjzAGvm.js";import{L as Gs}from"./label-iPw5smAw.js";import{c as Ge,s as At,d as qs,e as Lt,f as Et,g as Qs,i as Js,h as nt,p as Zs,r as Ot,D as Xs,u as Rt,R as Ys,S as ea,j as ta,k as $t,l as sa,n as aa,m as ra,o as na,q as la,t as oa,v as ia,Z as ca,L as da,G as ma,w as zt,x as lt,y as ot,z as ua,J as xa,A as ye,B as fa,E as pa,F as ha,H as ga,I as va,K as ba,C as it,a as ct}from"./chart-D9IwJUjP.js";import{g as ja,A as Na,D as ya,X as dt}from"./XAxis-Du5m1KMx.js";import"./Loading01-BNn4YU_K.js";import"./SearchMd-BLeX5weN.js";import"./use-local-storage-CxC8ozOe.js";import"./useQuery-D2ShO4od.js";import"./useMutation-B_cFG709.js";import"./Check-BfKCyKXX.js";import"./Copy01-CIUDy0Hr.js";import"./Download01-LinNp3zy.js";import"./Key01-DAjAUWfr.js";import"./Play-C7yKo0dH.js";import"./monaco-editor-J8rInsT2.js";import"./spinner-CqAVfcvO.js";import"./scroll-area-B5XbONJS.js";import"./ChevronUp-1s_S3eDF.js";import"./Clock-rHd8cQAO.js";import"./ChevronLeft-0cpA2yNq.js";import"./card-RQxLVCBk.js";import"./infiniteQueryObserver-BE0Fq7u7.js";import"./use-collections-DSWhP4jg.js";import"./index-CcA_QriT.js";import"./index-zjV4p_E5.js";import"./index-Cn8BPdHZ.js";const ze=({size:t=24,color:e="currentColor",...a})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},w.createElement("path",{d:"M21 21H6.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C3 19.48 3 18.92 3 17.8V3m4 7.5v7m4.5-12v12m4.5-7v7m4.5-12v12"}));ze.displayName="BarChart07";const Kt=({size:t=24,color:e="currentColor",...a})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},w.createElement("path",{d:"M9.5 15V9m5 6V9m7.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Kt.displayName="PauseCircle";const Bt=({size:t=24,color:e="currentColor",...a})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},w.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}),w.createElement("path",{d:"M9.5 8.965c0-.477 0-.716.1-.849a.5.5 0 0 1 .364-.199c.166-.012.367.117.769.375l4.72 3.035c.349.224.523.336.583.478a.5.5 0 0 1 0 .39c-.06.142-.234.254-.583.478l-4.72 3.035c-.402.258-.603.387-.769.375a.5.5 0 0 1-.364-.2c-.1-.132-.1-.371-.1-.848v-6.07Z"}));Bt.displayName="PlayCircle";var Ft=(t,e,a,r)=>Lt(t,"xAxis",e,r),Vt=(t,e,a,r)=>Et(t,"xAxis",e,r),Wt=(t,e,a,r)=>Lt(t,"yAxis",a,r),Ht=(t,e,a,r)=>Et(t,"yAxis",a,r),wa=Ge([At,Ft,Wt,Vt,Ht],(t,e,a,r,n)=>Js(t,"xAxis")?nt(e,r,!1):nt(a,n,!1)),Sa=(t,e,a,r,n)=>n;function Ca(t){return t.type==="line"}var Ia=Ge([Qs,Sa],(t,e)=>t.filter(Ca).find(a=>a.id===e)),Da=Ge([At,Ft,Wt,Vt,Ht,Ia,wa,qs],(t,e,a,r,n,l,i,c)=>{var{chartData:o,dataStartIndex:d,dataEndIndex:f}=c;if(!(l==null||e==null||a==null||r==null||n==null||r.length===0||n.length===0||i==null||t!=="horizontal"&&t!=="vertical")){var{dataKey:m,data:p}=l,x;if(p!=null&&p.length>0?x=p:x=o?.slice(d,f+1),x!=null)return Ga({layout:t,xAxis:e,yAxis:a,xAxisTicks:r,yAxisTicks:n,dataKey:m,bandSize:i,displayedData:x})}}),Ta=["id"],ka=["type","layout","connectNulls","needClip","shape"],Ma=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Se(){return Se=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},Se.apply(null,arguments)}function mt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function me(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?mt(Object(a),!0).forEach(function(r){_a(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):mt(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function _a(t,e,a){return(e=Pa(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function Pa(t){var e=Aa(t,"string");return typeof e=="symbol"?e:e+""}function Aa(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function qe(t,e){if(t==null)return{};var a,r,n=La(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function La(t,e){if(t==null)return{};var a={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;a[r]=t[r]}return a}var Ea=t=>{var{dataKey:e,name:a,stroke:r,legendType:n,hide:l}=t;return[{inactive:l,dataKey:e,type:n,color:r,value:$t(a,e),payload:t}]},Oa=w.memo(t=>{var{dataKey:e,data:a,stroke:r,strokeWidth:n,fill:l,name:i,hide:c,unit:o,tooltipType:d,id:f}=t,m={dataDefinedOnItem:a,getPosition:aa,settings:{stroke:r,strokeWidth:n,fill:l,dataKey:e,nameKey:void 0,name:$t(i,e),hide:c,type:d,color:r,unit:o,graphicalItemId:f}};return w.createElement(sa,{tooltipEntrySettings:m})}),Ut=(t,e)=>"".concat(e,"px ").concat(t,"px");function Ra(t,e){for(var a=t.length%2!==0?[...t,0]:t,r=[],n=0;n<e;++n)r.push(...a);return r}var $a=(t,e,a)=>{var r=a.reduce((p,x)=>p+x,0);if(!r)return Ut(e,t);for(var n=Math.floor(t/r),l=t%r,i=[],c=0,o=0;c<a.length;o+=(d=a[c])!==null&&d!==void 0?d:0,++c){var d,f=a[c];if(f!=null&&o+f>l){i=[...a.slice(0,c),l-o];break}}var m=i.length%2===0?[0,e]:[e];return[...Ra(a,n),...i,...m].map(p=>"".concat(p,"px")).join(", ")};function za(t){var{clipPathId:e,points:a,props:r}=t,{dot:n,dataKey:l,needClip:i}=r,{id:c}=r,o=qe(r,Ta),d=ga(o);return w.createElement(ya,{points:a,dot:n,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:l,baseProps:d,needClip:i,clipPathId:e})}function Ka(t){var{showLabels:e,children:a,points:r}=t,n=w.useMemo(()=>r?.map(l=>{var i,c,o={x:(i=l.x)!==null&&i!==void 0?i:0,y:(c=l.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return me(me({},o),{},{value:l.value,payload:l.payload,viewBox:o,parentViewBox:void 0,fill:void 0})}),[r]);return w.createElement(pa,{value:e?n:void 0},a)}function ut(t){var{clipPathId:e,pathRef:a,points:r,strokeDasharray:n,props:l}=t,{type:i,layout:c,connectNulls:o,needClip:d,shape:f}=l,m=qe(l,ka),p=me(me({},ha(m)),{},{fill:"none",className:"recharts-line-curve",clipPath:d?"url(#clipPath-".concat(e,")"):void 0,points:r,type:i,layout:c,connectNulls:o,strokeDasharray:n??l.strokeDasharray});return w.createElement(w.Fragment,null,r?.length>1&&w.createElement(xs,Se({shapeType:"curve",option:f},p,{pathRef:a})),w.createElement(za,{points:r,clipPathId:e,props:l}))}function Ba(t){try{return t&&t.getTotalLength&&t.getTotalLength()||0}catch{return 0}}function Fa(t){var{clipPathId:e,props:a,pathRef:r,previousPointsRef:n,longestAnimatedLengthRef:l}=t,{points:i,strokeDasharray:c,isAnimationActive:o,animationBegin:d,animationDuration:f,animationEasing:m,animateNewValues:p,width:x,height:b,onAnimationEnd:j,onAnimationStart:v}=a,g=n.current,h=ua(i,"recharts-line-"),u=w.useRef(h),[y,S]=w.useState(!1),N=!y,P=w.useCallback(()=>{typeof j=="function"&&j(),S(!1)},[j]),D=w.useCallback(()=>{typeof v=="function"&&v(),S(!0)},[v]),I=Ba(r.current),M=w.useRef(0);u.current!==h&&(M.current=l.current,u.current=h);var L=M.current;return w.createElement(Ka,{points:i,showLabels:N},a.children,w.createElement(xa,{animationId:h,begin:d,duration:f,isActive:o,easing:m,onAnimationEnd:P,onAnimationStart:D,key:h},E=>{var T=ye(L,I+L,E),C=Math.min(T,I),_;if(o)if(c){var O="".concat(c).split(/[,\s]+/gim).map(K=>parseFloat(K));_=$a(C,I,O)}else _=Ut(I,C);else _=c==null?void 0:String(c);if(E>0&&I>0&&(n.current=i,l.current=Math.max(l.current,C)),g){var F=g.length/i.length,W=E===1?i:i.map((K,z)=>{var A=Math.floor(z*F);if(g[A]){var k=g[A];return me(me({},K),{},{x:ye(k.x,K.x,E),y:ye(k.y,K.y,E)})}return p?me(me({},K),{},{x:ye(x*2,K.x,E),y:ye(b/2,K.y,E)}):me(me({},K),{},{x:K.x,y:K.y})});return n.current=W,w.createElement(ut,{props:a,points:W,clipPathId:e,pathRef:r,strokeDasharray:_})}return w.createElement(ut,{props:a,points:i,clipPathId:e,pathRef:r,strokeDasharray:_})}),w.createElement(fa,{label:a.label}))}function Va(t){var{clipPathId:e,props:a}=t,r=w.useRef(null),n=w.useRef(0),l=w.useRef(null);return w.createElement(Fa,{props:a,clipPathId:e,previousPointsRef:r,longestAnimatedLengthRef:n,pathRef:l})}var Wa=(t,e)=>{var a,r;return{x:(a=t.x)!==null&&a!==void 0?a:void 0,y:(r=t.y)!==null&&r!==void 0?r:void 0,value:t.value,errorVal:zt(t.payload,e)}};class Ha extends w.Component{render(){var{hide:e,dot:a,points:r,className:n,xAxisId:l,yAxisId:i,top:c,left:o,width:d,height:f,id:m,needClip:p,zIndex:x}=this.props;if(e)return null;var b=ss("recharts-line",n),j=m,{r:v,strokeWidth:g}=ja(a),h=ia(a),u=v*2+g,y=p?"url(#clipPath-".concat(h?"":"dots-").concat(j,")"):void 0;return w.createElement(ca,{zIndex:x},w.createElement(da,{className:b},p&&w.createElement("defs",null,w.createElement(ma,{clipPathId:j,xAxisId:l,yAxisId:i}),!h&&w.createElement("clipPath",{id:"clipPath-dots-".concat(j)},w.createElement("rect",{x:o-u/2,y:c-u/2,width:d+u,height:f+u}))),w.createElement(us,{xAxisId:l,yAxisId:i,data:r,dataPointFormatter:Wa,errorBarOffset:0},w.createElement(Va,{props:this.props,clipPathId:j}))),w.createElement(Na,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:y}))}}var Gt={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:Xs.line,type:"linear"};function Ua(t){var e=Ot(t,Gt),{activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:l,animationEasing:i,connectNulls:c,dot:o,hide:d,isAnimationActive:f,label:m,legendType:p,xAxisId:x,yAxisId:b,id:j}=e,v=qe(e,Ma),{needClip:g}=ra(x,b),h=na(),u=la(),y=Rt(),S=oa(M=>Da(M,x,b,y,j));if(u!=="horizontal"&&u!=="vertical"||S==null||h==null)return null;var{height:N,width:P,x:D,y:I}=h;return w.createElement(Ha,Se({},v,{id:j,connectNulls:c,dot:o,activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:l,animationEasing:i,isAnimationActive:f,hide:d,label:m,legendType:p,xAxisId:x,yAxisId:b,points:S,layout:u,height:N,width:P,left:D,top:I,needClip:g}))}function Ga(t){var{layout:e,xAxis:a,yAxis:r,xAxisTicks:n,yAxisTicks:l,dataKey:i,bandSize:c,displayedData:o}=t;return o.map((d,f)=>{var m=zt(d,i);if(e==="horizontal"){var p=lt({axis:a,ticks:n,bandSize:c,entry:d,index:f}),x=ot(m)?null:r.scale.map(m);return{x:p,y:x??null,value:m,payload:d}}var b=ot(m)?null:a.scale.map(m),j=lt({axis:r,ticks:l,bandSize:c,entry:d,index:f});return b==null||j==null?null:{x:b,y:j,value:m,payload:d}}).filter(Boolean)}function qa(t){var e=Ot(t,Gt),a=Rt();return w.createElement(Ys,{id:e.id,type:"line"},r=>w.createElement(w.Fragment,null,w.createElement(ea,{legendPayload:Ea(e)}),w.createElement(Oa,{dataKey:e.dataKey,data:e.data,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,unit:e.unit,tooltipType:e.tooltipType,id:r}),w.createElement(ta,{type:"line",id:r,data:e.data,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,dataKey:e.dataKey,hide:e.hide,isPanorama:a}),w.createElement(Ua,Se({},e,{id:r}))))}var Ke=w.memo(qa,Zs);Ke.displayName="Line";var Qa=["axis"],xt=w.forwardRef((t,e)=>w.createElement(va,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Qa,tooltipPayloadSearcher:ba,categoricalChartProps:t,ref:e}));function Ja(t){const e=re.c(49),{log:a,isExpanded:r,connection:n,virtualMcpName:l,onToggle:i,lastLogRef:c}=t;let o,d;if(e[0]!==a.timestamp){const C=new Date(a.timestamp);o=C.toLocaleDateString("en-US",{month:"short",day:"numeric"}),d=C.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[0]=a.timestamp,e[1]=o,e[2]=d}else o=e[1],d=e[2];const f=d,m=r?"bg-muted/30 hover:bg-accent/80":"hover:bg-muted/40";let p;e[3]!==m?(p=fe("h-14 md:h-16 transition-colors cursor-pointer",m),e[3]=m,e[4]=p):p=e[4];let x;e[5]!==r?(x=s.jsx(de,{className:"w-10 md:w-12 px-2 md:px-4",children:s.jsx("div",{className:"flex items-center justify-center",children:r?s.jsx(Re,{size:16,className:"text-muted-foreground"}):s.jsx(ms,{size:16,className:"text-muted-foreground"})})}),e[5]=r,e[6]=x):x=e[6];const b=n?.icon||null;let j;e[7]!==a.connectionTitle||e[8]!==b?(j=s.jsx(de,{className:"w-12 md:w-16 px-2 md:px-4",children:s.jsx("div",{className:"flex items-center justify-center",children:s.jsx(Ae,{icon:b,name:a.connectionTitle,size:"xs",className:"shadow-sm"})})}),e[7]=a.connectionTitle,e[8]=b,e[9]=j):j=e[9];let v;e[10]!==a.toolName?(v=s.jsx("div",{className:"text-xs font-medium text-foreground truncate block",children:a.toolName}),e[10]=a.toolName,e[11]=v):v=e[11];let g;e[12]!==a.connectionTitle?(g=s.jsx("div",{className:"text-xs text-muted-foreground truncate block",children:a.connectionTitle}),e[12]=a.connectionTitle,e[13]=g):g=e[13];let h;e[14]!==v||e[15]!==g?(h=s.jsxs(de,{className:"min-w-0 pr-2 md:pr-4",children:[v,g]}),e[14]=v,e[15]=g,e[16]=h):h=e[16];let u;e[17]!==l?(u=s.jsx(de,{className:"w-24 md:w-32 px-2 md:px-3 text-xs text-muted-foreground",children:s.jsx("div",{className:"truncate",children:l})}),e[17]=l,e[18]=u):u=e[18];let y;e[19]!==a.userName?(y=s.jsx(de,{className:"w-20 md:w-24 px-2 md:px-3 text-xs text-muted-foreground",children:a.userName}),e[19]=a.userName,e[20]=y):y=e[20];let S;e[21]!==o?(S=s.jsx(de,{className:"w-20 md:w-24 px-2 md:px-3 text-xs text-muted-foreground",children:o}),e[21]=o,e[22]=S):S=e[22];let N;e[23]!==f?(N=s.jsx(de,{className:"w-20 md:w-28 px-2 md:px-3 text-xs text-muted-foreground",children:f}),e[23]=f,e[24]=N):N=e[24];let P;e[25]!==a.durationMs?(P=s.jsxs(de,{className:"w-16 md:w-20 px-2 md:px-3 text-xs text-muted-foreground font-mono text-right",children:[a.durationMs,"ms"]}),e[25]=a.durationMs,e[26]=P):P=e[26];const D=a.isError?"destructive":"success",I=a.isError?"Error":"OK";let M;e[27]!==D||e[28]!==I?(M=s.jsx(de,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:s.jsx("div",{className:"flex items-center justify-end",children:s.jsx(Le,{variant:D,className:"text-xs px-1.5 md:px-2 py-0.5 md:py-1",children:I})})}),e[27]=D,e[28]=I,e[29]=M):M=e[29];let L;e[30]!==c||e[31]!==i||e[32]!==u||e[33]!==y||e[34]!==S||e[35]!==N||e[36]!==P||e[37]!==M||e[38]!==p||e[39]!==x||e[40]!==j||e[41]!==h?(L=s.jsxs(we,{ref:c,className:p,onClick:i,children:[x,j,h,u,y,S,N,P,M]}),e[30]=c,e[31]=i,e[32]=u,e[33]=y,e[34]=S,e[35]=N,e[36]=P,e[37]=M,e[38]=p,e[39]=x,e[40]=j,e[41]=h,e[42]=L):L=e[42];let E;e[43]!==r||e[44]!==a?(E=r&&s.jsx(we,{children:s.jsx(de,{colSpan:9,className:"p-0",children:s.jsx(os,{log:a})})}),e[43]=r,e[44]=a,e[45]=E):E=e[45];let T;return e[46]!==L||e[47]!==E?(T=s.jsxs(w.Fragment,{children:[L,E]}),e[46]=L,e[47]=E,e[48]=T):T=e[48],T}const Qe="decopilot";function Za(t,e){const a=re.c(13),{org:r}=pe();let n;a[0]!==r.id?(n={connectionId:Ie,orgId:r.id},a[0]=r.id,a[1]=n):n=a[1];const l=De(n);let i;a[2]!==t.excludeConnectionIds?(i=t.excludeConnectionIds??[],a[2]=t.excludeConnectionIds,a[3]=i):i=a[3];let c;a[4]!==i?(c=[Qe,...i],a[4]=i,a[5]=c):c=a[5];let o;a[6]!==t||a[7]!==c?(o={...t,excludeConnectionIds:c},a[6]=t,a[7]=c,a[8]=o):o=a[8];let d;return a[9]!==l||a[10]!==e||a[11]!==o?(d={client:l,toolName:"MONITORING_STATS",toolArguments:o,staleTime:3e4,...e,select:Xa},a[9]=l,a[10]=e,a[11]=o,a[12]=d):d=a[12],Ue(d)}function Xa(t){return t.structuredContent??t}function Ya(t,e){const a=re.c(13),{org:r}=pe();let n;a[0]!==r.id?(n={connectionId:Ie,orgId:r.id},a[0]=r.id,a[1]=n):n=a[1];const l=De(n);let i;a[2]!==t.excludeConnectionIds?(i=t.excludeConnectionIds??[],a[2]=t.excludeConnectionIds,a[3]=i):i=a[3];let c;a[4]!==i?(c=[Qe,...i],a[4]=i,a[5]=c):c=a[5];let o;a[6]!==t||a[7]!==c?(o={...t,excludeConnectionIds:c},a[6]=t,a[7]=c,a[8]=o):o=a[8];let d;return a[9]!==l||a[10]!==e||a[11]!==o?(d={client:l,toolName:"MONITORING_STATS",toolArguments:o,staleTime:3e4,...e,select:er},a[9]=l,a[10]=e,a[11]=o,a[12]=d):d=a[12],Ue(d)}function er(t){return t.structuredContent??t}function qt(t,e){const a=re.c(9),{org:r}=pe();let n;a[0]!==r.id?(n={connectionId:Ie,orgId:r.id},a[0]=r.id,a[1]=n):n=a[1];const l=De(n);let i;a[2]===Symbol.for("react.memo_cache_sentinel")?(i=[Qe],a[2]=i):i=a[2];let c;a[3]!==t?(c={...t,connectionIds:i,topN:5},a[3]=t,a[4]=c):c=a[4];let o;return a[5]!==l||a[6]!==e||a[7]!==c?(o={client:l,toolName:"MONITORING_STATS",toolArguments:c,staleTime:3e4,...e,select:tr},a[5]=l,a[6]=e,a[7]=c,a[8]=o):o=a[8],Ue(o)}function tr(t){return t.structuredContent??t}function sr(){const{org:t,project:e,locator:a}=pe(),r=as(),n=Ve(),l=De({connectionId:Ie,orgId:t.id}),[i,c]=w.useState(null),[o,d]=w.useState(!1),[f,m]=w.useState(!1),{data:p}=rs({queryKey:Pe.monitoringDashboards(a),queryFn:async()=>{if(!l)throw new Error("MCP client is not available");const h=await l.callTool({name:"MONITORING_DASHBOARD_LIST",arguments:{}});return h.structuredContent??h}}),x=p?.dashboards??[],b=async()=>{if(l){m(!0);try{const h=await l.callTool({name:"MONITORING_DASHBOARD_CREATE",arguments:{name:"Untitled Dashboard",widgets:[{id:crypto.randomUUID(),name:"New Widget",type:"metric",source:{path:"$.usage.total_tokens",from:"output"},aggregation:{fn:"sum"}}]}}),u=(h.structuredContent??h).id;r.invalidateQueries({queryKey:Pe.monitoringDashboards(a)}),n({to:"/$org/$project/monitoring/dashboards/$dashboardId/edit",params:{org:t.slug,project:e.slug,dashboardId:u}})}catch(h){Ee.error("Failed to create dashboard"),console.error(h)}finally{m(!1)}}},j=h=>{n({to:"/$org/$project/monitoring/dashboards/$dashboardId",params:{org:t.slug,project:e.slug,dashboardId:h}})},v=h=>{n({to:"/$org/$project/monitoring/dashboards/$dashboardId/edit",params:{org:t.slug,project:e.slug,dashboardId:h}})},g=async h=>{if(l){d(!0);try{await l.callTool({name:"MONITORING_DASHBOARD_DELETE",arguments:{id:h}}),Ee.success("Dashboard deleted"),r.invalidateQueries({queryKey:Pe.monitoringDashboards(a)})}catch(u){Ee.error("Failed to delete dashboard"),console.error(u)}finally{d(!1),c(null)}}};return s.jsxs("div",{className:"flex-1 flex flex-col overflow-auto p-5",children:[x.length===0?s.jsx(We,{title:"No dashboards yet",description:"Create a dashboard to aggregate and visualize your monitoring data",image:s.jsx(ze,{size:48,className:"text-muted-foreground/50"}),actions:s.jsxs(ue,{onClick:b,size:"sm",disabled:f,children:[s.jsx(It,{size:16,className:"mr-1.5"}),"Create Dashboard"]})}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:x.map(h=>s.jsx(vs,{connection:{id:h.id,title:h.name,description:h.description},fallbackIcon:s.jsx(ze,{}),onClick:()=>j(h.id),headerActions:s.jsxs(bs,{children:[s.jsx(js,{asChild:!0,children:s.jsx(ue,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:u=>u.stopPropagation(),children:s.jsx(hs,{size:20})})}),s.jsxs(Ns,{align:"end",onClick:u=>u.stopPropagation(),children:[s.jsxs(Xe,{onClick:()=>v(h.id),children:[s.jsx(gs,{size:16}),"Edit"]}),s.jsxs(Xe,{onClick:()=>c(h.id),className:"text-destructive",children:[s.jsx(Dt,{size:16}),"Delete"]})]})]}),footer:s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[s.jsxs("span",{children:[h.widgets.length," widget",h.widgets.length!==1?"s":""]}),s.jsx("span",{children:"·"}),s.jsx("span",{children:new Date(h.createdAt).toLocaleDateString()})]})},h.id))}),s.jsx(ys,{open:!!i,onOpenChange:()=>c(null),children:s.jsxs(ws,{children:[s.jsxs(Ss,{children:[s.jsx(Cs,{children:"Delete Dashboard"}),s.jsx(Is,{children:"Are you sure you want to delete this dashboard? This action cannot be undone."})]}),s.jsxs(Ds,{children:[s.jsx(Ts,{disabled:o,children:"Cancel"}),s.jsx(ks,{disabled:o,onClick:()=>i&&g(i),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:o?"Deleting...":"Delete"})]})]})})]})}function ar(){const t=re.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("div",{className:"h-6 w-40 bg-muted rounded animate-pulse"}),s.jsx("div",{className:"h-4 w-64 bg-muted rounded animate-pulse mt-2"})]}),s.jsx("div",{className:"h-8 w-32 bg-muted rounded animate-pulse"})]}),t[0]=e):e=t[0];let a;return t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("div",{className:"flex-1 flex flex-col overflow-auto p-5",children:[e,s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[1,2,3].map(rr)})]}),t[1]=a):a=t[1],a}function rr(t){return s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("div",{className:"h-5 w-32 bg-muted rounded animate-pulse mb-2"}),s.jsx("div",{className:"h-4 w-full bg-muted rounded animate-pulse mb-3"}),s.jsx("div",{className:"h-3 w-24 bg-muted rounded animate-pulse"})]},t)}function nr(){const t=re.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboards"}),t[0]=e):e=t[0];let a;return t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Fe,{fallback:e,children:s.jsx(w.Suspense,{fallback:s.jsx(ar,{}),children:s.jsx(sr,{})})}),t[1]=a):a=t[1],a}function ft(t){const e=re.c(72),{options:a,onValueChange:r,defaultValue:n,placeholder:l,variant:i,animation:c,maxCount:o,modalPopover:d,asChild:f,className:m,disabled:p}=t;let x;e[0]!==n?(x=n===void 0?[]:n,e[0]=n,e[1]=x):x=e[1];const b=x,j=l===void 0?"Select items":l,v=i===void 0?"default":i,g=c===void 0?0:c,h=o===void 0?3:o,u=d===void 0?!1:d,y=f===void 0?!1:f,S=p===void 0?!1:p,[N,P]=w.useState(b),[D,I]=w.useState(!1);let M,L;e[2]!==b||e[3]!==N?(M=()=>{JSON.stringify(N)!==JSON.stringify(b)&&P(b)},L=[b,N],e[2]=b,e[3]=N,e[4]=M,e[5]=L):(M=e[4],L=e[5]),w.useEffect(M,L);let E;e[6]!==r||e[7]!==N?(E=Q=>{if(Q.key==="Enter")I(!0);else if(Q.key==="Backspace"&&!Q.currentTarget.value){const ee=[...N];ee.pop(),P(ee),r(ee)}},e[6]=r,e[7]=N,e[8]=E):E=e[8];const T=E;let C;e[9]!==r||e[10]!==N?(C=Q=>{const ee=N.includes(Q.value)?N.filter(ie=>ie!==Q.value):[...N,Q.value];P(ee),r(ee)},e[9]=r,e[10]=N,e[11]=C):C=e[11];const _=C;let O;e[12]!==r?(O=()=>{P([]),r([])},e[12]=r,e[13]=O):O=e[13];const F=O;let W;e[14]===Symbol.for("react.memo_cache_sentinel")?(W=()=>{I(cr)},e[14]=W):W=e[14];const K=W;let z;e[15]!==F||e[16]!==r||e[17]!==a||e[18]!==N.length?(z=()=>{if(N.length===a.length)F();else{const Q=a.map(ir);P(Q),r(Q)}},e[15]=F,e[16]=r,e[17]=a,e[18]=N.length,e[19]=z):z=e[19];const A=z;let k;e[20]!==y?(k=y?{}:{variant:"outline"},e[20]=y,e[21]=k):k=e[21];let R;e[22]!==m?(R=fe("border-input data-[placeholder]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full max-w-xs items-center justify-between gap-2 rounded-xl border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 h-10 min-h-10",m),e[22]=m,e[23]=R):R=e[23];let $;e[24]!==g||e[25]!==h||e[26]!==a||e[27]!==j||e[28]!==N||e[29]!==v?($=N.length>0?s.jsxs("div",{className:"flex items-center justify-between w-full min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[N.slice(0,h).map(Q=>{const ee=a.find(ce=>ce.value===Q),ie=ee?.icon;return s.jsxs(Le,{variant:v==="default"?"default":"secondary",className:"max-w-24",style:{animationDuration:`${g}s`},children:[ie&&s.jsx(ie,{className:"h-3 w-3 shrink-0"}),s.jsx("span",{className:"truncate",children:ee?.label})]},Q)}),N.length>h&&s.jsxs(Le,{variant:v==="default"?"default":"secondary",className:"flex-shrink-0",style:{animationDuration:`${g}s`},children:["+",N.length-h]})]}),s.jsx("div",{className:"flex items-center shrink-0 ml-2",children:s.jsx(Re,{size:20,className:"shrink-0 opacity-50"})})]}):s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:j}),s.jsx(Re,{size:20,className:"shrink-0 opacity-50"})]}),e[24]=g,e[25]=h,e[26]=a,e[27]=j,e[28]=N,e[29]=v,e[30]=$):$=e[30];let q;e[31]!==S||e[32]!==k||e[33]!==R||e[34]!==$?(q=s.jsx(kt,{asChild:!0,children:s.jsx(ue,{ref:null,...k,onClick:K,className:R,disabled:S,children:$})}),e[31]=S,e[32]=k,e[33]=R,e[34]=$,e[35]=q):q=e[35];let te;e[36]===Symbol.for("react.memo_cache_sentinel")?(te=()=>I(!1),e[36]=te):te=e[36];let Z;e[37]!==T?(Z=s.jsx(Rs,{placeholder:"Search...",onKeyDown:T,className:"rounded-t-xl"}),e[37]=T,e[38]=Z):Z=e[38];let V;e[39]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx($s,{children:"No results found."}),e[39]=V):V=e[39];let U;e[40]!==A?(U=()=>{A()},e[40]=A,e[41]=U):U=e[41];let G;e[42]!==A?(G=Q=>{Q.stopPropagation(),A()},e[42]=A,e[43]=G):G=e[43];const J=N.length===a.length&&a.length>0;let B;e[44]!==J||e[45]!==A?(B=s.jsx(Ye,{checked:J,onCheckedChange:A,className:"mr-2 [&_svg]:!text-primary-foreground",onClick:or}),e[44]=J,e[45]=A,e[46]=B):B=e[46];let X;e[47]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx("span",{children:"(Select All)"}),e[47]=X):X=e[47];let H;e[48]!==G||e[49]!==B?(H=s.jsxs("div",{className:"flex items-center w-full",onClick:G,children:[B,X]}),e[48]=G,e[49]=B,e[50]=H):H=e[50];let se;e[51]!==U||e[52]!==H?(se=s.jsx(et,{onSelect:U,className:"cursor-pointer",children:H},"all"),e[51]=U,e[52]=H,e[53]=se):se=e[53];let ae;if(e[54]!==a||e[55]!==N||e[56]!==_){let Q;e[58]!==N||e[59]!==_?(Q=ee=>{const ie=N.includes(ee.value);return s.jsx(et,{onSelect:()=>{_(ee)},className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center w-full",onClick:ce=>{ce.stopPropagation(),_(ee)},children:[s.jsx(Ye,{checked:ie,onCheckedChange:()=>{_(ee)},className:"mr-2 [&_svg]:!text-primary-foreground",onClick:lr}),ee.icon&&s.jsx(ee.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),s.jsx("span",{children:ee.label})]})},ee.value)},e[58]=N,e[59]=_,e[60]=Q):Q=e[60],ae=a.map(Q),e[54]=a,e[55]=N,e[56]=_,e[57]=ae}else ae=e[57];let Y;e[61]!==se||e[62]!==ae?(Y=s.jsxs(zs,{className:"rounded-b-xl",children:[V,s.jsxs(Ks,{children:[se,ae]})]}),e[61]=se,e[62]=ae,e[63]=Y):Y=e[63];let le;e[64]!==Z||e[65]!==Y?(le=s.jsx(Mt,{className:"w-auto p-0 max-w-xs rounded-xl",align:"start",onEscapeKeyDown:te,children:s.jsxs(Bs,{className:"rounded-xl",children:[Z,Y]})}),e[64]=Z,e[65]=Y,e[66]=le):le=e[66];let oe;return e[67]!==D||e[68]!==u||e[69]!==q||e[70]!==le?(oe=s.jsxs(_t,{open:D,onOpenChange:I,modal:u,children:[q,le]}),e[67]=D,e[68]=u,e[69]=q,e[70]=le,e[71]=oe):oe=e[71],oe}function lr(t){return t.stopPropagation()}function or(t){return t.stopPropagation()}function ir(t){return t.value}function cr(t){return!t}function Qt(t,e){return e==="1d"?t.toLocaleDateString([],{month:"short",day:"numeric"}):t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function dr(t,e,a,r,n){const l=t.map(u=>u.toolName),i=new Map,c=20,o=a.getTime(),f=(r.getTime()-o)/(c-1);for(let u=0;u<c;u++){const y=Math.round(o+u*f),S=new Date(y);i.set(String(y),{t:S.toISOString(),ts:y,label:Qt(S,n),tools:new Map})}const m=[...i.keys()].map(Number).sort((u,y)=>u-y);for(const u of e){const y=u.timestamp.includes("T")?u.timestamp:u.timestamp.replace(" ","T"),S=new Date(y).getTime();let N=m[0],P=Math.abs(S-N);for(const M of m){const L=Math.abs(S-M);L<P&&(P=L,N=M)}const D=i.get(String(N)),I=D.tools.get(u.toolName);I?D.tools.set(u.toolName,{calls:I.calls+u.calls,errors:I.errors+u.errors,avg:(I.avg*I.calls+u.avg*u.calls)/(I.calls+u.calls),p95:Math.max(I.p95,u.p95)}):D.tools.set(u.toolName,{calls:u.calls,errors:u.errors,avg:u.avg,p95:u.p95})}const p=[...i.values()].sort((u,y)=>u.ts-y.ts),x=[],b=[],j=[],v=[];for(const u of p){const y={t:u.t,ts:u.ts,label:u.label},S={...y},N={...y},P={...y},D={...y};for(const I of l){const M=u.tools.get(I)??{calls:0,errors:0,avg:0,p95:0};S[I]=M.calls,D[I]=M.errors,N[I]=Math.round(M.avg),P[I]=Math.round(M.p95)}x.push(S),b.push(N),j.push(P),v.push(D)}const g={},h=new Map;return t.forEach((u,y)=>{const N=`var(--chart-${y%5+1})`;h.set(u.toolName,N),g[u.toolName]={label:u.toolName,color:N}}),{callsBuckets:x,latencyAvgBuckets:b,latencyP95Buckets:j,errorsBuckets:v,chartConfig:g,toolColors:h}}function mr(t,e){let a=0,r=Math.abs(t-e[0]);for(let n=1;n<e.length;n++){const l=Math.abs(t-e[n]);l<r&&(r=l,a=n)}return a}function ur(t,e,a,r){const l=e.getTime(),c=(a.getTime()-l)/19,o=[],d=[];for(let m=0;m<20;m++){const p=Math.round(l+m*c);d.push(p),o.push({t:new Date(p).toISOString(),ts:p,label:Qt(new Date(p),r),calls:0,errors:0,avg:0,p95:0})}const f=new Array(20).fill(0);for(const m of t){const p=new Date(m.timestamp).getTime(),x=mr(p,d),b=o[x];b.calls+=m.calls,b.errors+=m.errors,b.avg+=m.avg,b.p95=Math.max(b.p95,m.p95),f[x]++}for(let m=0;m<20;m++)f[m]>0&&(o[m].avg=o[m].avg/f[m]);return o}const pt={calls:"Top Tools — Calls","latency-avg":"Top Tools — Average Latency","latency-p95":"Top Tools — P95 Latency",errors:"Top Tools — Errors","llm-calls":"AI Usage","llm-latency-avg":"AI Latency","llm-latency-p95":"AI P95 Latency","llm-errors":"AI Errors"};function xr(t){return t.startsWith("llm-")}function ht(t,e){return e==="latency-avg"||e==="latency-p95"||e==="llm-latency-avg"||e==="llm-latency-p95"?t>=1e4?`${(t/1e3).toFixed(1)}s`:`${Math.round(t)}ms`:String(t)}function fr(t){const e=re.c(34),{metricsMode:a,dateRange:r,connectionIds:n,excludeConnectionIds:l,toolName:i,status:c,isStreaming:o,streamingRefetchInterval:d}=t,{org:f}=pe(),m=Ve(),p=Tt()??[],x=r;if(!x)throw new Error("TopTools requires an explicit date range");const b=new Date(x.startDate),j=new Date(x.endDate),v=j.getTime()-b.getTime(),g=v<=36e5?"1m":v<=9e7?"1h":"1d",h=xr(a),u=n?.length?n:void 0;let y;e[0]!==i?(y=i?[i]:void 0,e[0]=i,e[1]=y):y=e[1];let S;e[2]!==x.endDate||e[3]!==x.startDate||e[4]!==l||e[5]!==g||e[6]!==c||e[7]!==u||e[8]!==y?(S={interval:g,startDate:x.startDate,endDate:x.endDate,topN:10,connectionIds:u,excludeConnectionIds:l,toolNames:y,status:c},e[2]=x.endDate,e[3]=x.startDate,e[4]=l,e[5]=g,e[6]=c,e[7]=u,e[8]=y,e[9]=S):S=e[9];const N=o?d:!1;let P;e[10]!==N?(P={refetchInterval:N},e[10]=N,e[11]=P):P=e[11];const{data:D}=Ya(S,P);let I;e[12]!==x.endDate||e[13]!==x.startDate||e[14]!==g?(I={interval:g,startDate:x.startDate,endDate:x.endDate},e[12]=x.endDate,e[13]=x.startDate,e[14]=g,e[15]=I):I=e[15];const M=o?d:!1;let L;e[16]!==M?(L={refetchInterval:M},e[16]=M,e[17]=L):L=e[17];const{data:E}=qt(I,L),T=D?.topTools??[],{callsBuckets:C,latencyAvgBuckets:_,latencyP95Buckets:O,errorsBuckets:F,chartConfig:W,toolColors:K}=dr(T,D?.topToolsTimeseries??[],b,j,g),z=ur(E?.timeseries??[],b,j,g),A=a==="llm-latency-avg"?"avg":a==="llm-latency-p95"?"p95":a==="llm-errors"?"errors":"calls",k=a==="latency-avg"?_:a==="latency-p95"?O:a==="errors"?F:C,R=new Map(p.map(hr));let $;e[18]!==m||e[19]!==f.slug?($=()=>{m({to:"/$org/$project/monitoring",params:{org:f.slug,project:gt}})},e[18]=m,e[19]=f.slug,e[20]=$):$=e[20];const q=$;if(h){let V;e[21]!==A?(V={label:A,color:"var(--chart-1)"},e[21]=A,e[22]=V):V=e[22];let U;e[23]!==A||e[24]!==V?(U={[A]:V},e[23]=A,e[24]=V,e[25]=U):U=e[25];const G=U,J=pt[a];let B;e[26]!==J?(B=s.jsx("div",{className:"flex flex-col gap-1.5",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:J})}),e[26]=J,e[27]=B):B=e[27];const X=(E?.timeseries?.length??0)===0?s.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"No AI activity in this time range"}):s.jsx("div",{className:"flex flex-col gap-2 w-full h-full",children:s.jsx(it,{className:"flex-1 min-h-0 max-h-[140px] w-full",config:G,children:s.jsxs(xt,{data:z,margin:{left:8,right:8,top:5,bottom:5},children:[s.jsx(dt,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:"var(--muted-foreground)"}}),s.jsx(ct,{content:se=>{const{active:ae,payload:Y}=se;if(!ae||!Y||Y.length===0)return null;const le=Y[0]&&typeof Y[0]=="object"&&"payload"in Y[0]?Y[0].payload?.label??"":"",oe=typeof Y[0]?.value=="number"?Y[0].value:0;return s.jsxs("div",{className:"rounded-lg border bg-background p-2 shadow-sm",children:[s.jsx("div",{className:"mb-1.5 text-xs text-muted-foreground",children:le}),s.jsx("div",{className:"text-xs font-medium",children:ht(oe,a)})]})}}),s.jsx(Ke,{type:"monotone",dataKey:A,stroke:"var(--chart-1)",strokeWidth:2,animationDuration:200,dot:!1,activeDot:{r:4}})]})})});let H;return e[28]!==q||e[29]!==B||e[30]!==X?(H=s.jsx(Ne,{title:B,onTitleClick:q,children:X}),e[28]=q,e[29]=B,e[30]=X,e[31]=H):H=e[31],H}const te=pt[a];let Z;return e[32]!==te?(Z=s.jsx("p",{className:"text-sm text-muted-foreground",children:te}),e[32]=te,e[33]=Z):Z=e[33],s.jsx(Ne,{title:s.jsxs("div",{className:"flex flex-col gap-1.5",children:[Z,s.jsx("div",{className:"flex items-center gap-3",children:T.slice(0,3).map(V=>{const U=R.get(V.connectionId||"");return s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Ae,{icon:U?.icon||null,name:V.toolName,size:"xs",fallbackIcon:s.jsx($e,{}),className:"shrink-0 size-4! min-w-4! aspect-square rounded-sm"}),s.jsx("span",{className:"text-[10px] text-foreground truncate max-w-32",children:V.toolName})]},V.toolName)})})]}),onTitleClick:q,children:T.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"No tool activity in this time range"}):s.jsx("div",{className:"flex flex-col gap-2 w-full h-full",children:s.jsx(it,{className:"flex-1 min-h-0 max-h-[140px] w-full",config:W,children:s.jsxs(xt,{data:k,margin:{left:8,right:8,top:5,bottom:5},children:[s.jsx(dt,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:"var(--muted-foreground)"}}),s.jsx(ct,{content:V=>{const{active:U,payload:G}=V;if(!U||!G||G.length===0)return null;const J=G[0]&&typeof G[0]=="object"&&"payload"in G[0]?G[0].payload?.label??"":"";return s.jsxs("div",{className:"rounded-lg border bg-background p-2 shadow-sm",children:[s.jsx("div",{className:"mb-1.5 text-xs text-muted-foreground",children:J}),s.jsx("div",{className:"flex flex-col gap-1",children:[...G].sort(pr).map(B=>{const X=String(B.dataKey??""),H=typeof B.value=="number"?B.value:0,se=typeof B.color=="string"?B.color:void 0;if(!H||H===0)return null;const ae=T.find(le=>le.toolName===X),Y=R.get(ae?.connectionId||"");return s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:se}}),s.jsx(Ae,{icon:Y?.icon||null,name:X,size:"xs",fallbackIcon:s.jsx($e,{}),className:"shrink-0"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[X,":"]}),s.jsx("span",{className:"text-xs font-medium",children:ht(H,a)})]},X)})})]})}}),T.map(V=>s.jsx(Ke,{type:"monotone",dataKey:V.toolName,stroke:K.get(V.toolName),strokeWidth:2,animationDuration:200,dot:!1,activeDot:{r:4}},V.toolName))]})})})})}function pr(t,e){const a=typeof t.value=="number"?t.value:0;return(typeof e.value=="number"?e.value:0)-a}function hr(t){return[t.id,t]}function gr(){const t=re.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"h-5 w-20 rounded bg-muted animate-pulse"}),t[0]=e):e=t[0];let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[e,s.jsx("div",{className:"flex items-center gap-2",children:Array.from({length:3}).map(vr)})]}),t[1]=a):a=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ne,{title:a,children:s.jsx("div",{className:"flex flex-col gap-2 w-full",children:s.jsx("div",{className:"h-[140px] w-full rounded bg-muted animate-pulse"})})}),t[2]=r):r=t[2],r}function vr(t,e){return s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"size-4 aspect-square rounded-md bg-muted animate-pulse"}),s.jsx("div",{className:"h-2.5 w-16 rounded bg-muted animate-pulse"})]},e)}const Be={Content:fr,Skeleton:gr};function Jt(t){const e=t.endDate.getTime()-t.startDate.getTime(),a=3600*1e3,r=25*a;return e<=a?"1m":e<=r?"1h":"1d"}function br(t,e){const a=new Date(t);return e==="1d"?a.toLocaleDateString([],{month:"short",day:"numeric"}):a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function jr(t,e){const a=new Date(t);return e==="1d"?(a.setHours(0,0,0,0),a):e==="1h"?(a.setMinutes(0,0,0),a):(a.setSeconds(0,0),a)}function Zt(t,e,a){const r=new Map(t.map(m=>[jr(new Date(m.timestamp),a).getTime(),m])),n=20,l=e.startDate.getTime(),c=(e.endDate.getTime()-l)/(n-1),o=[],d=[];for(let m=0;m<n;m++){const p=Math.round(l+m*c);d.push(p),o.push({t:new Date(p).toISOString(),ts:p,label:br(new Date(p).toISOString(),a),calls:0,errors:0,errorRate:0,avg:0,p50:0,p95:0})}const f=new Array(n).fill(0);for(const[m,p]of r){let x=0,b=Math.abs(m-d[0]);for(let v=1;v<d.length;v++){const g=Math.abs(m-d[v]);g<b&&(b=g,x=v)}const j=o[x];j.calls+=p.calls,j.errors+=p.errors,j.errorRate+=p.errorRate,j.avg+=p.avg,j.p50+=p.p50,j.p95=Math.max(j.p95,p.p95),f[x]++}for(let m=0;m<n;m++)f[m]>0&&(o[m].errorRate=o[m].errorRate/f[m],o[m].avg=o[m].avg/f[m],o[m].p50=o[m].p50/f[m]);return o}function _e(t,e){return e==="requests"?t.calls:e==="errors"?t.errorRate:t.avgDurationMs}function Ce(t){return t>=1e4?`${(t/1e3).toFixed(1)}s`:`${Math.round(t)}ms`}function Nr(t,e){return e==="requests"?t.calls.toLocaleString():e==="errors"?`${t.errorRate.toFixed(1)}%`:Ce(t.avgDurationMs)}const yr=[{id:"calls",dataKey:"calls",colorNum:1,barColor:"bg-chart-1",leaderboardMode:"requests",chartMetrics:["calls"],renderTitle:t=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"Tool Calls"}),s.jsx("p",{className:"text-sm md:text-lg font-medium",children:t.totalCalls.toLocaleString()})]}),getNextMetric:()=>"calls"},{id:"latency",dataKey:t=>t==="latency-avg"?"avg":"p95",colorNum:4,barColor:"bg-chart-4",leaderboardMode:"latency",chartMetrics:["latency-avg","latency-p95"],renderTitle:(t,e)=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"Latency"}),s.jsxs("div",{className:"flex items-baseline gap-3",children:[s.jsxs("div",{className:fe("pb-0.5",e==="latency-avg"?"border-b-2 border-chart-4":"border-b-2 border-transparent"),children:[s.jsx("span",{className:"text-sm md:text-lg font-medium",children:Ce(t.avgDurationMs)}),s.jsx("span",{className:"text-[10px] md:text-xs text-muted-foreground ml-1",children:"avg"})]}),s.jsxs("div",{className:fe("pb-0.5",e==="latency-p95"?"border-b-2 border-chart-4":"border-b-2 border-transparent"),children:[s.jsx("span",{className:"text-sm md:text-lg font-medium",children:Ce(t.p95DurationMs)}),s.jsx("span",{className:"text-[10px] md:text-xs text-muted-foreground ml-1",children:"p95"})]})]})]}),getNextMetric:t=>t==="latency-avg"?"latency-p95":"latency-avg"},{id:"errors",dataKey:"errors",colorNum:3,barColor:"bg-chart-3",leaderboardMode:"errors",chartMetrics:["errors"],renderTitle:t=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"Errors"}),s.jsx("p",{className:"text-sm md:text-lg font-medium",children:t.totalErrors.toLocaleString()})]}),getNextMetric:()=>"errors"}];function wr(t){const e=re.c(12),{metrics:a,connections:r,mode:n,barColor:l}=t;let i,c,o;if(e[0]!==l||e[1]!==r||e[2]!==a||e[3]!==n){o=Symbol.for("react.early_return_sentinel");e:{const f=new Map(a.map(Cr)),m=r??[];let p;e[7]!==n?(p=(j,v)=>_e(v.metric,n)-_e(j.metric,n),e[7]=n,e[8]=p):p=e[8];const x=m.map(j=>({connection:j,metric:f.get(j.id)})).filter(Sr).sort(p).slice(0,5),b=x[0]?.metric?_e(x[0].metric,n):1;if(x.length===0){o=null;break e}i="space-y-1.5 mt-2",c=x.map(j=>{const{connection:v,metric:g}=j,h=_e(g,n),u=b>0?Math.min(h/b*100,100):0;return s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(Ae,{icon:v.icon,name:v.title,size:"xs",fallbackIcon:s.jsx($e,{}),className:"shrink-0 size-4! min-w-4!"}),s.jsx("span",{className:"text-[10px] text-foreground truncate min-w-0 w-20",children:v.title}),s.jsx("div",{className:"relative h-1.5 bg-muted/50 overflow-hidden flex-1",children:s.jsx("div",{className:fe("h-full",l),style:{width:`${u}%`}})}),s.jsx("span",{className:"text-[10px] tabular-nums shrink-0 text-foreground",children:Nr(g,n)})]},v.id)})}e[0]=l,e[1]=r,e[2]=a,e[3]=n,e[4]=i,e[5]=c,e[6]=o}else i=e[4],c=e[5],o=e[6];if(o!==Symbol.for("react.early_return_sentinel"))return o;let d;return e[9]!==i||e[10]!==c?(d=s.jsx("div",{className:i,children:c}),e[9]=i,e[10]=c,e[11]=d):d=e[11],d}function Sr(t){return t.metric}function Cr(t){return[t.connectionId,t]}function Ir(t){const e=re.c(8),{displayDateRange:a,connectionIds:r,excludeConnectionIds:n,toolName:l,status:i,connections:c,isStreaming:o,selectedMetric:d,onMetricSelect:f}=t,m=Jt(a),p=o?He.streamingRefetchInterval:!1;let x;e[0]!==p?(x={refetchInterval:p},e[0]=p,e[1]=x):x=e[1];const{data:b}=Za({interval:m,startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionIds:r.length>0?r:void 0,excludeConnectionIds:n,toolNames:l?[l]:void 0,status:i},x),j=b?{totalCalls:b.totalCalls,totalErrors:b.totalErrors,avgDurationMs:b.avgDurationMs,p95DurationMs:b.p95DurationMs,data:Zt(b.timeseries,a,m)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},v="border-b border-border";let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("div",{className:"px-5 py-2 bg-muted/30 border-b border-border",children:s.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Tool Calls"})}),e[2]=g):g=e[2];const h="grid grid-cols-3 gap-[0.5px] bg-border flex-shrink-0",u=yr.map(N=>{const{id:P,dataKey:D,colorNum:I,barColor:M,leaderboardMode:L,chartMetrics:E,renderTitle:T,getNextMetric:C}=N,_=E.includes(d),O=()=>{f(_?C(d):E[0])};return s.jsxs("div",{className:"bg-background relative cursor-pointer",onClick:O,children:[_&&s.jsx("div",{className:"absolute top-0 left-0 right-0 h-0.5 z-10",style:{backgroundColor:`var(--chart-${I})`}}),s.jsx(Ne,{title:T(j,d),children:s.jsxs("div",{className:"flex flex-col w-full",children:[s.jsx(Ct,{data:j.data,dataKey:typeof D=="function"?D(d):D,colorNum:I,chartHeight:"h-[30px] md:h-[40px]"}),s.jsx(wr,{metrics:b?.connectionBreakdown??[],connections:c,mode:L,barColor:M})]})})]},P)});let y;e[3]!==u?(y=s.jsx("div",{className:h,children:u}),e[3]=u,e[4]=y):y=e[4];let S;return e[5]!==g||e[6]!==y?(S=s.jsxs("div",{className:v,children:[g,y]}),e[5]=g,e[6]=y,e[7]=S):S=e[7],S}const Xt=Object.assign(Ir,{Skeleton:fs});function Dr(t){const e=re.c(9),{topTools:a,barColor:r}=t;if(a.length===0)return null;const n=a[0]?.calls??1;let l;if(e[0]!==r||e[1]!==n||e[2]!==a){let c;e[4]!==r||e[5]!==n?(c=o=>{const{toolName:d,calls:f}=o,m=n>0?Math.min(f/n*100,100):0;return s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"text-[10px] text-foreground truncate min-w-0 w-24",children:d}),s.jsx("div",{className:"relative h-1.5 bg-muted/50 overflow-hidden flex-1",children:s.jsx("div",{className:fe("h-full",r),style:{width:`${m}%`}})}),s.jsx("span",{className:"text-[10px] tabular-nums shrink-0 text-foreground",children:f.toLocaleString()})]},d)},e[4]=r,e[5]=n,e[6]=c):c=e[6],l=a.map(c),e[0]=r,e[1]=n,e[2]=a,e[3]=l}else l=e[3];let i;return e[7]!==l?(i=s.jsx("div",{className:"space-y-1.5 mt-2",children:l}),e[7]=l,e[8]=i):i=e[8],i}function Tr(t){const e=re.c(8),{displayDateRange:a,isStreaming:r,selectedMetric:n,onMetricSelect:l}=t,i=Jt(a),c=r?He.streamingRefetchInterval:!1;let o;e[0]!==c?(o={refetchInterval:c},e[0]=c,e[1]=o):o=e[1];const{data:d}=qt({interval:i,startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString()},o),f=d?{totalCalls:d.totalCalls,totalErrors:d.totalErrors,avgDurationMs:d.avgDurationMs,p95DurationMs:d.p95DurationMs,data:Zt(d.timeseries,a,i)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},m=d?.topTools??[],p=[{id:"llm-calls",dataKey:"calls",colorNum:1,barColor:"bg-chart-1",chartMetric:"llm-calls",renderTitle:()=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"AI Usage"}),s.jsx("p",{className:"text-sm md:text-lg font-medium",children:f.totalCalls.toLocaleString()})]})},{id:"llm-latency",dataKey:"avg",colorNum:4,barColor:"bg-chart-4",chartMetric:"llm-latency-avg",renderTitle:()=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"AI Latency"}),s.jsxs("div",{className:"flex items-baseline gap-3",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm md:text-lg font-medium",children:Ce(f.avgDurationMs)}),s.jsx("span",{className:"text-[10px] md:text-xs text-muted-foreground ml-1",children:"avg"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-sm md:text-lg font-medium",children:Ce(f.p95DurationMs)}),s.jsx("span",{className:"text-[10px] md:text-xs text-muted-foreground ml-1",children:"p95"})]})]})]})},{id:"llm-errors",dataKey:"errors",colorNum:3,barColor:"bg-chart-3",chartMetric:"llm-errors",renderTitle:()=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"AI Errors"}),s.jsx("p",{className:"text-sm md:text-lg font-medium",children:f.totalErrors.toLocaleString()})]})}],x="border-b border-border";let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"px-5 py-2 bg-muted/30 border-b border-border",children:s.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"AI Usage"})}),e[2]=b):b=e[2];const j="grid grid-cols-3 gap-[0.5px] bg-border flex-shrink-0",v=p.map(u=>{const{id:y,dataKey:S,colorNum:N,barColor:P,chartMetric:D,renderTitle:I}=u,M=n===D;return s.jsxs("div",{className:"bg-background relative cursor-pointer",onClick:()=>l(D),children:[M&&s.jsx("div",{className:"absolute top-0 left-0 right-0 h-0.5 z-10",style:{backgroundColor:`var(--chart-${N})`}}),s.jsx(Ne,{title:I(),children:s.jsxs("div",{className:"flex flex-col w-full",children:[s.jsx(Ct,{data:f.data,dataKey:S,colorNum:N,chartHeight:"h-[30px] md:h-[40px]"}),s.jsx(Dr,{topTools:m,barColor:P})]})})]},y)});let g;e[3]!==v?(g=s.jsx("div",{className:j,children:v}),e[3]=v,e[4]=g):g=e[4];let h;return e[5]!==b||e[6]!==g?(h=s.jsxs("div",{className:x,children:[b,g]}),e[5]=b,e[6]=g,e[7]=h):h=e[7],h}function kr(){const t=re.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"px-5 py-2 bg-muted/30 border-b border-border",children:s.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t[0]=e):e=t[0];let a;return t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("div",{className:"border-b border-border",children:[e,s.jsx("div",{className:"grid grid-cols-3 gap-[0.5px] bg-border flex-shrink-0",children:[...Array(3)].map(Mr)})]}),t[1]=a):a=t[1],a}function Mr(t,e){return s.jsx(Ne,{title:s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("div",{className:"h-4 w-16 rounded bg-muted animate-pulse"}),s.jsx("div",{className:"h-5 md:h-6 w-12 rounded bg-muted animate-pulse"})]}),children:s.jsxs("div",{className:"flex flex-col w-full",children:[s.jsx("div",{className:"h-[30px] md:h-[40px] w-full rounded bg-muted animate-pulse"}),s.jsx("div",{className:"space-y-1.5 mt-2",children:Array.from({length:3}).map(_r)})]})},e)}function _r(t,e){return s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"h-2.5 w-24 rounded bg-muted animate-pulse"}),s.jsx("div",{className:"h-1.5 flex-1 bg-muted animate-pulse"}),s.jsx("div",{className:"h-2.5 w-8 rounded bg-muted animate-pulse shrink-0"})]},e)}const Yt=Object.assign(Tr,{Skeleton:kr}),Pr=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function Ar({connectionIds:t,virtualMcpIds:e,tool:a,status:r,hideSystem:n,propertyFilters:l,connectionOptions:i,virtualMcpOptions:c,activeFiltersCount:o,onUpdateFilters:d}){const[f,m]=w.useState(!1),[p,x]=w.useState("raw"),[b,j]=w.useState(a),[v,g]=w.useState(l),[h,u]=w.useState(ke(l)),y=w.useRef(a),S=w.useRef(je(l));y.current!==a&&(y.current=a,b!==a&&j(a));const N=je(l);S.current!==N&&(S.current=N,g(l),u(ke(l)));const P=(T,C)=>{const _=[...v],O=_[T];O&&(_[T]={key:C.key??O.key,operator:C.operator??O.operator,value:C.value??O.value},g(_))},D=()=>{g([...v,{key:"",operator:"eq",value:""}])},I=T=>{const C=v.filter((_,O)=>O!==T);g(C),u(ke(C)),d({propertyFilters:je(C)})},M=()=>{d({propertyFilters:je(v)})},L=()=>{const T=Ze(h);g(T),d({propertyFilters:je(T)})},E=()=>{if(p==="raw"){const T=Ze(h);g(T),x("form")}else u(ke(v)),x("raw")};return s.jsxs(_t,{open:f,onOpenChange:m,children:[s.jsx(kt,{asChild:!0,children:s.jsxs(ue,{variant:"outline",size:"sm",children:[s.jsx(Es,{size:16}),"Filters",o>0&&s.jsx(Le,{variant:"default",className:"ml-1 h-5 w-5 rounded-full p-0 flex items-center justify-center text-xs",children:o})]})}),s.jsx(Mt,{align:"end",className:"w-[320px]",children:s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{children:s.jsx("h4",{className:"font-medium text-sm mb-3",children:"Filter Logs"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Gs,{htmlFor:"hide-system-calls",className:"text-xs font-medium text-muted-foreground cursor-pointer",children:"Hide system calls"}),s.jsx(Us,{id:"hide-system-calls",checked:n,onCheckedChange:T=>d({hideSystem:!!T})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Connections"}),s.jsx(ft,{options:i,defaultValue:t,onValueChange:T=>d({connectionId:T}),placeholder:"All servers",variant:"secondary",className:"w-full",maxCount:2})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Agents"}),s.jsx(ft,{options:c,defaultValue:e,onValueChange:T=>d({virtualMcpId:T}),placeholder:"All Agents",variant:"secondary",className:"w-full",maxCount:2})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Tool Name"}),s.jsx(Oe,{id:"filter-tool",placeholder:"Filter by tool...",value:b,onChange:T=>j(T.target.value),onBlur:()=>{b!==a&&d({tool:b})},onKeyDown:T=>{T.key==="Enter"&&b!==a&&d({tool:b})},className:"w-full"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Status"}),s.jsxs(tt,{value:r,onValueChange:T=>d({status:T}),children:[s.jsx(st,{className:"w-full",children:s.jsx(at,{})}),s.jsxs(rt,{children:[s.jsx(Me,{value:"all",children:"All Status"}),s.jsx(Me,{value:"success",children:"Success Only"}),s.jsx(Me,{value:"errors",children:"Errors Only"})]})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Property Filters"}),s.jsxs(Vs,{children:[s.jsx(Ws,{asChild:!0,children:s.jsx(ue,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:E,children:p==="raw"?s.jsx(Os,{size:14}):s.jsx(Ls,{size:14})})}),s.jsx(Hs,{children:p==="raw"?"Switch to form view":"Switch to raw text"})]})]}),p==="raw"?s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Fs,{placeholder:`Paste property filters here:
|
|
2
|
-
thread_id=abc123
|
|
3
|
-
user~test
|
|
4
|
-
debug?`,value:h,onChange:T=>u(T.target.value),onBlur:L,onKeyDown:T=>{T.key==="Enter"&&T.metaKey&&L()},className:"font-mono text-sm min-h-[80px] resize-none"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["One per line:"," ",s.jsx("code",{className:"bg-muted px-1 rounded",children:"key=value"})," ",s.jsx("code",{className:"bg-muted px-1 rounded",children:"key~contains"})," ",s.jsx("code",{className:"bg-muted px-1 rounded",children:"key@in_list"})," ",s.jsx("code",{className:"bg-muted px-1 rounded",children:"key?"})]})]}):s.jsxs("div",{className:"space-y-3",children:[v.map((T,C)=>s.jsxs("div",{className:"p-2.5 rounded-md border border-border bg-muted/30 space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-xs text-muted-foreground",children:["Filter ",C+1]}),s.jsx(ue,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>I(C),children:s.jsx(Dt,{size:12})})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Oe,{placeholder:"Key (e.g., thread_id)",value:T.key,onChange:_=>P(C,{key:_.target.value}),onBlur:M,onKeyDown:_=>{_.key==="Enter"&&M()},className:"flex-1 font-mono text-sm"}),s.jsxs(tt,{value:T.operator,onValueChange:_=>{const O=[...v],F=O[C];F&&(O[C]={...F,operator:_,value:_==="exists"?"":F.value},g(O),d({propertyFilters:je(O)}))},children:[s.jsx(st,{className:"w-28",children:s.jsx(at,{})}),s.jsx(rt,{children:Pr.map(_=>s.jsx(Me,{value:_.value,children:_.label},_.value))})]})]}),T.operator!=="exists"&&s.jsx(Oe,{placeholder:"Value",value:T.value,onChange:_=>P(C,{value:_.target.value}),onBlur:M,onKeyDown:_=>{_.key==="Enter"&&M()},className:"w-full font-mono text-sm"})]},C)),s.jsxs(ue,{variant:"outline",size:"sm",className:"w-full",onClick:D,children:[s.jsx(It,{size:14,className:"mr-1.5"}),"Add filter"]})]})]})]}),o>0&&s.jsx(ue,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{j(""),g([]),u(""),d({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),m(!1)},children:"Clear all filters"})]})})]})}function Lr(t){const e=re.c(17),{connectionIds:a,virtualMcpIds:r,tool:n,status:l,search:i,logs:c,hasMore:o,onLoadMore:d,isLoadingMore:f,connections:m,virtualMcps:p,membersData:x}=t,b=m??[],j=p??[];let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=new Set,e[0]=v):v=e[0];const[g,h]=w.useState(v),u=Ms(d,o,f),y=x?.data?.members??[],S=new Map(y.map(Rr)),N=new Map(j.map(Or));let D=c.map(k=>{const R=S.get(k.userId??""),$=k.virtualMcpId?N.get(k.virtualMcpId):null;return{...k,userName:R?.name??k.userId??"Unknown",userImage:R?.image,virtualMcpName:$?.title??null}});if(a.length>1){let k;e[1]!==a?(k=R=>a.includes(R.connectionId),e[1]=a,e[2]=k):k=e[2],D=D.filter(k)}if(r.length>1){let k;e[3]!==r?(k=R=>R.virtualMcpId&&r.includes(R.virtualMcpId),e[3]=r,e[4]=k):k=e[4],D=D.filter(k)}if(i){const k=i.toLowerCase();D=D.filter(R=>R.toolName.toLowerCase().includes(k)||R.connectionTitle.toLowerCase().includes(k)||R.errorMessage?.toLowerCase().includes(k))}let I;e[5]===Symbol.for("react.memo_cache_sentinel")?(I=k=>{h(R=>{const $=new Set(R);return $.has(k.id)?$.delete(k.id):$.add(k.id),$})},e[5]=I):I=e[5];const M=I,L=new Map(b.map(Er));if(D.length===0){let k;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("img",{src:"/empty-state-logs.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),e[6]=k):k=e[6];const R=i||a.length>0||r.length>0||n||l!=="all"?"No logs match your filters":"No logs found in this time range";let $;return e[7]!==R?($=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(We,{image:k,title:"No logs found",description:R})}),e[7]=R,e[8]=$):$=e[8],$}const E="flex-1 flex flex-col overflow-hidden",T="flex-1 overflow-auto",C="min-w-[600px] md:min-w-0 bg-background",_=wt,O="w-full border-collapse";let F;e[9]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(St,{className:"border-b-0 z-20",children:s.jsxs(we,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(ne,{className:"w-10 md:w-12 px-2 md:px-4"}),s.jsx(ne,{className:"w-5"}),s.jsx(ne,{className:"pr-2 md:pr-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Tool / Connection"}),s.jsx(ne,{className:"w-24 md:w-32 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Agent"}),s.jsx(ne,{className:"w-20 md:w-24 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"User Name"}),s.jsx(ne,{className:"w-20 md:w-24 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Date"}),s.jsx(ne,{className:"w-20 md:w-28 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Time"}),s.jsx(ne,{className:"w-16 md:w-20 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:"Latency"}),s.jsx(ne,{className:"w-16 md:w-24 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right pr-3 md:pr-5",children:"Status"})]})}),e[9]=F):F=e[9];const W=yt,K=D.map((k,R)=>s.jsx(Ja,{log:k,isExpanded:g.has(k.id),connection:L.get(k.connectionId),virtualMcpName:k.virtualMcpName??"",onToggle:()=>M(k),lastLogRef:R===D.length-1?u:void 0},k.id));let z;e[10]!==W||e[11]!==K?(z=s.jsx(W,{children:K}),e[10]=W,e[11]=K,e[12]=z):z=e[12];let A;return e[13]!==_||e[14]!==F||e[15]!==z?(A=s.jsx("div",{className:E,children:s.jsx("div",{className:T,children:s.jsx("div",{className:C,children:s.jsxs(_,{className:O,children:[F,z]})})})}),e[13]=_,e[14]=F,e[15]=z,e[16]=A):A=e[16],A}function Er(t){return[t.id,t]}function Or(t){return[t.id,t]}function Rr(t){return[t.userId,t.user]}function $r(){const t=re.c(10);let e,a;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ne,{className:"w-10 md:w-12 px-2 md:px-4"}),a=s.jsx(ne,{className:"w-5"}),t[0]=e,t[1]=a):(e=t[0],a=t[1]);let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ne,{className:"pr-2 md:pr-4",children:s.jsx("div",{className:"h-3 w-24 rounded bg-muted animate-pulse"})}),t[2]=r):r=t[2];let n;t[3]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ne,{className:"w-24 md:w-32 px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse"})}),t[3]=n):n=t[3];let l;t[4]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ne,{className:"w-20 md:w-24 px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t[4]=l):l=t[4];let i;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ne,{className:"w-20 md:w-24 px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse"})}),t[5]=i):i=t[5];let c;t[6]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ne,{className:"w-20 md:w-28 px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse"})}),t[6]=c):c=t[6];let o;t[7]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ne,{className:"w-16 md:w-20 px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),t[7]=o):o=t[7];let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(St,{className:"border-b-0 z-20",children:s.jsxs(we,{className:"h-9 hover:bg-transparent border-b border-border",children:[e,a,r,n,l,i,c,o,s.jsx(ne,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:s.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse ml-auto"})})]})}),t[8]=d):d=t[8];let f;return t[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx("div",{className:"min-w-[600px] md:min-w-0 bg-background",children:s.jsxs(wt,{className:"w-full border-collapse",children:[d,s.jsx(yt,{children:Array.from({length:8}).map(zr)})]})})})}),t[9]=f):f=t[9],f}function zr(t,e){return s.jsxs(we,{className:"h-12 border-b border-border",children:[s.jsx("td",{className:"px-2 md:px-4",children:s.jsx("div",{className:"size-4 rounded bg-muted animate-pulse"})}),s.jsx("td",{children:s.jsx("div",{className:"size-5 rounded bg-muted animate-pulse"})}),s.jsx("td",{className:"pr-2 md:pr-4",children:s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"h-3.5 w-32 rounded bg-muted animate-pulse"}),s.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),s.jsx("td",{className:"px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),s.jsx("td",{className:"px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})}),s.jsx("td",{className:"px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),s.jsx("td",{className:"px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})}),s.jsx("td",{className:"px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),s.jsx("td",{className:"px-2 md:px-3 pr-3 md:pr-5",children:s.jsx("div",{className:"h-5 w-14 rounded-full bg-muted animate-pulse ml-auto"})})]},e)}const es=Object.assign(Lr,{Skeleton:$r});function Kr(t){const e=re.c(44),{client:a,locator:r,baseParams:n,pageSize:l,isStreaming:i,streamingRefetchInterval:c,connectionIds:o,virtualMcpIds:d,tool:f,status:m,searchQuery:p,onUpdateFilters:x,allConnections:b,allVirtualMcps:j,membersData:v}=t;let g;e[0]!==n||e[1]!==r?(g=Pe.monitoringLogsInfinite(r,JSON.stringify(n)),e[0]=n,e[1]=r,e[2]=g):g=e[2];let h;e[3]!==n||e[4]!==a||e[5]!==l?(h=async z=>{const{pageParam:A}=z,k=A===void 0?0:A;if(!a)throw new Error("MCP client is not available");const R=await a.callTool({name:"MONITORING_LOGS_LIST",arguments:{...n,limit:l,offset:k}});return R.structuredContent??R},e[3]=n,e[4]=a,e[5]=l,e[6]=h):h=e[6];let u;e[7]!==l?(u=(z,A)=>{if(!((z?.logs?.length??0)<l))return A.length*l},e[7]=l,e[8]=u):u=e[8];const y=i?c:!1;let S;e[9]!==g||e[10]!==h||e[11]!==u||e[12]!==y?(S={queryKey:g,queryFn:h,initialPageParam:0,getNextPageParam:u,staleTime:0,refetchInterval:y},e[9]=g,e[10]=h,e[11]=u,e[12]=y,e[13]=S):S=e[13];const{data:N,fetchNextPage:P,hasNextPage:D,isFetchingNextPage:I}=Ps(S);let M;e[14]!==N.pages?(M=N.pages.flatMap(Br),e[14]=N.pages,e[15]=M):M=e[15];const L=M;let E;e[16]!==P||e[17]!==D||e[18]!==I?(E=()=>{D&&!I&&P()},e[16]=P,e[17]=D,e[18]=I,e[19]=E):E=e[19];const T=E;let C;e[20]!==x?(C=z=>x({search:z}),e[20]=x,e[21]=C):C=e[21];let _;e[22]!==x?(_=z=>{z.key==="Escape"&&(x({search:""}),z.target.blur())},e[22]=x,e[23]=_):_=e[23];let O;e[24]!==p||e[25]!==C||e[26]!==_?(O=s.jsx(ls,{value:p,onChange:C,placeholder:"Search by tool name, connection, or error...",className:"border-t",onKeyDown:_}),e[24]=p,e[25]=C,e[26]=_,e[27]=O):O=e[27];const F=D??!1;let W;e[28]!==b||e[29]!==L||e[30]!==j||e[31]!==o||e[32]!==T||e[33]!==I||e[34]!==v||e[35]!==p||e[36]!==m||e[37]!==F||e[38]!==f||e[39]!==d?(W=s.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:s.jsx(es,{connectionIds:o,virtualMcpIds:d,tool:f,status:m,search:p,logs:L,hasMore:F,onLoadMore:T,isLoadingMore:I,connections:b,virtualMcps:j,membersData:v})}),e[28]=b,e[29]=L,e[30]=j,e[31]=o,e[32]=T,e[33]=I,e[34]=v,e[35]=p,e[36]=m,e[37]=F,e[38]=f,e[39]=d,e[40]=W):W=e[40];let K;return e[41]!==O||e[42]!==W?(K=s.jsxs("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:[O,W]}),e[41]=O,e[42]=W,e[43]=K):K=e[43],K}function Br(t){return t.logs??[]}function Fr(t){const e=re.c(85),{tab:a,dateRange:r,displayDateRange:n,connectionIds:l,virtualMcpIds:i,tool:c,status:o,search:d,streaming:f,hideSystem:m,activeFiltersCount:p,from:x,to:b,propertyFilters:j,onUpdateFilters:v,onTimeRangeChange:g,onStreamingToggle:h,onTabChange:u}=t,y=Tt(),S=As(),{data:N}=_s();let P;e[0]!==y?(P=y??[],e[0]=y,e[1]=P):P=e[1];let D;e[2]!==P?(D=P.map(Wr),e[2]=P,e[3]=D):D=e[3];const I=D;let M;e[4]!==S?(M=S.map(Vr),e[4]=S,e[5]=M):M=e[5];const L=M,{pageSize:E,streamingRefetchInterval:T}=He,{org:C,locator:_}=pe();let O;e[6]!==C.id?(O={connectionId:Ie,orgId:C.id},e[6]=C.id,e[7]=O):O=e[7];const F=De(O);let W;e[8]!==j?(W=cs(j),e[8]=j,e[9]=W):W=e[9];const K=W;let z;e[10]!==m||e[11]!==C.id?(z=m?[ps.SELF(C.id)]:void 0,e[10]=m,e[11]=C.id,e[12]=z):z=e[12];const A=z,[k,R]=w.useState(!1);let $;e[13]!==r.startDate?($=r.startDate.toISOString(),e[13]=r.startDate,e[14]=$):$=e[14];let q;e[15]!==r.endDate?(q=r.endDate.toISOString(),e[15]=r.endDate,e[16]=q):q=e[16];const te=k?"decopilot":l.length===1?l[0]:void 0,Z=i.length===1?i[0]:void 0,V=c||void 0,U=o==="errors"?!0:o==="success"?!1:void 0;let G;e[17]!==A||e[18]!==K||e[19]!==Z||e[20]!==V||e[21]!==U||e[22]!==$||e[23]!==q||e[24]!==te?(G={startDate:$,endDate:q,connectionId:te,excludeConnectionIds:A,virtualMcpId:Z,toolName:V,isError:U,...K},e[17]=A,e[18]=K,e[19]=Z,e[20]=V,e[21]=U,e[22]=$,e[23]=q,e[24]=te,e[25]=G):G=e[25];const J=G,[B,X]=w.useState("calls");let H;e[26]!==n.startDate?(H=n.startDate.toISOString(),e[26]=n.startDate,e[27]=H):H=e[27];let se;e[28]!==n.endDate?(se=n.endDate.toISOString(),e[28]=n.endDate,e[29]=se):se=e[29];let ae;e[30]!==H||e[31]!==se?(ae={startDate:H,endDate:se},e[30]=H,e[31]=se,e[32]=ae):ae=e[32];const Y=ae;let le;e[33]===Symbol.for("react.memo_cache_sentinel")?(le={id:"overview",label:"Overview"},e[33]=le):le=e[33];let oe;e[34]===Symbol.for("react.memo_cache_sentinel")?(oe={id:"audit",label:"Audit"},e[34]=oe):oe=e[34];let Q;e[35]===Symbol.for("react.memo_cache_sentinel")?(Q=[le,oe,{id:"dashboards",label:"Dashboards"}],e[35]=Q):Q=e[35];const ee=Q;let ie;e[36]===Symbol.for("react.memo_cache_sentinel")?(ie=s.jsx(xe.Header.Left,{children:s.jsx(vt,{children:s.jsx(bt,{children:s.jsx(jt,{children:s.jsx(Nt,{children:"Monitoring"})})})})}),e[36]=ie):ie=e[36];let ce;e[37]!==p||e[38]!==k||e[39]!==l||e[40]!==I||e[41]!==x||e[42]!==m||e[43]!==f||e[44]!==h||e[45]!==g||e[46]!==v||e[47]!==j||e[48]!==o||e[49]!==a||e[50]!==b||e[51]!==c||e[52]!==i||e[53]!==L?(ce=(a==="overview"||a==="audit")&&s.jsx(xe.Header.Right,{children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx(Ar,{connectionIds:l,virtualMcpIds:i,tool:c,status:o,hideSystem:m,propertyFilters:j,connectionOptions:I,virtualMcpOptions:L,activeFiltersCount:p,onUpdateFilters:v}),a==="audit"&&s.jsx(ue,{variant:k?"secondary":"outline",size:"sm",className:"h-7 px-2 sm:px-3 text-xs",onClick:()=>R(!k),children:"AI Usage"}),s.jsxs(ue,{variant:f?"secondary":"outline",size:"sm",className:fe("h-7 px-2 sm:px-3 gap-1.5",f&&"bg-muted hover:bg-muted/80"),onClick:h,children:[f?s.jsx(Kt,{size:16,className:"animate-pulse"}):s.jsx(Bt,{size:16}),s.jsx("span",{className:"hidden sm:inline",children:f?"Streaming":"Stream"})]}),s.jsx(ds,{value:{from:x,to:b},onChange:g})]})}),e[37]=p,e[38]=k,e[39]=l,e[40]=I,e[41]=x,e[42]=m,e[43]=f,e[44]=h,e[45]=g,e[46]=v,e[47]=j,e[48]=o,e[49]=a,e[50]=b,e[51]=c,e[52]=i,e[53]=L,e[54]=ce):ce=e[54];let he;e[55]!==ce?(he=s.jsxs(xe.Header,{children:[ie,ce]}),e[55]=ce,e[56]=he):he=e[56];let ge;e[57]!==u?(ge=ts=>u(ts),e[57]=u,e[58]=ge):ge=e[58];let ve;e[59]!==ge||e[60]!==a?(ve=s.jsx("div",{className:"px-5 py-3 border-b border-border",children:s.jsx(Pt,{tabs:ee,activeTab:a,onTabChange:ge})}),e[59]=ge,e[60]=a,e[61]=ve):ve=e[61];let be;e[62]!==y||e[63]!==S||e[64]!==Y||e[65]!==J||e[66]!==F||e[67]!==l||e[68]!==n||e[69]!==A||e[70]!==f||e[71]!==_||e[72]!==N||e[73]!==v||e[74]!==d||e[75]!==o||e[76]!==a||e[77]!==c||e[78]!==B||e[79]!==i?(be=a==="dashboards"?s.jsx(nr,{}):a==="audit"?s.jsx(Kr,{client:F,locator:_,baseParams:J,pageSize:E,isStreaming:f,streamingRefetchInterval:T,connectionIds:l,virtualMcpIds:i,tool:c,status:o,searchQuery:d,onUpdateFilters:v,allConnections:y,allVirtualMcps:S,membersData:N}):s.jsxs("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:[s.jsx("div",{className:"border-b border-border relative z-10",children:s.jsx(Fe,{fallback:null,children:s.jsx(w.Suspense,{fallback:s.jsx(Be.Skeleton,{}),children:s.jsx(Be.Content,{metricsMode:B,dateRange:Y,connectionIds:l,excludeConnectionIds:A,toolName:c||void 0,status:o==="errors"?"error":o==="success"?"success":void 0,isStreaming:f,streamingRefetchInterval:T})})})}),s.jsx(Xt,{displayDateRange:n,connectionIds:l,excludeConnectionIds:A,toolName:c||void 0,status:o==="errors"?"error":o==="success"?"success":void 0,connections:y,isStreaming:f,selectedMetric:B,onMetricSelect:X}),s.jsx(Yt,{displayDateRange:n,isStreaming:f,selectedMetric:B,onMetricSelect:X})]}),e[62]=y,e[63]=S,e[64]=Y,e[65]=J,e[66]=F,e[67]=l,e[68]=n,e[69]=A,e[70]=f,e[71]=_,e[72]=N,e[73]=v,e[74]=d,e[75]=o,e[76]=a,e[77]=c,e[78]=B,e[79]=i,e[80]=be):be=e[80];let Te;return e[81]!==he||e[82]!==ve||e[83]!==be?(Te=s.jsxs(s.Fragment,{children:[he,ve,be]}),e[81]=he,e[82]=ve,e[83]=be,e[84]=Te):Te=e[84],Te}function Vr(t){return{value:t.id??"",label:t.title??"Decopilot"}}function Wr(t){return{value:t.id,label:t.title||t.id}}function al(){const t=re.c(81),{org:e}=pe(),a=Ve();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/$project/monitoring"},t[0]=r):r=t[0];const n=ns(r),{tab:l,from:i,to:c,connectionId:o,virtualMcpId:d,tool:f,search:m,status:p,streaming:x,propertyFilters:b,hideSystem:j}=n,v=l===void 0?"overview":l;let g;t[1]!==o?(g=o===void 0?[]:o,t[1]=o,t[2]=g):g=t[2];const h=g;let u;t[3]!==d?(u=d===void 0?[]:d,t[3]=d,t[4]=u):u=t[4];const y=u,S=x===void 0?!0:x,N=b===void 0?"":b,P=j===void 0?!1:j;let D,I,M,L,E,T,C;if(t[5]!==h.length||t[6]!==i||t[7]!==P||t[8]!==a||t[9]!==e.slug||t[10]!==N||t[11]!==n||t[12]!==p||t[13]!==S||t[14]!==c||t[15]!==f||t[16]!==y.length){E=is(N);let U;t[24]!==a||t[25]!==e.slug||t[26]!==n?(U=H=>{a({to:"/$org/$project/monitoring",params:{org:e.slug,project:gt},search:{...n,...H}})},t[24]=a,t[25]=e.slug,t[26]=n,t[27]=U):U=t[27],C=U;let G;t[28]!==C?(G=H=>{C({from:H.from,to:H.to})},t[28]=C,t[29]=G):G=t[29],L=G;let J,B;if(t[30]!==i||t[31]!==S||t[32]!==c){const H=Je(i),se=Je(c);B=H.date||new Date(Date.now()-18e5);const ae=se.date||new Date;M={startDate:B,endDate:ae},J=ae,S&&c==="now"&&(J=new Date(ae),J.setHours(J.getHours()+1)),t[30]=i,t[31]=S,t[32]=c,t[33]=M,t[34]=J,t[35]=B}else M=t[33],J=t[34],B=t[35];let X;t[36]!==J||t[37]!==B?(X={startDate:B,endDate:J},t[36]=J,t[37]=B,t[38]=X):X=t[38],I=X,D=0,h.length>0&&D++,y.length>0&&D++,f&&D++,p!=="all"&&D++,P&&D++,T=E.filter(Hr),t[5]=h.length,t[6]=i,t[7]=P,t[8]=a,t[9]=e.slug,t[10]=N,t[11]=n,t[12]=p,t[13]=S,t[14]=c,t[15]=f,t[16]=y.length,t[17]=D,t[18]=I,t[19]=M,t[20]=L,t[21]=E,t[22]=T,t[23]=C}else D=t[17],I=t[18],M=t[19],L=t[20],E=t[21],T=t[22],C=t[23];const _=T;_.length>0&&(D=D+_.length);let O;t[39]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(xe.Header,{children:s.jsx(xe.Header.Left,{children:s.jsx("h1",{className:"text-sm font-medium text-foreground",children:"Monitoring"})})}),t[39]=O):O=t[39];let F;t[40]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-[0.5px] bg-border shrink-0 border-b",children:s.jsx("div",{className:"bg-background p-5 text-sm text-muted-foreground",children:"Failed to load monitoring data"})}),t[40]=F):F=t[40];let W;t[41]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsxs(s.Fragment,{children:[O,s.jsx(xe.Content,{children:s.jsxs("div",{className:"flex flex-col overflow-auto md:overflow-hidden h-full",children:[F,s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(We,{title:"Failed to load logs",description:"There was an error loading the monitoring data. Please try again."})})]})})]}),t[41]=W):W=t[41];let K;t[42]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(xe.Header,{children:s.jsx(xe.Header.Left,{children:s.jsx(vt,{children:s.jsx(bt,{children:s.jsx(jt,{children:s.jsx(Nt,{children:"Monitoring"})})})})})}),t[42]=K):K=t[42];let z;t[43]===Symbol.for("react.memo_cache_sentinel")?(z=[{id:"overview",label:"Overview"},{id:"audit",label:"Audit"},{id:"dashboards",label:"Dashboards"}],t[43]=z):z=t[43];let A;t[44]!==C?(A=U=>C({tab:U}),t[44]=C,t[45]=A):A=t[45];let k;t[46]!==A||t[47]!==v?(k=s.jsx("div",{className:"px-5 py-3 border-b border-border",children:s.jsx(Pt,{tabs:z,activeTab:v,onTabChange:A})}),t[46]=A,t[47]=v,t[48]=k):k=t[48];let R;t[49]!==v?(R=v==="audit"?s.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:s.jsx(es.Skeleton,{})}):v==="dashboards"?s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx("div",{className:"text-muted-foreground",children:"Loading dashboards..."})}):s.jsxs("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:[s.jsx("div",{className:"border-b border-border",children:s.jsx(Be.Skeleton,{})}),s.jsx(Xt.Skeleton,{}),s.jsx(Yt.Skeleton,{})]}),t[49]=v,t[50]=R):R=t[50];let $;t[51]!==k||t[52]!==R?($=s.jsxs(s.Fragment,{children:[K,k,R]}),t[51]=k,t[52]=R,t[53]=$):$=t[53];let q;t[54]!==S||t[55]!==C?(q=()=>C({streaming:!S}),t[54]=S,t[55]=C,t[56]=q):q=t[56];let te;t[57]!==C?(te=U=>C({tab:U}),t[57]=C,t[58]=te):te=t[58];let Z;t[59]!==D||t[60]!==h||t[61]!==I||t[62]!==M||t[63]!==i||t[64]!==L||t[65]!==P||t[66]!==E||t[67]!==m||t[68]!==p||t[69]!==S||t[70]!==q||t[71]!==te||t[72]!==v||t[73]!==c||t[74]!==f||t[75]!==C||t[76]!==y?(Z=s.jsx(Fr,{tab:v,dateRange:I,displayDateRange:M,connectionIds:h,virtualMcpIds:y,tool:f,status:p,search:m,streaming:S,hideSystem:P,activeFiltersCount:D,from:i,to:c,propertyFilters:E,onUpdateFilters:C,onTimeRangeChange:L,onStreamingToggle:q,onTabChange:te}),t[59]=D,t[60]=h,t[61]=I,t[62]=M,t[63]=i,t[64]=L,t[65]=P,t[66]=E,t[67]=m,t[68]=p,t[69]=S,t[70]=q,t[71]=te,t[72]=v,t[73]=c,t[74]=f,t[75]=C,t[76]=y,t[77]=Z):Z=t[77];let V;return t[78]!==$||t[79]!==Z?(V=s.jsx(xe,{children:s.jsx(Fe,{fallback:W,children:s.jsx(w.Suspense,{fallback:$,children:Z})})}),t[78]=$,t[79]=Z,t[80]=V):V=t[80],V}function Hr(t){return t.key.trim()}export{al as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as v,c as E,aw as re,e as ae,d as ne,g as ie,u as Z,x as W,w as C,K as b,j as s,y as oe,B as V,E as le}from"./index-DsOJvxnb.js";import{u as ce}from"./use-local-storage-CxC8ozOe.js";import{u as Y}from"./useMutation-B_cFG709.js";import{i as de}from"./AlertCircle-De9oqjty.js";import{i as me}from"./EyeOff-9_-SJWcU.js";import{s as ue}from"./Eye-JuDcZhJz.js";import{i as fe}from"./Key01-DAjAUWfr.js";import{s as he}from"./Trash01-YPQczxci.js";import{C as xe}from"./card-RQxLVCBk.js";import{I as G}from"./input-CUT8DBv1.js";import{S as pe}from"./skeleton-DJFpR-1P.js";import{A as ge}from"./avatar-OE2URZfM.js";import{b as X,P as J,a as ee}from"./popover-CF3EN_0o.js";import{a as ve,b as ye}from"./use-llm-BkLbMZPM.js";import{u as te,a as se}from"./constants-XtX-WKGm.js";import{f as je}from"./formatDistanceToNow-Cb2QZZJn.js";const Ce=({size:t=24,color:e="currentColor",...i})=>v.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},v.createElement("path",{d:"M9 2v2m6-2v2M9 20v2m6-2v2m5-13h2m-2 5h2M2 9h2m-2 5h2m4.8 6h6.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 17.72 20 16.88 20 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C17.72 4 16.88 4 15.2 4H8.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C4 6.28 4 7.12 4 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C6.28 20 7.12 20 8.8 20Zm1.8-5h2.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C15 14.24 15 13.96 15 13.4v-2.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 9 13.96 9 13.4 9h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 9.76 9 10.04 9 10.6v2.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C9.76 15 10.04 15 10.6 15Z"}));Ce.displayName="CpuChip01";const _e={devMode:!1,toolApprovalLevel:"none",enableNotifications:typeof Notification<"u",experimentalAutomations:!1};function Ze(){const t=E.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=re.preferences(),t[0]=e):e=t[0],ce(e,Ae)}function Ae(t){return{..._e,...t}}const Se=new Set(["account.profile","account.preferences","org.general","org.plugins","org.ai-providers","org.billing"]);function Ne(t){return t?Se.has(t):!1}function We(){const t=E.c(17),e=ae();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},t[0]=i):i=t[0];const o=ne(i);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const{org:a,project:l}=ie(r);let c;t[2]!==o.settings?(c=Ne(o.settings)?o.settings:void 0,t[2]=o.settings,t[3]=c):c=t[3];const d=c,u=!!d;let f;t[4]!==e||t[5]!==a||t[6]!==l?(f=g=>{!a||!l||e({to:"/$org/$project",params:{org:a,project:l},search:{settings:g}})},t[4]=e,t[5]=a,t[6]=l,t[7]=f):f=t[7];const x=f;let m;t[8]!==e||t[9]!==a||t[10]!==l?(m=()=>{!a||!l||e({to:"/$org/$project",params:{org:a,project:l},search:{}})},t[8]=e,t[9]=a,t[10]=l,t[11]=m):m=t[11];const N=m,h=d??"account.preferences";let y;return t[12]!==N||t[13]!==u||t[14]!==x||t[15]!==h?(y={isOpen:u,activeSection:h,open:x,close:N},t[12]=N,t[13]=u,t[14]=x,t[15]=h,t[16]=y):y=t[16],y}function be(t){const e=E.c(3),{error:i}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(de,{size:16}),e[0]=o):o=e[0];let r;return e[1]!==i.message?(r=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[o,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load AI providers: ",i.message]})]}),e[1]=i.message,e[2]=r):r=e[2],r}function Ee(t){const e=E.c(9),{keys:i,onDelete:o,isDeleting:r}=t;let a;if(e[0]!==r||e[1]!==i||e[2]!==o){let c;e[4]!==r||e[5]!==o?(c=d=>s.jsxs("div",{className:"flex items-center justify-between p-2 rounded-md bg-muted/50 text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[s.jsx(fe,{size:14,className:"text-muted-foreground shrink-0"}),s.jsx("span",{className:"font-medium truncate",children:d.label}),s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["added ",je(new Date(d.createdAt))," ago"]})]}),s.jsx("div",{onClick:Pe,children:s.jsxs(X,{children:[s.jsx(J,{asChild:!0,children:s.jsx(V,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",disabled:r,children:s.jsx(he,{size:14})})}),s.jsx(ee,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Delete this key?"}),s.jsx("div",{className:"flex gap-2",children:s.jsx(V,{variant:"destructive",size:"xs",onClick:()=>o(d.id),disabled:r,children:"Delete"})})]})})]})})]},d.id),e[4]=r,e[5]=o,e[6]=c):c=e[6],a=i.map(c),e[0]=r,e[1]=i,e[2]=o,e[3]=a}else a=e[3];let l;return e[7]!==a?(l=s.jsx("div",{className:"flex flex-col gap-2 mt-4",children:a}),e[7]=a,e[8]=l):l=e[8],l}function Pe(t){return t.stopPropagation()}function we(t){const e=E.c(52),{providerId:i,onCancel:o,onSuccess:r}=t,{locator:a,org:l}=Z();let c;e[0]!==l.id?(c={connectionId:se,orgId:l.id},e[0]=l.id,e[1]=c):c=e[1];const d=te(c),u=W(),[f,x]=v.useState(""),[m,N]=v.useState(""),[h,y]=v.useState(!1);let g;e[2]!==m||e[3]!==d||e[4]!==f||e[5]!==i?(g=async()=>{await d.callTool({name:"AI_PROVIDER_KEY_CREATE",arguments:{providerId:i,label:f||"Personal key",apiKey:m}})},e[2]=m,e[3]=d,e[4]=f,e[5]=i,e[6]=g):g=e[6];let _;e[7]!==a||e[8]!==r||e[9]!==u?(_=()=>{u.invalidateQueries({queryKey:b.aiProviderKeys(a)}),u.invalidateQueries({queryKey:b.aiProviders(a)}),C.success("Key saved successfully"),r()},e[7]=a,e[8]=r,e[9]=u,e[10]=_):_=e[10];let P;e[11]!==g||e[12]!==_?(P={mutationFn:g,onSuccess:_,onError:Ie},e[11]=g,e[12]=_,e[13]=P):P=e[13];const{mutate:F,isPending:n,error:A}=Y(P);let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Label"}),e[14]=p):p=e[14];let S;e[15]===Symbol.for("react.memo_cache_sentinel")?(S=B=>x(B.target.value),e[15]=S):S=e[15];let j;e[16]!==f?(j=s.jsxs("div",{className:"space-y-1",children:[p,s.jsx(G,{placeholder:"e.g. Personal key",value:f,onChange:S,className:"h-8 text-sm"})]}),e[16]=f,e[17]=j):j=e[17];let z;e[18]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"API Key"}),e[18]=z):z=e[18];const Q=h?"text":"password";let M;e[19]===Symbol.for("react.memo_cache_sentinel")?(M=B=>N(B.target.value),e[19]=M):M=e[19];let w;e[20]!==m||e[21]!==Q?(w=s.jsx(G,{type:Q,placeholder:"sk-...",value:m,onChange:M,className:"h-8 text-sm pr-8"}),e[20]=m,e[21]=Q,e[22]=w):w=e[22];let I;e[23]!==h?(I=()=>y(!h),e[23]=h,e[24]=I):I=e[24];let k;e[25]!==h?(k=h?s.jsx(me,{size:14}):s.jsx(ue,{size:14}),e[25]=h,e[26]=k):k=e[26];let K;e[27]!==I||e[28]!==k?(K=s.jsx("button",{type:"button",onClick:I,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:k}),e[27]=I,e[28]=k,e[29]=K):K=e[29];let O;e[30]!==w||e[31]!==K?(O=s.jsxs("div",{className:"space-y-1",children:[z,s.jsxs("div",{className:"relative",children:[w,K]})]}),e[30]=w,e[31]=K,e[32]=O):O=e[32];let T;e[33]!==A?(T=A&&s.jsx("p",{className:"text-xs text-destructive",children:A.message}),e[33]=A,e[34]=T):T=e[34];let $;e[35]!==n||e[36]!==o?($=s.jsx(V,{variant:"ghost",size:"sm",onClick:o,disabled:n,children:"Cancel"}),e[35]=n,e[36]=o,e[37]=$):$=e[37];let L;e[38]!==F?(L=()=>F(),e[38]=F,e[39]=L):L=e[39];const U=!m||n,H=n?"Saving...":"Save Key";let R;e[40]!==L||e[41]!==U||e[42]!==H?(R=s.jsx(V,{size:"sm",onClick:L,disabled:U,children:H}),e[40]=L,e[41]=U,e[42]=H,e[43]=R):R=e[43];let D;e[44]!==$||e[45]!==R?(D=s.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[$,R]}),e[44]=$,e[45]=R,e[46]=D):D=e[46];let q;return e[47]!==O||e[48]!==T||e[49]!==D||e[50]!==j?(q=s.jsxs("div",{className:"space-y-3",children:[j,O,T,D]}),e[47]=O,e[48]=T,e[49]=D,e[50]=j,e[51]=q):q=e[51],q}function Ie(t){C.error(`Failed to save key: ${t.message}`)}function ke({provider:t,keys:e}){const{locator:i,org:o}=Z(),r=te({connectionId:se,orgId:o.id}),a=W(),[l,c]=v.useState(!1),[d,u]=v.useState(!1),[f,x]=v.useState(null),m=e.length>0,{mutate:N,isPending:h}=Y({mutationFn:async n=>(await r.callTool({name:"AI_PROVIDER_KEY_DELETE",arguments:{keyId:n}}),n),onSuccess:n=>{a.invalidateQueries({queryKey:b.aiProviderKeys(i)}),a.invalidateQueries({queryKey:b.aiProviders(i)}),a.invalidateQueries({queryKey:b.aiProviderModels(i,n)}),C.success("Key deleted")},onError:n=>{C.error(`Failed to delete key: ${n.message}`)}}),{mutate:y}=Y({mutationFn:async({code:n,stateToken:A})=>{const p=await r.callTool({name:"AI_PROVIDER_OAUTH_EXCHANGE",arguments:{providerId:t.id,code:n,stateToken:A,label:"Connected via OAuth"}});if(p?.isError){const S=p.content?.[0]?.text??"OAuth exchange failed";throw new Error(S)}},onSuccess:()=>{a.invalidateQueries({queryKey:b.aiProviderKeys(i)}),a.invalidateQueries({queryKey:b.aiProviders(i)}),C.success(`${t.name} connected successfully`),u(!1),x(null)},onError:n=>{C.error(`OAuth connection failed: ${n.message}`),u(!1),x(null)}});v.useEffect(()=>{if(!d||!f)return;const n=p=>{if(p.origin===window.location.origin&&p.data?.type==="AI_PROVIDER_OAUTH_CALLBACK"){const{code:S,stateToken:j}=p.data;j===f?y({code:S,stateToken:j}):(console.error("State token mismatch"),C.error("Security check failed: State token mismatch"),u(!1),x(null))}};window.addEventListener("message",n);const A=setTimeout(()=>{d&&(u(!1),x(null),C.error("Connection timed out"))},12e4);return()=>{window.removeEventListener("message",n),clearTimeout(A)}},[d,f,y]);const g=t.supportedMethods.includes("oauth-pkce"),_=t.supportedMethods.includes("api-key"),P=()=>{l||d||(g?F():_&&c(!0))},F=async()=>{try{u(!0);const n=await r.callTool({name:"AI_PROVIDER_OAUTH_URL",arguments:{providerId:t.id,callbackUrl:`${window.location.origin}/oauth/callback/ai-provider`}});if(n.structuredContent)x(n.structuredContent.stateToken),window.open(n.structuredContent.url,"AiProviderOAuth","width=600,height=700");else throw new Error("Invalid response from AI_PROVIDER_OAUTH_URL")}catch(n){u(!1),C.error(`Failed to start OAuth: ${n instanceof Error?n.message:String(n)}`)}};return s.jsxs(X,{open:l,onOpenChange:n=>{n||c(!1)},children:[s.jsx(J,{asChild:!0,children:s.jsxs(xe,{className:oe("p-4 flex flex-col gap-3 transition-colors relative",m&&"border-primary/20",!d&&"cursor-pointer hover:bg-muted/30",d&&"cursor-wait"),onClick:P,children:[m&&s.jsx("div",{className:"absolute top-4 right-4 w-2 h-2 rounded-full bg-green-500"}),s.jsx("div",{className:"flex items-start justify-between",children:s.jsxs("div",{className:"flex items-center gap-3",children:[t.logo?s.jsx("img",{src:t.logo,alt:t.name,className:"size-8 rounded-md object-contain"}):s.jsx(ge,{fallback:t.name.charAt(0),className:"size-8 bg-primary/10 text-primary"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-base",children:t.name}),s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-1",children:d?"Authorizing...":t.description})]})]})}),m&&s.jsxs("div",{className:"mt-1",children:[s.jsxs("p",{className:"text-xs font-medium text-muted-foreground",children:[e.length," key",e.length!==1?"s":""," configured"]}),s.jsx(Ee,{keys:e,onDelete:N,isDeleting:h})]})]})}),s.jsx(ee,{className:"w-72 p-4",align:"start",onInteractOutside:()=>c(!1),children:s.jsx(we,{providerId:t.id,onCancel:()=>c(!1),onSuccess:()=>c(!1)})})]})}function Ke(){const t=E.c(6),e=ve(),i=ye();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-medium",children:"AI Providers"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Set up AI model providers. Keys are stored encrypted in the vault."})]}),t[0]=o):o=t[0];let r;t[1]!==e?.providers||t[2]!==i?(r=e?.providers?.map(l=>s.jsx(ke,{provider:l,keys:i.filter(c=>c.providerId===l.id)},l.id)),t[1]=e?.providers,t[2]=i,t[3]=r):r=t[3];let a;return t[4]!==r?(a=s.jsxs("div",{className:"space-y-6",children:[o,s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 [&>*:first-child]:lg:col-span-2",children:r})]}),t[4]=r,t[5]=a):a=t[5],a}function Xe(){const t=E.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(le,{fallback:Oe,children:s.jsx(v.Suspense,{fallback:s.jsx(pe,{className:"h-64 w-full"}),children:s.jsx(Ke,{})})}),t[0]=e):e=t[0],e}function Oe(t){const{error:e}=t;return s.jsx(be,{error:e??new Error("Failed to load AI providers")})}export{Xe as O,ke as P,We as a,Ce as i,Ze as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as Y,r as D,j as s,y as ce,B as te,e as ue,u as me,ak as xe,al as pe,O as ge,f as Re,au as Te,c5 as oe,K as Pe,aw as ze,E as ke,av as $e}from"./index-DsOJvxnb.js";import{P as se}from"./index-X4FDee1r.js";import{B as Le,a as Ee,b as Oe,c as Fe}from"./breadcrumb-aP02JuZO.js";import{i as he}from"./FilterLines-BaTxnUjH.js";import{n as je}from"./Inbox01-BgDmihAV.js";import{i as le}from"./Loading01-BNn4YU_K.js";import{i as ye}from"./SearchMd-BLeX5weN.js";import{u as Ke}from"./use-store-discovery-DPE_0zuT.js";import{u as Ae,a as ve,b as _e}from"./use-connection-DmR852Js.js";import{s as Be}from"./slugify-CEUa2lfQ.js";import{f as Me,d as De}from"./registry-utils-Cd3t_Kmp.js";import{C as Ge}from"./collection-search-62vwaqdq.js";import{M as ae}from"./mcp-server-card-Cq5E9kuT.js";import{I as Ve}from"./input-CUT8DBv1.js";import{b as be,P as Ne,a as Ce}from"./popover-CF3EN_0o.js";import{i as Se}from"./Check-BfKCyKXX.js";import{t as we}from"./ChevronDown-BHMaRWRt.js";import{s as re}from"./XClose-eeK1fS1n.js";import{s as We}from"./Plus-CT_Gcwl2.js";import{E as Ue}from"./empty-state-D4GX29pL.js";import{u as He}from"./use-binding-BfjFWpEn.js";import{u as qe}from"./use-local-storage-CxC8ozOe.js";import{u as Je}from"./useQuery-D2ShO4od.js";import{W as Ye,a as Qe,u as Xe,e as Ze,b as et}from"./constants-XtX-WKGm.js";import"./tooltip-XyKE4lZa.js";import"./index-zjV4p_E5.js";import"./ChevronRight-1g9z-Z5h.js";import"./useInfiniteQuery-DEfXPFTs.js";import"./infiniteQueryObserver-BE0Fq7u7.js";import"./use-collections-DSWhP4jg.js";import"./useMutation-B_cFG709.js";import"./CheckVerified02-DC3VT092.js";import"./Globe02-k3_A41kp.js";import"./Lock01-DJQX15kR.js";import"./Terminal-Dlvh4GS2.js";import"./card-RQxLVCBk.js";import"./integration-icon-CVxvM4fR.js";import"./Container-DwxLlgWA.js";import"./binder-DTBFGqjl.js";function tt(t,e){const r=Y.c(4),[l,d]=D.useState(t),o=D.useRef(null),n=D.useRef(!0);let a,f;return r[0]!==e||r[1]!==t?(a=()=>{if(n.current){n.current=!1;return}return o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{d(t)},e),()=>{o.current&&clearTimeout(o.current)}},f=[t,e],r[0]=e,r[1]=t,r[2]=a,r[3]=f):(a=r[2],f=r[3]),D.useEffect(a,f),l}function st(t){const e=Y.c(14),r=D.useRef(null),l=`scroll-position:${t}`,d=D.useRef(null);let o;e[0]!==l?(o=()=>{r.current&&sessionStorage.setItem(l,String(r.current.scrollTop))},e[0]=l,e[1]=o):o=e[1];const n=o;let a;e[2]!==l?(a=()=>{if(d.current===l)return;const p=sessionStorage.getItem(l);if(p&&r.current){const $=Number.parseInt(p,10);r.current.scrollTop=$}d.current=l},e[2]=l,e[3]=a):a=e[3];const f=a;let c;e[4]!==f||e[5]!==l?(c=()=>{d.current!==l&&f()},e[4]=f,e[5]=l,e[6]=c):c=e[6];const T=c;let m;e[7]!==f||e[8]!==l?(m=p=>{r.current=p,p&&d.current!==l&&requestAnimationFrame(()=>{f()})},e[7]=f,e[8]=l,e[9]=m):m=e[9];const x=m;let i;return e[10]!==T||e[11]!==n||e[12]!==x?(i={scrollRef:x,saveScrollPosition:n,handleScroll:T},e[10]=T,e[11]=n,e[12]=x,e[13]=i):i=e[13],i}function rt(t,e){return[...t].sort((r,l)=>l.count-r.count).slice(0,e)}function fe(t){const e=Y.c(52),{label:r,items:l,selectedItems:d,onToggle:o,onClear:n}=t,[a,f]=D.useState(""),[c,T]=D.useState(!1);let m,x,i,p,$,C,R,y,L,v,b;if(e[0]!==l||e[1]!==r||e[2]!==o||e[3]!==c||e[4]!==a||e[5]!==d){const S=[...a?l.filter(F=>F.value.toLowerCase().includes(a.toLowerCase())):l].sort(lt);i=d.length,x=be,L=c,v=T;let g;e[17]!==r?(g=s.jsx("span",{children:r}),e[17]=r,e[18]=g):g=e[18];let w;e[19]!==i?(w=i>0&&s.jsx("span",{className:"ml-1 rounded-full bg-primary text-primary-foreground px-1.5 py-0.5 text-[10px] font-medium",children:i}),e[19]=i,e[20]=w):w=e[20];let h;e[21]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(we,{size:14,className:"opacity-50"}),e[21]=h):h=e[21],e[22]!==w||e[23]!==g?(b=s.jsx(Ne,{asChild:!0,children:s.jsxs(te,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[g,w,h]})}),e[22]=w,e[23]=g,e[24]=b):b=e[24],m=Ce,C="w-64 p-0",R="start";let E;e[25]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(ye,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=E):E=e[25];let I;e[26]!==r?(I=r.toLowerCase(),e[26]=r,e[27]=I):I=e[27];const O=`Search ${I}...`;let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=F=>f(F.target.value),e[28]=A):A=e[28],e[29]!==a||e[30]!==O?(y=s.jsx("div",{className:"shrink-0 w-full border-b border-border h-10",children:s.jsxs("label",{className:"flex items-center gap-2.5 h-10 px-4 cursor-text",children:[E,s.jsx(Ve,{type:"text",placeholder:O,value:a,onChange:A,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[29]=a,e[30]=O,e[31]=y):y=e[31],p="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",$=S.length===0?s.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):S.map(F=>{const H=d.includes(F.value);return s.jsxs("button",{onClick:()=>o(F.value),className:ce("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",H?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[s.jsxs("span",{className:"truncate flex items-center gap-2",children:[H&&s.jsx(Se,{size:16,className:"text-muted-foreground shrink-0"}),F.value]}),s.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:F.count})]},F.value)}),e[0]=l,e[1]=r,e[2]=o,e[3]=c,e[4]=a,e[5]=d,e[6]=m,e[7]=x,e[8]=i,e[9]=p,e[10]=$,e[11]=C,e[12]=R,e[13]=y,e[14]=L,e[15]=v,e[16]=b}else m=e[6],x=e[7],i=e[8],p=e[9],$=e[10],C=e[11],R=e[12],y=e[13],L=e[14],v=e[15],b=e[16];let N;e[32]!==p||e[33]!==$?(N=s.jsx("div",{className:p,children:$}),e[32]=p,e[33]=$,e[34]=N):N=e[34];let z;e[35]!==r||e[36]!==n||e[37]!==i?(z=i>0&&s.jsx("div",{className:"p-2 border-t border-border",children:s.jsxs(te,{variant:"ghost",size:"sm",onClick:n,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",r.toLowerCase()]})}),e[35]=r,e[36]=n,e[37]=i,e[38]=z):z=e[38];let k;e[39]!==m||e[40]!==z||e[41]!==C||e[42]!==R||e[43]!==y||e[44]!==N?(k=s.jsxs(m,{className:C,align:R,children:[y,N,z]}),e[39]=m,e[40]=z,e[41]=C,e[42]=R,e[43]=y,e[44]=N,e[45]=k):k=e[45];let P;return e[46]!==x||e[47]!==k||e[48]!==L||e[49]!==v||e[50]!==b?(P=s.jsxs(x,{open:L,onOpenChange:v,children:[b,k]}),e[46]=x,e[47]=k,e[48]=L,e[49]=v,e[50]=b,e[51]=P):P=e[51],P}function lt(t,e){return e.count-t.count}function nt(t){const e=Y.c(67),{availableTags:r,availableCategories:l,selectedTags:d,selectedCategories:o,onTagChange:n,onCategoryChange:a}=t,f=r&&r.length>0||l&&l.length>0,c=d.length>0||o.length>0;if(!f)return null;let T;e[0]!==n||e[1]!==d?(T=g=>{d.includes(g)?n(d.filter(w=>w!==g)):n([...d,g])},e[0]=n,e[1]=d,e[2]=T):T=e[2];const m=T;let x;e[3]!==a||e[4]!==o?(x=g=>{o.includes(g)?a(o.filter(w=>w!==g)):a([...o,g])},e[3]=a,e[4]=o,e[5]=x):x=e[5];const i=x;let p;e[6]!==a||e[7]!==n?(p=()=>{n([]),a([])},e[6]=a,e[7]=n,e[8]=p):p=e[8];const $=p;let C,R,y,L,v,b,N;if(e[9]!==l||e[10]!==r||e[11]!==a||e[12]!==n||e[13]!==o||e[14]!==d||e[15]!==i||e[16]!==m){const g=l?rt(l,6):[];C=o,R=d,N=new Set(g.map(it)),v="flex items-center border-b border-border";let w;e[24]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:s.jsx(he,{size:16})}),e[24]=w):w=e[24];let h;e[25]!==l||e[26]!==a||e[27]!==o||e[28]!==i?(h=l&&l.length>0&&s.jsx(fe,{label:"Categories",items:l,selectedItems:o,onToggle:i,onClear:()=>a([])}),e[25]=l,e[26]=a,e[27]=o,e[28]=i,e[29]=h):h=e[29];let E;e[30]!==r||e[31]!==n||e[32]!==d||e[33]!==m?(E=r&&r.length>0&&s.jsx(fe,{label:"Tags",items:r,selectedItems:d,onToggle:m,onClear:()=>n([])}),e[30]=r,e[31]=n,e[32]=d,e[33]=m,e[34]=E):E=e[34],e[35]!==E||e[36]!==h?(b=s.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[w,h,E]}),e[35]=E,e[36]=h,e[37]=b):b=e[37],y="flex items-center gap-3 flex-wrap px-5 py-3";let I;e[38]!==o||e[39]!==i?(I=O=>{const A=o.includes(O.value);return s.jsxs("div",{onClick:()=>i(O.value),className:ce("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",A?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[s.jsx("span",{children:O.value}),A&&s.jsx("span",{onClick:F=>{F.stopPropagation(),i(O.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},O.value)},e[38]=o,e[39]=i,e[40]=I):I=e[40],L=g.map(I),e[9]=l,e[10]=r,e[11]=a,e[12]=n,e[13]=o,e[14]=d,e[15]=i,e[16]=m,e[17]=C,e[18]=R,e[19]=y,e[20]=L,e[21]=v,e[22]=b,e[23]=N}else C=e[17],R=e[18],y=e[19],L=e[20],v=e[21],b=e[22],N=e[23];let z;if(e[41]!==C||e[42]!==i||e[43]!==N){let g;e[45]!==N?(g=h=>!N.has(h),e[45]=N,e[46]=g):g=e[46];let w;e[47]!==i?(w=h=>s.jsxs("div",{onClick:()=>i(h),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:h}),s.jsx("span",{onClick:E=>{E.stopPropagation(),i(h)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`cat-${h}`),e[47]=i,e[48]=w):w=e[48],z=C.filter(g).map(w),e[41]=C,e[42]=i,e[43]=N,e[44]=z}else z=e[44];let k;if(e[49]!==R||e[50]!==m){let g;e[52]!==m?(g=w=>s.jsxs("div",{onClick:()=>m(w),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:w}),s.jsx("span",{onClick:h=>{h.stopPropagation(),m(w)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`tag-${w}`),e[52]=m,e[53]=g):g=e[53],k=R.map(g),e[49]=R,e[50]=m,e[51]=k}else k=e[51];let P;e[54]!==$||e[55]!==c?(P=c&&s.jsxs(te,{variant:"ghost",size:"sm",onClick:$,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[s.jsx(re,{size:14}),"Clear all"]}),e[54]=$,e[55]=c,e[56]=P):P=e[56];let j;e[57]!==P||e[58]!==y||e[59]!==L||e[60]!==z||e[61]!==k?(j=s.jsxs("div",{className:y,children:[L,z,k,P]}),e[57]=P,e[58]=y,e[59]=L,e[60]=z,e[61]=k,e[62]=j):j=e[62];let S;return e[63]!==j||e[64]!==v||e[65]!==b?(S=s.jsxs("div",{className:v,children:[b,j]}),e[63]=j,e[64]=v,e[65]=b,e[66]=S):S=e[66],S}function it(t){return t.value}function ot(t,e){if(!e)return t;const r=e.toLowerCase();return t.filter(l=>(l.name||l.title||"").toLowerCase().includes(r)||(l.description||l.server?.description||"").toLowerCase().includes(r))}function Ie(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0}function de(t){return t._meta?.["mcp.mesh"]?.official===!0}function at(t){const e=Y.c(58),{registryId:r,listToolName:l,filtersToolName:d,storePrivateOnly:o}=t,[n,a]=D.useState(""),f=tt(n,300),c=ue(),{org:T}=me(),{scrollRef:m,saveScrollPosition:x,handleScroll:i}=st(`store-discovery:${r}`);let p;e[0]!==f||e[1]!==d||e[2]!==l||e[3]!==r?(p={registryId:r,listToolName:l,filtersToolName:d,search:f},e[0]=f,e[1]=d,e[2]=l,e[3]=r,e[4]=p):p=e[4];const{items:$,hasMore:C,isLoadingMore:R,isInitialLoading:y,isFetching:L,error:v,loadMore:b,availableTags:N,availableCategories:z,selectedTags:k,selectedCategories:P,setSelectedTags:j,setSelectedCategories:S,hasActiveFilters:g}=Ke(p);let w;e[5]!==$||e[6]!==n?(w=n?ot($,n):$,e[5]=$,e[6]=n,e[7]=w):w=e[7];const h=w;let E;e[8]!==h||e[9]!==o?(E=o?h.filter(ft):h,e[8]=h,e[9]=o,e[10]=E):E=e[10];const I=E,O=(n!==f||L)&&!y&&!!n;let A;e[11]!==I?(A=I.filter(de),e[11]=I,e[12]=A):A=e[12];const F=A;let H;e[13]!==I?(H=I.filter(dt),e[13]=I,e[14]=H):H=e[14];const W=H;let Q;e[15]!==I?(Q=I.filter(mt),e[15]=I,e[16]=Q):Q=e[16];const ee=Q;let X;e[17]!==c||e[18]!==T.slug||e[19]!==r||e[20]!==x?(X=K=>{x();const u=Be(K.name||K.title||K.server?.title||""),Z=typeof K.id=="string"&&K.id.includes("/"),ne=typeof K.server?.name=="string"&&K.server.name.includes("/"),ie=Z&&!ne?K.id:K.server?.name||K.id||"";c({to:"/$org/$project/store/$appName",params:{org:T.slug,project:ge,appName:u},search:{registryId:r,serverName:ie}})},e[17]=c,e[18]=T.slug,e[19]=r,e[20]=x,e[21]=X):X=e[21];const q=X;let J;e[22]!==i||e[23]!==C||e[24]!==R||e[25]!==b?(J=K=>{if(i(),!C||R)return;const u=K.currentTarget;u.scrollHeight-u.scrollTop-u.clientHeight<200&&b()},e[22]=i,e[23]=C,e[24]=R,e[25]=b,e[26]=J):J=e[26];const U=J;let _;e[27]!==O||e[28]!==n?(_=s.jsx(Ge,{value:n,onChange:a,placeholder:"Search for an MCP Server...",isSearching:O}),e[27]=O,e[28]=n,e[29]=_):_=e[29];let B;e[30]!==z||e[31]!==N||e[32]!==P||e[33]!==k||e[34]!==S||e[35]!==j?(B=s.jsx(nt,{availableTags:N,availableCategories:z,selectedTags:k,selectedCategories:P,onTagChange:j,onCategoryChange:S}),e[30]=z,e[31]=N,e[32]=P,e[33]=k,e[34]=S,e[35]=j,e[36]=B):B=e[36];let G;e[37]!==ee||e[38]!==v||e[39]!==q||e[40]!==g||e[41]!==C||e[42]!==y||e[43]!==R||e[44]!==O||e[45]!==F||e[46]!==n||e[47]!==W||e[48]!==I.length?(G=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:v&&!y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center space-y-4",children:[s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(xe,{className:"size-8 text-destructive"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry unavailable"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"Could not load items from this registry. It may be temporarily offline."}),v.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:v.message})]}),s.jsxs(te,{variant:"outline",size:"sm",onClick:ct,children:[s.jsx(pe,{className:"size-4"}),"Try again"]})]}):y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):I.length===0&&!g?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(je,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),s.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):I.length===0&&g&&!n?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(he,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):n&&I.length===0&&!O?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ye,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):s.jsxs("div",{className:"flex flex-col gap-8",children:[O&&I.length===0&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),F.length>0&&s.jsx(ae,{items:F,title:"Official",onItemClick:q}),W.length>0&&s.jsx(ae,{items:W,title:"Verified",onItemClick:q}),ee.length>0&&s.jsx(ae,{items:ee,title:F.length>0||W.length>0?"All":"",onItemClick:q}),C&&R&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(le,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[37]=ee,e[38]=v,e[39]=q,e[40]=g,e[41]=C,e[42]=y,e[43]=R,e[44]=O,e[45]=F,e[46]=n,e[47]=W,e[48]=I.length,e[49]=G):G=e[49];let M;e[50]!==U||e[51]!==m||e[52]!==G?(M=s.jsx("div",{ref:m,className:"flex-1 overflow-y-auto",onScroll:U,children:G}),e[50]=U,e[51]=m,e[52]=G,e[53]=M):M=e[53];let V;return e[54]!==B||e[55]!==M||e[56]!==_?(V=s.jsxs("div",{className:"flex flex-col h-full",children:[_,B,M]}),e[54]=B,e[55]=M,e[56]=_,e[57]=V):V=e[57],V}function ct(){return window.location.reload()}function mt(t){return!Ie(t)&&!de(t)}function dt(t){return Ie(t)&&!de(t)}function ft(t){return t.is_public!==!0}function ut(t){const e=Y.c(11),{registryId:r,storePrivateOnly:l}=t,d=Ae(r),o=d?.tools;let n;e[0]!==o?(n=Me(o),e[0]=o,e[1]=n):n=e[1];const a=n;if(!a){let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(je,{className:"size-8 text-muted-foreground"})}),e[2]=i):i=e[2];let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12 text-center space-y-4",children:[i,s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry not available"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"This registry does not support listing store items, or the connection is not responding."})]})]}),e[3]=p):p=e[3],p}const f=d?.tools;let c;e[4]!==f?(c=De(f),e[4]=f,e[5]=c):c=e[5];const m=c||void 0;let x;return e[6]!==a||e[7]!==r||e[8]!==l||e[9]!==m?(x=s.jsx(at,{registryId:r,listToolName:a,filtersToolName:m,storePrivateOnly:l}),e[6]=a,e[7]=r,e[8]=l,e[9]=m,e[10]=x):x=e[10],x}function xt(t){const e=Y.c(43),{registries:r,value:l,onValueChange:d,onAddWellKnown:o,wellKnownRegistries:n,placeholder:a}=t,f=a===void 0?"Select a registry...":a,[c,T]=D.useState(!1);let m,x,i,p,$,C,R,y;if(e[0]!==c||e[1]!==f||e[2]!==r||e[3]!==l){let j;e[12]!==l?(j=g=>g.id===l,e[12]=l,e[13]=j):j=e[13];const S=r.find(j);x=be,R=c,y=T,m=Ne,C=!0,i="button",e[14]===Symbol.for("react.memo_cache_sentinel")?(p=ce("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] h-7 min-w-[160px]"),e[14]=p):p=e[14],$=S?s.jsxs("span",{className:"flex items-center gap-2",children:[S.icon?s.jsx("img",{src:S.icon,alt:S.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:S.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:S.name})]}):s.jsx("span",{className:"text-muted-foreground",children:f}),e[0]=c,e[1]=f,e[2]=r,e[3]=l,e[4]=m,e[5]=x,e[6]=i,e[7]=p,e[8]=$,e[9]=C,e[10]=R,e[11]=y}else m=e[4],x=e[5],i=e[6],p=e[7],$=e[8],C=e[9],R=e[10],y=e[11];let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(we,{className:"size-4 opacity-50"}),e[15]=L):L=e[15];let v;e[16]!==i||e[17]!==p||e[18]!==$?(v=s.jsxs("button",{type:i,className:p,children:[$,L]}),e[16]=i,e[17]=p,e[18]=$,e[19]=v):v=e[19];let b;e[20]!==m||e[21]!==C||e[22]!==v?(b=s.jsx(m,{asChild:C,children:v}),e[20]=m,e[21]=C,e[22]=v,e[23]=b):b=e[23];let N;if(e[24]!==d||e[25]!==r||e[26]!==l){let j;e[28]!==d||e[29]!==l?(j=S=>s.jsxs("button",{type:"button",onClick:()=>{d(S.id??S.name),T(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[S.icon?s.jsx("img",{src:S.icon,alt:S.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:S.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:S.name})]}),l===(S.id??S.name)&&s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:s.jsx(Se,{className:"size-4"})})]},S.id??S.name),e[28]=d,e[29]=l,e[30]=j):j=e[30],N=r.map(j),e[24]=d,e[25]=r,e[26]=l,e[27]=N}else N=e[27];let z;e[31]!==o||e[32]!==n?(z=n.length>0&&s.jsxs("div",{className:"border-t border-border pt-1 mt-1",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),n.map(j=>s.jsxs("button",{type:"button",onClick:()=>{o(j),T(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[j.icon?s.jsx("img",{src:j.icon,alt:j.title,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:j.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:j.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(We,{size:16})})]},j.id??j.title))]}),e[31]=o,e[32]=n,e[33]=z):z=e[33];let k;e[34]!==N||e[35]!==z?(k=s.jsxs(Ce,{align:"end",className:"w-auto min-w-[200px] p-1",children:[N,z]}),e[34]=N,e[35]=z,e[36]=k):k=e[36];let P;return e[37]!==x||e[38]!==b||e[39]!==k||e[40]!==R||e[41]!==y?(P=s.jsxs(x,{open:R,onOpenChange:y,children:[b,k]}),e[37]=x,e[38]=b,e[39]=k,e[40]=R,e[41]=y,e[42]=P):P=e[42],P}function pt({registries:t,onConnected:e}){const r=ve(),{org:{slug:l}}=me(),{data:d}=Re.useSession(),o=ue(),[n,a]=D.useState(!1),f=t[0],c=async()=>{if(!(!f||!d?.user?.id)){a(!0);try{const m=await r.create.mutateAsync(f);e?.(m.id)}finally{a(!1)}}},T=()=>{o({to:"/$org/$project/mcps",params:{org:l,project:ge},search:{action:"create"}})};return s.jsx(Ue,{image:s.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:336,height:320,className:"max-w-full h-auto"}),title:"Connect to registry",description:"Connect to discover and use Connections from the community.",actions:s.jsxs(s.Fragment,{children:[s.jsxs(te,{variant:"outline",onClick:c,disabled:n||!f,children:[f?.icon&&s.jsx("img",{src:f.icon,alt:"",className:"size-4"}),n?"Installing...":"Install Registry"]}),s.jsx(te,{variant:"outline",onClick:T,children:"Custom Connection"})]})})}function gt(t){const e=Y.c(15),{error:r,onRetry:l,registryName:d}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(xe,{className:"h-6 w-6 text-destructive"})}),e[0]=o):o=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("h3",{className:"text-lg font-medium",children:"Unable to load store"}),e[1]=n):n=e[1];let a;e[2]!==d?(a=s.jsxs("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:["The ",s.jsx("strong",{children:d})," registry is currently unreachable. This may be a temporary issue — try again in a moment."]}),e[2]=d,e[3]=a):a=e[3];let f;e[4]!==r?(f=r?.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:r.message}),e[4]=r,e[5]=f):f=e[5];let c;e[6]!==a||e[7]!==f?(c=s.jsxs("div",{className:"space-y-2",children:[n,a,f]}),e[6]=a,e[7]=f,e[8]=c):c=e[8];let T;e[9]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(pe,{className:"size-4"}),e[9]=T):T=e[9];let m;e[10]!==l?(m=s.jsxs(te,{variant:"outline",size:"sm",onClick:l,children:[T,"Try again"]}),e[10]=l,e[11]=m):m=e[11];let x;return e[12]!==c||e[13]!==m?(x=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[o,c,m]}),e[12]=c,e[13]=m,e[14]=x):x=e[14],x}function ls(){const t=Y.c(53),{org:e,project:r}=me(),l=_e(),d=ve(),o=Te(),n=o.location.pathname.includes("/store/")&&o.location.pathname.split("/").length>3,a=He(l);let f;t[0]!==e.id?(f=Ye.SELF(e.id),t[0]=e.id,t[1]=f):f=t[1];const c=f,T=r.enabledPlugins,m=T==null||T.includes(oe);let x;t[2]!==c?(x=(u,Z)=>u.id===c?1:Z.id===c?-1:0,t[2]=c,t[3]=x):x=t[3];const i=a.filter(u=>u.id!==c?!0:m).sort(x);let p;t[4]!==c?(p=u=>u.id===c,t[4]=c,t[5]=p):p=t[5];const $=i.some(p);let C;t[6]!==e.id?(C={connectionId:Qe,orgId:e.id},t[6]=e.id,t[7]=C):C=t[7];const R=Xe(C);let y;t[8]!==r.id||t[9]!==R?(y=async()=>{const u=await R.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:r.id,pluginId:oe}});return u.structuredContent??u},t[8]=r.id,t[9]=R,t[10]=y):y=t[10];const{data:L}=Je({queryKey:Pe.projectPluginConfig(r.id??"",oe),queryFn:y,enabled:$&&!!r.id,staleTime:6e4}),v=L?.config?.settings;let b;t[11]!==v||t[12]!==c?(b=u=>u.id===c&&v?{id:u.id,name:v.registryName||u.title,icon:v.registryIcon||u.icon||void 0}:{id:u.id,name:u.title,icon:u.icon||void 0},t[11]=v,t[12]=c,t[13]=b):b=t[13];const N=i.map(b);let z;t[14]!==e.slug?(z=ze.selectedRegistry(e.slug),t[14]=e.slug,t[15]=z):z=t[15];const[k,P]=qe(z,jt);let j;t[16]!==k?(j=u=>u.id===k,t[16]=k,t[17]=j):j=t[17];const S=i.find(j);let g;t[18]!==c?(g=u=>u.id!==c,t[18]=c,t[19]=g):g=t[19];const w=i.find(g),h=S?.id||w?.id||i[0]?.id||"",E=h===c&&v?.storePrivateOnly===!0;let I;t[20]!==e.id?(I=Ze(e.id),t[20]=e.id,t[21]=I):I=t[21];let O;t[22]!==I?(O=[I],t[22]=I,t[23]=O):O=t[23];const A=O;let F;t[24]===Symbol.for("react.memo_cache_sentinel")?(F=[et()],t[24]=F):F=t[24];const H=F;let W;t[25]!==d.create||t[26]!==P?(W=async u=>{const Z=await d.create.mutateAsync(u);P(Z.id)},t[25]=d.create,t[26]=P,t[27]=W):W=t[27];const Q=W,ee=new Set(i.map(ht)),X=A.filter(u=>u.id&&!ee.has(u.id)),q=H.filter(u=>u.id&&!ee.has(u.id));if(n){let u;return t[28]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx($e,{}),t[28]=u):u=t[28],u}let J;t[29]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsx(se.Header.Left,{children:s.jsx(Le,{children:s.jsx(Ee,{children:s.jsx(Oe,{children:s.jsx(Fe,{children:"Store"})})})})}),t[29]=J):J=t[29];let U;t[30]!==Q?(U=async u=>Q(u),t[30]=Q,t[31]=U):U=t[31];let _;t[32]!==X||t[33]!==h||t[34]!==N||t[35]!==P||t[36]!==U?(_=s.jsxs(se.Header,{children:[J,s.jsx(se.Header.Right,{children:s.jsx(xt,{wellKnownRegistries:X,registries:N,value:h,onValueChange:P,onAddWellKnown:U,placeholder:"Select store..."})})]}),t[32]=X,t[33]=h,t[34]=N,t[35]=P,t[36]=U,t[37]=_):_=t[37];let B;t[38]!==h||t[39]!==N?(B=u=>{const{error:Z,resetError:ne}=u;return s.jsx(gt,{error:Z,onRetry:ne,registryName:N.find(ie=>ie.id===h)?.name??"registry"})},t[38]=h,t[39]=N,t[40]=B):B=t[40];let G;t[41]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),t[41]=G):G=t[41];let M;t[42]!==q||t[43]!==h||t[44]!==P||t[45]!==E?(M=s.jsx(D.Suspense,{fallback:G,children:h?s.jsx(ut,{registryId:h,storePrivateOnly:E}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(pt,{registries:q,onConnected:u=>{P(u)}})})}),t[42]=q,t[43]=h,t[44]=P,t[45]=E,t[46]=M):M=t[46];let V;t[47]!==B||t[48]!==M?(V=s.jsx(se.Content,{children:s.jsx(ke,{fallback:B,children:M})}),t[47]=B,t[48]=M,t[49]=V):V=t[49];let K;return t[50]!==_||t[51]!==V?(K=s.jsxs(se,{children:[_,V]}),t[50]=_,t[51]=V,t[52]=K):K=t[52],K}function ht(t){return t.id}function jt(t){return t??""}export{ls as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as g,c as b,j as s,y as L,E as Z,u as G,f as K,B as U}from"./index-DsOJvxnb.js";import{C as h}from"./task-status-wkv2GdSY.js";import{E as J,C as Q}from"./editable-task-title-B7Ktbs3r.js";import{a as X}from"./tasks-panel-TN0GeEUK.js";import{u as B,a as Y}from"./context-CtrnP3HC.js";import{V as ee}from"./select-virtual-mcp-B8NgSgPI.js";import{I as O}from"./integration-icon-CVxvM4fR.js";import{P as te,a as se,b as ie}from"./popover-CF3EN_0o.js";import{S as H}from"./skeleton-DJFpR-1P.js";import{i as re,d as le}from"./constants-XtX-WKGm.js";import{b as oe}from"./use-virtual-mcp-C9XdHCA_.js";import{i as ne}from"./ChevronRight-1g9z-Z5h.js";import{t as F}from"./Users03-B7X28dbt.js";import{P}from"./index-X4FDee1r.js";import{R as A,a as T,b as ae}from"./resizable-D4LJctEl.js";import"./spinner-CqAVfcvO.js";import"./tooltip-XyKE4lZa.js";import"./index-zjV4p_E5.js";import"./use-mcp-prompts-C-XU_-dc.js";import"./useQuery-D2ShO4od.js";import"./dialog-_XYw8lZC.js";import"./X-B_f76BPZ.js";import"./form-BN7_f2uj.js";import"./label-iPw5smAw.js";import"./input-CUT8DBv1.js";import"./index-CuSj4QrF.js";import"./usage-B8rgFVXq.js";import"./ArrowUp-C6Q-EpUw.js";import"./ChevronDown-BHMaRWRt.js";import"./Edit01-Dw-lPBk-.js";import"./Lock01-DJQX15kR.js";import"./XCircle-DDLf4PgL.js";import"./AlertCircle-De9oqjty.js";import"./select-DRPG5csU.js";import"./ChevronUp-1s_S3eDF.js";import"./Check-BfKCyKXX.js";import"./org-ai-providers-BDwPbfg4.js";import"./use-local-storage-CxC8ozOe.js";import"./useMutation-B_cFG709.js";import"./EyeOff-9_-SJWcU.js";import"./Eye-JuDcZhJz.js";import"./Key01-DAjAUWfr.js";import"./Trash01-YPQczxci.js";import"./card-RQxLVCBk.js";import"./avatar-OE2URZfM.js";import"./use-llm-BkLbMZPM.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./ArrowLeft-CPWCs_Od.js";import"./use-copy-dSR0w-bG.js";import"./tabs-CkPDQzeX.js";import"./badge-CAg946Xk.js";import"./collapsible-CGr-TiAc.js";import"./index-C-NLwTON.js";import"./Code01-CoTQP8pZ.js";import"./checkbox-DLsMmmhu.js";import"./AlignLeft-BaG4OcCg.js";import"./Image01-I9pAeT0N.js";import"./RefreshCcw01-uL9q48A4.js";import"./SearchMd-BLeX5weN.js";import"./Settings01-2AkYiqYr.js";import"./Tool01-CjSIsyxE.js";import"./ai-providers-logos-W57Qm-EN.js";import"./use-mcp-resources-Bxkx1Ub1.js";import"./Copy01-CIUDy0Hr.js";import"./marked.esm-BaswSlok.js";import"./markdown-CKKBcXcE.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-IX_OR3wW.js";import"./types-B3niHy47.js";import"./Globe02-k3_A41kp.js";import"./LayersTwo01-C-XZtFtv.js";import"./XClose-eeK1fS1n.js";import"./Clock-rHd8cQAO.js";import"./use-collections-DSWhP4jg.js";import"./useSuspenseInfiniteQuery-CT40dICu.js";import"./infiniteQueryObserver-BE0Fq7u7.js";import"./CheckCircle-DiRi76qb.js";import"./Loading01-BNn4YU_K.js";import"./ChevronLeft-0cpA2yNq.js";import"./collection-search-62vwaqdq.js";import"./user-rS26WEu1.js";import"./format-time-CMKyl-GC.js";import"./Plus-CT_Gcwl2.js";import"./dropdown-menu-DzFMEBVS.js";import"./decopilot-events-Brt4gAR6.js";import"./use-create-virtual-mcp-DXWAjide.js";import"./Container-DwxLlgWA.js";const W=({size:e=24,color:t="currentColor",...i})=>g.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},g.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));W.displayName="LayoutRight";const q=({size:e=24,color:t="currentColor",...i})=>g.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},g.createElement("path",{d:"m10 15-3.075 3.114c-.43.434-.644.651-.828.666a.5.5 0 0 1-.421-.172c-.12-.14-.12-.446-.12-1.056v-1.56c0-.548-.449-.944-.99-1.024v0a3 3 0 0 1-2.534-2.533C2 12.219 2 11.96 2 11.445V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 2 5.12 2 6.8 2h7.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C19 4.28 19 5.12 19 6.8V11m0 11-2.176-1.513c-.306-.213-.46-.32-.626-.395a2.002 2.002 0 0 0-.462-.145c-.18-.033-.367-.033-.74-.033H13.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C10 18.394 10 17.834 10 16.714V14.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C11.52 11 12.08 11 13.2 11h5.6c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 12.52 22 13.08 22 14.2v2.714c0 .932 0 1.398-.152 1.766a2 2 0 0 1-1.083 1.082c-.367.152-.833.152-1.765.152V22Z"}));q.displayName="MessageChatSquare";function ce(e){const t=b.c(15),{agent:i}=e,{setVirtualMcpId:u}=B();let c;t[0]!==i.id||t[1]!==u?(c=()=>{u(i.id)},t[0]=i.id,t[1]=u,t[2]=c):c=t[2];const l=c;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=L("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[3]=m):m=t[3];const p=`Select agent ${i.title}`;let o;t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(F,{size:20}),t[4]=o):o=t[4];let n;t[5]!==i.icon||t[6]!==i.title?(n=s.jsx(O,{icon:i.icon,name:i.title,fallbackIcon:o}),t[5]=i.icon,t[6]=i.title,t[7]=n):n=t[7];let r;t[8]!==i.title?(r=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:i.title}),t[8]=i.title,t[9]=r):r=t[9];let a;return t[10]!==l||t[11]!==p||t[12]!==n||t[13]!==r?(a=s.jsxs("button",{type:"button",onClick:l,className:m,"aria-label":p,children:[n,r]}),t[10]=l,t[11]=p,t[12]=n,t[13]=r,t[14]=a):a=t[14],a}function me(e){const t=b.c(14),{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:c}=e,[l,m]=g.useState(!1),p=g.useRef(null);let o,n;t[0]!==l?(o=()=>{l&&setTimeout(()=>{p.current?.focus()},0)},n=[l],t[0]=l,t[1]=o,t[2]=n):(o=t[1],n=t[2]),g.useEffect(o,n);let r;t[3]!==c?(r=N=>{c(N),m(!1)},t[3]=c,t[4]=r):r=t[4];const a=r;let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=L("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[5]=d):d=t[5];let f;t[6]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(te,{asChild:!0,children:s.jsxs("button",{type:"button",className:d,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-lg bg-accent flex items-center justify-center shrink-0",children:s.jsx(ne,{size:24,className:"text-foreground"})}),s.jsx("p",{className:"text-sm text-foreground text-center leading-tight",children:"See all"})]})}),t[6]=f):f=t[6];let x;t[7]!==a||t[8]!==u||t[9]!==i?(x=s.jsx(se,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(ee,{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:a,searchInputRef:p})}),t[7]=a,t[8]=u,t[9]=i,t[10]=x):x=t[10];let V;return t[11]!==l||t[12]!==x?(V=s.jsxs(ie,{open:l,onOpenChange:m,children:[f,x]}),t[11]=l,t[12]=x,t[13]=V):V=t[13],V}function de(){const e=b.c(20),t=oe(),{selectedVirtualMcp:i,setVirtualMcpId:u}=B();let c,l,m,p,o,n;if(e[0]!==t){o=Symbol.for("react.early_return_sentinel");e:{const x=t.filter(ue).slice(0,6);if(x.length===0){o=null;break e}n=t.map(fe),m="w-full max-w-[800px]",e[7]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("h2",{className:"text-sm font-medium text-muted-foreground mb-4",children:"Recently used agents"}),e[7]=p):p=e[7],c="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",l=x.map(pe)}e[0]=t,e[1]=c,e[2]=l,e[3]=m,e[4]=p,e[5]=o,e[6]=n}else c=e[1],l=e[2],m=e[3],p=e[4],o=e[5],n=e[6];if(o!==Symbol.for("react.early_return_sentinel"))return o;const r=i?.id??null;let a;e[8]!==u||e[9]!==r||e[10]!==n?(a=s.jsx(me,{virtualMcps:n,selectedVirtualMcpId:r,onVirtualMcpChange:u}),e[8]=u,e[9]=r,e[10]=n,e[11]=a):a=e[11];let d;e[12]!==c||e[13]!==l||e[14]!==a?(d=s.jsxs("div",{className:c,children:[l,a]}),e[12]=c,e[13]=l,e[14]=a,e[15]=d):d=e[15];let f;return e[16]!==m||e[17]!==p||e[18]!==d?(f=s.jsxs("div",{className:m,children:[p,d]}),e[16]=m,e[17]=p,e[18]=d,e[19]=f):f=e[19],f}function pe(e){return s.jsx(ce,{agent:e},e.id??"default")}function fe(e){return{id:e.id,title:e.title,description:e.description,icon:e.icon}}function ue(e){return e.id!==null&&!re(e.id)}function xe(){const e=b.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(H,{className:"h-5 w-40 mb-4"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"w-full max-w-[800px]",children:[t,s.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",children:Array.from({length:7}).map(he)})]}),e[1]=i):i=e[1],i}function he(e,t){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 self-stretch",children:[s.jsx(H,{className:"size-6 rounded-md shrink-0"}),s.jsx(H,{className:"h-4 w-full"})]},t)}function ge(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(g.Suspense,{fallback:s.jsx(xe,{}),children:s.jsx(de,{})}),e[0]=t):t=e[0],t}function je(){const e=b.c(39),{org:t}=G(),{data:i}=K.useSession(),{allModelsConnections:u,isChatEmpty:c,activeTaskId:l,tasks:m,selectedVirtualMcp:p}=Y();let o;if(e[0]!==l||e[1]!==m){let j;e[3]!==l?(j=D=>D.id===l,e[3]=l,e[4]=j):j=e[4],o=m.find(j),e[0]=l,e[1]=m,e[2]=o}else o=e[2];const n=o,[r,a]=g.useState(!1);let d;e[5]!==i?.user?.name?(d=i?.user?.name?.split(" ")[0]||"there",e[5]=i?.user?.name,e[6]=d):d=e[6];const f=d;let x;e[7]!==t.id?(x=le(t.id),e[7]=t.id,e[8]=x):x=e[8];const N=p??x;if(u.length===0){let j;return e[9]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"flex flex-col h-full bg-background items-center justify-center",children:s.jsx(h.NoLlmBindingEmptyState,{})}),e[9]=j):j=e[9],j}let E,I;e[10]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(A,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(X,{})}),I=s.jsx(T,{className:"bg-border/30"}),e[10]=E,e[11]=I):(E=e[10],I=e[11]);const $=r?50:80;let C;e[12]!==n?(C=n?.title&&s.jsx(J,{taskId:n.id,text:n.title,className:"text-sm font-medium text-foreground"}),e[12]=n,e[13]=C):C=e[13];let v;e[14]!==C?(v=s.jsx(P.Header.Left,{className:"gap-2",children:C}),e[14]=C,e[15]=v):v=e[15];let y;e[16]!==c||e[17]!==r?(y=!c&&s.jsx("button",{type:"button",onClick:()=>a(be),className:L("flex size-7 items-center justify-center rounded-md border border-input hover:bg-accent transition-colors",r&&"bg-accent"),title:"Toggle context panel",children:s.jsx(W,{size:14,className:"text-muted-foreground"})}),e[16]=c,e[17]=r,e[18]=y):y=e[18];let S;e[19]!==y?(S=s.jsx(P.Header.Right,{className:"gap-1",children:y}),e[19]=y,e[20]=S):S=e[20];let k;e[21]!==v||e[22]!==S?(k=s.jsxs(P.Header,{className:"flex-none z-10 bg-background",children:[v,S]}),e[21]=v,e[22]=S,e[23]=k):k=e[23];let _;e[24]!==N||e[25]!==c||e[26]!==f?(_=c?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center px-10 pb-32 pt-10",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(O,{icon:N.icon,name:N.title,size:"md",fallbackIcon:s.jsx(F,{size:20}),className:"size-12 rounded-xl border border-stone-200/60 shadow-sm aspect-square transition-opacity duration-200"})}),s.jsx("div",{className:"text-center mb-8",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",f,"?"]})}),s.jsx("div",{className:"w-full",children:s.jsx(h.Input,{})}),s.jsx(h.IceBreakers,{className:"w-full"})]}),s.jsx("div",{className:"flex flex-col items-center w-full mt-4",children:s.jsx(ge,{})})]}):s.jsxs(s.Fragment,{children:[s.jsx(h.Main,{children:s.jsx(h.Messages,{})}),s.jsx(h.Footer,{children:s.jsx(h.Input,{onOpenContextPanel:()=>a(!0)})})]}),e[24]=N,e[25]=c,e[26]=f,e[27]=_):_=e[27];let w;e[28]!==k||e[29]!==_?(w=s.jsxs(h,{className:"h-full bg-background",children:[k,_]}),e[28]=k,e[29]=_,e[30]=w):w=e[30];let z;e[31]!==w||e[32]!==$?(z=s.jsx(A,{defaultSize:$,minSize:30,id:"main",order:2,children:w}),e[31]=w,e[32]=$,e[33]=z):z=e[33];let M;e[34]!==r?(M=r&&s.jsxs(s.Fragment,{children:[s.jsx(T,{className:"bg-border/30"}),s.jsx(A,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(Q,{onClose:()=>a(!1)})})]}),e[34]=r,e[35]=M):M=e[35];let R;return e[36]!==z||e[37]!==M?(R=s.jsxs(ae,{direction:"horizontal",className:"size-full",children:[E,I,z,M]}),e[36]=z,e[37]=M,e[38]=R):R=e[38],R}function be(e){return!e}function Ne(e){const t=b.c(14),{error:i,onRetry:u}=e,c=i?.message?.includes("401")||i?.message?.toLowerCase().includes("unauthorized");let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(P.Header,{className:"flex-none",children:[s.jsx(P.Header.Left,{className:"gap-2"}),s.jsx(P.Header.Right,{className:"gap-1"})]}),t[0]=l):l=t[0];let m;t[1]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(q,{className:"h-6 w-6 text-destructive"})}),t[1]=m):m=t[1];const p=c?"Unable to load models":"Something went wrong";let o;t[2]!==p?(o=s.jsx("h3",{className:"text-lg font-medium",children:p}),t[2]=p,t[3]=o):o=t[3];const n=c?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":i?.message||"An unexpected error occurred";let r;t[4]!==n?(r=s.jsx("p",{className:"text-sm text-muted-foreground",children:n}),t[4]=n,t[5]=r):r=t[5];let a;t[6]!==o||t[7]!==r?(a=s.jsxs("div",{className:"space-y-2",children:[o,r]}),t[6]=o,t[7]=r,t[8]=a):a=t[8];let d;t[9]!==u?(d=s.jsx(U,{variant:"outline",onClick:u,children:"Try again"}),t[9]=u,t[10]=d):d=t[10];let f;return t[11]!==a||t[12]!==d?(f=s.jsxs(h,{children:[l,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[m,a,d]})})]}),t[11]=a,t[12]=d,t[13]=f):f=t[13],f}function ss(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Z,{fallback:Ce,children:s.jsx(g.Suspense,{fallback:s.jsx(h.Skeleton,{}),children:s.jsx(je,{})})}),e[0]=t):t=e[0],t}function Ce(e){const{error:t,resetError:i}=e;return s.jsx(Ne,{error:t,onRetry:i})}export{ss as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as r,j as i}from"./index-DsOJvxnb.js";import{P as m}from"./project-plugins-DRIvSpW5.js";import"./useQuery-D2ShO4od.js";import"./useMutation-B_cFG709.js";import"./constants-XtX-WKGm.js";import"./switch-BQjzAGvm.js";import"./label-iPw5smAw.js";import"./Container-DwxLlgWA.js";import"./use-connection-DmR852Js.js";import"./use-collections-DSWhP4jg.js";import"./use-binding-BfjFWpEn.js";import"./binder-DTBFGqjl.js";import"./use-install-from-registry-_FQYQGQx.js";import"./extract-connection-data-CS_Bn7Ri.js";import"./constants-B4Swgi3d.js";import"./registry-utils-Cd3t_Kmp.js";import"./generate-id-Dyweu44Y.js";import"./Loading01-BNn4YU_K.js";import"./Plus-CT_Gcwl2.js";import"./select-DRPG5csU.js";import"./ChevronUp-1s_S3eDF.js";import"./index-zjV4p_E5.js";import"./Check-BfKCyKXX.js";import"./ChevronDown-BHMaRWRt.js";function v(){const o=r.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(m,{}),o[0]=t):t=o[0],t}export{v as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as P,g as A,j as r,E as y,r as R,u as T}from"./index-DsOJvxnb.js";import{u as S}from"./use-connection-DmR852Js.js";import{u as U}from"./constants-XtX-WKGm.js";import{u as v}from"./use-mcp-tools-BXmfFmar.js";import{c as E}from"./content-blocks-o63cs2vh.js";import{M as H}from"./mcp-app-renderer-IX_OR3wW.js";import{g as O,M as $}from"./types-B3niHy47.js";import{u as D}from"./context-CtrnP3HC.js";import{P as _,u as k}from"./index-X4FDee1r.js";import"./use-collections-DSWhP4jg.js";import"./useMutation-B_cFG709.js";import"./useQuery-D2ShO4od.js";import"./use-mcp-resources-Bxkx1Ub1.js";import"./decopilot-events-Brt4gAR6.js";import"./use-local-storage-CxC8ozOe.js";import"./tooltip-XyKE4lZa.js";import"./index-zjV4p_E5.js";const b={};function w(t){const e=P.c(22),{client:o,resourceURI:m,tool:i,connectionId:f}=t,{sendMessage:a,setAppContext:c,clearAppContext:n}=D(),[,p]=k(),l=`${f}:${i.name}`;let d;e[0]!==o||e[1]!==i.name?(d={client:o,toolName:i.name,toolArguments:b},e[0]=o,e[1]=i.name,e[2]=d):d=e[2];const{data:u}=v(d);let s;e[3]!==a||e[4]!==p?(s=N=>{const M=E(N.content);M.content.length>0&&(p(!0),a(M))},e[3]=a,e[4]=p,e[5]=s):s=e[5];const g=s,I=i;let x;e[6]!==I?(x={tool:I},e[6]=I,e[7]=x):x=e[7];let h;e[8]!==c||e[9]!==l?(h=N=>c(l,N),e[8]=c,e[9]=l,e[10]=h):h=e[10];let j;e[11]!==n||e[12]!==l?(j=()=>n(l),e[11]=n,e[12]=l,e[13]=j):j=e[13];let C;return e[14]!==o||e[15]!==g||e[16]!==m||e[17]!==x||e[18]!==h||e[19]!==j||e[20]!==u?(C=r.jsx(H,{resourceURI:m,toolInfo:x,toolInput:b,toolResult:u,displayMode:"fullscreen",minHeight:$.fullscreen.minHeight,maxHeight:$.fullscreen.maxHeight,client:o,onMessage:g,onUpdateModelContext:h,onTeardown:j,className:"h-full"}),e[14]=o,e[15]=g,e[16]=m,e[17]=x,e[18]=h,e[19]=j,e[20]=u,e[21]=C):C=e[21],C}function L(t){const e=P.c(17),{connectionId:o,toolName:m}=t,{org:i}=T();let f;e[0]!==o||e[1]!==i.id?(f={connectionId:o,orgId:i.id},e[0]=o,e[1]=i.id,e[2]=f):f=e[2];const a=U(f),c=S(o),n=decodeURIComponent(m);let p,l;if(e[3]!==c?.tools||e[4]!==n){let s;e[7]!==n?(s=g=>g.name===n,e[7]=n,e[8]=s):s=e[8],l=(c?.tools??[]).find(s),p=l?._meta?O(l._meta):void 0,e[3]=c?.tools,e[4]=n,e[5]=p,e[6]=l}else p=e[5],l=e[6];const d=p;if(!c){let s;return e[9]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("p",{className:"text-sm text-muted-foreground",children:"Connection not found"})}),e[9]=s):s=e[9],s}if(!l||!d){let s;return e[10]!==n?(s=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',n,'" not found or has no UI']})}),e[10]=n,e[11]=s):s=e[11],s}let u;return e[12]!==a||e[13]!==o||e[14]!==d||e[15]!==l?(u=r.jsx(w,{client:a,resourceURI:d,tool:l,connectionId:o}),e[12]=a,e[13]=o,e[14]=d,e[15]=l,e[16]=u):u=e[16],u}function ne(){const t=P.c(9);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/apps/$connectionId/$toolName"},t[0]=e):e=t[0];const{connectionId:o,toolName:m}=A(e);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(_.Header,{}),t[1]=i):i=t[1];const f=`${o}:${m}`;let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[r.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),r.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),t[2]=a):a=t[2];let c;t[3]!==o||t[4]!==m?(c=r.jsx(R.Suspense,{fallback:a,children:r.jsx(L,{connectionId:o,toolName:m})}),t[3]=o,t[4]=m,t[5]=c):c=t[5];let n;return t[6]!==f||t[7]!==c?(n=r.jsxs(_,{children:[i,r.jsx(_.Content,{children:r.jsx(y,{fallback:void 0,children:c},f)})]}),t[6]=f,t[7]=c,t[8]=n):n=t[8],n}export{ne as default};
|