decocms 4.82.13 → 4.82.15
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-B6AELEdc.js → AlertCircle-CeOq_QOa.js} +1 -1
- package/dist/client/assets/{AreaChart-fCNs67j_.js → AreaChart-DWLsJ9L_.js} +1 -1
- package/dist/client/assets/{ArrowUp-YK2fJPgi.js → ArrowUp-CCgnuK4p.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BKVLcZTe.js → ArrowUpRight-BUF92paN.js} +1 -1
- package/dist/client/assets/{CheckCircle-BfxYbuVE.js → CheckCircle-DU0E1kqe.js} +1 -1
- package/dist/client/assets/{ChevronDown-CQLSXgt3.js → ChevronDown-DA-FKtUl.js} +1 -1
- package/dist/client/assets/{ChevronRight-Fgy0rUS_.js → ChevronRight-CHBqaZbp.js} +1 -1
- package/dist/client/assets/ChevronUp-z2fewBpw.js +1 -0
- package/dist/client/assets/{Copy01-B0CQRE_5.js → Copy01-mdfV84Qi.js} +1 -1
- package/dist/client/assets/DotsVertical-CfEiDPnS.js +1 -0
- package/dist/client/assets/{Eye-CLtdCpUf.js → Eye-DwGaKloo.js} +1 -1
- package/dist/client/assets/{FilterLines-DeiGsRZY.js → FilterLines-DTtZUWPT.js} +1 -1
- package/dist/client/assets/{Globe01-B52VKYy7.js → Globe01-DjB8n-mo.js} +1 -1
- package/dist/client/assets/{Globe04-B0las6Jv.js → Globe04-DutdpBnz.js} +1 -1
- package/dist/client/assets/{HardDrive-CU-vvmKE.js → HardDrive-CGELqP5N.js} +1 -1
- package/dist/client/assets/{Image01-B-FQwXx8.js → Image01-BTSbKZvY.js} +1 -1
- package/dist/client/assets/{Key01-myvTSA8u.js → Key01-DkkbB1Yr.js} +1 -1
- package/dist/client/assets/{LayoutLeft-C0g0LezP.js → LayoutLeft-B1GHI-YD.js} +1 -1
- package/dist/client/assets/{LinkExternal01-d9EixhiS.js → LinkExternal01-DJ_9J6wi.js} +1 -1
- package/dist/client/assets/{Monitor01-BkDBzdlH.js → Monitor01-pmSL1YcM.js} +1 -1
- package/dist/client/assets/{Package-eNacrLmv.js → Package-CWS4_j2H.js} +1 -1
- package/dist/client/assets/{Palette-BiKqXWvc.js → Palette-DPL8s5xh.js} +1 -1
- package/dist/client/assets/{Play-CdkPhmTs.js → Play-DR0RovML.js} +1 -1
- package/dist/client/assets/{Plus-DWjKZ2wj.js → Plus-CztP4VvG.js} +1 -1
- package/dist/client/assets/{SearchLg-DBOWvxyl.js → SearchLg-BzyTJkaM.js} +1 -1
- package/dist/client/assets/{SearchMd-CKteZWzZ.js → SearchMd-D8besh0I.js} +1 -1
- package/dist/client/assets/{Settings02-CM0Uzs0U.js → Settings02-CuqicLOk.js} +1 -1
- package/dist/client/assets/{Shield01-aDvWVv5Z.js → Shield01-4kmCM8vo.js} +1 -1
- package/dist/client/assets/{Star01-B-8espqJ.js → Star01-DHUNj4ei.js} +1 -1
- package/dist/client/assets/{Stars01-DsfblQf3.js → Stars01-tn1arSwR.js} +1 -1
- package/dist/client/assets/{Stars02-DBH33Ez2.js → Stars02-Di59xUHt.js} +1 -1
- package/dist/client/assets/{Sun-MvOAGgKN.js → Sun-CC4UrAWz.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DUrn8gXV.js → SwitchHorizontal01-cKbBsGPr.js} +1 -1
- package/dist/client/assets/{Tool01-4pit7qOS.js → Tool01-DehbzRDq.js} +1 -1
- package/dist/client/assets/{Tool02-tJKj7JcW.js → Tool02-hbk9uCUP.js} +1 -1
- package/dist/client/assets/{Trash01-DEWgFvvg.js → Trash01-DtotiGOx.js} +1 -1
- package/dist/client/assets/TrendUp01-Bzv8tCE3.js +1 -0
- package/dist/client/assets/{Upload01-C8RP0Fvq.js → Upload01-mGXKgGjJ.js} +1 -1
- package/dist/client/assets/{User01-v0Bqr3nA.js → User01-CqaAq7aP.js} +1 -1
- package/dist/client/assets/{Users01-CPNZ7uMu.js → Users01-ZGhY-EtM.js} +1 -1
- package/dist/client/assets/{Users03-WVYBBENu.js → Users03-CJYVEqY6.js} +1 -1
- package/dist/client/assets/{X-Dm6kY_ek.js → X-C00VJyk9.js} +1 -1
- package/dist/client/assets/{XCircle-cwYbcP7y.js → XCircle-D5ueBEPv.js} +1 -1
- package/dist/client/assets/{XClose-DnNyN9T-.js → XClose-COXhcGxA.js} +1 -1
- package/dist/client/assets/{Zap-CNRURtEh.js → Zap-CyltBR5S.js} +1 -1
- package/dist/client/assets/{ZapSquare-Dj8pa8Fg.js → ZapSquare-DzvB1OVj.js} +1 -1
- package/dist/client/assets/{ZoomOut-_psBJlXD.js → ZoomOut-DnsiYOYE.js} +1 -1
- package/dist/client/assets/{access-gate-CPecvlS5.js → access-gate-DUg1OQzh.js} +1 -1
- package/dist/client/assets/{add-section-modal-CcLBxmBX.js → add-section-modal-BN8Y54kh.js} +1 -1
- package/dist/client/assets/agent-icon-DD1XuUZV.js +1 -0
- package/dist/client/assets/agents-list-CYVjTPcg.js +1 -0
- package/dist/client/assets/ai-providers-7J7oaSIJ.js +1 -0
- package/dist/client/assets/{alert-XkDwazoe.js → alert-BAS3TA95.js} +1 -1
- package/dist/client/assets/{alert-dialog-3VMQ65hF.js → alert-dialog-pZnlrqwf.js} +1 -1
- package/dist/client/assets/app-editor-Dv5aoi2Q.js +1 -0
- package/dist/client/assets/{auth-dSVlMQ86.js → auth-BH7x9puf.js} +1 -1
- package/dist/client/assets/{auth-catchall-BVp4zpOf.js → auth-catchall-4ljJEgz3.js} +1 -1
- package/dist/client/assets/{auth-entry-C48ylSC_.js → auth-entry-CKXeCVAg.js} +1 -1
- package/dist/client/assets/{auth-split-layout-dbrXw6Uq.js → auth-split-layout-CUJ9nkHR.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BHT9Kp62.js → authenticate-and-persist-oauth-Cv50WZiI.js} +1 -1
- package/dist/client/assets/{automation-list-row-PkSpkeID.js → automation-list-row-k6YDoU1F.js} +1 -1
- package/dist/client/assets/automation-runs-CnJwo9o6.js +87 -0
- package/dist/client/assets/automations-Dgs0AdsJ.js +1 -0
- package/dist/client/assets/{autosend-D_-616qs.js → autosend-BndTn1RX.js} +1 -1
- package/dist/client/assets/{avatar-UXZ4R5Yb.js → avatar-BV7BW59M.js} +1 -1
- package/dist/client/assets/{badge-CfAmvo-h.js → badge-DdEWwdjD.js} +1 -1
- package/dist/client/assets/{block-document-DbCz5f9N.js → block-document-DPR5iaEz.js} +2 -2
- package/dist/client/assets/{brand-context-G_6bLd5F.js → brand-context-D-BeYI94.js} +1 -1
- package/dist/client/assets/buckets-BmvZUYuX.js +1 -0
- package/dist/client/assets/bulk-category-panel-DWzVkVjS.js +1 -0
- package/dist/client/assets/calendar-BQIrOmm1.js +102 -0
- package/dist/client/assets/{capability-load-error-B9xkkNBq.js → capability-load-error-CBWml6hq.js} +1 -1
- package/dist/client/assets/{card-dLLzWD0r.js → card-f5iCgnuC.js} +1 -1
- package/dist/client/assets/category-editor-B9oFmSoe.js +1 -0
- package/dist/client/assets/{chat-context-CyCuyn4t.js → chat-context-BzTO5WN0.js} +13 -11
- package/dist/client/assets/checkbox-CxcJOsaQ.js +1 -0
- package/dist/client/assets/{cli-auth-success-zoB4TWhQ.js → cli-auth-success-BS60fauw.js} +1 -1
- package/dist/client/assets/collection-detail-CMxoDay1.js +1 -0
- package/dist/client/assets/collection-display-button-DlylAXm4.js +1 -0
- package/dist/client/assets/{collection-search-C4jDpdZf.js → collection-search-DLZgCv04.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DIkftYUF.js → collection-table-wrapper-DNDfhvJo.js} +1 -1
- package/dist/client/assets/{collection-tabs-DvvibY6H.js → collection-tabs-DZpZSybV.js} +1 -1
- package/dist/client/assets/{command-EQNrbniG.js → command-tBDIrLoF.js} +1 -1
- package/dist/client/assets/commerce-onboarding-BSUs1HKX.js +1 -0
- package/dist/client/assets/{companions-core-fc2Z_sCB.js → companions-core-Cd0liGC_.js} +1 -1
- package/dist/client/assets/connect-desktop-dialog-BYBMu3N5.js +1 -0
- package/dist/client/assets/{connection-card-CtY9PRIw.js → connection-card-B9qVUyx7.js} +1 -1
- package/dist/client/assets/connection-detail-Kd3nzbnA.js +1 -0
- package/dist/client/assets/{connection-form-helpers-TGmycj7X.js → connection-form-helpers-DKt4iErs.js} +1 -1
- package/dist/client/assets/connections-BeoxUP3C.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-DHojW3EC.js → decopilot-sse-pool-C6iebzwQ.js} +1 -1
- package/dist/client/assets/{dialog-CmXDzme5.js → dialog-BJfLYuit.js} +1 -1
- package/dist/client/assets/{domain-settings-GxKzcerZ.js → domain-settings-CfHBsp-L.js} +1 -1
- package/dist/client/assets/{drawer-Ds-r7525.js → drawer-Baw0xzc3.js} +1 -1
- package/dist/client/assets/dropdown-menu-BhfnlfU6.js +1 -0
- package/dist/client/assets/{empty-state-CdKwtMyP.js → empty-state-BYiNNxsG.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CK9iLAoG.js → extract-connection-data-J1VuF4OH.js} +1 -1
- package/dist/client/assets/file-explorer-CcD0ikH9.js +2 -0
- package/dist/client/assets/{file-type-icon-DjNFZnTs.js → file-type-icon-zRxoda45.js} +1 -1
- package/dist/client/assets/{files-CQYyuV1E.js → files-DD6Mi8Wg.js} +1 -1
- package/dist/client/assets/{form-x0k-kdB2.js → form-M4hxtBov.js} +1 -1
- package/dist/client/assets/general-CVTq53WI.js +1 -0
- package/dist/client/assets/{github-repo-picker-C-tZ-Bba.js → github-repo-picker-C1xhTE3Y.js} +1 -1
- package/dist/client/assets/{hooks-QHrmNjJQ.js → hooks-NPNZyDPQ.js} +6 -6
- package/dist/client/assets/{index-BjO8A-VO.js → index-4drSQZJw.js} +1 -1
- package/dist/client/assets/{index-BCiDnhhX.js → index-B8DLJIRD.js} +4 -4
- package/dist/client/assets/{index-CeqD0RVV.js → index-BAlJ2Lmy.js} +1 -1
- package/dist/client/assets/{index-Czi2ZhJ5.js → index-BF2PvN6y.js} +1 -1
- package/dist/client/assets/index-C0aFdpR9.js +2 -0
- package/dist/client/assets/{index-BcWQMJI4.js → index-CCfHA78w.js} +3 -3
- package/dist/client/assets/{index-CUVgjm02.js → index-CLMqgJD5.js} +1 -1
- package/dist/client/assets/{index-CzMEWsZX.js → index-CdQfFNYL.js} +1 -1
- package/dist/client/assets/{index-T-oY3h3t.js → index-CkWlYouF.js} +1 -1
- package/dist/client/assets/{index-DonY639O.js → index-Cl-Je6HH.js} +29 -29
- package/dist/client/assets/{index-C-B6S6Q9.js → index-ClUkG6N9.js} +1 -1
- package/dist/client/assets/index-DAYNblke.js +1 -0
- package/dist/client/assets/{index-DF3zg-P1.js → index-DIPAEwLP.js} +3 -3
- package/dist/client/assets/index-Dj5WILcq.css +1 -0
- package/dist/client/assets/{index-cG8paP3z.js → index-Dt28nlD4.js} +1 -1
- package/dist/client/assets/{index-redirect-_hpy7g8S.js → index-redirect-CmI0ALY4.js} +1 -1
- package/dist/client/assets/{input-BZTiU0ds.js → input-CfHOale8.js} +1 -1
- package/dist/client/assets/{integration-icon-BfKWLZT4.js → integration-icon-BzIpy5hd.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-fPpySKy7.js → invite-member-dialog-Bi9Ad5RM.js} +1 -1
- package/dist/client/assets/{label-B1OfKy2N.js → label-q4Lz_o7x.js} +1 -1
- package/dist/client/assets/{layout-BzlkAZij.js → layout-BeXU4geV.js} +1 -1
- package/dist/client/assets/{login-CfYNPvDo.js → login-ULhcI_8j.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CoKzxQiz.js → mcp-oauth-BD7eUVto.js} +1 -1
- package/dist/client/assets/members-CbH0lki7.js +1 -0
- package/dist/client/assets/{monaco-editor-BzdwB2U8.js → monaco-editor-C4mpNtzY.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-C0-lT8X-.js → monitoring-stats-row-CZzkQYId.js} +1 -1
- package/dist/client/assets/{multi-select-BYFsBcLx.js → multi-select-DCA9Da7k.js} +1 -1
- package/dist/client/assets/{oauth-callback-D6L6RroV.js → oauth-callback-Dan_MKSA.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-NS24Yhk_.js → oauth-callback-ai-provider-B1ZRW88t.js} +1 -1
- package/dist/client/assets/{onboarding-CXfWXP3L.js → onboarding-BO_9ySh0.js} +1 -1
- package/dist/client/assets/{org-install-CFASOU4_.js → org-install-CpFIEnER.js} +1 -1
- package/dist/client/assets/{org-layout-gngtZKVa.js → org-layout-CULBOosB.js} +1 -1
- package/dist/client/assets/{organization-choice-DB-AR__E.js → organization-choice-DFVSxnej.js} +1 -1
- package/dist/client/assets/orgs-CBXFrHFa.js +1 -0
- package/dist/client/assets/{page-seo-form-DsaBxdUW.js → page-seo-form-DHenYYCe.js} +1 -1
- package/dist/client/assets/page-seo-sheet-ClW_iDoO.js +1 -0
- package/dist/client/assets/{popover-BzHpXFL_.js → popover-CXcO7_bx.js} +1 -1
- package/dist/client/assets/post-editor-DhFxw021.js +1 -0
- package/dist/client/assets/{primitives-BxBoeZTE.js → primitives-BmJhmJIK.js} +1 -1
- package/dist/client/assets/profile-NhoDC18k.js +1 -0
- package/dist/client/assets/project-app-view-utsK6OxP.js +1 -0
- package/dist/client/assets/record-editor-CecDBJXr.js +1 -0
- package/dist/client/assets/redirect-editor-dV0nhSya.js +1 -0
- package/dist/client/assets/registry-CT54Qzvf.js +2 -0
- package/dist/client/assets/{registry-layout-B8iHO94t.js → registry-layout-BWFRgJfZ.js} +2 -2
- package/dist/client/assets/{reports-DFt5o5JU.js → reports-B3SZ3Jl3.js} +2 -2
- package/dist/client/assets/{require-capability-CEBGt_Ot.js → require-capability-CNquWgoq.js} +1 -1
- package/dist/client/assets/{required-auth-layout-vPZ2d-Yx.js → required-auth-layout-DXZH_cMh.js} +1 -1
- package/dist/client/assets/{reset-password-l6ffdCqx.js → reset-password-CeKxEPEA.js} +1 -1
- package/dist/client/assets/roles-Ds1s8Crb.js +1 -0
- package/dist/client/assets/{search-input-ByuB0YyC.js → search-input-BBqHwy7J.js} +1 -1
- package/dist/client/assets/secrets-BJLITdOe.js +1 -0
- package/dist/client/assets/sections-editor-x_JJ-dXm.js +2 -0
- package/dist/client/assets/select-D45GDan5.js +1 -0
- package/dist/client/assets/{select-model-CebmAt-C.js → select-model-BdqTIzoZ.js} +1 -1
- package/dist/client/assets/self-tool-result-DveXGlAh.js +1 -0
- package/dist/client/assets/seo-editor-D_gFq0_r.js +1 -0
- package/dist/client/assets/{settings-layout-DUpflFya.js → settings-layout-CHmblNlb.js} +1 -1
- package/dist/client/assets/{settings-section-DS6otYn7.js → settings-section-amOjmhEI.js} +1 -1
- package/dist/client/assets/{shell-controls-B9xMPAfw.js → shell-controls-CgCFroeq.js} +1 -1
- package/dist/client/assets/{shell-layout-Bo6QxW8m.js → shell-layout-CdiwNTyI.js} +1 -1
- package/dist/client/assets/{sidebar-BFdShy9x.js → sidebar-C7aQbJG9.js} +1 -1
- package/dist/client/assets/{skeleton-BGZh750P.js → skeleton-Dxm-lG43.js} +1 -1
- package/dist/client/assets/sso-DJnUWhf6.js +1 -0
- package/dist/client/assets/{store-ioH_J-rE.js → store-NquDFej1.js} +1 -1
- package/dist/client/assets/store-registry-DUeHm7WT.js +2 -0
- package/dist/client/assets/{studio-tools-bThaob6p.js → studio-tools-CYfQ2AAQ.js} +1 -1
- package/dist/client/assets/{switch-C2KH_TaK.js → switch-CdTxZDmU.js} +1 -1
- package/dist/client/assets/{table-XKbQ5Wjx.js → table-0RqXTFkI.js} +1 -1
- package/dist/client/assets/{tabs-D-6eQ0wE.js → tabs-7Gp9khG9.js} +1 -1
- package/dist/client/assets/{textarea-PYu4eHQV.js → textarea-DqwqE7DK.js} +1 -1
- package/dist/client/assets/{toggle-group-BcxqPGrf.js → toggle-group-aSRsQY-d.js} +1 -1
- package/dist/client/assets/{toolbar-D90MFc80.js → toolbar-BWl3LL6D.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-D3m9VnTI.js → toolbar-icon-button-DCIRoG12.js} +1 -1
- package/dist/client/assets/{tooltip-O3iHy7-o.js → tooltip-WJkhQjcG.js} +1 -1
- package/dist/client/assets/{use-ai-providers-B4nhSJlr.js → use-ai-providers-C40YpJE-.js} +1 -1
- package/dist/client/assets/{use-automations-C01orYPa.js → use-automations-C9d02WY2.js} +1 -1
- package/dist/client/assets/{use-autosave-BhfvFfoI.js → use-autosave-C9WyysaS.js} +1 -1
- package/dist/client/assets/{use-capability--WeMT0KP.js → use-capability-CFtUu9S6.js} +1 -1
- package/dist/client/assets/use-clock-tick-BEOof-IF.js +1 -0
- package/dist/client/assets/{use-collections-K1HyCAfG.js → use-collections-zWVyDZcY.js} +1 -1
- package/dist/client/assets/{use-connection-twfWXxwG.js → use-connection-zVMbceFt.js} +1 -1
- package/dist/client/assets/{use-copy-DQ4y4418.js → use-copy-aL4eG47e.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-NwJ9x5Kd.js → use-create-virtual-mcp-CC9xkgX7.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BdWGMbok.js → use-debounced-autosave-fAbS1zOg.js} +1 -1
- package/dist/client/assets/{use-debounced-value-xN0eyoO9.js → use-debounced-value-DNsl2JfP.js} +1 -1
- package/dist/client/assets/use-deco-credits-CcPnJVuR.js +1 -0
- package/dist/client/assets/{use-decopilot-events-BEOY-_n2.js → use-decopilot-events-CsMJmVbs.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BlzYSB_f.js → use-delete-connection-R5JvHOU0.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DYO-CLsy.js → use-deployment-admin-C6_xz3oM.js} +1 -1
- package/dist/client/assets/{use-file-configs-Bs9N4w-Z.js → use-file-configs-DKMcr7Ka.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Dt7gLdpr.js → use-infinite-scroll-BfgefGd-.js} +1 -1
- package/dist/client/assets/{use-join-requests-D0z99IAk.js → use-join-requests-DwZmJTC-.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-C7G9bAkb.js → use-mcp-auth-status-DqdsBw6O.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DrROXOcH.js → use-mcp-client-jqf5Iy9F.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-D28ox9dJ.js → use-mcp-tools-FlPegk9r.js} +1 -1
- package/dist/client/assets/{use-members-mvfsRjey.js → use-members-4b0HekAB.js} +1 -1
- package/dist/client/assets/{use-mobile-nauPjzo2.js → use-mobile-Dzfwh2PG.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BJC_x779.js → use-navigate-to-agent-BdTIm_yX.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-jU0nDPT-.js → use-org-auth-client-DNidmaGB.js} +1 -1
- package/dist/client/assets/{use-org-sso-j8hZyqdO.js → use-org-sso-XSU8Sbkk.js} +1 -1
- package/dist/client/assets/{use-organization-roles-thqey2Pm.js → use-organization-roles-DO-lRy6_.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BJ1bjHsL.js → use-organization-settings-B5oAjTeU.js} +1 -1
- package/dist/client/assets/{use-registry-app-CeyrXTI4.js → use-registry-app-C86I4fwX.js} +1 -1
- package/dist/client/assets/{use-registry-connections-D94L7VqK.js → use-registry-connections-C5ZlG8AQ.js} +1 -1
- package/dist/client/assets/{use-secrets-C1Fme0Ya.js → use-secrets-CwCibfpX.js} +1 -1
- package/dist/client/assets/{use-status-sounds-B1YKt2sD.js → use-status-sounds-B3WHalkp.js} +1 -1
- package/dist/client/assets/{use-view-mode-gP4n4GFH.js → use-view-mode-CQEpkEmN.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-C964oRwj.js → use-virtual-mcp-rI-Jb4Ga.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-6TwOL6Xo.js +1 -0
- package/dist/client/assets/{useRouterState-Bi7YKwTw.js → useRouterState-zOoyC2QF.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-COj06tw2.js +1 -0
- package/dist/client/assets/{users-BiDYlXA2.js → users-C2DJRY0B.js} +1 -1
- package/dist/client/assets/variant-calendar-BTK0fdXF.js +1 -0
- package/dist/client/assets/{view-mode-toggle-kFlOpvCC.js → view-mode-toggle-CQPkkcdM.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/Check-BF3t7WWi.js +0 -1
- package/dist/client/assets/ChevronUp-Y-IpPAUR.js +0 -1
- package/dist/client/assets/Circle-0HId1SV6.js +0 -1
- package/dist/client/assets/DotsVertical-CYU3Mae1.js +0 -1
- package/dist/client/assets/Flag01-B_AKNFoc.js +0 -1
- package/dist/client/assets/List-DZAsltZv.js +0 -1
- package/dist/client/assets/TrendUp01-7N_6K3-X.js +0 -1
- package/dist/client/assets/UserPlus01-D2pAl0t2.js +0 -1
- package/dist/client/assets/agent-icon-DmIJ53uv.js +0 -1
- package/dist/client/assets/agents-list-GFWV8fSw.js +0 -1
- package/dist/client/assets/ai-providers-C93Uux8H.js +0 -1
- package/dist/client/assets/app-editor-GnwEYs2F.js +0 -1
- package/dist/client/assets/automation-runs-yMzfgCqo.js +0 -188
- package/dist/client/assets/automations-Db9v_2wu.js +0 -1
- package/dist/client/assets/buckets-Bkz3itxJ.js +0 -1
- package/dist/client/assets/bulk-category-panel-EjjgUKdU.js +0 -1
- package/dist/client/assets/calendar-BdMqQsTv.js +0 -1
- package/dist/client/assets/category-editor-l1ImzDA-.js +0 -1
- package/dist/client/assets/checkbox-CxV2vfbv.js +0 -1
- package/dist/client/assets/collection-detail-ByPPxvaR.js +0 -1
- package/dist/client/assets/collection-display-button-BBHublq2.js +0 -1
- package/dist/client/assets/commerce-onboarding-Dgs4FWfH.js +0 -1
- package/dist/client/assets/connect-desktop-dialog-CPSwwSyz.js +0 -1
- package/dist/client/assets/connection-detail-DuvF3pbE.js +0 -1
- package/dist/client/assets/connections-CE66Octw.js +0 -1
- package/dist/client/assets/dropdown-menu-BgNr7tM1.js +0 -1
- package/dist/client/assets/file-explorer-nG37TAVQ.js +0 -2
- package/dist/client/assets/general-c3hgsq_x.js +0 -1
- package/dist/client/assets/index-DKadkG06.js +0 -4
- package/dist/client/assets/index-DpLPq5a_.css +0 -1
- package/dist/client/assets/index-bj26_8KX.js +0 -1
- package/dist/client/assets/members-CrKGCoFu.js +0 -1
- package/dist/client/assets/orgs-jcqywdGM.js +0 -1
- package/dist/client/assets/page-seo-sheet-BF2mpJ0B.js +0 -1
- package/dist/client/assets/post-editor-JD3fSSO7.js +0 -1
- package/dist/client/assets/profile-CZ9vM3_S.js +0 -1
- package/dist/client/assets/project-app-view-40EQ9ogm.js +0 -1
- package/dist/client/assets/record-editor-BmGDR-eB.js +0 -1
- package/dist/client/assets/redirect-editor-0M8-Neu7.js +0 -1
- package/dist/client/assets/registry-CwTOcwuV.js +0 -2
- package/dist/client/assets/roles-Bo-eSbrf.js +0 -1
- package/dist/client/assets/secrets-C_1Jcs02.js +0 -1
- package/dist/client/assets/sections-editor-gaZ0BvyI.js +0 -2
- package/dist/client/assets/select-B6GE4jHJ.js +0 -1
- package/dist/client/assets/self-tool-result-DJIiUu6Z.js +0 -1
- package/dist/client/assets/seo-editor-DNUmLmzw.js +0 -1
- package/dist/client/assets/sso-D7EYt-G3.js +0 -1
- package/dist/client/assets/store-registry-s8bkhEBH.js +0 -2
- package/dist/client/assets/use-clock-tick-DboEo7Cc.js +0 -1
- package/dist/client/assets/use-deco-credits-Bm-VH5Hm.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DKhJHTs2.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DAAXTkZt.js +0 -1
- package/dist/client/assets/variant-calendar-m6XjJ2dx.js +0 -1
package/dist/client/assets/{capability-load-error-B9xkkNBq.js → capability-load-error-CBWml6hq.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,n as o,C as c,j as t,x as m,B as u,K as x}from"./index-
|
|
1
|
+
import{c as a,n as o,C as c,j as t,x as m,B as u,K as x}from"./index-DIPAEwLP.js";function f(){const e=a.c(5),l=o(),{locator:n}=c();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted text-muted-foreground",children:t.jsx(m,{size:28})}),e[0]=s):s=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs("div",{className:"space-y-1",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Couldn't load your permissions"}),t.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:"Something went wrong checking your access. This is usually temporary."})]}),e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==l?(r=t.jsxs("div",{className:"flex h-full min-h-[60vh] flex-1 flex-col items-center justify-center gap-4 p-6 text-center",children:[s,i,t.jsx(u,{variant:"outline",size:"sm",onClick:()=>l.invalidateQueries({queryKey:x.myCapabilities(n)}),children:"Try again"})]}),e[2]=n,e[3]=l,e[4]=r):r=e[4],r}export{f as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,l as n,j as c}from"./index-
|
|
1
|
+
import{c as o,l as n,j as c}from"./index-DIPAEwLP.js";function i(a){const e=o.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=r):r=e[4];let l;return e[5]!==s||e[6]!==r?(l=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=l):l=e[7],l}function f(a){const e=o.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{i as C,f as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as G,r as S,l as J,j as t,B as U,i as Q,t as I}from"./index-DIPAEwLP.js";import{i as X}from"./XCircle-D5ueBEPv.js";import{c as T}from"./ZoomOut-DnsiYOYE.js";import{n as Y}from"./LinkExternal01-DJ_9J6wi.js";import{aL as Z}from"./agent-icon-DD1XuUZV.js";import{f as _,a as K,b as tt,c as et,d as ot,e as rt,A as it,g as st}from"./alert-dialog-pZnlrqwf.js";import{I as L}from"./input-CfHOale8.js";import{L as M}from"./label-q4Lz_o7x.js";import{v as at,w as mt,V as nt,o as lt,x as R,A as pt,W as ct,y as dt}from"./index-Cl-Je6HH.js";import{c as ut,B as gt,a as xt}from"./block-document-DPR5iaEz.js";import{u as ft}from"./use-autosave-C9WyysaS.js";import{t as ht}from"./ChevronDown-DA-FKtUl.js";import{p as yt,q as jt,o as vt}from"./automation-runs-CnJwo9o6.js";import{s as v,E as bt}from"./primitives-BmJhmJIK.js";import"./AlertCircle-CeOq_QOa.js";import"./Tool01-DehbzRDq.js";import"./ArrowUp-CCgnuK4p.js";import"./Settings02-CuqicLOk.js";import"./Tool02-hbk9uCUP.js";import"./ArrowUpRight-BUF92paN.js";import"./TrendUp01-Bzv8tCE3.js";import"./ZapSquare-DzvB1OVj.js";import"./Users03-CJYVEqY6.js";import"./CheckCircle-DU0E1kqe.js";import"./ChevronUp-z2fewBpw.js";import"./ChevronRight-CHBqaZbp.js";import"./DotsVertical-CfEiDPnS.js";import"./Stars02-Di59xUHt.js";import"./Copy01-mdfV84Qi.js";import"./Globe01-DjB8n-mo.js";import"./Eye-DwGaKloo.js";import"./FilterLines-DTtZUWPT.js";import"./Star01-DHUNj4ei.js";import"./Globe04-DutdpBnz.js";import"./SwitchHorizontal01-cKbBsGPr.js";import"./HardDrive-CGELqP5N.js";import"./Image01-BTSbKZvY.js";import"./Key01-DkkbB1Yr.js";import"./LayoutLeft-B1GHI-YD.js";import"./Monitor01-pmSL1YcM.js";import"./Sun-CC4UrAWz.js";import"./Package-CWS4_j2H.js";import"./Palette-DPL8s5xh.js";import"./Play-DR0RovML.js";import"./Plus-CztP4VvG.js";import"./SearchLg-BzyTJkaM.js";import"./SearchMd-D8besh0I.js";import"./Shield01-4kmCM8vo.js";import"./Stars01-tn1arSwR.js";import"./Trash01-DtotiGOx.js";import"./Upload01-mGXKgGjJ.js";import"./User01-CqaAq7aP.js";import"./Users01-ZGhY-EtM.js";import"./XClose-COXhcGxA.js";import"./X-C00VJyk9.js";import"./Zap-CyltBR5S.js";import"./chat-context-BzTO5WN0.js";import"./autosend-BndTn1RX.js";import"./hooks-NPNZyDPQ.js";import"./use-mcp-client-jqf5Iy9F.js";import"./constants-BHDe7bIw.js";import"./auth-BH7x9puf.js";import"./decopilot-sse-pool-C6iebzwQ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-CYfQ2AAQ.js";import"./use-virtual-mcp-rI-Jb4Ga.js";import"./use-collections-zWVyDZcY.js";import"./use-ai-providers-C40YpJE-.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-CsMJmVbs.js";import"./use-organization-settings-B5oAjTeU.js";import"./tooltip-WJkhQjcG.js";import"./dialog-BJfLYuit.js";import"./drawer-Baw0xzc3.js";import"./collection-search-DLZgCv04.js";import"./use-mobile-Dzfwh2PG.js";import"./AreaChart-DWLsJ9L_.js";import"./index-4drSQZJw.js";import"./calendar-BQIrOmm1.js";import"./shell-layout-CdiwNTyI.js";import"./avatar-BV7BW59M.js";import"./required-auth-layout-DXZH_cMh.js";import"./use-org-sso-XSU8Sbkk.js";import"./index-C0aFdpR9.js";import"./get-initials-D-f_fDFw.js";import"./use-registry-app-C86I4fwX.js";import"./use-mcp-tools-FlPegk9r.js";import"./use-connection-zVMbceFt.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-Cv50WZiI.js";import"./mcp-oauth-BD7eUVto.js";import"./extract-connection-data-J1VuF4OH.js";import"./use-members-4b0HekAB.js";import"./use-org-auth-client-DNidmaGB.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dropdown-menu-BhfnlfU6.js";import"./popover-CXcO7_bx.js";import"./command-tBDIrLoF.js";import"./index-CLMqgJD5.js";import"./use-copy-aL4eG47e.js";import"./form-M4hxtBov.js";import"./select-D45GDan5.js";import"./tabs-7Gp9khG9.js";import"./toggle-group-aSRsQY-d.js";import"./use-deco-credits-CcPnJVuR.js";import"./connection-card-B9qVUyx7.js";import"./use-registry-connections-C5ZlG8AQ.js";import"./useInfiniteQuery-6TwOL6Xo.js";import"./use-infinite-scroll-BfgefGd-.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-f5iCgnuC.js";import"./integration-icon-BzIpy5hd.js";import"./textarea-DqwqE7DK.js";import"./connection-form-helpers-DKt4iErs.js";import"./collection-tabs-DZpZSybV.js";import"./badge-DdEWwdjD.js";import"./useSuspenseInfiniteQuery-COj06tw2.js";import"./connect-desktop-dialog-BYBMu3N5.js";import"./select-model-BdqTIzoZ.js";import"./checkbox-CxcJOsaQ.js";import"./skeleton-Dxm-lG43.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-amOjmhEI.js";import"./index-B8DLJIRD.js";import"./file-type-icon-zRxoda45.js";import"./toolbar-BWl3LL6D.js";import"./use-debounced-value-DNsl2JfP.js";import"./index-Dt28nlD4.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B3WHalkp.js";import"./empty-state-BYiNNxsG.js";import"./use-capability-CFtUu9S6.js";import"./toolbar-icon-button-DCIRoG12.js";import"./use-debounced-autosave-fAbS1zOg.js";import"./index-BAlJ2Lmy.js";import"./sidebar-C7aQbJG9.js";import"./search-input-BBqHwy7J.js";import"./use-mcp-auth-status-DqdsBw6O.js";import"./switch-CdTxZDmU.js";import"./github-repo-picker-C1xhTE3Y.js";import"./use-navigate-to-agent-BdTIm_yX.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-CwCibfpX.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-Cd0liGC_.js";import"./monaco-editor-C4mpNtzY.js";import"./use-file-configs-DKMcr7Ka.js";import"./use-automations-C9d02WY2.js";import"./automation-list-row-k6YDoU1F.js";import"./table-0RqXTFkI.js";import"./use-clock-tick-BEOof-IF.js";function Ct(k){const e=G.c(18),{icon:f,title:n,defaultOpen:b,children:d}=k,A=b===void 0?!1:b,[x,D]=S.useState(A);let l;e[0]!==f?(l=t.jsx(f,{size:15}),e[0]=f,e[1]=l):l=e[1];let i;e[2]!==n?(i=t.jsx("span",{className:"flex-1 text-left",children:n}),e[2]=n,e[3]=i):i=e[3];const h=x&&"rotate-180";let r;e[4]!==h?(r=J("transition-transform",h),e[4]=h,e[5]=r):r=e[5];let p;e[6]!==r?(p=t.jsx(ht,{size:15,className:r}),e[6]=r,e[7]=p):p=e[7];let c;e[8]!==l||e[9]!==i||e[10]!==p?(c=t.jsx(yt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,i,p]})}),e[8]=l,e[9]=i,e[10]=p,e[11]=c):c=e[11];let s;e[12]!==d?(s=t.jsx(jt,{className:"px-2 pt-4",children:d}),e[12]=d,e[13]=s):s=e[13];let u;return e[14]!==x||e[15]!==c||e[16]!==s?(u=t.jsxs(vt,{open:x,onOpenChange:D,className:"mt-4",children:[c,s]}),e[14]=x,e[15]=c,e[16]=s,e[17]=u):u=e[17],u}function yr({orgSlug:k,virtualMcpId:e,branch:f,blockKey:n,block:b,decofile:d,meta:A,onManagePosts:x,onOpenPost:D,previewBaseUrl:l}){const i=at({orgSlug:k,virtualMcpId:e,branch:f}),h=mt(b,"categories"),[r,p,c]=ft(h,o=>{i.mutate({blockKey:n,data:R(n,"categories",o)})}),s=(o,w)=>p({...r,[o]:w}),u=ut({decofile:d,category:r,previewBaseUrl:l}),a=v(r.slug),[B,y]=S.useState(a),[m,C]=S.useState(null),[N,P]=S.useState(!1),$=a?nt(d).filter(o=>o.categorySlugs.includes(a)):[],j=$.length,W=o=>s("slug",o),q=async(o,w)=>{const V=v(r.name);P(!0);try{let g=0;for(const{key:E,payload:O}of pt(d,"posts")){const F=ct(O,o,{name:V,slug:w});F!==O&&(await i.mutateAsync({blockKey:E,data:R(E,"posts",dt(F))}),g+=1)}const z={...r,slug:w};await i.mutateAsync({blockKey:n,data:R(n,"categories",z)}),c(z),I.success(g>0?`Renamed slug and updated ${g} ${g===1?"post":"posts"}`:"Renamed slug"),C(null)}catch(g){y(o),C(null),I.error(g instanceof Error?g.message:"Rename failed")}finally{P(!1)}},H=()=>{const o=B.trim();if(o===a){B!==o&&y(o);return}if(!o){y(a);return}if(j===0){W(o);return}C({oldSlug:a,newSlug:o,count:j})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:v(r.name)||"Untitled category"}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(lt,{isPending:i.isPending,isError:i.isError}),u&&t.jsxs(U,{type:"button",variant:"outline",size:"sm",title:"Open the category preview in a new tab",onClick:()=>window.open(u,"_blank","noopener,noreferrer"),children:[t.jsx(Y,{size:14}),"See category preview"]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(bt,{value:v(r.name),onChange:o=>s("name",o),placeholder:"Category name",className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(M,{htmlFor:"category-slug",children:"Slug"}),t.jsx(L,{id:"category-slug",value:B,onChange:o=>y(o.target.value),onBlur:H,placeholder:"my-category",className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(M,{htmlFor:"category-description",children:"Description"}),t.jsx(L,{id:"category-description",value:v(r.description),onChange:o=>s("description",o.target.value),placeholder:"Short description for this category",className:"h-10"})]}),t.jsx(Ct,{icon:Z,title:"Content",defaultOpen:!0,children:t.jsx(gt,{value:xt(r.sections),onChange:o=>s("sections",o),meta:A,emptyMessage:"This category has no content yet. Use ⊕ to add your first block."})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(T,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"text-sm",children:[j," ",j===1?"post":"posts"," in this category"]})]}),t.jsxs(U,{type:"button",variant:"outline",size:"sm",disabled:!a,title:a?"Pick posts to add to this category":"Set a slug to add posts to this category",onClick:()=>x(a),children:["Add posts",t.jsx(X,{size:14})]})]}),j>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:$.map(o=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>D(o.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(T,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:o.title||"Untitled post"}),o.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:o.slug})]})]})},o.key))})]})]})})]}),t.jsx(_,{open:!!m,onOpenChange:o=>{o||N||(y(a),C(null))},children:t.jsxs(K,{children:[t.jsxs(tt,{children:[t.jsx(et,{children:"Rename category slug?"}),t.jsx(ot,{children:m?`Changing the slug from "${m.oldSlug}" to "${m.newSlug}" will update ${m.count} ${m.count===1?"post":"posts"} that reference this category.`:null})]}),t.jsxs(rt,{children:[t.jsx(it,{disabled:N,children:"Cancel"}),t.jsx(st,{onClick:o=>{o.preventDefault(),m&&q(m.oldSlug,m.newSlug)},disabled:N,children:N?t.jsxs(t.Fragment,{children:[t.jsx(Q,{size:14,className:"animate-spin"}),"Renaming…"]}):"Rename & update posts"})]})]})})]})}export{yr as CategoryEditor};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import{c as oe,l as Xe,bC as Ze,j as K,C as Y,K as ue,m as Ye,cs as Je,R as Fe,u as Ee,n as qe,t as ae,G as le,D as de,b as
|
|
2
|
-
`).replace(/https?:\/\/[^\s)>\]]+/g,"").includes("?")?"requires_action":"completed":t==="tool-calls"?e.some(s=>s.type==="tool-user_ask"&&s.state==="input-available"||s.state==="approval-requested")?"requires_action":"completed":"failed"}const ve={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"}};function Nt(t,e){if(!t)return null;const n=e?Je(e):null;if(t==="decopilot"&&n===null)return"decopilot";for(const[s,a]of Object.entries(ve))if(a.harness===t&&a.sandbox===n)return s;return null}function Mn(t){return t.claudeCode?"claude-code-desktop":t.codex?"codex-desktop":null}function Ft(t,e){return e&&t&&ve[t].sandbox==="user-desktop"?"decopilot":t}function qt(t){return t.thread?.harness_id!=null?{}:{harnessId:t.globals.harnessId,sandboxProviderKind:t.globals.sandboxProviderKind,branch:t.globals.branch??null}}function
|
|
3
|
-
- ID: ${t}`),c){let g;e[13]!==c?(g=xt(c),e[13]=c,e[14]=g):g=e[14];const b=g;let A;e[15]!==c?(A=St(c),e[15]=c,e[16]=A):A=e[16],
|
|
1
|
+
import{c as oe,l as Xe,bC as Ze,j as K,C as Y,K as ue,m as Ye,cs as Je,R as Fe,u as Ee,n as qe,t as ae,G as le,D as de,b as je,e as et,r as x,p as tt,a as nt,U as st,ak as at}from"./index-DIPAEwLP.js";import{A as Ue,c as ot,a as rt,w as it}from"./autosend-BndTn1RX.js";import{S as ct,b as lt,e as dt,u as ut}from"./hooks-NPNZyDPQ.js";import{u as pt}from"./studio-tools-CYfQ2AAQ.js";import{u as ft}from"./use-mcp-client-jqf5Iy9F.js";import{a as ht,S as mt}from"./constants-BHDe7bIw.js";import{a as gt}from"./use-virtual-mcp-rI-Jb4Ga.js";import{u as yt,a as ge}from"./use-ai-providers-C40YpJE-.js";import{o as xt,b as St}from"./location-BpLtHjTZ.js";import{d as bt,q as vt,n as It}from"./tab-id-BijBBRwE.js";import{u as kt}from"./use-decopilot-events-CsMJmVbs.js";import{g as Ct}from"./use-organization-settings-B5oAjTeU.js";const Tt={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"],codex:["codex:gpt-5.6-luna"]},Mt={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"],codex:["codex:gpt-5.6-terra"]},wt={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"],"claude-code":["claude-code:opus-1m","claude-code:opus","claude-code:sonnet"],codex:["codex:gpt-5.6-sol"]},Et={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},At={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},_t={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function Qe(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function Rt(t){return Qe(t).includes("deepresearch")}const $t=["sonar","searchpreview","online"];function Ke(t){const e=Qe(t);return e.includes("deepresearch")?!1:$t.some(n=>e.includes(n))}function We(t){return t.asyncResearch!==!0&&Ke(t.modelId)}function Ve(t){return t.asyncResearch===!0||Rt(t.modelId)||Ke(t.modelId)}function ie(t,e,n,s){for(const a of n){const o=t.find(r=>r.modelId===a);if(o)return{keyId:e,modelId:o.modelId,title:o.title}}for(const a of n){const o=t.find(r=>r.modelId.includes(a));if(o)return{keyId:e,modelId:o.modelId,title:o.title}}if(s){const a=t.find(s);if(a)return{keyId:e,modelId:a.modelId,title:a.title}}return null}function Pt(t,e){const n={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const s of t){const a=e[s.id]??[],o=s.providerId;n.chat.fast||(n.chat.fast=ie(a,s.id,Tt[o]??[])),n.chat.smart||(n.chat.smart=ie(a,s.id,Mt[o]??[])),n.chat.thinking||(n.chat.thinking=ie(a,s.id,wt[o]??[])),n.image||(n.image=ie(a,s.id,Et[o]??[],r=>r.capabilities?.includes("image")===!0)),n.webSearch||(n.webSearch=ie(a,s.id,At[o]??[],We)),n.deepResearch||(n.deepResearch=ie(a,s.id,_t[o]??[],Ve))}return n}const Dt=Ze("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function Tn(t){const e=oe.c(10),{variant:n,size:s}=t;let a;e[0]!==s||e[1]!==n?(a=Xe(Dt({variant:n,size:s})),e[0]=s,e[1]=n,e[2]=a):a=e[2];let o,r;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=K.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),r=K.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=o,e[4]=r):(o=e[3],r=e[4]);let c;e[5]!==a?(c=K.jsxs("svg",{"aria-hidden":"true",className:a,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o,r]}),e[5]=a,e[6]=c):c=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=K.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=p):p=e[7];let d;return e[8]!==c?(d=K.jsxs("div",{role:"status",children:[c,p]}),e[8]=c,e[9]=d):d=e[9],d}const Pe={online:!1,capabilities:[],ready:!1};function Ot(t){const e=oe.c(9),{org:n}=Y(),s=pt(),a=t?.fast??!1;let o;e[0]!==n.id?(o=ue.currentLink(n.id),e[0]=n.id,e[1]=o):o=e[1];let r;e[2]!==s?(r=async()=>{const b=await s.call("LINK_CURRENT_GET",{});return b?{...b,ready:!0}:{...Pe,ready:!0}},e[2]=s,e[3]=r):r=e[3];const c=a?1e3:1e4,p=a?2e3:15e3;let d;e[4]!==o||e[5]!==r||e[6]!==c||e[7]!==p?(d={queryKey:o,queryFn:r,staleTime:c,refetchInterval:p,refetchOnWindowFocus:!0},e[4]=o,e[5]=r,e[6]=c,e[7]=p,e[8]=d):d=e[8];const{data:g}=Ye(d);return g??Pe}function Lt(t,e=[]){return t==="stop"?e.filter(a=>a.type==="text"&&a.text).map(a=>a.text).join(`
|
|
2
|
+
`).replace(/https?:\/\/[^\s)>\]]+/g,"").includes("?")?"requires_action":"completed":t==="tool-calls"?e.some(s=>s.type==="tool-user_ask"&&s.state==="input-available"||s.state==="approval-requested")?"requires_action":"completed":"failed"}const ve={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"}};function Nt(t,e){if(!t)return null;const n=e?Je(e):null;if(t==="decopilot"&&n===null)return"decopilot";for(const[s,a]of Object.entries(ve))if(a.harness===t&&a.sandbox===n)return s;return null}function Mn(t){return t.claudeCode?"claude-code-desktop":t.codex?"codex-desktop":null}function Ft(t,e){return e&&t&&ve[t].sandbox==="user-desktop"?"decopilot":t}function qt(t){return t.thread?.harness_id!=null?{}:{harnessId:t.globals.harnessId,sandboxProviderKind:t.globals.sandboxProviderKind,branch:t.globals.branch??null}}function jt(t){const e=oe.c(21);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=n):n=e[0];const s=Fe(n);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const o=Ee(a);let r;e[2]!==o.brand||e[3]!==o.main||e[4]!==o.preview||e[5]!==o.skill?(r=(typeof o.main=="string"?bt(o.main)?.path:void 0)??o.preview??o.skill??o.brand??null,e[2]=o.brand,e[3]=o.main,e[4]=o.preview,e[5]=o.skill,e[6]=r):r=e[6];const c=r;let p;if(e[7]!==s?.params.appSlug||e[8]!==s?.params.collectionName||e[9]!==s?.params.itemId||e[10]!==c||e[11]!==t){if(p=[],t&&p.push(`### Selected Agent
|
|
3
|
+
- ID: ${t}`),c){let g;e[13]!==c?(g=xt(c),e[13]=c,e[14]=g):g=e[14];const b=g;let A;e[15]!==c?(A=St(c),e[15]=c,e[16]=A):A=e[16],p.push(`### Currently Open File
|
|
4
4
|
The user has this file open in the Library and is most likely referring to it:
|
|
5
5
|
- Name: ${A}
|
|
6
6
|
- Library path: ${c}${b?`
|
|
7
7
|
- Read/edit it with your file tools at: \`${b}\``:""}
|
|
8
8
|
|
|
9
|
-
When a request is ambiguous about which file or resource it targets (e.g. "change the h1", "fix this", "what's in this file", "update the title"), assume it means this file unless the user clearly indicates otherwise.`)}let
|
|
9
|
+
When a request is ambiguous about which file or resource it targets (e.g. "change the h1", "fix this", "what's in this file", "update the title"), assume it means this file unless the user clearly indicates otherwise.`)}let d;e[17]!==s?.params.appSlug||e[18]!==s?.params.collectionName||e[19]!==s?.params.itemId?(d=[],s?.params.appSlug&&d.push(`- Connection ID: ${s?.params.appSlug}`),s?.params.collectionName&&d.push(`- Collection: ${s?.params.collectionName}`),s?.params.itemId&&d.push(`- Item ID: ${s?.params.itemId}`),e[17]=s?.params.appSlug,e[18]=s?.params.collectionName,e[19]=s?.params.itemId,e[20]=d):d=e[20],d.length>0&&p.push(`### Current Resource
|
|
10
10
|
The user is viewing the following resource:
|
|
11
|
-
${
|
|
11
|
+
${d.join(`
|
|
12
12
|
`)}
|
|
13
13
|
|
|
14
|
-
Help the user understand and work with this resource.`),e[7]=s?.params.appSlug,e[8]=s?.params.collectionName,e[9]=s?.params.itemId,e[10]=c,e[11]=t,e[12]=
|
|
14
|
+
Help the user understand and work with this resource.`),e[7]=s?.params.appSlug,e[8]=s?.params.collectionName,e[9]=s?.params.itemId,e[10]=c,e[11]=t,e[12]=p}else p=e[12];return p.join(`
|
|
15
15
|
|
|
16
|
-
`)}function
|
|
16
|
+
`)}function Ut(){const t=oe.c(5),e=qe(),{org:n}=Y();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},t[0]=s):s=t[0];const a=Fe(s);let o;return t[1]!==a?.params||t[2]!==n||t[3]!==e?(o=r=>{const p=r.toolCall.toolName.match(/^COLLECTION_([A-Z_]+)_(CREATE|UPDATE|DELETE)$/);if(!p||!p[1])return;const d=p[1],g=a?.params.appSlug;if(!g)return;e.invalidateQueries({queryKey:ue.collection(n.slug,g,d)});const b=d.toLowerCase().replace(/_/g," ");ae.success(`${b} updated`)},t[1]=a?.params,t[2]=n,t[3]=e,t[4]=o):o=t[4],o}function Qt(){const t=oe.c(4),{org:e,project:n}=Y(),s=`${e.id}/${n.id}`;let a;t[0]!==s?(a=de.taskLastViewed(s),t[0]=s,t[1]=a):a=t[1];const[,o]=le(a,Kt);let r;return t[2]!==o?(r={markTaskRead:p=>{o(d=>({...d,[p]:new Date().toISOString()}))}},t[2]=o,t[3]=r):r=t[3],r}function Kt(t){return t??{}}function Be(){const t=je(),{org:e}=Y(),n=Ee({strict:!1}),s=et({strict:!1}),a=n.virtualmcpid??ht(e.id).id,o=(p,d)=>{t({to:"/$org/$taskId",params:{org:e.slug,taskId:p},search:g=>{const b={},A=d?.virtualMcpId??g.virtualmcpid;A&&(b.virtualmcpid=A);const m=g.main;return m&&typeof m=="string"&&!vt(m)&&(b.main=m),(g.sidepanel==="chat"||g.sidepanel===0)&&(b.sidepanel=g.sidepanel),d?.autosend&&(b.autosend=Ue),b}})},r=x.useRef(crypto.randomUUID()),c=s.taskId??r.current;return{virtualMcpId:a,taskId:c,navigateToTask:o}}function Wt(t,e){const{mimeType:n,data:s}=t;if(n.startsWith("text/"))try{const a=new TextDecoder().decode(Uint8Array.from(atob(s),o=>o.charCodeAt(0)));return[{type:"text",text:`${e}
|
|
17
17
|
${a}`}]}catch(a){console.error("Failed to decode text file:",a)}return[{type:"file",url:`data:${n};base64,${s}`,filename:e,mediaType:n}]}function De(t,e){const n=[];for(const s of t)"text"in s&&s.text?n.push({type:"text",text:`[${e}]
|
|
18
18
|
${s.text}`}):"blob"in s&&s.blob&&s.mimeType&&n.push({type:"file",url:`data:${s.mimeType};base64,${s.blob}`,filename:String(s.uri),mediaType:String(s.mimeType)});return n}function Vt(t,e){const n=(t.files??[]).filter(r=>r.content?.trim()),s=t.omittedPaths??[];if(n.length===0&&s.length===0)return[];const a=n.map(r=>`<skill-file path="${r.relPath}">
|
|
19
19
|
${r.content.trim()}
|
|
@@ -24,11 +24,13 @@ ${r.content.trim()}
|
|
|
24
24
|
Other files in \`${t.sandboxPath}/\`: ${s.join(", ")}`:"";return[{type:"text",text:`[${e}]
|
|
25
25
|
${a}${o}`}]}function Bt(t,e){const n=[];for(const s of t){if(s.role!=="user"||!s.content)continue;const a=Array.isArray(s.content)?s.content:[s.content];for(const o of a)switch(o.type){case"text":{const r=o.text?.trim();if(!r)continue;n.push({type:"text",text:`[${e}]
|
|
26
26
|
${r}`});break}case"image":case"audio":{if(!o.data||!o.mimeType)continue;n.push({type:"file",url:`data:${o.mimeType};base64,${o.data}`,mediaType:o.mimeType});break}case"resource":{const r=o.resource;if(!r||!r.mimeType)continue;r&&("text"in r&&r.text?n.push({type:"text",text:`[${e}]
|
|
27
|
-
${r.text}`}):"blob"in r&&r.blob&&r.mimeType&&n.push({type:"file",url:`data:${r.mimeType};base64,${r.blob}`,filename:String(r.uri),mediaType:String(r.mimeType)}));break}}}return n}function He(t){if(!t)return[];const e=[];let n="";const s=a=>{if(a){if(a.type==="text"&&"text"in a&&typeof a.text=="string")n+=a.text;else if(a.type==="mention"&&a.attrs){const o=a.attrs.char??"/",r=`${o}${a.attrs.name}`;if(
|
|
28
|
-
|
|
29
|
-
`);
|
|
27
|
+
${r.text}`}):"blob"in r&&r.blob&&r.mimeType&&n.push({type:"file",url:`data:${r.mimeType};base64,${r.blob}`,filename:String(r.uri),mediaType:String(r.mimeType)}));break}}}return n}function He(t){if(!t)return[];const e=[];let n="";const s=a=>{if(a){if(a.type==="text"&&"text"in a&&typeof a.text=="string")n+=a.text;else if(a.type==="mention"&&a.attrs){const o=a.attrs.char??"/",r=`${o}${a.attrs.name}`;if(a.attrs.kind==="task"){const c=a.attrs.metadata,d=[c?.title??a.attrs.name??"",c?.description?.trim()].filter(Boolean).join(`
|
|
28
|
+
|
|
29
|
+
`);d&&e.push({type:"text",text:d});return}if(n+=r,o==="@"){const c=a.attrs.metadata;c&&!Array.isArray(c)&&"agentId"in c?e.push({type:"text",text:`[DELEGATE TO AGENT: ${c.title??a.attrs.name} (agent_id: ${c.agentId})]
|
|
30
|
+
Use the subtask tool to delegate this task to the agent above. Include the full relevant context from this conversation in the prompt field — the subagent has no conversation history.`}):Array.isArray(c)&&e.push(...De(c,r))}else if(a.attrs.kind==="skill"){const c=a.attrs.metadata;c&&!Array.isArray(c)&&Array.isArray(c.files)&&e.push(...Vt(c,r))}else{const c=a.attrs.metadata||a.attrs.prompts||[];Array.isArray(c)&&c.length>0&&"role"in c[0]?e.push(...Bt(c,r)):Array.isArray(c)&&e.push(...De(c,r))}}else if(a.type==="file"&&a.attrs){const o=a.attrs,r=`[file:://${encodeURIComponent(o.name)}]`;n+=r,e.push(...Wt(o,r))}if("content"in a&&Array.isArray(a.content))for(const o of a.content)s(o)}};return s(t),n.trim()&&e.unshift({type:"text",text:n.trim()}),e}function wn(t){const e=He(t);return e.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:e,metadata:{tiptapDoc:t}}]}function En(t){return new Set(t.filter(e=>e.status==="queued").map(e=>e.messageId))}function Ht(t){return(t??[]).map(e=>e?.type==="text"&&typeof e.text=="string"?e.text:"").join("").trim()}function An(t){return t.filter(e=>e.status==="queued").sort((e,n)=>e.enqueuedAt-n.enqueuedAt)}function Gt(t,e){return t.some(n=>n.messageId===e.messageId)?t:[...t,e]}function zt(t,e){return t.filter(n=>n.messageId!==e)}const Oe=new Map,Ae=new Set;function Xt(t){Ae.add(t)}function Zt(t){return Ae.has(t)}function Yt(t){Ae.delete(t)}function ye(t){let e=Oe.get(t);return e||(e=new ct([]),Oe.set(t,e)),e}function Ge(t,e){ye(t).update(n=>Gt(n,e))}function we(t,e){ye(t).update(n=>zt(n,e))}function Jt(t,e){ye(t).set(e)}const Ie=new Map;function en(t,e){Ie.set(`${t}:${e.id}`,e)}function tn(t,e){const n=`${t}:${e}`,s=Ie.get(n);return Ie.delete(n),s}function Le(t,e){Ie.delete(`${t}:${e}`)}async function Z(t,e){try{const n=await fetch(`/api/${encodeURIComponent(t)}/decopilot/queue/${encodeURIComponent(e)}`,{credentials:"include"});if(!n.ok)return;const s=await n.json();Jt(e,s.items??[])}catch{}}function _n(t){const e=oe.c(2);let n;e[0]!==t?(n=ye(t),e[0]=t,e[1]=n):n=e[1];const s=n;return x.useSyncExternalStore(s.subscribe,s.get,s.get)}function nn(){const{org:t}=Y();return{enqueue:Ge,refresh:e=>Z(t.slug,e),cancel:async(e,n)=>{const s=`thread-run:${e}:${n}`;we(e,n);try{const a=await fetch(`/api/${encodeURIComponent(t.slug)}/decopilot/queue/${encodeURIComponent(e)}/cancel/${encodeURIComponent(s)}`,{method:"POST",credentials:"include"});if(!a.ok&&a.status!==404)throw new Error(`Cancel failed: ${a.status}`);return!0}catch(a){return ae.error(a instanceof Error?a.message:"Failed to cancel"),!1}finally{await Z(t.slug,e)}}}}function ne(t,e,n,s){if(!t)return null;const a=e.find(r=>r.id===t.keyId);if(!a)return null;const o=n.find(r=>r.modelId===t.modelId);return o?{...o,keyId:t.keyId}:{modelId:t.modelId,title:s??t.modelId,keyId:t.keyId,providerId:a.providerId,description:null,logo:null,capabilities:[],limits:null,costs:null}}function sn(t){return t==="fast"||t==="smart"||t==="thinking"?t:"smart"}function an(t,e,n,s){if(!n||s.length===0)return null;const a=e.find(p=>p.id===n);if(!a)return null;const o=Pt([a],{[n]:s}),r=t==="fast"?o.chat.fast:t==="thinking"?o.chat.thinking:o.chat.smart;if(!r)return null;const c=s.find(p=>p.modelId===r.modelId);return c?{...c,keyId:n}:null}const Ne=new Set,se=new Set;function ce(t){return x.useSyncExternalStore(t.subscribe,t.get,t.get)}function on(t){return t.kind==="loading"?"ready":t.kind}const rn=1e4,cn=10,_e=x.createContext(null),Re=x.createContext(null),$e=x.createContext(null),ze=x.createContext(null);function ln({children:t}){const{locator:e}=Y(),{virtualMcpId:n}=Be(),[s,a]=le(de.chatSelectedImageModel(e),null),[o,r]=le(de.chatSelectedWebSearchModel(e),null),[c,p]=le(de.chatSelectedDeepResearchModel(e),null),[d,g]=x.useState(null),[b,A]=x.useState("default"),m=Ct(),[D,W]=le(de.chatSimpleModeTier(e),null),N=sn(D),C=yt(),T=m.tiers[N],O=d&&C.some(i=>i.id===d)?d:T?.keyId??C[0]?.id??null,{models:v,isLoading:V}=ge(O??void 0),{models:G}=ge(T?.keyId),{models:J}=ge(m.tiers.image?.keyId),{models:w}=ge(m.tiers.web_search?.keyId),{models:B}=ge(m.tiers.deep_research?.keyId),z=ne(T,C,G,T?.title)??an(N,C,O,v),j=V,H=v.filter(i=>i.capabilities?.includes("image")),U=ne(s,C,H),f=ne(m.tiers.image,C,J,m.tiers.image?.title)??U??H[0]??null,R=v.filter(We),F=ne(o,C,R),ee=R.find(i=>i.modelId==="perplexity/sonar")??R[0]??null,Q=ne(m.tiers.web_search,C,w,m.tiers.web_search?.title)??F??ee,q=v.filter(Ve),M=ne(c,C,q),I=q.find(i=>i.modelId==="perplexity/deep-research")??q.find(i=>i.asyncResearch===!0)??q[0]??null,X=ne(m.tiers.deep_research,C,B,m.tiers.deep_research?.title)??M??I,xe=gt(n)??{id:n,title:"",description:null,icon:null},[ke,fe]=x.useState({}),Se=(i,$)=>{const P=[];for(const _ of $.content??[])_.type==="text"&&_.text?.trim()&&P.push(_.text.trim());const k=P.join(`
|
|
31
|
+
`);if(!k){he(i);return}new TextEncoder().encode(k).length>rn||fe(_=>Object.keys(_).length>=cn&&!(i in _)?_:{..._,[i]:k})},he=i=>{fe($=>{const{[i]:P,...k}=$;return k})},[re,Ce]=le(de.chatLastAgentOption(e),i=>i&&i in ve?i:null),te=pn(),Te=te?.isThreadLocked&&te.lockedHarness!=null?Nt(te.lockedHarness,te.lockedSandbox):null,Me=Ot(),be=Ft(re,Me.ready&&!Me.online),me=te?.isThreadLocked?Te:be,l=me?ve[me]:null,u=l?.harness??null,L=l?.sandbox??null,[E,h]=x.useState(void 0),S=x.useRef(E);S.current=E;const y={selectedModel:z,setModel:()=>{},credentialId:O,setCredentialId:g,allModelsConnections:C,isModelsLoading:j,selectedVirtualMcp:xe,imageModel:f,setImageModel:i=>{a(i?.keyId?{keyId:i.keyId,modelId:i.modelId}:null)},webSearchModel:Q,setWebSearchModel:i=>{r(i?.keyId?{keyId:i.keyId,modelId:i.modelId}:null)},deepResearchModel:X,setDeepResearchModel:i=>{p(i?.keyId?{keyId:i.keyId,modelId:i.modelId}:null)},chatMode:b,setChatMode:A,appContexts:ke,setAppContext:Se,clearAppContext:he,tiptapDoc:E,setTiptapDoc:h,tiptapDocRef:S,resetInteraction:()=>{},simpleModeTier:N,setSimpleModeTier:i=>W(i),pendingAgentOption:me,setPendingAgentOption:Ce,pendingHarnessId:u,pendingSandboxProviderKind:L};return K.jsx($e.Provider,{value:y,children:t})}function Rn(t){const e=oe.c(41),{virtualMcpId:n,task:s,children:a}=t,{locator:o}=Y(),{data:r}=nt.useSession(),c=r?.user??null,{taskId:p,virtualMcpId:d,navigateToTask:g}=Be(),[b]=st(),{markTaskRead:A}=Qt(),m=ut(),D=p,W=d,N=jt(W);let C;e[0]!==A||e[1]!==g?(C=(M,I)=>{A(M),g(M,{virtualMcpId:I?.virtualMcpId,autosend:I?.autosend})},e[0]=A,e[1]=g,e[2]=C):C=e[2];const T=C,O=D&&s?.id===D?s:null,v=O?.harness_id??null,V=O?.sandbox_provider_kind??null,G=O?.branch??null,J=v!=null,w=G;let B;e[3]!==w||e[4]!==T||e[5]!==m||e[6]!==n?(B=()=>{const M=crypto.randomUUID();return m.create({id:M,virtual_mcp_id:n,...w?{branch:w}:{}}).then(()=>T(M)).catch(()=>{T(M)}),M},e[3]=w,e[4]=T,e[5]=m,e[6]=n,e[7]=B):B=e[7];const z=B;let j;e[8]!==w||e[9]!==o||e[10]!==T||e[11]!==m||e[12]!==n?(j=M=>{const I=crypto.randomUUID(),X=M.virtualMcpId??n,pe=X===n?w:null;it(sessionStorage,o,I,M.message),m.create({id:I,virtual_mcp_id:X,...pe?{branch:pe}:{}}).then(()=>T(I,{virtualMcpId:M.virtualMcpId,autosend:!0})).catch(()=>{T(I,{virtualMcpId:M.virtualMcpId,autosend:!0})})},e[8]=w,e[9]=o,e[10]=T,e[11]=m,e[12]=n,e[13]=j):j=e[13];const H=j;let U;e[14]!==D||e[15]!==m?(U=M=>{D&&m.setBranch(D,M)},e[14]=D,e[15]=m,e[16]=U):U=e[16];let f;e[17]!==O||e[18]!==z||e[19]!==H||e[20]!==w||e[21]!==D||e[22]!==W||e[23]!==J||e[24]!==G||e[25]!==v||e[26]!==V||e[27]!==T||e[28]!==U?(f={virtualMcpId:W,taskId:D,openTask:T,createTask:z,createTaskWithMessage:H,activeTask:O,isThreadLocked:J,lockedHarness:v,lockedSandbox:V,lockedBranch:G,currentBranch:w,setCurrentTaskBranch:U},e[17]=O,e[18]=z,e[19]=H,e[20]=w,e[21]=D,e[22]=W,e[23]=J,e[24]=G,e[25]=v,e[26]=V,e[27]=T,e[28]=U,e[29]=f):f=e[29];const R=f;let F;e[30]!==N||e[31]!==b||e[32]!==g||e[33]!==c?(F={user:c,contextPrompt:N,preferences:b,rawNavigateToTask:g},e[30]=N,e[31]=b,e[32]=g,e[33]=c,e[34]=F):F=e[34];const ee=F;let Q;e[35]!==a||e[36]!==ee?(Q=K.jsx(ln,{children:K.jsx(ze.Provider,{value:ee,children:a})}),e[35]=a,e[36]=ee,e[37]=Q):Q=e[37];let q;return e[38]!==Q||e[39]!==R?(q=K.jsx(Re.Provider,{value:R,children:Q}),e[38]=Q,e[39]=R,e[40]=q):q=e[40],q}function $n({taskId:t,children:e}){const{virtualMcpId:n,activeTask:s,currentBranch:a}=dn();t&&!Ne.has(t)&&(Ne.add(t),tt("chat_opened",{thread_id:t}));const{imageModel:o,webSearchModel:r,deepResearchModel:c,chatMode:p,setChatMode:d,appContexts:g,setTiptapDoc:b,simpleModeTier:A,pendingSandboxProviderKind:m,pendingHarnessId:D}=un(),W=x.useContext(ze);if(!W)throw new Error("ActiveTaskProvider must be used within ChatContextProvider");const{user:N,contextPrompt:C,preferences:T,rawNavigateToTask:O}=W,{org:v,locator:V}=Y(),G=nn(),[J,w]=x.useState(null),B=Ut(),z=qe(),j=lt(),H=je(),U=ft({connectionId:mt,orgId:v.id,orgSlug:v.slug}),f=dt(v.slug,t,{client:U});x.use(f.ready);const R=ce(f.messages),F=ce(f.status),ee=ce(f.finishReason),Q=ce(f.runStatusStage),q=ce(f.hasMoreOlder),M=ce(f.isFetchingOlder),I=x.useRef({onToolCall:B,queryClient:z,rawNavigateToTask:O,taskId:t,manager:j,navigate:H,orgId:v.id,orgSlug:v.slug});I.current={onToolCall:B,queryClient:z,rawNavigateToTask:O,taskId:t,manager:j,navigate:H,orgId:v.id,orgSlug:v.slug},kt({orgSlug:v.slug,taskId:t,onTaskStatus:l=>{const u=I.current,L=l.data.message_id;if(l.data.status==="in_progress"&&L){we(u.taskId,L);const E=tn(u.taskId,L);E&&f.applyLocalMessage(E),Z(u.orgSlug,u.taskId)}Zt(u.taskId)&&(async()=>(await Z(u.orgSlug,u.taskId),await f.reconcileFromServer()&&ye(u.taskId).get().length===0&&Yt(u.taskId)))()}}),x.useEffect(()=>{const l={onData:h=>{if(h.type==="data-thread-title"){const S=h.data;if(!S?.title)return;const y=I.current;if(!y.taskId)return;y.manager.patchThread({id:y.taskId,title:S.title,updated_at:new Date().toISOString()});return}if(h.type==="data-deck-updated"){const S=h.data;if(!S?.path)return;const y=S.path,i=I.current;i.queryClient.invalidateQueries({queryKey:ue.orgFsStat(i.orgId,"home",y)}),i.queryClient.invalidateQueries({queryKey:ue.orgFsRecent(i.orgId)}),i.navigate({to:".",search:$=>({...$,main:It(y)}),replace:!0});return}if(h.type==="data-open-preview"){const S=h.data,y=I.current,i=y.taskId;if(i){const $=y.manager.threads.get().find(P=>P.id===i);y.manager.patchThread({id:i,...S?.branch?{branch:S.branch}:{},...S?.sandboxProviderKind?{sandbox_provider_kind:S.sandboxProviderKind}:{},metadata:{...$?.metadata??{},...S?.githubRepo?{githubRepo:S.githubRepo}:{},...S?.sandboxMap?{sandboxMap:S.sandboxMap}:{}}})}y.navigate({to:".",search:$=>({...$,main:"preview"}),replace:!0});return}},onFinish:(h,S,y)=>{const i=I.current;i.taskId&&Z(i.orgSlug,i.taskId),i.taskId&&i.manager.patchThread({id:i.taskId,status:Lt(y,h.parts),updated_at:new Date().toISOString()});const $=h.parts?.some(k=>{const _=k;return(_.type==="tool-share_with_user"||_.type==="tool-bash"||_.type==="tool-write")&&_.state==="output-available"});if(i.taskId&&$){const k=ue.threadOutputs(i.taskId);for(const _ of[0,1500,3e3,6e3,12e3,25e3])setTimeout(()=>{i.queryClient.invalidateQueries({queryKey:k})},_)}i.queryClient.invalidateQueries({queryKey:ue.homeNextActions(i.orgSlug)});const P=h.metadata?.thread_id;P&&P!==i.taskId&&i.rawNavigateToTask(P)},onError:h=>{w(h),console.error("[chat] Error",h)},onToolCall:h=>I.current.onToolCall(h)};f.observer=l,Z(I.current.orgSlug,I.current.taskId);const u=h=>h==="submitted"||h==="streaming";let L=u(f.status.get().kind);const E=f.status.subscribe(()=>{const h=u(f.status.get().kind);if(h===L)return;L=h;const S=I.current;Z(S.orgSlug,S.taskId)});return()=>{f.observer===l&&(f.observer=null),E()}},[f]);const X=F.kind==="submitted"||F.kind==="streaming",pe=R.length===0,xe=R.at(-1),ke=!X&&xe?.role==="assistant"&&xe.parts.some(l=>"state"in l&&l.state==="approval-requested"),fe=s,Se=(fe?.status==="in_progress"||fe?.status==="expired")&&F.kind==="ready"&&R.length>0;async function he(l){const u=t,L=n,E=Object.entries(g),h=E.length>0?E.map(([P,k])=>`### App Context: ${P}
|
|
30
32
|
${k}`).join(`
|
|
31
33
|
|
|
32
34
|
`):"",S=[C,h].filter(Boolean).join(`
|
|
33
35
|
|
|
34
|
-
`);let y=
|
|
36
|
+
`);let y=p;y==="gen-image"&&!o&&(y="default"),y==="web-search"&&!r&&(y="default"),y==="deep-research"&&!c&&(y="default"),(y==="web-search"||y==="deep-research")&&d("default");const i=qt({thread:s?{harness_id:s.harness_id??null,sandbox_provider_kind:s.sandbox_provider_kind??null,branch:s.branch??null}:null,globals:{harnessId:D??void 0,sandboxProviderKind:m??void 0,branch:a}});s?.harness_id||j.patchThread({id:u,harness_id:i.harnessId??"decopilot",sandbox_provider_kind:i.sandboxProviderKind??null,updated_at:new Date().toISOString()});const $={tier:A,mode:y,toolApprovalLevel:T.toolApprovalLevel??at(),system:S||void 0,agent:{id:L},thread_id:u,...i};try{if(X||Se){let P=!0;try{en(u,l),await f.enqueue(l,$),Ge(u,{workflowId:`thread-run:${u}:${l.id}`,messageId:l.id,text:Ht(l.parts),hasAttachments:l.parts.some(k=>k.type==="file"),status:"queued",enqueuedAt:Date.now(),optimistic:!0}),Xt(u)}catch(k){P=!1,Le(u,l.id),we(u,l.id),w(k instanceof Error?k:new Error(String(k))),ae.error(k instanceof Error?k.message:"Failed to queue message")}return Z(v.slug,u),P}return await f.submit({kind:"message",message:l},$),!0}finally{se.delete(u)}}async function re(l){const u=l.parts??He(l.tiptapDoc);if(u.length===0||se.has(t))return;se.add(t),w(null),b(void 0);const L={tiptapDoc:l.tiptapDoc,created_at:new Date().toISOString(),user:{avatar:N?.image??void 0,name:N?.name??"you"}},E={id:crypto.randomUUID(),role:"user",parts:u,metadata:L};await he(E)}async function Ce(l,u){if(se.has(t))return ae.info("Still sending your previous message — try again in a moment"),!1;if(se.add(t),!await G.cancel(t,l))return se.delete(t),ae.error("Couldn't remove the original message"),!1;Le(t,l),f.removeLocalMessage(l);const E={id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:u}],metadata:{created_at:new Date().toISOString(),user:{avatar:N?.image??void 0,name:N?.name??"you"}}};try{return await he(E)}catch(h){return ae.error(h instanceof Error?h.message:"Failed to send edited message"),!1}}const te=async()=>{f.stop();try{const l=await fetch(`/api/${v.slug}/decopilot/cancel/${t}`,{method:"POST",credentials:"include"});if(l.status===404)return;if(!l.ok){const u=await l.json().catch(()=>({}));throw new Error(u.message??`Cancel failed: ${l.status}`)}}catch(l){const u=l instanceof Error?l.message:"Failed to cancel";ae.error(u),console.error("[chat] cancelRun",l)}},Te=l=>l&&typeof l=="object"&&"type"in l?re({tiptapDoc:l}):re(l),be=Ee({strict:!1}).autosend===Ue;x.useEffect(()=>{if(!be||R.length>0)return;const l=ot(sessionStorage,V,t);l&&re(l.message).then(()=>{rt(sessionStorage,V,t)})},[be,R.length,V,t,re]);const me={messages:R,status:on(F),sendMessage:Te,editQueuedMessage:Ce,stop:()=>{te()},submit:(l,u)=>f.submit(l,u),removeLocalMessage:l=>f.removeLocalMessage(l),isSendInFlight:()=>se.has(t),error:J,clearError:()=>w(null),finishReason:ee,runStatusStage:Q,clearFinishReason:()=>f.finishReason.set(null),isStreaming:X,isChatEmpty:pe,isWaitingForApprovals:ke??!1,isRunInProgress:Se,hasMoreOlder:q,isFetchingOlder:M,fetchOlderMessages:f.fetchOlderMessages.bind(f)};return K.jsx(_e.Provider,{value:me,children:e})}function Pn(){const t=x.useContext(_e);if(!t)throw new Error("useChatStream must be used within ActiveTaskProvider");return t}function Dn(){return x.useContext(_e)}function dn(){const t=x.useContext(Re);if(!t)throw new Error("useChatTask must be used within ChatContextProvider");return t}function un(){const t=x.useContext($e);if(!t)throw new Error("useChatPrefs must be used within ChatContextProvider");return t}function On(){return x.useContext($e)}function pn(){return x.useContext(Re)}export{$n as A,ln as C,Tn as S,un as a,Pn as b,pn as c,dn as d,_n as e,nn as f,Le as g,Dn as h,Rn as i,En as j,He as k,Be as l,On as m,We as n,Ve as o,Mn as p,Pt as q,An as s,wn as t,Ot as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as n,l as d,j as c,bE as l,bF as b}from"./index-DIPAEwLP.js";import{i as m}from"./ChevronUp-z2fewBpw.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(b,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,a as c,r as m,j as o}from"./index-
|
|
1
|
+
import{c as a,a as c,r as m,j as o}from"./index-DIPAEwLP.js";import{A as u}from"./auth-split-layout-CUJ9nkHR.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as y,j as t,B as F,i as Y,H as Ge,I as se,E as Pe,r as T,C as re,M as Qe,l as V,bd as Ze,u as Ye,L as G,t as Xe,e as ae,aZ as ke}from"./index-DIPAEwLP.js";import{E as Ee}from"./empty-state-BYiNNxsG.js";import{u as et,a as Ae}from"./use-collections-zWVyDZcY.js";import{u as ce}from"./use-mcp-client-jqf5Iy9F.js";import{F as ne,a as tt,b as de,d as me}from"./form-M4hxtBov.js";import{I as ue}from"./input-CfHOale8.js";import{T as le}from"./textarea-DqwqE7DK.js";import{a as st,b as nt,V as xe,O as ot,M as it}from"./index-CkWlYouF.js";import{ax as lt,O as rt,an as at,V as ct,a4 as dt,ay as mt,Z as be}from"./agent-icon-DD1XuUZV.js";import{g as ut,M as xt,a as Ne}from"./index-4drSQZJw.js";import{A as pt,a as ft,b as ht}from"./alert-BAS3TA95.js";import{S as ve,a as Se,b as ye,c as we,d as oe}from"./select-D45GDan5.js";import{c as gt,b as Ce,T as Ie,a as $e}from"./tooltip-WJkhQjcG.js";import{i as jt}from"./AlertCircle-CeOq_QOa.js";import{s as bt}from"./Stars02-Di59xUHt.js";import{a as Nt}from"./Copy01-mdfV84Qi.js";import{i as vt}from"./Play-DR0RovML.js";import{i as St}from"./ChevronRight-CHBqaZbp.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./use-mcp-auth-status-DqdsBw6O.js";import{a as Oe,u as Re}from"./use-connection-zVMbceFt.js";import{a as It}from"./use-mcp-tools-FlPegk9r.js";import{M as $t,c as Tt}from"./monaco-editor-C4mpNtzY.js";import{I as Te}from"./integration-icon-BzIpy5hd.js";import{h as Pt,m as kt}from"./chat-context-BzTO5WN0.js";import{u as Et}from"./shell-layout-CdiwNTyI.js";import{n as At}from"./Tool02-hbk9uCUP.js";import"./constants-BHDe7bIw.js";import"./auth-BH7x9puf.js";import"./label-q4Lz_o7x.js";import"./index-BAlJ2Lmy.js";import"./sidebar-C7aQbJG9.js";import"./LayoutLeft-B1GHI-YD.js";import"./use-mobile-Dzfwh2PG.js";import"./X-C00VJyk9.js";import"./ZoomOut-DnsiYOYE.js";import"./Key01-DkkbB1Yr.js";import"./extract-connection-data-J1VuF4OH.js";import"./use-registry-connections-C5ZlG8AQ.js";import"./use-organization-settings-B5oAjTeU.js";import"./studio-tools-CYfQ2AAQ.js";import"./Plus-CztP4VvG.js";import"./index-ClUkG6N9.js";import"./index-CLMqgJD5.js";import"./popover-CXcO7_bx.js";import"./use-virtual-mcp-rI-Jb4Ga.js";import"./ChevronUp-z2fewBpw.js";import"./SearchMd-D8besh0I.js";import"./Users03-CJYVEqY6.js";import"./use-create-virtual-mcp-CC9xkgX7.js";import"./use-navigate-to-agent-BdTIm_yX.js";import"./hooks-NPNZyDPQ.js";import"./decopilot-sse-pool-C6iebzwQ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Tool01-DehbzRDq.js";import"./ArrowUp-CCgnuK4p.js";import"./Settings02-CuqicLOk.js";import"./XCircle-D5ueBEPv.js";import"./ArrowUpRight-BUF92paN.js";import"./TrendUp01-Bzv8tCE3.js";import"./ZapSquare-DzvB1OVj.js";import"./CheckCircle-DU0E1kqe.js";import"./ChevronDown-DA-FKtUl.js";import"./DotsVertical-CfEiDPnS.js";import"./Globe01-DjB8n-mo.js";import"./Eye-DwGaKloo.js";import"./FilterLines-DTtZUWPT.js";import"./Star01-DHUNj4ei.js";import"./Globe04-DutdpBnz.js";import"./SwitchHorizontal01-cKbBsGPr.js";import"./HardDrive-CGELqP5N.js";import"./Image01-BTSbKZvY.js";import"./LinkExternal01-DJ_9J6wi.js";import"./Monitor01-pmSL1YcM.js";import"./Sun-CC4UrAWz.js";import"./Package-CWS4_j2H.js";import"./Palette-DPL8s5xh.js";import"./SearchLg-BzyTJkaM.js";import"./Shield01-4kmCM8vo.js";import"./Stars01-tn1arSwR.js";import"./Trash01-DtotiGOx.js";import"./Upload01-mGXKgGjJ.js";import"./User01-CqaAq7aP.js";import"./Users01-ZGhY-EtM.js";import"./XClose-COXhcGxA.js";import"./Zap-CyltBR5S.js";import"./badge-DdEWwdjD.js";import"./mcp-oauth-BD7eUVto.js";import"./index-Dt28nlD4.js";import"./autosend-BndTn1RX.js";import"./use-ai-providers-C40YpJE-.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-CsMJmVbs.js";import"./avatar-BV7BW59M.js";import"./dialog-BJfLYuit.js";import"./required-auth-layout-DXZH_cMh.js";import"./use-org-sso-XSU8Sbkk.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:i,isSaving:l,saveLabel:a,undoLabel:c}=s,r=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!i)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(lt,{size:14}),e[0]=x):x=e[0];let m;e[1]!==l||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:l,"aria-label":u,children:[x,u]}),e[1]=l,e[2]=n,e[3]=u,e[4]=m):m=e[4];let p;e[5]!==l?(p=l?t.jsx(Y,{size:14,className:"animate-spin"}):t.jsx(rt,{size:14}),e[5]=l,e[6]=p):p=e[6];let f;e[7]!==l||e[8]!==o||e[9]!==r||e[10]!==p?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:l,"aria-label":r,children:[p,r]}),e[7]=l,e[8]=o,e[9]=r,e[10]=p,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Ge({title:se().min(1),description:se().nullable(),body:se()});function ie(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let i;e[1]!==o.control?(i=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:zt}),t.jsx(ne,{control:o.control,name:"description",render:Dt})]})]}),e[1]=o.control,e[2]=i):i=e[2];let l,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=l,e[4]=a):(l=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[l,a,t.jsx(ne,{control:o.control,name:"body",render:Mt})]}),e[5]=o.control,e[6]=c):c=e[6];let r;e[7]!==i||e[8]!==c?(r=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=r):r=e[9];let u;return e[10]!==o||e[11]!==r?(u=t.jsx(tt,{...o,children:r}),e[10]=o,e[11]=r,e[12]=u):u=e[12],u}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(le,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:i}=re(),l=o||null;let a;e[0]!==i.id||e[1]!==i.slug||e[2]!==l?(a={connectionId:l,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=l,e[3]=a):a=e[3];const c=ce(a),r=et(o,"PROMPT",n,c),u=Ae(o,"PROMPT",c),x=u.update.isPending;let m;e[4]!==r?(m=r?{title:r.title,description:r.description??null,body:ie(r)}:void 0,e[4]=r,e[5]=m):m=e[5];let p;e[6]!==m?(p={values:m},e[6]=m,e[7]=p):p=e[7];const f=Qe(p);let g;e[8]!==f||e[9]!==r?(g=()=>{r&&f.reset({title:r.title,description:r.description??null,body:ie(r)})},e[8]=f,e[9]=r,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const A=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:A.title,description:A.description??null,body:ie(A)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!r){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==r.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:r.title}),e[16]=r.title,e[17]=$):$=e[17];let E;e[18]!==r.description?(E=r.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:r.description})]}):null,e[18]=r.description,e[19]=E):E=e[19];let P;e[20]!==$||e[21]!==E?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,E]})}),e[20]=$,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==x||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:x})}),e[25]=f.formState.isDirty,e[26]=x,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(xe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const i=n;if(!i){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let l;return e[2]!==o?(l=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:i,promptId:o})})}),e[2]=o,e[3]=l):l=e[3],l}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("min-w-0 overflow-hidden",o),e[3]=o,e[4]=i):i=e[4];let l;return e[5]!==n||e[6]!==i?(l=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:i,...n}),e[5]=n,e[6]=i,e[7]=l):l=e[7],l}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=i):i=e[4];let l;return e[5]!==n||e[6]!==i?(l=t.jsx("ol",{"data-slot":"breadcrumb-list",className:i,...n}),e[5]=n,e[6]=i,e[7]=l):l=e[7],l}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=i):i=e[4];let l;return e[5]!==n||e[6]!==i?(l=t.jsx("li",{"data-slot":"breadcrumb-item",className:i,...n}),e[5]=n,e[6]=i,e[7]=l):l=e[7],l}function Q(s){const e=y.c(10);let o,n,i;e[0]!==s?({asChild:o,className:n,...i}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=i):(o=e[1],n=e[2],i=e[3]);const l=o?Ze:"a";let a;e[4]!==n?(a=V("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==l||e[7]!==i||e[8]!==a?(c=t.jsx(l,{"data-slot":"breadcrumb-link",className:a,...i}),e[6]=l,e[7]=i,e[8]=a,e[9]=c):c=e[9],c}function De(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("text-foreground font-medium truncate",o),e[3]=o,e[4]=i):i=e[4];let l;return e[5]!==n||e[6]!==i?(l=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:i,...n}),e[5]=n,e[6]=i,e[7]=l):l=e[7],l}function Z(s){const e=y.c(12);let o,n,i;e[0]!==s?({children:o,className:n,...i}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=i):(o=e[1],n=e[2],i=e[3]);let l;e[4]!==n?(l=V("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=l):l=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==i||e[9]!==l||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...i,children:a}),e[8]=i,e[9]=l,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:i,onSelectInstance:l,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const r=wt(c);if(!r.isAuthenticated){let m;return e[2]!==r.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:r.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(it,{hasReadme:!1})}),e[2]=r.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let x;return e[5]!==n||e[6]!==l||e[7]!==i||e[8]!==u||e[9]!==o?(x=t.jsx(Vt,{toolName:o,connectionId:n,siblings:i,onSelectInstance:l},u),e[5]=n,e[6]=l,e[7]=i,e[8]=u,e[9]=o,e[10]=x):x=e[10],x}function Vt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:i}=Ye({strict:!1}),l=(()=>{if(!i)return null;const d=`replay-${i}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!l)return null;const d={};for(const[h,v]of Object.entries(l))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,r]=T.useState(a??{}),[u,x]=T.useState(l?JSON.stringify(l,null,2):"{}"),[m,p]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[E,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=re(),k=Oe(e),N=Pt(),A=kt(),{openSidePanel:U}=Et(),z=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),J=d=>{if(!N)return;const h=Tt(d.content);h.content.length>0&&(U("chat"),N.sendMessage({tiptapDoc:h}))},[M,X]=T.useState("json"),[ze,Le]=T.useState(!1);O&&!ze&&(X("ui"),Le(!0));const pe=j?.inputSchema?.properties,fe=pe?Object.keys(pe):[],H=fe.length>0,K={};if(H&&j?.inputSchema?.properties)for(const d of fe)K[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),p(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...K,...c}:(()=>{const D=u.trim();if(!D)return{};const B=JSON.parse(D);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([D,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[D]=="string")try{h[D]=JSON.parse(h[D])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[D]=="string"&&h[D]!==""){const je=Number(h[D]);Number.isNaN(je)||(h[D]=je)}});const v=await _.callTool({name:s,arguments:h}),W=v.structuredContent??v,He=performance.now(),Ke=Math.round(He-d);p(W),g(v),I(h);const We=JSON.stringify(W),ge=new TextEncoder().encode(We).length;w({duration:`${Ke}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const W=performance.now();w({duration:`${Math.round(W-d)}ms`})}finally{P(!1)}},te=(d,h)=>{r(v=>({...v,[d]:h}))},Be=()=>{p(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Ve=t.jsx(_e,{children:t.jsxs(Me,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Z,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Z,{})]}),t.jsx(q,{children:t.jsx(De,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Je=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(le,{className:"font-mono text-xs",value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(le,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>x(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:E?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(pt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&M==="ui"&&_?t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(xt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:J,onUpdateModelContext:d=>A?.setAppContext(z,d),onTeardown:()=>A?.clearAppContext(z),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx($t,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),Xe.success("Copied to clipboard")},children:t.jsx(Nt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(xe,{breadcrumb:Ve,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Te,{icon:k?.icon||null,name:k?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):L.isLoading?t.jsx(Y,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Je}),qe]})})]})})}function Jt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:i}=s,[l,a]=T.useState(n[0]?.id??"");let c;e[0]!==l||e[1]!==n?(c=n.find(p=>p.id===l)?.id??n[0]?.id??"",e[0]=l,e[1]=n,e[2]=c):c=e[2];const r=c;if(!Oe(r||void 0)||!r){let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=p):p=e[3],p}let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Y,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=x):x=e[4];let m;return e[5]!==r||e[6]!==i||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:x,children:t.jsx(Ft,{toolName:o,connectionId:r,siblings:n,onSelectInstance:a,onBack:i})}),e[5]=r,e[6]=i,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:i,description:l,buttonProps:a,buttonComponent:c,className:r,children:u}=s;let x;e[0]!==r?(x=V("flex flex-col items-center justify-center py-16 text-center",r),e[0]=r,e[1]=x):x=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let p;e[5]!==i?(p=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:i}),e[5]=i,e[6]=p):p=e[6];let f;e[7]!==l?(f=l&&t.jsx("div",{className:"text-sm text-muted-foreground",children:l}),e[7]=l,e[8]=f):f=e[8];let g;e[9]!==p||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[p,f]}),e[9]=p,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:V(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==x||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:x,children:[m,g,S,u]}),e[15]=u,e[16]=x,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Kt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),i=decodeURIComponent(n.itemId);let l;s[1]!==n.appSlug?(l={slug:n.appSlug},s[1]=n.appSlug,s[2]=l):l=s[2];const a=Re(l);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const r=c,u=Wt;let x;return s[5]!==r||s[6]!==i||s[7]!==a?(x=t.jsx(Jt,{itemId:i,siblings:a,onBack:r,onUpdate:u}),s[5]=r,s[6]=i,s[7]=a,s[8]=x):x=s[8],x}async function Wt(s){return Promise.resolve()}function Gt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),i=decodeURIComponent(n.collectionName),l=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:r}=re();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,p=m?.id??"",f=p||"no-connection",g=p??null;let S;s[5]!==r.id||s[6]!==r.slug||s[7]!==g?(S={connectionId:g,orgId:r.id,orgSlug:r.slug},s[5]=r.id,s[6]=r.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ae(f,i,I);let $;s[9]!==R||s[10]!==l?($=async M=>{l&&await R.update.mutateAsync({id:l,data:M})},s[9]=R,s[10]=l,s[11]=$):$=s[11];const E=$;let P;s[12]!==i?(P=i?.toLowerCase(),s[12]=i,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==i?(C=Gt(i),s[14]=i,s[15]=C):C=s[15];const k=C;let N;s[16]!==r.slug?(N=t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:r.slug},children:"Connections"})})}),s[16]=r.slug,s[17]=N):N=s[17];let A;s[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Z,{}),s[18]=A):A=s[18];let U;s[19]!==i||s[20]!==m||s[21]!==r.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:n.appSlug},search:{tab:i},children:m.title})})}),t.jsx(Z,{})]}),s[19]=i,s[20]=m,s[21]=r.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let z;s[24]!==k?(z=t.jsx(q,{children:t.jsx(De,{children:k})}),s[24]=k,s[25]=z):z=s[25];let _;s[26]!==U||s[27]!==z||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(Me,{children:[N,A,U,z]})}),s[26]=U,s[27]=z,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let M;return s[30]!==w||s[31]!==c||s[32]!==E||s[33]!==l?(M=t.jsx(w,{itemId:l,onBack:c,onUpdate:E}),s[30]=w,s[31]=c,s[32]=E,s[33]=l,s[34]=M):M=s[34],M}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(At,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let J;return s[38]!==L||s[39]!==O?(J=t.jsx(xe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=J):J=s[40],J}function Zt(){const s=y.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Qt,{}),s[2]=l):l=s[2],l}function qn(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Y,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Zt,{})})}),s[0]=e):e=s[0],e}export{qn as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as B,j as s,l as M,B as V}from"./index-DIPAEwLP.js";import{d as z,a as _,c as $,D as E}from"./dropdown-menu-BhfnlfU6.js";import{i as L,n as O}from"./ArrowUp-CCgnuK4p.js";import{i as S}from"./ChevronUp-z2fewBpw.js";import{a as R,i as A,c as F}from"./SwitchHorizontal01-cKbBsGPr.js";import{T as I,a as K,c as P,b as W}from"./tooltip-WJkhQjcG.js";import{V as q}from"./view-mode-toggle-CQPkkcdM.js";import{B as G}from"./badge-DdEWwdjD.js";function re(t){const e=B.c(31),{viewMode:r,onViewModeChange:m,sortKey:T,sortDirection:p,onSort:f,sortOptions:u,filters:h}=t;let g;e[0]!==u?(g=u===void 0?[]:u,e[0]=u,e[1]=g):g=e[1];const j=g;let b;e[2]!==h?(b=h===void 0?[]:h,e[2]=h,e[3]=b):b=e[3];const l=b;let v;e[4]!==l?(v=l.filter(J),e[4]=l,e[5]=v):v=e[5];const N=v.length;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(R,{size:16}),e[6]=w):w=e[6];let i;e[7]!==N?(i=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[7]=N,e[8]=i):i=e[8];let o;e[9]!==i?(o=s.jsx(I,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"icon",className:"relative",children:[w,i]})})}),e[9]=i,e[10]=o):o=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(K,{children:"Display & filters"}),e[11]=C):C=e[11];let n;e[12]!==o?(n=s.jsx(P,{children:s.jsxs(W,{children:[o,C]})}),e[12]=o,e[13]=n):n=e[13];let a;e[14]!==m||e[15]!==r?(a=m&&r&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:r,onValueChange:m,fullWidth:!0,options:[{value:"table",icon:s.jsx(A,{})},{value:"cards",icon:s.jsx(F,{})}]})}),e[14]=m,e[15]=r,e[16]=a):a=e[16];let c;e[17]!==f||e[18]!==p||e[19]!==T||e[20]!==j?(c=j.length>0&&f&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),j.map(y=>{const D=T===y.id;return s.jsx(z,{onClick:()=>f(y.id),className:M("h-8 px-2 py-0 cursor-pointer",D&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[D&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!D&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:y.label}),D&&p&&(p==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},y.id)})]}),e[17]=f,e[18]=p,e[19]=T,e[20]=j,e[21]=c):c=e[21];let d;e[22]!==l?(d=l.map(H),e[22]=l,e[23]=d):d=e[23];let x;e[24]!==a||e[25]!==c||e[26]!==d?(x=s.jsxs($,{align:"end",className:"w-[200px] p-0 gap-0",children:[a,c,d]}),e[24]=a,e[25]=c,e[26]=d,e[27]=x):x=e[27];let k;return e[28]!==n||e[29]!==x?(k=s.jsxs(E,{children:[n,x]}),e[28]=n,e[29]=x,e[30]=k):k=e[30],k}function H(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const r=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:M("h-8 px-2 py-0 cursor-pointer",r&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!r&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function J(t){return t.value!=="ALL"}export{re as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,l as b,j as a,i as w}from"./index-
|
|
1
|
+
import{c as v,l as b,j as a,i as w}from"./index-DIPAEwLP.js";import{i as C}from"./SearchMd-D8besh0I.js";function S(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{S as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as s,l as C}from"./index-
|
|
1
|
+
import{c as k,j as s,l as C}from"./index-DIPAEwLP.js";import{e as S,d as R,a as T,T as H,b as L,c as z}from"./table-0RqXTFkI.js";import{i as D,n as E}from"./ArrowUp-CCgnuK4p.js";function I(y){const e=k.c(29),{columns:r,data:f,sortKey:x,sortDirection:u,onSort:i,onRowClick:n,rowClassName:c}=y;let p;e[0]!==u?(p=function(t,h){return s.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&u&&(u==="asc"?s.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):s.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=u,e[1]=p):p=e[1];const b=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=d):d=e[2];const a=d;let l;if(e[3]!==r||e[4]!==i||e[5]!==b||e[6]!==x){let o;e[8]!==r.length||e[9]!==i||e[10]!==b||e[11]!==x?(o=(t,h)=>{const N=x===t.id;return s.jsx(S,{className:C(a(h,r.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),onClick:t.sortable&&i?()=>i(t.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&b(t.id,N)]})},t.id)},e[8]=r.length,e[9]=i,e[10]=b,e[11]=x,e[12]=o):o=e[12],l=r.map(o),e[3]=r,e[4]=i,e[5]=b,e[6]=x,e[7]=l}else l=e[7];let g;e[13]!==l?(g=s.jsx(R,{className:"border-b-0",children:s.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:l})}),e[13]=l,e[14]=g):g=e[14];let j;if(e[15]!==r||e[16]!==f||e[17]!==n||e[18]!==c){let o;e[20]!==r||e[21]!==n||e[22]!==c?(o=(t,h)=>{const N=c?.(t);return s.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",n?"cursor-pointer":"",N),onClick:n?()=>n(t):void 0,children:r.map(m=>s.jsx(H,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:s.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(t):m.accessor?m.accessor(t):null})},m.id))},h)},e[20]=r,e[21]=n,e[22]=c,e[23]=o):o=e[23],j=f.map(o),e[15]=r,e[16]=f,e[17]=n,e[18]=c,e[19]=j}else j=e[19];let w;e[24]!==j?(w=s.jsx(L,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==g||e[27]!==w?(v=s.jsxs(z,{className:"w-full border-collapse",children:[g,w]}),e[26]=g,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(12),{columns:r,data:f,isLoading:x,sortKey:u,sortDirection:i,onSort:n,onRowClick:c,emptyState:p}=y;if(x===void 0?!1:x){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=a):a=e[0],a}if(f.length===0){let a;e[1]!==p?(a=p||s.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=p,e[2]=a):a=e[2];let l;return e[3]!==a?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:a}),e[3]=a,e[4]=l):l=e[4],l}let d;return e[5]!==r||e[6]!==f||e[7]!==c||e[8]!==n||e[9]!==i||e[10]!==u?(d=s.jsx("div",{className:"flex-1",children:s.jsx(I,{columns:r,data:f,sortKey:u,sortDirection:i,onSort:n,onRowClick:c})}),e[5]=r,e[6]=f,e[7]=c,e[8]=n,e[9]=i,e[10]=u,e[11]=d):d=e[11],d}export{B as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,l as u,j as m}from"./index-
|
|
1
|
+
import{c as f,l as u,j as m}from"./index-DIPAEwLP.js";import{B as g}from"./badge-DdEWwdjD.js";function h(x){const e=f.c(12),{tabs:c,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==c){let l;e[6]!==n||e[7]!==s?(l=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,l as i,j as n}from"./index-
|
|
1
|
+
import{c as d,l as i,j as n}from"./index-DIPAEwLP.js";import{_ as m}from"./index-CLMqgJD5.js";import{e as k,a as N,h as j,D as w,d as y}from"./dialog-BJfLYuit.js";import{i as b}from"./SearchMd-D8besh0I.js";function C(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(w,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(y,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(b,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,B as f,S as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as E,j as n,u as Ie,o as De,p as se,r as M,a as Se,b as Fe,q as qe,d as Te,s as Le,Q as He,E as Ve,K as _e,v as Ue,B as je,N as Be}from"./index-DIPAEwLP.js";import{L as Ke,s as ve,S as Pe,a as Ne,b as Ce,c as be,i as Qe,n as pe,C as we,p as xe}from"./self-tool-result-DveXGlAh.js";import{A as We}from"./auth-entry-CKXeCVAg.js";import{A as Ge}from"./auth-split-layout-CUJ9nkHR.js";import{O as Re}from"./organization-choice-DFVSxnej.js";import{I as Ye}from"./input-CfHOale8.js";import{u as Je}from"./use-mcp-client-jqf5Iy9F.js";import{S as Xe,W as Ze,g as et,a as tt}from"./constants-BHDe7bIw.js";import{i as it}from"./XCircle-D5ueBEPv.js";import"./integration-icon-BzIpy5hd.js";import"./Tool02-hbk9uCUP.js";import"./agent-icon-DD1XuUZV.js";import"./AlertCircle-CeOq_QOa.js";import"./Tool01-DehbzRDq.js";import"./ArrowUp-CCgnuK4p.js";import"./Settings02-CuqicLOk.js";import"./ArrowUpRight-BUF92paN.js";import"./TrendUp01-Bzv8tCE3.js";import"./ZapSquare-DzvB1OVj.js";import"./ZoomOut-DnsiYOYE.js";import"./Users03-CJYVEqY6.js";import"./CheckCircle-DU0E1kqe.js";import"./ChevronUp-z2fewBpw.js";import"./ChevronDown-DA-FKtUl.js";import"./ChevronRight-CHBqaZbp.js";import"./DotsVertical-CfEiDPnS.js";import"./Stars02-Di59xUHt.js";import"./Copy01-mdfV84Qi.js";import"./Globe01-DjB8n-mo.js";import"./Eye-DwGaKloo.js";import"./FilterLines-DTtZUWPT.js";import"./Star01-DHUNj4ei.js";import"./Globe04-DutdpBnz.js";import"./SwitchHorizontal01-cKbBsGPr.js";import"./HardDrive-CGELqP5N.js";import"./Image01-BTSbKZvY.js";import"./Key01-DkkbB1Yr.js";import"./LayoutLeft-B1GHI-YD.js";import"./LinkExternal01-DJ_9J6wi.js";import"./Monitor01-pmSL1YcM.js";import"./Sun-CC4UrAWz.js";import"./Package-CWS4_j2H.js";import"./Palette-DPL8s5xh.js";import"./Play-DR0RovML.js";import"./Plus-CztP4VvG.js";import"./SearchLg-BzyTJkaM.js";import"./SearchMd-D8besh0I.js";import"./Shield01-4kmCM8vo.js";import"./Stars01-tn1arSwR.js";import"./Trash01-DtotiGOx.js";import"./Upload01-mGXKgGjJ.js";import"./User01-CqaAq7aP.js";import"./Users01-ZGhY-EtM.js";import"./XClose-COXhcGxA.js";import"./X-C00VJyk9.js";import"./Zap-CyltBR5S.js";import"./dialog-BJfLYuit.js";import"./tooltip-WJkhQjcG.js";import"./companions-core-Cd0liGC_.js";import"./extract-connection-data-J1VuF4OH.js";import"./github-repo-scope-DjMZbiKa.js";import"./form-M4hxtBov.js";import"./label-q4Lz_o7x.js";import"./use-debounced-value-DNsl2JfP.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./authenticate-and-persist-oauth-Cv50WZiI.js";import"./mcp-oauth-BD7eUVto.js";import"./auth-BH7x9puf.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-BV7BW59M.js";const nt={workspace:"Preparando seu workspace de commerce...",generic:"Preparando..."};function ot(l){return nt[l]}function ye(l){const e=E.c(4),{variant:i}=l;let t;e[0]!==i?(t=ot(i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:n.jsx(Ke,{label:t,className:"text-muted-foreground"})}),e[2]=t,e[3]=s):s=e[3],s}function Li(){const l=E.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(st,{}),l[0]=e):e=l[0],e}const Me=M.createContext(null),$e=()=>M.useContext(Me);function R(l){const e=E.c(13);let i,t;e[0]!==l?({visual:t,...i}=l,e[0]=l,e[1]=i,e[2]=t):(i=e[1],t=e[2]);let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/commerce-onboarding"},e[3]=s):s=e[3];const c=Ie(s),{data:a}=Se.useSession(),o=a?.user?.email;let m;e[4]!==c.siteUrl||e[5]!==o?(m=Ce({siteUrl:c.siteUrl,email:o}),e[4]=c.siteUrl,e[5]=o,e[6]=m):m=e[6];const d=m;let u;e[7]!==d||e[8]!==t?(u=t??n.jsx(be,{href:d}),e[7]=d,e[8]=t,e[9]=u):u=e[9];let v;return e[10]!==i||e[11]!==u?(v=n.jsx(Ge,{...i,visual:u}),e[10]=i,e[11]=u,e[12]=v):v=e[12],v}const rt={signUpFailed:"Falha ao criar conta",signInFailed:"Falha ao entrar",authenticationFailed:"Falha na autenticação",resetEmailFailed:"Não foi possível enviar o e-mail de redefinição",otpSendFailed:"Não foi possível enviar o código",invalidCode:"Código inválido",invalidEmail:"E-mail inválido",invalidEmailOrPassword:"E-mail ou senha inválidos. Tente novamente.",accountExists:"Já existe uma conta com este e-mail. Tente entrar em vez de criar uma nova conta.",networkError:"Erro de rede. Verifique sua conexão e tente novamente.",tooManyAttempts:"Muitas tentativas. Aguarde um momento e tente novamente.",invalidOrExpiredCode:"Código inválido ou expirado. Tente novamente.",genericError:"Algo deu errado. Tente novamente.",resetPasswordTitle:"Redefinir sua senha",verificationCodeTitle:"Informe o código de verificação",welcomeTitle:"Bem-vindo à deco",resetPasswordSubtitle:"Enviaremos um link de redefinição",codeSentTo:l=>`Código enviado para ${l}`,defaultSubtitle:"Entre ou crie uma nova conta",resetEmailSent:"Verifique seu e-mail para redefinir a senha.",continueWith:l=>`Continuar com ${l}`,divider:"ou",emailLabel:"E-mail",emailPlaceholder:"Endereço de e-mail",sending:"Enviando...",sendCode:"Enviar código",verificationCodeLabel:"Código de verificação",enterCodePlaceholder:"Informe o código",verifying:"Verificando...",verify:"Verificar",useDifferentEmail:"Usar outro e-mail",sendResetLink:"Enviar link de redefinição",nameLabel:"Nome",namePlaceholder:"Seu nome",passwordLabel:"Senha",forgotPassword:"Esqueceu a senha?",creatingAccount:"Criando conta...",signingIn:"Entrando...",continue:"Continuar",backToSignIn:"Voltar para entrar",signInWithPassword:"Entrar com senha",alreadyHaveAccount:"Já tem uma conta? ",dontHaveAccount:"Não tem uma conta? ",signIn:"Entrar",signUp:"Criar conta",signInWithEmailCode:"Entrar com código por e-mail"};function Oe(l){switch(l){case"Enter a website URL.":return"Informe a URL de um site.";case"Use an HTTP or HTTPS website URL.":return"Use uma URL de site HTTP ou HTTPS.";case"Enter a valid website URL.":return"Informe uma URL de site válida.";default:return l}}let ze=!1;function st(){const l=Ie({from:"/commerce-onboarding"}),{org:e,siteUrl:i}=l,t=ve(i);return!ze&&De()&&(ze=!0,se("commerce_onboarding_viewed",{site_url:i,domain:t??void 0,...t?{$set:{last_scanned_domain:t}}:{}})),n.jsx(Me.Provider,{value:t,children:n.jsx(at,{requestedOrgSlug:e,siteUrl:i})})}function at(l){const e=E.c(8),{requestedOrgSlug:i,siteUrl:t}=l,{data:s,isPending:c}=Se.useSession(),a=$e();if(c){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(R,{children:n.jsx(ye,{variant:"generic"})}),e[0]=m):m=e[0],m}if(!s){const m=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let d;e[1]!==a?(d=a?n.jsx(Pe,{host:a}):void 0,e[1]=a,e[2]=d):d=e[2];let u;return e[3]!==d?(u=n.jsx(R,{children:n.jsx(We,{callbackUrl:m,allowAutoLogin:!1,title:"Desbloqueie seu diagnóstico completo",subtitle:null,brand:d,copy:rt})}),e[3]=d,e[4]=u):u=e[4],u}let o;return e[5]!==i||e[6]!==t?(o=n.jsx(lt,{requestedOrgSlug:i,siteUrl:t}),e[5]=i,e[6]=t,e[7]=o):o=e[7],o}function lt(l){const e=E.c(43),{requestedOrgSlug:i,siteUrl:t}=l,s=Fe(),c=qe(),[a,o]=M.useState(null),[m,d]=M.useState(null),u=c.data?.map(mt)??[];let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={mutationFn:ct,retry:!1,onSuccess:r=>{d(r)}},e[0]=v):v=e[0];const p=Te(v);if(c.isPending){let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(R,{children:n.jsx(ye,{variant:"workspace"})}),e[1]=r):r=e[1],r}if(c.error){let r;return e[2]!==c?(r=n.jsx(ae,{title:"Não foi possível carregar suas organizações",description:"Tente novamente para continuar a configuração de commerce nesta página.",actionLabel:"Tentar novamente",onRetry:()=>c.refetch()}),e[2]=c,e[3]=r):r=e[3],r}const j=i?u.find(r=>r.slug===i):null;if(j){let r;return e[4]!==j||e[5]!==t?(r=n.jsx(re,{org:j,initialSiteUrl:t}),e[4]=j,e[5]=t,e[6]=r):r=e[6],r}if(i){let r;return e[7]!==c?(r=n.jsx(ae,{title:"Organização não encontrada",description:"Não conseguimos encontrar essa organização na sua conta.",actionLabel:"Tentar novamente",onRetry:()=>c.refetch()}),e[7]=c,e[8]=r):r=e[8],r}if(a){let r;return e[9]!==a||e[10]!==t?(r=n.jsx(re,{org:a,initialSiteUrl:t}),e[9]=a,e[10]=t,e[11]=r):r=e[11],r}if(u.length===1&&u[0]){let r;return e[12]!==u[0]||e[13]!==t?(r=n.jsx(re,{org:u[0],initialSiteUrl:t}),e[12]=u[0],e[13]=t,e[14]=r):r=e[14],r}if(u.length>1){let r;e[15]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(k,{title:"Escolha uma organização",description:"Selecione onde o diagnóstico de commerce deve continuar."}),e[15]=r):r=e[15];let h;e[16]!==s||e[17]!==t?(h=O=>s({to:"/commerce-onboarding",search:{org:O.slug,siteUrl:t}}),e[16]=s,e[17]=t,e[18]=h):h=e[18];let C;return e[19]!==u||e[20]!==h?(C=n.jsx(R,{children:n.jsxs("div",{className:"grid gap-10",children:[r,n.jsx(Ne,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:n.jsx(Re,{organizations:u,selectLabel:"Continuar",onSelected:h})})]})}),e[19]=u,e[20]=h,e[21]=C):C=e[21],C}if(!m){let r;e[22]!==p?(r=()=>{p.reset(),p.mutate()},e[22]=p,e[23]=r):r=e[23];let h;return e[24]!==p||e[25]!==r?(h=n.jsx(dt,{mutation:p,onRetry:r}),e[24]=p,e[25]=r,e[26]=h):h=e[26],h}const g=m;if(g?.success&&(g.status==="created"||g.status==="joined"||g.status==="already_has_organization")&&g.organization){let r;return e[27]!==g.organization||e[28]!==t?(r=n.jsx(re,{org:g.organization,initialSiteUrl:t}),e[27]=g.organization,e[28]=t,e[29]=r):r=e[29],r}if(g?.status==="ambiguous"&&g.organizations&&g.organizations.length>0){let r;e[30]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(k,{title:"Escolha uma organização",description:"Seu e-mail pode acessar mais de uma organização. Escolha onde a configuração de commerce deve continuar."}),e[30]=r):r=e[30];const h=g.domain??void 0;let C;e[31]!==s||e[32]!==t?(C=($,P)=>{Le(),o({...$,slug:P}),s({to:"/commerce-onboarding",search:{org:P,siteUrl:t}})},e[31]=s,e[32]=t,e[33]=C):C=e[33];let O;return e[34]!==g.organizations||e[35]!==h||e[36]!==C?(O=n.jsx(R,{children:n.jsxs("div",{className:"grid gap-10",children:[r,n.jsx(Ne,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:n.jsx(Re,{organizations:g.organizations,domain:h,onJoined:C})})]})}),e[34]=g.organizations,e[35]=h,e[36]=C,e[37]=O):O=e[37],O}const S=g?.error??"Não conseguimos determinar uma organização de commerce para esta conta.";let _;e[38]!==p?(_=()=>{d(null),p.reset()},e[38]=p,e[39]=_):_=e[39];let I;return e[40]!==S||e[41]!==_?(I=n.jsx(ae,{title:"O onboarding de commerce precisa de suporte",description:S,actionLabel:"Tentar novamente",onRetry:_}),e[40]=S,e[41]=_,e[42]=I):I=e[42],I}async function ct(){const e=await(await fetch("/api/auth/custom/ensure-organization",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).json();return e.success&&(e.status==="created"||e.status==="joined"||e.status==="already_has_organization")&&e.organization&&Le(),e}function mt(l){return{id:l.id,name:l.name,slug:l.slug,logo:l.logo??null}}function dt(l){const e=E.c(7),{mutation:i,onRetry:t}=l,s=M.useRef(!1);let c;e[0]!==i?(c=d=>{!d||s.current||(s.current=!0,i.mutate())},e[0]=i,e[1]=c):c=e[1];const a=c;if(i.error){let d;return e[2]!==t?(d=n.jsx(ae,{title:"Onboarding de commerce indisponível",description:"Não foi possível preparar uma organização para a configuração de commerce. Tente novamente por esta página ou fale com o suporte.",actionLabel:"Tentar novamente",onRetry:t}),e[2]=t,e[3]=d):d=e[3],d}let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ye,{variant:"generic"}),e[4]=o):o=e[4];let m;return e[5]!==a?(m=n.jsx(R,{children:n.jsx("div",{ref:a,children:o})}),e[5]=a,e[6]=m):m=e[6],m}function k(l){const e=E.c(8),{title:i,description:t}=l,s=$e();let c;e[0]!==s?(c=s?n.jsx(Pe,{host:s}):n.jsxs("div",{children:[n.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),n.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=s,e[1]=c):c=e[1];let a;e[2]!==t||e[3]!==i?(a=(i||t)&&n.jsxs("div",{className:"space-y-2",children:[i&&n.jsx("h1",{className:"text-2xl font-medium leading-8",children:i}),t&&n.jsx("p",{className:"text-base text-muted-foreground leading-6",children:t})]}),e[2]=t,e[3]=i,e[4]=a):a=e[4];let o;return e[5]!==c||e[6]!==a?(o=n.jsxs("div",{className:"grid gap-10",children:[c,a]}),e[5]=c,e[6]=a,e[7]=o):o=e[7],o}function ae(l){const e=E.c(9),{title:i,description:t,actionLabel:s,onRetry:c}=l;let a;e[0]!==t||e[1]!==i?(a=n.jsx(k,{title:i,description:t}),e[0]=t,e[1]=i,e[2]=a):a=e[2];let o;e[3]!==s||e[4]!==c?(o=n.jsx(je,{type:"button",size:"xl",className:"w-full",onClick:c,children:s}),e[3]=s,e[4]=c,e[5]=o):o=e[5];let m;return e[6]!==a||e[7]!==o?(m=n.jsx(R,{children:n.jsxs("div",{className:"grid gap-10",children:[a,o]})}),e[6]=a,e[7]=o,e[8]=m):m=e[8],m}function re(l){const e=E.c(11),{org:i,initialSiteUrl:t}=l,{data:s}=Se.useSession(),c=s?.user?.email;let a;e[0]!==t||e[1]!==c?(a=Ce({siteUrl:t,email:c}),e[0]=t,e[1]=c,e[2]=a):a=e[2];const o=a;let m;e[3]!==o||e[4]!==i.id?(m=n.jsx(be,{href:o,orgId:i.id}),e[3]=o,e[4]=i.id,e[5]=m):m=e[5];const d=m;let u;return e[6]!==t||e[7]!==d||e[8]!==i||e[9]!==s?.user?.email?(u=n.jsx(He,{children:v=>{const{reset:p}=v;return n.jsx(Ve,{fallback:j=>{const{error:g,resetError:S}=j;return n.jsx(R,{visual:d,children:n.jsx(ut,{orgName:i.name,message:g instanceof Error?g.message:"Não foi possível verificar a configuração do Commerce Discovery.",onRetry:()=>{p(),S()}})})},children:n.jsx(M.Suspense,{fallback:n.jsx(ke,{visual:d}),children:n.jsx(ft,{org:i,initialSiteUrl:t,sessionEmail:s?.user?.email},`${i.id}:${t??""}`)})})}}),e[6]=t,e[7]=d,e[8]=i,e[9]=s?.user?.email,e[10]=u):u=e[10],u}function ke(l){const e=E.c(3),{visual:i}=l;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[n.jsx(k,{}),n.jsx(we,{})]}),e[0]=t):t=e[0];let s;return e[1]!==i?(s=n.jsx(R,{align:"fill",visual:i,children:t}),e[1]=i,e[2]=s):s=e[2],s}function ut(l){const e=E.c(10),{orgName:i,message:t,onRetry:s}=l,c=`A configuração de commerce continuará em ${i}.`;let a;e[0]!==c?(a=n.jsx(k,{title:"Diagnóstico de commerce",description:c}),e[0]=c,e[1]=a):a=e[1];let o;e[2]!==t?(o=n.jsx(le,{message:t}),e[2]=t,e[3]=o):o=e[3];let m;e[4]!==s?(m=n.jsx(je,{type:"button",size:"xl",className:"w-full",onClick:s,children:"Tentar novamente"}),e[4]=s,e[5]=m):m=e[5];let d;return e[6]!==a||e[7]!==o||e[8]!==m?(d=n.jsxs("div",{className:"grid gap-10",children:[a,o,m]}),e[6]=a,e[7]=o,e[8]=m,e[9]=d):d=e[9],d}function ft(l){const e=E.c(109),{org:i,initialSiteUrl:t,sessionEmail:s}=l;let c;e[0]!==i.id||e[1]!==i.slug?(c={connectionId:Xe,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=c):c=e[2];const a=Je(c),[o,m]=M.useState(t??""),[d,u]=M.useState(null),v=M.useRef(!1),p=Ze.COMMERCE_DISCOVERY(i.id),j=et(i.id),g=_e.commerceDiscoveryConnection(i.id,p);let S;e[3]!==p||e[4]!==a?(S=async()=>{const f=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:p}});return xe(f)},e[3]=p,e[4]=a,e[5]=S):S=e[5];let _;e[6]!==g||e[7]!==S?(_={queryKey:g,queryFn:S,retry:!1},e[6]=g,e[7]=S,e[8]=_):_=e[8];const I=Ue(_),r=_e.commerceDiscoveryVirtualMcp(i.id,j);let h;e[9]!==a||e[10]!==j?(h=async()=>{const f=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:j}});return xe(f)},e[9]=a,e[10]=j,e[11]=h):h=e[11];let C;e[12]!==r||e[13]!==h?(C={queryKey:r,queryFn:h,retry:!1},e[12]=r,e[13]=h,e[14]=C):C=e[14];const O=Ue(C);let $;e[15]!==a?($=async f=>{const x=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:f}});return xe(x)},e[15]=a,e[16]=$):$=e[16];let P;e[17]!==I||e[18]!==i.id||e[19]!==O?(P=(f,x)=>{se("commerce_onboarding_setup_succeeded",{domain:ve(x)??void 0,organization_id:i.id}),u(null),I.refetch(),O.refetch()},e[17]=I,e[18]=i.id,e[19]=O,e[20]=P):P=e[20];let A;e[21]!==i.id?(A=(f,x)=>{se("commerce_onboarding_setup_failed",{domain:ve(x)??void 0,organization_id:i.id,error:f instanceof Error?f.message:String(f)}),u(f instanceof Error?f.message:"A configuração do Commerce Discovery falhou.")},e[21]=i.id,e[22]=A):A=e[22];let Q;e[23]!==A||e[24]!==$||e[25]!==P?(Q={mutationFn:$,retry:!1,onSuccess:P,onError:A},e[23]=A,e[24]=$,e[25]=P,e[26]=Q):Q=e[26];const b=Te(Q),Ae=!!I.data.item&&!!O.data.item,Ee=I.data.item,W=typeof Ee?.metadata?.siteUrl=="string"?Ee.metadata.siteUrl:void 0,ce=t||o||"";let G;e[27]!==W||e[28]!==ce?(G=Qe(ce,W),e[27]=W,e[28]=ce,e[29]=G):G=e[29];const Y=Ae&&G,J=t||o||W||"";let X;e[30]!==J||e[31]!==s?(X=Ce({siteUrl:J,email:s}),e[30]=J,e[31]=s,e[32]=X):X=e[32];const me=X;let Z;e[33]!==me||e[34]!==i.id?(Z=n.jsx(be,{href:me,orgId:i.id}),e[33]=me,e[34]=i.id,e[35]=Z):Z=e[35];const y=Z;let ee;e[36]!==b?(ee=f=>{const x=pe(f);if(!x.ok){u(Oe(x.error));return}u(null),b.mutate(x.value)},e[36]=b,e[37]=ee):ee=e[37];const D=ee;let te;e[38]!==t||e[39]!==D||e[40]!==Y?(te=f=>{!f||v.current||Y||!t||(v.current=!0,D(t))},e[38]=t,e[39]=D,e[40]=Y,e[41]=te):te=e[41];const de=te;let ie;e[42]!==i.id||e[43]!==D||e[44]!==o?(ie=f=>{f.preventDefault();const x=pe(o);x.ok&&se("commerce_onboarding_site_url_submitted",{domain:new URL(x.value).hostname,organization_id:i.id}),D(o)},e[42]=i.id,e[43]=D,e[44]=o,e[45]=ie):ie=e[45];const z=ie;if(Y){const f=i.slug;let x;e[46]===Symbol.for("react.memo_cache_sentinel")?(x=crypto.randomUUID(),e[46]=x):x=e[46];let T;e[47]!==i.slug?(T={org:f,taskId:x},e[47]=i.slug,e[48]=T):T=e[48];let U;e[49]!==i.id?(U=tt(i.id),e[49]=i.id,e[50]=U):U=e[50];const L=J||void 0;let N;e[51]!==U.id||e[52]!==L?(N={virtualmcpid:U.id,connect:"1",siteUrl:L},e[51]=U.id,e[52]=L,e[53]=N):N=e[53];let w;return e[54]!==T||e[55]!==N?(w=n.jsx(Be,{to:"/$org/$taskId",params:T,search:N,replace:!0}),e[54]=T,e[55]=N,e[56]=w):w=e[56],w}if(b.isPending){let f;return e[57]!==y?(f=n.jsx(ke,{visual:y}),e[57]=y,e[58]=f):f=e[58],f}if(t){let f,x;if(e[59]!==y||e[60]!==z||e[61]!==t||e[62]!==d||e[63]!==i.name||e[64]!==b.isPending||e[65]!==o){x=Symbol.for("react.early_return_sentinel");e:if(f=pe(t),!f.ok){const fe=`A configuração de commerce continuará em ${i.name}.`;let V;e[68]!==fe?(V=n.jsx(k,{title:"Diagnóstico de commerce",description:fe}),e[68]=fe,e[69]=V):V=e[69];const ge=n.jsx(le,{message:Oe(f.error)});let B;e[70]!==z||e[71]!==d||e[72]!==b.isPending||e[73]!==o?(B=n.jsx(he,{siteUrl:o,error:d,isSubmitting:b.isPending,onSiteUrlChange:m,onSubmit:z}),e[70]=z,e[71]=d,e[72]=b.isPending,e[73]=o,e[74]=B):B=e[74];let K;e[75]!==V||e[76]!==ge||e[77]!==B?(K=n.jsxs("div",{className:"grid gap-10",children:[V,ge,B]}),e[75]=V,e[76]=ge,e[77]=B,e[78]=K):K=e[78];let oe;e[79]!==y||e[80]!==K?(oe=n.jsx(R,{visual:y,children:K}),e[79]=y,e[80]=K,e[81]=oe):oe=e[81],x=oe;break e}e[59]=y,e[60]=z,e[61]=t,e[62]=d,e[63]=i.name,e[64]=b.isPending,e[65]=o,e[66]=f,e[67]=x}else f=e[66],x=e[67];if(x!==Symbol.for("react.early_return_sentinel"))return x;const T=`O Commerce Discovery está sendo preparado para ${f.value}.`;let U;e[82]!==T?(U=n.jsx(k,{title:"Diagnóstico de commerce",description:T}),e[82]=T,e[83]=U):U=e[83];let L;e[84]!==z||e[85]!==d||e[86]!==b.isPending||e[87]!==o?(L=d?n.jsxs(n.Fragment,{children:[n.jsx(le,{message:d}),n.jsx(he,{siteUrl:o,error:null,isSubmitting:b.isPending,onSiteUrlChange:m,onSubmit:z})]}):n.jsx(we,{}),e[84]=z,e[85]=d,e[86]=b.isPending,e[87]=o,e[88]=L):L=e[88];let N;e[89]!==U||e[90]!==L||e[91]!==de?(N=n.jsxs("div",{ref:de,className:"grid gap-10",children:[U,L]}),e[89]=U,e[90]=L,e[91]=de,e[92]=N):N=e[92];let w;return e[93]!==y||e[94]!==N?(w=n.jsx(R,{visual:y,children:N}),e[93]=y,e[94]=N,e[95]=w):w=e[95],w}const ue=`A configuração de commerce continuará em ${i.name}.`;let F;e[96]!==ue?(F=n.jsx(k,{title:"Diagnóstico de commerce",description:ue}),e[96]=ue,e[97]=F):F=e[97];let q;e[98]!==z||e[99]!==d||e[100]!==b.isPending||e[101]!==o?(q=n.jsx(he,{siteUrl:o,error:d,isSubmitting:b.isPending,onSiteUrlChange:m,onSubmit:z}),e[98]=z,e[99]=d,e[100]=b.isPending,e[101]=o,e[102]=q):q=e[102];let H;e[103]!==F||e[104]!==q?(H=n.jsxs("div",{className:"grid gap-10",children:[F,q]}),e[103]=F,e[104]=q,e[105]=H):H=e[105];let ne;return e[106]!==y||e[107]!==H?(ne=n.jsx(R,{visual:y,children:H}),e[106]=y,e[107]=H,e[108]=ne):ne=e[108],ne}function he(l){const e=E.c(20),{siteUrl:i,error:t,isSubmitting:s,onSiteUrlChange:c,onSubmit:a}=l;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:"URL do site"}),e[0]=o):o=e[0];let m;e[1]!==c?(m=_=>c(_.target.value),e[1]=c,e[2]=m):m=e[2];const d=!!t;let u;e[3]!==s||e[4]!==i||e[5]!==m||e[6]!==d?(u=n.jsx(Ye,{id:"commerce-site-url",type:"text",inputMode:"url",value:i,onChange:m,placeholder:"https://example.com","aria-invalid":d,disabled:s}),e[3]=s,e[4]=i,e[5]=m,e[6]=d,e[7]=u):u=e[7];let v;e[8]!==t?(v=t?n.jsx(le,{message:t}):null,e[8]=t,e[9]=v):v=e[9];let p;e[10]!==u||e[11]!==v?(p=n.jsxs("div",{className:"grid gap-2",children:[o,u,v]}),e[10]=u,e[11]=v,e[12]=p):p=e[12];let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(it,{size:16}),e[13]=j):j=e[13];let g;e[14]!==s?(g=n.jsxs(je,{type:"submit",size:"xl",className:"w-full",disabled:s,children:["Continuar",j]}),e[14]=s,e[15]=g):g=e[15];let S;return e[16]!==a||e[17]!==p||e[18]!==g?(S=n.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[p,g]}),e[16]=a,e[17]=p,e[18]=g,e[19]=S):S=e[19],S}function le(l){const e=E.c(2),{message:i}=l;let t;return e[0]!==i?(t=n.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:i}),e[0]=i,e[1]=t):t=e[1],t}export{Li as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as m}from"./extract-connection-data-
|
|
1
|
+
import{b as m}from"./extract-connection-data-J1VuF4OH.js";import{a as g}from"./github-repo-scope-DjMZbiKa.js";function I(n){const e=n.properties;if(!e)return[];const t=[];for(const[r,i]of Object.entries(e)){const a=i?.properties?.__type?.const;typeof a=="string"&&a.length>0&&t.push({fieldKey:r,bindingType:a})}return t}const N=[{fieldKey:"vtex",bindingType:"vtex"},{fieldKey:"ga4",bindingType:"google-analytics"},{fieldKey:"gsc",bindingType:"google-search-console"},{fieldKey:"github",bindingType:"github"}];function S(n,e){const t=[];if(n.length&&t.push({field:["id"],operator:"in",value:n}),e.length&&t.push({field:["name"],operator:"in",value:e}),t.length!==0)return t.length===1?t[0]:{operator:"or",conditions:t}}function w(n){const e=n;if(e.isError)throw new Error(e.content?.find(t=>t.text)?.text??"Tool call failed");return e.structuredContent??n}function R(n,e,t,r){return{...n??{},[e]:{__type:t,value:r}}}function p(n){return n==null?!1:typeof n=="string"?n.trim().length>0:typeof n=="number"||typeof n=="boolean"?!0:Array.isArray(n)?n.some(p):typeof n=="object"?Object.entries(n).some(([e,t])=>!e.startsWith("__")&&p(t)):!1}function h(n){const e={accountName:"Nome da conta",appKey:"App Key",appToken:"App Token",propertyId:"Propriedade",siteUrl:"Site"};return e[n]?e[n]:n.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}function b(n){return p(n)?typeof n=="string"?n.trim():typeof n=="number"||typeof n=="boolean"?String(n):JSON.stringify(n):null}function B(n){return n?Object.entries(n).flatMap(([e,t])=>{if(e.startsWith("__"))return[];const r=b(t);return r?[{key:e,label:h(e),value:r}]:[]}):[]}function O({autoOpenFieldKey:n,card:e}){return n===e.fieldKey&&e.satisfied&&!!e.linkedConnectionId}function _(n,e,t){const r=n.filter(i=>(i.app_name===e||!!t&&i.app_id===t)&&g(i)===null);return r.length===0?null:(r.sort((i,o)=>{const s=a=>a.status==="active"?0:1;return s(i)!==s(o)?s(i)-s(o):(o.updated_at??"").localeCompare(i.updated_at??"")}),r[0].id)}function C(n){return n.server?.icons?.[0]?.src??m(n.server?.repository)??null}function T(n,e){const t=n._meta?.["mcp.mesh"];return t?.friendlyName||t?.friendly_name||n.title||n.server?.title||n.server?.name||e}function E(n){const e=[],t=new Map(n.connections.map(r=>[r.id,r]));for(const r of n.requirements){const i=n.curated[r.bindingType],o=i?n.itemsById[i.registryAppId]:n.itemsByName[r.bindingType];if(!o)continue;const s=n.configurationState?.[r.fieldKey]?.value,a=s?t.get(s):void 0,u=s&&a?s:null,d=u?n.connectionReadiness?.[u]!==!1:!1,c=!!u&&d,l=c?void 0:n.saBindings?.[r.bindingType],f=c||!!l,y=c?"oauth":l?"sa":null;e.push({fieldKey:r.fieldKey,bindingType:r.bindingType,registryItem:o,title:T(o,r.bindingType),icon:C(o),headline:i?.headline??o._meta?.["mcp.mesh"]?.short_description??null,area:i?.area??null,bullets:i?.bullets??[],satisfied:f,candidateConnectionId:f?null:u||_(n.connections,r.bindingType,i?.registryAppId),linkedConnectionId:u,configurationState:a?.configuration_state??null,boundVia:y,boundResource:l?.resource??null})}return e}function U(n,e){if(!n)return null;const t=i=>{const o=i.startsWith("sc-domain:")?i.substring(10):(()=>{try{return new URL(i.startsWith("http")?i:`https://${i}`).hostname}catch{return null}})();return o===null?i:o.startsWith("www.")?o.substring(4):o},r=t(n);for(const i of e)if(t(i.siteUrl)===r)return i.siteUrl;return null}function W(n){return(n?.response?.accountSummaries??[]).map(r=>({account:r.account,options:(r.propertySummaries??[]).map(i=>({value:i.property,label:`${i.displayName} (${r.displayName})`}))}))}export{N as F,E as a,S as b,R as c,B as g,U as m,I as p,O as s,W as t,w as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as C,j as t,r as y,B as M,l as j}from"./index-DIPAEwLP.js";import{a as D,h as S,D as I,d as R,e as T}from"./dialog-BJfLYuit.js";import{u as _,S as A}from"./chat-context-BzTO5WN0.js";import{i as B}from"./ChevronUp-z2fewBpw.js";import{a as E}from"./Copy01-mdfV84Qi.js";function N(n){const e=C.c(3),{size:l}=n,o=l===void 0?16:l;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=i):i=e[0];let s;return e[1]!==o?(s=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:i}),e[1]=o,e[2]=s):s=e[2],s}function w(n){const e=C.c(3),{size:l}=n,o=l===void 0?16:l;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=i):i=e[0];let s;return e[1]!==o?(s=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:i}),e[1]=o,e[2]=s):s=e[2],s}const $={"claude-code":{label:"Claude Code",Icon:N},codex:{label:"Codex",Icon:w}};function Y(n){return(n&&$[n])??null}const L="bunx decocms@latest link",k=[{capability:"claude-code",label:"Claude Code",description:"Runs through the Claude Code CLI",icon:t.jsx(N,{size:18})},{capability:"codex",label:"Codex",description:"Runs through the Codex CLI",icon:t.jsx(w,{size:18})}];function q(n){return k.filter(e=>n.includes(e.capability)).map(e=>e.label)}function F(n){const e=C.c(23),{open:l,onOpenChange:o}=n;let i;e[0]!==l?(i={fast:l},e[0]=l,e[1]=i):i=e[1];const s=_(i),[h,v]=y.useState(!1),z=s.hostname??s.machineId??"Your desktop",g=s.online?`Connected to ${z}`:"Connect your desktop";let a;e[2]!==g?(a=t.jsx(D,{children:g}),e[2]=g,e[3]=a):a=e[3];const b=s.online?"This machine provides the following local agents.":"Run this command in your desktop terminal. The dialog will close once your desktop is online.";let c;e[4]!==b?(c=t.jsx(S,{children:b}),e[4]=b,e[5]=c):c=e[5];let r;e[6]!==a||e[7]!==c?(r=t.jsxs(I,{children:[a,c]}),e[6]=a,e[7]=c,e[8]=r):r=e[8];let d;e[9]!==h||e[10]!==s.online?(d=!s.online&&t.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[t.jsx("span",{className:"flex-1",children:L}),t.jsx(M,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(L),v(!0),setTimeout(()=>v(!1),1500)},children:h?t.jsx(B,{size:14}):t.jsx(E,{size:14})})]}),e[9]=h,e[10]=s.online,e[11]=d):d=e[11];let m;e[12]!==s.capabilities||e[13]!==s.online?(m=s.online?t.jsx("div",{className:"flex flex-col gap-3 text-sm",children:t.jsx("div",{className:"flex flex-col gap-2",children:k.map(x=>{const f=s.capabilities.includes(x.capability);return t.jsxs("div",{className:j("flex items-center gap-3 rounded-md border px-3 py-2",f?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[t.jsx("div",{className:j("flex size-6 items-center justify-center",f?"text-foreground":"text-muted-foreground"),children:x.icon}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium",children:x.label}),t.jsx("p",{className:"text-xs text-muted-foreground",children:f?x.description:"Not detected"})]}),t.jsx("span",{className:j("size-2 rounded-full",f?"bg-success":"bg-muted-foreground/30")})]},x.capability)})})}):t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsx(A,{size:"sm"}),"Waiting for desktop…"]}),e[12]=s.capabilities,e[13]=s.online,e[14]=m):m=e[14];let u;e[15]!==r||e[16]!==d||e[17]!==m?(u=t.jsxs(R,{className:"sm:max-w-md",children:[r,d,m]}),e[15]=r,e[16]=d,e[17]=m,e[18]=u):u=e[18];let p;return e[19]!==o||e[20]!==l||e[21]!==u?(p=t.jsx(T,{open:l,onOpenChange:o,children:u}),e[19]=o,e[20]=l,e[21]=u,e[22]=p):p=e[22],p}export{F as C,N as a,w as b,Y as l,q as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,C as $,aY as L,K as k,l as w,j as I}from"./index-
|
|
1
|
+
import{c as M,C as $,aY as L,K as k,l as w,j as I}from"./index-DIPAEwLP.js";import{u as D}from"./use-registry-connections-C5ZlG8AQ.js";import{d as K}from"./use-organization-settings-B5oAjTeU.js";import{S as E}from"./constants-BHDe7bIw.js";import{u as Q}from"./useInfiniteQuery-6TwOL6Xo.js";import{c as F}from"./use-mcp-client-jqf5Iy9F.js";import{i as H,f as Y}from"./extract-connection-data-J1VuF4OH.js";import{r as q,R as G}from"./retry-CErkP7V6.js";import{g as T}from"./connection-slug-eyAPH6o3.js";import{C as U}from"./card-f5iCgnuC.js";import{I as V}from"./integration-icon-BzIpy5hd.js";function fe(){const s=M.c(6),e=D(),t=K(),a=$().project.enabledPlugins??[];let o;if(s[0]!==a||s[1]!==t||s[2]!==e){let l;s[4]!==t?(l=r=>t(r.id),s[4]=t,s[5]=l):l=s[5],o=e.filter(l).map(X),a.includes("private-registry")&&t(E)&&o.push({id:E,title:"Private Registry",icon:null}),s[0]=a,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function X(s){return{id:s.id,title:s.title,icon:s.icon}}const z=24,_=3;function A(s){return s.id.includes("community-registry")}function B(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(a=>t.map(o=>({field:o,operator:"contains",value:a})))}}function S(s,e,t,a,o){const l=s.map(u=>u.id).sort().join(","),r=B(o),{data:p,fetchNextPage:d,hasNextPage:m,isFetchingNextPage:g,isLoading:C}=Q({queryKey:k.storeDiscovery(e,`${l}:${o??""}`),queryFn:async({pageParam:u})=>{const n=u??{};return await Promise.all(s.map(async i=>{const h=n[i.id];if(h==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=H(i.id,e);try{return await q(async()=>{let f=null;try{f=await F({connectionId:i.id,orgId:e,orgSlug:t});const x={limit:z};h&&(x.cursor=h),r&&(x.where=r);const N=await f.callTool({name:j,arguments:x}),v=N.structuredContent??N,P=v.nextCursor||v.cursor||void 0,b=Y(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:b,nextCursor:P}}finally{await f?.close().catch(()=>{})}},{maxAttempts:_,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(f){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${_} attempts:`,f instanceof G?f.cause:f),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:u=>{const n={};let c=!1;for(const i of u)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,c=!0):n[i.registryId]="EXHAUSTED");return c?n:void 0},staleTime:3600*1e3,placeholderData:L,retry:!1,enabled:s.length>0}),y=[];if(p?.pages)for(const u of p.pages)for(const n of u)for(const c of n.items)y.push({...c,_sourceName:c._sourceName??n.registryTitle,_sourceIcon:c._sourceIcon??n.registryIcon,_registryId:c._registryId??n.registryId});return{items:y,hasMore:m??!1,isLoadingMore:g,isInitialLoading:C,fetchNextPage:()=>{m&&!g&&d()}}}function me(s,e){const t=M.c(16),{org:a}=$();let o;t[0]!==s?(o=s.filter(Z),t[0]=s,t[1]=o):o=t[1];const l=o;let r;t[2]!==s?(r=s.filter(W),t[2]=s,t[3]=r):r=t[3];const p=r,d=S(l,a.id,a.slug,!0,e),m=S(p,a.id,a.slug,!0,e);let g;if(t[4]!==m.items||t[5]!==d.items){const h=new Set;g=[];const j=[...d.items,...m.items];for(const f of j){const x=`${f._registryId}:${f.id}`;h.has(x)||(h.add(x),g.push(f))}t[4]=m.items,t[5]=d.items,t[6]=g}else g=t[6];const C=d.isInitialLoading||m.isInitialLoading,y=d.isLoadingMore||m.isLoadingMore,u=d.hasMore||m.hasMore;let n;t[7]!==m||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),m.hasMore&&m.fetchNextPage()},t[7]=m,t[8]=d,t[9]=n):n=t[9];const c=n;let i;return t[10]!==u||t[11]!==C||t[12]!==y||t[13]!==g||t[14]!==c?(i={items:g,hasMore:u,isLoadingMore:y,isInitialLoading:C,loadMore:c},t[10]=u,t[11]=C,t[12]=y,t[13]=g,t[14]=c,t[15]=i):i=t[15],i}function W(s){return A(s)}function Z(s){return!A(s)}function de(s){const e=new Map;for(const o of s){const l=T(o),r=e.get(l);r?r.push(o):e.set(l,[o])}const t=[],a=new Set;for(const o of s){const l=T(o);if(a.has(l))continue;a.add(l);const r=e.get(l),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:l,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function pe(s){const e=M.c(37),{connection:t,onClick:a,headerActions:o,headerActionsAlwaysVisible:l,body:r,footer:p,className:d,fallbackIcon:m}=s,g=l===void 0?!1:l,C=a&&"hover:bg-muted/50";let y;e[0]!==d||e[1]!==C?(y=w("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",C,d),e[0]=d,e[1]=C,e[2]=y):y=e[2];let u;e[3]!==t.icon||e[4]!==t.title||e[5]!==m?(u=I.jsx(V,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:m}),e[3]=t.icon,e[4]=t.title,e[5]=m,e[6]=u):u=e[6];let n;e[7]!==o||e[8]!==g?(n=o&&I.jsx("div",{className:w("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:O,children:o}),e[7]=o,e[8]=g,e[9]=n):n=e[9];let c;e[10]!==n?(c=I.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=c):c=e[11];let i;e[12]!==u||e[13]!==c?(i=I.jsxs("div",{className:"flex items-start justify-between",children:[u,c]}),e[12]=u,e[13]=c,e[14]=i):i=e[14];let h;e[15]!==t.title?(h=I.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=h):h=e[16];const j=t.description||"No description";let f;e[17]!==j?(f=I.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=f):f=e[18];let x;e[19]!==f||e[20]!==h?(x=I.jsxs("div",{className:"flex flex-col gap-1",children:[h,f]}),e[19]=f,e[20]=h,e[21]=x):x=e[21];let N;e[22]!==r?(N=r&&I.jsx("div",{children:r}),e[22]=r,e[23]=N):N=e[23];let v;e[24]!==x||e[25]!==N||e[26]!==i?(v=I.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,x,N]}),e[24]=x,e[25]=N,e[26]=i,e[27]=v):v=e[27];let P;e[28]!==p?(P=p&&I.jsx("div",{className:"border-t border-border mt-auto",children:I.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:J,children:p})}),e[28]=p,e[29]=P):P=e[29];let b;e[30]!==v||e[31]!==P?(b=I.jsxs("div",{className:"flex flex-col flex-1",children:[v,P]}),e[30]=v,e[31]=P,e[32]=b):b=e[32];let R;return e[33]!==a||e[34]!==b||e[35]!==y?(R=I.jsx(U,{className:y,onClick:a,children:b}),e[33]=a,e[34]=b,e[35]=y,e[36]=R):R=e[36],R}function J(s){return s.stopPropagation()}function O(s){return s.stopPropagation()}export{pe as C,me as a,de as g,fe as u};
|