decocms 2.179.2 → 2.179.3
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-QngH9BVd.js → AlertCircle-DcuzO-dN.js} +1 -1
- package/dist/client/assets/{AlignLeft-BUW8XsMa.js → AlignLeft-DH6vJ97u.js} +1 -1
- package/dist/client/assets/{ArrowDown-Ba2t7m6d.js → ArrowDown-DrJY3Wf3.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DX2ldnBo.js → ArrowLeft-B0zQkfl0.js} +1 -1
- package/dist/client/assets/{ArrowUp-Wy3Qa9X3.js → ArrowUp-B4DKDJey.js} +1 -1
- package/dist/client/assets/{Building02-DW6RLSwU.js → Building02-B5vUKe4K.js} +1 -1
- package/dist/client/assets/{Check-CLxUgI8Z.js → Check-5nIJP_0B.js} +1 -1
- package/dist/client/assets/{CheckCircle-DDKCxiAn.js → CheckCircle-CPfAK_ok.js} +1 -1
- package/dist/client/assets/{CheckSquare-IgZnioYh.js → CheckSquare-Bd5OlGNx.js} +1 -1
- package/dist/client/assets/{CheckVerified02-Brnp4Z-Q.js → CheckVerified02-BImD45AM.js} +1 -1
- package/dist/client/assets/{ChevronDown-D0b1rvAp.js → ChevronDown-t60R5l2B.js} +1 -1
- package/dist/client/assets/{ChevronLeft-BOF7bp9d.js → ChevronLeft-lVdUD9SW.js} +1 -1
- package/dist/client/assets/{ChevronRight-BEUO8jhU.js → ChevronRight-3uKoJ2yX.js} +1 -1
- package/dist/client/assets/{ChevronUp-BWhuIqS7.js → ChevronUp-l7iXrppT.js} +1 -1
- package/dist/client/assets/{Clock-Aquumu5W.js → Clock-Cu62NiMl.js} +1 -1
- package/dist/client/assets/{Code01-_in0gxFd.js → Code01-DA4cXrzu.js} +1 -1
- package/dist/client/assets/{Container-b65PFshp.js → Container-Cvd3ILsk.js} +1 -1
- package/dist/client/assets/{Copy01-Ds0OKZs5.js → Copy01-DCmX2pvi.js} +1 -1
- package/dist/client/assets/{Dataflow03-CE4IJeUz.js → Dataflow03-SvWKmU9-.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-EK1-V4Yv.js → DotsHorizontal-DE3Ptwny.js} +1 -1
- package/dist/client/assets/{DotsVertical-Bo0fAyx-.js → DotsVertical-CZep1rYf.js} +1 -1
- package/dist/client/assets/{Download01-CN3AkzFm.js → Download01-DOZIvPhC.js} +1 -1
- package/dist/client/assets/{Edit01-BeW3IgwV.js → Edit01-Bh7u1xp-.js} +1 -1
- package/dist/client/assets/{Edit05-DDQmnS5O.js → Edit05-DwDDlBNQ.js} +1 -1
- package/dist/client/assets/{Eye-Cqad01Et.js → Eye-D3Q7o9JY.js} +1 -1
- package/dist/client/assets/{EyeOff-rTYDCZUH.js → EyeOff--TPuyP7J.js} +1 -1
- package/dist/client/assets/{File02-k_9AZvHT.js → File02-6xeEPCuC.js} +1 -1
- package/dist/client/assets/{File06-BAp2UeVQ.js → File06-BocZAjHf.js} +1 -1
- package/dist/client/assets/{FilterLines-BQVg1PzI.js → FilterLines-CUdG83Ae.js} +1 -1
- package/dist/client/assets/{Globe01-sBw0ReRO.js → Globe01-BTdgnOS2.js} +1 -1
- package/dist/client/assets/{Globe02-DlxZmkSI.js → Globe02-X8fGWI0t.js} +1 -1
- package/dist/client/assets/{Grid01-B9zEjFyx.js → Grid01-NkSMXhQ7.js} +1 -1
- package/dist/client/assets/{Home02-DsMimBHw.js → Home02-BmcJp5G2.js} +1 -1
- package/dist/client/assets/{Image01-zSA25K9S.js → Image01-RwxwuRZg.js} +1 -1
- package/dist/client/assets/{Inbox01-Bcon6dDK.js → Inbox01-B7dU6IpS.js} +1 -1
- package/dist/client/assets/{InfoCircle-CA8mfcG6.js → InfoCircle-BO2XWy7v.js} +1 -1
- package/dist/client/assets/{Key01-V3zgT2bk.js → Key01-CjhxaGrC.js} +1 -1
- package/dist/client/assets/{LayersTwo01-D3otbQFN.js → LayersTwo01-DEwkReGL.js} +1 -1
- package/dist/client/assets/{Link01-VlHez4tu.js → Link01-h9aUM7NA.js} +1 -1
- package/dist/client/assets/{LinkExternal01-vs3DKlfq.js → LinkExternal01-CmkQ0Pr-.js} +1 -1
- package/dist/client/assets/{List-D6xZGoxJ.js → List-BbeB05v1.js} +1 -1
- package/dist/client/assets/{Loading01-DQphO9Su.js → Loading01-D0sCOwf7.js} +1 -1
- package/dist/client/assets/{Lock01-Cbqd9PVH.js → Lock01-DFfVnVtc.js} +1 -1
- package/dist/client/assets/{Play-jCDYHrdu.js → Play-hGa2UcUZ.js} +1 -1
- package/dist/client/assets/{Plus-CURSuoDd.js → Plus-Dcf0Y3wA.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-oV1XFIRn.js → RefreshCcw01-BOXuamrY.js} +1 -1
- package/dist/client/assets/{Save01-CpNh-fPw.js → Save01-CA0I32a6.js} +1 -1
- package/dist/client/assets/{SearchMd-C8ADHGFY.js → SearchMd-BSRGE1t4.js} +1 -1
- package/dist/client/assets/{Settings01-B76KnDHb.js → Settings01-CCUkMwLj.js} +1 -1
- package/dist/client/assets/{Shield01-BodC6YjW.js → Shield01-BYpsgCVA.js} +1 -1
- package/dist/client/assets/{Terminal-BHkLJhoR.js → Terminal-ZymOmGb9.js} +1 -1
- package/dist/client/assets/{Tool01-DlbILfZg.js → Tool01-Doogi-IK.js} +1 -1
- package/dist/client/assets/{Trash01-CYMRq_nY.js → Trash01-Cs72bTP6.js} +1 -1
- package/dist/client/assets/{Upload01-BQ7z5iC5.js → Upload01-ByUvmqDm.js} +1 -1
- package/dist/client/assets/{Users03-DEpvReeu.js → Users03-CGvJARf5.js} +1 -1
- package/dist/client/assets/{X-BT_y3J3a.js → X-CD9ZB6hw.js} +1 -1
- package/dist/client/assets/{XClose-C-H07PEn.js → XClose-BxUlnJUs.js} +1 -1
- package/dist/client/assets/{Zap-BY3Hn1l9.js → Zap-0WHKFRes.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-DbwllQSw.js → agent-connections-preview-BEmLqtx5.js} +1 -1
- package/dist/client/assets/agent-detail-jg81y7ZA.js +2 -0
- package/dist/client/assets/agents-PmHD6Xb_.js +1 -0
- package/dist/client/assets/{ai-providers-logos-DGTpC_MW.js → ai-providers-logos-C_voEDmL.js} +1 -1
- package/dist/client/assets/{alert-dialog-BqCiJDa8.js → alert-dialog-qmvoIx9J.js} +3 -3
- package/dist/client/assets/{auth-catchall-DPwCqyhO.js → auth-catchall-ByYcT8WN.js} +1 -1
- package/dist/client/assets/automation-detail-C1-q2EzY.js +1 -0
- package/dist/client/assets/automations-C9eao1B2.js +1 -0
- package/dist/client/assets/avatar-DeGeJRAR.js +1 -0
- package/dist/client/assets/badge-Cjjl_FHP.js +1 -0
- package/dist/client/assets/{binder-CuBUxi11.js → binder-C1eSZFT4.js} +1 -1
- package/dist/client/assets/{breadcrumb-BWfepeob.js → breadcrumb-C8hDXS86.js} +1 -1
- package/dist/client/assets/{card-gfMzoGpr.js → card-CoyaoT6W.js} +1 -1
- package/dist/client/assets/{checkbox-DygphnIU.js → checkbox-D5DFx9da.js} +1 -1
- package/dist/client/assets/{collapsible-BJo6q_NJ.js → collapsible-DcaWkNTt.js} +1 -1
- package/dist/client/assets/{collection-detail-fTigPh-V.js → collection-detail-Dsgpohom.js} +3 -3
- package/dist/client/assets/{collection-display-button-C42ZnuS7.js → collection-display-button-BcIJp1SX.js} +1 -1
- package/dist/client/assets/{collection-search-Dzoe9W56.js → collection-search-nKZEJ_r3.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Bka5CUqj.js → collection-table-wrapper-Bq15EL3p.js} +1 -1
- package/dist/client/assets/{collection-tabs-D9qLvNTu.js → collection-tabs-qLP6ozkD.js} +1 -1
- package/dist/client/assets/{command-D_HBfmpj.js → command-Bk-fXiVb.js} +1 -1
- package/dist/client/assets/connection-card-BYUbg7iO.js +1 -0
- package/dist/client/assets/connection-detail-Zdtj4TKi.js +1 -0
- package/dist/client/assets/connections-CMaQr-QY.js +1 -0
- package/dist/client/assets/{constants-D5QZg84_.js → constants-DclZTqHf.js} +1 -1
- package/dist/client/assets/{context-CGMT963w.js → context-BFi-zuf6.js} +12 -12
- package/dist/client/assets/{create-organization-dialog-CeMf7qju.js → create-organization-dialog-pXQ89_sr.js} +1 -1
- package/dist/client/assets/{create-project-dialog-Bs_mS8aj.js → create-project-dialog-M-dgrV_c.js} +1 -1
- package/dist/client/assets/{danger-gTdMMqBl.js → danger-DqsrtWLB.js} +1 -1
- package/dist/client/assets/{danger-zone-BE94J4G-.js → danger-zone-BhDM5wIc.js} +1 -1
- package/dist/client/assets/{dependencies-DQ9gMDrw.js → dependencies-CPYZFhhf.js} +1 -1
- package/dist/client/assets/dialog-DzGwvQ_K.js +1 -0
- package/dist/client/assets/drawer-CAX2URBi.js +1 -0
- package/dist/client/assets/{dropdown-menu-DE2pKopg.js → dropdown-menu-BcNYk9_F.js} +1 -1
- package/dist/client/assets/dynamic-plugin-layout-D0dkPO22.js +1 -0
- package/dist/client/assets/editable-task-title-BR-xQ-UT.js +16 -0
- package/dist/client/assets/{empty-state-BjCXvoyS.js → empty-state-BuGXY27l.js} +1 -1
- package/dist/client/assets/{empty-state-Bk9Z7Q-U.js → empty-state-CGSu9IQ9.js} +1 -1
- package/dist/client/assets/{env-vars-editor-BjeFjhEe.js → env-vars-editor-VoVbIy9n.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CZxT3XNH.js → extract-connection-data-DhU56Zd0.js} +1 -1
- package/dist/client/assets/{file-browser-C4MCCicp.js → file-browser-DIaRK0us.js} +2 -2
- package/dist/client/assets/{form-tOTNzCZe.js → form-DBjkdSps.js} +1 -1
- package/dist/client/assets/{general-DOjbT8YE.js → general-DCfBGmuh.js} +1 -1
- package/dist/client/assets/{generate-id-kfQDJb0K.js → generate-id-DRuK_WRM.js} +1 -1
- package/dist/client/assets/{grid-view-CM2kDBxz.js → grid-view-DsY2qZrB.js} +1 -1
- package/dist/client/assets/{home-rO4pkzPH.js → home-C52P_wmy.js} +1 -1
- package/dist/client/assets/{index-BLtI6TU9.js → index-BLNBD7Tl.js} +1 -1
- package/dist/client/assets/index-BObCXgKJ.js +1 -0
- package/dist/client/assets/{index-DyL93sTY.js → index-BzPzEjOV.js} +1 -1
- package/dist/client/assets/index-COFAW4F5.js +1 -0
- package/dist/client/assets/index-CubWD7-P.css +1 -0
- package/dist/client/assets/index-DMmNh7jR.js +218 -0
- package/dist/client/assets/index-DYAF-Vgt.js +1 -0
- package/dist/client/assets/index-DiczHAor.js +1 -0
- package/dist/client/assets/{index-DjVQ8cwy.js → index-Dumm3WtY.js} +2 -2
- package/dist/client/assets/{index-Bwlq4qOs.js → index-PFtbLrE4.js} +1 -1
- package/dist/client/assets/{index-DiHcYCxZ.js → index-bHgla3gL.js} +1 -1
- package/dist/client/assets/index-hmkE8HuP.js +1 -0
- package/dist/client/assets/{infiniteQueryObserver-XS4LWR6q.js → infiniteQueryObserver-CZ8w6Ao-.js} +1 -1
- package/dist/client/assets/input-Bt_nejZh.js +1 -0
- package/dist/client/assets/{integration-icon-C9GR_8Ea.js → integration-icon-Dyr7fOYU.js} +1 -1
- package/dist/client/assets/{label-DJvdRQ2A.js → label-DTNkd20e.js} +1 -1
- package/dist/client/assets/layout-Ck4QNb1R.js +1 -0
- package/dist/client/assets/{layout-10Sxtyop.js → layout-VG2uM_nk.js} +1 -1
- package/dist/client/assets/login-x4JJuKeA.js +1 -0
- package/dist/client/assets/{logo-upload-iqCQyRXD.js → logo-upload-7WcycT9q.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-C3qFwvPf.js → mcp-app-renderer-hLmmzHl_.js} +1 -1
- package/dist/client/assets/{mcp-server-card-DCDS8v4f.js → mcp-server-card-CwYAe4vO.js} +1 -1
- package/dist/client/assets/mcp-server-detail-CjZvaa-f.js +2 -0
- package/dist/client/assets/{members-CykhAYWe.js → members-Sgl6kVS6.js} +1 -1
- package/dist/client/assets/{monaco-editor-DQf5JSy_.js → monaco-editor-BS1-hh4n.js} +4 -4
- package/dist/client/assets/monitoring-DWB-fw7M.js +4 -0
- package/dist/client/assets/monitoring-dashboard-edit-DdNrWKBz.js +1 -0
- package/dist/client/assets/{monitoring-dashboard-view-CXCG5P_H.js → monitoring-dashboard-view-BUxqPLpn.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-BfoeteQX.js → monitoring-stats-row-CiWvBCYV.js} +2 -2
- package/dist/client/assets/{oauth-callback-CXrwzvh_.js → oauth-callback-7ed5Z9Xs.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-bQZvbhnr.js → oauth-callback-ai-provider-qEm-Q5-E.js} +1 -1
- package/dist/client/assets/{org-ai-providers-4gYTufEL.js → org-ai-providers-CUAlOa9f.js} +1 -1
- package/dist/client/assets/page-BQl7Ie3w.js +1 -0
- package/dist/client/assets/page-DfQnSuW1.js +1 -0
- package/dist/client/assets/{plugin-empty-state-cb7GbeKy.js → plugin-empty-state-DUosCqGd.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CEvZCNFj.js → plugin-empty-state-qFDP0Nr2.js} +1 -1
- package/dist/client/assets/{plugin-header-C4ZfQdcs.js → plugin-header-BeGFVTX4.js} +1 -1
- package/dist/client/assets/{plugin-header-Do_HgCfI.js → plugin-header-CJlxZY-i.js} +1 -1
- package/dist/client/assets/plugins-CzL725OF.js +1 -0
- package/dist/client/assets/popover-CF2iI6mL.js +1 -0
- package/dist/client/assets/project-app-view-lqZ02NJN.js +1 -0
- package/dist/client/assets/project-layout-CBbKmowd.js +1 -0
- package/dist/client/assets/{project-plugins-C18qk0lc.js → project-plugins-DqmH9sWQ.js} +1 -1
- package/dist/client/assets/{projects-list-CtvT2y9h.js → projects-list-Bz_1RhAg.js} +1 -1
- package/dist/client/assets/{registry-layout-Cvu5zKVR.js → registry-layout-6H7s-msc.js} +2 -2
- package/dist/client/assets/{registry-utils-Bx7--rIH.js → registry-utils-DZHZD5gP.js} +1 -1
- package/dist/client/assets/{reset-password-CSswd9M3.js → reset-password-3HgT81EI.js} +1 -1
- package/dist/client/assets/{resizable-B0HQ1vuq.js → resizable-BwEPpKFX.js} +1 -1
- package/dist/client/assets/{save-actions-BxTuQTa4.js → save-actions-Z-_7bu1u.js} +1 -1
- package/dist/client/assets/scroll-area-CwrVaRUF.js +1 -0
- package/dist/client/assets/select-hHfKwVbN.js +1 -0
- package/dist/client/assets/select-virtual-mcp-DsImheli.js +1 -0
- package/dist/client/assets/shell-layout-Bh0wZbL8.js +3 -0
- package/dist/client/assets/{sidebar-settings-pZmI7pGH.js → sidebar-settings-U5rAu7py.js} +1 -1
- package/dist/client/assets/{skeleton-NLo71_Sb.js → skeleton-BvrwcS3X.js} +1 -1
- package/dist/client/assets/spinner-CSLYV8gq.js +1 -0
- package/dist/client/assets/{store-invite-CP9PWG-2.js → store-invite-z_eVOBRF.js} +1 -1
- package/dist/client/assets/switch-CoYIum7D.js +1 -0
- package/dist/client/assets/{table-BK1bAac3.js → table-BSLV9H8I.js} +1 -1
- package/dist/client/assets/tabs-sTqc1_U2.js +1 -0
- package/dist/client/assets/{task-status-DCsPkppQ.js → task-status-CrO2oj_v.js} +37 -37
- package/dist/client/assets/tasks-CazLoC59.js +1 -0
- package/dist/client/assets/tasks-panel-DBJx0hs6.js +1 -0
- package/dist/client/assets/textarea-CgJ5x-hs.js +1 -0
- package/dist/client/assets/{time-range-picker-CEhZhu7c.js → time-range-picker-BCm8UHQI.js} +1 -1
- package/dist/client/assets/toggle-group-C20N8vss.js +1 -0
- package/dist/client/assets/{tools-list-DGVVcYEB.js → tools-list-JehNbMf9.js} +1 -1
- package/dist/client/assets/tooltip-DHJtaI_Z.js +1 -0
- package/dist/client/assets/{topbar-portal-DLbOrsQP.js → topbar-portal-jewy4fLu.js} +1 -1
- package/dist/client/assets/{types-BOmhR0hZ.js → types-BtTmvTe4.js} +1 -1
- package/dist/client/assets/{use-automations-CPlNdxed.js → use-automations-D-X6Oij9.js} +1 -1
- package/dist/client/assets/{use-collections-Le9CzDbY.js → use-collections-DhavVshD.js} +1 -1
- package/dist/client/assets/{use-connection-CNeKPAtP.js → use-connection-CVlyXslk.js} +1 -1
- package/dist/client/assets/{use-copy-CR_0d0zs.js → use-copy-DkDz3lds.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BOxl7MdZ.js → use-create-virtual-mcp-DZAv89rZ.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CbBHKCjw.js → use-infinite-scroll-j2WybGGN.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-Ckutd61H.js → use-install-from-registry-Ch6GOwHv.js} +1 -1
- package/dist/client/assets/{use-list-state-DrSbpG8C.js → use-list-state-Baq-X1EV.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-D4XXlnov.js → use-mcp-prompts-BDRKUj7D.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-BueR0w1E.js → use-mcp-resources-BxIahbOo.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CFyULGGP.js → use-mcp-tools-kv4r4Zvn.js} +1 -1
- package/dist/client/assets/{use-members-Bgz9FSqE.js → use-members-Coq2XO1k.js} +1 -1
- package/dist/client/assets/{use-project-RpN1fut9.js → use-project-XBmxO4XX.js} +1 -1
- package/dist/client/assets/{use-store-discovery-BS96E_Li.js → use-store-discovery-D-xa6Q86.js} +1 -1
- package/dist/client/assets/use-view-mode-CdGajc1j.js +1 -0
- package/dist/client/assets/{use-virtual-mcp-DGT5zflo.js → use-virtual-mcp-DCxXK_bv.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-H-W7n7En.js +1 -0
- package/dist/client/assets/{useMutation-Betr8yis.js → useMutation-DrLoVqQ7.js} +1 -1
- package/dist/client/assets/useQuery-B-AaJTeZ.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-Czq4y4BP.js +1 -0
- package/dist/client/assets/{user-ChA79mrb.js → user-8V0wpye0.js} +1 -1
- package/dist/client/assets/workflow-Bb3JE-XH.js +1 -0
- package/dist/client/index.html +3 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/node_modules/pg-cloudflare/README.md +112 -0
- package/dist/server/node_modules/pg-cloudflare/dist/empty.d.ts +2 -0
- package/dist/server/node_modules/pg-cloudflare/dist/empty.js +6 -0
- package/dist/server/node_modules/pg-cloudflare/dist/empty.js.map +1 -0
- package/dist/server/node_modules/pg-cloudflare/dist/index.d.ts +31 -0
- package/dist/server/node_modules/pg-cloudflare/dist/index.js +152 -0
- package/dist/server/node_modules/pg-cloudflare/dist/index.js.map +1 -0
- package/dist/server/node_modules/pg-cloudflare/esm/index.mjs +3 -0
- package/dist/server/node_modules/pg-cloudflare/package.json +39 -0
- package/dist/server/node_modules/pg-cloudflare/src/empty.ts +3 -0
- package/dist/server/node_modules/pg-cloudflare/src/index.ts +166 -0
- package/dist/server/node_modules/pg-cloudflare/src/types.d.ts +25 -0
- 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-pool/LICENSE +21 -0
- 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/node_modules/pg-protocol/LICENSE +21 -0
- package/dist/server/node_modules/pg-protocol/README.md +3 -0
- package/dist/server/node_modules/pg-protocol/dist/b.d.ts +1 -0
- package/dist/server/node_modules/pg-protocol/dist/b.js +23 -0
- package/dist/server/node_modules/pg-protocol/dist/b.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.d.ts +15 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js +55 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.d.ts +16 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js +81 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.d.ts +1 -0
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js +530 -0
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/index.d.ts +6 -0
- package/dist/server/node_modules/pg-protocol/dist/index.js +15 -0
- package/dist/server/node_modules/pg-protocol/dist/index.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/messages.d.ts +162 -0
- package/dist/server/node_modules/pg-protocol/dist/messages.js +160 -0
- package/dist/server/node_modules/pg-protocol/dist/messages.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts +1 -0
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js +252 -0
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/parser.d.ts +24 -0
- package/dist/server/node_modules/pg-protocol/dist/parser.js +324 -0
- package/dist/server/node_modules/pg-protocol/dist/parser.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/serializer.d.ts +42 -0
- package/dist/server/node_modules/pg-protocol/dist/serializer.js +189 -0
- package/dist/server/node_modules/pg-protocol/dist/serializer.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/esm/index.js +11 -0
- package/dist/server/node_modules/pg-protocol/package.json +45 -0
- package/dist/server/node_modules/pg-protocol/src/b.ts +25 -0
- package/dist/server/node_modules/pg-protocol/src/buffer-reader.ts +58 -0
- package/dist/server/node_modules/pg-protocol/src/buffer-writer.ts +85 -0
- package/dist/server/node_modules/pg-protocol/src/inbound-parser.test.ts +575 -0
- package/dist/server/node_modules/pg-protocol/src/index.ts +11 -0
- package/dist/server/node_modules/pg-protocol/src/messages.ts +262 -0
- package/dist/server/node_modules/pg-protocol/src/outbound-serializer.test.ts +276 -0
- package/dist/server/node_modules/pg-protocol/src/parser.ts +413 -0
- package/dist/server/node_modules/pg-protocol/src/serializer.ts +274 -0
- package/dist/server/node_modules/pg-protocol/src/testing/buffer-list.ts +67 -0
- package/dist/server/node_modules/pg-protocol/src/testing/test-buffers.ts +166 -0
- package/dist/server/node_modules/pg-protocol/src/types/chunky.d.ts +1 -0
- package/dist/server/node_modules/pg-types/.travis.yml +7 -0
- package/dist/server/node_modules/pg-types/Makefile +14 -0
- package/dist/server/node_modules/pg-types/README.md +75 -0
- package/dist/server/node_modules/pg-types/index.d.ts +137 -0
- package/dist/server/node_modules/pg-types/index.js +47 -0
- package/dist/server/node_modules/pg-types/index.test-d.ts +21 -0
- package/dist/server/node_modules/pg-types/lib/arrayParser.js +11 -0
- package/dist/server/node_modules/pg-types/lib/binaryParsers.js +257 -0
- package/dist/server/node_modules/pg-types/lib/builtins.js +73 -0
- package/dist/server/node_modules/pg-types/lib/textParsers.js +215 -0
- package/dist/server/node_modules/pg-types/package.json +42 -0
- package/dist/server/node_modules/pg-types/test/index.js +24 -0
- package/dist/server/node_modules/pg-types/test/types.js +597 -0
- package/dist/server/node_modules/pgpass/README.md +74 -0
- package/dist/server/node_modules/pgpass/lib/helper.js +233 -0
- package/dist/server/node_modules/pgpass/lib/index.js +23 -0
- package/dist/server/node_modules/pgpass/package.json +41 -0
- package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
- package/dist/server/node_modules/postgres-array/index.js +97 -0
- package/dist/server/node_modules/postgres-array/license +21 -0
- package/dist/server/node_modules/postgres-array/package.json +35 -0
- package/dist/server/node_modules/postgres-array/readme.md +43 -0
- package/dist/server/node_modules/postgres-date/index.js +116 -0
- package/dist/server/node_modules/postgres-date/license +21 -0
- package/dist/server/node_modules/postgres-date/package.json +33 -0
- package/dist/server/node_modules/postgres-date/readme.md +49 -0
- package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
- package/dist/server/node_modules/postgres-interval/index.js +125 -0
- package/dist/server/node_modules/postgres-interval/license +21 -0
- package/dist/server/node_modules/postgres-interval/package.json +36 -0
- package/dist/server/node_modules/postgres-interval/readme.md +48 -0
- package/dist/server/node_modules/split2/LICENSE +13 -0
- package/dist/server/node_modules/split2/README.md +85 -0
- package/dist/server/node_modules/split2/bench.js +27 -0
- package/dist/server/node_modules/split2/index.js +141 -0
- package/dist/server/node_modules/split2/package.json +39 -0
- package/dist/server/node_modules/split2/test.js +409 -0
- package/dist/server/node_modules/xtend/.jshintrc +30 -0
- package/dist/server/node_modules/xtend/LICENSE +20 -0
- package/dist/server/node_modules/xtend/README.md +32 -0
- package/dist/server/node_modules/xtend/immutable.js +19 -0
- package/dist/server/node_modules/xtend/mutable.js +17 -0
- package/dist/server/node_modules/xtend/package.json +55 -0
- package/dist/server/node_modules/xtend/test.js +103 -0
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/LayoutLeft-CbUmiI7I.js +0 -1
- package/dist/client/assets/agent-detail-DqMa-yjy.js +0 -2
- package/dist/client/assets/agents-DXD0J3OW.js +0 -1
- package/dist/client/assets/automation-detail-bmoX3GK-.js +0 -1
- package/dist/client/assets/automations-Dp1WjxxK.js +0 -1
- package/dist/client/assets/avatar-BoRF-Me1.js +0 -1
- package/dist/client/assets/badge-DIWKuwVU.js +0 -1
- package/dist/client/assets/connection-card-DuHVLZ35.js +0 -1
- package/dist/client/assets/connection-detail-vcbLbssZ.js +0 -1
- package/dist/client/assets/connections-14pDMsUe.js +0 -1
- package/dist/client/assets/dialog-B8WS5FOh.js +0 -1
- package/dist/client/assets/dynamic-plugin-layout-yMvA298P.js +0 -1
- package/dist/client/assets/editable-task-title-oggBOZ_d.js +0 -16
- package/dist/client/assets/index-B09Yemt1.js +0 -1
- package/dist/client/assets/index-CAsAeYNN.css +0 -1
- package/dist/client/assets/index-CMImT9Gt.js +0 -1
- package/dist/client/assets/index-D-6rbOIG.js +0 -1
- package/dist/client/assets/index-DnJ6a24w.js +0 -218
- package/dist/client/assets/index-hCeFdkUk.js +0 -1
- package/dist/client/assets/index-qrpgIqks.js +0 -1
- package/dist/client/assets/input-BBKBJVKe.js +0 -1
- package/dist/client/assets/layout-BjyFY_1R.js +0 -1
- package/dist/client/assets/login-ClPbfjlJ.js +0 -1
- package/dist/client/assets/mcp-server-detail-lOR_wUNJ.js +0 -2
- package/dist/client/assets/monitoring-BPuhRE0m.js +0 -4
- package/dist/client/assets/monitoring-dashboard-edit-BVtLOBNe.js +0 -1
- package/dist/client/assets/page-CCXJyUyN.js +0 -1
- package/dist/client/assets/page-DB3QLlpA.js +0 -1
- package/dist/client/assets/plugins-pEgOY1Nz.js +0 -1
- package/dist/client/assets/popover-vDURg2rv.js +0 -1
- package/dist/client/assets/project-app-view-DfCIvrF7.js +0 -1
- package/dist/client/assets/project-layout-CkMdq05b.js +0 -1
- package/dist/client/assets/scroll-area-dsTSFUPi.js +0 -1
- package/dist/client/assets/select-Bbaj2HCW.js +0 -1
- package/dist/client/assets/select-virtual-mcp-CZJoA7HG.js +0 -1
- package/dist/client/assets/sheet-B_-2ygzJ.js +0 -1
- package/dist/client/assets/shell-layout-Ca5Bbhzi.js +0 -3
- package/dist/client/assets/spinner-EdHFCjIL.js +0 -1
- package/dist/client/assets/switch-bfk4EFAk.js +0 -1
- package/dist/client/assets/tabs-aIY_aIUV.js +0 -1
- package/dist/client/assets/tasks-Dw1i-69W.js +0 -1
- package/dist/client/assets/tasks-panel-CEAgXi7r.js +0 -1
- package/dist/client/assets/textarea-lF0m7xkk.js +0 -1
- package/dist/client/assets/toggle-group-Dak-s1p3.js +0 -1
- package/dist/client/assets/tooltip-Csc3oeTz.js +0 -1
- package/dist/client/assets/use-mobile-Y3tADOOl.js +0 -1
- package/dist/client/assets/use-view-mode-BeRbE5Df.js +0 -1
- package/dist/client/assets/useInfiniteQuery-ChOuKh6v.js +0 -1
- package/dist/client/assets/useQuery-mzOsnjYJ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DFs2FFlW.js +0 -1
- package/dist/client/assets/workflow-CBDfcQFP.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
- /package/dist/server/node_modules/{pg → pg-cloudflare}/LICENSE +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as e,h as n}from"./index-
|
|
1
|
+
import{r,j as e,h as n}from"./index-DMmNh7jR.js";import{i as l}from"./Loading01-D0sCOwf7.js";function d(){const[t,c]=r.useState(null),[i,a]=r.useState(!1);return r.useEffect(()=>{(async()=>{try{const s=await n();if(!s.success){c(s.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(s){c(s instanceof Error?s.message:String(s)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[i&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!i&&!t&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(l,{size:32,className:"animate-spin text-primary"})}),t&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:t?"Authentication Failed":i?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:t?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:t}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):i?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as e}from"./index-
|
|
1
|
+
import{r,j as e}from"./index-DMmNh7jR.js";import{i as d}from"./Loading01-D0sCOwf7.js";function h(){const[t,i]=r.useState("loading"),[o,l]=r.useState(null),c=r.useRef(!1);return c.current||(c.current=!0,queueMicrotask(()=>{try{const s=new URLSearchParams(window.location.search),a=s.get("code"),n=s.get("state");if(!a||!n)throw new Error("Missing code or state parameter");if(window.opener)window.opener.postMessage({type:"AI_PROVIDER_OAUTH_CALLBACK",code:a,stateToken:n},window.location.origin),i("success"),setTimeout(()=>window.close(),1500);else throw new Error("No opener window found")}catch(s){console.error("OAuth callback error:",s),l(s instanceof Error?s.message:String(s)),i("error"),setTimeout(()=>window.close(),3e3)}})),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[t==="success"&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),t==="loading"&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(d,{size:32,className:"animate-spin text-primary"})}),t==="error"&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:t==="error"?"Authentication Failed":t==="success"?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:t==="error"?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:o}),e.jsx("p",{className:"mt-2",children:"This window will close automatically."})]}):t==="success"?e.jsx("p",{children:"Authentication complete. This window will close automatically."}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as A,c as z,z as le,e as ae,d as ce,g as de,u as G,w as ee,v as D,K as U,j as s,B as V,D as te,E as ue}from"./index-DnJ6a24w.js";import{u as me}from"./index-B09Yemt1.js";import{u as fe}from"./useQuery-mzOsnjYJ.js";import{u as H}from"./useMutation-Betr8yis.js";import{i as he}from"./AlertCircle-QngH9BVd.js";import{i as pe}from"./EyeOff-rTYDCZUH.js";import{s as xe}from"./Eye-Cqad01Et.js";import{i as ge}from"./Key01-V3zgT2bk.js";import{s as ve}from"./Trash01-CYMRq_nY.js";import{C as je}from"./card-gfMzoGpr.js";import{I as X}from"./input-BBKBJVKe.js";import{a as J,T as ye}from"./toggle-group-Dak-s1p3.js";import{S as se}from"./skeleton-NLo71_Sb.js";import{A as Ce}from"./avatar-BoRF-Me1.js";import{b as ne,P as re,a as oe}from"./popover-vDURg2rv.js";import{a as Ne,b as be}from"./ai-providers-logos-DGTpC_MW.js";import{u as Y,a as Z}from"./constants-D5QZg84_.js";import{f as _e}from"./formatDistanceToNow-Cb2QZZJn.js";const Se=({size:t=24,color:e="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"M9 2v2m6-2v2M9 20v2m6-2v2m5-13h2m-2 5h2M2 9h2m-2 5h2m4.8 6h6.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 17.72 20 16.88 20 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C17.72 4 16.88 4 15.2 4H8.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C4 6.28 4 7.12 4 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C6.28 20 7.12 20 8.8 20Zm1.8-5h2.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C15 14.24 15 13.96 15 13.4v-2.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 9 13.96 9 13.4 9h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 9.76 9 10.04 9 10.6v2.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C9.76 15 10.04 15 10.6 15Z"}));Se.displayName="CpuChip01";const ie=({size:t=24,color:e="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"M22 10H2m0-1.8v7.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 19 4.08 19 5.2 19h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 17.48 22 16.92 22 15.8V8.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 5 19.92 5 18.8 5H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 6.52 2 7.08 2 8.2Z"}));ie.displayName="CreditCard01";const Ae={devMode:!1,toolApprovalLevel:"none",enableNotifications:typeof Notification<"u",experimentalAutomations:!1};function it(){const t=z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=le.preferences(),t[0]=e):e=t[0],me(e,Ee)}function Ee(t){return{...Ae,...t}}const Ie=new Set(["account.profile","account.preferences","org.general","org.plugins","org.ai-providers","org.billing","org.members"]);function we(t){return t?Ie.has(t):!1}function lt(){const t=z.c(17),e=ae();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const c=ce(n);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const{org:i,project:d}=de(r);let a;t[2]!==c.settings?(a=we(c.settings)?c.settings:void 0,t[2]=c.settings,t[3]=a):a=t[3];const l=a,f=!!l;let u;t[4]!==e||t[5]!==i||t[6]!==d?(u=x=>{!i||!d||e({to:"/$org/$project",params:{org:i,project:d},search:{settings:x}})},t[4]=e,t[5]=i,t[6]=d,t[7]=u):u=t[7];const g=u;let m;t[8]!==e||t[9]!==i||t[10]!==d?(m=()=>{!i||!d||e({to:"/$org/$project",params:{org:i,project:d},search:{}})},t[8]=e,t[9]=i,t[10]=d,t[11]=m):m=t[11];const p=m,h=l??"account.preferences";let C;return t[12]!==p||t[13]!==f||t[14]!==g||t[15]!==h?(C={isOpen:f,activeSection:h,open:g,close:p},t[12]=p,t[13]=f,t[14]=g,t[15]=h,t[16]=C):C=t[16],C}function Pe(t){const e=z.c(3),{error:n}=t;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(he,{size:16}),e[0]=c):c=e[0];let r;return e[1]!==n.message?(r=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load AI providers: ",n.message]})]}),e[1]=n.message,e[2]=r):r=e[2],r}function ke(t){const e=z.c(9),{keys:n,onDelete:c,isDeleting:r}=t;let i;if(e[0]!==r||e[1]!==n||e[2]!==c){let a;e[4]!==r||e[5]!==c?(a=l=>s.jsxs("div",{className:"flex items-center justify-between p-2 rounded-md bg-muted/50 text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[s.jsx(ge,{size:14,className:"text-muted-foreground shrink-0"}),s.jsx("span",{className:"font-medium truncate",children:l.label}),s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["added ",_e(new Date(l.createdAt))," ago"]})]}),s.jsx("div",{onClick:Oe,children:s.jsxs(ne,{children:[s.jsx(re,{asChild:!0,children:s.jsx(V,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",disabled:r,children:s.jsx(ve,{size:14})})}),s.jsx(oe,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Delete this key?"}),s.jsx("div",{className:"flex gap-2",children:s.jsx(V,{variant:"destructive",size:"xs",onClick:()=>c(l.id),disabled:r,children:"Delete"})})]})})]})})]},l.id),e[4]=r,e[5]=c,e[6]=a):a=e[6],i=n.map(a),e[0]=r,e[1]=n,e[2]=c,e[3]=i}else i=e[3];let d;return e[7]!==i?(d=s.jsx("div",{className:"flex flex-col gap-2 mt-4",children:i}),e[7]=i,e[8]=d):d=e[8],d}function Oe(t){return t.stopPropagation()}function Te(t){const e=z.c(52),{providerId:n,onCancel:c,onSuccess:r}=t,{locator:i,org:d}=G();let a;e[0]!==d.id?(a={connectionId:Z,orgId:d.id},e[0]=d.id,e[1]=a):a=e[1];const l=Y(a),f=ee(),[u,g]=A.useState(""),[m,p]=A.useState(""),[h,C]=A.useState(!1);let x;e[2]!==m||e[3]!==l||e[4]!==u||e[5]!==n?(x=async()=>{await l.callTool({name:"AI_PROVIDER_KEY_CREATE",arguments:{providerId:n,label:u||"Personal key",apiKey:m}})},e[2]=m,e[3]=l,e[4]=u,e[5]=n,e[6]=x):x=e[6];let v;e[7]!==i||e[8]!==r||e[9]!==f?(v=()=>{f.invalidateQueries({queryKey:U.aiProviderKeys(i)}),f.invalidateQueries({queryKey:U.aiProviders(i)}),D.success("Key saved successfully"),r()},e[7]=i,e[8]=r,e[9]=f,e[10]=v):v=e[10];let b;e[11]!==x||e[12]!==v?(b={mutationFn:x,onSuccess:v,onError:Ke},e[11]=x,e[12]=v,e[13]=b):b=e[13];const{mutate:N,isPending:j,error:_}=H(b);let o;e[14]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Label"}),e[14]=o):o=e[14];let S;e[15]===Symbol.for("react.memo_cache_sentinel")?(S=W=>g(W.target.value),e[15]=S):S=e[15];let y;e[16]!==u?(y=s.jsxs("div",{className:"space-y-1",children:[o,s.jsx(X,{placeholder:"e.g. Personal key",value:u,onChange:S,className:"h-8 text-sm"})]}),e[16]=u,e[17]=y):y=e[17];let E;e[18]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"API Key"}),e[18]=E):E=e[18];const K=h?"text":"password";let R;e[19]===Symbol.for("react.memo_cache_sentinel")?(R=W=>p(W.target.value),e[19]=R):R=e[19];let I;e[20]!==m||e[21]!==K?(I=s.jsx(X,{type:K,placeholder:"sk-...",value:m,onChange:R,className:"h-8 text-sm pr-8"}),e[20]=m,e[21]=K,e[22]=I):I=e[22];let w;e[23]!==h?(w=()=>C(!h),e[23]=h,e[24]=w):w=e[24];let P;e[25]!==h?(P=h?s.jsx(pe,{size:14}):s.jsx(xe,{size:14}),e[25]=h,e[26]=P):P=e[26];let L;e[27]!==w||e[28]!==P?(L=s.jsx("button",{type:"button",onClick:w,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:P}),e[27]=w,e[28]=P,e[29]=L):L=e[29];let F;e[30]!==I||e[31]!==L?(F=s.jsxs("div",{className:"space-y-1",children:[E,s.jsxs("div",{className:"relative",children:[I,L]})]}),e[30]=I,e[31]=L,e[32]=F):F=e[32];let k;e[33]!==_?(k=_&&s.jsx("p",{className:"text-xs text-destructive",children:_.message}),e[33]=_,e[34]=k):k=e[34];let O;e[35]!==j||e[36]!==c?(O=s.jsx(V,{variant:"ghost",size:"sm",onClick:c,disabled:j,children:"Cancel"}),e[35]=j,e[36]=c,e[37]=O):O=e[37];let $;e[38]!==N?($=()=>N(),e[38]=N,e[39]=$):$=e[39];const T=!m||j,M=j?"Saving...":"Save Key";let q;e[40]!==$||e[41]!==T||e[42]!==M?(q=s.jsx(V,{size:"sm",onClick:$,disabled:T,children:M}),e[40]=$,e[41]=T,e[42]=M,e[43]=q):q=e[43];let B;e[44]!==O||e[45]!==q?(B=s.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[O,q]}),e[44]=O,e[45]=q,e[46]=B):B=e[46];let Q;return e[47]!==F||e[48]!==k||e[49]!==B||e[50]!==y?(Q=s.jsxs("div",{className:"space-y-3",children:[y,F,k,B]}),e[47]=F,e[48]=k,e[49]=B,e[50]=y,e[51]=Q):Q=e[51],Q}function Ke(t){D.error(`Failed to save key: ${t.message}`)}function Re(t){const e=z.c(44),{keyId:n,providerId:c,onCancel:r}=t,{org:i}=G();let d;e[0]!==i.id?(d={connectionId:Z,orgId:i.id},e[0]=i.id,e[1]=d):d=e[1];const a=Y(d),[l,f]=A.useState("10"),[u,g]=A.useState("usd");let m;e[2]!==l||e[3]!==a||e[4]!==u||e[5]!==n||e[6]!==c?(m=async()=>{const T=Math.round(parseFloat(l)*100),M=await a.callTool({name:"AI_PROVIDER_TOPUP_URL",arguments:{providerId:c,keyId:n,amountCents:T,currency:u}});if(M?.isError)throw new Error(M.content?.[0]?.text??"Failed to get top-up URL");return M.structuredContent?.url},e[2]=l,e[3]=a,e[4]=u,e[5]=n,e[6]=c,e[7]=m):m=e[7];let p;e[8]!==r?(p=T=>{T&&window.open(T,"_blank","noopener,noreferrer"),r()},e[8]=r,e[9]=p):p=e[9];let h;e[10]!==m||e[11]!==p?(h={mutationFn:m,onSuccess:p,onError:$e},e[10]=m,e[11]=p,e[12]=h):h=e[12];const{mutate:C,isPending:x}=H(h),v=parseFloat(l),b=!isNaN(v)&&v>=1,N=u==="brl"?"R$":"$";let j;e[13]!==N?(j=s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-xs text-muted-foreground select-none",children:N}),e[13]=N,e[14]=j):j=e[14];let _;e[15]===Symbol.for("react.memo_cache_sentinel")?(_=T=>f(T.target.value),e[15]=_):_=e[15];let o;e[16]!==l?(o=s.jsx(X,{type:"number",min:"1",step:"1",placeholder:"10",value:l,onChange:_,className:"h-8 text-sm pl-8"}),e[16]=l,e[17]=o):o=e[17];let S;e[18]!==j||e[19]!==o?(S=s.jsxs("div",{className:"relative flex-1",children:[j,o]}),e[18]=j,e[19]=o,e[20]=S):S=e[20];let y,E,K;e[21]===Symbol.for("react.memo_cache_sentinel")?(K=T=>{T&&g(T)},y=s.jsx(J,{value:"usd",className:"h-8 px-2 text-xs",children:"USD"}),E=s.jsx(J,{value:"brl",className:"h-8 px-2 text-xs",children:"BRL"}),e[21]=y,e[22]=E,e[23]=K):(y=e[21],E=e[22],K=e[23]);let R;e[24]!==u?(R=s.jsxs(ye,{type:"single",size:"sm",value:u,onValueChange:K,children:[y,E]}),e[24]=u,e[25]=R):R=e[25];let I;e[26]!==R||e[27]!==S?(I=s.jsxs("div",{className:"flex items-center gap-2",children:[S,R]}),e[26]=R,e[27]=S,e[28]=I):I=e[28];let w;e[29]!==x||e[30]!==r?(w=s.jsx(V,{variant:"ghost",size:"sm",onClick:r,disabled:x,children:"Cancel"}),e[29]=x,e[30]=r,e[31]=w):w=e[31];let P;e[32]!==C?(P=()=>C(),e[32]=C,e[33]=P):P=e[33];const L=!b||x,F=x?"Opening...":"Checkout";let k;e[34]!==P||e[35]!==L||e[36]!==F?(k=s.jsx(V,{size:"sm",onClick:P,disabled:L,children:F}),e[34]=P,e[35]=L,e[36]=F,e[37]=k):k=e[37];let O;e[38]!==w||e[39]!==k?(O=s.jsxs("div",{className:"flex justify-end gap-2",children:[w,k]}),e[38]=w,e[39]=k,e[40]=O):O=e[40];let $;return e[41]!==I||e[42]!==O?($=s.jsxs("div",{className:"space-y-3",children:[I,O]}),e[41]=I,e[42]=O,e[43]=$):$=e[43],$}function $e(t){D.error(`Top-up failed: ${t.message}`)}function Le(t){const e=z.c(26),{providerId:n}=t,{locator:c,org:r}=G();let i;e[0]!==r.id?(i={connectionId:Z,orgId:r.id},e[0]=r.id,e[1]=i):i=e[1];const d=Y(i);let a;e[2]!==c||e[3]!==n?(a=U.aiProviderCredits(c,n),e[2]=c,e[3]=n,e[4]=a):a=e[4];let l;e[5]!==d||e[6]!==n?(l=async()=>{const _=await d.callTool({name:"AI_PROVIDER_CREDITS",arguments:{providerId:n}});if(_?.isError)throw new Error(_.content?.[0]?.text??"Failed to fetch credits");return _.structuredContent??null},e[5]=d,e[6]=n,e[7]=l):l=e[7];let f;e[8]!==a||e[9]!==l?(f={queryKey:a,staleTime:6e4,queryFn:l},e[8]=a,e[9]=l,e[10]=f):f=e[10];const{data:u,isLoading:g,refetch:m,isFetching:p}=fe(f);let h;e[11]!==u?(h=u!=null?(u.balanceCents/100).toFixed(2):null,e[11]=u,e[12]=h):h=e[12];const C=h;let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("span",{className:"text-muted-foreground",children:"Balance:"}),e[13]=x):x=e[13];let v;e[14]!==C||e[15]!==p||e[16]!==g?(v=g||p?s.jsx(se,{className:"h-3 w-12 inline-block"}):C!=null?s.jsxs("span",{className:"font-medium tabular-nums",children:["$",C]}):s.jsx("span",{className:"text-muted-foreground",children:"—"}),e[14]=C,e[15]=p,e[16]=g,e[17]=v):v=e[17];let b;e[18]!==m?(b=()=>m(),e[18]=m,e[19]=b):b=e[19];let N;e[20]!==p||e[21]!==b?(N=s.jsx("button",{type:"button",onClick:b,disabled:p,className:"text-muted-foreground hover:text-foreground disabled:opacity-50 ml-0.5",title:"Refresh balance",children:"↻"}),e[20]=p,e[21]=b,e[22]=N):N=e[22];let j;return e[23]!==v||e[24]!==N?(j=s.jsxs("div",{className:"flex items-center gap-1.5 text-xs",onClick:Fe,children:[x,v,N]}),e[23]=v,e[24]=N,e[25]=j):j=e[25],j}function Fe(t){return t.stopPropagation()}function De({provider:t,keys:e}){const{locator:n,org:c}=G(),r=Y({connectionId:Z,orgId:c.id}),i=ee(),[d,a]=A.useState(!1),[l,f]=A.useState(!1),[u,g]=A.useState(null),[m,p]=A.useState(null),h=e.length>0,{mutate:C,isPending:x}=H({mutationFn:async o=>(await r.callTool({name:"AI_PROVIDER_KEY_DELETE",arguments:{keyId:o}}),o),onSuccess:o=>{m===o&&p(null),i.invalidateQueries({queryKey:U.aiProviderKeys(n)}),i.invalidateQueries({queryKey:U.aiProviders(n)}),i.invalidateQueries({queryKey:U.aiProviderModels(n,o)}),D.success("Key deleted")},onError:o=>{D.error(`Failed to delete key: ${o.message}`)}}),{mutate:v}=H({mutationFn:async({code:o,stateToken:S})=>{const y=await r.callTool({name:"AI_PROVIDER_OAUTH_EXCHANGE",arguments:{providerId:t.id,code:o,stateToken:S,label:"Connected via OAuth"}});if(y?.isError){const E=y.content?.[0]?.text??"OAuth exchange failed";throw new Error(E)}},onSuccess:()=>{i.invalidateQueries({queryKey:U.aiProviderKeys(n)}),i.invalidateQueries({queryKey:U.aiProviders(n)}),D.success(`${t.name} connected successfully`),f(!1),g(null)},onError:o=>{D.error(`OAuth connection failed: ${o.message}`),f(!1),g(null)}});A.useEffect(()=>{if(!l||!u)return;const o=y=>{if(y.origin===window.location.origin&&y.data?.type==="AI_PROVIDER_OAUTH_CALLBACK"){const{code:E,stateToken:K}=y.data;K===u?v({code:E,stateToken:K}):(console.error("State token mismatch"),D.error("Security check failed: State token mismatch"),f(!1),g(null))}};window.addEventListener("message",o);const S=setTimeout(()=>{l&&(f(!1),g(null),D.error("Connection timed out"))},12e4);return()=>{window.removeEventListener("message",o),clearTimeout(S)}},[l,u,v]);const b=t.supportedMethods.includes("oauth-pkce"),N=t.supportedMethods.includes("api-key"),j=()=>{d||l||(b?_():N&&a(!0))},_=async()=>{try{f(!0);const o=await r.callTool({name:"AI_PROVIDER_OAUTH_URL",arguments:{providerId:t.id,callbackUrl:`${window.location.origin}/oauth/callback/ai-provider`}});if(o.structuredContent)g(o.structuredContent.stateToken),window.open(o.structuredContent.url,"AiProviderOAuth","width=600,height=700");else throw new Error("Invalid response from AI_PROVIDER_OAUTH_URL")}catch(o){f(!1),D.error(`Failed to start OAuth: ${o instanceof Error?o.message:String(o)}`)}};return s.jsxs(ne,{open:d,onOpenChange:o=>{o||a(!1)},children:[s.jsx(re,{asChild:!0,children:s.jsxs(je,{className:te("p-4 flex flex-col gap-3 transition-colors relative",h&&"border-primary/20",!l&&"cursor-pointer hover:bg-muted/30",l&&"cursor-wait"),onClick:j,children:[h&&s.jsx("div",{className:"absolute top-4 right-4 w-2 h-2 rounded-full bg-green-500"}),s.jsx("div",{className:"flex items-start justify-between",children:s.jsxs("div",{className:"flex items-center gap-3",children:[t.logo?s.jsx("img",{src:t.logo,alt:t.name,className:"size-8 rounded-md object-contain"}):s.jsx(Ce,{fallback:t.name.charAt(0),className:"size-8 bg-primary/10 text-primary"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-base",children:t.name}),s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-1",children:l?"Authorizing...":t.description})]})]})}),h&&s.jsxs("div",{className:"mt-1",children:[t.supportsCredits&&s.jsx("div",{className:"mb-2",children:s.jsx(Le,{providerId:t.id})}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("p",{className:"text-xs font-medium text-muted-foreground",children:[e.length," key",e.length!==1?"s":""," configured"]}),t.supportsTopUp&&s.jsx("div",{onClick:o=>o.stopPropagation(),children:s.jsxs(V,{variant:"ghost",size:"xs",className:"h-6 gap-1 text-xs text-muted-foreground hover:text-foreground",onClick:()=>p(m?null:e[0]?.id??null),children:[s.jsx(ie,{size:12}),"Add credits"]})})]}),m&&e.some(o=>o.id===m)&&s.jsx("div",{className:"mt-2 p-3 rounded-md border bg-muted/30",onClick:o=>o.stopPropagation(),children:s.jsx(Re,{keyId:m,providerId:t.id,onCancel:()=>p(null)})}),s.jsx(ke,{keys:e,onDelete:C,isDeleting:x})]})]})}),s.jsx(oe,{className:"w-72 p-4",align:"start",onInteractOutside:()=>a(!1),children:s.jsx(Te,{providerId:t.id,onCancel:()=>a(!1),onSuccess:()=>a(!1)})})]})}function ze(){const t=z.c(13),e=Ne(),n=be();let c;t[0]!==e?.providers?(c=e?.providers??[],t[0]=e?.providers,t[1]=c):c=t[1];const r=c,i=r.length%2===0;let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-medium",children:"AI Providers"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Set up AI model providers. Keys are stored encrypted in the vault."})]}),t[2]=d):d=t[2];let a;if(t[3]!==n||t[4]!==i||t[5]!==r){let f;t[7]!==n||t[8]!==i||t[9]!==r.length?(f=(u,g)=>s.jsx("div",{className:te(i&&g===r.length-1&&"lg:col-span-2"),children:s.jsx(De,{provider:u,keys:n.filter(m=>m.providerId===u.id)})},u.id),t[7]=n,t[8]=i,t[9]=r.length,t[10]=f):f=t[10],a=r.map(f),t[3]=n,t[4]=i,t[5]=r,t[6]=a}else a=t[6];let l;return t[11]!==a?(l=s.jsxs("div",{className:"space-y-6",children:[d,s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 [&>*:first-child]:lg:col-span-2",children:a})]}),t[11]=a,t[12]=l):l=t[12],l}function at(){const t=z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ue,{fallback:Ue,children:s.jsx(A.Suspense,{fallback:s.jsx(se,{className:"h-64 w-full"}),children:s.jsx(ze,{})})}),t[0]=e):e=t[0],e}function Ue(t){const{error:e}=t;return s.jsx(Pe,{error:e??new Error("Failed to load AI providers")})}export{at as O,De as P,lt as a,Se as i,it as u};
|
|
1
|
+
import{r as A,c as z,z as le,e as ae,d as ce,g as de,u as G,w as ee,v as D,K as U,j as s,B as V,D as te,E as ue}from"./index-DMmNh7jR.js";import{u as me}from"./index-DYAF-Vgt.js";import{u as fe}from"./useQuery-B-AaJTeZ.js";import{u as H}from"./useMutation-DrLoVqQ7.js";import{i as he}from"./AlertCircle-DcuzO-dN.js";import{i as pe}from"./EyeOff--TPuyP7J.js";import{s as xe}from"./Eye-D3Q7o9JY.js";import{i as ge}from"./Key01-CjhxaGrC.js";import{s as ve}from"./Trash01-Cs72bTP6.js";import{C as je}from"./card-CoyaoT6W.js";import{I as X}from"./input-Bt_nejZh.js";import{a as J,T as ye}from"./toggle-group-C20N8vss.js";import{S as se}from"./skeleton-BvrwcS3X.js";import{A as Ce}from"./avatar-DeGeJRAR.js";import{b as ne,P as re,a as oe}from"./popover-CF2iI6mL.js";import{a as Ne,b as be}from"./ai-providers-logos-C_voEDmL.js";import{u as Y,a as Z}from"./constants-DclZTqHf.js";import{f as _e}from"./formatDistanceToNow-Cb2QZZJn.js";const Se=({size:t=24,color:e="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"M9 2v2m6-2v2M9 20v2m6-2v2m5-13h2m-2 5h2M2 9h2m-2 5h2m4.8 6h6.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 17.72 20 16.88 20 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C17.72 4 16.88 4 15.2 4H8.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C4 6.28 4 7.12 4 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C6.28 20 7.12 20 8.8 20Zm1.8-5h2.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C15 14.24 15 13.96 15 13.4v-2.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 9 13.96 9 13.4 9h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 9.76 9 10.04 9 10.6v2.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C9.76 15 10.04 15 10.6 15Z"}));Se.displayName="CpuChip01";const ie=({size:t=24,color:e="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"M22 10H2m0-1.8v7.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 19 4.08 19 5.2 19h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 17.48 22 16.92 22 15.8V8.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 5 19.92 5 18.8 5H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 6.52 2 7.08 2 8.2Z"}));ie.displayName="CreditCard01";const Ae={devMode:!1,toolApprovalLevel:"none",enableNotifications:typeof Notification<"u",experimentalAutomations:!1};function it(){const t=z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=le.preferences(),t[0]=e):e=t[0],me(e,Ee)}function Ee(t){return{...Ae,...t}}const Ie=new Set(["account.profile","account.preferences","org.general","org.plugins","org.ai-providers","org.billing","org.members"]);function we(t){return t?Ie.has(t):!1}function lt(){const t=z.c(17),e=ae();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const c=ce(n);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const{org:i,project:d}=de(r);let a;t[2]!==c.settings?(a=we(c.settings)?c.settings:void 0,t[2]=c.settings,t[3]=a):a=t[3];const l=a,f=!!l;let u;t[4]!==e||t[5]!==i||t[6]!==d?(u=x=>{!i||!d||e({to:"/$org/$project",params:{org:i,project:d},search:{settings:x}})},t[4]=e,t[5]=i,t[6]=d,t[7]=u):u=t[7];const g=u;let m;t[8]!==e||t[9]!==i||t[10]!==d?(m=()=>{!i||!d||e({to:"/$org/$project",params:{org:i,project:d},search:{}})},t[8]=e,t[9]=i,t[10]=d,t[11]=m):m=t[11];const p=m,h=l??"account.preferences";let C;return t[12]!==p||t[13]!==f||t[14]!==g||t[15]!==h?(C={isOpen:f,activeSection:h,open:g,close:p},t[12]=p,t[13]=f,t[14]=g,t[15]=h,t[16]=C):C=t[16],C}function Pe(t){const e=z.c(3),{error:n}=t;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(he,{size:16}),e[0]=c):c=e[0];let r;return e[1]!==n.message?(r=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load AI providers: ",n.message]})]}),e[1]=n.message,e[2]=r):r=e[2],r}function ke(t){const e=z.c(9),{keys:n,onDelete:c,isDeleting:r}=t;let i;if(e[0]!==r||e[1]!==n||e[2]!==c){let a;e[4]!==r||e[5]!==c?(a=l=>s.jsxs("div",{className:"flex items-center justify-between p-2 rounded-md bg-muted/50 text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[s.jsx(ge,{size:14,className:"text-muted-foreground shrink-0"}),s.jsx("span",{className:"font-medium truncate",children:l.label}),s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["added ",_e(new Date(l.createdAt))," ago"]})]}),s.jsx("div",{onClick:Oe,children:s.jsxs(ne,{children:[s.jsx(re,{asChild:!0,children:s.jsx(V,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",disabled:r,children:s.jsx(ve,{size:14})})}),s.jsx(oe,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Delete this key?"}),s.jsx("div",{className:"flex gap-2",children:s.jsx(V,{variant:"destructive",size:"xs",onClick:()=>c(l.id),disabled:r,children:"Delete"})})]})})]})})]},l.id),e[4]=r,e[5]=c,e[6]=a):a=e[6],i=n.map(a),e[0]=r,e[1]=n,e[2]=c,e[3]=i}else i=e[3];let d;return e[7]!==i?(d=s.jsx("div",{className:"flex flex-col gap-2 mt-4",children:i}),e[7]=i,e[8]=d):d=e[8],d}function Oe(t){return t.stopPropagation()}function Te(t){const e=z.c(52),{providerId:n,onCancel:c,onSuccess:r}=t,{locator:i,org:d}=G();let a;e[0]!==d.id?(a={connectionId:Z,orgId:d.id},e[0]=d.id,e[1]=a):a=e[1];const l=Y(a),f=ee(),[u,g]=A.useState(""),[m,p]=A.useState(""),[h,C]=A.useState(!1);let x;e[2]!==m||e[3]!==l||e[4]!==u||e[5]!==n?(x=async()=>{await l.callTool({name:"AI_PROVIDER_KEY_CREATE",arguments:{providerId:n,label:u||"Personal key",apiKey:m}})},e[2]=m,e[3]=l,e[4]=u,e[5]=n,e[6]=x):x=e[6];let v;e[7]!==i||e[8]!==r||e[9]!==f?(v=()=>{f.invalidateQueries({queryKey:U.aiProviderKeys(i)}),f.invalidateQueries({queryKey:U.aiProviders(i)}),D.success("Key saved successfully"),r()},e[7]=i,e[8]=r,e[9]=f,e[10]=v):v=e[10];let b;e[11]!==x||e[12]!==v?(b={mutationFn:x,onSuccess:v,onError:Ke},e[11]=x,e[12]=v,e[13]=b):b=e[13];const{mutate:N,isPending:j,error:_}=H(b);let o;e[14]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Label"}),e[14]=o):o=e[14];let S;e[15]===Symbol.for("react.memo_cache_sentinel")?(S=W=>g(W.target.value),e[15]=S):S=e[15];let y;e[16]!==u?(y=s.jsxs("div",{className:"space-y-1",children:[o,s.jsx(X,{placeholder:"e.g. Personal key",value:u,onChange:S,className:"h-8 text-sm"})]}),e[16]=u,e[17]=y):y=e[17];let E;e[18]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"API Key"}),e[18]=E):E=e[18];const K=h?"text":"password";let R;e[19]===Symbol.for("react.memo_cache_sentinel")?(R=W=>p(W.target.value),e[19]=R):R=e[19];let I;e[20]!==m||e[21]!==K?(I=s.jsx(X,{type:K,placeholder:"sk-...",value:m,onChange:R,className:"h-8 text-sm pr-8"}),e[20]=m,e[21]=K,e[22]=I):I=e[22];let w;e[23]!==h?(w=()=>C(!h),e[23]=h,e[24]=w):w=e[24];let P;e[25]!==h?(P=h?s.jsx(pe,{size:14}):s.jsx(xe,{size:14}),e[25]=h,e[26]=P):P=e[26];let L;e[27]!==w||e[28]!==P?(L=s.jsx("button",{type:"button",onClick:w,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:P}),e[27]=w,e[28]=P,e[29]=L):L=e[29];let F;e[30]!==I||e[31]!==L?(F=s.jsxs("div",{className:"space-y-1",children:[E,s.jsxs("div",{className:"relative",children:[I,L]})]}),e[30]=I,e[31]=L,e[32]=F):F=e[32];let k;e[33]!==_?(k=_&&s.jsx("p",{className:"text-xs text-destructive",children:_.message}),e[33]=_,e[34]=k):k=e[34];let O;e[35]!==j||e[36]!==c?(O=s.jsx(V,{variant:"ghost",size:"sm",onClick:c,disabled:j,children:"Cancel"}),e[35]=j,e[36]=c,e[37]=O):O=e[37];let $;e[38]!==N?($=()=>N(),e[38]=N,e[39]=$):$=e[39];const T=!m||j,M=j?"Saving...":"Save Key";let q;e[40]!==$||e[41]!==T||e[42]!==M?(q=s.jsx(V,{size:"sm",onClick:$,disabled:T,children:M}),e[40]=$,e[41]=T,e[42]=M,e[43]=q):q=e[43];let B;e[44]!==O||e[45]!==q?(B=s.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[O,q]}),e[44]=O,e[45]=q,e[46]=B):B=e[46];let Q;return e[47]!==F||e[48]!==k||e[49]!==B||e[50]!==y?(Q=s.jsxs("div",{className:"space-y-3",children:[y,F,k,B]}),e[47]=F,e[48]=k,e[49]=B,e[50]=y,e[51]=Q):Q=e[51],Q}function Ke(t){D.error(`Failed to save key: ${t.message}`)}function Re(t){const e=z.c(44),{keyId:n,providerId:c,onCancel:r}=t,{org:i}=G();let d;e[0]!==i.id?(d={connectionId:Z,orgId:i.id},e[0]=i.id,e[1]=d):d=e[1];const a=Y(d),[l,f]=A.useState("10"),[u,g]=A.useState("usd");let m;e[2]!==l||e[3]!==a||e[4]!==u||e[5]!==n||e[6]!==c?(m=async()=>{const T=Math.round(parseFloat(l)*100),M=await a.callTool({name:"AI_PROVIDER_TOPUP_URL",arguments:{providerId:c,keyId:n,amountCents:T,currency:u}});if(M?.isError)throw new Error(M.content?.[0]?.text??"Failed to get top-up URL");return M.structuredContent?.url},e[2]=l,e[3]=a,e[4]=u,e[5]=n,e[6]=c,e[7]=m):m=e[7];let p;e[8]!==r?(p=T=>{T&&window.open(T,"_blank","noopener,noreferrer"),r()},e[8]=r,e[9]=p):p=e[9];let h;e[10]!==m||e[11]!==p?(h={mutationFn:m,onSuccess:p,onError:$e},e[10]=m,e[11]=p,e[12]=h):h=e[12];const{mutate:C,isPending:x}=H(h),v=parseFloat(l),b=!isNaN(v)&&v>=1,N=u==="brl"?"R$":"$";let j;e[13]!==N?(j=s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-xs text-muted-foreground select-none",children:N}),e[13]=N,e[14]=j):j=e[14];let _;e[15]===Symbol.for("react.memo_cache_sentinel")?(_=T=>f(T.target.value),e[15]=_):_=e[15];let o;e[16]!==l?(o=s.jsx(X,{type:"number",min:"1",step:"1",placeholder:"10",value:l,onChange:_,className:"h-8 text-sm pl-8"}),e[16]=l,e[17]=o):o=e[17];let S;e[18]!==j||e[19]!==o?(S=s.jsxs("div",{className:"relative flex-1",children:[j,o]}),e[18]=j,e[19]=o,e[20]=S):S=e[20];let y,E,K;e[21]===Symbol.for("react.memo_cache_sentinel")?(K=T=>{T&&g(T)},y=s.jsx(J,{value:"usd",className:"h-8 px-2 text-xs",children:"USD"}),E=s.jsx(J,{value:"brl",className:"h-8 px-2 text-xs",children:"BRL"}),e[21]=y,e[22]=E,e[23]=K):(y=e[21],E=e[22],K=e[23]);let R;e[24]!==u?(R=s.jsxs(ye,{type:"single",size:"sm",value:u,onValueChange:K,children:[y,E]}),e[24]=u,e[25]=R):R=e[25];let I;e[26]!==R||e[27]!==S?(I=s.jsxs("div",{className:"flex items-center gap-2",children:[S,R]}),e[26]=R,e[27]=S,e[28]=I):I=e[28];let w;e[29]!==x||e[30]!==r?(w=s.jsx(V,{variant:"ghost",size:"sm",onClick:r,disabled:x,children:"Cancel"}),e[29]=x,e[30]=r,e[31]=w):w=e[31];let P;e[32]!==C?(P=()=>C(),e[32]=C,e[33]=P):P=e[33];const L=!b||x,F=x?"Opening...":"Checkout";let k;e[34]!==P||e[35]!==L||e[36]!==F?(k=s.jsx(V,{size:"sm",onClick:P,disabled:L,children:F}),e[34]=P,e[35]=L,e[36]=F,e[37]=k):k=e[37];let O;e[38]!==w||e[39]!==k?(O=s.jsxs("div",{className:"flex justify-end gap-2",children:[w,k]}),e[38]=w,e[39]=k,e[40]=O):O=e[40];let $;return e[41]!==I||e[42]!==O?($=s.jsxs("div",{className:"space-y-3",children:[I,O]}),e[41]=I,e[42]=O,e[43]=$):$=e[43],$}function $e(t){D.error(`Top-up failed: ${t.message}`)}function Le(t){const e=z.c(26),{providerId:n}=t,{locator:c,org:r}=G();let i;e[0]!==r.id?(i={connectionId:Z,orgId:r.id},e[0]=r.id,e[1]=i):i=e[1];const d=Y(i);let a;e[2]!==c||e[3]!==n?(a=U.aiProviderCredits(c,n),e[2]=c,e[3]=n,e[4]=a):a=e[4];let l;e[5]!==d||e[6]!==n?(l=async()=>{const _=await d.callTool({name:"AI_PROVIDER_CREDITS",arguments:{providerId:n}});if(_?.isError)throw new Error(_.content?.[0]?.text??"Failed to fetch credits");return _.structuredContent??null},e[5]=d,e[6]=n,e[7]=l):l=e[7];let f;e[8]!==a||e[9]!==l?(f={queryKey:a,staleTime:6e4,queryFn:l},e[8]=a,e[9]=l,e[10]=f):f=e[10];const{data:u,isLoading:g,refetch:m,isFetching:p}=fe(f);let h;e[11]!==u?(h=u!=null?(u.balanceCents/100).toFixed(2):null,e[11]=u,e[12]=h):h=e[12];const C=h;let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("span",{className:"text-muted-foreground",children:"Balance:"}),e[13]=x):x=e[13];let v;e[14]!==C||e[15]!==p||e[16]!==g?(v=g||p?s.jsx(se,{className:"h-3 w-12 inline-block"}):C!=null?s.jsxs("span",{className:"font-medium tabular-nums",children:["$",C]}):s.jsx("span",{className:"text-muted-foreground",children:"—"}),e[14]=C,e[15]=p,e[16]=g,e[17]=v):v=e[17];let b;e[18]!==m?(b=()=>m(),e[18]=m,e[19]=b):b=e[19];let N;e[20]!==p||e[21]!==b?(N=s.jsx("button",{type:"button",onClick:b,disabled:p,className:"text-muted-foreground hover:text-foreground disabled:opacity-50 ml-0.5",title:"Refresh balance",children:"↻"}),e[20]=p,e[21]=b,e[22]=N):N=e[22];let j;return e[23]!==v||e[24]!==N?(j=s.jsxs("div",{className:"flex items-center gap-1.5 text-xs",onClick:Fe,children:[x,v,N]}),e[23]=v,e[24]=N,e[25]=j):j=e[25],j}function Fe(t){return t.stopPropagation()}function De({provider:t,keys:e}){const{locator:n,org:c}=G(),r=Y({connectionId:Z,orgId:c.id}),i=ee(),[d,a]=A.useState(!1),[l,f]=A.useState(!1),[u,g]=A.useState(null),[m,p]=A.useState(null),h=e.length>0,{mutate:C,isPending:x}=H({mutationFn:async o=>(await r.callTool({name:"AI_PROVIDER_KEY_DELETE",arguments:{keyId:o}}),o),onSuccess:o=>{m===o&&p(null),i.invalidateQueries({queryKey:U.aiProviderKeys(n)}),i.invalidateQueries({queryKey:U.aiProviders(n)}),i.invalidateQueries({queryKey:U.aiProviderModels(n,o)}),D.success("Key deleted")},onError:o=>{D.error(`Failed to delete key: ${o.message}`)}}),{mutate:v}=H({mutationFn:async({code:o,stateToken:S})=>{const y=await r.callTool({name:"AI_PROVIDER_OAUTH_EXCHANGE",arguments:{providerId:t.id,code:o,stateToken:S,label:"Connected via OAuth"}});if(y?.isError){const E=y.content?.[0]?.text??"OAuth exchange failed";throw new Error(E)}},onSuccess:()=>{i.invalidateQueries({queryKey:U.aiProviderKeys(n)}),i.invalidateQueries({queryKey:U.aiProviders(n)}),D.success(`${t.name} connected successfully`),f(!1),g(null)},onError:o=>{D.error(`OAuth connection failed: ${o.message}`),f(!1),g(null)}});A.useEffect(()=>{if(!l||!u)return;const o=y=>{if(y.origin===window.location.origin&&y.data?.type==="AI_PROVIDER_OAUTH_CALLBACK"){const{code:E,stateToken:K}=y.data;K===u?v({code:E,stateToken:K}):(console.error("State token mismatch"),D.error("Security check failed: State token mismatch"),f(!1),g(null))}};window.addEventListener("message",o);const S=setTimeout(()=>{l&&(f(!1),g(null),D.error("Connection timed out"))},12e4);return()=>{window.removeEventListener("message",o),clearTimeout(S)}},[l,u,v]);const b=t.supportedMethods.includes("oauth-pkce"),N=t.supportedMethods.includes("api-key"),j=()=>{d||l||(b?_():N&&a(!0))},_=async()=>{try{f(!0);const o=await r.callTool({name:"AI_PROVIDER_OAUTH_URL",arguments:{providerId:t.id,callbackUrl:`${window.location.origin}/oauth/callback/ai-provider`}});if(o.structuredContent)g(o.structuredContent.stateToken),window.open(o.structuredContent.url,"AiProviderOAuth","width=600,height=700");else throw new Error("Invalid response from AI_PROVIDER_OAUTH_URL")}catch(o){f(!1),D.error(`Failed to start OAuth: ${o instanceof Error?o.message:String(o)}`)}};return s.jsxs(ne,{open:d,onOpenChange:o=>{o||a(!1)},children:[s.jsx(re,{asChild:!0,children:s.jsxs(je,{className:te("p-4 flex flex-col gap-3 transition-colors relative",h&&"border-primary/20",!l&&"cursor-pointer hover:bg-muted/30",l&&"cursor-wait"),onClick:j,children:[h&&s.jsx("div",{className:"absolute top-4 right-4 w-2 h-2 rounded-full bg-green-500"}),s.jsx("div",{className:"flex items-start justify-between",children:s.jsxs("div",{className:"flex items-center gap-3",children:[t.logo?s.jsx("img",{src:t.logo,alt:t.name,className:"size-8 rounded-md object-contain"}):s.jsx(Ce,{fallback:t.name.charAt(0),className:"size-8 bg-primary/10 text-primary"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-base",children:t.name}),s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-1",children:l?"Authorizing...":t.description})]})]})}),h&&s.jsxs("div",{className:"mt-1",children:[t.supportsCredits&&s.jsx("div",{className:"mb-2",children:s.jsx(Le,{providerId:t.id})}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("p",{className:"text-xs font-medium text-muted-foreground",children:[e.length," key",e.length!==1?"s":""," configured"]}),t.supportsTopUp&&s.jsx("div",{onClick:o=>o.stopPropagation(),children:s.jsxs(V,{variant:"ghost",size:"xs",className:"h-6 gap-1 text-xs text-muted-foreground hover:text-foreground",onClick:()=>p(m?null:e[0]?.id??null),children:[s.jsx(ie,{size:12}),"Add credits"]})})]}),m&&e.some(o=>o.id===m)&&s.jsx("div",{className:"mt-2 p-3 rounded-md border bg-muted/30",onClick:o=>o.stopPropagation(),children:s.jsx(Re,{keyId:m,providerId:t.id,onCancel:()=>p(null)})}),s.jsx(ke,{keys:e,onDelete:C,isDeleting:x})]})]})}),s.jsx(oe,{className:"w-72 p-4",align:"start",onInteractOutside:()=>a(!1),children:s.jsx(Te,{providerId:t.id,onCancel:()=>a(!1),onSuccess:()=>a(!1)})})]})}function ze(){const t=z.c(13),e=Ne(),n=be();let c;t[0]!==e?.providers?(c=e?.providers??[],t[0]=e?.providers,t[1]=c):c=t[1];const r=c,i=r.length%2===0;let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-medium",children:"AI Providers"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Set up AI model providers. Keys are stored encrypted in the vault."})]}),t[2]=d):d=t[2];let a;if(t[3]!==n||t[4]!==i||t[5]!==r){let f;t[7]!==n||t[8]!==i||t[9]!==r.length?(f=(u,g)=>s.jsx("div",{className:te(i&&g===r.length-1&&"lg:col-span-2"),children:s.jsx(De,{provider:u,keys:n.filter(m=>m.providerId===u.id)})},u.id),t[7]=n,t[8]=i,t[9]=r.length,t[10]=f):f=t[10],a=r.map(f),t[3]=n,t[4]=i,t[5]=r,t[6]=a}else a=t[6];let l;return t[11]!==a?(l=s.jsxs("div",{className:"space-y-6",children:[d,s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 [&>*:first-child]:lg:col-span-2",children:a})]}),t[11]=a,t[12]=l):l=t[12],l}function at(){const t=z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ue,{fallback:Ue,children:s.jsx(A.Suspense,{fallback:s.jsx(se,{className:"h-64 w-full"}),children:s.jsx(ze,{})})}),t[0]=e):e=t[0],e}function Ue(t){const{error:e}=t;return s.jsx(Pe,{error:e??new Error("Failed to load AI providers")})}export{at as O,De as P,lt as a,Se as i,it as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as j,c as b,j as s,D as L,E as Q,B as X,u as Y,f as ee}from"./index-DMmNh7jR.js";import{C as h}from"./task-status-CrO2oj_v.js";import{C as te,E as se,n as le}from"./editable-task-title-BR-xQ-UT.js";import{a as q}from"./tasks-panel-DBJx0hs6.js";import{u as Z,a as G}from"./context-BFi-zuf6.js";import{V as ie}from"./select-virtual-mcp-DsImheli.js";import{I as R}from"./integration-icon-Dyr7fOYU.js";import{P as re,a as oe,b as ne}from"./popover-CF2iI6mL.js";import{S as O}from"./skeleton-BvrwcS3X.js";import{i as ae,d as ce}from"./constants-DclZTqHf.js";import{b as me}from"./use-virtual-mcp-DCxXK_bv.js";import{i as de}from"./ChevronRight-3uKoJ2yX.js";import{t as A}from"./Users03-CGvJARf5.js";import{u as B}from"./tooltip-DHJtaI_Z.js";import{P as V}from"./index-DYAF-Vgt.js";import{R as H,a as D,b as fe}from"./resizable-BwEPpKFX.js";import{D as xe,a as pe}from"./drawer-CAX2URBi.js";import{s as ue}from"./Plus-Dcf0Y3wA.js";import"./spinner-CSLYV8gq.js";import"./use-mcp-prompts-BDRKUj7D.js";import"./useQuery-B-AaJTeZ.js";import"./dialog-DzGwvQ_K.js";import"./X-CD9ZB6hw.js";import"./form-DBjkdSps.js";import"./label-DTNkd20e.js";import"./input-Bt_nejZh.js";import"./index-BLNBD7Tl.js";import"./usage-BW6ztpN6.js";import"./ArrowUp-B4DKDJey.js";import"./ChevronDown-t60R5l2B.js";import"./Edit01-Bh7u1xp-.js";import"./Lock01-DFfVnVtc.js";import"./use-copy-DkDz3lds.js";import"./AlertCircle-DcuzO-dN.js";import"./select-hHfKwVbN.js";import"./ChevronUp-l7iXrppT.js";import"./index-COFAW4F5.js";import"./Check-5nIJP_0B.js";import"./org-ai-providers-CUAlOa9f.js";import"./useMutation-DrLoVqQ7.js";import"./EyeOff--TPuyP7J.js";import"./Eye-D3Q7o9JY.js";import"./Key01-CjhxaGrC.js";import"./Trash01-Cs72bTP6.js";import"./card-CoyaoT6W.js";import"./toggle-group-C20N8vss.js";import"./avatar-DeGeJRAR.js";import"./ai-providers-logos-C_voEDmL.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./ArrowLeft-B0zQkfl0.js";import"./tabs-sTqc1_U2.js";import"./checkbox-D5DFx9da.js";import"./AlignLeft-DH6vJ97u.js";import"./Image01-RwxwuRZg.js";import"./RefreshCcw01-BOXuamrY.js";import"./SearchMd-BSRGE1t4.js";import"./Settings01-CCUkMwLj.js";import"./Tool01-Doogi-IK.js";import"./use-mcp-resources-BxIahbOo.js";import"./Copy01-DCmX2pvi.js";import"./collapsible-DcaWkNTt.js";import"./index-BObCXgKJ.js";import"./marked.esm-BaswSlok.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-hLmmzHl_.js";import"./types-BtTmvTe4.js";import"./Globe02-X8fGWI0t.js";import"./LayersTwo01-DEwkReGL.js";import"./XClose-BxUlnJUs.js";import"./Clock-Cu62NiMl.js";import"./use-collections-DhavVshD.js";import"./useSuspenseInfiniteQuery-Czq4y4BP.js";import"./infiniteQueryObserver-CZ8w6Ao-.js";import"./CheckCircle-CPfAK_ok.js";import"./Loading01-D0sCOwf7.js";import"./ChevronLeft-lVdUD9SW.js";import"./collection-search-nKZEJ_r3.js";import"./user-8V0wpye0.js";import"./format-time-CMKyl-GC.js";import"./empty-state-BuGXY27l.js";import"./dropdown-menu-BcNYk9_F.js";import"./decopilot-events-Brt4gAR6.js";import"./index-PFtbLrE4.js";import"./use-create-virtual-mcp-DZAv89rZ.js";import"./Container-Cvd3ILsk.js";const K=({size:t=24,color:e="currentColor",...i})=>j.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},j.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"}));K.displayName="LayoutRight";const U=({size:t=24,color:e="currentColor",...i})=>j.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},j.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"}));U.displayName="MessageChatSquare";function he(t){const e=b.c(15),{agent:i}=t,{setVirtualMcpId:r}=Z();let x;e[0]!==i.id||e[1]!==r?(x=()=>{r(i.id)},e[0]=i.id,e[1]=r,e[2]=x):x=e[2];const a=x;let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=L("flex flex-col items-center gap-1.5 sm:gap-3 p-1.5 sm:p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),e[3]=o):o=e[3];const f=`Select agent ${i.title}`;let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(A,{size:16}),e[4]=n):n=e[4];let d;e[5]!==i.icon||e[6]!==i.title?(d=s.jsx(R,{icon:i.icon,name:i.title,size:"sm",fallbackIcon:n,className:"sm:h-12 sm:w-12 sm:min-w-[3rem]"}),e[5]=i.icon,e[6]=i.title,e[7]=d):d=e[7];let l;e[8]!==i.title?(l=s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight line-clamp-2",children:i.title}),e[8]=i.title,e[9]=l):l=e[9];let c;return e[10]!==a||e[11]!==f||e[12]!==d||e[13]!==l?(c=s.jsxs("button",{type:"button",onClick:a,className:o,"aria-label":f,children:[d,l]}),e[10]=a,e[11]=f,e[12]=d,e[13]=l,e[14]=c):c=e[14],c}function je(t){const e=b.c(15),{virtualMcps:i,selectedVirtualMcpId:r,onVirtualMcpChange:x}=t,[a,o]=j.useState(!1),f=j.useRef(null),n=B();let d,l;e[0]!==n||e[1]!==a?(d=()=>{a&&!n&&setTimeout(()=>{f.current?.focus()},0)},l=[a,n],e[0]=n,e[1]=a,e[2]=d,e[3]=l):(d=e[2],l=e[3]),j.useEffect(d,l);let c;e[4]!==x?(c=v=>{x(v),o(!1)},e[4]=x,e[5]=c):c=e[5];const m=c;let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=L("flex flex-col items-center gap-1.5 sm:gap-3 p-1.5 sm:p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),e[6]=p):p=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(re,{asChild:!0,children:s.jsxs("button",{type:"button",className:p,"aria-label":"See all agents",children:[s.jsx("div",{className:"h-9 w-9 sm:size-12 rounded-lg bg-accent flex items-center justify-center shrink-0",children:s.jsx(de,{size:20,className:"text-foreground"})}),s.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"See all"})]})}),e[7]=u):u=e[7];let g;e[8]!==m||e[9]!==r||e[10]!==i?(g=s.jsx(oe,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(ie,{virtualMcps:i,selectedVirtualMcpId:r,onVirtualMcpChange:m,searchInputRef:f})}),e[8]=m,e[9]=r,e[10]=i,e[11]=g):g=e[11];let N;return e[12]!==a||e[13]!==g?(N=s.jsxs(ne,{open:a,onOpenChange:o,children:[u,g]}),e[12]=a,e[13]=g,e[14]=N):N=e[14],N}function ge(){const t=b.c(17),e=me(),{selectedVirtualMcp:i,setVirtualMcpId:r}=Z();let x,a,o,f,n;if(t[0]!==e){f=Symbol.for("react.early_return_sentinel");e:{const p=e.filter(ve).slice(0,6);if(p.length===0){f=null;break e}n=e.map(Ne),o="w-full max-w-[800px]",x="flex gap-4 overflow-x-auto no-scrollbar py-2 sm:py-0 sm:grid sm:grid-cols-4 md:grid-cols-7 sm:gap-6",a=p.map(be)}t[0]=e,t[1]=x,t[2]=a,t[3]=o,t[4]=f,t[5]=n}else x=t[1],a=t[2],o=t[3],f=t[4],n=t[5];if(f!==Symbol.for("react.early_return_sentinel"))return f;const d=i?.id??null;let l;t[6]!==r||t[7]!==d||t[8]!==n?(l=s.jsx(je,{virtualMcps:n,selectedVirtualMcpId:d,onVirtualMcpChange:r}),t[6]=r,t[7]=d,t[8]=n,t[9]=l):l=t[9];let c;t[10]!==x||t[11]!==a||t[12]!==l?(c=s.jsxs("div",{className:x,children:[a,l]}),t[10]=x,t[11]=a,t[12]=l,t[13]=c):c=t[13];let m;return t[14]!==o||t[15]!==c?(m=s.jsx("div",{className:o,children:c}),t[14]=o,t[15]=c,t[16]=m):m=t[16],m}function be(t){return s.jsx(he,{agent:t},t.id??"default")}function Ne(t){return{id:t.id,title:t.title,description:t.description,icon:t.icon}}function ve(t){return t.id!==null&&!ae(t.id)}function Ce(){const t=b.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"w-full max-w-[800px]",children:s.jsx("div",{className:"flex gap-4 overflow-x-auto no-scrollbar py-2 sm:py-0 sm:grid sm:grid-cols-4 md:grid-cols-7 sm:gap-6",children:Array.from({length:7}).map(we)})}),t[0]=e):e=t[0],e}function we(t,e){return s.jsxs("div",{className:"flex flex-col items-center gap-1.5 sm:gap-3 p-1.5 sm:p-2 self-stretch",children:[s.jsx(O,{className:"h-9 w-9 sm:size-12 rounded-md shrink-0"}),s.jsx(O,{className:"h-3 sm:h-4 w-full"})]},e)}function F(){const t=b.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j.Suspense,{fallback:s.jsx(Ce,{}),children:s.jsx(ge,{})}),t[0]=e):e=t[0],e}function W(t){const e=b.c(42),{showContext:i,setShowContext:r}=t,{org:x}=Y(),{data:a}=ee.useSession(),{isChatEmpty:o,activeTaskId:f,tasks:n,selectedVirtualMcp:d,createTask:l,switchToTask:c}=G();let m;if(e[0]!==f||e[1]!==n){let P;e[3]!==f?(P=J=>J.id===f,e[3]=f,e[4]=P):P=e[4],m=n.find(P),e[0]=f,e[1]=n,e[2]=m}else m=e[2];const p=m,u=B(),[g,N]=j.useState(!1);let v;e[5]!==a?.user?.name?(v=a?.user?.name?.split(" ")[0]||"there",e[5]=a?.user?.name,e[6]=v):v=e[6];const T=v;let E;e[7]!==x.id?(E=ce(x.id),e[7]=x.id,e[8]=E):E=e[8];const C=d??E;let w;e[9]!==p?(w=p?.title&&s.jsx(se,{taskId:p.id,text:p.title,className:"text-sm font-medium text-foreground"}),e[9]=p,e[10]=w):w=e[10];let y;e[11]!==w?(y=s.jsx(V.Header.Left,{className:"gap-2",children:w}),e[11]=w,e[12]=y):y=e[12];let k;e[13]!==l||e[14]!==o||e[15]!==u?(k=u&&s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",onClick:()=>l(),disabled:o,className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors disabled:opacity-40 disabled:cursor-not-allowed",title:"New chat",children:s.jsx(ue,{size:16,className:"text-muted-foreground"})}),s.jsx("button",{type:"button",onClick:()=>N(!0),className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors",title:"Tasks",children:s.jsx(le,{size:16,className:"text-muted-foreground"})})]}),e[13]=l,e[14]=o,e[15]=u,e[16]=k):k=e[16];let S;e[17]!==o||e[18]!==u||e[19]!==r||e[20]!==i?(S=!o&&!u&&s.jsx("button",{type:"button",onClick:()=>r(ye),className:L("flex size-7 items-center justify-center rounded-md border border-input hover:bg-accent transition-colors",i&&"bg-accent"),title:"Toggle context panel",children:s.jsx(K,{size:14,className:"text-muted-foreground"})}),e[17]=o,e[18]=u,e[19]=r,e[20]=i,e[21]=S):S=e[21];let z;e[22]!==k||e[23]!==S?(z=s.jsxs(V.Header.Right,{className:"gap-1",children:[k,S]}),e[22]=k,e[23]=S,e[24]=z):z=e[24];let _;e[25]!==y||e[26]!==z?(_=s.jsxs(V.Header,{className:"flex-none z-10 bg-background",children:[y,z]}),e[25]=y,e[26]=z,e[27]=_):_=e[27];let M;e[28]!==u||e[29]!==g||e[30]!==c?(M=u&&s.jsx(xe,{open:g,onOpenChange:N,direction:"bottom",children:s.jsx(pe,{className:"h-[90vh] max-h-[90vh]",children:s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(q,{onTaskSelect:async P=>{await c(P),N(!1)}})})})}),e[28]=u,e[29]=g,e[30]=c,e[31]=M):M=e[31];let I;e[32]!==C||e[33]!==o||e[34]!==u||e[35]!==r||e[36]!==T?(I=o?u?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center px-4",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(R,{icon:C.icon,name:C.title,size:"md",fallbackIcon:s.jsx(A,{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",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",T,"?"]})})]})}),s.jsxs("div",{className:"shrink-0 flex flex-col items-center w-full gap-3 pb-2",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-2xl mx-auto gap-4 px-4",children:[s.jsx(h.IceBreakers,{className:"w-full"}),s.jsx("div",{className:"flex flex-col items-center w-full",children:s.jsx(F,{})})]}),s.jsx(h.Footer,{children:s.jsx(h.Input,{})})]})]}):s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center px-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(R,{icon:C.icon,name:C.title,size:"md",fallbackIcon:s.jsx(A,{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-6",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",T,"?"]})}),s.jsx(h.IceBreakers,{className:"w-full"}),s.jsx("div",{className:"w-full",children:s.jsx(h.Input,{onOpenContextPanel:()=>r(!0)})}),s.jsx("div",{className:"flex flex-col items-center w-full mt-16",children:s.jsx(F,{})})]})}):s.jsxs(s.Fragment,{children:[s.jsx(h.Main,{children:s.jsx(h.Messages,{})}),s.jsx(h.Footer,{children:s.jsx(h.Input,{onOpenContextPanel:()=>r(!0)})})]}),e[32]=C,e[33]=o,e[34]=u,e[35]=r,e[36]=T,e[37]=I):I=e[37];let $;return e[38]!==M||e[39]!==I||e[40]!==_?($=s.jsxs(h,{className:"h-full bg-background",children:[_,M,I]}),e[38]=M,e[39]=I,e[40]=_,e[41]=$):$=e[41],$}function ye(t){return!t}function ke(){const t=b.c(15),{allModelsConnections:e}=G(),i=B(),[r,x]=j.useState(!1);if(e.length===0){let m;return t[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"flex flex-col h-full bg-background items-center justify-center",children:s.jsx(h.NoLlmBindingEmptyState,{})}),t[0]=m):m=t[0],m}if(i){let m;return t[1]!==r?(m=s.jsx("div",{className:"size-full",children:s.jsx(W,{showContext:r,setShowContext:x})}),t[1]=r,t[2]=m):m=t[2],m}let a,o;t[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(H,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(q,{})}),o=s.jsx(D,{className:"bg-border/30"}),t[3]=a,t[4]=o):(a=t[3],o=t[4]);const f=r?50:80;let n;t[5]!==r?(n=s.jsx(W,{showContext:r,setShowContext:x}),t[5]=r,t[6]=n):n=t[6];let d;t[7]!==f||t[8]!==n?(d=s.jsx(H,{defaultSize:f,minSize:30,id:"main",order:2,children:n}),t[7]=f,t[8]=n,t[9]=d):d=t[9];let l;t[10]!==r?(l=r&&s.jsxs(s.Fragment,{children:[s.jsx(D,{className:"bg-border/30"}),s.jsx(H,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(te,{onClose:()=>x(!1)})})]}),t[10]=r,t[11]=l):l=t[11];let c;return t[12]!==d||t[13]!==l?(c=s.jsxs(fe,{direction:"horizontal",className:"size-full",children:[a,o,d,l]}),t[12]=d,t[13]=l,t[14]=c):c=t[14],c}function Se(t){const e=b.c(14),{error:i,onRetry:r}=t,x=i?.message?.includes("401")||i?.message?.toLowerCase().includes("unauthorized");let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs(V.Header,{className:"flex-none",children:[s.jsx(V.Header.Left,{className:"gap-2"}),s.jsx(V.Header.Right,{className:"gap-1"})]}),e[0]=a):a=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(U,{className:"h-6 w-6 text-destructive"})}),e[1]=o):o=e[1];const f=x?"Unable to load models":"Something went wrong";let n;e[2]!==f?(n=s.jsx("h3",{className:"text-lg font-medium",children:f}),e[2]=f,e[3]=n):n=e[3];const d=x?"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 l;e[4]!==d?(l=s.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[4]=d,e[5]=l):l=e[5];let c;e[6]!==n||e[7]!==l?(c=s.jsxs("div",{className:"space-y-2",children:[n,l]}),e[6]=n,e[7]=l,e[8]=c):c=e[8];let m;e[9]!==r?(m=s.jsx(X,{variant:"outline",onClick:r,children:"Try again"}),e[9]=r,e[10]=m):m=e[10];let p;return e[11]!==c||e[12]!==m?(p=s.jsxs(h,{children:[a,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:[o,c,m]})})]}),e[11]=c,e[12]=m,e[13]=p):p=e[13],p}function ns(){const t=b.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Q,{fallback:ze,children:s.jsx(j.Suspense,{fallback:s.jsx(h.Skeleton,{}),children:s.jsx(ke,{})})}),t[0]=e):e=t[0],e}function ze(t){const{error:e,resetError:i}=t;return s.jsx(Se,{error:e,onRetry:i})}export{ns as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as Y,r as D,j as s,D as ce,B as te,e as ue,u as me,a6 as xe,a7 as pe,O as ge,f as Re,au as Te,bV as oe,K as Pe,z as ze,E as $e,av as ke}from"./index-DMmNh7jR.js";import{u as Le,P as se}from"./index-DYAF-Vgt.js";import{B as Ee,a as Oe,b as Fe,c as Ke}from"./breadcrumb-C8hDXS86.js";import{i as he}from"./FilterLines-CUdG83Ae.js";import{n as je}from"./Inbox01-B7dU6IpS.js";import{i as le}from"./Loading01-D0sCOwf7.js";import{i as ye}from"./SearchMd-BSRGE1t4.js";import{u as Ae}from"./use-store-discovery-D-xa6Q86.js";import{u as _e,a as ve,b as Be}from"./use-connection-CVlyXslk.js";import{s as Me}from"./slugify-CEUa2lfQ.js";import{f as De,i as Ve,u as Ge}from"./registry-utils-DZHZD5gP.js";import{C as We}from"./collection-search-nKZEJ_r3.js";import{M as ae}from"./mcp-server-card-CwYAe4vO.js";import{I as Ue}from"./input-Bt_nejZh.js";import{b as be,P as Ne,a as Ce}from"./popover-CF2iI6mL.js";import{i as Se}from"./Check-5nIJP_0B.js";import{t as we}from"./ChevronDown-t60R5l2B.js";import{s as re}from"./XClose-BxUlnJUs.js";import{s as He}from"./Plus-Dcf0Y3wA.js";import{E as qe}from"./empty-state-BuGXY27l.js";import{u as Je}from"./useQuery-B-AaJTeZ.js";import{W as Ye,a as Qe,u as Xe,e as Ze,b as et}from"./constants-DclZTqHf.js";import"./useMutation-DrLoVqQ7.js";import"./tooltip-DHJtaI_Z.js";import"./index-COFAW4F5.js";import"./X-CD9ZB6hw.js";import"./ChevronRight-3uKoJ2yX.js";import"./useInfiniteQuery-H-W7n7En.js";import"./infiniteQueryObserver-CZ8w6Ao-.js";import"./use-collections-DhavVshD.js";import"./binder-C1eSZFT4.js";import"./CheckVerified02-BImD45AM.js";import"./Globe02-X8fGWI0t.js";import"./Lock01-DFfVnVtc.js";import"./Terminal-ZymOmGb9.js";import"./card-CoyaoT6W.js";import"./integration-icon-Dyr7fOYU.js";import"./Container-Cvd3ILsk.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(Ue,{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 W=H;let Q;e[15]!==I?(Q=I.filter(mt),e[15]=I,e[16]=Q):Q=e[16];const ee=Q;let X;e[17]!==c||e[18]!==T.slug||e[19]!==r||e[20]!==x?(X=K=>{x();const u=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 U=J;let _;e[27]!==O||e[28]!==n?(_=s.jsx(We,{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 V;e[37]!==ee||e[38]!==v||e[39]!==q||e[40]!==g||e[41]!==C||e[42]!==y||e[43]!==R||e[44]!==O||e[45]!==F||e[46]!==n||e[47]!==W||e[48]!==I.length?(V=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:v&&!y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center space-y-4",children:[s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(xe,{className:"size-8 text-destructive"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry unavailable"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"Could not load items from this registry. It may be temporarily offline."}),v.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:v.message})]}),s.jsxs(te,{variant:"outline",size:"sm",onClick:ct,children:[s.jsx(pe,{className:"size-4"}),"Try again"]})]}):y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):I.length===0&&!g?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(je,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),s.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):I.length===0&&g&&!n?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(he,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):n&&I.length===0&&!O?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ye,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):s.jsxs("div",{className:"flex flex-col gap-8",children:[O&&I.length===0&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),F.length>0&&s.jsx(ae,{items:F,title:"Official",onItemClick:q}),W.length>0&&s.jsx(ae,{items:W,title:"Verified",onItemClick:q}),ee.length>0&&s.jsx(ae,{items:ee,title:F.length>0||W.length>0?"All":"",onItemClick:q}),C&&R&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(le,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[37]=ee,e[38]=v,e[39]=q,e[40]=g,e[41]=C,e[42]=y,e[43]=R,e[44]=O,e[45]=F,e[46]=n,e[47]=W,e[48]=I.length,e[49]=V):V=e[49];let M;e[50]!==U||e[51]!==m||e[52]!==V?(M=s.jsx("div",{ref:m,className:"flex-1 overflow-y-auto",onScroll:U,children:V}),e[50]=U,e[51]=m,e[52]=V,e[53]=M):M=e[53];let G;return e[54]!==B||e[55]!==M||e[56]!==_?(G=s.jsxs("div",{className:"flex flex-col h-full",children:[_,B,M]}),e[54]=B,e[55]=M,e[56]=_,e[57]=G):G=e[57],G}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=Ve(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 rs(){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=Ge(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 W;t[25]!==d.create||t[26]!==P?(W=async u=>{const Z=await d.create.mutateAsync(u);P(Z.id)},t[25]=d.create,t[26]=P,t[27]=W):W=t[27];const Q=W,ee=new Set(i.map(ht)),X=A.filter(u=>u.id&&!ee.has(u.id)),q=H.filter(u=>u.id&&!ee.has(u.id));if(n){let u;return t[28]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(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 U;t[30]!==Q?(U=async u=>Q(u),t[30]=Q,t[31]=U):U=t[31];let _;t[32]!==X||t[33]!==h||t[34]!==N||t[35]!==P||t[36]!==U?(_=s.jsxs(se.Header,{children:[J,s.jsx(se.Header.Right,{children:s.jsx(xt,{wellKnownRegistries:X,registries:N,value:h,onValueChange:P,onAddWellKnown:U,placeholder:"Select store..."})})]}),t[32]=X,t[33]=h,t[34]=N,t[35]=P,t[36]=U,t[37]=_):_=t[37];let B;t[38]!==h||t[39]!==N?(B=u=>{const{error:Z,resetError:ne}=u;return s.jsx(gt,{error:Z,onRetry:ne,registryName:N.find(ie=>ie.id===h)?.name??"registry"})},t[38]=h,t[39]=N,t[40]=B):B=t[40];let V;t[41]===Symbol.for("react.memo_cache_sentinel")?(V=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]=V):V=t[41];let M;t[42]!==q||t[43]!==h||t[44]!==P||t[45]!==E?(M=s.jsx(D.Suspense,{fallback:V,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 G;t[47]!==B||t[48]!==M?(G=s.jsx(se.Content,{children:s.jsx($e,{fallback:B,children:M})}),t[47]=B,t[48]=M,t[49]=G):G=t[49];let K;return t[50]!==_||t[51]!==G?(K=s.jsxs(se,{children:[_,G]}),t[50]=_,t[51]=G,t[52]=K):K=t[52],K}function ht(t){return t.id}function jt(t){return t??""}export{rs as default};
|
package/dist/client/assets/{plugin-empty-state-cb7GbeKy.js → plugin-empty-state-DUosCqGd.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,j as t,
|
|
1
|
+
import{c as a,j as t,at as n}from"./index-DMmNh7jR.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};
|
package/dist/client/assets/{plugin-empty-state-CEvZCNFj.js → plugin-empty-state-qFDP0Nr2.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,j as t}from"./index-
|
|
1
|
+
import{c as s,j as t}from"./index-DMmNh7jR.js";import{e as r}from"./Dataflow03-SvWKmU9-.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};
|
|
@@ -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-DMmNh7jR.js";import{i as R}from"./Check-5nIJP_0B.js";import{t as _}from"./ChevronDown-t60R5l2B.js";import{e as y}from"./Dataflow03-SvWKmU9-.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,
|
|
1
|
+
import{c as w,j as s,r as S,at as y}from"./index-DMmNh7jR.js";import{i as _}from"./Check-5nIJP_0B.js";import{t as k}from"./ChevronDown-t60R5l2B.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-DMmNh7jR.js";import{P as m}from"./project-plugins-DqmH9sWQ.js";import"./useQuery-B-AaJTeZ.js";import"./useMutation-DrLoVqQ7.js";import"./constants-DclZTqHf.js";import"./switch-CoYIum7D.js";import"./label-DTNkd20e.js";import"./Container-Cvd3ILsk.js";import"./use-connection-CVlyXslk.js";import"./use-collections-DhavVshD.js";import"./registry-utils-DZHZD5gP.js";import"./binder-C1eSZFT4.js";import"./use-install-from-registry-Ch6GOwHv.js";import"./extract-connection-data-DhU56Zd0.js";import"./generate-id-DRuK_WRM.js";import"./Loading01-D0sCOwf7.js";import"./Plus-Dcf0Y3wA.js";import"./select-hHfKwVbN.js";import"./ChevronUp-l7iXrppT.js";import"./index-COFAW4F5.js";import"./Check-5nIJP_0B.js";import"./ChevronDown-t60R5l2B.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,X as $,j as c,a$ as L,a9 as z,_ as O,Z as A,a0 as g,b0 as _,a2 as j,b1 as G,b2 as w,b3 as H,b4 as K,a3 as Z,b5 as U,b6 as V,b7 as W,b8 as X,b9 as q,ba as B,c as R,D as J}from"./index-DMmNh7jR.js";var C="Popover",[E]=Z(C,[w]),P=w(),[Q,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(Q,{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=O(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 b="PopoverPortal",[ee,oe]=E(b,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=d(b,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=b;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=U("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(null),n=O(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 V(),c.jsx(W,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(X,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(q,{"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(B,{...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=J("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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as P,g as A,j as r,E as y,r as R,u as T}from"./index-DMmNh7jR.js";import{u as S}from"./use-connection-CVlyXslk.js";import{u as U}from"./constants-DclZTqHf.js";import{u as v}from"./use-mcp-tools-kv4r4Zvn.js";import{c as E}from"./content-blocks-o63cs2vh.js";import{M as H}from"./mcp-app-renderer-hLmmzHl_.js";import{g as O,M as $}from"./types-BtTmvTe4.js";import{u as D}from"./context-BFi-zuf6.js";import{P as _,a as k}from"./index-DYAF-Vgt.js";import"./use-collections-DhavVshD.js";import"./useMutation-DrLoVqQ7.js";import"./useQuery-B-AaJTeZ.js";import"./use-mcp-resources-BxIahbOo.js";import"./decopilot-events-Brt4gAR6.js";import"./index-PFtbLrE4.js";import"./tooltip-DHJtaI_Z.js";import"./index-COFAW4F5.js";import"./X-CD9ZB6hw.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 le(){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{le as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as I,c as C,f as ne,j as s,D as V,v as oe,o as ge,n as W,e as ie,u as re,w as je,t as be,q as ye,K as ae,B as Q,O as D,P as fe,S as le,g as ve,av as Se}from"./index-DMmNh7jR.js";import{u as ue}from"./use-project-XBmxO4XX.js";import{c as Ne,a as _e,D as ke}from"./dialog-DzGwvQ_K.js";import{i as we}from"./ArrowLeft-B0zQkfl0.js";import{i as ce}from"./X-CD9ZB6hw.js";import{S as G}from"./skeleton-BvrwcS3X.js";import{i as Ce,u as Pe,a as ze,O as Ae}from"./org-ai-providers-CUAlOa9f.js";import{A as pe}from"./avatar-DeGeJRAR.js";import{t as $e}from"./Building02-B5vUKe4K.js";import{t as Ie}from"./Settings01-CCUkMwLj.js";import{t as Oe}from"./Users03-CGvJARf5.js";import{i as Me}from"./Zap-0WHKFRes.js";import{a as Le,b as Ee,c as Fe,T as Te}from"./tooltip-DHJtaI_Z.js";import{i as De}from"./Check-5nIJP_0B.js";import{a as qe}from"./Copy01-DCmX2pvi.js";import{S as H}from"./switch-CoYIum7D.js";import{S as Ue,a as Be,d as Y,c as Re}from"./select-hHfKwVbN.js";import{i as Ge}from"./Code01-DA4cXrzu.js";import{s as Ke}from"./RefreshCcw01-BOXuamrY.js";import{i as Ve}from"./Shield01-BYpsgCVA.js";import"./index-PFtbLrE4.js";import{u as Qe}from"./useMutation-DrLoVqQ7.js";import{a as Je,F as Z,b as X,c as ee,d as te,f as se,e as We}from"./form-DBjkdSps.js";import{I as me}from"./input-Bt_nejZh.js";import{L as He}from"./logo-upload-7WcycT9q.js";import{P as Ye}from"./project-plugins-DqmH9sWQ.js";import Ze from"./members-Sgl6kVS6.js";import"./useQuery-B-AaJTeZ.js";import"./constants-DclZTqHf.js";import"./index-DYAF-Vgt.js";import"./AlertCircle-DcuzO-dN.js";import"./EyeOff--TPuyP7J.js";import"./Eye-D3Q7o9JY.js";import"./Key01-CjhxaGrC.js";import"./Trash01-Cs72bTP6.js";import"./card-CoyaoT6W.js";import"./toggle-group-C20N8vss.js";import"./popover-CF2iI6mL.js";import"./ai-providers-logos-C_voEDmL.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./index-COFAW4F5.js";import"./ChevronUp-l7iXrppT.js";import"./ChevronDown-t60R5l2B.js";import"./label-DTNkd20e.js";import"./Upload01-ByUvmqDm.js";import"./Container-Cvd3ILsk.js";import"./use-connection-CVlyXslk.js";import"./use-collections-DhavVshD.js";import"./registry-utils-DZHZD5gP.js";import"./binder-C1eSZFT4.js";import"./use-install-from-registry-Ch6GOwHv.js";import"./extract-connection-data-DhU56Zd0.js";import"./generate-id-DRuK_WRM.js";import"./Loading01-D0sCOwf7.js";import"./Plus-Dcf0Y3wA.js";import"./collection-display-button-BcIJp1SX.js";import"./dropdown-menu-BcNYk9_F.js";import"./ChevronRight-3uKoJ2yX.js";import"./ArrowDown-DrJY3Wf3.js";import"./ArrowUp-B4DKDJey.js";import"./Grid01-NkSMXhQ7.js";import"./List-BbeB05v1.js";import"./badge-Cjjl_FHP.js";import"./collection-search-nKZEJ_r3.js";import"./SearchMd-BSRGE1t4.js";import"./breadcrumb-C8hDXS86.js";import"./collection-table-wrapper-Bq15EL3p.js";import"./table-BSLV9H8I.js";import"./integration-icon-Dyr7fOYU.js";import"./checkbox-D5DFx9da.js";import"./use-members-Coq2XO1k.js";import"./alert-dialog-qmvoIx9J.js";import"./DotsHorizontal-DE3Ptwny.js";import"./Lock01-DFfVnVtc.js";import"./empty-state-BuGXY27l.js";import"./textarea-CgJ5x-hs.js";import"./DotsVertical-CZep1rYf.js";import"./XClose-BxUlnJUs.js";import"./command-Bk-fXiVb.js";import"./index-hmkE8HuP.js";const xe=({size:e=24,color:t="currentColor",...n})=>I.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},I.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"}));xe.displayName="Bell01";function Xe(e){const t=C.c(26),{activeSection:n,onNavigate:o}=e,{data:a}=ne.useSession(),r=a?.user,l=r?.image,c=r?.name??"Profile",m=r?.name??"U";let f;t[0]!==m||t[1]!==l?(f=s.jsx(pe,{url:l,fallback:m,shape:"circle",size:"2xs",className:"size-4 shrink-0"}),t[0]=m,t[1]=l,t[2]=f):f=t[2];let i;t[3]!==c||t[4]!==f?(i={key:"account.profile",label:c,icon:f},t[3]=c,t[4]=f,t[5]=i):i=t[5];let p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p={key:"account.preferences",label:"Preferences",icon:s.jsx(Ie,{size:14})},t[6]=p):p=t[6];let x;t[7]!==i?(x=[i,p],t[7]=i,t[8]=x):x=t[8];const g=x;let u;t[9]===Symbol.for("react.memo_cache_sentinel")?(u={key:"org.general",label:"General",icon:s.jsx($e,{size:14})},t[9]=u):u=t[9];let d;t[10]===Symbol.for("react.memo_cache_sentinel")?(d={key:"org.plugins",label:"Features",icon:s.jsx(Me,{size:14})},t[10]=d):d=t[10];let j;t[11]===Symbol.for("react.memo_cache_sentinel")?(j={key:"org.ai-providers",label:"AI Providers",icon:s.jsx(Ce,{size:14})},t[11]=j):j=t[11];let h;t[12]===Symbol.for("react.memo_cache_sentinel")?(h=[u,d,j,{key:"org.members",label:"Members",icon:s.jsx(Oe,{size:14})}],t[12]=h):h=t[12];const _=h;let b;t[13]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Account"}),t[13]=b):b=t[13];let y;t[14]!==g||t[15]!==n||t[16]!==o?(y=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[b,g.map(v=>s.jsxs("button",{type:"button",onClick:()=>o(v.key),className:V("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]=g,t[15]=n,t[16]=o,t[17]=y):y=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:V("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 w;t[22]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.179.3"]})}),t[22]=w):w=t[22];let k;return t[23]!==y||t[24]!==S?(k=s.jsxs("div",{className:"w-full sm:w-52 shrink-0 sm:border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-4 flex-1",children:[y,S,w]}),t[23]=y,t[24]=S,t[25]=k):k=t[25],k}function et(){const e=C.c(32),{data:t}=ne.useSession(),[n,o]=I.useState(!1),a=t?.user,r=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 c=l;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Profile"})}),e[2]=m):m=e[2];const f=a?.name??"U";let i;e[3]!==f||e[4]!==r?(i=s.jsx(pe,{url:r,fallback:f,shape:"circle",size:"xl",className:"size-16 shrink-0"}),e[3]=f,e[4]=r,e[5]=i):i=e[5];const p=a?.name??"User";let x;e[6]!==p?(x=s.jsx("span",{className:"text-sm font-semibold text-foreground truncate",children:p}),e[6]=p,e[7]=x):x=e[7];const g=a?.email;let u;e[8]!==g?(u=s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:g}),e[8]=g,e[9]=u):u=e[9];let d;e[10]!==x||e[11]!==u?(d=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[x,u]}),e[10]=x,e[11]=u,e[12]=d):d=e[12];let j;e[13]!==i||e[14]!==d?(j=s.jsxs("div",{className:"flex items-center gap-4",children:[i,d]}),e[13]=i,e[14]=d,e[15]=j):j=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"User ID"}),e[16]=h):h=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 b=a?.id;let y;e[18]!==b?(y=s.jsx("span",{className:"font-mono text-sm",children:b}),e[18]=b,e[19]=y):y=e[19];let N;e[20]!==n?(N=n?s.jsx(De,{size:14,className:"text-green-600 shrink-0"}):s.jsx(qe,{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]!==c||e[23]!==y||e[24]!==N?(S=s.jsx(Le,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:c,className:"group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[y,N]})}),e[22]=c,e[23]=y,e[24]=N,e[25]=S):S=e[25];let w;e[26]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Ee,{side:"left",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[26]=w):w=e[26];let k;e[27]!==S?(k=s.jsxs("div",{className:"flex flex-col",children:[h,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[_,s.jsx(Fe,{children:s.jsxs(Te,{children:[S,w]})})]})]}),e[27]=S,e[28]=k):k=e[28];let v;return e[29]!==k||e[30]!==j?(v=s.jsxs("div",{className:"flex flex-col gap-8",children:[m,j,k]}),e[29]=k,e[30]=j,e[31]=v):v=e[31],v}function K(e){const t=C.c(27),{icon:n,label:o,description:a,control:r,onClick:l,disabled:c}=e,m=c?void 0:l,f=l?"button":void 0,i=l&&!c?0:void 0;let p;t[0]!==c||t[1]!==l?(p=l&&!c?N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),l())}:void 0,t[0]=c,t[1]=l,t[2]=p):p=t[2];const x=l&&!c?"pointer":void 0;let g;t[3]!==x?(g={cursor:x},t[3]=x,t[4]=g):g=t[4];let u;t[5]!==n?(u=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:n}),t[5]=n,t[6]=u):u=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 j;t[9]!==a?(j=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:a}),t[9]=a,t[10]=j):j=t[10];let h;t[11]!==d||t[12]!==j?(h=s.jsxs("div",{className:"min-w-0",children:[d,j]}),t[11]=d,t[12]=j,t[13]=h):h=t[13];let _;t[14]!==h||t[15]!==u?(_=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[u,h]}),t[14]=h,t[15]=u,t[16]=_):_=t[16];let b;t[17]!==r?(b=s.jsx("div",{onClick:tt,className:"shrink-0",children:r}),t[17]=r,t[18]=b):b=t[18];let y;return t[19]!==m||t[20]!==_||t[21]!==b||t[22]!==f||t[23]!==i||t[24]!==p||t[25]!==g?(y=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0",onClick:m,role:f,tabIndex:i,onKeyDown:p,style:g,children:[_,b]}),t[19]=m,t[20]=_,t[21]=b,t[22]=f,t[23]=i,t[24]=p,t[25]=g,t[26]=y):y=t[26],y}function tt(e){return e.stopPropagation()}function de(){const e=C.c(47),[t,n]=Pe();let o;e[0]!==n?(o=async P=>{if(P&&await Notification.requestPermission()!=="granted"){oe.error("Notifications denied. Please enable them in your browser settings."),n(lt);return}n(z=>({...z,enableNotifications:P}))},e[0]=n,e[1]=o):o=e[1];const a=o;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Preferences"})}),e[2]=r):r=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ge,{size:16}),e[3]=l):l=e[3];let c;e[4]!==n?(c=()=>n(ot),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==n?(m=P=>n(z=>({...z,devMode:P})),e[6]=n,e[7]=m):m=e[7];let f;e[8]!==t.devMode||e[9]!==m?(f=s.jsx(H,{checked:t.devMode,onCheckedChange:m}),e[8]=t.devMode,e[9]=m,e[10]=f):f=e[10];let i;e[11]!==c||e[12]!==f?(i=s.jsx(K,{icon:l,label:"Developer Mode",description:"Show technical details like JSON input/output for tool calls.",onClick:c,control:f}),e[11]=c,e[12]=f,e[13]=i):i=e[13];let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xe,{size:16}),e[14]=p):p=e[14];let x;e[15]!==a||e[16]!==t.enableNotifications?(x=s.jsx(K,{icon:p,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(H,{disabled:typeof Notification>"u",checked:t.enableNotifications,onCheckedChange:a})}),e[15]=a,e[16]=t.enableNotifications,e[17]=x):x=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ke,{size:16}),e[18]=g):g=e[18];let u;e[19]!==n?(u=()=>n(st),e[19]=n,e[20]=u):u=e[20];let d;e[21]!==n?(d=P=>n(z=>({...z,experimentalAutomations:P})),e[21]=n,e[22]=d):d=e[22];let j;e[23]!==t.experimentalAutomations||e[24]!==d?(j=s.jsx(H,{checked:t.experimentalAutomations,onCheckedChange:d}),e[23]=t.experimentalAutomations,e[24]=d,e[25]=j):j=e[25];let h;e[26]!==u||e[27]!==j?(h=s.jsx(K,{icon:g,label:"Experimental: Automations",description:"Enable the Automations feature in the sidebar. This is an experimental feature under active development.",onClick:u,control:j}),e[26]=u,e[27]=j,e[28]=h):h=e[28];let _;e[29]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Ve,{size:16}),e[29]=_):_=e[29];let b;e[30]!==n?(b=P=>n(z=>({...z,toolApprovalLevel:P})),e[30]=n,e[31]=b):b=e[31];let y;e[32]===Symbol.for("react.memo_cache_sentinel")?(y={none:"Always ask",readonly:"Skip read-only",yolo:"Auto-approve all"},e[32]=y):y=e[32];const N=y[t.toolApprovalLevel];let S;e[33]!==N?(S=s.jsx(Be,{className:"w-36",children:s.jsx("span",{children:N})}),e[33]=N,e[34]=S):S=e[34];let w;e[35]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Y,{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]=w):w=e[35];let k;e[36]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(Y,{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(Re,{children:[w,k,s.jsx(Y,{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]!==b||e[40]!==S?($=s.jsx(K,{icon:_,label:"Tool Approval",description:"Choose when to require approval before tools execute.",control:s.jsxs(Ue,{value:t.toolApprovalLevel,onValueChange:b,children:[S,v]})}),e[38]=t.toolApprovalLevel,e[39]=b,e[40]=S,e[41]=$):$=e[41];let A;return e[42]!==h||e[43]!==$||e[44]!==i||e[45]!==x?(A=s.jsxs("div",{className:"flex flex-col gap-6",children:[r,s.jsxs("div",{className:"flex flex-col",children:[i,x,h,$]})]}),e[42]=h,e[43]=$,e[44]=i,e[45]=x,e[46]=A):A=e[46],A}function st(e){return{...e,experimentalAutomations:!e.experimentalAutomations}}function ot(e){return{...e,devMode:!e.devMode}}function lt(e){return{...e,enableNotifications:!1}}const nt=ge({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().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:W().optional()});function it(){const e=ie(),{org:t,project:n}=re(),o=je(),[a,r]=I.useState(!1),l=be({resolver:ye(nt),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),c=Qe({mutationFn:async i=>{const p={name:i.name,slug:i.slug};i.logo&&(p.logo=i.logo);const x=await ne.organization.update({organizationId:t.id,data:p});if(x?.error)throw new Error(x.error.message||"Failed to update organization");return x},onSuccess:i=>{o.invalidateQueries({queryKey:ae.organizations()}),o.invalidateQueries({queryKey:ae.activeOrganization(t.slug)}),oe.success("Organization settings updated successfully"),i?.data?.slug&&i.data.slug!==t.slug&&e({to:"/$org/$project/settings",params:{org:i.data.slug,project:n.slug}})},onError:i=>{oe.error(i instanceof Error?i.message:"Failed to update organization")},onSettled:()=>{r(!1)}}),m=i=>{r(!0),c.mutate(i)},f=l.formState.isDirty;return s.jsx(Je,{...l,children:s.jsxs("form",{onSubmit:l.handleSubmit(m),className:"space-y-6",children:[s.jsx(Z,{control:l.control,name:"name",render:({field:i})=>s.jsxs(X,{children:[s.jsx(ee,{children:"Organization Name"}),s.jsx(te,{children:s.jsx(me,{placeholder:"My Organization",...i,disabled:a})}),s.jsx(se,{})]})}),s.jsx(Z,{control:l.control,name:"slug",render:({field:i})=>s.jsxs(X,{children:[s.jsx(ee,{children:"Organization Slug"}),s.jsx(te,{children:s.jsx(me,{placeholder:"my-organization",...i,disabled:a,onChange:p=>{const x=p.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");i.onChange(x)}})}),s.jsx(We,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(se,{})]})}),s.jsx(Z,{control:l.control,name:"logo",render:({field:i})=>s.jsxs(X,{children:[s.jsx(ee,{children:"Logo"}),s.jsx(te,{children:s.jsx(He,{value:i.value,onChange:i.onChange,name:l.watch("name"),disabled:a})}),s.jsx(se,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(Q,{type:"submit",disabled:!f||a,className:"min-w-24",children:a?"Saving...":"Save Changes"}),f&&s.jsx(Q,{type:"button",variant:"outline",onClick:()=>l.reset(),disabled:a,children:"Cancel"})]})]})})}function rt(){const e=C.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(it,{})]}),e[0]=t):t=e[0],t}function at(){const e=C.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Ze,{}),e[0]=t):t=e[0],t}function he(){const e=C.c(3);let t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(G,{className:"h-6 w-48"}),n=s.jsx(G,{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(G,{className:"h-12 w-full"}),s.jsx(G,{className:"h-12 w-full"})]})]}),e[2]=o):o=e[2],o}function ct(e){const t=C.c(14),{projectSlug:n,children:o}=e,{org:a}=re(),{data:r,isLoading:l}=ue(a.id,n);if(l||!r){let p;return t[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(he,{}),t[0]=p):p=t[0],p}const c=n===D;let m;t[1]!==r.description||t[2]!==r.enabledPlugins||t[3]!==r.id||t[4]!==r.name||t[5]!==r.organizationId||t[6]!==r.slug||t[7]!==r.ui||t[8]!==c?(m={id:r.id,organizationId:r.organizationId,slug:r.slug,name:r.name,description:r.description,enabledPlugins:r.enabledPlugins,ui:r.ui,isOrgAdmin:c},t[1]=r.description,t[2]=r.enabledPlugins,t[3]=r.id,t[4]=r.name,t[5]=r.organizationId,t[6]=r.slug,t[7]=r.ui,t[8]=c,t[9]=m):m=t[9];const f=m;let i;return t[10]!==o||t[11]!==f||t[12]!==a?(i=s.jsx(fe,{org:a,project:f,children:o}),t[10]=o,t[11]=f,t[12]=a,t[13]=i):i=t[13],i}function mt(e){const t=C.c(7),{section:n}=e;switch(n){case"account.profile":{let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(et,{}),t[0]=o):o=t[0],o}case"account.preferences":{let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(de,{}),t[1]=o):o=t[1],o}case"org.general":{let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(rt,{}),t[2]=o):o=t[2],o}case"org.plugins":{let o;return t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ct,{projectSlug:D,children:s.jsx(Ye,{})}),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(Ae,{}),t[4]=o):o=t[4],o}case"org.members":{let o;return t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(at,{}),t[5]=o):o=t[5],o}default:{let o;return t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(de,{}),t[6]=o):o=t[6],o}}}const dt={"account.profile":"Profile","account.preferences":"Preferences","org.general":"General","org.plugins":"Features","org.ai-providers":"AI Providers","org.billing":"Billing","org.members":"Members"};function ft(){const e=C.c(49),{isOpen:t,activeSection:n,open:o,close:a}=ze(),[r,l]=I.useState(!1),[c,m]=I.useState(t);c!==t&&(m(t),l(t));let f;e[0]!==o?(f=J=>{o(J),l(!0)},e[0]=o,e[1]=f):f=e[1];const i=f;let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{l(!1)},e[2]=p):p=e[2];const x=p;let g;e[3]!==a?(g=J=>{J||(a(),l(!1))},e[3]=a,e[4]=g):g=e[4];const u=g;let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ne,{className:"sr-only",children:"Settings"}),e[5]=d):d=e[5];const j=r?"hidden":"flex";let h;e[6]!==j?(h=V(j,"sm:flex flex-col w-full sm:w-auto"),e[6]=j,e[7]=h):h=e[7];let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("span",{className:"text-base font-semibold",children:"Settings"}),e[8]=_):_=e[8];let b;e[9]!==u?(b=()=>u(!1),e[9]=u,e[10]=b):b=e[10];let y,N;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ce,{size:16}),N=s.jsx("span",{className:"sr-only",children:"Close"}),e[11]=y,e[12]=N):(y=e[11],N=e[12]);let S;e[13]!==b?(S=s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border sm:hidden",children:[_,s.jsxs("button",{type:"button",onClick:b,className:"rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",children:[y,N]})]}),e[13]=b,e[14]=S):S=e[14];let w;e[15]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"w-full sm:w-52 shrink-0 border-r border-border"}),e[15]=w):w=e[15];let k;e[16]!==n||e[17]!==i?(k=s.jsx(I.Suspense,{fallback:w,children:s.jsx(Xe,{activeSection:n,onNavigate:i})}),e[16]=n,e[17]=i,e[18]=k):k=e[18];let v;e[19]!==S||e[20]!==k||e[21]!==h?(v=s.jsxs("div",{className:h,children:[S,k]}),e[19]=S,e[20]=k,e[21]=h,e[22]=v):v=e[22];const $=r?"flex":"hidden";let A;e[23]!==$?(A=V($,"sm:flex flex-1 min-w-0 overflow-y-auto relative flex-col overflow-hidden"),e[23]=$,e[24]=A):A=e[24];let P;e[25]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs("button",{type:"button",onClick:x,className:"rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity",children:[s.jsx(we,{size:16}),s.jsx("span",{className:"sr-only",children:"Back"})]}),e[25]=P):P=e[25];const z=dt[n];let O;e[26]!==z?(O=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-border sm:hidden",children:[P,s.jsx("span",{className:"text-base font-semibold",children:z})]}),e[26]=z,e[27]=O):O=e[27];let M;e[28]!==u?(M=()=>u(!1),e[28]=u,e[29]=M):M=e[29];let q,U;e[30]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(ce,{size:16}),U=s.jsx("span",{className:"sr-only",children:"Close"}),e[30]=q,e[31]=U):(q=e[30],U=e[31]);let L;e[32]!==M?(L=s.jsxs("button",{type:"button",onClick:M,className:"hidden sm:block 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:[q,U]}),e[32]=M,e[33]=L):L=e[33];let B;e[34]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(he,{}),e[34]=B):B=e[34];let E;e[35]!==n?(E=s.jsx("div",{className:"p-5 sm:p-8 flex-1 overflow-y-auto",children:s.jsx(I.Suspense,{fallback:B,children:s.jsx(mt,{section:n})})}),e[35]=n,e[36]=E):E=e[36];let F;e[37]!==A||e[38]!==O||e[39]!==L||e[40]!==E?(F=s.jsxs("div",{className:A,children:[O,L,E]}),e[37]=A,e[38]=O,e[39]=L,e[40]=E,e[41]=F):F=e[41];let T;e[42]!==v||e[43]!==F?(T=s.jsxs(_e,{className:"sm:max-w-[1100px] h-[100dvh] sm:h-[85vh] max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-[1100px] rounded-none sm:rounded-xl p-0 overflow-hidden flex flex-col gap-0 border-0 sm:border",closeButtonClassName:"hidden",children:[d,s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[v,F]})]}),e[42]=v,e[43]=F,e[44]=T):T=e[44];let R;return e[45]!==u||e[46]!==t||e[47]!==T?(R=s.jsx(ke,{open:t,onOpenChange:u,children:T}),e[45]=u,e[46]=t,e[47]=T,e[48]=R):R=e[48],R}function ut(e){const t=C.c(12),{projectSlug:n,orgSlug:o,error:a}=e,r=ie();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 c;t[1]!==n?(c=s.jsxs("p",{className:"text-muted-foreground text-center",children:['There was an error loading the project "',n,'".']}),t[1]=n,t[2]=c):c=t[2];let m;t[3]!==a.message?(m=s.jsx("p",{className:"text-sm text-muted-foreground",children:a.message}),t[3]=a.message,t[4]=m):m=t[4];let f;t[5]!==r||t[6]!==o?(f=s.jsx(Q,{variant:"link",onClick:()=>r({to:"/$org/$project",params:{org:o,project:D}}),children:"Go to organization home"}),t[5]=r,t[6]=o,t[7]=f):f=t[7];let i;return t[8]!==c||t[9]!==m||t[10]!==f?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[l,c,m,f]}),t[8]=c,t[9]=m,t[10]=f,t[11]=i):i=t[11],i}function pt(e){const t=C.c(9),{projectSlug:n,orgSlug:o}=e,a=ie();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("h1",{className:"text-xl font-semibold",children:"Project not found"}),t[0]=r):r=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 c;t[3]!==a||t[4]!==o?(c=s.jsx(Q,{variant:"link",onClick:()=>a({to:"/$org/$project",params:{org:o,project:D}}),children:"Go to organization home"}),t[3]=a,t[4]=o,t[5]=c):c=t[5];let m;return t[6]!==l||t[7]!==c?(m=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[r,l,c]}),t[6]=l,t[7]=c,t[8]=m):m=t[8],m}function xt(){const e=C.c(23);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=ve(t),{org:o}=re(),a=n.org,r=n.project,{data:l,isLoading:c,error:m}=ue(o.id,r);if(c){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(le,{}),e[1]=d):d=e[1],d}if(m){let d;return e[2]!==m||e[3]!==a||e[4]!==r?(d=s.jsx(ut,{projectSlug:r,orgSlug:a,error:m}),e[2]=m,e[3]=a,e[4]=r,e[5]=d):d=e[5],d}if(!l){let d;return e[6]!==a||e[7]!==r?(d=s.jsx(pt,{projectSlug:r,orgSlug:a}),e[6]=a,e[7]=r,e[8]=d):d=e[8],d}const f=l.slug===D;let i;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?(i={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]=i):i=e[17];const p=i;let x,g;e[18]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(I.Suspense,{fallback:s.jsx(le,{}),children:s.jsx(Se,{})}),g=s.jsx(ft,{}),e[18]=x,e[19]=g):(x=e[18],g=e[19]);let u;return e[20]!==p||e[21]!==o?(u=s.jsxs(fe,{org:o,project:p,children:[x,g]}),e[20]=p,e[21]=o,e[22]=u):u=e[22],u}function Rs(){const e=C.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(I.Suspense,{fallback:s.jsx(le,{}),children:s.jsx(xt,{})}),e[0]=t):t=e[0],t}export{Rs 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,
|
|
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,bg as D,bh as $,c as Q}from"./index-DMmNh7jR.js";import{u as Y}from"./useQuery-B-AaJTeZ.js";import{u as H}from"./useMutation-DrLoVqQ7.js";import{u as X,a as Z}from"./constants-DclZTqHf.js";import{S as ee}from"./switch-CoYIum7D.js";import{L as te}from"./label-DTNkd20e.js";import{n as ne}from"./Container-Cvd3ILsk.js";import{b as se}from"./use-connection-CVlyXslk.js";import{d as ie,h as re}from"./registry-utils-DZHZD5gP.js";import{u as oe}from"./use-install-from-registry-Ch6GOwHv.js";import{i as le}from"./Loading01-D0sCOwf7.js";import{s as ae}from"./Plus-Dcf0Y3wA.js";import{S as ce,a as de,b as ue,c as me,d as z}from"./select-hHfKwVbN.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bL as M,r as B,c as H,u as T,D as U,j as r,Q as F,e as G,B as I,O as Z}from"./index-DnJ6a24w.js";import{a as q}from"./use-project-RpN1fut9.js";import{P as A}from"./index-B09Yemt1.js";import{C as J}from"./collection-search-Dzoe9W56.js";import{A as K}from"./avatar-BoRF-Me1.js";import{f as Q}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as W}from"./empty-state-BjCXvoyS.js";import{C as X}from"./create-project-dialog-Bs_mS8aj.js";import{s as R}from"./Plus-CURSuoDd.js";import{B as Y,a as ee,b as te,c as se}from"./breadcrumb-BWfepeob.js";import"./useQuery-mzOsnjYJ.js";import"./constants-D5QZg84_.js";import"./useMutation-Betr8yis.js";import"./tooltip-Csc3oeTz.js";import"./index-hCeFdkUk.js";import"./Loading01-DQphO9Su.js";import"./SearchMd-C8ADHGFY.js";import"./input-BBKBJVKe.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-B8WS5FOh.js";import"./X-BT_y3J3a.js";import"./form-tOTNzCZe.js";import"./label-DJvdRQ2A.js";import"./textarea-lF0m7xkk.js";import"./Check-CLxUgI8Z.js";import"./ChevronRight-BEUO8jhU.js";const re=M("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),V=({size:t=24,color:e="currentColor",...s})=>B.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},B.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm7.5 4.5 5 5M16 14a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));V.displayName="FolderClosed";function le(t){const e=H.c(58),{project:s,onSettingsClick:d}=t,{org:l}=T(),c=s.ui?.themeColor??"#60a5fa",j=s.ui?.bannerColor??c,m=s.ui?.banner?`url(${s.ui.banner})`:void 0;let i;e[0]!==j||e[1]!==m?(i={backgroundColor:j,backgroundImage:m,backgroundSize:"cover",backgroundPosition:"center"},e[0]=j,e[1]=m,e[2]=i):i=e[2];const S=i;let u;e[3]!==l.slug||e[4]!==s.slug?(u={org:l.slug,project:s.slug},e[3]=l.slug,e[4]=s.slug,e[5]=u):u=e[5];let f;e[6]!==d?(f=O=>{O.preventDefault(),O.stopPropagation(),d?.(O)},e[6]=d,e[7]=f):f=e[7];let x,b;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=U("absolute top-3 right-3 size-6 rounded-md flex items-center justify-center","bg-black/20 hover:bg-black/40 transition-colors"),b=r.jsx(re,{className:"size-3.5 text-white"}),e[8]=x,e[9]=b):(x=e[8],b=e[9]);let g;e[10]!==f?(g=r.jsx("button",{type:"button",onClick:f,className:x,children:b}),e[10]=f,e[11]=g):g=e[11];let a;e[12]!==S||e[13]!==g?(a=r.jsx("div",{className:"h-20 relative",style:S,children:g}),e[12]=S,e[13]=g,e[14]=a):a=e[14];let n;e[15]!==s.name||e[16]!==s.ui||e[17]!==c?(n=s.ui?.icon?r.jsx("img",{src:s.ui.icon,alt:"",className:"size-8 rounded-md object-cover"}):r.jsx("div",{className:"size-8 rounded-md flex items-center justify-center",style:{backgroundColor:c},children:r.jsx("span",{className:"text-sm font-medium text-white",children:s.name.charAt(0).toUpperCase()})}),e[15]=s.name,e[16]=s.ui,e[17]=c,e[18]=n):n=e[18];let h;e[19]!==s.name?(h=r.jsx("h3",{className:"font-medium text-base text-foreground truncate",children:s.name}),e[19]=s.name,e[20]=h):h=e[20];let p;e[21]!==s.updatedAt?(p=Q(new Date(s.updatedAt),{addSuffix:!0}),e[21]=s.updatedAt,e[22]=p):p=e[22];let C;e[23]!==p?(C=r.jsxs("p",{className:"text-sm text-muted-foreground",children:["Edited"," ",p]}),e[23]=p,e[24]=C):C=e[24];let w;e[25]!==h||e[26]!==C?(w=r.jsxs("div",{className:"flex flex-col",children:[h,C]}),e[25]=h,e[26]=C,e[27]=w):w=e[27];let v;e[28]!==n||e[29]!==w?(v=r.jsxs("div",{className:"flex flex-col gap-4",children:[n,w]}),e[28]=n,e[29]=w,e[30]=v):v=e[30];let _;e[31]!==s.boundConnections?(_=s.boundConnections.slice(0,4).map(oe),e[31]=s.boundConnections,e[32]=_):_=e[32];let N;e[33]!==s.boundConnections.length?(N=s.boundConnections.length>4&&r.jsx("div",{className:"-mr-2 rounded-md border border-background",children:r.jsxs("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center text-xs text-muted-foreground",children:["+",s.boundConnections.length-4]})}),e[33]=s.boundConnections.length,e[34]=N):N=e[34];let z;e[35]!==_||e[36]!==N?(z=r.jsxs("div",{className:"flex pr-2",children:[_,N]}),e[35]=_,e[36]=N,e[37]=z):z=e[37];const P=l.logo??void 0;let k;e[38]!==l.name||e[39]!==P?(k=r.jsx(K,{url:P,fallback:l.name,size:"2xs",className:"shrink-0 rounded",objectFit:"cover"}),e[38]=l.name,e[39]=P,e[40]=k):k=e[40];let y;e[41]!==l.name?(y=r.jsx("span",{className:"truncate max-w-20",children:l.name}),e[41]=l.name,e[42]=y):y=e[42];let o;e[43]!==k||e[44]!==y?(o=r.jsxs("div",{className:"flex items-center gap-2 text-xs text-foreground",children:[k,y]}),e[43]=k,e[44]=y,e[45]=o):o=e[45];let L;e[46]!==z||e[47]!==o?(L=r.jsxs("div",{className:"flex items-center justify-between mt-4",children:[z,o]}),e[46]=z,e[47]=o,e[48]=L):L=e[48];let $;e[49]!==v||e[50]!==L?($=r.jsxs("div",{className:"flex flex-col flex-1 justify-between p-4",children:[v,L]}),e[49]=v,e[50]=L,e[51]=$):$=e[51];let E;e[52]!==$||e[53]!==a?(E=r.jsxs("div",{className:"border border-border rounded-xl overflow-hidden bg-card",children:[a,$]}),e[52]=$,e[53]=a,e[54]=E):E=e[54];let D;return e[55]!==E||e[56]!==u?(D=r.jsx(F,{to:"/$org/$project",params:u,className:"block group",children:E}),e[55]=E,e[56]=u,e[57]=D):D=e[57],D}function oe(t){return r.jsx("div",{className:"-mr-2 rounded-md border border-background",children:r.jsx(ie,{connection:t})},t.id)}function ie(t){const e=H.c(13),{connection:s}=t;if(s.icon){let m;e[0]!==s.icon||e[1]!==s.title?(m=r.jsx("img",{src:s.icon,alt:s.title,className:"size-4 object-cover"}),e[0]=s.icon,e[1]=s.title,e[2]=m):m=e[2];let i;return e[3]!==s.title||e[4]!==m?(i=r.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:s.title,children:m}),e[3]=s.title,e[4]=m,e[5]=i):i=e[5],i}const d=s.title;let l;e[6]!==s.title?(l=s.title.charAt(0).toUpperCase(),e[6]=s.title,e[7]=l):l=e[7];let c;e[8]!==l?(c=r.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:l}),e[8]=l,e[9]=c):c=e[9];let j;return e[10]!==s.title||e[11]!==c?(j=r.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:d,children:c}),e[10]=s.title,e[11]=c,e[12]=j):j=e[12],j}function Be(){const t=H.c(39),{org:e}=T(),{data:s,isLoading:d}=q(e.id),[l,c]=B.useState(""),[j,m]=B.useState(!1),i=G();let S,u,f,x,b,g,a,n;if(t[0]!==d||t[1]!==i||t[2]!==e.slug||t[3]!==s||t[4]!==l){const w=s?.filter(ne)?.filter(o=>o.name.toLowerCase().includes(l.toLowerCase())||o.description?.toLowerCase().includes(l.toLowerCase()))??[];let v;t[13]!==i||t[14]!==e.slug?(v=o=>{i({to:"/$org/$project/settings/general",params:{org:e.slug,project:o}})},t[13]=i,t[14]=e.slug,t[15]=v):v=t[15];const _=v;let N;t[16]===Symbol.for("react.memo_cache_sentinel")?(N=()=>{m(!0)},t[16]=N):N=t[16];const z=N;u=A;let P;t[17]===Symbol.for("react.memo_cache_sentinel")?(P=r.jsx(A.Header.Left,{children:r.jsx(Y,{children:r.jsx(ee,{children:r.jsx(te,{children:r.jsx(se,{children:"Projects"})})})})}),t[17]=P):P=t[17];let k;t[18]===Symbol.for("react.memo_cache_sentinel")?(k=!1,t[18]=k):k=t[18],t[19]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsxs(A.Header,{children:[P,r.jsxs(A.Header.Right,{children:[k,r.jsxs(I,{onClick:z,size:"sm",children:[r.jsx(R,{size:14}),"Create Project"]})]})]}),t[19]=a):a=t[19];let y;t[20]===Symbol.for("react.memo_cache_sentinel")?(y=o=>{o.key==="Escape"&&(c(""),o.target.blur())},t[20]=y):y=t[20],t[21]!==l?(n=r.jsx(J,{value:l,onChange:c,placeholder:"Search for a project...",onKeyDown:y}),t[21]=l,t[22]=n):n=t[22],S=A.Content,f="@container",t[23]!==d?(x=d&&r.jsx("div",{className:"p-5",children:r.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:[...Array(4)].map(ae)})}),t[23]=d,t[24]=x):x=t[24],b=!d&&w.length===0&&r.jsx("div",{className:"flex items-center h-full",children:r.jsx(W,{image:r.jsx(V,{size:48,className:"text-muted-foreground"}),title:l?"No projects found":"No projects yet",description:l?`No projects match "${l}"`:"Create a project to get started.",actions:!l&&r.jsxs(I,{size:"sm",onClick:z,children:[r.jsx(R,{size:14}),"Create Project"]})})}),g=!d&&w.length>0&&r.jsx("div",{className:"p-5",children:r.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:w.map(o=>r.jsx(le,{project:o,onSettingsClick:()=>_(o.slug)},o.id))})}),t[0]=d,t[1]=i,t[2]=e.slug,t[3]=s,t[4]=l,t[5]=S,t[6]=u,t[7]=f,t[8]=x,t[9]=b,t[10]=g,t[11]=a,t[12]=n}else S=t[5],u=t[6],f=t[7],x=t[8],b=t[9],g=t[10],a=t[11],n=t[12];let h;t[25]!==S||t[26]!==f||t[27]!==x||t[28]!==b||t[29]!==g?(h=r.jsxs(S,{className:f,children:[x,b,g]}),t[25]=S,t[26]=f,t[27]=x,t[28]=b,t[29]=g,t[30]=h):h=t[30];let p;t[31]!==j?(p=r.jsx(X,{open:j,onOpenChange:m}),t[31]=j,t[32]=p):p=t[32];let C;return t[33]!==u||t[34]!==a||t[35]!==n||t[36]!==h||t[37]!==p?(C=r.jsxs(u,{children:[a,n,h,p]}),t[33]=u,t[34]=a,t[35]=n,t[36]=h,t[37]=p,t[38]=C):C=t[38],C}function ae(t,e){return r.jsx("div",{className:"h-[240px] rounded-xl bg-muted animate-pulse"},e)}function ne(t){return t.slug!==Z}export{Be as default};
|
|
1
|
+
import{bM as V,r as B,c as H,u as M,D as G,j as r,G as U,e as F,B as I,O as Z}from"./index-DMmNh7jR.js";import{a as q}from"./use-project-XBmxO4XX.js";import{P as A}from"./index-DYAF-Vgt.js";import{C as J}from"./collection-search-nKZEJ_r3.js";import{A as K}from"./avatar-DeGeJRAR.js";import{f as W}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as Q}from"./empty-state-BuGXY27l.js";import{C as X}from"./create-project-dialog-M-dgrV_c.js";import{s as R}from"./Plus-Dcf0Y3wA.js";import{B as Y,a as ee,b as te,c as se}from"./breadcrumb-C8hDXS86.js";import"./useQuery-B-AaJTeZ.js";import"./constants-DclZTqHf.js";import"./useMutation-DrLoVqQ7.js";import"./tooltip-DHJtaI_Z.js";import"./index-COFAW4F5.js";import"./X-CD9ZB6hw.js";import"./Loading01-D0sCOwf7.js";import"./SearchMd-BSRGE1t4.js";import"./input-Bt_nejZh.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-DzGwvQ_K.js";import"./form-DBjkdSps.js";import"./label-DTNkd20e.js";import"./textarea-CgJ5x-hs.js";import"./Check-5nIJP_0B.js";import"./ChevronRight-3uKoJ2yX.js";const re=V("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),T=({size:t=24,color:e="currentColor",...s})=>B.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},B.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm7.5 4.5 5 5M16 14a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));T.displayName="FolderClosed";function le(t){const e=H.c(58),{project:s,onSettingsClick:d}=t,{org:l}=M(),c=s.ui?.themeColor??"#60a5fa",j=s.ui?.bannerColor??c,m=s.ui?.banner?`url(${s.ui.banner})`:void 0;let i;e[0]!==j||e[1]!==m?(i={backgroundColor:j,backgroundImage:m,backgroundSize:"cover",backgroundPosition:"center"},e[0]=j,e[1]=m,e[2]=i):i=e[2];const S=i;let u;e[3]!==l.slug||e[4]!==s.slug?(u={org:l.slug,project:s.slug},e[3]=l.slug,e[4]=s.slug,e[5]=u):u=e[5];let f;e[6]!==d?(f=O=>{O.preventDefault(),O.stopPropagation(),d?.(O)},e[6]=d,e[7]=f):f=e[7];let x,b;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=G("absolute top-3 right-3 size-6 rounded-md flex items-center justify-center","bg-black/20 hover:bg-black/40 transition-colors"),b=r.jsx(re,{className:"size-3.5 text-white"}),e[8]=x,e[9]=b):(x=e[8],b=e[9]);let g;e[10]!==f?(g=r.jsx("button",{type:"button",onClick:f,className:x,children:b}),e[10]=f,e[11]=g):g=e[11];let a;e[12]!==S||e[13]!==g?(a=r.jsx("div",{className:"h-20 relative",style:S,children:g}),e[12]=S,e[13]=g,e[14]=a):a=e[14];let n;e[15]!==s.name||e[16]!==s.ui||e[17]!==c?(n=s.ui?.icon?r.jsx("img",{src:s.ui.icon,alt:"",className:"size-8 rounded-md object-cover"}):r.jsx("div",{className:"size-8 rounded-md flex items-center justify-center",style:{backgroundColor:c},children:r.jsx("span",{className:"text-sm font-medium text-white",children:s.name.charAt(0).toUpperCase()})}),e[15]=s.name,e[16]=s.ui,e[17]=c,e[18]=n):n=e[18];let h;e[19]!==s.name?(h=r.jsx("h3",{className:"font-medium text-base text-foreground truncate",children:s.name}),e[19]=s.name,e[20]=h):h=e[20];let p;e[21]!==s.updatedAt?(p=W(new Date(s.updatedAt),{addSuffix:!0}),e[21]=s.updatedAt,e[22]=p):p=e[22];let C;e[23]!==p?(C=r.jsxs("p",{className:"text-sm text-muted-foreground",children:["Edited"," ",p]}),e[23]=p,e[24]=C):C=e[24];let w;e[25]!==h||e[26]!==C?(w=r.jsxs("div",{className:"flex flex-col",children:[h,C]}),e[25]=h,e[26]=C,e[27]=w):w=e[27];let v;e[28]!==n||e[29]!==w?(v=r.jsxs("div",{className:"flex flex-col gap-4",children:[n,w]}),e[28]=n,e[29]=w,e[30]=v):v=e[30];let _;e[31]!==s.boundConnections?(_=s.boundConnections.slice(0,4).map(oe),e[31]=s.boundConnections,e[32]=_):_=e[32];let N;e[33]!==s.boundConnections.length?(N=s.boundConnections.length>4&&r.jsx("div",{className:"-mr-2 rounded-md border border-background",children:r.jsxs("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center text-xs text-muted-foreground",children:["+",s.boundConnections.length-4]})}),e[33]=s.boundConnections.length,e[34]=N):N=e[34];let z;e[35]!==_||e[36]!==N?(z=r.jsxs("div",{className:"flex pr-2",children:[_,N]}),e[35]=_,e[36]=N,e[37]=z):z=e[37];const P=l.logo??void 0;let k;e[38]!==l.name||e[39]!==P?(k=r.jsx(K,{url:P,fallback:l.name,size:"2xs",className:"shrink-0 rounded",objectFit:"cover"}),e[38]=l.name,e[39]=P,e[40]=k):k=e[40];let y;e[41]!==l.name?(y=r.jsx("span",{className:"truncate max-w-20",children:l.name}),e[41]=l.name,e[42]=y):y=e[42];let o;e[43]!==k||e[44]!==y?(o=r.jsxs("div",{className:"flex items-center gap-2 text-xs text-foreground",children:[k,y]}),e[43]=k,e[44]=y,e[45]=o):o=e[45];let L;e[46]!==z||e[47]!==o?(L=r.jsxs("div",{className:"flex items-center justify-between mt-4",children:[z,o]}),e[46]=z,e[47]=o,e[48]=L):L=e[48];let $;e[49]!==v||e[50]!==L?($=r.jsxs("div",{className:"flex flex-col flex-1 justify-between p-4",children:[v,L]}),e[49]=v,e[50]=L,e[51]=$):$=e[51];let E;e[52]!==$||e[53]!==a?(E=r.jsxs("div",{className:"border border-border rounded-xl overflow-hidden bg-card",children:[a,$]}),e[52]=$,e[53]=a,e[54]=E):E=e[54];let D;return e[55]!==E||e[56]!==u?(D=r.jsx(U,{to:"/$org/$project",params:u,className:"block group",children:E}),e[55]=E,e[56]=u,e[57]=D):D=e[57],D}function oe(t){return r.jsx("div",{className:"-mr-2 rounded-md border border-background",children:r.jsx(ie,{connection:t})},t.id)}function ie(t){const e=H.c(13),{connection:s}=t;if(s.icon){let m;e[0]!==s.icon||e[1]!==s.title?(m=r.jsx("img",{src:s.icon,alt:s.title,className:"size-4 object-cover"}),e[0]=s.icon,e[1]=s.title,e[2]=m):m=e[2];let i;return e[3]!==s.title||e[4]!==m?(i=r.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:s.title,children:m}),e[3]=s.title,e[4]=m,e[5]=i):i=e[5],i}const d=s.title;let l;e[6]!==s.title?(l=s.title.charAt(0).toUpperCase(),e[6]=s.title,e[7]=l):l=e[7];let c;e[8]!==l?(c=r.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:l}),e[8]=l,e[9]=c):c=e[9];let j;return e[10]!==s.title||e[11]!==c?(j=r.jsx("div",{className:"size-6 rounded-md bg-background border border-black/10 shadow-sm flex items-center justify-center overflow-hidden",title:d,children:c}),e[10]=s.title,e[11]=c,e[12]=j):j=e[12],j}function Be(){const t=H.c(39),{org:e}=M(),{data:s,isLoading:d}=q(e.id),[l,c]=B.useState(""),[j,m]=B.useState(!1),i=F();let S,u,f,x,b,g,a,n;if(t[0]!==d||t[1]!==i||t[2]!==e.slug||t[3]!==s||t[4]!==l){const w=s?.filter(ne)?.filter(o=>o.name.toLowerCase().includes(l.toLowerCase())||o.description?.toLowerCase().includes(l.toLowerCase()))??[];let v;t[13]!==i||t[14]!==e.slug?(v=o=>{i({to:"/$org/$project/settings/general",params:{org:e.slug,project:o}})},t[13]=i,t[14]=e.slug,t[15]=v):v=t[15];const _=v;let N;t[16]===Symbol.for("react.memo_cache_sentinel")?(N=()=>{m(!0)},t[16]=N):N=t[16];const z=N;u=A;let P;t[17]===Symbol.for("react.memo_cache_sentinel")?(P=r.jsx(A.Header.Left,{children:r.jsx(Y,{children:r.jsx(ee,{children:r.jsx(te,{children:r.jsx(se,{children:"Projects"})})})})}),t[17]=P):P=t[17];let k;t[18]===Symbol.for("react.memo_cache_sentinel")?(k=!1,t[18]=k):k=t[18],t[19]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsxs(A.Header,{children:[P,r.jsxs(A.Header.Right,{children:[k,r.jsxs(I,{onClick:z,size:"sm",children:[r.jsx(R,{size:14}),"Create Project"]})]})]}),t[19]=a):a=t[19];let y;t[20]===Symbol.for("react.memo_cache_sentinel")?(y=o=>{o.key==="Escape"&&(c(""),o.target.blur())},t[20]=y):y=t[20],t[21]!==l?(n=r.jsx(J,{value:l,onChange:c,placeholder:"Search for a project...",onKeyDown:y}),t[21]=l,t[22]=n):n=t[22],S=A.Content,f="@container",t[23]!==d?(x=d&&r.jsx("div",{className:"p-5",children:r.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:[...Array(4)].map(ae)})}),t[23]=d,t[24]=x):x=t[24],b=!d&&w.length===0&&r.jsx("div",{className:"flex items-center h-full",children:r.jsx(Q,{image:r.jsx(T,{size:48,className:"text-muted-foreground"}),title:l?"No projects found":"No projects yet",description:l?`No projects match "${l}"`:"Create a project to get started.",actions:!l&&r.jsxs(I,{size:"sm",onClick:z,children:[r.jsx(R,{size:14}),"Create Project"]})})}),g=!d&&w.length>0&&r.jsx("div",{className:"p-5",children:r.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:w.map(o=>r.jsx(le,{project:o,onSettingsClick:()=>_(o.slug)},o.id))})}),t[0]=d,t[1]=i,t[2]=e.slug,t[3]=s,t[4]=l,t[5]=S,t[6]=u,t[7]=f,t[8]=x,t[9]=b,t[10]=g,t[11]=a,t[12]=n}else S=t[5],u=t[6],f=t[7],x=t[8],b=t[9],g=t[10],a=t[11],n=t[12];let h;t[25]!==S||t[26]!==f||t[27]!==x||t[28]!==b||t[29]!==g?(h=r.jsxs(S,{className:f,children:[x,b,g]}),t[25]=S,t[26]=f,t[27]=x,t[28]=b,t[29]=g,t[30]=h):h=t[30];let p;t[31]!==j?(p=r.jsx(X,{open:j,onOpenChange:m}),t[31]=j,t[32]=p):p=t[32];let C;return t[33]!==u||t[34]!==a||t[35]!==n||t[36]!==h||t[37]!==p?(C=r.jsxs(u,{children:[a,n,h,p]}),t[33]=u,t[34]=a,t[35]=n,t[36]=h,t[37]=p,t[38]=C):C=t[38],C}function ae(t,e){return r.jsx("div",{className:"h-[240px] rounded-xl bg-muted animate-pulse"},e)}function ne(t){return t.slug!==Z}export{Be as default};
|