decocms 4.182.2 → 4.182.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BGrbeDYT.js → AlertCircle-BM-SGXEb.js} +1 -1
- package/dist/client/assets/{AreaChart-ChjS34cq.js → AreaChart-DYDhCZHa.js} +1 -1
- package/dist/client/assets/{ArrowUp-B7rh6W_b.js → ArrowUp-C8tFP7oQ.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-An4hbib7.js → ArrowUpRight-CYabXmbx.js} +1 -1
- package/dist/client/assets/{Check-DpoXXYhc.js → Check-Ba7uuiUv.js} +1 -1
- package/dist/client/assets/{CheckCircle-DI16N69_.js → CheckCircle-DqAwJ2kz.js} +1 -1
- package/dist/client/assets/{ChevronDown-BbcA24KM.js → ChevronDown-HBIiFunc.js} +1 -1
- package/dist/client/assets/{ChevronRight-BamDO5gK.js → ChevronRight-KgA6xHru.js} +1 -1
- package/dist/client/assets/{ChevronUp-HIfNhOKS.js → ChevronUp-De0pNXr0.js} +1 -1
- package/dist/client/assets/{Copy01-Bnz3Wx80.js → Copy01-DYlP_Xtq.js} +1 -1
- package/dist/client/assets/{CpuChip01-BShcbCHO.js → CpuChip01-DU2mm5Rx.js} +1 -1
- package/dist/client/assets/{CreditCard01-DNJmFfow.js → CreditCard01-BNQMzQ0s.js} +1 -1
- package/dist/client/assets/{DotsVertical-B_iya6B7.js → DotsVertical-DWkfCVOi.js} +1 -1
- package/dist/client/assets/{Eye-BjhopnZD.js → Eye-pZSN52Qe.js} +1 -1
- package/dist/client/assets/{FilterLines-H3se16dF.js → FilterLines-UMA3hIS0.js} +1 -1
- package/dist/client/assets/{HardDrive-Cc0iy42M.js → HardDrive-srCmcA0T.js} +1 -1
- package/dist/client/assets/{Key01-C21diL-t.js → Key01-Cme8uyqy.js} +1 -1
- package/dist/client/assets/{LayoutLeft-NGYALHZo.js → LayoutLeft-CxujHsXA.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BIYwVSjD.js → LinkExternal01-CQ9ayxbn.js} +1 -1
- package/dist/client/assets/{LogOut01-BYbHv1g4.js → LogOut01-1Wv_uc1f.js} +1 -1
- package/dist/client/assets/{Monitor01-PnI4BWSm.js → Monitor01-Dcr8x5_p.js} +1 -1
- package/dist/client/assets/{Palette-DqKGGY7c.js → Palette-C1hIu3Ny.js} +1 -1
- package/dist/client/assets/{Play-C6pKirQG.js → Play-S-SSyOWn.js} +1 -1
- package/dist/client/assets/{Plus-3NJoZ-Rn.js → Plus-BH5RlQYR.js} +1 -1
- package/dist/client/assets/{SearchLg-DUoOTY_-.js → SearchLg-ClGsPrv4.js} +1 -1
- package/dist/client/assets/{SearchMd-DZC0VFyz.js → SearchMd-CBT_BZMU.js} +1 -1
- package/dist/client/assets/{Settings02-K87UDDa_.js → Settings02-DAqQKtfC.js} +1 -1
- package/dist/client/assets/{Shield01-Dif9NKxP.js → Shield01-CBEZ92kQ.js} +1 -1
- package/dist/client/assets/{Star01-BWcFSKod.js → Star01-ybggVLHX.js} +1 -1
- package/dist/client/assets/{Stars01-DNjCGctC.js → Stars01-P8FnS4Ob.js} +1 -1
- package/dist/client/assets/{Stars02-CF9PavPD.js → Stars02-CwXREUM0.js} +1 -1
- package/dist/client/assets/{Sun-D_TMYzXg.js → Sun-C2vH3C3t.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Boo6w6_t.js → SwitchHorizontal01-wUPLzq-2.js} +1 -1
- package/dist/client/assets/{Tool01-BjfDVrJb.js → Tool01-EU3OKI0K.js} +1 -1
- package/dist/client/assets/{Tool02-df-j-2i7.js → Tool02-BLEoObxL.js} +1 -1
- package/dist/client/assets/{Trash01-BfrFYc0O.js → Trash01-Ck-P8aGE.js} +1 -1
- package/dist/client/assets/{TrendUp01-Bj5u2ghc.js → TrendUp01-Dnoj0uzg.js} +1 -1
- package/dist/client/assets/{Upload01-DGoH2Bw8.js → Upload01-BfzUamTH.js} +1 -1
- package/dist/client/assets/{User01-PHqRfaY2.js → User01-nRScdv2C.js} +1 -1
- package/dist/client/assets/{Users01-CeRMXGJo.js → Users01-DkQNBnK5.js} +1 -1
- package/dist/client/assets/{Users03-Cwqfteu1.js → Users03-CQVGNtmL.js} +1 -1
- package/dist/client/assets/{X-D0lgdZFx.js → X-FgZ-pUjZ.js} +1 -1
- package/dist/client/assets/{XCircle-BEfRA2Fy.js → XCircle-BthmWHMF.js} +1 -1
- package/dist/client/assets/{XClose-Ca9PFBA7.js → XClose-BaQnC9xI.js} +1 -1
- package/dist/client/assets/{Zap-Cd4akcPN.js → Zap-Be3onl5O.js} +1 -1
- package/dist/client/assets/{ZapSquare-2syNvY2F.js → ZapSquare-BMfQVTWg.js} +1 -1
- package/dist/client/assets/{access-gate-BXHarpej.js → access-gate-B1fbLcF-.js} +1 -1
- package/dist/client/assets/{add-section-modal-BtHF1Suz.js → add-section-modal-CTZrDcA0.js} +1 -1
- package/dist/client/assets/{agent-icon-CQRHN6rX.js → agent-icon-pCvoZl7q.js} +1 -1
- package/dist/client/assets/{agents-list-CwubhMUP.js → agents-list-eAJyi60W.js} +1 -1
- package/dist/client/assets/ai-providers-BWmz1gl9.js +1 -0
- package/dist/client/assets/{alert-Ig9SrjcF.js → alert-Dze3H8i7.js} +1 -1
- package/dist/client/assets/{alert-dialog-CWFjoJjX.js → alert-dialog-BlzJaa8V.js} +3 -3
- package/dist/client/assets/app-editor-DtrghDIo.js +1 -0
- package/dist/client/assets/{auth-av09Sk0f.js → auth-Dt1FgVt-.js} +1 -1
- package/dist/client/assets/{auth-catchall-DWcWxlY6.js → auth-catchall-C5_B1j2M.js} +1 -1
- package/dist/client/assets/{auth-entry-DOdCfRAO.js → auth-entry-DjciHJhD.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CIY4l9vm.js → auth-split-layout-B1xiK1IR.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CCHy3FzA.js → authenticate-and-persist-oauth-Cviuo8Q1.js} +1 -1
- package/dist/client/assets/{automation-list-row-CYmqpjOL.js → automation-list-row-dID9AHRm.js} +1 -1
- package/dist/client/assets/{automation-runs-D9S7Bj8t.js → automation-runs-C26JppiE.js} +1 -1
- package/dist/client/assets/{automations-g7LGm5hd.js → automations-BwdK--b_.js} +1 -1
- package/dist/client/assets/{avatar-I17szs3Q.js → avatar-DBrhL9V4.js} +1 -1
- package/dist/client/assets/{badge-1BKF0WjP.js → badge-BPApNEJW.js} +1 -1
- package/dist/client/assets/{billing-EZuyPlZX.js → billing-DN_RKE40.js} +1 -1
- package/dist/client/assets/{block-document-CrI42xhd.js → block-document-COs5H44P.js} +1 -1
- package/dist/client/assets/brand-context-B21j0sN5.js +1 -0
- package/dist/client/assets/{buckets-BjM-OEVV.js → buckets-KFhlHBlo.js} +1 -1
- package/dist/client/assets/bulk-category-panel-BADEHzYq.js +1 -0
- package/dist/client/assets/{calendar-ihm97ng4.js → calendar-BiblfYM2.js} +1 -1
- package/dist/client/assets/{capability-load-error-CdiziQNa.js → capability-load-error-tHIiKLCL.js} +1 -1
- package/dist/client/assets/{card-ZgfbVCh9.js → card-BJHBJJ4x.js} +1 -1
- package/dist/client/assets/category-editor-BbU-DL0t.js +1 -0
- package/dist/client/assets/chat-context-9UcSKOjs.js +35 -0
- package/dist/client/assets/{checkbox-CQ_C4vJL.js → checkbox-oKwqtltS.js} +1 -1
- package/dist/client/assets/{cli-auth-success-SOuYeldg.js → cli-auth-success-a3-XozgM.js} +1 -1
- package/dist/client/assets/collection-detail-5pOQoZmb.js +1 -0
- package/dist/client/assets/{collection-display-button-sALJ24Pj.js → collection-display-button-DdQrDX38.js} +1 -1
- package/dist/client/assets/{collection-search-Bxz23u0F.js → collection-search-B2Rk2PFz.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Dl8DuNBG.js → collection-table-wrapper-CplGLCMf.js} +1 -1
- package/dist/client/assets/{collection-tabs-DJww20x9.js → collection-tabs-CjcZDKY1.js} +1 -1
- package/dist/client/assets/{command-bMsQFALP.js → command-BWXao0AD.js} +1 -1
- package/dist/client/assets/commerce-onboarding-Duhp8l88.js +1 -0
- package/dist/client/assets/{companions-core-DYxPDPJ-.js → companions-core-CPhEHg4n.js} +1 -1
- package/dist/client/assets/{connect-BS6fJ7Zh.js → connect-BElMRnN7.js} +1 -1
- package/dist/client/assets/connection-BrMDIb7a.js +1 -0
- package/dist/client/assets/{connection-card-Di6_Srf0.js → connection-card-D3Ty6JhX.js} +1 -1
- package/dist/client/assets/connection-detail-B1lHIVaD.js +1 -0
- package/dist/client/assets/connection-form-helpers-W-T5Qfdj.js +1 -0
- package/dist/client/assets/connections-Cog9YU6X.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-CsSaGM07.js → decopilot-sse-pool-CuLfeITa.js} +1 -1
- package/dist/client/assets/{dialog-DFfWjXhn.js → dialog-CfCzKpCQ.js} +1 -1
- package/dist/client/assets/{domain-settings-I5C-7sNQ.js → domain-settings-BnkZQdlv.js} +1 -1
- package/dist/client/assets/{drawer-CjxVq45y.js → drawer-DsKBdrka.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DNVNevD7.js → dropdown-menu-BOsjh_jP.js} +1 -1
- package/dist/client/assets/{empty-state-BkAQUfnz.js → empty-state-D4Mka2Gg.js} +1 -1
- package/dist/client/assets/{extract-connection-data-D8g8Vhah.js → extract-connection-data-i2ZtRXrE.js} +1 -1
- package/dist/client/assets/file-explorer-NVFTJ0Q2.js +2 -0
- package/dist/client/assets/{form-Cy7Rd3TL.js → form-YDRn1yMf.js} +1 -1
- package/dist/client/assets/general-BvalpXOJ.js +1 -0
- package/dist/client/assets/{github-repo-picker-CKQYOUVF.js → github-repo-picker-CnMxEVo7.js} +1 -1
- package/dist/client/assets/{hooks-BYQbPRxe.js → hooks-BXNVyGlx.js} +5 -5
- package/dist/client/assets/{index-SVAVudgF.js → index-B5nVELgB.js} +1 -1
- package/dist/client/assets/{index-DW2rv6fU.js → index-BipvzcTH.js} +1 -1
- package/dist/client/assets/{index-BZsTAPza.js → index-BomFvFPo.js} +1 -1
- package/dist/client/assets/{index-4j84p8Zm.js → index-CdrwyuqH.js} +1 -1
- package/dist/client/assets/{index-C6AlWcn2.js → index-CgMf7tuL.js} +1 -1
- package/dist/client/assets/{index-geMXTkeP.js → index-CuR236Ha.js} +6 -6
- package/dist/client/assets/{index-Dyyz80fH.js → index-D-fArWDJ.js} +3 -3
- package/dist/client/assets/{index-DnUHHdy9.js → index-Dg4zAJRj.js} +1 -1
- package/dist/client/assets/{index-gWiN9Hkl.js → index-FYnRX-lh.js} +1 -1
- package/dist/client/assets/{index-y45nRZhN.js → index-FkDswteF.js} +36 -36
- package/dist/client/assets/{index-B1Swgh1Q.js → index-nNOweqCJ.js} +1 -1
- package/dist/client/assets/{index-redirect-tLRs_ohU.js → index-redirect-DKJKnP-Y.js} +1 -1
- package/dist/client/assets/index-vC9isNVZ.js +1 -0
- package/dist/client/assets/{input-i4x2nRXJ.js → input-LqGTjd_-.js} +1 -1
- package/dist/client/assets/{integration-icon-G3CkJMl-.js → integration-icon-By0eBeMX.js} +1 -1
- package/dist/client/assets/invite-member-dialog-nMmKi1Dw.js +1 -0
- package/dist/client/assets/{label-cSCv6rYO.js → label-DbueIBWh.js} +1 -1
- package/dist/client/assets/{layout-Dc_sBLyQ.js → layout-DkyHBIiM.js} +1 -1
- package/dist/client/assets/{login-BiKFzoUX.js → login-yg0l5NxL.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Dv6Uhpr5.js → mcp-oauth-D9FdzYSb.js} +1 -1
- package/dist/client/assets/{members-50SkOm91.js → members-DV3QjDmp.js} +1 -1
- package/dist/client/assets/{monaco-editor-DNmyyJIn.js → monaco-editor-B-w0IDRi.js} +4 -4
- package/dist/client/assets/{monitoring-stats-row-C66zfOZ2.js → monitoring-stats-row-CG62KH3t.js} +1 -1
- package/dist/client/assets/{multi-select-JtlKk2T8.js → multi-select-B4U1aQtZ.js} +1 -1
- package/dist/client/assets/{oauth-callback-BOmgYt-J.js → oauth-callback-BCCteQuS.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-D-bUKmX5.js → oauth-callback-ai-provider-DizT_DDE.js} +1 -1
- package/dist/client/assets/{onboarding-Dd0xJ_jB.js → onboarding-Dw0tVWUj.js} +1 -1
- package/dist/client/assets/{org-layout-Cyx2dswG.js → org-layout-DgqNNUZG.js} +1 -1
- package/dist/client/assets/{organization-choice-Dmy0N3Ho.js → organization-choice-B6rLkOvV.js} +1 -1
- package/dist/client/assets/{orgs-c3mClxSP.js → orgs-Dp947FAc.js} +1 -1
- package/dist/client/assets/{page-seo-form-CT7Q9nSJ.js → page-seo-form-C22dOH9p.js} +1 -1
- package/dist/client/assets/{popover-i4jezHIh.js → popover-CSaBs6px.js} +1 -1
- package/dist/client/assets/post-editor-CmIraKOU.js +1 -0
- package/dist/client/assets/{primitives-DONjjQ2v.js → primitives-DReuS7-5.js} +1 -1
- package/dist/client/assets/profile-BeKnbyDV.js +1 -0
- package/dist/client/assets/project-app-view-BsOej2W7.js +1 -0
- package/dist/client/assets/record-editor-D37l3YDB.js +1 -0
- package/dist/client/assets/redirect-editor-DJ5p8874.js +1 -0
- package/dist/client/assets/registry-BEudubyl.js +2 -0
- package/dist/client/assets/{registry-layout-f4c_WFt1.js → registry-layout-BnwCKqme.js} +1 -1
- package/dist/client/assets/{reports-CVDl7DQS.js → reports-BIMhh0lR.js} +1 -1
- package/dist/client/assets/{require-capability-6g_AHVvS.js → require-capability-BCSk620c.js} +1 -1
- package/dist/client/assets/{required-auth-layout-S0YtLBA5.js → required-auth-layout-BldmHV1q.js} +1 -1
- package/dist/client/assets/{reset-password-mvh2Bp76.js → reset-password-Bj8xjDsK.js} +1 -1
- package/dist/client/assets/roles-BfaqUbgp.js +1 -0
- package/dist/client/assets/{search-input-B-QuRigZ.js → search-input-Cz2eXhKE.js} +1 -1
- package/dist/client/assets/{secrets-DJdQx2SE.js → secrets-ovo_ybci.js} +1 -1
- package/dist/client/assets/sections-editor-C0_eGi1I.js +2 -0
- package/dist/client/assets/{select-model-BNaO-ex3.js → select-model-BnIVEhH-.js} +1 -1
- package/dist/client/assets/{select-D6zOoh5E.js → select-xvceoYep.js} +1 -1
- package/dist/client/assets/self-tool-result-DmMSQVL1.js +1 -0
- package/dist/client/assets/seo-editor-FY39F5Zk.js +1 -0
- package/dist/client/assets/{settings-layout-DhZgaTMP.js → settings-layout-BdGkfwA7.js} +1 -1
- package/dist/client/assets/{settings-section-jz9Avb_j.js → settings-section-EiAJkJ4N.js} +1 -1
- package/dist/client/assets/{shell-controls-Cp2LM0mr.js → shell-controls-iIBr8owK.js} +1 -1
- package/dist/client/assets/{shell-layout-D82GP0rP.js → shell-layout-DAJjI3Rs.js} +1 -1
- package/dist/client/assets/{sidebar-cviY2JKt.js → sidebar-BNKxKPMZ.js} +1 -1
- package/dist/client/assets/{skeleton-BnFORNZa.js → skeleton-DD7HtFsn.js} +1 -1
- package/dist/client/assets/{spinner-CkuCAiR1.js → spinner-LLDWVi4B.js} +1 -1
- package/dist/client/assets/{sso-De3-zYaW.js → sso-C8n1roGv.js} +1 -1
- package/dist/client/assets/{store-4sYEV7M-.js → store-Bwa_zaIs.js} +1 -1
- package/dist/client/assets/store-registry-DRTmI88U.js +2 -0
- package/dist/client/assets/{studio-tools-DH0-34Hv.js → studio-tools-BYaak_qp.js} +1 -1
- package/dist/client/assets/{switch-D2uF_EAp.js → switch-Bv-DzHZm.js} +1 -1
- package/dist/client/assets/{tab-id-VDxePu-8.js → tab-id-DxuL0R1D.js} +1 -1
- package/dist/client/assets/{table-D5WR7hLa.js → table-F2bqjmIf.js} +1 -1
- package/dist/client/assets/{tabs-CqBl7afq.js → tabs-CQao0ox2.js} +1 -1
- package/dist/client/assets/{textarea-Bn6hQ_Qz.js → textarea-z_orS_CZ.js} +1 -1
- package/dist/client/assets/{toggle-group-D7y3Qsoq.js → toggle-group-Bzyo3xHp.js} +1 -1
- package/dist/client/assets/{toolbar-CpuC8NsW.js → toolbar-BVAdvNw9.js} +1 -1
- package/dist/client/assets/{tooltip-BrF3GD_a.js → tooltip-DfT6t3c6.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CaSDpPjb.js → use-ai-providers-D8p0kIkX.js} +1 -1
- package/dist/client/assets/{use-automations-mCzD08OY.js → use-automations-CDsgMRs6.js} +1 -1
- package/dist/client/assets/{use-autosave-Dys6xriZ.js → use-autosave-B5tSUOVj.js} +1 -1
- package/dist/client/assets/{use-capability-Cpe_qvZ_.js → use-capability-BracbdOf.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CAblMTwd.js → use-clock-tick-BtQZuBEv.js} +1 -1
- package/dist/client/assets/{use-connection-B7cDwiOJ.js → use-connection-CTR51WTv.js} +1 -1
- package/dist/client/assets/{use-copy-r5QxG4Uf.js → use-copy-4XdNBPba.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DcGH_7kD.js → use-create-virtual-mcp-DFC7TtKc.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-9sjmxrz4.js → use-debounced-autosave-YzTmmlaq.js} +1 -1
- package/dist/client/assets/{use-debounced-value-LrUb7eiJ.js → use-debounced-value-Qlcgz1AF.js} +1 -1
- package/dist/client/assets/use-deco-credits-B-wNnK5K.js +1 -0
- package/dist/client/assets/{use-decopilot-events-up5oIRDt.js → use-decopilot-events-B4kpfqJ7.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B8yeqLKN.js → use-delete-connection-okh1cmv0.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-nCX9A08B.js → use-deployment-admin-CNSUDbCN.js} +1 -1
- package/dist/client/assets/{use-file-configs-1vs3YVUZ.js → use-file-configs-2U32aFAz.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CNsERN2g.js → use-infinite-scroll-fW1mUk4z.js} +1 -1
- package/dist/client/assets/{use-join-requests-6lnToRtO.js → use-join-requests-COJHDZ9A.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BBl5zme6.js → use-mcp-client-Ldih0CNF.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BKtLcTYP.js → use-mcp-tools-De1Z4Bsb.js} +1 -1
- package/dist/client/assets/{use-members-stYO4DxP.js → use-members-D_Pos6TA.js} +1 -1
- package/dist/client/assets/{use-mobile-DMoYecwn.js → use-mobile-CD2TR_Uh.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-ABFR-14c.js → use-navigate-to-agent-BtCzuuMV.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-DU9jxy0C.js → use-open-billing-url-nHUE4wFt.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DoX1JG5g.js → use-org-auth-client-Dyc7d6wo.js} +1 -1
- package/dist/client/assets/{use-org-sso-BVhPMS3K.js → use-org-sso-18zw8l-m.js} +1 -1
- package/dist/client/assets/{use-organization-roles-A2d2BvKK.js → use-organization-roles-CuORVghr.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DhcL4nY9.js → use-organization-settings-HM-EDIrS.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BoF5es5w.js → use-registry-connections-_l7hkNKl.js} +1 -1
- package/dist/client/assets/{use-secrets-BmzIH3vm.js → use-secrets-BREYbuXr.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DCcIH0HO.js → use-status-sounds-BbJ_tjn4.js} +1 -1
- package/dist/client/assets/{use-tags-B8ASGI2M.js → use-tags-CMzXMjhv.js} +1 -1
- package/dist/client/assets/{use-view-mode-xB_4AhUq.js → use-view-mode-c6O3y5le.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CEV_ngrf.js → use-virtual-mcp-OghGCAy2.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BLssOond.js +1 -0
- package/dist/client/assets/{useRouterState-CZMj98pk.js → useRouterState-BxlLoYvq.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CABVQKcm.js +1 -0
- package/dist/client/assets/{users-CONOx6T6.js → users-CpFnJ49C.js} +1 -1
- package/dist/client/assets/{variant-calendar-E6f23yio.js → variant-calendar-CbQak9Hl.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DM6n_Ydg.js → view-mode-toggle-Z24MHOHM.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-BpVENL06.js +0 -1
- package/dist/client/assets/app-editor-B5H5-F8S.js +0 -1
- package/dist/client/assets/brand-context-DVPmwhF3.js +0 -1
- package/dist/client/assets/bulk-category-panel-USUYO_mP.js +0 -1
- package/dist/client/assets/category-editor-DQSbFl5w.js +0 -1
- package/dist/client/assets/chat-context-Duovvv_d.js +0 -35
- package/dist/client/assets/collection-detail-Fz2npTpx.js +0 -1
- package/dist/client/assets/commerce-onboarding-orMZD5VK.js +0 -1
- package/dist/client/assets/connection-CSUNWBHY.js +0 -1
- package/dist/client/assets/connection-detail-XkeoVAsF.js +0 -1
- package/dist/client/assets/connection-form-helpers-Dl1KTkNE.js +0 -1
- package/dist/client/assets/connections-3_b1sdLg.js +0 -1
- package/dist/client/assets/file-explorer-DjVkaNg4.js +0 -2
- package/dist/client/assets/general-CWjnB8Qn.js +0 -1
- package/dist/client/assets/index-a5f43C0l.js +0 -1
- package/dist/client/assets/invite-member-dialog-Bp5nMnrA.js +0 -1
- package/dist/client/assets/post-editor-ITfNNH8c.js +0 -1
- package/dist/client/assets/profile-CJ18mI2I.js +0 -1
- package/dist/client/assets/project-app-view-BEATiNjk.js +0 -1
- package/dist/client/assets/record-editor-CxzRU1Mb.js +0 -1
- package/dist/client/assets/redirect-editor-DmlZU7UI.js +0 -1
- package/dist/client/assets/registry-DHRSWQvL.js +0 -2
- package/dist/client/assets/roles-BDap8m-X.js +0 -1
- package/dist/client/assets/sections-editor-W06wfa9f.js +0 -2
- package/dist/client/assets/self-tool-result-Bjd_Fo-p.js +0 -1
- package/dist/client/assets/seo-editor-DKX2y5cI.js +0 -1
- package/dist/client/assets/store-registry-BKTzIEg1.js +0 -2
- package/dist/client/assets/use-deco-credits-Dp43HFr7.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BI-Ge-Y8.js +0 -1
- package/dist/client/assets/useQueries-d_0_L-iH.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-9ztDghoj.js +0 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import{Z as S,_ as C,a4 as J,$ as i,a0 as ue,a3 as Ie,aG as Ce,cw as wt,bj as qe,b8 as ct,c as ie,J as dt,u as Be,o as He,F as ee,K as de,t as ce,I as be,G as ge,d as ut,f as It,r as v,n as Mt,e as Tt,j as Me,b as De,a as Ct,v as At,a8 as Pt,p as _t}from"./index-CuR236Ha.js";import{d as Rt,s as Et,A as pt,t as Dt,u as $t,o as Ut,w as Ot}from"./tab-id-DxuL0R1D.js";import{S as Lt,s as Nt,u as Ft,f as qt,i as jt,b as Vt}from"./hooks-BXNVyGlx.js";import{u as Bt}from"./use-is-desktop-app-BNujXJc_.js";import{a as Ht,u as Kt,S as Qt}from"./use-mcp-client-Ldih0CNF.js";import{u as Wt}from"./use-virtual-mcp-OghGCAy2.js";import{u as ht,p as Gt,b as xe,i as zt,c as Xt}from"./use-ai-providers-D8p0kIkX.js";import{u as Zt}from"./use-decopilot-events-B4kpfqJ7.js";import{u as Yt,c as Jt}from"./studio-tools-BYaak_qp.js";import{b as en}from"./use-organization-settings-HM-EDIrS.js";const we=S({connection_id:i().describe("Connection ID"),selected_tools:C(i()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:C(i()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:C(i()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),mt=we.extend({selected_tools:we.shape.selected_tools.optional(),selected_resources:we.shape.selected_resources.optional(),selected_prompts:we.shape.selected_prompts.optional()}),tn=S({connectionId:i(),toolName:i(),label:i(),icon:i().nullable().optional()}),nn=S({id:i().describe("Stable id; used as React key and ?tab= value"),title:i().describe("Tab label"),icon:i().optional().describe("Optional lucide icon name"),view:S({type:qe("ext-app"),appId:i(),args:Ie(i(),ct()).optional()})}),sn=S({defaultMainView:S({type:i(),id:i().optional(),toolName:i().optional()}).nullable().optional(),chatDefaultOpen:J().nullable().optional(),cmsDefaultOpen:J().nullable().optional(),tabs:C(nn).optional()}),st=S({tileId:i().optional(),connectionId:i().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:i().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:i().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:Ie(i(),ct()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:Ce().int().positive().optional(),maxHeight:Ce().int().positive().optional()}),Ke=S({banner:i().nullable().optional(),bannerColor:i().nullable().optional(),icon:i().nullable().optional(),themeColor:i().nullable().optional(),pinnedViews:C(tn).nullable().optional(),layout:sn.nullable().optional(),homeTile:st.nullable().optional(),homeTiles:C(st).nullable().optional(),homePrompts:C(i()).nullable().optional()});function ms(t){const e=t?.homeTiles;if(Array.isArray(e)&&e.length>0)return e;const n=t?.homeTile;return n?[n]:[]}const on=/^[A-Za-z_][A-Za-z0-9_]*$/,ot=i().min(1).regex(on,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),an=wt("kind",[S({key:ot,kind:qe("literal"),value:i()}),S({key:ot,kind:qe("secret"),secretId:i().min(1)})]),rn=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/,ln=S({host:i().min(1).regex(rn).describe("Submodule host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:i().min(1).describe("Vault secret id holding the PAT used to fetch this host.")}),Qe=S({selected:i().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:i().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:i().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),env:C(an).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config."),submoduleCredentials:C(ln).nullable().optional().describe("Git submodule credentials injected on every SANDBOX_START. Each entry maps a host to a vault secret (PAT) that Studio resolves before posting /_sandbox/config; the daemon uses it to authenticate `git submodule update` for submodules on that host.")}),We=S({url:i().describe("GitHub repository URL"),owner:i().describe("Repository owner"),name:i().describe("Repository name"),installationId:Ce().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:i().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials.")}),cn=ue(["agent-sandbox","user-desktop"]),dn=ue(["agent-sandbox","user-desktop","cluster"]);function Ge(t){return t==="cluster"?"agent-sandbox":t}const ft={sandboxHandle:i().describe("Provider-specific handle"),previewUrl:i().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:i().nullable().optional().describe("Daemon's public URL — what cluster→daemon RPCs target. Equal to previewUrl for user-desktop; null/absent for the agent-sandbox provider (routes through hosted ingress)."),sandboxProviderKind:cn.optional(),createdAt:Ce().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:S({packageManager:i().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:i().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:i().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},bt=S(ft),un=S({...ft,sandboxProviderKind:dn.optional()});function pn(t){const e=un.parse(t);return bt.parse({...e,sandboxProviderKind:e.sandboxProviderKind?Ge(e.sandboxProviderKind):void 0})}function fs(t){if(!t||typeof t!="object"||Array.isArray(t))return{};const e=t,n={};for(const[s,o]of Object.entries(e)){if(!o||typeof o!="object"||s!=="cluster"&&s!=="agent-sandbox"&&s!=="user-desktop")continue;const a=Ge(s);try{if(s==="cluster"&&n[a])continue;n[a]=pn(o)}catch{}}return n}const ze=Ie(i().describe("userId"),Ie(i().describe("branch"),Ie(i().describe("sandboxProviderKind"),bt))),hn=S({id:i().describe("Stable identifier for this knowledge file"),name:i().describe("File name shown in the UI"),kind:ue(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:i().describe("Org filesystem (Library) volume the file lives in"),path:i().describe("Path within the volume"),url:i().describe("Same-origin URL to read the file (display/download)"),contentType:i().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:Ce().nullable().optional().describe("File size in bytes"),addedAt:i().describe("ISO timestamp when the file was attached")}),Xe=C(hn).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),mn=ue(["smart","code-review","open"]),Ze=mn.nullable().optional().describe("Controls when this code agent's changes may be published directly vs. requiring PR review. 'smart' (default) uses AI to judge per change; 'code-review' requires review for any code; 'open' allows direct publish always."),Ye=J().nullable().optional().describe("Enable Fast Preview: render the draft instantly on productionUrl's own page via a ?__draft pointer while the sandbox boots. Requires productionUrl to be set to take effect."),bs=S({id:i().describe("Unique identifier"),title:i().describe("Human-readable name"),description:i().nullable().describe("Description"),icon:i().nullable().describe("Icon URL"),created_at:i().describe("Creation timestamp"),updated_at:i().describe("Last update timestamp"),created_by:i().describe("User ID who created this item"),updated_by:i().optional().describe("User ID who last updated this item"),organization_id:i().describe("Organization ID this item belongs to"),status:ue(["active","inactive"]).describe("Current status"),pinned:J().describe("Whether this space is pinned to the sidebar"),metadata:S({instructions:i().nullable().describe("Instructions also used as system prompt"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:Ke.nullable().optional().describe("UI customization settings"),githubRepo:We.nullable().optional().describe("Linked GitHub repository"),runtime:Qe.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:ze.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Xe,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:Ze,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking."),fieldDescriptionTooltips:J().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:Ye}).loose().describe("Metadata"),connections:C(we).describe("Connections with their selected tools, resources, and prompts")}),gt=S({title:i().min(1).max(120).describe("Short label shown on the chip"),description:i().max(280).optional().describe("One-line subtitle shown under the title"),text:i().min(1).describe("The message sent to the agent when the prompt is clicked")});S({title:i().min(1).max(255).describe("Name for the virtual MCP"),description:i().nullable().optional().describe("Optional description"),icon:i().nullish().describe("Optional icon URL"),status:ue(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:J().optional().default(!1).describe("Pin to sidebar"),metadata:S({instructions:i().nullable().optional().describe("MCP server instructions"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:Ke.nullable().optional().describe("UI customization settings"),githubRepo:We.nullable().optional().describe("Linked GitHub repository"),runtime:Qe.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:ze.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Xe,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:Ze,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking."),fieldDescriptionTooltips:J().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:Ye}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:C(mt).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:C(gt).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});S({title:i().min(1).max(255).optional().describe("New name"),description:i().nullable().optional().describe("New description (null to clear)"),icon:i().nullish().describe("New icon URL"),status:ue(["active","inactive"]).optional().describe("New status"),pinned:J().optional().describe("Pin/unpin from sidebar"),metadata:S({instructions:i().nullable().optional().describe("MCP server instructions"),enabled_plugins:C(i()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:C(i()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:i().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:Ke.nullable().optional().describe("UI customization settings"),githubRepo:We.nullable().optional().describe("Linked GitHub repository"),runtime:Qe.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:ze.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:Xe,siteSlug:i().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:Ze,productionUrl:i().nullable().optional().describe("Live production URL of the linked site (e.g. https://acme.com). Painted in the preview iframe while the sandbox dev server is waking."),fieldDescriptionTooltips:J().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:Ye}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:C(mt).optional().describe("New connections (replaces existing)"),prompts:C(gt).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});function fn(t,e=[]){return t==="stop"?"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 je={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"},"opencode-desktop":{harness:"opencode",sandbox:"user-desktop"}};function bn(t,e){if(!t)return null;const n=e?Ge(e):null;if(t==="decopilot"&&(n===null||n==="user-desktop"))return"decopilot";for(const[s,o]of Object.entries(je))if(o.harness===t&&o.sandbox===n)return s;return null}function gn({pendingOption:t,lockedHarness:e}){return e==="claude-code"?"claude-code-desktop":e==="codex"?"codex-desktop":e==="opencode"?"opencode-desktop":t==="claude-code-desktop"||t==="codex-desktop"||t==="opencode-desktop"?t:null}function yn(t){return t.thread?.harness_id!=null?{}:{harnessId:"decopilot",sandboxProviderKind:"agent-sandbox",branch:t.globals.branch??null}}const vn="home",Sn=new Set(["output","upload","public","home"]),kn=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function gs(t){return Sn.has(t)||!kn.test(t)?"home":t}function xn(t){const e=t?t.split("/").filter(Boolean):[],n=e[0]==="public",s=n?e[1]??null:null,o=n?s?`public-${s}`:null:e[0]??null,a=(n?e.slice(2):e.slice(1)).join("/");return{segments:e,volume:o,dirPath:a,isPublic:n,publicSet:s,readOnly:n,isHomeRoot:o===vn&&a===""}}function ys(t){return t==="public"?"skills":t}function vs(t,e){return t.isPublic&&t.publicSet?`public/${t.publicSet}/${e}`:t.volume?`${t.volume}/${e}`:e}const at="public-";function yt(t){return t.startsWith(at)?t.slice(at.length):null}function Ss(t,e){const n=yt(t);return n?`public/${n}/${e}`:`${t}/${e}`}function wn(t){const e=t.lastIndexOf("/");return e===-1?t:t.slice(e+1)}function In(t){const{volume:e,dirPath:n}=xn(t);if(!e)return null;let s;if(e==="home")s="org/home";else if(e==="outputs")s="org/.outputs";else if(e==="uploads")s="org/.uploads";else{const o=yt(e);s=o?`org/public/${o}`:`org/${e}`}return n?`${s}/${n}`:s}function Mn(t){const e=ie.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=dt(n);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[1]=o):o=e[1];const a=Be(o);let l;e[2]!==a.brand||e[3]!==a.main||e[4]!==a.preview||e[5]!==a.skill?(l=(typeof a.main=="string"?Rt(a.main)?.path:void 0)??a.preview??a.skill??a.brand??null,e[2]=a.brand,e[3]=a.main,e[4]=a.preview,e[5]=a.skill,e[6]=l):l=e[6];const c=l;let h;if(e[7]!==s?.params.appSlug||e[8]!==s?.params.collectionName||e[9]!==s?.params.itemId||e[10]!==c||e[11]!==t){if(h=[],t&&h.push(`### Selected Agent
|
|
2
|
+
- ID: ${t}`),c){let f;e[13]!==c?(f=In(c),e[13]=c,e[14]=f):f=e[14];const k=f;let M;e[15]!==c?(M=wn(c),e[15]=c,e[16]=M):M=e[16],h.push(`### Currently Open File
|
|
3
|
+
The user has this file open in the Library and is most likely referring to it:
|
|
4
|
+
- Name: ${M}
|
|
5
|
+
- Library path: ${c}${k?`
|
|
6
|
+
- Read/edit it with your file tools at: \`${k}\``:""}
|
|
7
|
+
|
|
8
|
+
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 m;e[17]!==s?.params.appSlug||e[18]!==s?.params.collectionName||e[19]!==s?.params.itemId?(m=[],s?.params.appSlug&&m.push(`- Connection ID: ${s?.params.appSlug}`),s?.params.collectionName&&m.push(`- Collection: ${s?.params.collectionName}`),s?.params.itemId&&m.push(`- Item ID: ${s?.params.itemId}`),e[17]=s?.params.appSlug,e[18]=s?.params.collectionName,e[19]=s?.params.itemId,e[20]=m):m=e[20],m.length>0&&h.push(`### Current Resource
|
|
9
|
+
The user is viewing the following resource:
|
|
10
|
+
${m.join(`
|
|
11
|
+
`)}
|
|
12
|
+
|
|
13
|
+
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]=h}else h=e[12];return h.join(`
|
|
14
|
+
|
|
15
|
+
`)}function Tn(){const t=ie.c(5),e=He(),{org:n}=ee();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 o=dt(s);let a;return t[1]!==o?.params||t[2]!==n||t[3]!==e?(a=l=>{const h=l.toolCall.toolName.match(/^COLLECTION_([A-Z_]+)_(CREATE|UPDATE|DELETE)$/);if(!h||!h[1])return;const m=h[1],f=o?.params.appSlug;if(!f)return;e.invalidateQueries({queryKey:de.collection(n.slug,f,m)});const k=m.toLowerCase().replace(/_/g," ");ce.success(`${k} updated`)},t[1]=o?.params,t[2]=n,t[3]=e,t[4]=a):a=t[4],a}function Cn(){const t=ie.c(4),{org:e,project:n}=ee(),s=`${e.id}/${n.id}`;let o;t[0]!==s?(o=ge.taskLastViewed(s),t[0]=s,t[1]=o):o=t[1];const[,a]=be(o,An);let l;return t[2]!==a?(l={markTaskRead:h=>{a(m=>({...m,[h]:new Date().toISOString()}))}},t[2]=a,t[3]=l):l=t[3],l}function An(t){return t??{}}function vt(){const t=ut(),{org:e}=ee(),n=Be({strict:!1}),s=It({strict:!1}),o=n.virtualmcpid??Ht(e.id).id,a=(h,m)=>{t({to:"/$org/$taskId",params:{org:e.slug,taskId:h},search:f=>{const k={},M=m?.virtualMcpId??f.virtualmcpid;M&&(k.virtualmcpid=M);const p=f.main;return p&&typeof p=="string"&&!Et(p)&&(k.main=p),(f.sidepanel==="chat"||f.sidepanel===0)&&(k.sidepanel=f.sidepanel),m?.autosend&&(k.autosend=pt),k}})},l=v.useRef(crypto.randomUUID()),c=s.taskId??l.current;return{virtualMcpId:o,taskId:c,navigateToTask:a}}function Pn(t,e){const{mimeType:n,data:s}=t;if(n.startsWith("text/"))try{const o=new TextDecoder().decode(Uint8Array.from(atob(s),a=>a.charCodeAt(0)));return[{type:"text",text:`${e}
|
|
16
|
+
${o}`}]}catch(o){console.error("Failed to decode text file:",o)}return[{type:"file",url:`data:${n};base64,${s}`,filename:e,mediaType:n}]}function it(t,e){const n=[];for(const s of t)!s||typeof s!="object"||("text"in s&&s.text?n.push({type:"text",text:`[${e}]
|
|
17
|
+
${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 _n(t,e){const n=(t.files??[]).filter(l=>l.content?.trim()),s=t.omittedPaths??[];if(n.length===0&&s.length===0)return[];const o=n.map(l=>`<skill-file path="${l.relPath}">
|
|
18
|
+
${l.content.trim()}
|
|
19
|
+
</skill-file>`).join(`
|
|
20
|
+
|
|
21
|
+
`),a=s.length>0?`
|
|
22
|
+
|
|
23
|
+
Other files in \`${t.sandboxPath}/\`: ${s.join(", ")}`:"";return[{type:"text",text:`[${e}]
|
|
24
|
+
${o}${a}`}]}function Rn(t,e){const n=[];for(const s of t){if(s.role!=="user"||!s.content)continue;const o=Array.isArray(s.content)?s.content:[s.content];for(const a of o)switch(a.type){case"text":{const l=a.text?.trim();if(!l)continue;n.push({type:"text",text:`[${e}]
|
|
25
|
+
${l}`});break}case"image":case"audio":{if(!a.data||!a.mimeType)continue;n.push({type:"file",url:`data:${a.mimeType};base64,${a.data}`,mediaType:a.mimeType});break}case"resource":{const l=a.resource;if(!l||!l.mimeType)continue;l&&("text"in l&&l.text?n.push({type:"text",text:`[${e}]
|
|
26
|
+
${l.text}`}):"blob"in l&&l.blob&&l.mimeType&&n.push({type:"file",url:`data:${l.mimeType};base64,${l.blob}`,filename:String(l.uri),mediaType:String(l.mimeType)}));break}}}return n}function St(t){if(!t)return[];const e=[];let n="";const s=o=>{if(o){if(o.type==="text"&&"text"in o&&typeof o.text=="string")n+=o.text;else if(o.type==="mention"&&o.attrs){const a=o.attrs.char??"/",l=`${a}${o.attrs.name}`;if(o.attrs.kind==="task"){const c=o.attrs.metadata,h=c?.title??o.attrs.name??"",m=c?.context?.trim()||[h,c?.description?.trim()].filter(Boolean).join(`
|
|
27
|
+
|
|
28
|
+
`);m&&e.push({type:"text",text:m});return}if(n+=l,a==="@"){const c=o.attrs.metadata;c&&typeof c=="object"&&!Array.isArray(c)&&"agentId"in c?e.push({type:"text",text:`[DELEGATE TO AGENT: ${c.title??o.attrs.name} (agent_id: ${c.agentId})]
|
|
29
|
+
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(...it(c,l))}else if(o.attrs.kind==="skill"){const c=o.attrs.metadata;c&&!Array.isArray(c)&&Array.isArray(c.files)&&e.push(..._n(c,l))}else{const c=o.attrs.metadata||o.attrs.prompts||[];Array.isArray(c)&&c.length>0&&typeof c[0]=="object"&&c[0]!==null&&"role"in c[0]?e.push(...Rn(c,l)):Array.isArray(c)&&e.push(...it(c,l))}}else if(o.type==="file"&&o.attrs){const a=o.attrs,l=`[file:://${encodeURIComponent(a.name)}]`;n+=l,e.push(...Pn(a,l))}if("content"in o&&Array.isArray(o.content))for(const a of o.content)s(a)}};return s(t),n.trim()&&e.unshift({type:"text",text:n.trim()}),e}function ks(t){const e=St(t);return e.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:e,metadata:{tiptapDoc:t}}]}function xs(t){return new Set(t.filter(e=>e.status==="queued").map(e=>e.messageId))}function En(t){return(t??[]).map(e=>e?.type==="text"&&typeof e.text=="string"?e.text:"").join("").trim()}function ws(t){return t.filter(e=>e.status==="queued").sort((e,n)=>e.enqueuedAt-n.enqueuedAt)}function Dn(t,e){return t.some(n=>n.messageId===e.messageId)?t:[...t,e]}function $n(t,e){return t.filter(n=>n.messageId!==e)}const ye=new Map,Un=200;function On(t){if(ye.size<Un||ye.has(t))return;const e=ye.keys().next().value;if(e!==void 0){ye.delete(e),$e.delete(e);for(const n of ve.keys())n.startsWith(`${e}:`)&&ve.delete(n)}}const $e=new Set;function Ln(t){$e.add(t)}function Nn(t){return $e.has(t)}function Fn(t){$e.delete(t)}function Ae(t){let e=ye.get(t);return e||(On(t),e=new Lt([]),ye.set(t,e)),e}function kt(t,e){Ae(t).update(n=>Dn(n,e))}function Ve(t,e){Ae(t).update(n=>$n(n,e))}function qn(t,e){Ae(t).set(e)}const ve=new Map;function jn(t,e){ve.set(`${t}:${e.id}`,e)}function Vn(t,e){const n=`${t}:${e}`,s=ve.get(n);return ve.delete(n),s}function rt(t,e){ve.delete(`${t}:${e}`)}async function ae(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();qn(e,s.items??[])}catch{}}function Is(t){const e=ie.c(2);let n;e[0]!==t?(n=Ae(t),e[0]=t,e[1]=n):n=e[1];const s=n;return v.useSyncExternalStore(s.subscribe,s.get,s.get)}function Bn(){const{org:t}=ee();return{enqueue:kt,refresh:e=>ae(t.slug,e),cancel:async(e,n)=>{const s=`thread-run:${e}:${n}`;Ve(e,n);try{const o=await fetch(`/api/${encodeURIComponent(t.slug)}/decopilot/queue/${encodeURIComponent(e)}/cancel/${encodeURIComponent(s)}`,{method:"POST",credentials:"include"});if(!o.ok&&o.status!==404)throw new Error(`Cancel failed: ${o.status}`);return!0}catch(o){return ce.error(o instanceof Error?o.message:"Failed to cancel"),!1}finally{await ae(t.slug,e)}}}}function Ee(t,e){return t.find(n=>n!=null&&e.has(n.keyId))??null}function Hn(t,e,n){const s=o=>Ee([o],n);return{tiers:{fast:Ee([e.tiers.fast,t.tiers.fast],n),smart:Ee([e.tiers.smart,t.tiers.smart],n),thinking:Ee([e.tiers.thinking,t.tiers.thinking],n),image:s(t.tiers.image),web_search:s(t.tiers.web_search),deep_research:s(t.tiers.deep_research)}}}const Te={tiers:{}};function Kn(){const t=ie.c(7),{org:e}=ee();let n;t[0]!==e.id?(n=de.userModelPreferences(e.id),t[0]=e.id,t[1]=n):n=t[1];let s;t[2]!==e.slug?(s=async()=>{const a=await Jt(e.slug,"USER_MODEL_PREFERENCES_GET",{});return a?.tiers?a:Te},t[2]=e.slug,t[3]=s):s=t[3];let o;return t[4]!==n||t[5]!==s?(o={queryKey:n,queryFn:s,staleTime:6e4},t[4]=n,t[5]=s,t[6]=o):o=t[6],Mt(o)}function Qn(){return Kn().data??Te}function Ms(){const t=ie.c(19),{org:e}=ee(),n=Yt(),s=He();let o;t[0]!==e.id?(o=de.userModelPreferences(e.id),t[0]=e.id,t[1]=o):o=t[1];const a=o;let l;t[2]!==a||t[3]!==s||t[4]!==n?(l=async M=>{const p=s.getQueryData(a)??Te;return await n.call("USER_MODEL_PREFERENCES_UPDATE",p)??p},t[2]=a,t[3]=s,t[4]=n,t[5]=l):l=t[5];let c,h,m,f;t[6]!==a||t[7]!==s?(c=M=>{const{tier:p,slot:A}=M,F=s.getQueryData(a),q=F??Te;return s.setQueryData(a,{tiers:{...q.tiers,[p]:A}}),{prev:F}},h=(M,p,A)=>{s.setQueryData(a,A?.prev??Te)},m=M=>{s.setQueryData(a,M)},f=()=>{s.isMutating({mutationKey:a})===1&&s.invalidateQueries({queryKey:a})},t[6]=a,t[7]=s,t[8]=c,t[9]=h,t[10]=m,t[11]=f):(c=t[8],h=t[9],m=t[10],f=t[11]);let k;return t[12]!==a||t[13]!==l||t[14]!==c||t[15]!==h||t[16]!==m||t[17]!==f?(k={mutationKey:a,mutationFn:l,onMutate:c,onError:h,onSuccess:m,onSettled:f},t[12]=a,t[13]=l,t[14]=c,t[15]=h,t[16]=m,t[17]=f,t[18]=k):k=t[18],Tt(k)}function Wn(){const t=ie.c(4),e=en(),n=Qn(),s=ht();let o;return t[0]!==s||t[1]!==e||t[2]!==n?(o=Hn(e,n,new Set(s.map(Gn))),t[0]=s,t[1]=e,t[2]=n,t[3]=o):o=t[3],o}function Gn(t){return t.id}function le(t,e,n,s){if(!t)return null;const o=e.find(l=>l.id===t.keyId);if(!o)return null;const a=n.find(l=>l.modelId===t.modelId);return a?{...a,keyId:t.keyId}:{modelId:t.modelId,title:s??t.modelId,keyId:t.keyId,providerId:o.providerId,description:null,logo:null,capabilities:[],limits:null,costs:null}}function zn(t){return t==="fast"||t==="smart"||t==="thinking"?t:"smart"}function Xn(t,e,n,s){if(!n||s.length===0)return null;const o=e.find(h=>h.id===n);if(!o)return null;const a=Gt([o],{[n]:s}),l=t==="fast"?a.chat.fast:t==="thinking"?a.chat.thinking:a.chat.smart;if(!l)return null;const c=s.find(h=>h.modelId===l.modelId);return c?{...c,keyId:n}:null}const lt=new Set,oe=new Set;function fe(t){return v.useSyncExternalStore(t.subscribe,t.get,t.get)}function Zn(t){return t.kind==="loading"?"ready":t.kind}const Yn=1e4,Jn=10,Je=v.createContext(null),et=v.createContext(null),tt=v.createContext(null),xt=v.createContext(null);function es({children:t}){const{locator:e}=ee(),{virtualMcpId:n}=vt(),[s,o]=be(ge.chatSelectedImageModel(e),null),[a,l]=be(ge.chatSelectedWebSearchModel(e),null),[c,h]=be(ge.chatSelectedDeepResearchModel(e),null),[m,f]=v.useState(null),[k,M]=v.useState("default"),p=Wn(),[A,F]=be(ge.chatSimpleModeTier(e),null),q=zn(A),x=ht(),T=p.tiers[q],j=x.some(r=>r.id===T?.keyId)?T?.keyId:void 0,W=m&&x.some(r=>r.id===m)?m:j??x[0]?.id??null,{models:V,isLoading:_}=xe(W??void 0),{models:z}=xe(j),$=x.some(r=>r.id===p.tiers.image?.keyId)?p.tiers.image?.keyId:void 0,{models:te}=xe($),B=x.some(r=>r.id===p.tiers.web_search?.keyId)?p.tiers.web_search?.keyId:void 0,{models:H}=xe(B),ne=x.some(r=>r.id===p.tiers.deep_research?.keyId)?p.tiers.deep_research?.keyId:void 0,{models:K}=xe(ne),G=le(T,x,z,T?.title)??Xn(q,x,W,V),se=_,X=V.filter(r=>r.capabilities?.includes("image")),b=le(s,x,X),E=le(p.tiers.image,x,te,p.tiers.image?.title)??b??X[0]??null,L=V.filter(zt),P=le(a,x,L),Q=L.find(r=>r.modelId==="perplexity/sonar")??L[0]??null,pe=le(p.tiers.web_search,x,H,p.tiers.web_search?.title)??P??Q,Z=V.filter(Xt),N=le(c,x,Z),Se=Z.find(r=>r.modelId==="perplexity/deep-research")??Z.find(r=>r.asyncResearch===!0)??Z[0]??null,Ue=le(p.tiers.deep_research,x,K,p.tiers.deep_research?.title)??N??Se,Le=Wt(n)??{id:n,title:"",description:null,icon:null},[Pe,ke]=v.useState({}),_e=(r,g)=>{const O=[];for(const I of g.content??[])I.type==="text"&&I.text?.trim()&&O.push(I.text.trim());const R=O.join(`
|
|
30
|
+
`);if(!R){re(r);return}new TextEncoder().encode(R).length>Yn||ke(I=>Object.keys(I).length>=Jn&&!(r in I)?I:{...I,[r]:R})},re=r=>{ke(g=>{const{[r]:O,...R}=g;return R})},[Ne,Fe]=be(ge.chatLastAgentOption(e),r=>r&&r in je?r:null),Y=ss(),nt=Y?.isThreadLocked&&Y.lockedHarness!=null?bn(Y.lockedHarness,Y.lockedSandbox):null;gn({pendingOption:Ne,lockedHarness:Y?.isThreadLocked?Y.lockedHarness:null});const he=Y?.isThreadLocked?nt:"decopilot",Re=he?je[he]:null,d=Re?.harness??null,u=Re?.sandbox??null,[D,U]=v.useState(void 0),y=v.useRef(D);y.current=D;const w={selectedModel:G,setModel:()=>{},credentialId:W,setCredentialId:f,allModelsConnections:x,isModelsLoading:se,selectedVirtualMcp:Le,imageModel:E,setImageModel:r=>{o(r?.keyId?{keyId:r.keyId,modelId:r.modelId}:null)},webSearchModel:pe,setWebSearchModel:r=>{l(r?.keyId?{keyId:r.keyId,modelId:r.modelId}:null)},deepResearchModel:Ue,setDeepResearchModel:r=>{h(r?.keyId?{keyId:r.keyId,modelId:r.modelId}:null)},chatMode:k,setChatMode:M,appContexts:Pe,setAppContext:_e,clearAppContext:re,tiptapDoc:D,setTiptapDoc:U,tiptapDocRef:y,resetInteraction:()=>{},simpleModeTier:q,setSimpleModeTier:r=>F(r),pendingAgentOption:he,setPendingAgentOption:Fe,pendingHarnessId:d,pendingSandboxProviderKind:u};return Me.jsx(tt.Provider,{value:w,children:t})}function Ts(t){const e=ie.c(41),{virtualMcpId:n,task:s,children:o}=t,{locator:a}=ee(),{data:l}=Ct.useSession(),c=l?.user??null,{taskId:h,virtualMcpId:m,navigateToTask:f}=vt(),[k]=At(),{markTaskRead:M}=Cn(),p=Vt(),A=h,F=m,q=Mn(F);let x;e[0]!==M||e[1]!==f?(x=(P,Q)=>{M(P),f(P,{virtualMcpId:Q?.virtualMcpId,autosend:Q?.autosend})},e[0]=M,e[1]=f,e[2]=x):x=e[2];const T=x,j=A&&s?.id===A?s:null,W=j?.harness_id??null,V=j?.sandbox_provider_kind??null,_=j?.branch??null,z=W!=null,$=_;let te;e[3]!==$||e[4]!==T||e[5]!==p||e[6]!==n?(te=()=>{const P=crypto.randomUUID();return p.create({id:P,virtual_mcp_id:n,...$?{branch:$}:{}}).then(()=>T(P)).catch(()=>{T(P)}),P},e[3]=$,e[4]=T,e[5]=p,e[6]=n,e[7]=te):te=e[7];const B=te;let H;e[8]!==$||e[9]!==a||e[10]!==T||e[11]!==p||e[12]!==n?(H=P=>{const Q=crypto.randomUUID(),pe=P.virtualMcpId??n,Z=pe===n?$:null;Ot(sessionStorage,a,Q,P.message),p.create({id:Q,virtual_mcp_id:pe,...Z?{branch:Z}:{}}).then(()=>T(Q,{virtualMcpId:P.virtualMcpId,autosend:!0})).catch(()=>{T(Q,{virtualMcpId:P.virtualMcpId,autosend:!0})})},e[8]=$,e[9]=a,e[10]=T,e[11]=p,e[12]=n,e[13]=H):H=e[13];const ne=H;let K;e[14]!==A||e[15]!==p?(K=P=>{A&&p.setBranch(A,P)},e[14]=A,e[15]=p,e[16]=K):K=e[16];let G;e[17]!==j||e[18]!==B||e[19]!==ne||e[20]!==$||e[21]!==A||e[22]!==F||e[23]!==z||e[24]!==_||e[25]!==W||e[26]!==V||e[27]!==T||e[28]!==K?(G={virtualMcpId:F,taskId:A,openTask:T,createTask:B,createTaskWithMessage:ne,activeTask:j,isThreadLocked:z,lockedHarness:W,lockedSandbox:V,lockedBranch:_,currentBranch:$,setCurrentTaskBranch:K},e[17]=j,e[18]=B,e[19]=ne,e[20]=$,e[21]=A,e[22]=F,e[23]=z,e[24]=_,e[25]=W,e[26]=V,e[27]=T,e[28]=K,e[29]=G):G=e[29];const se=G;let X;e[30]!==q||e[31]!==k||e[32]!==f||e[33]!==c?(X={user:c,contextPrompt:q,preferences:k,rawNavigateToTask:f},e[30]=q,e[31]=k,e[32]=f,e[33]=c,e[34]=X):X=e[34];const b=X;let E;e[35]!==o||e[36]!==b?(E=Me.jsx(es,{children:Me.jsx(xt.Provider,{value:b,children:o})}),e[35]=o,e[36]=b,e[37]=E):E=e[37];let L;return e[38]!==E||e[39]!==se?(L=Me.jsx(et.Provider,{value:se,children:E}),e[38]=E,e[39]=se,e[40]=L):L=e[40],L}function Cs({taskId:t,children:e}){const n=De(),s=Bt(),{virtualMcpId:o,activeTask:a,currentBranch:l}=ts(),c=Nt({isDesktopApp:s,harnessId:a?.harness_id,sandboxProviderKind:a?.sandbox_provider_kind}),h=n("chat.input.codingAgentRequiresDesktop");t&&!lt.has(t)&&(lt.add(t),_t("chat_opened",{thread_id:t}));const{imageModel:m,webSearchModel:f,deepResearchModel:k,chatMode:M,setChatMode:p,appContexts:A,setTiptapDoc:F,simpleModeTier:q}=ns(),x=v.useContext(xt);if(!x)throw new Error(n("chat.chatContext.activeTaskProviderMissingContext"));const{user:T,contextPrompt:j,preferences:W,rawNavigateToTask:V}=x,{org:_,locator:z}=ee(),$=Bn(),[te,B]=v.useState(null),H=()=>{B(new Error(h))},ne=Tn(),K=He(),G=Ft(),se=ut(),X=Kt({connectionId:Qt,orgId:_.id,orgSlug:_.slug}),b=qt(_.slug,t,{client:X,batch:jt(a?.harness_id)});v.use(b.ready);const E=fe(b.messages),L=fe(b.status),P=fe(b.finishReason),Q=fe(b.runStatusStage),pe=fe(b.hasMoreOlder),Z=fe(b.isFetchingOlder),N=v.useRef({onToolCall:ne,queryClient:K,rawNavigateToTask:V,taskId:t,manager:G,navigate:se,orgId:_.id,orgSlug:_.slug});N.current={onToolCall:ne,queryClient:K,rawNavigateToTask:V,taskId:t,manager:G,navigate:se,orgId:_.id,orgSlug:_.slug},Zt({orgSlug:_.slug,taskId:t,onTaskStatus:d=>{const u=N.current,D=d.data.message_id;if(d.data.status==="in_progress"&&D){Ve(u.taskId,D);const U=Vn(u.taskId,D);U&&b.applyLocalMessage(U),ae(u.orgSlug,u.taskId)}Nn(u.taskId)&&(async()=>(await ae(u.orgSlug,u.taskId),await b.reconcileFromServer()&&Ae(u.taskId).get().length===0&&Fn(u.taskId)))()}}),v.useEffect(()=>{const d={onData:y=>{if(y.type==="data-thread-title"){const w=y.data;if(!w?.title)return;const r=N.current;if(!r.taskId)return;r.manager.patchThread({id:r.taskId,title:w.title,updated_at:new Date().toISOString()});return}if(y.type==="data-deck-updated"){const w=y.data;if(!w?.path)return;const r=w.path,g=N.current;g.queryClient.invalidateQueries({queryKey:de.orgFsStat(g.orgId,"home",r)}),g.queryClient.invalidateQueries({queryKey:de.orgFsRecent(g.orgId)}),g.navigate({to:".",search:O=>({...O,main:Ut(r)}),replace:!0});return}if(y.type==="data-open-preview"){const w=y.data,r=N.current,g=r.taskId;if(g){const O=r.manager.threads.get().find(R=>R.id===g);r.manager.patchThread({id:g,...w?.branch?{branch:w.branch}:{},...w?.sandboxProviderKind?{sandbox_provider_kind:w.sandboxProviderKind}:{},metadata:{...O?.metadata??{},...w?.githubRepo?{githubRepo:w.githubRepo}:{},...w?.sandboxMap?{sandboxMap:w.sandboxMap}:{}}})}r.navigate({to:".",search:O=>({...O,main:"preview"}),replace:!0});return}},onFinish:(y,w,r)=>{const g=N.current;g.taskId&&ae(g.orgSlug,g.taskId),g.taskId&&g.manager.patchThread({id:g.taskId,status:fn(r,y.parts),updated_at:new Date().toISOString()});const O=y.parts?.some(I=>{const me=I;return(me.type==="tool-share_with_user"||me.type==="tool-bash"||me.type==="tool-write")&&me.state==="output-available"});if(g.taskId&&O){const I=de.threadOutputs(g.taskId);for(const me of[0,1500,3e3,6e3,12e3,25e3])setTimeout(()=>{g.queryClient.invalidateQueries({queryKey:I})},me)}g.queryClient.invalidateQueries({queryKey:de.homeNextActions(g.orgSlug)});const R=y.metadata?.thread_id;R&&R!==g.taskId&&g.rawNavigateToTask(R)},onError:y=>{B(y),console.error("[chat] Error",y)},onToolCall:y=>N.current.onToolCall(y)};b.observer=d,ae(N.current.orgSlug,N.current.taskId);const u=y=>y==="submitted"||y==="streaming";let D=u(b.status.get().kind);const U=b.status.subscribe(()=>{const y=u(b.status.get().kind);if(y===D)return;D=y;const w=N.current;ae(w.orgSlug,w.taskId)});return()=>{b.observer===d&&(b.observer=null),U()}},[b]);const Se=L.kind==="submitted"||L.kind==="streaming",Ue=E.length===0,Oe=E.at(-1),Le=!Se&&Oe?.role==="assistant"&&Oe.parts.some(d=>"state"in d&&d.state==="approval-requested"),Pe=a,ke=(Pe?.status==="in_progress"||Pe?.status==="expired")&&L.kind==="ready"&&E.length>0;async function _e(d){const u=t,D=o;if(c)return H(),oe.delete(u),!1;const U=Object.entries(A),y=U.length>0?U.map(([R,I])=>`### App Context: ${R}
|
|
31
|
+
${I}`).join(`
|
|
32
|
+
|
|
33
|
+
`):"",w=[j,y].filter(Boolean).join(`
|
|
34
|
+
|
|
35
|
+
`);let r=M;r==="gen-image"&&!m&&(r="default"),r==="web-search"&&!f&&(r="default"),r==="deep-research"&&!k&&(r="default"),(r==="web-search"||r==="deep-research")&&p("default");const g=yn({thread:a?{harness_id:a.harness_id??null,sandbox_provider_kind:a.sandbox_provider_kind??null,branch:a.branch??null}:null,globals:{branch:l}});a?.harness_id||G.patchThread({id:u,harness_id:g.harnessId??"decopilot",updated_at:new Date().toISOString()});const O={tier:q,mode:r,toolApprovalLevel:W.toolApprovalLevel??Pt(),system:w||void 0,agent:{id:D},thread_id:u,...g};try{if(Se||ke){let R=!0;try{jn(u,d),await b.enqueue(d,O),kt(u,{workflowId:`thread-run:${u}:${d.id}`,messageId:d.id,text:En(d.parts),hasAttachments:d.parts.some(I=>I.type==="file"),status:"queued",enqueuedAt:Date.now(),optimistic:!0}),Ln(u)}catch(I){R=!1,rt(u,d.id),Ve(u,d.id),B(I instanceof Error?I:new Error(String(I))),ce.error(I instanceof Error?I.message:n("chat.chatContext.failedToQueueMessage"))}return ae(_.slug,u),R}return await b.submit({kind:"message",message:d},O),!0}finally{oe.delete(u)}}async function re(d){const u=d.parts??St(d.tiptapDoc);if(u.length===0||oe.has(t))return;oe.add(t),B(null),F(void 0);const D={tiptapDoc:d.tiptapDoc,created_at:new Date().toISOString(),user:{avatar:T?.image??void 0,name:T?.name??"you"}},U={id:crypto.randomUUID(),role:"user",parts:u,metadata:D};await _e(U)}async function Ne(d,u){if(c)return H(),!1;if(oe.has(t))return ce.info(n("chat.chatContext.stillSendingPreviousMessage")),!1;if(oe.add(t),!await $.cancel(t,d))return oe.delete(t),ce.error(n("chat.chatContext.couldNotRemoveOriginalMessage")),!1;rt(t,d),b.removeLocalMessage(d);const U={id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:u}],metadata:{created_at:new Date().toISOString(),user:{avatar:T?.image??void 0,name:T?.name??"you"}}};try{return await _e(U)}catch(y){return ce.error(y instanceof Error?y.message:n("chat.chatContext.failedToSendEditedMessage")),!1}}const Fe=async()=>{b.stop();try{const d=await fetch(`/api/${_.slug}/decopilot/cancel/${t}`,{method:"POST",credentials:"include"});if(d.status===404)return;if(!d.ok){const u=await d.json().catch(()=>({}));throw new Error(u.message??n("chat.chatContext.cancelFailedStatus",{status:d.status}))}}catch(d){const u=d instanceof Error?d.message:n("chat.chatContext.failedToCancel");ce.error(u),console.error("[chat] cancelRun",d)}},Y=d=>d&&typeof d=="object"&&"type"in d?re({tiptapDoc:d}):re(d),he=Be({strict:!1}).autosend===pt;v.useEffect(()=>{if(!he||E.length>0||c)return;const d=Dt(sessionStorage,z,t);d&&re(d.message).then(()=>{$t(sessionStorage,z,t)})},[he,E.length,c,z,t,re]);const Re={messages:E,status:Zn(L),sendMessage:Y,editQueuedMessage:Ne,stop:()=>{if(c){H();return}Fe()},submit:async(d,u)=>{if(c){H();return}await b.submit(d,u)},removeLocalMessage:d=>b.removeLocalMessage(d),isSendInFlight:()=>oe.has(t),error:te,clearError:()=>B(null),finishReason:P,runStatusStage:Q,clearFinishReason:()=>b.finishReason.set(null),isStreaming:Se,isChatEmpty:Ue,isWaitingForApprovals:Le??!1,isRunInProgress:ke,hasMoreOlder:pe,isFetchingOlder:Z,fetchOlderMessages:b.fetchOlderMessages.bind(b)};return Me.jsx(Je.Provider,{value:Re,children:e})}function As(){const t=De(),e=v.useContext(Je);if(!e)throw new Error(t("chat.chatContext.useChatStreamMissingContext"));return e}function Ps(){return v.useContext(Je)}function ts(){const t=De(),e=v.useContext(et);if(!e)throw new Error(t("chat.chatContext.useChatTaskMissingContext"));return e}function ns(){const t=De(),e=v.useContext(tt);if(!e)throw new Error(t("chat.chatContext.useChatPrefsMissingContext"));return e}function _s(){return v.useContext(tt)}function ss(){return v.useContext(et)}export{Cs as A,vt as B,es as C,_s as D,on as E,vn as H,rn as S,bs as V,As as a,ts as b,Is as c,Bn as d,rt as e,Ee as f,Kn as g,Ms as h,Wn as i,Ps as j,ss as k,Ts as l,xs as m,ms as n,St as o,fs as p,xn as q,wn as r,ws as s,ks as t,ns as u,ys as v,gs as w,vs as x,yt as y,Ss as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,m as d,j as c,bE as l,bF as m}from"./index-
|
|
1
|
+
import{c as n,m as d,j as c,bE as l,bF as m}from"./index-CuR236Ha.js";import{i as b}from"./Check-Ba7uuiUv.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(m,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(b,{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-CuR236Ha.js";import{A as u}from"./auth-split-layout-B1xiK1IR.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 k,j as t,B as K,k as oe,Z as Ze,$ as re,b as Q,E as Ee,r as E,F as fe,bc as Ge,bd as Oe,a1 as Xe,m as W,be as et,u as tt,L as te,t as st,f as he,b3 as Re}from"./index-CuR236Ha.js";import{E as Fe}from"./empty-state-D4Mka2Gg.js";import{u as ge}from"./use-mcp-client-Ldih0CNF.js";import{d as ae,F as lt,a as ce,b as de}from"./form-YDRn1yMf.js";import{I as pe}from"./input-LqGTjd_-.js";import{T as xe}from"./textarea-z_orS_CZ.js";import{a as ot,b as nt,V as je,O as it,M as rt}from"./index-BipvzcTH.js";import{aK as at,U as ct,aL as dt,a0 as mt,ac as ut,aM as pt,a5 as ye}from"./agent-icon-pCvoZl7q.js";import{g as xt,M as ft,a as we}from"./index-B5nVELgB.js";import{A as ht,a as gt,b as jt}from"./alert-Dze3H8i7.js";import{S as Ce,a as Ie,b as $e,c as Te,d as me}from"./select-xvceoYep.js";import{b as bt,c as Pe,T as ke,a as Ae}from"./tooltip-DfT6t3c6.js";import{i as Nt}from"./AlertCircle-BM-SGXEb.js";import{s as vt}from"./Stars02-CwXREUM0.js";import{a as St}from"./Copy01-DYlP_Xtq.js";import{i as yt}from"./Play-S-SSyOWn.js";import{i as wt}from"./ChevronRight-KgA6xHru.js";import{g as Ct}from"./connection-slug-eyAPH6o3.js";import{u as It,T as $t}from"./index-Dg4zAJRj.js";import{a as Me,u as ze}from"./use-connection-CTR51WTv.js";import{a as Tt}from"./use-mcp-tools-De1Z4Bsb.js";import{M as Pt,c as kt}from"./monaco-editor-B-w0IDRi.js";import{I as De}from"./integration-icon-By0eBeMX.js";import{j as At,D as Dt}from"./chat-context-9UcSKOjs.js";import{u as Et}from"./shell-layout-DAJjI3Rs.js";import{a as Ot}from"./Tool02-BLEoObxL.js";import"./auth-Dt1FgVt-.js";import"./label-DbueIBWh.js";import"./index-nNOweqCJ.js";import"./sidebar-BNKxKPMZ.js";import"./LayoutLeft-CxujHsXA.js";import"./use-mobile-CD2TR_Uh.js";import"./X-FgZ-pUjZ.js";import"./Key01-Cme8uyqy.js";import"./extract-connection-data-i2ZtRXrE.js";import"./metadata-dUsYcpuu.js";import"./use-registry-connections-_l7hkNKl.js";import"./use-organization-settings-HM-EDIrS.js";import"./studio-tools-BYaak_qp.js";import"./Plus-BH5RlQYR.js";import"./index-BomFvFPo.js";import"./popover-CSaBs6px.js";import"./use-virtual-mcp-OghGCAy2.js";import"./Check-Ba7uuiUv.js";import"./SearchMd-CBT_BZMU.js";import"./Users03-CQVGNtmL.js";import"./use-create-virtual-mcp-DFC7TtKc.js";import"./use-navigate-to-agent-BtCzuuMV.js";import"./hooks-BXNVyGlx.js";import"./decopilot-sse-pool-CuLfeITa.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Tool01-EU3OKI0K.js";import"./ArrowUp-C8tFP7oQ.js";import"./Settings02-DAqQKtfC.js";import"./XCircle-BthmWHMF.js";import"./ArrowUpRight-CYabXmbx.js";import"./TrendUp01-Dnoj0uzg.js";import"./ZapSquare-BMfQVTWg.js";import"./CheckCircle-DqAwJ2kz.js";import"./ChevronDown-HBIiFunc.js";import"./ChevronUp-De0pNXr0.js";import"./DotsVertical-DWkfCVOi.js";import"./CpuChip01-DU2mm5Rx.js";import"./CreditCard01-BNQMzQ0s.js";import"./Eye-pZSN52Qe.js";import"./FilterLines-UMA3hIS0.js";import"./Star01-ybggVLHX.js";import"./Palette-C1hIu3Ny.js";import"./SwitchHorizontal01-wUPLzq-2.js";import"./HardDrive-srCmcA0T.js";import"./LinkExternal01-CQ9ayxbn.js";import"./LogOut01-1Wv_uc1f.js";import"./Monitor01-Dcr8x5_p.js";import"./Sun-C2vH3C3t.js";import"./SearchLg-ClGsPrv4.js";import"./Shield01-CBEZ92kQ.js";import"./Stars01-P8FnS4Ob.js";import"./Trash01-Ck-P8aGE.js";import"./Upload01-BfzUamTH.js";import"./User01-nRScdv2C.js";import"./Users01-DkQNBnK5.js";import"./XClose-BaQnC9xI.js";import"./Zap-Be3onl5O.js";import"./badge-BPApNEJW.js";import"./mcp-oauth-D9FdzYSb.js";import"./spinner-LLDWVi4B.js";import"./tab-id-DxuL0R1D.js";import"./dialog-CfCzKpCQ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-D8p0kIkX.js";import"./use-decopilot-events-B4kpfqJ7.js";import"./avatar-DBrhL9V4.js";import"./required-auth-layout-BldmHV1q.js";import"./use-org-sso-18zw8l-m.js";function Rt(s){const e=k.c(15),{onSave:n,onUndo:l,isDirty:o,isSaving:i,saveLabel:r,undoLabel:c}=s,d=r===void 0?"Save":r,a=c===void 0?"Undo":c;if(!o)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let h;e[1]!==i||e[2]!==l||e[3]!==a?(h=t.jsxs(K,{variant:"outline",size:"sm",onClick:l,disabled:i,"aria-label":a,children:[x,a]}),e[1]=i,e[2]=l,e[3]=a,e[4]=h):h=e[4];let m;e[5]!==i?(m=i?t.jsx(oe,{size:14,className:"animate-spin"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==m?(f=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[m,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=m,e[11]=f):f=e[11];let p;return e[12]!==h||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[h,f]}),e[12]=h,e[13]=f,e[14]=p):p=e[14],p}Ze({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ft(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(l=>l==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function Mt(s){const e=k.c(43),{form:n}=s,l=Q();let o;e[0]!==l?(o=l("details.prompt.details"),e[0]=l,e[1]=o):o=e[1];let i;e[2]!==o?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:o}),e[2]=o,e[3]=i):i=e[3];let r;e[4]!==l?(r=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...N,placeholder:l("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=l,e[5]=r):r=e[5];let c;e[6]!==n.control||e[7]!==r?(c=t.jsx(ae,{control:n.control,name:"title",render:r}),e[6]=n.control,e[7]=r,e[8]=c):c=e[8];let d;e[9]!==l?(d=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...N,value:N.value??"",placeholder:l("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=l,e[10]=d):d=e[10];let a;e[11]!==n.control||e[12]!==d?(a=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=a):a=e[13];let x;e[14]!==c||e[15]!==a?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,a]}),e[14]=c,e[15]=a,e[16]=x):x=e[16];let h;e[17]!==i||e[18]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=h):h=e[19];let m;e[20]!==l?(m=l("details.prompt.message"),e[20]=l,e[21]=m):m=e[21];let f;e[22]!==m?(f=t.jsx("div",{className:"text-sm font-medium text-foreground",children:m}),e[22]=m,e[23]=f):f=e[23];let p;e[24]!==l?(p=l("details.prompt.messageDescription"),e[24]=l,e[25]=p):p=e[25];let g;e[26]!==p?(g=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=g):g=e[27];let b;e[28]!==l?(b=w=>{const{field:N}=w;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...N,value:N.value??"",placeholder:l("details.prompt.bodyPlaceholder"),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"})})})},e[28]=l,e[29]=b):b=e[29];let S;e[30]!==n.control||e[31]!==b?(S=t.jsx(ae,{control:n.control,name:"body",render:b}),e[30]=n.control,e[31]=b,e[32]=S):S=e[32];let T;e[33]!==f||e[34]!==g||e[35]!==S?(T=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,g,S]}),e[33]=f,e[34]=g,e[35]=S,e[36]=T):T=e[36];let y;e[37]!==T||e[38]!==h?(y=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:[h,T]}),e[37]=T,e[38]=h,e[39]=y):y=e[39];let P;return e[40]!==n||e[41]!==y?(P=t.jsx(lt,{...n,children:y}),e[40]=n,e[41]=y,e[42]=P):P=e[42],P}function zt(s){const e=k.c(42),{providerId:n,promptId:l}=s,o=Q(),{org:i}=fe(),r=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(c={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=c):c=e[3];const d=ge(c),a=Ge(n,"PROMPT",l,d),x=Oe(n,"PROMPT",d),h=x.update.isPending;let m;e[4]!==a?(m=a?{title:a.title,description:a.description??null,body:ue(a)}:void 0,e[4]=a,e[5]=m):m=e[5];let f;e[6]!==m?(f={values:m},e[6]=m,e[7]=f):f=e[7];const p=Xe(f);let g;e[8]!==p||e[9]!==a?(g=()=>{a&&p.reset({title:a.title,description:a.description??null,body:ue(a)})},e[8]=p,e[9]=a,e[10]=g):g=e[10];const b=g;let S;e[11]!==x.update||e[12]!==p||e[13]!==l?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:l,data:{title:C.title,description:C.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:C.body}}]}});p.reset({title:I.title,description:I.description??null,body:ue(I)})}),e[11]=x.update,e[12]=p,e[13]=l,e[14]=S):S=e[14];const T=S;if(!a){let C;e[15]!==o?(C=o("details.prompt.notFoundTitle"),e[15]=o,e[16]=C):C=e[16];let I;e[17]!==o?(I=o("details.prompt.notFoundDescription"),e[17]=o,e[18]=I):I=e[18];let R;return e[19]!==C||e[20]!==I?(R=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=R):R=e[21],R}let y;e[22]!==a.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[22]=a.title,e[23]=y):y=e[23];let P;e[24]!==a.description?(P=a.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:a.description})]}):null,e[24]=a.description,e[25]=P):P=e[25];let w;e[26]!==y||e[27]!==P?(w=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,P]})}),e[26]=y,e[27]=P,e[28]=w):w=e[28];let N;e[29]!==T?(N=()=>{T()},e[29]=T,e[30]=N):N=e[30];let A;e[31]!==p.formState.isDirty||e[32]!==h||e[33]!==b||e[34]!==N?(A=t.jsx(ot,{children:t.jsx(Rt,{onSave:N,onUndo:b,isDirty:p.formState.isDirty,isSaving:h})}),e[31]=p.formState.isDirty,e[32]=h,e[33]=b,e[34]=N,e[35]=A):A=e[35];let D;e[36]!==p?(D=t.jsx("div",{className:"h-full",children:t.jsx(Mt,{form:p})}),e[36]=p,e[37]=D):D=e[37];let O;return e[38]!==A||e[39]!==D||e[40]!==w?(O=t.jsxs(je,{children:[w,A,D]}),e[38]=A,e[39]=D,e[40]=w,e[41]=O):O=e[41],O}function Lt(s){const e=k.c(10),{itemId:n}=s,l=Q();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Ft(),e[0]=o):o=e[0];const i=o;if(!i){let c;e[1]!==l?(c=l("details.prompt.notFoundTitle"),e[1]=l,e[2]=c):c=e[2];let d;e[3]!==l?(d=l("details.prompt.missingConnectionDescription"),e[3]=l,e[4]=d):d=e[4];let a;return e[5]!==c||e[6]!==d?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=a):a=e[7],a}let r;return e[8]!==n?(r=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:null,children:t.jsx(zt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=r):r=e[9],r}function Le(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("min-w-0 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Be(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Z(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function se(s){const e=k.c(10);let n,l,o;e[0]!==s?({asChild:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);const i=n?et:"a";let r;e[4]!==l?(r=W("hover:text-foreground transition-colors truncate",l),e[4]=l,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==o||e[8]!==r?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:r,...o}),e[6]=i,e[7]=o,e[8]=r,e[9]=c):c=e[9],c}function Ue(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("text-foreground font-medium truncate",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function le(s){const e=k.c(12);let n,l,o;e[0]!==s?({children:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);let i;e[4]!==l?(i=W("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",l),e[4]=l,e[5]=i):i=e[5];let r;e[6]!==n?(r=n??t.jsx(wt,{}),e[6]=n,e[7]=r):r=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==r?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...o,children:r}),e[8]=o,e[9]=i,e[10]=r,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=k.c(12),{toolName:n,connectionId:l,siblings:o,onSelectInstance:i,onBack:r}=s,c=Q();let d;e[0]!==l?(d={connectionId:l},e[0]=l,e[1]=d):d=e[1];const a=It(d);if(!a.isAuthenticated){let m;return e[2]!==a.supportsOAuth||e[3]!==r||e[4]!==c?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:a.supportsOAuth?t.jsx(it,{onAuthenticate:()=>r(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=a.supportsOAuth,e[3]=r,e[4]=c,e[5]=m):m=e[5],m}const x=`${l}:${n}`;let h;return e[6]!==l||e[7]!==i||e[8]!==o||e[9]!==x||e[10]!==n?(h=t.jsx(Vt,{toolName:n,connectionId:l,siblings:o,onSelectInstance:i},x),e[6]=l,e[7]=i,e[8]=o,e[9]=x,e[10]=n,e[11]=h):h=e[11],h}function Vt({toolName:s,connectionId:e,siblings:n,onSelectInstance:l}){const o=Q(),{replayId:i}=tt({strict:!1}),r=(()=>{if(!i)return null;const u=`replay-${i}`,j=sessionStorage.getItem(u);if(!j)return null;sessionStorage.removeItem(u);try{return JSON.parse(j)}catch{return null}})(),c=(()=>{if(!r)return null;const u={};for(const[j,$]of Object.entries(r))$!==null&&typeof $=="object"?u[j]=JSON.stringify($,null,2):u[j]=$;return u})(),[d,a]=E.useState(c??{}),[x,h]=E.useState(r?JSON.stringify(r,null,2):"{}"),[m,f]=E.useState(null),[p,g]=E.useState(null),[b,S]=E.useState(null),[T,y]=E.useState(null),[P,w]=E.useState(!1),[N,A]=E.useState(null),{org:D}=fe(),O=Me(e),C=At(),I=Dt(),{openSidePanel:R}=Et(),U=`${e}:${s}`,M=ge({connectionId:e,orgId:D.id,orgSlug:D.slug}),V=Tt({client:M}),v=V.data?.tools?.find(u=>u.name===s),F=xt(v?._meta),J=u=>{if(!C)return;const j=kt(u.content);j.content.length>0&&(R("chat"),C.sendMessage({tiptapDoc:j}))},[z,L]=E.useState("json"),[q,Y]=E.useState(!1);F&&!q&&(L("ui"),Y(!0));const _=v?.inputSchema?.properties,be=_?Object.keys(_):[],G=be.length>0,X={};if(G&&v?.inputSchema?.properties)for(const u of be)X[u]=v.inputSchema.required?.includes(u)?"":void 0;const ne=u=>Object.prototype.hasOwnProperty.call(d,u),Ve=async()=>{w(!0),y(null),f(null),g(null),S(null),A(null);const u=performance.now();try{if(!M)throw new Error("MCP client is not available");const j=G?{...X,...d}:(()=>{const B=x.trim();if(!B)return{};const H=JSON.parse(B);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();G&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([B,H])=>{if((H.type==="object"||H.type==="array")&&typeof j[B]=="string")try{j[B]=JSON.parse(j[B])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof j[B]=="string"&&j[B]!==""){const Se=Number(j[B]);Number.isNaN(Se)||(j[B]=Se)}});const $=await M.callTool({name:s,arguments:j}),ee=$.structuredContent??$,We=performance.now(),Qe=Math.round(We-u);f(ee),g($),S(j);const Ye=JSON.stringify(ee),ve=new TextEncoder().encode(Ye).length;A({duration:`${Qe}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(j){const $=j instanceof Error?j.message:String(j);y($||"Unknown error occurred");const ee=performance.now();A({duration:`${Math.round(ee-u)}ms`})}finally{w(!1)}},ie=(u,j)=>{a($=>({...$,[u]:j}))},_e=()=>{f(null),g(null),S(null),y(null),A(null)},Je=v?.name??Bt(s),qe=t.jsx(Le,{children:t.jsxs(Be,{children:[t.jsx(Z,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:D.slug},children:o("details.tool.connections")})})}),t.jsx(le,{}),O&&t.jsxs(t.Fragment,{children:[t.jsx(Z,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:D.slug,appSlug:Ct(O)},search:{tab:"tools"},children:O.title})})}),t.jsx(le,{})]}),t.jsx(Z,{children:t.jsx(Ue,{children:Je})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:l,children:[t.jsx(Ie,{className:"h-8 w-auto min-w-[200px]",children:t.jsx($e,{})}),t.jsx(Te,{children:n.map(u=>t.jsx(me,{value:u.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(De,{icon:u.icon,name:u.title,size:"xs",className:"shrink-0"}),u.title]})},u.id))})]}),He=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:o("details.tool.parameters")}),v?.inputSchema?.required&&v.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",o("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:G&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([u,j])=>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:[u,v.inputSchema?.required?.includes(u)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:j.type})]}),j.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.description}),j.type==="object"||j.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(u)?d[u]??"":X[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enterAsJson",{key:u}),rows:3}):j.type==="boolean"?t.jsxs(Ce,{value:ne(u)?String(d[u]??""):"",onValueChange:$=>ie(u,$==="true"),children:[t.jsx(Ie,{children:t.jsx($e,{placeholder:o("details.tool.selectTrueOrFalse")})}),t.jsxs(Te,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(u)?d[u]??"":X[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enter",{key:u})})]},u)):v?.inputSchema&&!G?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:o("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:u=>h(u.target.value),placeholder:o("details.tool.rawJsonExample")})]}):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:o("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:_e,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),o("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),o("details.tool.executeTool")]})})]}),Ke=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:o("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[N&&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(vt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.duration})]}),N.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.tokens})]}),N.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.bytes})]}),N.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:N.cost})})]}),F&&t.jsx(bt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:z==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("ui"),children:t.jsx(pt,{size:14})})}),t.jsx(Ae,{children:o("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:z==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("json"),children:t.jsx(ye,{size:14})})}),t.jsx(Ae,{children:o("details.tool.jsonView")})]})]})})]})]}),T&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(ht,{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(Nt,{className:"h-4 w-4"}),t.jsx(gt,{className:"mb-0",children:o("details.tool.executionFailed")})]}),t.jsx(jt,{className:"text-xs text-destructive",children:T})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:F&&z==="ui"&&M?t.jsx(E.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:o("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:F,toolInfo:v?{tool:v}:void 0,toolInput:b??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:M,onMessage:J,onUpdateModelContext:u=>I?.setAppContext(U,u),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Pt,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{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)),st.success(o("details.tool.copiedToClipboard"))},children:t.jsx(St,{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(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:o("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{breadcrumb:qe,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(De,{icon:O?.icon||null,name:O?.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:[V.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):V.isLoading?t.jsx(oe,{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:V.isSuccess?"ready":V.isLoading?"connecting":"error"})]}),t.jsx($t,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),n.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:o("details.tool.instance")}),Ne]}),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:He}),Ke]})})]})})}function _t(s){const e=k.c(20),{itemId:n,siblings:l,onBack:o}=s,i=Q(),[r,c]=E.useState(l[0]?.id??"");let d;e[0]!==r||e[1]!==l?(d=l.find(f=>f.id===r)?.id??l[0]?.id??"",e[0]=r,e[1]=l,e[2]=d):d=e[2];const a=d;if(!Me(a||void 0)||!a){let f;e[3]!==i?(f=i("details.tool.connectionNotFound"),e[3]=i,e[4]=f):f=e[4];let p;e[5]!==f?(p=t.jsx("h3",{className:"text-lg font-semibold",children:f}),e[5]=f,e[6]=p):p=e[6];let g;e[7]!==i?(g=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=g):g=e[8];let b;e[9]!==g?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[9]=g,e[10]=b):b=e[10];let S;return e[11]!==p||e[12]!==b?(S=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:[p,b]})}),e[11]=p,e[12]=b,e[13]=S):S=e[13],S}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground"})}),e[14]=h):h=e[14];let m;return e[15]!==a||e[16]!==o||e[17]!==l||e[18]!==n?(m=t.jsx(E.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:n,connectionId:a,siblings:l,onSelectInstance:c,onBack:o})}),e[15]=a,e[16]=o,e[17]=l,e[18]=n,e[19]=m):m=e[19],m}function Jt(s){const e=k.c(21),{icon:n,illustration:l,title:o,description:i,buttonProps:r,buttonComponent:c,className:d,children:a}=s;let x;e[0]!==d?(x=W("flex flex-col items-center justify-center py-16 text-center",d),e[0]=d,e[1]=x):x=e[1];let h;e[2]!==n||e[3]!==l?(h=l?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:l}):n?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:n}):null,e[2]=n,e[3]=l,e[4]=h):h=e[4];let m;e[5]!==o?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o}),e[5]=o,e[6]=m):m=e[6];let f;e[7]!==i?(f=i&&t.jsx("div",{className:"text-sm text-muted-foreground",children:i}),e[7]=i,e[8]=f):f=e[8];let p;e[9]!==m||e[10]!==f?(p=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[m,f]}),e[9]=m,e[10]=f,e[11]=p):p=e[11];let g;e[12]!==c||e[13]!==r?(g=(c??r)&&t.jsx("div",{className:"mt-4",children:c??(r&&t.jsx(K,{size:"sm",className:W(r?.className),...r}))}),e[12]=c,e[13]=r,e[14]=g):g=e[14];let b;return e[15]!==a||e[16]!==x||e[17]!==h||e[18]!==p||e[19]!==g?(b=t.jsxs("div",{className:x,children:[h,p,g,a]}),e[15]=a,e[16]=x,e[17]=h,e[18]=p,e[19]=g,e[20]=b):b=e[20],b}const qt={prompt:Lt};function Ht(){const s=k.c(9),e=Re();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=decodeURIComponent(l.itemId);let i;s[1]!==l.appSlug?(i={slug:l.appSlug},s[1]=l.appSlug,s[2]=i):i=s[2];const r=ze(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,a=Kt;let x;return s[5]!==d||s[6]!==o||s[7]!==r?(x=t.jsx(_t,{itemId:o,siblings:r,onBack:d,onUpdate:a}),s[5]=d,s[6]=o,s[7]=r,s[8]=x):x=s[8],x}async function Kt(s){return Promise.resolve()}function Wt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=k.c(52),e=Re();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=Q(),i=decodeURIComponent(l.collectionName),r=decodeURIComponent(l.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:a}=fe();let x;s[3]!==l.appSlug?(x={slug:l.appSlug},s[3]=l.appSlug,s[4]=x):x=s[4];const m=ze(x)[0]??null,f=m?.id??"",p=f||"no-connection",g=f??null;let b;s[5]!==a.id||s[6]!==a.slug||s[7]!==g?(b={connectionId:g,orgId:a.id,orgSlug:a.slug},s[5]=a.id,s[6]=a.slug,s[7]=g,s[8]=b):b=s[8];const S=ge(b),T=Oe(p,i,S);let y;s[9]!==T||s[10]!==r?(y=async _=>{r&&await T.update.mutateAsync({id:r,data:_})},s[9]=T,s[10]=r,s[11]=y):y=s[11];const P=y;let w;s[12]!==i?(w=i?.toLowerCase(),s[12]=i,s[13]=w):w=s[13];const N=w,A=N&&qt[N];let D;s[14]!==i?(D=Wt(i),s[14]=i,s[15]=D):D=s[15];const O=D;let C;s[16]!==a.slug?(C=t.jsx(Z,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:a.slug},children:"Connections"})})}),s[16]=a.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(le,{}),s[18]=I):I=s[18];let R;s[19]!==i||s[20]!==m||s[21]!==a.slug||s[22]!==l.appSlug?(R=m&&t.jsxs(t.Fragment,{children:[t.jsx(Z,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:l.appSlug},search:{tab:i},children:m.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=m,s[21]=a.slug,s[22]=l.appSlug,s[23]=R):R=s[23];let U;s[24]!==O?(U=t.jsx(Z,{children:t.jsx(Ue,{children:O})}),s[24]=O,s[25]=U):U=s[25];let M;s[26]!==R||s[27]!==U||s[28]!==C?(M=t.jsx(Le,{children:t.jsxs(Be,{children:[C,I,R,U]})}),s[26]=R,s[27]=U,s[28]=C,s[29]=M):M=s[29];const V=M;if(A){let _;return s[30]!==A||s[31]!==d||s[32]!==P||s[33]!==r?(_=t.jsx(A,{itemId:r,onBack:d,onUpdate:P}),s[30]=A,s[31]=d,s[32]=P,s[33]=r,s[34]=_):_=s[34],_}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Ot,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let F;s[36]!==o?(F=o("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=o,s[37]=F):F=s[37];let J;s[38]!==o?(J=o("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=o,s[39]=J):J=s[39];let z;s[40]!==o?(z=o("orgs.collectionDetail.goBackButton"),s[40]=o,s[41]=z):z=s[41];let L;s[42]!==d||s[43]!==z?(L={onClick:d,children:z},s[42]=d,s[43]=z,s[44]=L):L=s[44];let q;s[45]!==F||s[46]!==J||s[47]!==L?(q=t.jsx(Jt,{icon:v,title:F,description:J,buttonProps:L}),s[45]=F,s[46]=J,s[47]=L,s[48]=q):q=s[48];let Y;return s[49]!==V||s[50]!==q?(Y=t.jsx(je,{breadcrumb:V,children:q}),s[49]=V,s[50]=q,s[51]=Y):Y=s[51],Y}function Yt(){const s=k.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 n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let r;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ht,{}),s[1]=r):r=s[1],r}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qt,{}),s[2]=i):i=s[2],i}function Ll(){const s=k.c(7),e=Q();let n;s[0]!==e?(n=e("orgs.collectionDetail.loadingAriaLabel"),s[0]=e,s[1]=n):n=s[1];let l;s[2]!==n?(l=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground","aria-label":n})}),s[2]=n,s[3]=l):l=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Yt,{}),s[4]=o):o=s[4];let i;return s[5]!==l?(i=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:l,children:o})}),s[5]=l,s[6]=i):i=s[6],i}export{Ll as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,b as A,j as s,m as z,B as E}from"./index-
|
|
1
|
+
import{c as $,b as A,j as s,m as z,B as E}from"./index-CuR236Ha.js";import{a as S,D as F,b as L,c as O}from"./dropdown-menu-BOsjh_jP.js";import{i as R,n as _}from"./ArrowUp-C8tFP7oQ.js";import{i as V}from"./Check-Ba7uuiUv.js";import{a as I,i as K,c as P}from"./SwitchHorizontal01-wUPLzq-2.js";import{T as W,a as q,b as G,c as H}from"./tooltip-DfT6t3c6.js";import{V as J}from"./view-mode-toggle-Z24MHOHM.js";import{B as Q}from"./badge-BPApNEJW.js";function oe(t){const e=$.c(36),{viewMode:l,onViewModeChange:u,sortKey:M,sortDirection:h,onSort:g,sortOptions:j,filters:b}=t;let v;e[0]!==j?(v=j===void 0?[]:j,e[0]=j,e[1]=v):v=e[1];const N=v;let w;e[2]!==b?(w=b===void 0?[]:b,e[2]=b,e[3]=w):w=e[3];const r=w,i=A();let C;e[4]!==r?(C=r.filter(X),e[4]=r,e[5]=C):C=e[5];const y=C.length;let k;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(I,{size:16}),e[6]=k):k=e[6];let o;e[7]!==y?(o=y>0&&s.jsx(Q,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:y}),e[7]=y,e[8]=o):o=e[8];let n;e[9]!==o?(n=s.jsx(W,{asChild:!0,children:s.jsx(F,{asChild:!0,children:s.jsxs(E,{variant:"outline",size:"icon",className:"relative",children:[k,o]})})}),e[9]=o,e[10]=n):n=e[10];let a;e[11]!==i?(a=i("collections.collectionDisplayButton.displayAndFilters"),e[11]=i,e[12]=a):a=e[12];let c;e[13]!==a?(c=s.jsx(q,{children:a}),e[13]=a,e[14]=c):c=e[14];let d;e[15]!==c||e[16]!==n?(d=s.jsx(G,{children:s.jsxs(H,{children:[n,c]})}),e[15]=c,e[16]=n,e[17]=d):d=e[17];let x;e[18]!==u||e[19]!==l?(x=u&&l&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(J,{value:l,onValueChange:u,fullWidth:!0,options:[{value:"table",icon:s.jsx(K,{})},{value:"cards",icon:s.jsx(P,{})}]})}),e[18]=u,e[19]=l,e[20]=x):x=e[20];let m;e[21]!==g||e[22]!==h||e[23]!==M||e[24]!==N||e[25]!==i?(m=N.length>0&&g&&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:i("collections.collectionDisplayButton.sortBy")}),N.map(T=>{const B=M===T.id;return s.jsx(S,{onClick:()=>g(T.id),className:z("h-8 px-2 py-0 cursor-pointer",B&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[B&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!B&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:T.label}),B&&h&&(h==="asc"?s.jsx(R,{size:16,className:"text-foreground shrink-0"}):s.jsx(_,{size:16,className:"text-foreground shrink-0"}))]})},T.id)})]}),e[21]=g,e[22]=h,e[23]=M,e[24]=N,e[25]=i,e[26]=m):m=e[26];let p;e[27]!==r?(p=r.map(U),e[27]=r,e[28]=p):p=e[28];let f;e[29]!==x||e[30]!==m||e[31]!==p?(f=s.jsxs(L,{align:"end",className:"w-[200px] p-0 gap-0",children:[x,m,p]}),e[29]=x,e[30]=m,e[31]=p,e[32]=f):f=e[32];let D;return e[33]!==d||e[34]!==f?(D=s.jsxs(O,{children:[d,f]}),e[33]=d,e[34]=f,e[35]=D):D=e[35],D}function U(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 l=t.value===e.id;return s.jsx(S,{onClick:()=>t.onChange(e.id),className:z("h-8 px-2 py-0 cursor-pointer",l&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[l&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!l&&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 X(t){return t.value!=="ALL"}export{oe as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,m as b,j as n,k as v}from"./index-
|
|
1
|
+
import{c as k,m as b,j as n,k as v}from"./index-CuR236Ha.js";import{i as w}from"./SearchMd-CBT_BZMU.js";function S(j){const e=k.c(21),{value:m,onChange:d,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?n.jsx(v,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):n.jsx(w,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==d?(r=N=>d(N.target.value),e[6]=d,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==m?(o=n.jsx("input",{type:"text",value:m,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]=m,e[13]=o):o=e[13];let a;e[14]!==s||e[15]!==l||e[16]!==o?(a=n.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=n.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{S as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as r,m as C,b as S}from"./index-
|
|
1
|
+
import{c as k,j as r,m as C,b as S}from"./index-CuR236Ha.js";import{d as R,e as H,a as T,T as I,b as W,c as z}from"./table-F2bqjmIf.js";import{i as D,n as E}from"./ArrowUp-C8tFP7oQ.js";function K(y){const e=k.c(29),{columns:n,data:f,sortKey:u,sortDirection:x,onSort:c,onRowClick:a,rowClassName:d}=y;let p;e[0]!==x?(p=function(s,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=function(s,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return s===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]=o):o=e[2];const g=o;let t;if(e[3]!==n||e[4]!==c||e[5]!==b||e[6]!==u){let i;e[8]!==n.length||e[9]!==c||e[10]!==b||e[11]!==u?(i=(s,h)=>{const N=u===s.id;return r.jsx(R,{className:C(g(h,n.length),"group transition-colors select-none",s.sortable&&"hover:bg-accent cursor-pointer",s.rowClassName,s.cellClassName),onClick:s.sortable&&c?()=>c(s.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[s.header,s.sortable&&b(s.id,N)]})},s.id)},e[8]=n.length,e[9]=c,e[10]=b,e[11]=u,e[12]=i):i=e[12],t=n.map(i),e[3]=n,e[4]=c,e[5]=b,e[6]=u,e[7]=t}else t=e[7];let l;e[13]!==t?(l=r.jsx(H,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:t})}),e[13]=t,e[14]=l):l=e[14];let j;if(e[15]!==n||e[16]!==f||e[17]!==a||e[18]!==d){let i;e[20]!==n||e[21]!==a||e[22]!==d?(i=(s,h)=>{const N=d?.(s);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",a?"cursor-pointer":"",N),onClick:a?()=>a(s):void 0,children:n.map(m=>r.jsx(I,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.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(s):m.accessor?m.accessor(s):null})},m.id))},h)},e[20]=n,e[21]=a,e[22]=d,e[23]=i):i=e[23],j=f.map(i),e[15]=n,e[16]=f,e[17]=a,e[18]=d,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(W,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==l||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[l,w]}),e[26]=l,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(16),{columns:n,data:f,isLoading:u,sortKey:x,sortDirection:c,onSort:a,onRowClick:d,emptyState:p}=y,b=u===void 0?!1:u,o=S();if(b){let t;e[0]!==o?(t=o("collections.collectionTableWrapper.loading"),e[0]=o,e[1]=t):t=e[1];let l;return e[2]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:t})}),e[2]=t,e[3]=l):l=e[3],l}if(f.length===0){let t;e[4]!==p||e[5]!==o?(t=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:o("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=o,e[6]=t):t=e[6];let l;return e[7]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:t}),e[7]=t,e[8]=l):l=e[8],l}let g;return e[9]!==n||e[10]!==f||e[11]!==d||e[12]!==a||e[13]!==c||e[14]!==x?(g=r.jsx("div",{className:"flex-1",children:r.jsx(K,{columns:n,data:f,sortKey:x,sortDirection:c,onSort:a,onRowClick:d})}),e[9]=n,e[10]=f,e[11]=d,e[12]=a,e[13]=c,e[14]=x,e[15]=g):g=e[15],g}export{B as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,m as u,j as m}from"./index-
|
|
1
|
+
import{c as f,m as u,j as m}from"./index-CuR236Ha.js";import{B as g}from"./badge-BPApNEJW.js";function h(x){const e=f.c(12),{tabs:l,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]!==l){let c;e[6]!==n||e[7]!==s?(c=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]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,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,m as i,j as n}from"./index-
|
|
1
|
+
import{c as d,m as i,j as n}from"./index-CuR236Ha.js";import{_ as m}from"./index-BomFvFPo.js";import{e as N,b as j,h as b,a as w,d as y}from"./dialog-CfCzKpCQ.js";import{i as C}from"./SearchMd-CBT_BZMU.js";function $(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 z(a){const e=d.c(26);let t,s,o,l,r,h;e[0]!==a?({title:r,description:h,children:t,className:s,filter:o,...l}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r,e[6]=h):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5],h=e[6]);const v=r===void 0?"Command Palette":r,k=h===void 0?"Search for a command to run...":h;let c;e[7]!==v?(c=n.jsx(j,{children:v}),e[7]=v,e[8]=c):c=e[8];let p;e[9]!==k?(p=n.jsx(b,{children:k}),e[9]=k,e[10]=p):p=e[10];let u;e[11]!==c||e[12]!==p?(u=n.jsxs(w,{className:"sr-only",children:[c,p]}),e[11]=c,e[12]=p,e[13]=u):u=e[13];let f;e[14]!==s?(f=i("overflow-hidden p-0",s),e[14]=s,e[15]=f):f=e[15];let x;e[16]!==t||e[17]!==o?(x=n.jsx($,{filter:o,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[16]=t,e[17]=o,e[18]=x):x=e[18];let g;e[19]!==f||e[20]!==x?(g=n.jsx(y,{className:f,closeButtonClassName:"hidden",children:x}),e[19]=f,e[20]=x,e[21]=g):g=e[21];let _;return e[22]!==l||e[23]!==u||e[24]!==g?(_=n.jsxs(N,{...l,children:[u,g]}),e[22]=l,e[23]=u,e[24]=g,e[25]=_):_=e[25],_}function G(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(C,{className:"size-4 shrink-0 text-muted-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 L(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 R(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:"text-muted-foreground px-4 py-4 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}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("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 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("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 P(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,R as a,B as b,P as c,G as d,$ as e,z as f,H as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as E,b as $,j as i,m as Le,p as se,B as ve,u as Ge,r as B,a as Te,q as it,d as ot,s as st,e as Ye,v as Se,w as Je,Q as nt,E as lt,K as Fe,x as $e,N as at}from"./index-CuR236Ha.js";import{L as ct,s as ke,S as He,i as mt,n as Ie,C as Xe,p as Re}from"./self-tool-result-DmMSQVL1.js";import{A as dt}from"./auth-entry-DjciHJhD.js";import{A as ut}from"./auth-split-layout-B1xiK1IR.js";import{O as Be}from"./organization-choice-B6rLkOvV.js";import{I as gt}from"./input-LqGTjd_-.js";import{D as ft,a as We,b as pt,c as ht}from"./dropdown-menu-BOsjh_jP.js";import{S as bt,u as xt,W as yt,g as jt,a as Ct}from"./use-mcp-client-Ldih0CNF.js";import{i as Ot}from"./XCircle-BthmWHMF.js";import{i as vt}from"./ArrowUpRight-CYabXmbx.js";import"./integration-icon-By0eBeMX.js";import"./Tool02-BLEoObxL.js";import"./agent-icon-pCvoZl7q.js";import"./AlertCircle-BM-SGXEb.js";import"./Tool01-EU3OKI0K.js";import"./ArrowUp-C8tFP7oQ.js";import"./Settings02-DAqQKtfC.js";import"./TrendUp01-Dnoj0uzg.js";import"./ZapSquare-BMfQVTWg.js";import"./Users03-CQVGNtmL.js";import"./CheckCircle-DqAwJ2kz.js";import"./Check-Ba7uuiUv.js";import"./ChevronDown-HBIiFunc.js";import"./ChevronRight-KgA6xHru.js";import"./ChevronUp-De0pNXr0.js";import"./DotsVertical-DWkfCVOi.js";import"./Stars02-CwXREUM0.js";import"./Copy01-DYlP_Xtq.js";import"./CpuChip01-DU2mm5Rx.js";import"./CreditCard01-BNQMzQ0s.js";import"./Eye-pZSN52Qe.js";import"./FilterLines-UMA3hIS0.js";import"./Star01-ybggVLHX.js";import"./Palette-C1hIu3Ny.js";import"./SwitchHorizontal01-wUPLzq-2.js";import"./HardDrive-srCmcA0T.js";import"./Key01-Cme8uyqy.js";import"./LayoutLeft-CxujHsXA.js";import"./LinkExternal01-CQ9ayxbn.js";import"./LogOut01-1Wv_uc1f.js";import"./Monitor01-Dcr8x5_p.js";import"./Sun-C2vH3C3t.js";import"./Play-S-SSyOWn.js";import"./Plus-BH5RlQYR.js";import"./SearchLg-ClGsPrv4.js";import"./SearchMd-CBT_BZMU.js";import"./Shield01-CBEZ92kQ.js";import"./Stars01-P8FnS4Ob.js";import"./Trash01-Ck-P8aGE.js";import"./Upload01-BfzUamTH.js";import"./User01-nRScdv2C.js";import"./Users01-DkQNBnK5.js";import"./XClose-BaQnC9xI.js";import"./X-FgZ-pUjZ.js";import"./Zap-Be3onl5O.js";import"./dialog-CfCzKpCQ.js";import"./tooltip-DfT6t3c6.js";import"./companions-core-CPhEHg4n.js";import"./extract-connection-data-i2ZtRXrE.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-B2s3ApVy.js";import"./form-YDRn1yMf.js";import"./label-DbueIBWh.js";import"./use-debounced-value-Qlcgz1AF.js";import"./authenticate-and-persist-oauth-Cviuo8Q1.js";import"./mcp-oauth-D9FdzYSb.js";import"./auth-Dt1FgVt-.js";import"./use-is-desktop-app-BNujXJc_.js";import"./spinner-LLDWVi4B.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-DBrhL9V4.js";const qe={"pt-BR":"https://decocms.com/agendar",en:"https://www.decocms.com/en/schedule"},Ve=["https://decoims.com/image?src=decocms%2Fb07a1c19-0cd6-49c8-b326-86055ee78605%2Fauthor-1763423987973-baby.jpeg&quality=original&fit=cover&width=200&height=200","https://decoims.com/decocms/07c2daf4-a3c2-485e-a1a8-341585a06e3b/cecilia.png","https://decoims.com/decocms/48013ca2-3277-464b-b0f1-dd5f1f08d986/tavano.png"],St="var(--brand-green-dark)";function Me({siteUrl:t,email:e,locale:o}){const s=(o&&qe[o])??qe["pt-BR"]??"https://decocms.com/agendar",r=new URL(s);return t&&r.searchParams.set("siteUrl",t),e&&r.searchParams.set("email",e),r.toString()}function _t(t){const e=E.c(15),{href:o,size:s,className:r,orgId:a}=t,l=s===void 0?"lg":s,n=$();let c;e[0]!==r?(c=Le("w-full",r),e[0]=r,e[1]=c):c=e[1];let m;e[2]!==a?(m=()=>se("commerce_onboarding_meeting_cta_clicked",{placement:"visual_card",organization_id:a}),e[2]=a,e[3]=m):m=e[3];let u;e[4]!==n?(u=n("routes.commerceOnboarding.scheduleMeeting.scheduleButton"),e[4]=n,e[5]=u):u=e[5];let d;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(vt,{size:16}),e[6]=d):d=e[6];let g;e[7]!==o||e[8]!==m||e[9]!==u?(g=i.jsxs("a",{href:o,target:"_blank",rel:"noreferrer",onClick:m,children:[u,d]}),e[7]=o,e[8]=m,e[9]=u,e[10]=g):g=e[10];let p;return e[11]!==l||e[12]!==c||e[13]!==g?(p=i.jsx(ve,{asChild:!0,variant:"outline",size:l,className:c,children:g}),e[11]=l,e[12]=c,e[13]=g,e[14]=p):p=e[14],p}function wt(t){const e=E.c(13),{size:o}=t,s=o===void 0?72:o,r=$();let a;e[0]!==r?(a=r("routes.commerceOnboarding.scheduleMeeting.expertAlt"),e[0]=r,e[1]=a):a=e[1];const l=a;let n;e[2]!==s?(n=Math.round(s*.3),e[2]=s,e[3]=n):n=e[3];const c=n;let m;e[4]!==s?(m={height:s},e[4]=s,e[5]=m):m=e[5];let u;e[6]!==l||e[7]!==c||e[8]!==s?(u=Ve.map((g,p)=>i.jsxs("div",{className:"relative shrink-0",style:{width:s,height:s,marginLeft:p===0?0:-c,zIndex:Ve.length-p},children:[i.jsx("div",{className:"h-full w-full overflow-hidden rounded-full border-4 border-card bg-muted",children:i.jsx("img",{src:g,alt:l,className:"h-full w-full object-cover",loading:"lazy"})}),p===0&&i.jsxs("span",{className:"absolute bottom-1.5 right-1.5 flex h-3.5 w-3.5",children:[i.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-success opacity-60 motion-safe:animate-ping","aria-hidden":!0}),i.jsx("span",{className:"relative inline-flex h-3.5 w-3.5 rounded-full border-2 border-card bg-success"})]})]},g)),e[6]=l,e[7]=c,e[8]=s,e[9]=u):u=e[9];let d;return e[10]!==m||e[11]!==u?(d=i.jsx("div",{className:"flex items-end",style:m,children:u}),e[10]=m,e[11]=u,e[12]=d):d=e[12],d}function De(t){const e=E.c(19),{href:o,orgId:s}=t,r=$();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx("div",{className:"h-20",style:{backgroundColor:St}}),e[0]=a):a=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx("div",{className:"-mt-9 mb-4",children:i.jsx(wt,{})}),e[1]=l):l=e[1];let n;e[2]!==r?(n=r("routes.commerceOnboarding.scheduleMeeting.headline"),e[2]=r,e[3]=n):n=e[3];let c;e[4]!==n?(c=i.jsx("h2",{className:"text-lg font-medium leading-6 text-foreground",children:n}),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==r?(m=r("routes.commerceOnboarding.scheduleMeeting.body"),e[6]=r,e[7]=m):m=e[7];let u;e[8]!==m?(u=i.jsx("p",{className:"text-sm leading-5 text-muted-foreground",children:m}),e[8]=m,e[9]=u):u=e[9];let d;e[10]!==c||e[11]!==u?(d=i.jsxs("div",{className:"grid gap-1.5",children:[c,u]}),e[10]=c,e[11]=u,e[12]=d):d=e[12];let g;e[13]!==o||e[14]!==s?(g=i.jsx(_t,{href:o,size:"lg",className:"mt-6",orgId:s}),e[13]=o,e[14]=s,e[15]=g):g=e[15];let p;return e[16]!==d||e[17]!==g?(p=i.jsx("div",{className:"relative flex h-full w-full items-center justify-center p-10",children:i.jsxs("div",{className:"w-full max-w-[440px] overflow-hidden rounded-3xl border border-border bg-card card-shadow",children:[a,i.jsxs("div",{className:"px-8 pb-8",children:[l,d,g]})]})}),e[16]=d,e[17]=g,e[18]=p):p=e[18],p}function Ze(t){const e=E.c(10),{host:o}=t,s=`https://www.google.com/s2/favicons?domain=${o}&sz=128`;let r,a,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-7 w-7 dark:hidden"}),a=i.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-7 w-7 hidden dark:block"}),l=i.jsx("div",{className:"h-6 w-px rotate-12 bg-border","aria-hidden":"true"}),e[0]=r,e[1]=a,e[2]=l):(r=e[0],a=e[1],l=e[2]);let n;e[3]!==s?(n=i.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-white",children:i.jsx("img",{src:s,alt:"",className:"h-5 w-5",loading:"lazy"})}),e[3]=s,e[4]=n):n=e[4];let c;e[5]!==o?(c=i.jsx("span",{className:"text-lg font-medium text-foreground",children:o}),e[5]=o,e[6]=c):c=e[6];let m;return e[7]!==n||e[8]!==c?(m=i.jsxs("div",{className:"flex items-center gap-3",children:[r,a,l,n,c]}),e[7]=n,e[8]=c,e[9]=m):m=e[9],m}function Ae(t){const e=E.c(5),{variant:o}=t,s=$();let r;e[0]!==s||e[1]!==o?(r=s(o==="workspace"?"routes.commerceOnboarding.loading.preparingWorkspace":"routes.commerceOnboarding.loading.preparing"),e[0]=s,e[1]=o,e[2]=r):r=e[2];const a=r;let l;return e[3]!==a?(l=i.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:i.jsx(ct,{label:a,className:"text-muted-foreground"})}),e[3]=a,e[4]=l):l=e[4],l}function si(){const t=E.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(It,{}),t[0]=e):e=t[0],e}const et=B.createContext(null),tt=()=>B.useContext(et);function Nt(){const t=E.c(22),[e,o]=Se(),s=e.language==="pt-BR"?"PT-BR":"EN";let r;t[0]!==s?(r=i.jsx(ft,{asChild:!0,children:i.jsx("button",{className:"text-sm font-medium text-foreground/70 hover:text-foreground transition-colors",type:"button",children:s})}),t[0]=s,t[1]=r):r=t[1];let a;t[2]!==o?(a=()=>{o(Ut)},t[2]=o,t[3]=a):a=t[3];const l=e.language==="en"&&"bg-accent";let n;t[4]!==l?(n=Le(l),t[4]=l,t[5]=n):n=t[5];let c;t[6]!==a||t[7]!==n?(c=i.jsx(We,{onClick:a,className:n,children:"English"}),t[6]=a,t[7]=n,t[8]=c):c=t[8];let m;t[9]!==o?(m=()=>{o(Et)},t[9]=o,t[10]=m):m=t[10];const u=e.language==="pt-BR"&&"bg-accent";let d;t[11]!==u?(d=Le(u),t[11]=u,t[12]=d):d=t[12];let g;t[13]!==m||t[14]!==d?(g=i.jsx(We,{onClick:m,className:d,children:"Português (Brasil)"}),t[13]=m,t[14]=d,t[15]=g):g=t[15];let p;t[16]!==c||t[17]!==g?(p=i.jsxs(pt,{align:"end",children:[c,g]}),t[16]=c,t[17]=g,t[18]=p):p=t[18];let v;return t[19]!==r||t[20]!==p?(v=i.jsxs(ht,{children:[r,p]}),t[19]=r,t[20]=p,t[21]=v):v=t[21],v}function Et(t){return{...t,language:"pt-BR"}}function Ut(t){return{...t,language:"en"}}function T(t){const e=E.c(17);let o,s,r;e[0]!==t?({visual:r,children:o,...s}=t,e[0]=t,e[1]=o,e[2]=s,e[3]=r):(o=e[1],s=e[2],r=e[3]);let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/commerce-onboarding"},e[4]=a):a=e[4];const l=Ge(a),{data:n}=Te.useSession(),[c]=Se(),m=n?.user?.email;let u;e[5]!==c.language||e[6]!==l.siteUrl||e[7]!==m?(u=Me({siteUrl:l.siteUrl,email:m,locale:c.language}),e[5]=c.language,e[6]=l.siteUrl,e[7]=m,e[8]=u):u=e[8];const d=u;let g;e[9]!==d||e[10]!==r?(g=r??i.jsx(De,{href:d}),e[9]=d,e[10]=r,e[11]=g):g=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsxs("div",{className:"flex justify-between items-start mb-8",children:[i.jsx("div",{}),i.jsx(Nt,{})]}),e[12]=p):p=e[12];let v;return e[13]!==o||e[14]!==s||e[15]!==g?(v=i.jsxs(ut,{...s,visual:g,children:[p,o]}),e[13]=o,e[14]=s,e[15]=g,e[16]=v):v=e[16],v}function Pt(t){return{signUpFailed:t("routes.commerceOnboarding.authCopy.signUpFailed"),signInFailed:t("routes.commerceOnboarding.authCopy.signInFailed"),authenticationFailed:t("routes.commerceOnboarding.authCopy.authenticationFailed"),resetEmailFailed:t("routes.commerceOnboarding.authCopy.resetEmailFailed"),otpSendFailed:t("routes.commerceOnboarding.authCopy.otpSendFailed"),invalidCode:t("routes.commerceOnboarding.authCopy.invalidCode"),invalidEmail:t("routes.commerceOnboarding.authCopy.invalidEmail"),invalidEmailOrPassword:t("routes.commerceOnboarding.authCopy.invalidEmailOrPassword"),accountExists:t("routes.commerceOnboarding.authCopy.accountExists"),networkError:t("routes.commerceOnboarding.authCopy.networkError"),tooManyAttempts:t("routes.commerceOnboarding.authCopy.tooManyAttempts"),invalidOrExpiredCode:t("routes.commerceOnboarding.authCopy.invalidOrExpiredCode"),genericError:t("routes.commerceOnboarding.authCopy.genericError"),resetPasswordTitle:t("routes.commerceOnboarding.authCopy.resetPasswordTitle"),verificationCodeTitle:t("routes.commerceOnboarding.authCopy.verificationCodeTitle"),welcomeTitle:t("routes.commerceOnboarding.authCopy.welcomeTitle"),resetPasswordSubtitle:t("routes.commerceOnboarding.authCopy.resetPasswordSubtitle"),codeSentTo:e=>t("routes.commerceOnboarding.authCopy.codeSentTo",{email:e}),defaultSubtitle:t("routes.commerceOnboarding.authCopy.defaultSubtitle"),resetEmailSent:t("routes.commerceOnboarding.authCopy.resetEmailSent"),continueWith:e=>t("routes.commerceOnboarding.authCopy.continueWith",{provider:e}),divider:t("routes.commerceOnboarding.authCopy.divider"),emailLabel:t("routes.commerceOnboarding.authCopy.emailLabel"),emailPlaceholder:t("routes.commerceOnboarding.authCopy.emailPlaceholder"),sending:t("routes.commerceOnboarding.authCopy.sending"),sendCode:t("routes.commerceOnboarding.authCopy.sendCode"),verificationCodeLabel:t("routes.commerceOnboarding.authCopy.verificationCodeLabel"),enterCodePlaceholder:t("routes.commerceOnboarding.authCopy.enterCodePlaceholder"),verifying:t("routes.commerceOnboarding.authCopy.verifying"),verify:t("routes.commerceOnboarding.authCopy.verify"),useDifferentEmail:t("routes.commerceOnboarding.authCopy.useDifferentEmail"),sendResetLink:t("routes.commerceOnboarding.authCopy.sendResetLink"),nameLabel:t("routes.commerceOnboarding.authCopy.nameLabel"),namePlaceholder:t("routes.commerceOnboarding.authCopy.namePlaceholder"),passwordLabel:t("routes.commerceOnboarding.authCopy.passwordLabel"),forgotPassword:t("routes.commerceOnboarding.authCopy.forgotPassword"),creatingAccount:t("routes.commerceOnboarding.authCopy.creatingAccount"),signingIn:t("routes.commerceOnboarding.authCopy.signingIn"),continue:t("routes.commerceOnboarding.authCopy.continue"),backToSignIn:t("routes.commerceOnboarding.authCopy.backToSignIn"),signInWithPassword:t("routes.commerceOnboarding.authCopy.signInWithPassword"),alreadyHaveAccount:t("routes.commerceOnboarding.authCopy.alreadyHaveAccount"),dontHaveAccount:t("routes.commerceOnboarding.authCopy.dontHaveAccount"),signIn:t("routes.commerceOnboarding.authCopy.signIn"),signUp:t("routes.commerceOnboarding.authCopy.signUp"),signInWithEmailCode:t("routes.commerceOnboarding.authCopy.signInWithEmailCode")}}function Ke(t,e){switch(e){case"Enter a website URL.":return t("routes.commerceOnboarding.siteUrl.enterUrl");case"Use an HTTP or HTTPS website URL.":return t("routes.commerceOnboarding.siteUrl.useHttpOrHttps");case"Enter a valid website URL.":return t("routes.commerceOnboarding.siteUrl.enterValidUrl");case"__configurationFailed":return t("routes.commerceOnboarding.configurationFailed");default:return e}}let Qe=!1;function It(){const t=Ge({from:"/commerce-onboarding"}),{org:e,siteUrl:o}=t,s=ke(o);return!Qe&&it()&&(Qe=!0,se("commerce_onboarding_viewed",{site_url:o,domain:s??void 0,...s?{$set:{last_scanned_domain:s}}:{}})),i.jsx(et.Provider,{value:s,children:i.jsx(Rt,{requestedOrgSlug:e,siteUrl:o})})}function Rt(t){const e=E.c(14),{requestedOrgSlug:o,siteUrl:s}=t,r=$(),{data:a,isPending:l}=Te.useSession(),n=tt();if(l){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(T,{children:i.jsx(Ae,{variant:"generic"})}),e[0]=m):m=e[0],m}if(!a){const m=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let u;e[1]!==r?(u=r("routes.commerceOnboarding.unlockDiagnostic"),e[1]=r,e[2]=u):u=e[2];let d;e[3]!==n?(d=n?i.jsx(Ze,{host:n}):void 0,e[3]=n,e[4]=d):d=e[4];let g;e[5]!==r?(g=Pt(r),e[5]=r,e[6]=g):g=e[6];let p;return e[7]!==u||e[8]!==d||e[9]!==g?(p=i.jsx(T,{children:i.jsx(dt,{callbackUrl:m,allowAutoLogin:!1,title:u,subtitle:null,brand:d,copy:g})}),e[7]=u,e[8]=d,e[9]=g,e[10]=p):p=e[10],p}let c;return e[11]!==o||e[12]!==s?(c=i.jsx(zt,{requestedOrgSlug:o,siteUrl:s}),e[11]=o,e[12]=s,e[13]=c):c=e[13],c}function zt(t){const e=E.c(95),{requestedOrgSlug:o,siteUrl:s}=t,r=$(),a=ot(),l=st(),[n,c]=B.useState(null),[m,u]=B.useState(null),d=l.data?.map(kt)??[];let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={mutationFn:Lt,retry:!1,onSuccess:f=>{u(f)}},e[0]=g):g=e[0];const p=Ye(g);if(l.isPending){let f;return e[1]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(T,{children:i.jsx(Ae,{variant:"workspace"})}),e[1]=f):f=e[1],f}if(l.error){let f;e[2]!==r?(f=r("routes.commerceOnboarding.couldNotLoadOrgs"),e[2]=r,e[3]=f):f=e[3];let h;e[4]!==r?(h=r("routes.commerceOnboarding.retryToConfigureCommerce"),e[4]=r,e[5]=h):h=e[5];let x;e[6]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=x):x=e[7];let j;e[8]!==l?(j=()=>l.refetch(),e[8]=l,e[9]=j):j=e[9];let O;return e[10]!==f||e[11]!==h||e[12]!==x||e[13]!==j?(O=i.jsx(Ce,{title:f,description:h,actionLabel:x,onRetry:j}),e[10]=f,e[11]=h,e[12]=x,e[13]=j,e[14]=O):O=e[14],O}const v=o?d.find(f=>f.slug===o):null;if(v){let f;return e[15]!==v||e[16]!==s?(f=i.jsx(je,{org:v,initialSiteUrl:s}),e[15]=v,e[16]=s,e[17]=f):f=e[17],f}if(o){let f;e[18]!==r?(f=r("routes.commerceOnboarding.orgNotFound"),e[18]=r,e[19]=f):f=e[19];let h;e[20]!==r?(h=r("routes.commerceOnboarding.couldNotFindOrg"),e[20]=r,e[21]=h):h=e[21];let x;e[22]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[22]=r,e[23]=x):x=e[23];let j;e[24]!==l?(j=()=>l.refetch(),e[24]=l,e[25]=j):j=e[25];let O;return e[26]!==f||e[27]!==h||e[28]!==x||e[29]!==j?(O=i.jsx(Ce,{title:f,description:h,actionLabel:x,onRetry:j}),e[26]=f,e[27]=h,e[28]=x,e[29]=j,e[30]=O):O=e[30],O}if(n){let f;return e[31]!==n||e[32]!==s?(f=i.jsx(je,{org:n,initialSiteUrl:s}),e[31]=n,e[32]=s,e[33]=f):f=e[33],f}if(d.length===1&&d[0]){let f;return e[34]!==d[0]||e[35]!==s?(f=i.jsx(je,{org:d[0],initialSiteUrl:s}),e[34]=d[0],e[35]=s,e[36]=f):f=e[36],f}if(d.length>1){let f;e[37]!==r?(f=r("routes.commerceOnboarding.chooseOrg"),e[37]=r,e[38]=f):f=e[38];let h;e[39]!==r?(h=r("routes.commerceOnboarding.selectWhereCommerceContinues"),e[39]=r,e[40]=h):h=e[40];let x;e[41]!==f||e[42]!==h?(x=i.jsx(W,{title:f,description:h}),e[41]=f,e[42]=h,e[43]=x):x=e[43];let j;e[44]!==r?(j=r("routes.commerceOnboarding.authCopy.continue"),e[44]=r,e[45]=j):j=e[45];let O;e[46]!==a||e[47]!==s?(O=V=>a({to:"/commerce-onboarding",search:{org:V.slug,siteUrl:s}}),e[46]=a,e[47]=s,e[48]=O):O=e[48];let C;e[49]!==d||e[50]!==j||e[51]!==O?(C=i.jsx(He,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:i.jsx(Be,{organizations:d,selectLabel:j,onSelected:O})}),e[49]=d,e[50]=j,e[51]=O,e[52]=C):C=e[52];let D;return e[53]!==x||e[54]!==C?(D=i.jsx(T,{children:i.jsxs("div",{className:"grid gap-10",children:[x,C]})}),e[53]=x,e[54]=C,e[55]=D):D=e[55],D}if(!m){let f;e[56]!==p?(f=()=>{p.reset(),p.mutate()},e[56]=p,e[57]=f):f=e[57];let h;return e[58]!==p||e[59]!==f?(h=i.jsx(Tt,{mutation:p,onRetry:f}),e[58]=p,e[59]=f,e[60]=h):h=e[60],h}const b=m;if(b?.success&&(b.status==="created"||b.status==="joined"||b.status==="already_has_organization")&&b.organization){let f;return e[61]!==b.organization||e[62]!==s?(f=i.jsx(je,{org:b.organization,initialSiteUrl:s}),e[61]=b.organization,e[62]=s,e[63]=f):f=e[63],f}if(b?.status==="ambiguous"&&b.organizations&&b.organizations.length>0){let f;e[64]!==r?(f=r("routes.commerceOnboarding.chooseOrg"),e[64]=r,e[65]=f):f=e[65];let h;e[66]!==r?(h=r("routes.commerceOnboarding.emailAccessMultipleOrgs"),e[66]=r,e[67]=h):h=e[67];let x;e[68]!==f||e[69]!==h?(x=i.jsx(W,{title:f,description:h}),e[68]=f,e[69]=h,e[70]=x):x=e[70];const j=b.domain??void 0;let O;e[71]!==a||e[72]!==s?(O=(V,q)=>{Je(),c({...V,slug:q}),a({to:"/commerce-onboarding",search:{org:q,siteUrl:s}})},e[71]=a,e[72]=s,e[73]=O):O=e[73];let C;e[74]!==b.organizations||e[75]!==j||e[76]!==O?(C=i.jsx(He,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:i.jsx(Be,{organizations:b.organizations,domain:j,onJoined:O})}),e[74]=b.organizations,e[75]=j,e[76]=O,e[77]=C):C=e[77];let D;return e[78]!==x||e[79]!==C?(D=i.jsx(T,{children:i.jsxs("div",{className:"grid gap-10",children:[x,C]})}),e[78]=x,e[79]=C,e[80]=D):D=e[80],D}let w;e[81]!==r?(w=r("routes.commerceOnboarding.onboardingNeedsSupport"),e[81]=r,e[82]=w):w=e[82];let N;e[83]!==b?.error||e[84]!==r?(N=b?.error??r("routes.commerceOnboarding.couldNotDetermineOrg"),e[83]=b?.error,e[84]=r,e[85]=N):N=e[85];let P;e[86]!==r?(P=r("routes.commerceOnboarding.retryAgain"),e[86]=r,e[87]=P):P=e[87];let U;e[88]!==p?(U=()=>{u(null),p.reset()},e[88]=p,e[89]=U):U=e[89];let M;return e[90]!==w||e[91]!==N||e[92]!==P||e[93]!==U?(M=i.jsx(Ce,{title:w,description:N,actionLabel:P,onRetry:U}),e[90]=w,e[91]=N,e[92]=P,e[93]=U,e[94]=M):M=e[94],M}async function Lt(){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&&Je(),e}function kt(t){return{id:t.id,name:t.name,slug:t.slug,logo:t.logo??null}}function Tt(t){const e=E.c(16),{mutation:o,onRetry:s}=t,r=$(),a=B.useRef(!1);let l;e[0]!==o?(l=u=>{!u||a.current||(a.current=!0,o.mutate())},e[0]=o,e[1]=l):l=e[1];const n=l;if(o.error){let u;e[2]!==r?(u=r("routes.commerceOnboarding.onboardingUnavailable"),e[2]=r,e[3]=u):u=e[3];let d;e[4]!==r?(d=r("routes.commerceOnboarding.couldNotPrepareOrg"),e[4]=r,e[5]=d):d=e[5];let g;e[6]!==r?(g=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=g):g=e[7];let p;return e[8]!==s||e[9]!==u||e[10]!==d||e[11]!==g?(p=i.jsx(Ce,{title:u,description:d,actionLabel:g,onRetry:s}),e[8]=s,e[9]=u,e[10]=d,e[11]=g,e[12]=p):p=e[12],p}let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(Ae,{variant:"generic"}),e[13]=c):c=e[13];let m;return e[14]!==n?(m=i.jsx(T,{children:i.jsx("div",{ref:n,children:c})}),e[14]=n,e[15]=m):m=e[15],m}function W(t){const e=E.c(8),{title:o,description:s}=t,r=tt();let a;e[0]!==r?(a=r?i.jsx(Ze,{host:r}):i.jsxs("div",{children:[i.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),i.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=r,e[1]=a):a=e[1];let l;e[2]!==s||e[3]!==o?(l=(o||s)&&i.jsxs("div",{className:"space-y-2",children:[o&&i.jsx("h1",{className:"text-2xl font-medium leading-8",children:o}),s&&i.jsx("p",{className:"text-base text-muted-foreground leading-6",children:s})]}),e[2]=s,e[3]=o,e[4]=l):l=e[4];let n;return e[5]!==a||e[6]!==l?(n=i.jsxs("div",{className:"grid gap-10",children:[a,l]}),e[5]=a,e[6]=l,e[7]=n):n=e[7],n}function Ce(t){const e=E.c(9),{title:o,description:s,actionLabel:r,onRetry:a}=t;let l;e[0]!==s||e[1]!==o?(l=i.jsx(W,{title:o,description:s}),e[0]=s,e[1]=o,e[2]=l):l=e[2];let n;e[3]!==r||e[4]!==a?(n=i.jsx(ve,{type:"button",size:"xl",className:"w-full",onClick:a,children:r}),e[3]=r,e[4]=a,e[5]=n):n=e[5];let c;return e[6]!==l||e[7]!==n?(c=i.jsx(T,{children:i.jsxs("div",{className:"grid gap-10",children:[l,n]})}),e[6]=l,e[7]=n,e[8]=c):c=e[8],c}function je(t){const e=E.c(13),{org:o,initialSiteUrl:s}=t,r=$(),{data:a}=Te.useSession(),[l]=Se(),n=a?.user?.email;let c;e[0]!==s||e[1]!==l.language||e[2]!==n?(c=Me({siteUrl:s,email:n,locale:l.language}),e[0]=s,e[1]=l.language,e[2]=n,e[3]=c):c=e[3];const m=c;let u;e[4]!==m||e[5]!==o.id?(u=i.jsx(De,{href:m,orgId:o.id}),e[4]=m,e[5]=o.id,e[6]=u):u=e[6];const d=u;let g;return e[7]!==s||e[8]!==d||e[9]!==o||e[10]!==a?.user?.email||e[11]!==r?(g=i.jsx(nt,{children:p=>{const{reset:v}=p;return i.jsx(lt,{fallback:b=>{const{error:w,resetError:N}=b;return i.jsx(T,{visual:d,children:i.jsx(Mt,{orgName:o.name,message:w instanceof Error?w.message:r("routes.commerceOnboarding.couldNotVerifyCommerceSetting"),onRetry:()=>{v(),N()}})})},children:i.jsx(B.Suspense,{fallback:i.jsx(rt,{visual:d}),children:i.jsx(Dt,{org:o,initialSiteUrl:s,sessionEmail:a?.user?.email},`${o.id}:${s??""}`)})})}}),e[7]=s,e[8]=d,e[9]=o,e[10]=a?.user?.email,e[11]=r,e[12]=g):g=e[12],g}function rt(t){const e=E.c(3),{visual:o}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[i.jsx(W,{}),i.jsx(Xe,{})]}),e[0]=s):s=e[0];let r;return e[1]!==o?(r=i.jsx(T,{align:"fill",visual:o,children:s}),e[1]=o,e[2]=r):r=e[2],r}function Mt(t){const e=E.c(19),{orgName:o,message:s,onRetry:r}=t,a=$();let l;e[0]!==a?(l=a("routes.commerceOnboarding.commerceDiagnostic"),e[0]=a,e[1]=l):l=e[1];let n;e[2]!==o||e[3]!==a?(n=a("routes.commerceOnboarding.configurationWillContinueIn",{orgName:o}),e[2]=o,e[3]=a,e[4]=n):n=e[4];let c;e[5]!==l||e[6]!==n?(c=i.jsx(W,{title:l,description:n}),e[5]=l,e[6]=n,e[7]=c):c=e[7];let m;e[8]!==s?(m=i.jsx(Oe,{message:s}),e[8]=s,e[9]=m):m=e[9];let u;e[10]!==a?(u=a("routes.commerceOnboarding.retryAgain"),e[10]=a,e[11]=u):u=e[11];let d;e[12]!==r||e[13]!==u?(d=i.jsx(ve,{type:"button",size:"xl",className:"w-full",onClick:r,children:u}),e[12]=r,e[13]=u,e[14]=d):d=e[14];let g;return e[15]!==c||e[16]!==m||e[17]!==d?(g=i.jsxs("div",{className:"grid gap-10",children:[c,m,d]}),e[15]=c,e[16]=m,e[17]=d,e[18]=g):g=e[18],g}function Dt(t){const e=E.c(135),{org:o,initialSiteUrl:s,sessionEmail:r}=t;let a;e[0]!==o.id||e[1]!==o.slug?(a={connectionId:bt,orgId:o.id,orgSlug:o.slug},e[0]=o.id,e[1]=o.slug,e[2]=a):a=e[2];const l=xt(a),[n,c]=B.useState(s??""),[m,u]=B.useState(null),d=B.useRef(!1),g=yt.COMMERCE_DISCOVERY(o.id),p=jt(o.id),v=Fe.commerceDiscoveryConnection(o.id,g);let b;e[3]!==g||e[4]!==l?(b=async()=>{const y=await l.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:g}});return Re(y)},e[3]=g,e[4]=l,e[5]=b):b=e[5];let w;e[6]!==v||e[7]!==b?(w={queryKey:v,queryFn:b,retry:!1},e[6]=v,e[7]=b,e[8]=w):w=e[8];const N=$e(w),P=Fe.commerceDiscoveryVirtualMcp(o.id,p);let U;e[9]!==l||e[10]!==p?(U=async()=>{const y=await l.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:p}});return Re(y)},e[9]=l,e[10]=p,e[11]=U):U=e[11];let M;e[12]!==P||e[13]!==U?(M={queryKey:P,queryFn:U,retry:!1},e[12]=P,e[13]=U,e[14]=M):M=e[14];const f=$e(M);let h;e[15]!==l?(h=async y=>{const S=await l.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}});return Re(S)},e[15]=l,e[16]=h):h=e[16];let x;e[17]!==N||e[18]!==o.id||e[19]!==f?(x=(y,S)=>{se("commerce_onboarding_setup_succeeded",{domain:ke(S)??void 0,organization_id:o.id}),u(null),N.refetch(),f.refetch()},e[17]=N,e[18]=o.id,e[19]=f,e[20]=x):x=e[20];let j;e[21]!==o.id?(j=(y,S)=>{se("commerce_onboarding_setup_failed",{domain:ke(S)??void 0,organization_id:o.id,error:y instanceof Error?y.message:String(y)}),u(y instanceof Error?y.message:"__configurationFailed")},e[21]=o.id,e[22]=j):j=e[22];let O;e[23]!==j||e[24]!==h||e[25]!==x?(O={mutationFn:h,retry:!1,onSuccess:x,onError:j},e[23]=j,e[24]=h,e[25]=x,e[26]=O):O=e[26];const C=Ye(O),D=!!N.data.item&&!!f.data.item,V=N.data.item,q=typeof V?.metadata?.siteUrl=="string"?V.metadata.siteUrl:void 0,_e=s||n||"";let ne;e[27]!==q||e[28]!==_e?(ne=mt(_e,q),e[27]=q,e[28]=_e,e[29]=ne):ne=e[29];const le=D&&ne,ae=s||n||q||"",_=$(),[we]=Se();let ce;e[30]!==ae||e[31]!==we.language||e[32]!==r?(ce=Me({siteUrl:ae,email:r,locale:we.language}),e[30]=ae,e[31]=we.language,e[32]=r,e[33]=ce):ce=e[33];const Ne=ce;let me;e[34]!==Ne||e[35]!==o.id?(me=i.jsx(De,{href:Ne,orgId:o.id}),e[34]=Ne,e[35]=o.id,e[36]=me):me=e[36];const L=me;let de;e[37]!==m||e[38]!==_?(de=m?Ke(_,m):null,e[37]=m,e[38]=_,e[39]=de):de=e[39];const k=de;let ue;e[40]!==C?(ue=y=>{const S=Ie(y);if(!S.ok){u(S.error);return}u(null),C.mutate(S.value)},e[40]=C,e[41]=ue):ue=e[41];const K=ue;let ge;e[42]!==s||e[43]!==K||e[44]!==le?(ge=y=>{!y||d.current||le||!s||(d.current=!0,K(s))},e[42]=s,e[43]=K,e[44]=le,e[45]=ge):ge=e[45];const Ee=ge;let fe;e[46]!==o.id||e[47]!==K||e[48]!==n?(fe=y=>{y.preventDefault();const S=Ie(n);S.ok&&se("commerce_onboarding_site_url_submitted",{domain:new URL(S.value).hostname,organization_id:o.id}),K(n)},e[46]=o.id,e[47]=K,e[48]=n,e[49]=fe):fe=e[49];const A=fe;if(le){const y=o.slug;let S;e[50]===Symbol.for("react.memo_cache_sentinel")?(S=crypto.randomUUID(),e[50]=S):S=e[50];let I;e[51]!==o.slug?(I={org:y,taskId:S},e[51]=o.slug,e[52]=I):I=e[52];let R;e[53]!==o.id?(R=Ct(o.id),e[53]=o.id,e[54]=R):R=e[54];const H=ae||void 0;let z;e[55]!==R.id||e[56]!==H?(z={virtualmcpid:R.id,connect:"1",siteUrl:H},e[55]=R.id,e[56]=H,e[57]=z):z=e[57];let F;return e[58]!==I||e[59]!==z?(F=i.jsx(at,{to:"/$org/$taskId",params:I,search:z,replace:!0}),e[58]=I,e[59]=z,e[60]=F):F=e[60],F}if(C.isPending){let y;return e[61]!==L?(y=i.jsx(rt,{visual:L}),e[61]=L,e[62]=y):y=e[62],y}if(s){let y,S,I,R,H,z,F,Z;if(e[63]!==L||e[64]!==A||e[65]!==s||e[66]!==o.name||e[67]!==C.isPending||e[68]!==n||e[69]!==_||e[70]!==k||e[71]!==Ee){Z=Symbol.for("react.early_return_sentinel");e:{const Ue=Ie(s);if(!Ue.ok){let ie;e[80]!==_?(ie=_("routes.commerceOnboarding.commerceDiagnostic"),e[80]=_,e[81]=ie):ie=e[81];let oe;e[82]!==o.name||e[83]!==_?(oe=_("routes.commerceOnboarding.configurationWillContinueIn",{orgName:o.name}),e[82]=o.name,e[83]=_,e[84]=oe):oe=e[84];let be;e[85]!==ie||e[86]!==oe?(be=i.jsx(W,{title:ie,description:oe}),e[85]=ie,e[86]=oe,e[87]=be):be=e[87];let xe;e[88]!==A||e[89]!==C.isPending||e[90]!==n||e[91]!==k?(xe=i.jsx(ze,{siteUrl:n,error:k,isSubmitting:C.isPending,onSiteUrlChange:c,onSubmit:A}),e[88]=A,e[89]=C.isPending,e[90]=n,e[91]=k,e[92]=xe):xe=e[92];const Pe=i.jsxs("div",{className:"grid gap-10",children:[be,i.jsx(Oe,{message:Ke(_,Ue.error)}),xe]});let ye;e[93]!==L||e[94]!==Pe?(ye=i.jsx(T,{visual:L,children:Pe}),e[93]=L,e[94]=Pe,e[95]=ye):ye=e[95],Z=ye;break e}S=T,F=L,H=Ee,z="grid gap-10",y=W,e[96]!==_?(I=_("routes.commerceOnboarding.commerceDiagnostic"),e[96]=_,e[97]=I):I=e[97],R=_("routes.commerceOnboarding.commerceDiscoveryBeingPrepared",{url:Ue.value})}e[63]=L,e[64]=A,e[65]=s,e[66]=o.name,e[67]=C.isPending,e[68]=n,e[69]=_,e[70]=k,e[71]=Ee,e[72]=y,e[73]=S,e[74]=I,e[75]=R,e[76]=H,e[77]=z,e[78]=F,e[79]=Z}else y=e[72],S=e[73],I=e[74],R=e[75],H=e[76],z=e[77],F=e[78],Z=e[79];if(Z!==Symbol.for("react.early_return_sentinel"))return Z;let ee;e[98]!==y||e[99]!==I||e[100]!==R?(ee=i.jsx(y,{title:I,description:R}),e[98]=y,e[99]=I,e[100]=R,e[101]=ee):ee=e[101];let te;e[102]!==A||e[103]!==C.isPending||e[104]!==n||e[105]!==k?(te=k?i.jsxs(i.Fragment,{children:[i.jsx(Oe,{message:k}),i.jsx(ze,{siteUrl:n,error:null,isSubmitting:C.isPending,onSiteUrlChange:c,onSubmit:A})]}):i.jsx(Xe,{}),e[102]=A,e[103]=C.isPending,e[104]=n,e[105]=k,e[106]=te):te=e[106];let re;e[107]!==H||e[108]!==z||e[109]!==ee||e[110]!==te?(re=i.jsxs("div",{ref:H,className:z,children:[ee,te]}),e[107]=H,e[108]=z,e[109]=ee,e[110]=te,e[111]=re):re=e[111];let he;return e[112]!==S||e[113]!==F||e[114]!==re?(he=i.jsx(S,{visual:F,children:re}),e[112]=S,e[113]=F,e[114]=re,e[115]=he):he=e[115],he}let Q;e[116]!==_?(Q=_("routes.commerceOnboarding.commerceDiagnostic"),e[116]=_,e[117]=Q):Q=e[117];let G;e[118]!==o.name||e[119]!==_?(G=_("routes.commerceOnboarding.configurationWillContinueIn",{orgName:o.name}),e[118]=o.name,e[119]=_,e[120]=G):G=e[120];let Y;e[121]!==Q||e[122]!==G?(Y=i.jsx(W,{title:Q,description:G}),e[121]=Q,e[122]=G,e[123]=Y):Y=e[123];let J;e[124]!==A||e[125]!==C.isPending||e[126]!==n||e[127]!==k?(J=i.jsx(ze,{siteUrl:n,error:k,isSubmitting:C.isPending,onSiteUrlChange:c,onSubmit:A}),e[124]=A,e[125]=C.isPending,e[126]=n,e[127]=k,e[128]=J):J=e[128];let X;e[129]!==Y||e[130]!==J?(X=i.jsxs("div",{className:"grid gap-10",children:[Y,J]}),e[129]=Y,e[130]=J,e[131]=X):X=e[131];let pe;return e[132]!==L||e[133]!==X?(pe=i.jsx(T,{visual:L,children:X}),e[132]=L,e[133]=X,e[134]=pe):pe=e[134],pe}function ze(t){const e=E.c(30),{siteUrl:o,error:s,isSubmitting:r,onSiteUrlChange:a,onSubmit:l}=t,n=$();let c;e[0]!==n?(c=n("routes.commerceOnboarding.siteUrlLabel"),e[0]=n,e[1]=c):c=e[1];let m;e[2]!==c?(m=i.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:c}),e[2]=c,e[3]=m):m=e[3];let u;e[4]!==a?(u=M=>a(M.target.value),e[4]=a,e[5]=u):u=e[5];let d;e[6]!==n?(d=n("routes.commerceOnboarding.siteUrlPlaceholder"),e[6]=n,e[7]=d):d=e[7];const g=!!s;let p;e[8]!==r||e[9]!==o||e[10]!==u||e[11]!==d||e[12]!==g?(p=i.jsx(gt,{id:"commerce-site-url",type:"text",inputMode:"url",value:o,onChange:u,placeholder:d,"aria-invalid":g,disabled:r}),e[8]=r,e[9]=o,e[10]=u,e[11]=d,e[12]=g,e[13]=p):p=e[13];let v;e[14]!==s?(v=s?i.jsx(Oe,{message:s}):null,e[14]=s,e[15]=v):v=e[15];let b;e[16]!==m||e[17]!==p||e[18]!==v?(b=i.jsxs("div",{className:"grid gap-2",children:[m,p,v]}),e[16]=m,e[17]=p,e[18]=v,e[19]=b):b=e[19];let w;e[20]!==n?(w=n("routes.commerceOnboarding.authCopy.continue"),e[20]=n,e[21]=w):w=e[21];let N;e[22]===Symbol.for("react.memo_cache_sentinel")?(N=i.jsx(Ot,{size:16}),e[22]=N):N=e[22];let P;e[23]!==r||e[24]!==w?(P=i.jsxs(ve,{type:"submit",size:"xl",className:"w-full",disabled:r,children:[w,N]}),e[23]=r,e[24]=w,e[25]=P):P=e[25];let U;return e[26]!==l||e[27]!==P||e[28]!==b?(U=i.jsxs("form",{className:"grid gap-4",onSubmit:l,children:[b,P]}),e[26]=l,e[27]=P,e[28]=b,e[29]=U):U=e[29],U}function Oe(t){const e=E.c(2),{message:o}=t;let s;return e[0]!==o?(s=i.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:o}),e[0]=o,e[1]=s):s=e[1],s}export{si as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b}from"./extract-connection-data-
|
|
1
|
+
import{b}from"./extract-connection-data-i2ZtRXrE.js";import{b as h}from"./provision-repo-scoped-github-connection-B2s3ApVy.js";import{g}from"./metadata-dUsYcpuu.js";const C=new Set(["google-analytics"]);function T(n){if(n.boundVia==="sa")return!0;const{companionConfig:e,cdConfig:t}=n;switch(n.bindingType){case"vtex":return u(e?.accountName);case"shopify":return u(e?.storeDomain);case"google-analytics":return u(e?.propertyId);case"google-search-console":return u(e?.siteUrl);case"github":return u(t?.github_repo);default:return!0}}function _(n){const{companionConfig:e,cdConfig:t}=n;switch(n.bindingType){case"vtex":return typeof e?.accountName=="string"?e.accountName:null;case"shopify":return typeof e?.storeDomain=="string"?e.storeDomain:null;case"google-analytics":return typeof e?.propertyId=="string"?e.propertyId:null;case"google-search-console":return typeof e?.siteUrl=="string"?e.siteUrl:null;case"github":return typeof t?.github_repo=="string"?t.github_repo:null;default:return null}}function U(n){const e=n.properties;if(!e)return[];const t=[];for(const[i,o]of Object.entries(e)){const a=o?.properties?.__type?.const;typeof a=="string"&&a.length>0&&t.push({fieldKey:i,bindingType:a})}return t}const B=[{fieldKey:"vtex",bindingType:"vtex"},{fieldKey:"shopify",bindingType:"shopify"},{fieldKey:"ga4",bindingType:"google-analytics"},{fieldKey:"gsc",bindingType:"google-search-console"},{fieldKey:"github",bindingType:"github"}];function O(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 x(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 D(n,e,t,i){return{...n??{},[e]:{__type:t,value:i}}}function u(n){return n==null?!1:typeof n=="string"?n.trim().length>0:typeof n=="number"||typeof n=="boolean"?!0:Array.isArray(n)?n.some(u):typeof n=="object"?Object.entries(n).some(([e,t])=>!e.startsWith("__")&&u(t)):!1}function I(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 N(n){return u(n)?typeof n=="string"?n.trim():typeof n=="number"||typeof n=="boolean"?String(n):JSON.stringify(n):null}function M(n){return n?Object.entries(n).flatMap(([e,t])=>{if(e.startsWith("__"))return[];const i=N(t);return i?[{key:e,label:I(e),value:i}]:[]}):[]}function v({autoOpenFieldKey:n,card:e}){return n===e.fieldKey&&e.satisfied&&!!e.linkedConnectionId}function S(n,e,t){const i=n.filter(o=>(o.app_name===e||!!t&&o.app_id===t)&&h(o)===null);return i.length===0?null:(i.sort((o,r)=>{const s=a=>a.status==="active"?0:1;return s(o)!==s(r)?s(o)-s(r):(r.updated_at??"").localeCompare(o.updated_at??"")}),i[0].id)}function K(n){return n.server?.icons?.[0]?.src??b(n.server?.repository)??null}function w(n,e){const t=g(n._meta);return t?.friendlyName||t?.friendly_name||n.title||n.server?.title||n.server?.name||e}function P(n){const e=[],t=new Map(n.connections.map(i=>[i.id,i]));for(const i of n.requirements){const o=n.curated[i.bindingType],r=o?n.itemsById[o.registryAppId]:n.itemsByName[i.bindingType];if(!r)continue;const s=n.configurationState?.[i.fieldKey]?.value,a=s?t.get(s):void 0,c=s&&a?s:null,y=c?n.connectionReadiness?.[c]!==!1:!1,p=!!c&&y,f=p?void 0:n.saBindings?.[i.bindingType],l=p||!!f,d=p?"oauth":f?"sa":null,m=l&&T({bindingType:i.bindingType,boundVia:d,companionConfig:a?.configuration_state??null,cdConfig:n.configurationState??null});e.push({fieldKey:i.fieldKey,bindingType:i.bindingType,registryItem:r,title:w(r,i.bindingType),icon:K(r),headline:o?.headline??g(r._meta)?.short_description??null,area:o?.area??null,bullets:o?.bullets??[],satisfied:l,configured:m,required:C.has(i.bindingType),candidateConnectionId:l?null:c||S(n.connections,i.bindingType,o?.registryAppId),linkedConnectionId:c,configurationState:a?.configuration_state??null,boundVia:d,boundResource:f?.resource??null,connectedDetail:l?_({bindingType:i.bindingType,companionConfig:a?.configuration_state??null,cdConfig:n.configurationState??null}):null})}return e}function V(n,e){if(!n)return null;const t=o=>{const r=o.startsWith("sc-domain:")?o.substring(10):(()=>{try{return new URL(o.startsWith("http")?o:`https://${o}`).hostname}catch{return null}})();return r===null?o:r.startsWith("www.")?r.substring(4):r},i=t(n);for(const o of e)if(t(o.siteUrl)===i)return o.siteUrl;return null}function W(n){return(n?.response?.accountSummaries??[]).map(i=>({account:i.account,options:(i.propertySummaries??[]).map(o=>({value:o.property,label:`${o.displayName} (${i.displayName})`}))}))}export{B as F,P as a,O as b,D as c,M as g,V as m,U as p,v as s,W as t,x as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as b,j as s,B as C,F as z,o as O,e as Y,K as R,n as X,r as Z,z as ee,t as P}from"./index-
|
|
1
|
+
import{c as b,j as s,B as C,F as z,o as O,e as Y,K as R,n as X,r as Z,z as ee,t as P}from"./index-CuR236Ha.js";import{A as te,b as se}from"./alert-Dze3H8i7.js";import{C as ne}from"./card-BJHBJJ4x.js";import{c as q,T as L,b as T,a as W}from"./tabs-CQao0ox2.js";import{u as H}from"./use-copy-4XdNBPba.js";import{i as Q}from"./Check-Ba7uuiUv.js";import{a as U}from"./Copy01-DYlP_Xtq.js";import{i as ie}from"./Key01-Cme8uyqy.js";import{n as re}from"./LinkExternal01-CQ9ayxbn.js";import{s as oe}from"./Trash01-Ck-P8aGE.js";import{P as A}from"./index-nNOweqCJ.js";import{c as ae}from"./settings-section-EiAJkJ4N.js";import{S as B,u as D}from"./use-mcp-client-Ldih0CNF.js";import"./sidebar-BNKxKPMZ.js";import"./LayoutLeft-CxujHsXA.js";import"./use-mobile-CD2TR_Uh.js";import"./X-FgZ-pUjZ.js";import"./tooltip-DfT6t3c6.js";import"./ArrowUpRight-CYabXmbx.js";import"./auth-Dt1FgVt-.js";function le(){return(typeof window>"u"?"":window.location.hostname||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"studio"}function ce(e){return`${typeof window>"u"?"http://localhost:3000":window.location.origin}/api/${e}/mcp/self`}function de({client:e,mode:t,url:r,apiKey:a}){const o=a??"<paste-your-api-key>",i=le();if(e==="claude-code")return t==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${i} ${r}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${i} ${r} \\
|
|
2
2
|
--header "Authorization: Bearer ${o}"`};if(e==="cursor"){const n={url:r};return t==="api-key"&&(n.headers={Authorization:`Bearer ${o}`}),{language:"json",pathHint:"~/.cursor/mcp.json",code:JSON.stringify({mcpServers:{[i]:n}},null,2)}}if(e==="codex"){const n=[`[mcp_servers.${i}]`,`url = "${r}"`];return t==="api-key"&&n.push(`http_headers = { "Authorization" = "Bearer ${o}" }`),{language:"toml",pathHint:"~/.codex/config.toml",code:n.join(`
|
|
3
3
|
`)}}if(e==="claude-desktop"){const n={type:"http",url:r};return t==="api-key"&&(n.headers={Authorization:`Bearer ${o}`}),{language:"json",pathHint:"claude_desktop_config.json",code:JSON.stringify({mcpServers:{[i]:n}},null,2)}}return t==="oauth"?{language:"text",code:`${r}
|
|
4
4
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Z as i,a0 as r,_ as t,$ as e,a3 as o,b8 as a,bj as d,cb as l,bi as u}from"./index-CuR236Ha.js";const p=i({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:t(e()),grantType:r(["authorization_code","client_credentials"])}),c=i({type:d("object"),properties:o(e(),a()).optional(),required:t(e()).optional()}).catchall(a()),b=l.extend({inputSchema:c,outputSchema:c.optional()}),m=i({headers:o(e(),e()).optional()}),h=i({command:e().describe("Command to run (e.g., 'npx', 'node')"),args:t(e()).optional().describe("Command arguments"),cwd:e().optional().describe("Working directory"),envVars:o(e(),e()).optional().describe("Environment variables (encrypted in storage)")}),s=i({id:e().describe("Unique identifier for the connection"),title:e().describe("Human-readable name for the connection"),created_at:e().describe("When the connection was created"),updated_at:e().describe("When the connection was last updated"),created_by:e().describe("User ID who created the connection"),updated_by:e().optional().describe("User ID who last updated the connection"),organization_id:e().describe("Organization ID this connection belongs to"),description:e().nullable().describe("Description of the connection"),icon:e().nullable().describe("Icon URL for the connection"),app_name:e().nullable().describe("Associated app name"),app_id:e().nullable().describe("Associated app ID"),slug:e().nullable().optional().describe("URL-safe slug derived from app_name, connection_url, or title"),connection_type:r(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:e().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:e().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:u([h,m]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:p.nullable().describe("OAuth configuration"),configuration_state:o(e(),a()).nullable().describe("Configuration state (decrypted)"),configuration_scopes:t(e()).nullable().optional().describe("Configuration scopes"),metadata:o(e(),a()).nullable().describe("Additional metadata (includes repository info)"),tools:t(b).nullable().describe("Discovered tools from MCP"),bindings:t(e()).nullable().describe("Detected bindings"),status:r(["active","inactive","error"]).describe("Current status")});s.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:e().nullish()});s.partial();function f(n){return n!=null&&"command"in n}function g(n){return!n||!n.startsWith("virtual://")?null:n.replace("virtual://","")}export{f as i,g as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,F as $,b7 as k,K as L,m as w,j as I}from"./index-
|
|
1
|
+
import{c as M,F as $,b7 as k,K as L,m as w,j as I}from"./index-CuR236Ha.js";import{u as D}from"./use-registry-connections-_l7hkNKl.js";import{f as K}from"./use-organization-settings-HM-EDIrS.js";import{S as E,k as F}from"./use-mcp-client-Ldih0CNF.js";import{u as Q}from"./useInfiniteQuery-BLssOond.js";import{i as H,f as q}from"./extract-connection-data-i2ZtRXrE.js";import{r as G,R as U}from"./retry-CErkP7V6.js";import{g as T}from"./connection-slug-eyAPH6o3.js";import{C as V}from"./card-BJHBJJ4x.js";import{I as X}from"./integration-icon-By0eBeMX.js";function ue(){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(Y),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 Y(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:N}=Q({queryKey:L.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 G(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 C=await f.callTool({name:j,arguments:x}),v=C.structuredContent??C,P=v.nextCursor||v.cursor||void 0,b=q(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 U?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:k,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:N,fetchNextPage:()=>{m&&!g&&d()}}}function fe(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 N=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]!==N||t[12]!==y||t[13]!==g||t[14]!==c?(i={items:g,hasMore:u,isLoadingMore:y,isInitialLoading:N,loadMore:c},t[10]=u,t[11]=N,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 me(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 de(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,N=a&&"hover:bg-muted/50";let y;e[0]!==d||e[1]!==N?(y=w("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",N,d),e[0]=d,e[1]=N,e[2]=y):y=e[2];let u;e[3]!==t.icon||e[4]!==t.title||e[5]!==m?(u=I.jsx(X,{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 C;e[22]!==r?(C=r&&I.jsx("div",{children:r}),e[22]=r,e[23]=C):C=e[23];let v;e[24]!==x||e[25]!==C||e[26]!==i?(v=I.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,x,C]}),e[24]=x,e[25]=C,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(V,{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{de as C,fe as a,me as g,ue as u};
|