decocms 2.178.1 → 2.178.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-CI8iQIN4.js → AlertCircle-12chRuly.js} +1 -1
- package/dist/client/assets/{AlignLeft-D1a9nQq5.js → AlignLeft-_LT9deOt.js} +1 -1
- package/dist/client/assets/{ArrowDown-bcBjuFxH.js → ArrowDown-7rbX3zqZ.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BaV7db3X.js → ArrowLeft-erI8s3G2.js} +1 -1
- package/dist/client/assets/{ArrowUp-BtIkmj4Y.js → ArrowUp-DoIG5eQh.js} +1 -1
- package/dist/client/assets/{Building02-R_mkgdQ4.js → Building02-Dr7IyBdv.js} +1 -1
- package/dist/client/assets/{Check-GOz4_bBS.js → Check-DW8AVFkq.js} +1 -1
- package/dist/client/assets/{CheckCircle-DosFvCW2.js → CheckCircle-hBpanOsI.js} +1 -1
- package/dist/client/assets/{CheckSquare-Be1kXxvn.js → CheckSquare-Cr3IzSXp.js} +1 -1
- package/dist/client/assets/{CheckVerified02-CZakFFpv.js → CheckVerified02-r17ymUCs.js} +1 -1
- package/dist/client/assets/{ChevronDown-DElgod-p.js → ChevronDown-BIRGQoZ5.js} +1 -1
- package/dist/client/assets/{ChevronLeft-Bk7mc5_w.js → ChevronLeft-D-e7F7Gj.js} +1 -1
- package/dist/client/assets/{ChevronRight-Ys0vr-YD.js → ChevronRight-DsjLlugM.js} +1 -1
- package/dist/client/assets/{ChevronUp-CKkWbsZ5.js → ChevronUp-Bi3NMXzv.js} +1 -1
- package/dist/client/assets/{Clock-DRICOB0c.js → Clock-D4xJnA3P.js} +1 -1
- package/dist/client/assets/{Code01-CDxb4LVl.js → Code01-YGq5QwlZ.js} +1 -1
- package/dist/client/assets/{Container-C8ScaknS.js → Container-DHyMOW_p.js} +1 -1
- package/dist/client/assets/{Copy01-DhAVspEC.js → Copy01-DkcjIGiS.js} +1 -1
- package/dist/client/assets/{Dataflow03-ONoSH2VT.js → Dataflow03-CD3eo8oO.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-BaiN7u8r.js → DotsHorizontal-CjYGc80C.js} +1 -1
- package/dist/client/assets/{DotsVertical-rvqtR29a.js → DotsVertical-2nyye7GD.js} +1 -1
- package/dist/client/assets/{Download01-CVEqgoRT.js → Download01-BvtNZalG.js} +1 -1
- package/dist/client/assets/{Edit01-BaPedGGl.js → Edit01-CoeKfJ-u.js} +1 -1
- package/dist/client/assets/{Edit05-DSl3Jqkp.js → Edit05-CbbEzOoe.js} +1 -1
- package/dist/client/assets/{Eye-BgAytXDm.js → Eye-hBqNQHpc.js} +1 -1
- package/dist/client/assets/{EyeOff-CucokIoZ.js → EyeOff-CJoTkAtN.js} +1 -1
- package/dist/client/assets/{File02-gbFS8GtC.js → File02-D19u2hUl.js} +1 -1
- package/dist/client/assets/{File06-Dpi3gJhU.js → File06-Bp4ioOvR.js} +1 -1
- package/dist/client/assets/{FilterLines-BeHTcRH-.js → FilterLines-Dvk7BhWf.js} +1 -1
- package/dist/client/assets/{Globe01-Ceb6Pyzg.js → Globe01-B8Ib7knn.js} +1 -1
- package/dist/client/assets/{Globe02-4oAOo4_d.js → Globe02-wRhoc1N5.js} +1 -1
- package/dist/client/assets/{Grid01-NwJJaoW7.js → Grid01-C5e9ReQ4.js} +1 -1
- package/dist/client/assets/{Home02-DQJpzzIE.js → Home02-JZJR9jmQ.js} +1 -1
- package/dist/client/assets/{Image01-BwGUDEUi.js → Image01-DjoSkYp_.js} +1 -1
- package/dist/client/assets/{Inbox01-CDOpLWwZ.js → Inbox01-ClVaT7W5.js} +1 -1
- package/dist/client/assets/{InfoCircle-CfTVXLYm.js → InfoCircle-DzyfpQes.js} +1 -1
- package/dist/client/assets/{Key01-BZkaWvm5.js → Key01-qNySmY39.js} +1 -1
- package/dist/client/assets/{LayersTwo01-D9dHuPjU.js → LayersTwo01-dfSlQT0y.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BHhw95T0.js → LayoutLeft-B2KZfn2n.js} +1 -1
- package/dist/client/assets/{Link01-CU6UcWFS.js → Link01-Cz_ZRKoB.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DOdBEG1U.js → LinkExternal01-CKvCiQnV.js} +1 -1
- package/dist/client/assets/{List-DD3BKPLz.js → List-NLa0AhO4.js} +1 -1
- package/dist/client/assets/{Loading01-B85tVuIU.js → Loading01-Bb8FCosd.js} +1 -1
- package/dist/client/assets/{Lock01-WwvDQaaT.js → Lock01-CnZITIks.js} +1 -1
- package/dist/client/assets/{Play-DTPauCd1.js → Play-Bw5lQw7j.js} +1 -1
- package/dist/client/assets/{Plus-C9dY5EOr.js → Plus-CajZ9VfC.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-DJsZi8Hz.js → RefreshCcw01-B_NTitRE.js} +1 -1
- package/dist/client/assets/{Save01-COu7GfwR.js → Save01-8oEsqMkJ.js} +1 -1
- package/dist/client/assets/{SearchMd-CKp0BoPW.js → SearchMd-eZWeU0sP.js} +1 -1
- package/dist/client/assets/{Settings01-DunsMQ-m.js → Settings01-ClPVpLPy.js} +1 -1
- package/dist/client/assets/{Shield01-CCMtDdxH.js → Shield01-N4ace-oo.js} +1 -1
- package/dist/client/assets/{Terminal-COsHV7Wy.js → Terminal-CGwuP-_5.js} +1 -1
- package/dist/client/assets/{Tool01-Delk_MGO.js → Tool01-D1m8i7Ez.js} +1 -1
- package/dist/client/assets/{Trash01-BtiNjuw3.js → Trash01-B_4PTwjI.js} +1 -1
- package/dist/client/assets/{Upload01-DqqcM3M6.js → Upload01-CLIOr3Tj.js} +1 -1
- package/dist/client/assets/{Users03-CQa5jfkV.js → Users03-Bv-hUQkl.js} +1 -1
- package/dist/client/assets/{X-CaaFSPD_.js → X-LzehymHS.js} +1 -1
- package/dist/client/assets/{XClose-Dey3r3af.js → XClose-CcNXqPQc.js} +1 -1
- package/dist/client/assets/{Zap-DX02pf-a.js → Zap-BFN1DqIC.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-BCTZ6BnP.js → agent-connections-preview-3pYXfstj.js} +1 -1
- package/dist/client/assets/{agent-detail-BBSZrHWb.js → agent-detail-DMK-u3yi.js} +1 -1
- package/dist/client/assets/{agents-DVOxH2hb.js → agents-Wfe5dNfh.js} +1 -1
- package/dist/client/assets/{ai-providers-logos-BWU0RfRJ.js → ai-providers-logos-CCp39UCk.js} +1 -1
- package/dist/client/assets/{alert-dialog-BGZzdkI2.js → alert-dialog-B_ae3oRt.js} +1 -1
- package/dist/client/assets/{auth-catchall-1PjzZ5eD.js → auth-catchall-DAx9m28t.js} +1 -1
- package/dist/client/assets/{automation-detail-dSH73muX.js → automation-detail-DfFkGT_5.js} +1 -1
- package/dist/client/assets/{automations-CEr8CMbK.js → automations-A8NOzTSS.js} +1 -1
- package/dist/client/assets/{avatar-DWAYNsNK.js → avatar-B2yArl-q.js} +1 -1
- package/dist/client/assets/{badge-B_BTuJZe.js → badge-DtRom7JO.js} +1 -1
- package/dist/client/assets/{binder-l1kCmNCE.js → binder-D4cqx_Kx.js} +1 -1
- package/dist/client/assets/{breadcrumb-ijphtzQp.js → breadcrumb-C2RG4nAQ.js} +1 -1
- package/dist/client/assets/{card-CwEWrOs9.js → card-B8qDZGCZ.js} +1 -1
- package/dist/client/assets/{checkbox-B_91sMwd.js → checkbox-B1rexahu.js} +1 -1
- package/dist/client/assets/{collapsible-DILfwVxb.js → collapsible-BtjeaBAE.js} +1 -1
- package/dist/client/assets/{collection-detail-lkCxiUzr.js → collection-detail-BaBGI9i2.js} +1 -1
- package/dist/client/assets/{collection-display-button-kCOiEzLn.js → collection-display-button-CpVZ4wHm.js} +1 -1
- package/dist/client/assets/{collection-search-Bdxpglbf.js → collection-search-BYV7N3mr.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D-vPJPam.js → collection-table-wrapper-CHFJQd21.js} +1 -1
- package/dist/client/assets/{collection-tabs-IdlFD1jR.js → collection-tabs-CJEa3dRy.js} +1 -1
- package/dist/client/assets/{command-BgTh2_vK.js → command-Drksh_DO.js} +1 -1
- package/dist/client/assets/{connection-card-BWZAp_hO.js → connection-card-Bak2l1_M.js} +1 -1
- package/dist/client/assets/{connection-detail-DPSHmWyz.js → connection-detail-BKy2ZsS6.js} +1 -1
- package/dist/client/assets/{connections-BvYzdmU4.js → connections-Dxf4eIOE.js} +1 -1
- package/dist/client/assets/{constants-BCt7c81T.js → constants-D7qXOYRn.js} +1 -1
- package/dist/client/assets/{context-BTMVzdan.js → context-DxQMlFKC.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-Du7uAMNm.js → create-organization-dialog-CNWB-72r.js} +1 -1
- package/dist/client/assets/{create-project-dialog-Bb7dubB7.js → create-project-dialog-BeIY4Oy9.js} +1 -1
- package/dist/client/assets/{danger-CfnLHwII.js → danger-YWbxrjNq.js} +1 -1
- package/dist/client/assets/{danger-zone-DjN4GhuT.js → danger-zone-DGg0ZzSy.js} +1 -1
- package/dist/client/assets/{dependencies-CwSG23CA.js → dependencies-DtAVTWu-.js} +1 -1
- package/dist/client/assets/{dialog-BDa2Gsq9.js → dialog-ChXYvlDt.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DEQ5DCnG.js → dropdown-menu-BxlQMXgW.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-DP6UGwOE.js → dynamic-plugin-layout-JpZTv0Ay.js} +1 -1
- package/dist/client/assets/{editable-task-title-CaE6DIBf.js → editable-task-title-Cm-uIwFs.js} +1 -1
- package/dist/client/assets/{empty-state-DmgqwjeV.js → empty-state-qLM_bVsv.js} +1 -1
- package/dist/client/assets/{empty-state-C4c2sKjV.js → empty-state-xIvMMy-_.js} +1 -1
- package/dist/client/assets/{env-vars-editor-Ah5xyGmz.js → env-vars-editor-Yss1wn0m.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BxJWN5u-.js → extract-connection-data-48N591A_.js} +1 -1
- package/dist/client/assets/{file-browser-BRFmGA__.js → file-browser-BbqpPFZK.js} +2 -2
- package/dist/client/assets/{form-BWoxqZfk.js → form-CaFPTMVC.js} +1 -1
- package/dist/client/assets/{general-BKqD1lIr.js → general-DI9irVIQ.js} +1 -1
- package/dist/client/assets/{generate-id-BaIFvm62.js → generate-id-BiV6m8fS.js} +1 -1
- package/dist/client/assets/{grid-view-DGZvuOwZ.js → grid-view-DurgUMuo.js} +1 -1
- package/dist/client/assets/{home-B7jB9Gxp.js → home-CspK560n.js} +1 -1
- package/dist/client/assets/{index-BgoahoDu.js → index-ChUIqRBi.js} +1 -1
- package/dist/client/assets/{index--PLXALUm.js → index-CqWJIMlG.js} +1 -1
- package/dist/client/assets/{index-WTO-ZRzC.js → index-CqtWW-Tq.js} +1 -1
- package/dist/client/assets/{index-10S4l3se.js → index-CqyqI90F.js} +1 -1
- package/dist/client/assets/{index-DZ6p-ZXx.js → index-De1iYnQy.js} +1 -1
- package/dist/client/assets/{index-DcxE8oe_.js → index-NjMxPJgF.js} +3 -3
- package/dist/client/assets/{index-DGLQ2uQ5.js → index-TV8hw8s3.js} +1 -1
- package/dist/client/assets/{index-Bc448aeG.js → index-YL7q5tyF.js} +1 -1
- package/dist/client/assets/{index-CTjqFNkw.js → index-YRudAQp7.js} +1 -1
- package/dist/client/assets/{index-B5vgf28x.js → index-yiVP4brl.js} +1 -1
- package/dist/client/assets/{index-CM7_8eMu.js → index-zWpUeKAz.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CzIVu_kK.js → infiniteQueryObserver-JZ0YxCW-.js} +1 -1
- package/dist/client/assets/{input-DPpAbHbD.js → input-B89sozd8.js} +1 -1
- package/dist/client/assets/{integration-icon-6jcHFHZV.js → integration-icon-BPVDVJvP.js} +1 -1
- package/dist/client/assets/{label-BtaiiWJ8.js → label-DkiEYJcU.js} +1 -1
- package/dist/client/assets/{layout-Cjef80qc.js → layout-Cqn-h1Jz.js} +1 -1
- package/dist/client/assets/{layout-DG9LlvE6.js → layout-DcmGLVHZ.js} +1 -1
- package/dist/client/assets/{login-D1Xb70mS.js → login-qT_ItpIx.js} +1 -1
- package/dist/client/assets/{logo-upload-79T6Ecg3.js → logo-upload-CoGaedUC.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DgOOTmoQ.js → mcp-app-renderer-By1mQEU9.js} +1 -1
- package/dist/client/assets/{mcp-server-card-CqBs71hZ.js → mcp-server-card-B3Nrrgyk.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-D_BCRi3w.js → mcp-server-detail-DMfy0V9h.js} +2 -2
- package/dist/client/assets/{members-BkdG_-Nh.js → members-Q81LXZu1.js} +1 -1
- package/dist/client/assets/{monaco-editor-D5smiy7k.js → monaco-editor-ZB27PMAe.js} +1 -1
- package/dist/client/assets/{monitoring-kw0ipyvO.js → monitoring-C31A03PZ.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-S2Ut1cvD.js → monitoring-dashboard-edit-Dfi8Jxeb.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-gNG_IQ8M.js → monitoring-dashboard-view-CxjxBHLW.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-D3PlzPcP.js → monitoring-stats-row-CAn-8pVZ.js} +1 -1
- package/dist/client/assets/{oauth-callback-9ngEzskH.js → oauth-callback-B8DRnSok.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CpdQKMVl.js → oauth-callback-ai-provider-CsTCxPAY.js} +1 -1
- package/dist/client/assets/{org-ai-providers-CrQ3OeB5.js → org-ai-providers-DaYyItUL.js} +1 -1
- package/dist/client/assets/{page-C2HdbsvN.js → page-BjLk0DX_.js} +1 -1
- package/dist/client/assets/{page-DmVGFJaY.js → page-C2I5Nlmu.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-DXhpvNlI.js → plugin-empty-state-K02oXRNN.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CWxRJkeE.js → plugin-empty-state-l30u7dec.js} +1 -1
- package/dist/client/assets/{plugin-header-C3JJ8Nq_.js → plugin-header-B_wkRb4Y.js} +1 -1
- package/dist/client/assets/{plugin-header-TcX-3hN2.js → plugin-header-CE-BhILm.js} +1 -1
- package/dist/client/assets/plugins-6p4XZdw1.js +1 -0
- package/dist/client/assets/{popover-CNIkv0WT.js → popover-Br8QkMK3.js} +1 -1
- package/dist/client/assets/{project-app-view-BVSK5NCb.js → project-app-view-CRe7LVZk.js} +1 -1
- package/dist/client/assets/{project-layout-Bd1vlG83.js → project-layout-Bg1hlIaM.js} +1 -1
- package/dist/client/assets/{project-plugins-az_ZXSwN.js → project-plugins-BHOZZsH7.js} +1 -1
- package/dist/client/assets/{projects-list-D8eiYeUr.js → projects-list-i4ZvUqtI.js} +1 -1
- package/dist/client/assets/{registry-layout-BXceDqEw.js → registry-layout-DQV7LhSo.js} +1 -1
- package/dist/client/assets/{registry-utils-CkCRcmq4.js → registry-utils-cjX9P5J9.js} +1 -1
- package/dist/client/assets/{reset-password-xlfm2d95.js → reset-password-Cgcrl5ZG.js} +1 -1
- package/dist/client/assets/{resizable-B7fIdnoq.js → resizable-Nu1SqaJD.js} +1 -1
- package/dist/client/assets/{save-actions-DIKaTzi7.js → save-actions-CVl6VtT2.js} +1 -1
- package/dist/client/assets/{scroll-area-B-pB6oMr.js → scroll-area-BTJQ86Ry.js} +1 -1
- package/dist/client/assets/{select-DeNgR918.js → select-Dx3T3-4n.js} +1 -1
- package/dist/client/assets/{select-virtual-mcp-CFDIRCp8.js → select-virtual-mcp-BS537pmy.js} +1 -1
- package/dist/client/assets/{sheet-BBLyN2xl.js → sheet-C3HM0Uwr.js} +1 -1
- package/dist/client/assets/{shell-layout-CiKn6BP6.js → shell-layout-Bco0BFOl.js} +2 -2
- package/dist/client/assets/{sidebar-settings-DOwlHFdj.js → sidebar-settings-JhN4X_jg.js} +1 -1
- package/dist/client/assets/{skeleton-CNgs5GJt.js → skeleton-Cjm8s7CT.js} +1 -1
- package/dist/client/assets/{spinner-BZdAS5i2.js → spinner-Dzx7B3Jl.js} +1 -1
- package/dist/client/assets/{store-invite-BXcKXIzr.js → store-invite-BPcFU0aw.js} +1 -1
- package/dist/client/assets/{switch-CmREXk8C.js → switch-CA_oYDia.js} +1 -1
- package/dist/client/assets/{table-C4WVepD4.js → table-C-1rP_rt.js} +1 -1
- package/dist/client/assets/{tabs-BeYHPY-1.js → tabs-BSOe8gLq.js} +1 -1
- package/dist/client/assets/{task-status-DauQRqAW.js → task-status-DYx9R7EL.js} +1 -1
- package/dist/client/assets/tasks-D1X8oLa3.js +1 -0
- package/dist/client/assets/{tasks-panel-DqbQRMGq.js → tasks-panel-BJ3TfA-_.js} +1 -1
- package/dist/client/assets/{textarea-C7YqhWTc.js → textarea-DIJzFUWn.js} +1 -1
- package/dist/client/assets/{time-range-picker-CM-9xODE.js → time-range-picker-CGBh-D6p.js} +1 -1
- package/dist/client/assets/{toggle-group-B7g3fYap.js → toggle-group-DlZGDyPQ.js} +1 -1
- package/dist/client/assets/{tools-list-4D_tBiUe.js → tools-list-D-T64862.js} +1 -1
- package/dist/client/assets/{tooltip-CXZH0tSC.js → tooltip-BJMSu0c2.js} +1 -1
- package/dist/client/assets/{topbar-portal-CjA9qO3_.js → topbar-portal-ChPXVsi1.js} +1 -1
- package/dist/client/assets/{types-CPj3Y6i2.js → types-BHeMLyAV.js} +1 -1
- package/dist/client/assets/{use-automations-B0CZymwk.js → use-automations-Bmw3x7Dk.js} +1 -1
- package/dist/client/assets/{use-collections-CObsJD7p.js → use-collections-C0cYiFfV.js} +1 -1
- package/dist/client/assets/{use-connection-Cv_-e2MS.js → use-connection-CHFdKnsr.js} +1 -1
- package/dist/client/assets/{use-copy-sxHnzQ3E.js → use-copy-xhdji_Bl.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-dSjfTRl8.js → use-create-virtual-mcp-B7odZ_c3.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CqxPDCSp.js → use-infinite-scroll-CPhZNIw7.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-wW1d1HtB.js → use-install-from-registry-BzwuBLOx.js} +1 -1
- package/dist/client/assets/{use-list-state-CWVUvMhj.js → use-list-state-CbsN6RbJ.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-C4X4lEEg.js → use-mcp-prompts-Bel4H4rh.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-DoUnZI9j.js → use-mcp-resources-qGdymfRz.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Cnh4vEBm.js → use-mcp-tools-BCZI_Wqc.js} +1 -1
- package/dist/client/assets/{use-members-BHa-Fb-h.js → use-members-B4ncWtMV.js} +1 -1
- package/dist/client/assets/{use-mobile-v2XXLV0O.js → use-mobile-DOUfTohp.js} +1 -1
- package/dist/client/assets/{use-project-B-9YXhNP.js → use-project-b5C3lq5-.js} +1 -1
- package/dist/client/assets/{use-store-discovery-z8nwAYJJ.js → use-store-discovery-B402mTHd.js} +1 -1
- package/dist/client/assets/{use-view-mode-XMRPR1ke.js → use-view-mode-ss3eRodO.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DfPJ-WDb.js → use-virtual-mcp-BP6aaUzw.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BXDrDvlH.js +1 -0
- package/dist/client/assets/{useMutation-CV3IN68C.js → useMutation-68NxhXCf.js} +1 -1
- package/dist/client/assets/useQuery-BYBCFxgb.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-X3jXt04i.js +1 -0
- package/dist/client/assets/{user-_Hc5WOWn.js → user-iDZRuimU.js} +1 -1
- package/dist/client/assets/{workflow-DKAllKJO.js → workflow-CrrTPehP.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/migrate.js +1 -1
- package/dist/server/node_modules/pg-connection-string/LICENSE +21 -0
- package/dist/server/node_modules/pg-connection-string/README.md +105 -0
- package/dist/server/node_modules/pg-connection-string/esm/index.mjs +8 -0
- package/dist/server/node_modules/pg-connection-string/index.d.ts +36 -0
- package/dist/server/node_modules/pg-connection-string/index.js +231 -0
- package/dist/server/node_modules/pg-connection-string/package.json +52 -0
- package/dist/server/node_modules/{pg → pg-pool}/LICENSE +1 -1
- package/dist/server/node_modules/pg-pool/README.md +357 -0
- package/dist/server/node_modules/pg-pool/esm/index.mjs +5 -0
- package/dist/server/node_modules/pg-pool/index.js +517 -0
- package/dist/server/node_modules/pg-pool/package.json +51 -0
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/plugins-BfcAD8Xs.js +0 -1
- package/dist/client/assets/tasks-fQ7kFf17.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BIejUr4H.js +0 -1
- package/dist/client/assets/useQuery-CEE9SUlS.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B7NkSjI9.js +0 -1
- package/dist/server/node_modules/pg/README.md +0 -95
- package/dist/server/node_modules/pg/esm/index.mjs +0 -20
- package/dist/server/node_modules/pg/lib/client.js +0 -743
- package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -171
- package/dist/server/node_modules/pg/lib/connection.js +0 -221
- package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +0 -122
- package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -212
- package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -43
- package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -89
- package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
- package/dist/server/node_modules/pg/lib/defaults.js +0 -91
- package/dist/server/node_modules/pg/lib/index.js +0 -73
- package/dist/server/node_modules/pg/lib/native/client.js +0 -323
- package/dist/server/node_modules/pg/lib/native/index.js +0 -2
- package/dist/server/node_modules/pg/lib/native/query.js +0 -165
- package/dist/server/node_modules/pg/lib/query.js +0 -252
- package/dist/server/node_modules/pg/lib/result.js +0 -109
- package/dist/server/node_modules/pg/lib/stream.js +0 -83
- package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
- package/dist/server/node_modules/pg/lib/utils.js +0 -217
- package/dist/server/node_modules/pg/package.json +0 -76
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Y,r as D,j as s,D as ce,B as te,e as ue,u as me,ad as xe,ae as pe,O as ge,f as Re,at as Te,bU as oe,K as Pe,z as ze,E as $e,au as ke}from"./index-DcxE8oe_.js";import{u as Le,P as se}from"./index-DZ6p-ZXx.js";import{B as Ee,a as Oe,b as Fe,c as Ke}from"./breadcrumb-ijphtzQp.js";import{i as he}from"./FilterLines-BeHTcRH-.js";import{n as je}from"./Inbox01-CDOpLWwZ.js";import{i as le}from"./Loading01-B85tVuIU.js";import{i as ye}from"./SearchMd-CKp0BoPW.js";import{u as Ae}from"./use-store-discovery-z8nwAYJJ.js";import{u as _e,a as ve,b as Be}from"./use-connection-Cv_-e2MS.js";import{s as Me}from"./slugify-CEUa2lfQ.js";import{f as De,i as Ge,u as Ue}from"./registry-utils-CkCRcmq4.js";import{C as Ve}from"./collection-search-Bdxpglbf.js";import{M as ae}from"./mcp-server-card-CqBs71hZ.js";import{I as We}from"./input-DPpAbHbD.js";import{b as be,P as Ne,a as Ce}from"./popover-CNIkv0WT.js";import{i as Se}from"./Check-GOz4_bBS.js";import{t as we}from"./ChevronDown-DElgod-p.js";import{s as re}from"./XClose-Dey3r3af.js";import{s as He}from"./Plus-C9dY5EOr.js";import{E as qe}from"./empty-state-C4c2sKjV.js";import{u as Je}from"./useQuery-CEE9SUlS.js";import{W as Ye,a as Qe,u as Xe,e as Ze,b as et}from"./constants-BCt7c81T.js";import"./useMutation-CV3IN68C.js";import"./tooltip-CXZH0tSC.js";import"./index-10S4l3se.js";import"./ChevronRight-Ys0vr-YD.js";import"./useInfiniteQuery-BIejUr4H.js";import"./infiniteQueryObserver-CzIVu_kK.js";import"./use-collections-CObsJD7p.js";import"./binder-l1kCmNCE.js";import"./CheckVerified02-CZakFFpv.js";import"./Globe02-4oAOo4_d.js";import"./Lock01-WwvDQaaT.js";import"./Terminal-COsHV7Wy.js";import"./card-CwEWrOs9.js";import"./integration-icon-6jcHFHZV.js";import"./Container-C8ScaknS.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 k=Number.parseInt(p,10);r.current.scrollTop=k}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,k,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(We,{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",k=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]=k,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],k=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]!==k?(N=s.jsx("div",{className:p,children:k}),e[32]=p,e[33]=k,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 $;e[39]!==m||e[40]!==z||e[41]!==C||e[42]!==R||e[43]!==y||e[44]!==N?($=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]=$):$=e[45];let P;return e[46]!==x||e[47]!==$||e[48]!==L||e[49]!==v||e[50]!==b?(P=s.jsxs(x,{open:L,onOpenChange:v,children:[b,$]}),e[46]=x,e[47]=$,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 k=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 $;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],$=R.map(g),e[49]=R,e[50]=m,e[51]=$}else $=e[51];let P;e[54]!==k||e[55]!==c?(P=c&&s.jsxs(te,{variant:"ghost",size:"sm",onClick:k,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]=k,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]!==$?(j=s.jsxs("div",{className:y,children:[L,z,$,P]}),e[57]=P,e[58]=y,e[59]=L,e[60]=z,e[61]=$,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:k,hasMore:C,isLoadingMore:R,isInitialLoading:y,isFetching:L,error:v,loadMore:b,availableTags:N,availableCategories:z,selectedTags:$,selectedCategories:P,setSelectedTags:j,setSelectedCategories:S,hasActiveFilters:g}=Ae(p);let w;e[5]!==k||e[6]!==n?(w=n?ot(k,n):k,e[5]=k,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 V=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=Me(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 W=J;let _;e[27]!==O||e[28]!==n?(_=s.jsx(Ve,{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]!==$||e[34]!==S||e[35]!==j?(B=s.jsx(nt,{availableTags:N,availableCategories:z,selectedTags:$,selectedCategories:P,onTagChange:j,onCategoryChange:S}),e[30]=z,e[31]=N,e[32]=P,e[33]=$,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]!==V||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}),V.length>0&&s.jsx(ae,{items:V,title:"Verified",onItemClick:q}),ee.length>0&&s.jsx(ae,{items:ee,title:F.length>0||V.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]=V,e[48]=I.length,e[49]=G):G=e[49];let M;e[50]!==W||e[51]!==m||e[52]!==G?(M=s.jsx("div",{ref:m,className:"flex-1 overflow-y-auto",onScroll:W,children:G}),e[50]=W,e[51]=m,e[52]=G,e[53]=M):M=e[53];let U;return e[54]!==B||e[55]!==M||e[56]!==_?(U=s.jsxs("div",{className:"flex flex-col h-full",children:[_,B,M]}),e[54]=B,e[55]=M,e[56]=_,e[57]=U):U=e[57],U}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=_e(r),o=d?.tools;let n;e[0]!==o?(n=De(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=Ge(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,k,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],k=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]=k,e[9]=C,e[10]=R,e[11]=y}else m=e[4],x=e[5],i=e[6],p=e[7],k=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]!==k?(v=s.jsxs("button",{type:i,className:p,children:[k,L]}),e[16]=i,e[17]=p,e[18]=k,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(He,{size:16})})]},j.id??j.title))]}),e[31]=o,e[32]=n,e[33]=z):z=e[33];let $;e[34]!==N||e[35]!==z?($=s.jsxs(Ce,{align:"end",className:"w-auto min-w-[200px] p-1",children:[N,z]}),e[34]=N,e[35]=z,e[36]=$):$=e[36];let P;return e[37]!==x||e[38]!==b||e[39]!==$||e[40]!==R||e[41]!==y?(P=s.jsxs(x,{open:R,onOpenChange:y,children:[b,$]}),e[37]=x,e[38]=b,e[39]=$,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(qe,{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 ss(){const t=Y.c(53),{org:e,project:r}=me(),l=Be(),d=ve(),o=Te(),n=o.location.pathname.includes("/store/")&&o.location.pathname.split("/").length>3,a=Ue(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 k=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:k&&!!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[$,P]=Le(z,jt);let j;t[16]!==$?(j=u=>u.id===$,t[16]=$,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 V;t[25]!==d.create||t[26]!==P?(V=async u=>{const Z=await d.create.mutateAsync(u);P(Z.id)},t[25]=d.create,t[26]=P,t[27]=V):V=t[27];const Q=V,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(ke,{}),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(Ee,{children:s.jsx(Oe,{children:s.jsx(Fe,{children:s.jsx(Ke,{children:"Store"})})})})}),t[29]=J):J=t[29];let W;t[30]!==Q?(W=async u=>Q(u),t[30]=Q,t[31]=W):W=t[31];let _;t[32]!==X||t[33]!==h||t[34]!==N||t[35]!==P||t[36]!==W?(_=s.jsxs(se.Header,{children:[J,s.jsx(se.Header.Right,{children:s.jsx(xt,{wellKnownRegistries:X,registries:N,value:h,onValueChange:P,onAddWellKnown:W,placeholder:"Select store..."})})]}),t[32]=X,t[33]=h,t[34]=N,t[35]=P,t[36]=W,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 U;t[47]!==B||t[48]!==M?(U=s.jsx(se.Content,{children:s.jsx($e,{fallback:B,children:M})}),t[47]=B,t[48]=M,t[49]=U):U=t[49];let K;return t[50]!==_||t[51]!==U?(K=s.jsxs(se,{children:[_,U]}),t[50]=_,t[51]=U,t[52]=K):K=t[52],K}function ht(t){return t.id}function jt(t){return t??""}export{ss as default};
|
|
1
|
+
import{c as Y,r as D,j as s,D as ce,B as te,e as ue,u as me,ad as xe,ae as pe,O as ge,f as Re,at as Te,bU as oe,K as Pe,z as ze,E as $e,au as ke}from"./index-NjMxPJgF.js";import{u as Le,P as se}from"./index-De1iYnQy.js";import{B as Ee,a as Oe,b as Fe,c as Ke}from"./breadcrumb-C2RG4nAQ.js";import{i as he}from"./FilterLines-Dvk7BhWf.js";import{n as je}from"./Inbox01-ClVaT7W5.js";import{i as le}from"./Loading01-Bb8FCosd.js";import{i as ye}from"./SearchMd-eZWeU0sP.js";import{u as Ae}from"./use-store-discovery-B402mTHd.js";import{u as _e,a as ve,b as Be}from"./use-connection-CHFdKnsr.js";import{s as Me}from"./slugify-CEUa2lfQ.js";import{f as De,i as Ge,u as Ue}from"./registry-utils-cjX9P5J9.js";import{C as Ve}from"./collection-search-BYV7N3mr.js";import{M as ae}from"./mcp-server-card-B3Nrrgyk.js";import{I as We}from"./input-B89sozd8.js";import{b as be,P as Ne,a as Ce}from"./popover-Br8QkMK3.js";import{i as Se}from"./Check-DW8AVFkq.js";import{t as we}from"./ChevronDown-BIRGQoZ5.js";import{s as re}from"./XClose-CcNXqPQc.js";import{s as He}from"./Plus-CajZ9VfC.js";import{E as qe}from"./empty-state-xIvMMy-_.js";import{u as Je}from"./useQuery-BYBCFxgb.js";import{W as Ye,a as Qe,u as Xe,e as Ze,b as et}from"./constants-D7qXOYRn.js";import"./useMutation-68NxhXCf.js";import"./tooltip-BJMSu0c2.js";import"./index-CqyqI90F.js";import"./ChevronRight-DsjLlugM.js";import"./useInfiniteQuery-BXDrDvlH.js";import"./infiniteQueryObserver-JZ0YxCW-.js";import"./use-collections-C0cYiFfV.js";import"./binder-D4cqx_Kx.js";import"./CheckVerified02-r17ymUCs.js";import"./Globe02-wRhoc1N5.js";import"./Lock01-CnZITIks.js";import"./Terminal-CGwuP-_5.js";import"./card-B8qDZGCZ.js";import"./integration-icon-BPVDVJvP.js";import"./Container-DHyMOW_p.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 k=Number.parseInt(p,10);r.current.scrollTop=k}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,k,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(We,{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",k=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]=k,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],k=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]!==k?(N=s.jsx("div",{className:p,children:k}),e[32]=p,e[33]=k,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 $;e[39]!==m||e[40]!==z||e[41]!==C||e[42]!==R||e[43]!==y||e[44]!==N?($=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]=$):$=e[45];let P;return e[46]!==x||e[47]!==$||e[48]!==L||e[49]!==v||e[50]!==b?(P=s.jsxs(x,{open:L,onOpenChange:v,children:[b,$]}),e[46]=x,e[47]=$,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 k=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 $;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],$=R.map(g),e[49]=R,e[50]=m,e[51]=$}else $=e[51];let P;e[54]!==k||e[55]!==c?(P=c&&s.jsxs(te,{variant:"ghost",size:"sm",onClick:k,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]=k,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]!==$?(j=s.jsxs("div",{className:y,children:[L,z,$,P]}),e[57]=P,e[58]=y,e[59]=L,e[60]=z,e[61]=$,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:k,hasMore:C,isLoadingMore:R,isInitialLoading:y,isFetching:L,error:v,loadMore:b,availableTags:N,availableCategories:z,selectedTags:$,selectedCategories:P,setSelectedTags:j,setSelectedCategories:S,hasActiveFilters:g}=Ae(p);let w;e[5]!==k||e[6]!==n?(w=n?ot(k,n):k,e[5]=k,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 V=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=Me(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 W=J;let _;e[27]!==O||e[28]!==n?(_=s.jsx(Ve,{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]!==$||e[34]!==S||e[35]!==j?(B=s.jsx(nt,{availableTags:N,availableCategories:z,selectedTags:$,selectedCategories:P,onTagChange:j,onCategoryChange:S}),e[30]=z,e[31]=N,e[32]=P,e[33]=$,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]!==V||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}),V.length>0&&s.jsx(ae,{items:V,title:"Verified",onItemClick:q}),ee.length>0&&s.jsx(ae,{items:ee,title:F.length>0||V.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]=V,e[48]=I.length,e[49]=G):G=e[49];let M;e[50]!==W||e[51]!==m||e[52]!==G?(M=s.jsx("div",{ref:m,className:"flex-1 overflow-y-auto",onScroll:W,children:G}),e[50]=W,e[51]=m,e[52]=G,e[53]=M):M=e[53];let U;return e[54]!==B||e[55]!==M||e[56]!==_?(U=s.jsxs("div",{className:"flex flex-col h-full",children:[_,B,M]}),e[54]=B,e[55]=M,e[56]=_,e[57]=U):U=e[57],U}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=_e(r),o=d?.tools;let n;e[0]!==o?(n=De(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=Ge(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,k,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],k=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]=k,e[9]=C,e[10]=R,e[11]=y}else m=e[4],x=e[5],i=e[6],p=e[7],k=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]!==k?(v=s.jsxs("button",{type:i,className:p,children:[k,L]}),e[16]=i,e[17]=p,e[18]=k,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(He,{size:16})})]},j.id??j.title))]}),e[31]=o,e[32]=n,e[33]=z):z=e[33];let $;e[34]!==N||e[35]!==z?($=s.jsxs(Ce,{align:"end",className:"w-auto min-w-[200px] p-1",children:[N,z]}),e[34]=N,e[35]=z,e[36]=$):$=e[36];let P;return e[37]!==x||e[38]!==b||e[39]!==$||e[40]!==R||e[41]!==y?(P=s.jsxs(x,{open:R,onOpenChange:y,children:[b,$]}),e[37]=x,e[38]=b,e[39]=$,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(qe,{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 ss(){const t=Y.c(53),{org:e,project:r}=me(),l=Be(),d=ve(),o=Te(),n=o.location.pathname.includes("/store/")&&o.location.pathname.split("/").length>3,a=Ue(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 k=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:k&&!!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[$,P]=Le(z,jt);let j;t[16]!==$?(j=u=>u.id===$,t[16]=$,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 V;t[25]!==d.create||t[26]!==P?(V=async u=>{const Z=await d.create.mutateAsync(u);P(Z.id)},t[25]=d.create,t[26]=P,t[27]=V):V=t[27];const Q=V,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(ke,{}),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(Ee,{children:s.jsx(Oe,{children:s.jsx(Fe,{children:s.jsx(Ke,{children:"Store"})})})})}),t[29]=J):J=t[29];let W;t[30]!==Q?(W=async u=>Q(u),t[30]=Q,t[31]=W):W=t[31];let _;t[32]!==X||t[33]!==h||t[34]!==N||t[35]!==P||t[36]!==W?(_=s.jsxs(se.Header,{children:[J,s.jsx(se.Header.Right,{children:s.jsx(xt,{wellKnownRegistries:X,registries:N,value:h,onValueChange:P,onAddWellKnown:W,placeholder:"Select store..."})})]}),t[32]=X,t[33]=h,t[34]=N,t[35]=P,t[36]=W,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 U;t[47]!==B||t[48]!==M?(U=s.jsx(se.Content,{children:s.jsx($e,{fallback:B,children:M})}),t[47]=B,t[48]=M,t[49]=U):U=t[49];let K;return t[50]!==_||t[51]!==U?(K=s.jsxs(se,{children:[_,U]}),t[50]=_,t[51]=U,t[52]=K):K=t[52],K}function ht(t){return t.id}function jt(t){return t??""}export{ss as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as g,c as b,j as s,D as L,E as Z,u as G,f as K,B as U}from"./index-DcxE8oe_.js";import{C as h}from"./task-status-DauQRqAW.js";import{E as J,C as Q}from"./editable-task-title-CaE6DIBf.js";import{a as X}from"./tasks-panel-DqbQRMGq.js";import{u as B,a as Y}from"./context-BTMVzdan.js";import{V as ee}from"./select-virtual-mcp-CFDIRCp8.js";import{I as O}from"./integration-icon-6jcHFHZV.js";import{P as te,a as se,b as ie}from"./popover-CNIkv0WT.js";import{S as H}from"./skeleton-CNgs5GJt.js";import{i as re,d as le}from"./constants-BCt7c81T.js";import{b as oe}from"./use-virtual-mcp-DfPJ-WDb.js";import{i as ne}from"./ChevronRight-Ys0vr-YD.js";import{t as F}from"./Users03-CQa5jfkV.js";import{P}from"./index-DZ6p-ZXx.js";import{R as A,a as T,b as ae}from"./resizable-B7fIdnoq.js";import"./spinner-BZdAS5i2.js";import"./tooltip-CXZH0tSC.js";import"./index-10S4l3se.js";import"./use-mcp-prompts-C4X4lEEg.js";import"./useQuery-CEE9SUlS.js";import"./dialog-BDa2Gsq9.js";import"./X-CaaFSPD_.js";import"./form-BWoxqZfk.js";import"./label-BtaiiWJ8.js";import"./input-DPpAbHbD.js";import"./index-CTjqFNkw.js";import"./usage-BW6ztpN6.js";import"./ArrowUp-BtIkmj4Y.js";import"./ChevronDown-DElgod-p.js";import"./Edit01-BaPedGGl.js";import"./Lock01-WwvDQaaT.js";import"./use-copy-sxHnzQ3E.js";import"./AlertCircle-CI8iQIN4.js";import"./select-DeNgR918.js";import"./ChevronUp-CKkWbsZ5.js";import"./Check-GOz4_bBS.js";import"./org-ai-providers-CrQ3OeB5.js";import"./useMutation-CV3IN68C.js";import"./EyeOff-CucokIoZ.js";import"./Eye-BgAytXDm.js";import"./Key01-BZkaWvm5.js";import"./Trash01-BtiNjuw3.js";import"./card-CwEWrOs9.js";import"./toggle-group-B7g3fYap.js";import"./avatar-DWAYNsNK.js";import"./ai-providers-logos-BWU0RfRJ.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./ArrowLeft-BaV7db3X.js";import"./tabs-BeYHPY-1.js";import"./badge-B_BTuJZe.js";import"./collapsible-DILfwVxb.js";import"./index-B5vgf28x.js";import"./Code01-CDxb4LVl.js";import"./checkbox-B_91sMwd.js";import"./AlignLeft-D1a9nQq5.js";import"./Image01-BwGUDEUi.js";import"./RefreshCcw01-DJsZi8Hz.js";import"./SearchMd-CKp0BoPW.js";import"./Settings01-DunsMQ-m.js";import"./Tool01-Delk_MGO.js";import"./use-mcp-resources-DoUnZI9j.js";import"./Copy01-DhAVspEC.js";import"./marked.esm-BaswSlok.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DgOOTmoQ.js";import"./types-CPj3Y6i2.js";import"./Globe02-4oAOo4_d.js";import"./LayersTwo01-D9dHuPjU.js";import"./XClose-Dey3r3af.js";import"./Clock-DRICOB0c.js";import"./use-collections-CObsJD7p.js";import"./useSuspenseInfiniteQuery-B7NkSjI9.js";import"./infiniteQueryObserver-CzIVu_kK.js";import"./CheckCircle-DosFvCW2.js";import"./Loading01-B85tVuIU.js";import"./ChevronLeft-Bk7mc5_w.js";import"./collection-search-Bdxpglbf.js";import"./user-_Hc5WOWn.js";import"./format-time-CMKyl-GC.js";import"./Plus-C9dY5EOr.js";import"./empty-state-C4c2sKjV.js";import"./dropdown-menu-DEQ5DCnG.js";import"./decopilot-events-Brt4gAR6.js";import"./index-Bc448aeG.js";import"./use-create-virtual-mcp-dSjfTRl8.js";import"./Container-C8ScaknS.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 D=({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"}));D.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=q=>q.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(D,{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 ts(){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{ts as default};
|
|
1
|
+
import{r as g,c as b,j as s,D as L,E as Z,u as G,f as K,B as U}from"./index-NjMxPJgF.js";import{C as h}from"./task-status-DYx9R7EL.js";import{E as J,C as Q}from"./editable-task-title-Cm-uIwFs.js";import{a as X}from"./tasks-panel-BJ3TfA-_.js";import{u as B,a as Y}from"./context-DxQMlFKC.js";import{V as ee}from"./select-virtual-mcp-BS537pmy.js";import{I as O}from"./integration-icon-BPVDVJvP.js";import{P as te,a as se,b as ie}from"./popover-Br8QkMK3.js";import{S as H}from"./skeleton-Cjm8s7CT.js";import{i as re,d as le}from"./constants-D7qXOYRn.js";import{b as oe}from"./use-virtual-mcp-BP6aaUzw.js";import{i as ne}from"./ChevronRight-DsjLlugM.js";import{t as F}from"./Users03-Bv-hUQkl.js";import{P}from"./index-De1iYnQy.js";import{R as A,a as T,b as ae}from"./resizable-Nu1SqaJD.js";import"./spinner-Dzx7B3Jl.js";import"./tooltip-BJMSu0c2.js";import"./index-CqyqI90F.js";import"./use-mcp-prompts-Bel4H4rh.js";import"./useQuery-BYBCFxgb.js";import"./dialog-ChXYvlDt.js";import"./X-LzehymHS.js";import"./form-CaFPTMVC.js";import"./label-DkiEYJcU.js";import"./input-B89sozd8.js";import"./index-YRudAQp7.js";import"./usage-BW6ztpN6.js";import"./ArrowUp-DoIG5eQh.js";import"./ChevronDown-BIRGQoZ5.js";import"./Edit01-CoeKfJ-u.js";import"./Lock01-CnZITIks.js";import"./use-copy-xhdji_Bl.js";import"./AlertCircle-12chRuly.js";import"./select-Dx3T3-4n.js";import"./ChevronUp-Bi3NMXzv.js";import"./Check-DW8AVFkq.js";import"./org-ai-providers-DaYyItUL.js";import"./useMutation-68NxhXCf.js";import"./EyeOff-CJoTkAtN.js";import"./Eye-hBqNQHpc.js";import"./Key01-qNySmY39.js";import"./Trash01-B_4PTwjI.js";import"./card-B8qDZGCZ.js";import"./toggle-group-DlZGDyPQ.js";import"./avatar-B2yArl-q.js";import"./ai-providers-logos-CCp39UCk.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./ArrowLeft-erI8s3G2.js";import"./tabs-BSOe8gLq.js";import"./badge-DtRom7JO.js";import"./collapsible-BtjeaBAE.js";import"./index-yiVP4brl.js";import"./Code01-YGq5QwlZ.js";import"./checkbox-B1rexahu.js";import"./AlignLeft-_LT9deOt.js";import"./Image01-DjoSkYp_.js";import"./RefreshCcw01-B_NTitRE.js";import"./SearchMd-eZWeU0sP.js";import"./Settings01-ClPVpLPy.js";import"./Tool01-D1m8i7Ez.js";import"./use-mcp-resources-qGdymfRz.js";import"./Copy01-DkcjIGiS.js";import"./marked.esm-BaswSlok.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-By1mQEU9.js";import"./types-BHeMLyAV.js";import"./Globe02-wRhoc1N5.js";import"./LayersTwo01-dfSlQT0y.js";import"./XClose-CcNXqPQc.js";import"./Clock-D4xJnA3P.js";import"./use-collections-C0cYiFfV.js";import"./useSuspenseInfiniteQuery-X3jXt04i.js";import"./infiniteQueryObserver-JZ0YxCW-.js";import"./CheckCircle-hBpanOsI.js";import"./Loading01-Bb8FCosd.js";import"./ChevronLeft-D-e7F7Gj.js";import"./collection-search-BYV7N3mr.js";import"./user-iDZRuimU.js";import"./format-time-CMKyl-GC.js";import"./Plus-CajZ9VfC.js";import"./empty-state-xIvMMy-_.js";import"./dropdown-menu-BxlQMXgW.js";import"./decopilot-events-Brt4gAR6.js";import"./index-YL7q5tyF.js";import"./use-create-virtual-mcp-B7odZ_c3.js";import"./Container-DHyMOW_p.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 D=({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"}));D.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=q=>q.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(D,{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 ts(){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{ts as default};
|
package/dist/client/assets/{plugin-empty-state-DXhpvNlI.js → plugin-empty-state-K02oXRNN.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,j as t}from"./index-
|
|
1
|
+
import{c as s,j as t}from"./index-NjMxPJgF.js";import{e as r}from"./Dataflow03-CD3eo8oO.js";function a(){const o=s.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(r,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),o[0]=e):e=o[0],e}export{a as default};
|
package/dist/client/assets/{plugin-empty-state-CWxRJkeE.js → plugin-empty-state-l30u7dec.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,j as t,as as n}from"./index-
|
|
1
|
+
import{c as a,j as t,as as n}from"./index-NjMxPJgF.js";function c(){const s=a.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(n,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No storage connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an S3-compatible storage service to browse and manage files."})]}),s[0]=e):e=s[0],e}export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,j as s,r as w}from"./index-
|
|
1
|
+
import{c as S,j as s,r as w}from"./index-NjMxPJgF.js";import{i as R}from"./Check-DW8AVFkq.js";import{t as _}from"./ChevronDown-BIRGQoZ5.js";import{e as y}from"./Dataflow03-CD3eo8oO.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:r,onConnectionChange:N}=x,[n,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==r){let t;e[3]!==r?(t=u=>u.id===r,e[3]=r,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=r,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==n?(o=()=>z(!n),e[13]=n,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==n||e[26]!==N||e[27]!==r?(m=n&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===r&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=n,e[26]=N,e[27]=r,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function H(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{H as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as w,j as s,r as S,as as y}from"./index-
|
|
1
|
+
import{c as w,j as s,r as S,as as y}from"./index-NjMxPJgF.js";import{i as _}from"./Check-DW8AVFkq.js";import{t as k}from"./ChevronDown-BIRGQoZ5.js";function E(x){const e=w.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=S.useState(!1),C=S.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const R=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Storage";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let a;e[15]!==i?(a=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=a):a=e[16];const v=i?.title||"Select storage";let c;e[17]!==v?(c=s.jsx("span",{children:v}),e[17]=v,e[18]=c):c=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(k,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==a||e[22]!==c?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[a,c,b]}),e[20]=o,e[21]=a,e[22]=c,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(_,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:R,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function O(x){const e=w.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{O as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as r,j as i}from"./index-NjMxPJgF.js";import{P as m}from"./project-plugins-BHOZZsH7.js";import"./useQuery-BYBCFxgb.js";import"./useMutation-68NxhXCf.js";import"./constants-D7qXOYRn.js";import"./switch-CA_oYDia.js";import"./label-DkiEYJcU.js";import"./Container-DHyMOW_p.js";import"./use-connection-CHFdKnsr.js";import"./use-collections-C0cYiFfV.js";import"./registry-utils-cjX9P5J9.js";import"./binder-D4cqx_Kx.js";import"./use-install-from-registry-BzwuBLOx.js";import"./extract-connection-data-48N591A_.js";import"./generate-id-BiV6m8fS.js";import"./Loading01-Bb8FCosd.js";import"./Plus-CajZ9VfC.js";import"./select-Dx3T3-4n.js";import"./ChevronUp-Bi3NMXzv.js";import"./index-CqyqI90F.js";import"./Check-DW8AVFkq.js";import"./ChevronDown-BIRGQoZ5.js";function k(){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{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,a2 as $,j as c,b0 as L,af as z,a5 as b,a4 as A,a7 as g,a_ as _,a9 as j,a$ as G,b1 as w,b6 as H,b7 as K,aa as U,b8 as V,b9 as W,ba as Z,b2 as q,b3 as B,b5 as J,c as R,D as Q}from"./index-
|
|
1
|
+
import{r as i,a2 as $,j as c,b0 as L,af as z,a5 as b,a4 as A,a7 as g,a_ as _,a9 as j,a$ as G,b1 as w,b6 as H,b7 as K,aa as U,b8 as V,b9 as W,ba as Z,b2 as q,b3 as B,b5 as J,c as R,D as Q}from"./index-NjMxPJgF.js";var C="Popover",[E]=U(C,[w]),P=w(),[X,d]=E(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[u,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(X,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(_,{...s,...r,ref:e})});Y.displayName=F;var S="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(S,o),s=P(o),a=b(e,n.triggerRef),p=c.jsx(A.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(_,{asChild:!0,...s,children:p})});y.displayName=S;var O="PopoverPortal",[ee,oe]=E(O,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=d(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=O;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=d(v,t.__scopePopover);return c.jsx(j,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=V("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(null),n=b(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,u=p.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:h,...x}=t,f=d(v,o),m=P(o);return W(),c.jsx(Z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(q,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(B,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(k,o);return c.jsx(A.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,ue=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let u;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(u=c.jsx(le,{children:c.jsx(ue,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=u):u=e[11],u}export{ve as P,ge as a,fe as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as P,g as A,j as r,E as y,r as R,u as T}from"./index-
|
|
1
|
+
import{c as P,g as A,j as r,E as y,r as R,u as T}from"./index-NjMxPJgF.js";import{u as S}from"./use-connection-CHFdKnsr.js";import{u as U}from"./constants-D7qXOYRn.js";import{u as v}from"./use-mcp-tools-BCZI_Wqc.js";import{c as E}from"./content-blocks-o63cs2vh.js";import{M as H}from"./mcp-app-renderer-By1mQEU9.js";import{g as O,M as $}from"./types-BHeMLyAV.js";import{u as D}from"./context-DxQMlFKC.js";import{P as _,a as k}from"./index-De1iYnQy.js";import"./use-collections-C0cYiFfV.js";import"./useMutation-68NxhXCf.js";import"./useQuery-BYBCFxgb.js";import"./use-mcp-resources-qGdymfRz.js";import"./decopilot-events-Brt4gAR6.js";import"./index-YL7q5tyF.js";import"./tooltip-BJMSu0c2.js";import"./index-CqyqI90F.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as A,c as w,f as Q,j as s,D as H,v as K,o as ne,n as E,e as J,u as W,w as ie,t as re,q as ae,K as Y,B as F,O as I,P as ee,S as V,g as ce,au as me}from"./index-DcxE8oe_.js";import{u as te}from"./use-project-B-9YXhNP.js";import{c as de,a as fe,D as ue}from"./dialog-BDa2Gsq9.js";import{i as pe}from"./X-CaaFSPD_.js";import{S as M}from"./skeleton-CNgs5GJt.js";import{i as xe,u as he,a as ge,O as je}from"./org-ai-providers-CrQ3OeB5.js";import{A as se}from"./avatar-DWAYNsNK.js";import{t as be}from"./Building02-R_mkgdQ4.js";import{t as ye}from"./Settings01-DunsMQ-m.js";import{t as ve}from"./Users03-CQa5jfkV.js";import{i as Se}from"./Zap-DX02pf-a.js";import{a as Ne,b as _e,c as ke,T as Ce}from"./tooltip-CXZH0tSC.js";import{i as we}from"./Check-GOz4_bBS.js";import{a as ze}from"./Copy01-DhAVspEC.js";import{S as D}from"./switch-CmREXk8C.js";import{S as Pe,a as Ae,d as T,c as $e}from"./select-DeNgR918.js";import{i as Ie}from"./Code01-CDxb4LVl.js";import{s as Oe}from"./RefreshCcw01-DJsZi8Hz.js";import{i as Me}from"./Shield01-CCMtDdxH.js";import"./index-Bc448aeG.js";import{u as Le}from"./useMutation-CV3IN68C.js";import{a as Fe,F as q,b as U,c as R,d as G,f as B,e as Ee}from"./form-BWoxqZfk.js";import{I as Z}from"./input-DPpAbHbD.js";import{L as De}from"./logo-upload-79T6Ecg3.js";import{P as Te}from"./project-plugins-az_ZXSwN.js";import qe from"./members-BkdG_-Nh.js";import"./useQuery-CEE9SUlS.js";import"./constants-BCt7c81T.js";import"./index-DZ6p-ZXx.js";import"./AlertCircle-CI8iQIN4.js";import"./EyeOff-CucokIoZ.js";import"./Eye-BgAytXDm.js";import"./Key01-BZkaWvm5.js";import"./Trash01-BtiNjuw3.js";import"./card-CwEWrOs9.js";import"./toggle-group-B7g3fYap.js";import"./popover-CNIkv0WT.js";import"./ai-providers-logos-BWU0RfRJ.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./index-10S4l3se.js";import"./ChevronUp-CKkWbsZ5.js";import"./ChevronDown-DElgod-p.js";import"./label-BtaiiWJ8.js";import"./Upload01-DqqcM3M6.js";import"./Container-C8ScaknS.js";import"./use-connection-Cv_-e2MS.js";import"./use-collections-CObsJD7p.js";import"./registry-utils-CkCRcmq4.js";import"./binder-l1kCmNCE.js";import"./use-install-from-registry-wW1d1HtB.js";import"./extract-connection-data-BxJWN5u-.js";import"./generate-id-BaIFvm62.js";import"./Loading01-B85tVuIU.js";import"./Plus-C9dY5EOr.js";import"./collection-display-button-kCOiEzLn.js";import"./dropdown-menu-DEQ5DCnG.js";import"./ChevronRight-Ys0vr-YD.js";import"./ArrowDown-bcBjuFxH.js";import"./ArrowUp-BtIkmj4Y.js";import"./Grid01-NwJJaoW7.js";import"./List-DD3BKPLz.js";import"./badge-B_BTuJZe.js";import"./collection-search-Bdxpglbf.js";import"./SearchMd-CKp0BoPW.js";import"./breadcrumb-ijphtzQp.js";import"./collection-table-wrapper-D-vPJPam.js";import"./table-C4WVepD4.js";import"./integration-icon-6jcHFHZV.js";import"./checkbox-B_91sMwd.js";import"./ArrowLeft-BaV7db3X.js";import"./use-members-BHa-Fb-h.js";import"./alert-dialog-BGZzdkI2.js";import"./DotsHorizontal-BaiN7u8r.js";import"./Lock01-WwvDQaaT.js";import"./empty-state-C4c2sKjV.js";import"./textarea-C7YqhWTc.js";import"./DotsVertical-rvqtR29a.js";import"./XClose-Dey3r3af.js";import"./command-BgTh2_vK.js";import"./index-CM7_8eMu.js";const oe=({size:e=24,color:t="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"M9.354 21c.705.622 1.632 1 2.646 1s1.94-.378 2.646-1M18 8A6 6 0 1 0 6 8c0 3.09-.78 5.206-1.65 6.605-.735 1.18-1.102 1.771-1.089 1.936.015.182.054.252.2.36.133.099.732.099 1.928.099H18.61c1.196 0 1.795 0 1.927-.098.147-.11.186-.179.2-.361.014-.165-.353-.755-1.088-1.936C18.78 13.206 18 11.09 18 8Z"}));oe.displayName="Bell01";function Ue(e){const t=w.c(26),{activeSection:n,onNavigate:o}=e,{data:a}=Q.useSession(),i=a?.user,l=i?.image,m=i?.name??"Profile",c=i?.name??"U";let f;t[0]!==c||t[1]!==l?(f=s.jsx(se,{url:l,fallback:c,shape:"circle",size:"2xs",className:"size-4 shrink-0"}),t[0]=c,t[1]=l,t[2]=f):f=t[2];let r;t[3]!==m||t[4]!==f?(r={key:"account.profile",label:m,icon:f},t[3]=m,t[4]=f,t[5]=r):r=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u={key:"account.preferences",label:"Preferences",icon:s.jsx(ye,{size:14})},t[6]=u):u=t[6];let p;t[7]!==r?(p=[r,u],t[7]=r,t[8]=p):p=t[8];const h=p;let x;t[9]===Symbol.for("react.memo_cache_sentinel")?(x={key:"org.general",label:"General",icon:s.jsx(be,{size:14})},t[9]=x):x=t[9];let d;t[10]===Symbol.for("react.memo_cache_sentinel")?(d={key:"org.plugins",label:"Features",icon:s.jsx(Se,{size:14})},t[10]=d):d=t[10];let g;t[11]===Symbol.for("react.memo_cache_sentinel")?(g={key:"org.ai-providers",label:"AI Providers",icon:s.jsx(xe,{size:14})},t[11]=g):g=t[11];let j;t[12]===Symbol.for("react.memo_cache_sentinel")?(j=[x,d,g,{key:"org.members",label:"Members",icon:s.jsx(ve,{size:14})}],t[12]=j):j=t[12];const _=j;let y;t[13]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Account"}),t[13]=y):y=t[13];let b;t[14]!==h||t[15]!==n||t[16]!==o?(b=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[y,h.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:H("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[14]=h,t[15]=n,t[16]=o,t[17]=b):b=t[17];let N;t[18]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Organization"}),t[18]=N):N=t[18];let S;t[19]!==n||t[20]!==o?(S=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[N,_.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:H("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[19]=n,t[20]=o,t[21]=S):S=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.178.1"]})}),t[22]=C):C=t[22];let k;return t[23]!==b||t[24]!==S?(k=s.jsxs("div",{className:"w-52 shrink-0 border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-4",children:[b,S,C]}),t[23]=b,t[24]=S,t[25]=k):k=t[25],k}function Re(){const e=w.c(32),{data:t}=Q.useSession(),[n,o]=A.useState(!1),a=t?.user,i=a?.image;let l;e[0]!==a?(l=()=>{a?.id&&navigator.clipboard.writeText(a.id).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},e[0]=a,e[1]=l):l=e[1];const m=l;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Profile"})}),e[2]=c):c=e[2];const f=a?.name??"U";let r;e[3]!==f||e[4]!==i?(r=s.jsx(se,{url:i,fallback:f,shape:"circle",size:"xl",className:"size-16 shrink-0"}),e[3]=f,e[4]=i,e[5]=r):r=e[5];const u=a?.name??"User";let p;e[6]!==u?(p=s.jsx("span",{className:"text-sm font-semibold text-foreground truncate",children:u}),e[6]=u,e[7]=p):p=e[7];const h=a?.email;let x;e[8]!==h?(x=s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:h}),e[8]=h,e[9]=x):x=e[9];let d;e[10]!==p||e[11]!==x?(d=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[p,x]}),e[10]=p,e[11]=x,e[12]=d):d=e[12];let g;e[13]!==r||e[14]!==d?(g=s.jsxs("div",{className:"flex items-center gap-4",children:[r,d]}),e[13]=r,e[14]=d,e[15]=g):g=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"User ID"}),e[16]=j):j=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("p",{className:"text-sm text-muted-foreground",children:"User ID"}),e[17]=_):_=e[17];const y=a?.id;let b;e[18]!==y?(b=s.jsx("span",{className:"font-mono text-sm",children:y}),e[18]=y,e[19]=b):b=e[19];let N;e[20]!==n?(N=n?s.jsx(we,{size:14,className:"text-green-600 shrink-0"}):s.jsx(ze,{size:14,className:"shrink-0 opacity-70 group-hover:opacity-100 transition-opacity"}),e[20]=n,e[21]=N):N=e[21];let S;e[22]!==m||e[23]!==b||e[24]!==N?(S=s.jsx(Ne,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:m,className:"group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[b,N]})}),e[22]=m,e[23]=b,e[24]=N,e[25]=S):S=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(_e,{side:"left",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[26]=C):C=e[26];let k;e[27]!==S?(k=s.jsxs("div",{className:"flex flex-col",children:[j,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[_,s.jsx(ke,{children:s.jsxs(Ce,{children:[S,C]})})]})]}),e[27]=S,e[28]=k):k=e[28];let v;return e[29]!==k||e[30]!==g?(v=s.jsxs("div",{className:"flex flex-col gap-8",children:[c,g,k]}),e[29]=k,e[30]=g,e[31]=v):v=e[31],v}function L(e){const t=w.c(27),{icon:n,label:o,description:a,control:i,onClick:l,disabled:m}=e,c=m?void 0:l,f=l?"button":void 0,r=l&&!m?0:void 0;let u;t[0]!==m||t[1]!==l?(u=l&&!m?N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),l())}:void 0,t[0]=m,t[1]=l,t[2]=u):u=t[2];const p=l&&!m?"pointer":void 0;let h;t[3]!==p?(h={cursor:p},t[3]=p,t[4]=h):h=t[4];let x;t[5]!==n?(x=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),t[5]=n,t[6]=x):x=t[6];let d;t[7]!==o?(d=s.jsx("p",{className:"text-sm font-medium text-foreground",children:o}),t[7]=o,t[8]=d):d=t[8];let g;t[9]!==a?(g=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:a}),t[9]=a,t[10]=g):g=t[10];let j;t[11]!==d||t[12]!==g?(j=s.jsxs("div",{className:"min-w-0",children:[d,g]}),t[11]=d,t[12]=g,t[13]=j):j=t[13];let _;t[14]!==j||t[15]!==x?(_=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[x,j]}),t[14]=j,t[15]=x,t[16]=_):_=t[16];let y;t[17]!==i?(y=s.jsx("div",{onClick:Ge,className:"shrink-0",children:i}),t[17]=i,t[18]=y):y=t[18];let b;return t[19]!==c||t[20]!==_||t[21]!==y||t[22]!==f||t[23]!==r||t[24]!==u||t[25]!==h?(b=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0",onClick:c,role:f,tabIndex:r,onKeyDown:u,style:h,children:[_,y]}),t[19]=c,t[20]=_,t[21]=y,t[22]=f,t[23]=r,t[24]=u,t[25]=h,t[26]=b):b=t[26],b}function Ge(e){return e.stopPropagation()}function X(){const e=w.c(47),[t,n]=he();let o;e[0]!==n?(o=async z=>{if(z&&await Notification.requestPermission()!=="granted"){K.error("Notifications denied. Please enable them in your browser settings."),n(Ve);return}n(P=>({...P,enableNotifications:z}))},e[0]=n,e[1]=o):o=e[1];const a=o;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Preferences"})}),e[2]=i):i=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ie,{size:16}),e[3]=l):l=e[3];let m;e[4]!==n?(m=()=>n(Ke),e[4]=n,e[5]=m):m=e[5];let c;e[6]!==n?(c=z=>n(P=>({...P,devMode:z})),e[6]=n,e[7]=c):c=e[7];let f;e[8]!==t.devMode||e[9]!==c?(f=s.jsx(D,{checked:t.devMode,onCheckedChange:c}),e[8]=t.devMode,e[9]=c,e[10]=f):f=e[10];let r;e[11]!==m||e[12]!==f?(r=s.jsx(L,{icon:l,label:"Developer Mode",description:"Show technical details like JSON input/output for tool calls.",onClick:m,control:f}),e[11]=m,e[12]=f,e[13]=r):r=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(oe,{size:16}),e[14]=u):u=e[14];let p;e[15]!==a||e[16]!==t.enableNotifications?(p=s.jsx(L,{icon:u,label:"Notifications",description:"Play a sound and show a notification when chat messages complete while the app is unfocused.",disabled:typeof Notification>"u",onClick:()=>a(!t.enableNotifications),control:s.jsx(D,{disabled:typeof Notification>"u",checked:t.enableNotifications,onCheckedChange:a})}),e[15]=a,e[16]=t.enableNotifications,e[17]=p):p=e[17];let h;e[18]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Oe,{size:16}),e[18]=h):h=e[18];let x;e[19]!==n?(x=()=>n(Be),e[19]=n,e[20]=x):x=e[20];let d;e[21]!==n?(d=z=>n(P=>({...P,experimentalAutomations:z})),e[21]=n,e[22]=d):d=e[22];let g;e[23]!==t.experimentalAutomations||e[24]!==d?(g=s.jsx(D,{checked:t.experimentalAutomations,onCheckedChange:d}),e[23]=t.experimentalAutomations,e[24]=d,e[25]=g):g=e[25];let j;e[26]!==x||e[27]!==g?(j=s.jsx(L,{icon:h,label:"Experimental: Automations",description:"Enable the Automations feature in the sidebar. This is an experimental feature under active development.",onClick:x,control:g}),e[26]=x,e[27]=g,e[28]=j):j=e[28];let _;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Me,{size:16}),e[29]=_):_=e[29];let y;e[30]!==n?(y=z=>n(P=>({...P,toolApprovalLevel:z})),e[30]=n,e[31]=y):y=e[31];let b;e[32]===Symbol.for("react.memo_cache_sentinel")?(b={none:"Always ask",readonly:"Skip read-only",yolo:"Auto-approve all"},e[32]=b):b=e[32];const N=b[t.toolApprovalLevel];let S;e[33]!==N?(S=s.jsx(Ae,{className:"w-36",children:s.jsx("span",{children:N})}),e[33]=N,e[34]=S):S=e[34];let C;e[35]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(T,{value:"none",textValue:"Always ask",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Always ask"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Require approval for all tool calls"})]})}),e[35]=C):C=e[35];let k;e[36]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(T,{value:"readonly",textValue:"Skip read-only",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Skip read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[36]=k):k=e[36];let v;e[37]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs($e,{children:[C,k,s.jsx(T,{value:"yolo",textValue:"Auto-approve all",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Auto-approve all"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})})]}),e[37]=v):v=e[37];let $;e[38]!==t.toolApprovalLevel||e[39]!==y||e[40]!==S?($=s.jsx(L,{icon:_,label:"Tool Approval",description:"Choose when to require approval before tools execute.",control:s.jsxs(Pe,{value:t.toolApprovalLevel,onValueChange:y,children:[S,v]})}),e[38]=t.toolApprovalLevel,e[39]=y,e[40]=S,e[41]=$):$=e[41];let O;return e[42]!==j||e[43]!==$||e[44]!==r||e[45]!==p?(O=s.jsxs("div",{className:"flex flex-col gap-6",children:[i,s.jsxs("div",{className:"flex flex-col",children:[r,p,j,$]})]}),e[42]=j,e[43]=$,e[44]=r,e[45]=p,e[46]=O):O=e[46],O}function Be(e){return{...e,experimentalAutomations:!e.experimentalAutomations}}function Ke(e){return{...e,devMode:!e.devMode}}function Ve(e){return{...e,enableNotifications:!1}}const Qe=ne({name:E().min(1,"Name is required").max(255,"Name is too long"),slug:E().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:E().optional()});function Je(){const e=J(),{org:t,project:n}=W(),o=ie(),[a,i]=A.useState(!1),l=re({resolver:ae(Qe),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),m=Le({mutationFn:async r=>{const u={name:r.name,slug:r.slug};r.logo&&(u.logo=r.logo);const p=await Q.organization.update({organizationId:t.id,data:u});if(p?.error)throw new Error(p.error.message||"Failed to update organization");return p},onSuccess:r=>{o.invalidateQueries({queryKey:Y.organizations()}),o.invalidateQueries({queryKey:Y.activeOrganization(t.slug)}),K.success("Organization settings updated successfully"),r?.data?.slug&&r.data.slug!==t.slug&&e({to:"/$org/$project/settings",params:{org:r.data.slug,project:n.slug}})},onError:r=>{K.error(r instanceof Error?r.message:"Failed to update organization")},onSettled:()=>{i(!1)}}),c=r=>{i(!0),m.mutate(r)},f=l.formState.isDirty;return s.jsx(Fe,{...l,children:s.jsxs("form",{onSubmit:l.handleSubmit(c),className:"space-y-6",children:[s.jsx(q,{control:l.control,name:"name",render:({field:r})=>s.jsxs(U,{children:[s.jsx(R,{children:"Organization Name"}),s.jsx(G,{children:s.jsx(Z,{placeholder:"My Organization",...r,disabled:a})}),s.jsx(B,{})]})}),s.jsx(q,{control:l.control,name:"slug",render:({field:r})=>s.jsxs(U,{children:[s.jsx(R,{children:"Organization Slug"}),s.jsx(G,{children:s.jsx(Z,{placeholder:"my-organization",...r,disabled:a,onChange:u=>{const p=u.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");r.onChange(p)}})}),s.jsx(Ee,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(B,{})]})}),s.jsx(q,{control:l.control,name:"logo",render:({field:r})=>s.jsxs(U,{children:[s.jsx(R,{children:"Logo"}),s.jsx(G,{children:s.jsx(De,{value:r.value,onChange:r.onChange,name:l.watch("name"),disabled:a})}),s.jsx(B,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(F,{type:"submit",disabled:!f||a,className:"min-w-24",children:a?"Saving...":"Save Changes"}),f&&s.jsx(F,{type:"button",variant:"outline",onClick:()=>l.reset(),disabled:a,children:"Cancel"})]})]})})}function We(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Organization"})}),s.jsx(Je,{})]}),e[0]=t):t=e[0],t}function He(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(qe,{}),e[0]=t):t=e[0],t}function le(){const e=w.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(M,{className:"h-6 w-48"}),n=s.jsx(M,{className:"h-4 w-80"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[t,n,s.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[s.jsx(M,{className:"h-12 w-full"}),s.jsx(M,{className:"h-12 w-full"})]})]}),e[2]=o):o=e[2],o}function Ye(e){const t=w.c(14),{projectSlug:n,children:o}=e,{org:a}=W(),{data:i,isLoading:l}=te(a.id,n);if(l||!i){let u;return t[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(le,{}),t[0]=u):u=t[0],u}const m=n===I;let c;t[1]!==i.description||t[2]!==i.enabledPlugins||t[3]!==i.id||t[4]!==i.name||t[5]!==i.organizationId||t[6]!==i.slug||t[7]!==i.ui||t[8]!==m?(c={id:i.id,organizationId:i.organizationId,slug:i.slug,name:i.name,description:i.description,enabledPlugins:i.enabledPlugins,ui:i.ui,isOrgAdmin:m},t[1]=i.description,t[2]=i.enabledPlugins,t[3]=i.id,t[4]=i.name,t[5]=i.organizationId,t[6]=i.slug,t[7]=i.ui,t[8]=m,t[9]=c):c=t[9];const f=c;let r;return t[10]!==o||t[11]!==f||t[12]!==a?(r=s.jsx(ee,{org:a,project:f,children:o}),t[10]=o,t[11]=f,t[12]=a,t[13]=r):r=t[13],r}function Ze(e){const t=w.c(7),{section:n}=e;switch(n){case"account.profile":{let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Re,{}),t[0]=o):o=t[0],o}case"account.preferences":{let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(X,{}),t[1]=o):o=t[1],o}case"org.general":{let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(We,{}),t[2]=o):o=t[2],o}case"org.plugins":{let o;return t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Ye,{projectSlug:I,children:s.jsx(Te,{})}),t[3]=o):o=t[3],o}case"org.ai-providers":{let o;return t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(je,{}),t[4]=o):o=t[4],o}case"org.members":{let o;return t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(He,{}),t[5]=o):o=t[5],o}default:{let o;return t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(X,{}),t[6]=o):o=t[6],o}}}function Xe(){const e=w.c(24),{isOpen:t,activeSection:n,open:o,close:a}=ge();let i;e[0]!==a?(i=j=>!j&&a(),e[0]=a,e[1]=i):i=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(de,{className:"sr-only",children:"Settings"}),e[2]=l):l=e[2];let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"w-52 shrink-0 border-r border-border"}),e[3]=m):m=e[3];let c;e[4]!==n||e[5]!==o?(c=s.jsx(A.Suspense,{fallback:m,children:s.jsx(Ue,{activeSection:n,onNavigate:o})}),e[4]=n,e[5]=o,e[6]=c):c=e[6];let f,r;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(pe,{size:16}),r=s.jsx("span",{className:"sr-only",children:"Close"}),e[7]=f,e[8]=r):(f=e[7],r=e[8]);let u;e[9]!==a?(u=s.jsxs("button",{type:"button",onClick:a,className:"absolute top-4 right-4 z-10 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-ring",children:[f,r]}),e[9]=a,e[10]=u):u=e[10];let p;e[11]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(le,{}),e[11]=p):p=e[11];let h;e[12]!==n?(h=s.jsx("div",{className:"p-8",children:s.jsx(A.Suspense,{fallback:p,children:s.jsx(Ze,{section:n})})}),e[12]=n,e[13]=h):h=e[13];let x;e[14]!==u||e[15]!==h?(x=s.jsxs("div",{className:"flex-1 min-w-0 overflow-y-auto relative flex flex-col overflow-hidden",children:[u,h]}),e[14]=u,e[15]=h,e[16]=x):x=e[16];let d;e[17]!==c||e[18]!==x?(d=s.jsxs(fe,{className:"sm:max-w-[1100px] h-[85vh] p-0 overflow-hidden flex flex-col gap-0",closeButtonClassName:"hidden",children:[l,s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[c,x]})]}),e[17]=c,e[18]=x,e[19]=d):d=e[19];let g;return e[20]!==t||e[21]!==i||e[22]!==d?(g=s.jsx(ue,{open:t,onOpenChange:i,children:d}),e[20]=t,e[21]=i,e[22]=d,e[23]=g):g=e[23],g}function et(e){const t=w.c(12),{projectSlug:n,orgSlug:o,error:a}=e,i=J();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("h1",{className:"text-xl font-semibold",children:"Failed to load project"}),t[0]=l):l=t[0];let m;t[1]!==n?(m=s.jsxs("p",{className:"text-muted-foreground text-center",children:['There was an error loading the project "',n,'".']}),t[1]=n,t[2]=m):m=t[2];let c;t[3]!==a.message?(c=s.jsx("p",{className:"text-sm text-muted-foreground",children:a.message}),t[3]=a.message,t[4]=c):c=t[4];let f;t[5]!==i||t[6]!==o?(f=s.jsx(F,{variant:"link",onClick:()=>i({to:"/$org/$project",params:{org:o,project:I}}),children:"Go to organization home"}),t[5]=i,t[6]=o,t[7]=f):f=t[7];let r;return t[8]!==m||t[9]!==c||t[10]!==f?(r=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[l,m,c,f]}),t[8]=m,t[9]=c,t[10]=f,t[11]=r):r=t[11],r}function tt(e){const t=w.c(9),{projectSlug:n,orgSlug:o}=e,a=J();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("h1",{className:"text-xl font-semibold",children:"Project not found"}),t[0]=i):i=t[0];let l;t[1]!==n?(l=s.jsxs("p",{className:"text-muted-foreground text-center",children:['The project "',n,'" does not exist in this organization.']}),t[1]=n,t[2]=l):l=t[2];let m;t[3]!==a||t[4]!==o?(m=s.jsx(F,{variant:"link",onClick:()=>a({to:"/$org/$project",params:{org:o,project:I}}),children:"Go to organization home"}),t[3]=a,t[4]=o,t[5]=m):m=t[5];let c;return t[6]!==l||t[7]!==m?(c=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[i,l,m]}),t[6]=l,t[7]=m,t[8]=c):c=t[8],c}function st(){const e=w.c(23);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=ce(t),{org:o}=W(),a=n.org,i=n.project,{data:l,isLoading:m,error:c}=te(o.id,i);if(m){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(V,{}),e[1]=d):d=e[1],d}if(c){let d;return e[2]!==c||e[3]!==a||e[4]!==i?(d=s.jsx(et,{projectSlug:i,orgSlug:a,error:c}),e[2]=c,e[3]=a,e[4]=i,e[5]=d):d=e[5],d}if(!l){let d;return e[6]!==a||e[7]!==i?(d=s.jsx(tt,{projectSlug:i,orgSlug:a}),e[6]=a,e[7]=i,e[8]=d):d=e[8],d}const f=l.slug===I;let r;e[9]!==l.description||e[10]!==l.enabledPlugins||e[11]!==l.id||e[12]!==l.name||e[13]!==l.organizationId||e[14]!==l.slug||e[15]!==l.ui||e[16]!==f?(r={id:l.id,organizationId:l.organizationId,slug:l.slug,name:l.name,description:l.description,enabledPlugins:l.enabledPlugins,ui:l.ui,isOrgAdmin:f},e[9]=l.description,e[10]=l.enabledPlugins,e[11]=l.id,e[12]=l.name,e[13]=l.organizationId,e[14]=l.slug,e[15]=l.ui,e[16]=f,e[17]=r):r=e[17];const u=r;let p,h;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(A.Suspense,{fallback:s.jsx(V,{}),children:s.jsx(me,{})}),h=s.jsx(Xe,{}),e[18]=p,e[19]=h):(p=e[18],h=e[19]);let x;return e[20]!==u||e[21]!==o?(x=s.jsxs(ee,{org:o,project:u,children:[p,h]}),e[20]=u,e[21]=o,e[22]=x):x=e[22],x}function As(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(A.Suspense,{fallback:s.jsx(V,{}),children:s.jsx(st,{})}),e[0]=t):t=e[0],t}export{As as default};
|
|
1
|
+
import{r as A,c as w,f as Q,j as s,D as H,v as K,o as ne,n as E,e as J,u as W,w as ie,t as re,q as ae,K as Y,B as F,O as I,P as ee,S as V,g as ce,au as me}from"./index-NjMxPJgF.js";import{u as te}from"./use-project-b5C3lq5-.js";import{c as de,a as fe,D as ue}from"./dialog-ChXYvlDt.js";import{i as pe}from"./X-LzehymHS.js";import{S as M}from"./skeleton-Cjm8s7CT.js";import{i as xe,u as he,a as ge,O as je}from"./org-ai-providers-DaYyItUL.js";import{A as se}from"./avatar-B2yArl-q.js";import{t as be}from"./Building02-Dr7IyBdv.js";import{t as ye}from"./Settings01-ClPVpLPy.js";import{t as ve}from"./Users03-Bv-hUQkl.js";import{i as Se}from"./Zap-BFN1DqIC.js";import{a as Ne,b as _e,c as ke,T as Ce}from"./tooltip-BJMSu0c2.js";import{i as we}from"./Check-DW8AVFkq.js";import{a as ze}from"./Copy01-DkcjIGiS.js";import{S as D}from"./switch-CA_oYDia.js";import{S as Pe,a as Ae,d as T,c as $e}from"./select-Dx3T3-4n.js";import{i as Ie}from"./Code01-YGq5QwlZ.js";import{s as Oe}from"./RefreshCcw01-B_NTitRE.js";import{i as Me}from"./Shield01-N4ace-oo.js";import"./index-YL7q5tyF.js";import{u as Le}from"./useMutation-68NxhXCf.js";import{a as Fe,F as q,b as U,c as R,d as G,f as B,e as Ee}from"./form-CaFPTMVC.js";import{I as Z}from"./input-B89sozd8.js";import{L as De}from"./logo-upload-CoGaedUC.js";import{P as Te}from"./project-plugins-BHOZZsH7.js";import qe from"./members-Q81LXZu1.js";import"./useQuery-BYBCFxgb.js";import"./constants-D7qXOYRn.js";import"./index-De1iYnQy.js";import"./AlertCircle-12chRuly.js";import"./EyeOff-CJoTkAtN.js";import"./Eye-hBqNQHpc.js";import"./Key01-qNySmY39.js";import"./Trash01-B_4PTwjI.js";import"./card-B8qDZGCZ.js";import"./toggle-group-DlZGDyPQ.js";import"./popover-Br8QkMK3.js";import"./ai-providers-logos-CCp39UCk.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./index-CqyqI90F.js";import"./ChevronUp-Bi3NMXzv.js";import"./ChevronDown-BIRGQoZ5.js";import"./label-DkiEYJcU.js";import"./Upload01-CLIOr3Tj.js";import"./Container-DHyMOW_p.js";import"./use-connection-CHFdKnsr.js";import"./use-collections-C0cYiFfV.js";import"./registry-utils-cjX9P5J9.js";import"./binder-D4cqx_Kx.js";import"./use-install-from-registry-BzwuBLOx.js";import"./extract-connection-data-48N591A_.js";import"./generate-id-BiV6m8fS.js";import"./Loading01-Bb8FCosd.js";import"./Plus-CajZ9VfC.js";import"./collection-display-button-CpVZ4wHm.js";import"./dropdown-menu-BxlQMXgW.js";import"./ChevronRight-DsjLlugM.js";import"./ArrowDown-7rbX3zqZ.js";import"./ArrowUp-DoIG5eQh.js";import"./Grid01-C5e9ReQ4.js";import"./List-NLa0AhO4.js";import"./badge-DtRom7JO.js";import"./collection-search-BYV7N3mr.js";import"./SearchMd-eZWeU0sP.js";import"./breadcrumb-C2RG4nAQ.js";import"./collection-table-wrapper-CHFJQd21.js";import"./table-C-1rP_rt.js";import"./integration-icon-BPVDVJvP.js";import"./checkbox-B1rexahu.js";import"./ArrowLeft-erI8s3G2.js";import"./use-members-B4ncWtMV.js";import"./alert-dialog-B_ae3oRt.js";import"./DotsHorizontal-CjYGc80C.js";import"./Lock01-CnZITIks.js";import"./empty-state-xIvMMy-_.js";import"./textarea-DIJzFUWn.js";import"./DotsVertical-2nyye7GD.js";import"./XClose-CcNXqPQc.js";import"./command-Drksh_DO.js";import"./index-zWpUeKAz.js";const oe=({size:e=24,color:t="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"M9.354 21c.705.622 1.632 1 2.646 1s1.94-.378 2.646-1M18 8A6 6 0 1 0 6 8c0 3.09-.78 5.206-1.65 6.605-.735 1.18-1.102 1.771-1.089 1.936.015.182.054.252.2.36.133.099.732.099 1.928.099H18.61c1.196 0 1.795 0 1.927-.098.147-.11.186-.179.2-.361.014-.165-.353-.755-1.088-1.936C18.78 13.206 18 11.09 18 8Z"}));oe.displayName="Bell01";function Ue(e){const t=w.c(26),{activeSection:n,onNavigate:o}=e,{data:a}=Q.useSession(),i=a?.user,l=i?.image,m=i?.name??"Profile",c=i?.name??"U";let f;t[0]!==c||t[1]!==l?(f=s.jsx(se,{url:l,fallback:c,shape:"circle",size:"2xs",className:"size-4 shrink-0"}),t[0]=c,t[1]=l,t[2]=f):f=t[2];let r;t[3]!==m||t[4]!==f?(r={key:"account.profile",label:m,icon:f},t[3]=m,t[4]=f,t[5]=r):r=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u={key:"account.preferences",label:"Preferences",icon:s.jsx(ye,{size:14})},t[6]=u):u=t[6];let p;t[7]!==r?(p=[r,u],t[7]=r,t[8]=p):p=t[8];const h=p;let x;t[9]===Symbol.for("react.memo_cache_sentinel")?(x={key:"org.general",label:"General",icon:s.jsx(be,{size:14})},t[9]=x):x=t[9];let d;t[10]===Symbol.for("react.memo_cache_sentinel")?(d={key:"org.plugins",label:"Features",icon:s.jsx(Se,{size:14})},t[10]=d):d=t[10];let g;t[11]===Symbol.for("react.memo_cache_sentinel")?(g={key:"org.ai-providers",label:"AI Providers",icon:s.jsx(xe,{size:14})},t[11]=g):g=t[11];let j;t[12]===Symbol.for("react.memo_cache_sentinel")?(j=[x,d,g,{key:"org.members",label:"Members",icon:s.jsx(ve,{size:14})}],t[12]=j):j=t[12];const _=j;let y;t[13]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Account"}),t[13]=y):y=t[13];let b;t[14]!==h||t[15]!==n||t[16]!==o?(b=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[y,h.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:H("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[14]=h,t[15]=n,t[16]=o,t[17]=b):b=t[17];let N;t[18]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Organization"}),t[18]=N):N=t[18];let S;t[19]!==n||t[20]!==o?(S=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[N,_.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:H("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",n===v.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:v.icon}),s.jsx("span",{className:"truncate",children:v.label})]},v.key))]}),t[19]=n,t[20]=o,t[21]=S):S=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.178.2"]})}),t[22]=C):C=t[22];let k;return t[23]!==b||t[24]!==S?(k=s.jsxs("div",{className:"w-52 shrink-0 border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-4",children:[b,S,C]}),t[23]=b,t[24]=S,t[25]=k):k=t[25],k}function Re(){const e=w.c(32),{data:t}=Q.useSession(),[n,o]=A.useState(!1),a=t?.user,i=a?.image;let l;e[0]!==a?(l=()=>{a?.id&&navigator.clipboard.writeText(a.id).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},e[0]=a,e[1]=l):l=e[1];const m=l;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Profile"})}),e[2]=c):c=e[2];const f=a?.name??"U";let r;e[3]!==f||e[4]!==i?(r=s.jsx(se,{url:i,fallback:f,shape:"circle",size:"xl",className:"size-16 shrink-0"}),e[3]=f,e[4]=i,e[5]=r):r=e[5];const u=a?.name??"User";let p;e[6]!==u?(p=s.jsx("span",{className:"text-sm font-semibold text-foreground truncate",children:u}),e[6]=u,e[7]=p):p=e[7];const h=a?.email;let x;e[8]!==h?(x=s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:h}),e[8]=h,e[9]=x):x=e[9];let d;e[10]!==p||e[11]!==x?(d=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[p,x]}),e[10]=p,e[11]=x,e[12]=d):d=e[12];let g;e[13]!==r||e[14]!==d?(g=s.jsxs("div",{className:"flex items-center gap-4",children:[r,d]}),e[13]=r,e[14]=d,e[15]=g):g=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"User ID"}),e[16]=j):j=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("p",{className:"text-sm text-muted-foreground",children:"User ID"}),e[17]=_):_=e[17];const y=a?.id;let b;e[18]!==y?(b=s.jsx("span",{className:"font-mono text-sm",children:y}),e[18]=y,e[19]=b):b=e[19];let N;e[20]!==n?(N=n?s.jsx(we,{size:14,className:"text-green-600 shrink-0"}):s.jsx(ze,{size:14,className:"shrink-0 opacity-70 group-hover:opacity-100 transition-opacity"}),e[20]=n,e[21]=N):N=e[21];let S;e[22]!==m||e[23]!==b||e[24]!==N?(S=s.jsx(Ne,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:m,className:"group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[b,N]})}),e[22]=m,e[23]=b,e[24]=N,e[25]=S):S=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(_e,{side:"left",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[26]=C):C=e[26];let k;e[27]!==S?(k=s.jsxs("div",{className:"flex flex-col",children:[j,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[_,s.jsx(ke,{children:s.jsxs(Ce,{children:[S,C]})})]})]}),e[27]=S,e[28]=k):k=e[28];let v;return e[29]!==k||e[30]!==g?(v=s.jsxs("div",{className:"flex flex-col gap-8",children:[c,g,k]}),e[29]=k,e[30]=g,e[31]=v):v=e[31],v}function L(e){const t=w.c(27),{icon:n,label:o,description:a,control:i,onClick:l,disabled:m}=e,c=m?void 0:l,f=l?"button":void 0,r=l&&!m?0:void 0;let u;t[0]!==m||t[1]!==l?(u=l&&!m?N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),l())}:void 0,t[0]=m,t[1]=l,t[2]=u):u=t[2];const p=l&&!m?"pointer":void 0;let h;t[3]!==p?(h={cursor:p},t[3]=p,t[4]=h):h=t[4];let x;t[5]!==n?(x=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),t[5]=n,t[6]=x):x=t[6];let d;t[7]!==o?(d=s.jsx("p",{className:"text-sm font-medium text-foreground",children:o}),t[7]=o,t[8]=d):d=t[8];let g;t[9]!==a?(g=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:a}),t[9]=a,t[10]=g):g=t[10];let j;t[11]!==d||t[12]!==g?(j=s.jsxs("div",{className:"min-w-0",children:[d,g]}),t[11]=d,t[12]=g,t[13]=j):j=t[13];let _;t[14]!==j||t[15]!==x?(_=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[x,j]}),t[14]=j,t[15]=x,t[16]=_):_=t[16];let y;t[17]!==i?(y=s.jsx("div",{onClick:Ge,className:"shrink-0",children:i}),t[17]=i,t[18]=y):y=t[18];let b;return t[19]!==c||t[20]!==_||t[21]!==y||t[22]!==f||t[23]!==r||t[24]!==u||t[25]!==h?(b=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0",onClick:c,role:f,tabIndex:r,onKeyDown:u,style:h,children:[_,y]}),t[19]=c,t[20]=_,t[21]=y,t[22]=f,t[23]=r,t[24]=u,t[25]=h,t[26]=b):b=t[26],b}function Ge(e){return e.stopPropagation()}function X(){const e=w.c(47),[t,n]=he();let o;e[0]!==n?(o=async z=>{if(z&&await Notification.requestPermission()!=="granted"){K.error("Notifications denied. Please enable them in your browser settings."),n(Ve);return}n(P=>({...P,enableNotifications:z}))},e[0]=n,e[1]=o):o=e[1];const a=o;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Preferences"})}),e[2]=i):i=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ie,{size:16}),e[3]=l):l=e[3];let m;e[4]!==n?(m=()=>n(Ke),e[4]=n,e[5]=m):m=e[5];let c;e[6]!==n?(c=z=>n(P=>({...P,devMode:z})),e[6]=n,e[7]=c):c=e[7];let f;e[8]!==t.devMode||e[9]!==c?(f=s.jsx(D,{checked:t.devMode,onCheckedChange:c}),e[8]=t.devMode,e[9]=c,e[10]=f):f=e[10];let r;e[11]!==m||e[12]!==f?(r=s.jsx(L,{icon:l,label:"Developer Mode",description:"Show technical details like JSON input/output for tool calls.",onClick:m,control:f}),e[11]=m,e[12]=f,e[13]=r):r=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(oe,{size:16}),e[14]=u):u=e[14];let p;e[15]!==a||e[16]!==t.enableNotifications?(p=s.jsx(L,{icon:u,label:"Notifications",description:"Play a sound and show a notification when chat messages complete while the app is unfocused.",disabled:typeof Notification>"u",onClick:()=>a(!t.enableNotifications),control:s.jsx(D,{disabled:typeof Notification>"u",checked:t.enableNotifications,onCheckedChange:a})}),e[15]=a,e[16]=t.enableNotifications,e[17]=p):p=e[17];let h;e[18]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Oe,{size:16}),e[18]=h):h=e[18];let x;e[19]!==n?(x=()=>n(Be),e[19]=n,e[20]=x):x=e[20];let d;e[21]!==n?(d=z=>n(P=>({...P,experimentalAutomations:z})),e[21]=n,e[22]=d):d=e[22];let g;e[23]!==t.experimentalAutomations||e[24]!==d?(g=s.jsx(D,{checked:t.experimentalAutomations,onCheckedChange:d}),e[23]=t.experimentalAutomations,e[24]=d,e[25]=g):g=e[25];let j;e[26]!==x||e[27]!==g?(j=s.jsx(L,{icon:h,label:"Experimental: Automations",description:"Enable the Automations feature in the sidebar. This is an experimental feature under active development.",onClick:x,control:g}),e[26]=x,e[27]=g,e[28]=j):j=e[28];let _;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Me,{size:16}),e[29]=_):_=e[29];let y;e[30]!==n?(y=z=>n(P=>({...P,toolApprovalLevel:z})),e[30]=n,e[31]=y):y=e[31];let b;e[32]===Symbol.for("react.memo_cache_sentinel")?(b={none:"Always ask",readonly:"Skip read-only",yolo:"Auto-approve all"},e[32]=b):b=e[32];const N=b[t.toolApprovalLevel];let S;e[33]!==N?(S=s.jsx(Ae,{className:"w-36",children:s.jsx("span",{children:N})}),e[33]=N,e[34]=S):S=e[34];let C;e[35]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(T,{value:"none",textValue:"Always ask",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Always ask"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Require approval for all tool calls"})]})}),e[35]=C):C=e[35];let k;e[36]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(T,{value:"readonly",textValue:"Skip read-only",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Skip read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[36]=k):k=e[36];let v;e[37]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs($e,{children:[C,k,s.jsx(T,{value:"yolo",textValue:"Auto-approve all",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Auto-approve all"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})})]}),e[37]=v):v=e[37];let $;e[38]!==t.toolApprovalLevel||e[39]!==y||e[40]!==S?($=s.jsx(L,{icon:_,label:"Tool Approval",description:"Choose when to require approval before tools execute.",control:s.jsxs(Pe,{value:t.toolApprovalLevel,onValueChange:y,children:[S,v]})}),e[38]=t.toolApprovalLevel,e[39]=y,e[40]=S,e[41]=$):$=e[41];let O;return e[42]!==j||e[43]!==$||e[44]!==r||e[45]!==p?(O=s.jsxs("div",{className:"flex flex-col gap-6",children:[i,s.jsxs("div",{className:"flex flex-col",children:[r,p,j,$]})]}),e[42]=j,e[43]=$,e[44]=r,e[45]=p,e[46]=O):O=e[46],O}function Be(e){return{...e,experimentalAutomations:!e.experimentalAutomations}}function Ke(e){return{...e,devMode:!e.devMode}}function Ve(e){return{...e,enableNotifications:!1}}const Qe=ne({name:E().min(1,"Name is required").max(255,"Name is too long"),slug:E().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:E().optional()});function Je(){const e=J(),{org:t,project:n}=W(),o=ie(),[a,i]=A.useState(!1),l=re({resolver:ae(Qe),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),m=Le({mutationFn:async r=>{const u={name:r.name,slug:r.slug};r.logo&&(u.logo=r.logo);const p=await Q.organization.update({organizationId:t.id,data:u});if(p?.error)throw new Error(p.error.message||"Failed to update organization");return p},onSuccess:r=>{o.invalidateQueries({queryKey:Y.organizations()}),o.invalidateQueries({queryKey:Y.activeOrganization(t.slug)}),K.success("Organization settings updated successfully"),r?.data?.slug&&r.data.slug!==t.slug&&e({to:"/$org/$project/settings",params:{org:r.data.slug,project:n.slug}})},onError:r=>{K.error(r instanceof Error?r.message:"Failed to update organization")},onSettled:()=>{i(!1)}}),c=r=>{i(!0),m.mutate(r)},f=l.formState.isDirty;return s.jsx(Fe,{...l,children:s.jsxs("form",{onSubmit:l.handleSubmit(c),className:"space-y-6",children:[s.jsx(q,{control:l.control,name:"name",render:({field:r})=>s.jsxs(U,{children:[s.jsx(R,{children:"Organization Name"}),s.jsx(G,{children:s.jsx(Z,{placeholder:"My Organization",...r,disabled:a})}),s.jsx(B,{})]})}),s.jsx(q,{control:l.control,name:"slug",render:({field:r})=>s.jsxs(U,{children:[s.jsx(R,{children:"Organization Slug"}),s.jsx(G,{children:s.jsx(Z,{placeholder:"my-organization",...r,disabled:a,onChange:u=>{const p=u.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");r.onChange(p)}})}),s.jsx(Ee,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(B,{})]})}),s.jsx(q,{control:l.control,name:"logo",render:({field:r})=>s.jsxs(U,{children:[s.jsx(R,{children:"Logo"}),s.jsx(G,{children:s.jsx(De,{value:r.value,onChange:r.onChange,name:l.watch("name"),disabled:a})}),s.jsx(B,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(F,{type:"submit",disabled:!f||a,className:"min-w-24",children:a?"Saving...":"Save Changes"}),f&&s.jsx(F,{type:"button",variant:"outline",onClick:()=>l.reset(),disabled:a,children:"Cancel"})]})]})})}function We(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Organization"})}),s.jsx(Je,{})]}),e[0]=t):t=e[0],t}function He(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(qe,{}),e[0]=t):t=e[0],t}function le(){const e=w.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(M,{className:"h-6 w-48"}),n=s.jsx(M,{className:"h-4 w-80"}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let o;return e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[t,n,s.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[s.jsx(M,{className:"h-12 w-full"}),s.jsx(M,{className:"h-12 w-full"})]})]}),e[2]=o):o=e[2],o}function Ye(e){const t=w.c(14),{projectSlug:n,children:o}=e,{org:a}=W(),{data:i,isLoading:l}=te(a.id,n);if(l||!i){let u;return t[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(le,{}),t[0]=u):u=t[0],u}const m=n===I;let c;t[1]!==i.description||t[2]!==i.enabledPlugins||t[3]!==i.id||t[4]!==i.name||t[5]!==i.organizationId||t[6]!==i.slug||t[7]!==i.ui||t[8]!==m?(c={id:i.id,organizationId:i.organizationId,slug:i.slug,name:i.name,description:i.description,enabledPlugins:i.enabledPlugins,ui:i.ui,isOrgAdmin:m},t[1]=i.description,t[2]=i.enabledPlugins,t[3]=i.id,t[4]=i.name,t[5]=i.organizationId,t[6]=i.slug,t[7]=i.ui,t[8]=m,t[9]=c):c=t[9];const f=c;let r;return t[10]!==o||t[11]!==f||t[12]!==a?(r=s.jsx(ee,{org:a,project:f,children:o}),t[10]=o,t[11]=f,t[12]=a,t[13]=r):r=t[13],r}function Ze(e){const t=w.c(7),{section:n}=e;switch(n){case"account.profile":{let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Re,{}),t[0]=o):o=t[0],o}case"account.preferences":{let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(X,{}),t[1]=o):o=t[1],o}case"org.general":{let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(We,{}),t[2]=o):o=t[2],o}case"org.plugins":{let o;return t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Ye,{projectSlug:I,children:s.jsx(Te,{})}),t[3]=o):o=t[3],o}case"org.ai-providers":{let o;return t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(je,{}),t[4]=o):o=t[4],o}case"org.members":{let o;return t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(He,{}),t[5]=o):o=t[5],o}default:{let o;return t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(X,{}),t[6]=o):o=t[6],o}}}function Xe(){const e=w.c(24),{isOpen:t,activeSection:n,open:o,close:a}=ge();let i;e[0]!==a?(i=j=>!j&&a(),e[0]=a,e[1]=i):i=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(de,{className:"sr-only",children:"Settings"}),e[2]=l):l=e[2];let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"w-52 shrink-0 border-r border-border"}),e[3]=m):m=e[3];let c;e[4]!==n||e[5]!==o?(c=s.jsx(A.Suspense,{fallback:m,children:s.jsx(Ue,{activeSection:n,onNavigate:o})}),e[4]=n,e[5]=o,e[6]=c):c=e[6];let f,r;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(pe,{size:16}),r=s.jsx("span",{className:"sr-only",children:"Close"}),e[7]=f,e[8]=r):(f=e[7],r=e[8]);let u;e[9]!==a?(u=s.jsxs("button",{type:"button",onClick:a,className:"absolute top-4 right-4 z-10 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-ring",children:[f,r]}),e[9]=a,e[10]=u):u=e[10];let p;e[11]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(le,{}),e[11]=p):p=e[11];let h;e[12]!==n?(h=s.jsx("div",{className:"p-8",children:s.jsx(A.Suspense,{fallback:p,children:s.jsx(Ze,{section:n})})}),e[12]=n,e[13]=h):h=e[13];let x;e[14]!==u||e[15]!==h?(x=s.jsxs("div",{className:"flex-1 min-w-0 overflow-y-auto relative flex flex-col overflow-hidden",children:[u,h]}),e[14]=u,e[15]=h,e[16]=x):x=e[16];let d;e[17]!==c||e[18]!==x?(d=s.jsxs(fe,{className:"sm:max-w-[1100px] h-[85vh] p-0 overflow-hidden flex flex-col gap-0",closeButtonClassName:"hidden",children:[l,s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[c,x]})]}),e[17]=c,e[18]=x,e[19]=d):d=e[19];let g;return e[20]!==t||e[21]!==i||e[22]!==d?(g=s.jsx(ue,{open:t,onOpenChange:i,children:d}),e[20]=t,e[21]=i,e[22]=d,e[23]=g):g=e[23],g}function et(e){const t=w.c(12),{projectSlug:n,orgSlug:o,error:a}=e,i=J();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("h1",{className:"text-xl font-semibold",children:"Failed to load project"}),t[0]=l):l=t[0];let m;t[1]!==n?(m=s.jsxs("p",{className:"text-muted-foreground text-center",children:['There was an error loading the project "',n,'".']}),t[1]=n,t[2]=m):m=t[2];let c;t[3]!==a.message?(c=s.jsx("p",{className:"text-sm text-muted-foreground",children:a.message}),t[3]=a.message,t[4]=c):c=t[4];let f;t[5]!==i||t[6]!==o?(f=s.jsx(F,{variant:"link",onClick:()=>i({to:"/$org/$project",params:{org:o,project:I}}),children:"Go to organization home"}),t[5]=i,t[6]=o,t[7]=f):f=t[7];let r;return t[8]!==m||t[9]!==c||t[10]!==f?(r=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[l,m,c,f]}),t[8]=m,t[9]=c,t[10]=f,t[11]=r):r=t[11],r}function tt(e){const t=w.c(9),{projectSlug:n,orgSlug:o}=e,a=J();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("h1",{className:"text-xl font-semibold",children:"Project not found"}),t[0]=i):i=t[0];let l;t[1]!==n?(l=s.jsxs("p",{className:"text-muted-foreground text-center",children:['The project "',n,'" does not exist in this organization.']}),t[1]=n,t[2]=l):l=t[2];let m;t[3]!==a||t[4]!==o?(m=s.jsx(F,{variant:"link",onClick:()=>a({to:"/$org/$project",params:{org:o,project:I}}),children:"Go to organization home"}),t[3]=a,t[4]=o,t[5]=m):m=t[5];let c;return t[6]!==l||t[7]!==m?(c=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[i,l,m]}),t[6]=l,t[7]=m,t[8]=c):c=t[8],c}function st(){const e=w.c(23);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=ce(t),{org:o}=W(),a=n.org,i=n.project,{data:l,isLoading:m,error:c}=te(o.id,i);if(m){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(V,{}),e[1]=d):d=e[1],d}if(c){let d;return e[2]!==c||e[3]!==a||e[4]!==i?(d=s.jsx(et,{projectSlug:i,orgSlug:a,error:c}),e[2]=c,e[3]=a,e[4]=i,e[5]=d):d=e[5],d}if(!l){let d;return e[6]!==a||e[7]!==i?(d=s.jsx(tt,{projectSlug:i,orgSlug:a}),e[6]=a,e[7]=i,e[8]=d):d=e[8],d}const f=l.slug===I;let r;e[9]!==l.description||e[10]!==l.enabledPlugins||e[11]!==l.id||e[12]!==l.name||e[13]!==l.organizationId||e[14]!==l.slug||e[15]!==l.ui||e[16]!==f?(r={id:l.id,organizationId:l.organizationId,slug:l.slug,name:l.name,description:l.description,enabledPlugins:l.enabledPlugins,ui:l.ui,isOrgAdmin:f},e[9]=l.description,e[10]=l.enabledPlugins,e[11]=l.id,e[12]=l.name,e[13]=l.organizationId,e[14]=l.slug,e[15]=l.ui,e[16]=f,e[17]=r):r=e[17];const u=r;let p,h;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(A.Suspense,{fallback:s.jsx(V,{}),children:s.jsx(me,{})}),h=s.jsx(Xe,{}),e[18]=p,e[19]=h):(p=e[18],h=e[19]);let x;return e[20]!==u||e[21]!==o?(x=s.jsxs(ee,{org:o,project:u,children:[p,h]}),e[20]=u,e[21]=o,e[22]=x):x=e[22],x}function As(){const e=w.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(A.Suspense,{fallback:s.jsx(V,{}),children:s.jsx(st,{})}),e[0]=t):t=e[0],t}export{As as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as _,j as n,D as J,B as G,u as V,w as W,v as M,K as q,bf as D,bg as $,c as Q}from"./index-
|
|
1
|
+
import{r as _,j as n,D as J,B as G,u as V,w as W,v as M,K as q,bf as D,bg as $,c as Q}from"./index-NjMxPJgF.js";import{u as Y}from"./useQuery-BYBCFxgb.js";import{u as H}from"./useMutation-68NxhXCf.js";import{u as X,a as Z}from"./constants-D7qXOYRn.js";import{S as ee}from"./switch-CA_oYDia.js";import{L as te}from"./label-DkiEYJcU.js";import{n as ne}from"./Container-DHyMOW_p.js";import{b as se}from"./use-connection-CHFdKnsr.js";import{d as ie,h as re}from"./registry-utils-cjX9P5J9.js";import{u as oe}from"./use-install-from-registry-BzwuBLOx.js";import{i as le}from"./Loading01-Bb8FCosd.js";import{s as ae}from"./Plus-CajZ9VfC.js";import{S as ce,a as de,b as ue,c as me,d as z}from"./select-Dx3T3-4n.js";function ge({value:o,onValueChange:e,placeholder:r="Select a connection...",binding:l,bindingType:a,onAddNew:y,className:x,disabled:h=!1}){const[j,d]=_.useState(!1),{installByBinding:v,isInstalling:S}=oe(),b=j||S,u=se(),w=ie({connections:u,binding:typeof l=="string"?l:void 0}),C=!l||!u?u??[]:typeof l=="string"?w:Array.isArray(l)&&l.length>0?u.filter(t=>re(t,l)):u,m=(()=>{if(!a?.startsWith("@"))return null;const[t,s]=a.replace("@","").split("/");return t&&s?{scope:t,appName:s}:null})(),N=(()=>{let t=C;const s=Array.isArray(l)&&l.length>0;if(m&&!s&&(t=t.filter(i=>{const c=i.app_name,p=i.metadata?.scopeName;return c===m.appName&&p===m.scope})),o&&!t.some(i=>i.id===o)){const i=u?.find(c=>c.id===o);if(i)return[i,...t]}return t})(),P=a?.startsWith("@"),A=async()=>{if(P&&a){d(!0);try{const t=await v(a);t&&e(t.id)}finally{d(!1)}return}y?.()},g=N.find(t=>t.id===o);return n.jsxs(ce,{value:o??"none",onValueChange:t=>e(t==="none"?null:t),disabled:h,children:[n.jsx(de,{size:"sm",className:J("w-[200px]",x),children:n.jsx(ue,{placeholder:r,children:g?n.jsxs("div",{className:"flex items-center gap-2",children:[g.icon?n.jsx("img",{src:g.icon,alt:g.title,className:"w-4 h-4 rounded shrink-0"}):n.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary shrink-0",children:g.title.slice(0,1).toUpperCase()}),n.jsx("span",{className:"truncate",children:g.title})]}):r})}),n.jsxs(me,{children:[n.jsx(z,{value:"none",children:"No connection"}),N.length===0?n.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No compatible connections found"}):N.map(t=>n.jsx(z,{value:t.id,children:n.jsxs("div",{className:"flex items-center gap-2",children:[t.icon?n.jsx("img",{src:t.icon,alt:t.title,className:"w-4 h-4 rounded"}):n.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:t.title.slice(0,1).toUpperCase()}),n.jsx("span",{children:t.title})]})},t.id)),(y||P)&&n.jsx("div",{className:"border-t border-border",children:n.jsx(G,{onPointerDown:t=>t.stopPropagation(),onClick:t=>{t.preventDefault(),t.stopPropagation(),A()},disabled:b||h,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:b?n.jsxs(n.Fragment,{children:[n.jsx(le,{size:16,className:"animate-spin"}),n.jsx("span",{children:"Connecting..."})]}):n.jsxs(n.Fragment,{children:[n.jsx(ae,{size:16}),n.jsx("span",{children:"Add Connection"})]})})})]})]})}const pe=o=>{if(!o||typeof o!="object")return!1;const e=o;return e.type==="text"&&typeof e.text=="string"&&e.text.trim().toLowerCase().startsWith("error")},K=o=>{const e=o.structuredContent??o,r=e&&typeof e=="object"?e:null,l=r?.content?.[0]?.text&&typeof r.content[0].text=="string"?r.content[0].text:null;if(r?.isError)throw new Error(l??"Tool call failed");if(pe(e))throw new Error(e.text);return e};function fe(o){return o.requiresMcpBinding===!0?!0:o.binding!==void 0}function xe(o){const e=Q.c(57),{plugin:r,isEnabled:l,isSaving:a,pendingBinding:y,description:x,label:h,icon:j,projectId:d,client:v,onBindingChange:S,onToggle:b}=o;let u;e[0]!==r?(u=fe(r),e[0]=r,e[1]=u):u=e[1];const w=u;let C;e[2]!==r.id||e[3]!==d?(C=q.projectPluginConfig(d??"",r.id),e[2]=r.id,e[3]=d,e[4]=C):C=e[4];let m;e[5]!==v||e[6]!==r.id||e[7]!==d?(m=async()=>{if(!d)throw new Error("Project ID is required to load plugin config.");const O=await v.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:d,pluginId:r.id}});return K(O)},e[5]=v,e[6]=r.id,e[7]=d,e[8]=m):m=e[8];const N=!!d&&w;let P;e[9]!==C||e[10]!==m||e[11]!==N?(P={queryKey:C,queryFn:m,enabled:N},e[9]=C,e[10]=m,e[11]=N,e[12]=P):P=e[12];const{data:A,isLoading:g}=Y(P),t=A?.config?.connectionId??null,s=y!==void 0?y:t;let i;e[13]!==l||e[14]!==a||e[15]!==b||e[16]!==r.id?(i=()=>!a&&b(r.id,!l),e[13]=l,e[14]=a,e[15]=b,e[16]=r.id,e[17]=i):i=e[17];const c=a?void 0:"pointer";let p;e[18]!==c?(p={cursor:c},e[18]=c,e[19]=p):p=e[19];let f;e[20]!==j?(f=j&&n.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0 [&>svg]:size-4",children:j}),e[20]=j,e[21]=f):f=e[21];let I;e[22]!==h?(I=n.jsx("p",{className:"text-sm font-medium text-foreground",children:h}),e[22]=h,e[23]=I):I=e[23];let E;e[24]!==x?(E=x&&n.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:x}),e[24]=x,e[25]=E):E=e[25];let B;e[26]!==I||e[27]!==E?(B=n.jsxs("div",{className:"min-w-0",children:[I,E]}),e[26]=I,e[27]=E,e[28]=B):B=e[28];let k;e[29]!==B||e[30]!==f?(k=n.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[f,B]}),e[29]=B,e[30]=f,e[31]=k):k=e[31];let T;e[32]!==b||e[33]!==r.id?(T=O=>b(r.id,O),e[32]=b,e[33]=r.id,e[34]=T):T=e[34];let F;e[35]!==l||e[36]!==a||e[37]!==T?(F=n.jsx("div",{onClick:je,className:"shrink-0",children:n.jsx(ee,{checked:l,onCheckedChange:T,disabled:a})}),e[35]=l,e[36]=a,e[37]=T,e[38]=F):F=e[38];let L;e[39]!==k||e[40]!==F?(L=n.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[k,F]}),e[39]=k,e[40]=F,e[41]=L):L=e[41];let U;e[42]!==g||e[43]!==l||e[44]!==a||e[45]!==w||e[46]!==S||e[47]!==r.binding||e[48]!==r.id||e[49]!==s||e[50]!==t?(U=l&&w&&n.jsx("div",{className:"pb-4 pl-7 space-y-2",onClick:he,children:n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(te,{className:"text-xs text-muted-foreground w-24",children:"Connection"}),n.jsx(ge,{value:s??null,onValueChange:O=>S(r.id,O,t),binding:r.binding,placeholder:"Select connection...",className:"w-56",disabled:a||g})]})}),e[42]=g,e[43]=l,e[44]=a,e[45]=w,e[46]=S,e[47]=r.binding,e[48]=r.id,e[49]=s,e[50]=t,e[51]=U):U=e[51];let R;return e[52]!==L||e[53]!==U||e[54]!==i||e[55]!==p?(R=n.jsxs("div",{className:"flex flex-col border-b border-border last:border-0",onClick:i,style:p,children:[L,U]}),e[52]=L,e[53]=U,e[54]=i,e[55]=p,e[56]=R):R=e[56],R}function he(o){return o.stopPropagation()}function je(o){return o.stopPropagation()}function be(){const{org:o,project:e}=V(),r=W(),l=X({connectionId:Z,orgId:o.id}),[a,y]=_.useState({}),[x,h]=_.useState({}),[j,d]=_.useState(!1),v=e.enabledPlugins??[],S=t=>{const s=a[t];return s!==void 0?s:v.includes(t)},b=()=>{const t=new Set(v);for(const[s,i]of Object.entries(a))i?t.add(s):t.delete(s);return Array.from(t)},u=Object.keys(a).length>0||Object.keys(x).length>0,w=(t,s)=>{const i=v.includes(t);y(s===i?c=>{const{[t]:p,...f}=c;return f}:c=>({...c,[t]:s}))},C=(t,s,i)=>{if(s===i){h(c=>{const{[t]:p,...f}=c;return f});return}h(c=>({...c,[t]:s}))},m=H({mutationFn:async t=>{const s=[];if(t.updatePlugins){const i=await l.callTool({name:"PROJECT_UPDATE",arguments:{projectId:e.id,enabledPlugins:t.enabledPlugins}});s.push(K(i))}if(t.bindingUpdates.length>0){const i=await Promise.all(t.bindingUpdates.map(async({pluginId:c,connectionId:p,settings:f})=>{const I=await l.callTool({name:"PROJECT_PLUGIN_CONFIG_UPDATE",arguments:{projectId:e.id,pluginId:c,connectionId:p,settings:f}});return K(I)}));s.push(...i)}return s},onSuccess:(t,s)=>{s.updatePlugins&&(r.invalidateQueries({queryKey:q.project(o.id,e.slug)}),r.invalidateQueries({queryKey:q.projects(o.id)})),s.bindingUpdates.forEach(({pluginId:i})=>{r.invalidateQueries({queryKey:q.projectPluginConfig(e.id??"",i)})}),y({}),h({}),M.success("Plugins updated successfully")},onError:t=>{M.error("Failed to update plugins: "+(t instanceof Error?t.message:"Unknown error"))},onSettled:()=>{d(!1)}}),N=()=>{d(!0);const t=Object.keys(x).map(s=>{const i=x[s];return{pluginId:s,connectionId:i!==void 0?i:void 0}});m.mutate({enabledPlugins:b(),updatePlugins:Object.keys(a).length>0,bindingUpdates:t})},P=()=>{y({}),h({})},A=t=>{const s=$.find(i=>i.pluginId===t);return s?{label:s.label,icon:s.items[0]?.icon}:null},g=t=>D.find(i=>i.id===t)?.description??null;return D.length===0?n.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}):n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"flex flex-col",children:D.map(t=>{const s=A(t.id),i=g(t.id),c=S(t.id);return n.jsx(xe,{plugin:t,isEnabled:c,isSaving:j,pendingBinding:x[t.id],description:i,label:s?.label??t.id,icon:s?.icon??n.jsx(ne,{size:14}),projectId:e.id,client:l,onBindingChange:C,onToggle:w},t.id)})}),n.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[n.jsx(G,{variant:"outline",onClick:P,disabled:!u||j,children:"Cancel"}),n.jsx(G,{onClick:N,disabled:!u||j,className:"min-w-24",children:j?"Saving...":"Save Changes"})]})]})}function Le(){const o=Q.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs("div",{className:"flex flex-col gap-6",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Features"}),n.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Extend your project with built-in capabilities that activate automatically on any connection that supports them."})]}),n.jsx(be,{})]}),o[0]=e):e=o[0],e}export{Le as P};
|