decocms 4.182.2 → 4.182.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BGrbeDYT.js → AlertCircle-aHUodbMz.js} +1 -1
- package/dist/client/assets/{AreaChart-ChjS34cq.js → AreaChart-B5lioxQz.js} +1 -1
- package/dist/client/assets/{ArrowUp-B7rh6W_b.js → ArrowUp-B1slVOB0.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-An4hbib7.js → ArrowUpRight--mFpZoD0.js} +1 -1
- package/dist/client/assets/{Check-DpoXXYhc.js → Check-Bqqh9z-D.js} +1 -1
- package/dist/client/assets/{CheckCircle-DI16N69_.js → CheckCircle-2-UJ4CMp.js} +1 -1
- package/dist/client/assets/{ChevronDown-BbcA24KM.js → ChevronDown-DP1ievFt.js} +1 -1
- package/dist/client/assets/{ChevronRight-BamDO5gK.js → ChevronRight-D_oGoarw.js} +1 -1
- package/dist/client/assets/{ChevronUp-HIfNhOKS.js → ChevronUp-VBLtmSfp.js} +1 -1
- package/dist/client/assets/{Copy01-Bnz3Wx80.js → Copy01-C2PSDvbV.js} +1 -1
- package/dist/client/assets/{CpuChip01-BShcbCHO.js → CpuChip01-BKuPfNBn.js} +1 -1
- package/dist/client/assets/{CreditCard01-DNJmFfow.js → CreditCard01-C-gNn36M.js} +1 -1
- package/dist/client/assets/{DotsVertical-B_iya6B7.js → DotsVertical-CKKotJph.js} +1 -1
- package/dist/client/assets/{Eye-BjhopnZD.js → Eye-C4_fUR7p.js} +1 -1
- package/dist/client/assets/{FilterLines-H3se16dF.js → FilterLines-1LemGTNy.js} +1 -1
- package/dist/client/assets/{HardDrive-Cc0iy42M.js → HardDrive-B3cDKzGK.js} +1 -1
- package/dist/client/assets/{Key01-C21diL-t.js → Key01-DW19snbx.js} +1 -1
- package/dist/client/assets/{LayoutLeft-NGYALHZo.js → LayoutLeft-DT75DZge.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BIYwVSjD.js → LinkExternal01-Cr_D6AUh.js} +1 -1
- package/dist/client/assets/{LogOut01-BYbHv1g4.js → LogOut01-CpinuBoH.js} +1 -1
- package/dist/client/assets/{Monitor01-PnI4BWSm.js → Monitor01-DE267NI6.js} +1 -1
- package/dist/client/assets/{Palette-DqKGGY7c.js → Palette-CFdqAyvh.js} +1 -1
- package/dist/client/assets/{Play-C6pKirQG.js → Play-DQaYqXyr.js} +1 -1
- package/dist/client/assets/{Plus-3NJoZ-Rn.js → Plus-CEsq76GY.js} +1 -1
- package/dist/client/assets/{SearchLg-DUoOTY_-.js → SearchLg-Ccn7y6_h.js} +1 -1
- package/dist/client/assets/{SearchMd-DZC0VFyz.js → SearchMd-Cp5X4j-4.js} +1 -1
- package/dist/client/assets/{Settings02-K87UDDa_.js → Settings02-B88nTmbo.js} +1 -1
- package/dist/client/assets/{Shield01-Dif9NKxP.js → Shield01-7HxK-TBP.js} +1 -1
- package/dist/client/assets/{Star01-BWcFSKod.js → Star01-CmKUJriU.js} +1 -1
- package/dist/client/assets/{Stars01-DNjCGctC.js → Stars01-dsVxW0Iw.js} +1 -1
- package/dist/client/assets/{Stars02-CF9PavPD.js → Stars02-CbWcKkha.js} +1 -1
- package/dist/client/assets/{Sun-D_TMYzXg.js → Sun-Iy-StK2g.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Boo6w6_t.js → SwitchHorizontal01-BJitQzy2.js} +1 -1
- package/dist/client/assets/{Tool01-BjfDVrJb.js → Tool01-2Qll6vRQ.js} +1 -1
- package/dist/client/assets/{Tool02-df-j-2i7.js → Tool02-CO5Ts7uk.js} +1 -1
- package/dist/client/assets/{Trash01-BfrFYc0O.js → Trash01-CxQJ-T3T.js} +1 -1
- package/dist/client/assets/{TrendUp01-Bj5u2ghc.js → TrendUp01-0XOYCeVZ.js} +1 -1
- package/dist/client/assets/{Upload01-DGoH2Bw8.js → Upload01-B8X2BCi1.js} +1 -1
- package/dist/client/assets/{User01-PHqRfaY2.js → User01-C8SW2dlc.js} +1 -1
- package/dist/client/assets/{Users01-CeRMXGJo.js → Users01-Dkku08eU.js} +1 -1
- package/dist/client/assets/{Users03-Cwqfteu1.js → Users03-CNHHA2CB.js} +1 -1
- package/dist/client/assets/{X-D0lgdZFx.js → X-2mQugttC.js} +1 -1
- package/dist/client/assets/{XCircle-BEfRA2Fy.js → XCircle-DcPzz_7R.js} +1 -1
- package/dist/client/assets/{XClose-Ca9PFBA7.js → XClose-DFzRbFQt.js} +1 -1
- package/dist/client/assets/{Zap-Cd4akcPN.js → Zap-BhuYnrjn.js} +1 -1
- package/dist/client/assets/{ZapSquare-2syNvY2F.js → ZapSquare-D8-2DhvZ.js} +1 -1
- package/dist/client/assets/{access-gate-BXHarpej.js → access-gate-BsORq1ML.js} +1 -1
- package/dist/client/assets/{add-section-modal-BtHF1Suz.js → add-section-modal-BDFcNPjF.js} +1 -1
- package/dist/client/assets/{agent-icon-CQRHN6rX.js → agent-icon-CXHCeTMr.js} +1 -1
- package/dist/client/assets/{agents-list-CwubhMUP.js → agents-list-B4JOoj6P.js} +1 -1
- package/dist/client/assets/ai-providers-DG3Wwjk6.js +1 -0
- package/dist/client/assets/{alert-Ig9SrjcF.js → alert-BrapZZ1e.js} +1 -1
- package/dist/client/assets/{alert-dialog-CWFjoJjX.js → alert-dialog-Dp0TwMS2.js} +3 -3
- package/dist/client/assets/app-editor-C5bR2kuD.js +1 -0
- package/dist/client/assets/{auth-av09Sk0f.js → auth-CVRtqdR-.js} +1 -1
- package/dist/client/assets/{auth-catchall-DWcWxlY6.js → auth-catchall-C5-vo66l.js} +1 -1
- package/dist/client/assets/{auth-entry-DOdCfRAO.js → auth-entry-DevPOjDG.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CIY4l9vm.js → auth-split-layout-BWhd9bfi.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CCHy3FzA.js → authenticate-and-persist-oauth-E6sLdro6.js} +1 -1
- package/dist/client/assets/{automation-list-row-CYmqpjOL.js → automation-list-row-adG4CPhS.js} +1 -1
- package/dist/client/assets/{automation-runs-D9S7Bj8t.js → automation-runs-dow6kHOy.js} +1 -1
- package/dist/client/assets/{automations-g7LGm5hd.js → automations-1TSzUOmA.js} +1 -1
- package/dist/client/assets/{avatar-I17szs3Q.js → avatar-CgzSFqk_.js} +1 -1
- package/dist/client/assets/{badge-1BKF0WjP.js → badge-lMx4Em_d.js} +1 -1
- package/dist/client/assets/{billing-EZuyPlZX.js → billing-cg1pMUCL.js} +1 -1
- package/dist/client/assets/{block-document-CrI42xhd.js → block-document-DACwj6cq.js} +1 -1
- package/dist/client/assets/brand-context-_YEJiMtE.js +1 -0
- package/dist/client/assets/{buckets-BjM-OEVV.js → buckets-DDs_bOU6.js} +1 -1
- package/dist/client/assets/bulk-category-panel-CZ1xK5ra.js +1 -0
- package/dist/client/assets/{calendar-ihm97ng4.js → calendar-CYMp7iB8.js} +1 -1
- package/dist/client/assets/{capability-load-error-CdiziQNa.js → capability-load-error-BdQ0RY6o.js} +1 -1
- package/dist/client/assets/{card-ZgfbVCh9.js → card-CmIeTTKx.js} +1 -1
- package/dist/client/assets/category-editor-tpL-X4Ls.js +1 -0
- package/dist/client/assets/chat-context-BLOQKHWz.js +35 -0
- package/dist/client/assets/{checkbox-CQ_C4vJL.js → checkbox-CQzjZNLI.js} +1 -1
- package/dist/client/assets/{cli-auth-success-SOuYeldg.js → cli-auth-success-B_bJdAXe.js} +1 -1
- package/dist/client/assets/collection-detail-BrNskSUP.js +1 -0
- package/dist/client/assets/{collection-display-button-sALJ24Pj.js → collection-display-button-DDQfc_4E.js} +1 -1
- package/dist/client/assets/{collection-search-Bxz23u0F.js → collection-search-Ck8xQbQY.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Dl8DuNBG.js → collection-table-wrapper-CPjrFIXF.js} +1 -1
- package/dist/client/assets/{collection-tabs-DJww20x9.js → collection-tabs-ChTTyKBp.js} +1 -1
- package/dist/client/assets/{command-bMsQFALP.js → command-DVjoIL5Z.js} +1 -1
- package/dist/client/assets/commerce-onboarding-XS_jc2I-.js +1 -0
- package/dist/client/assets/{companions-core-DYxPDPJ-.js → companions-core-ByyoADu_.js} +1 -1
- package/dist/client/assets/{connect-BS6fJ7Zh.js → connect-DcehsLQD.js} +1 -1
- package/dist/client/assets/connection-Bkj-nefY.js +1 -0
- package/dist/client/assets/{connection-card-Di6_Srf0.js → connection-card-C70gWuc_.js} +1 -1
- package/dist/client/assets/connection-detail-Cnm4EZ40.js +1 -0
- package/dist/client/assets/connection-form-helpers-BRiQ_rsM.js +1 -0
- package/dist/client/assets/connections-CL7Q9BT1.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-CsSaGM07.js → decopilot-sse-pool-BHpOwOnT.js} +1 -1
- package/dist/client/assets/{dialog-DFfWjXhn.js → dialog-C4tS6-AJ.js} +1 -1
- package/dist/client/assets/{domain-settings-I5C-7sNQ.js → domain-settings-DhQBJJ9v.js} +1 -1
- package/dist/client/assets/{drawer-CjxVq45y.js → drawer-DCnsLLwJ.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DNVNevD7.js → dropdown-menu-qrFjdFOd.js} +1 -1
- package/dist/client/assets/{empty-state-BkAQUfnz.js → empty-state-BcHx1F5j.js} +1 -1
- package/dist/client/assets/{extract-connection-data-D8g8Vhah.js → extract-connection-data-Btyggj3c.js} +1 -1
- package/dist/client/assets/file-explorer-DGWuJh1T.js +2 -0
- package/dist/client/assets/{form-Cy7Rd3TL.js → form-HuoBuCsb.js} +1 -1
- package/dist/client/assets/general-YiXWqla_.js +1 -0
- package/dist/client/assets/{github-repo-picker-CKQYOUVF.js → github-repo-picker-DXw_3pye.js} +1 -1
- package/dist/client/assets/{hooks-BYQbPRxe.js → hooks-BG8LlYqb.js} +5 -5
- package/dist/client/assets/{index-4j84p8Zm.js → index-BC86WZCo.js} +1 -1
- package/dist/client/assets/{index-C6AlWcn2.js → index-BPHqkwHC.js} +1 -1
- package/dist/client/assets/{index-Dyyz80fH.js → index-BVf7C7ZF.js} +3 -3
- package/dist/client/assets/{index-gWiN9Hkl.js → index-B_Bz9U5o.js} +1 -1
- package/dist/client/assets/{index-DW2rv6fU.js → index-BmYps6j2.js} +1 -1
- package/dist/client/assets/{index-DnUHHdy9.js → index-BsoA0TDj.js} +1 -1
- package/dist/client/assets/{index-B1Swgh1Q.js → index-BwZDbDIY.js} +1 -1
- package/dist/client/assets/index-CiPtrYhG.js +1 -0
- package/dist/client/assets/{index-SVAVudgF.js → index-Cj6tjEF7.js} +1 -1
- package/dist/client/assets/{index-y45nRZhN.js → index-CmIo9JPs.js} +36 -36
- package/dist/client/assets/{index-geMXTkeP.js → index-D-1YQKmA.js} +6 -6
- package/dist/client/assets/{index-BZsTAPza.js → index-D0be3KU_.js} +1 -1
- package/dist/client/assets/{index-redirect-tLRs_ohU.js → index-redirect-kUAcNkcZ.js} +1 -1
- package/dist/client/assets/{input-i4x2nRXJ.js → input-BJ0a7El5.js} +1 -1
- package/dist/client/assets/{integration-icon-G3CkJMl-.js → integration-icon-BolJxA3P.js} +1 -1
- package/dist/client/assets/invite-member-dialog-Cwz44-id.js +1 -0
- package/dist/client/assets/{label-cSCv6rYO.js → label-B51Cfjcb.js} +1 -1
- package/dist/client/assets/{layout-Dc_sBLyQ.js → layout-DNcRGo2s.js} +1 -1
- package/dist/client/assets/{login-BiKFzoUX.js → login-z85wGBst.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Dv6Uhpr5.js → mcp-oauth-ls-QVFRg.js} +1 -1
- package/dist/client/assets/{members-50SkOm91.js → members-DphiZz1R.js} +1 -1
- package/dist/client/assets/{monaco-editor-DNmyyJIn.js → monaco-editor-x5D7h3Zd.js} +4 -4
- package/dist/client/assets/{monitoring-stats-row-C66zfOZ2.js → monitoring-stats-row-A2TkqHkL.js} +1 -1
- package/dist/client/assets/{multi-select-JtlKk2T8.js → multi-select-D-smOS6l.js} +1 -1
- package/dist/client/assets/{oauth-callback-BOmgYt-J.js → oauth-callback-F721pquo.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-D-bUKmX5.js → oauth-callback-ai-provider-BwKYVloT.js} +1 -1
- package/dist/client/assets/{onboarding-Dd0xJ_jB.js → onboarding-CLbPa2Iw.js} +1 -1
- package/dist/client/assets/{org-layout-Cyx2dswG.js → org-layout-efrG08YS.js} +1 -1
- package/dist/client/assets/{organization-choice-Dmy0N3Ho.js → organization-choice-DddHH9KP.js} +1 -1
- package/dist/client/assets/{orgs-c3mClxSP.js → orgs-DdMwkwNa.js} +1 -1
- package/dist/client/assets/{page-seo-form-CT7Q9nSJ.js → page-seo-form-CwTJM4dv.js} +1 -1
- package/dist/client/assets/{popover-i4jezHIh.js → popover-D9cBxWQc.js} +1 -1
- package/dist/client/assets/post-editor-DnSlIXef.js +1 -0
- package/dist/client/assets/{primitives-DONjjQ2v.js → primitives-H5jElIgn.js} +1 -1
- package/dist/client/assets/profile-Aobp6psg.js +1 -0
- package/dist/client/assets/project-app-view-DjrSQfca.js +1 -0
- package/dist/client/assets/record-editor-3OTLDvRE.js +1 -0
- package/dist/client/assets/redirect-editor-DpMy0uAy.js +1 -0
- package/dist/client/assets/registry-Bso8TzZ7.js +2 -0
- package/dist/client/assets/{registry-layout-f4c_WFt1.js → registry-layout-opgZJiz9.js} +1 -1
- package/dist/client/assets/{reports-CVDl7DQS.js → reports-D2yxA8fw.js} +1 -1
- package/dist/client/assets/{require-capability-6g_AHVvS.js → require-capability-CMySxwCj.js} +1 -1
- package/dist/client/assets/{required-auth-layout-S0YtLBA5.js → required-auth-layout-Bvo_3wIM.js} +1 -1
- package/dist/client/assets/{reset-password-mvh2Bp76.js → reset-password-nv8NwNZo.js} +1 -1
- package/dist/client/assets/roles-CYWyfOcz.js +1 -0
- package/dist/client/assets/{search-input-B-QuRigZ.js → search-input-CXdhLilB.js} +1 -1
- package/dist/client/assets/{secrets-DJdQx2SE.js → secrets-B9PJQSCH.js} +1 -1
- package/dist/client/assets/sections-editor-C939paEw.js +2 -0
- package/dist/client/assets/{select-D6zOoh5E.js → select-SeQy1Hg5.js} +1 -1
- package/dist/client/assets/{select-model-BNaO-ex3.js → select-model-CBQ7sKC3.js} +1 -1
- package/dist/client/assets/self-tool-result-BH4oZBIX.js +1 -0
- package/dist/client/assets/seo-editor-PXOzj3WZ.js +1 -0
- package/dist/client/assets/{settings-layout-DhZgaTMP.js → settings-layout-CHRiIOe2.js} +1 -1
- package/dist/client/assets/{settings-section-jz9Avb_j.js → settings-section-CQIkd9Eq.js} +1 -1
- package/dist/client/assets/{shell-controls-Cp2LM0mr.js → shell-controls-D3D-t70c.js} +1 -1
- package/dist/client/assets/{shell-layout-D82GP0rP.js → shell-layout-DfAyNJEZ.js} +1 -1
- package/dist/client/assets/{sidebar-cviY2JKt.js → sidebar-By4K9wDK.js} +1 -1
- package/dist/client/assets/{skeleton-BnFORNZa.js → skeleton-D5IMmpmB.js} +1 -1
- package/dist/client/assets/{spinner-CkuCAiR1.js → spinner-Cz5qI88w.js} +1 -1
- package/dist/client/assets/{sso-De3-zYaW.js → sso-C3F2Mig7.js} +1 -1
- package/dist/client/assets/{store-4sYEV7M-.js → store-BP1goh1R.js} +1 -1
- package/dist/client/assets/store-registry-0mAT-_6s.js +2 -0
- package/dist/client/assets/{studio-tools-DH0-34Hv.js → studio-tools-CBB5NcXK.js} +1 -1
- package/dist/client/assets/{switch-D2uF_EAp.js → switch-DoHyUDLY.js} +1 -1
- package/dist/client/assets/{tab-id-VDxePu-8.js → tab-id-DbJCnUPm.js} +1 -1
- package/dist/client/assets/{table-D5WR7hLa.js → table-CDPtw8xa.js} +1 -1
- package/dist/client/assets/{tabs-CqBl7afq.js → tabs-C1G6by-P.js} +1 -1
- package/dist/client/assets/{textarea-Bn6hQ_Qz.js → textarea-BwRj3BWK.js} +1 -1
- package/dist/client/assets/{toggle-group-D7y3Qsoq.js → toggle-group-GBeHqGC2.js} +1 -1
- package/dist/client/assets/{toolbar-CpuC8NsW.js → toolbar-AgUwum7S.js} +1 -1
- package/dist/client/assets/{tooltip-BrF3GD_a.js → tooltip-DD5bQH23.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CaSDpPjb.js → use-ai-providers-BzQGXce-.js} +1 -1
- package/dist/client/assets/{use-automations-mCzD08OY.js → use-automations-09Ukg4ai.js} +1 -1
- package/dist/client/assets/{use-autosave-Dys6xriZ.js → use-autosave-Dqz98v7e.js} +1 -1
- package/dist/client/assets/{use-capability-Cpe_qvZ_.js → use-capability-B_lZAM70.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CAblMTwd.js → use-clock-tick-DAnBYTL7.js} +1 -1
- package/dist/client/assets/{use-connection-B7cDwiOJ.js → use-connection-BHwQgQE1.js} +1 -1
- package/dist/client/assets/{use-copy-r5QxG4Uf.js → use-copy-CaVFAZIo.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DcGH_7kD.js → use-create-virtual-mcp-6AEcQ_wM.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-9sjmxrz4.js → use-debounced-autosave-B2uo_U0Q.js} +1 -1
- package/dist/client/assets/{use-debounced-value-LrUb7eiJ.js → use-debounced-value-74quYOmV.js} +1 -1
- package/dist/client/assets/use-deco-credits-CBEWHfVh.js +1 -0
- package/dist/client/assets/{use-decopilot-events-up5oIRDt.js → use-decopilot-events-BgusMKRg.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B8yeqLKN.js → use-delete-connection-BiPqYCjC.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-nCX9A08B.js → use-deployment-admin-C59XkfKO.js} +1 -1
- package/dist/client/assets/{use-file-configs-1vs3YVUZ.js → use-file-configs-DVZ67f8T.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CNsERN2g.js → use-infinite-scroll-DXBuOc2K.js} +1 -1
- package/dist/client/assets/{use-join-requests-6lnToRtO.js → use-join-requests-CBhkIuEv.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BBl5zme6.js → use-mcp-client-D2tnZwXX.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BKtLcTYP.js → use-mcp-tools-BSCBM72A.js} +1 -1
- package/dist/client/assets/{use-members-stYO4DxP.js → use-members-CbYX7gT8.js} +1 -1
- package/dist/client/assets/{use-mobile-DMoYecwn.js → use-mobile-DhY0tiih.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-ABFR-14c.js → use-navigate-to-agent-3K4zONOl.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-DU9jxy0C.js → use-open-billing-url-BYrh3DXJ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DoX1JG5g.js → use-org-auth-client-DnAPExjB.js} +1 -1
- package/dist/client/assets/{use-org-sso-BVhPMS3K.js → use-org-sso-CxMNrp--.js} +1 -1
- package/dist/client/assets/{use-organization-roles-A2d2BvKK.js → use-organization-roles-D_3ZeAWB.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DhcL4nY9.js → use-organization-settings-BqeF7AUq.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BoF5es5w.js → use-registry-connections-9U302Lpg.js} +1 -1
- package/dist/client/assets/{use-secrets-BmzIH3vm.js → use-secrets-B1ccTxVT.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DCcIH0HO.js → use-status-sounds-DDz5PHrU.js} +1 -1
- package/dist/client/assets/{use-tags-B8ASGI2M.js → use-tags-CFQKPVS-.js} +1 -1
- package/dist/client/assets/{use-view-mode-xB_4AhUq.js → use-view-mode-DnH7I6ms.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CEV_ngrf.js → use-virtual-mcp-DsypThsI.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-lNJCiHAb.js +1 -0
- package/dist/client/assets/{useRouterState-CZMj98pk.js → useRouterState-57-5hG_a.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-PjgDS9n5.js +1 -0
- package/dist/client/assets/{users-CONOx6T6.js → users-C806VJZs.js} +1 -1
- package/dist/client/assets/{variant-calendar-E6f23yio.js → variant-calendar-RlCZewyQ.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DM6n_Ydg.js → view-mode-toggle-CCjGdqzA.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-BpVENL06.js +0 -1
- package/dist/client/assets/app-editor-B5H5-F8S.js +0 -1
- package/dist/client/assets/brand-context-DVPmwhF3.js +0 -1
- package/dist/client/assets/bulk-category-panel-USUYO_mP.js +0 -1
- package/dist/client/assets/category-editor-DQSbFl5w.js +0 -1
- package/dist/client/assets/chat-context-Duovvv_d.js +0 -35
- package/dist/client/assets/collection-detail-Fz2npTpx.js +0 -1
- package/dist/client/assets/commerce-onboarding-orMZD5VK.js +0 -1
- package/dist/client/assets/connection-CSUNWBHY.js +0 -1
- package/dist/client/assets/connection-detail-XkeoVAsF.js +0 -1
- package/dist/client/assets/connection-form-helpers-Dl1KTkNE.js +0 -1
- package/dist/client/assets/connections-3_b1sdLg.js +0 -1
- package/dist/client/assets/file-explorer-DjVkaNg4.js +0 -2
- package/dist/client/assets/general-CWjnB8Qn.js +0 -1
- package/dist/client/assets/index-a5f43C0l.js +0 -1
- package/dist/client/assets/invite-member-dialog-Bp5nMnrA.js +0 -1
- package/dist/client/assets/post-editor-ITfNNH8c.js +0 -1
- package/dist/client/assets/profile-CJ18mI2I.js +0 -1
- package/dist/client/assets/project-app-view-BEATiNjk.js +0 -1
- package/dist/client/assets/record-editor-CxzRU1Mb.js +0 -1
- package/dist/client/assets/redirect-editor-DmlZU7UI.js +0 -1
- package/dist/client/assets/registry-DHRSWQvL.js +0 -2
- package/dist/client/assets/roles-BDap8m-X.js +0 -1
- package/dist/client/assets/sections-editor-W06wfa9f.js +0 -2
- package/dist/client/assets/self-tool-result-Bjd_Fo-p.js +0 -1
- package/dist/client/assets/seo-editor-DKX2y5cI.js +0 -1
- package/dist/client/assets/store-registry-BKTzIEg1.js +0 -2
- package/dist/client/assets/use-deco-credits-Dp43HFr7.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BI-Ge-Y8.js +0 -1
- package/dist/client/assets/useQueries-d_0_L-iH.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-9ztDghoj.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dX as C,c as d,j as c,
|
|
1
|
+
import{dX as C,c as d,j as c,a5 as j,r as f,m as p,be as b,dY as v,dZ as h}from"./index-D-1YQKmA.js";import{L as N}from"./label-B51Cfjcb.js";const E=C,g=f.createContext({}),M=t=>{const e=d.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=d.c(13),e=f.useContext(g),s=f.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=f.createContext({});function w(t){const e=d.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=f.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=d.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=d.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=d.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{E as F,w as a,P as b,R as c,M as d,L as e,y as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as O,F as J,r as Z,j as i,B as se,L as fe,Z as ue,$ as oe,b as P,o as pe,a1 as xe,a2 as he,e as le,p as ne,t as C,K as re,a5 as je,G as ae,w as Se}from"./index-D-1YQKmA.js";import{P as W}from"./index-BwZDbDIY.js";import{A as _e,b as ve}from"./alert-BrapZZ1e.js";import{i as ze}from"./XCircle-DcPzz_7R.js";import{n as ye}from"./LinkExternal01-Cr_D6AUh.js";import{s as be}from"./XClose-DFzRbFQt.js";import{u as Ae}from"./use-org-auth-client-DnAPExjB.js";import{u as we}from"./use-debounced-autosave-B2uo_U0Q.js";import{A as Ce}from"./avatar-CgzSFqk_.js";import{I as ce}from"./input-BJ0a7El5.js";import{S as X,a as ee,b as Q,c as Oe}from"./settings-section-CQIkd9Eq.js";import{d as me,S as De,a as Ne,b as Te,c as Fe}from"./select-SeQy1Hg5.js";import{S as ke}from"./skeleton-D5IMmpmB.js";import{A as de,t as Pe,aY as Ee,aG as Re,aZ as Ke}from"./agent-icon-CXHCeTMr.js";import{a as $e,i as Ie,f as Me}from"./use-mcp-client-D2tnZwXX.js";import{a as Le}from"./use-virtual-mcp-DsypThsI.js";import{a as Ve}from"./agent-capabilities-cXfbMfjV.js";import{e as qe,h as Ge,u as Be,i as Ue}from"./use-organization-settings-BqeF7AUq.js";import{S as Qe}from"./switch-DoHyUDLY.js";import{D as Ze}from"./domain-settings-DhQBJJ9v.js";import{u as Ye}from"./studio-tools-CBB5NcXK.js";import{A as We,a as He,b as Je,c as Xe,d as et,e as tt,f as it,g as st}from"./alert-dialog-Dp0TwMS2.js";import{R as nt}from"./require-capability-CMySxwCj.js";import"./sidebar-By4K9wDK.js";import"./LayoutLeft-DT75DZge.js";import"./use-mobile-DhY0tiih.js";import"./X-2mQugttC.js";import"./tooltip-DD5bQH23.js";import"./User01-C8SW2dlc.js";import"./card-CmIeTTKx.js";import"./ArrowUpRight--mFpZoD0.js";import"./Check-Bqqh9z-D.js";import"./ChevronDown-DP1ievFt.js";import"./ChevronUp-VBLtmSfp.js";import"./AlertCircle-aHUodbMz.js";import"./Tool01-2Qll6vRQ.js";import"./ArrowUp-B1slVOB0.js";import"./Settings02-B88nTmbo.js";import"./Tool02-CO5Ts7uk.js";import"./TrendUp01-0XOYCeVZ.js";import"./ZapSquare-D8-2DhvZ.js";import"./Users03-CNHHA2CB.js";import"./CheckCircle-2-UJ4CMp.js";import"./ChevronRight-D_oGoarw.js";import"./DotsVertical-CKKotJph.js";import"./Stars02-CbWcKkha.js";import"./Copy01-C2PSDvbV.js";import"./CpuChip01-BKuPfNBn.js";import"./CreditCard01-C-gNn36M.js";import"./Eye-C4_fUR7p.js";import"./FilterLines-1LemGTNy.js";import"./Star01-CmKUJriU.js";import"./Palette-CFdqAyvh.js";import"./SwitchHorizontal01-BJitQzy2.js";import"./HardDrive-B3cDKzGK.js";import"./Key01-DW19snbx.js";import"./LogOut01-CpinuBoH.js";import"./Monitor01-DE267NI6.js";import"./Sun-Iy-StK2g.js";import"./Play-DQaYqXyr.js";import"./Plus-CEsq76GY.js";import"./SearchLg-Ccn7y6_h.js";import"./SearchMd-Cp5X4j-4.js";import"./Shield01-7HxK-TBP.js";import"./Stars01-dsVxW0Iw.js";import"./Trash01-CxQJ-T3T.js";import"./Upload01-B8X2BCi1.js";import"./Users01-Dkku08eU.js";import"./Zap-BhuYnrjn.js";import"./auth-CVRtqdR-.js";import"./badge-lMx4Em_d.js";import"./use-capability-B_lZAM70.js";import"./access-gate-BsORq1ML.js";import"./capability-load-error-BdQ0RY6o.js";function ge(e){return`connect-banner-dismissed:${e}`}function ot(e){if(typeof window>"u")return!0;try{return localStorage.getItem(ge(e))==="1"}catch{return!1}}function rt(){const e=O.c(17),{org:t}=J();let s;e[0]!==t.id?(s=()=>ot(t.id),e[0]=t.id,e[1]=s):s=e[1];const[l,a]=Z.useState(s);if(l)return null;let c;e[2]!==t.id?(c=()=>{a(!0);try{localStorage.setItem(ge(t.id),"1")}catch{}},e[2]=t.id,e[3]=c):c=e[3];const r=c;let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(ye,{}),e[4]=m):m=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx("span",{children:"Use Studio MCP anywhere — paste a command into Claude Code, Cursor, Codex, or any MCP client."}),e[5]=n):n=e[5];let f;e[6]!==t.slug?(f={org:t.slug},e[6]=t.slug,e[7]=f):f=e[7];let o;e[8]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(ze,{size:12}),e[8]=o):o=e[8];let u;e[9]!==f?(u=i.jsx(se,{asChild:!0,size:"sm",variant:"ghost",className:"text-xs gap-1",children:i.jsxs(fe,{to:"/$org/settings/connect",params:f,children:["Connect to clients ",o]})}),e[9]=f,e[10]=u):u=e[10];let d;e[11]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(be,{size:14}),e[11]=d):d=e[11];let g;e[12]!==r?(g=i.jsx(se,{variant:"ghost",size:"icon",className:"size-7",onClick:r,"aria-label":"Dismiss",children:d}),e[12]=r,e[13]=g):g=e[13];let p;return e[14]!==u||e[15]!==g?(p=i.jsxs(_e,{variant:"info",className:"items-center",children:[m,i.jsxs(ve,{className:"flex-1 flex items-center justify-between gap-2 text-sm",children:[n,i.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[u,g]})]})]}),e[14]=u,e[15]=g,e[16]=p):p=e[16],p}const at=ue({name:oe().min(1,"Name is required").max(255,"Name is too long"),logo:oe().optional()});function lt(e){const t=O.c(17),{value:s,onChange:l,name:a,disabled:c}=e,r=P(),m=Z.useRef(null);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>m.current?.click(),t[0]=n):n=t[0];const f=n;let o;t[1]!==l||t[2]!==r?(o=D=>{const h=D.target.files?.[0];if(!h)return;if(h.size>2097152){C.error(r("settings.organizationForm.imageTooLarge"));return}const j=new FileReader;j.onerror=()=>C.error(r("settings.organizationForm.failedToReadImage")),j.onloadend=()=>{j.result&&l(j.result),m.current&&(m.current.value="")},j.readAsDataURL(h)},t[1]=l,t[2]=r,t[3]=o):o=t[3];const u=o;let d;t[4]!==r?(d=r("settings.organizationForm.uploadLogoLabel"),t[4]=r,t[5]=d):d=t[5];let g;t[6]!==c||t[7]!==u?(g=i.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:u,className:"hidden",disabled:c}),t[6]=c,t[7]=u,t[8]=g):g=t[8];const p=s||void 0,x=a??"?";let S;t[9]!==p||t[10]!==x?(S=i.jsx(Ce,{url:p,fallback:x,shape:"square",size:"base"}),t[9]=p,t[10]=x,t[11]=S):S=t[11];let v;return t[12]!==c||t[13]!==d||t[14]!==g||t[15]!==S?(v=i.jsxs("button",{type:"button",onClick:f,disabled:c,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":d,children:[g,S]}),t[12]=c,t[13]=d,t[14]=g,t[15]=S,t[16]=v):v=t[16],v}function ct(){const e=P(),{org:t}=J(),s=Ae(),l=pe(),a=xe({resolver:he(at),values:{name:t.name??"",logo:t.logo??""}}),c=le({mutationFn:async o=>{const u={name:o.name};o.logo&&(u.logo=o.logo);const d=await s.organization.update({data:u});if(d?.error)throw new Error(d.error.message||e("settings.organizationForm.failedToUpdateOrg"));return d},onSuccess:(o,u)=>{ne("organization_settings_updated",{organization_id:t.id,fields:Object.keys(u)}),l.invalidateQueries({queryKey:re.organizations()}),l.invalidateQueries({queryKey:re.activeOrganization(t.slug)}),C.success(e("settings.organizationForm.updateSuccess"))},onError:(o,u)=>{ne("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(u),error:o instanceof Error?o.message:String(o)}),C.error(o instanceof Error?o.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:r,flush:m}=we({save:async()=>{const o=a.control._formState.dirtyFields;if(Object.keys(o).length===0||!await a.trigger())return;const d=a.getValues(),g=a.control._defaultValues;a.reset(d,{keepValues:!0});try{await c.mutateAsync(d)}catch{a.reset(g,{keepValues:!0})}}}),n=a.formState.errors,f=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(X,{children:i.jsxs(ee,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(lt,{value:a.watch("logo"),onChange:o=>{a.setValue("logo",o??"",{shouldDirty:!0}),m()},name:a.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(je,{control:a.control,name:"name",render:({field:o})=>i.jsx(ce,{id:"org-name",...o,onChange:u=>{o.onChange(u),r()},onBlur:()=>{o.onBlur(),m()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(Q,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[f&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:f}),i.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(n.name||n.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[n.name&&i.jsx("p",{className:"text-xs text-destructive",children:n.name.message}),n.logo&&i.jsx("p",{className:"text-xs text-destructive",children:n.logo.message})]})]})})}const ie="__super_agent__";function mt(){const e=O.c(42),t=P(),{org:s}=J(),l=Le(),{mainAgentId:a}=qe(),c=Ge();let r,m,n,f,o,u,d,g;if(e[0]!==l||e[1]!==a||e[2]!==s.id||e[3]!==c||e[4]!==t){const S=Ve(l),v=(l??[]).filter(ft).filter(_=>!S.has(_.id)).filter(gt);let D;e[13]!==s.id?(D=$e(s.id),e[13]=s.id,e[14]=D):D=e[14];const h=D,j=a!=null?(l??[]).find(_=>_.id===a):void 0,N=j?j.id:ie,T=j&&!v.some(_=>_.id===j.id)?[j,...v]:v;let w;e[15]!==l||e[16]!==c||e[17]!==h.title||e[18]!==t?(w=_=>{const A=_===ie?null:_,R=A===null?h.title:(l??[]).find(k=>k.id===A)?.title??"";c.mutate(A,{onSuccess:()=>C.success(A===null?t("settings.mainAgent.resetToast"):t("settings.mainAgent.setToast",{title:R})),onError:()=>C.error(t("settings.mainAgent.errorToast"))})},e[15]=l,e[16]=c,e[17]=h.title,e[18]=t,e[19]=w):w=e[19];const F=w;m=De,o=N,u=F,d=c.isPending,e[20]===Symbol.for("react.memo_cache_sentinel")?(g=i.jsx(Ne,{className:"w-full sm:w-[280px]",children:i.jsx(Te,{})}),e[20]=g):g=e[20],r=Fe;let z;e[21]!==h.icon||e[22]!==h.title?(z=i.jsx(de,{icon:h.icon,name:h.title,size:"xs",className:"shrink-0"}),e[21]=h.icon,e[22]=h.title,e[23]=z):z=e[23];let y;e[24]!==t?(y=t("settings.mainAgent.superAgentOption"),e[24]=t,e[25]=y):y=e[25];let b;e[26]!==y?(b=i.jsx("span",{className:"truncate",children:y}),e[26]=y,e[27]=b):b=e[27],e[28]!==b||e[29]!==z?(n=i.jsx(me,{value:ie,children:i.jsxs("span",{className:"flex items-center gap-2",children:[z,b]})}),e[28]=b,e[29]=z,e[30]=n):n=e[30],f=T.map(dt),e[0]=l,e[1]=a,e[2]=s.id,e[3]=c,e[4]=t,e[5]=r,e[6]=m,e[7]=n,e[8]=f,e[9]=o,e[10]=u,e[11]=d,e[12]=g}else r=e[5],m=e[6],n=e[7],f=e[8],o=e[9],u=e[10],d=e[11],g=e[12];let p;e[31]!==r||e[32]!==n||e[33]!==f?(p=i.jsxs(r,{children:[n,f]}),e[31]=r,e[32]=n,e[33]=f,e[34]=p):p=e[34];let x;return e[35]!==m||e[36]!==o||e[37]!==u||e[38]!==d||e[39]!==g||e[40]!==p?(x=i.jsxs(m,{value:o,onValueChange:u,disabled:d,children:[g,p]}),e[35]=m,e[36]=o,e[37]=u,e[38]=d,e[39]=g,e[40]=p,e[41]=x):x=e[41],x}function dt(e){return i.jsx(me,{value:e.id,children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(de,{icon:e.icon,name:e.title,size:"xs",className:"shrink-0"}),i.jsx("span",{className:"truncate",children:e.title})]})},e.id)}function gt(e){return!Me(e.id)}function ft(e){return!Ie(e.id)}function ut(){const e=O.c(16),t=P();let s;e[0]!==t?(s=t("settings.mainAgent.title"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==t?(l=t("settings.mainAgent.description"),e[2]=t,e[3]=l):l=e[3];let a;e[4]!==t?(a=t("settings.mainAgent.itemTitle"),e[4]=t,e[5]=a):a=e[5];let c;e[6]!==t?(c=t("settings.mainAgent.itemDescription"),e[6]=t,e[7]=c):c=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(Z.Suspense,{fallback:i.jsx(ke,{className:"h-9 w-[280px]"}),children:i.jsx(mt,{})}),e[8]=r):r=e[8];let m;e[9]!==a||e[10]!==c?(m=i.jsx(ee,{children:i.jsx(Q,{title:a,description:c,action:r})}),e[9]=a,e[10]=c,e[11]=m):m=e[11];let n;return e[12]!==s||e[13]!==l||e[14]!==m?(n=i.jsx(X,{title:s,description:l,children:m}),e[12]=s,e[13]=l,e[14]=m,e[15]=n):n=e[15],n}function pt(){const e=O.c(11),t=P();let s;e[0]!==t?(s=t("settings.review.title"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==t?(l=t("settings.review.description"),e[2]=t,e[3]=l):l=e[3];let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(H,{flag:"qa_agent_enabled",icon:i.jsx(Pe,{size:16}),titleKey:"settings.review.qaAgentTitle",descriptionKey:"settings.review.qaAgentDescription"}),e[4]=a):a=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(H,{flag:"code_reviewer_enabled",icon:i.jsx(Ee,{size:16}),titleKey:"settings.review.codeReviewerTitle",descriptionKey:"settings.review.codeReviewerDescription"}),e[5]=c):c=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(H,{flag:"auto_merge",icon:i.jsx(Re,{size:16}),titleKey:"settings.review.autoMergeTitle",descriptionKey:"settings.review.autoMergeDescription"}),e[6]=r):r=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsxs(ee,{children:[a,c,r,i.jsx(H,{flag:"auto_assign_report_tasks_to_super_agent",icon:i.jsx(Ke,{size:16}),titleKey:"settings.review.autoAssignReportTasksTitle",descriptionKey:"settings.review.autoAssignReportTasksDescription"})]}),e[7]=m):m=e[7];let n;return e[8]!==s||e[9]!==l?(n=i.jsx(X,{title:s,description:l,children:m}),e[8]=s,e[9]=l,e[10]=n):n=e[10],n}function H(e){const t=O.c(23),{flag:s,icon:l,titleKey:a,descriptionKey:c}=e,r=P(),m=Be(s),n=Ue();let f;t[0]!==r||t[1]!==a?(f=r(a),t[0]=r,t[1]=a,t[2]=f):f=t[2];let o;t[3]!==c||t[4]!==r?(o=r(c),t[3]=c,t[4]=r,t[5]=o):o=t[5];const u=n.isPending;let d;t[6]!==r||t[7]!==a?(d=r(a),t[6]=r,t[7]=a,t[8]=d):d=t[8];let g;t[9]!==s||t[10]!==n||t[11]!==r?(g=S=>n.mutate(s,S,{onError:()=>C.error(r("settings.review.updateError"))}),t[9]=s,t[10]=n,t[11]=r,t[12]=g):g=t[12];let p;t[13]!==m||t[14]!==n.isPending||t[15]!==d||t[16]!==g?(p=i.jsx(Qe,{checked:m,disabled:u,"aria-label":d,onCheckedChange:g}),t[13]=m,t[14]=n.isPending,t[15]=d,t[16]=g,t[17]=p):p=t[17];let x;return t[18]!==l||t[19]!==f||t[20]!==o||t[21]!==p?(x=i.jsx(Q,{icon:l,title:f,description:o,action:p}),t[18]=l,t[19]=f,t[20]=o,t[21]=p,t[22]=x):x=t[22],x}function xt(){const e=O.c(86),t=P(),{org:s}=J(),[l,a]=Z.useState(!1),[c,r]=Z.useState(""),m=Ye();let n;e[0]!==s.id||e[1]!==m?(n=async()=>{await m.call("ORGANIZATION_DELETE",{id:s.id})},e[0]=s.id,e[1]=m,e[2]=n):n=e[2];let f;e[3]!==s.id||e[4]!==s.slug||e[5]!==t?(f=()=>{ne("organization_deleted",{organization_id:s.id}),localStorage.getItem(ae.lastOrgSlug())===s.slug&&localStorage.removeItem(ae.lastOrgSlug()),Se(),C.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=s.id,e[4]=s.slug,e[5]=t,e[6]=f):f=e[6];let o;e[7]!==t?(o=E=>{C.error(E instanceof Error?E.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=o):o=e[8];let u;e[9]!==n||e[10]!==f||e[11]!==o?(u={mutationFn:n,onSuccess:f,onError:o},e[9]=n,e[10]=f,e[11]=o,e[12]=u):u=e[12];const d=le(u);let g;e[13]!==t?(g=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=g):g=e[14];let p;e[15]!==t?(p=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=p):p=e[16];let x;e[17]!==t?(x=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=x):x=e[18];let S;e[19]!==t?(S=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=S):S=e[20];let v;e[21]===Symbol.for("react.memo_cache_sentinel")?(v=()=>a(!0),e[21]=v):v=e[21];const D=d.isPending;let h;e[22]!==t?(h=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=h):h=e[23];let j;e[24]!==d.isPending||e[25]!==h?(j=i.jsx(se,{variant:"destructive",size:"sm",onClick:v,disabled:D,children:h}),e[24]=d.isPending,e[25]=h,e[26]=j):j=e[26];let N;e[27]!==j||e[28]!==x||e[29]!==S?(N=i.jsx(ee,{className:"border-destructive/40",children:i.jsx(Q,{title:x,description:S,action:j})}),e[27]=j,e[28]=x,e[29]=S,e[30]=N):N=e[30];let T;e[31]!==N||e[32]!==g||e[33]!==p?(T=i.jsx(X,{title:g,description:p,children:N}),e[31]=N,e[32]=g,e[33]=p,e[34]=T):T=e[34];let w;e[35]===Symbol.for("react.memo_cache_sentinel")?(w=E=>{a(E),E||r("")},e[35]=w):w=e[35];let F;e[36]!==t?(F=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=F):F=e[37];let z;e[38]!==F?(z=i.jsx(We,{children:F}),e[38]=F,e[39]=z):z=e[39];let y;e[40]!==s.name||e[41]!==t?(y=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:s.name}),e[40]=s.name,e[41]=t,e[42]=y):y=e[42];let b;e[43]!==y?(b=i.jsx("p",{children:y}),e[43]=y,e[44]=b):b=e[44];let _;e[45]!==s.name||e[46]!==t?(_=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:s.name}),e[45]=s.name,e[46]=t,e[47]=_):_=e[47];let A;e[48]!==_?(A=i.jsx("p",{className:"mt-3 mb-1.5",children:_}),e[48]=_,e[49]=A):A=e[49];let R;e[50]===Symbol.for("react.memo_cache_sentinel")?(R=E=>r(E.target.value),e[50]=R):R=e[50];let k;e[51]!==c||e[52]!==s.name?(k=i.jsx(ce,{value:c,onChange:R,placeholder:s.name,autoFocus:!0}),e[51]=c,e[52]=s.name,e[53]=k):k=e[53];let K;e[54]!==b||e[55]!==A||e[56]!==k?(K=i.jsx(He,{asChild:!0,children:i.jsxs("div",{children:[b,A,k]})}),e[54]=b,e[55]=A,e[56]=k,e[57]=K):K=e[57];let $;e[58]!==z||e[59]!==K?($=i.jsxs(Je,{children:[z,K]}),e[58]=z,e[59]=K,e[60]=$):$=e[60];let I;e[61]!==t?(I=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=I):I=e[62];let M;e[63]!==I?(M=i.jsx(Xe,{children:I}),e[63]=I,e[64]=M):M=e[64];let L;e[65]!==d?(L=()=>d.mutate(),e[65]=d,e[66]=L):L=e[66];const te=c!==s.name||d.isPending;let V;e[67]!==d.isPending||e[68]!==t?(V=d.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=d.isPending,e[68]=t,e[69]=V):V=e[69];let q;e[70]!==L||e[71]!==te||e[72]!==V?(q=i.jsx(et,{onClick:L,disabled:te,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:V}),e[70]=L,e[71]=te,e[72]=V,e[73]=q):q=e[73];let G;e[74]!==M||e[75]!==q?(G=i.jsxs(tt,{children:[M,q]}),e[74]=M,e[75]=q,e[76]=G):G=e[76];let B;e[77]!==$||e[78]!==G?(B=i.jsxs(it,{children:[$,G]}),e[77]=$,e[78]=G,e[79]=B):B=e[79];let U;e[80]!==l||e[81]!==B?(U=i.jsx(st,{open:l,onOpenChange:w,children:B}),e[80]=l,e[81]=B,e[82]=U):U=e[82];let Y;return e[83]!==T||e[84]!==U?(Y=i.jsxs(i.Fragment,{children:[T,U]}),e[83]=T,e[84]=U,e[85]=Y):Y=e[85],Y}function ht(){const e=O.c(12),t=P();let s;e[0]!==t?(s=t("settings.orgGeneral.organization"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==s?(l=i.jsx(W.Title,{children:s}),e[2]=s,e[3]=l):l=e[3];let a,c,r,m,n,f;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(rt,{}),c=i.jsx(ct,{}),r=i.jsx(ut,{}),m=i.jsx(pt,{}),n=i.jsx(Ze,{}),f=i.jsx(xt,{}),e[4]=a,e[5]=c,e[6]=r,e[7]=m,e[8]=n,e[9]=f):(a=e[4],c=e[5],r=e[6],m=e[7],n=e[8],f=e[9]);let o;return e[10]!==l?(o=i.jsx(W,{children:i.jsx(W.Content,{children:i.jsx(W.Body,{children:i.jsxs(Oe,{children:[l,a,c,r,m,n,f]})})})}),e[10]=l,e[11]=o):o=e[11],o}function $i(){const e=O.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(nt,{capability:"org:manage",area:"general settings",children:i.jsx(ht,{})}),e[0]=t):t=e[0],t}export{$i as default};
|
package/dist/client/assets/{github-repo-picker-CKQYOUVF.js → github-repo-picker-DXw_3pye.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,j as t,F as de,a as ye,o as me,r as $,a0 as le,b as ee,k as Z,e as ge,t as te,d$ as Ne,K as se,G as ke,n as ve,m as ae,B as re,x as Ce,y as Re}from"./index-geMXTkeP.js";import{a as we,b as Pe,d as Se,e as Ie}from"./dialog-DFfWjXhn.js";import{C as Te}from"./collection-search-Bxz23u0F.js";import{u as _e}from"./use-debounced-value-LrUb7eiJ.js";import{b as he,u as Ee}from"./use-connection-B7cDwiOJ.js";import{W as Ae,u as ne,S as pe}from"./use-mcp-client-BBl5zme6.js";import{a as be}from"./authenticate-and-persist-oauth-CCHy3FzA.js";import{b as ue}from"./Settings02-K87UDDa_.js";import{n as ze}from"./LinkExternal01-BIYwVSjD.js";import{T as Le}from"./agent-icon-CQRHN6rX.js";import{u as Ge}from"./use-mcp-tools-BKtLcTYP.js";import{e as Oe}from"./extract-connection-data-D8g8Vhah.js";import{c as Fe}from"./use-navigate-to-agent-ABFR-14c.js";import{g as Ue,p as fe,f as $e,G as xe}from"./provision-repo-scoped-github-connection-B2s3ApVy.js";function D(C){const e=M.c(4),{size:n,className:l}=C;let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=p):p=e[0];let o;return e[1]!==l||e[2]!==n?(o=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:l,children:p}),e[1]=l,e[2]=n,e[3]=o):o=e[3],o}function He(C,e){const n=M.c(12),{org:l}=de();let p;n[0]!==l.id?(p=Ae.REGISTRY(l.id),n[0]=l.id,n[1]=p):p=n[1];const o=p;let a;n[2]!==l.id||n[3]!==l.slug||n[4]!==o?(a={connectionId:o,orgId:l.id,orgSlug:l.slug},n[2]=l.id,n[3]=l.slug,n[4]=o,n[5]=a):a=n[5];const r=ne(a);let s;n[6]!==C?(s={name:C},n[6]=C,n[7]=s):s=n[7];const u=e?.enabled??!0;let N;return n[8]!==r||n[9]!==s||n[10]!==u?(N={client:r,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:s,enabled:u,staleTime:3e5,select:De},n[8]=r,n[9]=s,n[10]=u,n[11]=N):N=n[11],Ge(N)}function De(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function Be(C){const{org:e}=de(),{data:n}=ye.useSession(),l=he(),p=me(),[o,a]=$.useState("idle"),[r,s]=$.useState(null),[u,N]=$.useState(null),{data:k,isLoading:P}=He(Me,{enabled:C.enabled}),f=$.useRef(!1);C.enabled&&k&&!P&&!f.current&&n?.user?.id&&o==="idle"&&(f.current=!0,d());async function d(){if(!(!k||!n?.user?.id||!e))try{a("installing"),s(null);const c=Oe(k,e.id,n.user.id,{remoteIndex:0});if(!c.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await l.create.mutateAsync(c);a("authenticating");const j=await be({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:x=>l.update.mutateAsync({id:g,data:{connection_token:x}}).then(()=>{})});if(j.ran&&!j.ok){try{await l.delete.mutateAsync(g)}catch{}throw new Error(j.error&&j.error!=="no token received"?j.error:"No token received from GitHub")}le(p,e.id),N(c),a("ready")}catch(c){s(c instanceof Error?c.message:String(c)),a("error")}}function m(){a("idle"),s(null),N(null),f.current=!1}return C.enabled&&P&&o==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:o,error:r,connection:u,retry:m}}function dt(C){const e=M.c(27),{open:n,onOpenChange:l,title:p,onImportComplete:o,mode:a}=C,r=a===void 0?"agent":a,s=ee();let u;e[0]!==r||e[1]!==s||e[2]!==p?(u=p??s(r==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=r,e[1]=s,e[2]=p,e[3]=u):u=e[3];const N=u,[k,P]=$.useState(null);let f;e[4]!==N?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Pe,{children:N})}),e[4]=N,e[5]=f):f=e[5];let d;e[6]!==N||e[7]!==k||e[8]!==s?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:k?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":s("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:k.avatarUrl,alt:k.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(D,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:N})]})}),e[6]=N,e[7]=k,e[8]=s,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let c;e[11]!==l?(c=()=>l(!1),e[11]=l,e[12]=c):c=e[12];let b;e[13]!==r||e[14]!==o||e[15]!==n||e[16]!==k||e[17]!==c?(b=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx($.Suspense,{fallback:m,children:t.jsx(qe,{open:n,onComplete:c,selectedInstallation:k,onSelectInstallation:P,onImportComplete:o,mode:r})})}),e[13]=r,e[14]=o,e[15]=n,e[16]=k,e[17]=c,e[18]=b):b=e[18];let g;e[19]!==f||e[20]!==d||e[21]!==b?(g=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,b]}),e[19]=f,e[20]=d,e[21]=b,e[22]=g):g=e[22];let j;return e[23]!==l||e[24]!==n||e[25]!==g?(j=t.jsx(Ie,{open:n,onOpenChange:l,children:g}),e[23]=l,e[24]=n,e[25]=g,e[26]=j):j=e[26],j}function qe({open:C,onComplete:e,selectedInstallation:n,onSelectInstallation:l,onImportComplete:p,mode:o="agent"}){const a=ee(),{org:r}=de(),s=me(),u=Fe(),[N,k]=$.useState(null),P=Ee({slug:"mcp-github"}),f=Ue(P),d=Be({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:N,c=ne({connectionId:m?.id??"",orgId:r.id,orgSlug:r.slug}),b=ne({connectionId:pe,orgId:r.id,orgSlug:r.slug}),g=async(i,y)=>{try{const I=await c.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:y}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},j=(i,y)=>{Promise.all([g(y,"AGENTS.md"),g(y,"CLAUDE.md")]).then(async([v,I])=>{const T=v??I??null;T&&(await b.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:T}}}}),le(s,r.id))}).catch(v=>{console.error("GitHub instructions fetch failed:",v)})},x=ge({mutationFn:async i=>{if(!m||!n)throw new Error("No GitHub connection or installation");const y=n.installationId;if(o==="connection"){const{childConnectionId:R}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:y,owner:i.owner,repo:i.name,githubCallTool:w=>c.callTool(w),selfCallTool:w=>b.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:i,connectionId:R,item:null}}const{childConnectionId:v,reused:I}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:y,owner:i.owner,repo:i.name,githubCallTool:R=>c.callTool(R),selfCallTool:R=>b.callTool(R)});let T=null;try{const R=await b.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:y,connectionId:v},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:v}]}}}),w=R.structuredContent??R,_=w.item?.id;if(!w.item||!_)throw new Error("Failed to create the imported agent");return T=_,{virtualMcpId:_,repo:i,connectionId:v,item:w.item}}catch(R){throw T&&await b.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:T}}).catch(()=>{}),I||await b.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:v,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:i,repo:y,connectionId:v,item:I})=>{if(o==="connection"||!i||!I){le(s,r.id),Ne(s,r.id),te.success(a("common.githubRepoPicker.addedRepo",{name:y.name})),e();return}if(s.setQueryData(se.collectionItem(b,r.id,"","VIRTUAL_MCP",i),{item:I}),le(s,r.id),j(i,y),p){p({virtualMcpId:i,repo:y,connectionId:v});return}te.success(a("common.githubRepoPicker.importedRepo",{name:y.name})),e(),localStorage.setItem(ke.sidebarOpen(),JSON.stringify(!1)),u(i)},onError:(i,y)=>{console.error("GitHub import failed:",i);const v=i instanceof Error?i.message:a("common.githubRepoPicker.unknownError");if(y.fork&&v.toLowerCase().includes("mint")){te.error(a("common.githubRepoPicker.failedImportFork",{name:y.name}));return}te.error(a("common.githubRepoPicker.failedImport",{error:v}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:a("common.githubRepoPicker.selectConnection")})}),f.map(i=>t.jsxs("button",{type:"button",onClick:()=>k(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(D,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):m?n?t.jsx(Ke,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,installation:n,onSelectRepo:i=>x.mutate(i),isSaving:x.isPending}):t.jsx(Qe,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,onSelect:l,showBackButton:f.length>1,onBack:()=>k(null)}):null}function Qe(C){const e=M.c(124),{connectionId:n,orgId:l,orgSlug:p,onSelect:o,showBackButton:a,onBack:r}=C,s=ee();let u;e[0]!==l||e[1]!==p?(u={connectionId:pe,orgId:l,orgSlug:p},e[0]=l,e[1]=p,e[2]=u):u=e[2];const N=ne(u),k=me(),P=he();let f;e[3]!==n||e[4]!==l?(f=se.githubUserOrgs(l,n),e[3]=n,e[4]=l,e[5]=f):f=e[5];let d;e[6]!==n||e[7]!==N?(d=()=>$e(h=>N.callTool(h),n),e[6]=n,e[7]=N,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const c=ve(m);let b;e[12]!==P||e[13]!==n||e[14]!==c||e[15]!==l||e[16]!==p||e[17]!==k?(b=async()=>{const h=await be({connectionId:n,orgId:l,orgSlug:p,persistFallback:E=>P.update.mutateAsync({id:n,data:{connection_token:E}}).then(Ve)});if(h.ran&&!h.ok)throw new Error(h.error??"no token received");const S=new URL(`/api/${p}/mcp/${n}`,window.location.origin);await k.invalidateQueries({queryKey:se.isMCPAuthenticated(S.href,null)}),await k.invalidateQueries({queryKey:se.mcpClientPrefix()}),await c.refetch()},e[12]=P,e[13]=n,e[14]=c,e[15]=l,e[16]=p,e[17]=k,e[18]=b):b=e[18];let g;e[19]!==s?(g=h=>{te.error(s("common.githubRepoPicker.failedReconnect",{error:h instanceof Error?h.message:s("common.githubRepoPicker.unknownError")}))},e[19]=s,e[20]=g):g=e[20];let j;e[21]!==b||e[22]!==g?(j={mutationFn:b,onError:g},e[21]=b,e[22]=g,e[23]=j):j=e[23];const x=ge(j);if(c.isLoading){let h;return e[24]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=h):h=e[24],h}if(c.isError){let h;e[25]!==s?(h=s("common.githubRepoPicker.failedLoadAccounts"),e[25]=s,e[26]=h):h=e[26];let S;e[27]!==h?(S=t.jsx("p",{className:"text-sm text-destructive",children:h}),e[27]=h,e[28]=S):S=e[28];let E;e[29]!==s?(E=s("common.githubRepoPicker.connectionExpiredMessage"),e[29]=s,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==x?(z=()=>x.mutate(),e[33]=x,e[34]=z):z=e[34];const H=x.isPending;let L;e[35]!==x.isPending?(L=x.isPending?t.jsx(Z,{size:14,className:"animate-spin"}):t.jsx(D,{className:"size-3.5"}),e[35]=x.isPending,e[36]=L):L=e[36];let G;e[37]!==s?(G=s("common.githubRepoPicker.reconnectGitHub"),e[37]=s,e[38]=G):G=e[38];let O;e[39]!==x.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(O=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:H,children:[L,G]}),e[39]=x.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=O):O=e[43];let U;return e[44]!==A||e[45]!==O||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,O]}),e[44]=A,e[45]=O,e[46]=S,e[47]=U):U=e[47],U}const i=c.data;if(!i)return null;if(i.installations.length===0){let h;e[48]!==r||e[49]!==a||e[50]!==s?(h=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[48]=r,e[49]=a,e[50]=s,e[51]=h):h=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==s?(A=s("common.githubRepoPicker.githubConnected"),e[54]=s,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let H;e[58]!==s?(H=s("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=s,e[59]=H):H=e[59];let L;e[60]!==H?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:H}),e[60]=H,e[61]=L):L=e[61];let G;e[62]!==s?(G=s("common.githubRepoPicker.noRepositoriesShared"),e[62]=s,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let U;e[66]!==s?(U=s("common.githubRepoPicker.chooseRepositories"),e[66]=s,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let B;e[69]!==U?(B=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=B):B=e[70];let q;e[71]!==c?(q=()=>{c.refetch()},e[71]=c,e[72]=q):q=e[72];const je=c.isFetching;let Q;e[73]!==c.isFetching?(Q=c.isFetching&&t.jsx(Z,{size:14,className:"animate-spin"}),e[73]=c.isFetching,e[74]=Q):Q=e[74];let V;e[75]!==s?(V=s("common.githubRepoPicker.checkAgain"),e[75]=s,e[76]=V):V=e[76];let K;e[77]!==c.isFetching||e[78]!==q||e[79]!==Q||e[80]!==V?(K=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:q,disabled:je,children:[Q,V]}),e[77]=c.isFetching,e[78]=q,e[79]=Q,e[80]=V,e[81]=K):K=e[81];let J;e[82]!==B||e[83]!==K?(J=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[B,K]}),e[82]=B,e[83]=K,e[84]=J):J=e[84];let W;e[85]!==s?(W=s("common.githubRepoPicker.repositoryAccessNote"),e[85]=s,e[86]=W):W=e[86];let Y;e[87]!==W?(Y=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:W}),e[87]=W,e[88]=Y):Y=e[88];let X;e[89]!==z||e[90]!==L||e[91]!==O||e[92]!==J||e[93]!==Y?(X=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,O,J,Y]}),e[89]=z,e[90]=L,e[91]=O,e[92]=J,e[93]=Y,e[94]=X):X=e[94];let oe;return e[95]!==X||e[96]!==h?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,X]}),e[95]=X,e[96]=h,e[97]=oe):oe=e[97],oe}let y;e[98]!==r||e[99]!==a||e[100]!==s?(y=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[98]=r,e[99]=a,e[100]=s,e[101]=y):y=e[101];let v;if(e[102]!==i.installations||e[103]!==o||e[104]!==s){let h;e[106]!==o||e[107]!==s?(h=S=>t.jsxs("button",{type:"button",onClick:()=>o(S),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:S.avatarUrl,alt:S.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:s("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[s("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=o,e[107]=s,e[108]=h):h=e[108],v=i.installations.map(h),e[102]=i.installations,e[103]=o,e[104]=s,e[105]=v}else v=e[105];let I;e[109]!==v?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:v}),e[109]=v,e[110]=I):I=e[110];let T;e[111]!==s?(T=s("common.githubRepoPicker.accountNotListed"),e[111]=s,e[112]=T):T=e[112];let R;e[113]!==s?(R=s("common.githubRepoPicker.installGitHubApp"),e[113]=s,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let _;e[117]!==T||e[118]!==w?(_=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[T," ",w]})}),e[117]=T,e[118]=w,e[119]=_):_=e[119];let F;return e[120]!==I||e[121]!==_||e[122]!==y?(F=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[y,I,_]}),e[120]=I,e[121]=_,e[122]=y,e[123]=F):F=e[123],F}function Ve(){}function Ke(C){const e=M.c(23),{connectionId:n,orgId:l,orgSlug:p,installation:o,onSelectRepo:a,isSaving:r}=C,s=ee(),[u,N]=$.useState(""),k=_e(u,300),P=$.useDeferredValue(k),f=u!==P;let d;e[0]!==s?(d=s("common.githubRepoPicker.searchRepositories"),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(Te,{placeholder:d,value:u,onChange:N,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const c=f?"opacity-40":"opacity-100";let b;e[6]!==c?(b=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",c),e[6]=c,e[7]=b):b=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=g):g=e[8];let j;e[9]!==n||e[10]!==P||e[11]!==o||e[12]!==r||e[13]!==a||e[14]!==l||e[15]!==p?(j=t.jsx($.Suspense,{fallback:g,children:t.jsx(Je,{connectionId:n,orgId:l,orgSlug:p,installation:o,query:P,onSelectRepo:a,isSaving:r})}),e[9]=n,e[10]=P,e[11]=o,e[12]=r,e[13]=a,e[14]=l,e[15]=p,e[16]=j):j=e[16];let x;e[17]!==b||e[18]!==j?(x=t.jsx("div",{className:b,children:j}),e[17]=b,e[18]=j,e[19]=x):x=e[19];let i;return e[20]!==m||e[21]!==x?(i=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x]}),e[20]=m,e[21]=x,e[22]=i):i=e[22],i}function Je(C){const e=M.c(36),{connectionId:n,orgId:l,orgSlug:p,installation:o,query:a,onSelectRepo:r,isSaving:s}=C,u=ee();let N;e[0]!==n||e[1]!==l||e[2]!==p?(N={connectionId:n,orgId:l,orgSlug:p},e[0]=n,e[1]=l,e[2]=p,e[3]=N):N=e[3];const k=ne(N),P=o.type==="User"?"user":"org",f=a?`${P}:${o.login} ${a} in:name fork:true`:`${P}:${o.login} fork:true`;let d;e[4]!==n||e[5]!==o.login||e[6]!==l||e[7]!==a?(d=se.githubOrgRepos(l,n,o.login,a),e[4]=n,e[5]=o.login,e[6]=l,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==k||e[10]!==f?(m=async x=>{const{signal:i}=x,v=(await k.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:i})).content?.[0]?.text;if(!v)throw new Error("No response from search_repositories");return(JSON.parse(v).items??[]).map(We)},e[9]=k,e[10]=f,e[11]=m):m=e[11];let c;e[12]!==d||e[13]!==m?(c={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=c):c=e[14];const{data:b}=Ce(c);if(b.length===0){let x;e[15]!==u?(x=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=x):x=e[16];let i;e[17]!==x?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[17]=x,e[18]=i):i=e[18];let y;e[19]!==a||e[20]!==u?(y=a&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=a,e[20]=u,e[21]=y):y=e[21];let v;return e[22]!==i||e[23]!==y?(v=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[i,y]}),e[22]=i,e[23]=y,e[24]=v):v=e[24],v}let g;if(e[25]!==s||e[26]!==r||e[27]!==b||e[28]!==u){let x;e[30]!==s||e[31]!==r||e[32]!==u?(x=i=>t.jsxs("button",{type:"button",onClick:()=>r(i),disabled:s,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(D,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:i.name}),i.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[i.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),i.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},i.fullName),e[30]=s,e[31]=r,e[32]=u,e[33]=x):x=e[33],g=b.map(x),e[25]=s,e[26]=r,e[27]=b,e[28]=u,e[29]=g}else g=e[29];let j;return e[34]!==g?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:g}),e[34]=g,e[35]=j):j=e[35],j}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=M.c(51),{status:n,error:l,retry:p}=C,o=ee();if(n==="error"){let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-destructive"})}),e[0]=v):v=e[0];let I;e[1]!==o?(I=o("common.githubRepoPicker.connectionFailed"),e[1]=o,e[2]=I):I=e[2];let T;e[3]!==I?(T=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=T):T=e[4];let R;e[5]!==l||e[6]!==o?(R=l??o("common.githubRepoPicker.somethingWentWrong"),e[5]=l,e[6]=o,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let _;e[10]!==T||e[11]!==w?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[T,w]}),e[10]=T,e[11]=w,e[12]=_):_=e[12];let F;e[13]!==o?(F=o("common.githubRepoPicker.tryAgain"),e[13]=o,e[14]=F):F=e[14];let h;e[15]!==p||e[16]!==F?(h=t.jsx("button",{type:"button",onClick:p,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:F}),e[15]=p,e[16]=F,e[17]=h):h=e[17];let S;return e[18]!==_||e[19]!==h?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[v,_,h]}),e[18]=_,e[19]=h,e[20]=S):S=e[20],S}const a=n==="authenticating";let r;e[21]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-foreground"})}),e[21]=r):r=e[21];let s;e[22]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(Z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=s):s=e[22];let u;e[23]!==a||e[24]!==o?(u=o(a?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=a,e[24]=o,e[25]=u):u=e[25];let N;e[26]!==u?(N=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=N):N=e[27];let k;e[28]!==a||e[29]!==o?(k=o(a?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=a,e[29]=o,e[30]=k):k=e[30];let P;e[31]!==k?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:k}),e[31]=k,e[32]=P):P=e[32];let f;e[33]!==N||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[N,P]}),e[33]=N,e[34]=P,e[35]=f):f=e[35];const d=a?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let c;e[38]!==m?(c=t.jsx("span",{className:m}),e[38]=m,e[39]=c):c=e[39];const b=a?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==b?(g=ae("size-1.5 rounded-full",b),e[40]=b,e[41]=g):g=e[41];let j;e[42]!==g?(j=t.jsx("span",{className:g}),e[42]=g,e[43]=j):j=e[43];let x;e[44]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=x):x=e[44];let i;e[45]!==c||e[46]!==j?(i=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,j,x]}),e[45]=c,e[46]=j,e[47]=i):i=e[47];let y;return e[48]!==i||e[49]!==f?(y=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[s,f,i]}),e[48]=i,e[49]=f,e[50]=y):y=e[50],y}export{D as G,dt as a,Be as b,He as u};
|
|
1
|
+
import{c as M,j as t,F as de,a as ye,o as me,r as $,ar as le,b as ee,k as Z,e as ge,t as te,d$ as Ne,K as ne,G as ke,n as ve,m as ae,B as re,x as Ce,y as Re}from"./index-D-1YQKmA.js";import{a as we,b as Pe,d as Se,e as Ie}from"./dialog-C4tS6-AJ.js";import{C as _e}from"./collection-search-Ck8xQbQY.js";import{u as Te}from"./use-debounced-value-74quYOmV.js";import{b as he,u as Ee}from"./use-connection-BHwQgQE1.js";import{W as Ae,u as se,S as pe}from"./use-mcp-client-D2tnZwXX.js";import{a as be}from"./authenticate-and-persist-oauth-E6sLdro6.js";import{i as ue}from"./Settings02-B88nTmbo.js";import{n as ze}from"./LinkExternal01-Cr_D6AUh.js";import{R as Le}from"./agent-icon-CXHCeTMr.js";import{u as Ge}from"./use-mcp-tools-BSCBM72A.js";import{e as Oe}from"./extract-connection-data-Btyggj3c.js";import{c as Fe}from"./use-navigate-to-agent-3K4zONOl.js";import{g as Ue,p as fe,f as $e,G as xe}from"./provision-repo-scoped-github-connection-B2s3ApVy.js";function D(C){const e=M.c(4),{size:s,className:l}=C;let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=p):p=e[0];let o;return e[1]!==l||e[2]!==s?(o=t.jsx("svg",{width:s,height:s,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:l,children:p}),e[1]=l,e[2]=s,e[3]=o):o=e[3],o}function He(C,e){const s=M.c(12),{org:l}=de();let p;s[0]!==l.id?(p=Ae.REGISTRY(l.id),s[0]=l.id,s[1]=p):p=s[1];const o=p;let a;s[2]!==l.id||s[3]!==l.slug||s[4]!==o?(a={connectionId:o,orgId:l.id,orgSlug:l.slug},s[2]=l.id,s[3]=l.slug,s[4]=o,s[5]=a):a=s[5];const r=se(a);let n;s[6]!==C?(n={name:C},s[6]=C,s[7]=n):n=s[7];const u=e?.enabled??!0;let N;return s[8]!==r||s[9]!==n||s[10]!==u?(N={client:r,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:n,enabled:u,staleTime:3e5,select:De},s[8]=r,s[9]=n,s[10]=u,s[11]=N):N=s[11],Ge(N)}function De(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function Be(C){const{org:e}=de(),{data:s}=ye.useSession(),l=he(),p=me(),[o,a]=$.useState("idle"),[r,n]=$.useState(null),[u,N]=$.useState(null),{data:k,isLoading:P}=He(Me,{enabled:C.enabled}),f=$.useRef(!1);C.enabled&&k&&!P&&!f.current&&s?.user?.id&&o==="idle"&&(f.current=!0,d());async function d(){if(!(!k||!s?.user?.id||!e))try{a("installing"),n(null);const c=Oe(k,e.id,s.user.id,{remoteIndex:0});if(!c.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await l.create.mutateAsync(c);a("authenticating");const j=await be({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:x=>l.update.mutateAsync({id:g,data:{connection_token:x}}).then(()=>{})});if(j.ran&&!j.ok){try{await l.delete.mutateAsync(g)}catch{}throw new Error(j.error&&j.error!=="no token received"?j.error:"No token received from GitHub")}le(p,e.id),N(c),a("ready")}catch(c){n(c instanceof Error?c.message:String(c)),a("error")}}function m(){a("idle"),n(null),N(null),f.current=!1}return C.enabled&&P&&o==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:o,error:r,connection:u,retry:m}}function dt(C){const e=M.c(27),{open:s,onOpenChange:l,title:p,onImportComplete:o,mode:a}=C,r=a===void 0?"agent":a,n=ee();let u;e[0]!==r||e[1]!==n||e[2]!==p?(u=p??n(r==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=r,e[1]=n,e[2]=p,e[3]=u):u=e[3];const N=u,[k,P]=$.useState(null);let f;e[4]!==N?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Pe,{children:N})}),e[4]=N,e[5]=f):f=e[5];let d;e[6]!==N||e[7]!==k||e[8]!==n?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:k?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":n("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:k.avatarUrl,alt:k.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(D,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:N})]})}),e[6]=N,e[7]=k,e[8]=n,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let c;e[11]!==l?(c=()=>l(!1),e[11]=l,e[12]=c):c=e[12];let b;e[13]!==r||e[14]!==o||e[15]!==s||e[16]!==k||e[17]!==c?(b=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx($.Suspense,{fallback:m,children:t.jsx(qe,{open:s,onComplete:c,selectedInstallation:k,onSelectInstallation:P,onImportComplete:o,mode:r})})}),e[13]=r,e[14]=o,e[15]=s,e[16]=k,e[17]=c,e[18]=b):b=e[18];let g;e[19]!==f||e[20]!==d||e[21]!==b?(g=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,b]}),e[19]=f,e[20]=d,e[21]=b,e[22]=g):g=e[22];let j;return e[23]!==l||e[24]!==s||e[25]!==g?(j=t.jsx(Ie,{open:s,onOpenChange:l,children:g}),e[23]=l,e[24]=s,e[25]=g,e[26]=j):j=e[26],j}function qe({open:C,onComplete:e,selectedInstallation:s,onSelectInstallation:l,onImportComplete:p,mode:o="agent"}){const a=ee(),{org:r}=de(),n=me(),u=Fe(),[N,k]=$.useState(null),P=Ee({slug:"mcp-github"}),f=Ue(P),d=Be({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:N,c=se({connectionId:m?.id??"",orgId:r.id,orgSlug:r.slug}),b=se({connectionId:pe,orgId:r.id,orgSlug:r.slug}),g=async(i,y)=>{try{const I=await c.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:y}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},j=(i,y)=>{Promise.all([g(y,"AGENTS.md"),g(y,"CLAUDE.md")]).then(async([v,I])=>{const _=v??I??null;_&&(await b.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:_}}}}),le(n,r.id))}).catch(v=>{console.error("GitHub instructions fetch failed:",v)})},x=ge({mutationFn:async i=>{if(!m||!s)throw new Error("No GitHub connection or installation");const y=s.installationId;if(o==="connection"){const{childConnectionId:R}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:y,owner:i.owner,repo:i.name,githubCallTool:w=>c.callTool(w),selfCallTool:w=>b.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:i,connectionId:R,item:null}}const{childConnectionId:v,reused:I}=await fe({orgSlug:r.slug,sourceConnection:m,installationId:y,owner:i.owner,repo:i.name,githubCallTool:R=>c.callTool(R),selfCallTool:R=>b.callTool(R)});let _=null;try{const R=await b.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:y,connectionId:v},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:v}]}}}),w=R.structuredContent??R,T=w.item?.id;if(!w.item||!T)throw new Error("Failed to create the imported agent");return _=T,{virtualMcpId:T,repo:i,connectionId:v,item:w.item}}catch(R){throw _&&await b.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:_}}).catch(()=>{}),I||await b.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:v,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:i,repo:y,connectionId:v,item:I})=>{if(o==="connection"||!i||!I){le(n,r.id),Ne(n,r.id),te.success(a("common.githubRepoPicker.addedRepo",{name:y.name})),e();return}if(n.setQueryData(ne.collectionItem(b,r.id,"","VIRTUAL_MCP",i),{item:I}),le(n,r.id),j(i,y),p){p({virtualMcpId:i,repo:y,connectionId:v});return}te.success(a("common.githubRepoPicker.importedRepo",{name:y.name})),e(),localStorage.setItem(ke.sidebarOpen(),JSON.stringify(!1)),u(i)},onError:(i,y)=>{console.error("GitHub import failed:",i);const v=i instanceof Error?i.message:a("common.githubRepoPicker.unknownError");if(y.fork&&v.toLowerCase().includes("mint")){te.error(a("common.githubRepoPicker.failedImportFork",{name:y.name}));return}te.error(a("common.githubRepoPicker.failedImport",{error:v}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:a("common.githubRepoPicker.selectConnection")})}),f.map(i=>t.jsxs("button",{type:"button",onClick:()=>k(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(D,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):m?s?t.jsx(Ke,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,installation:s,onSelectRepo:i=>x.mutate(i),isSaving:x.isPending}):t.jsx(Qe,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,onSelect:l,showBackButton:f.length>1,onBack:()=>k(null)}):null}function Qe(C){const e=M.c(124),{connectionId:s,orgId:l,orgSlug:p,onSelect:o,showBackButton:a,onBack:r}=C,n=ee();let u;e[0]!==l||e[1]!==p?(u={connectionId:pe,orgId:l,orgSlug:p},e[0]=l,e[1]=p,e[2]=u):u=e[2];const N=se(u),k=me(),P=he();let f;e[3]!==s||e[4]!==l?(f=ne.githubUserOrgs(l,s),e[3]=s,e[4]=l,e[5]=f):f=e[5];let d;e[6]!==s||e[7]!==N?(d=()=>$e(h=>N.callTool(h),s),e[6]=s,e[7]=N,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const c=ve(m);let b;e[12]!==P||e[13]!==s||e[14]!==c||e[15]!==l||e[16]!==p||e[17]!==k?(b=async()=>{const h=await be({connectionId:s,orgId:l,orgSlug:p,persistFallback:E=>P.update.mutateAsync({id:s,data:{connection_token:E}}).then(Ve)});if(h.ran&&!h.ok)throw new Error(h.error??"no token received");const S=new URL(`/api/${p}/mcp/${s}`,window.location.origin);await k.invalidateQueries({queryKey:ne.isMCPAuthenticated(S.href,null)}),await k.invalidateQueries({queryKey:ne.mcpClientPrefix()}),await c.refetch()},e[12]=P,e[13]=s,e[14]=c,e[15]=l,e[16]=p,e[17]=k,e[18]=b):b=e[18];let g;e[19]!==n?(g=h=>{te.error(n("common.githubRepoPicker.failedReconnect",{error:h instanceof Error?h.message:n("common.githubRepoPicker.unknownError")}))},e[19]=n,e[20]=g):g=e[20];let j;e[21]!==b||e[22]!==g?(j={mutationFn:b,onError:g},e[21]=b,e[22]=g,e[23]=j):j=e[23];const x=ge(j);if(c.isLoading){let h;return e[24]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=h):h=e[24],h}if(c.isError){let h;e[25]!==n?(h=n("common.githubRepoPicker.failedLoadAccounts"),e[25]=n,e[26]=h):h=e[26];let S;e[27]!==h?(S=t.jsx("p",{className:"text-sm text-destructive",children:h}),e[27]=h,e[28]=S):S=e[28];let E;e[29]!==n?(E=n("common.githubRepoPicker.connectionExpiredMessage"),e[29]=n,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==x?(z=()=>x.mutate(),e[33]=x,e[34]=z):z=e[34];const H=x.isPending;let L;e[35]!==x.isPending?(L=x.isPending?t.jsx(Z,{size:14,className:"animate-spin"}):t.jsx(D,{className:"size-3.5"}),e[35]=x.isPending,e[36]=L):L=e[36];let G;e[37]!==n?(G=n("common.githubRepoPicker.reconnectGitHub"),e[37]=n,e[38]=G):G=e[38];let O;e[39]!==x.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(O=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:H,children:[L,G]}),e[39]=x.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=O):O=e[43];let U;return e[44]!==A||e[45]!==O||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,O]}),e[44]=A,e[45]=O,e[46]=S,e[47]=U):U=e[47],U}const i=c.data;if(!i)return null;if(i.installations.length===0){let h;e[48]!==r||e[49]!==a||e[50]!==n?(h=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[48]=r,e[49]=a,e[50]=n,e[51]=h):h=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==n?(A=n("common.githubRepoPicker.githubConnected"),e[54]=n,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let H;e[58]!==n?(H=n("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=n,e[59]=H):H=e[59];let L;e[60]!==H?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:H}),e[60]=H,e[61]=L):L=e[61];let G;e[62]!==n?(G=n("common.githubRepoPicker.noRepositoriesShared"),e[62]=n,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let U;e[66]!==n?(U=n("common.githubRepoPicker.chooseRepositories"),e[66]=n,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let B;e[69]!==U?(B=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=B):B=e[70];let q;e[71]!==c?(q=()=>{c.refetch()},e[71]=c,e[72]=q):q=e[72];const je=c.isFetching;let Q;e[73]!==c.isFetching?(Q=c.isFetching&&t.jsx(Z,{size:14,className:"animate-spin"}),e[73]=c.isFetching,e[74]=Q):Q=e[74];let V;e[75]!==n?(V=n("common.githubRepoPicker.checkAgain"),e[75]=n,e[76]=V):V=e[76];let K;e[77]!==c.isFetching||e[78]!==q||e[79]!==Q||e[80]!==V?(K=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:q,disabled:je,children:[Q,V]}),e[77]=c.isFetching,e[78]=q,e[79]=Q,e[80]=V,e[81]=K):K=e[81];let J;e[82]!==B||e[83]!==K?(J=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[B,K]}),e[82]=B,e[83]=K,e[84]=J):J=e[84];let W;e[85]!==n?(W=n("common.githubRepoPicker.repositoryAccessNote"),e[85]=n,e[86]=W):W=e[86];let Y;e[87]!==W?(Y=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:W}),e[87]=W,e[88]=Y):Y=e[88];let X;e[89]!==z||e[90]!==L||e[91]!==O||e[92]!==J||e[93]!==Y?(X=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,O,J,Y]}),e[89]=z,e[90]=L,e[91]=O,e[92]=J,e[93]=Y,e[94]=X):X=e[94];let oe;return e[95]!==X||e[96]!==h?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,X]}),e[95]=X,e[96]=h,e[97]=oe):oe=e[97],oe}let y;e[98]!==r||e[99]!==a||e[100]!==n?(y=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[98]=r,e[99]=a,e[100]=n,e[101]=y):y=e[101];let v;if(e[102]!==i.installations||e[103]!==o||e[104]!==n){let h;e[106]!==o||e[107]!==n?(h=S=>t.jsxs("button",{type:"button",onClick:()=>o(S),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:S.avatarUrl,alt:S.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:n("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[n("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=o,e[107]=n,e[108]=h):h=e[108],v=i.installations.map(h),e[102]=i.installations,e[103]=o,e[104]=n,e[105]=v}else v=e[105];let I;e[109]!==v?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:v}),e[109]=v,e[110]=I):I=e[110];let _;e[111]!==n?(_=n("common.githubRepoPicker.accountNotListed"),e[111]=n,e[112]=_):_=e[112];let R;e[113]!==n?(R=n("common.githubRepoPicker.installGitHubApp"),e[113]=n,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let T;e[117]!==_||e[118]!==w?(T=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[_," ",w]})}),e[117]=_,e[118]=w,e[119]=T):T=e[119];let F;return e[120]!==I||e[121]!==T||e[122]!==y?(F=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[y,I,T]}),e[120]=I,e[121]=T,e[122]=y,e[123]=F):F=e[123],F}function Ve(){}function Ke(C){const e=M.c(23),{connectionId:s,orgId:l,orgSlug:p,installation:o,onSelectRepo:a,isSaving:r}=C,n=ee(),[u,N]=$.useState(""),k=Te(u,300),P=$.useDeferredValue(k),f=u!==P;let d;e[0]!==n?(d=n("common.githubRepoPicker.searchRepositories"),e[0]=n,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(_e,{placeholder:d,value:u,onChange:N,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const c=f?"opacity-40":"opacity-100";let b;e[6]!==c?(b=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",c),e[6]=c,e[7]=b):b=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Z,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=g):g=e[8];let j;e[9]!==s||e[10]!==P||e[11]!==o||e[12]!==r||e[13]!==a||e[14]!==l||e[15]!==p?(j=t.jsx($.Suspense,{fallback:g,children:t.jsx(Je,{connectionId:s,orgId:l,orgSlug:p,installation:o,query:P,onSelectRepo:a,isSaving:r})}),e[9]=s,e[10]=P,e[11]=o,e[12]=r,e[13]=a,e[14]=l,e[15]=p,e[16]=j):j=e[16];let x;e[17]!==b||e[18]!==j?(x=t.jsx("div",{className:b,children:j}),e[17]=b,e[18]=j,e[19]=x):x=e[19];let i;return e[20]!==m||e[21]!==x?(i=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x]}),e[20]=m,e[21]=x,e[22]=i):i=e[22],i}function Je(C){const e=M.c(36),{connectionId:s,orgId:l,orgSlug:p,installation:o,query:a,onSelectRepo:r,isSaving:n}=C,u=ee();let N;e[0]!==s||e[1]!==l||e[2]!==p?(N={connectionId:s,orgId:l,orgSlug:p},e[0]=s,e[1]=l,e[2]=p,e[3]=N):N=e[3];const k=se(N),P=o.type==="User"?"user":"org",f=a?`${P}:${o.login} ${a} in:name fork:true`:`${P}:${o.login} fork:true`;let d;e[4]!==s||e[5]!==o.login||e[6]!==l||e[7]!==a?(d=ne.githubOrgRepos(l,s,o.login,a),e[4]=s,e[5]=o.login,e[6]=l,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==k||e[10]!==f?(m=async x=>{const{signal:i}=x,v=(await k.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:i})).content?.[0]?.text;if(!v)throw new Error("No response from search_repositories");return(JSON.parse(v).items??[]).map(We)},e[9]=k,e[10]=f,e[11]=m):m=e[11];let c;e[12]!==d||e[13]!==m?(c={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=c):c=e[14];const{data:b}=Ce(c);if(b.length===0){let x;e[15]!==u?(x=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=x):x=e[16];let i;e[17]!==x?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[17]=x,e[18]=i):i=e[18];let y;e[19]!==a||e[20]!==u?(y=a&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=a,e[20]=u,e[21]=y):y=e[21];let v;return e[22]!==i||e[23]!==y?(v=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[i,y]}),e[22]=i,e[23]=y,e[24]=v):v=e[24],v}let g;if(e[25]!==n||e[26]!==r||e[27]!==b||e[28]!==u){let x;e[30]!==n||e[31]!==r||e[32]!==u?(x=i=>t.jsxs("button",{type:"button",onClick:()=>r(i),disabled:n,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(D,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:i.name}),i.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[i.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),i.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},i.fullName),e[30]=n,e[31]=r,e[32]=u,e[33]=x):x=e[33],g=b.map(x),e[25]=n,e[26]=r,e[27]=b,e[28]=u,e[29]=g}else g=e[29];let j;return e[34]!==g?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:g}),e[34]=g,e[35]=j):j=e[35],j}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=M.c(51),{status:s,error:l,retry:p}=C,o=ee();if(s==="error"){let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-destructive"})}),e[0]=v):v=e[0];let I;e[1]!==o?(I=o("common.githubRepoPicker.connectionFailed"),e[1]=o,e[2]=I):I=e[2];let _;e[3]!==I?(_=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=_):_=e[4];let R;e[5]!==l||e[6]!==o?(R=l??o("common.githubRepoPicker.somethingWentWrong"),e[5]=l,e[6]=o,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let T;e[10]!==_||e[11]!==w?(T=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[_,w]}),e[10]=_,e[11]=w,e[12]=T):T=e[12];let F;e[13]!==o?(F=o("common.githubRepoPicker.tryAgain"),e[13]=o,e[14]=F):F=e[14];let h;e[15]!==p||e[16]!==F?(h=t.jsx("button",{type:"button",onClick:p,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:F}),e[15]=p,e[16]=F,e[17]=h):h=e[17];let S;return e[18]!==T||e[19]!==h?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[v,T,h]}),e[18]=T,e[19]=h,e[20]=S):S=e[20],S}const a=s==="authenticating";let r;e[21]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(D,{className:"size-5 text-foreground"})}),e[21]=r):r=e[21];let n;e[22]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(Z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=n):n=e[22];let u;e[23]!==a||e[24]!==o?(u=o(a?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=a,e[24]=o,e[25]=u):u=e[25];let N;e[26]!==u?(N=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=N):N=e[27];let k;e[28]!==a||e[29]!==o?(k=o(a?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=a,e[29]=o,e[30]=k):k=e[30];let P;e[31]!==k?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:k}),e[31]=k,e[32]=P):P=e[32];let f;e[33]!==N||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[N,P]}),e[33]=N,e[34]=P,e[35]=f):f=e[35];const d=a?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let c;e[38]!==m?(c=t.jsx("span",{className:m}),e[38]=m,e[39]=c):c=e[39];const b=a?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==b?(g=ae("size-1.5 rounded-full",b),e[40]=b,e[41]=g):g=e[41];let j;e[42]!==g?(j=t.jsx("span",{className:g}),e[42]=g,e[43]=j):j=e[43];let x;e[44]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=x):x=e[44];let i;e[45]!==c||e[46]!==j?(i=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,j,x]}),e[45]=c,e[46]=j,e[47]=i):i=e[47];let y;return e[48]!==i||e[49]!==f?(y=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[n,f,i]}),e[48]=i,e[49]=f,e[50]=y):y=e[50],y}export{D as G,dt as a,Be as b,He as u};
|