decocms 4.618.0 → 4.619.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-BYyFOifG.js → AlertCircle-CS5y5cdF.js} +1 -1
- package/dist/client/assets/{AreaChart-D6tyN032.js → AreaChart-6i9ddKAo.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BQKI9I0k.js → ArrowLeft-CnpYebJt.js} +1 -1
- package/dist/client/assets/{ArrowRight-B21E_uc5.js → ArrowRight-CTIzvrRD.js} +1 -1
- package/dist/client/assets/{ArrowUp-BbdlU24N.js → ArrowUp-B_rPxUl3.js} +1 -1
- package/dist/client/assets/{BookOpen01-BUy5CVjC.js → BookOpen01-0vmOJP7K.js} +1 -1
- package/dist/client/assets/{CartesianChart-DDuspEUo.js → CartesianChart-BLh4dFJB.js} +1 -1
- package/dist/client/assets/{CategoricalChart-CclXOr_i.js → CategoricalChart-CwzUkCwO.js} +1 -1
- package/dist/client/assets/{CheckCircle-DtUq_uxu.js → CheckCircle-CVSsEuJs.js} +1 -1
- package/dist/client/assets/{ChevronDown-C0rME5fU.js → ChevronDown-BkddO6nk.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BCjXLDN_.js → ChevronSelectorVertical-B_EPXu-J.js} +1 -1
- package/dist/client/assets/{ChevronUp-CIqW-9_W.js → ChevronUp-hmtO7NfN.js} +1 -1
- package/dist/client/assets/{CreditCard01-BGMvQi86.js → CreditCard01-CYAMo28t.js} +1 -1
- package/dist/client/assets/{Eye-DvysNEeS.js → Eye-NyWbd_Et.js} +1 -1
- package/dist/client/assets/{File02-Nky5bxni.js → File02-B0o8Z6Rd.js} +1 -1
- package/dist/client/assets/{Fingerprint04-DNoiAgrN.js → Fingerprint04-DFly9X11.js} +1 -1
- package/dist/client/assets/{Globe04--1ycu_yQ.js → Globe04-Bu51hlDK.js} +1 -1
- package/dist/client/assets/{Image01-BGZNkNVE.js → Image01-Xgs_5RZR.js} +1 -1
- package/dist/client/assets/{Key01-B7vuN73N.js → Key01-B6wydByr.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DTjvUEMi.js → LayoutLeft-ww8XIIKY.js} +1 -1
- package/dist/client/assets/{LinkBroken01-w2HNuUHo.js → LinkBroken01-CothmVOv.js} +1 -1
- package/dist/client/assets/{MessageCircle01-BUz5eIR5.js → MessageCircle01-BoiiT0Ka.js} +1 -1
- package/dist/client/assets/{Minus-DhX2EjkJ.js → Minus-DjGZhteG.js} +1 -1
- package/dist/client/assets/{Monitor01-Dv4dKtFe.js → Monitor01-BnNa35fy.js} +1 -1
- package/dist/client/assets/{Play-BcRuLGoC.js → Play-DYcX2TsV.js} +1 -1
- package/dist/client/assets/{Plus-Bd_Azs6t.js → Plus-BlCDSK3_.js} +1 -1
- package/dist/client/assets/{ReferenceLine-B5a2JVy9.js → ReferenceLine-ysfQtWpe.js} +1 -1
- package/dist/client/assets/{SearchMd-DoUjFKDV.js → SearchMd-B2ZqlWzx.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DsiPVRC3.js → ShoppingBag01-CO-Ik7_a.js} +1 -1
- package/dist/client/assets/{Sun-bgIMzv-s.js → Sun-C31h0XVy.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BZWsjo2g.js → SwitchHorizontal01-B9krqVlE.js} +1 -1
- package/dist/client/assets/{Tool01-JC0jUvnM.js → Tool01-D_bTJJvK.js} +1 -1
- package/dist/client/assets/{Tooltip-DmnEut8_.js → Tooltip-BDg85pZn.js} +1 -1
- package/dist/client/assets/{Trash01-DUjxO1Dn.js → Trash01-CvVvZjMc.js} +1 -1
- package/dist/client/assets/{Upload01-BcZgaIHQ.js → Upload01-DAa882sM.js} +1 -1
- package/dist/client/assets/{UserCheck01-CHkzczFI.js → UserCheck01-B7Ux1cXt.js} +1 -1
- package/dist/client/assets/{UserSquare-D6ubIo4l.js → UserSquare-fSKR9s5Z.js} +1 -1
- package/dist/client/assets/{Users01-DOgFV3e5.js → Users01-CYXQ60-Z.js} +1 -1
- package/dist/client/assets/{XClose-CHJIrn3i.js → XClose-BvzwUB-E.js} +1 -1
- package/dist/client/assets/{Zap-6gSNYeqn.js → Zap-BALSokOc.js} +1 -1
- package/dist/client/assets/{access-gate-B30zL1q2.js → access-gate-JiR82oco.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-DgKMGv-9.js → add-connection-dialog-DYa3N2eg.js} +1 -1
- package/dist/client/assets/agent-app-Ccrencfm.js +1 -0
- package/dist/client/assets/{agent-assets-CamOcpgT.js → agent-assets-DThFx4M4.js} +1 -1
- package/dist/client/assets/{agent-automation-BfbO9Khi.js → agent-automation-BNyRdPpc.js} +1 -1
- package/dist/client/assets/{agent-automations-B4IdsMR9.js → agent-automations-DJGo3Vpm.js} +1 -1
- package/dist/client/assets/{agent-blog-Cafvmf-h.js → agent-blog-SWKAlIDs.js} +2 -2
- package/dist/client/assets/{agent-blog-post-Dqts0p9T.js → agent-blog-post-BMj1nG5H.js} +2 -2
- package/dist/client/assets/{agent-business-case-BhUa4Myx.js → agent-business-case-DWa8MdFx.js} +1 -1
- package/dist/client/assets/{agent-calendar-yZ-kBQTO.js → agent-calendar-Dc34MYin.js} +1 -1
- package/dist/client/assets/{agent-capabilities-CWtYqnIq.js → agent-capabilities-B0JydJjP.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-D6NBeEEC.js → agent-connect-sources-BzvV2s_2.js} +1 -1
- package/dist/client/assets/agent-deck-t8ah4YL3.js +1 -0
- package/dist/client/assets/{agent-e2e-WoNG4ZEl.js → agent-e2e-CVKnE_cq.js} +1 -1
- package/dist/client/assets/agent-experiments-B6WL8a55.js +1 -0
- package/dist/client/assets/agent-file-DzOVJ5jJ.js +1 -0
- package/dist/client/assets/{agent-hosting-nth6pteI.js → agent-hosting-CzWiy0GX.js} +1 -1
- package/dist/client/assets/{agent-icon-zKGrqypc.js → agent-icon-qKbICqBE.js} +1 -1
- package/dist/client/assets/agent-library-CkWv-QK0.js +1 -0
- package/dist/client/assets/agent-library-file-BeuXNSru.js +1 -0
- package/dist/client/assets/agent-overview-vn0B99S2.js +1 -0
- package/dist/client/assets/{agent-releases-Bf5mW-Cb.js → agent-releases-DVlreX78.js} +1 -1
- package/dist/client/assets/agent-settings-C8Vbd4tx.js +1 -0
- package/dist/client/assets/{agent-site-editor-Cs2byz0P.js → agent-site-editor-BscJQYUu.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-znS9yeFa.js +2 -0
- package/dist/client/assets/agent-site-editor-content-DFaZauTr.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-Bshkv5l8.js +1 -0
- package/dist/client/assets/agent-view-DbsCo68i.js +1 -0
- package/dist/client/assets/{agent-view-guard-BlaaF4Tt.js → agent-view-guard-2l72ULUX.js} +1 -1
- package/dist/client/assets/ai-providers-BuJXSSAm.js +1 -0
- package/dist/client/assets/{alert-Bv1HVos8.js → alert-pq0Y8AC8.js} +1 -1
- package/dist/client/assets/{analytics-sections-BszcYb0J.js → analytics-sections-BcskhJEQ.js} +1 -1
- package/dist/client/assets/api-keys-C3uBLxjm.js +1 -0
- package/dist/client/assets/{api-keys-omOxFywl.js → api-keys-SpdE7FiC.js} +1 -1
- package/dist/client/assets/{app-editor-CrhcliiJ.js → app-editor-1yI1PePZ.js} +1 -1
- package/dist/client/assets/{asset-utils-C40NGt6S.js → asset-utils-tz_LHKas.js} +1 -1
- package/dist/client/assets/{auth-BbyP7Mh4.js → auth-AT-S53oU.js} +1 -1
- package/dist/client/assets/{auth-catchall-DC_pvXWR.js → auth-catchall-CFacQ3p_.js} +1 -1
- package/dist/client/assets/{auth-entry-DTt6oF6n.js → auth-entry-BuYf9qZf.js} +1 -1
- package/dist/client/assets/{auth-split-layout-D6lmqNl3.js → auth-split-layout-Bdnex8hf.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Dv5K3sbt.js → authenticate-and-persist-oauth-BOJ6RO7H.js} +1 -1
- package/dist/client/assets/{automation-list-row-CVyxW8bA.js → automation-list-row-Du2hwkkk.js} +1 -1
- package/dist/client/assets/{automation-runs-DxzIf484.js → automation-runs-Bg2KLqhb.js} +1 -1
- package/dist/client/assets/{automations-D6gxCniS.js → automations-BJ-1CA9i.js} +1 -1
- package/dist/client/assets/{badge-DhCDyINb.js → badge-CFiK0EOx.js} +1 -1
- package/dist/client/assets/{block-document-DhUbHSJu.js → block-document-DUVkY9ea.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-Bmn4QW94.js → blocks-preview-workspace-context-B9duZzas.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-CtDx-TXT.js → blocks-tab-states-DC7kOtf6.js} +1 -1
- package/dist/client/assets/{blog-preview-url-C8ne1zjD.js → blog-preview-url-sQQ4EaTX.js} +1 -1
- package/dist/client/assets/{blog-schema-XbxpqD7n.js → blog-schema-jwHNvUT9.js} +1 -1
- package/dist/client/assets/{blog-source-gate--8e6WU5f.js → blog-source-gate-CdJyl3s4.js} +1 -1
- package/dist/client/assets/{blog-view-gate-5YPkAPHi.js → blog-view-gate-CH_KIbwu.js} +1 -1
- package/dist/client/assets/{buckets-mVuz76PR.js → buckets-B4_-T0ED.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-YaUfgVXc.js → build-improve-prompt-doc-BviIkkQs.js} +1 -1
- package/dist/client/assets/{calendar-BDRihgLI.js → calendar-C02ezVcS.js} +1 -1
- package/dist/client/assets/{capability-load-error-BUXjQvww.js → capability-load-error-C7VfNWgD.js} +1 -1
- package/dist/client/assets/{category-editor-DAZ1WajU.js → category-editor-DqRDNx2v.js} +1 -1
- package/dist/client/assets/{category-tree-9o5eAqGF.js → category-tree-dngYOFzN.js} +1 -1
- package/dist/client/assets/{chart-BD1DM8Vo.js → chart-D2etphpL.js} +1 -1
- package/dist/client/assets/chat-context-CvQ-sM5v.js +43 -0
- package/dist/client/assets/{chat-draft-BwCJJBjY.js → chat-draft-CPECGWWa.js} +1 -1
- package/dist/client/assets/{checkbox-BK5KAA6g.js → checkbox-DR7-Iy_E.js} +1 -1
- package/dist/client/assets/{choose-editor-Xa2hczm2.js → choose-editor-C-XxlJ7G.js} +1 -1
- package/dist/client/assets/{cli-auth-success-4m_qDet6.js → cli-auth-success-BvJuyvyk.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-CT9mj3NU.js → cms-settings-editor-CTMXFNOv.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-BZtc347l.js → cms-store-drafts-q3yACtXx.js} +1 -1
- package/dist/client/assets/{collapsible-Ff_HBxQZ.js → collapsible-BKxoPjIN.js} +1 -1
- package/dist/client/assets/{collection-detail-Da5T5FHc.js → collection-detail-iP9tRfV6.js} +1 -1
- package/dist/client/assets/{collection-display-button-Dsc8IsyJ.js → collection-display-button-BVsx6EDz.js} +1 -1
- package/dist/client/assets/{collection-search-C3yL3Si4.js → collection-search-CphnxlYD.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CC70QIiG.js → collection-table-wrapper-BfQjodPV.js} +1 -1
- package/dist/client/assets/{collection-tabs-Bw8ZEjbc.js → collection-tabs-C9T1HZQP.js} +1 -1
- package/dist/client/assets/{combobox-DhzcDPGN.js → combobox-BTP9T0Pc.js} +1 -1
- package/dist/client/assets/{command-C04_rx60.js → command-Cqqhh_W6.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-Cyom-mwN.js → companion-mcps-section-SEt2U7bz.js} +1 -1
- package/dist/client/assets/{config-CTUwx0E7.js → config-DGvqEncS.js} +1 -1
- package/dist/client/assets/{connect-key-x35pzj1P.js → connect-key-DVNtQy7y.js} +1 -1
- package/dist/client/assets/{connect-layout-CYxI3Ix2.js → connect-layout-sx7G_FMd.js} +1 -1
- package/dist/client/assets/{connect-BFJ96IAv.js → connect-obEE-StP.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-DW2Q7-Vc.js → connect-source-dialog-DnCXZ3Bm.js} +1 -1
- package/dist/client/assets/{connection-OrxsAVXu.js → connection-BZJlBrLd.js} +1 -1
- package/dist/client/assets/{connection-card-JSblTqum.js → connection-card-B8Lj_r0P.js} +1 -1
- package/dist/client/assets/{connection-detail-BDZh3nKl.js → connection-detail-CVYzedpa.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-D-61dVx3.js → connection-form-helpers-veDVCb9w.js} +1 -1
- package/dist/client/assets/{connection-slug-BxAeiVuI.js → connection-slug-DOi8cWyk.js} +1 -1
- package/dist/client/assets/{connections-Cm49J0DF.js → connections-k9zhxlcM.js} +1 -1
- package/dist/client/assets/{content-changes-Sy14c4Sj.js → content-changes-CFJfbWRJ.js} +1 -1
- package/dist/client/assets/{content-tab-B08qF9Ws.js → content-tab-Cq6li-sw.js} +3 -3
- package/dist/client/assets/{context-DWbB1_E6.js → context-DCQPaz03.js} +1 -1
- package/dist/client/assets/{context-menu-2WNbt8mp.js → context-menu-BfINdeF4.js} +1 -1
- package/dist/client/assets/{context-shell-CsxbLyhW.js → context-shell-DkTSiVhx.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-Cmj0uZ47.js → create-organization-dialog-pttnLi8P.js} +1 -1
- package/dist/client/assets/{daily-pulse-C2a7jj6_.js → daily-pulse-BMeIrOO8.js} +1 -1
- package/dist/client/assets/{delete-copy-B_bYyZez.js → delete-copy-BI2Sd04D.js} +1 -1
- package/dist/client/assets/{device-hint-BT8_DhB_.js → device-hint-XFntojbN.js} +1 -1
- package/dist/client/assets/{discover-DqSkXP2Q.js → discover-DCJNP2ov.js} +1 -1
- package/dist/client/assets/{domain-settings-Cyu0iMV3.js → domain-settings-C369ETrU.js} +1 -1
- package/dist/client/assets/{drawer-BdL5OKVC.js → drawer-DtT_qu3U.js} +1 -1
- package/dist/client/assets/{editor-CUzd1SE7.js → editor-DpPPqPRR.js} +1 -1
- package/dist/client/assets/{editor-classes-1dg1pjaK.js → editor-classes-Bw4_cV_9.js} +1 -1
- package/dist/client/assets/{empty-state-9tWEtAox.js → empty-state-CWawuVzh.js} +1 -1
- package/dist/client/assets/{empty-state-CCe_gxuj.js → empty-state-l9Tatoxd.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-CvZgfB88.js → experiments-tab-choice-DLka__Fj.js} +1 -1
- package/dist/client/assets/{extract-connection-data-0MTwkkap.js → extract-connection-data-DjE1yVUY.js} +1 -1
- package/dist/client/assets/{feature-gate-BoNGlq-b.js → feature-gate-wF4resWq.js} +1 -1
- package/dist/client/assets/{feature-paywall-Bg-PT-Nn.js → feature-paywall-DF7aqMQM.js} +1 -1
- package/dist/client/assets/{file-explorer-DQI3RjrR.js → file-explorer-Bm3jEOW7.js} +1 -1
- package/dist/client/assets/{file-preview-pAXtoXVY.js → file-preview-p0rGgJtU.js} +1 -1
- package/dist/client/assets/{file-share-button-BpR0pG7Z.js → file-share-button-BAJCRraz.js} +1 -1
- package/dist/client/assets/{file-type-icon-BINq6pAJ.js → file-type-icon-CEKCIITa.js} +1 -1
- package/dist/client/assets/{folder-icon-JauS1zcB.js → folder-icon-DCqfnk5g.js} +1 -1
- package/dist/client/assets/{form-DINHcU5h.js → form-eUXxZ5Qg.js} +1 -1
- package/dist/client/assets/{frame-navigation-bHiDiNE9.js → frame-navigation-DlTZKvqt.js} +1 -1
- package/dist/client/assets/{gateway-client-BXoRIC2f.js → gateway-client-BYWq7W1f.js} +1 -1
- package/dist/client/assets/{general-KZQuDKZq.js → general-dOdvSQ1l.js} +1 -1
- package/dist/client/assets/{github-icon-DeI0LVM6.js → github-icon-PNZqrJY6.js} +1 -1
- package/dist/client/assets/{held-block-view-BplchR69.js → held-block-view-CPPtRU-n.js} +1 -1
- package/dist/client/assets/{home-BM2M0ir_.js → home-B2gF0aRT.js} +1 -1
- package/dist/client/assets/{home-overview-C7_beN9y.js → home-overview-DkyPJx_z.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-zJ_hLbuq.js → hosted-reconcile-DEHcrXPf.js} +1 -1
- package/dist/client/assets/{icon-button-DTvCNNgw.js → icon-button-CfgrKbmG.js} +1 -1
- package/dist/client/assets/{index-C1HmbFkP.js → index-B1yf8QQv.js} +1 -1
- package/dist/client/assets/{index-DkgRE7a8.js → index-BHLuDBD-.js} +1 -1
- package/dist/client/assets/{index-cHqyigDN.js → index-BUHQM-fc.js} +1 -1
- package/dist/client/assets/{index-gkLejYlX.js → index-Bp_BkLlL.js} +1 -1
- package/dist/client/assets/{index-BE5pN4ch.js → index-CEoORQx_.js} +1 -1
- package/dist/client/assets/{index-DGzcH4Vq.js → index-CdR9qfQl.js} +1 -1
- package/dist/client/assets/{index-DpsRmOqH.js → index-CePbUNpp.js} +1 -1
- package/dist/client/assets/{index-Ctcj_Ic4.js → index-CorQG-PM.js} +1 -1
- package/dist/client/assets/{index-D4Cq4uu-.js → index-D9pnpNHk.js} +1 -1
- package/dist/client/assets/{index-KT7S-wXA.js → index-DQFWZMPO.js} +1 -1
- package/dist/client/assets/{index-B7VjCiRT.js → index-DYf9rJn2.js} +1 -1
- package/dist/client/assets/{index-DNY1LCEV.js → index-FRxLT_js.js} +5 -5
- package/dist/client/assets/{index-CxRoy25G.js → index-K-FtkPVI.js} +1 -1
- package/dist/client/assets/{index-BYAVvzAx.js → index-UwOo6lse.js} +1 -1
- package/dist/client/assets/{index-DOAcfhWB.js → index-VEcIOiWN.js} +1 -1
- package/dist/client/assets/{index-BpSAkv2Q.js → index-oOJhkPK6.js} +1 -1
- package/dist/client/assets/{index-redirect-D7g6EvmF.js → index-redirect-DVZANI8q.js} +1 -1
- package/dist/client/assets/{index-WY5skHFQ.js → index-xNvvPF5K.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-C58dnOYG.js → infiniteQueryObserver-CZ7GCbwa.js} +1 -1
- package/dist/client/assets/{infra-billing-PmBjX27u.js → infra-billing-CBaX0rFG.js} +1 -1
- package/dist/client/assets/{input-Biz1-kQq.js → input-B0jMF0e_.js} +1 -1
- package/dist/client/assets/{input-DW2VJfvP.js → input-DS1fkrsU.js} +3 -3
- package/dist/client/assets/{integration-icon-B7GQGDoQ.js → integration-icon-BTN_yWEk.js} +1 -1
- package/dist/client/assets/{item-actions-CigQSqIo.js → item-actions-iEQmPVrr.js} +1 -1
- package/dist/client/assets/{jira-icon-CNLkC5R4.js → jira-icon-DXOB8Lmw.js} +1 -1
- package/dist/client/assets/{label-BleuytxV.js → label-DKoCaul6.js} +1 -1
- package/dist/client/assets/{layout-BCbrxcxs.js → layout-DbhvOsyV.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-B_mFKFt0.js → legacy-admin-welcome-dialog-B3iJcsKr.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-suvWZq4w.js → legacy-agents-deep-em6yOC_F.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-CqfpK3yi.js → legacy-main-redirect-CehX4Bni.js} +1 -1
- package/dist/client/assets/library-Dly_OLLg.js +1 -0
- package/dist/client/assets/{library-tab-B6-1oo-4.js → library-tab-ekrJ9bue.js} +1 -1
- package/dist/client/assets/{login-CIC76liy.js → login-DJDyJ1ju.js} +1 -1
- package/dist/client/assets/{markdown-D7s3zZ1r.js → markdown-we-cHxXq.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-xoRmsbxJ.js → mcp-app-renderer-BAfMgB1Z.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Bm9eowFy.js → mcp-oauth-Ci6yqFTl.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DdZ5iqUI.js → mcp-oauth-Ds0j31F2.js} +1 -1
- package/dist/client/assets/{members-BVDYMl5s.js → members-BcSHOsjX.js} +1 -1
- package/dist/client/assets/{memory-OIMax3Mf.js → memory-BowPTmEv.js} +1 -1
- package/dist/client/assets/{mock-board-DcJ7MEwz.js → mock-board-CW6QKw2v.js} +3 -3
- package/dist/client/assets/{monaco-editor-wJhgDEpd.js → monaco-editor-B5PTOxIz.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BGw1gEqW.js → monitoring-stats-row-DJXMqCN0.js} +1 -1
- package/dist/client/assets/{monitoring-Dhz_4NNt.js → monitoring-xIY_IPi8.js} +1 -1
- package/dist/client/assets/{multi-select-j_cBBkSq.js → multi-select-DuNPPMuZ.js} +1 -1
- package/dist/client/assets/{mustache-ByNI-hYL.js → mustache-Bwl2DYO1.js} +1 -1
- package/dist/client/assets/{named-rule-step-CIgwVXN9.js → named-rule-step-DS5kGuIs.js} +1 -1
- package/dist/client/assets/{named-rule-view-QjZFYuFQ.js → named-rule-view-Z5BTjESF.js} +1 -1
- package/dist/client/assets/{new-project-dialog-B8SVDcTm.js → new-project-dialog-HgjtDq4l.js} +1 -1
- package/dist/client/assets/{new-project-store-rLMUNU2t.js → new-project-store-CKvMs4hG.js} +1 -1
- package/dist/client/assets/{oauth-callback-BCJ9lzNV.js → oauth-callback-DmgNmP6n.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DUTt9OdA.js → oauth-callback-ai-provider-CSpD6uGn.js} +1 -1
- package/dist/client/assets/{oauth-consent-aERAtVyD.js → oauth-consent-Cr-15ieV.js} +1 -1
- package/dist/client/assets/{onboarding-BEeDAE1n.js → onboarding-Ete3lfiA.js} +1 -1
- package/dist/client/assets/{openai-conversation-CalrcjOi.js → openai-conversation-BCGRvpnO.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-gHKEu9Pp.js → optimistic-project-sidebar-views-B_55Z4kz.js} +1 -1
- package/dist/client/assets/{order-monitor-day-BMsq7ZVq.js → order-monitor-day-Clbe0SA4.js} +1 -1
- package/dist/client/assets/{organization-choice-Dumfb2MT.js → organization-choice-B_iJSsFB.js} +1 -1
- package/dist/client/assets/{orgs-BaQBoOtD.js → orgs-BFePKqBY.js} +1 -1
- package/dist/client/assets/{own-accounts-section-CYaA86cP.js → own-accounts-section-CSwSnoe4.js} +1 -1
- package/dist/client/assets/{pair-Bb6oWjIQ.js → pair-DhT-6yBR.js} +1 -1
- package/dist/client/assets/{parse-sections-Dru7Bhw3.js → parse-sections-BZeGOsxE.js} +2 -2
- package/dist/client/assets/plan-BO0tgjWI.js +1 -0
- package/dist/client/assets/{plan-ladder-DCMpCI9t.js → plan-ladder-aYguFL8S.js} +1 -1
- package/dist/client/assets/{plan-page-DhlVp1jr.js → plan-page-B07fHd07.js} +1 -1
- package/dist/client/assets/{plan-usage-card-b1xfvJA5.js → plan-usage-card-D_4-ZHg-.js} +1 -1
- package/dist/client/assets/{popover-O0--zxB3.js → popover-BI-lpUhu.js} +1 -1
- package/dist/client/assets/{post-calendar-TZVPBEms.js → post-calendar-Bh8YSwE0.js} +1 -1
- package/dist/client/assets/{post-editor-CjdfbpGv.js → post-editor-BbMWUU2h.js} +1 -1
- package/dist/client/assets/{preview-content-Cb6-Hnk_.js → preview-content-c-gz2Si_.js} +1 -1
- package/dist/client/assets/{preview-dialog-CeEvmRUv.js → preview-dialog-BFH4K3zp.js} +1 -1
- package/dist/client/assets/{preview-panel-DLXxpwqH.js → preview-panel-5axMxyLP.js} +1 -1
- package/dist/client/assets/{preview-tab-h0moNltj.js → preview-tab-DrWOVhIi.js} +3 -3
- package/dist/client/assets/{primitives-B_wOu0KD.js → primitives-phHVGNAI.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-BBGqgaUN.js → product-picker-dialog-BJO35u0n.js} +1 -1
- package/dist/client/assets/{profile-DXP_cVu3.js → profile-1_I-_x94.js} +1 -1
- package/dist/client/assets/{project-app-view-Df72eQDp.js → project-app-view-TcCrX4oT.js} +1 -1
- package/dist/client/assets/{project-apps-D0yVssTS.js → project-apps-55s0I8iz.js} +1 -1
- package/dist/client/assets/{project-icon-Bys_QVfz.js → project-icon-piFAIvmP.js} +1 -1
- package/dist/client/assets/{project-index-D8QhEEmc.js → project-index-C209sCKL.js} +1 -1
- package/dist/client/assets/project-reports-_pvoxKuL.js +1 -0
- package/dist/client/assets/project-tasks-TZDHHmpj.js +1 -0
- package/dist/client/assets/{projects-DLDVeooh.js → projects-DJz5LDl0.js} +1 -1
- package/dist/client/assets/{projects-empty-state-BYfzt1p6.js → projects-empty-state-Bjbej4Jx.js} +1 -1
- package/dist/client/assets/{prompts-RK2BST5w.js → prompts-C3wMciT-.js} +1 -1
- package/dist/client/assets/record-editor-CEpespPR.js +1 -0
- package/dist/client/assets/{redirect-editor-CvpFIhP3.js → redirect-editor-CXYG17gC.js} +1 -1
- package/dist/client/assets/{reports-DiiYMFp7.js → reports-BAWCIXn8.js} +1 -1
- package/dist/client/assets/reports-CPxs2BgN.js +1 -0
- package/dist/client/assets/{reports-onboarding-CoRYS8wo.js → reports-onboarding-B3L3kaVX.js} +1 -1
- package/dist/client/assets/{reports-tab-BoI6tcUT.js → reports-tab-UTeYJ_79.js} +2 -2
- package/dist/client/assets/repositories-Bj1ogpqH.js +1 -0
- package/dist/client/assets/{repositories-dckrDwEU.js → repositories-Dj3HbYDX.js} +1 -1
- package/dist/client/assets/{repository-binding-0rqv5CYu.js → repository-binding-DjFY5b0y.js} +1 -1
- package/dist/client/assets/{repository-picker-8sFtA2jE.js → repository-picker-BHJB5432.js} +1 -1
- package/dist/client/assets/{require-capability-GB4QCUSY.js → require-capability-BtI4Tyqp.js} +1 -1
- package/dist/client/assets/{required-auth-layout-9Vw9oHyS.js → required-auth-layout-ChAYpVpn.js} +1 -1
- package/dist/client/assets/{reset-password-Bkf_fwQB.js → reset-password-CtG7aWDw.js} +1 -1
- package/dist/client/assets/{resizable-BycP7e00.js → resizable-BL8CU-aJ.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-B49st38Z.js → resolve-tab-icon-Ds9JNWyg.js} +1 -1
- package/dist/client/assets/{review-settings-AaM16RjA.js → review-settings-DNfSW4xg.js} +1 -1
- package/dist/client/assets/{role-color-CilFDy12.js → role-color-Kmb8GwCh.js} +1 -1
- package/dist/client/assets/{roles-BN919U7y.js → roles-DXacyEKl.js} +1 -1
- package/dist/client/assets/route-ChWaxiqL.js +1 -0
- package/dist/client/assets/{route-CH_5nuP_.js → route-CvOWJgQ8.js} +1 -1
- package/dist/client/assets/{route-BcZK3YCw.js → route-DhGhu9Ec.js} +1 -1
- package/dist/client/assets/{route-page-header-DpWJFSUF.js → route-page-header-D4_8Ct3f.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-CG9RWp1R.js → sandbox-git-api-CuR5rUpq.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-B2ggxGXu.js → sandbox-lifecycle-context-Bt4OsDeb.js} +1 -1
- package/dist/client/assets/{save-status-BQkBpUbv.js → save-status-DbwiLwGt.js} +1 -1
- package/dist/client/assets/{schema-JoNeetSU.js → schema-D1mfj_VD.js} +1 -1
- package/dist/client/assets/{schema-UfVOE_vK.js → schema-DFMNr5Cf.js} +1 -1
- package/dist/client/assets/{scroll-area-vXLoyQQw.js → scroll-area-BBpO5xX_.js} +1 -1
- package/dist/client/assets/{search-input-CazoQHCn.js → search-input-Dij8WCfy.js} +1 -1
- package/dist/client/assets/{search-toggle-om107pCr.js → search-toggle-BJsu_1mi.js} +1 -1
- package/dist/client/assets/{secret-picker-BUV633yj.js → secret-picker-D6eOapYQ.js} +1 -1
- package/dist/client/assets/{secrets-DGpgtf7U.js → secrets-ctTTJkDR.js} +1 -1
- package/dist/client/assets/{section-array-field-B5wOOl5Q.js → section-array-field-D4XW_wJ4.js} +1 -1
- package/dist/client/assets/{sections-BuMIRgN_.js → sections-B5mL2aQs.js} +1 -1
- package/dist/client/assets/{sections-editor-JNsgN9Jp.js → sections-editor-Dx_9N0tS.js} +1 -1
- package/dist/client/assets/{select-BtuZ1_PE.js → select-D5aPAOxI.js} +1 -1
- package/dist/client/assets/{select-model-D2eRzxwR.js → select-model-3J7FOs0F.js} +1 -1
- package/dist/client/assets/{seo-editor-CnvOLI1T.js → seo-editor-DP1v2Hug.js} +1 -1
- package/dist/client/assets/{separator-CDpQOaDp.js → separator-Dy_gHFOY.js} +1 -1
- package/dist/client/assets/{session-runtime-C9K2fhXt.js → session-runtime-CVF2LvNW.js} +1 -1
- package/dist/client/assets/settings-tab-BI3y61p6.js +1 -0
- package/dist/client/assets/{sheet-BclrNEHN.js → sheet-Dps_OtzY.js} +1 -1
- package/dist/client/assets/{shell-layout-B0CrobX4.js → shell-layout-B7ONrK1S.js} +1 -1
- package/dist/client/assets/{site-draft-actions-CKyxePcd.js → site-draft-actions-DhANjN0X.js} +1 -1
- package/dist/client/assets/{site-draft-view-DITfvlDo.js → site-draft-view-BYqJs7J2.js} +1 -1
- package/dist/client/assets/site-editor-0AMhqN9R.js +1 -0
- package/dist/client/assets/{site-editor-toast-ByfMLHrL.js → site-editor-toast-D2oMdvIY.js} +1 -1
- package/dist/client/assets/{skills-UpHMjGzP.js → skills-DxDybFRs.js} +1 -1
- package/dist/client/assets/{slider-BccigXwM.js → slider-w4rF_qju.js} +1 -1
- package/dist/client/assets/{sortable.esm-LMzGz7vy.js → sortable.esm-MHH13t78.js} +1 -1
- package/dist/client/assets/{sso-BOXfHaVK.js → sso-Dl9I7AOe.js} +1 -1
- package/dist/client/assets/{suggestion-6kwzt7Yb.js → suggestion-SjSKJeBU.js} +1 -1
- package/dist/client/assets/{super-agent-icon-z6Ee2KPL.js → super-agent-icon-Cc4Ciwsy.js} +1 -1
- package/dist/client/assets/{switch-DVmURNlF.js → switch-CEzsWFkp.js} +1 -1
- package/dist/client/assets/{synced-repos-J7N806y3.js → synced-repos-CNS7qyVv.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-D6HWUMfv.js → tab-icon-glyph-BJZJf5lc.js} +1 -1
- package/dist/client/assets/{table-Dfn_tXRY.js → table-DdZpQzqo.js} +1 -1
- package/dist/client/assets/{tabs-DzZuOsBG.js → tabs-JKAPr-O4.js} +1 -1
- package/dist/client/assets/{task-board-B6w6sUwb.js → task-board-B_oKjzEP.js} +1 -1
- package/dist/client/assets/{task-key-DwKgVgaG.js → task-key-BWDMUi9g.js} +1 -1
- package/dist/client/assets/{task-route-DILYUxw7.js → task-route-Cr6uckKl.js} +1 -1
- package/dist/client/assets/{task-status-CWjPA6gQ.js → task-status-BkYGOB1i.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-D8X9MO7l.js → taskboard-analytics-nugCG6C8.js} +1 -1
- package/dist/client/assets/tasks-9sGiiD4G.js +1 -0
- package/dist/client/assets/{tasks-BWMxQc4P.js → tasks-DGRvo6F8.js} +1 -1
- package/dist/client/assets/{textarea-BS-fwvE3.js → textarea-Cipr2aDL.js} +1 -1
- package/dist/client/assets/{thread-analytics-BEFAIWhI.js → thread-analytics-CUyAWSkz.js} +1 -1
- package/dist/client/assets/{thread-button-CCXdzpOs.js → thread-button-DEmMau3d.js} +1 -1
- package/dist/client/assets/{thread-intent-Dmqjim4G.js → thread-intent-CoFgTbor.js} +1 -1
- package/dist/client/assets/{thread-route-DFPY6b9-.js → thread-route-BRmRa2CS.js} +1 -1
- package/dist/client/assets/{thread-route-BMQ7FfFy.js → thread-route-TTLcBPLy.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-D_58wlnB.js → thread-sheet-body-DU2O97KV.js} +1 -1
- package/dist/client/assets/{time-range-picker-DVPzF6pR.js → time-range-picker-CBoxldZD.js} +1 -1
- package/dist/client/assets/{toggle-group-BSOB6hW8.js → toggle-group-4Uqc6vzQ.js} +1 -1
- package/dist/client/assets/{tool-set-selector-D9iHbEUH.js → tool-set-selector-DoFKwoWc.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-B2FJhjHB.js → toolbar-icon-button-DnvtDhiO.js} +1 -1
- package/dist/client/assets/{tooltip-DEqrMv7W.js → tooltip-C6OYlSV-.js} +1 -1
- package/dist/client/assets/{tooltipContext-BbljAPKp.js → tooltipContext-D2O58pOO.js} +1 -1
- package/dist/client/assets/{track-Bp6zOhD6.js → track-D2uS6dpC.js} +1 -1
- package/dist/client/assets/{types-mnHt7RAy.js → types-cOzCnmYI.js} +1 -1
- package/dist/client/assets/{url-slug-BNPYObW-.js → url-slug-DgA17VrJ.js} +1 -1
- package/dist/client/assets/{usage-stats-PE4G0CeB.js → usage-stats-X4jMwPwX.js} +1 -1
- package/dist/client/assets/use-ai-providers-BDyMN-N5.js +1 -0
- package/dist/client/assets/{use-api-keys-C3mHEKzm.js → use-api-keys-CsFZ7MWC.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-C6ts9bt2.js → use-apply-named-rule-CnSwu1YP.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-C_ce63qF.js +1 -0
- package/dist/client/assets/{use-automations-LOYHDjb3.js → use-automations-DGxEZMH1.js} +1 -1
- package/dist/client/assets/{use-autosave-CLPruo2u.js → use-autosave-JaDxGSls.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-DA-pr0Uy.js +1 -0
- package/dist/client/assets/use-blog-view-DhODFkA8.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-Dx_P1Xmx.js → use-chat-layout-state-D4d4l3oL.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-_ZdSdw_1.js → use-cms-publish-actions-CdubuGTA.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DQq6EgX3.js → use-connect-companion-DCQqrJld.js} +1 -1
- package/dist/client/assets/{use-connection-DW1VkUDp.js → use-connection-DoUaPNkI.js} +1 -1
- package/dist/client/assets/{use-content-sync-DadcVTeN.js → use-content-sync-Cxyhqioh.js} +1 -1
- package/dist/client/assets/{use-copy-D1Ps751Y.js → use-copy-nYlH4I4g.js} +1 -1
- package/dist/client/assets/{use-current-view-DTeimNo3.js → use-current-view-1HEoI3qR.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-D0UHCWV7.js → use-date-fns-locale-DxgiZ7Lq.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DYsdj7A1.js → use-debounced-autosave-Bi5JPKsx.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Cj3YP2Ju.js → use-debounced-value-ZpPSvQwP.js} +1 -1
- package/dist/client/assets/{use-deco-credits-1ccyr4DS.js → use-deco-credits-DcRWtP9o.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-qTcqpluN.js → use-decopilot-events-B-T0Hrvx.js} +1 -1
- package/dist/client/assets/{use-delete-block-DeCae--m.js → use-delete-block-DP79Au-4.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Ddr1KxTc.js → use-delete-connection-4Fx-JLmK.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CmLloBgI.js → use-deployment-admin-BmC0uFFM.js} +1 -1
- package/dist/client/assets/{use-entitlements-BaQvjR8x.js → use-entitlements-CmxoG1H2.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-Bx6WUO99.js → use-fast-preview-draft-url-DXFM6T8R.js} +1 -1
- package/dist/client/assets/{use-file-configs-J6V_3k5a.js → use-file-configs-Wy-M6u4j.js} +1 -1
- package/dist/client/assets/{use-id-selection-DKtNLyFh.js → use-id-selection-65R8Y0Rr.js} +1 -1
- package/dist/client/assets/{use-in-settings-WKil-W1U.js → use-in-settings-CG5n8E8Q.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-BHASI7cE.js → use-inbox-feed-DxcWHUtc.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BCAJFUTI.js → use-infinite-scroll-DxkQp5Qv.js} +1 -1
- package/dist/client/assets/{use-join-requests-BVkKaLgc.js → use-join-requests-CyJQy1RH.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-BmS9u6Cm.js → use-main-panel-tabs-DJGu6nFZ.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-WaulxB9m.js → use-mcp-auth-status-BabDSoXH.js} +1 -1
- package/dist/client/assets/{use-mcp-client-XSpKurXu.js → use-mcp-client-rOHZbD3Y.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-Bs2ZYPMm.js → use-mcp-prompts-Cq6mpthN.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-C_TsO2I8.js → use-mcp-tools-DfFo5hFt.js} +1 -1
- package/dist/client/assets/{use-mobile-BxcOWRrF.js → use-mobile-eRuVOAzy.js} +1 -1
- package/dist/client/assets/{use-move-blocks-B_TQedwE.js → use-move-blocks-DWNb-nFG.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-D9QHHZbU.js → use-navigate-to-agent-CoxxT5G0.js} +1 -1
- package/dist/client/assets/{use-never-published-CchQezqP.js → use-never-published-ZzuVsx8k.js} +1 -1
- package/dist/client/assets/{use-org-fs-B4WWFHbJ.js → use-org-fs-Bjw5czAm.js} +1 -1
- package/dist/client/assets/{use-org-notice-CuExaYhO.js → use-org-notice-QAyxiINx.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-KiPPmYc8.js → use-org-repo-syncs-CvKMwzFX.js} +1 -1
- package/dist/client/assets/{use-org-sso-BU8x_N9w.js → use-org-sso-CFsTaV-A.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BCnB7DAB.js → use-organization-settings-BQz13Hmn.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-CRTRFR_W.js → use-panel-navigate-DRtgWUMv.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-DNQAebLP.js → use-project-native-view-presence-BIFke35D.js} +1 -1
- package/dist/client/assets/{use-project-scope-AQre_lGB.js → use-project-scope-BEEh5L8P.js} +1 -1
- package/dist/client/assets/{use-recent-apps-TNv8uCPr.js → use-recent-apps-DnI5Ea5w.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BblOLKh2.js → use-reports-diagnostic-KjDTU46X.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-CDzu8MpI.js → use-sandbox-events-B1e4GG__.js} +1 -1
- package/dist/client/assets/{use-secrets-BS48xwT8.js → use-secrets-DG4KpaBa.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DKzaRrN2.js → use-section-preview-base-CTUunTIy.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-DhXPD56p.js → use-sidebar-collapsed-Cvh_KEOx.js} +1 -1
- package/dist/client/assets/{use-tags-DZB3cOG6.js → use-tags-oUXL8Eao.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BJUgitsX.js → use-task-board-analytics-CY3DJsc5.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-BRhTw2_C.js → use-task-board-item-prs-DSrWn6bY.js} +1 -1
- package/dist/client/assets/{use-task-board-items-ClS47WXt.js → use-task-board-items-BbyDm5G0.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-CLIPLPO_.js → use-task-board-prompts-CqjpsSVo.js} +1 -1
- package/dist/client/assets/{use-task-metadata-D_A2WmqA.js → use-task-metadata-BYbicOrw.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DqTcUmJ7.js → use-thread-outputs-OIyH_XWf.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-BtTSFIlo.js → use-view-draft-kind-BaIs6zLO.js} +1 -1
- package/dist/client/assets/use-voice-input-IeU241I1.js +1 -0
- package/dist/client/assets/useInfiniteQuery-D_gObArx.js +1 -0
- package/dist/client/assets/{useQueries-CY78CcHi.js → useQueries-D35FEy3E.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DTGymExJ.js +1 -0
- package/dist/client/assets/{users-B7RH0HPb.js → users-D7EeASCC.js} +1 -1
- package/dist/client/assets/{utils-CeyBwb4E.js → utils-CfyLtUqt.js} +1 -1
- package/dist/client/assets/{variant-calendar-CbNvuhgP.js → variant-calendar-C6gDTqNE.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-WW9vsYwt.js → variant-matcher-override-BugDO5Is.js} +1 -1
- package/dist/client/assets/{view-header-D-W3mMsY.js → view-header-BpDzpk8m.js} +1 -1
- package/dist/client/assets/{virtual-mcp-DFMEmmYR.js → virtual-mcp-DFw2lKMC.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-CLN8yu6T.js → watch-sse-pool-DGsiEkeQ.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +651 -651
- package/package.json +1 -1
- package/dist/client/assets/agent-app-BVo-JN5-.js +0 -1
- package/dist/client/assets/agent-deck-BV2v1bg2.js +0 -1
- package/dist/client/assets/agent-experiments-Dn6ATqm3.js +0 -1
- package/dist/client/assets/agent-file-BdlM9DC-.js +0 -1
- package/dist/client/assets/agent-library-CRndyLSN.js +0 -1
- package/dist/client/assets/agent-library-file-CHMBjLP9.js +0 -1
- package/dist/client/assets/agent-overview-0qKuyyc3.js +0 -1
- package/dist/client/assets/agent-settings-BhODPzv3.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Cf9FJAgn.js +0 -2
- package/dist/client/assets/agent-site-editor-content-CBrR-oWD.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-DKqXk_Fc.js +0 -1
- package/dist/client/assets/agent-view-B6-XGf3q.js +0 -1
- package/dist/client/assets/ai-providers-DtnDf2l2.js +0 -1
- package/dist/client/assets/api-keys-BWBRmUoJ.js +0 -1
- package/dist/client/assets/chat-context-DHSww0cO.js +0 -43
- package/dist/client/assets/library-Dp3HrH7T.js +0 -1
- package/dist/client/assets/plan-CEsNJEgV.js +0 -1
- package/dist/client/assets/project-reports-DF_CqS1r.js +0 -1
- package/dist/client/assets/project-tasks-BiRpzten.js +0 -1
- package/dist/client/assets/record-editor-D7wKjKze.js +0 -1
- package/dist/client/assets/reports-CAZ7fJej.js +0 -1
- package/dist/client/assets/repositories-DhWmEVga.js +0 -1
- package/dist/client/assets/route-ZfCX71Dd.js +0 -1
- package/dist/client/assets/settings-tab-DXCgvlZo.js +0 -1
- package/dist/client/assets/site-editor-CRBSEbgW.js +0 -1
- package/dist/client/assets/tasks-B5T10R9U.js +0 -1
- package/dist/client/assets/use-ai-providers-DuE4C2Wp.js +0 -1
- package/dist/client/assets/use-ask-in-chat-ClsOxWIw.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-GPjsiHKH.js +0 -1
- package/dist/client/assets/use-blog-view-BjBkHa1n.js +0 -1
- package/dist/client/assets/use-voice-input-BXFfCREB.js +0 -1
- package/dist/client/assets/useInfiniteQuery-jSvPkUAC.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DQoY99kG.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,c4 as ce,j as p,ca as _,c9 as T,c7 as C,cf as le,c3 as de,cr as ue,cn as fe,cg as me}from"./index-
|
|
1
|
+
import{r as l,c4 as ce,j as p,ca as _,c9 as T,c7 as C,cf as le,c3 as de,cr as ue,cn as fe,cg as me}from"./index-FRxLT_js.js";import{c as Y}from"./index-BdQq_4o_.js";var $=["PageUp","PageDown"],X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],G={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},M="Slider",[H,Se,pe]=le(M),[W]=fe(M,[pe]),[he,V]=W(M),q=l.forwardRef((e,t)=>{const{name:o,min:n=0,max:s=100,step:c=1,orientation:r="horizontal",disabled:a=!1,minStepsBetweenThumbs:u=0,defaultValue:w=[n],value:h,onValueChange:i=()=>{},onValueCommit:d=()=>{},inverted:v=!1,form:R,...g}=e,m=l.useRef(new Set),f=l.useRef(0),x=r==="horizontal"?ge:ve,[S=[],K]=ce({prop:h,defaultProp:w,onChange:b=>{[...m.current][f.current]?.focus(),i(b)}}),j=l.useRef(S);function B(b){const y=ye(S,b);I(b,y)}function se(b){I(b,f.current)}function ae(){const b=j.current[f.current];S[f.current]!==b&&d(S)}function I(b,y,{commit:k}={commit:!1}){const U=_e(c),z=Ce(Math.round((b-n)/c)*c+n,U),A=Y(z,[n,s]);K((E=[])=>{const P=be(E,A,y);if(Ee(P,u*c)){f.current=P.indexOf(A);const F=String(P)!==String(E);return F&&k&&d(P),F?P:E}else return E})}return p.jsx(he,{scope:e.__scopeSlider,name:o,disabled:a,min:n,max:s,valueIndexToChangeRef:f,thumbs:m.current,values:S,orientation:r,form:R,children:p.jsx(H.Provider,{scope:e.__scopeSlider,children:p.jsx(H.Slot,{scope:e.__scopeSlider,children:p.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:_(g.onPointerDown,()=>{a||(j.current=S)}),min:n,max:s,inverted:v,onSlideStart:a?void 0:B,onSlideMove:a?void 0:se,onSlideEnd:a?void 0:ae,onHomeKeyDown:()=>!a&&I(n,0,{commit:!0}),onEndKeyDown:()=>!a&&I(s,S.length-1,{commit:!0}),onStepKeyDown:({event:b,direction:y})=>{if(!a){const z=$.includes(b.key)||b.shiftKey&&X.includes(b.key)?10:1,A=f.current,E=S[A],P=c*z*y;I(E+P,A,{commit:!0})}}})})})})});q.displayName=M;var[J,Q]=W(M,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ge=l.forwardRef((e,t)=>{const{min:o,max:n,dir:s,inverted:c,onSlideStart:r,onSlideMove:a,onSlideEnd:u,onStepKeyDown:w,...h}=e,[i,d]=l.useState(null),v=C(t,x=>d(x)),R=l.useRef(void 0),g=de(s),m=g==="ltr",f=m&&!c||!m&&c;function D(x){const S=R.current||i.getBoundingClientRect(),K=[0,S.width],B=O(K,f?[o,n]:[n,o]);return R.current=S,B(x-S.left)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:f?"left":"right",endEdge:f?"right":"left",direction:f?1:-1,size:"width",children:p.jsx(Z,{dir:g,"data-orientation":"horizontal",...h,ref:v,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=D(x.clientX);r?.(S)},onSlideMove:x=>{const S=D(x.clientX);a?.(S)},onSlideEnd:()=>{R.current=void 0,u?.()},onStepKeyDown:x=>{const K=G[f?"from-left":"from-right"].includes(x.key);w?.({event:x,direction:K?-1:1})}})})}),ve=l.forwardRef((e,t)=>{const{min:o,max:n,inverted:s,onSlideStart:c,onSlideMove:r,onSlideEnd:a,onStepKeyDown:u,...w}=e,h=l.useRef(null),i=C(t,h),d=l.useRef(void 0),v=!s;function R(g){const m=d.current||h.current.getBoundingClientRect(),f=[0,m.height],x=O(f,v?[n,o]:[o,n]);return d.current=m,x(g-m.top)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1,children:p.jsx(Z,{"data-orientation":"vertical",...w,ref:i,style:{...w.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=R(g.clientY);c?.(m)},onSlideMove:g=>{const m=R(g.clientY);r?.(m)},onSlideEnd:()=>{d.current=void 0,a?.()},onStepKeyDown:g=>{const f=G[v?"from-bottom":"from-top"].includes(g.key);u?.({event:g,direction:f?-1:1})}})})}),Z=l.forwardRef((e,t)=>{const{__scopeSlider:o,onSlideStart:n,onSlideMove:s,onSlideEnd:c,onHomeKeyDown:r,onEndKeyDown:a,onStepKeyDown:u,...w}=e,h=V(M,o);return p.jsx(T.span,{...w,ref:t,onKeyDown:_(e.onKeyDown,i=>{i.key==="Home"?(r(i),i.preventDefault()):i.key==="End"?(a(i),i.preventDefault()):$.concat(X).includes(i.key)&&(u(i),i.preventDefault())}),onPointerDown:_(e.onPointerDown,i=>{const d=i.target;d.setPointerCapture(i.pointerId),i.preventDefault(),h.thumbs.has(d)?d.focus():n(i)}),onPointerMove:_(e.onPointerMove,i=>{i.target.hasPointerCapture(i.pointerId)&&s(i)}),onPointerUp:_(e.onPointerUp,i=>{const d=i.target;d.hasPointerCapture(i.pointerId)&&(d.releasePointerCapture(i.pointerId),c(i))})})}),ee="SliderTrack",te=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(ee,o);return p.jsx(T.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});te.displayName=ee;var N="SliderRange",ne=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(N,o),c=Q(N,o),r=l.useRef(null),a=C(t,r),u=s.values.length,w=s.values.map(d=>ie(d,s.min,s.max)),h=u>1?Math.min(...w):0,i=100-Math.max(...w);return p.jsx(T.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[c.startEdge]:h+"%",[c.endEdge]:i+"%"}})});ne.displayName=N;var L="SliderThumb",oe=l.forwardRef((e,t)=>{const o=Se(e.__scopeSlider),[n,s]=l.useState(null),c=C(t,a=>s(a)),r=l.useMemo(()=>n?o().findIndex(a=>a.ref.current===n):-1,[o,n]);return p.jsx(we,{...e,ref:c,index:r})}),we=l.forwardRef((e,t)=>{const{__scopeSlider:o,index:n,name:s,...c}=e,r=V(L,o),a=Q(L,o),[u,w]=l.useState(null),h=C(t,D=>w(D)),i=u?r.form||!!u.closest("form"):!0,d=ue(u),v=r.values[n],R=v===void 0?0:ie(v,r.min,r.max),g=Re(n,r.values.length),m=d?.[a.size],f=m?Pe(m,R,a.direction):0;return l.useEffect(()=>{if(u)return r.thumbs.add(u),()=>{r.thumbs.delete(u)}},[u,r.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${R}% + ${f}px)`},children:[p.jsx(H.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(T.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":r.min,"aria-valuenow":v,"aria-valuemax":r.max,"aria-orientation":r.orientation,"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,tabIndex:r.disabled?void 0:0,...c,ref:h,style:v===void 0?{display:"none"}:e.style,onFocus:_(e.onFocus,()=>{r.valueIndexToChangeRef.current=n})})}),i&&p.jsx(re,{name:s??(r.name?r.name+(r.values.length>1?"[]":""):void 0),form:r.form,value:v},n)]})});oe.displayName=L;var xe="RadioBubbleInput",re=l.forwardRef(({__scopeSlider:e,value:t,...o},n)=>{const s=l.useRef(null),c=C(s,n),r=me(t);return l.useEffect(()=>{const a=s.current;if(!a)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(r!==t&&h){const i=new Event("input",{bubbles:!0});h.call(a,t),a.dispatchEvent(i)}},[r,t]),p.jsx(T.input,{style:{display:"none"},...o,ref:c,defaultValue:t})});re.displayName=xe;function be(e=[],t,o){const n=[...e];return n[o]=t,n.sort((s,c)=>s-c)}function ie(e,t,o){const c=100/(o-t)*(e-t);return Y(c,[0,100])}function Re(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function ye(e,t){if(e.length===1)return 0;const o=e.map(s=>Math.abs(s-t)),n=Math.min(...o);return o.indexOf(n)}function Pe(e,t,o){const n=e/2,c=O([0,50],[0,n]);return(n-c(t)*o)*o}function De(e){return e.slice(0,-1).map((t,o)=>e[o+1]-t)}function Ee(e,t){if(t>0){const o=De(e);return Math.min(...o)>=t}return!0}function O(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(o-e[0])}}function _e(e){return(String(e).split(".")[1]||"").length}function Ce(e,t){const o=Math.pow(10,t);return Math.round(e*o)/o}var Ie=q,Ae=te,Te=ne,Ve=oe;export{Te as R,Ae as T,Ie as a,Ve as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,a6 as z,K as Y,i as U,m as $,j as l,b as M,B,L as V,r as w,d as K,E as L,x as X,aW as Z,w as J,v as ee,D as te}from"./index-DNY1LCEV.js";import{n as se}from"./ArrowUp-BbdlU24N.js";import{u as H,f as G,T as ne,A as ae,n as re,o as ie,b as oe,c as le,p as ce,q as ue,t as de,L as fe}from"./chat-context-DHSww0cO.js";import{T as me,c as ge,b as xe,d as pe,H as he}from"./input-DW2VJfvP.js";import{u as je,a as ve,S as be,M as A}from"./pair-Bb6oWjIQ.js";import{A as ye,f as W}from"./agent-icon-zKGrqypc.js";import{j as Ne}from"./content-changes-Sy14c4Sj.js";import{a as Ce}from"./agent-capabilities-CWtYqnIq.js";import{a as we}from"./repository-binding-0rqv5CYu.js";import{c as Se,i as ke}from"./thread-intent-Dmqjim4G.js";import{a as Te}from"./use-panel-navigate-CRTRFR_W.js";import{N as $e}from"./index-cHqyigDN.js";import{i as Ee}from"./ArrowRight-B21E_uc5.js";import{c as De}from"./use-entitlements-BaQvjR8x.js";import{u as Pe}from"./use-deco-credits-1ccyr4DS.js";import{F as _e}from"./feature-paywall-Bg-PT-Nn.js";import{i as Ie}from"./AlertCircle-BYyFOifG.js";const Oe=15e3;function Me(e,t,n){const s=v.c(20),r=n===void 0?{}:n,{org:a}=z(),i=we(e);let c;s[0]!==t||s[1]!==i?.metadata||s[2]!==e?(c=!!e&&!!t&&Ce(i?.metadata),s[0]=t,s[1]=i?.metadata,s[2]=e,s[3]=c):c=s[3];const u=c;let o;s[4]!==t||s[5]!==a.slug||s[6]!==e?(o=Y.chatDraftChanges(a.slug,e??"",t??""),s[4]=t,s[5]=a.slug,s[6]=e,s[7]=o):o=s[7];let d;s[8]!==t||s[9]!==a.slug||s[10]!==e?(d=()=>Ne(a.slug,e,t),s[8]=t,s[9]=a.slug,s[10]=e,s[11]=d):d=s[11];const p=r.poll===!1?!1:Oe;let g;s[12]!==u||s[13]!==o||s[14]!==d||s[15]!==p?(g={queryKey:o,queryFn:d,enabled:u,refetchInterval:p,retry:!1},s[12]=u,s[13]=o,s[14]=d,s[15]=p,s[16]=g):g=s[16];const{data:m}=U(g),f=m===void 0?0:m,x=u?i:null;let h;return s[17]!==f||s[18]!==x?(h={project:x,changeCount:f},s[17]=f,s[18]=x,s[19]=h):h=s[19],h}function Fe(){const e=v.c(7),t=H(),n=G(),s=t?.virtualMcpId??null,r=t?.currentBranch??null,{project:a,changeCount:i}=Me(s,r);if(!a||!s||!r||i===0)return null;const c=a.icon??null,u=!!n&&(n.isRunInProgress||n.status==="streaming"||n.status==="submitted");let o;return e[0]!==r||e[1]!==i||e[2]!==a.title||e[3]!==c||e[4]!==u||e[5]!==s?(o={virtualMcpId:s,projectTitle:a.title,projectIcon:c,branch:r,changeCount:i,editing:u},e[0]=r,e[1]=i,e[2]=a.title,e[3]=c,e[4]=u,e[5]=s,e[6]=o):o=e[6],o}function Re(e){const t=v.c(24),{icon:n,title:s,subtitle:r,status:a,detail:i,action:c,className:u}=e;let o;t[0]!==u?(o=$("rounded-xl border border-border bg-card p-3",u),t[0]=u,t[1]=o):o=t[1];let d;t[2]!==n?(d=l.jsx("div",{className:"shrink-0",children:n}),t[2]=n,t[3]=d):d=t[3];let p;t[4]!==s?(p=l.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:s}),t[4]=s,t[5]=p):p=t[5];let g;t[6]!==r?(g=r&&l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:r}),t[6]=r,t[7]=g):g=t[7];let m;t[8]!==p||t[9]!==g?(m=l.jsxs("div",{className:"min-w-0 flex-1",children:[p,g]}),t[8]=p,t[9]=g,t[10]=m):m=t[10];let f;t[11]!==a?(f=a&&l.jsx("span",{className:"flex shrink-0 items-center gap-1.5 text-sm text-muted-foreground",children:a}),t[11]=a,t[12]=f):f=t[12];let x;t[13]!==d||t[14]!==m||t[15]!==f?(x=l.jsxs("div",{className:"flex items-center gap-2.5",children:[d,m,f]}),t[13]=d,t[14]=m,t[15]=f,t[16]=x):x=t[16];let h;t[17]!==c||t[18]!==i?(h=(i||c)&&l.jsxs("div",{className:"mt-3 flex items-center justify-between gap-2",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:i}),c]}),t[17]=c,t[18]=i,t[19]=h):h=t[19];let b;return t[20]!==o||t[21]!==x||t[22]!==h?(b=l.jsxs("div",{className:o,children:[x,h]}),t[20]=o,t[21]=x,t[22]=h,t[23]=b):b=t[23],b}function ze(e){const t=v.c(10),{draft:n}=e,s=M(),r=n.editing?"animate-pulse bg-warning":"bg-success";let a;t[0]!==r?(a=$("size-1.5 rounded-full",r),t[0]=r,t[1]=a):a=t[1];let i;t[2]!==a?(i=l.jsx("span",{"aria-hidden":!0,className:a}),t[2]=a,t[3]=i):i=t[3];const c=n.editing?"chat.draft.editing":"chat.draft.ready";let u;t[4]!==s||t[5]!==c?(u=s(c),t[4]=s,t[5]=c,t[6]=u):u=t[6];let o;return t[7]!==i||t[8]!==u?(o=l.jsxs(l.Fragment,{children:[i,u]}),t[7]=i,t[8]=u,t[9]=o):o=t[9],o}function Be(e){const t=v.c(11),{draft:n}=e,s=M(),{org:r}=z(),a=H()?.taskId??null;let i;t[0]!==n.virtualMcpId||t[1]!==r.slug?(i={org:r.slug,agentId:n.virtualMcpId},t[0]=n.virtualMcpId,t[1]=r.slug,t[2]=i):i=t[2];let c;t[3]!==a?(c=a?{thread:a}:{},t[3]=a,t[4]=c):c=t[4];let u;t[5]!==s?(u=s("chat.draft.open"),t[5]=s,t[6]=u):u=t[6];let o;return t[7]!==i||t[8]!==c||t[9]!==u?(o=l.jsx(B,{variant:"outline",size:"sm",asChild:!0,children:l.jsx(V,{to:"/$org/projects/$agentId/site-editor",params:i,search:c,children:u})}),t[7]=i,t[8]=c,t[9]=u,t[10]=o):o=t[10],o}function q(){const e=v.c(20),t=M(),n=Fe();if(!n)return null;let s;e[0]!==n.projectIcon||e[1]!==n.projectTitle?(s=l.jsx(ye,{icon:n.projectIcon,name:n.projectTitle,size:"sm"}),e[0]=n.projectIcon,e[1]=n.projectTitle,e[2]=s):s=e[2];const r=n.projectTitle;let a;e[3]!==n.branch?(a=l.jsx("span",{className:"font-mono",children:n.branch}),e[3]=n.branch,e[4]=a):a=e[4];let i;e[5]!==n?(i=l.jsx(ze,{draft:n}),e[5]=n,e[6]=i):i=e[6];const c=n.changeCount===1?"chat.draft.change":"chat.draft.changes";let u;e[7]!==n.changeCount||e[8]!==t||e[9]!==c?(u=t(c,{count:n.changeCount}),e[7]=n.changeCount,e[8]=t,e[9]=c,e[10]=u):u=e[10];let o;e[11]!==n?(o=l.jsx(Be,{draft:n}),e[11]=n,e[12]=o):o=e[12];let d;return e[13]!==n.projectTitle||e[14]!==s||e[15]!==a||e[16]!==i||e[17]!==u||e[18]!==o?(d=l.jsx(Re,{className:"mx-2.5 mb-6",icon:s,title:r,subtitle:a,status:i,detail:u,action:o}),e[13]=n.projectTitle,e[14]=s,e[15]=a,e[16]=i,e[17]=u,e[18]=o,e[19]=d):d=e[19],d}function He(e){return e.parts.some(t=>t.type==="dynamic-tool"||t.type.startsWith("tool-"))}function Le(e){let t=0;for(const n of e)for(const s of n.parts??[]){const r=s;r.type==="tool-load_repo"&&r.state==="output-available"&&r.output?.success===!0&&t++}return t}function Ae(){const e=v.c(11),{openPanel:t}=Te(),n=Se(),s=G()?.messages??[],r=H(),a=r?.taskId??null,i=r?.currentBranch;let c;e[0]!==i?(c=ke(i),e[0]=i,e[1]=c):c=e[1];const u=c;let o;e[2]!==s?(o=Le(s),e[2]=s,e[3]=o):o=e[3];const d=o,p=w.useRef(null),g=w.useRef(null);let m,f;e[4]!==u||e[5]!==d||e[6]!==n||e[7]!==t||e[8]!==a?(m=()=>{if(!d||!a)return;const x=`${a}:${d}`;g.current!==x&&(g.current=x,n?.refreshThreadMetadata(a)),p.current!==a&&(p.current=a,u||t("site-editor"))},f=[d,a,t,n,u],e[4]=u,e[5]=d,e[6]=n,e[7]=t,e[8]=a,e[9]=m,e[10]=f):(m=e[9],f=e[10]),w.useEffect(m,f)}function Q(e){return`deco-credits-empty-dismissed:${e}`}function pt(e){try{return localStorage.getItem(Q(e))==="1"}catch{return!1}}function qe(){const e=v.c(56),t=M(),{org:n}=z(),s=De("credits"),r=K(),{decoKeyId:a}=Pe(),[i,c]=w.useState(!0);let u;e[0]!==n.id?(u=()=>{L("credits_empty_state_dismissed",{organization_id:n.id}),c(!1);try{localStorage.setItem(Q(n.id),"1")}catch{}},e[0]=n.id,e[1]=u):u=e[1];const o=u;let d,p;if(e[2]!==i||e[3]!==n.id?(d=()=>{i&&L("credits_empty_state_shown",{organization_id:n.id})},p=[i,n.id],e[2]=i,e[3]=n.id,e[4]=d,e[5]=p):(d=e[4],p=e[5]),w.useEffect(d,p),!i)return null;if(!s){let k;e[6]!==t?(k=t("chat.input.allowanceExhaustedTitle"),e[6]=t,e[7]=k):k=e[7];let O;e[8]!==k?(O={title:k},e[8]=k,e[9]=O):O=e[9];let R;return e[10]!==o||e[11]!==O?(R=l.jsx(_e,{feature:"chat",copy:O,onDismiss:o}),e[10]=o,e[11]=O,e[12]=R):R=e[12],R}let g;e[13]!==o?(g=k=>!k&&o(),e[13]=o,e[14]=g):g=e[14];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=l.jsx("div",{className:"absolute inset-x-0 top-0 h-24 bg-gradient-to-b from-warning/8 to-transparent pointer-events-none rounded-t-lg"}),e[15]=m):m=e[15];let f;e[16]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx("div",{className:"flex items-center justify-center size-11 rounded-full bg-warning/10 border border-warning/20 mx-auto",children:l.jsx(W,{size:20,className:"text-warning"})}),e[16]=f):f=e[16];let x;e[17]!==t?(x=t("chat.creditsEmptyState.title"),e[17]=t,e[18]=x):x=e[18];let h;e[19]!==x?(h=l.jsx(X,{className:"text-lg font-semibold",children:x}),e[19]=x,e[20]=h):h=e[20];let b;e[21]!==t?(b=t("chat.creditsEmptyState.description"),e[21]=t,e[22]=b):b=e[22];let N;e[23]!==b?(N=l.jsx(Z,{className:"mt-2 text-sm leading-relaxed max-w-[320px] mx-auto",children:b}),e[23]=b,e[24]=N):N=e[24];let C;e[25]!==h||e[26]!==N?(C=l.jsxs("div",{className:"relative px-6 pt-7 pb-5",children:[m,l.jsxs(J,{className:"relative gap-3",children:[f,l.jsxs("div",{className:"text-center",children:[h,N]})]})]}),e[25]=h,e[26]=N,e[27]=C):C=e[27];let y;e[28]!==a||e[29]!==o?(y=a&&l.jsx("div",{className:"px-6 pb-5",children:l.jsx(me,{source:"empty_state",onDone:o})}),e[28]=a,e[29]=o,e[30]=y):y=e[30];let S;e[31]!==o||e[32]!==r||e[33]!==n.slug?(S=()=>{r({to:"/$org/settings/ai-providers",params:{org:n.slug}}),o()},e[31]=o,e[32]=r,e[33]=n.slug,e[34]=S):S=e[34];let j;e[35]!==t?(j=t("chat.creditsEmptyState.useYourOwnProvider"),e[35]=t,e[36]=j):j=e[36];let T;e[37]===Symbol.for("react.memo_cache_sentinel")?(T=l.jsx(Ee,{size:12,className:"transition-transform duration-150 group-hover:translate-x-0.5"}),e[37]=T):T=e[37];let E;e[38]!==S||e[39]!==j?(E=l.jsxs("button",{type:"button",className:"group flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:S,children:[j,T]}),e[38]=S,e[39]=j,e[40]=E):E=e[40];let D;e[41]!==t?(D=t("chat.creditsEmptyState.skipForNow"),e[41]=t,e[42]=D):D=e[42];let P;e[43]!==o||e[44]!==D?(P=l.jsx(B,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:o,children:D}),e[43]=o,e[44]=D,e[45]=P):P=e[45];let _;e[46]!==E||e[47]!==P?(_=l.jsxs("div",{className:"px-6 py-3.5 border-t border-border bg-muted/30 flex items-center justify-between",children:[E,P]}),e[46]=E,e[47]=P,e[48]=_):_=e[48];let I;e[49]!==C||e[50]!==y||e[51]!==_?(I=l.jsxs(ee,{className:"sm:max-w-[500px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ke,children:[C,y,_]}),e[49]=C,e[50]=y,e[51]=_,e[52]=I):I=e[52];let F;return e[53]!==I||e[54]!==g?(F=l.jsx(te,{open:!0,onOpenChange:g,children:I}),e[53]=I,e[54]=g,e[55]=F):F=e[55],F}function Ke(e){return e.preventDefault()}function Ge(e){const t=v.c(6),{balanceDollars:n}=e;let s;t[0]!==n?(s=n.toFixed(2),t[0]=n,t[1]=s):s=t[1];const r=s;let a,i;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=$("inline-flex items-center gap-1.5 px-3 py-1 rounded-full","bg-success/10 border border-success/20","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),i=l.jsx(W,{size:13,className:"text-success"}),t[2]=a,t[3]=i):(a=t[2],i=t[3]);let c;return t[4]!==r?(c=l.jsxs("div",{className:a,children:[i,l.jsxs("span",{className:"text-xs font-medium text-success tabular-nums",children:["$",r," in credits to get started"]})]}),t[4]=r,t[5]=c):c=t[5],c}function We(){const e=v.c(8),{org:t}=z(),n=K();let s;e[0]!==n||e[1]!==t.slug?(s=()=>n({to:"/$org/settings/ai-providers",params:{org:t.slug}}),e[0]=n,e[1]=t.slug,e[2]=s):s=e[2];let r,a,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=$("inline-flex items-center gap-1.5 px-3 py-1 rounded-lg cursor-pointer","bg-warning/10 border border-warning/20","hover:bg-warning/15","transition-colors duration-150","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),a=l.jsx(Ie,{size:13,className:"text-warning"}),i=l.jsx("span",{className:"text-xs font-medium text-warning",children:"No credits remaining · Add more"}),e[3]=r,e[4]=a,e[5]=i):(r=e[3],a=e[4],i=e[5]);let c;return e[6]!==s?(c=l.jsxs("button",{type:"button",onClick:s,className:r,children:[a,i]}),e[6]=s,e[7]=c):c=e[7],c}function Qe(e){const t=v.c(7),{scrollRef:n,sentinelRef:s,hasMoreOlder:r,isFetchingOlder:a,fetchOlderMessages:i}=e;let c,u;t[0]!==i||t[1]!==r||t[2]!==a||t[3]!==n||t[4]!==s?(c=()=>{const o=s.current,d=n.current;if(!o||!d||!r)return;const p=new IntersectionObserver(async g=>{if(!g[0]?.isIntersecting||a||!r)return;const f=d.scrollHeight,x=d.scrollTop;await i(),requestAnimationFrame(()=>{const h=d.scrollHeight;d.scrollTop=x+(h-f)})},{root:d,rootMargin:"200px 0px 0px 0px"});return p.observe(o),()=>p.disconnect()},u=[n,s,r,a,i],t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s,t[5]=c,t[6]=u):(c=t[5],u=t[6]),w.useEffect(c,u)}function Ye(e){const t=v.c(5),{className:n,children:s}=e;let r;t[0]!==n?(r=$("flex flex-col h-full w-full bg-background transform-[translateZ(0)]",n),t[0]=n,t[1]=r):r=t[1];let a;return t[2]!==s||t[3]!==r?(a=l.jsx("div",{className:r,children:s}),t[2]=s,t[3]=r,t[4]=a):a=t[4],a}function Ue(e){const t=v.c(5),{children:n,className:s}=e;let r;t[0]!==s?(r=$("flex-1 min-h-0 overflow-y-auto isolate",s),t[0]=s,t[1]=r):r=t[1];let a;return t[2]!==n||t[3]!==r?(a=l.jsx("div",{className:r,children:n}),t[2]=n,t[3]=r,t[4]=a):a=t[4],a}function Ve(e){const t=v.c(2),{children:n}=e;let s;return t[0]!==n?(s=l.jsx("div",{className:"min-h-full shrink-0 w-full flex items-center justify-center max-w-2xl mx-auto py-10",children:n}),t[0]=n,t[1]=s):s=t[1],s}function Xe(){const e=M(),{messages:t,status:n,hasMoreOlder:s,isFetchingOlder:r,fetchOlderMessages:a,isRunInProgress:i}=oe(),{taskId:c}=le();Ae();const u=ce(c??""),o=ue(u),d=o.size===0?t:t.filter(j=>!o.has(j.id)),p=de(d,n==="submitted"||n==="streaming"||i),g=p.visible,m=je(g),f=m.at(-1),x=m.findIndex(j=>!!j.assistant&&He(j.assistant)),b=pe()*he+16,N=w.useRef(null),C=w.useRef(null);Qe({scrollRef:N,sentinelRef:C,hasMoreOlder:s,isFetchingOlder:r,fetchOlderMessages:a});const y=ve({initial:!1}),S=j=>{N.current=j,y.scrollRef(j)};return l.jsx(fe.Provider,{value:p,children:l.jsx(be,{messages:t,children:l.jsxs("div",{className:"relative h-full w-full min-w-0",children:[l.jsx("div",{ref:S,"data-chat-scroller":!0,className:"w-full min-w-0 max-w-full overflow-y-auto h-full [container-type:size]",style:{paddingBottom:b},children:l.jsxs("div",{ref:y.contentRef,className:"overflow-x-clip",children:[l.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[l.jsx("div",{ref:C,"aria-hidden":!0,className:"h-px"}),r&&l.jsx("div",{className:"flex items-center justify-center py-3 text-xs text-muted-foreground",children:e("chat.chat.loadingOlderMessages")}),m.slice(0,-1).map((j,T)=>l.jsxs(w.Fragment,{children:[l.jsx(A,{pair:j,isLastPair:!1,status:T===m.length-1?n:void 0}),T===x&&l.jsx(q,{})]},`pair-${j.user?.id??j.assistant?.id}`))]}),f&&l.jsxs("div",{className:"min-h-[100cqh] min-w-0 max-w-2xl mx-auto w-full",children:[l.jsx(A,{pair:f,isLastPair:!0,status:n},`pair-${f.user?.id??f.assistant?.id}`),x===m.length-1&&l.jsx(q,{})]})]})}),!y.isAtBottom&&l.jsx(B,{type:"button",variant:"outline",size:"icon-sm","aria-label":e("chat.chat.jumpToLatest"),className:"absolute left-1/2 z-50 -translate-x-1/2 shadow-soft animate-in fade-in duration-200 dark:bg-background dark:hover:bg-accent",style:{bottom:b+8},onClick:()=>{y.scrollToBottom()},children:l.jsx(se,{size:14})})]})})})}function Ze(e){const t=v.c(5),{children:n,className:s}=e;let r;t[0]!==s?(r=$("flex-none w-full mx-auto p-2 pt-0","max-w-2xl min-w-0",s),t[0]=s,t[1]=r):r=t[1];let a;return t[2]!==n||t[3]!==r?(a=l.jsx("div",{className:r,children:n}),t[2]=n,t[3]=r,t[4]=a):a=t[4],a}const ht=Object.assign(Ye,{Main:Ue,Messages:Xe,EmptyState:Ve,Footer:Ze,Input:xe,Provider:ie,StreamHost:re,ActiveTaskStreamSource:ae,ThreadlessStreamSource:ne,NoAiProviderEmptyState:$e,CreditsEmptyState:qe,CreditsEyebrow:Ge,NoCreditsEyebrow:We,CreditsExhaustedBanner:ge});export{ht as C,Me as u,pt as w};
|
|
1
|
+
import{c as v,a6 as z,K as Y,i as U,m as $,j as l,b as M,B,L as V,r as w,d as K,E as L,x as X,aW as Z,w as J,v as ee,D as te}from"./index-FRxLT_js.js";import{n as se}from"./ArrowUp-B_rPxUl3.js";import{u as H,f as G,T as ne,A as ae,n as re,o as ie,b as oe,c as le,p as ce,q as ue,t as de,L as fe}from"./chat-context-CvQ-sM5v.js";import{T as me,c as ge,b as xe,d as pe,H as he}from"./input-DS1fkrsU.js";import{u as je,a as ve,S as be,M as A}from"./pair-DhT-6yBR.js";import{A as ye,f as W}from"./agent-icon-qKbICqBE.js";import{j as Ne}from"./content-changes-CFJfbWRJ.js";import{a as Ce}from"./agent-capabilities-B0JydJjP.js";import{a as we}from"./repository-binding-DjFY5b0y.js";import{c as Se,i as ke}from"./thread-intent-CoFgTbor.js";import{a as Te}from"./use-panel-navigate-DRtgWUMv.js";import{N as $e}from"./index-BUHQM-fc.js";import{i as Ee}from"./ArrowRight-CTIzvrRD.js";import{c as De}from"./use-entitlements-CmxoG1H2.js";import{u as Pe}from"./use-deco-credits-DcRWtP9o.js";import{F as _e}from"./feature-paywall-DF7aqMQM.js";import{i as Ie}from"./AlertCircle-CS5y5cdF.js";const Oe=15e3;function Me(e,t,n){const s=v.c(20),r=n===void 0?{}:n,{org:a}=z(),i=we(e);let c;s[0]!==t||s[1]!==i?.metadata||s[2]!==e?(c=!!e&&!!t&&Ce(i?.metadata),s[0]=t,s[1]=i?.metadata,s[2]=e,s[3]=c):c=s[3];const u=c;let o;s[4]!==t||s[5]!==a.slug||s[6]!==e?(o=Y.chatDraftChanges(a.slug,e??"",t??""),s[4]=t,s[5]=a.slug,s[6]=e,s[7]=o):o=s[7];let d;s[8]!==t||s[9]!==a.slug||s[10]!==e?(d=()=>Ne(a.slug,e,t),s[8]=t,s[9]=a.slug,s[10]=e,s[11]=d):d=s[11];const p=r.poll===!1?!1:Oe;let g;s[12]!==u||s[13]!==o||s[14]!==d||s[15]!==p?(g={queryKey:o,queryFn:d,enabled:u,refetchInterval:p,retry:!1},s[12]=u,s[13]=o,s[14]=d,s[15]=p,s[16]=g):g=s[16];const{data:m}=U(g),f=m===void 0?0:m,x=u?i:null;let h;return s[17]!==f||s[18]!==x?(h={project:x,changeCount:f},s[17]=f,s[18]=x,s[19]=h):h=s[19],h}function Fe(){const e=v.c(7),t=H(),n=G(),s=t?.virtualMcpId??null,r=t?.currentBranch??null,{project:a,changeCount:i}=Me(s,r);if(!a||!s||!r||i===0)return null;const c=a.icon??null,u=!!n&&(n.isRunInProgress||n.status==="streaming"||n.status==="submitted");let o;return e[0]!==r||e[1]!==i||e[2]!==a.title||e[3]!==c||e[4]!==u||e[5]!==s?(o={virtualMcpId:s,projectTitle:a.title,projectIcon:c,branch:r,changeCount:i,editing:u},e[0]=r,e[1]=i,e[2]=a.title,e[3]=c,e[4]=u,e[5]=s,e[6]=o):o=e[6],o}function Re(e){const t=v.c(24),{icon:n,title:s,subtitle:r,status:a,detail:i,action:c,className:u}=e;let o;t[0]!==u?(o=$("rounded-xl border border-border bg-card p-3",u),t[0]=u,t[1]=o):o=t[1];let d;t[2]!==n?(d=l.jsx("div",{className:"shrink-0",children:n}),t[2]=n,t[3]=d):d=t[3];let p;t[4]!==s?(p=l.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:s}),t[4]=s,t[5]=p):p=t[5];let g;t[6]!==r?(g=r&&l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:r}),t[6]=r,t[7]=g):g=t[7];let m;t[8]!==p||t[9]!==g?(m=l.jsxs("div",{className:"min-w-0 flex-1",children:[p,g]}),t[8]=p,t[9]=g,t[10]=m):m=t[10];let f;t[11]!==a?(f=a&&l.jsx("span",{className:"flex shrink-0 items-center gap-1.5 text-sm text-muted-foreground",children:a}),t[11]=a,t[12]=f):f=t[12];let x;t[13]!==d||t[14]!==m||t[15]!==f?(x=l.jsxs("div",{className:"flex items-center gap-2.5",children:[d,m,f]}),t[13]=d,t[14]=m,t[15]=f,t[16]=x):x=t[16];let h;t[17]!==c||t[18]!==i?(h=(i||c)&&l.jsxs("div",{className:"mt-3 flex items-center justify-between gap-2",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:i}),c]}),t[17]=c,t[18]=i,t[19]=h):h=t[19];let b;return t[20]!==o||t[21]!==x||t[22]!==h?(b=l.jsxs("div",{className:o,children:[x,h]}),t[20]=o,t[21]=x,t[22]=h,t[23]=b):b=t[23],b}function ze(e){const t=v.c(10),{draft:n}=e,s=M(),r=n.editing?"animate-pulse bg-warning":"bg-success";let a;t[0]!==r?(a=$("size-1.5 rounded-full",r),t[0]=r,t[1]=a):a=t[1];let i;t[2]!==a?(i=l.jsx("span",{"aria-hidden":!0,className:a}),t[2]=a,t[3]=i):i=t[3];const c=n.editing?"chat.draft.editing":"chat.draft.ready";let u;t[4]!==s||t[5]!==c?(u=s(c),t[4]=s,t[5]=c,t[6]=u):u=t[6];let o;return t[7]!==i||t[8]!==u?(o=l.jsxs(l.Fragment,{children:[i,u]}),t[7]=i,t[8]=u,t[9]=o):o=t[9],o}function Be(e){const t=v.c(11),{draft:n}=e,s=M(),{org:r}=z(),a=H()?.taskId??null;let i;t[0]!==n.virtualMcpId||t[1]!==r.slug?(i={org:r.slug,agentId:n.virtualMcpId},t[0]=n.virtualMcpId,t[1]=r.slug,t[2]=i):i=t[2];let c;t[3]!==a?(c=a?{thread:a}:{},t[3]=a,t[4]=c):c=t[4];let u;t[5]!==s?(u=s("chat.draft.open"),t[5]=s,t[6]=u):u=t[6];let o;return t[7]!==i||t[8]!==c||t[9]!==u?(o=l.jsx(B,{variant:"outline",size:"sm",asChild:!0,children:l.jsx(V,{to:"/$org/projects/$agentId/site-editor",params:i,search:c,children:u})}),t[7]=i,t[8]=c,t[9]=u,t[10]=o):o=t[10],o}function q(){const e=v.c(20),t=M(),n=Fe();if(!n)return null;let s;e[0]!==n.projectIcon||e[1]!==n.projectTitle?(s=l.jsx(ye,{icon:n.projectIcon,name:n.projectTitle,size:"sm"}),e[0]=n.projectIcon,e[1]=n.projectTitle,e[2]=s):s=e[2];const r=n.projectTitle;let a;e[3]!==n.branch?(a=l.jsx("span",{className:"font-mono",children:n.branch}),e[3]=n.branch,e[4]=a):a=e[4];let i;e[5]!==n?(i=l.jsx(ze,{draft:n}),e[5]=n,e[6]=i):i=e[6];const c=n.changeCount===1?"chat.draft.change":"chat.draft.changes";let u;e[7]!==n.changeCount||e[8]!==t||e[9]!==c?(u=t(c,{count:n.changeCount}),e[7]=n.changeCount,e[8]=t,e[9]=c,e[10]=u):u=e[10];let o;e[11]!==n?(o=l.jsx(Be,{draft:n}),e[11]=n,e[12]=o):o=e[12];let d;return e[13]!==n.projectTitle||e[14]!==s||e[15]!==a||e[16]!==i||e[17]!==u||e[18]!==o?(d=l.jsx(Re,{className:"mx-2.5 mb-6",icon:s,title:r,subtitle:a,status:i,detail:u,action:o}),e[13]=n.projectTitle,e[14]=s,e[15]=a,e[16]=i,e[17]=u,e[18]=o,e[19]=d):d=e[19],d}function He(e){return e.parts.some(t=>t.type==="dynamic-tool"||t.type.startsWith("tool-"))}function Le(e){let t=0;for(const n of e)for(const s of n.parts??[]){const r=s;r.type==="tool-load_repo"&&r.state==="output-available"&&r.output?.success===!0&&t++}return t}function Ae(){const e=v.c(11),{openPanel:t}=Te(),n=Se(),s=G()?.messages??[],r=H(),a=r?.taskId??null,i=r?.currentBranch;let c;e[0]!==i?(c=ke(i),e[0]=i,e[1]=c):c=e[1];const u=c;let o;e[2]!==s?(o=Le(s),e[2]=s,e[3]=o):o=e[3];const d=o,p=w.useRef(null),g=w.useRef(null);let m,f;e[4]!==u||e[5]!==d||e[6]!==n||e[7]!==t||e[8]!==a?(m=()=>{if(!d||!a)return;const x=`${a}:${d}`;g.current!==x&&(g.current=x,n?.refreshThreadMetadata(a)),p.current!==a&&(p.current=a,u||t("site-editor"))},f=[d,a,t,n,u],e[4]=u,e[5]=d,e[6]=n,e[7]=t,e[8]=a,e[9]=m,e[10]=f):(m=e[9],f=e[10]),w.useEffect(m,f)}function Q(e){return`deco-credits-empty-dismissed:${e}`}function pt(e){try{return localStorage.getItem(Q(e))==="1"}catch{return!1}}function qe(){const e=v.c(56),t=M(),{org:n}=z(),s=De("credits"),r=K(),{decoKeyId:a}=Pe(),[i,c]=w.useState(!0);let u;e[0]!==n.id?(u=()=>{L("credits_empty_state_dismissed",{organization_id:n.id}),c(!1);try{localStorage.setItem(Q(n.id),"1")}catch{}},e[0]=n.id,e[1]=u):u=e[1];const o=u;let d,p;if(e[2]!==i||e[3]!==n.id?(d=()=>{i&&L("credits_empty_state_shown",{organization_id:n.id})},p=[i,n.id],e[2]=i,e[3]=n.id,e[4]=d,e[5]=p):(d=e[4],p=e[5]),w.useEffect(d,p),!i)return null;if(!s){let k;e[6]!==t?(k=t("chat.input.allowanceExhaustedTitle"),e[6]=t,e[7]=k):k=e[7];let O;e[8]!==k?(O={title:k},e[8]=k,e[9]=O):O=e[9];let R;return e[10]!==o||e[11]!==O?(R=l.jsx(_e,{feature:"chat",copy:O,onDismiss:o}),e[10]=o,e[11]=O,e[12]=R):R=e[12],R}let g;e[13]!==o?(g=k=>!k&&o(),e[13]=o,e[14]=g):g=e[14];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=l.jsx("div",{className:"absolute inset-x-0 top-0 h-24 bg-gradient-to-b from-warning/8 to-transparent pointer-events-none rounded-t-lg"}),e[15]=m):m=e[15];let f;e[16]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx("div",{className:"flex items-center justify-center size-11 rounded-full bg-warning/10 border border-warning/20 mx-auto",children:l.jsx(W,{size:20,className:"text-warning"})}),e[16]=f):f=e[16];let x;e[17]!==t?(x=t("chat.creditsEmptyState.title"),e[17]=t,e[18]=x):x=e[18];let h;e[19]!==x?(h=l.jsx(X,{className:"text-lg font-semibold",children:x}),e[19]=x,e[20]=h):h=e[20];let b;e[21]!==t?(b=t("chat.creditsEmptyState.description"),e[21]=t,e[22]=b):b=e[22];let N;e[23]!==b?(N=l.jsx(Z,{className:"mt-2 text-sm leading-relaxed max-w-[320px] mx-auto",children:b}),e[23]=b,e[24]=N):N=e[24];let C;e[25]!==h||e[26]!==N?(C=l.jsxs("div",{className:"relative px-6 pt-7 pb-5",children:[m,l.jsxs(J,{className:"relative gap-3",children:[f,l.jsxs("div",{className:"text-center",children:[h,N]})]})]}),e[25]=h,e[26]=N,e[27]=C):C=e[27];let y;e[28]!==a||e[29]!==o?(y=a&&l.jsx("div",{className:"px-6 pb-5",children:l.jsx(me,{source:"empty_state",onDone:o})}),e[28]=a,e[29]=o,e[30]=y):y=e[30];let S;e[31]!==o||e[32]!==r||e[33]!==n.slug?(S=()=>{r({to:"/$org/settings/ai-providers",params:{org:n.slug}}),o()},e[31]=o,e[32]=r,e[33]=n.slug,e[34]=S):S=e[34];let j;e[35]!==t?(j=t("chat.creditsEmptyState.useYourOwnProvider"),e[35]=t,e[36]=j):j=e[36];let T;e[37]===Symbol.for("react.memo_cache_sentinel")?(T=l.jsx(Ee,{size:12,className:"transition-transform duration-150 group-hover:translate-x-0.5"}),e[37]=T):T=e[37];let E;e[38]!==S||e[39]!==j?(E=l.jsxs("button",{type:"button",className:"group flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:S,children:[j,T]}),e[38]=S,e[39]=j,e[40]=E):E=e[40];let D;e[41]!==t?(D=t("chat.creditsEmptyState.skipForNow"),e[41]=t,e[42]=D):D=e[42];let P;e[43]!==o||e[44]!==D?(P=l.jsx(B,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:o,children:D}),e[43]=o,e[44]=D,e[45]=P):P=e[45];let _;e[46]!==E||e[47]!==P?(_=l.jsxs("div",{className:"px-6 py-3.5 border-t border-border bg-muted/30 flex items-center justify-between",children:[E,P]}),e[46]=E,e[47]=P,e[48]=_):_=e[48];let I;e[49]!==C||e[50]!==y||e[51]!==_?(I=l.jsxs(ee,{className:"sm:max-w-[500px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ke,children:[C,y,_]}),e[49]=C,e[50]=y,e[51]=_,e[52]=I):I=e[52];let F;return e[53]!==I||e[54]!==g?(F=l.jsx(te,{open:!0,onOpenChange:g,children:I}),e[53]=I,e[54]=g,e[55]=F):F=e[55],F}function Ke(e){return e.preventDefault()}function Ge(e){const t=v.c(6),{balanceDollars:n}=e;let s;t[0]!==n?(s=n.toFixed(2),t[0]=n,t[1]=s):s=t[1];const r=s;let a,i;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=$("inline-flex items-center gap-1.5 px-3 py-1 rounded-full","bg-success/10 border border-success/20","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),i=l.jsx(W,{size:13,className:"text-success"}),t[2]=a,t[3]=i):(a=t[2],i=t[3]);let c;return t[4]!==r?(c=l.jsxs("div",{className:a,children:[i,l.jsxs("span",{className:"text-xs font-medium text-success tabular-nums",children:["$",r," in credits to get started"]})]}),t[4]=r,t[5]=c):c=t[5],c}function We(){const e=v.c(8),{org:t}=z(),n=K();let s;e[0]!==n||e[1]!==t.slug?(s=()=>n({to:"/$org/settings/ai-providers",params:{org:t.slug}}),e[0]=n,e[1]=t.slug,e[2]=s):s=e[2];let r,a,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=$("inline-flex items-center gap-1.5 px-3 py-1 rounded-lg cursor-pointer","bg-warning/10 border border-warning/20","hover:bg-warning/15","transition-colors duration-150","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),a=l.jsx(Ie,{size:13,className:"text-warning"}),i=l.jsx("span",{className:"text-xs font-medium text-warning",children:"No credits remaining · Add more"}),e[3]=r,e[4]=a,e[5]=i):(r=e[3],a=e[4],i=e[5]);let c;return e[6]!==s?(c=l.jsxs("button",{type:"button",onClick:s,className:r,children:[a,i]}),e[6]=s,e[7]=c):c=e[7],c}function Qe(e){const t=v.c(7),{scrollRef:n,sentinelRef:s,hasMoreOlder:r,isFetchingOlder:a,fetchOlderMessages:i}=e;let c,u;t[0]!==i||t[1]!==r||t[2]!==a||t[3]!==n||t[4]!==s?(c=()=>{const o=s.current,d=n.current;if(!o||!d||!r)return;const p=new IntersectionObserver(async g=>{if(!g[0]?.isIntersecting||a||!r)return;const f=d.scrollHeight,x=d.scrollTop;await i(),requestAnimationFrame(()=>{const h=d.scrollHeight;d.scrollTop=x+(h-f)})},{root:d,rootMargin:"200px 0px 0px 0px"});return p.observe(o),()=>p.disconnect()},u=[n,s,r,a,i],t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s,t[5]=c,t[6]=u):(c=t[5],u=t[6]),w.useEffect(c,u)}function Ye(e){const t=v.c(5),{className:n,children:s}=e;let r;t[0]!==n?(r=$("flex flex-col h-full w-full bg-background transform-[translateZ(0)]",n),t[0]=n,t[1]=r):r=t[1];let a;return t[2]!==s||t[3]!==r?(a=l.jsx("div",{className:r,children:s}),t[2]=s,t[3]=r,t[4]=a):a=t[4],a}function Ue(e){const t=v.c(5),{children:n,className:s}=e;let r;t[0]!==s?(r=$("flex-1 min-h-0 overflow-y-auto isolate",s),t[0]=s,t[1]=r):r=t[1];let a;return t[2]!==n||t[3]!==r?(a=l.jsx("div",{className:r,children:n}),t[2]=n,t[3]=r,t[4]=a):a=t[4],a}function Ve(e){const t=v.c(2),{children:n}=e;let s;return t[0]!==n?(s=l.jsx("div",{className:"min-h-full shrink-0 w-full flex items-center justify-center max-w-2xl mx-auto py-10",children:n}),t[0]=n,t[1]=s):s=t[1],s}function Xe(){const e=M(),{messages:t,status:n,hasMoreOlder:s,isFetchingOlder:r,fetchOlderMessages:a,isRunInProgress:i}=oe(),{taskId:c}=le();Ae();const u=ce(c??""),o=ue(u),d=o.size===0?t:t.filter(j=>!o.has(j.id)),p=de(d,n==="submitted"||n==="streaming"||i),g=p.visible,m=je(g),f=m.at(-1),x=m.findIndex(j=>!!j.assistant&&He(j.assistant)),b=pe()*he+16,N=w.useRef(null),C=w.useRef(null);Qe({scrollRef:N,sentinelRef:C,hasMoreOlder:s,isFetchingOlder:r,fetchOlderMessages:a});const y=ve({initial:!1}),S=j=>{N.current=j,y.scrollRef(j)};return l.jsx(fe.Provider,{value:p,children:l.jsx(be,{messages:t,children:l.jsxs("div",{className:"relative h-full w-full min-w-0",children:[l.jsx("div",{ref:S,"data-chat-scroller":!0,className:"w-full min-w-0 max-w-full overflow-y-auto h-full [container-type:size]",style:{paddingBottom:b},children:l.jsxs("div",{ref:y.contentRef,className:"overflow-x-clip",children:[l.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[l.jsx("div",{ref:C,"aria-hidden":!0,className:"h-px"}),r&&l.jsx("div",{className:"flex items-center justify-center py-3 text-xs text-muted-foreground",children:e("chat.chat.loadingOlderMessages")}),m.slice(0,-1).map((j,T)=>l.jsxs(w.Fragment,{children:[l.jsx(A,{pair:j,isLastPair:!1,status:T===m.length-1?n:void 0}),T===x&&l.jsx(q,{})]},`pair-${j.user?.id??j.assistant?.id}`))]}),f&&l.jsxs("div",{className:"min-h-[100cqh] min-w-0 max-w-2xl mx-auto w-full",children:[l.jsx(A,{pair:f,isLastPair:!0,status:n},`pair-${f.user?.id??f.assistant?.id}`),x===m.length-1&&l.jsx(q,{})]})]})}),!y.isAtBottom&&l.jsx(B,{type:"button",variant:"outline",size:"icon-sm","aria-label":e("chat.chat.jumpToLatest"),className:"absolute left-1/2 z-50 -translate-x-1/2 shadow-soft animate-in fade-in duration-200 dark:bg-background dark:hover:bg-accent",style:{bottom:b+8},onClick:()=>{y.scrollToBottom()},children:l.jsx(se,{size:14})})]})})})}function Ze(e){const t=v.c(5),{children:n,className:s}=e;let r;t[0]!==s?(r=$("flex-none w-full mx-auto p-2 pt-0","max-w-2xl min-w-0",s),t[0]=s,t[1]=r):r=t[1];let a;return t[2]!==n||t[3]!==r?(a=l.jsx("div",{className:r,children:n}),t[2]=n,t[3]=r,t[4]=a):a=t[4],a}const ht=Object.assign(Ye,{Main:Ue,Messages:Xe,EmptyState:Ve,Footer:Ze,Input:xe,Provider:ie,StreamHost:re,ActiveTaskStreamSource:ae,ThreadlessStreamSource:ne,NoAiProviderEmptyState:$e,CreditsEmptyState:qe,CreditsEyebrow:Ge,NoCreditsEyebrow:We,CreditsExhaustedBanner:ge});export{ht as C,Me as u,pt as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,a6 as h,h6 as d,j as g,N as m,ag as p,a2 as j}from"./index-
|
|
1
|
+
import{c as f,a6 as h,h6 as d,j as g,N as m,ag as p,a2 as j}from"./index-FRxLT_js.js";import{L as v}from"./legacy-main-redirect-CehX4Bni.js";import"./thread-route-TTLcBPLy.js";const x=j("/shell/$org/org-shell/");function L(){const t=f.c(19),{org:a}=h(),l=x.useSearch(),{main:i,virtualmcpid:o}=l;if(i!==void 0){let e;t[0]!==i||t[1]!==a.slug||t[2]!==l||t[3]!==o?(e=d({org:a.slug,agentId:o,main:i,search:l}),t[0]=i,t[1]=a.slug,t[2]=l,t[3]=o,t[4]=e):e=t[4];const s=e;if(s?.kind==="canonical"){let r;return t[5]!==s?(r=g.jsx(v,{target:s}),t[5]=s,t[6]=r):r=t[6],r}}let n;t[7]!==o?(n=o?.trim()||null,t[7]=o,t[8]=n):n=t[8];const u=n;if(u){let e;t[9]!==a.slug||t[10]!==u?(e={org:a.slug,agentId:u},t[9]=a.slug,t[10]=u,t[11]=e):e=t[11];let s;t[12]!==l?(s={...l,virtualmcpid:void 0},t[12]=l,t[13]=s):s=t[13];let r;return t[14]!==e||t[15]!==s?(r=g.jsx(m,{to:p.projects,params:e,search:s,hash:!0,replace:!0}),t[14]=e,t[15]=s,t[16]=r):r=t[16],r}let c;return t[17]!==a.slug?(c=g.jsx(m,{to:p.home,params:{org:a.slug},search:N,hash:!0,replace:!0}),t[17]=a.slug,t[18]=c):c=t[18],c}function N(t){return{...t,virtualmcpid:void 0}}export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as j,au as W,aw as q,b as E,r as w,d as G,j as o,aV as $,R as I,P as N,n as U,B as k,ba as V}from"./index-
|
|
1
|
+
import{c as j,au as W,aw as q,b as E,r as w,d as G,j as o,aV as $,R as I,P as N,n as U,B as k,ba as V}from"./index-FRxLT_js.js";import{u as K}from"./use-mobile-eRuVOAzy.js";import{T as Y,a as Z,c as J}from"./tooltip-C6OYlSV-.js";import{t as Q,a as X}from"./MessageCircle01-BoiiT0Ka.js";import{s as ee}from"./XClose-BvzwUB-E.js";import{b as te}from"./thread-button-DEmMau3d.js";import{T as ne}from"./toolbar-icon-button-DnvtDhiO.js";import{b as se,R as oe,a as D}from"./resizable-BL8CU-aJ.js";import{c as re,r as ie,m as ae}from"./use-chat-layout-state-D4d4l3oL.js";import{R as le}from"./route-page-header-D4_8Ct3f.js";import"./index-D9pnpNHk.js";import"./use-sidebar-collapsed-Cvh_KEOx.js";import"./sheet-Dps_OtzY.js";import"./use-in-settings-CG5n8E8Q.js";import"./use-panel-navigate-DRtgWUMv.js";import"./thread-route-TTLcBPLy.js";import"./use-project-scope-BEEh5L8P.js";import"./repository-binding-DjFY5b0y.js";import"./use-mcp-client-rOHZbD3Y.js";import"./auth-AT-S53oU.js";import"./LayoutLeft-ww8XIIKY.js";import"./use-current-view-1HEoI3qR.js";function A(t,e){const n=typeof t=="number"?t:Number(t);return!Number.isFinite(n)||n<=0||n>=100?e:n}function ce(t,e){const n=j.c(8);let r;n[0]!==e?(r=c=>A(c,e),n[0]=e,n[1]=r):r=n[1];const[i,a]=W(t,r);let s;n[2]!==e||n[3]!==i?(s=A(i,e),n[2]=e,n[3]=i,n[4]=s):s=n[4];let l;return n[5]!==a||n[6]!==s?(l=[s,a],n[5]=a,n[6]=s,n[7]=l):l=n[7],l}const ue=33;function de(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=q.sidePanelWidth(),t[0]=e):e=t[0],ce(e,ue)}const P="chat-layout-thread",M="chat-layout-content",H="320px",O=w.createContext(null);function Fe(){return T()}function fe(){return w.use(O)}function T(){const t=w.use(O);if(!t)throw new Error("ChatLayout regions require a ChatLayout");return t}function he(t){const e=j.c(22),{children:n,...r}=t,i=K(),a=G(),s=w.useRef(null),[l,c]=de(),{threadOpen:u,contentOpen:d}=r,h=re(r),m=u&&d?l:h.side,p=100-m,y=b=>{const v=b.getLayout(),_=v[P],S=v[M];typeof _!="number"||typeof S!="number"||Math.abs(_-m)<.001&&Math.abs(S-p)<.001||b.setLayout({[P]:m,[M]:p})},C=ie(r);let x;e[0]!==i||e[1]!==r||e[2]!==C?(x={...r,isMobile:i,mobileSurface:C},e[0]=i,e[1]=r,e[2]=C,e[3]=x):x=e[3];const f=x;let g;e[4]!==i||e[5]!==r||e[6]!==a||e[7]!==f?(g=i&&!r.threadless&&o.jsx(te,{open:f.mobileSurface==="chat",onToggle:()=>{a({to:".",search:b=>({...b,...ae(f.mobileSurface==="chat"?"main":"chat")}),replace:!0})}}),e[4]=i,e[5]=r,e[6]=a,e[7]=f,e[8]=g):g=e[8];let L;e[9]!==n||e[10]!==d||e[11]!==p||e[12]!==i||e[13]!==c||e[14]!==y||e[15]!==u||e[16]!==m?(L=i?o.jsx("div",{"data-slot":"chat-layout",className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background",children:n}):o.jsx(oe,{ref:b=>{if(s.current=b,!b)return;let v=!0;return queueMicrotask(()=>{v&&y(b)}),()=>{v=!1,s.current===b&&(s.current=null)}},defaultLayout:{[P]:m,[M]:p},orientation:"horizontal","data-slot":"chat-layout",className:"flex-1 min-h-0 pt-1 pb-1 pr-1 pl-0",style:{overflow:"visible"},onLayoutChanged:(b,v)=>{const{isUserInteraction:_}=v;if(!_){const R=s.current;R&&y(R);return}const S=b[P];u&&d&&typeof S=="number"&&S>0&&S<100&&c(S)},children:n}),e[9]=n,e[10]=d,e[11]=p,e[12]=i,e[13]=c,e[14]=y,e[15]=u,e[16]=m,e[17]=L):L=e[17];let z;return e[18]!==g||e[19]!==L||e[20]!==f?(z=o.jsxs(O,{value:f,children:[g,L]}),e[18]=g,e[19]=L,e[20]=f,e[21]=z):z=e[21],z}function me(t){const e=j.c(14),{children:n,topbar:r}=t,i=T();if(i.isMobile){let u;return e[0]!==n||e[1]!==i.mobileSurface||e[2]!==r?(u=i.mobileSurface==="chat"?o.jsxs(N,{variant:"plain","data-slot":"chat-layout-thread",children:[r,o.jsx(N.Content,{"data-testid":"chat-panel",children:n})]}):null,e[0]=n,e[1]=i.mobileSurface,e[2]=r,e[3]=u):u=e[3],u}if(!i.threadOpen)return null;let a;e[4]!==i.contentOpen?(a=i.contentOpen&&o.jsx(se,{className:"bg-sidebar"}),e[4]=i.contentOpen,e[5]=a):a=e[5];let s;e[6]!==n?(s=o.jsx(N.Content,{"data-testid":"chat-panel",children:n}),e[6]=n,e[7]=s):s=e[7];let l;e[8]!==s||e[9]!==r?(l=o.jsx(D,{id:P,defaultSize:"33%",minSize:H,className:"min-w-0 overflow-hidden bg-sidebar",children:o.jsx("div",{className:"h-full min-h-0 p-0.5",children:o.jsxs(N,{"data-testid":"side-panel",children:[r,s]})})}),e[8]=s,e[9]=r,e[10]=l):l=e[10];let c;return e[11]!==a||e[12]!==l?(c=o.jsxs(o.Fragment,{children:[a,l]}),e[11]=a,e[12]=l,e[13]=c):c=e[13],c}function F(t){const e=j.c(10),{label:n,pressed:r,onClick:i,children:a}=t;let s;e[0]!==a||e[1]!==n||e[2]!==i||e[3]!==r?(s=o.jsx(Y,{asChild:!0,children:o.jsx(ne,{"aria-label":n,"aria-pressed":r,onClick:i,children:a})}),e[0]=a,e[1]=n,e[2]=i,e[3]=r,e[4]=s):s=e[4];let l;e[5]!==n?(l=o.jsx(Z,{side:"bottom",children:n}),e[5]=n,e[6]=l):l=e[6];let c;return e[7]!==s||e[8]!==l?(c=o.jsxs(J,{children:[s,l]}),e[7]=s,e[8]=l,e[9]=c):c=e[9],c}function pe(){const t=j.c(12),e=E(),n=T();if(n.isMobile||n.threadless)return null;const r=!n.threadOpen;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("span",{"aria-hidden":!0,className:"mr-1.5 h-4 w-px shrink-0 bg-border"}),t[0]=i):i=t[0];let a;t[1]!==r||t[2]!==n.toggleFullscreen||t[3]!==e?(a=r?o.jsxs(k,{variant:"ghost",size:"sm","aria-pressed":r,className:"h-7 gap-1.5 px-2 text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground",onClick:n.toggleFullscreen,children:[o.jsx(Q,{size:16}),e("page.exitFullscreen")]}):o.jsx(F,{label:e("page.enterFullscreen"),pressed:r,onClick:n.toggleFullscreen,children:o.jsx(X,{size:16})}),t[1]=r,t[2]=n.toggleFullscreen,t[3]=e,t[4]=a):a=t[4];let s;t[5]!==r||t[6]!==n.toggleContent||t[7]!==e?(s=!r&&o.jsx(F,{label:e("page.closeMainPanel"),onClick:n.toggleContent,children:o.jsx(ee,{size:16})}),t[5]=r,t[6]=n.toggleContent,t[7]=e,t[8]=s):s=t[8];let l;return t[9]!==a||t[10]!==s?(l=o.jsxs("div",{className:"flex items-center gap-0.5",children:[i,a,s]}),t[9]=a,t[10]=s,t[11]=l):l=t[11],l}function Ke(){const t=j.c(9),e=E(),n=K(),r=fe();if(n||!r||r.threadless||r.contentOpen)return null;const i=r.toggleContent;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(xe,{}),t[0]=a):a=t[0];let s;t[1]!==e?(s=e("page.openMainPanel"),t[1]=e,t[2]=s):s=t[2];let l;t[3]!==r.toggleContent||t[4]!==s?(l=o.jsxs(k,{variant:"ghost",size:"sm",className:"h-7 gap-1.5 px-2 text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground",onClick:i,children:[a,s]}),t[3]=r.toggleContent,t[4]=s,t[5]=l):l=t[5];let c;t[6]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("span",{"aria-hidden":!0,className:"mx-1 h-4 w-px shrink-0 bg-border"}),t[6]=c):c=t[6];let u;return t[7]!==l?(u=o.jsxs(o.Fragment,{children:[l,c]}),t[7]=l,t[8]=u):u=t[8],u}function xe(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,className:"shrink-0",children:o.jsx("path",{d:"M4 5v14M8 12h12m0 0-6-6m6 6-6 6"})}),t[0]=e):e=t[0],e}function ge({children:t,routeId:e}){return t}function B(t){const e=j.c(26),{children:n,actions:r,drawer:i,aside:a}=t,s=T();if(s.isMobile&&s.mobileSurface!=="main")return null;const l=s.isMobile?"plain":"card";let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(pe,{}),e[0]=c):c=e[0];let u;e[1]!==r||e[2]!==s.contentNavigation?(u=o.jsx(le,{navigation:s.contentNavigation,actions:r,trailingActions:c}),e[1]=r,e[2]=s.contentNavigation,e[3]=u):u=e[3];let d;e[4]!==n||e[5]!==s.contentKey?(d=o.jsx($,{children:o.jsx(ge,{routeId:s.contentKey,children:n})}),e[4]=n,e[5]=s.contentKey,e[6]=d):d=e[6];let h;e[7]!==s.contentKey||e[8]!==d?(h=o.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:o.jsx(I,{children:d},s.contentKey)}),e[7]=s.contentKey,e[8]=d,e[9]=h):h=e[9];let m;e[10]!==i||e[11]!==h?(m=o.jsxs(N.Content,{children:[h,i]}),e[10]=i,e[11]=h,e[12]=m):m=e[12];let p;e[13]!==u||e[14]!==m?(p=o.jsxs(U.Breadcrumbs.Provider,{children:[u,m]}),e[13]=u,e[14]=m,e[15]=p):p=e[15];let y;e[16]!==l||e[17]!==p?(y=o.jsx(N,{"data-testid":"main-panel",variant:l,children:p}),e[16]=l,e[17]=p,e[18]=y):y=e[18];const C=y;if(s.isMobile)return C;if(!s.contentOpen)return null;let x;e[19]!==C?(x=o.jsx("div",{className:"h-full min-h-0 min-w-0 flex-1 p-0.5",children:C}),e[19]=C,e[20]=x):x=e[20];let f;e[21]!==a?(f=a&&o.jsx("div",{className:"h-full min-h-0 w-[42%] min-w-80 shrink-0 p-0.5",children:o.jsx(N,{"data-testid":"aside-panel",children:o.jsx(I,{children:o.jsx($,{children:a})},w.isValidElement(a)?a.key??void 0:void 0)})}),e[21]=a,e[22]=f):f=e[22];let g;return e[23]!==f||e[24]!==x?(g=o.jsx(D,{id:M,defaultSize:"67%",minSize:H,className:"min-w-0 overflow-hidden bg-sidebar",children:o.jsxs("div",{className:"flex h-full min-h-0",children:[x,f]})}),e[23]=f,e[24]=x,e[25]=g):g=e[25],g}function De(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(B,{children:o.jsx(V,{})}),t[0]=e):e=t[0],e}function He(t){const e=j.c(18),{error:n,reset:r}=t,i=E();let a;e[0]!==i?(a=i("common.errorBoundary.somethingWentWrong"),e[0]=i,e[1]=a):a=e[1];let s;e[2]!==a?(s=o.jsx("h2",{className:"text-lg font-medium",children:a}),e[2]=a,e[3]=s):s=e[3];let l;e[4]!==n.message||e[5]!==i?(l=n.message||i("common.errorBoundary.unexpectedError"),e[4]=n.message,e[5]=i,e[6]=l):l=e[6];let c;e[7]!==l?(c=o.jsx("p",{className:"max-w-lg whitespace-pre-wrap text-sm text-muted-foreground",children:l}),e[7]=l,e[8]=c):c=e[8];let u;e[9]!==i?(u=i("common.errorBoundary.tryAgain"),e[9]=i,e[10]=u):u=e[10];let d;e[11]!==r||e[12]!==u?(d=o.jsx(k,{variant:"outline",onClick:r,children:u}),e[11]=r,e[12]=u,e[13]=d):d=e[13];let h;return e[14]!==s||e[15]!==c||e[16]!==d?(h=o.jsx(B,{children:o.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-4 p-6 text-center",children:[s,c,d]})}),e[14]=s,e[15]=c,e[16]=d,e[17]=h):h=e[17],h}const We=Object.assign(he,{Thread:me,Content:B});export{We as ChatLayout,He as ChatLayoutError,De as ChatLayoutPending,Ke as OpenMainPanelButton,Fe as useChatLayout,fe as useOptionalChatLayout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,f as p,ay as u,j as s,ba as x,N as a}from"./index-
|
|
1
|
+
import{c as f,f as p,ay as u,j as s,ba as x,N as a}from"./index-FRxLT_js.js";import{C as j}from"./capability-load-error-C7VfNWgD.js";function d(){const t=f.c(19);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:g,error:c}=u();if(g){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(x,{}),t[1]=e):e=t[1],e}if(c){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("monitoring:view")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("members:manage")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}let n;return t[17]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[17]=r,t[18]=n):n=t[18],n}export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d8 as _}from"./index-
|
|
1
|
+
import{d8 as _}from"./index-FRxLT_js.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
|
package/dist/client/assets/{infiniteQueryObserver-C58dnOYG.js → infiniteQueryObserver-CZ7GCbwa.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e7 as g,e8 as d,e9 as v}from"./index-
|
|
1
|
+
import{e7 as g,e8 as d,e9 as v}from"./index-FRxLT_js.js";var b=class extends g{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:c,isRefetching:u,isError:a,isRefetchError:P}=i,r=s.fetchMeta?.fetchMore?.direction,h=a&&r==="forward",o=c&&r==="forward",n=a&&r==="backward",f=c&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,s.data),hasPreviousPage:d(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:f,isRefetchError:P&&!h&&!n,isRefetching:u&&!o&&!f}}};export{b as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as s,i9 as de,b as G,ia as ue,r as le,ib as xe,ic as re,gK as T,gZ as W,B as J,e3 as V,a9 as pe}from"./index-DNY1LCEV.js";import{i as he}from"./CreditCard01-BGMvQi86.js";import{B as L}from"./badge-DhCDyINb.js";import{M as je}from"./multi-select-j_cBBkSq.js";import{S as be,d as ve,c as Be,a as Ne,b as Se}from"./select-BtuZ1_PE.js";import{T as $,a as ye,b as ie,c as F,d as Te,e as we}from"./table-Dfn_tXRY.js";import{C as ke,X as Ue,Y as Ce}from"./CartesianChart-DDuspEUo.js";import{T as De}from"./Tooltip-DmnEut8_.js";import{a as _e,A as Me}from"./AreaChart-D6tyN032.js";import{c8 as Re}from"./CategoricalChart-CclXOr_i.js";import{R as Le}from"./require-capability-GB4QCUSY.js";import"./checkbox-BK5KAA6g.js";import"./Minus-DhX2EjkJ.js";import"./ChevronDown-C0rME5fU.js";import"./command-C04_rx60.js";import"./index-DGzcH4Vq.js";import"./SearchMd-DoUjFKDV.js";import"./popover-O0--zxB3.js";import"./index-BdQq_4o_.js";import"./index-D4Cq4uu-.js";import"./ChevronUp-CIqW-9_W.js";import"./index-WY5skHFQ.js";import"./access-gate-B30zL1q2.js";import"./capability-load-error-BUXjQvww.js";const Q=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1}),ne=["B","KB","MB","GB","TB","PB"];function oe(t){if(t<=0)return"0 B";const e=Math.min(ne.length-1,Math.floor(Math.log(t)/Math.log(1024))),n=t/1024**e;return`${n.toFixed(n>=100||e===0?0:1)} ${ne[e]}`}const X=50,$e="https://assets.decocache.com/decocms/45f9e905-046b-4aeb-8420-0377a7d0d041/deco_Transferencia.pdf",Fe=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"});function ce(t){return new Date(`${t.slice(0,10)}T00:00:00Z`)}function ee(t){return ce(t).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"})}function Ie(){const t=new Date;return Array.from({length:12},(e,n)=>{const l=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()-n,1));return{value:l.toISOString().slice(0,10),label:l.toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"})}})}function Pe(t){return new Date(`${t}T00:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"})}function ae(t){const e=k.c(30),{usage:n,metric:l,colorNum:o,formatValue:f,height:i}=t,a=`var(--chart-${o})`,d=`infra-billing-${l}`;let g;e[0]!==n?(g=n.map(Ae),e[0]=n,e[1]=g):g=e[1];const x=g;let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b={left:0,right:4,top:8,bottom:0},e[2]=b):b=e[2];let r,p;e[3]!==a?(r=s.jsx("stop",{offset:"0%",stopColor:a,stopOpacity:.25}),p=s.jsx("stop",{offset:"100%",stopColor:a,stopOpacity:0}),e[3]=a,e[4]=r,e[5]=p):(r=e[4],p=e[5]);let h;e[6]!==d||e[7]!==r||e[8]!==p?(h=s.jsx("defs",{children:s.jsxs("linearGradient",{id:d,x1:"0",y1:"0",x2:"0",y2:"1",children:[r,p]})}),e[6]=d,e[7]=r,e[8]=p,e[9]=h):h=e[9];let u;e[10]!==f||e[11]!==i?(u=i>100&&s.jsxs(s.Fragment,{children:[s.jsx(ke,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(Ue,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},interval:"preserveStartEnd",tickMargin:8}),s.jsx(Ce,{orientation:"right",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},tickFormatter:f,width:68})]}),e[10]=f,e[11]=i,e[12]=u):u=e[12];let B,v;e[13]===Symbol.for("react.memo_cache_sentinel")?(B={stroke:"var(--border)",strokeDasharray:"4 4"},v={background:"var(--background)",border:"1px solid var(--border)",borderRadius:8,fontSize:12},e[13]=B,e[14]=v):(B=e[13],v=e[14]);let j;e[15]!==f?(j=s.jsx(De,{cursor:B,contentStyle:v,formatter:C=>f(Number(C)||0)}),e[15]=f,e[16]=j):j=e[16];const y=`url(#${d})`;let N;e[17]!==a||e[18]!==l||e[19]!==y?(N=s.jsx(_e,{type:"linear",dataKey:l,stroke:a,strokeWidth:2,fill:y,dot:!1}),e[17]=a,e[18]=l,e[19]=y,e[20]=N):N=e[20];let m;e[21]!==x||e[22]!==N||e[23]!==h||e[24]!==u||e[25]!==j?(m=s.jsxs(Me,{data:x,margin:b,children:[h,u,j,N]}),e[21]=x,e[22]=N,e[23]=h,e[24]=u,e[25]=j,e[26]=m):m=e[26];let S;return e[27]!==i||e[28]!==m?(S=s.jsx(Re,{width:"100%",height:i,children:m}),e[27]=i,e[28]=m,e[29]=S):S=e[29],S}function Ae(t){return{...t,label:Pe(t.date)}}function Z(t,e){return t.reduce((n,l)=>n+l[e],0)}function Ee(){const t=k.c(39),e=G(),{sites:n,isLoading:l}=ue(),[o,f]=le.useState(null),i=Ie(),[a,d]=le.useState(i[0].value);let g;t[0]!==o||t[1]!==n?(g=o??n.slice(0,X),t[0]=o,t[1]=n,t[2]=g):g=t[2];const x=g,b=!o&&n.length>X,{data:r,isLoading:p}=xe(x,a),h=re();if(l){let c;return t[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(V,{className:"h-64 w-full"}),t[3]=c):c=t[3],c}if(n.length===0){let c;t[4]!==e?(c=e("settings.infraBilling.noSites"),t[4]=e,t[5]=c):c=t[5];let w;return t[6]!==c?(w=s.jsx(T,{className:"p-6 text-sm text-muted-foreground",children:c}),t[6]=c,t[7]=w):w=t[7],w}const u=r?.usage??[],B=r?.pageviewsAvailable??!1,v=!!r&&!r.usageUnavailable,j=(c,w)=>v?w(Z(u,c)):"—",y=[{key:"pageviews",title:e("settings.infraBilling.pageviews"),description:e("settings.infraBilling.pageviewsDescription"),colorNum:1,total:B&&v?Q.format(Z(u,"pageviews")):"—"},{key:"requests",title:e("settings.infraBilling.requests"),description:e("settings.infraBilling.requestsDescription"),colorNum:2,total:j("requests",Ze)},{key:"dataTransferBytes",title:e("settings.infraBilling.dataTransfer"),description:e("settings.infraBilling.dataTransferDescription"),colorNum:3,total:j("dataTransferBytes",oe)}],N=Oe;let m;t[8]!==r?.teams?(m=r?.teams??[],t[8]=r?.teams,t[9]=m):m=t[9];const S=m;let C;t[10]!==r?.siteSlugsWithoutTeam?(C=r?.siteSlugsWithoutTeam??[],t[10]=r?.siteSlugsWithoutTeam,t[11]=C):C=t[11];const K=C,U=S.length===1?S[0]:void 0,D=U?.billing??null,te=S.length+(K.length>0?1:0)>1,Y=Z(u,"pageviews"),se=Y>0?Z(u,"requests")/Y:0,me=B&&v&&Y>0?se.toFixed(se<10?1:0):"—";let I;t[12]!==r?.billingUnavailable||t[13]!==U||t[14]!==e||t[15]!==S.length?(I=r?.billingUnavailable?e("settings.infraBilling.billingUnavailable"):S.length>1?e("settings.infraBilling.multipleTeams",{count:String(S.length)}):U?fe(U,e):e("settings.infraBilling.noTeam"),t[12]=r?.billingUnavailable,t[13]=U,t[14]=e,t[15]=S.length,t[16]=I):I=t[16];const ge=I;let _;t[17]!==n?(_=n.map(qe),t[17]=n,t[18]=_):_=t[18];let M;t[19]!==e?(M=e("settings.infraBilling.siteLabel"),t[19]=e,t[20]=M):M=t[20];let P;t[21]!==x||t[22]!==_||t[23]!==M?(P=s.jsx(je,{className:"w-auto min-w-56 max-w-full",options:_,defaultValue:x,maxCount:2,placeholder:M,onValueChange:f}),t[21]=x,t[22]=_,t[23]=M,t[24]=P):P=t[24];let R;t[25]!==e?(R=e("settings.infraBilling.monthLabel"),t[25]=e,t[26]=R):R=t[26];let A;t[27]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ne,{}),t[27]=A):A=t[27];let E;t[28]!==R?(E=s.jsx(Se,{className:"w-48","aria-label":R,children:A}),t[28]=R,t[29]=E):E=t[29];let z;t[30]!==x.length||t[31]!==e?(z=x.length===0&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.pickASite")}),t[30]=x.length,t[31]=e,t[32]=z):z=t[32];let q;t[33]!==e||t[34]!==b?(q=b&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.tooManySites",{count:String(X)})}),t[33]=e,t[34]=b,t[35]=q):q=t[35];let O;return t[36]!==r?.usageUnavailable||t[37]!==e?(O=r?.usageUnavailable&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.warehouseUnavailable")}),t[36]=r?.usageUnavailable,t[37]=e,t[38]=O):O=t[38],s.jsxs("div",{className:"flex flex-col gap-8",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-4",children:[P,s.jsxs(be,{value:a,onValueChange:d,children:[E,s.jsx(ve,{children:i.map(ze)})]})]}),z,q,O,x.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(W,{title:e("settings.infraBilling.summaryTitle"),children:s.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 px-4",children:[s.jsxs(T,{className:"flex-1 flex flex-col gap-4 p-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(he,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:e("settings.infraBilling.detailsTitle")})]}),U&&D?.canManageSubscription&&s.jsx(J,{variant:"outline",size:"sm",disabled:h.isPending,onClick:()=>h.mutate(U.siteSlugs),children:e("settings.infraBilling.manageButton")})]}),s.jsxs("div",{className:"flex flex-col gap-2 text-sm",children:[D?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.currentPlan")}),p?s.jsx(V,{className:"h-5 w-16"}):s.jsx(L,{variant:D.planType==="free"?"secondary":"success",children:e(`settings.infraBilling.plan.${D.planType}`)})]}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:D.nextBillingDate?ee(D.nextBillingDate):"—"})]})]}):!p&&s.jsx("p",{className:"text-xs text-muted-foreground",children:ge}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.requestsPerPageview")}),s.jsx("span",{className:"font-medium tabular-nums",children:me})]})]})]}),y.map(c=>s.jsxs(T,{className:"flex-1 flex flex-col gap-2 p-4",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:c.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:i.find(w=>w.value===a)?.label})]}),p?s.jsx(V,{className:"h-8 w-24"}):s.jsx("span",{className:"text-2xl font-semibold tabular-nums",children:c.total}),s.jsx("div",{className:"-mx-2",children:s.jsx(ae,{usage:u,metric:c.key,colorNum:c.colorNum,formatValue:N(c.key),height:64})})]},c.key))]})}),s.jsx(W,{title:e("settings.infraBilling.metricsTitle"),children:s.jsx("div",{className:"flex flex-col xl:flex-row gap-4 px-4",children:y.map(c=>s.jsxs(T,{className:"flex-1 flex flex-col gap-3 p-4",children:[s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-sm font-medium",children:c.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:c.description})]}),s.jsx(ae,{usage:u,metric:c.key,colorNum:c.colorNum,formatValue:N(c.key),height:220})]},c.key))})}),s.jsx(W,{title:e("settings.infraBilling.invoicesTitle"),children:s.jsx("div",{className:"flex flex-col gap-4 px-4",children:r?r.billingUnavailable?s.jsx(T,{className:"p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.billingUnavailable")}):s.jsxs(s.Fragment,{children:[S.map(c=>s.jsx(Ge,{team:c,showSites:te},c.siteSlugs.join(","))),K.length>0&&s.jsxs(T,{className:"flex flex-col gap-1 p-4",children:[te&&s.jsx("span",{className:"text-sm font-medium",children:K.join(", ")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e("settings.infraBilling.noTeam")})]})]}):s.jsx(T,{size:"flush",children:s.jsx(V,{className:"m-4 h-24"})})})})]})]})}function ze(t){return s.jsx(Be,{value:t.value,children:t.label},t.value)}function qe(t){return{label:t,value:t}}function Oe(t){return t==="dataTransferBytes"?oe:Ve}function Ve(t){return Q.format(t)}function Ze(t){return Q.format(t)}function fe(t,e){return t.unavailableReason==="partial_team"?e("settings.infraBilling.partialTeam"):e("settings.infraBilling.billingUnavailable")}function Ge(t){const e=k.c(13),{team:n,showSites:l}=t,o=G(),f=re(),i=n.billing;let a;e[0]!==i||e[1]!==f||e[2]!==l||e[3]!==o||e[4]!==n.siteSlugs?(a=l&&s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border p-4",children:[s.jsx("span",{className:"text-sm font-medium",children:n.siteSlugs.join(", ")}),i&&s.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[s.jsx(L,{variant:i.planType==="free"?"secondary":"success",children:o(`settings.infraBilling.plan.${i.planType}`)}),i.nextBillingDate&&s.jsxs("span",{className:"flex gap-1.5",children:[s.jsx("span",{className:"text-muted-foreground",children:o("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:ee(i.nextBillingDate)})]}),i.canManageSubscription&&s.jsx(J,{variant:"outline",size:"sm",disabled:f.isPending,onClick:()=>f.mutate(n.siteSlugs),children:o("settings.infraBilling.manageButton")})]})]}),e[0]=i,e[1]=f,e[2]=l,e[3]=o,e[4]=n.siteSlugs,e[5]=a):a=e[5];let d;e[6]!==i||e[7]!==o||e[8]!==n?(d=i?i.invoices.length===0?s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:o("settings.infraBilling.noInvoices")}):s.jsx(Ke,{invoices:i.invoices}):s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:fe(n,o)}),e[6]=i,e[7]=o,e[8]=n,e[9]=d):d=e[9];let g;return e[10]!==a||e[11]!==d?(g=s.jsxs(T,{size:"flush",className:"gap-0 overflow-x-auto",children:[a,d]}),e[10]=a,e[11]=d,e[12]=g):g=e[12],g}function Ke(t){const e=k.c(40),{invoices:n}=t,l=G();let o;e[0]!==n?(o=n.some(Ye),e[0]=n,e[1]=o):o=e[1];const f=o;let i;e[2]!==l?(i=l("settings.infraBilling.invoiceReference"),e[2]=l,e[3]=i):i=e[3];let a;e[4]!==i?(a=s.jsx($,{children:i}),e[4]=i,e[5]=a):a=e[5];let d;e[6]!==l?(d=l("settings.infraBilling.invoiceDue"),e[6]=l,e[7]=d):d=e[7];let g;e[8]!==d?(g=s.jsx($,{children:d}),e[8]=d,e[9]=g):g=e[9];let x;e[10]!==l?(x=l("settings.infraBilling.invoiceAmount"),e[10]=l,e[11]=x):x=e[11];let b;e[12]!==x?(b=s.jsx($,{children:x}),e[12]=x,e[13]=b):b=e[13];let r;e[14]!==l?(r=l("settings.infraBilling.invoiceStatus"),e[14]=l,e[15]=r):r=e[15];let p;e[16]!==r?(p=s.jsx($,{children:r}),e[16]=r,e[17]=p):p=e[17];let h;e[18]!==l?(h=l("settings.infraBilling.invoiceDocuments"),e[18]=l,e[19]=h):h=e[19];let u;e[20]!==h?(u=s.jsx($,{children:h}),e[20]=h,e[21]=u):u=e[21];let B;e[22]!==u||e[23]!==a||e[24]!==g||e[25]!==b||e[26]!==p?(B=s.jsx(ye,{children:s.jsxs(ie,{children:[a,g,b,p,u]})}),e[22]=u,e[23]=a,e[24]=g,e[25]=b,e[26]=p,e[27]=B):B=e[27];let v;if(e[28]!==n||e[29]!==l||e[30]!==f){let N;e[32]!==l||e[33]!==f?(N=m=>s.jsxs(ie,{children:[s.jsx(F,{children:m.referenceMonth?ce(m.referenceMonth).toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"}):"—"}),s.jsx(F,{children:m.dueDate?ee(m.dueDate):"—"}),s.jsx(F,{className:"tabular-nums",children:Fe.format(m.value)}),s.jsx(F,{children:s.jsx(We,{status:m.status})}),s.jsxs(F,{className:"flex gap-2",children:[m.nfUrl&&s.jsx(H,{href:m.nfUrl,label:l("settings.infraBilling.invoiceNf")}),m.bankSlipUrl&&s.jsx(H,{href:m.bankSlipUrl,label:l("settings.infraBilling.invoiceBankSlip")}),!m.bankSlipUrl&&!f&&m.nfUrl&&s.jsx(H,{href:$e,label:l("settings.infraBilling.invoiceBankTransfer")}),!m.nfUrl&&!m.bankSlipUrl&&"—"]})]},m.id),e[32]=l,e[33]=f,e[34]=N):N=e[34],v=n.map(N),e[28]=n,e[29]=l,e[30]=f,e[31]=v}else v=e[31];let j;e[35]!==v?(j=s.jsx(Te,{children:v}),e[35]=v,e[36]=j):j=e[36];let y;return e[37]!==B||e[38]!==j?(y=s.jsxs(we,{children:[B,j]}),e[37]=B,e[38]=j,e[39]=y):y=e[39],y}function Ye(t){return!!t.bankSlipUrl}function H(t){const e=k.c(4),{href:n,label:l}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(pe,{size:14}),e[0]=o):o=e[0];let f;return e[1]!==n||e[2]!==l?(f=s.jsx(J,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",children:[o,l]})}),e[1]=n,e[2]=l,e[3]=f):f=e[3],f}function We(t){const e=k.c(14),{status:n}=t,l=G(),o=n.toLowerCase();if(o==="paid"){let i;e[0]!==l?(i=l("settings.infraBilling.statusPaid"),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==i?(a=s.jsx(L,{variant:"success",children:i}),e[2]=i,e[3]=a):a=e[3],a}if(o==="overdue"){let i;e[4]!==l?(i=l("settings.infraBilling.statusOverdue"),e[4]=l,e[5]=i):i=e[5];let a;return e[6]!==i?(a=s.jsx(L,{variant:"destructive",children:i}),e[6]=i,e[7]=a):a=e[7],a}if(o==="registered"){let i;e[8]!==l?(i=l("settings.infraBilling.statusPending"),e[8]=l,e[9]=i):i=e[9];let a;return e[10]!==i?(a=s.jsx(L,{variant:"warning",children:i}),e[10]=i,e[11]=a):a=e[11],a}let f;return e[12]!==n?(f=s.jsx(L,{variant:"secondary",children:n}),e[12]=n,e[13]=f):f=e[13],f}function Xe(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(de,{group:"billing",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}function Bt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Le,{capability:"members:manage",area:"billing",children:s.jsx(Xe,{})}),t[0]=e):e=t[0],e}export{Bt as default};
|
|
1
|
+
import{c as k,j as s,i9 as de,b as G,ia as ue,r as le,ib as xe,ic as re,gK as T,gZ as W,B as J,e3 as V,a9 as pe}from"./index-FRxLT_js.js";import{i as he}from"./CreditCard01-CYAMo28t.js";import{B as L}from"./badge-CFiK0EOx.js";import{M as je}from"./multi-select-DuNPPMuZ.js";import{S as be,d as ve,c as Be,a as Ne,b as Se}from"./select-D5aPAOxI.js";import{T as $,a as ye,b as ie,c as F,d as Te,e as we}from"./table-DdZpQzqo.js";import{C as ke,X as Ue,Y as Ce}from"./CartesianChart-BLh4dFJB.js";import{T as De}from"./Tooltip-BDg85pZn.js";import{a as _e,A as Me}from"./AreaChart-6i9ddKAo.js";import{c8 as Re}from"./CategoricalChart-CwzUkCwO.js";import{R as Le}from"./require-capability-BtI4Tyqp.js";import"./checkbox-DR7-Iy_E.js";import"./Minus-DjGZhteG.js";import"./ChevronDown-BkddO6nk.js";import"./command-Cqqhh_W6.js";import"./index-CdR9qfQl.js";import"./SearchMd-B2ZqlWzx.js";import"./popover-BI-lpUhu.js";import"./index-BdQq_4o_.js";import"./index-D9pnpNHk.js";import"./ChevronUp-hmtO7NfN.js";import"./index-xNvvPF5K.js";import"./access-gate-JiR82oco.js";import"./capability-load-error-C7VfNWgD.js";const Q=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1}),ne=["B","KB","MB","GB","TB","PB"];function oe(t){if(t<=0)return"0 B";const e=Math.min(ne.length-1,Math.floor(Math.log(t)/Math.log(1024))),n=t/1024**e;return`${n.toFixed(n>=100||e===0?0:1)} ${ne[e]}`}const X=50,$e="https://assets.decocache.com/decocms/45f9e905-046b-4aeb-8420-0377a7d0d041/deco_Transferencia.pdf",Fe=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"});function ce(t){return new Date(`${t.slice(0,10)}T00:00:00Z`)}function ee(t){return ce(t).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"})}function Ie(){const t=new Date;return Array.from({length:12},(e,n)=>{const l=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()-n,1));return{value:l.toISOString().slice(0,10),label:l.toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"})}})}function Pe(t){return new Date(`${t}T00:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"})}function ae(t){const e=k.c(30),{usage:n,metric:l,colorNum:o,formatValue:f,height:i}=t,a=`var(--chart-${o})`,d=`infra-billing-${l}`;let g;e[0]!==n?(g=n.map(Ae),e[0]=n,e[1]=g):g=e[1];const x=g;let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b={left:0,right:4,top:8,bottom:0},e[2]=b):b=e[2];let r,p;e[3]!==a?(r=s.jsx("stop",{offset:"0%",stopColor:a,stopOpacity:.25}),p=s.jsx("stop",{offset:"100%",stopColor:a,stopOpacity:0}),e[3]=a,e[4]=r,e[5]=p):(r=e[4],p=e[5]);let h;e[6]!==d||e[7]!==r||e[8]!==p?(h=s.jsx("defs",{children:s.jsxs("linearGradient",{id:d,x1:"0",y1:"0",x2:"0",y2:"1",children:[r,p]})}),e[6]=d,e[7]=r,e[8]=p,e[9]=h):h=e[9];let u;e[10]!==f||e[11]!==i?(u=i>100&&s.jsxs(s.Fragment,{children:[s.jsx(ke,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(Ue,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},interval:"preserveStartEnd",tickMargin:8}),s.jsx(Ce,{orientation:"right",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},tickFormatter:f,width:68})]}),e[10]=f,e[11]=i,e[12]=u):u=e[12];let B,v;e[13]===Symbol.for("react.memo_cache_sentinel")?(B={stroke:"var(--border)",strokeDasharray:"4 4"},v={background:"var(--background)",border:"1px solid var(--border)",borderRadius:8,fontSize:12},e[13]=B,e[14]=v):(B=e[13],v=e[14]);let j;e[15]!==f?(j=s.jsx(De,{cursor:B,contentStyle:v,formatter:C=>f(Number(C)||0)}),e[15]=f,e[16]=j):j=e[16];const y=`url(#${d})`;let N;e[17]!==a||e[18]!==l||e[19]!==y?(N=s.jsx(_e,{type:"linear",dataKey:l,stroke:a,strokeWidth:2,fill:y,dot:!1}),e[17]=a,e[18]=l,e[19]=y,e[20]=N):N=e[20];let m;e[21]!==x||e[22]!==N||e[23]!==h||e[24]!==u||e[25]!==j?(m=s.jsxs(Me,{data:x,margin:b,children:[h,u,j,N]}),e[21]=x,e[22]=N,e[23]=h,e[24]=u,e[25]=j,e[26]=m):m=e[26];let S;return e[27]!==i||e[28]!==m?(S=s.jsx(Re,{width:"100%",height:i,children:m}),e[27]=i,e[28]=m,e[29]=S):S=e[29],S}function Ae(t){return{...t,label:Pe(t.date)}}function Z(t,e){return t.reduce((n,l)=>n+l[e],0)}function Ee(){const t=k.c(39),e=G(),{sites:n,isLoading:l}=ue(),[o,f]=le.useState(null),i=Ie(),[a,d]=le.useState(i[0].value);let g;t[0]!==o||t[1]!==n?(g=o??n.slice(0,X),t[0]=o,t[1]=n,t[2]=g):g=t[2];const x=g,b=!o&&n.length>X,{data:r,isLoading:p}=xe(x,a),h=re();if(l){let c;return t[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(V,{className:"h-64 w-full"}),t[3]=c):c=t[3],c}if(n.length===0){let c;t[4]!==e?(c=e("settings.infraBilling.noSites"),t[4]=e,t[5]=c):c=t[5];let w;return t[6]!==c?(w=s.jsx(T,{className:"p-6 text-sm text-muted-foreground",children:c}),t[6]=c,t[7]=w):w=t[7],w}const u=r?.usage??[],B=r?.pageviewsAvailable??!1,v=!!r&&!r.usageUnavailable,j=(c,w)=>v?w(Z(u,c)):"—",y=[{key:"pageviews",title:e("settings.infraBilling.pageviews"),description:e("settings.infraBilling.pageviewsDescription"),colorNum:1,total:B&&v?Q.format(Z(u,"pageviews")):"—"},{key:"requests",title:e("settings.infraBilling.requests"),description:e("settings.infraBilling.requestsDescription"),colorNum:2,total:j("requests",Ze)},{key:"dataTransferBytes",title:e("settings.infraBilling.dataTransfer"),description:e("settings.infraBilling.dataTransferDescription"),colorNum:3,total:j("dataTransferBytes",oe)}],N=Oe;let m;t[8]!==r?.teams?(m=r?.teams??[],t[8]=r?.teams,t[9]=m):m=t[9];const S=m;let C;t[10]!==r?.siteSlugsWithoutTeam?(C=r?.siteSlugsWithoutTeam??[],t[10]=r?.siteSlugsWithoutTeam,t[11]=C):C=t[11];const K=C,U=S.length===1?S[0]:void 0,D=U?.billing??null,te=S.length+(K.length>0?1:0)>1,Y=Z(u,"pageviews"),se=Y>0?Z(u,"requests")/Y:0,me=B&&v&&Y>0?se.toFixed(se<10?1:0):"—";let I;t[12]!==r?.billingUnavailable||t[13]!==U||t[14]!==e||t[15]!==S.length?(I=r?.billingUnavailable?e("settings.infraBilling.billingUnavailable"):S.length>1?e("settings.infraBilling.multipleTeams",{count:String(S.length)}):U?fe(U,e):e("settings.infraBilling.noTeam"),t[12]=r?.billingUnavailable,t[13]=U,t[14]=e,t[15]=S.length,t[16]=I):I=t[16];const ge=I;let _;t[17]!==n?(_=n.map(qe),t[17]=n,t[18]=_):_=t[18];let M;t[19]!==e?(M=e("settings.infraBilling.siteLabel"),t[19]=e,t[20]=M):M=t[20];let P;t[21]!==x||t[22]!==_||t[23]!==M?(P=s.jsx(je,{className:"w-auto min-w-56 max-w-full",options:_,defaultValue:x,maxCount:2,placeholder:M,onValueChange:f}),t[21]=x,t[22]=_,t[23]=M,t[24]=P):P=t[24];let R;t[25]!==e?(R=e("settings.infraBilling.monthLabel"),t[25]=e,t[26]=R):R=t[26];let A;t[27]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ne,{}),t[27]=A):A=t[27];let E;t[28]!==R?(E=s.jsx(Se,{className:"w-48","aria-label":R,children:A}),t[28]=R,t[29]=E):E=t[29];let z;t[30]!==x.length||t[31]!==e?(z=x.length===0&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.pickASite")}),t[30]=x.length,t[31]=e,t[32]=z):z=t[32];let q;t[33]!==e||t[34]!==b?(q=b&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.tooManySites",{count:String(X)})}),t[33]=e,t[34]=b,t[35]=q):q=t[35];let O;return t[36]!==r?.usageUnavailable||t[37]!==e?(O=r?.usageUnavailable&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.warehouseUnavailable")}),t[36]=r?.usageUnavailable,t[37]=e,t[38]=O):O=t[38],s.jsxs("div",{className:"flex flex-col gap-8",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-4",children:[P,s.jsxs(be,{value:a,onValueChange:d,children:[E,s.jsx(ve,{children:i.map(ze)})]})]}),z,q,O,x.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(W,{title:e("settings.infraBilling.summaryTitle"),children:s.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 px-4",children:[s.jsxs(T,{className:"flex-1 flex flex-col gap-4 p-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(he,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:e("settings.infraBilling.detailsTitle")})]}),U&&D?.canManageSubscription&&s.jsx(J,{variant:"outline",size:"sm",disabled:h.isPending,onClick:()=>h.mutate(U.siteSlugs),children:e("settings.infraBilling.manageButton")})]}),s.jsxs("div",{className:"flex flex-col gap-2 text-sm",children:[D?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.currentPlan")}),p?s.jsx(V,{className:"h-5 w-16"}):s.jsx(L,{variant:D.planType==="free"?"secondary":"success",children:e(`settings.infraBilling.plan.${D.planType}`)})]}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:D.nextBillingDate?ee(D.nextBillingDate):"—"})]})]}):!p&&s.jsx("p",{className:"text-xs text-muted-foreground",children:ge}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.requestsPerPageview")}),s.jsx("span",{className:"font-medium tabular-nums",children:me})]})]})]}),y.map(c=>s.jsxs(T,{className:"flex-1 flex flex-col gap-2 p-4",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:c.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:i.find(w=>w.value===a)?.label})]}),p?s.jsx(V,{className:"h-8 w-24"}):s.jsx("span",{className:"text-2xl font-semibold tabular-nums",children:c.total}),s.jsx("div",{className:"-mx-2",children:s.jsx(ae,{usage:u,metric:c.key,colorNum:c.colorNum,formatValue:N(c.key),height:64})})]},c.key))]})}),s.jsx(W,{title:e("settings.infraBilling.metricsTitle"),children:s.jsx("div",{className:"flex flex-col xl:flex-row gap-4 px-4",children:y.map(c=>s.jsxs(T,{className:"flex-1 flex flex-col gap-3 p-4",children:[s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-sm font-medium",children:c.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:c.description})]}),s.jsx(ae,{usage:u,metric:c.key,colorNum:c.colorNum,formatValue:N(c.key),height:220})]},c.key))})}),s.jsx(W,{title:e("settings.infraBilling.invoicesTitle"),children:s.jsx("div",{className:"flex flex-col gap-4 px-4",children:r?r.billingUnavailable?s.jsx(T,{className:"p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.billingUnavailable")}):s.jsxs(s.Fragment,{children:[S.map(c=>s.jsx(Ge,{team:c,showSites:te},c.siteSlugs.join(","))),K.length>0&&s.jsxs(T,{className:"flex flex-col gap-1 p-4",children:[te&&s.jsx("span",{className:"text-sm font-medium",children:K.join(", ")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e("settings.infraBilling.noTeam")})]})]}):s.jsx(T,{size:"flush",children:s.jsx(V,{className:"m-4 h-24"})})})})]})]})}function ze(t){return s.jsx(Be,{value:t.value,children:t.label},t.value)}function qe(t){return{label:t,value:t}}function Oe(t){return t==="dataTransferBytes"?oe:Ve}function Ve(t){return Q.format(t)}function Ze(t){return Q.format(t)}function fe(t,e){return t.unavailableReason==="partial_team"?e("settings.infraBilling.partialTeam"):e("settings.infraBilling.billingUnavailable")}function Ge(t){const e=k.c(13),{team:n,showSites:l}=t,o=G(),f=re(),i=n.billing;let a;e[0]!==i||e[1]!==f||e[2]!==l||e[3]!==o||e[4]!==n.siteSlugs?(a=l&&s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border p-4",children:[s.jsx("span",{className:"text-sm font-medium",children:n.siteSlugs.join(", ")}),i&&s.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[s.jsx(L,{variant:i.planType==="free"?"secondary":"success",children:o(`settings.infraBilling.plan.${i.planType}`)}),i.nextBillingDate&&s.jsxs("span",{className:"flex gap-1.5",children:[s.jsx("span",{className:"text-muted-foreground",children:o("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:ee(i.nextBillingDate)})]}),i.canManageSubscription&&s.jsx(J,{variant:"outline",size:"sm",disabled:f.isPending,onClick:()=>f.mutate(n.siteSlugs),children:o("settings.infraBilling.manageButton")})]})]}),e[0]=i,e[1]=f,e[2]=l,e[3]=o,e[4]=n.siteSlugs,e[5]=a):a=e[5];let d;e[6]!==i||e[7]!==o||e[8]!==n?(d=i?i.invoices.length===0?s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:o("settings.infraBilling.noInvoices")}):s.jsx(Ke,{invoices:i.invoices}):s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:fe(n,o)}),e[6]=i,e[7]=o,e[8]=n,e[9]=d):d=e[9];let g;return e[10]!==a||e[11]!==d?(g=s.jsxs(T,{size:"flush",className:"gap-0 overflow-x-auto",children:[a,d]}),e[10]=a,e[11]=d,e[12]=g):g=e[12],g}function Ke(t){const e=k.c(40),{invoices:n}=t,l=G();let o;e[0]!==n?(o=n.some(Ye),e[0]=n,e[1]=o):o=e[1];const f=o;let i;e[2]!==l?(i=l("settings.infraBilling.invoiceReference"),e[2]=l,e[3]=i):i=e[3];let a;e[4]!==i?(a=s.jsx($,{children:i}),e[4]=i,e[5]=a):a=e[5];let d;e[6]!==l?(d=l("settings.infraBilling.invoiceDue"),e[6]=l,e[7]=d):d=e[7];let g;e[8]!==d?(g=s.jsx($,{children:d}),e[8]=d,e[9]=g):g=e[9];let x;e[10]!==l?(x=l("settings.infraBilling.invoiceAmount"),e[10]=l,e[11]=x):x=e[11];let b;e[12]!==x?(b=s.jsx($,{children:x}),e[12]=x,e[13]=b):b=e[13];let r;e[14]!==l?(r=l("settings.infraBilling.invoiceStatus"),e[14]=l,e[15]=r):r=e[15];let p;e[16]!==r?(p=s.jsx($,{children:r}),e[16]=r,e[17]=p):p=e[17];let h;e[18]!==l?(h=l("settings.infraBilling.invoiceDocuments"),e[18]=l,e[19]=h):h=e[19];let u;e[20]!==h?(u=s.jsx($,{children:h}),e[20]=h,e[21]=u):u=e[21];let B;e[22]!==u||e[23]!==a||e[24]!==g||e[25]!==b||e[26]!==p?(B=s.jsx(ye,{children:s.jsxs(ie,{children:[a,g,b,p,u]})}),e[22]=u,e[23]=a,e[24]=g,e[25]=b,e[26]=p,e[27]=B):B=e[27];let v;if(e[28]!==n||e[29]!==l||e[30]!==f){let N;e[32]!==l||e[33]!==f?(N=m=>s.jsxs(ie,{children:[s.jsx(F,{children:m.referenceMonth?ce(m.referenceMonth).toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"}):"—"}),s.jsx(F,{children:m.dueDate?ee(m.dueDate):"—"}),s.jsx(F,{className:"tabular-nums",children:Fe.format(m.value)}),s.jsx(F,{children:s.jsx(We,{status:m.status})}),s.jsxs(F,{className:"flex gap-2",children:[m.nfUrl&&s.jsx(H,{href:m.nfUrl,label:l("settings.infraBilling.invoiceNf")}),m.bankSlipUrl&&s.jsx(H,{href:m.bankSlipUrl,label:l("settings.infraBilling.invoiceBankSlip")}),!m.bankSlipUrl&&!f&&m.nfUrl&&s.jsx(H,{href:$e,label:l("settings.infraBilling.invoiceBankTransfer")}),!m.nfUrl&&!m.bankSlipUrl&&"—"]})]},m.id),e[32]=l,e[33]=f,e[34]=N):N=e[34],v=n.map(N),e[28]=n,e[29]=l,e[30]=f,e[31]=v}else v=e[31];let j;e[35]!==v?(j=s.jsx(Te,{children:v}),e[35]=v,e[36]=j):j=e[36];let y;return e[37]!==B||e[38]!==j?(y=s.jsxs(we,{children:[B,j]}),e[37]=B,e[38]=j,e[39]=y):y=e[39],y}function Ye(t){return!!t.bankSlipUrl}function H(t){const e=k.c(4),{href:n,label:l}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(pe,{size:14}),e[0]=o):o=e[0];let f;return e[1]!==n||e[2]!==l?(f=s.jsx(J,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",children:[o,l]})}),e[1]=n,e[2]=l,e[3]=f):f=e[3],f}function We(t){const e=k.c(14),{status:n}=t,l=G(),o=n.toLowerCase();if(o==="paid"){let i;e[0]!==l?(i=l("settings.infraBilling.statusPaid"),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==i?(a=s.jsx(L,{variant:"success",children:i}),e[2]=i,e[3]=a):a=e[3],a}if(o==="overdue"){let i;e[4]!==l?(i=l("settings.infraBilling.statusOverdue"),e[4]=l,e[5]=i):i=e[5];let a;return e[6]!==i?(a=s.jsx(L,{variant:"destructive",children:i}),e[6]=i,e[7]=a):a=e[7],a}if(o==="registered"){let i;e[8]!==l?(i=l("settings.infraBilling.statusPending"),e[8]=l,e[9]=i):i=e[9];let a;return e[10]!==i?(a=s.jsx(L,{variant:"warning",children:i}),e[10]=i,e[11]=a):a=e[11],a}let f;return e[12]!==n?(f=s.jsx(L,{variant:"secondary",children:n}),e[12]=n,e[13]=f):f=e[13],f}function Xe(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(de,{group:"billing",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}function Bt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Le,{capability:"members:manage",area:"billing",children:s.jsx(Xe,{})}),t[0]=e):e=t[0],e}export{Bt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B,r as S,b as G,j as h,t as A,a7 as ye,x as xe,aW as we,w as ke,B as be,v as Ce,D as Se,q as le,a6 as ce,K as Y,E as Q,gp as ue,gq as re,gr as H,m as _e}from"./index-DNY1LCEV.js";import{S as de,s as Pe}from"./suggestion-6kwzt7Yb.js";import{O as Fe,v as Ie,B as De,q as z,Q as ve,P as ne,U as je,k as Me,a as Ee,V as Le,p as Re,C as Ae,l as Ne,n as Te,F as Qe,E as Oe}from"./usage-stats-PE4G0CeB.js";import{aK as Ue}from"./agent-icon-zKGrqypc.js";import"./chat-context-DHSww0cO.js";import{m as $e,i as qe,b as Ke}from"./index-cHqyigDN.js";import{u as me}from"./use-mcp-client-XSpKurXu.js";import{u as He}from"./repository-binding-0rqv5CYu.js";import{g as se,a as fe}from"./gateway-client-BXoRIC2f.js";import{l as oe,g as pe}from"./use-mcp-prompts-Bs2ZYPMm.js";import{f as ze,b as Be}from"./use-org-fs-B4WWFHbJ.js";async function Je(t,e,r,s,i,o){if(!$e(e)){A.error("Selected model does not support file uploads");return}const l=r.type||"application/octet-stream";if(!qe(l,e)){const g=Ke(e).parts.map(m=>o(m)).join(", "),w=e?.title??"This model";i?i({fileName:r.name,modelName:w,accepted:g}):A.error(`"${r.name}" can't be attached`,{description:`${w} accepts ${g}.`});return}const c=10*1024*1024;if(r.size>c){A.error(`File "${r.name}" exceeds 10MB limit`);return}try{const g=new FileReader,w=new Promise((n,u)=>{g.onload=()=>{const d=g.result;if(typeof d!="string"){u(new Error("Failed to read file as data URL"));return}const b=d.includes(",")?d.split(",")[1]??d:d;n(b)},g.onerror=u});g.readAsDataURL(r);const m=await w,p={id:crypto.randomUUID(),name:r.name,mimeType:r.type||"application/octet-stream",size:r.size,data:m};Fe(t,{from:s,to:s},p)}catch(g){console.error("Failed to process file:",g),A.error(`Failed to load file "${r.name}"`)}}function Ve(t,e,r,s){if(r)return!1;const i=e.dataTransfer?.files;if(!i||i.length===0)return!1;const o=t.posAtCoords({left:e.clientX,top:e.clientY});if(!o)return!1;e.preventDefault();const l=Array.from(i);return(async()=>{let c=o.pos;for(const g of l)await s(g,c),c=t.state.selection.to})(),!0}function We(t){const e=B.c(9),{editor:r,selectedModel:s,onUnsupportedFile:i}=t,o=G(),l=S.useRef(Ye);let c,g;e[0]!==r||e[1]!==i||e[2]!==s||e[3]!==o?(c=()=>{l.current=async(p,n)=>{await Je(r,s,p,n,i,o)}},g=[r,s,i,o],e[0]=r,e[1]=i,e[2]=s,e[3]=o,e[4]=c,e[5]=g):(c=e[4],g=e[5]),S.useEffect(c,g);let w,m;return e[6]!==r?(w=()=>{if(r?.isDestroyed)return;const p=new Ie("fileDropHandler");r.state.plugins.find(d=>d.spec.key===p)&&r.unregisterPlugin(p);const u=new De({key:p,props:{handleDrop:(d,b,F,P)=>Ve(d,b,P,(_,v)=>l.current(_,v)),handlePaste:(d,b)=>{const F=b.clipboardData?.items;if(!F)return!1;const P=Array.from(F).filter(Xe);return P.length===0?!1:(b.preventDefault(),(async()=>{let _=d.state.selection.from;for(const v of P){const D=v.getAsFile();D&&(await l.current?.(D,_),_=d.state.selection.to)}})(),!0)}}});return r.registerPlugin(u),()=>{r?.isDestroyed||r.unregisterPlugin(p)}},m=[r],e[6]=r,e[7]=w,e[8]=m):(w=e[7],m=e[8]),S.useEffect(w,m),null}function Xe(t){return t.kind==="file"}function Ye(){return Promise.resolve()}function Ct(t){const e=B.c(43),{info:r,onClose:s}=t,i=G(),o=r!==null;let l;e[0]!==s?(l=j=>!j&&s(),e[0]=s,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(251,191,36,0.35) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(244,114,182,0.25) 0%, transparent 100%)"],e[2]=c):c=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=h.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:c.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=g):g=e[3];let w;e[4]===Symbol.for("react.memo_cache_sentinel")?(w=h.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:h.jsx(ye,{size:18})}),e[4]=w):w=e[4];let m;e[5]!==i?(m=i("chat.uploader.fileTypeNotSupported"),e[5]=i,e[6]=m):m=e[6];let p;e[7]!==m?(p=h.jsx(xe,{className:"text-xl font-semibold tracking-tight",children:m}),e[7]=m,e[8]=p):p=e[8];const n=r?.fileName;let u;e[9]!==n?(u=h.jsxs("span",{className:"font-medium text-foreground",children:["“",n,"”"]}),e[9]=n,e[10]=u):u=e[10];let d;e[11]!==i?(d=i("chat.uploader.cantAttachToChat"),e[11]=i,e[12]=d):d=e[12];let b;e[13]!==d||e[14]!==u?(b=h.jsxs(we,{className:"mt-1.5 text-sm leading-relaxed",children:[u," ",d]}),e[13]=d,e[14]=u,e[15]=b):b=e[15];let F;e[16]!==b||e[17]!==p?(F=h.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[g,h.jsxs(ke,{className:"relative gap-4",children:[w,h.jsxs("div",{children:[p,b]})]})]}),e[16]=b,e[17]=p,e[18]=F):F=e[18];const P=r?.modelName??"";let _;e[19]!==i||e[20]!==P?(_=i("chat.uploader.accepts",{modelName:P}),e[19]=i,e[20]=P,e[21]=_):_=e[21];let v;e[22]!==_?(v=h.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:_}),e[22]=_,e[23]=v):v=e[23];let D;e[24]===Symbol.for("react.memo_cache_sentinel")?(D=h.jsx(Ue,{size:14,className:"text-muted-foreground"}),e[24]=D):D=e[24];const E=r?.accepted;let I;e[25]!==E?(I=h.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[D,h.jsx("span",{className:"capitalize",children:E})]}),e[25]=E,e[26]=I):I=e[26];let a;e[27]!==v||e[28]!==I?(a=h.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:h.jsxs("div",{className:"surface p-4",children:[v,I]})}),e[27]=v,e[28]=I,e[29]=a):a=e[29];let f;e[30]!==i?(f=i("chat.uploader.gotIt"),e[30]=i,e[31]=f):f=e[31];let x;e[32]!==s||e[33]!==f?(x=h.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:h.jsx(be,{onClick:s,children:f})}),e[32]=s,e[33]=f,e[34]=x):x=e[34];let C;e[35]!==F||e[36]!==a||e[37]!==x?(C=h.jsxs(Ce,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ge,children:[F,a,x]}),e[35]=F,e[36]=a,e[37]=x,e[38]=C):C=e[38];let M;return e[39]!==o||e[40]!==l||e[41]!==C?(M=h.jsx(Se,{open:o,onOpenChange:l,children:C}),e[39]=o,e[40]=l,e[41]=C,e[42]=M):M=e[42],M}function Ge(t){return t.preventDefault()}function St(){const t=B.c(3),[e,r]=S.useState(null);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>r(null),t[0]=s):s=t[0];let i;return t[1]!==e?(i={unsupportedFile:e,onUnsupportedFile:r,clearUnsupportedFile:s},t[1]=e,t[2]=i):i=t[2],i}function he(t,e){return e||t}const Ze=t=>{const e=B.c(50),{editor:r,virtualMcpId:s,suggestionOpenRef:i}=t,o=G(),l=le(),{org:c}=ce(),g=He();let w;e[0]!==c.id||e[1]!==c.slug||e[2]!==s?(w={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=c.id,e[1]=c.slug,e[2]=s,e[3]=w):w=e[3];const m=me(w);let p;e[4]!==c.id||e[5]!==s?(p=Y.virtualMcpResources(s,c.id),e[4]=c.id,e[5]=s,e[6]=p):p=e[6];const n=p,[u,d]=S.useState("categories");let b;e[7]!==u?(b=()=>u,e[7]=u,e[8]=b):b=e[8];const F=S.useEffectEvent(b),P=S.useRef(null),_=S.useRef(!1),v=s??"default";let D;e[9]!==u||e[10]!==c.id||e[11]!==v?(D=["at-mention",c.id,v,u],e[9]=u,e[10]=c.id,e[11]=v,e[12]=D):D=e[12];const E=D;let I;e[13]!==o?(I=o("chat.mentionAt.agentsTitle"),e[13]=o,e[14]=I):I=e[14];let a;e[15]!==o?(a=o("chat.mentionAt.agentsDescription"),e[15]=o,e[16]=a):a=e[16];let f;e[17]!==I||e[18]!==a?(f={name:"agents",title:I,description:a,kind:"category",drillable:!0},e[17]=I,e[18]=a,e[19]=f):f=e[19];let x;e[20]!==o?(x=o("chat.mentionAt.resourcesTitle"),e[20]=o,e[21]=x):x=e[21];let C;e[22]!==o?(C=o("chat.mentionAt.resourcesDescription"),e[22]=o,e[23]=C):C=e[23];let M;e[24]!==C||e[25]!==x?(M={name:"resources",title:x,description:C,kind:"category",drillable:!0},e[24]=C,e[25]=x,e[26]=M):M=e[26];let j;e[27]!==M||e[28]!==f?(j=[f,M],e[27]=M,e[28]=f,e[29]=j):j=e[29];const $=j;let O;e[30]!==m||e[31]!==r||e[32]!==o?(O=async U=>{const{item:k,range:K}=U;if(Q("chat_picker_item_selected",{picker:"@",item_kind:k.kind,item_name:k.name}),k.kind!=="category"&&(_.current=!0),k.kind==="category")return d(k.name==="agents"?"agents":"resources"),!1;if(k.kind==="agent"&&k.agentId){z(r,K,{id:k.agentId,name:k.name,metadata:{agentId:k.agentId,title:k.name},char:"@"}),d("categories");return}if(k.kind==="resource"&&k.uri&&m){try{const T=await ue(m,k.uri);z(r,K,{id:k.uri,name:k.uri,metadata:T.contents,char:"@"})}catch(T){console.error("[at-mention] Failed to fetch resource:",T),A.error(o("chat.mentionAt.failedToLoadResource"))}d("categories");return}},e[30]=m,e[31]=r,e[32]=o,e[33]=O):O=e[33];const q=O;let y;e[34]!==g||e[35]!==$||e[36]!==m||e[37]!==F||e[38]!==l||e[39]!==n||e[40]!==s?(y=async U=>{const{query:k}=U,K=F();if(K==="categories"){if(!k.trim())return $;const L=k.toLowerCase(),R=g.filter(N=>N.status==="active"&&(!N.id||!re(N.id))&&N.id!==s&&(N.title.toLowerCase().includes(L)||N.description?.toLowerCase().includes(L))).map(et),X=await(async()=>{if(!m)return[];let N=l.getQueryData(n);return N||(N=await l.fetchQuery({queryKey:n,queryFn:()=>H(m),staleTime:6e4})),(N?.resources??[]).filter(te=>te.uri.toLowerCase().includes(L)||te.name?.toLowerCase().includes(L)||te.description?.toLowerCase().includes(L)).map(tt)})();return[...R,...X]}if(K==="agents"){let L=g.filter(R=>R.status==="active"&&(!R.id||!re(R.id))&&R.id!==s);if(k.trim()){const R=k.toLowerCase();L=L.filter(X=>X.title.toLowerCase().includes(R)||X.description?.toLowerCase().includes(R))}return L.map(st)}if(!m)return[];let T=l.getQueryData(n);T?l.fetchQuery({queryKey:n,queryFn:()=>H(m),staleTime:6e4}).catch(rt):T=await l.fetchQuery({queryKey:n,queryFn:()=>H(m),staleTime:6e4});let W=T?.resources??[];if(k.trim()){const L=k.toLowerCase();W=W.filter(R=>R.uri.toLowerCase().includes(L)||R.name?.toLowerCase().includes(L)||R.description?.toLowerCase().includes(L))}return W.map(nt)},e[34]=g,e[35]=$,e[36]=m,e[37]=F,e[38]=l,e[39]=n,e[40]=s,e[41]=y):y=e[41];const Z=y;let J;e[42]!==i?(J=U=>{if(i&&(i.current=U),U)P.current=Date.now(),_.current=!1,Q("chat_picker_opened",{picker:"@"});else{const k=P.current;Q("chat_picker_closed",{picker:"@",outcome:_.current?"selected":"dismissed",duration_ms:k?Date.now()-k:null}),P.current=null,d("categories")}},e[42]=i,e[43]=J):J=e[43];const ee=J;let V;return e[44]!==r||e[45]!==Z||e[46]!==q||e[47]!==ee||e[48]!==E?(V=h.jsx(de,{editor:r,char:"@",pluginKey:"atDropdownMenu",queryKey:E,queryFn:Z,onSelect:q,onOpenChange:ee}),e[44]=r,e[45]=Z,e[46]=q,e[47]=ee,e[48]=E,e[49]=V):V=e[49],V};function et(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function tt(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}function st(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function rt(){}function nt(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function ie(t,e,r,s,i,o,l){try{const c=await pe(r,s,o);z(t,e,{id:s,name:fe(s,i),metadata:c.messages,char:"/",kind:"prompt",args:o})}catch(c){console.error("[slash] Failed to fetch prompt:",c),A.error(l.t("chat.mentionSlash.failedLoadPrompt"))}}async function ot(t,e,r,s,i){try{const o=await ue(r,s);z(t,e,{id:s,name:s,metadata:o.contents,char:"/",kind:"resource"})}catch(o){console.error("[slash] Failed to fetch resource:",o),A.error(i.t("chat.mentionSlash.failedLoadResource"))}}async function it(t,e,r,s,i){try{const{files:o,omittedPaths:l}=await ze(r,s.volume,s.path),c={sandboxPath:s.sandboxPath,volume:s.volume,path:s.path,files:o,omittedPaths:l};z(t,e,{id:s.id,name:s.name,metadata:c,char:"/",kind:"skill"})}catch(o){console.error("[slash] Failed to fetch skill:",o),A.error(i.t("chat.mentionSlash.failedLoadSkill"))}}const at=({editor:t,virtualMcpId:e,suggestionOpenRef:r})=>{const s=G(),i=le(),{org:o}=ce(),l=me({connectionId:e,orgId:o.id,orgSlug:o.slug}),c=Y.virtualMcpPrompts(e,o.id),g=Y.virtualMcpResources(e,o.id),w=Y.slashSkills(o.id),m=["slash-mention",o.id,e??"default"],[p,n]=S.useState(null),[u,d]=S.useState(null),b=ve(t);b&&(b.onEditChip=async a=>{if(l)try{const x=(await ae(i,c,l)).find(C=>C.name===a.promptId);if(!x?.arguments||x.arguments.length===0)return;d({...a,prompt:x})}catch(f){console.error("[slash] Failed to load prompt for editing:",f),A.error(s("chat.mentionSlash.failedLoadPrompt"))}});const F=S.useRef(null),P=S.useRef(!1),_=async({item:a,range:f})=>{if(Q("chat_picker_item_selected",{picker:"/",item_kind:a.kind,item_name:a.name}),P.current=!0,!!l)if(a.kind==="prompt"){if(a.arguments&&a.arguments.length>0){n({range:f,item:a});return}const x=se(a._meta);await ie(t,f,l,a.name,x,void 0,{t:s})}else a.kind==="skill"?a.skill&&await it(t,f,o.slug,a.skill,{t:s}):a.uri&&await ot(t,f,l,a.uri,{t:s})},v=async a=>{if(!p||!l)return;const{range:f,item:x}=p,C=se(x._meta);await ie(t,f,l,x.name,C,a,{t:s}),n(null)},D=async a=>{if(!(!u||!l)){if(!je(t,u.pos,u.promptId)){A.error(s("chat.mentionSlash.failedUpdatePrompt")),d(null);return}try{const f=await pe(l,u.promptId,a),x=se(u.prompt._meta);t.chain().focus().setNodeSelection(u.pos).deleteSelection().insertContentAt(u.pos,Me({id:u.promptId,name:fe(u.promptId,x),metadata:f.messages,char:"/",kind:"prompt",args:a})).run(),Q("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:u.promptId})}catch(f){console.error("[slash] Failed to update prompt:",f),A.error(s("chat.mentionSlash.failedUpdatePrompt"))}d(null)}},E=async a=>{const{query:f}=a;if(!l)return[];const[x,C,M]=await Promise.all([ae(i,c,l),ct(i,g,l),lt(i,w,o.slug)]),j=f.trim().toLowerCase(),$=(x??[]).filter(y=>!j||y.name.toLowerCase().includes(j)||y.title?.toLowerCase().includes(j)||y.description?.toLowerCase().includes(j)).map(y=>({name:y.name,title:y.title,description:y.description,kind:"prompt",arguments:y.arguments,_meta:y._meta})),O=(C??[]).filter(y=>!j||y.uri.toLowerCase().includes(j)||y.name?.toLowerCase().includes(j)||y.description?.toLowerCase().includes(j)).map(y=>({name:y.name??y.uri,title:y.name,description:y.description,kind:"resource",uri:y.uri})),q=(M??[]).filter(y=>!j||y.name.toLowerCase().includes(j)||y.id.toLowerCase().includes(j)||y.description?.toLowerCase().includes(j)).map(y=>({name:y.name,title:y.name,description:y.description??void 0,kind:"skill",skill:y}));return[...$,...O,...q]},I=p?.item.kind==="prompt"?{name:p.item.name,title:p.item.title,arguments:p.item.arguments,description:p.item.description,_meta:p.item._meta}:null;return h.jsxs(h.Fragment,{children:[h.jsx(de,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:m,queryFn:E,onSelect:_,onOpenChange:a=>{if(r&&(r.current=a),a)F.current=Date.now(),P.current=!1,Q("chat_picker_opened",{picker:"/"});else{const f=F.current;Q("chat_picker_closed",{picker:"/",outcome:P.current?"selected":"dismissed",duration_ms:f?Date.now()-f:null}),F.current=null}}}),h.jsx(ne,{prompt:I,setPrompt:()=>n(null),onSubmit:v}),h.jsx(ne,{prompt:u?.prompt??null,setPrompt:()=>d(null),onSubmit:D,defaultValues:u?.args},u?`edit-${u.promptId}-${u.pos}`:"edit-idle")]})};async function ae(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}),s?.prompts??[]}async function lt(t,e,r){const s=t.getQueryData(e),i=()=>t.fetchQuery({queryKey:e,queryFn:()=>Be(r),staleTime:6e4});return s?(i().catch(()=>{}),s):i().catch(()=>[])}async function ct(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>H(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>H(r),staleTime:6e4}).catch(()=>{}),s?.resources??[]}const ge="Ask anything, / for prompts & skills, @ for agents & resources...";function ut(t){return[Ne,Pe.configure({placeholder:()=>t.current??ge,showOnlyWhenEditable:!1}),Te,Qe]}function _t({tiptapDoc:t,setTiptapDoc:e,disabled:r=!1,enterToSubmit:s=!1,placeholder:i,onSubmit:o,suggestionOpenRef:l,children:c}){const g=S.useRef(o),w=S.useRef(e),m=S.useRef(s),p=S.useRef(i),n=Ee({extensions:ut(p),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":i??ge,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-[14px] max-md:text-base p-[18px]"},handleKeyDown:(u,d)=>d.key==="Enter"&&!d.shiftKey&&m.current&&!l?.current?(d.preventDefault(),g.current?.(),!0):!1},onUpdate:({editor:u})=>{w.current(u?.getJSON())}});return S.useEffect(()=>{n?.setEditable(!r)},[n,r]),S.useEffect(()=>{g.current=o},[o]),S.useEffect(()=>{w.current=e},[e]),S.useEffect(()=>{m.current=s},[s]),S.useEffect(()=>{p.current=i},[i]),S.useEffect(()=>{if(!n||n.isDestroyed)return;const u=JSON.stringify(n.getJSON()),d=JSON.stringify(t||{type:"doc",content:[]});u!==d&&n.commands.setContent(t||{type:"doc",content:[]})},[n,t]),h.jsx(Le.Provider,{value:{editor:n},children:c})}function Pt(t){const e=B.c(29),{disabled:r,virtualMcpId:s,showFileUploader:i,selectedModel:o,onUnsupportedFile:l,suggestionOpenRef:c,ref:g,className:w}=t,m=r===void 0?!1:r,p=i===void 0?!1:i,{editor:n}=Re();let u,d;if(e[0]!==n?(u=()=>({focus:()=>{n?.commands.focus()},clear:()=>{n?.commands.clearContent(!0)},appendText:x=>{if(!n)return;const C=n.state.doc.textContent.trim()==="";n.commands.focus("end"),C||n.commands.insertContent(" "),n.commands.insertContent(x)},syncVoiceText:(x,C)=>{if(n&&(n.commands.setContent(x||{type:"doc",content:[]}),C)){n.commands.focus("end");const M=n.state.doc.textContent.trim().length>0;n.commands.insertContent({type:"text",text:M?" "+C:C})}},restoreContent:x=>{n&&n.commands.setContent(x||{type:"doc",content:[]})}}),d=[n],e[0]=n,e[1]=u,e[2]=d):(u=e[1],d=e[2]),S.useImperativeHandle(g??null,u,d),!n)return null;const b=m&&"cursor-not-allowed opacity-70",F=m&&"[&_.ProseMirror]:cursor-not-allowed";let P;e[3]!==w||e[4]!==b||e[5]!==F?(P=_e("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",w,Ae,"[&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[20px] [&_.ProseMirror]:flex-1","[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:opacity-50","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:w-full","[&_.ProseMirror_p.is-editor-empty:first-child::before]:break-words",b,F),e[3]=w,e[4]=b,e[5]=F,e[6]=P):P=e[6];let _;e[7]!==n||e[8]!==P?(_=h.jsx(Oe,{editor:n,className:P}),e[7]=n,e[8]=P,e[9]=_):_=e[9];const v=s??null;let D;e[10]!==n||e[11]!==c||e[12]!==v?(D=h.jsx(S.Suspense,{fallback:null,children:h.jsx(at,{editor:n,virtualMcpId:v,suggestionOpenRef:c})}),e[10]=n,e[11]=c,e[12]=v,e[13]=D):D=e[13];const E=s??null;let I;e[14]!==n||e[15]!==c||e[16]!==E?(I=h.jsx(S.Suspense,{fallback:null,children:h.jsx(Ze,{editor:n,virtualMcpId:E,suggestionOpenRef:c})}),e[14]=n,e[15]=c,e[16]=E,e[17]=I):I=e[17];let a;e[18]!==m||e[19]!==n||e[20]!==l||e[21]!==o||e[22]!==p?(a=p&&o&&!m?h.jsx(We,{editor:n,selectedModel:o,onUnsupportedFile:l}):null,e[18]=m,e[19]=n,e[20]=l,e[21]=o,e[22]=p,e[23]=a):a=e[23];let f;return e[24]!==D||e[25]!==I||e[26]!==a||e[27]!==_?(f=h.jsxs(h.Fragment,{children:[_,D,I,a]}),e[24]=D,e[25]=I,e[26]=a,e[27]=_,e[28]=f):f=e[28],f}export{_t as T,Ct as U,Pt as a,Je as p,St as u};
|
|
1
|
+
import{c as B,r as S,b as G,j as h,t as A,a7 as ye,x as xe,aW as we,w as ke,B as be,v as Ce,D as Se,q as le,a6 as ce,K as Y,E as Q,gp as ue,gq as re,gr as H,m as _e}from"./index-FRxLT_js.js";import{S as de,s as Pe}from"./suggestion-SjSKJeBU.js";import{O as Fe,v as Ie,B as De,q as z,Q as ve,P as ne,U as je,k as Me,a as Ee,V as Le,p as Re,C as Ae,l as Ne,n as Te,F as Qe,E as Oe}from"./usage-stats-X4jMwPwX.js";import{aK as Ue}from"./agent-icon-qKbICqBE.js";import"./chat-context-CvQ-sM5v.js";import{m as $e,i as qe,b as Ke}from"./index-BUHQM-fc.js";import{u as me}from"./use-mcp-client-rOHZbD3Y.js";import{u as He}from"./repository-binding-DjFY5b0y.js";import{g as se,a as fe}from"./gateway-client-BYWq7W1f.js";import{l as oe,g as pe}from"./use-mcp-prompts-Cq6mpthN.js";import{f as ze,b as Be}from"./use-org-fs-Bjw5czAm.js";async function Je(t,e,r,s,i,o){if(!$e(e)){A.error("Selected model does not support file uploads");return}const l=r.type||"application/octet-stream";if(!qe(l,e)){const g=Ke(e).parts.map(m=>o(m)).join(", "),w=e?.title??"This model";i?i({fileName:r.name,modelName:w,accepted:g}):A.error(`"${r.name}" can't be attached`,{description:`${w} accepts ${g}.`});return}const c=10*1024*1024;if(r.size>c){A.error(`File "${r.name}" exceeds 10MB limit`);return}try{const g=new FileReader,w=new Promise((n,u)=>{g.onload=()=>{const d=g.result;if(typeof d!="string"){u(new Error("Failed to read file as data URL"));return}const b=d.includes(",")?d.split(",")[1]??d:d;n(b)},g.onerror=u});g.readAsDataURL(r);const m=await w,p={id:crypto.randomUUID(),name:r.name,mimeType:r.type||"application/octet-stream",size:r.size,data:m};Fe(t,{from:s,to:s},p)}catch(g){console.error("Failed to process file:",g),A.error(`Failed to load file "${r.name}"`)}}function Ve(t,e,r,s){if(r)return!1;const i=e.dataTransfer?.files;if(!i||i.length===0)return!1;const o=t.posAtCoords({left:e.clientX,top:e.clientY});if(!o)return!1;e.preventDefault();const l=Array.from(i);return(async()=>{let c=o.pos;for(const g of l)await s(g,c),c=t.state.selection.to})(),!0}function We(t){const e=B.c(9),{editor:r,selectedModel:s,onUnsupportedFile:i}=t,o=G(),l=S.useRef(Ye);let c,g;e[0]!==r||e[1]!==i||e[2]!==s||e[3]!==o?(c=()=>{l.current=async(p,n)=>{await Je(r,s,p,n,i,o)}},g=[r,s,i,o],e[0]=r,e[1]=i,e[2]=s,e[3]=o,e[4]=c,e[5]=g):(c=e[4],g=e[5]),S.useEffect(c,g);let w,m;return e[6]!==r?(w=()=>{if(r?.isDestroyed)return;const p=new Ie("fileDropHandler");r.state.plugins.find(d=>d.spec.key===p)&&r.unregisterPlugin(p);const u=new De({key:p,props:{handleDrop:(d,b,F,P)=>Ve(d,b,P,(_,v)=>l.current(_,v)),handlePaste:(d,b)=>{const F=b.clipboardData?.items;if(!F)return!1;const P=Array.from(F).filter(Xe);return P.length===0?!1:(b.preventDefault(),(async()=>{let _=d.state.selection.from;for(const v of P){const D=v.getAsFile();D&&(await l.current?.(D,_),_=d.state.selection.to)}})(),!0)}}});return r.registerPlugin(u),()=>{r?.isDestroyed||r.unregisterPlugin(p)}},m=[r],e[6]=r,e[7]=w,e[8]=m):(w=e[7],m=e[8]),S.useEffect(w,m),null}function Xe(t){return t.kind==="file"}function Ye(){return Promise.resolve()}function Ct(t){const e=B.c(43),{info:r,onClose:s}=t,i=G(),o=r!==null;let l;e[0]!==s?(l=j=>!j&&s(),e[0]=s,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(251,191,36,0.35) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(244,114,182,0.25) 0%, transparent 100%)"],e[2]=c):c=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=h.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:c.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=g):g=e[3];let w;e[4]===Symbol.for("react.memo_cache_sentinel")?(w=h.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:h.jsx(ye,{size:18})}),e[4]=w):w=e[4];let m;e[5]!==i?(m=i("chat.uploader.fileTypeNotSupported"),e[5]=i,e[6]=m):m=e[6];let p;e[7]!==m?(p=h.jsx(xe,{className:"text-xl font-semibold tracking-tight",children:m}),e[7]=m,e[8]=p):p=e[8];const n=r?.fileName;let u;e[9]!==n?(u=h.jsxs("span",{className:"font-medium text-foreground",children:["“",n,"”"]}),e[9]=n,e[10]=u):u=e[10];let d;e[11]!==i?(d=i("chat.uploader.cantAttachToChat"),e[11]=i,e[12]=d):d=e[12];let b;e[13]!==d||e[14]!==u?(b=h.jsxs(we,{className:"mt-1.5 text-sm leading-relaxed",children:[u," ",d]}),e[13]=d,e[14]=u,e[15]=b):b=e[15];let F;e[16]!==b||e[17]!==p?(F=h.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[g,h.jsxs(ke,{className:"relative gap-4",children:[w,h.jsxs("div",{children:[p,b]})]})]}),e[16]=b,e[17]=p,e[18]=F):F=e[18];const P=r?.modelName??"";let _;e[19]!==i||e[20]!==P?(_=i("chat.uploader.accepts",{modelName:P}),e[19]=i,e[20]=P,e[21]=_):_=e[21];let v;e[22]!==_?(v=h.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:_}),e[22]=_,e[23]=v):v=e[23];let D;e[24]===Symbol.for("react.memo_cache_sentinel")?(D=h.jsx(Ue,{size:14,className:"text-muted-foreground"}),e[24]=D):D=e[24];const E=r?.accepted;let I;e[25]!==E?(I=h.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[D,h.jsx("span",{className:"capitalize",children:E})]}),e[25]=E,e[26]=I):I=e[26];let a;e[27]!==v||e[28]!==I?(a=h.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:h.jsxs("div",{className:"surface p-4",children:[v,I]})}),e[27]=v,e[28]=I,e[29]=a):a=e[29];let f;e[30]!==i?(f=i("chat.uploader.gotIt"),e[30]=i,e[31]=f):f=e[31];let x;e[32]!==s||e[33]!==f?(x=h.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:h.jsx(be,{onClick:s,children:f})}),e[32]=s,e[33]=f,e[34]=x):x=e[34];let C;e[35]!==F||e[36]!==a||e[37]!==x?(C=h.jsxs(Ce,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ge,children:[F,a,x]}),e[35]=F,e[36]=a,e[37]=x,e[38]=C):C=e[38];let M;return e[39]!==o||e[40]!==l||e[41]!==C?(M=h.jsx(Se,{open:o,onOpenChange:l,children:C}),e[39]=o,e[40]=l,e[41]=C,e[42]=M):M=e[42],M}function Ge(t){return t.preventDefault()}function St(){const t=B.c(3),[e,r]=S.useState(null);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>r(null),t[0]=s):s=t[0];let i;return t[1]!==e?(i={unsupportedFile:e,onUnsupportedFile:r,clearUnsupportedFile:s},t[1]=e,t[2]=i):i=t[2],i}function he(t,e){return e||t}const Ze=t=>{const e=B.c(50),{editor:r,virtualMcpId:s,suggestionOpenRef:i}=t,o=G(),l=le(),{org:c}=ce(),g=He();let w;e[0]!==c.id||e[1]!==c.slug||e[2]!==s?(w={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=c.id,e[1]=c.slug,e[2]=s,e[3]=w):w=e[3];const m=me(w);let p;e[4]!==c.id||e[5]!==s?(p=Y.virtualMcpResources(s,c.id),e[4]=c.id,e[5]=s,e[6]=p):p=e[6];const n=p,[u,d]=S.useState("categories");let b;e[7]!==u?(b=()=>u,e[7]=u,e[8]=b):b=e[8];const F=S.useEffectEvent(b),P=S.useRef(null),_=S.useRef(!1),v=s??"default";let D;e[9]!==u||e[10]!==c.id||e[11]!==v?(D=["at-mention",c.id,v,u],e[9]=u,e[10]=c.id,e[11]=v,e[12]=D):D=e[12];const E=D;let I;e[13]!==o?(I=o("chat.mentionAt.agentsTitle"),e[13]=o,e[14]=I):I=e[14];let a;e[15]!==o?(a=o("chat.mentionAt.agentsDescription"),e[15]=o,e[16]=a):a=e[16];let f;e[17]!==I||e[18]!==a?(f={name:"agents",title:I,description:a,kind:"category",drillable:!0},e[17]=I,e[18]=a,e[19]=f):f=e[19];let x;e[20]!==o?(x=o("chat.mentionAt.resourcesTitle"),e[20]=o,e[21]=x):x=e[21];let C;e[22]!==o?(C=o("chat.mentionAt.resourcesDescription"),e[22]=o,e[23]=C):C=e[23];let M;e[24]!==C||e[25]!==x?(M={name:"resources",title:x,description:C,kind:"category",drillable:!0},e[24]=C,e[25]=x,e[26]=M):M=e[26];let j;e[27]!==M||e[28]!==f?(j=[f,M],e[27]=M,e[28]=f,e[29]=j):j=e[29];const $=j;let O;e[30]!==m||e[31]!==r||e[32]!==o?(O=async U=>{const{item:k,range:K}=U;if(Q("chat_picker_item_selected",{picker:"@",item_kind:k.kind,item_name:k.name}),k.kind!=="category"&&(_.current=!0),k.kind==="category")return d(k.name==="agents"?"agents":"resources"),!1;if(k.kind==="agent"&&k.agentId){z(r,K,{id:k.agentId,name:k.name,metadata:{agentId:k.agentId,title:k.name},char:"@"}),d("categories");return}if(k.kind==="resource"&&k.uri&&m){try{const T=await ue(m,k.uri);z(r,K,{id:k.uri,name:k.uri,metadata:T.contents,char:"@"})}catch(T){console.error("[at-mention] Failed to fetch resource:",T),A.error(o("chat.mentionAt.failedToLoadResource"))}d("categories");return}},e[30]=m,e[31]=r,e[32]=o,e[33]=O):O=e[33];const q=O;let y;e[34]!==g||e[35]!==$||e[36]!==m||e[37]!==F||e[38]!==l||e[39]!==n||e[40]!==s?(y=async U=>{const{query:k}=U,K=F();if(K==="categories"){if(!k.trim())return $;const L=k.toLowerCase(),R=g.filter(N=>N.status==="active"&&(!N.id||!re(N.id))&&N.id!==s&&(N.title.toLowerCase().includes(L)||N.description?.toLowerCase().includes(L))).map(et),X=await(async()=>{if(!m)return[];let N=l.getQueryData(n);return N||(N=await l.fetchQuery({queryKey:n,queryFn:()=>H(m),staleTime:6e4})),(N?.resources??[]).filter(te=>te.uri.toLowerCase().includes(L)||te.name?.toLowerCase().includes(L)||te.description?.toLowerCase().includes(L)).map(tt)})();return[...R,...X]}if(K==="agents"){let L=g.filter(R=>R.status==="active"&&(!R.id||!re(R.id))&&R.id!==s);if(k.trim()){const R=k.toLowerCase();L=L.filter(X=>X.title.toLowerCase().includes(R)||X.description?.toLowerCase().includes(R))}return L.map(st)}if(!m)return[];let T=l.getQueryData(n);T?l.fetchQuery({queryKey:n,queryFn:()=>H(m),staleTime:6e4}).catch(rt):T=await l.fetchQuery({queryKey:n,queryFn:()=>H(m),staleTime:6e4});let W=T?.resources??[];if(k.trim()){const L=k.toLowerCase();W=W.filter(R=>R.uri.toLowerCase().includes(L)||R.name?.toLowerCase().includes(L)||R.description?.toLowerCase().includes(L))}return W.map(nt)},e[34]=g,e[35]=$,e[36]=m,e[37]=F,e[38]=l,e[39]=n,e[40]=s,e[41]=y):y=e[41];const Z=y;let J;e[42]!==i?(J=U=>{if(i&&(i.current=U),U)P.current=Date.now(),_.current=!1,Q("chat_picker_opened",{picker:"@"});else{const k=P.current;Q("chat_picker_closed",{picker:"@",outcome:_.current?"selected":"dismissed",duration_ms:k?Date.now()-k:null}),P.current=null,d("categories")}},e[42]=i,e[43]=J):J=e[43];const ee=J;let V;return e[44]!==r||e[45]!==Z||e[46]!==q||e[47]!==ee||e[48]!==E?(V=h.jsx(de,{editor:r,char:"@",pluginKey:"atDropdownMenu",queryKey:E,queryFn:Z,onSelect:q,onOpenChange:ee}),e[44]=r,e[45]=Z,e[46]=q,e[47]=ee,e[48]=E,e[49]=V):V=e[49],V};function et(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function tt(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}function st(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function rt(){}function nt(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function ie(t,e,r,s,i,o,l){try{const c=await pe(r,s,o);z(t,e,{id:s,name:fe(s,i),metadata:c.messages,char:"/",kind:"prompt",args:o})}catch(c){console.error("[slash] Failed to fetch prompt:",c),A.error(l.t("chat.mentionSlash.failedLoadPrompt"))}}async function ot(t,e,r,s,i){try{const o=await ue(r,s);z(t,e,{id:s,name:s,metadata:o.contents,char:"/",kind:"resource"})}catch(o){console.error("[slash] Failed to fetch resource:",o),A.error(i.t("chat.mentionSlash.failedLoadResource"))}}async function it(t,e,r,s,i){try{const{files:o,omittedPaths:l}=await ze(r,s.volume,s.path),c={sandboxPath:s.sandboxPath,volume:s.volume,path:s.path,files:o,omittedPaths:l};z(t,e,{id:s.id,name:s.name,metadata:c,char:"/",kind:"skill"})}catch(o){console.error("[slash] Failed to fetch skill:",o),A.error(i.t("chat.mentionSlash.failedLoadSkill"))}}const at=({editor:t,virtualMcpId:e,suggestionOpenRef:r})=>{const s=G(),i=le(),{org:o}=ce(),l=me({connectionId:e,orgId:o.id,orgSlug:o.slug}),c=Y.virtualMcpPrompts(e,o.id),g=Y.virtualMcpResources(e,o.id),w=Y.slashSkills(o.id),m=["slash-mention",o.id,e??"default"],[p,n]=S.useState(null),[u,d]=S.useState(null),b=ve(t);b&&(b.onEditChip=async a=>{if(l)try{const x=(await ae(i,c,l)).find(C=>C.name===a.promptId);if(!x?.arguments||x.arguments.length===0)return;d({...a,prompt:x})}catch(f){console.error("[slash] Failed to load prompt for editing:",f),A.error(s("chat.mentionSlash.failedLoadPrompt"))}});const F=S.useRef(null),P=S.useRef(!1),_=async({item:a,range:f})=>{if(Q("chat_picker_item_selected",{picker:"/",item_kind:a.kind,item_name:a.name}),P.current=!0,!!l)if(a.kind==="prompt"){if(a.arguments&&a.arguments.length>0){n({range:f,item:a});return}const x=se(a._meta);await ie(t,f,l,a.name,x,void 0,{t:s})}else a.kind==="skill"?a.skill&&await it(t,f,o.slug,a.skill,{t:s}):a.uri&&await ot(t,f,l,a.uri,{t:s})},v=async a=>{if(!p||!l)return;const{range:f,item:x}=p,C=se(x._meta);await ie(t,f,l,x.name,C,a,{t:s}),n(null)},D=async a=>{if(!(!u||!l)){if(!je(t,u.pos,u.promptId)){A.error(s("chat.mentionSlash.failedUpdatePrompt")),d(null);return}try{const f=await pe(l,u.promptId,a),x=se(u.prompt._meta);t.chain().focus().setNodeSelection(u.pos).deleteSelection().insertContentAt(u.pos,Me({id:u.promptId,name:fe(u.promptId,x),metadata:f.messages,char:"/",kind:"prompt",args:a})).run(),Q("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:u.promptId})}catch(f){console.error("[slash] Failed to update prompt:",f),A.error(s("chat.mentionSlash.failedUpdatePrompt"))}d(null)}},E=async a=>{const{query:f}=a;if(!l)return[];const[x,C,M]=await Promise.all([ae(i,c,l),ct(i,g,l),lt(i,w,o.slug)]),j=f.trim().toLowerCase(),$=(x??[]).filter(y=>!j||y.name.toLowerCase().includes(j)||y.title?.toLowerCase().includes(j)||y.description?.toLowerCase().includes(j)).map(y=>({name:y.name,title:y.title,description:y.description,kind:"prompt",arguments:y.arguments,_meta:y._meta})),O=(C??[]).filter(y=>!j||y.uri.toLowerCase().includes(j)||y.name?.toLowerCase().includes(j)||y.description?.toLowerCase().includes(j)).map(y=>({name:y.name??y.uri,title:y.name,description:y.description,kind:"resource",uri:y.uri})),q=(M??[]).filter(y=>!j||y.name.toLowerCase().includes(j)||y.id.toLowerCase().includes(j)||y.description?.toLowerCase().includes(j)).map(y=>({name:y.name,title:y.name,description:y.description??void 0,kind:"skill",skill:y}));return[...$,...O,...q]},I=p?.item.kind==="prompt"?{name:p.item.name,title:p.item.title,arguments:p.item.arguments,description:p.item.description,_meta:p.item._meta}:null;return h.jsxs(h.Fragment,{children:[h.jsx(de,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:m,queryFn:E,onSelect:_,onOpenChange:a=>{if(r&&(r.current=a),a)F.current=Date.now(),P.current=!1,Q("chat_picker_opened",{picker:"/"});else{const f=F.current;Q("chat_picker_closed",{picker:"/",outcome:P.current?"selected":"dismissed",duration_ms:f?Date.now()-f:null}),F.current=null}}}),h.jsx(ne,{prompt:I,setPrompt:()=>n(null),onSubmit:v}),h.jsx(ne,{prompt:u?.prompt??null,setPrompt:()=>d(null),onSubmit:D,defaultValues:u?.args},u?`edit-${u.promptId}-${u.pos}`:"edit-idle")]})};async function ae(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}),s?.prompts??[]}async function lt(t,e,r){const s=t.getQueryData(e),i=()=>t.fetchQuery({queryKey:e,queryFn:()=>Be(r),staleTime:6e4});return s?(i().catch(()=>{}),s):i().catch(()=>[])}async function ct(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>H(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>H(r),staleTime:6e4}).catch(()=>{}),s?.resources??[]}const ge="Ask anything, / for prompts & skills, @ for agents & resources...";function ut(t){return[Ne,Pe.configure({placeholder:()=>t.current??ge,showOnlyWhenEditable:!1}),Te,Qe]}function _t({tiptapDoc:t,setTiptapDoc:e,disabled:r=!1,enterToSubmit:s=!1,placeholder:i,onSubmit:o,suggestionOpenRef:l,children:c}){const g=S.useRef(o),w=S.useRef(e),m=S.useRef(s),p=S.useRef(i),n=Ee({extensions:ut(p),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":i??ge,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-[14px] max-md:text-base p-[18px]"},handleKeyDown:(u,d)=>d.key==="Enter"&&!d.shiftKey&&m.current&&!l?.current?(d.preventDefault(),g.current?.(),!0):!1},onUpdate:({editor:u})=>{w.current(u?.getJSON())}});return S.useEffect(()=>{n?.setEditable(!r)},[n,r]),S.useEffect(()=>{g.current=o},[o]),S.useEffect(()=>{w.current=e},[e]),S.useEffect(()=>{m.current=s},[s]),S.useEffect(()=>{p.current=i},[i]),S.useEffect(()=>{if(!n||n.isDestroyed)return;const u=JSON.stringify(n.getJSON()),d=JSON.stringify(t||{type:"doc",content:[]});u!==d&&n.commands.setContent(t||{type:"doc",content:[]})},[n,t]),h.jsx(Le.Provider,{value:{editor:n},children:c})}function Pt(t){const e=B.c(29),{disabled:r,virtualMcpId:s,showFileUploader:i,selectedModel:o,onUnsupportedFile:l,suggestionOpenRef:c,ref:g,className:w}=t,m=r===void 0?!1:r,p=i===void 0?!1:i,{editor:n}=Re();let u,d;if(e[0]!==n?(u=()=>({focus:()=>{n?.commands.focus()},clear:()=>{n?.commands.clearContent(!0)},appendText:x=>{if(!n)return;const C=n.state.doc.textContent.trim()==="";n.commands.focus("end"),C||n.commands.insertContent(" "),n.commands.insertContent(x)},syncVoiceText:(x,C)=>{if(n&&(n.commands.setContent(x||{type:"doc",content:[]}),C)){n.commands.focus("end");const M=n.state.doc.textContent.trim().length>0;n.commands.insertContent({type:"text",text:M?" "+C:C})}},restoreContent:x=>{n&&n.commands.setContent(x||{type:"doc",content:[]})}}),d=[n],e[0]=n,e[1]=u,e[2]=d):(u=e[1],d=e[2]),S.useImperativeHandle(g??null,u,d),!n)return null;const b=m&&"cursor-not-allowed opacity-70",F=m&&"[&_.ProseMirror]:cursor-not-allowed";let P;e[3]!==w||e[4]!==b||e[5]!==F?(P=_e("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",w,Ae,"[&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[20px] [&_.ProseMirror]:flex-1","[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:opacity-50","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:w-full","[&_.ProseMirror_p.is-editor-empty:first-child::before]:break-words",b,F),e[3]=w,e[4]=b,e[5]=F,e[6]=P):P=e[6];let _;e[7]!==n||e[8]!==P?(_=h.jsx(Oe,{editor:n,className:P}),e[7]=n,e[8]=P,e[9]=_):_=e[9];const v=s??null;let D;e[10]!==n||e[11]!==c||e[12]!==v?(D=h.jsx(S.Suspense,{fallback:null,children:h.jsx(at,{editor:n,virtualMcpId:v,suggestionOpenRef:c})}),e[10]=n,e[11]=c,e[12]=v,e[13]=D):D=e[13];const E=s??null;let I;e[14]!==n||e[15]!==c||e[16]!==E?(I=h.jsx(S.Suspense,{fallback:null,children:h.jsx(Ze,{editor:n,virtualMcpId:E,suggestionOpenRef:c})}),e[14]=n,e[15]=c,e[16]=E,e[17]=I):I=e[17];let a;e[18]!==m||e[19]!==n||e[20]!==l||e[21]!==o||e[22]!==p?(a=p&&o&&!m?h.jsx(We,{editor:n,selectedModel:o,onUnsupportedFile:l}):null,e[18]=m,e[19]=n,e[20]=l,e[21]=o,e[22]=p,e[23]=a):a=e[23];let f;return e[24]!==D||e[25]!==I||e[26]!==a||e[27]!==_?(f=h.jsxs(h.Fragment,{children:[_,D,I,a]}),e[24]=D,e[25]=I,e[26]=a,e[27]=_,e[28]=f):f=e[28],f}export{_t as T,Ct as U,Pt as a,Je as p,St as u};
|