decocms 2.286.0 → 2.286.1
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-DTmaHldD.js → AlertCircle-Bgzr6uRA.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-DlPeFc4v.js → ArrowNarrowLeft-ByrdB8Dd.js} +1 -1
- package/dist/client/assets/{CheckCircle-DJ3lme5R.js → CheckCircle-88bls7UK.js} +1 -1
- package/dist/client/assets/{ChevronDown-DGnjAtqs.js → ChevronDown-Jd-cYHC-.js} +1 -1
- package/dist/client/assets/{ChevronRight-DV9No7GF.js → ChevronRight-71i8ke8L.js} +1 -1
- package/dist/client/assets/{ChevronUp-BkSgkwhO.js → ChevronUp-D_szSdLd.js} +1 -1
- package/dist/client/assets/{Container-B1nHZdmn.js → Container-DWaKXfYv.js} +1 -1
- package/dist/client/assets/{DotsVertical-Bp2tW8JI.js → DotsVertical-CjXyjLNU.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BBbCPDtX.js → LinkExternal01-DB08YntP.js} +1 -1
- package/dist/client/assets/{Lock01-DpPIS3K7.js → Lock01-dBhVogWg.js} +1 -1
- package/dist/client/assets/{Palette-CI8n49a8.js → Palette-DuWQiO51.js} +1 -1
- package/dist/client/assets/{Play-DKFUTU3G.js → Play-D7pqvkYq.js} +1 -1
- package/dist/client/assets/{Plus-oXFwCrYz.js → Plus-BzxOIhxj.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-B10mKiE2.js → RefreshCcw01-BxULs6ec.js} +1 -1
- package/dist/client/assets/{SearchMd-BRJBvWf4.js → SearchMd-D6tCV38D.js} +1 -1
- package/dist/client/assets/{Settings02-Dm9dFDqk.js → Settings02-MyfUtBA4.js} +1 -1
- package/dist/client/assets/{Shield01-BZJVBd5S.js → Shield01-CMw4M4Ml.js} +1 -1
- package/dist/client/assets/{Star01-_IJK5Yjt.js → Star01-DZHrISf9.js} +1 -1
- package/dist/client/assets/{Sun-QqE1VnS_.js → Sun-C8X8gjZW.js} +1 -1
- package/dist/client/assets/{Tool01-CKowkGsd.js → Tool01-BscqkhhO.js} +1 -1
- package/dist/client/assets/{Trash01-C6bAXG6g.js → Trash01-DZpzvWVW.js} +1 -1
- package/dist/client/assets/{User01-C2-anwoO.js → User01-VHn0SqBP.js} +1 -1
- package/dist/client/assets/{Users03-DqYvPeZM.js → Users03-DwNyb_q2.js} +1 -1
- package/dist/client/assets/{X-i9zBn6Hn.js → X-BuUY-erD.js} +1 -1
- package/dist/client/assets/{XCircle-C1sJYG9R.js → XCircle-BFZeumzD.js} +1 -1
- package/dist/client/assets/{XClose-BbIo6xHe.js → XClose-ANREDbeo.js} +1 -1
- package/dist/client/assets/{Zap-KmbRMccM.js → Zap-BxJkZzJb.js} +1 -1
- package/dist/client/assets/{ZapSquare-DT93lGV4.js → ZapSquare-Bz3HDhTc.js} +1 -1
- package/dist/client/assets/{accordion-BV3tm7bj.js → accordion-DK_chPAh.js} +1 -1
- package/dist/client/assets/{agent-icon-CyE6nkC1.js → agent-icon-DKQKq---.js} +1 -1
- package/dist/client/assets/{agents-list-7o6gZt-q.js → agents-list-DBdCJGrz.js} +1 -1
- package/dist/client/assets/ai-providers-BhNFwI7O.js +1 -0
- package/dist/client/assets/{alert-dialog-CicrCOay.js → alert-dialog-CtGXaT-Y.js} +1 -1
- package/dist/client/assets/{auth-catchall-Cyd7fWQv.js → auth-catchall-B4ADnlpm.js} +1 -1
- package/dist/client/assets/{automation-list-row-B4Vfg4UC.js → automation-list-row-B_yW9vLo.js} +1 -1
- package/dist/client/assets/{automations-DRM_lJom.js → automations-B3iEjSty.js} +1 -1
- package/dist/client/assets/{avatar-CF1bgUpD.js → avatar-DcLXZkYK.js} +1 -1
- package/dist/client/assets/{badge-s_TAXGUN.js → badge-BJBM0LXp.js} +1 -1
- package/dist/client/assets/brand-context-BahSISOs.js +1 -0
- package/dist/client/assets/{card-CaekC2K0.js → card-DqrPrhd5.js} +1 -1
- package/dist/client/assets/{chat-context-DP5UfIrn.js → chat-context-DfEaB6Uj.js} +1 -1
- package/dist/client/assets/{checkbox-DznLgPgR.js → checkbox-Dplb_VaM.js} +1 -1
- package/dist/client/assets/{collection-detail-CTQuhG7N.js → collection-detail-KgUZfuij.js} +1 -1
- package/dist/client/assets/{collection-display-button-BgYKhoGQ.js → collection-display-button-DecHBxzk.js} +1 -1
- package/dist/client/assets/{collection-search-Bo2bOvRn.js → collection-search-B_zW9IS4.js} +1 -1
- package/dist/client/assets/{collection-search-DMqppne6.js → collection-search-DF-hPm66.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-KnWZIddd.js → collection-table-wrapper-DG-B8ykv.js} +1 -1
- package/dist/client/assets/{collection-tabs-CU6MCzSn.js → collection-tabs-tHg8euhu.js} +1 -1
- package/dist/client/assets/{collections-DHmXATua.js → collections-KKlyNHih.js} +1 -1
- package/dist/client/assets/{command-D4w2xkZT.js → command-Cpu7RbMv.js} +1 -1
- package/dist/client/assets/{connection-card-DBz-rrLk.js → connection-card-CD0fnfut.js} +1 -1
- package/dist/client/assets/{connection-detail-zHqb5ZSw.js → connection-detail-CFY9ol5g.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CBEV0IXi.js → connection-form-helpers-DVewXDLo.js} +1 -1
- package/dist/client/assets/{connections-CHiGbl1F.js → connections-B-Liq5Ll.js} +1 -1
- package/dist/client/assets/{constants-v4RUVkEN.js → constants-D7DNenhk.js} +1 -1
- package/dist/client/assets/{constants-DDHDU3PV.js → constants-aD7HJ6sY.js} +1 -1
- package/dist/client/assets/{dialog-C4lREl-t.js → dialog-nGTWjCEa.js} +1 -1
- package/dist/client/assets/{drawer-BTCEaGGQ.js → drawer-DyPUsgdj.js} +1 -1
- package/dist/client/assets/{dropdown-menu-v2GifVOh.js → dropdown-menu-Cc_jn9Z7.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-CVBBnlEt.js → dynamic-plugin-layout-Bun8S8Gm.js} +1 -1
- package/dist/client/assets/{empty-state-DdKZ_is7.js → empty-state-CqQa90x5.js} +1 -1
- package/dist/client/assets/{empty-state-BdQTFnZA.js → empty-state-DgThOXBB.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CfXvFcGA.js → extract-connection-data-Bx0uarS8.js} +1 -1
- package/dist/client/assets/{features-fsR9zLkr.js → features-ekquKatz.js} +1 -1
- package/dist/client/assets/{form-D7DN8UcB.js → form-DB-TdsHz.js} +1 -1
- package/dist/client/assets/{general-WQbdllPl.js → general-BrK_oI6y.js} +1 -1
- package/dist/client/assets/{github-repo-picker-DZqLC6FL.js → github-repo-picker-CwCtQ7G3.js} +1 -1
- package/dist/client/assets/{index-DBclwIf_.js → index-Amg25tew.js} +1 -1
- package/dist/client/assets/{index-D-RCnwJQ.js → index-BZopUfMN.js} +1 -1
- package/dist/client/assets/{index-qXZ0t4XR.js → index-BfYZ2YG_.js} +4 -4
- package/dist/client/assets/{index-FnxI6OGR.js → index-CT9V-xpg.js} +1 -1
- package/dist/client/assets/{index-C5AR7k1c.js → index-CwstDhH7.js} +1 -1
- package/dist/client/assets/{index-D34n6J5J.js → index-DhJrYN5i.js} +2 -2
- package/dist/client/assets/{index-CHKi_s_a.js → index-DtMbbDUN.js} +1 -1
- package/dist/client/assets/{index-e3AFJ_dX.js → index-DtdOoKdU.js} +1 -1
- package/dist/client/assets/{index-zDq2Zqio.js → index-DvgxnJsz.js} +1 -1
- package/dist/client/assets/{index-DnJZfbsP.js → index-pD6VF9-w.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-1_M-sq16.js → infiniteQueryObserver-B_9sKQsI.js} +1 -1
- package/dist/client/assets/{input-urtyHxks.js → input-COFLoOjb.js} +1 -1
- package/dist/client/assets/{integration-icon-Cdkk9YPE.js → integration-icon-DKrcAAs9.js} +1 -1
- package/dist/client/assets/{label-Bt4h_QUk.js → label-BZVcstmy.js} +1 -1
- package/dist/client/assets/{layout-B5SDe6IW.js → layout-Dp5y9gtR.js} +1 -1
- package/dist/client/assets/{login-7zFMf3C1.js → login-ComGApTe.js} +1 -1
- package/dist/client/assets/{members-Dy7hWkQ8.js → members-CHnKVrrd.js} +1 -1
- package/dist/client/assets/{monaco-editor-lveN-AoO.js → monaco-editor-EL8K9shU.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-D3x0_phM.js → monitoring-stats-row-D9crys0K.js} +1 -1
- package/dist/client/assets/{oauth-callback-BJALVgfT.js → oauth-callback-B0mEhNIK.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-o8Hfz-wL.js → oauth-callback-ai-provider-Dj0EctfO.js} +1 -1
- package/dist/client/assets/{onboarding-DlI3PsIA.js → onboarding-czNV0UuI.js} +1 -1
- package/dist/client/assets/{org-layout-DPzm8vzJ.js → org-layout-CGtnLM_Q.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-DB72TzxO.js → org-plugin-layout-Ba2ZEzcE.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-BzyxU1IF.js → plugin-empty-state-fmAUJ6xt.js} +1 -1
- package/dist/client/assets/{plugin-header-hJH6-4Nr.js → plugin-header-3c9kItnR.js} +1 -1
- package/dist/client/assets/{plugin-layout-l_MDXBYc.js → plugin-layout-CUFHRJeM.js} +1 -1
- package/dist/client/assets/{popover-j_PzMtdY.js → popover-Bo1-wNsY.js} +1 -1
- package/dist/client/assets/{profile-lf_QL3Ye.js → profile-C4ZfFzUo.js} +1 -1
- package/dist/client/assets/{project-app-view-DuFzKNXE.js → project-app-view-DbITEuQv.js} +1 -1
- package/dist/client/assets/registry-CrUw5Sj_.js +2 -0
- package/dist/client/assets/{registry-layout-DRb_iR_v.js → registry-layout-q6bMBk9s.js} +1 -1
- package/dist/client/assets/{required-auth-layout-C2o7AZ4K.js → required-auth-layout-CP-yDaO3.js} +1 -1
- package/dist/client/assets/{reset-password-DTEY3I_i.js → reset-password-CpFcPkI4.js} +1 -1
- package/dist/client/assets/{roles-DW1_Kn6r.js → roles-CSJcHSQ8.js} +1 -1
- package/dist/client/assets/{scroll-area-BebfgLv6.js → scroll-area-CXUp8wR9.js} +1 -1
- package/dist/client/assets/{search-input-dmuYGYsk.js → search-input-ClG6niuo.js} +1 -1
- package/dist/client/assets/{select-CePxsPeP.js → select-Cn3ZnqjJ.js} +1 -1
- package/dist/client/assets/{select-model-QQ7yjZl9.js → select-model-BwE-9vfJ.js} +1 -1
- package/dist/client/assets/{settings-layout-Cd1tdTnr.js → settings-layout-dHGH4vpw.js} +1 -1
- package/dist/client/assets/{shell-layout-BE22YA40.js → shell-layout-BsqL_vND.js} +1 -1
- package/dist/client/assets/{skeleton-C9NsUzIb.js → skeleton-DOcx8lZU.js} +1 -1
- package/dist/client/assets/{sso-QSGlyP2n.js → sso-37Vu3qt9.js} +1 -1
- package/dist/client/assets/{store-BB9yi6PD.js → store-D1kidhJ8.js} +1 -1
- package/dist/client/assets/store-registry-qx_8ffch.js +2 -0
- package/dist/client/assets/{switch-VBeL01bM.js → switch-ihM2hYRH.js} +1 -1
- package/dist/client/assets/{table-CQMW-Toa.js → table-CAUXYO7-.js} +1 -1
- package/dist/client/assets/{tabs-DOoLL5wa.js → tabs-DcOxSeRf.js} +1 -1
- package/dist/client/assets/{task-status-vvRP86lz.js → task-status-CHfFeACA.js} +1 -1
- package/dist/client/assets/{textarea-Ie4QUdo5.js → textarea-CsnX9Ktr.js} +1 -1
- package/dist/client/assets/{toggle-group-C077Smww.js → toggle-group-_HWF3GFc.js} +1 -1
- package/dist/client/assets/{tools-list-UnPsMGhr.js → tools-list-A0gJUqTb.js} +1 -1
- package/dist/client/assets/{types-D4PfKOFF.js → types-BGXCye_w.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DHuVj1kn.js → use-ai-providers-DSLKay0D.js} +1 -1
- package/dist/client/assets/{use-collections-DRlHpXQL.js → use-collections-DvPoAlor.js} +1 -1
- package/dist/client/assets/{use-connection-Cif-LY0f.js → use-connection-MU3rXx28.js} +1 -1
- package/dist/client/assets/{use-copy-uiSuMvtc.js → use-copy-tC0v6ypy.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CBpw3zXA.js → use-create-virtual-mcp-C-LLRhrB.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Dpt6CcIN.js → use-decopilot-events-fHBaJaln.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BZmW9ZAz.js → use-delete-connection-CowwQ4CA.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CWlV3gJA.js → use-infinite-scroll-BUM8dH47.js} +1 -1
- package/dist/client/assets/{use-list-state-BJZWeXjY.js → use-list-state-Ba4O0IuX.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BYVtg7WH.js → use-mcp-tools-B5zpuics.js} +1 -1
- package/dist/client/assets/{use-members-M_p47epa.js → use-members-Bhu2ZnQb.js} +1 -1
- package/dist/client/assets/{use-mobile-CxvYCzu9.js → use-mobile-C4Yo3nsX.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CFIKBq0L.js → use-navigate-to-agent-Bx0DB5DW.js} +1 -1
- package/dist/client/assets/{use-org-sso-CACnH9GQ.js → use-org-sso-BK-ft_ER.js} +1 -1
- package/dist/client/assets/{use-organization-roles-o4lVU0iD.js → use-organization-roles-uEcrMWhG.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BD9CIHH5.js → use-organization-settings-CMC2yyUM.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DR_etJ2H.js → use-registry-connections-Biq_9qgb.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Ce7WandB.js → use-status-sounds-DfhTS64d.js} +1 -1
- package/dist/client/assets/{use-tasks-Dpp1DK1f.js → use-tasks-DofxyZR4.js} +1 -1
- package/dist/client/assets/{use-view-mode-CZPzVaxj.js → use-view-mode-DSeYcON6.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-0vHwLInn.js → use-virtual-mcp-WT1ZdgMM.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Gkc0b2zi.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-YePUpUV3.js +1 -0
- package/dist/client/assets/{user-xj80BAo3.js → user-5oBDTi_W.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-D5CGwPOj.js → view-mode-toggle-BvyYLass.js} +1 -1
- package/dist/client/assets/{workflow-CD_DiE5j.js → workflow-DoVF6xyx.js} +1 -1
- package/dist/client/assets/workflow-detail-XUi-wHY3.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/node_modules/get-east-asian-width/index.d.ts +60 -0
- package/dist/server/node_modules/get-east-asian-width/index.js +30 -0
- package/dist/server/node_modules/get-east-asian-width/lookup-data.js +18 -0
- package/dist/server/node_modules/get-east-asian-width/lookup.js +135 -0
- package/dist/server/node_modules/get-east-asian-width/package.json +71 -0
- package/dist/server/node_modules/get-east-asian-width/readme.md +65 -0
- package/dist/server/node_modules/get-east-asian-width/utilities.js +24 -0
- package/dist/server/node_modules/slice-ansi/index.d.ts +19 -0
- package/dist/server/node_modules/slice-ansi/index.js +260 -0
- package/dist/server/node_modules/{is-fullwidth-code-point → slice-ansi}/license +1 -0
- package/dist/server/node_modules/slice-ansi/package.json +59 -0
- package/dist/server/node_modules/slice-ansi/readme.md +54 -0
- package/dist/server/node_modules/slice-ansi/tokenize-ansi.js +752 -0
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-DI3UF9nU.js +0 -1
- package/dist/client/assets/brand-context-iopLFZ2k.js +0 -1
- package/dist/client/assets/registry-D3m_WKwq.js +0 -2
- package/dist/client/assets/store-registry-BSp-W72J.js +0 -2
- package/dist/client/assets/useInfiniteQuery-B4w-6TrV.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-WURyRq6p.js +0 -1
- package/dist/client/assets/workflow-detail-CxWEb-ID.js +0 -1
- package/dist/server/node_modules/ansi-regex/index.d.ts +0 -33
- package/dist/server/node_modules/ansi-regex/index.js +0 -14
- package/dist/server/node_modules/ansi-regex/package.json +0 -61
- package/dist/server/node_modules/ansi-regex/readme.md +0 -66
- package/dist/server/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
- package/dist/server/node_modules/emoji-regex/README.md +0 -107
- package/dist/server/node_modules/emoji-regex/index.d.ts +0 -3
- package/dist/server/node_modules/emoji-regex/index.js +0 -4
- package/dist/server/node_modules/emoji-regex/index.mjs +0 -4
- package/dist/server/node_modules/emoji-regex/package.json +0 -45
- package/dist/server/node_modules/environment/index.d.ts +0 -74
- package/dist/server/node_modules/environment/index.js +0 -47
- package/dist/server/node_modules/environment/license +0 -9
- package/dist/server/node_modules/environment/package.json +0 -74
- package/dist/server/node_modules/environment/readme.md +0 -94
- package/dist/server/node_modules/escape-string-regexp/index.d.ts +0 -18
- package/dist/server/node_modules/escape-string-regexp/index.js +0 -11
- package/dist/server/node_modules/escape-string-regexp/license +0 -9
- package/dist/server/node_modules/escape-string-regexp/package.json +0 -43
- package/dist/server/node_modules/escape-string-regexp/readme.md +0 -29
- package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
- package/dist/server/node_modules/is-fullwidth-code-point/index.js +0 -12
- package/dist/server/node_modules/is-fullwidth-code-point/package.json +0 -53
- package/dist/server/node_modules/is-fullwidth-code-point/readme.md +0 -31
- package/dist/server/node_modules/is-unicode-supported/index.d.ts +0 -12
- package/dist/server/node_modules/is-unicode-supported/index.js +0 -21
- package/dist/server/node_modules/is-unicode-supported/license +0 -9
- package/dist/server/node_modules/is-unicode-supported/package.json +0 -47
- package/dist/server/node_modules/is-unicode-supported/readme.md +0 -35
- package/dist/server/node_modules/onetime/index.d.ts +0 -64
- package/dist/server/node_modules/onetime/index.js +0 -44
- package/dist/server/node_modules/onetime/license +0 -9
- package/dist/server/node_modules/onetime/package.json +0 -43
- package/dist/server/node_modules/onetime/readme.md +0 -94
- package/dist/server/node_modules/restore-cursor/index.d.ts +0 -11
- package/dist/server/node_modules/restore-cursor/index.js +0 -11
- package/dist/server/node_modules/restore-cursor/license +0 -9
- package/dist/server/node_modules/restore-cursor/package.json +0 -55
- package/dist/server/node_modules/restore-cursor/readme.md +0 -31
- package/dist/server/node_modules/string-width/index.d.ts +0 -39
- package/dist/server/node_modules/string-width/index.js +0 -82
- package/dist/server/node_modules/string-width/license +0 -9
- package/dist/server/node_modules/string-width/package.json +0 -64
- package/dist/server/node_modules/string-width/readme.md +0 -66
- /package/dist/server/node_modules/{ansi-regex → get-east-asian-width}/license +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bV as b,e as f,j as c,aB as C,r as d,c as p,aY as j,bW as v,bX as h}from"./index-
|
|
1
|
+
import{bV as b,e as f,j as c,aB as C,r as d,c as p,aY as j,bW as v,bX as h}from"./index-DhJrYN5i.js";import{L as N}from"./label-BZVcstmy.js";const E=b,g=d.createContext({}),M=t=>{const e=f.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(C,{...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=f.c(13),e=d.useContext(g),s=d.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},$=d.createContext({});function w(t){const e=f.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=d.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=f.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=f.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(j,{"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=f.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=f.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,M as a,w as b,L as c,P as d,R as e,y as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as G,r as Q,z as T,j as s,B as M,f as pe,s as ce,o as de,x as je,w as be,a as W,t as q,K as Z,b as me,v as ve,y as se,n as Ne,c as ye,aD as Se}from"./index-D34n6J5J.js";import{P as J}from"./index-zDq2Zqio.js";import{C as Y,b as X,c as ee,a as te,d as ue,e as _e}from"./card-CaekC2K0.js";import{I as oe}from"./input-urtyHxks.js";import{L as B}from"./label-Bt4h_QUk.js";import{c as Ce}from"./XCircle-C1sJYG9R.js";import{i as fe}from"./X-i9zBn6Hn.js";import{u as V}from"./unwrap-tool-result-BYXdCQMg.js";import{S as we,u as ze,W as ae,i as De}from"./constants-DDHDU3PV.js";import{S as Ae}from"./switch-VBeL01bM.js";import{u as Ee,a as le,D as Ie,c as Pe,S as ke,v as Oe,K as Te,P as Fe,d as Re,C as Le,s as Me,b as $e,e as qe}from"./collection-search-DMqppne6.js";import{u as ge}from"./use-virtual-mcp-0vHwLInn.js";import{b as Ge,P as Ke,a as Ue}from"./popover-j_PzMtdY.js";import{S as He}from"./skeleton-C9NsUzIb.js";import{Q as Be}from"./agent-icon-CyE6nkC1.js";import{s as Qe}from"./Plus-oXFwCrYz.js";import{a as xe}from"./Users03-DqYvPeZM.js";import{I as ie}from"./integration-icon-Cdkk9YPE.js";import{u as Je,c as Ve}from"./use-organization-settings-BD9CIHH5.js";import"./use-mobile-CxvYCzu9.js";import"./SearchMd-BRJBvWf4.js";import"./use-collections-DRlHpXQL.js";import"./AlertCircle-DTmaHldD.js";import"./Tool01-CKowkGsd.js";import"./XClose-BbIo6xHe.js";import"./RefreshCcw01-B10mKiE2.js";import"./ArrowNarrowLeft-DlPeFc4v.js";import"./ZapSquare-DT93lGV4.js";import"./CheckCircle-DJ3lme5R.js";import"./ChevronDown-DGnjAtqs.js";import"./ChevronRight-DV9No7GF.js";import"./ChevronUp-BkSgkwhO.js";import"./DotsVertical-Bp2tW8JI.js";import"./Container-B1nHZdmn.js";import"./Star01-_IJK5Yjt.js";import"./Palette-CI8n49a8.js";import"./LinkExternal01-BBbCPDtX.js";import"./Lock01-DpPIS3K7.js";import"./Sun-QqE1VnS_.js";import"./Play-DKFUTU3G.js";import"./Settings02-Dm9dFDqk.js";import"./Shield01-BZJVBd5S.js";import"./Trash01-C6bAXG6g.js";import"./User01-C2-anwoO.js";import"./Zap-KmbRMccM.js";function We(t){const e=G.c(28),{value:a,onChange:o,name:p,disabled:i}=t,n=Q.useRef(null);let C;e[0]!==o?(C=b=>{const w=b.target.files?.[0];if(w){if(w.size>2097152){T.error("Image must be smaller than 2MB");return}const m=new FileReader;m.onerror=()=>{const S=m.error;console.error("FileReader error:",S),T.error(S?.message||"Failed to read image file. Please try again."),n.current&&(n.current.value="")},m.onloadend=()=>{m.readyState===FileReader.DONE&&m.result&&o(m.result),n.current&&(n.current.value="")},m.readAsDataURL(w)}},e[0]=o,e[1]=C):C=e[1];const E=C;let N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=()=>{n.current?.click()},e[2]=N):N=e[2];const r=N;let f;e[3]!==o?(f=b=>{b.stopPropagation(),o("")},e[3]=o,e[4]=f):f=e[4];const g=f;let d;e[5]!==i||e[6]!==E?(d=s.jsx("input",{type:"file",ref:n,className:"hidden",accept:"image/*",onChange:E,disabled:i}),e[5]=i,e[6]=E,e[7]=d):d=e[7];let c;e[8]!==i||e[9]!==g||e[10]!==p||e[11]!==a?(c=a?s.jsxs("div",{className:"relative group",children:[s.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:s.jsx("img",{src:a,alt:p||"Logo",className:"w-full h-full object-cover"})}),s.jsx("button",{type:"button",onClick:g,disabled:i,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:s.jsx(fe,{className:"h-3 w-3"})})]}):s.jsxs("button",{type:"button",onClick:r,disabled:i,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground disabled:opacity-50 disabled:pointer-events-none",children:[s.jsx(Ce,{className:"h-5 w-5"}),s.jsx("span",{className:"text-xs",children:"Upload"})]}),e[8]=i,e[9]=g,e[10]=p,e[11]=a,e[12]=c):c=e[12];const z=a?"Change Logo":"Upload Logo";let D;e[13]!==i||e[14]!==z?(D=s.jsx(M,{type:"button",variant:"outline",size:"sm",onClick:r,disabled:i,className:"mb-2",children:z}),e[13]=i,e[14]=z,e[15]=D):D=e[15];let x;e[16]!==i||e[17]!==g||e[18]!==a?(x=a&&s.jsx(M,{type:"button",variant:"ghost",size:"sm",onClick:g,disabled:i,className:"ml-2",children:"Remove"}),e[16]=i,e[17]=g,e[18]=a,e[19]=x):x=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),e[20]=j):j=e[20];let h;e[21]!==D||e[22]!==x?(h=s.jsxs("div",{className:"flex-1",children:[D,x,j]}),e[21]=D,e[22]=x,e[23]=h):h=e[23];let y;return e[24]!==h||e[25]!==d||e[26]!==c?(y=s.jsxs("div",{className:"flex items-start gap-4",children:[d,c,h]}),e[24]=h,e[25]=d,e[26]=c,e[27]=y):y=e[27],y}const Ze=ve({name:se().min(1,"Name is required").max(255,"Name is too long"),slug:se().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:se().optional()});function Ye(){const t=pe(),{org:e}=ce(),a=de(),[o,p]=Q.useState(!1),i=je({resolver:be(Ze),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),n=W({mutationFn:async r=>{const f={name:r.name,slug:r.slug};r.logo&&(f.logo=r.logo);const g=await me.organization.update({organizationId:e.id,data:f});if(g?.error)throw new Error(g.error.message||"Failed to update organization");return g},onSuccess:r=>{q("organization_settings_updated",{organization_id:e.id,fields:Object.keys(i.formState.dirtyFields)}),a.invalidateQueries({queryKey:Z.organizations()}),a.invalidateQueries({queryKey:Z.activeOrganization(e.slug)}),T.success("Organization settings updated successfully"),r?.data?.slug&&r.data.slug!==e.slug&&t({to:"/$org/settings/general",params:{org:r.data.slug}})},onError:r=>{q("organization_settings_update_failed",{organization_id:e.id,fields:Object.keys(i.formState.dirtyFields),error:r instanceof Error?r.message:String(r)}),T.error(r instanceof Error?r.message:"Failed to update organization")},onSettled:()=>{p(!1)}}),C=r=>{p(!0),n.mutate(r)},E=i.formState.isDirty,N=i.formState.errors;return s.jsx("form",{onSubmit:i.handleSubmit(C),className:"flex flex-col gap-6",children:s.jsxs(Y,{className:"p-6",children:[s.jsx(X,{className:"p-0",children:s.jsx(ee,{className:"text-sm",children:"Overview"})}),s.jsxs(te,{className:"flex flex-col gap-6 p-0",children:[s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(B,{className:"text-xs text-muted-foreground",children:"Logo"}),s.jsx(We,{value:i.watch("logo"),onChange:r=>i.setValue("logo",r??"",{shouldDirty:!0}),name:i.watch("name"),disabled:o}),N.logo&&s.jsx("p",{className:"text-xs text-destructive",children:N.logo.message})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-5",children:[s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(B,{htmlFor:"org-name",className:"text-xs text-muted-foreground",children:"Organization name"}),s.jsx(oe,{id:"org-name",...i.register("name"),placeholder:"Organization name",disabled:o}),N.name&&s.jsx("p",{className:"text-xs text-destructive",children:N.name.message})]}),s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(B,{htmlFor:"org-slug",className:"text-xs text-muted-foreground",children:"Slug"}),s.jsx(oe,{id:"org-slug",...i.register("slug"),placeholder:"my-organization",disabled:o,onChange:r=>{const f=r.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");i.setValue("slug",f,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Only lowercase letters, numbers, and hyphens."}),N.slug&&s.jsx("p",{className:"text-xs text-destructive",children:N.slug.message})]})]})]}),E&&s.jsxs(ue,{className:"p-0 pt-2 gap-2",children:[s.jsx(M,{type:"submit",disabled:o,children:o?"Saving…":"Save"}),s.jsx(M,{type:"button",variant:"outline",onClick:()=>i.reset(),disabled:o,children:"Cancel"})]})]})})}function Xe(){const t=G.c(62),{org:e}=ce(),{data:a}=me.useSession(),o=de();let p;t[0]!==e.id?(p={connectionId:we,orgId:e.id},t[0]=e.id,t[1]=p):p=t[1];const i=ze(p);let n;t[2]!==e.id?(n=Z.organizationDomain(e.id),t[2]=e.id,t[3]=n):n=t[3];let C;t[4]!==i?(C=async()=>{const l=await i.callTool({name:"ORGANIZATION_DOMAIN_GET",arguments:{}});return V(l)},t[4]=i,t[5]=C):C=t[5];let E;t[6]!==n||t[7]!==C?(E={queryKey:n,queryFn:C},t[6]=n,t[7]=C,t[8]=E):E=t[8];const{data:N,isPending:r}=Ne(E),f=a?.user?.email??"";let g;t[9]!==f?(g=f.split("@")[1]?.toLowerCase()??"",t[9]=f,t[10]=g):g=t[10];const d=g,c=N?.domain??null,z=N?.autoJoinEnabled??!1,D=d&&d!==c;let x;t[11]!==e.id||t[12]!==o?(x=()=>o.invalidateQueries({queryKey:Z.organizationDomain(e.id)}),t[11]=e.id,t[12]=o,t[13]=x):x=t[13];const j=x;let h;t[14]!==i||t[15]!==d?(h=async()=>{const l=await i.callTool({name:"ORGANIZATION_DOMAIN_SET",arguments:{domain:d,autoJoinEnabled:!1}});return V(l)},t[14]=i,t[15]=d,t[16]=h):h=t[16];let y;t[17]!==j||t[18]!==e.id||t[19]!==d?(y=()=>{q("organization_domain_claimed",{organization_id:e.id,email_domain:d}),j(),T.success("Domain claimed")},t[17]=j,t[18]=e.id,t[19]=d,t[20]=y):y=t[20];let b;t[21]!==e.id||t[22]!==d?(b=l=>{q("organization_domain_claim_failed",{organization_id:e.id,email_domain:d,error:l instanceof Error?l.message:String(l)}),T.error(l instanceof Error?l.message:"Failed to claim domain")},t[21]=e.id,t[22]=d,t[23]=b):b=t[23];let w;t[24]!==h||t[25]!==y||t[26]!==b?(w={mutationFn:h,onSuccess:y,onError:b},t[24]=h,t[25]=y,t[26]=b,t[27]=w):w=t[27];const m=W(w);let S;t[28]!==i?(S=async()=>{const l=await i.callTool({name:"ORGANIZATION_DOMAIN_CLEAR",arguments:{}});return V(l)},t[28]=i,t[29]=S):S=t[29];let v;t[30]!==c||t[31]!==j||t[32]!==e.id?(v=()=>{q("organization_domain_cleared",{organization_id:e.id,email_domain:c}),j(),T.success("Domain removed")},t[30]=c,t[31]=j,t[32]=e.id,t[33]=v):v=t[33];let _;t[34]!==c||t[35]!==e.id?(_=l=>{q("organization_domain_clear_failed",{organization_id:e.id,email_domain:c,error:l instanceof Error?l.message:String(l)}),T.error(l instanceof Error?l.message:"Failed to remove domain")},t[34]=c,t[35]=e.id,t[36]=_):_=t[36];let k;t[37]!==S||t[38]!==v||t[39]!==_?(k={mutationFn:S,onSuccess:v,onError:_},t[37]=S,t[38]=v,t[39]=_,t[40]=k):k=t[40];const P=W(k);let A;t[41]!==i||t[42]!==c||t[43]!==e.id?(A=async l=>{if(!c)return;q("organization_auto_join_toggled",{organization_id:e.id,enabled:l});const L=await i.callTool({name:"ORGANIZATION_DOMAIN_UPDATE",arguments:{autoJoinEnabled:l}});return V(L)},t[41]=i,t[42]=c,t[43]=e.id,t[44]=A):A=t[44];let I;t[45]!==j?(I=()=>{j(),T.success("Auto-join setting updated")},t[45]=j,t[46]=I):I=t[46];let O;t[47]!==e.id?(O=l=>{q("organization_auto_join_toggle_failed",{organization_id:e.id,error:l instanceof Error?l.message:String(l)}),T.error(l instanceof Error?l.message:"Failed to update auto-join")},t[47]=e.id,t[48]=O):O=t[48];let u;t[49]!==A||t[50]!==I||t[51]!==O?(u={mutationFn:A,onSuccess:I,onError:O},t[49]=A,t[50]=I,t[51]=O,t[52]=u):u=t[52];const F=W(u);if(r)return null;let R;t[53]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsxs(X,{className:"p-0",children:[s.jsx(ee,{className:"text-sm",children:"Email Domain"}),s.jsx(_e,{className:"text-xs",children:"Claim your company's email domain so new users with matching emails can automatically join this organization."})]}),t[53]=R):R=t[53];let $;return t[54]!==z||t[55]!==D||t[56]!==P||t[57]!==c||t[58]!==m||t[59]!==F||t[60]!==d?($=s.jsxs(Y,{className:"p-6",children:[R,s.jsx(te,{className:"flex flex-col gap-4 p-0 pt-4",children:c?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx(B,{className:"text-xs text-muted-foreground",children:"Claimed domain"}),s.jsx("p",{className:"text-sm font-medium",children:c})]}),s.jsx(M,{variant:"outline",size:"sm",onClick:()=>P.mutate(),disabled:P.isPending,children:"Remove"})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(B,{className:"text-xs",children:"Auto-join"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Users with @",c," emails will automatically join this organization on signup."]})]}),s.jsx(Ae,{checked:z,onCheckedChange:l=>F.mutate(l),disabled:F.isPending})]})]}):D?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx(B,{className:"text-xs text-muted-foreground",children:"Your domain"}),s.jsx("p",{className:"text-sm font-medium",children:d})]}),s.jsx(M,{size:"sm",onClick:()=>m.mutate(),disabled:m.isPending,children:m.isPending?"Claiming...":"Claim Domain"})]}):s.jsx("p",{className:"text-xs text-muted-foreground",children:"No corporate email domain detected."})})]}),t[54]=z,t[55]=D,t[56]=P,t[57]=c,t[58]=m,t[59]=F,t[60]=d,t[61]=$):$=t[61],$}const re=["site-editor","site-diagnostics","ai-image","ai-research"],ne=8;function et(t,e,a){const o=e.find(i=>i.id===t);if(o)return{id:o.id,title:o.title,icon:o.icon,kind:"template"};const p=a.find(i=>i.id===t);return p?{id:t,title:p.title,icon:p.icon??null,kind:"custom"}:{id:t,title:t,icon:null,kind:"missing"}}function tt(t){const e=G.c(39),{agent:a,onRemove:o}=t;let p;e[0]!==a.id?(p={id:a.id},e[0]=a.id,e[1]=p):p=e[1];const{attributes:i,listeners:n,setNodeRef:C,transform:E,transition:N,isDragging:r}=Re(p);let f;e[2]!==E?(f=Le.Transform.toString(E),e[2]=E,e[3]=f):f=e[3];const g=r?.5:void 0,d=r?100:void 0;let c;e[4]!==f||e[5]!==g||e[6]!==d||e[7]!==N?(c={transform:f,transition:N,opacity:g,zIndex:d},e[4]=f,e[5]=g,e[6]=d,e[7]=N,e[8]=c):c=e[8];const z=c,D=r&&"shadow-lg";let x;e[9]!==D?(x=ye("flex items-center gap-3 px-3 py-2 rounded-lg border border-border bg-background",D),e[9]=D,e[10]=x):x=e[10];const j=`Drag to reorder ${a.title}`;let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Be,{size:14}),e[11]=h):h=e[11];let y;e[12]!==i||e[13]!==n||e[14]!==j?(y=s.jsx("button",{type:"button",...i,...n,className:"text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing","aria-label":j,children:h}),e[12]=i,e[13]=n,e[14]=j,e[15]=y):y=e[15];let b;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(xe,{size:14}),e[16]=b):b=e[16];let w;e[17]!==a.icon||e[18]!==a.title?(w=s.jsx(ie,{icon:a.icon,name:a.title,size:"xs",fallbackIcon:b}),e[17]=a.icon,e[18]=a.title,e[19]=w):w=e[19];let m;e[20]!==a.title?(m=s.jsx("span",{className:"text-sm text-foreground truncate",children:a.title}),e[20]=a.title,e[21]=m):m=e[21];const S=a.kind==="template"?"Template":a.kind==="custom"?"Custom agent":"Unavailable";let v;e[22]!==S?(v=s.jsx("span",{className:"text-xs text-muted-foreground",children:S}),e[22]=S,e[23]=v):v=e[23];let _;e[24]!==m||e[25]!==v?(_=s.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[m,v]}),e[24]=m,e[25]=v,e[26]=_):_=e[26];const k=`Remove ${a.title}`;let P;e[27]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(fe,{size:14}),e[27]=P):P=e[27];let A;e[28]!==o||e[29]!==k?(A=s.jsx("button",{type:"button",onClick:o,className:"text-muted-foreground hover:text-foreground p-1 rounded","aria-label":k,children:P}),e[28]=o,e[29]=k,e[30]=A):A=e[30];let I;return e[31]!==C||e[32]!==z||e[33]!==y||e[34]!==w||e[35]!==_||e[36]!==A||e[37]!==x?(I=s.jsxs("div",{ref:C,style:z,className:x,children:[y,w,_,A]}),e[31]=C,e[32]=z,e[33]=y,e[34]=w,e[35]=_,e[36]=A,e[37]=x,e[38]=I):I=e[38],I}function st(t){const e=G.c(48),{selectedIds:a,onAdd:o}=t,[p,i]=Q.useState(!1),[n,C]=Q.useState(""),E=ge();let N;e[0]!==a?(N=new Set(a),e[0]=a,e[1]=N):N=e[1];const r=N;let f,g,d,c,z,D,x,j,h,y,b,w,m;if(e[2]!==E||e[3]!==o||e[4]!==p||e[5]!==n||e[6]!==r){const P=n.toLowerCase();c=ae.filter(u=>!r.has(u.id)&&(!n||u.title.toLowerCase().includes(P)));let A;e[20]!==r?(A=u=>u.id!==null&&!De(u.id)&&!r.has(u.id),e[20]=r,e[21]=A):A=e[21],d=E.filter(A).filter(u=>!n||u.title.toLowerCase().includes(P));let I;e[22]!==o?(I=u=>{o(u),i(!1),C("")},e[22]=o,e[23]=I):I=e[23];const O=I;g=Ge,w=p,m=i,e[24]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(Ke,{asChild:!0,children:s.jsxs(M,{type:"button",variant:"outline",size:"sm",children:[s.jsx(Qe,{size:14}),"Add agent"]})}),e[24]=z):z=e[24],f=Ue,h="w-[320px] p-0 overflow-hidden",y="start",e[25]!==n?(b=s.jsx(qe,{value:n,onChange:C,placeholder:"Search agents..."}),e[25]=n,e[26]=b):b=e[26],D="max-h-[320px] overflow-y-auto p-2 flex flex-col gap-3",x=c.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Templates"}),c.map(u=>s.jsxs("button",{type:"button",onClick:()=>O(u.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(ie,{icon:u.icon,name:u.title,size:"xs"}),s.jsx("span",{className:"text-sm truncate",children:u.title})]},u.id))]}),j=d.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Custom agents"}),d.map(u=>s.jsxs("button",{type:"button",onClick:()=>O(u.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(ie,{icon:u.icon,name:u.title,size:"xs",fallbackIcon:s.jsx(xe,{size:14})}),s.jsx("span",{className:"text-sm truncate",children:u.title})]},u.id))]}),e[2]=E,e[3]=o,e[4]=p,e[5]=n,e[6]=r,e[7]=f,e[8]=g,e[9]=d,e[10]=c,e[11]=z,e[12]=D,e[13]=x,e[14]=j,e[15]=h,e[16]=y,e[17]=b,e[18]=w,e[19]=m}else f=e[7],g=e[8],d=e[9],c=e[10],z=e[11],D=e[12],x=e[13],j=e[14],h=e[15],y=e[16],b=e[17],w=e[18],m=e[19];let S;e[27]!==d||e[28]!==c.length||e[29]!==n?(S=c.length===0&&d.length===0&&s.jsx("div",{className:"text-xs text-muted-foreground text-center py-6",children:n?"No agents found":"All agents are already added"}),e[27]=d,e[28]=c.length,e[29]=n,e[30]=S):S=e[30];let v;e[31]!==S||e[32]!==D||e[33]!==x||e[34]!==j?(v=s.jsxs("div",{className:D,children:[x,j,S]}),e[31]=S,e[32]=D,e[33]=x,e[34]=j,e[35]=v):v=e[35];let _;e[36]!==f||e[37]!==v||e[38]!==h||e[39]!==y||e[40]!==b?(_=s.jsxs(f,{className:h,align:y,children:[b,v]}),e[36]=f,e[37]=v,e[38]=h,e[39]=y,e[40]=b,e[41]=_):_=e[41];let k;return e[42]!==g||e[43]!==z||e[44]!==_||e[45]!==w||e[46]!==m?(k=s.jsxs(g,{open:w,onOpenChange:m,children:[z,_]}),e[42]=g,e[43]=z,e[44]=_,e[45]=w,e[46]=m,e[47]=k):k=e[47],k}function nt(){const t=G.c(60),e=Je(),a=ge(),o=Ve();let p;t[0]!==e?.ids?(p=e?.ids??[...re],t[0]=e?.ids,t[1]=p):p=t[1];const i=p,[n,C]=Q.useState(i);let E;t[2]!==n||t[3]!==i?(E=n.length!==i.length||n.some((l,L)=>l!==i[L]),t[2]=n,t[3]=i,t[4]=E):E=t[4];const N=E;let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r={activationConstraint:{distance:5}},t[5]=r):r=t[5];let f;t[6]===Symbol.for("react.memo_cache_sentinel")?(f={coordinateGetter:Me},t[6]=f):f=t[6];const g=Ee(le(Fe,r),le(Te,f));let d;t[7]!==n?(d=l=>{const{active:L,over:K}=l;if(!K||L.id===K.id)return;const H=n.indexOf(L.id),U=n.indexOf(K.id);H===-1||U===-1||C($e([...n],H,U))},t[7]=n,t[8]=d):d=t[8];const c=d;let z;t[9]!==n?(z=l=>{n.includes(l)||C([...n,l])},t[9]=n,t[10]=z):z=t[10];const D=z;let x;t[11]!==n?(x=l=>{C(n.filter(L=>L!==l))},t[11]=n,t[12]=x):x=t[12];const j=x;let h;t[13]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{C([...re])},t[13]=h):h=t[13];const y=h;let b;t[14]!==n||t[15]!==o?(b=()=>{o.mutate({ids:n},{onSuccess:()=>{q("default_home_agents_updated",{count:n.length,template_count:n.filter(at).length}),T.success("Default home agents updated")},onError:it})},t[14]=n,t[15]=o,t[16]=b):b=t[16];const w=b;let m,S,v,_,k,P,A;if(t[17]!==a||t[18]!==n||t[19]!==c||t[20]!==j||t[21]!==g||t[22]!==o.isPending){let l;t[30]!==a?(l=U=>et(U,ae,a),t[30]=a,t[31]=l):l=t[31];const L=n.map(l);v=Math.max(0,n.length-ne),S=Y,k="p-6";let K;t[32]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx(ee,{className:"text-sm",children:"Default home agents"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Choose which agents appear on the home view for everyone in this organization. Drag to reorder. Up to ",ne," tiles render on the home view."]})]}),t[32]=K):K=t[32];let H;t[33]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Se,{size:14}),t[33]=H):H=t[33],t[34]!==o.isPending?(P=s.jsxs(X,{className:"p-0 flex flex-row items-start justify-between gap-3",children:[K,s.jsxs(M,{type:"button",variant:"ghost",size:"sm",onClick:y,disabled:o.isPending,children:[H,"Reset defaults"]})]}),t[34]=o.isPending,t[35]=P):P=t[35],m=te,A="p-0 flex flex-col gap-3",_=L.length===0?s.jsx("div",{className:"rounded-lg border border-dashed border-border p-6 text-center text-xs text-muted-foreground",children:'No agents selected. The home view will only show "Create agent".'}):s.jsx(Ie,{sensors:g,collisionDetection:Pe,onDragEnd:c,children:s.jsx(ke,{items:n,strategy:Oe,children:s.jsx("div",{className:"flex flex-col gap-1.5",children:L.map((U,he)=>s.jsxs("div",{className:"flex flex-col gap-1.5",children:[he===ne&&s.jsxs("div",{className:"flex items-center gap-2 px-1 py-1 text-xs text-muted-foreground",children:[s.jsx("div",{className:"flex-1 h-px bg-border"}),s.jsx("span",{children:"Below this line is hidden on the home view"}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),s.jsx(tt,{agent:U,onRemove:()=>j(U.id)})]},U.id))})})}),t[17]=a,t[18]=n,t[19]=c,t[20]=j,t[21]=g,t[22]=o.isPending,t[23]=m,t[24]=S,t[25]=v,t[26]=_,t[27]=k,t[28]=P,t[29]=A}else m=t[23],S=t[24],v=t[25],_=t[26],k=t[27],P=t[28],A=t[29];let I;t[36]!==n||t[37]!==D?(I=s.jsx(st,{selectedIds:n,onAdd:D}),t[36]=n,t[37]=D,t[38]=I):I=t[38];let O;t[39]!==v?(O=v>0&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:[v," agent",v===1?"":"s"," won't fit on the home view"]}),t[39]=v,t[40]=O):O=t[40];let u;t[41]!==I||t[42]!==O?(u=s.jsxs("div",{className:"flex items-center justify-between",children:[I,O]}),t[41]=I,t[42]=O,t[43]=u):u=t[43];let F;t[44]!==m||t[45]!==_||t[46]!==u||t[47]!==A?(F=s.jsxs(m,{className:A,children:[_,u]}),t[44]=m,t[45]=_,t[46]=u,t[47]=A,t[48]=F):F=t[48];let R;t[49]!==w||t[50]!==i||t[51]!==N||t[52]!==o.isPending?(R=N&&s.jsxs(ue,{className:"p-0 pt-2 gap-2",children:[s.jsx(M,{type:"button",onClick:w,disabled:o.isPending,children:o.isPending?"Saving…":"Save"}),s.jsx(M,{type:"button",variant:"outline",onClick:()=>C(i),disabled:o.isPending,children:"Cancel"})]}),t[49]=w,t[50]=i,t[51]=N,t[52]=o.isPending,t[53]=R):R=t[53];let $;return t[54]!==S||t[55]!==k||t[56]!==P||t[57]!==F||t[58]!==R?($=s.jsxs(S,{className:k,children:[P,F,R]}),t[54]=S,t[55]=k,t[56]=P,t[57]=F,t[58]=R,t[59]=$):$=t[59],$}function it(t){T.error(t instanceof Error?t.message:"Failed to update default home agents")}function at(t){return ae.some(e=>e.id===t)}function ot(){const t=G.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(X,{className:"p-0",children:s.jsx(ee,{className:"text-sm",children:"Default home agents"})}),t[0]=e):e=t[0];let a;return t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs(Y,{className:"p-6",children:[e,s.jsx(te,{className:"p-0 flex flex-col gap-2",children:Array.from({length:4}).map(lt)})]}),t[1]=a):a=t[1],a}function lt(t,e){return s.jsx(He,{className:"h-12 w-full rounded-lg"},e)}function rt(){const t=G.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Q.Suspense,{fallback:s.jsx(ot,{}),children:s.jsx(nt,{})}),t[0]=e):e=t[0],e}function ct(){const t=G.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(J,{children:s.jsx(J.Content,{children:s.jsx(J.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx(J.Title,{children:"Organization"}),s.jsx(Ye,{}),s.jsx(Xe,{}),s.jsx(rt,{})]})})})}),t[0]=e):e=t[0],e}function ts(){const t=G.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ct,{}),t[0]=e):e=t[0],e}export{ts as default};
|
|
1
|
+
import{e as G,r as Q,z as T,j as s,B as M,f as pe,s as ce,o as de,x as je,w as be,a as W,t as q,K as Z,b as me,v as ve,y as se,n as Ne,c as ye,aD as Se}from"./index-DhJrYN5i.js";import{P as J}from"./index-DvgxnJsz.js";import{C as Y,b as X,c as ee,a as te,d as ue,e as _e}from"./card-DqrPrhd5.js";import{I as oe}from"./input-COFLoOjb.js";import{L as B}from"./label-BZVcstmy.js";import{c as Ce}from"./XCircle-BFZeumzD.js";import{i as fe}from"./X-BuUY-erD.js";import{u as V}from"./unwrap-tool-result-BYXdCQMg.js";import{S as we,u as ze,W as ae,i as De}from"./constants-aD7HJ6sY.js";import{S as Ae}from"./switch-ihM2hYRH.js";import{u as Ee,a as le,D as Ie,c as Pe,S as ke,v as Oe,K as Te,P as Fe,d as Re,C as Le,s as Me,b as $e,e as qe}from"./collection-search-DF-hPm66.js";import{u as ge}from"./use-virtual-mcp-WT1ZdgMM.js";import{b as Ge,P as Ke,a as Ue}from"./popover-Bo1-wNsY.js";import{S as He}from"./skeleton-DOcx8lZU.js";import{Q as Be}from"./agent-icon-DKQKq---.js";import{s as Qe}from"./Plus-BzxOIhxj.js";import{a as xe}from"./Users03-DwNyb_q2.js";import{I as ie}from"./integration-icon-DKrcAAs9.js";import{u as Je,c as Ve}from"./use-organization-settings-CMC2yyUM.js";import"./use-mobile-C4Yo3nsX.js";import"./SearchMd-D6tCV38D.js";import"./use-collections-DvPoAlor.js";import"./AlertCircle-Bgzr6uRA.js";import"./Tool01-BscqkhhO.js";import"./XClose-ANREDbeo.js";import"./RefreshCcw01-BxULs6ec.js";import"./ArrowNarrowLeft-ByrdB8Dd.js";import"./ZapSquare-Bz3HDhTc.js";import"./CheckCircle-88bls7UK.js";import"./ChevronDown-Jd-cYHC-.js";import"./ChevronRight-71i8ke8L.js";import"./ChevronUp-D_szSdLd.js";import"./DotsVertical-CjXyjLNU.js";import"./Container-DWaKXfYv.js";import"./Star01-DZHrISf9.js";import"./Palette-DuWQiO51.js";import"./LinkExternal01-DB08YntP.js";import"./Lock01-dBhVogWg.js";import"./Sun-C8X8gjZW.js";import"./Play-D7pqvkYq.js";import"./Settings02-MyfUtBA4.js";import"./Shield01-CMw4M4Ml.js";import"./Trash01-DZpzvWVW.js";import"./User01-VHn0SqBP.js";import"./Zap-BxJkZzJb.js";function We(t){const e=G.c(28),{value:a,onChange:o,name:p,disabled:i}=t,n=Q.useRef(null);let C;e[0]!==o?(C=b=>{const w=b.target.files?.[0];if(w){if(w.size>2097152){T.error("Image must be smaller than 2MB");return}const m=new FileReader;m.onerror=()=>{const S=m.error;console.error("FileReader error:",S),T.error(S?.message||"Failed to read image file. Please try again."),n.current&&(n.current.value="")},m.onloadend=()=>{m.readyState===FileReader.DONE&&m.result&&o(m.result),n.current&&(n.current.value="")},m.readAsDataURL(w)}},e[0]=o,e[1]=C):C=e[1];const E=C;let N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=()=>{n.current?.click()},e[2]=N):N=e[2];const r=N;let f;e[3]!==o?(f=b=>{b.stopPropagation(),o("")},e[3]=o,e[4]=f):f=e[4];const g=f;let d;e[5]!==i||e[6]!==E?(d=s.jsx("input",{type:"file",ref:n,className:"hidden",accept:"image/*",onChange:E,disabled:i}),e[5]=i,e[6]=E,e[7]=d):d=e[7];let c;e[8]!==i||e[9]!==g||e[10]!==p||e[11]!==a?(c=a?s.jsxs("div",{className:"relative group",children:[s.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:s.jsx("img",{src:a,alt:p||"Logo",className:"w-full h-full object-cover"})}),s.jsx("button",{type:"button",onClick:g,disabled:i,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:s.jsx(fe,{className:"h-3 w-3"})})]}):s.jsxs("button",{type:"button",onClick:r,disabled:i,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground disabled:opacity-50 disabled:pointer-events-none",children:[s.jsx(Ce,{className:"h-5 w-5"}),s.jsx("span",{className:"text-xs",children:"Upload"})]}),e[8]=i,e[9]=g,e[10]=p,e[11]=a,e[12]=c):c=e[12];const z=a?"Change Logo":"Upload Logo";let D;e[13]!==i||e[14]!==z?(D=s.jsx(M,{type:"button",variant:"outline",size:"sm",onClick:r,disabled:i,className:"mb-2",children:z}),e[13]=i,e[14]=z,e[15]=D):D=e[15];let x;e[16]!==i||e[17]!==g||e[18]!==a?(x=a&&s.jsx(M,{type:"button",variant:"ghost",size:"sm",onClick:g,disabled:i,className:"ml-2",children:"Remove"}),e[16]=i,e[17]=g,e[18]=a,e[19]=x):x=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),e[20]=j):j=e[20];let h;e[21]!==D||e[22]!==x?(h=s.jsxs("div",{className:"flex-1",children:[D,x,j]}),e[21]=D,e[22]=x,e[23]=h):h=e[23];let y;return e[24]!==h||e[25]!==d||e[26]!==c?(y=s.jsxs("div",{className:"flex items-start gap-4",children:[d,c,h]}),e[24]=h,e[25]=d,e[26]=c,e[27]=y):y=e[27],y}const Ze=ve({name:se().min(1,"Name is required").max(255,"Name is too long"),slug:se().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:se().optional()});function Ye(){const t=pe(),{org:e}=ce(),a=de(),[o,p]=Q.useState(!1),i=je({resolver:be(Ze),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),n=W({mutationFn:async r=>{const f={name:r.name,slug:r.slug};r.logo&&(f.logo=r.logo);const g=await me.organization.update({organizationId:e.id,data:f});if(g?.error)throw new Error(g.error.message||"Failed to update organization");return g},onSuccess:r=>{q("organization_settings_updated",{organization_id:e.id,fields:Object.keys(i.formState.dirtyFields)}),a.invalidateQueries({queryKey:Z.organizations()}),a.invalidateQueries({queryKey:Z.activeOrganization(e.slug)}),T.success("Organization settings updated successfully"),r?.data?.slug&&r.data.slug!==e.slug&&t({to:"/$org/settings/general",params:{org:r.data.slug}})},onError:r=>{q("organization_settings_update_failed",{organization_id:e.id,fields:Object.keys(i.formState.dirtyFields),error:r instanceof Error?r.message:String(r)}),T.error(r instanceof Error?r.message:"Failed to update organization")},onSettled:()=>{p(!1)}}),C=r=>{p(!0),n.mutate(r)},E=i.formState.isDirty,N=i.formState.errors;return s.jsx("form",{onSubmit:i.handleSubmit(C),className:"flex flex-col gap-6",children:s.jsxs(Y,{className:"p-6",children:[s.jsx(X,{className:"p-0",children:s.jsx(ee,{className:"text-sm",children:"Overview"})}),s.jsxs(te,{className:"flex flex-col gap-6 p-0",children:[s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(B,{className:"text-xs text-muted-foreground",children:"Logo"}),s.jsx(We,{value:i.watch("logo"),onChange:r=>i.setValue("logo",r??"",{shouldDirty:!0}),name:i.watch("name"),disabled:o}),N.logo&&s.jsx("p",{className:"text-xs text-destructive",children:N.logo.message})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-5",children:[s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(B,{htmlFor:"org-name",className:"text-xs text-muted-foreground",children:"Organization name"}),s.jsx(oe,{id:"org-name",...i.register("name"),placeholder:"Organization name",disabled:o}),N.name&&s.jsx("p",{className:"text-xs text-destructive",children:N.name.message})]}),s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(B,{htmlFor:"org-slug",className:"text-xs text-muted-foreground",children:"Slug"}),s.jsx(oe,{id:"org-slug",...i.register("slug"),placeholder:"my-organization",disabled:o,onChange:r=>{const f=r.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");i.setValue("slug",f,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Only lowercase letters, numbers, and hyphens."}),N.slug&&s.jsx("p",{className:"text-xs text-destructive",children:N.slug.message})]})]})]}),E&&s.jsxs(ue,{className:"p-0 pt-2 gap-2",children:[s.jsx(M,{type:"submit",disabled:o,children:o?"Saving…":"Save"}),s.jsx(M,{type:"button",variant:"outline",onClick:()=>i.reset(),disabled:o,children:"Cancel"})]})]})})}function Xe(){const t=G.c(62),{org:e}=ce(),{data:a}=me.useSession(),o=de();let p;t[0]!==e.id?(p={connectionId:we,orgId:e.id},t[0]=e.id,t[1]=p):p=t[1];const i=ze(p);let n;t[2]!==e.id?(n=Z.organizationDomain(e.id),t[2]=e.id,t[3]=n):n=t[3];let C;t[4]!==i?(C=async()=>{const l=await i.callTool({name:"ORGANIZATION_DOMAIN_GET",arguments:{}});return V(l)},t[4]=i,t[5]=C):C=t[5];let E;t[6]!==n||t[7]!==C?(E={queryKey:n,queryFn:C},t[6]=n,t[7]=C,t[8]=E):E=t[8];const{data:N,isPending:r}=Ne(E),f=a?.user?.email??"";let g;t[9]!==f?(g=f.split("@")[1]?.toLowerCase()??"",t[9]=f,t[10]=g):g=t[10];const d=g,c=N?.domain??null,z=N?.autoJoinEnabled??!1,D=d&&d!==c;let x;t[11]!==e.id||t[12]!==o?(x=()=>o.invalidateQueries({queryKey:Z.organizationDomain(e.id)}),t[11]=e.id,t[12]=o,t[13]=x):x=t[13];const j=x;let h;t[14]!==i||t[15]!==d?(h=async()=>{const l=await i.callTool({name:"ORGANIZATION_DOMAIN_SET",arguments:{domain:d,autoJoinEnabled:!1}});return V(l)},t[14]=i,t[15]=d,t[16]=h):h=t[16];let y;t[17]!==j||t[18]!==e.id||t[19]!==d?(y=()=>{q("organization_domain_claimed",{organization_id:e.id,email_domain:d}),j(),T.success("Domain claimed")},t[17]=j,t[18]=e.id,t[19]=d,t[20]=y):y=t[20];let b;t[21]!==e.id||t[22]!==d?(b=l=>{q("organization_domain_claim_failed",{organization_id:e.id,email_domain:d,error:l instanceof Error?l.message:String(l)}),T.error(l instanceof Error?l.message:"Failed to claim domain")},t[21]=e.id,t[22]=d,t[23]=b):b=t[23];let w;t[24]!==h||t[25]!==y||t[26]!==b?(w={mutationFn:h,onSuccess:y,onError:b},t[24]=h,t[25]=y,t[26]=b,t[27]=w):w=t[27];const m=W(w);let S;t[28]!==i?(S=async()=>{const l=await i.callTool({name:"ORGANIZATION_DOMAIN_CLEAR",arguments:{}});return V(l)},t[28]=i,t[29]=S):S=t[29];let v;t[30]!==c||t[31]!==j||t[32]!==e.id?(v=()=>{q("organization_domain_cleared",{organization_id:e.id,email_domain:c}),j(),T.success("Domain removed")},t[30]=c,t[31]=j,t[32]=e.id,t[33]=v):v=t[33];let _;t[34]!==c||t[35]!==e.id?(_=l=>{q("organization_domain_clear_failed",{organization_id:e.id,email_domain:c,error:l instanceof Error?l.message:String(l)}),T.error(l instanceof Error?l.message:"Failed to remove domain")},t[34]=c,t[35]=e.id,t[36]=_):_=t[36];let k;t[37]!==S||t[38]!==v||t[39]!==_?(k={mutationFn:S,onSuccess:v,onError:_},t[37]=S,t[38]=v,t[39]=_,t[40]=k):k=t[40];const P=W(k);let A;t[41]!==i||t[42]!==c||t[43]!==e.id?(A=async l=>{if(!c)return;q("organization_auto_join_toggled",{organization_id:e.id,enabled:l});const L=await i.callTool({name:"ORGANIZATION_DOMAIN_UPDATE",arguments:{autoJoinEnabled:l}});return V(L)},t[41]=i,t[42]=c,t[43]=e.id,t[44]=A):A=t[44];let I;t[45]!==j?(I=()=>{j(),T.success("Auto-join setting updated")},t[45]=j,t[46]=I):I=t[46];let O;t[47]!==e.id?(O=l=>{q("organization_auto_join_toggle_failed",{organization_id:e.id,error:l instanceof Error?l.message:String(l)}),T.error(l instanceof Error?l.message:"Failed to update auto-join")},t[47]=e.id,t[48]=O):O=t[48];let u;t[49]!==A||t[50]!==I||t[51]!==O?(u={mutationFn:A,onSuccess:I,onError:O},t[49]=A,t[50]=I,t[51]=O,t[52]=u):u=t[52];const F=W(u);if(r)return null;let R;t[53]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsxs(X,{className:"p-0",children:[s.jsx(ee,{className:"text-sm",children:"Email Domain"}),s.jsx(_e,{className:"text-xs",children:"Claim your company's email domain so new users with matching emails can automatically join this organization."})]}),t[53]=R):R=t[53];let $;return t[54]!==z||t[55]!==D||t[56]!==P||t[57]!==c||t[58]!==m||t[59]!==F||t[60]!==d?($=s.jsxs(Y,{className:"p-6",children:[R,s.jsx(te,{className:"flex flex-col gap-4 p-0 pt-4",children:c?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx(B,{className:"text-xs text-muted-foreground",children:"Claimed domain"}),s.jsx("p",{className:"text-sm font-medium",children:c})]}),s.jsx(M,{variant:"outline",size:"sm",onClick:()=>P.mutate(),disabled:P.isPending,children:"Remove"})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(B,{className:"text-xs",children:"Auto-join"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Users with @",c," emails will automatically join this organization on signup."]})]}),s.jsx(Ae,{checked:z,onCheckedChange:l=>F.mutate(l),disabled:F.isPending})]})]}):D?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx(B,{className:"text-xs text-muted-foreground",children:"Your domain"}),s.jsx("p",{className:"text-sm font-medium",children:d})]}),s.jsx(M,{size:"sm",onClick:()=>m.mutate(),disabled:m.isPending,children:m.isPending?"Claiming...":"Claim Domain"})]}):s.jsx("p",{className:"text-xs text-muted-foreground",children:"No corporate email domain detected."})})]}),t[54]=z,t[55]=D,t[56]=P,t[57]=c,t[58]=m,t[59]=F,t[60]=d,t[61]=$):$=t[61],$}const re=["site-editor","site-diagnostics","ai-image","ai-research"],ne=8;function et(t,e,a){const o=e.find(i=>i.id===t);if(o)return{id:o.id,title:o.title,icon:o.icon,kind:"template"};const p=a.find(i=>i.id===t);return p?{id:t,title:p.title,icon:p.icon??null,kind:"custom"}:{id:t,title:t,icon:null,kind:"missing"}}function tt(t){const e=G.c(39),{agent:a,onRemove:o}=t;let p;e[0]!==a.id?(p={id:a.id},e[0]=a.id,e[1]=p):p=e[1];const{attributes:i,listeners:n,setNodeRef:C,transform:E,transition:N,isDragging:r}=Re(p);let f;e[2]!==E?(f=Le.Transform.toString(E),e[2]=E,e[3]=f):f=e[3];const g=r?.5:void 0,d=r?100:void 0;let c;e[4]!==f||e[5]!==g||e[6]!==d||e[7]!==N?(c={transform:f,transition:N,opacity:g,zIndex:d},e[4]=f,e[5]=g,e[6]=d,e[7]=N,e[8]=c):c=e[8];const z=c,D=r&&"shadow-lg";let x;e[9]!==D?(x=ye("flex items-center gap-3 px-3 py-2 rounded-lg border border-border bg-background",D),e[9]=D,e[10]=x):x=e[10];const j=`Drag to reorder ${a.title}`;let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Be,{size:14}),e[11]=h):h=e[11];let y;e[12]!==i||e[13]!==n||e[14]!==j?(y=s.jsx("button",{type:"button",...i,...n,className:"text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing","aria-label":j,children:h}),e[12]=i,e[13]=n,e[14]=j,e[15]=y):y=e[15];let b;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(xe,{size:14}),e[16]=b):b=e[16];let w;e[17]!==a.icon||e[18]!==a.title?(w=s.jsx(ie,{icon:a.icon,name:a.title,size:"xs",fallbackIcon:b}),e[17]=a.icon,e[18]=a.title,e[19]=w):w=e[19];let m;e[20]!==a.title?(m=s.jsx("span",{className:"text-sm text-foreground truncate",children:a.title}),e[20]=a.title,e[21]=m):m=e[21];const S=a.kind==="template"?"Template":a.kind==="custom"?"Custom agent":"Unavailable";let v;e[22]!==S?(v=s.jsx("span",{className:"text-xs text-muted-foreground",children:S}),e[22]=S,e[23]=v):v=e[23];let _;e[24]!==m||e[25]!==v?(_=s.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[m,v]}),e[24]=m,e[25]=v,e[26]=_):_=e[26];const k=`Remove ${a.title}`;let P;e[27]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(fe,{size:14}),e[27]=P):P=e[27];let A;e[28]!==o||e[29]!==k?(A=s.jsx("button",{type:"button",onClick:o,className:"text-muted-foreground hover:text-foreground p-1 rounded","aria-label":k,children:P}),e[28]=o,e[29]=k,e[30]=A):A=e[30];let I;return e[31]!==C||e[32]!==z||e[33]!==y||e[34]!==w||e[35]!==_||e[36]!==A||e[37]!==x?(I=s.jsxs("div",{ref:C,style:z,className:x,children:[y,w,_,A]}),e[31]=C,e[32]=z,e[33]=y,e[34]=w,e[35]=_,e[36]=A,e[37]=x,e[38]=I):I=e[38],I}function st(t){const e=G.c(48),{selectedIds:a,onAdd:o}=t,[p,i]=Q.useState(!1),[n,C]=Q.useState(""),E=ge();let N;e[0]!==a?(N=new Set(a),e[0]=a,e[1]=N):N=e[1];const r=N;let f,g,d,c,z,D,x,j,h,y,b,w,m;if(e[2]!==E||e[3]!==o||e[4]!==p||e[5]!==n||e[6]!==r){const P=n.toLowerCase();c=ae.filter(u=>!r.has(u.id)&&(!n||u.title.toLowerCase().includes(P)));let A;e[20]!==r?(A=u=>u.id!==null&&!De(u.id)&&!r.has(u.id),e[20]=r,e[21]=A):A=e[21],d=E.filter(A).filter(u=>!n||u.title.toLowerCase().includes(P));let I;e[22]!==o?(I=u=>{o(u),i(!1),C("")},e[22]=o,e[23]=I):I=e[23];const O=I;g=Ge,w=p,m=i,e[24]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(Ke,{asChild:!0,children:s.jsxs(M,{type:"button",variant:"outline",size:"sm",children:[s.jsx(Qe,{size:14}),"Add agent"]})}),e[24]=z):z=e[24],f=Ue,h="w-[320px] p-0 overflow-hidden",y="start",e[25]!==n?(b=s.jsx(qe,{value:n,onChange:C,placeholder:"Search agents..."}),e[25]=n,e[26]=b):b=e[26],D="max-h-[320px] overflow-y-auto p-2 flex flex-col gap-3",x=c.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Templates"}),c.map(u=>s.jsxs("button",{type:"button",onClick:()=>O(u.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(ie,{icon:u.icon,name:u.title,size:"xs"}),s.jsx("span",{className:"text-sm truncate",children:u.title})]},u.id))]}),j=d.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Custom agents"}),d.map(u=>s.jsxs("button",{type:"button",onClick:()=>O(u.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(ie,{icon:u.icon,name:u.title,size:"xs",fallbackIcon:s.jsx(xe,{size:14})}),s.jsx("span",{className:"text-sm truncate",children:u.title})]},u.id))]}),e[2]=E,e[3]=o,e[4]=p,e[5]=n,e[6]=r,e[7]=f,e[8]=g,e[9]=d,e[10]=c,e[11]=z,e[12]=D,e[13]=x,e[14]=j,e[15]=h,e[16]=y,e[17]=b,e[18]=w,e[19]=m}else f=e[7],g=e[8],d=e[9],c=e[10],z=e[11],D=e[12],x=e[13],j=e[14],h=e[15],y=e[16],b=e[17],w=e[18],m=e[19];let S;e[27]!==d||e[28]!==c.length||e[29]!==n?(S=c.length===0&&d.length===0&&s.jsx("div",{className:"text-xs text-muted-foreground text-center py-6",children:n?"No agents found":"All agents are already added"}),e[27]=d,e[28]=c.length,e[29]=n,e[30]=S):S=e[30];let v;e[31]!==S||e[32]!==D||e[33]!==x||e[34]!==j?(v=s.jsxs("div",{className:D,children:[x,j,S]}),e[31]=S,e[32]=D,e[33]=x,e[34]=j,e[35]=v):v=e[35];let _;e[36]!==f||e[37]!==v||e[38]!==h||e[39]!==y||e[40]!==b?(_=s.jsxs(f,{className:h,align:y,children:[b,v]}),e[36]=f,e[37]=v,e[38]=h,e[39]=y,e[40]=b,e[41]=_):_=e[41];let k;return e[42]!==g||e[43]!==z||e[44]!==_||e[45]!==w||e[46]!==m?(k=s.jsxs(g,{open:w,onOpenChange:m,children:[z,_]}),e[42]=g,e[43]=z,e[44]=_,e[45]=w,e[46]=m,e[47]=k):k=e[47],k}function nt(){const t=G.c(60),e=Je(),a=ge(),o=Ve();let p;t[0]!==e?.ids?(p=e?.ids??[...re],t[0]=e?.ids,t[1]=p):p=t[1];const i=p,[n,C]=Q.useState(i);let E;t[2]!==n||t[3]!==i?(E=n.length!==i.length||n.some((l,L)=>l!==i[L]),t[2]=n,t[3]=i,t[4]=E):E=t[4];const N=E;let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r={activationConstraint:{distance:5}},t[5]=r):r=t[5];let f;t[6]===Symbol.for("react.memo_cache_sentinel")?(f={coordinateGetter:Me},t[6]=f):f=t[6];const g=Ee(le(Fe,r),le(Te,f));let d;t[7]!==n?(d=l=>{const{active:L,over:K}=l;if(!K||L.id===K.id)return;const H=n.indexOf(L.id),U=n.indexOf(K.id);H===-1||U===-1||C($e([...n],H,U))},t[7]=n,t[8]=d):d=t[8];const c=d;let z;t[9]!==n?(z=l=>{n.includes(l)||C([...n,l])},t[9]=n,t[10]=z):z=t[10];const D=z;let x;t[11]!==n?(x=l=>{C(n.filter(L=>L!==l))},t[11]=n,t[12]=x):x=t[12];const j=x;let h;t[13]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{C([...re])},t[13]=h):h=t[13];const y=h;let b;t[14]!==n||t[15]!==o?(b=()=>{o.mutate({ids:n},{onSuccess:()=>{q("default_home_agents_updated",{count:n.length,template_count:n.filter(at).length}),T.success("Default home agents updated")},onError:it})},t[14]=n,t[15]=o,t[16]=b):b=t[16];const w=b;let m,S,v,_,k,P,A;if(t[17]!==a||t[18]!==n||t[19]!==c||t[20]!==j||t[21]!==g||t[22]!==o.isPending){let l;t[30]!==a?(l=U=>et(U,ae,a),t[30]=a,t[31]=l):l=t[31];const L=n.map(l);v=Math.max(0,n.length-ne),S=Y,k="p-6";let K;t[32]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx(ee,{className:"text-sm",children:"Default home agents"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Choose which agents appear on the home view for everyone in this organization. Drag to reorder. Up to ",ne," tiles render on the home view."]})]}),t[32]=K):K=t[32];let H;t[33]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Se,{size:14}),t[33]=H):H=t[33],t[34]!==o.isPending?(P=s.jsxs(X,{className:"p-0 flex flex-row items-start justify-between gap-3",children:[K,s.jsxs(M,{type:"button",variant:"ghost",size:"sm",onClick:y,disabled:o.isPending,children:[H,"Reset defaults"]})]}),t[34]=o.isPending,t[35]=P):P=t[35],m=te,A="p-0 flex flex-col gap-3",_=L.length===0?s.jsx("div",{className:"rounded-lg border border-dashed border-border p-6 text-center text-xs text-muted-foreground",children:'No agents selected. The home view will only show "Create agent".'}):s.jsx(Ie,{sensors:g,collisionDetection:Pe,onDragEnd:c,children:s.jsx(ke,{items:n,strategy:Oe,children:s.jsx("div",{className:"flex flex-col gap-1.5",children:L.map((U,he)=>s.jsxs("div",{className:"flex flex-col gap-1.5",children:[he===ne&&s.jsxs("div",{className:"flex items-center gap-2 px-1 py-1 text-xs text-muted-foreground",children:[s.jsx("div",{className:"flex-1 h-px bg-border"}),s.jsx("span",{children:"Below this line is hidden on the home view"}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),s.jsx(tt,{agent:U,onRemove:()=>j(U.id)})]},U.id))})})}),t[17]=a,t[18]=n,t[19]=c,t[20]=j,t[21]=g,t[22]=o.isPending,t[23]=m,t[24]=S,t[25]=v,t[26]=_,t[27]=k,t[28]=P,t[29]=A}else m=t[23],S=t[24],v=t[25],_=t[26],k=t[27],P=t[28],A=t[29];let I;t[36]!==n||t[37]!==D?(I=s.jsx(st,{selectedIds:n,onAdd:D}),t[36]=n,t[37]=D,t[38]=I):I=t[38];let O;t[39]!==v?(O=v>0&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:[v," agent",v===1?"":"s"," won't fit on the home view"]}),t[39]=v,t[40]=O):O=t[40];let u;t[41]!==I||t[42]!==O?(u=s.jsxs("div",{className:"flex items-center justify-between",children:[I,O]}),t[41]=I,t[42]=O,t[43]=u):u=t[43];let F;t[44]!==m||t[45]!==_||t[46]!==u||t[47]!==A?(F=s.jsxs(m,{className:A,children:[_,u]}),t[44]=m,t[45]=_,t[46]=u,t[47]=A,t[48]=F):F=t[48];let R;t[49]!==w||t[50]!==i||t[51]!==N||t[52]!==o.isPending?(R=N&&s.jsxs(ue,{className:"p-0 pt-2 gap-2",children:[s.jsx(M,{type:"button",onClick:w,disabled:o.isPending,children:o.isPending?"Saving…":"Save"}),s.jsx(M,{type:"button",variant:"outline",onClick:()=>C(i),disabled:o.isPending,children:"Cancel"})]}),t[49]=w,t[50]=i,t[51]=N,t[52]=o.isPending,t[53]=R):R=t[53];let $;return t[54]!==S||t[55]!==k||t[56]!==P||t[57]!==F||t[58]!==R?($=s.jsxs(S,{className:k,children:[P,F,R]}),t[54]=S,t[55]=k,t[56]=P,t[57]=F,t[58]=R,t[59]=$):$=t[59],$}function it(t){T.error(t instanceof Error?t.message:"Failed to update default home agents")}function at(t){return ae.some(e=>e.id===t)}function ot(){const t=G.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(X,{className:"p-0",children:s.jsx(ee,{className:"text-sm",children:"Default home agents"})}),t[0]=e):e=t[0];let a;return t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs(Y,{className:"p-6",children:[e,s.jsx(te,{className:"p-0 flex flex-col gap-2",children:Array.from({length:4}).map(lt)})]}),t[1]=a):a=t[1],a}function lt(t,e){return s.jsx(He,{className:"h-12 w-full rounded-lg"},e)}function rt(){const t=G.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Q.Suspense,{fallback:s.jsx(ot,{}),children:s.jsx(nt,{})}),t[0]=e):e=t[0],e}function ct(){const t=G.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(J,{children:s.jsx(J.Content,{children:s.jsx(J.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx(J.Title,{children:"Organization"}),s.jsx(Ye,{}),s.jsx(Xe,{}),s.jsx(rt,{})]})})})}),t[0]=e):e=t[0],e}function ts(){const t=G.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ct,{}),t[0]=e):e=t[0],e}export{ts as default};
|
package/dist/client/assets/{github-repo-picker-DZqLC6FL.js → github-repo-picker-CwCtQ7G3.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as M,s as z,o as ve,b as ze,r as O,K as ne,n as Fe,a as He,j as t,c as he,B as oe,t as V,z as ie,f as We,a0 as Je,a1 as Xe,az as je,C as Ze,l as xe,V as et}from"./index-D34n6J5J.js";import{S as re,u as $,d as we,W as Be,j as ye}from"./constants-DDHDU3PV.js";import{u as Ne}from"./use-navigate-to-agent-CFIKBq0L.js";import{c as ce,d as le,a as de,D as ue,b as tt}from"./dialog-C4lREl-t.js";import{i as Ae}from"./RefreshCcw01-B10mKiE2.js";import{C as qe}from"./collection-search-Bo2bOvRn.js";import{c as Ee,b as Se,D as Oe,a as Le}from"./drawer-BTCEaGGQ.js";import{u as Re}from"./use-mobile-CxvYCzu9.js";import{I as Me}from"./integration-icon-Cdkk9YPE.js";import{a as ke,u as nt}from"./use-connection-Cif-LY0f.js";import{u as st,d as Qe}from"./use-mcp-tools-BYVtg7WH.js";import{b as Ue,u as it}from"./use-virtual-mcp-0vHwLInn.js";import{C as ot}from"./checkbox-DznLgPgR.js";import{i as at}from"./Lock01-DpPIS3K7.js";import{F as rt}from"./agent-icon-CyE6nkC1.js";import{e as ct}from"./extract-connection-data-CfXvFcGA.js";function lt(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function dt(){const i=await fetch("/api/deco-sites");if(!i.ok){const e=await i.json().catch(()=>({}));throw new Error(e.error??`Failed to load sites (${i.status})`)}return i.json()}function Kt(i){const e=M.c(65),{open:n,onOpenChange:a,onBack:c}=i,{org:s}=z(),l=Ne(),m=ve(),{data:f}=ze.useSession(),[x,h]=O.useState(null),[T,d]=O.useState("");let u;e[0]!==s.id?(u={connectionId:re,orgId:s.id},e[0]=s.id,e[1]=u):u=e[1];const p=$(u);let r;e[2]!==f?.user?.email?(r=ne.decoSites(f?.user?.email),e[2]=f?.user?.email,e[3]=r):r=e[3];const g=n&&!!f?.user?.email;let C;e[4]!==r||e[5]!==g?(C={queryKey:r,queryFn:dt,enabled:g,staleTime:6e4,retry:!1},e[4]=r,e[5]=g,e[6]=C):C=e[6];const{data:_,isLoading:N,error:b}=Fe(C),I=_?.sites??[];let o;e[7]!==a?(o=w=>{w||(h(null),d("")),a(w)},e[7]=a,e[8]=o):o=e[8];const y=o;let A;e[9]!==T?(A=w=>w.name.toLowerCase().includes(T.toLowerCase())||w.domains?.[0]?.domain.toLowerCase().includes(T.toLowerCase()),e[9]=T,e[10]=A):A=e[10];const v=I.filter(A),E=!x||v.some(w=>w.name===x);let j;e[11]!==p||e[12]!==s.id?(j=async w=>{V("deco_site_import_started",{site_name:w});const G=await fetch("/api/deco-sites/connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:w,orgId:s.id})}),D=await G.json().catch(ft);if(!G.ok)throw new Error(D.error??`Failed to create connection (${G.status})`);const L=D.connId;if(!L)throw new Error("Server did not return a connection ID");const ge=D.icon??null,te=lt(w),Pe=await p.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:w,description:"Imported from deco.cx",pinned:!0,icon:ge??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],ui:{banner:null,bannerColor:"#22C55E",icon:ge,themeColor:"#22C55E",slug:te,pinnedViews:[{connectionId:L,toolName:"file_explorer",label:"Preview",icon:null},{connectionId:L,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:L,toolName:"get_monitor_data",label:"Monitor",icon:null},{connectionId:L,toolName:"list_pull_requests",label:"Pull Requests",icon:null},{connectionId:L,toolName:"list_releases",label:"Releases",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:L,toolName:"file_explorer"}}}},connections:[{connection_id:L}]}}}),Ge=Pe.structuredContent??Pe;return{slug:te,virtualMcpId:Ge.item.id,connId:L,item:Ge.item}},e[11]=p,e[12]=s.id,e[13]=j):j=e[13];let S;e[14]!==p||e[15]!==y||e[16]!==l||e[17]!==s.id||e[18]!==m?(S=w=>{const{slug:G,virtualMcpId:D,item:L}=w;V("deco_site_import_succeeded",{site_name:L.title,virtual_mcp_id:D,slug:G}),m.setQueryData(ne.collectionItem(p,s.id,"","VIRTUAL_MCP",D),{item:L}),m.invalidateQueries({predicate:ge=>{const te=ge.queryKey;return te[1]===s.id&&te[3]==="collection"&&te[4]==="VIRTUAL_MCP"}}),m.invalidateQueries({queryKey:ne.projects(s.id)}),ie.success(`Imported ${G} from deco.cx`),y(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),l(D)},e[14]=p,e[15]=y,e[16]=l,e[17]=s.id,e[18]=m,e[19]=S):S=e[19];let k;e[20]!==j||e[21]!==S?(k={mutationFn:j,onSuccess:S,onError:mt},e[20]=j,e[21]=S,e[22]=k):k=e[22];const U=He(k),F=le,se=ce,R="sm:max-w-[900px] p-0 gap-0 overflow-hidden";let P;e[23]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(de,{className:"sr-only",children:t.jsx(ue,{children:"Import from deco.cx"})}),e[23]=P):P=e[23];let H;e[24]!==c?(H=c&&t.jsx("button",{type:"button",onClick:c,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":"Go back",children:t.jsx(Ae,{size:18})}),e[24]=c,e[25]=H):H=e[25];let me;e[26]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"}),e[26]=me):me=e[26];let B;e[27]!==H?(B=t.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[H,me]}),e[27]=H,e[28]=B):B=e[28];let fe;e[29]===Symbol.for("react.memo_cache_sentinel")?(fe=w=>{w.key==="Escape"&&d("")},e[29]=fe):fe=e[29];let q;e[30]!==T?(q=t.jsx("div",{children:t.jsx(qe,{value:T,onChange:d,placeholder:"Search sites...",onKeyDown:fe})}),e[30]=T,e[31]=q):q=e[31];const Ke="pb-0 min-h-[300px]";let Q;e[32]!==N?(Q=N&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),e[32]=N,e[33]=Q):Q=e[33];const _e=!N&&!b&&I.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),Ce=!N&&I.length>0&&t.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[v.length===0&&t.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",T,"”"]}),v.map(w=>{const G=w.domains?.find(ut)?.domain??w.domains?.[0]?.domain,D=x===w.name;return t.jsxs("button",{type:"button",onClick:()=>h(w.name),className:he("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",D?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[t.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:w.thumb_url?t.jsx("img",{src:w.thumb_url,alt:w.name,className:"w-full h-full object-cover",loading:"lazy"}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsxs("div",{className:"px-4 py-3",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:w.name}),G&&t.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:G})]})]},w.name)})]});let Y;e[34]!==Q||e[35]!==_e||e[36]!==Ce?(Y=t.jsxs("div",{className:Ke,children:[Q,_e,Ce]}),e[34]=Q,e[35]=_e,e[36]=Ce,e[37]=Y):Y=e[37];let K;e[38]!==y?(K=()=>y(!1),e[38]=y,e[39]=K):K=e[39];let W;e[40]!==U.isPending||e[41]!==K?(W=t.jsx(oe,{variant:"outline",onClick:K,disabled:U.isPending,children:"Cancel"}),e[40]=U.isPending,e[41]=K,e[42]=W):W=e[42];const Ie=!x||!E||U.isPending||N;let J;e[43]!==U||e[44]!==x?(J=()=>x&&U.mutate(x),e[43]=U,e[44]=x,e[45]=J):J=e[45];const Te=U.isPending?"Importing...":"Import";let X;e[46]!==Ie||e[47]!==J||e[48]!==Te?(X=t.jsx(oe,{disabled:Ie,onClick:J,children:Te}),e[46]=Ie,e[47]=J,e[48]=Te,e[49]=X):X=e[49];let Z;e[50]!==W||e[51]!==X?(Z=t.jsxs(tt,{className:"px-8 py-5 border-t border-border",children:[W,X]}),e[50]=W,e[51]=X,e[52]=Z):Z=e[52];let ee;e[53]!==se||e[54]!==P||e[55]!==B||e[56]!==q||e[57]!==Y||e[58]!==Z?(ee=t.jsxs(se,{className:R,children:[P,B,q,Y,Z]}),e[53]=se,e[54]=P,e[55]=B,e[56]=q,e[57]=Y,e[58]=Z,e[59]=ee):ee=e[59];let pe;return e[60]!==F||e[61]!==y||e[62]!==n||e[63]!==ee?(pe=t.jsx(F,{open:n,onOpenChange:y,children:ee}),e[60]=F,e[61]=y,e[62]=n,e[63]=ee,e[64]=pe):pe=e[64],pe}function ut(i){return i.production}function mt(i){V("deco_site_import_failed",{error:i instanceof Error?i.message:"Unknown error"}),ie.error("Import failed: "+(i instanceof Error?i.message:"Unknown error"))}function ft(){return{}}function Ye(i,e){const n=M.c(11),{org:a}=z();let c;n[0]!==a.id?(c=we.REGISTRY(a.id),n[0]=a.id,n[1]=c):c=n[1];const s=c;let l;n[2]!==a.id||n[3]!==s?(l={connectionId:s,orgId:a.id},n[2]=a.id,n[3]=s,n[4]=l):l=n[4];const m=$(l);let f;n[5]!==i?(f={name:i},n[5]=i,n[6]=f):f=n[6];const x=e?.enabled??!0;let h;return n[7]!==m||n[8]!==f||n[9]!==x?(h={client:m,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:f,enabled:x,staleTime:3e5,select:pt},n[7]=m,n[8]=f,n[9]=x,n[10]=h):h=n[10],st(h)}function pt(i){return i.structuredContent?.item??null}const gt=["Full HAR capture with cache, TTFB, and request analysis","Screenshot capture for visual inspection","Page discovery via sitemap, navigation, and link crawling","SEO audit — meta tags, structured data, robots.txt","Third-party script inventory and size analysis","Dead link detection across the entire site","Deco-specific diagnostics (?__d debug mode)"];function De(i){const e=M.c(7),{onRecruit:n,isRecruiting:a,isLoading:c}=i;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a blackbox diagnostics agent that tests your storefront from the outside — no internal access needed. Give it a URL and it produces a detailed performance and health report."}),e[0]=s):s=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Capabilities"}),e[1]=l):l=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"space-y-2",children:[l,t.jsx("ul",{className:"space-y-1.5",children:gt.map(ht)})]}),e[2]=m):m=e[2];const f=a||c,x=a?"Setting up...":"Add Site Diagnostics";let h;return e[3]!==n||e[4]!==f||e[5]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-6",children:[s,m,t.jsx(oe,{onClick:n,disabled:f,className:"w-full cursor-pointer",children:x})]}),e[3]=n,e[4]=f,e[5]=x,e[6]=h):h=e[6],h}function ht(i){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),i]},i)}function Wt({open:i,onOpenChange:e,existingAgent:n}){const a=Re(),{org:c}=z(),s=Ne(),l=ke(),m=Ue(),f=$({connectionId:re,orgId:c.id}),x=Qe({client:f}),[h,T]=O.useState(!1),d=Be.find(I=>I.id==="site-diagnostics"),{data:u,isLoading:p}=Ye(d.appId,{enabled:i}),r=u?.title||u?.server?.title||u?.server?.name||d.title,g=u?.server?.icons?.[0]?.src??d.icon,C=u?.server?.description??null,_=t.jsx(Me,{icon:g,name:r,size:"sm"}),N=async()=>{if(u){if(n){e(!1),s(n.id);return}T(!0);try{const I=await x.mutateAsync({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_id"],operator:"eq",value:d.appId},limit:1,offset:0}});let o;const A=I?.structuredContent?.items?.find(E=>E.app_id===d.appId);if(A)o=A.id;else{const E=u.server?.remotes?.[0]?.url;if(!E)throw new Error("Registry item is missing a remote URL for site-diagnostics");o=(await l.create.mutateAsync({title:r,description:C,icon:u.server?.icons?.[0]?.src??d.icon,connection_type:"HTTP",connection_url:E,app_name:u.server?.name??"site-diagnostics",app_id:d.appId,metadata:{type:"site-diagnostics",source:"store",registry_item_id:d.appId,verified:!0}})).id}const v=await m.create.mutateAsync({title:r,description:C,icon:g,status:"active",connections:[{connection_id:o,selected_tools:null,selected_resources:null,selected_prompts:null}],metadata:{type:"site-diagnostics",instructions:null,ui:{pinnedViews:[{connectionId:o,toolName:"diagnose",label:"diagnose",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:o,toolName:"diagnose"}}}}});V("agent_recruit_confirmed",{template_id:"site-diagnostics",agent_id:v.id}),e(!1),s(v.id)}catch(I){V("agent_recruit_failed",{template_id:"site-diagnostics",error:I instanceof Error?I.message:String(I)}),console.error("Failed to create Site Diagnostics agent:",I)}finally{T(!1)}}},b=`Add ${r}`;return a?t.jsx(Ee,{open:i,onOpenChange:e,children:t.jsxs(Se,{className:"h-[70dvh]",children:[t.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[_,t.jsx(Le,{className:"text-xl font-semibold",children:b})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx(De,{onRecruit:N,isRecruiting:h,isLoading:p})})]})}):t.jsx(le,{open:i,onOpenChange:e,children:t.jsxs(ce,{className:"sm:max-w-[500px] p-8",children:[t.jsx(de,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[_,t.jsx(ue,{className:"text-xl font-semibold",children:b})]})}),t.jsx(De,{onRecruit:N,isRecruiting:h,isLoading:p})]})})}const xt="https://sites-lean-canva.decocache.com/api/mcp",Nt=["Build and update Lean Canvas business models visually","Interactive grid UI with all 9 canvas sections","Iterative updates — add information as you discover it","Covers: Problem, Solution, Key Metrics, Unique Value Proposition","Covers: Channels, Customer Segments, Cost Structure, Revenue Streams","Unfair Advantage analysis"];function Ve(i){const e=M.c(7),{onRecruit:n,isRecruiting:a}=i;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a Lean Canvas agent that helps you build and iterate on your business model. Describe your idea and it produces a visual, structured canvas."}),e[0]=c):c=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Capabilities"}),e[1]=s):s=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"space-y-2",children:[s,t.jsx("ul",{className:"space-y-1.5",children:Nt.map(_t)})]}),e[2]=l):l=e[2];const m=a?"Setting up...":"Add Lean Canvas";let f;return e[3]!==a||e[4]!==n||e[5]!==m?(f=t.jsxs("div",{className:"flex flex-col gap-6",children:[c,l,t.jsx(oe,{onClick:n,disabled:a,className:"w-full cursor-pointer",children:m})]}),e[3]=a,e[4]=n,e[5]=m,e[6]=f):f=e[6],f}function _t(i){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),i]},i)}function Jt({open:i,onOpenChange:e,existingAgent:n}){const a=Re(),{org:c}=z(),s=Ne(),l=ke(),m=Ue(),f=$({connectionId:re,orgId:c.id}),x=Qe({client:f}),[h,T]=O.useState(!1),d=Be.find(g=>g.id==="lean-canvas"),u=t.jsx(Me,{icon:d.icon,name:d.title,size:"sm"}),p=async()=>{if(n){e(!1),s(n.id);return}T(!0);try{const g=await x.mutateAsync({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_id"],operator:"eq",value:"lean-canvas"},limit:1,offset:0}});let C;const N=g?.structuredContent?.items?.find(o=>o.app_id==="lean-canvas"),b=we.SELF(c.id);N?C=N.id:C=(await l.create.mutateAsync({title:d.title,description:"Lean Canvas business model builder",icon:d.icon,connection_type:"HTTP",connection_url:xt,app_name:"lean-canvas",app_id:"lean-canvas",configuration_state:{OBJECT_STORAGE:{__type:"@deco/object-storage",value:b}},metadata:{type:"lean-canvas",source:"store",verified:!0}})).id;const I=await m.create.mutateAsync({title:d.title,description:"Lean Canvas business model builder",icon:d.icon,status:"active",connections:[{connection_id:C,selected_tools:null,selected_resources:null,selected_prompts:null},{connection_id:b,selected_tools:null,selected_resources:null,selected_prompts:null}],metadata:{type:"lean-canvas",instructions:null,ui:{pinnedViews:[{connectionId:C,toolName:"lean_canvas",label:"lean_canvas",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:C,toolName:"lean_canvas"}}}}});V("agent_recruit_confirmed",{template_id:"lean-canvas",agent_id:I.id}),e(!1),s(I.id)}catch(g){V("agent_recruit_failed",{template_id:"lean-canvas",error:g instanceof Error?g.message:String(g)}),console.error("Failed to create Lean Canvas agent:",g)}finally{T(!1)}},r=`Add ${d.title}`;return a?t.jsx(Ee,{open:i,onOpenChange:e,children:t.jsxs(Se,{className:"h-[70dvh]",children:[t.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[u,t.jsx(Le,{className:"text-xl font-semibold",children:r})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx(Ve,{onRecruit:p,isRecruiting:h})})]})}):t.jsx(le,{open:i,onOpenChange:e,children:t.jsxs(ce,{className:"sm:max-w-[500px] p-8",children:[t.jsx(de,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[u,t.jsx(ue,{className:"text-xl font-semibold",children:r})]})}),t.jsx(Ve,{onRecruit:p,isRecruiting:h})]})})}const Ct=`<role>
|
|
1
|
+
import{e as M,s as z,o as ve,b as ze,r as O,K as ne,n as Fe,a as He,j as t,c as he,B as oe,t as V,z as ie,f as We,a0 as Je,a1 as Xe,az as je,C as Ze,l as xe,V as et}from"./index-DhJrYN5i.js";import{S as re,u as $,d as we,W as Be,j as ye}from"./constants-aD7HJ6sY.js";import{u as Ne}from"./use-navigate-to-agent-Bx0DB5DW.js";import{c as ce,d as le,a as de,D as ue,b as tt}from"./dialog-nGTWjCEa.js";import{i as Ae}from"./RefreshCcw01-BxULs6ec.js";import{C as qe}from"./collection-search-B_zW9IS4.js";import{c as Ee,b as Se,D as Oe,a as Le}from"./drawer-DyPUsgdj.js";import{u as Re}from"./use-mobile-C4Yo3nsX.js";import{I as Me}from"./integration-icon-DKrcAAs9.js";import{a as ke,u as nt}from"./use-connection-MU3rXx28.js";import{u as st,d as Qe}from"./use-mcp-tools-B5zpuics.js";import{b as Ue,u as it}from"./use-virtual-mcp-WT1ZdgMM.js";import{C as ot}from"./checkbox-Dplb_VaM.js";import{i as at}from"./Lock01-dBhVogWg.js";import{F as rt}from"./agent-icon-DKQKq---.js";import{e as ct}from"./extract-connection-data-Bx0uarS8.js";function lt(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function dt(){const i=await fetch("/api/deco-sites");if(!i.ok){const e=await i.json().catch(()=>({}));throw new Error(e.error??`Failed to load sites (${i.status})`)}return i.json()}function Kt(i){const e=M.c(65),{open:n,onOpenChange:a,onBack:c}=i,{org:s}=z(),l=Ne(),m=ve(),{data:f}=ze.useSession(),[x,h]=O.useState(null),[T,d]=O.useState("");let u;e[0]!==s.id?(u={connectionId:re,orgId:s.id},e[0]=s.id,e[1]=u):u=e[1];const p=$(u);let r;e[2]!==f?.user?.email?(r=ne.decoSites(f?.user?.email),e[2]=f?.user?.email,e[3]=r):r=e[3];const g=n&&!!f?.user?.email;let C;e[4]!==r||e[5]!==g?(C={queryKey:r,queryFn:dt,enabled:g,staleTime:6e4,retry:!1},e[4]=r,e[5]=g,e[6]=C):C=e[6];const{data:_,isLoading:N,error:b}=Fe(C),I=_?.sites??[];let o;e[7]!==a?(o=w=>{w||(h(null),d("")),a(w)},e[7]=a,e[8]=o):o=e[8];const y=o;let A;e[9]!==T?(A=w=>w.name.toLowerCase().includes(T.toLowerCase())||w.domains?.[0]?.domain.toLowerCase().includes(T.toLowerCase()),e[9]=T,e[10]=A):A=e[10];const v=I.filter(A),E=!x||v.some(w=>w.name===x);let j;e[11]!==p||e[12]!==s.id?(j=async w=>{V("deco_site_import_started",{site_name:w});const G=await fetch("/api/deco-sites/connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:w,orgId:s.id})}),D=await G.json().catch(ft);if(!G.ok)throw new Error(D.error??`Failed to create connection (${G.status})`);const L=D.connId;if(!L)throw new Error("Server did not return a connection ID");const ge=D.icon??null,te=lt(w),Pe=await p.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:w,description:"Imported from deco.cx",pinned:!0,icon:ge??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],ui:{banner:null,bannerColor:"#22C55E",icon:ge,themeColor:"#22C55E",slug:te,pinnedViews:[{connectionId:L,toolName:"file_explorer",label:"Preview",icon:null},{connectionId:L,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:L,toolName:"get_monitor_data",label:"Monitor",icon:null},{connectionId:L,toolName:"list_pull_requests",label:"Pull Requests",icon:null},{connectionId:L,toolName:"list_releases",label:"Releases",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:L,toolName:"file_explorer"}}}},connections:[{connection_id:L}]}}}),Ge=Pe.structuredContent??Pe;return{slug:te,virtualMcpId:Ge.item.id,connId:L,item:Ge.item}},e[11]=p,e[12]=s.id,e[13]=j):j=e[13];let S;e[14]!==p||e[15]!==y||e[16]!==l||e[17]!==s.id||e[18]!==m?(S=w=>{const{slug:G,virtualMcpId:D,item:L}=w;V("deco_site_import_succeeded",{site_name:L.title,virtual_mcp_id:D,slug:G}),m.setQueryData(ne.collectionItem(p,s.id,"","VIRTUAL_MCP",D),{item:L}),m.invalidateQueries({predicate:ge=>{const te=ge.queryKey;return te[1]===s.id&&te[3]==="collection"&&te[4]==="VIRTUAL_MCP"}}),m.invalidateQueries({queryKey:ne.projects(s.id)}),ie.success(`Imported ${G} from deco.cx`),y(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),l(D)},e[14]=p,e[15]=y,e[16]=l,e[17]=s.id,e[18]=m,e[19]=S):S=e[19];let k;e[20]!==j||e[21]!==S?(k={mutationFn:j,onSuccess:S,onError:mt},e[20]=j,e[21]=S,e[22]=k):k=e[22];const U=He(k),F=le,se=ce,R="sm:max-w-[900px] p-0 gap-0 overflow-hidden";let P;e[23]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(de,{className:"sr-only",children:t.jsx(ue,{children:"Import from deco.cx"})}),e[23]=P):P=e[23];let H;e[24]!==c?(H=c&&t.jsx("button",{type:"button",onClick:c,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":"Go back",children:t.jsx(Ae,{size:18})}),e[24]=c,e[25]=H):H=e[25];let me;e[26]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"}),e[26]=me):me=e[26];let B;e[27]!==H?(B=t.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[H,me]}),e[27]=H,e[28]=B):B=e[28];let fe;e[29]===Symbol.for("react.memo_cache_sentinel")?(fe=w=>{w.key==="Escape"&&d("")},e[29]=fe):fe=e[29];let q;e[30]!==T?(q=t.jsx("div",{children:t.jsx(qe,{value:T,onChange:d,placeholder:"Search sites...",onKeyDown:fe})}),e[30]=T,e[31]=q):q=e[31];const Ke="pb-0 min-h-[300px]";let Q;e[32]!==N?(Q=N&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),e[32]=N,e[33]=Q):Q=e[33];const _e=!N&&!b&&I.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),Ce=!N&&I.length>0&&t.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[v.length===0&&t.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",T,"”"]}),v.map(w=>{const G=w.domains?.find(ut)?.domain??w.domains?.[0]?.domain,D=x===w.name;return t.jsxs("button",{type:"button",onClick:()=>h(w.name),className:he("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",D?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[t.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:w.thumb_url?t.jsx("img",{src:w.thumb_url,alt:w.name,className:"w-full h-full object-cover",loading:"lazy"}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsxs("div",{className:"px-4 py-3",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:w.name}),G&&t.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:G})]})]},w.name)})]});let Y;e[34]!==Q||e[35]!==_e||e[36]!==Ce?(Y=t.jsxs("div",{className:Ke,children:[Q,_e,Ce]}),e[34]=Q,e[35]=_e,e[36]=Ce,e[37]=Y):Y=e[37];let K;e[38]!==y?(K=()=>y(!1),e[38]=y,e[39]=K):K=e[39];let W;e[40]!==U.isPending||e[41]!==K?(W=t.jsx(oe,{variant:"outline",onClick:K,disabled:U.isPending,children:"Cancel"}),e[40]=U.isPending,e[41]=K,e[42]=W):W=e[42];const Ie=!x||!E||U.isPending||N;let J;e[43]!==U||e[44]!==x?(J=()=>x&&U.mutate(x),e[43]=U,e[44]=x,e[45]=J):J=e[45];const Te=U.isPending?"Importing...":"Import";let X;e[46]!==Ie||e[47]!==J||e[48]!==Te?(X=t.jsx(oe,{disabled:Ie,onClick:J,children:Te}),e[46]=Ie,e[47]=J,e[48]=Te,e[49]=X):X=e[49];let Z;e[50]!==W||e[51]!==X?(Z=t.jsxs(tt,{className:"px-8 py-5 border-t border-border",children:[W,X]}),e[50]=W,e[51]=X,e[52]=Z):Z=e[52];let ee;e[53]!==se||e[54]!==P||e[55]!==B||e[56]!==q||e[57]!==Y||e[58]!==Z?(ee=t.jsxs(se,{className:R,children:[P,B,q,Y,Z]}),e[53]=se,e[54]=P,e[55]=B,e[56]=q,e[57]=Y,e[58]=Z,e[59]=ee):ee=e[59];let pe;return e[60]!==F||e[61]!==y||e[62]!==n||e[63]!==ee?(pe=t.jsx(F,{open:n,onOpenChange:y,children:ee}),e[60]=F,e[61]=y,e[62]=n,e[63]=ee,e[64]=pe):pe=e[64],pe}function ut(i){return i.production}function mt(i){V("deco_site_import_failed",{error:i instanceof Error?i.message:"Unknown error"}),ie.error("Import failed: "+(i instanceof Error?i.message:"Unknown error"))}function ft(){return{}}function Ye(i,e){const n=M.c(11),{org:a}=z();let c;n[0]!==a.id?(c=we.REGISTRY(a.id),n[0]=a.id,n[1]=c):c=n[1];const s=c;let l;n[2]!==a.id||n[3]!==s?(l={connectionId:s,orgId:a.id},n[2]=a.id,n[3]=s,n[4]=l):l=n[4];const m=$(l);let f;n[5]!==i?(f={name:i},n[5]=i,n[6]=f):f=n[6];const x=e?.enabled??!0;let h;return n[7]!==m||n[8]!==f||n[9]!==x?(h={client:m,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:f,enabled:x,staleTime:3e5,select:pt},n[7]=m,n[8]=f,n[9]=x,n[10]=h):h=n[10],st(h)}function pt(i){return i.structuredContent?.item??null}const gt=["Full HAR capture with cache, TTFB, and request analysis","Screenshot capture for visual inspection","Page discovery via sitemap, navigation, and link crawling","SEO audit — meta tags, structured data, robots.txt","Third-party script inventory and size analysis","Dead link detection across the entire site","Deco-specific diagnostics (?__d debug mode)"];function De(i){const e=M.c(7),{onRecruit:n,isRecruiting:a,isLoading:c}=i;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a blackbox diagnostics agent that tests your storefront from the outside — no internal access needed. Give it a URL and it produces a detailed performance and health report."}),e[0]=s):s=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Capabilities"}),e[1]=l):l=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("div",{className:"space-y-2",children:[l,t.jsx("ul",{className:"space-y-1.5",children:gt.map(ht)})]}),e[2]=m):m=e[2];const f=a||c,x=a?"Setting up...":"Add Site Diagnostics";let h;return e[3]!==n||e[4]!==f||e[5]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-6",children:[s,m,t.jsx(oe,{onClick:n,disabled:f,className:"w-full cursor-pointer",children:x})]}),e[3]=n,e[4]=f,e[5]=x,e[6]=h):h=e[6],h}function ht(i){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),i]},i)}function Wt({open:i,onOpenChange:e,existingAgent:n}){const a=Re(),{org:c}=z(),s=Ne(),l=ke(),m=Ue(),f=$({connectionId:re,orgId:c.id}),x=Qe({client:f}),[h,T]=O.useState(!1),d=Be.find(I=>I.id==="site-diagnostics"),{data:u,isLoading:p}=Ye(d.appId,{enabled:i}),r=u?.title||u?.server?.title||u?.server?.name||d.title,g=u?.server?.icons?.[0]?.src??d.icon,C=u?.server?.description??null,_=t.jsx(Me,{icon:g,name:r,size:"sm"}),N=async()=>{if(u){if(n){e(!1),s(n.id);return}T(!0);try{const I=await x.mutateAsync({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_id"],operator:"eq",value:d.appId},limit:1,offset:0}});let o;const A=I?.structuredContent?.items?.find(E=>E.app_id===d.appId);if(A)o=A.id;else{const E=u.server?.remotes?.[0]?.url;if(!E)throw new Error("Registry item is missing a remote URL for site-diagnostics");o=(await l.create.mutateAsync({title:r,description:C,icon:u.server?.icons?.[0]?.src??d.icon,connection_type:"HTTP",connection_url:E,app_name:u.server?.name??"site-diagnostics",app_id:d.appId,metadata:{type:"site-diagnostics",source:"store",registry_item_id:d.appId,verified:!0}})).id}const v=await m.create.mutateAsync({title:r,description:C,icon:g,status:"active",connections:[{connection_id:o,selected_tools:null,selected_resources:null,selected_prompts:null}],metadata:{type:"site-diagnostics",instructions:null,ui:{pinnedViews:[{connectionId:o,toolName:"diagnose",label:"diagnose",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:o,toolName:"diagnose"}}}}});V("agent_recruit_confirmed",{template_id:"site-diagnostics",agent_id:v.id}),e(!1),s(v.id)}catch(I){V("agent_recruit_failed",{template_id:"site-diagnostics",error:I instanceof Error?I.message:String(I)}),console.error("Failed to create Site Diagnostics agent:",I)}finally{T(!1)}}},b=`Add ${r}`;return a?t.jsx(Ee,{open:i,onOpenChange:e,children:t.jsxs(Se,{className:"h-[70dvh]",children:[t.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[_,t.jsx(Le,{className:"text-xl font-semibold",children:b})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx(De,{onRecruit:N,isRecruiting:h,isLoading:p})})]})}):t.jsx(le,{open:i,onOpenChange:e,children:t.jsxs(ce,{className:"sm:max-w-[500px] p-8",children:[t.jsx(de,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[_,t.jsx(ue,{className:"text-xl font-semibold",children:b})]})}),t.jsx(De,{onRecruit:N,isRecruiting:h,isLoading:p})]})})}const xt="https://sites-lean-canva.decocache.com/api/mcp",Nt=["Build and update Lean Canvas business models visually","Interactive grid UI with all 9 canvas sections","Iterative updates — add information as you discover it","Covers: Problem, Solution, Key Metrics, Unique Value Proposition","Covers: Channels, Customer Segments, Cost Structure, Revenue Streams","Unfair Advantage analysis"];function Ve(i){const e=M.c(7),{onRecruit:n,isRecruiting:a}=i;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a Lean Canvas agent that helps you build and iterate on your business model. Describe your idea and it produces a visual, structured canvas."}),e[0]=c):c=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Capabilities"}),e[1]=s):s=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"space-y-2",children:[s,t.jsx("ul",{className:"space-y-1.5",children:Nt.map(_t)})]}),e[2]=l):l=e[2];const m=a?"Setting up...":"Add Lean Canvas";let f;return e[3]!==a||e[4]!==n||e[5]!==m?(f=t.jsxs("div",{className:"flex flex-col gap-6",children:[c,l,t.jsx(oe,{onClick:n,disabled:a,className:"w-full cursor-pointer",children:m})]}),e[3]=a,e[4]=n,e[5]=m,e[6]=f):f=e[6],f}function _t(i){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),i]},i)}function Jt({open:i,onOpenChange:e,existingAgent:n}){const a=Re(),{org:c}=z(),s=Ne(),l=ke(),m=Ue(),f=$({connectionId:re,orgId:c.id}),x=Qe({client:f}),[h,T]=O.useState(!1),d=Be.find(g=>g.id==="lean-canvas"),u=t.jsx(Me,{icon:d.icon,name:d.title,size:"sm"}),p=async()=>{if(n){e(!1),s(n.id);return}T(!0);try{const g=await x.mutateAsync({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_id"],operator:"eq",value:"lean-canvas"},limit:1,offset:0}});let C;const N=g?.structuredContent?.items?.find(o=>o.app_id==="lean-canvas"),b=we.SELF(c.id);N?C=N.id:C=(await l.create.mutateAsync({title:d.title,description:"Lean Canvas business model builder",icon:d.icon,connection_type:"HTTP",connection_url:xt,app_name:"lean-canvas",app_id:"lean-canvas",configuration_state:{OBJECT_STORAGE:{__type:"@deco/object-storage",value:b}},metadata:{type:"lean-canvas",source:"store",verified:!0}})).id;const I=await m.create.mutateAsync({title:d.title,description:"Lean Canvas business model builder",icon:d.icon,status:"active",connections:[{connection_id:C,selected_tools:null,selected_resources:null,selected_prompts:null},{connection_id:b,selected_tools:null,selected_resources:null,selected_prompts:null}],metadata:{type:"lean-canvas",instructions:null,ui:{pinnedViews:[{connectionId:C,toolName:"lean_canvas",label:"lean_canvas",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:C,toolName:"lean_canvas"}}}}});V("agent_recruit_confirmed",{template_id:"lean-canvas",agent_id:I.id}),e(!1),s(I.id)}catch(g){V("agent_recruit_failed",{template_id:"lean-canvas",error:g instanceof Error?g.message:String(g)}),console.error("Failed to create Lean Canvas agent:",g)}finally{T(!1)}},r=`Add ${d.title}`;return a?t.jsx(Ee,{open:i,onOpenChange:e,children:t.jsxs(Se,{className:"h-[70dvh]",children:[t.jsx(Oe,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[u,t.jsx(Le,{className:"text-xl font-semibold",children:r})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx(Ve,{onRecruit:p,isRecruiting:h})})]})}):t.jsx(le,{open:i,onOpenChange:e,children:t.jsxs(ce,{className:"sm:max-w-[500px] p-8",children:[t.jsx(de,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[u,t.jsx(ue,{className:"text-xl font-semibold",children:r})]})}),t.jsx(Ve,{onRecruit:p,isRecruiting:h})]})})}const Ct=`<role>
|
|
2
2
|
You are the Agent Manager. You create, configure, and maintain agents (Virtual MCPs) in this workspace.
|
|
3
3
|
</role>
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ci as ne,e as _,j as o,B as te,l as ln,bc as ze,cj as ms,r as T,s as oe,c as O,g as ps,o as cn,c4 as xs,ah as hs,ai as fe,aW as an,c5 as gs,aT as bs,c3 as js,c6 as dn,b6 as Ss,cc as ys,cd as vs,ao as ws,ce as Ns,ck as $t,cl as un,z as ks,D as _s,cm as Cs,cn as Is}from"./index-D34n6J5J.js";import{D as Ts,F as Es,B as $s}from"./index-CHKi_s_a.js";import{b as Fe,i as Os,u as ae}from"./constants-DDHDU3PV.js";import{u as fn}from"./use-virtual-mcp-0vHwLInn.js";import{M as Re}from"./monaco-editor-lveN-AoO.js";import{S as Rs,A as Ms,c as Ls,a as Ps,b as As,e as zs,R as qt,d as Ws}from"./accordion-BV3tm7bj.js";import{B as le}from"./badge-s_TAXGUN.js";import{S as vt,a as wt,b as nt,d as Nt,c as kt}from"./select-CePxsPeP.js";import{N as Ds,j as Fs,k as Hs,m as Be,P as Vs,i as qs,R as Us,c as Ks,l as Bs,f as Ut,d as Xs,S as st,n as Js,e as Gs}from"./scroll-area-BebfgLv6.js";import{V as Qs}from"./view-mode-toggle-D5CGwPOj.js";import{a7 as Ys,a8 as Zs,h as eo,a9 as mn,aa as to,d as no,I as so,ab as pn,Z as oo,V as xn,ac as ro,ad as io,T as bt,ae as lo}from"./agent-icon-CyE6nkC1.js";import{i as hn}from"./Play-DKFUTU3G.js";import{b as co,a as ao,V as Qe}from"./layout-B5SDe6IW.js";import{T as gn,c as bn,a as jn,b as Sn}from"./use-mobile-CxvYCzu9.js";import{u as uo,b as fo}from"./use-connection-Cif-LY0f.js";import{u as Ot,d as Rt,b as yn}from"./use-mcp-tools-BYVtg7WH.js";import{a as mo,D as po,e as xo,b as ho,c as go,d as bo}from"./dialog-C4lREl-t.js";import"./index-D-RCnwJQ.js";import{c as vn,d as wn,e as Nn,D as Ye}from"./dropdown-menu-v2GifVOh.js";import{s as jo}from"./Plus-oXFwCrYz.js";import{b as kn}from"./Tool01-CKowkGsd.js";import{i as He}from"./ChevronDown-DGnjAtqs.js";import{s as Mt}from"./XClose-BbIo6xHe.js";import{I as Lt}from"./integration-icon-Cdkk9YPE.js";import"./index-C5AR7k1c.js";import{i as _n}from"./X-i9zBn6Hn.js";import{u as Cn,a as So}from"./use-collections-DRlHpXQL.js";import{E as In}from"./empty-state-DdKZ_is7.js";import{c as yo}from"./create-sse-subscription-CxkOgzKf.js";import{I as Kt}from"./input-urtyHxks.js";const Tn=ne("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const En=ne("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const ot=ne("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const rt=ne("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const vo=ne("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const $n=ne("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const wo=ne("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const On=ne("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Rn=ne("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const Mn=ne("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const No=ne("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const Ln=ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Pn=ne("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const ko=ne("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const An=ne("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);function _o(t){const e=_.c(15),{onSave:n,onUndo:s,isDirty:i,isSaving:r,saveLabel:l,undoLabel:c}=t,a=l===void 0?"Save":l,d=c===void 0?"Undo":c;if(!i)return null;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(Ys,{size:14}),e[0]=u):u=e[0];let f;e[1]!==r||e[2]!==s||e[3]!==d?(f=o.jsxs(te,{variant:"outline",size:"sm",onClick:s,disabled:r,"aria-label":d,children:[u,d]}),e[1]=r,e[2]=s,e[3]=d,e[4]=f):f=e[4];let m;e[5]!==r?(m=r?o.jsx(ln,{size:14,className:"animate-spin"}):o.jsx(Zs,{size:14}),e[5]=r,e[6]=m):m=e[6];let x;e[7]!==r||e[8]!==n||e[9]!==a||e[10]!==m?(x=o.jsxs(te,{variant:"default",size:"sm",onClick:n,disabled:r,"aria-label":a,children:[m,a]}),e[7]=r,e[8]=n,e[9]=a,e[10]=m,e[11]=x):x=e[11];let p;return e[12]!==f||e[13]!==x?(p=o.jsxs(o.Fragment,{children:[f,x]}),e[12]=f,e[13]=x,e[14]=p):p=e[14],p}const Bt=t=>{let e;const n=new Set,s=(d,u)=>{const f=typeof d=="function"?d(e):d;if(!Object.is(f,e)){const m=e;e=u??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(x=>x(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:d=>(n.add(d),()=>n.delete(d))},a=e=t(s,i,c);return c},Pt=(t=>t?Bt(t):Bt),Co=t=>t;function _t(t,e=Co){const n=ze.useSyncExternalStore(t.subscribe,ze.useCallback(()=>e(t.getState()),[t,e]),ze.useCallback(()=>e(t.getInitialState()),[t,e]));return ze.useDebugValue(n),n}const Io=t=>{const e=Pt(t),n=s=>_t(e,s);return Object.assign(n,e),n},To=(t=>Io);function zn(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const Ct=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Ct(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Ct(s)(n)}}}},Eo=(t,e)=>(n,s,i)=>{let r={storage:zn(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,d=new Set;let u=r.storage;if(!u)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return u.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const x=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>x;let p;const h=()=>{var g,b;if(!u)return;const S=++c;l=!1,a.forEach(y=>{var j;return y((j=s())!=null?j:x)});const v=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return Ct(u.getItem.bind(u))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const j=r.migrate(y.state,y.version);return j instanceof Promise?j.then(w=>[!0,w]):[!0,j]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var j;if(S!==c)return;const[w,N]=y;if(p=r.merge(N,(j=s())!=null?j:x),n(p,!0),w)return f()}).then(()=>{S===c&&(v?.(s(),void 0),p=s(),l=!0,d.forEach(y=>y(p)))}).catch(y=>{S===c&&v?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(u=g.storage)},clearStorage:()=>{u?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(d.add(g),()=>{d.delete(g)})},r.skipHydration||h(),p||x},Wn=Eo,{useSyncExternalStoreWithSelector:$o}=ms,Oo=t=>t;function Ro(t,e=Oo,n){const s=$o(t.subscribe,t.getState,t.getInitialState,e,n);return ze.useDebugValue(s),s}const Xt=t=>Symbol.iterator in t,Jt=t=>"entries"in t,Gt=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},Mo=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function Lo(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Xt(t)&&Xt(e)?Jt(t)&&Jt(e)?Gt(t,e):Mo(t,e):Gt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Dn(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
|
|
1
|
+
import{ci as ne,e as _,j as o,B as te,l as ln,bc as ze,cj as ms,r as T,s as oe,c as O,g as ps,o as cn,c4 as xs,ah as hs,ai as fe,aW as an,c5 as gs,aT as bs,c3 as js,c6 as dn,b6 as Ss,cc as ys,cd as vs,ao as ws,ce as Ns,ck as $t,cl as un,z as ks,D as _s,cm as Cs,cn as Is}from"./index-DhJrYN5i.js";import{D as Ts,F as Es,B as $s}from"./index-DtMbbDUN.js";import{b as Fe,i as Os,u as ae}from"./constants-aD7HJ6sY.js";import{u as fn}from"./use-virtual-mcp-WT1ZdgMM.js";import{M as Re}from"./monaco-editor-EL8K9shU.js";import{S as Rs,A as Ms,c as Ls,a as Ps,b as As,e as zs,R as qt,d as Ws}from"./accordion-DK_chPAh.js";import{B as le}from"./badge-BJBM0LXp.js";import{S as vt,a as wt,b as nt,d as Nt,c as kt}from"./select-Cn3ZnqjJ.js";import{N as Ds,j as Fs,k as Hs,m as Be,P as Vs,i as qs,R as Us,c as Ks,l as Bs,f as Ut,d as Xs,S as st,n as Js,e as Gs}from"./scroll-area-CXUp8wR9.js";import{V as Qs}from"./view-mode-toggle-BvyYLass.js";import{a7 as Ys,a8 as Zs,h as eo,a9 as mn,aa as to,d as no,I as so,ab as pn,Z as oo,V as xn,ac as ro,ad as io,T as bt,ae as lo}from"./agent-icon-DKQKq---.js";import{i as hn}from"./Play-D7pqvkYq.js";import{b as co,a as ao,V as Qe}from"./layout-Dp5y9gtR.js";import{T as gn,c as bn,a as jn,b as Sn}from"./use-mobile-C4Yo3nsX.js";import{u as uo,b as fo}from"./use-connection-MU3rXx28.js";import{u as Ot,d as Rt,b as yn}from"./use-mcp-tools-B5zpuics.js";import{a as mo,D as po,e as xo,b as ho,c as go,d as bo}from"./dialog-nGTWjCEa.js";import"./index-BZopUfMN.js";import{c as vn,d as wn,e as Nn,D as Ye}from"./dropdown-menu-Cc_jn9Z7.js";import{s as jo}from"./Plus-BzxOIhxj.js";import{b as kn}from"./Tool01-BscqkhhO.js";import{i as He}from"./ChevronDown-Jd-cYHC-.js";import{s as Mt}from"./XClose-ANREDbeo.js";import{I as Lt}from"./integration-icon-DKrcAAs9.js";import"./index-CwstDhH7.js";import{i as _n}from"./X-BuUY-erD.js";import{u as Cn,a as So}from"./use-collections-DvPoAlor.js";import{E as In}from"./empty-state-CqQa90x5.js";import{c as yo}from"./create-sse-subscription-CxkOgzKf.js";import{I as Kt}from"./input-COFLoOjb.js";const Tn=ne("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const En=ne("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const ot=ne("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const rt=ne("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const vo=ne("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const $n=ne("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const wo=ne("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const On=ne("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Rn=ne("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const Mn=ne("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const No=ne("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const Ln=ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Pn=ne("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const ko=ne("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const An=ne("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);function _o(t){const e=_.c(15),{onSave:n,onUndo:s,isDirty:i,isSaving:r,saveLabel:l,undoLabel:c}=t,a=l===void 0?"Save":l,d=c===void 0?"Undo":c;if(!i)return null;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(Ys,{size:14}),e[0]=u):u=e[0];let f;e[1]!==r||e[2]!==s||e[3]!==d?(f=o.jsxs(te,{variant:"outline",size:"sm",onClick:s,disabled:r,"aria-label":d,children:[u,d]}),e[1]=r,e[2]=s,e[3]=d,e[4]=f):f=e[4];let m;e[5]!==r?(m=r?o.jsx(ln,{size:14,className:"animate-spin"}):o.jsx(Zs,{size:14}),e[5]=r,e[6]=m):m=e[6];let x;e[7]!==r||e[8]!==n||e[9]!==a||e[10]!==m?(x=o.jsxs(te,{variant:"default",size:"sm",onClick:n,disabled:r,"aria-label":a,children:[m,a]}),e[7]=r,e[8]=n,e[9]=a,e[10]=m,e[11]=x):x=e[11];let p;return e[12]!==f||e[13]!==x?(p=o.jsxs(o.Fragment,{children:[f,x]}),e[12]=f,e[13]=x,e[14]=p):p=e[14],p}const Bt=t=>{let e;const n=new Set,s=(d,u)=>{const f=typeof d=="function"?d(e):d;if(!Object.is(f,e)){const m=e;e=u??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(x=>x(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:d=>(n.add(d),()=>n.delete(d))},a=e=t(s,i,c);return c},Pt=(t=>t?Bt(t):Bt),Co=t=>t;function _t(t,e=Co){const n=ze.useSyncExternalStore(t.subscribe,ze.useCallback(()=>e(t.getState()),[t,e]),ze.useCallback(()=>e(t.getInitialState()),[t,e]));return ze.useDebugValue(n),n}const Io=t=>{const e=Pt(t),n=s=>_t(e,s);return Object.assign(n,e),n},To=(t=>Io);function zn(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const Ct=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Ct(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Ct(s)(n)}}}},Eo=(t,e)=>(n,s,i)=>{let r={storage:zn(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,d=new Set;let u=r.storage;if(!u)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return u.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const x=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>x;let p;const h=()=>{var g,b;if(!u)return;const S=++c;l=!1,a.forEach(y=>{var j;return y((j=s())!=null?j:x)});const v=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return Ct(u.getItem.bind(u))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const j=r.migrate(y.state,y.version);return j instanceof Promise?j.then(w=>[!0,w]):[!0,j]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var j;if(S!==c)return;const[w,N]=y;if(p=r.merge(N,(j=s())!=null?j:x),n(p,!0),w)return f()}).then(()=>{S===c&&(v?.(s(),void 0),p=s(),l=!0,d.forEach(y=>y(p)))}).catch(y=>{S===c&&v?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(u=g.storage)},clearStorage:()=>{u?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(d.add(g),()=>{d.delete(g)})},r.skipHydration||h(),p||x},Wn=Eo,{useSyncExternalStoreWithSelector:$o}=ms,Oo=t=>t;function Ro(t,e=Oo,n){const s=$o(t.subscribe,t.getState,t.getInitialState,e,n);return ze.useDebugValue(s),s}const Xt=t=>Symbol.iterator in t,Jt=t=>"entries"in t,Gt=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},Mo=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function Lo(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Xt(t)&&Xt(e)?Jt(t)&&Jt(e)?Gt(t,e):Mo(t,e):Gt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Dn(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
|
|
2
2
|
${Object.entries(l).map(([d,u])=>{const f=c.has(d)?"":"?";return`${u.description?` /** ${u.description} */
|
|
3
3
|
`:""} ${d}${f}: ${n(u)};`}).join(`
|
|
4
4
|
`)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bb as _}from"./index-
|
|
1
|
+
import{bb as _}from"./index-DhJrYN5i.js";var b={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),S;S=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===S||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,b.exports=I()),b.exports}var g=C();const h=_(g);export{h as R,g as r};
|