decocms 4.601.0 → 4.603.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DsrPAFxJ.js → AlertCircle-B1i_KHb5.js} +1 -1
- package/dist/client/assets/{AreaChart-Dapr1lDG.js → AreaChart-BatAqoOF.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CedOhlJl.js → ArrowLeft-BCGEiplU.js} +1 -1
- package/dist/client/assets/{ArrowRight-D31ooF9_.js → ArrowRight-CTKbq3xg.js} +1 -1
- package/dist/client/assets/{ArrowUp-O_SFXcX4.js → ArrowUp-D0iB56_y.js} +1 -1
- package/dist/client/assets/{BookOpen01-hQOgpoT0.js → BookOpen01-BRGBbO1d.js} +1 -1
- package/dist/client/assets/{CartesianChart-U1wUiTwj.js → CartesianChart-Da5DoyQ3.js} +1 -1
- package/dist/client/assets/{CategoricalChart-CUg_BAiA.js → CategoricalChart-C0a7-8vN.js} +1 -1
- package/dist/client/assets/{CheckCircle-C5F-vu0b.js → CheckCircle-DhVhQqv1.js} +1 -1
- package/dist/client/assets/{ChevronDown-XAF5UTWS.js → ChevronDown-nlBmBA6R.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BgyFVvCt.js → ChevronSelectorVertical-CnSsPRgV.js} +1 -1
- package/dist/client/assets/{ChevronUp-DXb5SN9G.js → ChevronUp-8WNgfyfx.js} +1 -1
- package/dist/client/assets/{CreditCard01-V_X-1km6.js → CreditCard01-DXlMDhFZ.js} +1 -1
- package/dist/client/assets/{Eye-DKA9KO8s.js → Eye-uwbxmI34.js} +1 -1
- package/dist/client/assets/{File02-CWJddKT5.js → File02-CFPVdIh1.js} +1 -1
- package/dist/client/assets/{Fingerprint04-DnZul7lc.js → Fingerprint04-BCose3-q.js} +1 -1
- package/dist/client/assets/{Globe04-Bkkv-44s.js → Globe04-CVG10uFQ.js} +1 -1
- package/dist/client/assets/{Image01-w45LU6DD.js → Image01-BIaadP6j.js} +1 -1
- package/dist/client/assets/{Key01-hOPkG93k.js → Key01-CBM6N1XG.js} +1 -1
- package/dist/client/assets/{LayoutLeft-C3gp1GTI.js → LayoutLeft-BdexGOTP.js} +1 -1
- package/dist/client/assets/{LinkBroken01-DXQIXK4a.js → LinkBroken01-wmCuBJVN.js} +1 -1
- package/dist/client/assets/{MessageCircle01-CBwz3pkx.js → MessageCircle01-BgFAVnEo.js} +1 -1
- package/dist/client/assets/{Minus-C6nnb5U7.js → Minus-CWR3qyH5.js} +1 -1
- package/dist/client/assets/{Monitor01-D5ASDXL3.js → Monitor01-BQDnuBH5.js} +1 -1
- package/dist/client/assets/{Play-BE2Gbr5-.js → Play-1a_lTdjO.js} +1 -1
- package/dist/client/assets/{Plus-BKnmVwDY.js → Plus-BjA7v0aW.js} +1 -1
- package/dist/client/assets/{ReferenceLine-cN7qvaot.js → ReferenceLine-D_7wN1zT.js} +1 -1
- package/dist/client/assets/{SearchMd-BdbsDxg8.js → SearchMd-DLHPy6Uo.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-D0FD1HPP.js → ShoppingBag01-DH3DKaiC.js} +1 -1
- package/dist/client/assets/{Sun-DAly365K.js → Sun-CF9jssUY.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BoKcCD1g.js → SwitchHorizontal01-CCkkKeRG.js} +1 -1
- package/dist/client/assets/{Tool01-B-fgmM-0.js → Tool01-sUxKxzA1.js} +1 -1
- package/dist/client/assets/{Tooltip-DkaZU76c.js → Tooltip-BPKjbLoB.js} +1 -1
- package/dist/client/assets/{Trash01-Dzo6NInS.js → Trash01-BJHdmQwJ.js} +1 -1
- package/dist/client/assets/{Upload01-DQgVu-9N.js → Upload01-_qHCYjHc.js} +1 -1
- package/dist/client/assets/{UserCheck01-BMORoWuy.js → UserCheck01-CpCxuE-I.js} +1 -1
- package/dist/client/assets/{UserSquare-BUy12Lbf.js → UserSquare-DB6NyDzI.js} +1 -1
- package/dist/client/assets/{Users01-t7brRFdK.js → Users01-DwRKp1C7.js} +1 -1
- package/dist/client/assets/{XClose-Bze4d5nj.js → XClose-oM6nZllg.js} +1 -1
- package/dist/client/assets/{Zap-BiLLX5O9.js → Zap-ahofKysd.js} +1 -1
- package/dist/client/assets/{access-gate-Cdu8oC60.js → access-gate-KCOTCCf5.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BXLWFF1K.js → add-connection-dialog-DxavYAc5.js} +1 -1
- package/dist/client/assets/agent-app-DSKOCCje.js +1 -0
- package/dist/client/assets/{agent-assets-B14KImOx.js → agent-assets-bki_BdbO.js} +1 -1
- package/dist/client/assets/{agent-automation-BeOuFVQx.js → agent-automation-BjBB8AsX.js} +3 -3
- package/dist/client/assets/{agent-automations-6VI96Fi7.js → agent-automations-Cm9PwMtc.js} +1 -1
- package/dist/client/assets/agent-blog-BIccwwgd.js +2 -0
- package/dist/client/assets/agent-blog-post-Cner4u82.js +2 -0
- package/dist/client/assets/agent-business-case-DInds5Fa.js +1 -0
- package/dist/client/assets/{agent-calendar-DN3eHKvu.js → agent-calendar-YS_hatl_.js} +1 -1
- package/dist/client/assets/{agent-capabilities-BYxoy39x.js → agent-capabilities-DQK_jZxT.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-B_QZIQuo.js → agent-connect-sources-DXQ8E_bH.js} +1 -1
- package/dist/client/assets/agent-deck-DrelwgqT.js +1 -0
- package/dist/client/assets/{agent-e2e-VAu4Qx7U.js → agent-e2e-B_DXqaOr.js} +1 -1
- package/dist/client/assets/agent-experiments-HDRXaF9_.js +1 -0
- package/dist/client/assets/agent-file-PsEy2j16.js +1 -0
- package/dist/client/assets/{agent-hosting-ClHLlWGR.js → agent-hosting-BDgeryfy.js} +1 -1
- package/dist/client/assets/{agent-icon-BD0ZSOtG.js → agent-icon-CCxR2PUF.js} +1 -1
- package/dist/client/assets/agent-library-DRMbpZNJ.js +1 -0
- package/dist/client/assets/agent-library-file-Ci4RvnZ3.js +1 -0
- package/dist/client/assets/agent-overview-BGymLZDi.js +1 -0
- package/dist/client/assets/{agent-releases-hQDgEh8C.js → agent-releases-CgzQoR8b.js} +2 -2
- package/dist/client/assets/agent-settings-BIDE4zZk.js +1 -0
- package/dist/client/assets/{agent-site-editor-HTEY5crd.js → agent-site-editor-DEHW4gut.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-BguSH4kf.js +2 -0
- package/dist/client/assets/agent-site-editor-content-ULgQXDfp.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-Bg7-GK6e.js +1 -0
- package/dist/client/assets/agent-view-bhpsBbN2.js +1 -0
- package/dist/client/assets/{agent-view-guard-BdBdhwzP.js → agent-view-guard-OIhvT-yY.js} +1 -1
- package/dist/client/assets/ai-providers-MAlxtZWl.js +1 -0
- package/dist/client/assets/{alert-CuyuxCBB.js → alert-De4kstIi.js} +1 -1
- package/dist/client/assets/{analytics-sections-C5mQGdAt.js → analytics-sections-CUSeaKMg.js} +1 -1
- package/dist/client/assets/{api-keys-Dk8HB9Wv.js → api-keys-C30Nc0_c.js} +1 -1
- package/dist/client/assets/api-keys-D5aUEOaZ.js +1 -0
- package/dist/client/assets/app-editor-De7hF7Xe.js +1 -0
- package/dist/client/assets/{asset-utils-CtdzkGeJ.js → asset-utils-CCfbAgp6.js} +1 -1
- package/dist/client/assets/{auth-CAOOT2we.js → auth-CdyebVHG.js} +1 -1
- package/dist/client/assets/{auth-catchall-CV4sAhsc.js → auth-catchall-BSDpVceg.js} +1 -1
- package/dist/client/assets/{auth-entry-DH5zjA3N.js → auth-entry-Bs4JvKas.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DagqHqlo.js → auth-split-layout-DIFNHgz-.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-8D6qGyYY.js → authenticate-and-persist-oauth-CqTPiorC.js} +1 -1
- package/dist/client/assets/{automation-list-row-Cdv28_DW.js → automation-list-row-Bf8n7Ce9.js} +1 -1
- package/dist/client/assets/{automation-runs-DV0vxgsZ.js → automation-runs-B335XfRz.js} +1 -1
- package/dist/client/assets/{automations-BKHxUskh.js → automations-_jKv_9NQ.js} +1 -1
- package/dist/client/assets/{badge-BokVussq.js → badge-B0BpLsJr.js} +1 -1
- package/dist/client/assets/{block-document-wEV3Rzyg.js → block-document-B6Da88vX.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-D5wvrN3Q.js → blocks-preview-workspace-context-CnaBqVkb.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-Dg2hewP6.js → blocks-tab-states-DVnYU043.js} +1 -1
- package/dist/client/assets/{blog-preview-url-DojRzjkz.js → blog-preview-url-DL_rJm3r.js} +1 -1
- package/dist/client/assets/{blog-schema-Dsa0bBQd.js → blog-schema-CrH-PuPl.js} +1 -1
- package/dist/client/assets/{blog-source-gate-D0uj7z1Z.js → blog-source-gate-D95rUZ9j.js} +1 -1
- package/dist/client/assets/{blog-view-gate-B3wlo8FI.js → blog-view-gate-BG5wPvov.js} +1 -1
- package/dist/client/assets/{buckets-BDCq2-7b.js → buckets-Bo5nzqO0.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-L7dFyzUW.js → build-improve-prompt-doc-DwEARBAF.js} +1 -1
- package/dist/client/assets/{calendar-BiZh8nNR.js → calendar-aJ3MwRAc.js} +1 -1
- package/dist/client/assets/{capability-load-error-Dma-JUvI.js → capability-load-error-B-8XRgnZ.js} +1 -1
- package/dist/client/assets/category-editor-CqQ44lOA.js +1 -0
- package/dist/client/assets/{category-tree-DAVAIQah.js → category-tree-CPJhn4HZ.js} +1 -1
- package/dist/client/assets/{chart-oTSIWppX.js → chart-Bi7xT2_A.js} +2 -2
- package/dist/client/assets/chat-context-BIbY01K8.js +44 -0
- package/dist/client/assets/{chat-draft-CyZX0c2K.js → chat-draft-CiDkLbs7.js} +1 -1
- package/dist/client/assets/{checkbox-lB4BY1Fl.js → checkbox-C5arK3Yi.js} +1 -1
- package/dist/client/assets/{choose-editor-XmdROGh-.js → choose-editor-m1LEJ76m.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CdBY3aKl.js → cli-auth-success-DrTHS67O.js} +1 -1
- package/dist/client/assets/cms-settings-editor-D2W2Hqjk.js +1 -0
- package/dist/client/assets/{cms-store-drafts-6uS5wCqC.js → cms-store-drafts-SXWusaIT.js} +1 -1
- package/dist/client/assets/{collapsible-DOENRXml.js → collapsible-uGD63SVW.js} +1 -1
- package/dist/client/assets/collection-detail-1M3m9BeX.js +1 -0
- package/dist/client/assets/{collection-display-button-BPkwEbCH.js → collection-display-button-CxJUfsBC.js} +1 -1
- package/dist/client/assets/{collection-search-CIcbLnU-.js → collection-search-5yetxvaM.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BPjSO-Mu.js → collection-table-wrapper-D55eHieQ.js} +1 -1
- package/dist/client/assets/{collection-tabs-DRGUwBWl.js → collection-tabs-DWExNyAp.js} +1 -1
- package/dist/client/assets/{combobox-klxrcVPh.js → combobox-BQpDbntt.js} +1 -1
- package/dist/client/assets/{command-B6aoeD_0.js → command-CGZn32g4.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-C1_BKNh7.js → companion-mcps-section-DauSR__w.js} +1 -1
- package/dist/client/assets/{config-C5d81tv3.js → config-D953tTPf.js} +1 -1
- package/dist/client/assets/{connect-UzjTwqG8.js → connect-BL5f_sMR.js} +3 -3
- package/dist/client/assets/{connect-key-DHs0GcpL.js → connect-key-LpmiQ5t8.js} +1 -1
- package/dist/client/assets/{connect-layout-DQICz-4S.js → connect-layout-BBcCp91i.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-CtUb95qE.js → connect-source-dialog-JNdJSpW0.js} +1 -1
- package/dist/client/assets/{connection-B5tcoD6Y.js → connection-BU3CbBAB.js} +1 -1
- package/dist/client/assets/{connection-card-BjRa9KdK.js → connection-card-Cchv_P1a.js} +1 -1
- package/dist/client/assets/{connection-detail-BoCe1E05.js → connection-detail-Fmp6uqV3.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-K5ERTNyH.js → connection-form-helpers-B6YdkPP6.js} +1 -1
- package/dist/client/assets/{connection-slug-Db3zbztV.js → connection-slug-Dby8IQVH.js} +1 -1
- package/dist/client/assets/{connections-j54TKze_.js → connections-IzFG7l5m.js} +1 -1
- package/dist/client/assets/{content-changes-r32OQ0Qx.js → content-changes-wc9FH6jt.js} +1 -1
- package/dist/client/assets/{content-tab-Dx0W8ww1.js → content-tab-D2jQvTTQ.js} +3 -3
- package/dist/client/assets/{context-B_P3yNhX.js → context-CVCs23mW.js} +1 -1
- package/dist/client/assets/{context-menu-O40xDnBW.js → context-menu-C473OUCT.js} +1 -1
- package/dist/client/assets/{context-shell-CKLcTSN8.js → context-shell-DEGgebgQ.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-CaERm748.js → create-organization-dialog-CmhbSoK2.js} +1 -1
- package/dist/client/assets/{daily-pulse-D7zCFcba.js → daily-pulse-0NkQHK_z.js} +1 -1
- package/dist/client/assets/{delete-copy-DclWOxJf.js → delete-copy-D7fJPRdo.js} +1 -1
- package/dist/client/assets/{device-hint-_2FV49Jq.js → device-hint-CddROpzx.js} +1 -1
- package/dist/client/assets/{discover-CZzwsVT9.js → discover-DXj_hJ6j.js} +1 -1
- package/dist/client/assets/{domain-settings-ke-gnI4j.js → domain-settings-CPXAlxYa.js} +1 -1
- package/dist/client/assets/{drawer-DDbBWwDY.js → drawer-CPRS7vw4.js} +1 -1
- package/dist/client/assets/{editor-mY53R5_b.js → editor-D4mLuwGY.js} +1 -1
- package/dist/client/assets/{editor-classes-DMMsOfQ5.js → editor-classes-EyIn6Xdz.js} +1 -1
- package/dist/client/assets/{empty-state-p1vSClM-.js → empty-state-DfXiNtjV.js} +1 -1
- package/dist/client/assets/{empty-state-CggWUtV0.js → empty-state-VIxg_A9_.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-CryrzQ8P.js → experiments-tab-choice-DDiQfeRQ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Bt_vhJBm.js → extract-connection-data-CY4kvgmG.js} +1 -1
- package/dist/client/assets/{feature-gate-Cz5hKu7-.js → feature-gate-BqWMf-_U.js} +1 -1
- package/dist/client/assets/{feature-paywall-Oz5CQKMH.js → feature-paywall-4c2c7IX1.js} +1 -1
- package/dist/client/assets/file-explorer-1_QBD_NG.js +2 -0
- package/dist/client/assets/{file-preview-DtdQDSA8.js → file-preview-Cs564GPy.js} +1 -1
- package/dist/client/assets/{file-share-button-b3hJY3DP.js → file-share-button-BREhD61g.js} +1 -1
- package/dist/client/assets/{file-type-icon-CRJv2Oya.js → file-type-icon-Dr1Fctbf.js} +1 -1
- package/dist/client/assets/{folder-icon-6zXs6_0W.js → folder-icon-Csn4Yrp8.js} +1 -1
- package/dist/client/assets/{form-BH-D2Xbc.js → form-CdIohY1c.js} +1 -1
- package/dist/client/assets/{frame-navigation-DJy09yVU.js → frame-navigation-DTZvas3c.js} +1 -1
- package/dist/client/assets/{gateway-client-BLgU4Dju.js → gateway-client-uysD9si3.js} +1 -1
- package/dist/client/assets/{general-BiAxKW5-.js → general-BptiPTam.js} +1 -1
- package/dist/client/assets/{github-icon-CF41Lxe4.js → github-icon-BFtlg-Wu.js} +1 -1
- package/dist/client/assets/{held-block-view-Dfl9wQs4.js → held-block-view-Bv5JhAeN.js} +1 -1
- package/dist/client/assets/{home-C27mjZB6.js → home-DzRsJbBG.js} +1 -1
- package/dist/client/assets/{home-overview-Csl5CaCE.js → home-overview-BoyNS0NF.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-CyRopTfU.js → hosted-reconcile-Bt0PeuzR.js} +1 -1
- package/dist/client/assets/{icon-button-aDOfVADH.js → icon-button-CCNwQPnV.js} +1 -1
- package/dist/client/assets/{index-CK1nf_IS.js → index-B0mJrf1q.js} +1 -1
- package/dist/client/assets/{index-D-pDCAfc.js → index-BRun9Rm8.js} +1 -1
- package/dist/client/assets/{index-Dkqdsk1p.js → index-Bkszoj0s.js} +1 -1
- package/dist/client/assets/{index-BbtKtnc4.js → index-BozwbZx0.js} +1 -1
- package/dist/client/assets/{index-BYqLsTt6.js → index-BtxZs6tJ.js} +1 -1
- package/dist/client/assets/{index-R3Ci7Tyg.js → index-BzRhR-ob.js} +1 -1
- package/dist/client/assets/{index-gWKkX5Rl.js → index-CFlFN6F_.js} +1 -1
- package/dist/client/assets/{index-9QVz6jZ3.js → index-CVCo7BMR.js} +1 -1
- package/dist/client/assets/{index-CG6_ih5n.js → index-D5JoEpF6.js} +1 -1
- package/dist/client/assets/{index-BnCCUie5.js → index-D9ty5Ie3.js} +41 -41
- package/dist/client/assets/{index-CVh3nTdm.js → index-DJkxmUQB.js} +1 -1
- package/dist/client/assets/{index-lCnbr_EL.js → index-DcsJJ-05.js} +1 -1
- package/dist/client/assets/index-DqzmkMvh.css +1 -0
- package/dist/client/assets/{index-DJ1RObgi.js → index-DzkOamns.js} +2 -2
- package/dist/client/assets/{index-DcVM6F6g.js → index-HakIuCjg.js} +1 -1
- package/dist/client/assets/{index-BSBShudg.js → index-Tv3hc6zd.js} +1 -1
- package/dist/client/assets/{index-DaEXpIdD.js → index-mYSq1oWI.js} +1 -1
- package/dist/client/assets/{index-redirect-AYWav9v_.js → index-redirect-C9EBDDcV.js} +1 -1
- package/dist/client/assets/{index-BLFbZEvm.js → index-uTqcpy5-.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BESu79F_.js → infiniteQueryObserver-jl0ag-ci.js} +1 -1
- package/dist/client/assets/{infra-billing-OdiaxSrm.js → infra-billing-D4LI6DuO.js} +1 -1
- package/dist/client/assets/{input-CSgytoq8.js → input-C0LL8dKB.js} +3 -3
- package/dist/client/assets/{input-CnbV56LU.js → input-Cabkyu6z.js} +1 -1
- package/dist/client/assets/{integration-icon-HGkwXGCE.js → integration-icon-DwE31eP3.js} +1 -1
- package/dist/client/assets/{item-actions-lpogT0_c.js → item-actions-CSc52fWk.js} +1 -1
- package/dist/client/assets/{jira-icon-DP_Xet8r.js → jira-icon-BvdOnDqx.js} +1 -1
- package/dist/client/assets/{label-lULQ_A7o.js → label-BuyeEoKy.js} +1 -1
- package/dist/client/assets/{layout-DzpCXiHJ.js → layout-Ba4dt8sO.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-BbrICcUL.js → legacy-admin-welcome-dialog-D8acRK4o.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CLHrkPSZ.js → legacy-agents-deep-b_6N3FLP.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BXLMALYE.js → legacy-main-redirect-BGpepCkG.js} +1 -1
- package/dist/client/assets/library-BzKGFmec.js +1 -0
- package/dist/client/assets/{library-tab-BAvPApZ2.js → library-tab-Di9PinwS.js} +3 -3
- package/dist/client/assets/{login-C6qn4lFX.js → login-CVt0XOKO.js} +1 -1
- package/dist/client/assets/{markdown-CGY8-6pe.js → markdown-DS2iRx8j.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CUByroKt.js → mcp-app-renderer-Bvu3N1R4.js} +2 -2
- package/dist/client/assets/{mcp-oauth-plOgy5je.js → mcp-oauth-BN54afSi.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CNwlsiuW.js → mcp-oauth-Vq46kgZK.js} +1 -1
- package/dist/client/assets/{members-CTzlB1Po.js → members-DAn8pfag.js} +1 -1
- package/dist/client/assets/{memory-Co29q3kr.js → memory-DeZ-uHq4.js} +2 -2
- package/dist/client/assets/{mock-board-BK103f-5.js → mock-board-Aslmwo3O.js} +3 -3
- package/dist/client/assets/{monaco-editor-Dque6-sU.js → monaco-editor-CBnaevuh.js} +1 -1
- package/dist/client/assets/{monitoring-Dr84BM9D.js → monitoring-C9ix8aKx.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-C3iriTtI.js → monitoring-stats-row-DxAzeLPb.js} +1 -1
- package/dist/client/assets/{multi-select-D7W8lcOJ.js → multi-select-BmlA-Vkc.js} +1 -1
- package/dist/client/assets/{mustache-CrAZ8U_1.js → mustache-_Z8_qqHJ.js} +1 -1
- package/dist/client/assets/{named-rule-step-Dgb864IM.js → named-rule-step-BKavlQpM.js} +1 -1
- package/dist/client/assets/{named-rule-view-sIPvEpDh.js → named-rule-view-mIjQh4kC.js} +1 -1
- package/dist/client/assets/{new-project-dialog-ByQdLyIC.js → new-project-dialog-B7_EHGk8.js} +1 -1
- package/dist/client/assets/{new-project-store-D_NVgRYa.js → new-project-store-B8n3b_tZ.js} +1 -1
- package/dist/client/assets/{oauth-callback-n_ofTSik.js → oauth-callback-BkAHMpfw.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-844F5Pm-.js → oauth-callback-ai-provider-xDulFiUG.js} +1 -1
- package/dist/client/assets/{oauth-consent-BBnMG2-4.js → oauth-consent-6ruRlSKT.js} +1 -1
- package/dist/client/assets/{onboarding-B0hRyyh8.js → onboarding-B3SEF9Uz.js} +1 -1
- package/dist/client/assets/{openai-conversation-CNN-nXlE.js → openai-conversation-DwsKeDmu.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-rtGCdpad.js → optimistic-project-sidebar-views-BlwdlPER.js} +1 -1
- package/dist/client/assets/{order-monitor-day-BiYOHUYn.js → order-monitor-day-DF8bo2MK.js} +1 -1
- package/dist/client/assets/{organization-choice-L_HRcCiy.js → organization-choice-vGHdcSHL.js} +1 -1
- package/dist/client/assets/{orgs-0krnPH_v.js → orgs-HP_pPrQW.js} +1 -1
- package/dist/client/assets/{own-accounts-section-BVAzgeDY.js → own-accounts-section-w0ng40tn.js} +1 -1
- package/dist/client/assets/{pair-DsI-lHdT.js → pair-C7XMWJ-9.js} +1 -1
- package/dist/client/assets/{parse-sections-hseH5db1.js → parse-sections-CvIBHt2L.js} +2 -2
- package/dist/client/assets/plan-W-EFjzuP.js +1 -0
- package/dist/client/assets/{plan-ladder-C-WCSJHB.js → plan-ladder-BwPwd0L2.js} +1 -1
- package/dist/client/assets/plan-page-BHiPZfGS.js +2 -0
- package/dist/client/assets/{plan-usage-card-e3Inrh2V.js → plan-usage-card-DBESPEVj.js} +2 -2
- package/dist/client/assets/{popover-BRb_ARAW.js → popover-CkZGLhNA.js} +1 -1
- package/dist/client/assets/post-calendar-CsQoNT7s.js +1 -0
- package/dist/client/assets/{post-editor-BFReRfgq.js → post-editor-ChkfOap8.js} +2 -2
- package/dist/client/assets/{preview-content-J6DD6Phq.js → preview-content-A5KuW_i0.js} +1 -1
- package/dist/client/assets/{preview-dialog-DW7YaN-k.js → preview-dialog-CISa3xH2.js} +1 -1
- package/dist/client/assets/{preview-panel-BZVDqW1t.js → preview-panel-Is_T5mgd.js} +1 -1
- package/dist/client/assets/{preview-tab-B18crp0w.js → preview-tab-QE2EzqbO.js} +3 -3
- package/dist/client/assets/{primitives-Jv205PzW.js → primitives-DuwBkkiW.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-WVTmsrbO.js → product-picker-dialog-BgfiINnh.js} +1 -1
- package/dist/client/assets/{profile-ExksEkWJ.js → profile-BBSVuOzV.js} +1 -1
- package/dist/client/assets/project-app-view-BKpC7rlM.js +1 -0
- package/dist/client/assets/{project-apps-Dq4vYhCx.js → project-apps-CIIh9MmH.js} +1 -1
- package/dist/client/assets/{project-icon-lQ2qF_x7.js → project-icon-B83l1FFE.js} +1 -1
- package/dist/client/assets/{project-index-DLyQghfD.js → project-index-DAyEgqrx.js} +1 -1
- package/dist/client/assets/project-reports-DQGF2xJn.js +1 -0
- package/dist/client/assets/project-tasks-BBAYKy8r.js +1 -0
- package/dist/client/assets/{projects-empty-state-BaIWyt1k.js → projects-empty-state-DRs0zzkN.js} +1 -1
- package/dist/client/assets/{projects-BLpymsux.js → projects-m3alzMbh.js} +1 -1
- package/dist/client/assets/{prompts-DqWsUv18.js → prompts-CcRTCjj0.js} +1 -1
- package/dist/client/assets/record-editor-0gtIzDkA.js +1 -0
- package/dist/client/assets/redirect-editor-CBbV9fjW.js +1 -0
- package/dist/client/assets/{reports-GEVy4scF.js → reports-CceluTq4.js} +1 -1
- package/dist/client/assets/reports-DbLM9LU8.js +1 -0
- package/dist/client/assets/{reports-onboarding-PwDuCGot.js → reports-onboarding-CW6RZc4O.js} +1 -1
- package/dist/client/assets/reports-tab-C2ZjDmEI.js +2 -0
- package/dist/client/assets/{repositories-DcAWRYEG.js → repositories-CVirrF3U.js} +1 -1
- package/dist/client/assets/repositories-GozVvKpl.js +1 -0
- package/dist/client/assets/{repository-binding-jAJl13i7.js → repository-binding-DCgII80m.js} +1 -1
- package/dist/client/assets/{repository-picker-Dl56cEjR.js → repository-picker-GD3a62Se.js} +1 -1
- package/dist/client/assets/{require-capability-l9KXJ8gu.js → require-capability-BIdAaoMl.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BDvRMhJJ.js → required-auth-layout-CJHidYLF.js} +1 -1
- package/dist/client/assets/{reset-password-eiJh4KkN.js → reset-password-CrDFD2Qo.js} +1 -1
- package/dist/client/assets/{resizable-ClPiju3x.js → resizable-B9Eyi_ji.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-DTloknxI.js → resolve-tab-icon-CKM9oCio.js} +1 -1
- package/dist/client/assets/{review-settings-CoWj5_Sd.js → review-settings-BAe760uV.js} +1 -1
- package/dist/client/assets/{role-color-Zk9mTPP5.js → role-color-B1Um4Dsq.js} +1 -1
- package/dist/client/assets/{roles-CinXaOYO.js → roles-DKVzo-vg.js} +1 -1
- package/dist/client/assets/{route-B7cdRc0W.js → route-BkuglpaW.js} +1 -1
- package/dist/client/assets/route-CQJFjDvy.js +1 -0
- package/dist/client/assets/{route-GLw4hirY.js → route-D40yQj0l.js} +1 -1
- package/dist/client/assets/{route-page-header-CvcqckN2.js → route-page-header-CcVg-Vnk.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-C3NvU1dn.js → sandbox-git-api-kZT1B2wI.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-2HGtol3n.js → sandbox-lifecycle-context-OY_YTYCF.js} +1 -1
- package/dist/client/assets/{save-status-fItkkD30.js → save-status-CbCdWhQw.js} +1 -1
- package/dist/client/assets/{schema-DjQz4gZw.js → schema-CId4jxC-.js} +1 -1
- package/dist/client/assets/schema-CTzV9RXv.js +1 -0
- package/dist/client/assets/{scroll-area-iXdNHDzI.js → scroll-area-R9Qlcbsn.js} +1 -1
- package/dist/client/assets/{search-input-CplQR3Cf.js → search-input-BXEVxZTu.js} +1 -1
- package/dist/client/assets/{search-toggle-C8627ghw.js → search-toggle-G2iKVtD4.js} +1 -1
- package/dist/client/assets/{secret-picker-CM6Voy-R.js → secret-picker-DP_k-tRN.js} +1 -1
- package/dist/client/assets/{secrets-Cd-UdZBn.js → secrets-BXKvytJe.js} +1 -1
- package/dist/client/assets/{section-array-field-zrTNtrKa.js → section-array-field-ClatUqIl.js} +1 -1
- package/dist/client/assets/{sections-Bf6DQ73k.js → sections-DGuQLA5Q.js} +1 -1
- package/dist/client/assets/sections-editor-Cn9WhnKh.js +1 -0
- package/dist/client/assets/{select-BtcP8R6V.js → select-B8AcNN--.js} +1 -1
- package/dist/client/assets/{select-model-DwiCQMgW.js → select-model-Bp-dP1TL.js} +1 -1
- package/dist/client/assets/{seo-editor-DF_qOadV.js → seo-editor-DfWHWpCT.js} +1 -1
- package/dist/client/assets/{separator-DNJRj3WX.js → separator-Df5tfRJy.js} +1 -1
- package/dist/client/assets/{session-runtime-CmPJqc9T.js → session-runtime-CaeGmaeh.js} +1 -1
- package/dist/client/assets/settings-tab-B_DvV5jK.js +1 -0
- package/dist/client/assets/{sheet-VKdIybCR.js → sheet-BX-uc-CP.js} +1 -1
- package/dist/client/assets/{shell-layout-_zkxSyWx.js → shell-layout-Df_Vqmxl.js} +1 -1
- package/dist/client/assets/{site-draft-actions-CPaVy3_v.js → site-draft-actions-DuIB4ROz.js} +1 -1
- package/dist/client/assets/{site-draft-view-BXUPDUfS.js → site-draft-view-BIEW7QNi.js} +1 -1
- package/dist/client/assets/site-editor-hcWx5wR4.js +1 -0
- package/dist/client/assets/{site-editor-toast-BOt_nyVl.js → site-editor-toast-8Snipnn7.js} +1 -1
- package/dist/client/assets/{skills-D9sHunPO.js → skills-CD71-VLR.js} +1 -1
- package/dist/client/assets/{slider-C25v9BTx.js → slider-Ce40PfUp.js} +1 -1
- package/dist/client/assets/{sortable.esm-BzZJdDzX.js → sortable.esm-BMdQQlMD.js} +1 -1
- package/dist/client/assets/{sso-ecVMQ9jD.js → sso-oSOcr0Wy.js} +1 -1
- package/dist/client/assets/{suggestion-DGpHBXVl.js → suggestion-BJfFlKUn.js} +2 -2
- package/dist/client/assets/{super-agent-icon-uexFm4rX.js → super-agent-icon-Ct_ICcf4.js} +1 -1
- package/dist/client/assets/{switch-BxHf2yQ-.js → switch-B2Y4X_zr.js} +1 -1
- package/dist/client/assets/{synced-repos-GTp0Tp98.js → synced-repos-ClBi5qqf.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-CmTv0jS2.js → tab-icon-glyph-DCTZNfdF.js} +1 -1
- package/dist/client/assets/{table-B3gHsFFi.js → table-Bgl4r11n.js} +1 -1
- package/dist/client/assets/{tabs-a_oEe7Hq.js → tabs-mO2tcMNi.js} +1 -1
- package/dist/client/assets/{task-board-Cq4D_eE2.js → task-board-CKMBp6DZ.js} +1 -1
- package/dist/client/assets/{task-key-DSN1bgDn.js → task-key-D4f-sg50.js} +2 -2
- package/dist/client/assets/{task-route-CN_gUoQw.js → task-route-CO-bF-dc.js} +1 -1
- package/dist/client/assets/{task-status-uc1jZinE.js → task-status-BgBxV1so.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-D9X1HIOU.js → taskboard-analytics-Bygs-ucY.js} +1 -1
- package/dist/client/assets/{tasks-D4EVJa15.js → tasks-BSB4SC09.js} +3 -3
- package/dist/client/assets/tasks-BdXLUlHE.js +1 -0
- package/dist/client/assets/{textarea-zTqVKq38.js → textarea-CxYbwRQs.js} +1 -1
- package/dist/client/assets/thread-analytics-D2bpggTx.js +1 -0
- package/dist/client/assets/{thread-button-DDF681E7.js → thread-button-B8jlPwZm.js} +1 -1
- package/dist/client/assets/{thread-intent-D0RsO42v.js → thread-intent-CYwcSe1Q.js} +1 -1
- package/dist/client/assets/{thread-route-OiQ4LagC.js → thread-route-2H1rJmYZ.js} +1 -1
- package/dist/client/assets/thread-route-CfoDJxAx.js +1 -0
- package/dist/client/assets/{thread-sheet-body-RQ9p2vpU.js → thread-sheet-body-C75KpeDg.js} +1 -1
- package/dist/client/assets/{time-range-picker-k6buFvRQ.js → time-range-picker-YQf6kbUD.js} +1 -1
- package/dist/client/assets/{toggle-group-_l9tZet4.js → toggle-group-navQiXEB.js} +1 -1
- package/dist/client/assets/{tool-set-selector-C3ePfweB.js → tool-set-selector-DTF-tSJ8.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DutdVdtc.js → toolbar-icon-button-XqXhc7QP.js} +1 -1
- package/dist/client/assets/{tooltip-icVvNMtU.js → tooltip-WWhnAI0D.js} +1 -1
- package/dist/client/assets/{tooltipContext-DMKNZNxg.js → tooltipContext-Bo1ey-tK.js} +1 -1
- package/dist/client/assets/{track-BQg0fgIs.js → track-CFN31sNa.js} +1 -1
- package/dist/client/assets/{types-Cng3BN1u.js → types-Dn5pCQsk.js} +1 -1
- package/dist/client/assets/{url-slug-DRUvKyIF.js → url-slug-_CQrBm2g.js} +1 -1
- package/dist/client/assets/{usage-stats-DWbg5Exa.js → usage-stats-CmNc8cAj.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Dc5ouLPu.js → use-ai-providers-fHYrugD3.js} +1 -1
- package/dist/client/assets/{use-api-keys-BYFPWyCw.js → use-api-keys-D5gIwchQ.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-CWMngrVu.js → use-apply-named-rule-D3XuNHsr.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-DG7NmbH7.js +1 -0
- package/dist/client/assets/{use-automations-B4Bhr7bk.js → use-automations-DmvCuHJK.js} +1 -1
- package/dist/client/assets/{use-autosave-fAM8w3an.js → use-autosave-Cp4cbZfZ.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-VC8Oc8YL.js +1 -0
- package/dist/client/assets/use-blog-view-12eN62uX.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-Cos1I2jf.js → use-chat-layout-state-BaDKAECw.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-ltMAkIJx.js → use-cms-publish-actions-nQ5uL1t1.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BT1ouC_-.js → use-connect-companion-C25pDJPN.js} +1 -1
- package/dist/client/assets/{use-connection-BD6Z_Y5K.js → use-connection-Cfm3n1XL.js} +1 -1
- package/dist/client/assets/{use-content-sync-Cb62T6_k.js → use-content-sync-CUYx6TEx.js} +1 -1
- package/dist/client/assets/{use-copy-bpFrGd2i.js → use-copy-D8xWA2yV.js} +1 -1
- package/dist/client/assets/{use-current-view-dWMur2yx.js → use-current-view-D4QwvKZY.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DoBx_LGd.js → use-date-fns-locale-C3g_gdL8.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-KNzjtiuc.js → use-debounced-autosave-TQo-9acI.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Bt1SAjKD.js → use-debounced-value-CyYRIO6x.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DpY6G1b0.js → use-deco-credits-B8P7CP1g.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BkY_xbdd.js → use-decopilot-events-D2kyZDkU.js} +1 -1
- package/dist/client/assets/{use-delete-block-CheMFR3A.js → use-delete-block-mSGolgbs.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CKGanNPY.js → use-delete-connection-Doaqb1mb.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Dfxu4f7O.js → use-deployment-admin-ChHKYp27.js} +1 -1
- package/dist/client/assets/{use-entitlements-CdeJE9gN.js → use-entitlements-C9g1ozeL.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-DtyjKSU5.js → use-fast-preview-draft-url-Oht_itRW.js} +1 -1
- package/dist/client/assets/{use-file-configs-D73DTOfD.js → use-file-configs-BkG8Iml_.js} +1 -1
- package/dist/client/assets/{use-id-selection-obkznx-t.js → use-id-selection-DiyjnQ8j.js} +1 -1
- package/dist/client/assets/{use-in-settings-BZ1un7LI.js → use-in-settings-D6bXO-H0.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-BKbu_K0U.js → use-inbox-feed-Bm4NiXcv.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-C-tY72ik.js → use-infinite-scroll-DqUoS-l2.js} +1 -1
- package/dist/client/assets/{use-join-requests-CtDU3gH1.js → use-join-requests-wmoCs74z.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-yM1RCEi5.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-Dh_dzOju.js → use-mcp-auth-status-BbJoMlJb.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BwusBux_.js → use-mcp-client-CCxN3wif.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-dcqD5yo7.js → use-mcp-prompts-DVoQ1lwW.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DTHRiLyJ.js → use-mcp-tools-6V4XkJcF.js} +1 -1
- package/dist/client/assets/{use-mobile-Dr7bjUPW.js → use-mobile-B8Aa4Xlk.js} +1 -1
- package/dist/client/assets/{use-move-blocks-BchWtT9J.js → use-move-blocks-BXjxUn5y.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-C7EFO95N.js → use-navigate-to-agent-ILbX-YSf.js} +1 -1
- package/dist/client/assets/{use-never-published-BJ0Sec7F.js → use-never-published-DzIkWgN5.js} +1 -1
- package/dist/client/assets/{use-org-fs-Cl00WlUa.js → use-org-fs-9SZb1DFS.js} +1 -1
- package/dist/client/assets/{use-org-notice-CEMI0cuO.js → use-org-notice-xNR84Fdf.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-C-GJnNCq.js → use-org-repo-syncs-Cys8SyI4.js} +1 -1
- package/dist/client/assets/{use-org-sso-DfMcUb6-.js → use-org-sso-C54pKXlG.js} +1 -1
- package/dist/client/assets/use-organization-settings-DWZK4txY.js +1 -0
- package/dist/client/assets/{use-panel-navigate-CeualaFM.js → use-panel-navigate-DDkOk54O.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-BkMPZcTq.js → use-project-native-view-presence-Djk6cHeC.js} +1 -1
- package/dist/client/assets/{use-project-scope-BF7ZsFcz.js → use-project-scope-DQMPXxdu.js} +1 -1
- package/dist/client/assets/{use-recent-apps-C79qm7dy.js → use-recent-apps-DgXyGMJY.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-Bujt5v8X.js → use-reports-diagnostic-BKWEjMrL.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-Dxu1WRP5.js → use-sandbox-events-BtTSBNQ-.js} +1 -1
- package/dist/client/assets/{use-secrets-B8xKko9Q.js → use-secrets-B8rVmi0H.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BHMbHnTX.js → use-section-preview-base-3aCgX76G.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-DXR2L5hj.js → use-sidebar-collapsed-DQ8plnyV.js} +1 -1
- package/dist/client/assets/{use-tags-CedvYB82.js → use-tags-SiefX76A.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BW_T7Ca1.js → use-task-board-analytics-DBtBKp5C.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-BZA3OZnP.js → use-task-board-item-prs-Dnj65bJE.js} +1 -1
- package/dist/client/assets/{use-task-board-items-C_bU9rPT.js → use-task-board-items-RVurD3dm.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-CcoEQzvX.js → use-task-board-prompts-C9B0Fj4B.js} +1 -1
- package/dist/client/assets/{use-task-metadata-Uc6KpwV0.js → use-task-metadata-B-Jkenb-.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BA8sXOAO.js → use-thread-outputs-Bp1yZzWp.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-CXGnqfWm.js → use-view-draft-kind-D6nuhvC8.js} +1 -1
- package/dist/client/assets/{use-voice-input-D-qISUx2.js → use-voice-input-BRffPZLC.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BVDzY1XE.js +1 -0
- package/dist/client/assets/{useQueries-D7JkV3ct.js → useQueries-TcBx6Y_l.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-ZMVy_VA8.js +1 -0
- package/dist/client/assets/{users-CwLfeaay.js → users-BrlvYrfH.js} +1 -1
- package/dist/client/assets/{utils-BRIj6V6X.js → utils-BvR8qziK.js} +1 -1
- package/dist/client/assets/{variant-calendar-BcSA72WZ.js → variant-calendar-B03MXYrd.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-BBUsuGmz.js → variant-matcher-override-B5Ejbh3V.js} +1 -1
- package/dist/client/assets/{view-header-BN75VYPA.js → view-header-D2HsNkGz.js} +1 -1
- package/dist/client/assets/{virtual-mcp-DKvO0DMw.js → virtual-mcp-CKK4xh6P.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-DyaAZ7A6.js → watch-sse-pool-C-H2mUwU.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +769 -769
- package/package.json +1 -1
- package/dist/client/assets/agent-app-BO2_ZSNA.js +0 -1
- package/dist/client/assets/agent-blog-DAiV8LqN.js +0 -2
- package/dist/client/assets/agent-blog-post-yArTClEg.js +0 -2
- package/dist/client/assets/agent-deck-DH7nWYL9.js +0 -1
- package/dist/client/assets/agent-experiments-B3XxdY47.js +0 -1
- package/dist/client/assets/agent-file-CQYoQXcJ.js +0 -1
- package/dist/client/assets/agent-library-eZkcynPr.js +0 -1
- package/dist/client/assets/agent-library-file-Lfg-_zk4.js +0 -1
- package/dist/client/assets/agent-overview-zkuZWtuu.js +0 -1
- package/dist/client/assets/agent-settings-DGW5ynO-.js +0 -1
- package/dist/client/assets/agent-site-editor-code-BFTaZp9U.js +0 -2
- package/dist/client/assets/agent-site-editor-content-Bq8S29ir.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-CysA03B1.js +0 -1
- package/dist/client/assets/agent-view-BSAwaXZW.js +0 -1
- package/dist/client/assets/ai-providers-CsRRMbMW.js +0 -1
- package/dist/client/assets/api-keys-BeLmv07-.js +0 -1
- package/dist/client/assets/app-editor-Di6FUBiQ.js +0 -1
- package/dist/client/assets/category-editor-DMYUciDu.js +0 -1
- package/dist/client/assets/chat-context-Ch3kSDW6.js +0 -44
- package/dist/client/assets/cms-settings-editor-uHQKjBzs.js +0 -1
- package/dist/client/assets/collection-detail-BMxo-5Da.js +0 -1
- package/dist/client/assets/file-explorer-9ZRRCtWn.js +0 -2
- package/dist/client/assets/index-MLo7YobU.css +0 -1
- package/dist/client/assets/library-Di4WLoyl.js +0 -1
- package/dist/client/assets/plan-Dbk6n6oc.js +0 -1
- package/dist/client/assets/post-calendar-FOg81-Hf.js +0 -1
- package/dist/client/assets/project-app-view-DYjXsvCO.js +0 -1
- package/dist/client/assets/project-reports-zcYSzvNj.js +0 -1
- package/dist/client/assets/project-tasks-Bstu3wnq.js +0 -1
- package/dist/client/assets/record-editor-DZ6ycUdu.js +0 -1
- package/dist/client/assets/redirect-editor-Bl0trZ6p.js +0 -1
- package/dist/client/assets/reports-Cf0wUdBY.js +0 -1
- package/dist/client/assets/reports-tab-Cqf8JAAn.js +0 -2
- package/dist/client/assets/repositories-CVy9O_L4.js +0 -1
- package/dist/client/assets/route-BGhG4fQ5.js +0 -1
- package/dist/client/assets/schema-DCQWc58B.js +0 -1
- package/dist/client/assets/sections-editor-Pqk7XVI9.js +0 -1
- package/dist/client/assets/settings-tab-DKnvOUqa.js +0 -1
- package/dist/client/assets/site-editor-BK9ubq9u.js +0 -1
- package/dist/client/assets/tasks-ZCniX70O.js +0 -1
- package/dist/client/assets/thread-analytics-Be5gTmM1.js +0 -1
- package/dist/client/assets/thread-route-tsFk8naa.js +0 -1
- package/dist/client/assets/use-ask-in-chat-goVXl_NF.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-CCC2DOox.js +0 -1
- package/dist/client/assets/use-blog-view-DFNaVcP9.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-DH8ex3Zd.js +0 -1
- package/dist/client/assets/use-organization-settings-D5A7oppe.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BWskAF2M.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BQ0JDyFJ.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as Et,j as s,b as Tt,r as _,au as It,m as Ot,h as Ft,t as wt}from"./index-BnCCUie5.js";import{u as Mt}from"./chat-context-Ch3kSDW6.js";import{u as Pt}from"./use-voice-input-D-qISUx2.js";import{S as $t}from"./scroll-area-iXdNHDzI.js";import{u as Ut,A as Vt}from"./use-section-preview-base-BHMbHnTX.js";import{z as zt,m as Lt,w as qt}from"./blocks-tab-states-Dg2hewP6.js";import{H as Ht,u as Dt,c as Gt,b as Wt,S as Zt}from"./held-block-view-Dfl9wQs4.js";import{b as Jt,u as Qt,k as Xt}from"./use-never-published-BJ0Sec7F.js";import{n as Yt}from"./content-tab-Dx0W8ww1.js";import{S as te}from"./save-status-fItkkD30.js";import"./use-panel-navigate-CeualaFM.js";import"./thread-route-OiQ4LagC.js";import"./use-project-scope-BF7ZsFcz.js";import"./repository-binding-jAJl13i7.js";import"./use-mcp-client-BwusBux_.js";import"./auth-CAOOT2we.js";import"./use-view-draft-kind-CXGnqfWm.js";import"./use-blog-view-DFNaVcP9.js";import"./use-organization-settings-D5A7oppe.js";import"./schema-DCQWc58B.js";import"./task-board-Cq4D_eE2.js";import"./thread-intent-D0RsO42v.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DyaAZ7A6.js";import"./session-runtime-CmPJqc9T.js";import"./use-entitlements-CdeJE9gN.js";import"./use-ai-providers-Dc5ouLPu.js";import"./use-current-view-dWMur2yx.js";import"./use-in-settings-BZ1un7LI.js";import"./use-decopilot-events-BkY_xbdd.js";import"./popover-BRb_ARAW.js";import"./drawer-DDbBWwDY.js";import"./tooltip-icVvNMtU.js";import"./index-R3Ci7Tyg.js";import"./use-mobile-Dr7bjUPW.js";import"./agent-icon-BD0ZSOtG.js";import"./AlertCircle-DsrPAFxJ.js";import"./UserCheck01-BMORoWuy.js";import"./Tool01-B-fgmM-0.js";import"./ArrowUp-O_SFXcX4.js";import"./ArrowLeft-CedOhlJl.js";import"./ArrowRight-D31ooF9_.js";import"./BookOpen01-hQOgpoT0.js";import"./Globe04-Bkkv-44s.js";import"./CheckCircle-C5F-vu0b.js";import"./ChevronDown-XAF5UTWS.js";import"./ChevronSelectorVertical-BgyFVvCt.js";import"./ChevronUp-DXb5SN9G.js";import"./UserSquare-BUy12Lbf.js";import"./LinkBroken01-DXQIXK4a.js";import"./CreditCard01-V_X-1km6.js";import"./File02-CWJddKT5.js";import"./MessageCircle01-CBwz3pkx.js";import"./SwitchHorizontal01-BoKcCD1g.js";import"./Eye-DKA9KO8s.js";import"./Fingerprint04-DnZul7lc.js";import"./Image01-w45LU6DD.js";import"./Key01-hOPkG93k.js";import"./LayoutLeft-C3gp1GTI.js";import"./Minus-C6nnb5U7.js";import"./Monitor01-D5ASDXL3.js";import"./Sun-DAly365K.js";import"./Play-BE2Gbr5-.js";import"./Plus-BKnmVwDY.js";import"./SearchMd-BdbsDxg8.js";import"./ShoppingBag01-D0FD1HPP.js";import"./Trash01-Dzo6NInS.js";import"./Upload01-DQgVu-9N.js";import"./Users01-t7brRFdK.js";import"./XClose-Bze4d5nj.js";import"./Zap-BiLLX5O9.js";import"./index-D-pDCAfc.js";import"./checkbox-lB4BY1Fl.js";import"./select-BtcP8R6V.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./site-editor-toast-BOt_nyVl.js";import"./content-changes-r32OQ0Qx.js";import"./sandbox-url-D3mC8qhT.js";import"./use-sandbox-events-Dxu1WRP5.js";import"./use-blocks-v8-project-CCC2DOox.js";import"./utils-BRIj6V6X.js";import"./sandbox-git-api-C3NvU1dn.js";import"./empty-state-p1vSClM-.js";import"./calendar-BiZh8nNR.js";import"./textarea-zTqVKq38.js";import"./usage-stats-DWbg5Exa.js";import"./utils-CVEq3hMx.js";import"./markdown-CGY8-6pe.js";import"./use-copy-bpFrGd2i.js";import"./gateway-client-BLgU4Dju.js";import"./form-BH-D2Xbc.js";import"./label-lULQ_A7o.js";import"./editor-classes-DMMsOfQ5.js";import"./switch-BxHf2yQ-.js";import"./task-key-DSN1bgDn.js";import"./sortable.esm-BzZJdDzX.js";import"./toggle-group-_l9tZet4.js";import"./active-indicator-CCMhAsc_.js";import"./category-tree-DAVAIQah.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-DsI-lHdT.js";import"./collapsible-DOENRXml.js";import"./use-task-board-items-C_bU9rPT.js";import"./config-C5d81tv3.js";import"./task-route-CN_gUoQw.js";import"./project-index-DLyQghfD.js";import"./shell-layout-_zkxSyWx.js";import"./use-deployment-admin-Dfxu4f7O.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-CEMI0cuO.js";import"./command-B6aoeD_0.js";import"./index-9QVz6jZ3.js";import"./integration-icon-HGkwXGCE.js";import"./project-icon-lQ2qF_x7.js";import"./use-navigate-to-agent-C7EFO95N.js";import"./use-debounced-value-Bt1SAjKD.js";import"./new-project-dialog-ByQdLyIC.js";import"./repository-picker-Dl56cEjR.js";import"./github-icon-CF41Lxe4.js";import"./useInfiniteQuery-BWskAF2M.js";import"./infiniteQueryObserver-BESu79F_.js";import"./collection-search-CIcbLnU-.js";import"./new-project-store-D_NVgRYa.js";import"./legacy-admin-welcome-dialog-BbrICcUL.js";import"./required-auth-layout-BDvRMhJJ.js";import"./use-org-sso-DfMcUb6-.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CUByroKt.js";import"./types-Cng3BN1u.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-VKdIybCR.js";import"./use-connection-BD6Z_Y5K.js";import"./use-mcp-prompts-dcqD5yo7.js";import"./use-thread-outputs-BA8sXOAO.js";import"./file-type-icon-CRJv2Oya.js";import"./section-array-field-zrTNtrKa.js";import"./named-rule-step-Dgb864IM.js";import"./slider-C25v9BTx.js";import"./index-BYqLsTt6.js";import"./tooltipContext-DMKNZNxg.js";import"./CategoricalChart-CUg_BAiA.js";import"./index-BbtKtnc4.js";import"./combobox-klxrcVPh.js";import"./match-site-slug-config-B47_xZCi.js";import"./use-file-configs-D73DTOfD.js";import"./asset-utils-CtdzkGeJ.js";import"./hosted-reconcile-CyRopTfU.js";import"./search-input-CplQR3Cf.js";import"./tabs-a_oEe7Hq.js";import"./delete-copy-DclWOxJf.js";import"./index-lCnbr_EL.js";import"./view-header-BN75VYPA.js";import"./use-cms-publish-actions-ltMAkIJx.js";import"./use-content-sync-Cb62T6_k.js";import"./use-delete-block-CheMFR3A.js";import"./item-actions-lpogT0_c.js";import"./date-utils-CrvIKg-s.js";import"./badge-BokVussq.js";import"./empty-state-CggWUtV0.js";import"./primitives-Jv205PzW.js";import"./use-move-blocks-BchWtT9J.js";import"./monaco-editor-Dque6-sU.js";import"./editor-mY53R5_b.js";import"./sandbox-lifecycle-context-2HGtol3n.js";import"./parse-sections-hseH5db1.js";import"./mustache-CrAZ8U_1.js";import"./collection-table-wrapper-BPjSO-Mu.js";import"./table-B3gHsFFi.js";import"./agent-capabilities-BYxoy39x.js";function ee(e,t){if(!e||!t?.length)return e;const o=Object.fromEntries(Object.entries(e.properties??{}).filter(([r])=>!t.includes(r)));return Object.keys(o).length>0?{...e,properties:o}:e}function _t(e,t,o){return typeof e!="string"?null:ee(zt(e,t),o)}function re(e,t,o){if(!t||typeof e!="string")return!1;const r=_t(e,t,o);return!!r&&Object.keys(r.properties??{}).length>0}function oe(e,t){const o=(e.title||e.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),r=/^[A-Za-z]/.test(o)&&o.length>0?o:"Section",i=Yt(t,r);return{blockKey:i,data:{__resolveType:e.resolveType,name:i}}}function vi(e){const t=Et.c(10),o=e.saveGuard?void 0:e.block!==void 0;let r;t[0]!==e?(r=s.jsx(ie,{...e}),t[0]=e,t[1]=r):r=t[1];let i;return t[2]!==e.blockKey||t[3]!==e.branch||t[4]!==e.decofile||t[5]!==e.orgSlug||t[6]!==e.virtualMcpId||t[7]!==o||t[8]!==r?(i=s.jsx(Ht,{listing:e.decofile,orgSlug:e.orgSlug,virtualMcpId:e.virtualMcpId,branch:e.branch,blockKey:e.blockKey,present:o,children:r}),t[2]=e.blockKey,t[3]=e.branch,t[4]=e.decofile,t[5]=e.orgSlug,t[6]=e.virtualMcpId,t[7]=o,t[8]=r,t[9]=i):i=t[9],i}function ie(e){const t=Et.c(95),{orgSlug:o,virtualMcpId:r,branch:i,blockKey:a,block:b,meta:m,decofile:c,title:At,excludeFields:v,previewBaseUrl:gt,notice:Z,saveGuard:J,persistDefaults:Q,schemaWaiting:St}=e,X=gt===void 0?null:gt,Y=St===void 0?!0:St,tt=Mt()?.taskId??null,h=Tt(),K=Pt(r);let R;t[0]!==i||t[1]!==X||t[2]!==r?(R={virtualMcpId:r,branch:i,sandboxUrl:X},t[0]=i,t[1]=X,t[2]=r,t[3]=R):R=t[3];const x=Ut(R),l=typeof b?.__resolveType=="string"?b.__resolveType:"";let N;t[4]!==v||t[5]!==m||t[6]!==l?(N=_t(l,m,v),t[4]=v,t[5]=m,t[6]=l,t[7]=N):N=t[7];const et=N;let C;t[8]!==v||t[9]!==m||t[10]!==l?(C=re(l,m,v),t[8]=v,t[9]=m,t[10]=l,t[11]=C):C=t[11];const rt=C;let T;t[12]!==m||t[13]!==l||t[14]!==Y||t[15]!==K?(T=Y&&l!==""&&!(K.resolved&&K.runtime==="cms")&&!Lt(l,m),t[12]=m,t[13]=l,t[14]=Y,t[15]=K,t[16]=T):T=t[16];const I=T,yt=At??(b?qt(a,b,m):a);let O;t[17]!==i||t[18]!==o||t[19]!==r?(O={orgSlug:o,virtualMcpId:r,branch:i},t[17]=i,t[18]=o,t[19]=r,t[20]=O):O=t[20];let F;t[21]!==J?(F={guard:J,holdsCopy:!0},t[21]=J,t[22]=F):F=t[22];const{save:ot,flush:it,isPending:st}=Jt(O,F);let M;t[23]!==i||t[24]!==o||t[25]!==r?(M={orgSlug:o,virtualMcpId:r,branch:i},t[23]=i,t[24]=o,t[25]=r,t[26]=M):M=t[26];const mt=Qt(M);let P;t[27]!==i||t[28]!==o||t[29]!==r?(P={orgSlug:o,virtualMcpId:r,branch:i},t[27]=i,t[28]=o,t[29]=r,t[30]=P):P=t[30];const nt=Dt(P,c).save,[Kt,Rt]=_.useState(a),[lt,kt]=_.useState(null),[pt,jt]=_.useState(0);let $;t[31]===Symbol.for("react.memo_cache_sentinel")?($=[],t[31]=$):$=t[31];const[g,Bt]=_.useState($),[at,d]=_.useState(!1),U=_.useRef(null);Kt!==a&&(Rt(a),kt(null),jt(me),Bt([]));let V;t[32]!==b?(V=b??{},t[32]=b,t[33]=V):V=t[33];const ct=V;let S;t[34]!==lt?(S=lt??{},t[34]=lt,t[35]=S):S=t[35];let z;t[36]!==ct||t[37]!==S?(z={...ct,...S},t[36]=ct,t[37]=S,t[38]=z):z=t[38];const dt=z;let L;t[39]!==a||t[40]!==l||t[41]!==ot?(L=n=>{const p=n;kt(p),ot(a,{...p,__resolveType:l})},t[39]=a,t[40]=l,t[41]=ot,t[42]=L):L=t[42];const ut=L;let q;t[43]===Symbol.for("react.memo_cache_sentinel")?(q=n=>{Bt(n)},t[43]=q):q=t[43];const A=q;let H;t[44]!==c||t[45]!==it||t[46]!==mt||t[47]!==h?(H=async(n,p)=>{try{const{blockKey:u,data:f}=oe(n,c),vt=await mt.mutateAsync({blockKey:u,data:f});Xt(vt)||wt.success(h("sandbox.appEditor.createdSection",{name:u})),p({__resolveType:u}),it()}catch(u){const f=u,vt=f instanceof Error?f.message:h("sandbox.appEditor.failedAddSection");throw wt.error(vt),f}},t[44]=c,t[45]=it,t[46]=mt,t[47]=h,t[48]=H):H=t[48];const y=H;let D;t[49]!==d?(D=n=>{U.current=n.append,d(!0)},t[49]=d,t[50]=D):D=t[50];const ft=D;let G;t[51]!==y||t[52]!==d?(G=async n=>{const p=U.current;if(p)try{await y(n,u=>{p(u),d(!1),U.current=null})}catch{}},t[51]=y,t[52]=d,t[53]=G):G=t[53];const ht=G,bt=g.length>0?[yt,...g]:[],Nt="flex h-full flex-col",Ct="flex h-12 shrink-0 items-center justify-between border-b px-6",xt=bt.length>0?s.jsx("nav",{"aria-label":h("sandbox.appEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:bt.map((n,p)=>{const u=p===bt.length-1,f=Gt(n);return s.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[p>0&&s.jsx(It,{className:"size-3 shrink-0 text-muted-foreground/60"}),s.jsx("button",{type:"button",onClick:()=>{A(p===0?[]:Wt(g,p)),jt(se)},title:f,className:Ot("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors",u?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:f})]},`${f}-${p}`)})}):s.jsx("span",{className:"text-sm font-medium",children:yt});let k;t[54]!==st?(k=s.jsx(te,{isPending:st,isError:!1}),t[54]=st,t[55]=k):k=t[55];let j;t[56]!==xt||t[57]!==k?(j=s.jsxs("div",{className:Ct,children:[xt,k]}),t[56]=xt,t[57]=k,t[58]=j):j=t[58];let B;t[59]!==I||t[60]!==a||t[61]!==i||t[62]!==g||t[63]!==c||t[64]!==dt||t[65]!==pt||t[66]!==y||t[67]!==A||t[68]!==ut||t[69]!==ft||t[70]!==rt||t[71]!==m||t[72]!==o||t[73]!==Q||t[74]!==nt||t[75]!==et||t[76]!==x||t[77]!==h||t[78]!==tt||t[79]!==r?(B=rt?s.jsx(Zt,{schema:et,value:dt,onChange:ut,persistDefaults:Q,basePath:"",breadcrumbPath:g,onBreadcrumbChange:A,decofile:c,meta:m,onSaveReferencedBlock:nt,previewBaseUrl:x,onAddSectionItem:y,onRequestAddSection:ft,sandbox:{orgSlug:o,virtualMcpId:r,branch:i,threadId:tt}},`${a}:${pt}`):s.jsxs("div",{className:"flex flex-col items-center gap-3 py-6 text-center text-xs text-muted-foreground",children:[I&&s.jsx(Ft,{className:"size-4"}),s.jsx("p",{children:h(I?"sandbox.appEditor.schemaAwaitsBuild":"sandbox.appEditor.noEditableSchema")})]}),t[59]=I,t[60]=a,t[61]=i,t[62]=g,t[63]=c,t[64]=dt,t[65]=pt,t[66]=y,t[67]=A,t[68]=ut,t[69]=ft,t[70]=rt,t[71]=m,t[72]=o,t[73]=Q,t[74]=nt,t[75]=et,t[76]=x,t[77]=h,t[78]=tt,t[79]=r,t[80]=B):B=t[80];let w;t[81]!==Z||t[82]!==B?(w=s.jsx($t,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:s.jsx("div",{className:"px-6 py-6",children:s.jsxs("div",{className:"mx-auto max-w-xl",children:[Z,B]})})}),t[81]=Z,t[82]=B,t[83]=w):w=t[83];let E;t[84]!==at||t[85]!==c||t[86]!==ht||t[87]!==m||t[88]!==x||t[89]!==d?(E=x&&s.jsx(Vt,{open:at,onOpenChange:n=>{d(n),n||(U.current=null)},meta:m,decofile:c,previewBaseUrl:x,onSelect:n=>{ht(n)}}),t[84]=at,t[85]=c,t[86]=ht,t[87]=m,t[88]=x,t[89]=d,t[90]=E):E=t[90];let W;return t[91]!==j||t[92]!==w||t[93]!==E?(W=s.jsxs("div",{className:Nt,children:[j,w,E]}),t[91]=j,t[92]=w,t[93]=E,t[94]=W):W=t[94],W}function se(e){return e+1}function me(e){return e+1}export{vi as AppEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as jt,j as t,b as St,r as k,B as et,a9 as Et,I as ot,aP as vt,aO as Nt,aL as Ct,aJ as wt,aK as Pt,aN as kt,aM as Bt,b9 as Dt,h as Tt,t as B}from"./index-BnCCUie5.js";import{u as Ft}from"./chat-context-Ch3kSDW6.js";import{i as L}from"./AlertCircle-DsrPAFxJ.js";import{i as At}from"./ArrowRight-D31ooF9_.js";import{i as st}from"./File02-CWJddKT5.js";import{e as _t}from"./UserSquare-BUy12Lbf.js";import{L as O}from"./label-lULQ_A7o.js";import{S as Rt,b as Lt,a as Ot,d as zt,c as z}from"./select-BtcP8R6V.js";import{b as It,C as Ht,a as Mt,c as $t}from"./blog-schema-Dsa0bBQd.js";import{H as Wt,u as Vt}from"./held-block-view-Dfl9wQs4.js";import{a as Gt,b as I,R as Yt,s as qt,aM as Jt,o as Qt,aN as Ut,a7 as Xt,aO as Zt,m as rt,ab as Kt,a3 as te,u as ee,l as oe,aP as se,d as re,f as ie,I as ae,aQ as ne}from"./category-tree-DAVAIQah.js";import{e as le}from"./blog-preview-url-DojRzjkz.js";import{u as me}from"./use-never-published-BJ0Sec7F.js";import{u as ce}from"./use-move-blocks-BchWtT9J.js";import{H as it}from"./hosted-reconcile-CyRopTfU.js";import{u as de}from"./use-fast-preview-draft-url-DtyjKSU5.js";import{u as pe}from"./use-autosave-fAM8w3an.js";import{S as ue}from"./save-status-fItkkD30.js";import{B as ge,a as xe}from"./block-document-wEV3Rzyg.js";import{s as p,E as he}from"./primitives-Jv205PzW.js";import{c as fe,T as ye,a as be}from"./tooltip-icVvNMtU.js";import"./use-panel-navigate-CeualaFM.js";import"./thread-route-OiQ4LagC.js";import"./use-project-scope-BF7ZsFcz.js";import"./repository-binding-jAJl13i7.js";import"./use-mcp-client-BwusBux_.js";import"./auth-CAOOT2we.js";import"./use-view-draft-kind-CXGnqfWm.js";import"./use-blog-view-DFNaVcP9.js";import"./use-organization-settings-D5A7oppe.js";import"./schema-DCQWc58B.js";import"./task-board-Cq4D_eE2.js";import"./thread-intent-D0RsO42v.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DyaAZ7A6.js";import"./session-runtime-CmPJqc9T.js";import"./use-entitlements-CdeJE9gN.js";import"./use-ai-providers-Dc5ouLPu.js";import"./use-current-view-dWMur2yx.js";import"./use-in-settings-BZ1un7LI.js";import"./use-decopilot-events-BkY_xbdd.js";import"./index-BdQq_4o_.js";import"./index-R3Ci7Tyg.js";import"./ChevronDown-XAF5UTWS.js";import"./ChevronUp-DXb5SN9G.js";import"./UserCheck01-BMORoWuy.js";import"./collapsible-DOENRXml.js";import"./utils-BRIj6V6X.js";import"./agent-icon-BD0ZSOtG.js";import"./Tool01-B-fgmM-0.js";import"./ArrowUp-O_SFXcX4.js";import"./ArrowLeft-CedOhlJl.js";import"./BookOpen01-hQOgpoT0.js";import"./Globe04-Bkkv-44s.js";import"./CheckCircle-C5F-vu0b.js";import"./ChevronSelectorVertical-BgyFVvCt.js";import"./LinkBroken01-DXQIXK4a.js";import"./CreditCard01-V_X-1km6.js";import"./MessageCircle01-CBwz3pkx.js";import"./SwitchHorizontal01-BoKcCD1g.js";import"./Eye-DKA9KO8s.js";import"./Fingerprint04-DnZul7lc.js";import"./Image01-w45LU6DD.js";import"./Key01-hOPkG93k.js";import"./LayoutLeft-C3gp1GTI.js";import"./Minus-C6nnb5U7.js";import"./Monitor01-D5ASDXL3.js";import"./Sun-DAly365K.js";import"./Play-BE2Gbr5-.js";import"./Plus-BKnmVwDY.js";import"./SearchMd-BdbsDxg8.js";import"./ShoppingBag01-D0FD1HPP.js";import"./Trash01-Dzo6NInS.js";import"./Upload01-DQgVu-9N.js";import"./Users01-t7brRFdK.js";import"./XClose-Bze4d5nj.js";import"./Zap-BiLLX5O9.js";import"./blocks-tab-states-Dg2hewP6.js";import"./site-editor-toast-BOt_nyVl.js";import"./content-changes-r32OQ0Qx.js";import"./sandbox-url-D3mC8qhT.js";import"./use-sandbox-events-Dxu1WRP5.js";import"./use-blocks-v8-project-CCC2DOox.js";import"./use-voice-input-D-qISUx2.js";import"./popover-BRb_ARAW.js";import"./drawer-DDbBWwDY.js";import"./use-mobile-Dr7bjUPW.js";import"./index-D-pDCAfc.js";import"./checkbox-lB4BY1Fl.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./sandbox-git-api-C3NvU1dn.js";import"./empty-state-p1vSClM-.js";import"./calendar-BiZh8nNR.js";import"./textarea-zTqVKq38.js";import"./usage-stats-DWbg5Exa.js";import"./utils-CVEq3hMx.js";import"./markdown-CGY8-6pe.js";import"./use-copy-bpFrGd2i.js";import"./gateway-client-BLgU4Dju.js";import"./form-BH-D2Xbc.js";import"./editor-classes-DMMsOfQ5.js";import"./switch-BxHf2yQ-.js";import"./task-key-DSN1bgDn.js";import"./sortable.esm-BzZJdDzX.js";import"./toggle-group-_l9tZet4.js";import"./active-indicator-CCMhAsc_.js";import"./section-array-field-zrTNtrKa.js";import"./command-B6aoeD_0.js";import"./index-9QVz6jZ3.js";import"./named-rule-step-Dgb864IM.js";import"./slider-C25v9BTx.js";import"./index-BYqLsTt6.js";import"./tooltipContext-DMKNZNxg.js";import"./CategoricalChart-CUg_BAiA.js";import"./index-BbtKtnc4.js";import"./combobox-klxrcVPh.js";import"./scroll-area-iXdNHDzI.js";import"./match-site-slug-config-B47_xZCi.js";import"./use-file-configs-D73DTOfD.js";import"./asset-utils-CtdzkGeJ.js";import"./useInfiniteQuery-BWskAF2M.js";import"./infiniteQueryObserver-BESu79F_.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-DsI-lHdT.js";import"./use-task-board-items-C_bU9rPT.js";import"./config-C5d81tv3.js";import"./task-route-CN_gUoQw.js";import"./project-index-DLyQghfD.js";import"./shell-layout-_zkxSyWx.js";import"./use-deployment-admin-Dfxu4f7O.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-CEMI0cuO.js";import"./integration-icon-HGkwXGCE.js";import"./project-icon-lQ2qF_x7.js";import"./use-navigate-to-agent-C7EFO95N.js";import"./use-debounced-value-Bt1SAjKD.js";import"./new-project-dialog-ByQdLyIC.js";import"./repository-picker-Dl56cEjR.js";import"./github-icon-CF41Lxe4.js";import"./collection-search-CIcbLnU-.js";import"./new-project-store-D_NVgRYa.js";import"./legacy-admin-welcome-dialog-BbrICcUL.js";import"./required-auth-layout-BDvRMhJJ.js";import"./use-org-sso-DfMcUb6-.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CUByroKt.js";import"./types-Cng3BN1u.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-VKdIybCR.js";import"./use-connection-BD6Z_Y5K.js";import"./use-mcp-prompts-dcqD5yo7.js";import"./use-thread-outputs-BA8sXOAO.js";import"./file-type-icon-CRJv2Oya.js";import"./search-input-CplQR3Cf.js";import"./tabs-a_oEe7Hq.js";import"./delete-copy-DclWOxJf.js";import"./index-lCnbr_EL.js";import"./suggestion-DGpHBXVl.js";import"./product-picker-dialog-WVTmsrbO.js";import"./index-CG6_ih5n.js";const H="__none__";function je({orgSlug:r,virtualMcpId:s,branch:u,blockKey:n,block:y,decofile:x,meta:D,onManagePosts:at,onOpenPost:nt,previewBaseUrl:M,fastPreviewActive:lt=!0}){const o=St(),$=Ft()?.taskId??null,b=me({orgSlug:r,virtualMcpId:s,branch:u},{holdsCopy:!0}),v=ce({orgSlug:r,virtualMcpId:s,branch:u}),mt=de({orgSlug:r,virtualMcpId:s,branch:u}),W=Gt(y,"categories"),V=e=>{const a=b.shown(e);return a?{[e]:a}:{}},[m,G,Y]=pe(W,e=>{b.mutate({blockKey:n,data:I(n,"categories",e)})},{isSaving:b.isPending||v.isPending,onSeed:()=>b.hold(n)}),N=(e,a)=>G({...m,[e]:a}),ct=It("categories",D,$t),R=Vt({orgSlug:r,virtualMcpId:s,branch:u},x),q=R.save,J=le({decofile:x,category:m,previewBaseUrl:M,draftPointer:lt?mt:null,meta:D}),i=p(m.slug),[Q,f]=k.useState(i),[U,j]=k.useState(null),[dt,pt]=k.useState(i);dt!==i&&(pt(i),f(i));const[d,T]=k.useState(null),[S,F]=k.useState(!1),X=i?Yt(x).filter(e=>e.categorySlugs.includes(i)):[],A=X.length,_=qt(x).categories,Z=(i?_.filter(e=>e.parentSlug===i):[]).length,ut=i?Jt(i,_).add(i):new Set,K=Qt(_).filter(({entry:e,depth:a})=>e.slug&&!ut.has(e.slug)&&a+1<Ut).map(({entry:e,depth:a})=>({slug:e.slug,label:e.label,depth:a})),C=p(m.parentSlug),gt=Xt(x,"categories",n,p(m.name)),E=Zt(m),xt=E.length===1?o("sandbox.postEditor.missingFieldSingular",{fields:rt(E,o)}):o("sandbox.postEditor.missingFieldPlural",{fields:rt(E,o)}),ht=e=>N("slug",e),tt=(e,a)=>{const c={name:p(a.name),slug:p(a.slug)},l={[n]:I(n,"categories",a)};let h=0;for(const{key:g,payload:w}of oe(x)){const P=se(w,e,c);P!==w&&(l[g]=re(g,ie(P)),h+=1)}if(e!==c.slug)for(const{key:g,payload:w}of ae(x,"categories")){if(g===n)continue;const P=ne(w,e,c.slug);P!==w&&(l[g]=I(g,"categories",P))}return{writes:l,posts:h}},ft=async()=>{if(!i||S)return;const e=p(m.name),a={...m,name:e},{writes:c,posts:l}=tt(i,a);if(!(l===0&&e===p(W.name))){F(!0);try{Y(a),await v.move({writes:c,deletes:[]},{shown:()=>V(n)}),l>0&&B.success(o("sandbox.categoryEditor.renameNameSuccess",{count:String(l)}))}catch(h){if(h instanceof it)return;B.error(h instanceof Error?h.message:o("sandbox.categoryEditor.renameFailed"))}finally{F(!1)}}},yt=async(e,a)=>{const c={...m,slug:a},{writes:l,posts:h}=tt(e,c);F(!0);try{Y(c),await v.move({writes:l,deletes:[]},{shown:()=>V(n)}),B.success(h>0?o("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(h)}):o("sandbox.categoryEditor.renameSuccessNoPosts")),T(null)}catch(g){if(f(e),j(null),T(null),g instanceof it)return;B.error(g instanceof Error?g.message:o("sandbox.categoryEditor.renameFailed"))}finally{F(!1)}},bt=()=>{const e=te(Q);if(f(e),e===i)return;if(!e){f(i),j(null);return}const a=_.filter(l=>l.key!==n).map(l=>p(l.slug)).filter(Boolean);let c=e;if(a.includes(e)){c=ee(e,a);const l=o("sandbox.categoryEditor.slugDeduped",{slug:c});f(c),j(l),B.info(l)}else j(null);if(A===0&&Z===0){ht(c);return}T({oldSlug:i,newSlug:c,count:A,children:Z})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:p(m.name)||o("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(ue,{isPending:b.isPending||R.isPending||v.isPending,isError:b.isError||R.isError||v.isError}),E.length>0&&t.jsxs(fe,{children:[t.jsx(ye,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx(L,{size:14}),E.length," ",E.length===1?o("sandbox.postEditor.issueSingular"):o("sandbox.postEditor.issuePlural")]})}),t.jsx(be,{side:"bottom",children:xt})]}),J&&t.jsxs(et,{type:"button",variant:"outline",size:"sm",title:o("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(J,"_blank","noopener,noreferrer"),children:[t.jsx(Et,{size:14}),o("sandbox.categoryEditor.seeCategoryPreview")]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(he,{value:p(m.name),onChange:e=>N("name",e),readOnly:S,onBlur:()=>{ft()},placeholder:o("sandbox.categoryEditor.categoryNamePlaceholder"),className:"py-1 text-3xl font-bold text-foreground"}),gt&&t.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-xs text-warning",children:[t.jsx(L,{size:14,className:"mt-px shrink-0"}),o("sandbox.categoryEditor.duplicateNameWarning")]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(O,{htmlFor:"category-slug",children:o("sandbox.categoryEditor.slugLabel")}),t.jsx(ot,{id:"category-slug",value:Q,onChange:e=>{j(null),f(Kt(e.target.value))},onBlur:bt,placeholder:o("sandbox.categoryEditor.slugPlaceholder"),maxLength:80,className:"h-10"}),U&&t.jsxs("p",{className:"flex items-start gap-1.5 text-xs text-warning",children:[t.jsx(L,{size:14,className:"mt-px shrink-0"}),U]})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(O,{htmlFor:"category-parent",children:o("sandbox.categoryEditor.parentLabel")}),t.jsxs(Rt,{value:C||H,onValueChange:e=>N("parentSlug",e===H?void 0:e),children:[t.jsx(Lt,{id:"category-parent",className:"h-10 w-full",children:t.jsx(Ot,{})}),t.jsxs(zt,{children:[t.jsx(z,{value:H,children:o("sandbox.categoryEditor.parentNone")}),C&&!K.some(e=>e.slug===C)&&t.jsx(z,{value:C,children:C}),K.map(e=>t.jsx(z,{value:e.slug,children:t.jsx("span",{style:{paddingLeft:e.depth*12},children:e.label})},e.slug))]})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("sandbox.categoryEditor.parentDescription")})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(O,{htmlFor:"category-description",children:o("sandbox.categoryEditor.descriptionLabel")}),t.jsx(ot,{id:"category-description",value:p(m.description),onChange:e=>N("description",e.target.value),placeholder:o("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(Ht,{schema:ct,value:m,onChange:G,basePath:"category",meta:D,decofile:x,sandbox:{orgSlug:r,virtualMcpId:s,branch:u,threadId:$},onSaveReferencedBlock:q}),t.jsx(Mt,{icon:_t,title:o("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(ge,{value:xe(m.sections),onChange:e=>N("sections",e),meta:D,decofile:x,sandboxRef:{orgSlug:r,virtualMcpId:s,branch:u,threadId:$},previewBaseUrl:M,onSaveReferencedBlock:q,emptyMessage:o("sandbox.categoryEditor.noContentEmpty")})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(st,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:o("sandbox.categoryEditor.postsInCategory",{count:String(A)})})]}),t.jsxs(et,{type:"button",variant:"outline",size:"sm",disabled:!i,title:o(i?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>at(i),children:[o("sandbox.categoryEditor.addPostsButton"),t.jsx(At,{size:14})]})]}),A>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:X.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>nt(e.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-accent cursor-pointer",children:[t.jsx(st,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:e.title||o("sandbox.categoryEditor.untitledPost")}),e.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.slug})]})]})},e.key))})]})]})})]}),t.jsx(vt,{open:!!d,onOpenChange:e=>{e||S||(f(i),j(null),T(null))},children:t.jsxs(Nt,{children:[t.jsxs(Ct,{children:[t.jsx(wt,{children:o("sandbox.categoryEditor.renameDialogTitle")}),t.jsxs(Pt,{children:[d?o("sandbox.categoryEditor.renameDialogDescription",{oldSlug:d.oldSlug,newSlug:d.newSlug,count:String(d.count)}):null,d&&d.children>0?` ${o("sandbox.categoryEditor.renameDialogChildren",{count:String(d.children)})}`:null]})]}),t.jsxs(kt,{children:[t.jsx(Bt,{disabled:S,children:o("sandbox.categoryEditor.cancelButton")}),t.jsx(Dt,{onClick:e=>{e.preventDefault(),d&&yt(d.oldSlug,d.newSlug)},disabled:S,children:S?t.jsxs(t.Fragment,{children:[t.jsx(Tt,{className:"size-3.5"}),o("sandbox.categoryEditor.renamingLabel")]}):o("sandbox.categoryEditor.renameActionButton")})]})]})})]})}function vr(r){const s=jt.c(10),u=r.block!==void 0;let n;s[0]!==r?(n=t.jsx(je,{...r}),s[0]=r,s[1]=n):n=s[1];let y;return s[2]!==r.blockKey||s[3]!==r.branch||s[4]!==r.decofile||s[5]!==r.orgSlug||s[6]!==r.virtualMcpId||s[7]!==u||s[8]!==n?(y=t.jsx(Wt,{listing:r.decofile,orgSlug:r.orgSlug,virtualMcpId:r.virtualMcpId,branch:r.branch,blockKey:r.blockKey,present:u,children:n}),s[2]=r.blockKey,s[3]=r.branch,s[4]=r.decofile,s[5]=r.orgSlug,s[6]=r.virtualMcpId,s[7]=u,s[8]=n,s[9]=y):y=s[9],y}export{vr as CategoryEditor};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import{r as m,c as j,j as se,u as ze,a6 as Z,es as At,a8 as dt,q as Je,K as ne,t as pe,at as Me,av as Ce,aH as Ot,aI as Dt,d as ft,cC as Nt,aW as Lt,cK as Ze,cw as jt,cv as Ft,b as Ee,i as qt,am as Bt,e as Ut,an as Qt,a as Vt,J as Wt,T as Kt,et as Ht,eu as Gt,E as Xt}from"./index-BnCCUie5.js";import{u as pt,a as zt}from"./use-panel-navigate-CeualaFM.js";import{A as Ke,t as Jt,u as Yt,c as Zt,a as en,b as et,w as tn}from"./use-view-draft-kind-CXGnqfWm.js";import{c as nn,S as sn,b as rn,u as an,h as on,i as tt,f as nt,w as st,j as rt}from"./thread-intent-D0RsO42v.js";import{u as cn}from"./use-mcp-client-BwusBux_.js";import{a as ln,d as un}from"./repository-binding-jAJl13i7.js";import{c as dn}from"./use-entitlements-CdeJE9gN.js";import{u as ht,p as fn,a as ke,i as pn,b as hn}from"./use-ai-providers-Dc5ouLPu.js";import{u as mn}from"./use-current-view-dWMur2yx.js";import{a as mt,c as gn,u as yn}from"./thread-route-OiQ4LagC.js";import{u as Sn}from"./use-decopilot-events-BkY_xbdd.js";import{u as bn}from"./use-blog-view-DFNaVcP9.js";import{d as vn,b as gt,u as at}from"./use-organization-settings-D5A7oppe.js";const Tn={openrouter:e=>{const t=e?.openrouter;return typeof t=="object"&&t!==null&&"usage"in t&&typeof t.usage=="object"&&t.usage!==null&&"cost"in t.usage&&typeof t.usage.cost=="number"?t.usage.cost:null}};function yt(e){if(!e?.providerMetadata)return 0;for(const t of Object.values(Tn)){const n=t(e.providerMetadata);if(n!==null)return n}return 0}function kn(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function In(e,t){if(!t)return e;const n=t.inputTokenDetails?.cacheReadTokens??t.cachedInputTokens??0,s=t.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:e.inputTokens+(t.inputTokens??0),outputTokens:e.outputTokens+(t.outputTokens??0),reasoningTokens:e.reasoningTokens+(t.reasoningTokens??0),totalTokens:e.totalTokens+(t.totalTokens??0),cost:e.cost+yt(t),cacheReadTokens:e.cacheReadTokens+n,cacheWriteTokens:e.cacheWriteTokens+s}}function lr(e){const t=Math.max(e.inputTokens,e.cacheReadTokens+e.cacheWriteTokens);return t>0?e.cacheReadTokens/t:0}function ur(e){return e.reduce((t,n)=>In(t,n.metadata?.usage),kn())}function Mn(){let e=null;const t=new Set;return{get:()=>e,set:n=>{if(!(e&&e.value===n)){e={value:n};for(const s of t)s()}},subscribe:n=>(t.add(n),()=>t.delete(n))}}function Cn(e){const t=m.createContext(null);function n(o){const a=j.c(7),{source:r,children:u}=o,[l]=m.useState(Mn),d=m.useSyncExternalStore(l.subscribe,l.get);let i;a[0]!==u||a[1]!==d?(i=d&&se.jsx(e,{value:d.value,children:u}),a[0]=u,a[1]=d,a[2]=i):i=a[2];let S;return a[3]!==r||a[4]!==l||a[5]!==i?(S=se.jsxs(t,{value:l,children:[r,i]}),a[3]=r,a[4]=l,a[5]=i,a[6]=S):S=a[6],S}function s(o){const a=j.c(3),r=m.use(t);if(!r)throw new Error("A keyed context source must render inside its Host");let u;a[0]!==r||a[1]!==o?(u=()=>{r.set(o)},a[0]=r,a[1]=o,a[2]=u):u=a[2],m.useLayoutEffect(u)}return{Host:n,usePublish:s}}function xn(e,t=[]){return e==="stop"?"completed":e==="tool-calls"?t.some(s=>s.type==="tool-user_ask"&&s.state==="input-available"||s.state==="approval-requested")?"requires_action":"completed":"failed"}function wn(e){return e.thread?.harness_id!=null?{}:{branch:e.globals.branch??null}}const $n=new Set(["decopilot","claude-code","codex"]);function En(e){return e!=null&&!$n.has(e)}let we=null;const He=new Set;function Pn(e){return He.add(e),()=>{He.delete(e)}}function St(e){if(we!==e){we=e;for(const t of He)t()}}function dr(){St(null)}function _n(){const e=ze({strict:!1}),t=pt(),{org:n}=Z(),s=mt(),o=m.useSyncExternalStore(Pn,()=>we,()=>we),a=At(t)?.path??e.preview??e.skill??e.brand??null;if(!a)return we=null,null;const r=`${n.id}:${s??""}:${a}`;return r===o?null:{path:a,dismiss:()=>St(r)}}const xe="/app/org",Rn="org/";function fr(e){const t=e.startsWith("./")?e.slice(2):e;for(const n of[`${xe}/`,Rn]){if(!t.startsWith(n))continue;const s=t.slice(n.length);return s.split("/").includes("..")?null:s}return null}const qe="home",An=new Set(["output","upload","public","home"]),On=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function pr(e){return An.has(e)||!On.test(e)?"home":e}const Ge="projects";function bt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Dn(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function vt(e){return e!=="."&&e!==".."&&!/[/\\%]/.test(e)}function Tt(e){return bt(e.metadata)?e.metadata:{}}function Nn(e){const t=Tt(e),n=bt(t.project)?t.project:{};if(typeof n.folder!="string")return null;const s=n.folder.split("/").map(o=>o.trim()).filter(Boolean);return s.length===0||!s.every(vt)?null:s.join("/")}function Ln(e){const t=Tt(e).projectFolderName;if(typeof t!="string")return null;const n=t.trim();return n&&vt(n)?n:null}function jn(e){return Ln(e)??(Dn(e.title??"")||e.id)}function Fn(e){const t=Nn(e);return[Ge,t,jn(e)].filter(n=>!!n).join("/")}function hr(e){return`${qe}/${Fn(e)}`}function qn(e){const t=e?e.split("/").filter(Boolean):[],n=t[0]==="public",s=n?t[1]??null:null,o=n?s?`public-${s}`:null:t[0]??null,a=(n?t.slice(2):t.slice(1)).join("/");return{segments:t,volume:o,dirPath:a,isPublic:n,publicSet:s,readOnly:n,isHomeRoot:o===qe&&a===""}}function Bn(e){return e==="public"?"skills":e}function mr(e,t){return e.isPublic&&e.publicSet?`public/${e.publicSet}/${t}`:e.volume?`${e.volume}/${t}`:t}const ot="public-";function kt(e){return e.startsWith(ot)?e.slice(ot.length):null}function gr(e,t){const n=kt(e);return n?`public/${n}/${t}`:`${e}/${t}`}function Un(e){const t=e.lastIndexOf("/");return t===-1?e:e.slice(t+1)}function Qn(e){const{volume:t,dirPath:n}=qn(e);if(!t)return null;let s;if(t==="home")s=`${xe}/${qe}`;else if(t==="outputs")s=`${xe}/.outputs`;else if(t==="uploads")s=`${xe}/.uploads`;else{const o=kt(t);s=`${xe}/${o?`public/${o}`:t}`}return n?`${s}/${n}`:s}function yr(e,t){const n=e.split("/").filter(Boolean),s=t.split("/").filter(Boolean),a=s.every((r,u)=>n[u]===r)?s.length:0;return n.slice(a).map((r,u)=>({label:Bn(r),path:n.slice(0,a+u+1).join("/")}))}const It=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Sr(e){return It.test(e)}function br(e){const t=e.split("/").slice(0,-1);for(;t.length>0&&It.test(t.at(-1)??"");)t.pop();return t.join("/")}function vr(e){if(e.isPublic)return"public";if(e.volume===qe){const[t]=e.dirPath.split("/");return t===Ge?Ge:"all"}return e.volume??"all"}function Vn(e){const t=j.c(16);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},t[0]=n):n=t[0];const s=dt(n),o=_n()?.path??null,a=mn();let r;if(t[1]!==s?.params.appSlug||t[2]!==s?.params.collectionName||t[3]!==s?.params.itemId||t[4]!==o||t[5]!==a||t[6]!==e){if(r=[],e&&r.push(`### Selected Agent
|
|
2
|
-
- ID: ${e}`),a&&r.push(`### Current Page
|
|
3
|
-
The user is looking at: ${a.title}${a.project?`
|
|
4
|
-
- Project: ${a.project.title} (ID: ${a.project.id})`:""}
|
|
5
|
-
|
|
6
|
-
When a request is ambiguous about what it refers to ("this", "here", "this page"), assume it means what is on this page.`),o){let l;t[8]!==o?(l=Qn(o),t[8]=o,t[9]=l):l=t[9];const d=l;let i;t[10]!==o?(i=Un(o),t[10]=o,t[11]=i):i=t[11],r.push(`### Currently Open File
|
|
7
|
-
The user has this file open in the Library and is most likely referring to it:
|
|
8
|
-
- Name: ${i}
|
|
9
|
-
- Library path: ${o}${d?`
|
|
10
|
-
- Read/edit it with your file tools at: \`${d}\``:""}
|
|
11
|
-
|
|
12
|
-
When a request is ambiguous about which file or resource it targets (e.g. "change the h1", "fix this", "what's in this file", "update the title"), assume it means this file unless the user clearly indicates otherwise.`)}let u;t[12]!==s?.params.appSlug||t[13]!==s?.params.collectionName||t[14]!==s?.params.itemId?(u=[],s?.params.appSlug&&u.push(`- Connection ID: ${s?.params.appSlug}`),s?.params.collectionName&&u.push(`- Collection: ${s?.params.collectionName}`),s?.params.itemId&&u.push(`- Item ID: ${s?.params.itemId}`),t[12]=s?.params.appSlug,t[13]=s?.params.collectionName,t[14]=s?.params.itemId,t[15]=u):u=t[15],u.length>0&&r.push(`### Current Resource
|
|
13
|
-
The user is viewing the following resource:
|
|
14
|
-
${u.join(`
|
|
15
|
-
`)}
|
|
16
|
-
|
|
17
|
-
Help the user understand and work with this resource.`),t[1]=s?.params.appSlug,t[2]=s?.params.collectionName,t[3]=s?.params.itemId,t[4]=o,t[5]=a,t[6]=e,t[7]=r}else r=t[7];return r.join(`
|
|
18
|
-
|
|
19
|
-
`)}const it="ORGANIZATION_PLAN_OBJECTIVE_SET";function Wn(e){return e.some(t=>{if(t.state!=="output-available")return!1;const n=typeof t.toolName=="string"?t.toolName:t.type.startsWith("tool-")?t.type.slice(5):"";return n===it||n.endsWith(`__${it}`)})}function Kn(){const e=j.c(5),t=Je(),{org:n}=Z();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=s):s=e[0];const o=dt(s);let a;return e[1]!==o?.params||e[2]!==n||e[3]!==t?(a=r=>{const l=r.toolCall.toolName.match(/^COLLECTION_([A-Z_]+)_(CREATE|UPDATE|DELETE)$/);if(!l||!l[1])return;const d=l[1],i=o?.params.appSlug;if(!i)return;t.invalidateQueries({queryKey:ne.collection(n.slug,i,d)});const S=d.toLowerCase().replace(/_/g," ");pe.success(`${S} updated`)},e[1]=o?.params,e[2]=n,e[3]=t,e[4]=a):a=e[4],a}function Hn(){const e=j.c(4),{org:t,project:n}=Z(),s=`${t.id}/${n.id}`;let o;e[0]!==s?(o=Ce.taskLastViewed(s),e[0]=s,e[1]=o):o=e[1];const[,a]=Me(o,Gn);let r;return e[2]!==a?(r={markTaskRead:l=>{a(d=>({...d,[l]:new Date().toISOString()}))}},e[2]=a,e[3]=r):r=e[3],r}function Gn(e){return e??{}}function Xn(e,t,n){return`deco:preview:last-page:${e}:${t}:${n}`}function zn(e){if(!e)return null;try{const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t)||typeof t.path!="string"||!t.path.startsWith("/"))return null;const n=typeof t.pageKey=="string"?t.pageKey:null,s={};if(t.params&&typeof t.params=="object")for(const[o,a]of Object.entries(t.params))typeof a=="string"&&(s[o]=a);return{path:t.path,pageKey:n,params:s}}catch{return null}}function Tr(e){try{return zn(localStorage.getItem(e))}catch{return null}}function Jn(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}const Yn=Ot({path:Dt()}),je=new Map,ct="http://preview.invalid";function Zn(e){try{const t=new URL(e,ct);return t.origin!==ct?null:t.pathname+t.search+t.hash}catch{return null}}function es(e,t){const n=Zn(t);if(n){Jn(e,{path:n,pageKey:null,params:{}});for(const s of je.get(e)??[])s(n)}}function kr(e,t){const n=m.useRef(t);n.current=t,m.useEffect(()=>{if(!e)return;const s=a=>n.current(a);let o=je.get(e);return o||(o=new Set,je.set(e,o)),o.add(s),()=>{o.delete(s),o.size===0&&je.delete(e)}},[e])}function Mt(){const e=j.c(14),t=ft(),{org:n}=Z(),s=mt(),o=gn(),a=yn(),r=pt();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={strict:!1},e[0]=u):u=e[0];const l=ze(u),d=nn(),i=bn();let S;e[1]!==r||e[2]!==i||e[3]!==d?.threads||e[4]!==t||e[5]!==n||e[6]!==a||e[7]!==l||e[8]!==o?(S=(I,_)=>{const P=r&&(_?.keepView||!Nt(r))?r:void 0,T=_?.virtualMcpId??o,M=Lt(n.id).id;if(T===M&&a===void 0&&P&&Ze(P).kind==="org-destination"){t({to:".",search:D=>({...D,thread:I,mainpanel:void 0,autosend:_?.autosend?Ke:void 0})});return}const E=T===o&&P&&Ze(P).kind!=="org-destination"?Jt(P,d?.threads.get().find(D=>D.id===I),i)??P:"overview",F=jt({org:n.slug,agentId:T,superAgentId:M,tabId:E});Ft(t,F,{search:()=>({thread:I,...typeof l.sidepanel=="boolean"?{sidepanel:l.sidepanel}:{},..._?.autosend?{autosend:Ke}:{}}),replace:!1})},e[1]=r,e[2]=i,e[3]=d?.threads,e[4]=t,e[5]=n,e[6]=a,e[7]=l,e[8]=o,e[9]=S):S=e[9];const w=S;let p;return e[10]!==w||e[11]!==s||e[12]!==o?(p={virtualMcpId:o,taskId:s,navigateToTask:w},e[10]=w,e[11]=s,e[12]=o,e[13]=p):p=e[13],p}function ts(e,t){const{mimeType:n,data:s}=e;if(n.startsWith("text/"))try{const o=new TextDecoder().decode(Uint8Array.from(atob(s),a=>a.charCodeAt(0)));return[{type:"text",text:`${t}
|
|
20
|
-
${o}`}]}catch(o){console.error("Failed to decode text file:",o)}return[{type:"file",url:`data:${n};base64,${s}`,filename:t,mediaType:n}]}function lt(e,t){const n=[];for(const s of e)!s||typeof s!="object"||("text"in s&&s.text?n.push({type:"text",text:`[${t}]
|
|
21
|
-
${s.text}`}):"blob"in s&&s.blob&&s.mimeType&&n.push({type:"file",url:`data:${s.mimeType};base64,${s.blob}`,filename:String(s.uri),mediaType:String(s.mimeType)}));return n}function ns(e,t){const n=(e.files??[]).filter(r=>r.content?.trim()),s=e.omittedPaths??[];if(n.length===0&&s.length===0)return[];const o=n.map(r=>`<skill-file path="${r.relPath}">
|
|
22
|
-
${r.content.trim()}
|
|
23
|
-
</skill-file>`).join(`
|
|
24
|
-
|
|
25
|
-
`),a=s.length>0?`
|
|
26
|
-
|
|
27
|
-
Other files in \`${e.sandboxPath}/\`: ${s.join(", ")}`:"";return[{type:"text",text:`[${t}]
|
|
28
|
-
${o}${a}`}]}function ss(e,t){const n=[];for(const s of e){if(s.role!=="user"||!s.content)continue;const o=Array.isArray(s.content)?s.content:[s.content];for(const a of o)switch(a.type){case"text":{const r=a.text?.trim();if(!r)continue;n.push({type:"text",text:`[${t}]
|
|
29
|
-
${r}`});break}case"image":case"audio":{if(!a.data||!a.mimeType)continue;n.push({type:"file",url:`data:${a.mimeType};base64,${a.data}`,mediaType:a.mimeType});break}case"resource":{const r=a.resource;if(!r||!r.mimeType)continue;r&&("text"in r&&r.text?n.push({type:"text",text:`[${t}]
|
|
30
|
-
${r.text}`}):"blob"in r&&r.blob&&r.mimeType&&n.push({type:"file",url:`data:${r.mimeType};base64,${r.blob}`,filename:String(r.uri),mediaType:String(r.mimeType)}));break}}}return n}const rs=new Set(["paragraph","heading","codeBlock"]),as={bold:"**",italic:"_",strike:"~~",code:"`"};function os(e,t){return t===e||t.replace(/^(?:[a-z]+:\/\/|mailto:)/i,"")===e}function is(e,t){if(!t?.length)return e;const[,n="",s="",o=""]=/^(\s*)([\s\S]*?)(\s*)$/.exec(e)??[];if(!s)return e;let a=s;const r=[...t].sort((d,i)=>+(i.type==="code")-+(d.type==="code"));for(const d of r){const i=as[d.type];i&&(a=`${i}${a}${i}`)}const l=t.find(d=>d.type==="link")?.attrs?.href;return typeof l=="string"&&l&&!os(s,l)&&(a=`[${a}](${l})`),`${n}${a}${o}`}function Ct(e){if(!e)return[];const t=[];let n="",s=0,o=!1;const a=r=>{if(!r)return;const u=" ".repeat(s);if(r.type==="bulletList"||r.type==="orderedList"){const l=typeof r.attrs?.start=="number"?r.attrs.start:1;("content"in r&&Array.isArray(r.content)?r.content:[]).forEach((i,S)=>{n!==""&&(n+=`
|
|
31
|
-
`),n+=u+(r.type==="orderedList"?`${l+S}. `:"- "),o=!0,s++,a(i),s--,o=!1});return}if(rs.has(r.type??"")&&(o?o=!1:n!==""&&(n+=`
|
|
32
|
-
`+u)),r.type==="hardBreak")n+=`
|
|
33
|
-
`+u;else if(r.type==="text"&&"text"in r&&typeof r.text=="string")n+=is(r.text,r.marks);else if(r.type==="mention"&&r.attrs){const l=r.attrs.char??"/",d=`${l}${r.attrs.name}`;if(r.attrs.kind==="task"){const i=r.attrs.metadata,S=i?.title??r.attrs.name??"",w=i?.context?.trim()||[S,i?.description?.trim()].filter(Boolean).join(`
|
|
34
|
-
|
|
35
|
-
`);w&&t.push({type:"text",text:w});return}if(n+=d,l==="@"){const i=r.attrs.metadata;i&&typeof i=="object"&&!Array.isArray(i)&&"agentId"in i?t.push({type:"text",text:`[DELEGATE TO AGENT: ${i.title??r.attrs.name} (agent_id: ${i.agentId})]
|
|
36
|
-
Use the subtask tool to delegate this task to the agent above. Include the full relevant context from this conversation in the prompt field — the subagent has no conversation history.`}):Array.isArray(i)&&t.push(...lt(i,d))}else if(r.attrs.kind==="skill"){const i=r.attrs.metadata;i&&!Array.isArray(i)&&Array.isArray(i.files)&&t.push(...ns(i,d))}else{const i=r.attrs.metadata||r.attrs.prompts||[];Array.isArray(i)&&i.length>0&&typeof i[0]=="object"&&i[0]!==null&&"role"in i[0]?t.push(...ss(i,d)):Array.isArray(i)&&t.push(...lt(i,d))}}else if(r.type==="file"&&r.attrs){const l=r.attrs,d=`[file:://${encodeURIComponent(l.name)}]`;n+=d,t.push(...ts(l,d))}if("content"in r&&Array.isArray(r.content))for(const l of r.content)a(l)};return a(e),n.trim()&&t.unshift({type:"text",text:n.trim()}),t}function Ir(e){const t=Ct(e);return t.length===0?[]:[{id:crypto.randomUUID(),role:"user",parts:t,metadata:{tiptapDoc:e}}]}function Mr(e){return new Set(e.filter(t=>t.status==="queued").map(t=>t.messageId))}function cs(e){return(e??[]).map(t=>t?.type==="text"&&typeof t.text=="string"?t.text:"").join("").trim()}function Cr(e){return e.filter(t=>t.status==="queued").sort((t,n)=>t.enqueuedAt-n.enqueuedAt)}function ls(e,t){return e.some(n=>n.messageId===t.messageId)?e:[...e,t]}function us(e,t){return e.filter(n=>n.messageId!==t)}const le=new Map,ds=200,Fe=new Map;function fs(e){if(le.size<ds||le.has(e))return;const t=le.keys().next().value;if(t!==void 0){le.delete(t),Be.delete(t),Fe.delete(t);for(const n of be.keys())n.startsWith(`${t}:`)&&be.delete(n)}}const Be=new Set;function ps(e){Be.add(e)}function hs(e){return Be.has(e)}function ms(e){Be.delete(e)}function Pe(e){const t=le.get(e);if(t)return le.delete(e),le.set(e,t),t;fs(e);const n=new sn([]);return le.set(e,n),n}function xt(e,t){Pe(e).update(n=>ls(n,t))}function Xe(e,t){Pe(e).update(n=>us(n,t))}function gs(e,t){Pe(e).set(t)}const be=new Map;function ys(e,t){be.set(`${e}:${t.id}`,t)}function Ss(e,t){const n=`${e}:${t}`,s=be.get(n);return be.delete(n),s}function We(e,t){be.delete(`${e}:${t}`)}async function ce(e,t){const n=(Fe.get(t)??0)+1;Fe.set(t,n);try{const s=await fetch(`/api/${encodeURIComponent(e)}/decopilot/queue/${encodeURIComponent(t)}`,{credentials:"include"});if(!s.ok)return;const o=await s.json();if(Fe.get(t)!==n)return;gs(t,o.items??[])}catch{}}const bs="data-live-message";function vs(e){if(typeof e!="object"||e===null)return null;const{type:t,data:n}=e;if(t!==bs)return null;const s=n?.messageId;return typeof s=="string"&&s.length>0?s:null}function ut(e){return e.role==="user"&&!!e.metadata?.liveRunId}function Ts(e,t){return{...e,metadata:{...e.metadata,liveRunId:t}}}function xr(e,t){const n=new Set;for(const r of e)if(r.role==="assistant")for(const u of r.parts){const l=vs(u);l&&n.add(l)}const s=new Map,o=[],a=[];for(const r of e)ut(r)&&n.has(r.id)?s.set(r.id,r):ut(r)&&t?o.push(r):a.push(r);return{visible:a,read:s,pending:o}}const ks=m.createContext({read:new Map,pending:[]});function wr(){return m.useContext(ks)}function $r(e){const t=j.c(2);let n;t[0]!==e?(n=Pe(e),t[0]=e,t[1]=n):n=t[1];const s=n;return m.useSyncExternalStore(s.subscribe,s.get,s.get)}function Is(){const{org:e}=Z(),t=Ee();return{enqueue:xt,refresh:n=>ce(e.slug,n),cancel:async(n,s)=>{const o=`thread-run:${n}:${s}`;Xe(n,s);try{const a=await fetch(`/api/${encodeURIComponent(e.slug)}/decopilot/queue/${encodeURIComponent(n)}/cancel/${encodeURIComponent(o)}`,{method:"POST",credentials:"include"});if(!a.ok&&a.status!==404)throw new Error(`Cancel failed: ${a.status}`);return!0}catch{return pe.error(t("chat.queueTray.cancelFailed")),!1}finally{await ce(e.slug,n)}}}}function Le(e,t){return e.find(n=>n!=null&&t.has(n.keyId))??null}function Ms(e,t,n){const s=o=>Le([o],n);return{tiers:{fast:Le([t.tiers.fast,e.tiers.fast],n),smart:Le([t.tiers.smart,e.tiers.smart],n),thinking:Le([t.tiers.thinking,e.tiers.thinking],n),image:s(e.tiers.image),web_search:s(e.tiers.web_search),deep_research:s(e.tiers.deep_research)}}}const $e={tiers:{}};function Cs(){const e=j.c(7),{org:t}=Z();let n;e[0]!==t.id?(n=ne.userModelPreferences(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==t.slug?(s=async()=>{const a=await Qt(t.slug,"USER_MODEL_PREFERENCES_GET",{});return a?.tiers?a:$e},e[2]=t.slug,e[3]=s):s=e[3];let o;return e[4]!==n||e[5]!==s?(o={queryKey:n,queryFn:s,staleTime:6e4},e[4]=n,e[5]=s,e[6]=o):o=e[6],qt(o)}function xs(){return Cs().data??$e}function Er(){const e=j.c(19),{org:t}=Z(),n=Bt(),s=Je();let o;e[0]!==t.id?(o=ne.userModelPreferences(t.id),e[0]=t.id,e[1]=o):o=e[1];const a=o;let r;e[2]!==a||e[3]!==s||e[4]!==n?(r=async w=>{const p=s.getQueryData(a)??$e;return await n.call("USER_MODEL_PREFERENCES_UPDATE",p)??p},e[2]=a,e[3]=s,e[4]=n,e[5]=r):r=e[5];let u,l,d,i;e[6]!==a||e[7]!==s?(u=w=>{const{tier:p,slot:I}=w,_=s.getQueryData(a),P=_??$e;return s.setQueryData(a,{tiers:{...P.tiers,[p]:I}}),{prev:_}},l=(w,p,I)=>{s.setQueryData(a,I?.prev??$e)},d=w=>{s.setQueryData(a,w)},i=()=>{s.isMutating({mutationKey:a})===1&&s.invalidateQueries({queryKey:a})},e[6]=a,e[7]=s,e[8]=u,e[9]=l,e[10]=d,e[11]=i):(u=e[8],l=e[9],d=e[10],i=e[11]);let S;return e[12]!==a||e[13]!==r||e[14]!==u||e[15]!==l||e[16]!==d||e[17]!==i?(S={mutationKey:a,mutationFn:r,onMutate:u,onError:l,onSuccess:d,onSettled:i},e[12]=a,e[13]=r,e[14]=u,e[15]=l,e[16]=d,e[17]=i,e[18]=S):S=e[18],Ut(S)}function ws(){const e=j.c(4),t=vn(),n=xs(),s=ht();let o;return e[0]!==s||e[1]!==t||e[2]!==n?(o=Ms(t,n,new Set(s.map($s))),e[0]=s,e[1]=t,e[2]=n,e[3]=o):o=e[3],o}function $s(e){return e.id}function fe(e,t,n,s){if(!e)return null;const o=t.find(r=>r.id===e.keyId);if(!o)return null;const a=n.find(r=>r.modelId===e.modelId);return a?{...a,keyId:e.keyId}:{modelId:e.modelId,title:s??e.modelId,keyId:e.keyId,providerId:o.providerId,description:null,logo:null,capabilities:[],limits:null,costs:null}}function Es(e){return e==="fast"||e==="smart"||e==="thinking"?e:"smart"}function Ps(e,t,n,s){if(!n||s.length===0)return null;const o=t.find(l=>l.id===n);if(!o)return null;const a=fn([o],{[n]:s}),r=e==="fast"?a.chat.fast:e==="thinking"?a.chat.thinking:a.chat.smart;if(!r)return null;const u=s.find(l=>l.modelId===r.modelId);return u?{...u,keyId:n}:null}const Ie=new Set,_s=500;function Rs(e){if(Ie.has(e))return!1;if(Ie.size>=_s){const t=Ie.values().next().value;t!==void 0&&Ie.delete(t)}return Ie.add(e),!0}const Y=new Set;function Se(e){return m.useSyncExternalStore(e.subscribe,e.get,e.get)}function As(e){return e.kind==="loading"?"ready":e.kind}function wt(e){return e&&typeof e=="object"&&"type"in e?{tiptapDoc:e}:e}const Os=1e4,Ds=10,Ue=m.createContext(null),_e=m.createContext(null),Ye=m.createContext(null),$t=m.createContext(null);function Pr(e){const t=j.c(3),{value:n,children:s}=e;let o;return t[0]!==s||t[1]!==n?(o=se.jsx(_e.Provider,{value:n,children:s}),t[0]=s,t[1]=n,t[2]=o):o=t[2],o}function _r(e){const t=j.c(2),{children:n}=e;let s;return t[0]!==n?(s=se.jsx(Ue.Provider,{value:null,children:se.jsx(_e.Provider,{value:null,children:n})}),t[0]=n,t[1]=s):s=t[1],s}function Ns({children:e}){const{locator:t}=Z(),{virtualMcpId:n}=Mt(),[s,o]=Me(Ce.chatSelectedImageModel(t),null),[a,r]=Me(Ce.chatSelectedWebSearchModel(t),null),[u,l]=Me(Ce.chatSelectedDeepResearchModel(t),null),[d,i]=m.useState(null),[S,w]=m.useState("default"),p=ws(),[I,_]=Me(Ce.chatSimpleModeTier(t),null),P=Es(I),T=ht(),M=p.tiers[P],E=T.some(f=>f.id===M?.keyId)?M?.keyId:void 0,F=d&&T.some(f=>f.id===d)?d:E??T[0]?.id??null,{models:D,isLoading:re}=ke(F??void 0),{models:R}=ke(E),he=T.some(f=>f.id===p.tiers.image?.keyId)?p.tiers.image?.keyId:void 0,{models:W}=ke(he),K=T.some(f=>f.id===p.tiers.web_search?.keyId)?p.tiers.web_search?.keyId:void 0,{models:q}=ke(K),H=T.some(f=>f.id===p.tiers.deep_research?.keyId)?p.tiers.deep_research?.keyId:void 0,{models:ee}=ke(H),ae=fe(M,T,R,M?.title)??Ps(P,T,F,D),Q=re,G=D.filter(f=>f.capabilities?.includes("image")),oe=fe(s,T,G),ie=fe(p.tiers.image,T,W,p.tiers.image?.title)??oe??G[0]??null,h=D.filter(pn),N=fe(a,T,h),B=h.find(f=>f.modelId==="perplexity/sonar")??h[0]??null,O=fe(p.tiers.web_search,T,q,p.tiers.web_search?.title)??N??B,k=D.filter(hn),V=fe(u,T,k),te=k.find(f=>f.modelId==="perplexity/deep-research")??k.find(f=>f.asyncResearch===!0)??k[0]??null,C=fe(p.tiers.deep_research,T,ee,p.tiers.deep_research?.title)??V??te,L=ln(n),X=un().find(f=>f.id===n),Qe=L??X??{id:n,title:"",description:null,icon:null},[Re,Ae]=m.useState({}),Oe=(f,Ne)=>{const me=[];for(const c of Ne.content??[])c.type==="text"&&c.text?.trim()&&me.push(c.text.trim());const ge=me.join(`
|
|
37
|
-
`);if(!ge){ve(f);return}new TextEncoder().encode(ge).length>Os||Ae(c=>Object.keys(c).length>=Ds&&!(f in c)?c:{...c,[f]:ge})},ve=f=>{Ae(Ne=>{const{[f]:me,...ge}=Ne;return ge})},[ue,Te]=m.useState(void 0),De=m.useRef(ue);De.current=ue;const Ve={selectedModel:ae,setModel:()=>{},credentialId:F,setCredentialId:i,allModelsConnections:T,isModelsLoading:Q,selectedVirtualMcp:Qe,imageModel:ie,setImageModel:f=>{o(f?.keyId?{keyId:f.keyId,modelId:f.modelId}:null)},webSearchModel:O,setWebSearchModel:f=>{r(f?.keyId?{keyId:f.keyId,modelId:f.modelId}:null)},deepResearchModel:C,setDeepResearchModel:f=>{l(f?.keyId?{keyId:f.keyId,modelId:f.modelId}:null)},chatMode:S,setChatMode:w,appContexts:Re,setAppContext:Oe,clearAppContext:ve,tiptapDoc:ue,setTiptapDoc:Te,tiptapDocRef:De,resetInteraction:()=>{},simpleModeTier:P,setSimpleModeTier:f=>_(f)};return se.jsx(Ye.Provider,{value:Ve,children:e})}function Rr(e){const t=j.c(45),{virtualMcpId:n,task:s,children:o}=e,{locator:a}=Z(),{data:r}=Vt.useSession(),u=r?.user??null,{taskId:l,virtualMcpId:d,navigateToTask:i}=Mt(),[S]=Wt(),{markTaskRead:w}=Hn(),p=rn(),I=l,_=d,P=Vn(_);let T;t[0]!==w||t[1]!==i?(T=(O,k)=>{w(O),i(O,{virtualMcpId:k?.virtualMcpId,autosend:k?.autosend,keepView:k?.keepView})},t[0]=w,t[1]=i,t[2]=T):T=t[2];const M=T,E=I!==null&&s?.id===I?s:null,F=E?.harness_id??null,D=E?.branch??null,re=F!=null,R=D,W=gt()?null:R,K=Yt();let q;t[3]!==W||t[4]!==K||t[5]!==a||t[6]!==M||t[7]!==r?.user||t[8]!==p||t[9]!==n?(q=O=>{const k=crypto.randomUUID(),V=O?.branch??W,te=K==="blog"?et(V,nt(r?.user)):null,C=te?.branch??V,L=O?.runtime??te?.runtime;return st(sessionStorage,a,k,{...L?{runtime:L}:{},...C?{branch:C}:{}}),p.create({id:k,virtual_mcp_id:n,...C?{branch:C}:{},...L?{runtime:L}:{}}).then(()=>{rt(sessionStorage,a,k),M(k)}).catch(()=>{M(k)}),k},t[3]=W,t[4]=K,t[5]=a,t[6]=M,t[7]=r?.user,t[8]=p,t[9]=n,t[10]=q):q=t[10];const H=q;let ee;t[11]!==W||t[12]!==K||t[13]!==a||t[14]!==M||t[15]!==r?.user||t[16]!==p||t[17]!==n?(ee=O=>{const k=crypto.randomUUID(),V=O.virtualMcpId??n,te=V===n,C=te?W:null,L=te&&K==="blog"?et(C,nt(r?.user)):null,X=L?.branch??C;tn(sessionStorage,a,k,O.message),st(sessionStorage,a,k,{...L?.runtime?{runtime:L.runtime}:{},...X?{branch:X}:{}}),p.create({id:k,virtual_mcp_id:V,...X?{branch:X}:{},...L?.runtime?{runtime:L.runtime}:{}}).then(()=>{rt(sessionStorage,a,k),M(k,{virtualMcpId:O.virtualMcpId,autosend:!0,keepView:V===n})}).catch(()=>{M(k,{virtualMcpId:O.virtualMcpId,autosend:!0,keepView:V===n})})},t[11]=W,t[12]=K,t[13]=a,t[14]=M,t[15]=r?.user,t[16]=p,t[17]=n,t[18]=ee):ee=t[18];const ae=ee;let Q;t[19]!==I||t[20]!==p?(Q=O=>{I&&p.setBranch(I,O)},t[19]=I,t[20]=p,t[21]=Q):Q=t[21];let G;t[22]!==E||t[23]!==H||t[24]!==ae||t[25]!==R||t[26]!==I||t[27]!==_||t[28]!==re||t[29]!==D||t[30]!==F||t[31]!==M||t[32]!==Q?(G={virtualMcpId:_,taskId:I,openTask:M,createTask:H,createTaskWithMessage:ae,activeTask:E,isThreadLocked:re,lockedHarness:F,lockedBranch:D,currentBranch:R,setCurrentTaskBranch:Q},t[22]=E,t[23]=H,t[24]=ae,t[25]=R,t[26]=I,t[27]=_,t[28]=re,t[29]=D,t[30]=F,t[31]=M,t[32]=Q,t[33]=G):G=t[33];const oe=G;let ie;t[34]!==P||t[35]!==S||t[36]!==i||t[37]!==u?(ie={user:u,contextPrompt:P,preferences:S,rawNavigateToTask:i},t[34]=P,t[35]=S,t[36]=i,t[37]=u,t[38]=ie):ie=t[38];const h=ie;let N;t[39]!==o||t[40]!==h?(N=se.jsx(Ns,{children:se.jsx($t.Provider,{value:h,children:o})}),t[39]=o,t[40]=h,t[41]=N):N=t[41];let B;return t[42]!==N||t[43]!==oe?(B=se.jsx(_e.Provider,{value:oe,children:N}),t[42]=N,t[43]=oe,t[44]=B):B=t[44],B}const Ls=[],js=Promise.resolve();function Ar(){return Pt(Fs()),null}function Fs(){const e=j.c(2),{createTaskWithMessage:t}=_t();let n;return e[0]!==t?(n={ready:js,messages:Ls,status:"ready",sendMessage:async o=>{t({message:wt(o)})},editQueuedMessage:Hs,stop:Ks,submit:Ws,removeLocalMessage:Vs,isSendInFlight:Qs,error:null,clearError:Us,finishReason:null,runStatusStage:null,clearFinishReason:Bs,isStreaming:!1,isChatEmpty:!0,isWaitingForApprovals:!1,isRunInProgress:!1,hasMoreOlder:!1,isFetchingOlder:!1,fetchOlderMessages:qs},e[0]=t,e[1]=n):n=e[1],n}async function qs(){}function Bs(){}function Us(){}function Qs(){return!1}function Vs(){}async function Ws(){}function Ks(){}async function Hs(){return!1}const Et=Cn(Ue),Pt=Et.usePublish,Or=Et.Host;function Dr(e){const{taskId:t}=e;return Pt(Gs(t)),null}function Gs(e){const t=Ee(),n=at("voice_mode"),s=gt(),o=at("chat_harness_codex"),{virtualMcpId:a,activeTask:r,currentBranch:u}=_t(),l=En(r?.harness_id),d=t("chat.input.codingAgentUnavailable");Rs(e)&&Xt("chat_opened",{thread_id:e});const{imageModel:i,webSearchModel:S,deepResearchModel:w,chatMode:p,setChatMode:I,appContexts:_,setTiptapDoc:P,simpleModeTier:T}=Xs(),M=m.useContext($t);if(!M)throw new Error(t("chat.chatContext.activeTaskProviderMissingContext"));const{user:E,contextPrompt:F,preferences:D,rawNavigateToTask:re}=M,{org:R,locator:he}=Z(),W=Is(),[K,q]=m.useState(null),H=()=>{q(new Error(d))},ee=Kn(),ae=Je(),Q=an(),G=ft(),{openPanel:oe}=zt(),ie=cn({connectionId:Kt,orgId:R.id,orgSlug:R.slug}),h=on(R.slug,e,{client:ie}),N=Se(h.messages),B=Se(h.status),O=Se(h.finishReason),k=Se(h.runStatusStage),V=Se(h.hasMoreOlder),te=Se(h.isFetchingOlder),C=m.useRef({onToolCall:ee,queryClient:ae,rawNavigateToTask:re,taskId:e,manager:Q,navigate:G,openPanel:oe,orgId:R.id,orgSlug:R.slug,virtualMcpId:a,currentBranch:u});C.current={onToolCall:ee,queryClient:ae,rawNavigateToTask:re,taskId:e,manager:Q,navigate:G,openPanel:oe,orgId:R.id,orgSlug:R.slug,virtualMcpId:a,currentBranch:u};const L=()=>{const c=C.current;hs(c.taskId)&&(async()=>(await ce(c.orgSlug,c.taskId),await h.reconcileFromServer()&&Pe(c.taskId).get().length===0&&ms(c.taskId)))()};Sn({orgSlug:R.slug,taskId:e,onTaskStatus:c=>{const b=C.current,A=c.data.message_id;if(c.data.status==="in_progress"&&A){Xe(b.taskId,A);const x=Ss(b.taskId,A);x&&h.applyLocalMessage(x),ce(b.orgSlug,b.taskId)}L()},onReconnect:L}),m.useEffect(()=>{const c={onData:y=>{if(y.type==="data-thread-title"){const v=y.data;if(!v?.title)return;const $=C.current;if(!$.taskId)return;$.manager.patchThread({id:$.taskId,title:v.title,updated_at:new Date().toISOString()});return}if(y.type==="data-deck-updated"){const v=y.data;if(!v?.path)return;const $=v.path,g=C.current;g.queryClient.invalidateQueries({queryKey:ne.orgFsStat(g.orgId,"home",$)}),g.queryClient.invalidateQueries({queryKey:ne.orgFsRecent(g.orgId)}),g.openPanel(Ht($));return}if(y.type==="data-open-preview"){const v=y.data,$=C.current,g=$.taskId;if(g){const U=$.manager.threads.get().find(de=>de.id===g);$.manager.patchThread({id:g,...v?.branch?{branch:v.branch}:{},metadata:{...U?.metadata??{},...v?.repository?{repository:v.repository}:{},...v?.sandboxMap?{sandboxMap:v.sandboxMap}:{}}})}tt(v?.branch??$.currentBranch)||$.openPanel("site-editor");return}},onFinish:(y,v,$)=>{const g=C.current;dn(g.queryClient,g.orgId,yt(y.metadata?.usage)),g.queryClient.invalidateQueries({queryKey:ne.aiPlanEntitlements(g.orgId),refetchType:"none"}),g.taskId&&ce(g.orgSlug,g.taskId),g.taskId&&g.manager.patchThread({id:g.taskId,status:xn($,y.parts),updated_at:new Date().toISOString()});const U=y.parts?.some(ye=>{const z=ye;return(z.type==="tool-bash"||z.type==="tool-write")&&z.state==="output-available"});if(g.taskId&&U){const ye=ne.threadOutputs(g.taskId);for(const z of[0,1500,3e3,6e3,12e3,25e3])setTimeout(()=>{g.queryClient.invalidateQueries({queryKey:ye})},z)}g.queryClient.invalidateQueries({queryKey:ne.homeNextActions(g.orgSlug)}),Wn(y.parts??[])&&g.queryClient.invalidateQueries({queryKey:ne.organizationSettings(g.orgId)});const de=y.metadata?.thread_id;de&&de!==g.taskId&&g.rawNavigateToTask(de)},onError:y=>{q(y),console.error("[chat] Error",y)},onToolCall:y=>{const v=C.current,$=y.toolCall.toolName==="preview_navigate"&&Yn.safeParse(y.toolCall.input);$&&$.success&&v.currentBranch&&(es(Xn(v.orgSlug,v.virtualMcpId,v.currentBranch),$.data.path),tt(v.currentBranch)||v.openPanel("site-editor")),v.onToolCall(y)}};h.observer=c,ce(C.current.orgSlug,C.current.taskId);const b=y=>y==="submitted"||y==="streaming";let A=b(h.status.get().kind);const x=h.status.subscribe(()=>{const y=b(h.status.get().kind);if(y===A)return;A=y;const v=C.current;ce(v.orgSlug,v.taskId)});return()=>{h.observer===c&&(h.observer=null),x()}},[h]);const X=B.kind==="submitted"||B.kind==="streaming",Qe=N.length===0,Re=N.at(-1),Ae=!X&&Re?.role==="assistant"&&Re.parts.some(c=>"state"in c&&c.state==="approval-requested"),Oe=r,ve=(Oe?.status==="in_progress"||Oe?.status==="expired")&&B.kind==="ready"&&N.length>0;async function ue(c,b=!1,A){const x=e,y=a;if(l)return H(),Y.delete(x),!1;const v=Object.entries(_),$=v.length>0?v.map(([z,J])=>`### App Context: ${z}
|
|
38
|
-
${J}`).join(`
|
|
39
|
-
|
|
40
|
-
`):"",g=[F,$].filter(Boolean).join(`
|
|
41
|
-
|
|
42
|
-
`);let U=p;U==="gen-image"&&!i&&(U="default"),U==="web-search"&&!S&&(U="default"),U==="deep-research"&&!w&&(U="default"),(U==="web-search"||U==="deep-research")&&I("default");const de=wn({thread:r?{harness_id:r.harness_id??null,branch:r.branch??null}:null,globals:{branch:u}});r?.harness_id||Q.patchThread({id:x,harness_id:s?o?"codex":"claude-code":"decopilot",updated_at:new Date().toISOString()});const ye={...b||n?{voiceMode:b}:{},...b&&A?{voiceTranscript:A}:{},tier:T,mode:U,toolApprovalLevel:D.toolApprovalLevel??Gt(),system:g||void 0,agent:{id:y},thread_id:x,...de};try{if(X||ve){let z=!0;try{ys(x,c);const J=await h.enqueue(c,ye);if(J.kind==="live")return We(x,c.id),h.applyLocalMessage(Ts(c,J.liveRunId)),!0;xt(x,{workflowId:`thread-run:${x}:${c.id}`,messageId:c.id,text:cs(c.parts),hasAttachments:c.parts.some(Rt=>Rt.type==="file"),status:"queued",enqueuedAt:Date.now(),optimistic:!0}),ps(x)}catch(J){z=!1,We(x,c.id),Xe(x,c.id),q(J instanceof Error?J:new Error(String(J))),pe.error(J instanceof Error?J.message:t("chat.chatContext.failedToQueueMessage"))}return ce(R.slug,x),z}return await h.submit({kind:"message",message:c},ye),!0}finally{Y.delete(x)}}async function Te(c){const b=c.parts??Ct(c.tiptapDoc);if(b.length===0||Y.has(e))return;Y.add(e),q(null),P(void 0);const A={tiptapDoc:c.tiptapDoc,created_at:new Date().toISOString(),user:{avatar:E?.image??void 0,name:E?.name??"you"}},x={id:crypto.randomUUID(),role:"user",parts:b,metadata:A};await ue(x)}async function De(c,b){if(l)return H(),!1;if(Y.has(e))return pe.info(t("chat.chatContext.stillSendingPreviousMessage")),!1;if(Y.add(e),!await W.cancel(e,c))return Y.delete(e),pe.error(t("chat.chatContext.couldNotRemoveOriginalMessage")),!1;We(e,c),h.removeLocalMessage(c);const x={id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:b}],metadata:{created_at:new Date().toISOString(),user:{avatar:E?.image??void 0,name:E?.name??"you"}}};try{return await ue(x)}catch(y){return pe.error(y instanceof Error?y.message:t("chat.chatContext.failedToSendEditedMessage")),!1}}const Ve=async()=>{h.stop();try{const c=await fetch(`/api/${R.slug}/decopilot/cancel/${e}`,{method:"POST",credentials:"include"});if(c.status===404)return;if(!c.ok){const b=await c.json().catch(()=>({}));throw new Error(b.message??t("chat.chatContext.cancelFailedStatus",{status:c.status}))}}catch(c){const b=c instanceof Error?c.message:t("chat.chatContext.failedToCancel");pe.error(b),console.error("[chat] cancelRun",c)}},f=c=>Te(wt(c)),me=ze({strict:!1}).autosend===Ke;return m.useEffect(()=>{if(!me||B.kind==="loading"||N.length>0||l)return;const c=Zt(sessionStorage,he,e);c&&Te(c.message).then(()=>{en(sessionStorage,he,e)})},[me,B.kind,N.length,l,he,e,Te]),{ready:h.ready,voiceContext:n?[F,...Object.entries(_).map(([c,b])=>`${c}: ${b}`)].filter(Boolean).join(`
|
|
43
|
-
|
|
44
|
-
`):void 0,sendVoiceMessage:async(c,b,A)=>Y.has(e)?!1:(Y.add(e),q(null),ue({id:c,role:"user",parts:[{type:"text",text:b}],metadata:{created_at:new Date().toISOString(),user:{name:E?.name??"you",avatar:E?.image??void 0}}},!0,A)),messages:N,status:As(B),sendMessage:f,editQueuedMessage:De,stop:()=>{if(l){H();return}Ve()},submit:async(c,b)=>{if(l){H();return}if(c.kind==="toolOutput"&&(r?.harness_id==="claude-code"||r?.harness_id==="codex")){const{response:A}=c.output??{};await h.submit({kind:"message",message:{id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:typeof A=="string"?A:JSON.stringify(c.output)}],metadata:{created_at:new Date().toISOString(),user:{avatar:E?.image??void 0,name:E?.name??"you"},toolOutput:{toolCallId:c.toolCallId,output:c.output}}}},b);return}await h.submit(c,b)},removeLocalMessage:c=>h.removeLocalMessage(c),isSendInFlight:()=>Y.has(e),error:K,clearError:()=>q(null),finishReason:O,runStatusStage:k,clearFinishReason:()=>h.finishReason.set(null),isStreaming:X,isChatEmpty:Qe,isWaitingForApprovals:Ae??!1,isRunInProgress:ve,hasMoreOlder:V,isFetchingOlder:te,fetchOlderMessages:h.fetchOlderMessages.bind(h)}}function Nr(){const e=Ee(),t=m.useContext(Ue);if(!t)throw new Error(e("chat.chatContext.useChatStreamMissingContext"));return t}function Lr(){return m.useContext(Ue)}function _t(){const e=Ee(),t=m.useContext(_e);if(!t)throw new Error(e("chat.chatContext.useChatTaskMissingContext"));return t}function Xs(){const e=Ee(),t=m.useContext(Ye);if(!t)throw new Error(e("chat.chatContext.useChatPrefsMissingContext"));return t}function jr(){return m.useContext(Ye)}function Fr(){return m.useContext(_e)}export{Sr as $,Dr as A,wr as B,Pr as C,_r as D,vs as E,bs as F,In as G,kn as H,_n as I,Un as J,Cr as K,ks as L,Is as M,We as N,qn as O,Ct as P,Ir as Q,qe as R,Fn as S,Ar as T,Ln as U,hr as V,Ge as W,br as X,Mt as Y,gr as Z,mr as _,Ns as a,jn as a0,Bn as a1,kt as a2,pr as a3,yr as a4,vr as a5,dr as a6,xe as a7,Nr as b,_t as c,Xs as d,ur as e,Lr as f,kr as g,Cn as h,Le as i,Cs as j,Er as k,Xn as l,ws as m,Or as n,Rr as o,$r as p,Mr as q,Tr as r,En as s,xr as t,Fr as u,lr as v,Jn as w,fr as x,jr as y,yt as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as H,r as q,j as r,b as ct,gi as kt,B as wt,gh as St,gV as vt,bY as Tt,bX as Et,bW as Pt,I as It,m as Bt,q as Nt,K as $t}from"./index-BnCCUie5.js";import{H as Rt,C as Mt}from"./held-block-view-Dfl9wQs4.js";import{i as Dt}from"./AlertCircle-DsrPAFxJ.js";import{c as Ft}from"./Tool01-B-fgmM-0.js";import{aB as Kt,v as Ot,Y as _t}from"./site-editor-toast-BOt_nyVl.js";import{a as Ct}from"./view-header-BN75VYPA.js";import{AppEditor as Gt}from"./app-editor-Di6FUBiQ.js";import{a as U,r as Lt,p as yt,e as ft,i as zt,f as At,g as jt,j as Yt}from"./use-cms-publish-actions-ltMAkIJx.js";import{B as qt}from"./badge-BokVussq.js";import{L as Ht}from"./label-lULQ_A7o.js";import{S as Ut}from"./scroll-area-iXdNHDzI.js";import{S as Vt}from"./switch-BxHf2yQ-.js";import{b as Qt}from"./use-never-published-BJ0Sec7F.js";import{S as Wt}from"./save-status-fItkkD30.js";import{E as Xt}from"./category-tree-DAVAIQah.js";import"./utils-BRIj6V6X.js";import"./agent-icon-BD0ZSOtG.js";import"./UserCheck01-BMORoWuy.js";import"./ArrowUp-O_SFXcX4.js";import"./ArrowLeft-CedOhlJl.js";import"./ArrowRight-D31ooF9_.js";import"./BookOpen01-hQOgpoT0.js";import"./Globe04-Bkkv-44s.js";import"./CheckCircle-C5F-vu0b.js";import"./ChevronDown-XAF5UTWS.js";import"./ChevronSelectorVertical-BgyFVvCt.js";import"./ChevronUp-DXb5SN9G.js";import"./UserSquare-BUy12Lbf.js";import"./LinkBroken01-DXQIXK4a.js";import"./CreditCard01-V_X-1km6.js";import"./File02-CWJddKT5.js";import"./MessageCircle01-CBwz3pkx.js";import"./SwitchHorizontal01-BoKcCD1g.js";import"./Eye-DKA9KO8s.js";import"./Fingerprint04-DnZul7lc.js";import"./Image01-w45LU6DD.js";import"./Key01-hOPkG93k.js";import"./LayoutLeft-C3gp1GTI.js";import"./Minus-C6nnb5U7.js";import"./Monitor01-D5ASDXL3.js";import"./Sun-DAly365K.js";import"./Play-BE2Gbr5-.js";import"./Plus-BKnmVwDY.js";import"./SearchMd-BdbsDxg8.js";import"./ShoppingBag01-D0FD1HPP.js";import"./Trash01-Dzo6NInS.js";import"./Upload01-DQgVu-9N.js";import"./Users01-t7brRFdK.js";import"./XClose-Bze4d5nj.js";import"./Zap-BiLLX5O9.js";import"./blocks-tab-states-Dg2hewP6.js";import"./sandbox-url-D3mC8qhT.js";import"./use-voice-input-D-qISUx2.js";import"./session-runtime-CmPJqc9T.js";import"./chat-context-Ch3kSDW6.js";import"./use-panel-navigate-CeualaFM.js";import"./thread-route-OiQ4LagC.js";import"./use-project-scope-BF7ZsFcz.js";import"./repository-binding-jAJl13i7.js";import"./use-mcp-client-BwusBux_.js";import"./auth-CAOOT2we.js";import"./use-view-draft-kind-CXGnqfWm.js";import"./use-blog-view-DFNaVcP9.js";import"./use-organization-settings-D5A7oppe.js";import"./schema-DCQWc58B.js";import"./task-board-Cq4D_eE2.js";import"./thread-intent-D0RsO42v.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DyaAZ7A6.js";import"./use-entitlements-CdeJE9gN.js";import"./use-ai-providers-Dc5ouLPu.js";import"./use-current-view-dWMur2yx.js";import"./use-in-settings-BZ1un7LI.js";import"./use-decopilot-events-BkY_xbdd.js";import"./popover-BRb_ARAW.js";import"./drawer-DDbBWwDY.js";import"./tooltip-icVvNMtU.js";import"./index-R3Ci7Tyg.js";import"./use-mobile-Dr7bjUPW.js";import"./index-D-pDCAfc.js";import"./checkbox-lB4BY1Fl.js";import"./select-BtcP8R6V.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./empty-state-p1vSClM-.js";import"./calendar-BiZh8nNR.js";import"./textarea-zTqVKq38.js";import"./usage-stats-DWbg5Exa.js";import"./utils-CVEq3hMx.js";import"./markdown-CGY8-6pe.js";import"./use-copy-bpFrGd2i.js";import"./gateway-client-BLgU4Dju.js";import"./form-BH-D2Xbc.js";import"./editor-classes-DMMsOfQ5.js";import"./task-key-DSN1bgDn.js";import"./sortable.esm-BzZJdDzX.js";import"./toggle-group-_l9tZet4.js";import"./active-indicator-CCMhAsc_.js";import"./section-array-field-zrTNtrKa.js";import"./command-B6aoeD_0.js";import"./index-9QVz6jZ3.js";import"./named-rule-step-Dgb864IM.js";import"./slider-C25v9BTx.js";import"./index-BYqLsTt6.js";import"./tooltipContext-DMKNZNxg.js";import"./CategoricalChart-CUg_BAiA.js";import"./index-BbtKtnc4.js";import"./combobox-klxrcVPh.js";import"./match-site-slug-config-B47_xZCi.js";import"./use-file-configs-D73DTOfD.js";import"./asset-utils-CtdzkGeJ.js";import"./useInfiniteQuery-BWskAF2M.js";import"./infiniteQueryObserver-BESu79F_.js";import"./hosted-reconcile-CyRopTfU.js";import"./content-changes-r32OQ0Qx.js";import"./use-sandbox-events-Dxu1WRP5.js";import"./use-blocks-v8-project-CCC2DOox.js";import"./sandbox-git-api-C3NvU1dn.js";import"./use-section-preview-base-BHMbHnTX.js";import"./content-tab-Dx0W8ww1.js";import"./delete-copy-DclWOxJf.js";import"./index-lCnbr_EL.js";import"./use-delete-block-CheMFR3A.js";import"./item-actions-lpogT0_c.js";import"./date-utils-CrvIKg-s.js";import"./empty-state-CggWUtV0.js";import"./primitives-Jv205PzW.js";import"./use-move-blocks-BchWtT9J.js";import"./monaco-editor-Dque6-sU.js";import"./editor-mY53R5_b.js";import"./use-content-sync-Cb62T6_k.js";import"./collapsible-DOENRXml.js";import"./sandbox-lifecycle-context-2HGtol3n.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./parse-sections-hseH5db1.js";import"./mustache-CrAZ8U_1.js";import"./search-input-CplQR3Cf.js";import"./collection-table-wrapper-BPjSO-Mu.js";import"./table-B3gHsFFi.js";import"./agent-capabilities-BYxoy39x.js";import"./github-icon-CF41Lxe4.js";import"./new-project-dialog-ByQdLyIC.js";import"./use-navigate-to-agent-C7EFO95N.js";import"./repository-picker-Dl56cEjR.js";import"./collection-search-CIcbLnU-.js";import"./use-debounced-value-Bt1SAjKD.js";import"./new-project-store-D_NVgRYa.js";import"./pair-DsI-lHdT.js";import"./use-task-board-items-C_bU9rPT.js";import"./config-C5d81tv3.js";import"./task-route-CN_gUoQw.js";import"./project-index-DLyQghfD.js";import"./shell-layout-_zkxSyWx.js";import"./use-deployment-admin-Dfxu4f7O.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-CEMI0cuO.js";import"./integration-icon-HGkwXGCE.js";import"./project-icon-lQ2qF_x7.js";import"./legacy-admin-welcome-dialog-BbrICcUL.js";import"./required-auth-layout-BDvRMhJJ.js";import"./use-org-sso-DfMcUb6-.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CUByroKt.js";import"./types-Cng3BN1u.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-VKdIybCR.js";import"./use-connection-BD6Z_Y5K.js";import"./use-mcp-prompts-dcqD5yo7.js";import"./use-thread-outputs-BA8sXOAO.js";import"./file-type-icon-CRJv2Oya.js";import"./tabs-a_oEe7Hq.js";function Jt(l){const t=H.c(12),[i,s]=q.useState(0);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n=>{n.has(U)&&s(Zt)},t[0]=e):e=t[0],Kt(l.orgSlug,l.virtualMcpId,e);let o;t[1]!==l?(o=r.jsx(te,{...l}),t[1]=l,t[2]=o):o=t[2];let d;t[3]!==i||t[4]!==o?(d=r.jsx(q.Fragment,{children:o},i),t[3]=i,t[4]=o,t[5]=d):d=t[5];let m;return t[6]!==l.branch||t[7]!==l.decofile||t[8]!==l.orgSlug||t[9]!==l.virtualMcpId||t[10]!==d?(m=r.jsx(Rt,{listing:l.decofile,orgSlug:l.orgSlug,virtualMcpId:l.virtualMcpId,branch:l.branch,blockKey:U,present:void 0,children:d}),t[6]=l.branch,t[7]=l.decofile,t[8]=l.orgSlug,t[9]=l.virtualMcpId,t[10]=d,t[11]=m):m=t[11],m}function Zt(l){return l+1}function te(l){const t=H.c(103),{orgSlug:i,virtualMcpId:s,branch:e,block:o,saveGuard:d,onOpenForm:m}=l,n=ct();let f;t[0]!==e||t[1]!==i||t[2]!==s?(f={orgSlug:i,virtualMcpId:s,branch:e},t[0]=e,t[1]=i,t[2]=s,t[3]=f):f=t[3];let a;t[4]!==d?(a={guard:d,holdsCopy:!0},t[4]=d,t[5]=a):a=t[5];const{save:h,isPending:p}=Qt(f,a);let x;t[6]===Symbol.for("react.memo_cache_sentinel")?(x={},t[6]=x):x=t[6];const[c,$]=q.useState(x);let S;t[7]!==o||t[8]!==c?(S=F=>{const Y=ft(o,F);if(Y.kind==="locked"||!Object.hasOwn(c,F))return Y;const L=c[F];return L===void 0?ft({},F):{kind:"value",value:L,isDefault:!1}},t[7]=o,t[8]=c,t[9]=S):S=t[9];const g=S,[C]=q.useState(o);let E;t[10]!==o||t[11]!==c||t[12]!==C||t[13]!==h?(E=(F,Y)=>{const L=ft(C,F),O=L.kind==="value"&&L.isDefault&&Y===L.value?void 0:Y,z={...c,[F]:O};zt(o,F,O)&&delete z[F],$(z),h(U,Object.keys(z).length>0?At(o,z):ee)},t[10]=o,t[11]=c,t[12]=C,t[13]=h,t[14]=E):E=t[14];const u=E;let v;t[15]!==g?(v=F=>{const Y=g(F);return Y.kind==="value"&&Y.value===!1},t[15]=g,t[16]=v):v=t[16];const w=v;let k,y,j,b,R,P,B,N,M,I,_,T,D;if(t[17]!==u||t[18]!==w||t[19]!==p||t[20]!==m||t[21]!==g||t[22]!==n){const F=w("telemetry.enabled"),Y=w("analytics.enabled");let L;t[36]!==m||t[37]!==g||t[38]!==n?(L=(K,A,G)=>{const dt=G===void 0?!1:G,pt=g(K),ht={label:n(`sandbox.cmsSettingsPage.${K}.label`),help:n(`sandbox.cmsSettingsPage.${K}.help`),disabled:dt};return pt.kind==="locked"?r.jsx(kt,{title:r.jsxs("span",{className:"flex items-center gap-2",children:[ht.label,r.jsx(qt,{variant:"muted",size:"sm",children:n("sandbox.cmsSettingsPage.variants")})]}),description:n(pt.reason==="variants"?"sandbox.cmsSettingsPage.locked.variants":"sandbox.cmsSettingsPage.locked.other"),action:r.jsx(wt,{type:"button",variant:"outline",size:"sm",onClick:m,children:n("sandbox.cmsSettingsPage.openForm")})},K):A(pt,ht)},t[36]=m,t[37]=g,t[38]=n,t[39]=L):L=t[39];const O=L;N="flex h-full flex-col",M="cms-settings-page";let z;t[40]!==n?(z=n("sandbox.cmsSettingsPage.intro"),t[40]=n,t[41]=z):z=t[41];let J;t[42]!==p?(J=r.jsx(Wt,{isPending:p,isError:!1}),t[42]=p,t[43]=J):J=t[43],t[44]!==z||t[45]!==J?(I=r.jsx(Ct,{intro:z,actions:J}),t[44]=z,t[45]=J,t[46]=I):I=t[46],j=Ut,B="min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",R="mx-auto flex max-w-2xl flex-col gap-8 px-4 py-6";let Z;t[47]!==n?(Z=n("sandbox.cmsSettingsPage.telemetry.title"),t[47]=n,t[48]=Z):Z=t[48];let tt;t[49]!==n?(tt=n("sandbox.cmsSettingsPage.telemetry.description"),t[49]=n,t[50]=tt):tt=t[50];let et;t[51]!==u?(et=(K,A)=>r.jsx(ut,{...A,checked:K.value===!0,onChange:G=>u("telemetry.enabled",G)},"telemetry.enabled"),t[51]=u,t[52]=et):et=t[52];let it;t[53]!==O||t[54]!==et?(it=O("telemetry.enabled",et),t[53]=O,t[54]=et,t[55]=it):it=t[55];let nt;t[56]!==u?(nt=(K,A)=>r.jsx(ut,{...A,checked:K.value===!0,onChange:G=>u("telemetry.metrics",G)},"telemetry.metrics"),t[56]=u,t[57]=nt):nt=t[57];const mt=O("telemetry.metrics",nt,F);let st;t[58]!==u||t[59]!==O||t[60]!==F?(st=ie.map(K=>O(K,(A,G)=>r.jsx(se,{...G,rate:A.value,onChange:dt=>u(K,dt)},K),F)),t[58]=u,t[59]=O,t[60]=F,t[61]=st):st=t[61];let lt;t[62]!==it||t[63]!==mt||t[64]!==st?(lt=r.jsxs(St,{children:[it,mt,st]}),t[62]=it,t[63]=mt,t[64]=st,t[65]=lt):lt=t[65],t[66]!==Z||t[67]!==tt||t[68]!==lt?(P=r.jsx(vt,{title:Z,description:tt,children:lt}),t[66]=Z,t[67]=tt,t[68]=lt,t[69]=P):P=t[69],y=vt,t[70]!==n?(D=n("sandbox.cmsSettingsPage.analytics.title"),t[70]=n,t[71]=D):D=t[71],t[72]!==n?(b=n("sandbox.cmsSettingsPage.analytics.description"),t[72]=n,t[73]=b):b=t[73],k=St;let ot;t[74]!==u?(ot=(K,A)=>r.jsx(ut,{...A,checked:K.value===!0,onChange:G=>u("analytics.enabled",G)},"analytics.enabled"),t[74]=u,t[75]=ot):ot=t[75],t[76]!==O||t[77]!==ot?(_=O("analytics.enabled",ot),t[76]=O,t[77]=ot,t[78]=_):_=t[78];let at;t[79]!==u?(at=(K,A)=>r.jsx(le,{...A,value:K.value,onChange:G=>u("analytics.collector",G===""?void 0:G)},"analytics.collector"),t[79]=u,t[80]=at):at=t[80],T=O("analytics.collector",at,Y),t[17]=u,t[18]=w,t[19]=p,t[20]=m,t[21]=g,t[22]=n,t[23]=k,t[24]=y,t[25]=j,t[26]=b,t[27]=R,t[28]=P,t[29]=B,t[30]=N,t[31]=M,t[32]=I,t[33]=_,t[34]=T,t[35]=D}else k=t[23],y=t[24],j=t[25],b=t[26],R=t[27],P=t[28],B=t[29],N=t[30],M=t[31],I=t[32],_=t[33],T=t[34],D=t[35];let V;t[81]!==k||t[82]!==_||t[83]!==T?(V=r.jsxs(k,{children:[_,T]}),t[81]=k,t[82]=_,t[83]=T,t[84]=V):V=t[84];let Q;t[85]!==y||t[86]!==b||t[87]!==V||t[88]!==D?(Q=r.jsx(y,{title:D,description:b,children:V}),t[85]=y,t[86]=b,t[87]=V,t[88]=D,t[89]=Q):Q=t[89];let W;t[90]!==R||t[91]!==P||t[92]!==Q?(W=r.jsxs("div",{className:R,children:[P,Q]}),t[90]=R,t[91]=P,t[92]=Q,t[93]=W):W=t[93];let X;t[94]!==j||t[95]!==B||t[96]!==W?(X=r.jsx(j,{className:B,children:W}),t[94]=j,t[95]=B,t[96]=W,t[97]=X):X=t[97];let rt;return t[98]!==N||t[99]!==M||t[100]!==I||t[101]!==X?(rt=r.jsxs("div",{className:N,"data-testid":M,children:[I,X]}),t[98]=N,t[99]=M,t[100]=I,t[101]=X,t[102]=rt):rt=t[102],rt}function ee(){return null}const ie=["telemetry.errorSampleRate","telemetry.traceSampleRate"];function gt(){const l=H.c(4),t=q.useId(),i=`${t}-help`,s=`${t}-error`;let e;return l[0]!==t||l[1]!==i||l[2]!==s?(e={control:t,help:i,error:s},l[0]=t,l[1]=i,l[2]=s,l[3]=e):e=l[3],e}function xt(l,t){return t?`${l.help} ${l.error}`:l.help}function bt(l){const t=H.c(17),{ids:i,label:s,help:e,disabled:o,error:d,control:m}=l,n=o&&"opacity-60";let f;t[0]!==n?(f=Bt(n),t[0]=n,t[1]=f):f=t[1];let a;t[2]!==i.control||t[3]!==s?(a=r.jsx(Ht,{htmlFor:i.control,children:s}),t[2]=i.control,t[3]=s,t[4]=a):a=t[4];let h;t[5]!==e||t[6]!==i.help?(h=r.jsx("span",{id:i.help,children:e}),t[5]=e,t[6]=i.help,t[7]=h):h=t[7];let p;t[8]!==d||t[9]!==i.error?(p=d&&r.jsx("p",{id:i.error,role:"alert",className:"mt-1 text-xs text-destructive",children:d}),t[8]=d,t[9]=i.error,t[10]=p):p=t[10];let x;return t[11]!==m||t[12]!==f||t[13]!==a||t[14]!==h||t[15]!==p?(x=r.jsx(kt,{className:f,title:a,description:h,action:m,children:p}),t[11]=m,t[12]=f,t[13]=a,t[14]=h,t[15]=p,t[16]=x):x=t[16],x}function ut(l){const t=H.c(16);let i,s,e;t[0]!==l?({checked:i,onChange:s,...e}=l,t[0]=l,t[1]=i,t[2]=s,t[3]=e):(i=t[1],s=t[2],e=t[3]);const o=gt(),d=o.control;let m;t[4]!==o?(m=xt(o,null),t[4]=o,t[5]=m):m=t[5];let n;t[6]!==i||t[7]!==o.control||t[8]!==s||t[9]!==e.disabled||t[10]!==m?(n=r.jsx(Vt,{id:d,"aria-describedby":m,checked:i,disabled:e.disabled,onCheckedChange:s}),t[6]=i,t[7]=o.control,t[8]=s,t[9]=e.disabled,t[10]=m,t[11]=n):n=t[11];let f;return t[12]!==o||t[13]!==e||t[14]!==n?(f=r.jsx(bt,{...e,ids:o,control:n}),t[12]=o,t[13]=e,t[14]=n,t[15]=f):f=t[15],f}function se(l){const t=H.c(49);let i,s,e;t[0]!==l?({rate:s,onChange:i,...e}=l,t[0]=l,t[1]=i,t[2]=s,t[3]=e):(i=t[1],s=t[2],e=t[3]);const o=ct(),d=gt(),[m,n]=q.useState(null);let f;t[4]!==s||t[5]!==m?(f=m??String(Lt(s)),t[4]=s,t[5]=m,t[6]=f):f=t[6];const a=f;let h;t[7]!==m?(h=m!==null&&m.trim()!==""&&yt(m)===null,t[7]=m,t[8]=h):h=t[8];const p=h;let x,c,$,S,g,C,E,u,v,w;if(t[9]!==d||t[10]!==p||t[11]!==e||t[12]!==o){const N=p?o("sandbox.cmsSettingsPage.invalidRate"):null;$=bt,u=e,v=d,w=N,c=Tt,C="sm",E="w-28",x=Et,S=d.control,g=xt(d,N),t[9]=d,t[10]=p,t[11]=e,t[12]=o,t[13]=x,t[14]=c,t[15]=$,t[16]=S,t[17]=g,t[18]=C,t[19]=E,t[20]=u,t[21]=v,t[22]=w}else x=t[13],c=t[14],$=t[15],S=t[16],g=t[17],C=t[18],E=t[19],u=t[20],v=t[21],w=t[22];const k=p||void 0;let y;t[23]!==i||t[24]!==s?(y=N=>{const M=N.target.value;n(M);const I=yt(M);I!==null&&I!==s&&i(I)},t[23]=i,t[24]=s,t[25]=y):y=t[25];let j;t[26]!==p?(j=()=>{p||n(null)},t[26]=p,t[27]=j):j=t[27];let b;t[28]!==x||t[29]!==e.disabled||t[30]!==a||t[31]!==k||t[32]!==y||t[33]!==j||t[34]!==S||t[35]!==g?(b=r.jsx(x,{id:S,"aria-describedby":g,type:"number",inputMode:"decimal",min:0,max:100,step:.1,value:a,disabled:e.disabled,"aria-invalid":k,className:"text-right tabular-nums",onChange:y,onBlur:j}),t[28]=x,t[29]=e.disabled,t[30]=a,t[31]=k,t[32]=y,t[33]=j,t[34]=S,t[35]=g,t[36]=b):b=t[36];let R;t[37]===Symbol.for("react.memo_cache_sentinel")?(R=r.jsx(Pt,{className:"pr-2 text-muted-foreground",children:"%"}),t[37]=R):R=t[37];let P;t[38]!==c||t[39]!==b||t[40]!==C||t[41]!==E?(P=r.jsxs(c,{size:C,className:E,children:[b,R]}),t[38]=c,t[39]=b,t[40]=C,t[41]=E,t[42]=P):P=t[42];let B;return t[43]!==$||t[44]!==P||t[45]!==u||t[46]!==v||t[47]!==w?(B=r.jsx($,{...u,ids:v,error:w,control:P}),t[43]=$,t[44]=P,t[45]=u,t[46]=v,t[47]=w,t[48]=B):B=t[48],B}function le(l){const t=H.c(37);let i,s,e;t[0]!==l?({value:e,onChange:i,...s}=l,t[0]=l,t[1]=i,t[2]=s,t[3]=e):(i=t[1],s=t[2],e=t[3]);const o=ct(),d=gt(),[m,n]=q.useState(null),f=m??e;let a;t[4]!==f?(a=jt(f),t[4]=f,t[5]=a):a=t[5];const h=!a;let p,x,c,$,S,g,C;if(t[6]!==d||t[7]!==h||t[8]!==s||t[9]!==o){const j=h?o("sandbox.cmsSettingsPage.invalidUrl"):null;x=bt,S=s,g=d,C=j,p=It,c=d.control,$=xt(d,j),t[6]=d,t[7]=h,t[8]=s,t[9]=o,t[10]=p,t[11]=x,t[12]=c,t[13]=$,t[14]=S,t[15]=g,t[16]=C}else p=t[10],x=t[11],c=t[12],$=t[13],S=t[14],g=t[15],C=t[16];const E=s.disabled,u=h||void 0;let v;t[17]!==o?(v=o("sandbox.cmsSettingsPage.analytics.collector.placeholder"),t[17]=o,t[18]=v):v=t[18];let w;t[19]!==i||t[20]!==e?(w=j=>{const b=j.target.value;n(b),jt(b)&&b.trim()!==e&&i(b.trim())},t[19]=i,t[20]=e,t[21]=w):w=t[21];let k;t[22]!==p||t[23]!==s.disabled||t[24]!==f||t[25]!==w||t[26]!==c||t[27]!==$||t[28]!==u||t[29]!==v?(k=r.jsx(p,{id:c,"aria-describedby":$,type:"url",size:"sm",className:"w-64",value:f,disabled:E,"aria-invalid":u,placeholder:v,onChange:w}),t[22]=p,t[23]=s.disabled,t[24]=f,t[25]=w,t[26]=c,t[27]=$,t[28]=u,t[29]=v,t[30]=k):k=t[30];let y;return t[31]!==x||t[32]!==k||t[33]!==S||t[34]!==g||t[35]!==C?(y=r.jsx(x,{...S,ids:g,error:C,control:k}),t[31]=x,t[32]=k,t[33]=S,t[34]=g,t[35]=C,t[36]=y):y=t[36],y}function bl(l){const t=H.c(6);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=[U],t[0]=i):i=t[0];let s;t[1]!==l?(s=r.jsx(oe,{...l}),t[1]=l,t[2]=s):s=t[2];let e;return t[3]!==l||t[4]!==s?(e=r.jsx(Mt,{listing:l.decofile,scope:l,names:i,children:s}),t[3]=l,t[4]=s,t[5]=e):e=t[5],e}function oe(l){const t=H.c(57),{orgSlug:i,virtualMcpId:s,branch:e,decofile:o,meta:d,persistDefaults:m,standalone:n}=l,f=n===void 0?!1:n,a=ct(),h=Nt();let p;t[0]!==e||t[1]!==i||t[2]!==s?(p={orgSlug:i,virtualMcpId:s,branch:e},t[0]=e,t[1]=i,t[2]=s,t[3]=p):p=t[3];const x=Ot(p),c=Yt(o),[$,S]=q.useState(!1),g=q.useRef(c.kind==="absent"?"create":"off");let C;t[4]!==e||t[5]!==x||t[6]!==i||t[7]!==h||t[8]!==s?(C=()=>({ifMatch:T=>T===U&&g.current!=="off"?{[U]:null}:void 0,onApplied:()=>{g.current="off"},onRejected:()=>{if(g.current!=="create")return;g.current="reread";const T={mutationKey:_t(i,s,e)},D=()=>{if(h.isMutating(T)>0){setTimeout(D,100);return}h.invalidateQueries({queryKey:$t.decofile(x)}).finally(()=>{g.current="off"})};setTimeout(D,0)}}),t[4]=e,t[5]=x,t[6]=i,t[7]=h,t[8]=s,t[9]=C):C=t[9];const[E]=q.useState(C);if(c.kind==="conflict"){let T;return t[10]!==a?(T=a("sandbox.cmsSettingsBlock.conflictTitle"),t[10]=a,t[11]=T):T=t[11],r.jsx(Xt,{icon:Dt,title:T,description:a("sandbox.cmsSettingsBlock.conflictDescription",{type:c.resolveType||"?"})})}if(f&&!$){let T;t[12]!==S?(T=()=>S(!0),t[12]=S,t[13]=T):T=t[13];let D;return t[14]!==e||t[15]!==o||t[16]!==E||t[17]!==i||t[18]!==T||t[19]!==c.block||t[20]!==s?(D=r.jsx(Jt,{orgSlug:i,virtualMcpId:s,branch:e,block:c.block,decofile:o,saveGuard:E,onOpenForm:T}),t[14]=e,t[15]=o,t[16]=E,t[17]=i,t[18]=T,t[19]=c.block,t[20]=s,t[21]=D):D=t[21],D}const u=c.block;let v;t[22]!==a?(v=a("sandbox.collectionsSidebar.settings"),t[22]=a,t[23]=v):v=t[23];const w=c.kind!=="absent"&&m!==!1;let k;t[24]!==a?(k=a("sandbox.cmsSettingsBlock.description"),t[24]=a,t[25]=k):k=t[25];let y;t[26]!==k?(y=r.jsx("p",{children:k}),t[26]=k,t[27]=y):y=t[27];let j;t[28]!==a||t[29]!==c.kind?(j=c.kind==="absent"&&r.jsxs("p",{"data-testid":"cms-settings-defaults-notice",className:"flex items-start gap-1.5 rounded-lg border bg-muted/40 px-3 py-2",children:[r.jsx(Ft,{size:14,className:"mt-px shrink-0"}),r.jsx("span",{children:a("sandbox.cmsSettingsBlock.defaultsNotice")})]}),t[28]=a,t[29]=c.kind,t[30]=j):j=t[30];let b;t[31]!==y||t[32]!==j?(b=r.jsxs("div",{className:"mb-6 flex flex-col gap-2 text-xs text-muted-foreground",children:[y,j]}),t[31]=y,t[32]=j,t[33]=b):b=t[33];let R;t[34]!==e||t[35]!==o||t[36]!==E||t[37]!==d||t[38]!==i||t[39]!==b||t[40]!==v||t[41]!==w||t[42]!==c.block||t[43]!==s?(R=r.jsx(Gt,{orgSlug:i,virtualMcpId:s,branch:e,blockKey:U,block:u,decofile:o,meta:d,title:v,saveGuard:E,persistDefaults:w,notice:b},`settings:${U}`),t[34]=e,t[35]=o,t[36]=E,t[37]=d,t[38]=i,t[39]=b,t[40]=v,t[41]=w,t[42]=c.block,t[43]=s,t[44]=R):R=t[44];const P=R;if(!f)return P;let B;t[45]!==a?(B=a("siteEditor.contentTypes.back",{type:a("siteEditor.contentTypes.settings")}),t[45]=a,t[46]=B):B=t[46];let N;t[47]!==S?(N=()=>S(!1),t[47]=S,t[48]=N):N=t[48];let M;t[49]!==B||t[50]!==N?(M=r.jsx(Ct,{back:{label:B,onClick:N}}),t[49]=B,t[50]=N,t[51]=M):M=t[51];let I;t[52]!==P?(I=r.jsx("div",{className:"min-h-0 flex-1",children:P}),t[52]=P,t[53]=I):I=t[53];let _;return t[54]!==M||t[55]!==I?(_=r.jsxs("div",{className:"flex h-full flex-col",children:[M,I]}),t[54]=M,t[55]=I,t[56]=_):_=t[56],_}export{bl as CmsSettingsEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as E,j as t,B as K,h as X,aH as Ze,aI as re,b as W,R as Ee,r as A,a6 as fe,dT as Xe,dU as Re,aG as et,n as Oe,I as pe,m as G,bZ as tt,au as st,u as ot,L as se,t as lt,f as he,cD as Fe}from"./index-BnCCUie5.js";import{E as Me}from"./empty-state-p1vSClM-.js";import{u as ge}from"./use-mcp-client-BwusBux_.js";import{F as ae,a as nt,b as ce,d as de}from"./form-BH-D2Xbc.js";import{T as xe}from"./textarea-zTqVKq38.js";import{D as je,O as it,M as rt}from"./index-BLFbZEvm.js";import{Y as at,V as ct,bu as dt,ar as mt,aA as ut,L as ye,e as pt}from"./agent-icon-BD0ZSOtG.js";import{M as xt}from"./mcp-app-renderer-CUByroKt.js";import{g as ft,M as we}from"./types-Cng3BN1u.js";import{A as ht,a as gt,b as jt}from"./alert-CuyuxCBB.js";import{S as Ce,b as Ie,a as Te,d as $e,c as me}from"./select-BtcP8R6V.js";import{b as bt,c as Pe,T as De,a as ke}from"./tooltip-icVvNMtU.js";import{i as Nt}from"./AlertCircle-DsrPAFxJ.js";import{s as vt}from"./UserCheck01-BMORoWuy.js";import{s as St}from"./File02-CWJddKT5.js";import{i as yt}from"./Play-BE2Gbr5-.js";import{g as wt}from"./connection-slug-Db3zbztV.js";import{u as Ct,T as It}from"./use-mcp-auth-status-Dh_dzOju.js";import{u as ze,b as Le}from"./use-connection-BD6Z_Y5K.js";import{u as Tt}from"./use-mcp-tools-DTHRiLyJ.js";import{c as $t}from"./content-blocks-o63cs2vh.js";import{I as Ae}from"./integration-icon-HGkwXGCE.js";import{f as Pt,y as Dt}from"./chat-context-Ch3kSDW6.js";import{u as kt}from"./shell-layout-_zkxSyWx.js";import{MonacoCodeEditor as At}from"./monaco-editor-Dque6-sU.js";import{E as Et}from"./empty-state-CggWUtV0.js";import{n as Rt}from"./LinkBroken01-DXQIXK4a.js";import"./auth-CAOOT2we.js";import"./label-lULQ_A7o.js";import"./Key01-hOPkG93k.js";import"./extract-connection-data-Bt_vhJBm.js";import"./metadata-D72DunRR.js";import"./connection-B5tcoD6Y.js";import"./url-slug-DRUvKyIF.js";import"./Plus-BKnmVwDY.js";import"./index-BbtKtnc4.js";import"./index-Dkqdsk1p.js";import"./index-BYqLsTt6.js";import"./index-BdQq_4o_.js";import"./index-9QVz6jZ3.js";import"./popover-BRb_ARAW.js";import"./repository-binding-jAJl13i7.js";import"./SearchMd-BdbsDxg8.js";import"./use-mobile-Dr7bjUPW.js";import"./use-navigate-to-agent-C7EFO95N.js";import"./thread-intent-D0RsO42v.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DyaAZ7A6.js";import"./task-board-Cq4D_eE2.js";import"./schema-DCQWc58B.js";import"./session-runtime-CmPJqc9T.js";import"./schema-DjQz4gZw.js";import"./Tool01-B-fgmM-0.js";import"./ArrowUp-O_SFXcX4.js";import"./ArrowLeft-CedOhlJl.js";import"./ArrowRight-D31ooF9_.js";import"./BookOpen01-hQOgpoT0.js";import"./Globe04-Bkkv-44s.js";import"./CheckCircle-C5F-vu0b.js";import"./ChevronDown-XAF5UTWS.js";import"./ChevronSelectorVertical-BgyFVvCt.js";import"./ChevronUp-DXb5SN9G.js";import"./UserSquare-BUy12Lbf.js";import"./CreditCard01-V_X-1km6.js";import"./MessageCircle01-CBwz3pkx.js";import"./SwitchHorizontal01-BoKcCD1g.js";import"./Eye-DKA9KO8s.js";import"./Fingerprint04-DnZul7lc.js";import"./Image01-w45LU6DD.js";import"./LayoutLeft-C3gp1GTI.js";import"./Minus-C6nnb5U7.js";import"./Monitor01-D5ASDXL3.js";import"./Sun-DAly365K.js";import"./ShoppingBag01-D0FD1HPP.js";import"./Trash01-Dzo6NInS.js";import"./Upload01-DQgVu-9N.js";import"./Users01-t7brRFdK.js";import"./XClose-Bze4d5nj.js";import"./Zap-BiLLX5O9.js";import"./index-R3Ci7Tyg.js";import"./badge-BokVussq.js";import"./mcp-oauth-plOgy5je.js";import"./use-panel-navigate-CeualaFM.js";import"./thread-route-OiQ4LagC.js";import"./use-project-scope-BF7ZsFcz.js";import"./use-view-draft-kind-CXGnqfWm.js";import"./use-blog-view-DFNaVcP9.js";import"./use-organization-settings-D5A7oppe.js";import"./use-entitlements-CdeJE9gN.js";import"./use-ai-providers-Dc5ouLPu.js";import"./use-current-view-dWMur2yx.js";import"./use-in-settings-BZ1un7LI.js";import"./use-decopilot-events-BkY_xbdd.js";import"./use-deployment-admin-Dfxu4f7O.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-CEMI0cuO.js";import"./command-B6aoeD_0.js";import"./project-icon-lQ2qF_x7.js";import"./use-debounced-value-Bt1SAjKD.js";import"./new-project-dialog-ByQdLyIC.js";import"./repository-picker-Dl56cEjR.js";import"./github-icon-CF41Lxe4.js";import"./useInfiniteQuery-BWskAF2M.js";import"./infiniteQueryObserver-BESu79F_.js";import"./collection-search-CIcbLnU-.js";import"./new-project-store-D_NVgRYa.js";import"./legacy-admin-welcome-dialog-BbrICcUL.js";import"./drawer-DDbBWwDY.js";import"./required-auth-layout-BDvRMhJJ.js";import"./use-org-sso-DfMcUb6-.js";import"./editor-mY53R5_b.js";function Ot(s){const e=E.c(15),{onSave:n,onUndo:o,isDirty:l,isSaving:i,saveLabel:a,undoLabel:c}=s,d=a===void 0?"Save":a,r=c===void 0?"Undo":c;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let h;e[1]!==i||e[2]!==o||e[3]!==r?(h=t.jsxs(K,{variant:"outline",size:"sm",onClick:o,disabled:i,"aria-label":r,children:[x,r]}),e[1]=i,e[2]=o,e[3]=r,e[4]=h):h=e[4];let u;e[5]!==i?(u=i?t.jsx(X,{className:"size-3.5"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=u):u=e[6];let g;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==u?(g=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[u,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=u,e[11]=g):g=e[11];let p;return e[12]!==h||e[13]!==g?(p=t.jsxs(t.Fragment,{children:[h,g]}),e[12]=h,e[13]=g,e[14]=p):p=e[14],p}Ze({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ft(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(o=>o==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function Mt(s){const e=E.c(43),{form:n}=s,o=W();let l;e[0]!==o?(l=o("details.prompt.details"),e[0]=o,e[1]=l):l=e[1];let i;e[2]!==l?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:l}),e[2]=l,e[3]=i):i=e[3];let a;e[4]!==o?(a=C=>{const{field:b}=C;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...b,placeholder:o("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=o,e[5]=a):a=e[5];let c;e[6]!==n.control||e[7]!==a?(c=t.jsx(ae,{control:n.control,name:"title",render:a}),e[6]=n.control,e[7]=a,e[8]=c):c=e[8];let d;e[9]!==o?(d=C=>{const{field:b}=C;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...b,value:b.value??"",placeholder:o("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=o,e[10]=d):d=e[10];let r;e[11]!==n.control||e[12]!==d?(r=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=r):r=e[13];let x;e[14]!==c||e[15]!==r?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,r]}),e[14]=c,e[15]=r,e[16]=x):x=e[16];let h;e[17]!==i||e[18]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=h):h=e[19];let u;e[20]!==o?(u=o("details.prompt.message"),e[20]=o,e[21]=u):u=e[21];let g;e[22]!==u?(g=t.jsx("div",{className:"text-sm font-medium text-foreground",children:u}),e[22]=u,e[23]=g):g=e[23];let p;e[24]!==o?(p=o("details.prompt.messageDescription"),e[24]=o,e[25]=p):p=e[25];let j;e[26]!==p?(j=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=j):j=e[27];let N;e[28]!==o?(N=C=>{const{field:b}=C;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...b,value:b.value??"",placeholder:o("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=o,e[29]=N):N=e[29];let v;e[30]!==n.control||e[31]!==N?(v=t.jsx(ae,{control:n.control,name:"body",render:N}),e[30]=n.control,e[31]=N,e[32]=v):v=e[32];let y;e[33]!==g||e[34]!==j||e[35]!==v?(y=t.jsxs("div",{className:"flex flex-col gap-2",children:[g,j,v]}),e[33]=g,e[34]=j,e[35]=v,e[36]=y):y=e[36];let w;e[37]!==y||e[38]!==h?(w=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[h,y]}),e[37]=y,e[38]=h,e[39]=w):w=e[39];let P;return e[40]!==n||e[41]!==w?(P=t.jsx(nt,{...n,children:w}),e[40]=n,e[41]=w,e[42]=P):P=e[42],P}function zt(s){const e=E.c(42),{providerId:n,promptId:o}=s,l=W(),{org:i}=fe(),a=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==a?(c={connectionId:a,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=a,e[3]=c):c=e[3];const d=ge(c),r=Xe(n,"PROMPT",o,d),x=Re(n,"PROMPT",d),h=x.update.isPending;let u;e[4]!==r?(u=r?{title:r.title,description:r.description??null,body:ue(r)}:void 0,e[4]=r,e[5]=u):u=e[5];let g;e[6]!==u?(g={values:u},e[6]=u,e[7]=g):g=e[7];const p=et(g);let j;e[8]!==p||e[9]!==r?(j=()=>{r&&p.reset({title:r.title,description:r.description??null,body:ue(r)})},e[8]=p,e[9]=r,e[10]=j):j=e[10];const N=j;let v;e[11]!==x.update||e[12]!==p||e[13]!==o?(v=p.handleSubmit(async I=>{const T=await x.update.mutateAsync({id:o,data:{title:I.title,description:I.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:I.body}}]}});p.reset({title:T.title,description:T.description??null,body:ue(T)})}),e[11]=x.update,e[12]=p,e[13]=o,e[14]=v):v=e[14];const y=v;if(!r){let I;e[15]!==l?(I=l("details.prompt.notFoundTitle"),e[15]=l,e[16]=I):I=e[16];let T;e[17]!==l?(T=l("details.prompt.notFoundDescription"),e[17]=l,e[18]=T):T=e[18];let O;return e[19]!==I||e[20]!==T?(O=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Me,{title:I,description:T})}),e[19]=I,e[20]=T,e[21]=O):O=e[21],O}let w;e[22]!==y?(w=()=>{y()},e[22]=y,e[23]=w):w=e[23];let P;e[24]!==p.formState.isDirty||e[25]!==h||e[26]!==N||e[27]!==w?(P=t.jsx(Ot,{onSave:w,onUndo:N,isDirty:p.formState.isDirty,isSaving:h}),e[24]=p.formState.isDirty,e[25]=h,e[26]=N,e[27]=w,e[28]=P):P=e[28];let C;e[29]!==r.title||e[30]!==P?(C=t.jsx(Oe.Title,{actions:P,children:r.title}),e[29]=r.title,e[30]=P,e[31]=C):C=e[31];let b;e[32]!==r.description?(b=r.description&&t.jsx("p",{className:"px-4 py-3 text-sm text-muted-foreground",children:r.description}),e[32]=r.description,e[33]=b):b=e[33];let D;e[34]!==b||e[35]!==C?(D=t.jsxs(t.Fragment,{children:[C,b]}),e[34]=b,e[35]=C,e[36]=D):D=e[36];let k;e[37]!==p?(k=t.jsx("div",{className:"h-full",children:t.jsx(Mt,{form:p})}),e[37]=p,e[38]=k):k=e[38];let R;return e[39]!==D||e[40]!==k?(R=t.jsxs(je,{children:[D,k]}),e[39]=D,e[40]=k,e[41]=R):R=e[41],R}function Lt(s){const e=E.c(10),{itemId:n}=s,o=W();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Ft(),e[0]=l):l=e[0];const i=l;if(!i){let c;e[1]!==o?(c=o("details.prompt.notFoundTitle"),e[1]=o,e[2]=c):c=e[2];let d;e[3]!==o?(d=o("details.prompt.missingConnectionDescription"),e[3]=o,e[4]=d):d=e[4];let r;return e[5]!==c||e[6]!==d?(r=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Me,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=r):r=e[7],r}let a;return e[8]!==n?(a=t.jsx(Ee,{children:t.jsx(A.Suspense,{fallback:null,children:t.jsx(zt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=a):a=e[9],a}function Be(s){const e=E.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=G("min-w-0 overflow-hidden",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function Ue(s){const e=E.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=G("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden text-muted-foreground",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function Y(s){const e=E.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=G("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function oe(s){const e=E.c(10);let n,o,l;e[0]!==s?({asChild:n,className:o,...l}=s,e[0]=s,e[1]=n,e[2]=o,e[3]=l):(n=e[1],o=e[2],l=e[3]);const i=n?tt:"a";let a;e[4]!==o?(a=G("hover:text-foreground transition-colors truncate",o),e[4]=o,e[5]=a):a=e[5];let c;return e[6]!==i||e[7]!==l||e[8]!==a?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:a,...l}),e[6]=i,e[7]=l,e[8]=a,e[9]=c):c=e[9],c}function _e(s){const e=E.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=G("text-foreground font-medium truncate",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function le(s){const e=E.c(12);let n,o,l;e[0]!==s?({children:n,className:o,...l}=s,e[0]=s,e[1]=n,e[2]=o,e[3]=l):(n=e[1],o=e[2],l=e[3]);let i;e[4]!==o?(i=G("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",o),e[4]=o,e[5]=i):i=e[5];let a;e[6]!==n?(a=n??t.jsx(st,{}),e[6]=n,e[7]=a):a=e[7];let c;return e[8]!==l||e[9]!==i||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...l,children:a}),e[8]=l,e[9]=i,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=E.c(12),{toolName:n,connectionId:o,siblings:l,onSelectInstance:i,onBack:a}=s,c=W();let d;e[0]!==o?(d={connectionId:o},e[0]=o,e[1]=d):d=e[1];const r=Ct(d);if(!r.isAuthenticated){let u;return e[2]!==r.supportsOAuth||e[3]!==a||e[4]!==c?(u=t.jsx("div",{className:"flex h-full items-center justify-center",children:r.supportsOAuth?t.jsx(it,{onAuthenticate:()=>a(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=r.supportsOAuth,e[3]=a,e[4]=c,e[5]=u):u=e[5],u}const x=`${o}:${n}`;let h;return e[6]!==o||e[7]!==i||e[8]!==l||e[9]!==x||e[10]!==n?(h=t.jsx(_t,{toolName:n,connectionId:o,siblings:l,onSelectInstance:i},x),e[6]=o,e[7]=i,e[8]=l,e[9]=x,e[10]=n,e[11]=h):h=e[11],h}function _t({toolName:s,connectionId:e,siblings:n,onSelectInstance:o}){const l=W(),{replayId:i}=ot({strict:!1}),a=(()=>{if(!i)return null;const m=`replay-${i}`,f=sessionStorage.getItem(m);if(!f)return null;sessionStorage.removeItem(m);try{return JSON.parse(f)}catch{return null}})(),c=(()=>{if(!a)return null;const m={};for(const[f,$]of Object.entries(a))$!==null&&typeof $=="object"?m[f]=JSON.stringify($,null,2):m[f]=$;return m})(),[d,r]=A.useState(c??{}),[x,h]=A.useState(a?JSON.stringify(a,null,2):"{}"),[u,g]=A.useState(null),[p,j]=A.useState(null),[N,v]=A.useState(null),[y,w]=A.useState(null),[P,C]=A.useState(!1),[b,D]=A.useState(null),{org:k}=fe(),R=ze(e),I=Pt(),T=Dt(),{openSidePanel:O}=kt(),U=`${e}:${s}`,M=ge({connectionId:e,orgId:k.id,orgSlug:k.slug}),_=Tt({client:M}),S=_.data?.tools?.find(m=>m.name===s),F=ft(S?._meta),V=m=>{if(!I)return;const f=$t(m.content);f.content.length>0&&(O(),I.sendMessage({tiptapDoc:f}))},[z,L]=A.useState("json"),[q,Q]=A.useState(!1);F&&!q&&(L("ui"),Q(!0));const J=S?.inputSchema?.properties,be=J?Object.keys(J):[],Z=be.length>0,ee={};if(Z&&S?.inputSchema?.properties)for(const m of be)ee[m]=S.inputSchema.required?.includes(m)?"":void 0;const ne=m=>Object.prototype.hasOwnProperty.call(d,m),Je=async()=>{C(!0),w(null),g(null),j(null),v(null),D(null);const m=performance.now();try{if(!M)throw new Error("MCP client is not available");const f=Z?{...ee,...d}:(()=>{const B=x.trim();if(!B)return{};const H=JSON.parse(B);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();Z&&S?.inputSchema?.properties&&Object.entries(S.inputSchema.properties).forEach(([B,H])=>{if((H.type==="object"||H.type==="array")&&typeof f[B]=="string")try{f[B]=JSON.parse(f[B])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof f[B]=="string"&&f[B]!==""){const Se=Number(f[B]);Number.isNaN(Se)||(f[B]=Se)}});const $=await M.callTool({name:s,arguments:f}),te=$.structuredContent??$,Qe=performance.now(),Ye=Math.round(Qe-m);g(te),j($),v(f);const Ge=JSON.stringify(te),ve=new TextEncoder().encode(Ge).length;D({duration:`${Ye}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(f){const $=f instanceof Error?f.message:String(f);w($||"Unknown error occurred");const te=performance.now();D({duration:`${Math.round(te-m)}ms`})}finally{C(!1)}},ie=(m,f)=>{r($=>({...$,[m]:f}))},Ve=()=>{g(null),j(null),v(null),w(null),D(null)},qe=S?.name??Bt(s),He=t.jsx(Be,{children:t.jsxs(Ue,{children:[t.jsx(Y,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections",params:{org:k.slug},children:l("details.tool.connections")})})}),t.jsx(le,{}),R&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections/$appSlug",params:{org:k.slug,appSlug:wt(R)},search:{tab:"tools"},children:R.title})})}),t.jsx(le,{})]}),t.jsx(Y,{children:t.jsx(_e,{children:qe})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:o,children:[t.jsx(Ie,{size:"sm",className:"w-auto min-w-[200px]",children:t.jsx(Te,{})}),t.jsx($e,{children:n.map(m=>t.jsx(me,{value:m.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ae,{icon:m.icon,name:m.title,size:"xs",className:"shrink-0"}),m.title]})},m.id))})]}),Ke=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground",children:l("details.tool.parameters")}),S?.inputSchema?.required&&S.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",l("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:Z&&S?.inputSchema?.properties?Object.entries(S.inputSchema.properties).map(([m,f])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[m,S.inputSchema?.required?.includes(m)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:f.type})]}),f.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:f.description}),f.type==="object"||f.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(m)?d[m]??"":ee[m]??"",onChange:$=>ie(m,$.target.value),placeholder:l("details.tool.enterAsJson",{key:m}),rows:3}):f.type==="boolean"?t.jsxs(Ce,{value:ne(m)?String(d[m]??""):"",onValueChange:$=>ie(m,$==="true"),children:[t.jsx(Ie,{children:t.jsx(Te,{placeholder:l("details.tool.selectTrueOrFalse")})}),t.jsxs($e,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(m)?d[m]??"":ee[m]??"",onChange:$=>ie(m,$.target.value),placeholder:l("details.tool.enter",{key:m})})]},m)):S?.inputSchema&&!Z?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:l("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:m=>h(m.target.value),placeholder:l("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:l("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{variant:"destructive",className:"gap-2",onClick:Ve,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),l("details.tool.cancel")]}):t.jsxs(K,{variant:"default",className:"gap-2",onClick:Je,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),l("details.tool.executeTool")]})})]}),We=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground",children:l("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(vt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(St,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),F&&t.jsx(bt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(De,{asChild:!0,children:t.jsx(K,{size:"icon",variant:z==="ui"?"secondary":"ghost",onClick:()=>L("ui"),children:t.jsx(ut,{size:14})})}),t.jsx(ke,{children:l("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(De,{asChild:!0,children:t.jsx(K,{size:"icon",variant:z==="json"?"secondary":"ghost",onClick:()=>L("json"),children:t.jsx(ye,{size:14})})}),t.jsx(ke,{children:l("details.tool.jsonView")})]})]})})]})]}),y&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(ht,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Nt,{className:"h-4 w-4"}),t.jsx(gt,{className:"mb-0",children:l("details.tool.executionFailed")})]}),t.jsx(jt,{className:"text-xs text-destructive",children:y})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:F&&z==="ui"&&M?t.jsx(A.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(X,{className:"size-4"}),t.jsx("span",{className:"text-sm",children:l("details.tool.loadingApp")})]})}),children:t.jsx(xt,{resourceURI:F,toolInfo:S?{tool:S}:void 0,toolInput:N??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:M,onMessage:V,onUpdateModelContext:m=>T?.setAppContext(U,m),onTeardown:()=>T?.clearAppContext(U),className:"h-full"})}):u?t.jsxs(t.Fragment,{children:[t.jsx(At,{code:JSON.stringify(u,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{size:"icon",variant:"outline",className:"absolute top-4 right-4",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(u,null,2)),lt.success(l("details.tool.copiedToClipboard"))},children:t.jsx(pt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:l("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{leading:He,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Ae,{icon:R?.icon||null,name:R?.title||s,size:"xl",className:"shrink-0"}),t.jsx(Oe.Title,{children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[_.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):_.isLoading?t.jsx(X,{className:"size-[10px] text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:_.isSuccess?"ready":_.isLoading?"connecting":"error"})]}),t.jsx(It,{annotations:S?.annotations,_meta:S?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:S?.description||"No description available"})]}),n.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:l("details.tool.instance")}),Ne]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Ke}),We]})})]})})}function Jt(s){const e=E.c(21),{itemId:n,siblings:o,onBack:l}=s,i=W(),[a,c]=A.useState(o[0]?.id??"");let d;e[0]!==a||e[1]!==o?(d=o.find(p=>p.id===a)?.id??o[0]?.id??"",e[0]=a,e[1]=o,e[2]=d):d=e[2];const r=d;if(!ze(r||void 0)||!r){let p;e[3]!==i?(p=i("details.tool.connectionNotFound"),e[3]=i,e[4]=p):p=e[4];let j;e[5]!==p?(j=t.jsx("h3",{className:"text-lg font-semibold",children:p}),e[5]=p,e[6]=j):j=e[6];let N;e[7]!==i?(N=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=N):N=e[8];let v;e[9]!==N?(v=t.jsx("p",{className:"text-sm text-muted-foreground",children:N}),e[9]=N,e[10]=v):v=e[10];let y;return e[11]!==j||e[12]!==v?(y=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[j,v]})}),e[11]=j,e[12]=v,e[13]=y):y=e[13],y}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{className:"size-8 text-muted-foreground"})}),e[14]=h):h=e[14];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=p=>A.startTransition(()=>c(p)),e[15]=u):u=e[15];let g;return e[16]!==r||e[17]!==l||e[18]!==o||e[19]!==n?(g=t.jsx(A.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:n,connectionId:r,siblings:o,onSelectInstance:u,onBack:l})}),e[16]=r,e[17]=l,e[18]=o,e[19]=n,e[20]=g):g=e[20],g}const Vt={prompt:Lt};function qt(){const s=E.c(9),e=Fe();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const o=he(n),l=decodeURIComponent(o.itemId);let i;s[1]!==o.appSlug?(i={slug:o.appSlug},s[1]=o.appSlug,s[2]=i):i=s[2];const a=Le(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,r=Ht;let x;return s[5]!==d||s[6]!==l||s[7]!==a?(x=t.jsx(Jt,{itemId:l,siblings:a,onBack:d,onUpdate:r}),s[5]=d,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Ht(s){return Promise.resolve()}function Kt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Wt(){const s=E.c(52),e=Fe();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const o=he(n),l=W(),i=decodeURIComponent(o.collectionName),a=decodeURIComponent(o.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:r}=fe();let x;s[3]!==o.appSlug?(x={slug:o.appSlug},s[3]=o.appSlug,s[4]=x):x=s[4];const u=Le(x)[0]??null,g=u?.id??"",p=g||"no-connection",j=g??null;let N;s[5]!==r.id||s[6]!==r.slug||s[7]!==j?(N={connectionId:j,orgId:r.id,orgSlug:r.slug},s[5]=r.id,s[6]=r.slug,s[7]=j,s[8]=N):N=s[8];const v=ge(N),y=Re(p,i,v);let w;s[9]!==y||s[10]!==a?(w=async J=>{a&&await y.update.mutateAsync({id:a,data:J})},s[9]=y,s[10]=a,s[11]=w):w=s[11];const P=w;let C;s[12]!==i?(C=i?.toLowerCase(),s[12]=i,s[13]=C):C=s[13];const b=C,D=b&&Vt[b];let k;s[14]!==i?(k=Kt(i),s[14]=i,s[15]=k):k=s[15];const R=k;let I;s[16]!==r.slug?(I=t.jsx(Y,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections",params:{org:r.slug},children:"Connections"})})}),s[16]=r.slug,s[17]=I):I=s[17];let T;s[18]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(le,{}),s[18]=T):T=s[18];let O;s[19]!==i||s[20]!==u||s[21]!==r.slug||s[22]!==o.appSlug?(O=u&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:o.appSlug},search:{tab:i},children:u.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=u,s[21]=r.slug,s[22]=o.appSlug,s[23]=O):O=s[23];let U;s[24]!==R?(U=t.jsx(Y,{children:t.jsx(_e,{children:R})}),s[24]=R,s[25]=U):U=s[25];let M;s[26]!==O||s[27]!==U||s[28]!==I?(M=t.jsx(Be,{children:t.jsxs(Ue,{children:[I,T,O,U]})}),s[26]=O,s[27]=U,s[28]=I,s[29]=M):M=s[29];const _=M;if(D){let J;return s[30]!==D||s[31]!==d||s[32]!==P||s[33]!==a?(J=t.jsx(D,{itemId:a,onBack:d,onUpdate:P}),s[30]=D,s[31]=d,s[32]=P,s[33]=a,s[34]=J):J=s[34],J}let S;s[35]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(Rt,{size:36,className:"text-muted-foreground"}),s[35]=S):S=s[35];let F;s[36]!==l?(F=l("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=l,s[37]=F):F=s[37];let V;s[38]!==l?(V=l("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=l,s[39]=V):V=s[39];let z;s[40]!==l?(z=l("orgs.collectionDetail.goBackButton"),s[40]=l,s[41]=z):z=s[41];let L;s[42]!==d||s[43]!==z?(L={onClick:d,children:z},s[42]=d,s[43]=z,s[44]=L):L=s[44];let q;s[45]!==F||s[46]!==V||s[47]!==L?(q=t.jsx(Et,{icon:S,title:F,description:V,buttonProps:L}),s[45]=F,s[46]=V,s[47]=L,s[48]=q):q=s[48];let Q;return s[49]!==_||s[50]!==q?(Q=t.jsx(je,{leading:_,children:q}),s[49]=_,s[50]=q,s[51]=Q):Q=s[51],Q}function Qt(){const s=E.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(qt,{}),s[1]=a):a=s[1],a}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Wt,{}),s[2]=i):i=s[2],i}function tl(){const s=E.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ee,{children:t.jsx(A.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Qt,{})})}),s[0]=e):e=s[0],e}export{tl as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as Se,b as ve,r as f,j as s,I as Ye,h as fe,x as It,aU as Gt,w as Bt,B as Ce,y as Vt,v as qt,D as Ht,aJ as Wt,aK as Qt,aL as Ut,aM as Jt,b9 as Xt,aN as Yt,aO as Zt,aP as _t,m as pe,au as en,q as tn,t as ee,K as Ze}from"./index-BnCCUie5.js";import{k as nn,C as rn,bB as sn,bC as ln}from"./agent-icon-BD0ZSOtG.js";import{s as on}from"./XClose-Bze4d5nj.js";import{S as an}from"./scroll-area-iXdNHDzI.js";import{c as _e,T as et,a as tt}from"./tooltip-icVvNMtU.js";import{b as cn}from"./chat-context-Ch3kSDW6.js";import{F as dn}from"./editor-mY53R5_b.js";import{u as fn}from"./shell-layout-_zkxSyWx.js";import{s as je}from"./save-changes-debug-nBi-n9eV.js";import{s as nt,f as un}from"./sandbox-git-api-C3NvU1dn.js";import{f as mn,C as de,d as rt,g as pn,e as xn}from"./context-menu-O40xDnBW.js";import{t as hn}from"./ChevronDown-XAF5UTWS.js";import{b as gn}from"./sandbox-url-D3mC8qhT.js";import{i as yn,E as bn,c as Pe,e as wn,f as jn,h as Nn,j as Dn,t as ne,k as Ne,l as Me,m as De,g as Ke,n as Ae,o as En,s as Cn,v as Sn,p as Oe,q as Ee,r as ze,u as vn,w as Fn,x as Tn,y as kn}from"./utils-BRIj6V6X.js";import"./AlertCircle-DsrPAFxJ.js";import"./UserCheck01-BMORoWuy.js";import"./Tool01-B-fgmM-0.js";import"./ArrowUp-O_SFXcX4.js";import"./ArrowLeft-CedOhlJl.js";import"./ArrowRight-D31ooF9_.js";import"./BookOpen01-hQOgpoT0.js";import"./Globe04-Bkkv-44s.js";import"./CheckCircle-C5F-vu0b.js";import"./ChevronSelectorVertical-BgyFVvCt.js";import"./ChevronUp-DXb5SN9G.js";import"./UserSquare-BUy12Lbf.js";import"./LinkBroken01-DXQIXK4a.js";import"./CreditCard01-V_X-1km6.js";import"./File02-CWJddKT5.js";import"./MessageCircle01-CBwz3pkx.js";import"./SwitchHorizontal01-BoKcCD1g.js";import"./Eye-DKA9KO8s.js";import"./Fingerprint04-DnZul7lc.js";import"./Image01-w45LU6DD.js";import"./Key01-hOPkG93k.js";import"./LayoutLeft-C3gp1GTI.js";import"./Minus-C6nnb5U7.js";import"./Monitor01-D5ASDXL3.js";import"./Sun-DAly365K.js";import"./Play-BE2Gbr5-.js";import"./Plus-BKnmVwDY.js";import"./SearchMd-BdbsDxg8.js";import"./ShoppingBag01-D0FD1HPP.js";import"./Trash01-Dzo6NInS.js";import"./Upload01-DQgVu-9N.js";import"./Users01-t7brRFdK.js";import"./Zap-BiLLX5O9.js";import"./index-BdQq_4o_.js";import"./index-R3Ci7Tyg.js";import"./use-panel-navigate-CeualaFM.js";import"./thread-route-OiQ4LagC.js";import"./use-project-scope-BF7ZsFcz.js";import"./repository-binding-jAJl13i7.js";import"./use-mcp-client-BwusBux_.js";import"./auth-CAOOT2we.js";import"./use-view-draft-kind-CXGnqfWm.js";import"./use-blog-view-DFNaVcP9.js";import"./use-organization-settings-D5A7oppe.js";import"./schema-DCQWc58B.js";import"./task-board-Cq4D_eE2.js";import"./thread-intent-D0RsO42v.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DyaAZ7A6.js";import"./session-runtime-CmPJqc9T.js";import"./use-entitlements-CdeJE9gN.js";import"./use-ai-providers-Dc5ouLPu.js";import"./use-current-view-dWMur2yx.js";import"./use-in-settings-BZ1un7LI.js";import"./use-decopilot-events-BkY_xbdd.js";import"./use-deployment-admin-Dfxu4f7O.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-CEMI0cuO.js";import"./command-B6aoeD_0.js";import"./index-9QVz6jZ3.js";import"./integration-icon-HGkwXGCE.js";import"./project-icon-lQ2qF_x7.js";import"./use-navigate-to-agent-C7EFO95N.js";import"./use-debounced-value-Bt1SAjKD.js";import"./new-project-dialog-ByQdLyIC.js";import"./label-lULQ_A7o.js";import"./repository-picker-Dl56cEjR.js";import"./github-icon-CF41Lxe4.js";import"./useInfiniteQuery-BWskAF2M.js";import"./infiniteQueryObserver-BESu79F_.js";import"./collection-search-CIcbLnU-.js";import"./new-project-store-D_NVgRYa.js";import"./legacy-admin-welcome-dialog-BbrICcUL.js";import"./drawer-DDbBWwDY.js";import"./use-mobile-Dr7bjUPW.js";import"./required-auth-layout-BDvRMhJJ.js";import"./use-org-sso-DfMcUb6-.js";const Rn={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function Ln(A){const e=Se.c(71),{open:m,mode:J,initialName:b,parentLabel:N,isPending:L,onSubmit:d,onOpenChange:w}=A,O=b===void 0?"":b,p=L===void 0?!1:L,a=ve(),[o,P]=f.useState(O),[X,M]=f.useState(m),x=Rn[J];m!==X&&(M(m),m&&P(O));let c;e[0]!==p||e[1]!==w?(c=U=>{!U&&!p&&w(!1)},e[0]=p,e[1]=w,e[2]=c):c=e[2];const C=c;let z;e[3]!==p||e[4]!==o||e[5]!==d?(z=async U=>{U.preventDefault();const te=o.trim();!te||p||await d(te)},e[3]=p,e[4]=o,e[5]=d,e[6]=z):z=e[6];const R=z;let S;e[7]!==x.titleKey||e[8]!==a?(S=a(x.titleKey),e[7]=x.titleKey,e[8]=a,e[9]=S):S=e[9];let v;e[10]!==S?(v=s.jsx(It,{children:S}),e[10]=S,e[11]=v):v=e[11];let D;e[12]!==x.descriptionKey||e[13]!==a?(D=a(x.descriptionKey),e[12]=x.descriptionKey,e[13]=a,e[14]=D):D=e[14];let j;e[15]!==D?(j=s.jsx(Gt,{children:D}),e[15]=D,e[16]=j):j=e[16];let g;e[17]!==v||e[18]!==j?(g=s.jsxs(Bt,{children:[v,j]}),e[17]=v,e[18]=j,e[19]=g):g=e[19];let E;e[20]!==N||e[21]!==a?(E=N&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:a("sandbox.fileExplorerNameDialog.location")}),s.jsx(Ye,{value:N,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=N,e[21]=a,e[22]=E):E=e[22];let y;e[23]!==a?(y=a("sandbox.fileExplorerNameDialog.name"),e[23]=a,e[24]=y):y=e[24];let T;e[25]!==y?(T=s.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:y}),e[25]=y,e[26]=T):T=e[26];let H;e[27]===Symbol.for("react.memo_cache_sentinel")?(H=U=>P(U.target.value),e[27]=H):H=e[27];let $;e[28]!==x.placeholderKey||e[29]!==a?($=a(x.placeholderKey),e[28]=x.placeholderKey,e[29]=a,e[30]=$):$=e[30];let Y;e[31]!==p||e[32]!==o||e[33]!==$?(Y=s.jsx(Ye,{id:"file-explorer-name",value:o,onChange:H,placeholder:$,autoFocus:!0,disabled:p}),e[31]=p,e[32]=o,e[33]=$,e[34]=Y):Y=e[34];let Z;e[35]!==T||e[36]!==Y?(Z=s.jsxs("div",{className:"space-y-1.5",children:[T,Y]}),e[35]=T,e[36]=Y,e[37]=Z):Z=e[37];let _;e[38]!==E||e[39]!==Z?(_=s.jsxs("div",{className:"space-y-4 py-4",children:[E,Z]}),e[38]=E,e[39]=Z,e[40]=_):_=e[40];let I;e[41]!==w?(I=()=>w(!1),e[41]=w,e[42]=I):I=e[42];let k;e[43]!==a?(k=a("sandbox.fileExplorerNameDialog.cancel"),e[43]=a,e[44]=k):k=e[44];let W;e[45]!==p||e[46]!==I||e[47]!==k?(W=s.jsx(Ce,{type:"button",variant:"outline",onClick:I,disabled:p,children:k}),e[45]=p,e[46]=I,e[47]=k,e[48]=W):W=e[48];let K;e[49]!==p||e[50]!==o?(K=!o.trim()||p,e[49]=p,e[50]=o,e[51]=K):K=e[51];let Q;e[52]!==x.submitKey||e[53]!==p||e[54]!==a?(Q=p?s.jsxs(s.Fragment,{children:[s.jsx(fe,{className:"size-3.5"}),a("sandbox.fileExplorerNameDialog.saving")]}):a(x.submitKey),e[52]=x.submitKey,e[53]=p,e[54]=a,e[55]=Q):Q=e[55];let G;e[56]!==K||e[57]!==Q?(G=s.jsx(Ce,{type:"submit",disabled:K,children:Q}),e[56]=K,e[57]=Q,e[58]=G):G=e[58];let F;e[59]!==W||e[60]!==G?(F=s.jsxs(Vt,{children:[W,G]}),e[59]=W,e[60]=G,e[61]=F):F=e[61];let B;e[62]!==R||e[63]!==_||e[64]!==F||e[65]!==g?(B=s.jsx(qt,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:R,children:[g,_,F]})}),e[62]=R,e[63]=_,e[64]=F,e[65]=g,e[66]=B):B=e[66];let V;return e[67]!==C||e[68]!==m||e[69]!==B?(V=s.jsx(Ht,{open:m,onOpenChange:C,children:B}),e[67]=C,e[68]=m,e[69]=B,e[70]=V):V=e[70],V}function Pn(A){const e=Se.c(47),{deleteTarget:m,deleteDirtyPaths:J,fsActionPending:b,onOpenChange:N,onConfirm:L}=A,d=ve(),w=m?.kind==="directory",O=m!==null,p=w?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let a;e[0]!==d||e[1]!==p?(a=d(p),e[0]=d,e[1]=p,e[2]=a):a=e[2];let o;e[3]!==a?(o=s.jsx(Wt,{children:a}),e[3]=a,e[4]=o):o=e[4];let P;e[5]!==d?(P=d("sandbox.fileExplorerDeleteDialog.description"),e[5]=d,e[6]=P):P=e[6];const X=m?.name;let M;e[7]!==X?(M=s.jsx("span",{className:"font-mono",children:X}),e[7]=X,e[8]=M):M=e[8];let x;e[9]!==w||e[10]!==d?(x=w?d("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=w,e[10]=d,e[11]=x):x=e[11];let c;e[12]!==J.length||e[13]!==d?(c=J.length>0&&s.jsxs(s.Fragment,{children:[" ",J.length===1?d("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):d("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:J.length})]}),e[12]=J.length,e[13]=d,e[14]=c):c=e[14];let C;e[15]!==P||e[16]!==M||e[17]!==x||e[18]!==c?(C=s.jsxs(Qt,{children:[P," ",M,x,c]}),e[15]=P,e[16]=M,e[17]=x,e[18]=c,e[19]=C):C=e[19];let z;e[20]!==C||e[21]!==o?(z=s.jsxs(Ut,{children:[o,C]}),e[20]=C,e[21]=o,e[22]=z):z=e[22];let R;e[23]!==d?(R=d("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=d,e[24]=R):R=e[24];let S;e[25]!==b||e[26]!==R?(S=s.jsx(Jt,{disabled:b,children:R}),e[25]=b,e[26]=R,e[27]=S):S=e[27];const v=b||!m;let D;e[28]!==m||e[29]!==L?(D=H=>{H.preventDefault(),m&&L(m)},e[28]=m,e[29]=L,e[30]=D):D=e[30];let j;e[31]!==d?(j=d("sandbox.fileExplorerDeleteDialog.delete"),e[31]=d,e[32]=j):j=e[32];let g;e[33]!==v||e[34]!==D||e[35]!==j?(g=s.jsx(Xt,{disabled:v,onClick:D,children:j}),e[33]=v,e[34]=D,e[35]=j,e[36]=g):g=e[36];let E;e[37]!==S||e[38]!==g?(E=s.jsxs(Yt,{children:[S,g]}),e[37]=S,e[38]=g,e[39]=E):E=e[39];let y;e[40]!==z||e[41]!==E?(y=s.jsxs(Zt,{children:[z,E]}),e[40]=z,e[41]=E,e[42]=y):y=e[42];let T;return e[43]!==N||e[44]!==O||e[45]!==y?(T=s.jsx(_t,{open:O,onOpenChange:N,children:y}),e[43]=N,e[44]=O,e[45]=y,e[46]=T):T=e[46],T}const Mn="#d9a441";function Kn(A){const e=Se.c(63),{node:m,depth:J,isExpanded:b,isSelected:N,isLoading:L,fileVisual:d,onOpen:w,onSelect:O,onNewFile:p,onNewFolder:a,onCopyPath:o,onCopyRelativePath:P,onRename:X,onDelete:M}=A,x=L===void 0?!1:L,c=ve(),C=m.kind==="directory",{Icon:z,color:R}=d,S=N&&"bg-accent";let v;e[0]!==S?(v=pe("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-sm hover:bg-accent transition-colors",S),e[0]=S,e[1]=v):v=e[1];const D=`${J*14+8}px`;let j;e[2]!==D?(j={paddingLeft:D},e[2]=D,e[3]=j):j=e[3];let g;e[4]!==w||e[5]!==O?(g=()=>{O(),w()},e[4]=w,e[5]=O,e[6]=g):g=e[6];let E;e[7]!==z||e[8]!==R||e[9]!==C||e[10]!==b||e[11]!==x?(E=C?s.jsxs(s.Fragment,{children:[x?s.jsx(fe,{className:"size-3.5 shrink-0 text-muted-foreground"}):b?s.jsx(hn,{size:14,className:"shrink-0 text-muted-foreground"}):s.jsx(en,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx(nn,{size:16,className:"shrink-0",style:{color:Mn}})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"w-3.5 shrink-0"}),s.jsx(z,{size:16,className:"shrink-0",style:{color:R}})]}),e[7]=z,e[8]=R,e[9]=C,e[10]=b,e[11]=x,e[12]=E):E=e[12];let y;e[13]!==m.name?(y=s.jsx("span",{className:"truncate",children:m.name}),e[13]=m.name,e[14]=y):y=e[14];let T;e[15]!==v||e[16]!==j||e[17]!==g||e[18]!==E||e[19]!==y?(T=s.jsx(mn,{asChild:!0,children:s.jsxs("button",{type:"button",className:v,style:j,onClick:g,children:[E,y]})}),e[15]=v,e[16]=j,e[17]=g,e[18]=E,e[19]=y,e[20]=T):T=e[20];let H;e[21]!==c?(H=c("sandbox.fileTreeRow.newFile"),e[21]=c,e[22]=H):H=e[22];let $;e[23]!==p||e[24]!==H?($=s.jsx(de,{onSelect:p,children:H}),e[23]=p,e[24]=H,e[25]=$):$=e[25];let Y;e[26]!==c?(Y=c("sandbox.fileTreeRow.newFolder"),e[26]=c,e[27]=Y):Y=e[27];let Z;e[28]!==a||e[29]!==Y?(Z=s.jsx(de,{onSelect:a,children:Y}),e[28]=a,e[29]=Y,e[30]=Z):Z=e[30];let _;e[31]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(rt,{}),e[31]=_):_=e[31];let I;e[32]!==c?(I=c("sandbox.fileTreeRow.copyPath"),e[32]=c,e[33]=I):I=e[33];let k;e[34]!==o||e[35]!==I?(k=s.jsx(de,{onSelect:o,children:I}),e[34]=o,e[35]=I,e[36]=k):k=e[36];let W;e[37]!==c?(W=c("sandbox.fileTreeRow.copyRelativePath"),e[37]=c,e[38]=W):W=e[38];let K;e[39]!==P||e[40]!==W?(K=s.jsx(de,{onSelect:P,children:W}),e[39]=P,e[40]=W,e[41]=K):K=e[41];let Q;e[42]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(rt,{}),e[42]=Q):Q=e[42];let G;e[43]!==c?(G=c("sandbox.fileTreeRow.rename"),e[43]=c,e[44]=G):G=e[44];let F;e[45]!==X||e[46]!==G?(F=s.jsx(de,{onSelect:X,children:G}),e[45]=X,e[46]=G,e[47]=F):F=e[47];let B;e[48]!==c?(B=c("sandbox.fileTreeRow.delete"),e[48]=c,e[49]=B):B=e[49];let V;e[50]!==M||e[51]!==B?(V=s.jsx(de,{variant:"destructive",onSelect:M,children:B}),e[50]=M,e[51]=B,e[52]=V):V=e[52];let U;e[53]!==$||e[54]!==Z||e[55]!==k||e[56]!==K||e[57]!==F||e[58]!==V?(U=s.jsxs(pn,{className:"w-52",children:[$,Z,_,k,K,Q,F,V]}),e[53]=$,e[54]=Z,e[55]=k,e[56]=K,e[57]=F,e[58]=V,e[59]=U):U=e[59];let te;return e[60]!==U||e[61]!==T?(te=s.jsxs(xn,{children:[T,U]}),e[60]=U,e[61]=T,e[62]=te):te=e[62],te}const st=200,An=2,On=250,it=200;function zn(A,e){return gn(A,e)}function $n(A){const e=Se.c(9),{text:m,query:J}=A;let b,N,L;if(e[0]!==J||e[1]!==m){const{leadingEllipsis:w,segments:O}=En(m,J);b="truncate font-mono text-muted-foreground",N=w&&s.jsx("span",{className:"text-muted-foreground/50",children:"…"}),L=O.map(In),e[0]=J,e[1]=m,e[2]=b,e[3]=N,e[4]=L}else b=e[2],N=e[3],L=e[4];let d;return e[5]!==b||e[6]!==N||e[7]!==L?(d=s.jsxs("span",{className:b,children:[N,L]}),e[5]=b,e[6]=N,e[7]=L,e[8]=d):d=e[8],d}function In(A,e){return A.match?s.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:A.text},e):s.jsx("span",{children:A.text},e)}function Cs({orgSlug:A,virtualMcpId:e,branch:m,threadId:J,openPath:b}){const N={orgSlug:A,virtualMcpId:e,branch:m,threadId:J},[L,d]=f.useState({files:[],directories:[],truncated:!1}),{files:w,directories:O}=L,[p,a]=f.useState(new Set),[o,P]=f.useState(null),[X,M]=f.useState(null),[x,c]=f.useState([]),[C,z]=f.useState(""),[R,S]=f.useState(null),[v,D]=f.useState(null),[j,g]=f.useState(!1),[E,y]=f.useState(!1),[T,H]=f.useState(!1),[$,Y]=f.useState(!1),[,Z]=f.useState(new Set),[_,I]=f.useState(new Set),k=f.useRef(0),W=f.useRef(null),K=f.useRef(new Set),Q=f.useRef(new Map),G=f.useRef(null),F=f.useRef(0),B=f.useRef(null),V=f.useRef(null),U=f.useRef(null);function te(t){Z(n=>{const r=typeof t=="function"?t(n):t;return K.current=r,r})}const[oe,ae]=f.useState(new Map),Fe=f.useRef(null),[se,xe]=f.useState(null),{sendMessage:lt}=cn(),{openSidePanel:ot}=fn(),he=tn(),[q,re]=f.useState(null),[Te,ke]=f.useState(null),[ge,ye]=f.useState(!1);async function ie(t,n){const r=await fetch(zn(N,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const i=await r.json().catch(()=>({}));throw new Error(i.error??`Request failed (${r.status})`)}return r.json()}async function be(){he.invalidateQueries({queryKey:nt(N)})}function $e(t,n,r){navigator.clipboard.writeText(r).then(()=>ee.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>ee.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function at(t){const n=Tn(t);if(!n)return;const r=`${A}/${e}/${m}`;he.setQueryData(Ze.decofile(r),i=>{if(!i)return i;const{[n]:l,...u}=i;return u}),he.invalidateQueries({queryKey:Ze.liveMeta(A,e,m)})}function ct(t){const n=t.kind==="file"?[t.path]:w.filter(r=>r.startsWith(".deco/blocks/")).map(r=>Ne(r)).filter(r=>r===t.path||r.startsWith(`${t.path}/`));for(const r of n)at(r)}function dt(t){const n=Ne(t);return x.filter(r=>{if(r!==n&&!r.startsWith(`${n}/`))return!1;const i=oe.get(r);return!!(i?.loaded&&i.editorValue!==i.savedContent)})}function Ie(t){c(n=>n.map(r=>t(r)).filter(r=>r!==null)),P(n=>n&&t(n)),ae(n=>{const r=new Map;for(const[i,l]of n){const u=t(i);u&&r.set(u,l)}return r}),M(n=>{if(!n)return n;const r=t(n.path);return r?r===n.path?n:{...n,path:r,name:r.split("/").pop()??r}:null})}function ft(t){const n=Ne(t);M(r=>r&&(r.path===n||r.path.startsWith(`${n}/`)?null:r)),Ie(r=>r===n||r.startsWith(`${n}/`)?null:r)}async function ut(t,n){if(!q)return;const r=Ee(q.parentDir,n);if(ze(r,w,O))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:ne(r),content:""}),await ue(),await be(),re(null),me(r)}async function mt(t,n){if(!q)return;const r=Ee(q.parentDir,n);if(ze(r,w,O))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const i=ne(r);await ie("mkdir",{path:i}),d(l=>({...l,directories:l.directories.includes(i)?l.directories:[...l.directories,i]})),await ue(),await be(),re(null),a(l=>{const u=new Set(l);for(const le of Ae(r))u.add(le);return u.add(r),u}),M({name:n,path:r,kind:"directory",children:[]})}async function pt(t,n){if(!q)return;const r=q.node.path,i=De(r),l=Ee(i,n);if(l===r){re(null);return}if(ze(l,w,O))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("rename",{from:ne(r),to:ne(l)}),Ie(u=>u===r?l:u.startsWith(`${r}/`)?Ee(l,u.slice(r.length+1)):u),await ue(),await be(),re(null)}async function xt(t,n){ye(!0);try{await ie("unlink",{path:ne(n.path),recursive:n.kind==="directory"}),ct(n),ft(n.path),await ue(),await be(),ke(null),ee.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(r){ee.error(r instanceof Error?r.message:t("sandbox.fileExplorer.deleteFailed"))}finally{ye(!1)}}async function ht(t,n){const r=Sn(n);if(r){ee.error(r);return}ye(!0);try{q?.mode==="new-file"?(await ut(t,n),ee.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):q?.mode==="new-folder"?(await mt(t,n),ee.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):q?.mode==="rename"&&(await pt(t,n),ee.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(i){ee.error(i instanceof Error?i.message:t("sandbox.fileExplorer.operationFailed"))}finally{ye(!1)}}const Ge=f.useRef(!1);Ge.current||(Ge.current=!0,W.current=ue());const[gt,yt]=f.useState(null),h=ve();if(b&&b!==gt){yt(b);const t=b;queueMicrotask(()=>{yn(t)&&me(t)})}async function Re(t){const n=await ie("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Be(t,n,r){if(r!==k.current)return!1;let i=!1;return d(l=>{const u=n?kn(l.files,l.directories,t,l.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return i=!!u.truncated,{files:u.files,directories:u.directories,truncated:i}}),i&&ee.warning(h("sandbox.fileExplorer.fileListTruncated")),i}async function bt(t){const n=Q.current.get(t);if(n)return n;const r=k.current,i=(async()=>{const l=await Re({pattern:"**/*",path:ne(t),limit:Pe}),u=Be(l,!0,r);return!u&&r===k.current&&te(le=>{const we=new Set(le);return we.add(t),we}),u})();Q.current.set(t,i);try{return await i}finally{Q.current.delete(t)}}async function Ve(t){if(!Oe(t,K.current))return!1;I(n=>new Set(n).add(t));try{return await bt(t)}finally{I(n=>{const r=new Set(n);return r.delete(t),r})}}async function wt(t,n){const r=new Set(K.current);for(const i of Ae(n)){if(!Oe(i,r))continue;if(await Ve(i))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));r.add(i)}}async function ue(){const t=++k.current;B.current=null,V.current=null,Q.current.clear(),H(!0),te(new Set),a(new Set),I(new Set);try{const n=await Re({pattern:"**/*",limit:Pe,maxDepth:bn});Be(n,!1,t),Y(!0)}catch{$&&ee.error(h("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{H(!1)}}async function qe(t){if(!oe.get(t)?.loaded){ae(r=>{const i=new Map(r);return i.set(t,{savedContent:"",editorValue:"",loaded:!1}),i});try{const r=await ie("read",{path:ne(t),full:!0}),i=Cn(r.content??"");ae(l=>{const u=new Map(l);return u.set(t,{savedContent:i,editorValue:i,loaded:!0}),u})}catch{}}}function jt(){F.current++,S(null),D(null),g(!1),y(!1)}async function Nt(){const t=k.current,n=B.current;if(n&&n.generation===t)return n.files;const r=V.current;if(r&&r.generation===t)return r.promise;const i=(async()=>{const l=await Re({pattern:"**/*",limit:Pe});return k.current===t&&(B.current={generation:t,files:l.files}),l.files})();V.current={generation:t,promise:i};try{return await i}finally{V.current?.generation===t&&(V.current=null)}}async function Dt(t,n){try{const r=await Nt();if(n!==F.current)return;S(vn(r,t,it))}catch{if(n!==F.current)return;S([])}}async function Et(t,n){g(!0);try{const r=await ie("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:st});if(n!==F.current)return;D(Fn(r.results??"")),y((r.matchCount??0)>=st)}catch{if(n!==F.current)return;D([]),y(!1)}finally{n===F.current&&g(!1)}}function Ct(t){const n=t.trim(),r=++F.current;Dt(n,r),n.length<An?(D(null),g(!1),y(!1)):Et(n,r)}function St(t){if(z(t),G.current&&clearTimeout(G.current),!t.trim()){jt();return}G.current=setTimeout(()=>{Ct(t)},On)}function He(t){const n=U.current;if(!n||n.path!==o)return;U.current=null;const r=Math.max(1,n.line);t.revealLineInCenter(r),t.setPosition({lineNumber:r,column:1}),t.focus()}function vt(t){U.current={path:t.path,line:t.line};const n=o===t.path&&oe.get(t.path)?.loaded;me(t.path),n&&Fe.current&&He(Fe.current)}async function Ft(t,n){try{await ie("write",{path:ne(t),content:n}),je("file saved via sandbox /write",{path:t}),he.invalidateQueries({queryKey:nt(N)});try{const r=await un(N);je("git status after save",r)}catch(r){je("git status after save failed",{path:t,error:r instanceof Error?r.message:String(r)})}ae(r=>{const i=new Map(r),l=i.get(t);return l&&i.set(t,{...l,savedContent:n}),i})}catch(r){je("file save failed",{path:t,error:r instanceof Error?r.message:String(r)})}}function Tt(t){P(t),M({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),xe(null),x.includes(t)||c(n=>[...n,t]),qe(t)}function kt(t){const n=oe.get(t);n?.loaded&&n.editorValue!==n.savedContent&&!window.confirm(h("sandbox.fileExplorer.discardUnsavedChangesConfirm"))||(c(i=>{const l=i.filter(u=>u!==t);return o===t&&P(l[l.length-1]??null),l}),ae(i=>{const l=new Map(i);return l.delete(t),l}))}function We(t){a(n=>{const r=new Set(n);return r.has(t)?r.delete(t):r.add(t),r})}async function Rt(t){if(Oe(t,K.current))try{if(await Ve(t))return}catch(n){ee.error(n instanceof Error?n.message:h("sandbox.fileExplorer.failedToLoadFolder"));return}We(t)}async function Lt(t,n){if(n){We(t);return}await Rt(t)}async function Pt(t){await W.current,await wt(h,t);const n=Ae(t);a(r=>{const i=new Set(r);for(const l of n)i.add(l);return i}),Tt(t)}function me(t){Pt(t).catch(n=>{ee.error(n instanceof Error?n.message:h("sandbox.fileExplorer.failedToOpenFile"))})}function Mt(){return X?.kind==="directory"?X.path:X?.kind==="file"?De(X.path):o?De(o):"/"}function Qe(t){const n=Mt();re({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Kt=wn(w,O),Ue=jn(Kt,p),Le=R?.length??0,Je=Nn(v??[]),Xe=v?.length??0,ce=o?oe.get(o):null,At=ce?.loaded&&ce.editorValue!==ce.savedContent,Ot=Te?dt(Te.path):[],zt=(t,n)=>{Fe.current=t,He(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!o)return;const r=t.getValue();await Ft(o,r)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const r=t.getSelection(),i=t.getModel();if(!r||!i||!o)return;const l=i.getValueInRange(r);xe({filePath:o,lineStart:r.startLineNumber,lineEnd:r.endLineNumber,selectedCode:l})})};function $t(t){if(!se)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${se.filePath}\``,`**Lines:** ${se.lineStart}–${se.lineEnd}`];if(se.selectedCode){const r=Ke(se.filePath),i=se.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+r,i,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),ot(),lt({parts:[{type:"text",text:n.join(`
|
|
2
|
-
`)}]}),xe(null)}return T&&!$?s.jsx("div",{className:"flex items-center justify-center h-full w-full",children:s.jsx(fe,{className:"size-5 text-muted-foreground"})}):s.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[s.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[s.jsxs("div",{className:"relative min-w-0 flex-1",children:[s.jsx(rn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),s.jsx("input",{type:"text",value:C,onChange:t=>St(t.target.value),placeholder:h("sandbox.fileExplorer.searchFilesPlaceholder"),"aria-label":h("sandbox.fileExplorer.searchFilesLabel"),className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs placeholder:text-muted-foreground focus-ring"})]}),s.jsxs(_e,{children:[s.jsx(et,{asChild:!0,children:s.jsx(Ce,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0","aria-label":h("sandbox.fileExplorer.newFileLabel"),onClick:()=>Qe("new-file"),children:s.jsx(sn,{size:14})})}),s.jsx(tt,{side:"bottom",children:h("sandbox.fileExplorer.newFile")})]}),s.jsxs(_e,{children:[s.jsx(et,{asChild:!0,children:s.jsx(Ce,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0","aria-label":h("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Qe("new-folder"),children:s.jsx(ln,{size:14})})}),s.jsx(tt,{side:"bottom",children:h("sandbox.fileExplorer.newFolder")})]})]}),s.jsx(an,{className:"flex-1",children:s.jsxs("div",{className:"py-1",children:[!C&&Ue.map(t=>{const{node:n,depth:r}=t,i=n.kind==="directory",l=p.has(n.path),u=X?.path===n.path,le=Dn(n.path,n.kind),we=i&&_.has(n.path);return s.jsx(Kn,{node:n,depth:r,isExpanded:l,isSelected:u,isLoading:we,fileVisual:Me(n.name),onSelect:()=>M(n),onOpen:()=>{i?Lt(n.path,l):me(n.path)},onNewFile:()=>re({mode:"new-file",node:n,parentDir:le}),onNewFolder:()=>re({mode:"new-folder",node:n,parentDir:le}),onCopyPath:()=>$e(h,"Path",Ne(n.path)),onCopyRelativePath:()=>$e(h,"Relative path",ne(n.path)),onRename:()=>re({mode:"rename",node:n,parentDir:le}),onDelete:()=>ke(n)},n.path)}),!C&&$&&Ue.length===0&&s.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:h("sandbox.fileExplorer.noFilesFound")}),C&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-2xs font-medium text-muted-foreground",children:[s.jsx("span",{children:h("sandbox.fileExplorer.files")}),Le>0&&s.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[Le,Le>=it?"+":""]})]}),R!==null&&R.length===0&&s.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:h("sandbox.fileExplorer.noFileNamesMatch")}),R?.map(t=>{const n=t.split("/").pop()??t,r=De(t),{Icon:i,color:l}=Me(n),u=o===t;return s.jsxs("button",{type:"button",onClick:()=>me(t),title:t,className:pe("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",u&&"bg-accent"),children:[s.jsx(i,{size:14,className:pe("shrink-0",l)}),s.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),r!=="/"&&s.jsx("span",{className:"truncate text-muted-foreground/60",children:r})]},t)})]}),C&&s.jsxs("div",{className:"mt-1 border-t pt-1",children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-2xs font-medium text-muted-foreground",children:[s.jsx("span",{children:h("sandbox.fileExplorer.inFiles")}),Xe>0&&s.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[Xe,E?"+":""]}),j&&s.jsx(fe,{className:"size-[10px]"})]}),!j&&v!==null&&Je.length===0&&s.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:h("sandbox.fileExplorer.noMatchesInFileContents")}),Je.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:r,color:i}=Me(n);return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[s.jsx(r,{size:14,className:pe("shrink-0",i)}),s.jsx("span",{className:"truncate",children:n}),s.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(l=>s.jsxs("button",{type:"button",onClick:()=>vt(l),title:`${t.path}:${l.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[s.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:l.line}),s.jsx($n,{text:l.text,query:C})]},`${t.path}:${l.line}`))]},t.path)})]})]})})]}),s.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[x.length>0&&s.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:x.map(t=>{const n=oe.get(t),r=n?.loaded&&n.editorValue!==n.savedContent,i=o===t,l=t.split("/").pop()??t;return s.jsxs("div",{className:pe("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",i?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{P(t),qe(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":i,children:[s.jsx("span",{className:"truncate max-w-32",children:l}),r&&s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),s.jsx("button",{type:"button",className:"ml-1 p-0.5 hover:bg-accent-foreground/10 rounded-lg",onClick:u=>{u.stopPropagation(),kt(t)},children:s.jsx(on,{size:12})})]},t)})}),se&&s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:s.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl glass px-3 py-1.5",onSubmit:t=>{t.preventDefault();const r=t.currentTarget.elements.namedItem("askAiInput");r.value.trim()&&$t(r.value)},children:[s.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:h("sandbox.fileExplorer.askTheAiPlaceholder"),className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&xe(null)}}),s.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity",title:h("sandbox.fileExplorer.send"),children:s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[s.jsx("title",{children:h("sandbox.fileExplorer.send")}),s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),s.jsx("div",{className:"flex-1 overflow-hidden",children:o&&ce?.loaded?s.jsx(dn,{language:Ke(o),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:ce.editorValue,path:o,onChange:t=>{const n=o;n&&ae(r=>{const i=new Map(r),l=i.get(n);return l&&i.set(n,{...l,editorValue:t??""}),i})},onMount:zt,loading:s.jsx("div",{className:"flex items-center justify-center h-full w-full",children:s.jsx(fe,{className:"size-5 text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},o):o&&!ce?.loaded?s.jsx("div",{className:"flex items-center justify-center h-full w-full",children:s.jsx(fe,{className:"size-5 text-muted-foreground"})}):s.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:h("sandbox.fileExplorer.selectFileToEdit")})}),o&&s.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-2xs text-muted-foreground shrink-0",children:[s.jsx("span",{className:"truncate",children:o}),s.jsxs("span",{children:[h(At?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Ke(o)]})]})]}),s.jsx(Ln,{open:q!==null,mode:q?.mode??"new-file",initialName:q?.mode==="rename"?q.node.name:"",parentLabel:q&&q.mode!=="rename"?q.parentDir==="/"?"/":ne(q.parentDir):void 0,isPending:ge,onSubmit:t=>ht(h,t),onOpenChange:t=>{!t&&!ge&&re(null)}}),s.jsx(Pn,{deleteTarget:Te,deleteDirtyPaths:Ot,fsActionPending:ge,onOpenChange:t=>{!t&&!ge&&ke(null)},onConfirm:t=>{xt(h,t)}})]})}export{Cs as FileExplorer};
|