decocms 4.77.3 → 4.78.0
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-DFFB807G.js → AlertCircle-D6YyJJmm.js} +1 -1
- package/dist/client/assets/{AreaChart-oIJCSonG.js → AreaChart-CXzSMWrS.js} +1 -1
- package/dist/client/assets/{ArrowUp-CFU7eduC.js → ArrowUp-D3YFKg7G.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-D37SsWBk.js → ArrowUpRight-DgvFsQng.js} +1 -1
- package/dist/client/assets/{Check-BAiULwRg.js → Check-Bf3Fz6mT.js} +1 -1
- package/dist/client/assets/{CheckCircle-BwwAyNzV.js → CheckCircle-DBI4XJwz.js} +1 -1
- package/dist/client/assets/{ChevronDown-Cpk84lU5.js → ChevronDown-TeMcV6Wa.js} +1 -1
- package/dist/client/assets/{ChevronRight-UlscOqp6.js → ChevronRight-QSLgw-q7.js} +1 -1
- package/dist/client/assets/{ChevronUp-CqCnswy_.js → ChevronUp-g5JVf1F_.js} +1 -1
- package/dist/client/assets/{Circle-pOPoWDQn.js → Circle-Cu4ym4Ez.js} +1 -1
- package/dist/client/assets/{Copy01-BEB5hDKQ.js → Copy01-DgzGIIpj.js} +1 -1
- package/dist/client/assets/{DotsVertical-BFfMlorx.js → DotsVertical-yY90ybrp.js} +1 -1
- package/dist/client/assets/{Eye-Bbh_ejV6.js → Eye-vRl0ZCJB.js} +1 -1
- package/dist/client/assets/{FilterLines-Dm0WP1zI.js → FilterLines-BbWZ4lL4.js} +1 -1
- package/dist/client/assets/{Flag01-e55mynPF.js → Flag01-CXRHMIef.js} +1 -1
- package/dist/client/assets/{Globe01-DVm51A__.js → Globe01-B7g_9reV.js} +1 -1
- package/dist/client/assets/{Globe04-DA8QsMrW.js → Globe04-C3Z6OIxj.js} +1 -1
- package/dist/client/assets/{HardDrive-BJ2MS6we.js → HardDrive-DymMXEyR.js} +1 -1
- package/dist/client/assets/{Image01-Y4d3ZI2r.js → Image01-Bx4AOGxs.js} +1 -1
- package/dist/client/assets/{Key01-xPUeBTf6.js → Key01-Cmvx37G1.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CNWN8tpf.js → LayoutLeft-q_h77zns.js} +1 -1
- package/dist/client/assets/{LinkExternal01-B6bTrNoI.js → LinkExternal01-BEoe9Fb2.js} +1 -1
- package/dist/client/assets/{List-gTaMGV9z.js → List-5170zK7Q.js} +1 -1
- package/dist/client/assets/{Monitor01-BdI_dCjX.js → Monitor01-Kb5okFQS.js} +1 -1
- package/dist/client/assets/{Package-WlP_SelV.js → Package-yySHtAk6.js} +1 -1
- package/dist/client/assets/{Palette-DwivsXKp.js → Palette-Dacxdv_I.js} +1 -1
- package/dist/client/assets/{Play-BPQdBfbt.js → Play-BoazbAxP.js} +1 -1
- package/dist/client/assets/{Plus-C8FiAr3i.js → Plus-t7Jm0GJ3.js} +1 -1
- package/dist/client/assets/{SearchLg-CMWIHllt.js → SearchLg-CB9_TW_3.js} +1 -1
- package/dist/client/assets/{SearchMd-Gwm-384G.js → SearchMd-B8rhT4Rt.js} +1 -1
- package/dist/client/assets/{Settings02-D5c8FtUa.js → Settings02-D4nrXgvn.js} +1 -1
- package/dist/client/assets/{Shield01-Dn6encQp.js → Shield01-Y3jps5Gy.js} +1 -1
- package/dist/client/assets/{Star01-C32-NjaL.js → Star01-DBp7dbGs.js} +1 -1
- package/dist/client/assets/{Stars01-C8WemEnv.js → Stars01-BJhn7N1A.js} +1 -1
- package/dist/client/assets/{Stars02-CzKVb8lE.js → Stars02-BmKcMhZX.js} +1 -1
- package/dist/client/assets/{Sun-BPhwV-Eh.js → Sun-DWvykssV.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-C8Rnw5uG.js → SwitchHorizontal01-DJDXmWgC.js} +1 -1
- package/dist/client/assets/{Tool01-CSravChF.js → Tool01-Ct7fGWUY.js} +1 -1
- package/dist/client/assets/{Tool02-csu1mOp1.js → Tool02-Cr2Rz6tq.js} +1 -1
- package/dist/client/assets/{Trash01-DZTkGJqE.js → Trash01-C3QDvJF1.js} +1 -1
- package/dist/client/assets/{TrendUp01-Dw2DNRxA.js → TrendUp01-WsDlxYhZ.js} +1 -1
- package/dist/client/assets/{Upload01-s2ES1URH.js → Upload01-C2W1llVr.js} +1 -1
- package/dist/client/assets/{User01-D0_zDlJM.js → User01-Deo29J7j.js} +1 -1
- package/dist/client/assets/{UserPlus01-DjFNU1Mn.js → UserPlus01-C_-L6kJr.js} +1 -1
- package/dist/client/assets/{Users01-CAC4FOXB.js → Users01-CLZ2kdTu.js} +1 -1
- package/dist/client/assets/{Users03-Iz-TpUuJ.js → Users03-uM7w0XRw.js} +1 -1
- package/dist/client/assets/{X-CTTK5Zj2.js → X-DYT1GSz1.js} +1 -1
- package/dist/client/assets/{XCircle-CiVL5z-e.js → XCircle-C965t8pI.js} +1 -1
- package/dist/client/assets/{XClose-DxMKQUUD.js → XClose-D8I17tPk.js} +1 -1
- package/dist/client/assets/{Zap-CrYnUVJy.js → Zap-p_vD-N15.js} +1 -1
- package/dist/client/assets/{ZapSquare-BDp8YrcS.js → ZapSquare-r-I1hrGR.js} +1 -1
- package/dist/client/assets/{ZoomOut-CvmU5uj5.js → ZoomOut-CyT94sXk.js} +1 -1
- package/dist/client/assets/{access-gate-Bw06fv-s.js → access-gate-C5tHnpFu.js} +1 -1
- package/dist/client/assets/{add-section-modal-BUwFQaqb.js → add-section-modal-D3vMc3LK.js} +1 -1
- package/dist/client/assets/{agent-icon-jdj2JAEm.js → agent-icon-jLUxIfUX.js} +1 -1
- package/dist/client/assets/agents-list-3dntZgUX.js +1 -0
- package/dist/client/assets/{ai-providers-azn7N2Yk.js → ai-providers-DUfJcGkX.js} +1 -1
- package/dist/client/assets/{alert-U_1RTm6v.js → alert-JyDMBG9Y.js} +1 -1
- package/dist/client/assets/{alert-dialog-DtmlB9JL.js → alert-dialog-BZCxnnaY.js} +1 -1
- package/dist/client/assets/app-editor-BBLUJ0bm.js +1 -0
- package/dist/client/assets/{auth-BR_fNNK7.js → auth-B0oxX-rw.js} +1 -1
- package/dist/client/assets/{auth-catchall-Dwo94U32.js → auth-catchall-BZvzipnV.js} +1 -1
- package/dist/client/assets/{auth-entry-CsuZU0Hz.js → auth-entry-BLM6BHE1.js} +1 -1
- package/dist/client/assets/{auth-split-layout-HOd3Qhyr.js → auth-split-layout-CsaahkY7.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BuaZSTeD.js → authenticate-and-persist-oauth-DxQqW3T-.js} +1 -1
- package/dist/client/assets/{automation-list-row-BuCXNsSo.js → automation-list-row-f7HB0lEO.js} +1 -1
- package/dist/client/assets/{automation-runs-nQ99AMoV.js → automation-runs-C0bPxXfe.js} +1 -1
- package/dist/client/assets/automations-CZpHalR8.js +1 -0
- package/dist/client/assets/{autosend-CIDdvZqc.js → autosend-pcmp17-1.js} +1 -1
- package/dist/client/assets/{avatar-DJpRqbqg.js → avatar-BaaCzkz5.js} +1 -1
- package/dist/client/assets/{badge-zT-Fh3qN.js → badge-DDX6uCig.js} +1 -1
- package/dist/client/assets/{block-document-2XwXLkCF.js → block-document-DivAhnA1.js} +1 -1
- package/dist/client/assets/{brand-context-CzRgrT9p.js → brand-context-BTW63ubn.js} +1 -1
- package/dist/client/assets/{buckets-BbJLX44L.js → buckets-dkoo4cSZ.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CAMc8JnB.js → bulk-category-panel-BKU51QgX.js} +1 -1
- package/dist/client/assets/{calendar-CibxNjt0.js → calendar-CtB-1ORd.js} +1 -1
- package/dist/client/assets/{capability-load-error-BEzrfkB_.js → capability-load-error-BQX8z6t0.js} +1 -1
- package/dist/client/assets/{card-CEUspnmz.js → card-zqYafqG3.js} +1 -1
- package/dist/client/assets/category-editor-DIxkWtHT.js +1 -0
- package/dist/client/assets/{chat-context-CAoh3qxf.js → chat-context-C_Qfrzll.js} +1 -1
- package/dist/client/assets/{checkbox-C7atZRmN.js → checkbox-D33J0J5s.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DAwaPZJZ.js → cli-auth-success-a675Crj5.js} +1 -1
- package/dist/client/assets/{collection-detail-D0xuaTFw.js → collection-detail-DOr4XVAb.js} +1 -1
- package/dist/client/assets/{collection-display-button-WEEgaqOV.js → collection-display-button-DRpwr1d2.js} +1 -1
- package/dist/client/assets/{collection-search-BLJH2aa6.js → collection-search-BBYUHwp3.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Bs9ViQbC.js → collection-table-wrapper-DG4oL_XO.js} +1 -1
- package/dist/client/assets/{collection-tabs-D10lR104.js → collection-tabs-CM7SC5Ph.js} +1 -1
- package/dist/client/assets/{command-Cih9cb-G.js → command-BgHIgal-.js} +1 -1
- package/dist/client/assets/commerce-onboarding-DEDSkHug.js +1 -0
- package/dist/client/assets/companions-core-BKQjoMFT.js +1 -0
- package/dist/client/assets/{connect-desktop-dialog-B4c48mz3.js → connect-desktop-dialog-C3MAVbqi.js} +1 -1
- package/dist/client/assets/{connection-card-DPw_9IvV.js → connection-card-akwzMfSt.js} +1 -1
- package/dist/client/assets/{connection-detail-CDG1VEQ1.js → connection-detail-CRcTfmPM.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-svNTHB1P.js → connection-form-helpers-D-nDOfy5.js} +1 -1
- package/dist/client/assets/{connections-DOceib-0.js → connections-BpPH-rGd.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-pi1pVqbX.js → decopilot-sse-pool-_1OoFfRR.js} +1 -1
- package/dist/client/assets/{dialog-BboVhzku.js → dialog-C_G4Nj_a.js} +1 -1
- package/dist/client/assets/{domain-settings-Dg0Enr4v.js → domain-settings-BU3PLHXT.js} +1 -1
- package/dist/client/assets/{drawer-D5XLtSzP.js → drawer-DIzHaW1L.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DcV4HAvf.js → dropdown-menu-C3HeQI9N.js} +1 -1
- package/dist/client/assets/{empty-state-C6JrR5eZ.js → empty-state-Bn6jIdxN.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DEmXsdA0.js → extract-connection-data-DoTSwnq5.js} +1 -1
- package/dist/client/assets/file-explorer-C7jnlKJt.js +2 -0
- package/dist/client/assets/{file-type-icon-BR1G8n26.js → file-type-icon-Chdi7BrE.js} +1 -1
- package/dist/client/assets/{files-uX2RLUIk.js → files-CDQzPvRQ.js} +1 -1
- package/dist/client/assets/{form-p6ZihW38.js → form-CqMXK7Rg.js} +1 -1
- package/dist/client/assets/{general-pRqMY7to.js → general-BHXdL9DJ.js} +1 -1
- package/dist/client/assets/github-repo-picker-iGTmhvfh.js +1 -0
- package/dist/client/assets/github-repo-scope-DjMZbiKa.js +1 -0
- package/dist/client/assets/{hooks-DYM3Q-Vq.js → hooks-B2bKZJz3.js} +1 -1
- package/dist/client/assets/{index-BN6_Cjv8.js → index-94TmFXEM.js} +1 -1
- package/dist/client/assets/{index-Bbk1PCkR.js → index-B5PgsjuZ.js} +1 -1
- package/dist/client/assets/{index-BEqdT-CX.js → index-BB5lA5jj.js} +3 -3
- package/dist/client/assets/{index-DmYBKzjc.js → index-BKb79pgL.js} +1 -1
- package/dist/client/assets/index-BcGQg-Kx.js +2 -0
- package/dist/client/assets/{index-Bnro1Vjb.js → index-Bvhurd-Z.js} +28 -28
- package/dist/client/assets/{index-BXTPhNSj.js → index-CuPxvnMd.js} +1 -1
- package/dist/client/assets/{index-BTfVRtBq.js → index-DZrgCtW9.js} +1 -1
- package/dist/client/assets/index-DvVn4R_K.js +1 -0
- package/dist/client/assets/{index-hWnZ5W-G.js → index-IeYTwdqM.js} +1 -1
- package/dist/client/assets/{index-S6xdCjXr.js → index-JYMtN_ka.js} +1 -1
- package/dist/client/assets/{index-Dz8rxMiO.js → index-OTCSzql6.js} +1 -1
- package/dist/client/assets/{index-B06wwOYR.js → index-nfm9K1x2.js} +1 -1
- package/dist/client/assets/{index-redirect-CTPXAnic.js → index-redirect-9xlH9kRG.js} +1 -1
- package/dist/client/assets/{index-BXfKOYdf.js → index-xN4b_CkF.js} +1 -1
- package/dist/client/assets/{input-CqfDyI-C.js → input-CcKrVAr2.js} +1 -1
- package/dist/client/assets/{integration-icon-Dhyv93zr.js → integration-icon-BFsmKVHF.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BhSkjT-N.js → invite-member-dialog-6XRVfRTx.js} +1 -1
- package/dist/client/assets/{label-DbwTUWd9.js → label-CW15sZLz.js} +1 -1
- package/dist/client/assets/{layout-BBgXJHVj.js → layout-C1yYJmDo.js} +1 -1
- package/dist/client/assets/{login-Ml29AK4n.js → login-B35xc8Gt.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CeGeftbL.js → mcp-oauth-Bx9msuxY.js} +1 -1
- package/dist/client/assets/{members-D5IT4H1V.js → members-CtdxOI6T.js} +1 -1
- package/dist/client/assets/{monaco-editor-YwujFe9g.js → monaco-editor-tITHyCTj.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CQqHLPvk.js → monitoring-stats-row-5NJQerF_.js} +1 -1
- package/dist/client/assets/{multi-select-B1FaaLCf.js → multi-select-DjU5xocW.js} +1 -1
- package/dist/client/assets/{oauth-callback-B-ebprV-.js → oauth-callback-DMSxm1aa.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DPqgkHzz.js → oauth-callback-ai-provider-DNKUFr1T.js} +1 -1
- package/dist/client/assets/{onboarding-3CEMDgie.js → onboarding-DhudMezE.js} +1 -1
- package/dist/client/assets/{org-install-C-mvhkMd.js → org-install-BI6Tqb8M.js} +1 -1
- package/dist/client/assets/{org-layout-CXafMRKl.js → org-layout-BzM8m0Yo.js} +1 -1
- package/dist/client/assets/{organization-choice-D3k9ZPpO.js → organization-choice-CLoSaGiq.js} +1 -1
- package/dist/client/assets/{orgs-Xyph7dZi.js → orgs-BXyQQf2t.js} +1 -1
- package/dist/client/assets/{page-seo-form-55rMBIi9.js → page-seo-form-b_KQgaAh.js} +1 -1
- package/dist/client/assets/page-seo-sheet-ClLCRUIN.js +1 -0
- package/dist/client/assets/{popover-BJYBT3EY.js → popover-BhnGTRIN.js} +1 -1
- package/dist/client/assets/post-editor-BftvN04C.js +1 -0
- package/dist/client/assets/{primitives-QqbAbc1Q.js → primitives-ueS43w85.js} +1 -1
- package/dist/client/assets/{profile-CgJpwyXB.js → profile-BQf3SBqt.js} +1 -1
- package/dist/client/assets/project-app-view-DjP2PmND.js +1 -0
- package/dist/client/assets/provision-repo-scoped-github-connection-2iDn-wQ1.js +1 -0
- package/dist/client/assets/record-editor-Du8LTIQ8.js +1 -0
- package/dist/client/assets/redirect-editor-CZu9GWo3.js +1 -0
- package/dist/client/assets/registry-g2WwGfcO.js +2 -0
- package/dist/client/assets/{registry-layout-qd98OrCw.js → registry-layout-DupWO7LC.js} +1 -1
- package/dist/client/assets/{reports-Don6tc4i.js → reports-BlIjKH8H.js} +1 -1
- package/dist/client/assets/{require-capability-9_BT8d0_.js → require-capability-D7ZefDTd.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BXaZVxWQ.js → required-auth-layout-COJ1HesY.js} +1 -1
- package/dist/client/assets/{reset-password-BTQg39kb.js → reset-password-ByTmxDaH.js} +1 -1
- package/dist/client/assets/{roles-CMByu1Mi.js → roles-Cgr1guoV.js} +1 -1
- package/dist/client/assets/{search-input-CYwO2ZSV.js → search-input-IdLCT-wl.js} +1 -1
- package/dist/client/assets/{secrets-BHEJh0I9.js → secrets-DF0jWkhd.js} +1 -1
- package/dist/client/assets/{sections-editor-BjlPsEWB.js → sections-editor-Br2ZrjF9.js} +2 -2
- package/dist/client/assets/{select-Bh2Z8rK3.js → select-BDKopoZs.js} +1 -1
- package/dist/client/assets/{select-model-BHB_Fir_.js → select-model-DQ3GcF2Q.js} +1 -1
- package/dist/client/assets/{self-tool-result-BkP7cEqy.js → self-tool-result-Dehaso5-.js} +1 -1
- package/dist/client/assets/seo-editor-DxU1V_q7.js +1 -0
- package/dist/client/assets/{settings-layout-DX2Oqcs9.js → settings-layout-BTr-31q1.js} +1 -1
- package/dist/client/assets/{settings-section-HiisdE7T.js → settings-section-Bs2y0W38.js} +1 -1
- package/dist/client/assets/{shell-controls-Dsv9TiVE.js → shell-controls-BNwC-U3m.js} +1 -1
- package/dist/client/assets/{shell-layout-CcPRSmgX.js → shell-layout-DBwpg5fa.js} +1 -1
- package/dist/client/assets/{sidebar-CRtkHPvX.js → sidebar-BiKcuUlz.js} +1 -1
- package/dist/client/assets/{skeleton-C-LbiBGP.js → skeleton-DO-zgL8S.js} +1 -1
- package/dist/client/assets/{sso-CHr6NXev.js → sso-BVw4m6Is.js} +1 -1
- package/dist/client/assets/{store-CJu8MR_n.js → store-BBq6XldJ.js} +1 -1
- package/dist/client/assets/store-registry-BIIvqrwe.js +2 -0
- package/dist/client/assets/{studio-tools-Cdt3UzXo.js → studio-tools-QgTnVt0y.js} +1 -1
- package/dist/client/assets/{switch-BL8XQR8K.js → switch-7KE_HjZk.js} +1 -1
- package/dist/client/assets/{table-VOE9WRkg.js → table-C23nDXu-.js} +1 -1
- package/dist/client/assets/{tabs-DPmfTv0c.js → tabs-B0oOCjef.js} +1 -1
- package/dist/client/assets/{textarea-B9g6Z2-r.js → textarea-D3iFRZ9o.js} +1 -1
- package/dist/client/assets/{toggle-group-BnuMLJr8.js → toggle-group-MA_94m4S.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BBh2Csxi.js → toolbar-icon-button-Be0Xxrx6.js} +1 -1
- package/dist/client/assets/{toolbar-65iromlk.js → toolbar-w5KxuBt-.js} +1 -1
- package/dist/client/assets/{tooltip-C7c-Tgru.js → tooltip-LRHFL41r.js} +1 -1
- package/dist/client/assets/{use-ai-providers-C7iVrgY-.js → use-ai-providers-BeYG-EjG.js} +1 -1
- package/dist/client/assets/{use-automations-CELpHT79.js → use-automations-CAUzSd8j.js} +1 -1
- package/dist/client/assets/{use-autosave-B1tnyn5H.js → use-autosave-C6ffzJDR.js} +1 -1
- package/dist/client/assets/{use-capability-DsC1r5oD.js → use-capability-Dch03R8X.js} +1 -1
- package/dist/client/assets/{use-clock-tick-F8Oybd0p.js → use-clock-tick-CVibzfL9.js} +1 -1
- package/dist/client/assets/{use-collections-Dy7WD_eH.js → use-collections-D9omaJJu.js} +1 -1
- package/dist/client/assets/{use-connection-DUpx0NEA.js → use-connection-hO51hV8J.js} +1 -1
- package/dist/client/assets/{use-copy-C0FUXmsm.js → use-copy-tGW1Vaes.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Bbp45Sum.js → use-create-virtual-mcp-CdWTTl06.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-IEMI4Muz.js → use-debounced-autosave-cTAMJ-st.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BqHYI-kn.js → use-debounced-value-C8BZDtz1.js} +1 -1
- package/dist/client/assets/{use-deco-credits-56-eyw-E.js → use-deco-credits-D8dtxTPg.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-btxE-D2k.js → use-decopilot-events-4o9NNSez.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BCTMhr9Z.js → use-delete-connection-BqJkmcK6.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-D9-LjGCb.js → use-deployment-admin-D_HkirOy.js} +1 -1
- package/dist/client/assets/{use-file-configs-CYmkQ98g.js → use-file-configs-CZiarNuS.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DYbbFqLK.js → use-infinite-scroll-DgcSj6JD.js} +1 -1
- package/dist/client/assets/{use-join-requests-DZ4YwkLh.js → use-join-requests-BqCHI8Zj.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-Dy_Y2kKR.js → use-mcp-auth-status-CLsbHDCg.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DvvHwezb.js → use-mcp-client-W9fEi0Ml.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Be4djRS3.js → use-mcp-tools-uwmJZn0p.js} +1 -1
- package/dist/client/assets/{use-members-BZPSqMOT.js → use-members-B6EJ964p.js} +1 -1
- package/dist/client/assets/{use-mobile-DbBFg2WD.js → use-mobile-BQOMgKS3.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CBi1-FBB.js → use-navigate-to-agent-DqqHYLVD.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-PHOIKqSH.js → use-org-auth-client-Y5-GC6qM.js} +1 -1
- package/dist/client/assets/{use-org-sso-BA_UxewI.js → use-org-sso-Dqg59TFA.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DDd0H73X.js → use-organization-roles-CeuO8sTI.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CpbybQHD.js → use-organization-settings-CQJ8RPRh.js} +1 -1
- package/dist/client/assets/use-registry-app-DVOJoUv5.js +1 -0
- package/dist/client/assets/{use-registry-connections-CX_dlku1.js → use-registry-connections-DdQfbjwO.js} +1 -1
- package/dist/client/assets/{use-secrets-ChIMRFxc.js → use-secrets-CIsNwBX2.js} +1 -1
- package/dist/client/assets/{use-status-sounds-BrRSDeZW.js → use-status-sounds-DFGyya-5.js} +1 -1
- package/dist/client/assets/{use-view-mode-C9HP0iNa.js → use-view-mode-DJMiJaWa.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CNKe_WaY.js → use-virtual-mcp-DpSXhS0n.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CyvFYQl8.js +1 -0
- package/dist/client/assets/{useRouterState-Bq6lDwd7.js → useRouterState-DpJ4EK7e.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-C33XLke-.js +1 -0
- package/dist/client/assets/{users-DMEyTKsO.js → users-EWx6DB7t.js} +1 -1
- package/dist/client/assets/{variant-calendar-CYVo9qj3.js → variant-calendar-DchPOrHH.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CyQ3mWd3.js → view-mode-toggle-hMQMe6tZ.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agents-list-DZ3h25ic.js +0 -1
- package/dist/client/assets/app-editor-Be08LQCr.js +0 -1
- package/dist/client/assets/automations-DB43wI7K.js +0 -1
- package/dist/client/assets/category-editor-DSqWbwsH.js +0 -1
- package/dist/client/assets/commerce-onboarding-OnAQudmo.js +0 -1
- package/dist/client/assets/companions-core-Zwoux9HO.js +0 -1
- package/dist/client/assets/file-explorer-LHYs3ZjT.js +0 -2
- package/dist/client/assets/github-repo-picker-B_QoRL-b.js +0 -1
- package/dist/client/assets/index-BoB4jtNg.js +0 -1
- package/dist/client/assets/index-CbMrlBFr.js +0 -2
- package/dist/client/assets/page-seo-sheet-D7RIqvrG.js +0 -1
- package/dist/client/assets/post-editor-DLBj2cKN.js +0 -1
- package/dist/client/assets/project-app-view-9_icLawb.js +0 -1
- package/dist/client/assets/provision-repo-scoped-github-connection-CB4ICKHq.js +0 -1
- package/dist/client/assets/record-editor-oee2Qj_I.js +0 -1
- package/dist/client/assets/redirect-editor-BtYgxzY9.js +0 -1
- package/dist/client/assets/registry-Dl1tv9V3.js +0 -2
- package/dist/client/assets/seo-editor-DwFM6IEi.js +0 -1
- package/dist/client/assets/store-registry-EZCYrXqX.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BnNR1NVs.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-3QrNhYz_.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as q,r as S,l as G,j as t,B as I,i as Q,t as U}from"./index-BB5lA5jj.js";import{i as X}from"./XCircle-C965t8pI.js";import{c as T}from"./ZoomOut-CyT94sXk.js";import{n as Y}from"./LinkExternal01-BEoe9Fb2.js";import{az as Z}from"./agent-icon-jLUxIfUX.js";import{f as K,a as _,b as tt,c as et,d as ot,e as rt,A as it,g as st}from"./alert-dialog-BZCxnnaY.js";import{I as M}from"./input-CcKrVAr2.js";import{L}from"./label-CW15sZLz.js";import{v as mt,w as at,V as nt,o as lt,x as R,A as pt,W as ct,y as dt}from"./index-Bvhurd-Z.js";import{c as ut,B as gt,a as xt}from"./block-document-DivAhnA1.js";import{u as ft}from"./use-autosave-C6ffzJDR.js";import{t as ht}from"./ChevronDown-TeMcV6Wa.js";import{J as yt,K as jt,I as vt}from"./automation-runs-C0bPxXfe.js";import{s as v,E as bt}from"./primitives-ueS43w85.js";import"./AlertCircle-D6YyJJmm.js";import"./UserPlus01-C_-L6kJr.js";import"./Tool01-Ct7fGWUY.js";import"./ArrowUp-D3YFKg7G.js";import"./Settings02-D4nrXgvn.js";import"./Tool02-Cr2Rz6tq.js";import"./ArrowUpRight-DgvFsQng.js";import"./TrendUp01-WsDlxYhZ.js";import"./ZapSquare-r-I1hrGR.js";import"./Users03-uM7w0XRw.js";import"./CheckCircle-DBI4XJwz.js";import"./Check-Bf3Fz6mT.js";import"./ChevronRight-QSLgw-q7.js";import"./ChevronUp-g5JVf1F_.js";import"./Circle-Cu4ym4Ez.js";import"./Stars02-BmKcMhZX.js";import"./Copy01-DgzGIIpj.js";import"./DotsVertical-yY90ybrp.js";import"./Globe01-B7g_9reV.js";import"./Eye-vRl0ZCJB.js";import"./FilterLines-BbWZ4lL4.js";import"./Flag01-CXRHMIef.js";import"./Star01-DBp7dbGs.js";import"./Globe04-C3Z6OIxj.js";import"./SwitchHorizontal01-DJDXmWgC.js";import"./HardDrive-DymMXEyR.js";import"./Image01-Bx4AOGxs.js";import"./Key01-Cmvx37G1.js";import"./LayoutLeft-q_h77zns.js";import"./List-5170zK7Q.js";import"./Monitor01-Kb5okFQS.js";import"./Sun-DWvykssV.js";import"./Package-yySHtAk6.js";import"./Palette-Dacxdv_I.js";import"./Play-BoazbAxP.js";import"./Plus-t7Jm0GJ3.js";import"./SearchLg-CB9_TW_3.js";import"./SearchMd-B8rhT4Rt.js";import"./Shield01-Y3jps5Gy.js";import"./Stars01-BJhn7N1A.js";import"./Trash01-C3QDvJF1.js";import"./Upload01-C2W1llVr.js";import"./User01-Deo29J7j.js";import"./Users01-CLZ2kdTu.js";import"./XClose-D8I17tPk.js";import"./X-DYT1GSz1.js";import"./Zap-p_vD-N15.js";import"./chat-context-C_Qfrzll.js";import"./autosend-pcmp17-1.js";import"./hooks-B2bKZJz3.js";import"./use-mcp-client-W9fEi0Ml.js";import"./constants-D_FQAPnt.js";import"./auth-B0oxX-rw.js";import"./decopilot-sse-pool-_1OoFfRR.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-QgTnVt0y.js";import"./use-virtual-mcp-DpSXhS0n.js";import"./use-collections-D9omaJJu.js";import"./use-ai-providers-BeYG-EjG.js";import"./use-decopilot-events-4o9NNSez.js";import"./tab-id-BijBBRwE.js";import"./use-organization-settings-CQJ8RPRh.js";import"./tooltip-LRHFL41r.js";import"./dialog-C_G4Nj_a.js";import"./drawer-DIzHaW1L.js";import"./collection-search-BBYUHwp3.js";import"./use-mobile-BQOMgKS3.js";import"./AreaChart-CXzSMWrS.js";import"./index-xN4b_CkF.js";import"./shell-layout-DBwpg5fa.js";import"./avatar-BaaCzkz5.js";import"./required-auth-layout-COJ1HesY.js";import"./use-org-sso-Dqg59TFA.js";import"./form-CqMXK7Rg.js";import"./select-BDKopoZs.js";import"./tabs-B0oOCjef.js";import"./toggle-group-MA_94m4S.js";import"./use-deco-credits-D8dtxTPg.js";import"./extract-connection-data-DoTSwnq5.js";import"./connection-card-akwzMfSt.js";import"./use-registry-connections-DdQfbjwO.js";import"./use-connection-hO51hV8J.js";import"./useInfiniteQuery-CyvFYQl8.js";import"./use-infinite-scroll-DgcSj6JD.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-zqYafqG3.js";import"./integration-icon-BFsmKVHF.js";import"./textarea-D3iFRZ9o.js";import"./connection-form-helpers-D-nDOfy5.js";import"./authenticate-and-persist-oauth-DxQqW3T-.js";import"./mcp-oauth-Bx9msuxY.js";import"./collection-tabs-CM7SC5Ph.js";import"./badge-DDX6uCig.js";import"./useSuspenseInfiniteQuery-C33XLke-.js";import"./connect-desktop-dialog-C3MAVbqi.js";import"./select-model-DQ3GcF2Q.js";import"./checkbox-D33J0J5s.js";import"./skeleton-DO-zgL8S.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Bs2y0W38.js";import"./command-BgHIgal-.js";import"./index-OTCSzql6.js";import"./popover-BhnGTRIN.js";import"./dropdown-menu-C3HeQI9N.js";import"./index-JYMtN_ka.js";import"./file-type-icon-Chdi7BrE.js";import"./toolbar-w5KxuBt-.js";import"./use-debounced-value-C8BZDtz1.js";import"./index-DZrgCtW9.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DFGyya-5.js";import"./empty-state-Bn6jIdxN.js";import"./use-mcp-tools-uwmJZn0p.js";import"./use-capability-Dch03R8X.js";import"./use-debounced-autosave-cTAMJ-st.js";import"./index-CuPxvnMd.js";import"./sidebar-BiKcuUlz.js";import"./search-input-IdLCT-wl.js";import"./use-mcp-auth-status-CLsbHDCg.js";import"./switch-7KE_HjZk.js";import"./use-registry-app-DVOJoUv5.js";import"./github-repo-picker-iGTmhvfh.js";import"./use-navigate-to-agent-DqqHYLVD.js";import"./reusable-new-chat-CouMjkYR.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./github-repo-scope-DjMZbiKa.js";import"./use-secrets-CIsNwBX2.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./companions-core-BKQjoMFT.js";import"./format-time-BnbuEtat.js";import"./index-BcGQg-Kx.js";import"./get-initials-D-f_fDFw.js";import"./use-members-B6EJ964p.js";import"./use-org-auth-client-Y5-GC6qM.js";import"./calendar-CtB-1ORd.js";import"./use-copy-tGW1Vaes.js";import"./toolbar-icon-button-Be0Xxrx6.js";import"./monaco-editor-tITHyCTj.js";import"./use-file-configs-CZiarNuS.js";import"./use-automations-CAUzSd8j.js";import"./automation-list-row-f7HB0lEO.js";import"./table-C23nDXu-.js";import"./use-clock-tick-CVibzfL9.js";function Ct(k){const e=q.c(18),{icon:f,title:n,defaultOpen:b,children:d}=k,A=b===void 0?!1:b,[x,D]=S.useState(A);let l;e[0]!==f?(l=t.jsx(f,{size:15}),e[0]=f,e[1]=l):l=e[1];let i;e[2]!==n?(i=t.jsx("span",{className:"flex-1 text-left",children:n}),e[2]=n,e[3]=i):i=e[3];const h=x&&"rotate-180";let r;e[4]!==h?(r=G("transition-transform",h),e[4]=h,e[5]=r):r=e[5];let p;e[6]!==r?(p=t.jsx(ht,{size:15,className:r}),e[6]=r,e[7]=p):p=e[7];let c;e[8]!==l||e[9]!==i||e[10]!==p?(c=t.jsx(yt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,i,p]})}),e[8]=l,e[9]=i,e[10]=p,e[11]=c):c=e[11];let s;e[12]!==d?(s=t.jsx(jt,{className:"px-2 pt-4",children:d}),e[12]=d,e[13]=s):s=e[13];let u;return e[14]!==x||e[15]!==c||e[16]!==s?(u=t.jsxs(vt,{open:x,onOpenChange:D,className:"mt-4",children:[c,s]}),e[14]=x,e[15]=c,e[16]=s,e[17]=u):u=e[17],u}function Cr({orgSlug:k,virtualMcpId:e,branch:f,blockKey:n,block:b,decofile:d,meta:A,onManagePosts:x,onOpenPost:D,previewBaseUrl:l}){const i=mt({orgSlug:k,virtualMcpId:e,branch:f}),h=at(b,"categories"),[r,p,c]=ft(h,o=>{i.mutate({blockKey:n,data:R(n,"categories",o)})}),s=(o,w)=>p({...r,[o]:w}),u=ut({decofile:d,category:r,previewBaseUrl:l}),m=v(r.slug),[B,y]=S.useState(m),[a,C]=S.useState(null),[N,z]=S.useState(!1),P=m?nt(d).filter(o=>o.categorySlugs.includes(m)):[],j=P.length,W=o=>s("slug",o),H=async(o,w)=>{const V=v(r.name);z(!0);try{let g=0;for(const{key:E,payload:O}of pt(d,"posts")){const F=ct(O,o,{name:V,slug:w});F!==O&&(await i.mutateAsync({blockKey:E,data:R(E,"posts",dt(F))}),g+=1)}const $={...r,slug:w};await i.mutateAsync({blockKey:n,data:R(n,"categories",$)}),c($),U.success(g>0?`Renamed slug and updated ${g} ${g===1?"post":"posts"}`:"Renamed slug"),C(null)}catch(g){y(o),C(null),U.error(g instanceof Error?g.message:"Rename failed")}finally{z(!1)}},J=()=>{const o=B.trim();if(o===m){B!==o&&y(o);return}if(!o){y(m);return}if(j===0){W(o);return}C({oldSlug:m,newSlug:o,count:j})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:v(r.name)||"Untitled category"}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(lt,{isPending:i.isPending,isError:i.isError}),u&&t.jsxs(I,{type:"button",variant:"outline",size:"sm",title:"Open the category preview in a new tab",onClick:()=>window.open(u,"_blank","noopener,noreferrer"),children:[t.jsx(Y,{size:14}),"See category preview"]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(bt,{value:v(r.name),onChange:o=>s("name",o),placeholder:"Category name",className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(L,{htmlFor:"category-slug",children:"Slug"}),t.jsx(M,{id:"category-slug",value:B,onChange:o=>y(o.target.value),onBlur:J,placeholder:"my-category",className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(L,{htmlFor:"category-description",children:"Description"}),t.jsx(M,{id:"category-description",value:v(r.description),onChange:o=>s("description",o.target.value),placeholder:"Short description for this category",className:"h-10"})]}),t.jsx(Ct,{icon:Z,title:"Content",defaultOpen:!0,children:t.jsx(gt,{value:xt(r.sections),onChange:o=>s("sections",o),meta:A,emptyMessage:"This category has no content yet. Use ⊕ to add your first block."})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(T,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"text-sm",children:[j," ",j===1?"post":"posts"," in this category"]})]}),t.jsxs(I,{type:"button",variant:"outline",size:"sm",disabled:!m,title:m?"Pick posts to add to this category":"Set a slug to add posts to this category",onClick:()=>x(m),children:["Add posts",t.jsx(X,{size:14})]})]}),j>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:P.map(o=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>D(o.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(T,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:o.title||"Untitled post"}),o.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:o.slug})]})]})},o.key))})]})]})})]}),t.jsx(K,{open:!!a,onOpenChange:o=>{o||N||(y(m),C(null))},children:t.jsxs(_,{children:[t.jsxs(tt,{children:[t.jsx(et,{children:"Rename category slug?"}),t.jsx(ot,{children:a?`Changing the slug from "${a.oldSlug}" to "${a.newSlug}" will update ${a.count} ${a.count===1?"post":"posts"} that reference this category.`:null})]}),t.jsxs(rt,{children:[t.jsx(it,{disabled:N,children:"Cancel"}),t.jsx(st,{onClick:o=>{o.preventDefault(),a&&H(a.oldSlug,a.newSlug)},disabled:N,children:N?t.jsxs(t.Fragment,{children:[t.jsx(Q,{size:14,className:"animate-spin"}),"Renaming…"]}):"Rename & update posts"})]})]})})]})}export{Cr as CategoryEditor};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as oe,l as Xe,bC as Ze,j as K,C as Y,K as ue,m as Ye,cs as Je,R as Ne,n as qe,t as ae,G as le,D as de,b as Fe,u as Ue,e as et,r as y,p as tt,a as nt,U as st,ak as at}from"./index-
|
|
1
|
+
import{c as oe,l as Xe,bC as Ze,j as K,C as Y,K as ue,m as Ye,cs as Je,R as Ne,n as qe,t as ae,G as le,D as de,b as Fe,u as Ue,e as et,r as y,p as tt,a as nt,U as st,ak as at}from"./index-BB5lA5jj.js";import{A as je,c as ot,a as rt,w as it}from"./autosend-pcmp17-1.js";import{S as ct,b as lt,e as dt,u as ut}from"./hooks-B2bKZJz3.js";import{u as pt}from"./studio-tools-QgTnVt0y.js";import{u as ft}from"./use-mcp-client-W9fEi0Ml.js";import{a as ht,S as mt}from"./constants-D_FQAPnt.js";import{a as gt}from"./use-virtual-mcp-DpSXhS0n.js";import{u as yt,a as ge}from"./use-ai-providers-BeYG-EjG.js";import{u as xt}from"./use-decopilot-events-4o9NNSez.js";import{q as St,n as vt}from"./tab-id-BijBBRwE.js";import{g as It}from"./use-organization-settings-CQJ8RPRh.js";const bt={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"],codex:["codex:gpt-5.6-luna"]},Ct={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"],codex:["codex:gpt-5.6-terra"]},kt={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"],"claude-code":["claude-code:opus-1m","claude-code:opus","claude-code:sonnet"],codex:["codex:gpt-5.6-sol"]},Mt={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},Tt={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},wt={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function Qe(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function Et(t){return Qe(t).includes("deepresearch")}const At=["sonar","searchpreview","online"];function Ke(t){const e=Qe(t);return e.includes("deepresearch")?!1:At.some(n=>e.includes(n))}function We(t){return t.asyncResearch!==!0&&Ke(t.modelId)}function Ve(t){return t.asyncResearch===!0||Et(t.modelId)||Ke(t.modelId)}function ie(t,e,n,s){for(const a of n){const o=t.find(r=>r.modelId===a);if(o)return{keyId:e,modelId:o.modelId,title:o.title}}for(const a of n){const o=t.find(r=>r.modelId.includes(a));if(o)return{keyId:e,modelId:o.modelId,title:o.title}}if(s){const a=t.find(s);if(a)return{keyId:e,modelId:a.modelId,title:a.title}}return null}function _t(t,e){const n={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const s of t){const a=e[s.id]??[],o=s.providerId;n.chat.fast||(n.chat.fast=ie(a,s.id,bt[o]??[])),n.chat.smart||(n.chat.smart=ie(a,s.id,Ct[o]??[])),n.chat.thinking||(n.chat.thinking=ie(a,s.id,kt[o]??[])),n.image||(n.image=ie(a,s.id,Mt[o]??[],r=>r.capabilities?.includes("image")===!0)),n.webSearch||(n.webSearch=ie(a,s.id,Tt[o]??[],We)),n.deepResearch||(n.deepResearch=ie(a,s.id,wt[o]??[],Ve))}return n}const Rt=Ze("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function In(t){const e=oe.c(10),{variant:n,size:s}=t;let a;e[0]!==s||e[1]!==n?(a=Xe(Rt({variant:n,size:s})),e[0]=s,e[1]=n,e[2]=a):a=e[2];let o,r;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=K.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),r=K.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=o,e[4]=r):(o=e[3],r=e[4]);let l;e[5]!==a?(l=K.jsxs("svg",{"aria-hidden":"true",className:a,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o,r]}),e[5]=a,e[6]=l):l=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=K.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=h):h=e[7];let m;return e[8]!==l?(m=K.jsxs("div",{role:"status",children:[l,h]}),e[8]=l,e[9]=m):m=e[9],m}const Pe={online:!1,capabilities:[],ready:!1};function Pt(t){const e=oe.c(9),{org:n}=Y(),s=pt(),a=t?.fast??!1;let o;e[0]!==n.id?(o=ue.currentLink(n.id),e[0]=n.id,e[1]=o):o=e[1];let r;e[2]!==s?(r=async()=>{const C=await s.call("LINK_CURRENT_GET",{});return C?{...C,ready:!0}:{...Pe,ready:!0}},e[2]=s,e[3]=r):r=e[3];const l=a?1e3:1e4,h=a?2e3:15e3;let m;e[4]!==o||e[5]!==r||e[6]!==l||e[7]!==h?(m={queryKey:o,queryFn:r,staleTime:l,refetchInterval:h,refetchOnWindowFocus:!0},e[4]=o,e[5]=r,e[6]=l,e[7]=h,e[8]=m):m=e[8];const{data:S}=Ye(m);return S??Pe}function $t(t,e=[]){return t==="stop"?e.filter(a=>a.type==="text"&&a.text).map(a=>a.text).join(`
|
|
2
2
|
`).replace(/https?:\/\/[^\s)>\]]+/g,"").includes("?")?"requires_action":"completed":t==="tool-calls"?e.some(s=>s.type==="tool-user_ask"&&s.state==="input-available"||s.state==="approval-requested")?"requires_action":"completed":"failed"}const Ie={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"}};function Dt(t,e){if(!t)return null;const n=e?Je(e):null;if(t==="decopilot"&&n===null)return"decopilot";for(const[s,a]of Object.entries(Ie))if(a.harness===t&&a.sandbox===n)return s;return null}function bn(t){return t.claudeCode?"claude-code-desktop":t.codex?"codex-desktop":null}function Ot(t,e){return e&&t&&Ie[t].sandbox==="user-desktop"?"decopilot":t}function Lt(t){return t.thread?.harness_id!=null?{}:{harnessId:t.globals.harnessId,sandboxProviderKind:t.globals.sandboxProviderKind,branch:t.globals.branch??null}}function Nt(t){const e=oe.c(10);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=Ne(n);let a;if(e[1]!==s?.params.appSlug||e[2]!==s?.params.collectionName||e[3]!==s?.params.itemId||e[4]!==t){a=[],t&&a.push(`### Selected Agent
|
|
3
3
|
- ID: ${t}`);let o;e[6]!==s?.params.appSlug||e[7]!==s?.params.collectionName||e[8]!==s?.params.itemId?(o=[],s?.params.appSlug&&o.push(`- Connection ID: ${s?.params.appSlug}`),s?.params.collectionName&&o.push(`- Collection: ${s?.params.collectionName}`),s?.params.itemId&&o.push(`- Item ID: ${s?.params.itemId}`),e[6]=s?.params.appSlug,e[7]=s?.params.collectionName,e[8]=s?.params.itemId,e[9]=o):o=e[9],o.length>0&&a.push(`### Current Resource
|
|
4
4
|
The user is viewing the following resource:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,l as d,j as c,bE as l,bF as b}from"./index-
|
|
1
|
+
import{c as n,l as d,j as c,bE as l,bF as b}from"./index-BB5lA5jj.js";import{i as m}from"./Check-Bf3Fz6mT.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(b,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,a as c,r as m,j as o}from"./index-
|
|
1
|
+
import{c as a,a as c,r as m,j as o}from"./index-BB5lA5jj.js";import{A as u}from"./auth-split-layout-CsaahkY7.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as y,j as t,B as F,i as Z,H as Qe,I as se,E as Pe,r as T,C as le,M as Ge,l as V,bd as Ye,u as Ze,L as Q,t as Xe,e as ae,aZ as ke}from"./index-BEqdT-CX.js";import{E as Ee}from"./empty-state-C6JrR5eZ.js";import{u as et,a as Ae}from"./use-collections-Dy7WD_eH.js";import{u as ce}from"./use-mcp-client-DvvHwezb.js";import{F as ne,a as tt,b as de,d as me}from"./form-p6ZihW38.js";import{I as ue}from"./input-CqfDyI-C.js";import{T as re}from"./textarea-B9g6Z2-r.js";import{a as st,b as nt,V as pe,O as ot,M as it}from"./index-BN6_Cjv8.js";import{al as rt,L as lt,ah as at,Q as ct,$ as dt,am as mt,U as be}from"./agent-icon-jdj2JAEm.js";import{g as ut,M as pt,a as Ne}from"./index-BXfKOYdf.js";import{A as xt,a as ft,b as ht}from"./alert-U_1RTm6v.js";import{S as ve,a as Se,b as ye,c as we,d as oe}from"./select-Bh2Z8rK3.js";import{c as gt,b as Ce,T as Ie,a as $e}from"./tooltip-C7c-Tgru.js";import{i as jt}from"./AlertCircle-DFFB807G.js";import{s as bt}from"./Stars02-CzKVb8lE.js";import{a as Nt}from"./Copy01-BEB5hDKQ.js";import{i as vt}from"./Play-BPQdBfbt.js";import{i as St}from"./ChevronRight-UlscOqp6.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./use-mcp-auth-status-Dy_Y2kKR.js";import{a as Oe,u as Re}from"./use-connection-DUpx0NEA.js";import{a as It}from"./use-mcp-tools-Be4djRS3.js";import{M as $t,c as Tt}from"./monaco-editor-YwujFe9g.js";import{I as Te}from"./integration-icon-Dhyv93zr.js";import{h as Pt,m as kt}from"./chat-context-CAoh3qxf.js";import{u as Et}from"./shell-layout-CcPRSmgX.js";import{n as At}from"./Tool02-csu1mOp1.js";import"./constants-D_FQAPnt.js";import"./auth-BR_fNNK7.js";import"./label-DbwTUWd9.js";import"./index-BXTPhNSj.js";import"./sidebar-CRtkHPvX.js";import"./LayoutLeft-CNWN8tpf.js";import"./use-mobile-DbBFg2WD.js";import"./X-CTTK5Zj2.js";import"./ZoomOut-CvmU5uj5.js";import"./Key01-xPUeBTf6.js";import"./extract-connection-data-DEmXsdA0.js";import"./use-registry-connections-CX_dlku1.js";import"./use-organization-settings-CpbybQHD.js";import"./studio-tools-Cdt3UzXo.js";import"./Plus-C8FiAr3i.js";import"./index-DmYBKzjc.js";import"./index-Dz8rxMiO.js";import"./popover-BJYBT3EY.js";import"./use-virtual-mcp-CNKe_WaY.js";import"./Check-BAiULwRg.js";import"./SearchMd-Gwm-384G.js";import"./Users03-Iz-TpUuJ.js";import"./use-create-virtual-mcp-Bbp45Sum.js";import"./use-navigate-to-agent-CBi1-FBB.js";import"./hooks-DYM3Q-Vq.js";import"./decopilot-sse-pool-pi1pVqbX.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./UserPlus01-DjFNU1Mn.js";import"./Tool01-CSravChF.js";import"./ArrowUp-CFU7eduC.js";import"./Settings02-D5c8FtUa.js";import"./XCircle-CiVL5z-e.js";import"./ArrowUpRight-D37SsWBk.js";import"./TrendUp01-Dw2DNRxA.js";import"./ZapSquare-BDp8YrcS.js";import"./CheckCircle-BwwAyNzV.js";import"./ChevronDown-Cpk84lU5.js";import"./ChevronUp-CqCnswy_.js";import"./Circle-pOPoWDQn.js";import"./DotsVertical-BFfMlorx.js";import"./Globe01-DVm51A__.js";import"./Eye-Bbh_ejV6.js";import"./FilterLines-Dm0WP1zI.js";import"./Flag01-e55mynPF.js";import"./Star01-C32-NjaL.js";import"./Globe04-DA8QsMrW.js";import"./SwitchHorizontal01-C8Rnw5uG.js";import"./HardDrive-BJ2MS6we.js";import"./Image01-Y4d3ZI2r.js";import"./LinkExternal01-B6bTrNoI.js";import"./List-gTaMGV9z.js";import"./Monitor01-BdI_dCjX.js";import"./Sun-BPhwV-Eh.js";import"./Package-WlP_SelV.js";import"./Palette-DwivsXKp.js";import"./SearchLg-CMWIHllt.js";import"./Shield01-Dn6encQp.js";import"./Stars01-C8WemEnv.js";import"./Trash01-DZTkGJqE.js";import"./Upload01-s2ES1URH.js";import"./User01-D0_zDlJM.js";import"./Users01-CAC4FOXB.js";import"./XClose-DxMKQUUD.js";import"./Zap-CrYnUVJy.js";import"./badge-zT-Fh3qN.js";import"./mcp-oauth-CeGeftbL.js";import"./index-BTfVRtBq.js";import"./autosend-CIDdvZqc.js";import"./use-ai-providers-C7iVrgY-.js";import"./use-decopilot-events-btxE-D2k.js";import"./tab-id-BijBBRwE.js";import"./avatar-DJpRqbqg.js";import"./dialog-BboVhzku.js";import"./alert-dialog-DtmlB9JL.js";import"./required-auth-layout-BXaZVxWQ.js";import"./use-org-sso-BA_UxewI.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:i,isSaving:r,saveLabel:a,undoLabel:c}=s,l=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!i)return null;let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(rt,{size:14}),e[0]=p):p=e[0];let m;e[1]!==r||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:r,"aria-label":u,children:[p,u]}),e[1]=r,e[2]=n,e[3]=u,e[4]=m):m=e[4];let x;e[5]!==r?(x=r?t.jsx(Z,{size:14,className:"animate-spin"}):t.jsx(lt,{size:14}),e[5]=r,e[6]=x):x=e[6];let f;e[7]!==r||e[8]!==o||e[9]!==l||e[10]!==x?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:r,"aria-label":l,children:[x,l]}),e[7]=r,e[8]=o,e[9]=l,e[10]=x,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Qe({title:se().min(1),description:se().nullable(),body:se()});function ie(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let i;e[1]!==o.control?(i=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:zt}),t.jsx(ne,{control:o.control,name:"description",render:Dt})]})]}),e[1]=o.control,e[2]=i):i=e[2];let r,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=a):(r=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[r,a,t.jsx(ne,{control:o.control,name:"body",render:Mt})]}),e[5]=o.control,e[6]=c):c=e[6];let l;e[7]!==i||e[8]!==c?(l=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=l):l=e[9];let u;return e[10]!==o||e[11]!==l?(u=t.jsx(tt,{...o,children:l}),e[10]=o,e[11]=l,e[12]=u):u=e[12],u}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:i}=le(),r=o||null;let a;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(a={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=a):a=e[3];const c=ce(a),l=et(o,"PROMPT",n,c),u=Ae(o,"PROMPT",c),p=u.update.isPending;let m;e[4]!==l?(m=l?{title:l.title,description:l.description??null,body:ie(l)}:void 0,e[4]=l,e[5]=m):m=e[5];let x;e[6]!==m?(x={values:m},e[6]=m,e[7]=x):x=e[7];const f=Ge(x);let g;e[8]!==f||e[9]!==l?(g=()=>{l&&f.reset({title:l.title,description:l.description??null,body:ie(l)})},e[8]=f,e[9]=l,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const A=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:A.title,description:A.description??null,body:ie(A)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!l){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==l.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:l.title}),e[16]=l.title,e[17]=$):$=e[17];let E;e[18]!==l.description?(E=l.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:l.description})]}):null,e[18]=l.description,e[19]=E):E=e[19];let P;e[20]!==$||e[21]!==E?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,E]})}),e[20]=$,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==p||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:p})}),e[25]=f.formState.isDirty,e[26]=p,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(pe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const i=n;if(!i){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let r;return e[2]!==o?(r=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:i,promptId:o})})}),e[2]=o,e[3]=r):r=e[3],r}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("min-w-0 overflow-hidden",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("ol",{"data-slot":"breadcrumb-list",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("li",{"data-slot":"breadcrumb-item",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function G(s){const e=y.c(10);let o,n,i;e[0]!==s?({asChild:o,className:n,...i}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=i):(o=e[1],n=e[2],i=e[3]);const r=o?Ye:"a";let a;e[4]!==n?(a=V("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==r||e[7]!==i||e[8]!==a?(c=t.jsx(r,{"data-slot":"breadcrumb-link",className:a,...i}),e[6]=r,e[7]=i,e[8]=a,e[9]=c):c=e[9],c}function De(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("text-foreground font-medium truncate",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function Y(s){const e=y.c(12);let o,n,i;e[0]!==s?({children:o,className:n,...i}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=i):(o=e[1],n=e[2],i=e[3]);let r;e[4]!==n?(r=V("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=r):r=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==i||e[9]!==r||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:r,...i,children:a}),e[8]=i,e[9]=r,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:i,onSelectInstance:r,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const l=wt(c);if(!l.isAuthenticated){let m;return e[2]!==l.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:l.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(it,{hasReadme:!1})}),e[2]=l.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let p;return e[5]!==n||e[6]!==r||e[7]!==i||e[8]!==u||e[9]!==o?(p=t.jsx(Vt,{toolName:o,connectionId:n,siblings:i,onSelectInstance:r},u),e[5]=n,e[6]=r,e[7]=i,e[8]=u,e[9]=o,e[10]=p):p=e[10],p}function Vt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:i}=Ze({strict:!1}),r=(()=>{if(!i)return null;const d=`replay-${i}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!r)return null;const d={};for(const[h,v]of Object.entries(r))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,l]=T.useState(a??{}),[u,p]=T.useState(r?JSON.stringify(r,null,2):"{}"),[m,x]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[E,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=le(),k=Oe(e),N=Pt(),A=kt(),{openSidePanel:U}=Et(),z=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),J=d=>{if(!N)return;const h=Tt(d.content);h.content.length>0&&(U("chat"),N.sendMessage({tiptapDoc:h}))},[M,X]=T.useState("json"),[ze,Le]=T.useState(!1);O&&!ze&&(X("ui"),Le(!0));const xe=j?.inputSchema?.properties,fe=xe?Object.keys(xe):[],H=fe.length>0,K={};if(H&&j?.inputSchema?.properties)for(const d of fe)K[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),x(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...K,...c}:(()=>{const D=u.trim();if(!D)return{};const B=JSON.parse(D);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([D,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[D]=="string")try{h[D]=JSON.parse(h[D])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[D]=="string"&&h[D]!==""){const je=Number(h[D]);Number.isNaN(je)||(h[D]=je)}});const v=await _.callTool({name:s,arguments:h}),W=v.structuredContent??v,He=performance.now(),Ke=Math.round(He-d);x(W),g(v),I(h);const We=JSON.stringify(W),ge=new TextEncoder().encode(We).length;w({duration:`${Ke}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const W=performance.now();w({duration:`${Math.round(W-d)}ms`})}finally{P(!1)}},te=(d,h)=>{l(v=>({...v,[d]:h}))},Be=()=>{x(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Ve=t.jsx(_e,{children:t.jsxs(Me,{children:[t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Y,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Y,{})]}),t.jsx(q,{children:t.jsx(De,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Je=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>p(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:E?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(xt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&M==="ui"&&_?t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(pt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:J,onUpdateModelContext:d=>A?.setAppContext(z,d),onTeardown:()=>A?.clearAppContext(z),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx($t,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),Xe.success("Copied to clipboard")},children:t.jsx(Nt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(pe,{breadcrumb:Ve,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Te,{icon:k?.icon||null,name:k?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):L.isLoading?t.jsx(Z,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Je}),qe]})})]})})}function Jt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:i}=s,[r,a]=T.useState(n[0]?.id??"");let c;e[0]!==r||e[1]!==n?(c=n.find(x=>x.id===r)?.id??n[0]?.id??"",e[0]=r,e[1]=n,e[2]=c):c=e[2];const l=c;if(!Oe(l||void 0)||!l){let x;return e[3]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=x):x=e[3],x}let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Z,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=p):p=e[4];let m;return e[5]!==l||e[6]!==i||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:p,children:t.jsx(Ft,{toolName:o,connectionId:l,siblings:n,onSelectInstance:a,onBack:i})}),e[5]=l,e[6]=i,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:i,description:r,buttonProps:a,buttonComponent:c,className:l,children:u}=s;let p;e[0]!==l?(p=V("flex flex-col items-center justify-center py-16 text-center",l),e[0]=l,e[1]=p):p=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let x;e[5]!==i?(x=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:i}),e[5]=i,e[6]=x):x=e[6];let f;e[7]!==r?(f=r&&t.jsx("div",{className:"text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=f):f=e[8];let g;e[9]!==x||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[x,f]}),e[9]=x,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:V(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==p||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:p,children:[m,g,S,u]}),e[15]=u,e[16]=p,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Kt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),i=decodeURIComponent(n.itemId);let r;s[1]!==n.appSlug?(r={slug:n.appSlug},s[1]=n.appSlug,s[2]=r):r=s[2];const a=Re(r);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const l=c,u=Wt;let p;return s[5]!==l||s[6]!==i||s[7]!==a?(p=t.jsx(Jt,{itemId:i,siblings:a,onBack:l,onUpdate:u}),s[5]=l,s[6]=i,s[7]=a,s[8]=p):p=s[8],p}async function Wt(s){return Promise.resolve()}function Qt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Gt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),i=decodeURIComponent(n.collectionName),r=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:l}=le();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,x=m?.id??"",f=x||"no-connection",g=x??null;let S;s[5]!==l.id||s[6]!==l.slug||s[7]!==g?(S={connectionId:g,orgId:l.id,orgSlug:l.slug},s[5]=l.id,s[6]=l.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ae(f,i,I);let $;s[9]!==R||s[10]!==r?($=async M=>{r&&await R.update.mutateAsync({id:r,data:M})},s[9]=R,s[10]=r,s[11]=$):$=s[11];const E=$;let P;s[12]!==i?(P=i?.toLowerCase(),s[12]=i,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==i?(C=Qt(i),s[14]=i,s[15]=C):C=s[15];const k=C;let N;s[16]!==l.slug?(N=t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections",params:{org:l.slug},children:"Connections"})})}),s[16]=l.slug,s[17]=N):N=s[17];let A;s[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Y,{}),s[18]=A):A=s[18];let U;s[19]!==i||s[20]!==m||s[21]!==l.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections/$appSlug",params:{org:l.slug,appSlug:n.appSlug},search:{tab:i},children:m.title})})}),t.jsx(Y,{})]}),s[19]=i,s[20]=m,s[21]=l.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let z;s[24]!==k?(z=t.jsx(q,{children:t.jsx(De,{children:k})}),s[24]=k,s[25]=z):z=s[25];let _;s[26]!==U||s[27]!==z||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(Me,{children:[N,A,U,z]})}),s[26]=U,s[27]=z,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let M;return s[30]!==w||s[31]!==c||s[32]!==E||s[33]!==r?(M=t.jsx(w,{itemId:r,onBack:c,onUpdate:E}),s[30]=w,s[31]=c,s[32]=E,s[33]=r,s[34]=M):M=s[34],M}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(At,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let J;return s[38]!==L||s[39]!==O?(J=t.jsx(pe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=J):J=s[40],J}function Yt(){const s=y.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let r;return s[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Gt,{}),s[2]=r):r=s[2],r}function Gn(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Z,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{Gn as default};
|
|
1
|
+
import{c as y,j as t,B as F,i as Z,H as Qe,I as se,E as Pe,r as T,C as le,M as Ge,l as V,bd as Ye,u as Ze,L as Q,t as Xe,e as ae,aZ as ke}from"./index-BB5lA5jj.js";import{E as Ee}from"./empty-state-Bn6jIdxN.js";import{u as et,a as Ae}from"./use-collections-D9omaJJu.js";import{u as ce}from"./use-mcp-client-W9fEi0Ml.js";import{F as ne,a as tt,b as de,d as me}from"./form-CqMXK7Rg.js";import{I as ue}from"./input-CcKrVAr2.js";import{T as re}from"./textarea-D3iFRZ9o.js";import{a as st,b as nt,V as pe,O as ot,M as it}from"./index-94TmFXEM.js";import{al as rt,L as lt,ah as at,Q as ct,$ as dt,am as mt,U as be}from"./agent-icon-jLUxIfUX.js";import{g as ut,M as pt,a as Ne}from"./index-xN4b_CkF.js";import{A as xt,a as ft,b as ht}from"./alert-JyDMBG9Y.js";import{S as ve,a as Se,b as ye,c as we,d as oe}from"./select-BDKopoZs.js";import{c as gt,b as Ce,T as Ie,a as $e}from"./tooltip-LRHFL41r.js";import{i as jt}from"./AlertCircle-D6YyJJmm.js";import{s as bt}from"./Stars02-BmKcMhZX.js";import{a as Nt}from"./Copy01-DgzGIIpj.js";import{i as vt}from"./Play-BoazbAxP.js";import{i as St}from"./ChevronRight-QSLgw-q7.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./use-mcp-auth-status-CLsbHDCg.js";import{a as Oe,u as Re}from"./use-connection-hO51hV8J.js";import{a as It}from"./use-mcp-tools-uwmJZn0p.js";import{M as $t,c as Tt}from"./monaco-editor-tITHyCTj.js";import{I as Te}from"./integration-icon-BFsmKVHF.js";import{h as Pt,m as kt}from"./chat-context-C_Qfrzll.js";import{u as Et}from"./shell-layout-DBwpg5fa.js";import{n as At}from"./Tool02-Cr2Rz6tq.js";import"./constants-D_FQAPnt.js";import"./auth-B0oxX-rw.js";import"./label-CW15sZLz.js";import"./index-CuPxvnMd.js";import"./sidebar-BiKcuUlz.js";import"./LayoutLeft-q_h77zns.js";import"./use-mobile-BQOMgKS3.js";import"./X-DYT1GSz1.js";import"./ZoomOut-CyT94sXk.js";import"./Key01-Cmvx37G1.js";import"./extract-connection-data-DoTSwnq5.js";import"./use-registry-connections-DdQfbjwO.js";import"./use-organization-settings-CQJ8RPRh.js";import"./studio-tools-QgTnVt0y.js";import"./Plus-t7Jm0GJ3.js";import"./index-BKb79pgL.js";import"./index-OTCSzql6.js";import"./popover-BhnGTRIN.js";import"./use-virtual-mcp-DpSXhS0n.js";import"./Check-Bf3Fz6mT.js";import"./SearchMd-B8rhT4Rt.js";import"./Users03-uM7w0XRw.js";import"./use-create-virtual-mcp-CdWTTl06.js";import"./use-navigate-to-agent-DqqHYLVD.js";import"./hooks-B2bKZJz3.js";import"./decopilot-sse-pool-_1OoFfRR.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./UserPlus01-C_-L6kJr.js";import"./Tool01-Ct7fGWUY.js";import"./ArrowUp-D3YFKg7G.js";import"./Settings02-D4nrXgvn.js";import"./XCircle-C965t8pI.js";import"./ArrowUpRight-DgvFsQng.js";import"./TrendUp01-WsDlxYhZ.js";import"./ZapSquare-r-I1hrGR.js";import"./CheckCircle-DBI4XJwz.js";import"./ChevronDown-TeMcV6Wa.js";import"./ChevronUp-g5JVf1F_.js";import"./Circle-Cu4ym4Ez.js";import"./DotsVertical-yY90ybrp.js";import"./Globe01-B7g_9reV.js";import"./Eye-vRl0ZCJB.js";import"./FilterLines-BbWZ4lL4.js";import"./Flag01-CXRHMIef.js";import"./Star01-DBp7dbGs.js";import"./Globe04-C3Z6OIxj.js";import"./SwitchHorizontal01-DJDXmWgC.js";import"./HardDrive-DymMXEyR.js";import"./Image01-Bx4AOGxs.js";import"./LinkExternal01-BEoe9Fb2.js";import"./List-5170zK7Q.js";import"./Monitor01-Kb5okFQS.js";import"./Sun-DWvykssV.js";import"./Package-yySHtAk6.js";import"./Palette-Dacxdv_I.js";import"./SearchLg-CB9_TW_3.js";import"./Shield01-Y3jps5Gy.js";import"./Stars01-BJhn7N1A.js";import"./Trash01-C3QDvJF1.js";import"./Upload01-C2W1llVr.js";import"./User01-Deo29J7j.js";import"./Users01-CLZ2kdTu.js";import"./XClose-D8I17tPk.js";import"./Zap-p_vD-N15.js";import"./badge-DDX6uCig.js";import"./mcp-oauth-Bx9msuxY.js";import"./index-DZrgCtW9.js";import"./autosend-pcmp17-1.js";import"./use-ai-providers-BeYG-EjG.js";import"./use-decopilot-events-4o9NNSez.js";import"./tab-id-BijBBRwE.js";import"./avatar-BaaCzkz5.js";import"./dialog-C_G4Nj_a.js";import"./alert-dialog-BZCxnnaY.js";import"./required-auth-layout-COJ1HesY.js";import"./use-org-sso-Dqg59TFA.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:i,isSaving:r,saveLabel:a,undoLabel:c}=s,l=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!i)return null;let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(rt,{size:14}),e[0]=p):p=e[0];let m;e[1]!==r||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:r,"aria-label":u,children:[p,u]}),e[1]=r,e[2]=n,e[3]=u,e[4]=m):m=e[4];let x;e[5]!==r?(x=r?t.jsx(Z,{size:14,className:"animate-spin"}):t.jsx(lt,{size:14}),e[5]=r,e[6]=x):x=e[6];let f;e[7]!==r||e[8]!==o||e[9]!==l||e[10]!==x?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:r,"aria-label":l,children:[x,l]}),e[7]=r,e[8]=o,e[9]=l,e[10]=x,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Qe({title:se().min(1),description:se().nullable(),body:se()});function ie(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let i;e[1]!==o.control?(i=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:zt}),t.jsx(ne,{control:o.control,name:"description",render:Dt})]})]}),e[1]=o.control,e[2]=i):i=e[2];let r,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=a):(r=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[r,a,t.jsx(ne,{control:o.control,name:"body",render:Mt})]}),e[5]=o.control,e[6]=c):c=e[6];let l;e[7]!==i||e[8]!==c?(l=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=l):l=e[9];let u;return e[10]!==o||e[11]!==l?(u=t.jsx(tt,{...o,children:l}),e[10]=o,e[11]=l,e[12]=u):u=e[12],u}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:i}=le(),r=o||null;let a;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(a={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=a):a=e[3];const c=ce(a),l=et(o,"PROMPT",n,c),u=Ae(o,"PROMPT",c),p=u.update.isPending;let m;e[4]!==l?(m=l?{title:l.title,description:l.description??null,body:ie(l)}:void 0,e[4]=l,e[5]=m):m=e[5];let x;e[6]!==m?(x={values:m},e[6]=m,e[7]=x):x=e[7];const f=Ge(x);let g;e[8]!==f||e[9]!==l?(g=()=>{l&&f.reset({title:l.title,description:l.description??null,body:ie(l)})},e[8]=f,e[9]=l,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const A=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:A.title,description:A.description??null,body:ie(A)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!l){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==l.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:l.title}),e[16]=l.title,e[17]=$):$=e[17];let E;e[18]!==l.description?(E=l.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:l.description})]}):null,e[18]=l.description,e[19]=E):E=e[19];let P;e[20]!==$||e[21]!==E?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,E]})}),e[20]=$,e[21]=E,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==p||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:p})}),e[25]=f.formState.isDirty,e[26]=p,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(pe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const i=n;if(!i){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ee,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let r;return e[2]!==o?(r=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:i,promptId:o})})}),e[2]=o,e[3]=r):r=e[3],r}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("min-w-0 overflow-hidden",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("ol",{"data-slot":"breadcrumb-list",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("li",{"data-slot":"breadcrumb-item",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function G(s){const e=y.c(10);let o,n,i;e[0]!==s?({asChild:o,className:n,...i}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=i):(o=e[1],n=e[2],i=e[3]);const r=o?Ye:"a";let a;e[4]!==n?(a=V("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==r||e[7]!==i||e[8]!==a?(c=t.jsx(r,{"data-slot":"breadcrumb-link",className:a,...i}),e[6]=r,e[7]=i,e[8]=a,e[9]=c):c=e[9],c}function De(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let i;e[3]!==o?(i=V("text-foreground font-medium truncate",o),e[3]=o,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:i,...n}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function Y(s){const e=y.c(12);let o,n,i;e[0]!==s?({children:o,className:n,...i}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=i):(o=e[1],n=e[2],i=e[3]);let r;e[4]!==n?(r=V("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=r):r=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==i||e[9]!==r||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:r,...i,children:a}),e[8]=i,e[9]=r,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:i,onSelectInstance:r,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const l=wt(c);if(!l.isAuthenticated){let m;return e[2]!==l.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:l.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(it,{hasReadme:!1})}),e[2]=l.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let p;return e[5]!==n||e[6]!==r||e[7]!==i||e[8]!==u||e[9]!==o?(p=t.jsx(Vt,{toolName:o,connectionId:n,siblings:i,onSelectInstance:r},u),e[5]=n,e[6]=r,e[7]=i,e[8]=u,e[9]=o,e[10]=p):p=e[10],p}function Vt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:i}=Ze({strict:!1}),r=(()=>{if(!i)return null;const d=`replay-${i}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!r)return null;const d={};for(const[h,v]of Object.entries(r))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,l]=T.useState(a??{}),[u,p]=T.useState(r?JSON.stringify(r,null,2):"{}"),[m,x]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[E,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=le(),k=Oe(e),N=Pt(),A=kt(),{openSidePanel:U}=Et(),z=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),J=d=>{if(!N)return;const h=Tt(d.content);h.content.length>0&&(U("chat"),N.sendMessage({tiptapDoc:h}))},[M,X]=T.useState("json"),[ze,Le]=T.useState(!1);O&&!ze&&(X("ui"),Le(!0));const xe=j?.inputSchema?.properties,fe=xe?Object.keys(xe):[],H=fe.length>0,K={};if(H&&j?.inputSchema?.properties)for(const d of fe)K[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),x(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...K,...c}:(()=>{const D=u.trim();if(!D)return{};const B=JSON.parse(D);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([D,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[D]=="string")try{h[D]=JSON.parse(h[D])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[D]=="string"&&h[D]!==""){const je=Number(h[D]);Number.isNaN(je)||(h[D]=je)}});const v=await _.callTool({name:s,arguments:h}),W=v.structuredContent??v,He=performance.now(),Ke=Math.round(He-d);x(W),g(v),I(h);const We=JSON.stringify(W),ge=new TextEncoder().encode(We).length;w({duration:`${Ke}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const W=performance.now();w({duration:`${Math.round(W-d)}ms`})}finally{P(!1)}},te=(d,h)=>{l(v=>({...v,[d]:h}))},Be=()=>{x(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Ve=t.jsx(_e,{children:t.jsxs(Me,{children:[t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Y,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Y,{})]}),t.jsx(q,{children:t.jsx(De,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Je=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":K[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>p(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:E?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>X("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(xt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&M==="ui"&&_?t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(pt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:J,onUpdateModelContext:d=>A?.setAppContext(z,d),onTeardown:()=>A?.clearAppContext(z),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx($t,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),Xe.success("Copied to clipboard")},children:t.jsx(Nt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(pe,{breadcrumb:Ve,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Te,{icon:k?.icon||null,name:k?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):L.isLoading?t.jsx(Z,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Je}),qe]})})]})})}function Jt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:i}=s,[r,a]=T.useState(n[0]?.id??"");let c;e[0]!==r||e[1]!==n?(c=n.find(x=>x.id===r)?.id??n[0]?.id??"",e[0]=r,e[1]=n,e[2]=c):c=e[2];const l=c;if(!Oe(l||void 0)||!l){let x;return e[3]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=x):x=e[3],x}let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Z,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=p):p=e[4];let m;return e[5]!==l||e[6]!==i||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:p,children:t.jsx(Ft,{toolName:o,connectionId:l,siblings:n,onSelectInstance:a,onBack:i})}),e[5]=l,e[6]=i,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:i,description:r,buttonProps:a,buttonComponent:c,className:l,children:u}=s;let p;e[0]!==l?(p=V("flex flex-col items-center justify-center py-16 text-center",l),e[0]=l,e[1]=p):p=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let x;e[5]!==i?(x=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:i}),e[5]=i,e[6]=x):x=e[6];let f;e[7]!==r?(f=r&&t.jsx("div",{className:"text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=f):f=e[8];let g;e[9]!==x||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[x,f]}),e[9]=x,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:V(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==p||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:p,children:[m,g,S,u]}),e[15]=u,e[16]=p,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Kt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),i=decodeURIComponent(n.itemId);let r;s[1]!==n.appSlug?(r={slug:n.appSlug},s[1]=n.appSlug,s[2]=r):r=s[2];const a=Re(r);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const l=c,u=Wt;let p;return s[5]!==l||s[6]!==i||s[7]!==a?(p=t.jsx(Jt,{itemId:i,siblings:a,onBack:l,onUpdate:u}),s[5]=l,s[6]=i,s[7]=a,s[8]=p):p=s[8],p}async function Wt(s){return Promise.resolve()}function Qt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Gt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),i=decodeURIComponent(n.collectionName),r=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:l}=le();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,x=m?.id??"",f=x||"no-connection",g=x??null;let S;s[5]!==l.id||s[6]!==l.slug||s[7]!==g?(S={connectionId:g,orgId:l.id,orgSlug:l.slug},s[5]=l.id,s[6]=l.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ae(f,i,I);let $;s[9]!==R||s[10]!==r?($=async M=>{r&&await R.update.mutateAsync({id:r,data:M})},s[9]=R,s[10]=r,s[11]=$):$=s[11];const E=$;let P;s[12]!==i?(P=i?.toLowerCase(),s[12]=i,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==i?(C=Qt(i),s[14]=i,s[15]=C):C=s[15];const k=C;let N;s[16]!==l.slug?(N=t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections",params:{org:l.slug},children:"Connections"})})}),s[16]=l.slug,s[17]=N):N=s[17];let A;s[18]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Y,{}),s[18]=A):A=s[18];let U;s[19]!==i||s[20]!==m||s[21]!==l.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(G,{asChild:!0,children:t.jsx(Q,{to:"/$org/settings/connections/$appSlug",params:{org:l.slug,appSlug:n.appSlug},search:{tab:i},children:m.title})})}),t.jsx(Y,{})]}),s[19]=i,s[20]=m,s[21]=l.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let z;s[24]!==k?(z=t.jsx(q,{children:t.jsx(De,{children:k})}),s[24]=k,s[25]=z):z=s[25];let _;s[26]!==U||s[27]!==z||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(Me,{children:[N,A,U,z]})}),s[26]=U,s[27]=z,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let M;return s[30]!==w||s[31]!==c||s[32]!==E||s[33]!==r?(M=t.jsx(w,{itemId:r,onBack:c,onUpdate:E}),s[30]=w,s[31]=c,s[32]=E,s[33]=r,s[34]=M):M=s[34],M}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(At,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let J;return s[38]!==L||s[39]!==O?(J=t.jsx(pe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=J):J=s[40],J}function Yt(){const s=y.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let r;return s[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Gt,{}),s[2]=r):r=s[2],r}function Gn(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Z,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{Gn as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B,j as s,l as M,B as V}from"./index-
|
|
1
|
+
import{c as B,j as s,l as M,B as V}from"./index-BB5lA5jj.js";import{d as z,a as _,c as $,D as E}from"./dropdown-menu-C3HeQI9N.js";import{i as L,n as O}from"./ArrowUp-D3YFKg7G.js";import{i as S}from"./Check-Bf3Fz6mT.js";import{i as R,c as A}from"./SwitchHorizontal01-DJDXmWgC.js";import{i as F}from"./List-5170zK7Q.js";import{T as I,a as K,c as P,b as W}from"./tooltip-LRHFL41r.js";import{V as q}from"./view-mode-toggle-hMQMe6tZ.js";import{B as G}from"./badge-DDX6uCig.js";function le(t){const e=B.c(31),{viewMode:r,onViewModeChange:x,sortKey:T,sortDirection:p,onSort:f,sortOptions:u,filters:h}=t;let g;e[0]!==u?(g=u===void 0?[]:u,e[0]=u,e[1]=g):g=e[1];const j=g;let b;e[2]!==h?(b=h===void 0?[]:h,e[2]=h,e[3]=b):b=e[3];const l=b;let v;e[4]!==l?(v=l.filter(J),e[4]=l,e[5]=v):v=e[5];const N=v.length;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(R,{size:16}),e[6]=w):w=e[6];let i;e[7]!==N?(i=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[7]=N,e[8]=i):i=e[8];let o;e[9]!==i?(o=s.jsx(I,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"icon",className:"relative",children:[w,i]})})}),e[9]=i,e[10]=o):o=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(K,{children:"Display & filters"}),e[11]=C):C=e[11];let n;e[12]!==o?(n=s.jsx(P,{children:s.jsxs(W,{children:[o,C]})}),e[12]=o,e[13]=n):n=e[13];let a;e[14]!==x||e[15]!==r?(a=x&&r&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:r,onValueChange:x,fullWidth:!0,options:[{value:"table",icon:s.jsx(F,{})},{value:"cards",icon:s.jsx(A,{})}]})}),e[14]=x,e[15]=r,e[16]=a):a=e[16];let c;e[17]!==f||e[18]!==p||e[19]!==T||e[20]!==j?(c=j.length>0&&f&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),j.map(y=>{const D=T===y.id;return s.jsx(z,{onClick:()=>f(y.id),className:M("h-8 px-2 py-0 cursor-pointer",D&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[D&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!D&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:y.label}),D&&p&&(p==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},y.id)})]}),e[17]=f,e[18]=p,e[19]=T,e[20]=j,e[21]=c):c=e[21];let d;e[22]!==l?(d=l.map(H),e[22]=l,e[23]=d):d=e[23];let m;e[24]!==a||e[25]!==c||e[26]!==d?(m=s.jsxs($,{align:"end",className:"w-[200px] p-0 gap-0",children:[a,c,d]}),e[24]=a,e[25]=c,e[26]=d,e[27]=m):m=e[27];let k;return e[28]!==n||e[29]!==m?(k=s.jsxs(E,{children:[n,m]}),e[28]=n,e[29]=m,e[30]=k):k=e[30],k}function H(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const r=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:M("h-8 px-2 py-0 cursor-pointer",r&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!r&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function J(t){return t.value!=="ALL"}export{le as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,l as b,j as a,i as w}from"./index-
|
|
1
|
+
import{c as v,l as b,j as a,i as w}from"./index-BB5lA5jj.js";import{i as C}from"./SearchMd-B8rhT4Rt.js";function S(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{S as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as s,l as C}from"./index-
|
|
1
|
+
import{c as k,j as s,l as C}from"./index-BB5lA5jj.js";import{e as S,d as R,a as T,T as H,b as L,c as z}from"./table-C23nDXu-.js";import{i as D,n as E}from"./ArrowUp-D3YFKg7G.js";function I(y){const e=k.c(29),{columns:r,data:f,sortKey:x,sortDirection:u,onSort:i,onRowClick:n,rowClassName:c}=y;let p;e[0]!==u?(p=function(t,h){return s.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&u&&(u==="asc"?s.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):s.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=u,e[1]=p):p=e[1];const b=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=d):d=e[2];const a=d;let l;if(e[3]!==r||e[4]!==i||e[5]!==b||e[6]!==x){let o;e[8]!==r.length||e[9]!==i||e[10]!==b||e[11]!==x?(o=(t,h)=>{const N=x===t.id;return s.jsx(S,{className:C(a(h,r.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),onClick:t.sortable&&i?()=>i(t.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&b(t.id,N)]})},t.id)},e[8]=r.length,e[9]=i,e[10]=b,e[11]=x,e[12]=o):o=e[12],l=r.map(o),e[3]=r,e[4]=i,e[5]=b,e[6]=x,e[7]=l}else l=e[7];let g;e[13]!==l?(g=s.jsx(R,{className:"border-b-0",children:s.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:l})}),e[13]=l,e[14]=g):g=e[14];let j;if(e[15]!==r||e[16]!==f||e[17]!==n||e[18]!==c){let o;e[20]!==r||e[21]!==n||e[22]!==c?(o=(t,h)=>{const N=c?.(t);return s.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",n?"cursor-pointer":"",N),onClick:n?()=>n(t):void 0,children:r.map(m=>s.jsx(H,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:s.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(t):m.accessor?m.accessor(t):null})},m.id))},h)},e[20]=r,e[21]=n,e[22]=c,e[23]=o):o=e[23],j=f.map(o),e[15]=r,e[16]=f,e[17]=n,e[18]=c,e[19]=j}else j=e[19];let w;e[24]!==j?(w=s.jsx(L,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==g||e[27]!==w?(v=s.jsxs(z,{className:"w-full border-collapse",children:[g,w]}),e[26]=g,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(12),{columns:r,data:f,isLoading:x,sortKey:u,sortDirection:i,onSort:n,onRowClick:c,emptyState:p}=y;if(x===void 0?!1:x){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=a):a=e[0],a}if(f.length===0){let a;e[1]!==p?(a=p||s.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=p,e[2]=a):a=e[2];let l;return e[3]!==a?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:a}),e[3]=a,e[4]=l):l=e[4],l}let d;return e[5]!==r||e[6]!==f||e[7]!==c||e[8]!==n||e[9]!==i||e[10]!==u?(d=s.jsx("div",{className:"flex-1",children:s.jsx(I,{columns:r,data:f,sortKey:u,sortDirection:i,onSort:n,onRowClick:c})}),e[5]=r,e[6]=f,e[7]=c,e[8]=n,e[9]=i,e[10]=u,e[11]=d):d=e[11],d}export{B as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,l as u,j as m}from"./index-
|
|
1
|
+
import{c as f,l as u,j as m}from"./index-BB5lA5jj.js";import{B as g}from"./badge-DDX6uCig.js";function h(x){const e=f.c(12),{tabs:c,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==c){let l;e[6]!==n||e[7]!==s?(l=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,l as i,j as n}from"./index-
|
|
1
|
+
import{c as d,l as i,j as n}from"./index-BB5lA5jj.js";import{_ as m}from"./index-OTCSzql6.js";import{e as k,a as N,h as j,D as w,d as y}from"./dialog-C_G4Nj_a.js";import{i as b}from"./SearchMd-B8rhT4Rt.js";function C(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(w,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(y,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(b,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,B as f,S as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as E,j as o,u as Ie,o as De,p as se,r as M,a as Se,b as Fe,q as qe,d as Te,s as Le,Q as He,E as Ve,K as _e,v as Ue,B as je,N as Be}from"./index-BB5lA5jj.js";import{L as Ke,s as ve,S as Pe,a as Ne,b as Ce,c as be,i as Qe,n as pe,C as we,p as xe}from"./self-tool-result-Dehaso5-.js";import{A as We}from"./auth-entry-BLM6BHE1.js";import{A as Ge}from"./auth-split-layout-CsaahkY7.js";import{O as Re}from"./organization-choice-CLoSaGiq.js";import{I as Ye}from"./input-CcKrVAr2.js";import{u as Je}from"./use-mcp-client-W9fEi0Ml.js";import{S as Xe,W as Ze,g as et,a as tt}from"./constants-D_FQAPnt.js";import{i as it}from"./XCircle-C965t8pI.js";import"./integration-icon-BFsmKVHF.js";import"./Tool02-Cr2Rz6tq.js";import"./agent-icon-jLUxIfUX.js";import"./AlertCircle-D6YyJJmm.js";import"./UserPlus01-C_-L6kJr.js";import"./Tool01-Ct7fGWUY.js";import"./ArrowUp-D3YFKg7G.js";import"./Settings02-D4nrXgvn.js";import"./ArrowUpRight-DgvFsQng.js";import"./TrendUp01-WsDlxYhZ.js";import"./ZapSquare-r-I1hrGR.js";import"./ZoomOut-CyT94sXk.js";import"./Users03-uM7w0XRw.js";import"./CheckCircle-DBI4XJwz.js";import"./Check-Bf3Fz6mT.js";import"./ChevronDown-TeMcV6Wa.js";import"./ChevronRight-QSLgw-q7.js";import"./ChevronUp-g5JVf1F_.js";import"./Circle-Cu4ym4Ez.js";import"./Stars02-BmKcMhZX.js";import"./Copy01-DgzGIIpj.js";import"./DotsVertical-yY90ybrp.js";import"./Globe01-B7g_9reV.js";import"./Eye-vRl0ZCJB.js";import"./FilterLines-BbWZ4lL4.js";import"./Flag01-CXRHMIef.js";import"./Star01-DBp7dbGs.js";import"./Globe04-C3Z6OIxj.js";import"./SwitchHorizontal01-DJDXmWgC.js";import"./HardDrive-DymMXEyR.js";import"./Image01-Bx4AOGxs.js";import"./Key01-Cmvx37G1.js";import"./LayoutLeft-q_h77zns.js";import"./LinkExternal01-BEoe9Fb2.js";import"./List-5170zK7Q.js";import"./Monitor01-Kb5okFQS.js";import"./Sun-DWvykssV.js";import"./Package-yySHtAk6.js";import"./Palette-Dacxdv_I.js";import"./Play-BoazbAxP.js";import"./Plus-t7Jm0GJ3.js";import"./SearchLg-CB9_TW_3.js";import"./SearchMd-B8rhT4Rt.js";import"./Shield01-Y3jps5Gy.js";import"./Stars01-BJhn7N1A.js";import"./Trash01-C3QDvJF1.js";import"./Upload01-C2W1llVr.js";import"./User01-Deo29J7j.js";import"./Users01-CLZ2kdTu.js";import"./XClose-D8I17tPk.js";import"./X-DYT1GSz1.js";import"./Zap-p_vD-N15.js";import"./dialog-C_G4Nj_a.js";import"./tooltip-LRHFL41r.js";import"./companions-core-BKQjoMFT.js";import"./extract-connection-data-DoTSwnq5.js";import"./github-repo-scope-DjMZbiKa.js";import"./form-CqMXK7Rg.js";import"./label-CW15sZLz.js";import"./use-debounced-value-C8BZDtz1.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./authenticate-and-persist-oauth-DxQqW3T-.js";import"./mcp-oauth-Bx9msuxY.js";import"./auth-B0oxX-rw.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-BaaCzkz5.js";const ot={workspace:"Preparando seu workspace de commerce...",generic:"Preparando..."};function nt(l){return ot[l]}function ye(l){const e=E.c(4),{variant:i}=l;let t;e[0]!==i?(t=nt(i),e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=o.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:o.jsx(Ke,{label:t,className:"text-muted-foreground"})}),e[2]=t,e[3]=s):s=e[3],s}function ki(){const l=E.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(st,{}),l[0]=e):e=l[0],e}const Me=M.createContext(null),$e=()=>M.useContext(Me);function R(l){const e=E.c(13);let i,t;e[0]!==l?({visual:t,...i}=l,e[0]=l,e[1]=i,e[2]=t):(i=e[1],t=e[2]);let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/commerce-onboarding"},e[3]=s):s=e[3];const c=Ie(s),{data:a}=Se.useSession(),n=a?.user?.email;let m;e[4]!==c.siteUrl||e[5]!==n?(m=Ce({siteUrl:c.siteUrl,email:n}),e[4]=c.siteUrl,e[5]=n,e[6]=m):m=e[6];const d=m;let u;e[7]!==d||e[8]!==t?(u=t??o.jsx(be,{href:d}),e[7]=d,e[8]=t,e[9]=u):u=e[9];let v;return e[10]!==i||e[11]!==u?(v=o.jsx(Ge,{...i,visual:u}),e[10]=i,e[11]=u,e[12]=v):v=e[12],v}const rt={signUpFailed:"Falha ao criar conta",signInFailed:"Falha ao entrar",authenticationFailed:"Falha na autenticação",resetEmailFailed:"Não foi possível enviar o e-mail de redefinição",otpSendFailed:"Não foi possível enviar o código",invalidCode:"Código inválido",invalidEmail:"E-mail inválido",invalidEmailOrPassword:"E-mail ou senha inválidos. Tente novamente.",accountExists:"Já existe uma conta com este e-mail. Tente entrar em vez de criar uma nova conta.",networkError:"Erro de rede. Verifique sua conexão e tente novamente.",tooManyAttempts:"Muitas tentativas. Aguarde um momento e tente novamente.",invalidOrExpiredCode:"Código inválido ou expirado. Tente novamente.",genericError:"Algo deu errado. Tente novamente.",resetPasswordTitle:"Redefinir sua senha",verificationCodeTitle:"Informe o código de verificação",welcomeTitle:"Bem-vindo à deco",resetPasswordSubtitle:"Enviaremos um link de redefinição",codeSentTo:l=>`Código enviado para ${l}`,defaultSubtitle:"Entre ou crie uma nova conta",resetEmailSent:"Verifique seu e-mail para redefinir a senha.",continueWith:l=>`Continuar com ${l}`,divider:"ou",emailLabel:"E-mail",emailPlaceholder:"Endereço de e-mail",sending:"Enviando...",sendCode:"Enviar código",verificationCodeLabel:"Código de verificação",enterCodePlaceholder:"Informe o código",verifying:"Verificando...",verify:"Verificar",useDifferentEmail:"Usar outro e-mail",sendResetLink:"Enviar link de redefinição",nameLabel:"Nome",namePlaceholder:"Seu nome",passwordLabel:"Senha",forgotPassword:"Esqueceu a senha?",creatingAccount:"Criando conta...",signingIn:"Entrando...",continue:"Continuar",backToSignIn:"Voltar para entrar",signInWithPassword:"Entrar com senha",alreadyHaveAccount:"Já tem uma conta? ",dontHaveAccount:"Não tem uma conta? ",signIn:"Entrar",signUp:"Criar conta",signInWithEmailCode:"Entrar com código por e-mail"};function Oe(l){switch(l){case"Enter a website URL.":return"Informe a URL de um site.";case"Use an HTTP or HTTPS website URL.":return"Use uma URL de site HTTP ou HTTPS.";case"Enter a valid website URL.":return"Informe uma URL de site válida.";default:return l}}let ze=!1;function st(){const l=Ie({from:"/commerce-onboarding"}),{org:e,siteUrl:i}=l,t=ve(i);return!ze&&De()&&(ze=!0,se("commerce_onboarding_viewed",{site_url:i,domain:t??void 0,...t?{$set:{last_scanned_domain:t}}:{}})),o.jsx(Me.Provider,{value:t,children:o.jsx(at,{requestedOrgSlug:e,siteUrl:i})})}function at(l){const e=E.c(8),{requestedOrgSlug:i,siteUrl:t}=l,{data:s,isPending:c}=Se.useSession(),a=$e();if(c){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(R,{children:o.jsx(ye,{variant:"generic"})}),e[0]=m):m=e[0],m}if(!s){const m=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let d;e[1]!==a?(d=a?o.jsx(Pe,{host:a}):void 0,e[1]=a,e[2]=d):d=e[2];let u;return e[3]!==d?(u=o.jsx(R,{children:o.jsx(We,{callbackUrl:m,allowAutoLogin:!1,title:"Desbloqueie seu diagnóstico completo",subtitle:null,brand:d,copy:rt})}),e[3]=d,e[4]=u):u=e[4],u}let n;return e[5]!==i||e[6]!==t?(n=o.jsx(lt,{requestedOrgSlug:i,siteUrl:t}),e[5]=i,e[6]=t,e[7]=n):n=e[7],n}function lt(l){const e=E.c(43),{requestedOrgSlug:i,siteUrl:t}=l,s=Fe(),c=qe(),[a,n]=M.useState(null),[m,d]=M.useState(null),u=c.data?.map(mt)??[];let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={mutationFn:ct,retry:!1,onSuccess:r=>{d(r)}},e[0]=v):v=e[0];const p=Te(v);if(c.isPending){let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(R,{children:o.jsx(ye,{variant:"workspace"})}),e[1]=r):r=e[1],r}if(c.error){let r;return e[2]!==c?(r=o.jsx(ae,{title:"Não foi possível carregar suas organizações",description:"Tente novamente para continuar a configuração de commerce nesta página.",actionLabel:"Tentar novamente",onRetry:()=>c.refetch()}),e[2]=c,e[3]=r):r=e[3],r}const j=i?u.find(r=>r.slug===i):null;if(j){let r;return e[4]!==j||e[5]!==t?(r=o.jsx(re,{org:j,initialSiteUrl:t}),e[4]=j,e[5]=t,e[6]=r):r=e[6],r}if(i){let r;return e[7]!==c?(r=o.jsx(ae,{title:"Organização não encontrada",description:"Não conseguimos encontrar essa organização na sua conta.",actionLabel:"Tentar novamente",onRetry:()=>c.refetch()}),e[7]=c,e[8]=r):r=e[8],r}if(a){let r;return e[9]!==a||e[10]!==t?(r=o.jsx(re,{org:a,initialSiteUrl:t}),e[9]=a,e[10]=t,e[11]=r):r=e[11],r}if(u.length===1&&u[0]){let r;return e[12]!==u[0]||e[13]!==t?(r=o.jsx(re,{org:u[0],initialSiteUrl:t}),e[12]=u[0],e[13]=t,e[14]=r):r=e[14],r}if(u.length>1){let r;e[15]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(k,{title:"Escolha uma organização",description:"Selecione onde o diagnóstico de commerce deve continuar."}),e[15]=r):r=e[15];let h;e[16]!==s||e[17]!==t?(h=O=>s({to:"/commerce-onboarding",search:{org:O.slug,siteUrl:t}}),e[16]=s,e[17]=t,e[18]=h):h=e[18];let C;return e[19]!==u||e[20]!==h?(C=o.jsx(R,{children:o.jsxs("div",{className:"grid gap-10",children:[r,o.jsx(Ne,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:o.jsx(Re,{organizations:u,selectLabel:"Continuar",onSelected:h})})]})}),e[19]=u,e[20]=h,e[21]=C):C=e[21],C}if(!m){let r;e[22]!==p?(r=()=>{p.reset(),p.mutate()},e[22]=p,e[23]=r):r=e[23];let h;return e[24]!==p||e[25]!==r?(h=o.jsx(dt,{mutation:p,onRetry:r}),e[24]=p,e[25]=r,e[26]=h):h=e[26],h}const g=m;if(g?.success&&(g.status==="created"||g.status==="joined"||g.status==="already_has_organization")&&g.organization){let r;return e[27]!==g.organization||e[28]!==t?(r=o.jsx(re,{org:g.organization,initialSiteUrl:t}),e[27]=g.organization,e[28]=t,e[29]=r):r=e[29],r}if(g?.status==="ambiguous"&&g.organizations&&g.organizations.length>0){let r;e[30]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(k,{title:"Escolha uma organização",description:"Seu e-mail pode acessar mais de uma organização. Escolha onde a configuração de commerce deve continuar."}),e[30]=r):r=e[30];const h=g.domain??void 0;let C;e[31]!==s||e[32]!==t?(C=($,P)=>{Le(),n({...$,slug:P}),s({to:"/commerce-onboarding",search:{org:P,siteUrl:t}})},e[31]=s,e[32]=t,e[33]=C):C=e[33];let O;return e[34]!==g.organizations||e[35]!==h||e[36]!==C?(O=o.jsx(R,{children:o.jsxs("div",{className:"grid gap-10",children:[r,o.jsx(Ne,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:o.jsx(Re,{organizations:g.organizations,domain:h,onJoined:C})})]})}),e[34]=g.organizations,e[35]=h,e[36]=C,e[37]=O):O=e[37],O}const S=g?.error??"Não conseguimos determinar uma organização de commerce para esta conta.";let _;e[38]!==p?(_=()=>{d(null),p.reset()},e[38]=p,e[39]=_):_=e[39];let I;return e[40]!==S||e[41]!==_?(I=o.jsx(ae,{title:"O onboarding de commerce precisa de suporte",description:S,actionLabel:"Tentar novamente",onRetry:_}),e[40]=S,e[41]=_,e[42]=I):I=e[42],I}async function ct(){const e=await(await fetch("/api/auth/custom/ensure-organization",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).json();return e.success&&(e.status==="created"||e.status==="joined"||e.status==="already_has_organization")&&e.organization&&Le(),e}function mt(l){return{id:l.id,name:l.name,slug:l.slug,logo:l.logo??null}}function dt(l){const e=E.c(7),{mutation:i,onRetry:t}=l,s=M.useRef(!1);let c;e[0]!==i?(c=d=>{!d||s.current||(s.current=!0,i.mutate())},e[0]=i,e[1]=c):c=e[1];const a=c;if(i.error){let d;return e[2]!==t?(d=o.jsx(ae,{title:"Onboarding de commerce indisponível",description:"Não foi possível preparar uma organização para a configuração de commerce. Tente novamente por esta página ou fale com o suporte.",actionLabel:"Tentar novamente",onRetry:t}),e[2]=t,e[3]=d):d=e[3],d}let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(ye,{variant:"generic"}),e[4]=n):n=e[4];let m;return e[5]!==a?(m=o.jsx(R,{children:o.jsx("div",{ref:a,children:n})}),e[5]=a,e[6]=m):m=e[6],m}function k(l){const e=E.c(8),{title:i,description:t}=l,s=$e();let c;e[0]!==s?(c=s?o.jsx(Pe,{host:s}):o.jsxs("div",{children:[o.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),o.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=s,e[1]=c):c=e[1];let a;e[2]!==t||e[3]!==i?(a=(i||t)&&o.jsxs("div",{className:"space-y-2",children:[i&&o.jsx("h1",{className:"text-2xl font-medium leading-8",children:i}),t&&o.jsx("p",{className:"text-base text-muted-foreground leading-6",children:t})]}),e[2]=t,e[3]=i,e[4]=a):a=e[4];let n;return e[5]!==c||e[6]!==a?(n=o.jsxs("div",{className:"grid gap-10",children:[c,a]}),e[5]=c,e[6]=a,e[7]=n):n=e[7],n}function ae(l){const e=E.c(9),{title:i,description:t,actionLabel:s,onRetry:c}=l;let a;e[0]!==t||e[1]!==i?(a=o.jsx(k,{title:i,description:t}),e[0]=t,e[1]=i,e[2]=a):a=e[2];let n;e[3]!==s||e[4]!==c?(n=o.jsx(je,{type:"button",size:"xl",className:"w-full",onClick:c,children:s}),e[3]=s,e[4]=c,e[5]=n):n=e[5];let m;return e[6]!==a||e[7]!==n?(m=o.jsx(R,{children:o.jsxs("div",{className:"grid gap-10",children:[a,n]})}),e[6]=a,e[7]=n,e[8]=m):m=e[8],m}function re(l){const e=E.c(11),{org:i,initialSiteUrl:t}=l,{data:s}=Se.useSession(),c=s?.user?.email;let a;e[0]!==t||e[1]!==c?(a=Ce({siteUrl:t,email:c}),e[0]=t,e[1]=c,e[2]=a):a=e[2];const n=a;let m;e[3]!==n||e[4]!==i.id?(m=o.jsx(be,{href:n,orgId:i.id}),e[3]=n,e[4]=i.id,e[5]=m):m=e[5];const d=m;let u;return e[6]!==t||e[7]!==d||e[8]!==i||e[9]!==s?.user?.email?(u=o.jsx(He,{children:v=>{const{reset:p}=v;return o.jsx(Ve,{fallback:j=>{const{error:g,resetError:S}=j;return o.jsx(R,{visual:d,children:o.jsx(ut,{orgName:i.name,message:g instanceof Error?g.message:"Não foi possível verificar a configuração do Commerce Discovery.",onRetry:()=>{p(),S()}})})},children:o.jsx(M.Suspense,{fallback:o.jsx(ke,{visual:d}),children:o.jsx(ft,{org:i,initialSiteUrl:t,sessionEmail:s?.user?.email},`${i.id}:${t??""}`)})})}}),e[6]=t,e[7]=d,e[8]=i,e[9]=s?.user?.email,e[10]=u):u=e[10],u}function ke(l){const e=E.c(3),{visual:i}=l;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[o.jsx(k,{}),o.jsx(we,{})]}),e[0]=t):t=e[0];let s;return e[1]!==i?(s=o.jsx(R,{align:"fill",visual:i,children:t}),e[1]=i,e[2]=s):s=e[2],s}function ut(l){const e=E.c(10),{orgName:i,message:t,onRetry:s}=l,c=`A configuração de commerce continuará em ${i}.`;let a;e[0]!==c?(a=o.jsx(k,{title:"Diagnóstico de commerce",description:c}),e[0]=c,e[1]=a):a=e[1];let n;e[2]!==t?(n=o.jsx(le,{message:t}),e[2]=t,e[3]=n):n=e[3];let m;e[4]!==s?(m=o.jsx(je,{type:"button",size:"xl",className:"w-full",onClick:s,children:"Tentar novamente"}),e[4]=s,e[5]=m):m=e[5];let d;return e[6]!==a||e[7]!==n||e[8]!==m?(d=o.jsxs("div",{className:"grid gap-10",children:[a,n,m]}),e[6]=a,e[7]=n,e[8]=m,e[9]=d):d=e[9],d}function ft(l){const e=E.c(109),{org:i,initialSiteUrl:t,sessionEmail:s}=l;let c;e[0]!==i.id||e[1]!==i.slug?(c={connectionId:Xe,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=c):c=e[2];const a=Je(c),[n,m]=M.useState(t??""),[d,u]=M.useState(null),v=M.useRef(!1),p=Ze.COMMERCE_DISCOVERY(i.id),j=et(i.id),g=_e.commerceDiscoveryConnection(i.id,p);let S;e[3]!==p||e[4]!==a?(S=async()=>{const f=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:p}});return xe(f)},e[3]=p,e[4]=a,e[5]=S):S=e[5];let _;e[6]!==g||e[7]!==S?(_={queryKey:g,queryFn:S,retry:!1},e[6]=g,e[7]=S,e[8]=_):_=e[8];const I=Ue(_),r=_e.commerceDiscoveryVirtualMcp(i.id,j);let h;e[9]!==a||e[10]!==j?(h=async()=>{const f=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:j}});return xe(f)},e[9]=a,e[10]=j,e[11]=h):h=e[11];let C;e[12]!==r||e[13]!==h?(C={queryKey:r,queryFn:h,retry:!1},e[12]=r,e[13]=h,e[14]=C):C=e[14];const O=Ue(C);let $;e[15]!==a?($=async f=>{const x=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:f}});return xe(x)},e[15]=a,e[16]=$):$=e[16];let P;e[17]!==I||e[18]!==i.id||e[19]!==O?(P=(f,x)=>{se("commerce_onboarding_setup_succeeded",{domain:ve(x)??void 0,organization_id:i.id}),u(null),I.refetch(),O.refetch()},e[17]=I,e[18]=i.id,e[19]=O,e[20]=P):P=e[20];let A;e[21]!==i.id?(A=(f,x)=>{se("commerce_onboarding_setup_failed",{domain:ve(x)??void 0,organization_id:i.id,error:f instanceof Error?f.message:String(f)}),u(f instanceof Error?f.message:"A configuração do Commerce Discovery falhou.")},e[21]=i.id,e[22]=A):A=e[22];let Q;e[23]!==A||e[24]!==$||e[25]!==P?(Q={mutationFn:$,retry:!1,onSuccess:P,onError:A},e[23]=A,e[24]=$,e[25]=P,e[26]=Q):Q=e[26];const b=Te(Q),Ae=!!I.data.item&&!!O.data.item,Ee=I.data.item,W=typeof Ee?.metadata?.siteUrl=="string"?Ee.metadata.siteUrl:void 0,ce=t||n||"";let G;e[27]!==W||e[28]!==ce?(G=Qe(ce,W),e[27]=W,e[28]=ce,e[29]=G):G=e[29];const Y=Ae&&G,J=t||n||W||"";let X;e[30]!==J||e[31]!==s?(X=Ce({siteUrl:J,email:s}),e[30]=J,e[31]=s,e[32]=X):X=e[32];const me=X;let Z;e[33]!==me||e[34]!==i.id?(Z=o.jsx(be,{href:me,orgId:i.id}),e[33]=me,e[34]=i.id,e[35]=Z):Z=e[35];const y=Z;let ee;e[36]!==b?(ee=f=>{const x=pe(f);if(!x.ok){u(Oe(x.error));return}u(null),b.mutate(x.value)},e[36]=b,e[37]=ee):ee=e[37];const D=ee;let te;e[38]!==t||e[39]!==D||e[40]!==Y?(te=f=>{!f||v.current||Y||!t||(v.current=!0,D(t))},e[38]=t,e[39]=D,e[40]=Y,e[41]=te):te=e[41];const de=te;let ie;e[42]!==i.id||e[43]!==D||e[44]!==n?(ie=f=>{f.preventDefault();const x=pe(n);x.ok&&se("commerce_onboarding_site_url_submitted",{domain:new URL(x.value).hostname,organization_id:i.id}),D(n)},e[42]=i.id,e[43]=D,e[44]=n,e[45]=ie):ie=e[45];const z=ie;if(Y){const f=i.slug;let x;e[46]===Symbol.for("react.memo_cache_sentinel")?(x=crypto.randomUUID(),e[46]=x):x=e[46];let T;e[47]!==i.slug?(T={org:f,taskId:x},e[47]=i.slug,e[48]=T):T=e[48];let U;e[49]!==i.id?(U=tt(i.id),e[49]=i.id,e[50]=U):U=e[50];const L=J||void 0;let N;e[51]!==U.id||e[52]!==L?(N={virtualmcpid:U.id,connect:"1",siteUrl:L},e[51]=U.id,e[52]=L,e[53]=N):N=e[53];let w;return e[54]!==T||e[55]!==N?(w=o.jsx(Be,{to:"/$org/$taskId",params:T,search:N,replace:!0}),e[54]=T,e[55]=N,e[56]=w):w=e[56],w}if(b.isPending){let f;return e[57]!==y?(f=o.jsx(ke,{visual:y}),e[57]=y,e[58]=f):f=e[58],f}if(t){let f,x;if(e[59]!==y||e[60]!==z||e[61]!==t||e[62]!==d||e[63]!==i.name||e[64]!==b.isPending||e[65]!==n){x=Symbol.for("react.early_return_sentinel");e:if(f=pe(t),!f.ok){const fe=`A configuração de commerce continuará em ${i.name}.`;let V;e[68]!==fe?(V=o.jsx(k,{title:"Diagnóstico de commerce",description:fe}),e[68]=fe,e[69]=V):V=e[69];const ge=o.jsx(le,{message:Oe(f.error)});let B;e[70]!==z||e[71]!==d||e[72]!==b.isPending||e[73]!==n?(B=o.jsx(he,{siteUrl:n,error:d,isSubmitting:b.isPending,onSiteUrlChange:m,onSubmit:z}),e[70]=z,e[71]=d,e[72]=b.isPending,e[73]=n,e[74]=B):B=e[74];let K;e[75]!==V||e[76]!==ge||e[77]!==B?(K=o.jsxs("div",{className:"grid gap-10",children:[V,ge,B]}),e[75]=V,e[76]=ge,e[77]=B,e[78]=K):K=e[78];let ne;e[79]!==y||e[80]!==K?(ne=o.jsx(R,{visual:y,children:K}),e[79]=y,e[80]=K,e[81]=ne):ne=e[81],x=ne;break e}e[59]=y,e[60]=z,e[61]=t,e[62]=d,e[63]=i.name,e[64]=b.isPending,e[65]=n,e[66]=f,e[67]=x}else f=e[66],x=e[67];if(x!==Symbol.for("react.early_return_sentinel"))return x;const T=`O Commerce Discovery está sendo preparado para ${f.value}.`;let U;e[82]!==T?(U=o.jsx(k,{title:"Diagnóstico de commerce",description:T}),e[82]=T,e[83]=U):U=e[83];let L;e[84]!==z||e[85]!==d||e[86]!==b.isPending||e[87]!==n?(L=d?o.jsxs(o.Fragment,{children:[o.jsx(le,{message:d}),o.jsx(he,{siteUrl:n,error:null,isSubmitting:b.isPending,onSiteUrlChange:m,onSubmit:z})]}):o.jsx(we,{}),e[84]=z,e[85]=d,e[86]=b.isPending,e[87]=n,e[88]=L):L=e[88];let N;e[89]!==U||e[90]!==L||e[91]!==de?(N=o.jsxs("div",{ref:de,className:"grid gap-10",children:[U,L]}),e[89]=U,e[90]=L,e[91]=de,e[92]=N):N=e[92];let w;return e[93]!==y||e[94]!==N?(w=o.jsx(R,{visual:y,children:N}),e[93]=y,e[94]=N,e[95]=w):w=e[95],w}const ue=`A configuração de commerce continuará em ${i.name}.`;let F;e[96]!==ue?(F=o.jsx(k,{title:"Diagnóstico de commerce",description:ue}),e[96]=ue,e[97]=F):F=e[97];let q;e[98]!==z||e[99]!==d||e[100]!==b.isPending||e[101]!==n?(q=o.jsx(he,{siteUrl:n,error:d,isSubmitting:b.isPending,onSiteUrlChange:m,onSubmit:z}),e[98]=z,e[99]=d,e[100]=b.isPending,e[101]=n,e[102]=q):q=e[102];let H;e[103]!==F||e[104]!==q?(H=o.jsxs("div",{className:"grid gap-10",children:[F,q]}),e[103]=F,e[104]=q,e[105]=H):H=e[105];let oe;return e[106]!==y||e[107]!==H?(oe=o.jsx(R,{visual:y,children:H}),e[106]=y,e[107]=H,e[108]=oe):oe=e[108],oe}function he(l){const e=E.c(20),{siteUrl:i,error:t,isSubmitting:s,onSiteUrlChange:c,onSubmit:a}=l;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:"URL do site"}),e[0]=n):n=e[0];let m;e[1]!==c?(m=_=>c(_.target.value),e[1]=c,e[2]=m):m=e[2];const d=!!t;let u;e[3]!==s||e[4]!==i||e[5]!==m||e[6]!==d?(u=o.jsx(Ye,{id:"commerce-site-url",type:"text",inputMode:"url",value:i,onChange:m,placeholder:"https://example.com","aria-invalid":d,disabled:s}),e[3]=s,e[4]=i,e[5]=m,e[6]=d,e[7]=u):u=e[7];let v;e[8]!==t?(v=t?o.jsx(le,{message:t}):null,e[8]=t,e[9]=v):v=e[9];let p;e[10]!==u||e[11]!==v?(p=o.jsxs("div",{className:"grid gap-2",children:[n,u,v]}),e[10]=u,e[11]=v,e[12]=p):p=e[12];let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(it,{size:16}),e[13]=j):j=e[13];let g;e[14]!==s?(g=o.jsxs(je,{type:"submit",size:"xl",className:"w-full",disabled:s,children:["Continuar",j]}),e[14]=s,e[15]=g):g=e[15];let S;return e[16]!==a||e[17]!==p||e[18]!==g?(S=o.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[p,g]}),e[16]=a,e[17]=p,e[18]=g,e[19]=S):S=e[19],S}function le(l){const e=E.c(2),{message:i}=l;let t;return e[0]!==i?(t=o.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:i}),e[0]=i,e[1]=t):t=e[1],t}export{ki as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as m}from"./extract-connection-data-DoTSwnq5.js";import{a as g}from"./github-repo-scope-DjMZbiKa.js";function I(n){const e=n.properties;if(!e)return[];const t=[];for(const[r,i]of Object.entries(e)){const a=i?.properties?.__type?.const;typeof a=="string"&&a.length>0&&t.push({fieldKey:r,bindingType:a})}return t}const N=[{fieldKey:"vtex",bindingType:"vtex"},{fieldKey:"ga4",bindingType:"google-analytics"},{fieldKey:"gsc",bindingType:"google-search-console"},{fieldKey:"github",bindingType:"github"}];function S(n,e){const t=[];if(n.length&&t.push({field:["id"],operator:"in",value:n}),e.length&&t.push({field:["name"],operator:"in",value:e}),t.length!==0)return t.length===1?t[0]:{operator:"or",conditions:t}}function w(n){const e=n;if(e.isError)throw new Error(e.content?.find(t=>t.text)?.text??"Tool call failed");return e.structuredContent??n}function R(n,e,t,r){return{...n??{},[e]:{__type:t,value:r}}}function p(n){return n==null?!1:typeof n=="string"?n.trim().length>0:typeof n=="number"||typeof n=="boolean"?!0:Array.isArray(n)?n.some(p):typeof n=="object"?Object.entries(n).some(([e,t])=>!e.startsWith("__")&&p(t)):!1}function h(n){const e={accountName:"Nome da conta",appKey:"App Key",appToken:"App Token",propertyId:"Propriedade",siteUrl:"Site"};return e[n]?e[n]:n.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}function b(n){return p(n)?typeof n=="string"?n.trim():typeof n=="number"||typeof n=="boolean"?String(n):JSON.stringify(n):null}function B(n){return n?Object.entries(n).flatMap(([e,t])=>{if(e.startsWith("__"))return[];const r=b(t);return r?[{key:e,label:h(e),value:r}]:[]}):[]}function O({autoOpenFieldKey:n,card:e}){return n===e.fieldKey&&e.satisfied&&!!e.linkedConnectionId}function _(n,e,t){const r=n.filter(i=>(i.app_name===e||!!t&&i.app_id===t)&&g(i)===null);return r.length===0?null:(r.sort((i,o)=>{const s=a=>a.status==="active"?0:1;return s(i)!==s(o)?s(i)-s(o):(o.updated_at??"").localeCompare(i.updated_at??"")}),r[0].id)}function C(n){return n.server?.icons?.[0]?.src??m(n.server?.repository)??null}function T(n,e){const t=n._meta?.["mcp.mesh"];return t?.friendlyName||t?.friendly_name||n.title||n.server?.title||n.server?.name||e}function E(n){const e=[],t=new Map(n.connections.map(r=>[r.id,r]));for(const r of n.requirements){const i=n.curated[r.bindingType],o=i?n.itemsById[i.registryAppId]:n.itemsByName[r.bindingType];if(!o)continue;const s=n.configurationState?.[r.fieldKey]?.value,a=s?t.get(s):void 0,u=s&&a?s:null,d=u?n.connectionReadiness?.[u]!==!1:!1,c=!!u&&d,l=c?void 0:n.saBindings?.[r.bindingType],f=c||!!l,y=c?"oauth":l?"sa":null;e.push({fieldKey:r.fieldKey,bindingType:r.bindingType,registryItem:o,title:T(o,r.bindingType),icon:C(o),headline:i?.headline??o._meta?.["mcp.mesh"]?.short_description??null,area:i?.area??null,bullets:i?.bullets??[],satisfied:f,candidateConnectionId:f?null:u||_(n.connections,r.bindingType,i?.registryAppId),linkedConnectionId:u,configurationState:a?.configuration_state??null,boundVia:y,boundResource:l?.resource??null})}return e}function U(n,e){if(!n)return null;const t=i=>{const o=i.startsWith("sc-domain:")?i.substring(10):(()=>{try{return new URL(i.startsWith("http")?i:`https://${i}`).hostname}catch{return null}})();return o===null?i:o.startsWith("www.")?o.substring(4):o},r=t(n);for(const i of e)if(t(i.siteUrl)===r)return i.siteUrl;return null}function W(n){return(n?.response?.accountSummaries??[]).map(r=>({account:r.account,options:(r.propertySummaries??[]).map(i=>({value:i.property,label:`${i.displayName} (${r.displayName})`}))}))}export{N as F,E as a,S as b,R as c,B as g,U as m,I as p,O as s,W as t,w as u};
|
package/dist/client/assets/{connect-desktop-dialog-B4c48mz3.js → connect-desktop-dialog-C3MAVbqi.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as C,j as t,r as y,B as M,l as j}from"./index-
|
|
1
|
+
import{c as C,j as t,r as y,B as M,l as j}from"./index-BB5lA5jj.js";import{a as D,h as S,D as I,d as R,e as T}from"./dialog-C_G4Nj_a.js";import{u as _,S as A}from"./chat-context-C_Qfrzll.js";import{i as B}from"./Check-Bf3Fz6mT.js";import{a as E}from"./Copy01-DgzGIIpj.js";function N(n){const e=C.c(3),{size:l}=n,o=l===void 0?16:l;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=i):i=e[0];let s;return e[1]!==o?(s=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:i}),e[1]=o,e[2]=s):s=e[2],s}function w(n){const e=C.c(3),{size:l}=n,o=l===void 0?16:l;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=i):i=e[0];let s;return e[1]!==o?(s=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:i}),e[1]=o,e[2]=s):s=e[2],s}const $={"claude-code":{label:"Claude Code",Icon:N},codex:{label:"Codex",Icon:w}};function Y(n){return(n&&$[n])??null}const L="bunx decocms@latest link",k=[{capability:"claude-code",label:"Claude Code",description:"Runs through the Claude Code CLI",icon:t.jsx(N,{size:18})},{capability:"codex",label:"Codex",description:"Runs through the Codex CLI",icon:t.jsx(w,{size:18})}];function q(n){return k.filter(e=>n.includes(e.capability)).map(e=>e.label)}function F(n){const e=C.c(23),{open:l,onOpenChange:o}=n;let i;e[0]!==l?(i={fast:l},e[0]=l,e[1]=i):i=e[1];const s=_(i),[h,v]=y.useState(!1),z=s.hostname??s.machineId??"Your desktop",g=s.online?`Connected to ${z}`:"Connect your desktop";let a;e[2]!==g?(a=t.jsx(D,{children:g}),e[2]=g,e[3]=a):a=e[3];const b=s.online?"This machine provides the following local agents.":"Run this command in your desktop terminal. The dialog will close once your desktop is online.";let c;e[4]!==b?(c=t.jsx(S,{children:b}),e[4]=b,e[5]=c):c=e[5];let r;e[6]!==a||e[7]!==c?(r=t.jsxs(I,{children:[a,c]}),e[6]=a,e[7]=c,e[8]=r):r=e[8];let d;e[9]!==h||e[10]!==s.online?(d=!s.online&&t.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[t.jsx("span",{className:"flex-1",children:L}),t.jsx(M,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(L),v(!0),setTimeout(()=>v(!1),1500)},children:h?t.jsx(B,{size:14}):t.jsx(E,{size:14})})]}),e[9]=h,e[10]=s.online,e[11]=d):d=e[11];let m;e[12]!==s.capabilities||e[13]!==s.online?(m=s.online?t.jsx("div",{className:"flex flex-col gap-3 text-sm",children:t.jsx("div",{className:"flex flex-col gap-2",children:k.map(x=>{const f=s.capabilities.includes(x.capability);return t.jsxs("div",{className:j("flex items-center gap-3 rounded-md border px-3 py-2",f?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[t.jsx("div",{className:j("flex size-6 items-center justify-center",f?"text-foreground":"text-muted-foreground"),children:x.icon}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium",children:x.label}),t.jsx("p",{className:"text-xs text-muted-foreground",children:f?x.description:"Not detected"})]}),t.jsx("span",{className:j("size-2 rounded-full",f?"bg-success":"bg-muted-foreground/30")})]},x.capability)})})}):t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsx(A,{size:"sm"}),"Waiting for desktop…"]}),e[12]=s.capabilities,e[13]=s.online,e[14]=m):m=e[14];let u;e[15]!==r||e[16]!==d||e[17]!==m?(u=t.jsxs(R,{className:"sm:max-w-md",children:[r,d,m]}),e[15]=r,e[16]=d,e[17]=m,e[18]=u):u=e[18];let p;return e[19]!==o||e[20]!==l||e[21]!==u?(p=t.jsx(T,{open:l,onOpenChange:o,children:u}),e[19]=o,e[20]=l,e[21]=u,e[22]=p):p=e[22],p}export{F as C,N as a,w as b,Y as l,q as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,C as $,aY as L,K as k,l as w,j as I}from"./index-
|
|
1
|
+
import{c as M,C as $,aY as L,K as k,l as w,j as I}from"./index-BB5lA5jj.js";import{u as D}from"./use-registry-connections-DdQfbjwO.js";import{d as K}from"./use-organization-settings-CQJ8RPRh.js";import{S as E}from"./constants-D_FQAPnt.js";import{u as Q}from"./useInfiniteQuery-CyvFYQl8.js";import{c as F}from"./use-mcp-client-W9fEi0Ml.js";import{i as H,f as Y}from"./extract-connection-data-DoTSwnq5.js";import{r as q,R as G}from"./retry-CErkP7V6.js";import{g as T}from"./connection-slug-eyAPH6o3.js";import{C as U}from"./card-zqYafqG3.js";import{I as V}from"./integration-icon-BFsmKVHF.js";function fe(){const s=M.c(6),e=D(),t=K(),a=$().project.enabledPlugins??[];let o;if(s[0]!==a||s[1]!==t||s[2]!==e){let l;s[4]!==t?(l=r=>t(r.id),s[4]=t,s[5]=l):l=s[5],o=e.filter(l).map(X),a.includes("private-registry")&&t(E)&&o.push({id:E,title:"Private Registry",icon:null}),s[0]=a,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function X(s){return{id:s.id,title:s.title,icon:s.icon}}const z=24,_=3;function A(s){return s.id.includes("community-registry")}function B(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(a=>t.map(o=>({field:o,operator:"contains",value:a})))}}function S(s,e,t,a,o){const l=s.map(u=>u.id).sort().join(","),r=B(o),{data:p,fetchNextPage:d,hasNextPage:m,isFetchingNextPage:g,isLoading:C}=Q({queryKey:k.storeDiscovery(e,`${l}:${o??""}`),queryFn:async({pageParam:u})=>{const n=u??{};return await Promise.all(s.map(async i=>{const h=n[i.id];if(h==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=H(i.id,e);try{return await q(async()=>{let f=null;try{f=await F({connectionId:i.id,orgId:e,orgSlug:t});const x={limit:z};h&&(x.cursor=h),r&&(x.where=r);const N=await f.callTool({name:j,arguments:x}),v=N.structuredContent??N,P=v.nextCursor||v.cursor||void 0,b=Y(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:b,nextCursor:P}}finally{await f?.close().catch(()=>{})}},{maxAttempts:_,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(f){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${_} attempts:`,f instanceof G?f.cause:f),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:u=>{const n={};let c=!1;for(const i of u)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,c=!0):n[i.registryId]="EXHAUSTED");return c?n:void 0},staleTime:3600*1e3,placeholderData:L,retry:!1,enabled:s.length>0}),y=[];if(p?.pages)for(const u of p.pages)for(const n of u)for(const c of n.items)y.push({...c,_sourceName:c._sourceName??n.registryTitle,_sourceIcon:c._sourceIcon??n.registryIcon,_registryId:c._registryId??n.registryId});return{items:y,hasMore:m??!1,isLoadingMore:g,isInitialLoading:C,fetchNextPage:()=>{m&&!g&&d()}}}function me(s,e){const t=M.c(16),{org:a}=$();let o;t[0]!==s?(o=s.filter(Z),t[0]=s,t[1]=o):o=t[1];const l=o;let r;t[2]!==s?(r=s.filter(W),t[2]=s,t[3]=r):r=t[3];const p=r,d=S(l,a.id,a.slug,!0,e),m=S(p,a.id,a.slug,!0,e);let g;if(t[4]!==m.items||t[5]!==d.items){const h=new Set;g=[];const j=[...d.items,...m.items];for(const f of j){const x=`${f._registryId}:${f.id}`;h.has(x)||(h.add(x),g.push(f))}t[4]=m.items,t[5]=d.items,t[6]=g}else g=t[6];const C=d.isInitialLoading||m.isInitialLoading,y=d.isLoadingMore||m.isLoadingMore,u=d.hasMore||m.hasMore;let n;t[7]!==m||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),m.hasMore&&m.fetchNextPage()},t[7]=m,t[8]=d,t[9]=n):n=t[9];const c=n;let i;return t[10]!==u||t[11]!==C||t[12]!==y||t[13]!==g||t[14]!==c?(i={items:g,hasMore:u,isLoadingMore:y,isInitialLoading:C,loadMore:c},t[10]=u,t[11]=C,t[12]=y,t[13]=g,t[14]=c,t[15]=i):i=t[15],i}function W(s){return A(s)}function Z(s){return!A(s)}function de(s){const e=new Map;for(const o of s){const l=T(o),r=e.get(l);r?r.push(o):e.set(l,[o])}const t=[],a=new Set;for(const o of s){const l=T(o);if(a.has(l))continue;a.add(l);const r=e.get(l),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:l,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function pe(s){const e=M.c(37),{connection:t,onClick:a,headerActions:o,headerActionsAlwaysVisible:l,body:r,footer:p,className:d,fallbackIcon:m}=s,g=l===void 0?!1:l,C=a&&"hover:bg-muted/50";let y;e[0]!==d||e[1]!==C?(y=w("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",C,d),e[0]=d,e[1]=C,e[2]=y):y=e[2];let u;e[3]!==t.icon||e[4]!==t.title||e[5]!==m?(u=I.jsx(V,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:m}),e[3]=t.icon,e[4]=t.title,e[5]=m,e[6]=u):u=e[6];let n;e[7]!==o||e[8]!==g?(n=o&&I.jsx("div",{className:w("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:O,children:o}),e[7]=o,e[8]=g,e[9]=n):n=e[9];let c;e[10]!==n?(c=I.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=c):c=e[11];let i;e[12]!==u||e[13]!==c?(i=I.jsxs("div",{className:"flex items-start justify-between",children:[u,c]}),e[12]=u,e[13]=c,e[14]=i):i=e[14];let h;e[15]!==t.title?(h=I.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=h):h=e[16];const j=t.description||"No description";let f;e[17]!==j?(f=I.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=f):f=e[18];let x;e[19]!==f||e[20]!==h?(x=I.jsxs("div",{className:"flex flex-col gap-1",children:[h,f]}),e[19]=f,e[20]=h,e[21]=x):x=e[21];let N;e[22]!==r?(N=r&&I.jsx("div",{children:r}),e[22]=r,e[23]=N):N=e[23];let v;e[24]!==x||e[25]!==N||e[26]!==i?(v=I.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,x,N]}),e[24]=x,e[25]=N,e[26]=i,e[27]=v):v=e[27];let P;e[28]!==p?(P=p&&I.jsx("div",{className:"border-t border-border mt-auto",children:I.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:J,children:p})}),e[28]=p,e[29]=P):P=e[29];let b;e[30]!==v||e[31]!==P?(b=I.jsxs("div",{className:"flex flex-col flex-1",children:[v,P]}),e[30]=v,e[31]=P,e[32]=b):b=e[32];let R;return e[33]!==a||e[34]!==b||e[35]!==y?(R=I.jsx(U,{className:y,onClick:a,children:b}),e[33]=a,e[34]=b,e[35]=y,e[36]=R):R=e[36],R}function J(s){return s.stopPropagation()}function O(s){return s.stopPropagation()}export{pe as C,me as a,de as g,fe as u};
|