decocms 4.508.2 → 4.508.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{ActiveShapeUtils-D-RxJbDE.js → ActiveShapeUtils-Do0okprW.js} +1 -1
- package/dist/client/assets/{AlertCircle-BMMhb7se.js → AlertCircle-YMl3_Yl_.js} +1 -1
- package/dist/client/assets/{AreaChart-CsxD2oni.js → AreaChart-BAypsqeY.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DZfjBi-1.js → ArrowLeft-BBs5Bo74.js} +1 -1
- package/dist/client/assets/{ArrowUp-CEvmL_t8.js → ArrowUp-DOUrgoGa.js} +1 -1
- package/dist/client/assets/{BarChart-D15LmJ84.js → BarChart-DPMDQIvn.js} +1 -1
- package/dist/client/assets/{Building02-DPyqSZzb.js → Building02-BJ4kuMDR.js} +1 -1
- package/dist/client/assets/{CategoricalChart-CfYtrY4e.js → CategoricalChart-_74WUYe6.js} +1 -1
- package/dist/client/assets/{CheckCircle-HwWiMbx-.js → CheckCircle-BJoV2buB.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DAeUzPm4.js → ChevronSelectorVertical-Cz68Xl4c.js} +1 -1
- package/dist/client/assets/{ChevronUp-CWS-cWjT.js → ChevronUp-Bk1lLXIE.js} +1 -1
- package/dist/client/assets/{Copy01-D_JDMij1.js → Copy01-DgkTTtAt.js} +1 -1
- package/dist/client/assets/{CreditCard01-A84DgQyt.js → CreditCard01-DM-SR88q.js} +1 -1
- package/dist/client/assets/{DotsVertical-DHY1JtEf.js → DotsVertical-wwLxtTff.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-CtNs-ihy.js → ErrorBarContext-CMm4ojUf.js} +1 -1
- package/dist/client/assets/{Globe04-DdxRTg9B.js → Globe04-BNStynYJ.js} +1 -1
- package/dist/client/assets/{Image01-CDAP7qzE.js → Image01-CfFOGALp.js} +1 -1
- package/dist/client/assets/{Key01-Uf5NEuCB.js → Key01-C75ijeKM.js} +1 -1
- package/dist/client/assets/{Link01-CHcFn0b2.js → Link01-DZOkcwx5.js} +1 -1
- package/dist/client/assets/{LinkBroken01-CXfqY9XE.js → LinkBroken01-Bt4dCcO2.js} +1 -1
- package/dist/client/assets/{Monitor01-BNcbQ2qa.js → Monitor01-BYsgDMs3.js} +1 -1
- package/dist/client/assets/{Play-CHyaMX8g.js → Play-i9lPYWvE.js} +1 -1
- package/dist/client/assets/{Plus-Bah-JwsW.js → Plus-DvMEY06p.js} +1 -1
- package/dist/client/assets/{SearchMd-MjBL5rzF.js → SearchMd-Be0mEQAk.js} +1 -1
- package/dist/client/assets/{Sector-B89GhzzG.js → Sector-BbnK4dTm.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DagopGag.js → ShoppingBag01-1dmzAnTp.js} +1 -1
- package/dist/client/assets/{Sun-BTI_jIbq.js → Sun-zvXPMBE6.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DE-tfdq-.js → SwitchHorizontal01-Ye9lOvkq.js} +1 -1
- package/dist/client/assets/{Tool01-CwSqD6lp.js → Tool01-CFZYsvfT.js} +1 -1
- package/dist/client/assets/{Trash01-D2hL36nK.js → Trash01-BeM7jMku.js} +1 -1
- package/dist/client/assets/{Upload01-jWqQbPqo.js → Upload01-w2_F9E6p.js} +1 -1
- package/dist/client/assets/{User01-LL9r5P84.js → User01-CVKWYZvh.js} +1 -1
- package/dist/client/assets/{UserSquare-CBISIUJN.js → UserSquare-CZee7kCi.js} +1 -1
- package/dist/client/assets/{Users01-Czq9-wm_.js → Users01-Dfk3XUhg.js} +1 -1
- package/dist/client/assets/{XAxis-yzY-cqUp.js → XAxis-CTCx1wSy.js} +1 -1
- package/dist/client/assets/{XClose-CXmC5YJZ.js → XClose-z6Vm880I.js} +1 -1
- package/dist/client/assets/{ZoomOut-BuT7I9z4.js → ZoomOut-BTCRJ-Cy.js} +1 -1
- package/dist/client/assets/{access-gate-DfVDyUT3.js → access-gate-CDsloPmK.js} +1 -1
- package/dist/client/assets/add-connection-dialog-Bi3ufT8K.js +1 -0
- package/dist/client/assets/{agent-analytics-CYGUvllh.js → agent-analytics-C8kutsVm.js} +1 -1
- package/dist/client/assets/agent-app-Yvlv8OUJ.js +1 -0
- package/dist/client/assets/{agent-assets-DGMOQz9l.js → agent-assets-BowK9M1b.js} +1 -1
- package/dist/client/assets/{agent-automation-C74O0YTg.js → agent-automation-BLCp5ZAP.js} +1 -1
- package/dist/client/assets/{agent-automations-BaXQ2ROH.js → agent-automations-CPYA5vKD.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-B4FEBTPS.js → agent-connect-sources-C-FzFl_j.js} +1 -1
- package/dist/client/assets/agent-deck-tbxjaGnh.js +1 -0
- package/dist/client/assets/{agent-e2e-BgmGCxH_.js → agent-e2e-CSrN71BV.js} +1 -1
- package/dist/client/assets/{agent-experiments-CakBET_s.js → agent-experiments-X4o8vauF.js} +1 -1
- package/dist/client/assets/{agent-file-BIVPqG6z.js → agent-file-DeIpO5wJ.js} +1 -1
- package/dist/client/assets/{agent-hosting-BVXWNpzi.js → agent-hosting-CML9q7ez.js} +1 -1
- package/dist/client/assets/{agent-icon-DoIYDFcR.js → agent-icon-C8bMTp7B.js} +1 -1
- package/dist/client/assets/agent-library-CWWfskFw.js +1 -0
- package/dist/client/assets/agent-library-file-Dml0jpbU.js +1 -0
- package/dist/client/assets/{agent-monitor-DeSXb556.js → agent-monitor-C4PPbeEw.js} +1 -1
- package/dist/client/assets/{agent-overview-apGukpqv.js → agent-overview-DRuOGWFU.js} +1 -1
- package/dist/client/assets/{agent-releases-eDyb2peY.js → agent-releases-DJQ-VqZx.js} +1 -1
- package/dist/client/assets/agent-settings-B_MufaGe.js +1 -0
- package/dist/client/assets/{agent-site-editor-CL9YHsDN.js → agent-site-editor-Bx-vy8B_.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-B8R7Wtla.js +2 -0
- package/dist/client/assets/agent-site-editor-content-CsGWtQ4n.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-DCP8klgE.js +1 -0
- package/dist/client/assets/agent-view-D9ipKyxN.js +1 -0
- package/dist/client/assets/{agent-view-guard-B5G_qpga.js → agent-view-guard-CPOJjbOJ.js} +1 -1
- package/dist/client/assets/{agents-list-DU-8Qx92.js → agents-list-CAW5QGFm.js} +1 -1
- package/dist/client/assets/{ai-providers-qh6x3Y49.js → ai-providers-DPw03Tv5.js} +1 -1
- package/dist/client/assets/{alert-DqfINKxW.js → alert-D-uNQTTi.js} +1 -1
- package/dist/client/assets/{alert-dialog-COAq874v.js → alert-dialog-CMQkwBy5.js} +1 -1
- package/dist/client/assets/{analytics-sections-CG7WGc54.js → analytics-sections-voXvsjR_.js} +1 -1
- package/dist/client/assets/{api-keys-0omNx1ba.js → api-keys-B1SFUATv.js} +1 -1
- package/dist/client/assets/api-keys-DLyV_RAq.js +1 -0
- package/dist/client/assets/{app-editor-kWMBWy6y.js → app-editor-BPJd1n0b.js} +1 -1
- package/dist/client/assets/{asset-utils-BDB3NRek.js → asset-utils-ClMJxMY2.js} +1 -1
- package/dist/client/assets/{auth-CTRZgQb-.js → auth-GLn956Rh.js} +1 -1
- package/dist/client/assets/{auth-catchall-BIOWkh-6.js → auth-catchall-CWudR4uN.js} +1 -1
- package/dist/client/assets/{auth-entry-B8oZOZ2h.js → auth-entry-BSWZ72GZ.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BTweO4cZ.js → auth-split-layout-7XWmImJ9.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BZfH0Yw8.js → authenticate-and-persist-oauth-LJquf42E.js} +1 -1
- package/dist/client/assets/{automation-list-row-v1pXn-iB.js → automation-list-row-BN2LAoBC.js} +1 -1
- package/dist/client/assets/{automation-runs-Ne5_cxeu.js → automation-runs-BMG8IJWS.js} +1 -1
- package/dist/client/assets/{automations-D3_Zrg_q.js → automations-DhWtsuAf.js} +1 -1
- package/dist/client/assets/{autosend-Bwz57Oob.js → autosend-BbodPyfC.js} +1 -1
- package/dist/client/assets/{avatar-BqzGQX6u.js → avatar-DJQKqNuu.js} +1 -1
- package/dist/client/assets/{badge-Dof8RzS5.js → badge-MR8klHHZ.js} +1 -1
- package/dist/client/assets/{block-document-DBXQj-83.js → block-document-DSm4TTCl.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BoXpvUms.js → blocks-preview-workspace-context-4ypFgj0S.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-DQZxzX4Q.js → blocks-tab-states-CJcWY_b1.js} +3 -3
- package/dist/client/assets/{blog-schema-C8ACKoto.js → blog-schema-H18pdLmj.js} +1 -1
- package/dist/client/assets/{board-analytics-BrmOktIG.js → board-analytics-C6ngt6tt.js} +1 -1
- package/dist/client/assets/{buckets-9eeIlDfn.js → buckets-D4euYcSc.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-CDIkI8lU.js → build-improve-prompt-doc-CoO7orI7.js} +1 -1
- package/dist/client/assets/{calendar-DZ02RkKj.js → calendar-wiEtXR35.js} +1 -1
- package/dist/client/assets/{capability-load-error-CC8cnYZP.js → capability-load-error-C2raqeCV.js} +1 -1
- package/dist/client/assets/{category-editor-CQpZc_5H.js → category-editor-BGYtTcSc.js} +1 -1
- package/dist/client/assets/{chart-BW6KlfF6.js → chart-DjZfpYnm.js} +1 -1
- package/dist/client/assets/{chat-context-Cj8lRtpX.js → chat-context-CdCmbIQJ.js} +1 -1
- package/dist/client/assets/{chat-draft-DQ7Zh-ge.js → chat-draft-CgdpCv_I.js} +1 -1
- package/dist/client/assets/{checkbox-0AX4LQ84.js → checkbox-uUb1TZ3_.js} +1 -1
- package/dist/client/assets/{choose-editor-B6viplRi.js → choose-editor-DcyGNhUz.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Do1GOT_W.js → cli-auth-success-DHg5nYMO.js} +1 -1
- package/dist/client/assets/{client-icons-DsqqSWxA.js → client-icons-mOn7n7dj.js} +1 -1
- package/dist/client/assets/cms-settings-editor-YT1omGZo.js +1 -0
- package/dist/client/assets/{collapsible-r6Q1npI9.js → collapsible-Dh7-8yfe.js} +1 -1
- package/dist/client/assets/{collection-detail-C5Bqs2Jd.js → collection-detail-aQLEEVEw.js} +1 -1
- package/dist/client/assets/{collection-display-button-RxmMTS25.js → collection-display-button-DSw6jPws.js} +1 -1
- package/dist/client/assets/{collection-search-8MVX3xhB.js → collection-search-rdO0NJJu.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-B37YzBKC.js → collection-table-wrapper-CoijbpM_.js} +1 -1
- package/dist/client/assets/{collection-tabs-iwDSS1Gk.js → collection-tabs-SP_Oxddc.js} +1 -1
- package/dist/client/assets/{column-rules-D2p9IS_1.js → column-rules-DAsEXr7d.js} +1 -1
- package/dist/client/assets/{combobox-C0MaRkga.js → combobox-pfaZy3ZG.js} +1 -1
- package/dist/client/assets/{command-xjp7U_6o.js → command-hZ1y73c0.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BV-XONoy.js → companion-mcps-section-skIfGpZq.js} +1 -1
- package/dist/client/assets/{config-B9YouxLM.js → config-DVhSLh0T.js} +1 -1
- package/dist/client/assets/{connect-IDSq72VB.js → connect-C_ZIW7Mx.js} +3 -3
- package/dist/client/assets/{connect-layout-D7et0UmH.js → connect-layout-BbudJyMn.js} +1 -1
- package/dist/client/assets/{connection-DH8frA39.js → connection-BIr2JVH9.js} +1 -1
- package/dist/client/assets/{connection-card-DZ81Xmwr.js → connection-card-BEaJgVph.js} +1 -1
- package/dist/client/assets/{connection-detail-CE3d5acT.js → connection-detail-C6anDs4z.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-C1GQW3b1.js → connection-form-helpers-D_lEyL1e.js} +1 -1
- package/dist/client/assets/connections-98hNurLq.js +1 -0
- package/dist/client/assets/{content-tab-BmXoJKLU.js → content-tab-C9fs50zD.js} +3 -3
- package/dist/client/assets/{context-DLrJfRf_.js → context-D3Kf7DgO.js} +1 -1
- package/dist/client/assets/{context-menu-CP6wQNnB.js → context-menu-Bxz-3ajT.js} +1 -1
- package/dist/client/assets/{core.esm-CfFclpx-.js → core.esm-nksLbJN5.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-C9a52N3A.js → create-organization-dialog-B4HWGJxa.js} +1 -1
- package/dist/client/assets/{daily-pulse-CKJVb0lm.js → daily-pulse-ByOIhSnv.js} +1 -1
- package/dist/client/assets/{discover-Bne5jAe8.js → discover-CSnfzBww.js} +1 -1
- package/dist/client/assets/{domain-settings-DbaFaa35.js → domain-settings-CQ4QNOxF.js} +1 -1
- package/dist/client/assets/{drawer-Hg3yrLGb.js → drawer-xGVi5OhM.js} +1 -1
- package/dist/client/assets/{editor-BoKyJDJr.js → editor-Dy_ud1L1.js} +1 -1
- package/dist/client/assets/{editor-classes-DIcJFalo.js → editor-classes-YH9JoFd9.js} +1 -1
- package/dist/client/assets/{empty-state-B7ov-HNf.js → empty-state-CJGWBYqN.js} +1 -1
- package/dist/client/assets/{empty-state-DJq-iAX2.js → empty-state-Cz6B4cfX.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DR5UxnLo.js → extract-connection-data-DRmTCuHC.js} +1 -1
- package/dist/client/assets/{feature-gate-DdTy43l_.js → feature-gate-BKszmTDe.js} +1 -1
- package/dist/client/assets/{feature-paywall-BKP7yW58.js → feature-paywall-DA6siKP6.js} +1 -1
- package/dist/client/assets/{file-explorer-DWVj23_e.js → file-explorer-Bj8-dcLm.js} +1 -1
- package/dist/client/assets/{file-preview-CBbkYnlR.js → file-preview-4ZiNKW5K.js} +1 -1
- package/dist/client/assets/{file-share-button-C4e6XllD.js → file-share-button-CNJUR07u.js} +1 -1
- package/dist/client/assets/{file-type-icon-CZja8M5H.js → file-type-icon-DF2XQzPr.js} +1 -1
- package/dist/client/assets/flat-project-DZy_ZTjv.js +1 -0
- package/dist/client/assets/{folder-icon-BQKNbUFv.js → folder-icon-Cs16oRao.js} +2 -2
- package/dist/client/assets/{form-CFTSOQEI.js → form-DySs55Ou.js} +1 -1
- package/dist/client/assets/{general-r8uobfp4.js → general-BPkbeaPK.js} +1 -1
- package/dist/client/assets/{home-DTX0hiMY.js → home-FCUQpht2.js} +1 -1
- package/dist/client/assets/{hosted-publish-feedback-BWgx9bo5.js → hosted-publish-feedback-lNjGqQ6g.js} +1 -1
- package/dist/client/assets/{icon-button-Dvd-Hbqj.js → icon-button-CPOdDL6Y.js} +1 -1
- package/dist/client/assets/{index-BWHjUaHr.js → index-AHT7ZtVy.js} +2 -2
- package/dist/client/assets/{index-CIOaXLDL.js → index-BYa1mVLW.js} +1 -1
- package/dist/client/assets/{index-C-jiNxoJ.js → index-BgAqSIQ9.js} +1 -1
- package/dist/client/assets/{index-heX1hw3f.js → index-C7p7t5ew.js} +1 -1
- package/dist/client/assets/{index-B1Ufb1aQ.js → index-CVl0esKw.js} +1 -1
- package/dist/client/assets/{index-CeLJJwaJ.js → index-Cdepno9I.js} +1 -1
- package/dist/client/assets/{index-DHzhGJvQ.js → index-CfhVM2cM.js} +1 -1
- package/dist/client/assets/{index-DF-kKYGl.js → index-CrrXY2eE.js} +1 -1
- package/dist/client/assets/{index-clim2OrQ.js → index-CvlSodIk.js} +1 -1
- package/dist/client/assets/{index-_bng8D_D.js → index-D2sS7FG6.js} +1 -1
- package/dist/client/assets/{index-Ct_TwK9x.js → index-D99C5_6j.js} +3 -3
- package/dist/client/assets/{index-CU9hMVPP.js → index-DOojx7sa.js} +1 -1
- package/dist/client/assets/{index-CZSkv8g1.js → index-Dif2W-7O.js} +12 -12
- package/dist/client/assets/{index-2nIJkm8M.js → index-Dr0UWvh9.js} +1 -1
- package/dist/client/assets/{index-MHwKIq8y.js → index-nIHWX8bm.js} +1 -1
- package/dist/client/assets/{index-redirect-BOZEfaWn.js → index-redirect-Btn9PjKY.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CjCcc5ls.js → infiniteQueryObserver-BXjuz8K2.js} +1 -1
- package/dist/client/assets/{infra-billing-Bq30H5aY.js → infra-billing-DI9z4Jjr.js} +1 -1
- package/dist/client/assets/{input-0Brs7Osm.js → input-B4pEydDM.js} +1 -1
- package/dist/client/assets/{input-r8Bz5MmS.js → input-g6NzGPlJ.js} +3 -3
- package/dist/client/assets/{integration-icon-DqgE-XgN.js → integration-icon-Bo8-L4M5.js} +1 -1
- package/dist/client/assets/{jira-icon-E17GqNXW.js → jira-icon-IaGvs734.js} +1 -1
- package/dist/client/assets/{label-CUvw0CIN.js → label-IXkYcTWD.js} +1 -1
- package/dist/client/assets/{layout-CVokJPm0.js → layout-DbYoxrZG.js} +1 -1
- package/dist/client/assets/legacy-agents-deep-PUWu6zPr.js +1 -0
- package/dist/client/assets/{legacy-main-redirect-DT3xhHw0.js → legacy-main-redirect-jdoGl3ix.js} +1 -1
- package/dist/client/assets/library-Ls30yuyv.js +1 -0
- package/dist/client/assets/{library-tab-Dy84gmwK.js → library-tab-3b-qKCic.js} +4 -4
- package/dist/client/assets/{login-QcR7UU20.js → login-BEN7pxhX.js} +1 -1
- package/dist/client/assets/{markdown-xTfJU4ZI.js → markdown-C68Q-mkS.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-D1btqiMZ.js → mcp-app-renderer-CIZFLg7D.js} +2 -2
- package/dist/client/assets/{mcp-oauth-BtPQWb1B.js → mcp-oauth-BeIRiHEb.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DH-nuezz.js → mcp-oauth-CHRyQMfO.js} +1 -1
- package/dist/client/assets/{members-D6LQQPan.js → members-BT6npI53.js} +1 -1
- package/dist/client/assets/{memory-CH6cCi6s.js → memory-CQEdfFs7.js} +2 -2
- package/dist/client/assets/{mini-report-page-C0yvXh6k.js → mini-report-page-B7fTcWIV.js} +1 -1
- package/dist/client/assets/{mock-board-DDkTdvOs.js → mock-board-CzWTHtQg.js} +1 -1
- package/dist/client/assets/{monaco-editor-BDxt_U55.js → monaco-editor-BxMZnQ0j.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-B2XpENOy.js → monitoring-stats-row-CJc2UHv-.js} +1 -1
- package/dist/client/assets/{multi-select-CwSx1drt.js → multi-select-DCCixFbL.js} +1 -1
- package/dist/client/assets/{mustache-BpTVz02q.js → mustache-Pf5TCvpc.js} +1 -1
- package/dist/client/assets/{new-project-dialog-Bgi1m0oL.js → new-project-dialog-CCJZJ4cx.js} +1 -1
- package/dist/client/assets/{oauth-callback-hU02nAwA.js → oauth-callback-Bnj9kOA5.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-QLMHkdnx.js → oauth-callback-ai-provider-T5CoEa5j.js} +1 -1
- package/dist/client/assets/{onboarding-Cty-KWfD.js → onboarding-DC_m0LeJ.js} +1 -1
- package/dist/client/assets/{openai-conversation-BcZCHkpI.js → openai-conversation-5qadcFR5.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-DMA8c-5q.js → optimistic-project-sidebar-views-D1Kl6fn2.js} +1 -1
- package/dist/client/assets/{order-monitor-day-9SSoEdDJ.js → order-monitor-day-BpoQIHyT.js} +1 -1
- package/dist/client/assets/{organization-choice-Bt6gsmAC.js → organization-choice-Fj9L95X5.js} +1 -1
- package/dist/client/assets/{orgs-D38v2z3I.js → orgs-DvP2Fbzy.js} +1 -1
- package/dist/client/assets/{page-seo-form-MoeL5f8l.js → page-seo-form-DeFPo_MM.js} +1 -1
- package/dist/client/assets/{pair-BYiKssvp.js → pair-DkbJ98yd.js} +2 -2
- package/dist/client/assets/{plan-ladder-Cw5p1Mwy.js → plan-ladder-DLtWhNV9.js} +1 -1
- package/dist/client/assets/{popover-C8iDLk0p.js → popover-B9mcX7AX.js} +1 -1
- package/dist/client/assets/{post-calendar-BVyf6uru.js → post-calendar-Bm3ALphk.js} +1 -1
- package/dist/client/assets/{post-editor-DT_NPG5i.js → post-editor-fCE2ygKA.js} +1 -1
- package/dist/client/assets/{preview-content-Co5rrOFh.js → preview-content-vzzgIsPe.js} +1 -1
- package/dist/client/assets/{preview-dialog-DtIAT7l6.js → preview-dialog-BJxXHGoH.js} +1 -1
- package/dist/client/assets/{preview-panel-CpnRAkMY.js → preview-panel-xOgVoxMm.js} +1 -1
- package/dist/client/assets/{preview-tab-DgTMXOpj.js → preview-tab-Dm652xT9.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-D-IqR-Ql.js → product-picker-dialog-DWIYALRQ.js} +1 -1
- package/dist/client/assets/{profile-i8VB2iCd.js → profile-Q5cwMYQL.js} +1 -1
- package/dist/client/assets/{project-app-view-CXXBVOpD.js → project-app-view-DO3zbbCD.js} +1 -1
- package/dist/client/assets/{project-feed-Cw_fK-6F.js → project-feed-BFpcLtco.js} +1 -1
- package/dist/client/assets/{project-icon-DhS5yRKd.js → project-icon-C8H_L08H.js} +1 -1
- package/dist/client/assets/project-reports-Bxhr0QQ1.js +1 -0
- package/dist/client/assets/project-tasks-AKOhQsig.js +1 -0
- package/dist/client/assets/{projects-cmJOOOLF.js → projects-DEclbFjG.js} +1 -1
- package/dist/client/assets/{projects-empty-state-B6JPj7Oe.js → projects-empty-state-C2KBtsIf.js} +1 -1
- package/dist/client/assets/{prompts-CYQB7-wz.js → prompts-CLRkJ0qi.js} +1 -1
- package/dist/client/assets/record-editor-pLb7XSKM.js +1 -0
- package/dist/client/assets/{redirect-editor-CMd6JXXo.js → redirect-editor-wGlPT7gU.js} +1 -1
- package/dist/client/assets/reports-Bru1Ehpt.js +1 -0
- package/dist/client/assets/{reports-CFbL6JTN.js → reports-D2YkXNJX.js} +1 -1
- package/dist/client/assets/{reports-onboarding-DqH4QjHV.js → reports-onboarding-C1wmaKGU.js} +1 -1
- package/dist/client/assets/{reports-tab-DQLFweaI.js → reports-tab-BbXsic4B.js} +2 -2
- package/dist/client/assets/{repositories-COnnRl7S.js → repositories-BZQ0hEYV.js} +1 -1
- package/dist/client/assets/{repository-binding-ybDjDNUp.js → repository-binding-CyvRd5qV.js} +1 -1
- package/dist/client/assets/{repository-import-picker-WXSDvvSp.js → repository-import-picker-BEUokmWQ.js} +1 -1
- package/dist/client/assets/{repository-picker-DjcUFiOj.js → repository-picker-BQRDNsQ9.js} +1 -1
- package/dist/client/assets/{require-capability-2HJ_i5E4.js → require-capability-CIDqVr39.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CLl69sSm.js → required-auth-layout-D3GDxyGN.js} +1 -1
- package/dist/client/assets/{reset-password-DQvc2mt6.js → reset-password-7xw29Cb_.js} +1 -1
- package/dist/client/assets/{resizable-CMJt0YLW.js → resizable-iG5rnoHG.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-DKu8QIC5.js → resolve-tab-icon-Bob-1AmU.js} +1 -1
- package/dist/client/assets/{review-settings-CLW21L9r.js → review-settings-e0ew1oZC.js} +1 -1
- package/dist/client/assets/roles-4Xua_nm2.js +1 -0
- package/dist/client/assets/{route-B1IQpxUO.js → route--pxoEQpm.js} +1 -1
- package/dist/client/assets/{route-Duqn_32R.js → route-CPEwiWyV.js} +1 -1
- package/dist/client/assets/route-DdueqVnh.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-4GrxxXe6.js → sandbox-lifecycle-context-C-CFz47M.js} +1 -1
- package/dist/client/assets/{schema-BgL0-2qc.js → schema-BXx2mRBE.js} +1 -1
- package/dist/client/assets/{schema-wvPEQjTn.js → schema-C5ll25-F.js} +1 -1
- package/dist/client/assets/{scroll-area-BHXRD6k2.js → scroll-area-BqNRxpEO.js} +1 -1
- package/dist/client/assets/{search-input-DYBHkKHy.js → search-input-CY8uhr2h.js} +1 -1
- package/dist/client/assets/{search-toggle-CjCxUJNp.js → search-toggle-jFMMxpdR.js} +1 -1
- package/dist/client/assets/{secret-ciphertext-XeQexsho.js → secret-ciphertext-CjSmOPah.js} +1 -1
- package/dist/client/assets/{secret-picker-DK8wggZd.js → secret-picker-D1HomEKX.js} +1 -1
- package/dist/client/assets/{secrets-CeI-YzZo.js → secrets-DH7X5VYO.js} +1 -1
- package/dist/client/assets/{sections-editor-DR1RkMyu.js → sections-editor-CDHC7M7y.js} +1 -1
- package/dist/client/assets/{select-sQhsGSu-.js → select-7CSUe0XG.js} +1 -1
- package/dist/client/assets/{select-model-D1nthUef.js → select-model-BjwNqROv.js} +1 -1
- package/dist/client/assets/{seo-editor-D78PzvWr.js → seo-editor-Dr7lDtmZ.js} +1 -1
- package/dist/client/assets/{separator-gOX5vIPs.js → separator-CKAdSnXR.js} +1 -1
- package/dist/client/assets/{settings-tab-CEEZGFNi.js → settings-tab-CKx9puNI.js} +1 -1
- package/dist/client/assets/{sheet-DINfogR5.js → sheet-CACWDefJ.js} +1 -1
- package/dist/client/assets/{shell-layout-DMbUI291.js → shell-layout-C50mG8ul.js} +1 -1
- package/dist/client/assets/site-editor-BvzT0A2v.js +1 -0
- package/dist/client/assets/{site-editor-toast-CgPR9tqp.js → site-editor-toast-DXKvHmNX.js} +1 -1
- package/dist/client/assets/{skills-CR_0rOWx.js → skills-COx4wTRA.js} +1 -1
- package/dist/client/assets/{slider-nFJSqbT2.js → slider-DM8rGRqE.js} +1 -1
- package/dist/client/assets/{sortable.esm-cWIzqT3V.js → sortable.esm-CkjhjaHY.js} +1 -1
- package/dist/client/assets/{sso-Blhpaekp.js → sso-DyShVSqB.js} +1 -1
- package/dist/client/assets/{suggestion-aMdELt97.js → suggestion-CBTCrHOQ.js} +1 -1
- package/dist/client/assets/{switch-CJCFpusd.js → switch-T6YV-pm3.js} +1 -1
- package/dist/client/assets/{symbol-CO_5EjKK.js → symbol-DP13exiV.js} +1 -1
- package/dist/client/assets/{synced-repos-Bvd3PATv.js → synced-repos-Dndth70e.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-JHqdP7f7.js → tab-icon-glyph-Dz1DIAPn.js} +1 -1
- package/dist/client/assets/{table-DRdIKvpY.js → table-BfrR9UMs.js} +1 -1
- package/dist/client/assets/{tabs-Cf_-YArR.js → tabs-CbKrt0S2.js} +1 -1
- package/dist/client/assets/{task-board-0Ue5jgdg.js → task-board-BZa1GKE0.js} +1 -1
- package/dist/client/assets/{task-route-t8tX6rUG.js → task-route-CNJ0iw1F.js} +1 -1
- package/dist/client/assets/{task-status-CYO9VI_T.js → task-status-DW2leJbE.js} +1 -1
- package/dist/client/assets/taskboard-analytics-DQ3Lut_K.js +1 -0
- package/dist/client/assets/tasks-D8oAlKF0.js +1 -0
- package/dist/client/assets/{tasks-Cj4MxONS.js → tasks-DQ0pjGrC.js} +3 -3
- package/dist/client/assets/{textarea-CLN5ZJXm.js → textarea-CNnEFoSx.js} +1 -1
- package/dist/client/assets/{thread-analytics-BIiGhqGQ.js → thread-analytics-ZCHH_Nri.js} +1 -1
- package/dist/client/assets/{thread-intent-C3HjT5Xj.js → thread-intent-BOI8Y8o4.js} +1 -1
- package/dist/client/assets/{thread-route-mDsyFTdQ.js → thread-route-B-Pby_vt.js} +1 -1
- package/dist/client/assets/{thread-route-BG33ZqmJ.js → thread-route-BOyEsXCk.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BTn10Ub4.js → thread-sheet-body-C-0CATd6.js} +1 -1
- package/dist/client/assets/{time-range-picker-nJafq06l.js → time-range-picker-BfPU3zY5.js} +1 -1
- package/dist/client/assets/{toggle-group-BprmAdhh.js → toggle-group-BtWsCFES.js} +1 -1
- package/dist/client/assets/{tool-namespace-D0YHDA4R.js → tool-namespace-C03gU7a4.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-xCSHXfRQ.js → toolbar-icon-button-DM2-Z3cF.js} +1 -1
- package/dist/client/assets/{tooltip-32VKFB9k.js → tooltip-Be6wo5tR.js} +1 -1
- package/dist/client/assets/{tooltipContext-9JIIxiU3.js → tooltipContext-CHoA7t3J.js} +1 -1
- package/dist/client/assets/{track-DhYq1p0V.js → track-DhucoeXL.js} +1 -1
- package/dist/client/assets/{types-lEVFbgsq.js → types-DeNiBNDA.js} +1 -1
- package/dist/client/assets/{url-slug-VbfAsI5Y.js → url-slug-CP2sENZ9.js} +1 -1
- package/dist/client/assets/{usage-stats-CIXS82Np.js → usage-stats-NOThofFr.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Ctjp1uIK.js → use-ai-providers-ByuweJjo.js} +1 -1
- package/dist/client/assets/{use-app-takeover-CO5zYn5R.js → use-app-takeover-C671MdMA.js} +1 -1
- package/dist/client/assets/{use-automations-DIeU6gsQ.js → use-automations-Bsx_AfnL.js} +1 -1
- package/dist/client/assets/{use-autosave-rRAWHjPd.js → use-autosave-CV5uqDU6.js} +1 -1
- package/dist/client/assets/{use-chat-navigation-DhD5bi3J.js → use-chat-navigation-CDIbYaJL.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BMsmXORk.js → use-clock-tick-C0eQyVp-.js} +1 -1
- package/dist/client/assets/{use-connect-companion-Da6INzgN.js → use-connect-companion-DGDOlejH.js} +1 -1
- package/dist/client/assets/{use-connection-BLth9eEn.js → use-connection-CsbXqvOQ.js} +1 -1
- package/dist/client/assets/{use-content-sync-Bd4G4mdY.js → use-content-sync-CFGjTSUB.js} +1 -1
- package/dist/client/assets/{use-copy-CCa7OeKm.js → use-copy-CZnKziVl.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-C2pLAEuB.js → use-create-virtual-mcp-c3QhW-xf.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-CcL5071z.js → use-date-fns-locale-ogBq5ptX.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-C6B9pWYA.js → use-debounced-autosave-7_vgJjPo.js} +1 -1
- package/dist/client/assets/{use-debounced-value-fkneMIaZ.js → use-debounced-value-DpoC-cU_.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DS7Tf9a6.js → use-deco-credits-BrUv9SlN.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BxJpoiX1.js → use-decopilot-events-BjrSXQDA.js} +1 -1
- package/dist/client/assets/use-delete-connection-WAxC90wa.js +1 -0
- package/dist/client/assets/{use-deployment-admin-DskXlguZ.js → use-deployment-admin-DL0E6NAi.js} +1 -1
- package/dist/client/assets/{use-ensure-project-folder-DwQYVXKu.js → use-ensure-project-folder-C01FlVtX.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-C_nsWClq.js → use-fast-preview-draft-url-DhwrLKPA.js} +1 -1
- package/dist/client/assets/{use-file-configs-1z12RUIF.js → use-file-configs-CMwZdIta.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DGbkPvNj.js → use-infinite-scroll-DigXwy5i.js} +1 -1
- package/dist/client/assets/{use-join-requests-B3wnRtGK.js → use-join-requests-oF7q4Otk.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CCeBS1-S.js → use-main-panel-tabs-CXkHwrfh.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-VVcRHW9u.js → use-mcp-auth-status-DQX4P5B8.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BfRGoTzW.js → use-mcp-client-DvMvMjon.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-qR7FWnTS.js → use-mcp-prompts-DC5dS3tb.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BhjoWME9.js → use-mcp-tools-DrnbDdXf.js} +1 -1
- package/dist/client/assets/{use-members-BwfqRX_b.js → use-members-DZr_5YC1.js} +1 -1
- package/dist/client/assets/{use-mobile-120ghvW_.js → use-mobile-DhCXGkCo.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DbzqtBA0.js → use-navigate-to-agent-NXH_i538.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-KtPa2dIG.js → use-open-billing-url-CnPVNS1E.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BdP8iNKS.js → use-org-auth-client-CWCid2nZ.js} +1 -1
- package/dist/client/assets/{use-org-fs-QTqb7Okr.js → use-org-fs-TCuMiJqS.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CoAaay4n.js → use-org-repo-syncs-D0DfzcB6.js} +1 -1
- package/dist/client/assets/{use-org-sso-MuG1ETRW.js → use-org-sso-BOsHFRck.js} +1 -1
- package/dist/client/assets/{use-organization-roles-g8-oRN2F.js → use-organization-roles-D7JnP4VD.js} +1 -1
- package/dist/client/assets/{use-organization-settings-o1V7Wa6F.js → use-organization-settings-BZyvFOZ-.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-CemWnkPa.js → use-panel-navigate-nrEaz6Gi.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-ChmXhpS6.js → use-project-native-view-presence-B9w77aQ3.js} +1 -1
- package/dist/client/assets/{use-project-scope-Bj5Fw44i.js → use-project-scope-D5dOeNxC.js} +1 -1
- package/dist/client/assets/{use-recent-apps-D7Xcsq5x.js → use-recent-apps-DzWexLGb.js} +1 -1
- package/dist/client/assets/{use-releases-naCWe5wL.js → use-releases--bi23eNi.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-C-Idaf84.js → use-reports-diagnostic-CADoWmTI.js} +1 -1
- package/dist/client/assets/{use-secrets-CLiQ5wZs.js → use-secrets-DXKCpAi9.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-WZGrMT2D.js → use-section-preview-base-DE6KaDID.js} +1 -1
- package/dist/client/assets/{use-tags-Ct6kcfjS.js → use-tags-CYpMUmsS.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-Bq1Gu0IQ.js → use-task-board-analytics-DrX7uzBH.js} +1 -1
- package/dist/client/assets/{use-task-board-events-D0ta6ytV.js → use-task-board-events-DT0qRsJt.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-D5-t7Lko.js → use-task-board-item-prs-BfbJMKTp.js} +1 -1
- package/dist/client/assets/{use-task-board-items-WB5lKJR5.js → use-task-board-items-BBvwxZpr.js} +1 -1
- package/dist/client/assets/{use-task-metadata-CK18OHN4.js → use-task-metadata-CqjnZQ0k.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-Dgs0VYXH.js → use-thread-analytics-DQv-PLVg.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-CEOqf0ak.js → use-thread-outputs-Cb3lONDK.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CuM_l11Q.js +1 -0
- package/dist/client/assets/{useQueries-BLoNia4-.js → useQueries-CeLbVBwW.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CKyaMnVG.js +1 -0
- package/dist/client/assets/{users-B3KJVmrY.js → users-NeWR5kxD.js} +1 -1
- package/dist/client/assets/{utils-C8NvNrqd.js → utils-YiUcPnSq.js} +1 -1
- package/dist/client/assets/{variant-calendar-C1w6tr_q.js → variant-calendar-Bf8IQ3iq.js} +1 -1
- package/dist/client/assets/{variant-draft-pointer-67eSVD17.js → variant-draft-pointer-BsmSByx3.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BVpGihk4.js → view-mode-toggle-Cf7jrZTp.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CKi-nCGu.js → virtual-mcp-BpV14YnV.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-wst_QhmZ.js → watch-sse-pool-n2RQj1o9.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +643 -643
- package/package.json +1 -1
- package/dist/client/assets/add-connection-dialog-DKWM5Vkc.js +0 -1
- package/dist/client/assets/agent-app-DQkp9d17.js +0 -1
- package/dist/client/assets/agent-deck-CiObYYmA.js +0 -1
- package/dist/client/assets/agent-library-CIU4SqVG.js +0 -1
- package/dist/client/assets/agent-library-file-fqxtwlw1.js +0 -1
- package/dist/client/assets/agent-settings-CW4l8h4H.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Cv72N_7C.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DI480fxw.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-DAZGefjP.js +0 -1
- package/dist/client/assets/agent-view-D8R6vxuG.js +0 -1
- package/dist/client/assets/api-keys-Dot5p8D4.js +0 -1
- package/dist/client/assets/cms-settings-editor-DAEqF0HH.js +0 -1
- package/dist/client/assets/connections-DGzkZc6x.js +0 -1
- package/dist/client/assets/flat-project-PByvJgOG.js +0 -1
- package/dist/client/assets/legacy-agents-deep-BIK1B8S3.js +0 -1
- package/dist/client/assets/library-DFwlI4e7.js +0 -1
- package/dist/client/assets/project-reports-Cu2yvuL1.js +0 -1
- package/dist/client/assets/project-tasks-BJUOE1MN.js +0 -1
- package/dist/client/assets/record-editor-j1XPMVdF.js +0 -1
- package/dist/client/assets/reports-B1A1B8JK.js +0 -1
- package/dist/client/assets/roles-DqlJjHyh.js +0 -1
- package/dist/client/assets/route-BLPgNvPg.js +0 -1
- package/dist/client/assets/site-editor-Dt9vd9bw.js +0 -1
- package/dist/client/assets/taskboard-analytics-DuvHsTib.js +0 -1
- package/dist/client/assets/tasks-BwS-dzw2.js +0 -1
- package/dist/client/assets/use-delete-connection-oxCihnZu.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BszgtSKD.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BhSLtgqL.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as M,r as z,j as l,b as H,au as Ze,l as V,ah as ct,a2 as me,o as Yt,a9 as Zt,e as es,K as xe,t as Re,m as ut,ak as ts,H as ss,h as ns,B as Ue,aW as dt,aj as as,aF as ls,ek as os,el as ft,a5 as rs,z as is,x as He,d as qe,em as et,dS as cs,en as us}from"./index-CZSkv8g1.js";import{aO as ds,aP as fs,aD as ms,U as ps,a as tt,aw as gs,h as xs,a4 as hs,aQ as bs,aR as mt,aS as ys,q as ze,aK as js,aJ as vs,aT as pt,A as gt,aU as de,f as Ss,b as Ns,I as ks}from"./agent-icon-DoIYDFcR.js";import{t as Te,e as ws,b as _s}from"./Tool01-CwSqD6lp.js";import{i as xt}from"./LinkBroken01-CXfqY9XE.js";import{a as Ts}from"./Copy01-D_JDMij1.js";import{c as be,d as We,e as st}from"./format-time-CAj8AQXM.js";import{b as Cs,C as Is,a as $s}from"./collapsible-r6Q1npI9.js";import{u as Ms}from"./use-copy-CCa7OeKm.js";import{h as ht,i as As,d as Ce,c as Ps,P as Ls,u as Es,j as Rs,F as zs,s as Fs,b as Ds,k as Os}from"./usage-stats-CIXS82Np.js";import{q as Bs,u as Us,v as Hs,x as qs}from"./thread-intent-C3HjT5Xj.js";import{f as ye,z as Ws,u as je,B as Gs,b as Ks,E as bt,F as Vs,G as Ie,H as Js,I as Qs}from"./chat-context-Cj8lRtpX.js";import{u as Ge}from"./use-clock-tick-BMsmXORk.js";import{c as Xs}from"./content-blocks-o63cs2vh.js";import{M as Ys}from"./mcp-app-renderer-D1btqiMZ.js";import{g as yt}from"./types-lEVFbgsq.js";import{o as Zs}from"./omit-sandbox-map-jj4lCB2U.js";import{T as jt,a as vt,c as St}from"./tooltip-32VKFB9k.js";import{c as en,u as tn,a as sn}from"./use-mcp-client-BfRGoTzW.js";import{a as Nt,g as kt,s as wt}from"./tool-namespace-D0YHDA4R.js";import{t as nn,g as pe,u as Ke}from"./utils-CVEq3hMx.js";import{i as _t}from"./AlertCircle-BMMhb7se.js";import{s as an,a as Ne}from"./Image01-CDAP7qzE.js";import{s as ln}from"./XClose-CXmC5YJZ.js";import{n as Fe}from"./ShoppingBag01-DagopGag.js";import{i as on}from"./SearchMd-MjBL5rzF.js";import{a as rn,e as cn}from"./shell-layout-DMbUI291.js";import{a as Ve}from"./use-panel-navigate-CemWnkPa.js";import{c as Tt}from"./use-decopilot-events-BxJpoiX1.js";import{I as un,M as Ct}from"./markdown-xTfJU4ZI.js";import{c as dn,S as fn,a as mn,b as pn}from"./sheet-DINfogR5.js";import{I as ve}from"./integration-icon-DqgE-XgN.js";import{a as It}from"./use-connection-BLth9eEn.js";import{u as $t}from"./use-navigate-to-agent-DbzqtBA0.js";import{i as ke}from"./Link01-CHcFn0b2.js";import{s as gn}from"./UserSquare-CBISIUJN.js";import{g as xn}from"./use-mcp-prompts-qR7FWnTS.js";import{t as hn}from"./ChevronUp-CWS-cWjT.js";import{i as bn}from"./Monitor01-BNcbQ2qa.js";import{a as yn}from"./use-thread-outputs-CEOqf0ak.js";import{n as jn}from"./ZoomOut-BuT7I9z4.js";import{F as vn}from"./file-type-icon-CZja8M5H.js";const Mt=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Sn(){const s=M.c(5),[e]=z.useState(Nn);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let n;s[1]!==e?(n=Mt.map((o,c)=>{const{delay:i}=o;return l.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[c],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},c)}),s[1]=e,s[2]=n):n=s[2];let a;return s[3]!==n?(a=l.jsx("div",{className:"grid",style:t,children:n}),s[3]=n,s[4]=a):a=s[4],a}function Nn(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Mt.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}const kn={damping:.7,stiffness:.05,mass:1.25},wn=70,_n=1e3/60,Tn=350;let $e=!1;globalThis.document?.addEventListener("mousedown",()=>{$e=!0});globalThis.document?.addEventListener("mouseup",()=>{$e=!1});globalThis.document?.addEventListener("click",()=>{$e=!1});const Cn=(s={})=>{const[e,t]=z.useState(!1),[n,a]=z.useState(s.initial!==!1),[o,c]=z.useState(!1),i=z.useRef(null);i.current=s;const u=z.useCallback(()=>{if(!$e)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(h.current)||h.current?.contains(k.commonAncestorContainer)},[]),r=z.useCallback(b=>{d.isAtBottom=b,a(b)},[]),f=z.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=z.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return h.current?.scrollTop??0},set scrollTop(k){if(h.current){const{scrollBehavior:j}=getComputedStyle(h.current);j!=="auto"&&(h.current.style.scrollBehavior="auto"),h.current.scrollTop=k,d.ignoreScrollToTop=h.current.scrollTop,j!=="auto"&&(h.current.style.scrollBehavior=j)}},get targetScrollTop(){return!h.current||!y.current?0:h.current.scrollHeight-1-h.current.clientHeight},get calculatedTargetScrollTop(){if(!h.current||!y.current)return 0;const{targetScrollTop:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:h.current,contentElement:y.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=wn}}},[]),m=z.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||r(!0);const k=Date.now()+(Number(b.wait)||0),j=Pe(i.current,b.animation),{ignoreEscapes:w=!1}=b;let S,N=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{S=Date.now()}):S=k+(b.duration??0);const v=async()=>{const _=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:T}=d,A=performance.now(),P=(A-(d.lastTick??A))/_n;if(d.animation||(d.animation={behavior:j,promise:_,ignoreEscapes:w}),d.animation.behavior===j&&(d.lastTick=A),u()||k>Date.now())return v();if(T<Math.min(N,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,v();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*P,d.scrollTop+=d.accumulated,d.scrollTop!==T&&(d.accumulated=0)}return v()}return S>Date.now()?(N=d.calculatedTargetScrollTop,v()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?m({animation:Pe(i.current,i.current.resize),ignoreEscapes:w,duration:Math.max(0,S-Date.now())||void 0}):d.isAtBottom)});return _.then(T=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),T))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:v()},[r,u,d]),p=z.useCallback(()=>{f(!0),r(!1)},[f,r]),g=z.useCallback(({target:b})=>{if(b!==h.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:w=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(w=j),c(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(u()){f(!0),r(!1);return}const S=k>w,N=k<w;if(d.animation?.ignoreEscapes){d.scrollTop=w;return}N&&(f(!0),r(!1)),S&&f(!1),!d.escapedFromLock&&d.isNearBottom&&r(!0)},1)},[f,r,u,d]),x=z.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===h.current&&k<0&&h.current.scrollHeight>h.current.clientHeight&&!d.animation?.ignoreEscapes&&(f(!0),r(!1))},[f,r,d]),h=nt(b=>{h.current?.removeEventListener("scroll",g),h.current?.removeEventListener("wheel",x),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",x,{passive:!0})},[]),y=nt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:w}=j.contentRect,S=w-(k??w);if(d.resizeDifference=S,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),c(d.isNearBottom),S>=0){const N=Pe(i.current,k?i.current.resize:i.current.initial);m({animation:N,wait:!0,preserveScrollPosition:!0,duration:N==="instant"?void 0:Tn})}else d.isNearBottom&&(f(!1),r(!0));k=w,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===S&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:h,scrollToBottom:m,stopScroll:p,isAtBottom:n||o,isNearBottom:o,escapedFromLock:e,state:d}};function nt(s,e){const t=z.useCallback(n=>(t.current=n,s(n)),e);return t}const Ae=new Map;function Pe(...s){const e={...kn};let t=!1;for(const a of s){if(a==="instant"){t=!0;continue}typeof a=="object"&&(t=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const n=JSON.stringify(e);return Ae.has(n)||Ae.set(n,Object.freeze(e)),t?"instant":Ae.get(n)}function Y({icon:s,title:e,usage:t,summary:n,state:a,detail:o,detailVariant:c="code",forceOpen:i,variant:u="default",trailing:r,iconDestructive:f,alwaysChevron:d,defaultOpen:m,children:p}){const g=H(),[x,h]=z.useState(m??!1),{handleCopy:y,copied:b}=Ms(),k=a==="loading",j=a==="error",S=!!(o&&o.trim())||!!p,N=u==="subtask",v=(i??!1)||x,_=Cn({initial:k?"instant":!1}),T=l.jsxs(Cs,{open:v,onOpenChange:i?void 0:h,className:"min-w-0",children:[l.jsxs(Is,{disabled:!S,className:V("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",S&&"[@media(hover:hover)]:hover:bg-accent/30",!S&&"cursor-default",k&&"shimmer"),"aria-disabled":!S,children:[l.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?l.jsx(Ze,{className:V("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:V("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",f?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",S&&(v?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),S&&l.jsx("div",{className:V("absolute inset-0 flex items-center justify-center transition-opacity duration-150",v?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:l.jsx(Ze,{className:V("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")})})]})}),l.jsx("span",{className:V("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),n?l.jsx("span",{className:"min-w-0 flex-1 truncate",children:l.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:n})}):l.jsx("div",{className:"flex-1"}),r&&l.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:r}),l.jsx(ht,{usage:t})]}),S&&l.jsx($s,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(c==="prose"?l.jsx("div",{className:"mt-1 mb-1",children:l.jsx("div",{ref:_.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:l.jsx("p",{ref:_.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:o})})}):l.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:l.jsx("div",{ref:_.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:l.jsxs("div",{ref:_.contentRef,className:"flex items-start justify-between gap-2",children:[l.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:l.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:o})}),l.jsx("button",{type:"button",onClick:()=>y(o),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?l.jsx(ct,{className:"size-3.5"}):l.jsx(Ts,{className:"size-3.5"})})]})})}))})]});return N?l.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:T}):T}function fe(s){const e=M.c(4),{latency:t}=s;if(t==null||t<=0)return null;let n;e[0]!==t?(n=be(t),e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=l.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:n}),e[2]=n,e[3]=a):a=e[3],a}const At=4;function Pt(s){const e=M.c(8),{count:t,noun:n,onClick:a}=s,o=H();let c;e[0]!==t||e[1]!==n||e[2]!==o?(c=o("common.seeAll",{count:t,noun:n}),e[0]=t,e[1]=n,e[2]=o,e[3]=c):c=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(xt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let u;return e[5]!==a||e[6]!==c?(u=l.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[c,i]}),e[5]=a,e[6]=c,e[7]=u):u=e[7],u}function Lt(s){const e=M.c(12),{message:t,className:n}=s,a=t.created_at??t.metadata?.created_at??null;let o,c,i,u;if(e[0]!==n||e[1]!==a){u=Symbol.for("react.early_return_sentinel");e:{const f=We(a);if(f===null){u=null;break e}const d=new Date(f);o=d.toLocaleString(),e[6]!==n?(c=V("text-[11px] text-muted-foreground/60 select-none",n),e[6]=n,e[7]=c):c=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=n,e[1]=a,e[2]=o,e[3]=c,e[4]=i,e[5]=u}else o=e[2],c=e[3],i=e[4],u=e[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;let r;return e[8]!==o||e[9]!==c||e[10]!==i?(r=l.jsx("span",{title:o,className:c,children:i}),e[8]=o,e[9]=c,e[10]=i,e[11]=r):r=e[11],r}function De(s){const e=M.c(9),{since:t}=s;let n;e[0]!==t?(n=()=>st(t,Date.now()),e[0]=t,e[1]=n):n=e[1];const[a,o]=z.useState(n);let c,i;e[2]!==t?(c=()=>{const d=setInterval(()=>o(st(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=c,e[4]=i):(c=e[3],i=e[4]),z.useEffect(c,i);const u=a/1e3;let r;e[5]!==u?(r=be(u),e[5]=u,e[6]=r):r=e[6];let f;return e[7]!==r?(f=l.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:r}),e[7]=r,e[8]=f):f=e[8],f}function In(s){return{planning:{icon:l.jsx(fs,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:l.jsx(Te,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const $n=1200;function Oe(s){const e=M.c(8),{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:i,trailing:u}=s,r=i===void 0?"prose":i;let f;return e[0]!==o||e[1]!==r||e[2]!==t||e[3]!==c||e[4]!==a||e[5]!==n||e[6]!==u?(f=l.jsx(Y,{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:r,trailing:u}),e[0]=o,e[1]=r,e[2]=t,e[3]=c,e[4]=a,e[5]=n,e[6]=u,e[7]=f):f=e[7],f}function Mn(s){const e=M.c(22),{startedAt:t}=s,n=H(),a=ye()?.runStatusStage??null,[o,c]=z.useState("planning");let i,u;if(e[0]!==a?(i=()=>{if(a!==null)return;const x=setTimeout(()=>{c("thinking")},$n);return()=>{clearTimeout(x)}},u=[a],e[0]=a,e[1]=i,e[2]=u):(i=e[1],u=e[2]),z.useEffect(i,u),a!==null){let x;e[3]!==a||e[4]!==n?(x=Bs(n,a),e[3]=a,e[4]=n,e[5]=x):x=e[5];const h=x;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(Te,{className:"size-4"}),e[6]=y):y=e[6];const b=`${h.label}...`;let k;e[7]!==t?(k=t!==null&&l.jsx(De,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==h.detail||e[10]!==b||e[11]!==k?(j=l.jsx(Oe,{icon:y,title:b,summary:h.detail,state:"loading",trailing:k}),e[9]=h.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let r;e[13]!==n?(r=In(n),e[13]=n,e[14]=r):r=e[14];const d=r[o],m=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&l.jsx(De,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==m||e[20]!==p?(g=l.jsx(Oe,{icon:d.icon,title:m,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=m,e[20]=p,e[21]=g):g=e[21],g}function An(s){const e=M.c(3),{startedAt:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(Sn,{}),e[0]=n):n=e[0];let a;return e[1]!==t?(a=l.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[n,l.jsx(De,{since:t})]}),e[1]=t,e[2]=a):a=e[2],a}const Pn=2e4;function Ln(s){const e=M.c(9),{startedAt:t}=s,n=H(),a=Ge(1e3),o=ye(),i=(t!==null?a-t:0)>=Pn;let u;e[0]!==t?(u=l.jsx(Mn,{startedAt:t}),e[0]=t,e[1]=u):u=e[1];let r;e[2]!==i||e[3]!==o||e[4]!==n?(r=i&&o?.stop&&l.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[l.jsx("span",{children:n("chat.thinkingIndicator.takingLonger")}),l.jsx("button",{type:"button",onClick:()=>o.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:n("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=o,e[4]=n,e[5]=r):r=e[5];let f;return e[6]!==u||e[7]!==r?(f=l.jsxs("div",{className:"flex flex-col gap-0.5",children:[u,r]}),e[6]=u,e[7]=r,e[8]=f):f=e[8],f}function En(s){const e=M.c(24),{duration:t,parts:n,isStreaming:a}=s,o=H();let c;e[0]!==n?(c=n.every(Fn),e[0]=n,e[1]=c):c=e[1];const i=c;let u;e[2]!==t||e[3]!==o?(u=t&&t/1e3>1?o("chat.thinkingIndicator.thoughtFor",{duration:be(t/1e3)}):o("chat.thinkingIndicator.thought"),e[2]=t,e[3]=o,e[4]=u):u=e[4];const r=u;let f;if(e[5]!==i||e[6]!==a||e[7]!==n){const k=n.map(zn).join(`
|
|
1
|
+
import{c as M,r as z,j as l,b as H,au as Ze,l as V,ah as ct,a2 as me,o as Yt,a9 as Zt,e as es,K as xe,t as Re,m as ut,ak as ts,H as ss,h as ns,B as Ue,aW as dt,aj as as,aF as ls,ek as os,el as ft,a5 as rs,z as is,x as He,d as qe,em as et,dS as cs,en as us}from"./index-Dif2W-7O.js";import{aO as ds,aP as fs,aD as ms,U as ps,a as tt,aw as gs,h as xs,a4 as hs,aQ as bs,aR as mt,aS as ys,q as ze,aK as js,aJ as vs,aT as pt,A as gt,aU as de,f as Ss,b as Ns,I as ks}from"./agent-icon-C8bMTp7B.js";import{t as Te,e as ws,b as _s}from"./Tool01-CFZYsvfT.js";import{i as xt}from"./LinkBroken01-Bt4dCcO2.js";import{a as Ts}from"./Copy01-DgkTTtAt.js";import{c as be,d as We,e as st}from"./format-time-CAj8AQXM.js";import{b as Cs,C as Is,a as $s}from"./collapsible-Dh7-8yfe.js";import{u as Ms}from"./use-copy-CZnKziVl.js";import{h as ht,i as As,d as Ce,c as Ps,P as Ls,u as Es,j as Rs,F as zs,s as Fs,b as Ds,k as Os}from"./usage-stats-NOThofFr.js";import{q as Bs,u as Us,v as Hs,x as qs}from"./thread-intent-BOI8Y8o4.js";import{f as ye,z as Ws,u as je,B as Gs,b as Ks,E as bt,F as Vs,G as Ie,H as Js,I as Qs}from"./chat-context-CdCmbIQJ.js";import{u as Ge}from"./use-clock-tick-C0eQyVp-.js";import{c as Xs}from"./content-blocks-o63cs2vh.js";import{M as Ys}from"./mcp-app-renderer-CIZFLg7D.js";import{g as yt}from"./types-DeNiBNDA.js";import{o as Zs}from"./omit-sandbox-map-jj4lCB2U.js";import{T as jt,a as vt,c as St}from"./tooltip-Be6wo5tR.js";import{c as en,u as tn,a as sn}from"./use-mcp-client-DvMvMjon.js";import{a as Nt,g as kt,s as wt}from"./tool-namespace-C03gU7a4.js";import{t as nn,g as pe,u as Ke}from"./utils-CVEq3hMx.js";import{i as _t}from"./AlertCircle-YMl3_Yl_.js";import{s as an,a as Ne}from"./Image01-CfFOGALp.js";import{s as ln}from"./XClose-z6Vm880I.js";import{n as Fe}from"./ShoppingBag01-1dmzAnTp.js";import{i as on}from"./SearchMd-Be0mEQAk.js";import{a as rn,e as cn}from"./shell-layout-C50mG8ul.js";import{a as Ve}from"./use-panel-navigate-nrEaz6Gi.js";import{c as Tt}from"./use-decopilot-events-BjrSXQDA.js";import{I as un,M as Ct}from"./markdown-C68Q-mkS.js";import{c as dn,S as fn,a as mn,b as pn}from"./sheet-CACWDefJ.js";import{I as ve}from"./integration-icon-Bo8-L4M5.js";import{a as It}from"./use-connection-CsbXqvOQ.js";import{u as $t}from"./use-navigate-to-agent-NXH_i538.js";import{i as ke}from"./Link01-DZOkcwx5.js";import{s as gn}from"./UserSquare-CZee7kCi.js";import{g as xn}from"./use-mcp-prompts-DC5dS3tb.js";import{t as hn}from"./ChevronUp-Bk1lLXIE.js";import{i as bn}from"./Monitor01-BYsgDMs3.js";import{a as yn}from"./use-thread-outputs-Cb3lONDK.js";import{n as jn}from"./ZoomOut-BTCRJ-Cy.js";import{F as vn}from"./file-type-icon-DF2XQzPr.js";const Mt=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Sn(){const s=M.c(5),[e]=z.useState(Nn);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let n;s[1]!==e?(n=Mt.map((o,c)=>{const{delay:i}=o;return l.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[c],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},c)}),s[1]=e,s[2]=n):n=s[2];let a;return s[3]!==n?(a=l.jsx("div",{className:"grid",style:t,children:n}),s[3]=n,s[4]=a):a=s[4],a}function Nn(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Mt.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}const kn={damping:.7,stiffness:.05,mass:1.25},wn=70,_n=1e3/60,Tn=350;let $e=!1;globalThis.document?.addEventListener("mousedown",()=>{$e=!0});globalThis.document?.addEventListener("mouseup",()=>{$e=!1});globalThis.document?.addEventListener("click",()=>{$e=!1});const Cn=(s={})=>{const[e,t]=z.useState(!1),[n,a]=z.useState(s.initial!==!1),[o,c]=z.useState(!1),i=z.useRef(null);i.current=s;const u=z.useCallback(()=>{if(!$e)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(h.current)||h.current?.contains(k.commonAncestorContainer)},[]),r=z.useCallback(b=>{d.isAtBottom=b,a(b)},[]),f=z.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=z.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return h.current?.scrollTop??0},set scrollTop(k){if(h.current){const{scrollBehavior:j}=getComputedStyle(h.current);j!=="auto"&&(h.current.style.scrollBehavior="auto"),h.current.scrollTop=k,d.ignoreScrollToTop=h.current.scrollTop,j!=="auto"&&(h.current.style.scrollBehavior=j)}},get targetScrollTop(){return!h.current||!y.current?0:h.current.scrollHeight-1-h.current.clientHeight},get calculatedTargetScrollTop(){if(!h.current||!y.current)return 0;const{targetScrollTop:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:h.current,contentElement:y.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=wn}}},[]),m=z.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||r(!0);const k=Date.now()+(Number(b.wait)||0),j=Pe(i.current,b.animation),{ignoreEscapes:w=!1}=b;let S,N=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{S=Date.now()}):S=k+(b.duration??0);const v=async()=>{const _=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:T}=d,A=performance.now(),P=(A-(d.lastTick??A))/_n;if(d.animation||(d.animation={behavior:j,promise:_,ignoreEscapes:w}),d.animation.behavior===j&&(d.lastTick=A),u()||k>Date.now())return v();if(T<Math.min(N,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,v();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*P,d.scrollTop+=d.accumulated,d.scrollTop!==T&&(d.accumulated=0)}return v()}return S>Date.now()?(N=d.calculatedTargetScrollTop,v()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?m({animation:Pe(i.current,i.current.resize),ignoreEscapes:w,duration:Math.max(0,S-Date.now())||void 0}):d.isAtBottom)});return _.then(T=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),T))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:v()},[r,u,d]),p=z.useCallback(()=>{f(!0),r(!1)},[f,r]),g=z.useCallback(({target:b})=>{if(b!==h.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:w=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(w=j),c(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(u()){f(!0),r(!1);return}const S=k>w,N=k<w;if(d.animation?.ignoreEscapes){d.scrollTop=w;return}N&&(f(!0),r(!1)),S&&f(!1),!d.escapedFromLock&&d.isNearBottom&&r(!0)},1)},[f,r,u,d]),x=z.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===h.current&&k<0&&h.current.scrollHeight>h.current.clientHeight&&!d.animation?.ignoreEscapes&&(f(!0),r(!1))},[f,r,d]),h=nt(b=>{h.current?.removeEventListener("scroll",g),h.current?.removeEventListener("wheel",x),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",x,{passive:!0})},[]),y=nt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:w}=j.contentRect,S=w-(k??w);if(d.resizeDifference=S,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),c(d.isNearBottom),S>=0){const N=Pe(i.current,k?i.current.resize:i.current.initial);m({animation:N,wait:!0,preserveScrollPosition:!0,duration:N==="instant"?void 0:Tn})}else d.isNearBottom&&(f(!1),r(!0));k=w,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===S&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:h,scrollToBottom:m,stopScroll:p,isAtBottom:n||o,isNearBottom:o,escapedFromLock:e,state:d}};function nt(s,e){const t=z.useCallback(n=>(t.current=n,s(n)),e);return t}const Ae=new Map;function Pe(...s){const e={...kn};let t=!1;for(const a of s){if(a==="instant"){t=!0;continue}typeof a=="object"&&(t=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const n=JSON.stringify(e);return Ae.has(n)||Ae.set(n,Object.freeze(e)),t?"instant":Ae.get(n)}function Y({icon:s,title:e,usage:t,summary:n,state:a,detail:o,detailVariant:c="code",forceOpen:i,variant:u="default",trailing:r,iconDestructive:f,alwaysChevron:d,defaultOpen:m,children:p}){const g=H(),[x,h]=z.useState(m??!1),{handleCopy:y,copied:b}=Ms(),k=a==="loading",j=a==="error",S=!!(o&&o.trim())||!!p,N=u==="subtask",v=(i??!1)||x,_=Cn({initial:k?"instant":!1}),T=l.jsxs(Cs,{open:v,onOpenChange:i?void 0:h,className:"min-w-0",children:[l.jsxs(Is,{disabled:!S,className:V("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",S&&"[@media(hover:hover)]:hover:bg-accent/30",!S&&"cursor-default",k&&"shimmer"),"aria-disabled":!S,children:[l.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?l.jsx(Ze,{className:V("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:V("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",f?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",S&&(v?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),S&&l.jsx("div",{className:V("absolute inset-0 flex items-center justify-center transition-opacity duration-150",v?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:l.jsx(Ze,{className:V("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")})})]})}),l.jsx("span",{className:V("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),n?l.jsx("span",{className:"min-w-0 flex-1 truncate",children:l.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:n})}):l.jsx("div",{className:"flex-1"}),r&&l.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:r}),l.jsx(ht,{usage:t})]}),S&&l.jsx($s,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(c==="prose"?l.jsx("div",{className:"mt-1 mb-1",children:l.jsx("div",{ref:_.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:l.jsx("p",{ref:_.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:o})})}):l.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:l.jsx("div",{ref:_.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:l.jsxs("div",{ref:_.contentRef,className:"flex items-start justify-between gap-2",children:[l.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:l.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:o})}),l.jsx("button",{type:"button",onClick:()=>y(o),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?l.jsx(ct,{className:"size-3.5"}):l.jsx(Ts,{className:"size-3.5"})})]})})}))})]});return N?l.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:T}):T}function fe(s){const e=M.c(4),{latency:t}=s;if(t==null||t<=0)return null;let n;e[0]!==t?(n=be(t),e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=l.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:n}),e[2]=n,e[3]=a):a=e[3],a}const At=4;function Pt(s){const e=M.c(8),{count:t,noun:n,onClick:a}=s,o=H();let c;e[0]!==t||e[1]!==n||e[2]!==o?(c=o("common.seeAll",{count:t,noun:n}),e[0]=t,e[1]=n,e[2]=o,e[3]=c):c=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(xt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let u;return e[5]!==a||e[6]!==c?(u=l.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[c,i]}),e[5]=a,e[6]=c,e[7]=u):u=e[7],u}function Lt(s){const e=M.c(12),{message:t,className:n}=s,a=t.created_at??t.metadata?.created_at??null;let o,c,i,u;if(e[0]!==n||e[1]!==a){u=Symbol.for("react.early_return_sentinel");e:{const f=We(a);if(f===null){u=null;break e}const d=new Date(f);o=d.toLocaleString(),e[6]!==n?(c=V("text-[11px] text-muted-foreground/60 select-none",n),e[6]=n,e[7]=c):c=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=n,e[1]=a,e[2]=o,e[3]=c,e[4]=i,e[5]=u}else o=e[2],c=e[3],i=e[4],u=e[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;let r;return e[8]!==o||e[9]!==c||e[10]!==i?(r=l.jsx("span",{title:o,className:c,children:i}),e[8]=o,e[9]=c,e[10]=i,e[11]=r):r=e[11],r}function De(s){const e=M.c(9),{since:t}=s;let n;e[0]!==t?(n=()=>st(t,Date.now()),e[0]=t,e[1]=n):n=e[1];const[a,o]=z.useState(n);let c,i;e[2]!==t?(c=()=>{const d=setInterval(()=>o(st(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=c,e[4]=i):(c=e[3],i=e[4]),z.useEffect(c,i);const u=a/1e3;let r;e[5]!==u?(r=be(u),e[5]=u,e[6]=r):r=e[6];let f;return e[7]!==r?(f=l.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:r}),e[7]=r,e[8]=f):f=e[8],f}function In(s){return{planning:{icon:l.jsx(fs,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:l.jsx(Te,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const $n=1200;function Oe(s){const e=M.c(8),{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:i,trailing:u}=s,r=i===void 0?"prose":i;let f;return e[0]!==o||e[1]!==r||e[2]!==t||e[3]!==c||e[4]!==a||e[5]!==n||e[6]!==u?(f=l.jsx(Y,{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:r,trailing:u}),e[0]=o,e[1]=r,e[2]=t,e[3]=c,e[4]=a,e[5]=n,e[6]=u,e[7]=f):f=e[7],f}function Mn(s){const e=M.c(22),{startedAt:t}=s,n=H(),a=ye()?.runStatusStage??null,[o,c]=z.useState("planning");let i,u;if(e[0]!==a?(i=()=>{if(a!==null)return;const x=setTimeout(()=>{c("thinking")},$n);return()=>{clearTimeout(x)}},u=[a],e[0]=a,e[1]=i,e[2]=u):(i=e[1],u=e[2]),z.useEffect(i,u),a!==null){let x;e[3]!==a||e[4]!==n?(x=Bs(n,a),e[3]=a,e[4]=n,e[5]=x):x=e[5];const h=x;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(Te,{className:"size-4"}),e[6]=y):y=e[6];const b=`${h.label}...`;let k;e[7]!==t?(k=t!==null&&l.jsx(De,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==h.detail||e[10]!==b||e[11]!==k?(j=l.jsx(Oe,{icon:y,title:b,summary:h.detail,state:"loading",trailing:k}),e[9]=h.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let r;e[13]!==n?(r=In(n),e[13]=n,e[14]=r):r=e[14];const d=r[o],m=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&l.jsx(De,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==m||e[20]!==p?(g=l.jsx(Oe,{icon:d.icon,title:m,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=m,e[20]=p,e[21]=g):g=e[21],g}function An(s){const e=M.c(3),{startedAt:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(Sn,{}),e[0]=n):n=e[0];let a;return e[1]!==t?(a=l.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[n,l.jsx(De,{since:t})]}),e[1]=t,e[2]=a):a=e[2],a}const Pn=2e4;function Ln(s){const e=M.c(9),{startedAt:t}=s,n=H(),a=Ge(1e3),o=ye(),i=(t!==null?a-t:0)>=Pn;let u;e[0]!==t?(u=l.jsx(Mn,{startedAt:t}),e[0]=t,e[1]=u):u=e[1];let r;e[2]!==i||e[3]!==o||e[4]!==n?(r=i&&o?.stop&&l.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[l.jsx("span",{children:n("chat.thinkingIndicator.takingLonger")}),l.jsx("button",{type:"button",onClick:()=>o.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:n("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=o,e[4]=n,e[5]=r):r=e[5];let f;return e[6]!==u||e[7]!==r?(f=l.jsxs("div",{className:"flex flex-col gap-0.5",children:[u,r]}),e[6]=u,e[7]=r,e[8]=f):f=e[8],f}function En(s){const e=M.c(24),{duration:t,parts:n,isStreaming:a}=s,o=H();let c;e[0]!==n?(c=n.every(Fn),e[0]=n,e[1]=c):c=e[1];const i=c;let u;e[2]!==t||e[3]!==o?(u=t&&t/1e3>1?o("chat.thinkingIndicator.thoughtFor",{duration:be(t/1e3)}):o("chat.thinkingIndicator.thought"),e[2]=t,e[3]=o,e[4]=u):u=e[4];const r=u;let f;if(e[5]!==i||e[6]!==a||e[7]!==n){const k=n.map(zn).join(`
|
|
2
2
|
`).trim().split(`
|
|
3
3
|
`).filter(Boolean),j=a?k[k.length-1]??"":k[0]??"";f=!i&&j?j.length>100?j.slice(0,100)+"…":j:void 0,e[5]=i,e[6]=a,e[7]=n,e[8]=f}else f=e[8];const d=f;let m;if(e[9]!==i||e[10]!==n){const b=n.map(Rn).join(`
|
|
4
4
|
|
|
@@ -45,4 +45,4 @@ Output: Tool execution was denied`)}}}return t.length>0?t.join(`
|
|
|
45
45
|
`);if(r)try{e.enqueue(JSON.parse(r))}catch{}}}}finally{t.releaseLock(),e.close()}}})}function $a(s){const{orgSlug:e,threadId:t,jobId:n,enabled:a}=s,[o,c]=z.useState([]),[i,u]=z.useState(!1);return z.useEffect(()=>{if(!a||!n||!t)return;const r=new AbortController;return c([]),u(!0),(async()=>{try{const f=await fetch(`/api/${encodeURIComponent(e)}/decopilot/threads/${encodeURIComponent(t)}/jobs/${encodeURIComponent(n)}/stream`,{headers:{accept:"text/event-stream"},credentials:"include",signal:r.signal});if(!f.ok||!f.body)return;for await(const d of Hs({stream:qs(Ia(f.body),void 0)})){if(r.signal.aborted)return;c([d])}}catch{}finally{r.signal.aborted||u(!1)}})(),()=>r.abort()},[a,n,t,e]),{messages:o,streaming:i}}function Ma(s,e){if(s&&typeof s=="object"&&!Array.isArray(s)){const t=s;if(typeof t.text=="string"||typeof t.error=="string"||typeof t.finishReason=="string"){if(typeof t.error=="string"&&t.error.length>0)return e("chat.subtask.failedWithError",{error:t.error});const a=typeof t.text=="string"?t.text.trim():"",o=t.finishReason==="length";return a?(o?`${e("chat.subtask.stepLimitPartial")}
|
|
46
46
|
|
|
47
47
|
`:"")+a:e(o?"chat.subtask.stepLimitNoOutput":"chat.subtask.completedNoOutput")}}return Zn(s)}function Ut(s){return!!s&&typeof s=="object"&&s.background===!0}function Ht({part:s,subtaskMeta:e},t){const n=s.state==="input-streaming"||s.state==="input-available",a=s.state==="output-available"&&s.preliminary===!0,o=s.state==="output-available"&&!s.preliminary,c=s.state==="output-error",i=pe(s.state,"preliminary"in s?s.preliminary:!1),u=i==="approval"?"idle":i,r=t(n?"chat.subtask.startingEllipsis":a?"chat.subtask.runningEllipsis":o?"chat.subtask.completedTitle":c?"chat.subtask.failedTitle":"chat.subtask.subtaskNoun"),f=s.input?.prompt??"",d=s.state==="approval-requested"?t("chat.subtask.awaitingApproval"):f.length>120?f.slice(0,120)+"…":f;return{fallbackTitle:r,summary:d,usage:e?.usage,state:u}}function qt(s){return s.state==="input-available"?!0:s.state==="output-available"?"preliminary"in s&&s.preliminary===!0:!1}function Wt(s){const e=M.c(4),t=je()?.taskId??null,{org:n}=me();if(!t)return null;let a;return e[0]!==n||e[1]!==t||e[2]!==s?(a=async()=>{if(t===null)return;const o=await fetch(`/api/${encodeURIComponent(n.slug)}/decopilot/flip/${encodeURIComponent(t)}`,{method:"POST",credentials:"include",headers:{"content-type":"application/json"},body:JSON.stringify({toolCallId:s})});if(!o.ok)throw new Error(`flip failed: ${o.status}`)},e[0]=n,e[1]=t,e[2]=s,e[3]=a):a=e[3],a}function Aa(s){const e=M.c(10),{onFlip:t}=s,n=H(),[a,o]=z.useState(!1);let c;e[0]!==t?(c=async f=>{f.stopPropagation(),o(!0);try{await t()}catch{o(!1)}},e[0]=t,e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=V("shrink-0 text-[12px] text-muted-foreground/70 px-2 py-1 rounded-lg transition-colors","[@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/40","disabled:opacity-50"),e[2]=i):i=e[2];let u;e[3]!==a||e[4]!==n?(u=n(a?"chat.subtask.flipping":"chat.subtask.flipToBackground"),e[3]=a,e[4]=n,e[5]=u):u=e[5];let r;return e[6]!==a||e[7]!==c||e[8]!==u?(r=l.jsx("button",{type:"button",disabled:a,onClick:c,className:i,children:u}),e[6]=a,e[7]=c,e[8]=u,e[9]=r):r=e[9],r}function Qe(s){const e=M.c(54),{icon:t,title:n,summary:a,state:o,usage:c,latency:i,onOpenChange:u,onFlip:r,children:f}=s,[d,m]=z.useState(!1);let p;e[0]!==u?(p=K=>{m(K),u?.(K)},e[0]=u,e[1]=p):p=e[1];const g=p,x=o==="loading",h=o==="error";let y;e[2]!==g?(y=()=>g(!0),e[2]=g,e[3]=y):y=e[3];const b=x&&"shimmer";let k;e[4]!==b?(k=V("group/tool flex items-center gap-2 flex-1 min-w-0 py-2.5 text-left rounded-lg transition-colors","[@media(hover:hover)]:hover:bg-accent/30",b),e[4]=b,e[5]=k):k=e[5];const j=h?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75";let w;e[6]!==j?(w=V("relative shrink-0 size-4 flex items-center justify-center [&>svg]:size-4",j),e[6]=j,e[7]=w):w=e[7];let S;e[8]!==t||e[9]!==w?(S=l.jsx("div",{className:w,children:t}),e[8]=t,e[9]=w,e[10]=S):S=e[10];const N=h?"text-warning/80":"text-foreground";let v;e[11]!==N?(v=V("shrink-0 text-[14px] font-normal",N),e[11]=N,e[12]=v):v=e[12];let _;e[13]!==v||e[14]!==n?(_=l.jsx("span",{className:v,children:n}),e[13]=v,e[14]=n,e[15]=_):_=e[15];let T;e[16]!==a?(T=a?l.jsx("span",{className:"min-w-0 flex-1 truncate",children:l.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:a})}):l.jsx("div",{className:"flex-1"}),e[16]=a,e[17]=T):T=e[17];let A;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=l.jsx(is,{className:"size-3.5 shrink-0 text-muted-foreground/40 opacity-0 transition-opacity [@media(hover:hover)]:group-hover/tool:opacity-100"}),e[18]=A):A=e[18];let P;e[19]!==i?(P=l.jsx(fe,{latency:i}),e[19]=i,e[20]=P):P=e[20];let E;e[21]!==c?(E=l.jsx(ht,{usage:c}),e[21]=c,e[22]=E):E=e[22];let L;e[23]!==_||e[24]!==T||e[25]!==P||e[26]!==E||e[27]!==y||e[28]!==k||e[29]!==S?(L=l.jsxs("button",{type:"button",onClick:y,className:k,children:[S,_,T,A,P,E]}),e[23]=_,e[24]=T,e[25]=P,e[26]=E,e[27]=y,e[28]=k,e[29]=S,e[30]=L):L=e[30];let I;e[31]!==x||e[32]!==r?(I=r&&x?l.jsx(Aa,{onFlip:r}):null,e[31]=x,e[32]=r,e[33]=I):I=e[33];let $;e[34]!==L||e[35]!==I?($=l.jsxs("div",{className:"flex items-center gap-1 w-full",children:[L,I]}),e[34]=L,e[35]=I,e[36]=$):$=e[36];let C;e[37]!==t?(C=l.jsx("span",{className:"flex items-center [&>svg]:size-4 [&>svg]:text-muted-foreground/75",children:t}),e[37]=t,e[38]=C):C=e[38];let R;e[39]!==C||e[40]!==n?(R=l.jsx(dn,{className:"px-4 py-3 border-b border-border shrink-0",children:l.jsxs(fn,{className:"flex items-center gap-2 text-sm font-medium",children:[C,n]})}),e[39]=C,e[40]=n,e[41]=R):R=e[41];let D;e[42]!==f?(D=l.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-4 py-4",children:f}),e[42]=f,e[43]=D):D=e[43];let B;e[44]!==R||e[45]!==D?(B=l.jsxs(mn,{side:"right",className:"w-full sm:max-w-2xl flex flex-col p-0 gap-0",children:[R,D]}),e[44]=R,e[45]=D,e[46]=B):B=e[46];let U;e[47]!==d||e[48]!==g||e[49]!==B?(U=l.jsx(pn,{open:d,onOpenChange:g,children:B}),e[47]=d,e[48]=g,e[49]=B,e[50]=U):U=e[50];let W;return e[51]!==$||e[52]!==U?(W=l.jsxs(l.Fragment,{children:[$,U]}),e[51]=$,e[52]=U,e[53]=W):W=e[53],W}function Gt(s){const e=M.c(22),{part:t}=s,n=H(),a=t.state==="output-error";let o;e[0]!==t.input?.prompt||e[1]!==n?(o=t.input?.prompt??n("chat.subtask.noPromptProvided"),e[0]=t.input?.prompt,e[1]=n,e[2]=o):o=e[2];const c=o;let i;if(e[3]!==a||e[4]!==t||e[5]!==c||e[6]!==n){const u=a?Me(t):Ma(t.output,n)??"";let r;e[8]!==n?(r=n("chat.subtask.taskLabel"),e[8]=n,e[9]=r):r=e[9];let f;e[10]!==r?(f=l.jsx("h3",{className:"text-xs font-medium text-muted-foreground/70 mb-1.5",children:r}),e[10]=r,e[11]=f):f=e[11];let d;e[12]!==c?(d=l.jsx("p",{className:"text-[13px] text-foreground/90 whitespace-pre-wrap wrap-break-word",children:c}),e[12]=c,e[13]=d):d=e[13];let m;e[14]!==f||e[15]!==d?(m=l.jsxs("section",{children:[f,d]}),e[14]=f,e[15]=d,e[16]=m):m=e[16];let p;e[17]!==a||e[18]!==n?(p=n(a?"chat.subtask.errorLabel":"chat.subtask.resultLabel"),e[17]=a,e[18]=n,e[19]=p):p=e[19];let g;e[20]!==p?(g=l.jsx("h3",{className:"text-xs font-medium text-muted-foreground/70 mb-1.5",children:p}),e[20]=p,e[21]=g):g=e[21],i=l.jsxs("div",{className:"flex flex-col gap-4",children:[m,l.jsxs("section",{children:[g,u.trim()?l.jsx(Ct,{id:`${t.toolCallId}-result`,text:u}):l.jsx("p",{className:"text-[13px] text-muted-foreground/60 italic",children:n("chat.subtask.running")})]})]}),e[3]=a,e[4]=t,e[5]=c,e[6]=n,e[7]=i}else i=e[7];return i}const Ee=600;function Pa(s){const e=M.c(12),{part:t}=s,n=t.type??"";let a;e[0]!==t.toolName||e[1]!==n?(a=n==="dynamic-tool"?t.toolName??"tool":n.slice(5),e[0]=t.toolName,e[1]=n,e[2]=a):a=e[2];const o=a;let c;if(e[3]!==t.input){const m=t.input!=null?JSON.stringify(t.input):"";c=m.length>80?`${m.slice(0,80)}…`:m||void 0,e[3]=t.input,e[4]=c}else c=e[4];const i=c;let u;if(e[5]!==t.input){const m=t.input!=null?JSON.stringify(t.input,null,2):null;u=m&&m.length>Ee?`${m.slice(0,Ee)}
|
|
48
|
-
… (${m.length-Ee} more characters)`:m,e[5]=t.input,e[6]=u}else u=e[6];const r=u;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(pt,{}),e[7]=f):f=e[7];let d;return e[8]!==r||e[9]!==o||e[10]!==i?(d=l.jsx(Y,{icon:f,title:o,summary:i,state:"idle",detail:r,detailVariant:"code"}),e[8]=r,e[9]=o,e[10]=i,e[11]=d):d=e[11],d}function La(s){const e=M.c(19),{jobId:t,prompt:n,items:a,streaming:o}=s,c=H();let i;e[0]!==c?(i=c("chat.subtask.taskLabel"),e[0]=c,e[1]=i):i=e[1];let u;e[2]!==i?(u=l.jsx("h3",{className:"text-xs font-medium text-muted-foreground/70 mb-1.5",children:i}),e[2]=i,e[3]=u):u=e[3];let r;e[4]!==n?(r=l.jsx("p",{className:"text-[13px] text-foreground/90 whitespace-pre-wrap wrap-break-word",children:n}),e[4]=n,e[5]=r):r=e[5];let f;e[6]!==u||e[7]!==r?(f=l.jsxs("section",{children:[u,r]}),e[6]=u,e[7]=r,e[8]=f):f=e[8];let d;e[9]!==a||e[10]!==t||e[11]!==o||e[12]!==c?(d=a.length===0?l.jsx("p",{className:"text-[13px] text-muted-foreground/60 italic py-1",children:c("chat.subtask.runningInBackground")}):a.map((g,x)=>{const h=g,y=h.type??"";return y==="text"?h.text?.trim()?l.jsx(Ce,{id:`${t}-sub-${x}`,part:g,animate:o},`${t}-sub-${x}`):null:y==="dynamic-tool"||y.startsWith("tool-")&&y!=="tool-todo_write"&&y!=="tool-update_interests"?l.jsx(Pa,{part:h},`${t}-sub-${x}`):null}),e[9]=a,e[10]=t,e[11]=o,e[12]=c,e[13]=d):d=e[13];let m;e[14]!==d?(m=l.jsx("section",{className:"flex flex-col gap-3 sm:gap-2",children:d}),e[14]=d,e[15]=m):m=e[15];let p;return e[16]!==f||e[17]!==m?(p=l.jsxs("div",{className:"flex flex-col gap-4",children:[f,m]}),e[16]=f,e[17]=m,e[18]=p):p=e[18],p}function Kt(s){const e=M.c(32),{part:t}=s,n=H(),a=t.output?.jobId,o=je()?.taskId??null,{org:c}=me(),[i,u]=z.useState(!1),r=Ca(a),f=o??"",d=i&&!!o;let m;e[0]!==a||e[1]!==c.slug||e[2]!==f||e[3]!==d?(m={orgSlug:c.slug,threadId:f,jobId:a,enabled:d},e[0]=a,e[1]=c.slug,e[2]=f,e[3]=d,e[4]=m):m=e[4];const p=$a(m);let g;e[5]!==p.messages?(g=p.messages.flatMap(Ra),e[5]=p.messages,e[6]=g):g=e[6];const x=g;let h;e[7]!==r?(h=r.flatMap(Ea),e[7]=r,e[8]=h):h=e[8];const y=h,b=x.length>0?x:y;let k;e[9]!==t.input?.prompt||e[10]!==n?(k=t.input?.prompt??n("chat.subtask.noPromptProvided"),e[9]=t.input?.prompt,e[10]=n,e[11]=k):k=e[11];const j=k;let w;e[12]!==j?(w=j.length>120?`${j.slice(0,120)}…`:j,e[12]=j,e[13]=w):w=e[13];const S=w,N=r.length===0;let v;e[14]!==n?(v=n("chat.subtask.subtaskNoun"),e[14]=n,e[15]=v):v=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=l.jsx(He,{}),e[16]=_):_=e[16];let T;e[17]!==v?(T=l.jsx(ve,{icon:void 0,name:v,size:"2xs",className:"rounded-xs",fallbackIcon:_}),e[17]=v,e[18]=T):T=e[18];let A;e[19]!==n?(A=n("chat.subtask.subtaskNoun"),e[19]=n,e[20]=A):A=e[20];const P=N?"loading":"idle",E=p.streaming||N;let L;e[21]!==b||e[22]!==a||e[23]!==j||e[24]!==E?(L=l.jsx(La,{jobId:a,prompt:j,items:b,streaming:E}),e[21]=b,e[22]=a,e[23]=j,e[24]=E,e[25]=L):L=e[25];let I;return e[26]!==S||e[27]!==T||e[28]!==A||e[29]!==P||e[30]!==L?(I=l.jsx(Qe,{icon:T,title:A,summary:S,state:P,onOpenChange:u,children:L}),e[26]=S,e[27]=T,e[28]=A,e[29]=P,e[30]=L,e[31]=I):I=e[31],I}function Ea(s){return s.parts??[]}function Ra(s){return s.parts??[]}function za(s){const e=M.c(24),t=H(),n=Wt(s.part.toolCallId);if(Ut(s.part.output)){let x;return e[0]!==s?(x=l.jsx(Kt,{...s}),e[0]=s,e[1]=x):x=e[1],x}let a;e[2]!==s||e[3]!==t?(a=Ht(s,t),e[2]=s,e[3]=t,e[4]=a):a=e[4];const{fallbackTitle:o,summary:c,usage:i,state:u}=a;let r;e[5]!==t?(r=t("chat.subtask.subtaskNoun"),e[5]=t,e[6]=r):r=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(He,{}),e[7]=f):f=e[7];let d;e[8]!==r?(d=l.jsx(ve,{icon:void 0,name:r,size:"2xs",className:"rounded-xs",fallbackIcon:f}),e[8]=r,e[9]=d):d=e[9];let m;e[10]!==n||e[11]!==s.part?(m=n&&qt(s.part)?n:void 0,e[10]=n,e[11]=s.part,e[12]=m):m=e[12];let p;e[13]!==s.part?(p=l.jsx(Gt,{part:s.part}),e[13]=s.part,e[14]=p):p=e[14];let g;return e[15]!==o||e[16]!==s.latency||e[17]!==u||e[18]!==c||e[19]!==d||e[20]!==m||e[21]!==p||e[22]!==i?(g=l.jsx(Qe,{icon:d,title:o,summary:c,state:u,usage:i,latency:s.latency,onFlip:m,children:p}),e[15]=o,e[16]=s.latency,e[17]=u,e[18]=c,e[19]=d,e[20]=m,e[21]=p,e[22]=i,e[23]=g):g=e[23],g}function Fa(s){const e=M.c(26),t=H(),n=It(s.part.input?.agent_id),a=Wt(s.part.toolCallId);if(Ut(s.part.output)){let b;return e[0]!==s?(b=l.jsx(Kt,{...s}),e[0]=s,e[1]=b):b=e[1],b}let o;e[2]!==s||e[3]!==t?(o=Ht(s,t),e[2]=s,e[3]=t,e[4]=o):o=e[4];const{fallbackTitle:c,summary:i,usage:u,state:r}=o,f=n?.icon;let d;e[5]!==t||e[6]!==n?.title?(d=n?.title??t("chat.subtask.subtaskNoun"),e[5]=t,e[6]=n?.title,e[7]=d):d=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=l.jsx(He,{}),e[8]=m):m=e[8];let p;e[9]!==f||e[10]!==d?(p=l.jsx(ve,{icon:f,name:d,size:"2xs",className:"rounded-xs",fallbackIcon:m}),e[9]=f,e[10]=d,e[11]=p):p=e[11];const g=n?.title??c;let x;e[12]!==a||e[13]!==s.part?(x=a&&qt(s.part)?a:void 0,e[12]=a,e[13]=s.part,e[14]=x):x=e[14];let h;e[15]!==s.part?(h=l.jsx(Gt,{part:s.part}),e[15]=s.part,e[16]=h):h=e[16];let y;return e[17]!==s.latency||e[18]!==r||e[19]!==i||e[20]!==p||e[21]!==g||e[22]!==x||e[23]!==h||e[24]!==u?(y=l.jsx(Qe,{icon:p,title:g,summary:i,state:r,usage:u,latency:s.latency,onFlip:x,children:h}),e[17]=s.latency,e[18]=r,e[19]=i,e[20]=p,e[21]=g,e[22]=x,e[23]=h,e[24]=u,e[25]=y):y=e[25],y}function Da(s){const e=M.c(28),{part:t}=s,n=H();if(!t.state.startsWith("output-"))return null;const a=t.input?.plan??"",c=t.output?.approved===!0;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(Fe,{className:"size-4 text-special shrink-0"}),e[0]=i):i=e[0];let u;e[1]!==n?(u=n("chat.proposePlan.implementationPlan"),e[1]=n,e[2]=u):u=e[2];let r;e[3]!==u?(r=l.jsx("span",{className:"text-[14px] font-medium text-foreground/80",children:u}),e[3]=u,e[4]=r):r=e[4];let f;e[5]!==c||e[6]!==n?(f=c&&l.jsxs("span",{className:"flex items-center gap-1 text-xs text-success bg-success/10 px-1.5 py-0.5 rounded-md",children:[l.jsx(ct,{size:12}),n("chat.proposePlan.approved")]}),e[5]=c,e[6]=n,e[7]=f):f=e[7];let d;e[8]!==c||e[9]!==t.state||e[10]!==n?(d=!c&&t.state==="output-available"&&l.jsx("span",{className:"text-xs text-muted-foreground/70 italic",children:n("chat.proposePlan.rejected")}),e[8]=c,e[9]=t.state,e[10]=n,e[11]=d):d=e[11];let m;e[12]!==r||e[13]!==f||e[14]!==d?(m=l.jsxs("div",{className:"flex items-center gap-2",children:[i,r,f,d]}),e[12]=r,e[13]=f,e[14]=d,e[15]=m):m=e[15];let p;e[16]!==n?(p=n("chat.proposePlan.viewPlan"),e[16]=n,e[17]=p):p=e[17];let g;e[18]!==p?(g=l.jsx("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:p}),e[18]=p,e[19]=g):g=e[19];let x;e[20]!==a?(x=l.jsx("div",{className:"mt-1 pl-2 border-l-2 border-special/30 prose prose-sm max-w-none text-sm",children:l.jsx(Ce,{id:"plan-content",part:{type:"text",text:a}})}),e[20]=a,e[21]=x):x=e[21];let h;e[22]!==g||e[23]!==x?(h=l.jsxs("details",{className:"ml-6",children:[g,x]}),e[22]=g,e[23]=x,e[24]=h):h=e[24];let y;return e[25]!==h||e[26]!==m?(y=l.jsxs("div",{className:"my-1.5 flex flex-col gap-1",children:[m,h]}),e[25]=h,e[26]=m,e[27]=y):y=e[27],y}function Be(s){const e=M.c(4),{connection_id:t,iconSize:n}=s,a=n===void 0?"xs":n,o=It(t);if(!o)return null;let c;return e[0]!==o.icon||e[1]!==o.title||e[2]!==a?(c=l.jsx("div",{className:"shrink-0 bg-background ring-1 ring-background rounded-lg",children:l.jsx(ve,{icon:o.icon,name:o.title,size:a})}),e[0]=o.icon,e[1]=o.title,e[2]=a,e[3]=c):c=e[3],c}Be.Fallback=function({iconSize:e="xs"}){const t=e==="sm"?"size-6":"size-5";return l.jsx("div",{className:"shrink-0 bg-background ring-1 ring-background rounded-lg",children:l.jsx("div",{className:V(t,"rounded bg-muted animate-pulse")})})};function he(s){const e=M.c(18),{connectionIds:t,maxVisibleIcons:n,iconSize:a,className:o}=s,c=n===void 0?2:n,i=a===void 0?"xs":a;if(t.length===0)return null;let u,r,f;if(e[0]!==o||e[1]!==t||e[2]!==i||e[3]!==c){const p=t.slice(0,c);u=t.length-c,e[7]!==o?(r=V("flex items-center justify-end -space-x-2",o),e[7]=o,e[8]=r):r=e[8];let g;e[9]!==i?(g=x=>l.jsx(z.Suspense,{fallback:l.jsx(Be.Fallback,{iconSize:i}),children:l.jsx(Be,{connection_id:x,iconSize:i})},x),e[9]=i,e[10]=g):g=e[10],f=p.map(g),e[0]=o,e[1]=t,e[2]=i,e[3]=c,e[4]=u,e[5]=r,e[6]=f}else u=e[4],r=e[5],f=e[6];let d;e[11]!==i||e[12]!==u?(d=u>0&&l.jsx("div",{className:V("shrink-0 bg-background ring-1 ring-background border border-border rounded-lg flex items-center justify-center",i==="sm"?"size-8":"size-6"),children:l.jsxs("span",{className:V(i==="sm"?"text-sm":"text-xs","font-medium text-muted-foreground"),"aria-label":`and ${u} more`,children:["+",u]})}),e[11]=i,e[12]=u,e[13]=d):d=e[13];let m;return e[14]!==r||e[15]!==f||e[16]!==d?(m=l.jsxs("div",{className:r,children:[f,d]}),e[14]=r,e[15]=f,e[16]=d,e[17]=m):m=e[17],m}he.Fallback=function({maxVisibleIcons:e=2,totalCount:t,iconSize:n="xs"}){const a=n==="sm"?"size-6":"size-5",o=n==="sm"?"size-8":"size-6",c=t!==void 0&&t>e;return l.jsxs("div",{className:"flex items-center -space-x-2",children:[Array.from({length:e}).map((i,u)=>l.jsx("div",{className:"shrink-0 bg-background ring-1 ring-background rounded-lg",children:l.jsx("div",{className:V(a,"rounded bg-muted animate-pulse")})},u)),c&&l.jsx("div",{className:V("shrink-0 bg-background ring-1 ring-background border border-border rounded-lg flex items-center justify-center",o),children:l.jsx("div",{className:V(n==="sm"?"h-3.5 w-5":"h-3 w-4","rounded bg-muted animate-pulse")})})]})};const Oa="This document certifies that the bearer agent has been granted authorized access to the tools and capabilities described herein. The agent is permitted to operate within the scope defined by its instructions and shall act in accordance with the constraints set forth by the issuing organization. This credential remains valid for the duration of the agent's active status. Unauthorized modification of this agent's permissions or scope is prohibited. The issuing authority reserves the right to revoke access at any time. All actions performed by this agent are subject to audit and review by the organization administrator. ",it=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)"):null;function Ba(s){const e=M.c(105),{part:t,latency:n}=s,a=H(),o=$t(),c=pe(t.state),i=z.useRef(null),u=z.useRef(null),r=z.useRef(null),f=z.useRef(null),d=z.useRef(null);let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{it?.matches||(d.current=i.current?.getBoundingClientRect()??null,i.current&&(i.current.style.willChange="transform"))},e[0]=m):m=e[0];const p=m;let g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g=F=>{if(it?.matches)return;const O=d.current,q=i.current;if(!O||!q)return;const ae=(F.clientX-O.left)/O.width*100,le=(F.clientY-O.top)/O.height*100;q.style.transform=`perspective(800px) rotateY(${(ae-50)*.05}deg) rotateX(${(le-50)*-.05}deg)`,u.current&&(u.current.style.opacity="1",u.current.style.transform=`translate(${(ae-50)*.15}px, ${(le-50)*.15}px)`),r.current&&(r.current.style.opacity="0.45"),f.current&&(f.current.style.opacity="0.45")},e[1]=g):g=e[1];const x=g;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{const F=i.current;F&&(F.style.transform="none",F.style.willChange="auto"),u.current&&(u.current.style.opacity="0.4",u.current.style.transform="translate(0, 0)"),r.current&&(r.current.style.opacity="0.3"),f.current&&(f.current.style.opacity="0.3"),d.current=null},e[2]=h):h=e[2];const y=h;if(c==="loading"){let F;e[3]===Symbol.for("react.memo_cache_sentinel")?(F=l.jsx(de,{className:"animate-pulse"}),e[3]=F):F=e[3];let O;e[4]!==a?(O=a("chat.agentCreate.creating"),e[4]=a,e[5]=O):O=e[5];let q;return e[6]!==O?(q=l.jsx(Y,{icon:F,title:O,state:"loading",defaultOpen:!0}),e[6]=O,e[7]=q):q=e[7],q}if(c==="approval"){let F;e[8]===Symbol.for("react.memo_cache_sentinel")?(F=l.jsx(de,{}),e[8]=F):F=e[8];let O;e[9]!==a?(O=a("chat.agentCreate.createAgent"),e[9]=a,e[10]=O):O=e[10];let q;return e[11]!==O?(q=l.jsx(Y,{icon:F,title:O,state:"idle"}),e[11]=O,e[12]=q):q=e[12],q}if(c==="error"){let F;e[13]===Symbol.for("react.memo_cache_sentinel")?(F=l.jsx(de,{}),e[13]=F):F=e[13];let O;e[14]!==t.state||e[15]!==a?(O=t.state==="output-denied"?a("chat.agentCreate.cancelled"):a("chat.agentCreate.couldntCreate"),e[14]=t.state,e[15]=a,e[16]=O):O=e[16];let q;e[17]!==n?(q=l.jsx(fe,{latency:n}),e[17]=n,e[18]=q):q=e[18];let ae;return e[19]!==O||e[20]!==q?(ae=l.jsx(Y,{icon:F,title:O,state:"error",trailing:q}),e[19]=O,e[20]=q,e[21]=ae):ae=e[21],ae}let b,k,j,w,S,N,v,_,T,A,P,E,L,I,$,C,R,D,B,U,W,K,X;if(e[22]!==n||e[23]!==o||e[24]!==t.output||e[25]!==a){R=Symbol.for("react.early_return_sentinel");e:{const F=Ke(t.output)?.item;if(!F?.id||!F?.title){let ie;e[49]===Symbol.for("react.memo_cache_sentinel")?(ie=l.jsx(de,{}),e[49]=ie):ie=e[49];let ce;e[50]!==a?(ce=a("chat.agentCreate.created"),e[50]=a,e[51]=ce):ce=e[51];let J;e[52]!==n?(J=l.jsx(fe,{latency:n}),e[52]=n,e[53]=J):J=e[53];let te;e[54]!==ce||e[55]!==J?(te=l.jsx(Y,{icon:ie,title:ce,state:"idle",trailing:J}),e[54]=ce,e[55]=J,e[56]=te):te=e[56],R=te;break e}const O=(F.connections??[]).map(Ua);let q;e[57]===Symbol.for("react.memo_cache_sentinel")?(q=l.jsx(de,{className:"text-success"}),e[57]=q):q=e[57];let ae;e[58]!==n?(ae=l.jsx(fe,{latency:n}),e[58]=n,e[59]=ae):ae=e[59],C=l.jsx(Y,{icon:q,title:a("chat.agentCreate.agentCreated",{name:F.title}),state:"idle",trailing:ae}),$="mt-2 overflow-hidden rounded-xl border-[0.5px] border-border bg-card p-2.5",j=i,w="relative overflow-hidden rounded-lg bg-accent/25 p-2",e[60]===Symbol.for("react.memo_cache_sentinel")?(S={transition:"transform 0.3s ease-out"},e[60]=S):S=e[60],N=p,v=x,_=y,e[61]===Symbol.for("react.memo_cache_sentinel")?(T=l.jsx("div",{ref:u,className:"pointer-events-none absolute inset-[-20%] z-[1] select-none rounded-lg",style:{background:"linear-gradient(135deg, hsla(280, 60%, 80%, 0.35) 0%, transparent 35%), linear-gradient(315deg, hsla(190, 70%, 80%, 0.35) 0%, transparent 35%), linear-gradient(225deg, hsla(140, 55%, 80%, 0.3) 0%, transparent 30%), linear-gradient(45deg, hsla(320, 55%, 82%, 0.3) 0%, transparent 30%)",opacity:.4,transition:"opacity 0.3s ease, transform 0.3s ease-out"},"aria-hidden":"true"}),e[61]=T):T=e[61];let le;e[62]===Symbol.for("react.memo_cache_sentinel")?(le={textAlign:"justify",wordBreak:"break-all"},e[62]=le):le=e[62],e[63]===Symbol.for("react.memo_cache_sentinel")?(A=l.jsx("p",{className:"pointer-events-none absolute inset-0 z-[1] select-none overflow-hidden text-[6px] font-light leading-[1.5] tracking-[0.06px] text-background opacity-50 mix-blend-overlay",style:le,"aria-hidden":"true",children:Oa.repeat(6)}),P=l.jsx("img",{src:"/stamp.svg",alt:"",className:"pointer-events-none absolute -right-10 -top-10 size-[140px] opacity-50 select-none","aria-hidden":"true"}),e[63]=A,e[64]=P):(A=e[63],P=e[64]),e[65]===Symbol.for("react.memo_cache_sentinel")?(E=l.jsx("img",{ref:r,src:"/left-guilloche.png",alt:"",className:"pointer-events-none absolute inset-y-0 left-0 h-full w-auto select-none z-[1] mix-blend-overlay",style:{opacity:.3,transition:"opacity 0.3s ease"},"aria-hidden":"true"}),e[65]=E):E=e[65],e[66]===Symbol.for("react.memo_cache_sentinel")?(L=l.jsx("img",{ref:f,src:"/right-guilloche.png",alt:"",className:"pointer-events-none absolute inset-y-0 right-0 h-full w-auto select-none z-[1] mix-blend-overlay",style:{opacity:.3,transition:"opacity 0.3s ease"},"aria-hidden":"true"}),e[66]=L):L=e[66],I=l.jsxs("div",{className:"relative",children:[l.jsxs("div",{className:"flex items-center gap-2.5 p-2",children:[l.jsx(gt,{icon:F.icon,name:F.title,size:"md"}),l.jsx("div",{className:"flex-1 min-w-0",children:l.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:F.title})})]}),F.description&&l.jsx("div",{className:"px-2 pt-1 pr-16",children:l.jsx("p",{className:"text-sm leading-snug text-muted-foreground line-clamp-2",children:F.description})})]}),X="relative z-[3] flex items-center gap-2.5 px-2 pt-6 pb-1";const ue=O.length>0&&l.jsx(z.Suspense,{fallback:l.jsx(he.Fallback,{iconSize:"xs",maxVisibleIcons:3,totalCount:O.length}),children:l.jsx(he,{connectionIds:O,iconSize:"xs",maxVisibleIcons:3,className:"flex items-center justify-start -space-x-1"})});e[67]!==ue?(k=l.jsx("div",{className:"flex-1 min-w-0",children:ue}),e[67]=ue,e[68]=k):k=e[68],K="flex items-center gap-2 shrink-0",b=Ue,D="sm",B="h-7",U=()=>o(F.id),W=a("chat.agentCreate.seeAgentLabel",{name:F.title})}e[22]=n,e[23]=o,e[24]=t.output,e[25]=a,e[26]=b,e[27]=k,e[28]=j,e[29]=w,e[30]=S,e[31]=N,e[32]=v,e[33]=_,e[34]=T,e[35]=A,e[36]=P,e[37]=E,e[38]=L,e[39]=I,e[40]=$,e[41]=C,e[42]=R,e[43]=D,e[44]=B,e[45]=U,e[46]=W,e[47]=K,e[48]=X}else b=e[26],k=e[27],j=e[28],w=e[29],S=e[30],N=e[31],v=e[32],_=e[33],T=e[34],A=e[35],P=e[36],E=e[37],L=e[38],I=e[39],$=e[40],C=e[41],R=e[42],D=e[43],B=e[44],U=e[45],W=e[46],K=e[47],X=e[48];if(R!==Symbol.for("react.early_return_sentinel"))return R;let Z;e[69]!==a?(Z=a("chat.agentCreate.seeAgent"),e[69]=a,e[70]=Z):Z=e[70];let G;e[71]!==b||e[72]!==Z||e[73]!==D||e[74]!==B||e[75]!==U||e[76]!==W?(G=l.jsx(b,{size:D,className:B,onClick:U,"aria-label":W,children:Z}),e[71]=b,e[72]=Z,e[73]=D,e[74]=B,e[75]=U,e[76]=W,e[77]=G):G=e[77];let Q;e[78]!==G||e[79]!==K?(Q=l.jsx("div",{className:K,children:G}),e[78]=G,e[79]=K,e[80]=Q):Q=e[80];let ne;e[81]!==k||e[82]!==Q||e[83]!==X?(ne=l.jsxs("div",{className:X,children:[k,Q]}),e[81]=k,e[82]=Q,e[83]=X,e[84]=ne):ne=e[84];let oe;e[85]!==j||e[86]!==w||e[87]!==S||e[88]!==N||e[89]!==v||e[90]!==_||e[91]!==T||e[92]!==A||e[93]!==P||e[94]!==E||e[95]!==L||e[96]!==I||e[97]!==ne?(oe=l.jsxs("div",{ref:j,className:w,style:S,onMouseEnter:N,onMouseMove:v,onMouseLeave:_,children:[T,A,P,E,L,I,ne]}),e[85]=j,e[86]=w,e[87]=S,e[88]=N,e[89]=v,e[90]=_,e[91]=T,e[92]=A,e[93]=P,e[94]=E,e[95]=L,e[96]=I,e[97]=ne,e[98]=oe):oe=e[98];let ee;e[99]!==$||e[100]!==oe?(ee=l.jsx("div",{className:$,children:oe}),e[99]=$,e[100]=oe,e[101]=ee):ee=e[101];let re;return e[102]!==C||e[103]!==ee?(re=l.jsxs(l.Fragment,{children:[C,ee]}),e[102]=C,e[103]=ee,e[104]=re):re=e[104],re}function Ua(s){return s.connection_id}function Ha(s){const e=M.c(24),{agent:t}=s,n=$t();if(!t.id)return null;let a;e[0]!==t.connections?(a=t.connections??[],e[0]=t.connections,e[1]=a):a=e[1];let o;e[2]!==a?(o=a.map(qa),e[2]=a,e[3]=o):o=e[3];const c=o;let i;e[4]!==t.id||e[5]!==n?(i=()=>n(t.id),e[4]=t.id,e[5]=n,e[6]=i):i=e[6];let u;e[7]!==t.icon||e[8]!==t.title?(u=l.jsx(gt,{icon:t.icon,name:t.title,size:"sm"}),e[7]=t.icon,e[8]=t.title,e[9]=u):u=e[9];let r;e[10]!==t.title?(r=l.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:t.title}),e[10]=t.title,e[11]=r):r=e[11];let f;e[12]!==t.description?(f=t.description&&l.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[12]=t.description,e[13]=f):f=e[13];let d;e[14]!==r||e[15]!==f?(d=l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[r,f]}),e[14]=r,e[15]=f,e[16]=d):d=e[16];let m;e[17]!==c?(m=c.length>0&&l.jsx(z.Suspense,{fallback:l.jsx(he.Fallback,{iconSize:"xs",maxVisibleIcons:3,totalCount:c.length}),children:l.jsx(he,{connectionIds:c,iconSize:"xs",maxVisibleIcons:3})}),e[17]=c,e[18]=m):m=e[18];let p;return e[19]!==i||e[20]!==u||e[21]!==d||e[22]!==m?(p=l.jsxs("button",{type:"button",onClick:i,className:"group flex w-full items-center gap-3 rounded-lg border border-border bg-card px-3 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[u,d,m]}),e[19]=i,e[20]=u,e[21]=d,e[22]=m,e[23]=p):p=e[23],p}function qa(s){return s.connection_id}function Wa(s){const e=M.c(59),{part:t,latency:n}=s,a=H(),o=qe(),{org:c}=me();let i;e[0]!==t.state?(i=pe(t.state),e[0]=t.state,e[1]=i):i=e[1];const u=i;let r,f,d,m,p,g;if(e[2]!==n||e[3]!==t.output||e[4]!==t.state||e[5]!==u||e[6]!==a){g=Symbol.for("react.early_return_sentinel");e:{const b=Ke(t.output);if(f=Array.isArray(b?.items)?b.items:[],u==="loading"){let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(de,{className:"animate-pulse"}),e[13]=S):S=e[13];let N;e[14]!==a?(N=a("chat.agentList.loading"),e[14]=a,e[15]=N):N=e[15];let v;e[16]!==N?(v=l.jsx(Y,{icon:S,title:N,state:"loading"}),e[16]=N,e[17]=v):v=e[17],g=v;break e}if(u==="approval"){let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(de,{}),e[18]=S):S=e[18];let N;e[19]!==a?(N=a("chat.agentList.listAgents"),e[19]=a,e[20]=N):N=e[20];let v;e[21]!==N?(v=l.jsx(Y,{icon:S,title:N,state:"idle"}),e[21]=N,e[22]=v):v=e[22],g=v;break e}if(u==="error"){let S;e[23]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(de,{}),e[23]=S):S=e[23];let N;e[24]!==t.state||e[25]!==a?(N=t.state==="output-denied"?a("chat.agentList.unavailable"):a("chat.agentList.couldntLoad"),e[24]=t.state,e[25]=a,e[26]=N):N=e[26];let v;e[27]!==n?(v=l.jsx(fe,{latency:n}),e[27]=n,e[28]=v):v=e[28];let _;e[29]!==N||e[30]!==v?(_=l.jsx(Y,{icon:S,title:N,state:"error",trailing:v}),e[29]=N,e[30]=v,e[31]=_):_=e[31],g=_;break e}if(f.length===0){let S;e[32]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(de,{}),e[32]=S):S=e[32];let N;e[33]!==a?(N=a("chat.agentList.noAgents"),e[33]=a,e[34]=N):N=e[34];let v;e[35]!==a?(v=a("chat.agentList.noAgentsDesc"),e[35]=a,e[36]=v):v=e[36];let _;e[37]!==n?(_=l.jsx(fe,{latency:n}),e[37]=n,e[38]=_):_=e[38];let T;e[39]!==N||e[40]!==v||e[41]!==_?(T=l.jsx(Y,{icon:S,title:N,summary:v,state:"idle",trailing:_}),e[39]=N,e[40]=v,e[41]=_,e[42]=T):T=e[42],g=T;break e}const k=f.slice(0,At);r=f.length-k.length;let j;e[43]===Symbol.for("react.memo_cache_sentinel")?(j=l.jsx(de,{className:"text-success"}),e[43]=j):j=e[43];let w;e[44]!==n?(w=l.jsx(fe,{latency:n}),e[44]=n,e[45]=w):w=e[45],p=l.jsx(Y,{icon:j,title:f.length===1?a("chat.agentList.oneAgent"):a("chat.agentList.multiAgents",{count:f.length}),state:"idle",trailing:w}),d="mt-2 flex flex-col gap-1.5",m=k.map(Ga)}e[2]=n,e[3]=t.output,e[4]=t.state,e[5]=u,e[6]=a,e[7]=r,e[8]=f,e[9]=d,e[10]=m,e[11]=p,e[12]=g}else r=e[7],f=e[8],d=e[9],m=e[10],p=e[11],g=e[12];if(g!==Symbol.for("react.early_return_sentinel"))return g;let x;e[46]!==r||e[47]!==f||e[48]!==o||e[49]!==c||e[50]!==a?(x=r>0&&l.jsx(Pt,{count:f.length,noun:a("chat.agentList.agentsNoun"),onClick:()=>o({to:"/$org/settings/projects",params:{org:c.slug}})}),e[46]=r,e[47]=f,e[48]=o,e[49]=c,e[50]=a,e[51]=x):x=e[51];let h;e[52]!==d||e[53]!==m||e[54]!==x?(h=l.jsxs("div",{className:d,children:[m,x]}),e[52]=d,e[53]=m,e[54]=x,e[55]=h):h=e[55];let y;return e[56]!==p||e[57]!==h?(y=l.jsxs(l.Fragment,{children:[p,h]}),e[56]=p,e[57]=h,e[58]=y):y=e[58],y}function Ga(s){return l.jsx(Ha,{agent:s},s.id)}const Ka={active:"bg-success",inactive:"bg-muted-foreground",error:"bg-destructive"};function Va(s){const e=M.c(27),{connection:t}=s,n=qe(),{org:a}=me(),o=t.slug,c=t.description||t.app_name,i=!o||void 0;let u;e[0]!==n||e[1]!==a||e[2]!==o?(u=()=>o&&n({to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:o}}),e[0]=n,e[1]=a,e[2]=o,e[3]=u):u=e[3];let r;e[4]!==t.icon||e[5]!==t.title?(r=l.jsx(ve,{icon:t.icon,name:t.title,size:"sm"}),e[4]=t.icon,e[5]=t.title,e[6]=r):r=e[6];let f;e[7]!==t.title?(f=l.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:t.title}),e[7]=t.title,e[8]=f):f=e[8];let d;e[9]!==c?(d=c&&l.jsx("span",{className:"truncate text-xs text-muted-foreground",children:c}),e[9]=c,e[10]=d):d=e[10];let m;e[11]!==f||e[12]!==d?(m=l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[f,d]}),e[11]=f,e[12]=d,e[13]=m):m=e[13];const p=Ka[t.status]??"bg-muted-foreground";let g;e[14]!==p?(g=V("size-2 shrink-0 rounded-full",p),e[14]=p,e[15]=g):g=e[15];let x;e[16]!==g?(x=l.jsx("span",{className:g,"aria-hidden":"true"}),e[16]=g,e[17]=x):x=e[17];let h;e[18]!==t.status?(h=l.jsx("span",{className:"sr-only",children:t.status}),e[18]=t.status,e[19]=h):h=e[19];let y;return e[20]!==i||e[21]!==h||e[22]!==u||e[23]!==r||e[24]!==m||e[25]!==x?(y=l.jsxs("button",{type:"button","aria-disabled":i,onClick:u,className:"group flex w-full items-center gap-3 rounded-lg border border-border bg-card px-3 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer aria-disabled:cursor-default aria-disabled:hover:bg-card",children:[r,m,x,h]}),e[20]=i,e[21]=h,e[22]=u,e[23]=r,e[24]=m,e[25]=x,e[26]=y):y=e[26],y}function Ja(s){const e=M.c(54),{part:t,latency:n}=s,a=H(),o=qe(),{org:c}=me();let i;e[0]!==t.state?(i=pe(t.state),e[0]=t.state,e[1]=i):i=e[1];const u=i;let r,f,d,m,p,g;if(e[2]!==n||e[3]!==t.output||e[4]!==t.state||e[5]!==u||e[6]!==a){g=Symbol.for("react.early_return_sentinel");e:{const b=Ke(t.output);if(f=(Array.isArray(b?.items)?b.items:[]).filter(Xa),u==="loading"||u==="approval"){let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(ke,{className:"animate-pulse"}),e[13]=S):S=e[13];let N;e[14]!==a?(N=a("chat.connectionList.loadingTitle"),e[14]=a,e[15]=N):N=e[15];let v;e[16]!==N?(v=l.jsx(Y,{icon:S,title:N,state:"loading"}),e[16]=N,e[17]=v):v=e[17],g=v;break e}if(u==="error"){let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(ke,{}),e[18]=S):S=e[18];let N;e[19]!==t.state||e[20]!==a?(N=t.state==="output-denied"?a("chat.connectionList.unavailableTitle"):a("chat.connectionList.errorTitle"),e[19]=t.state,e[20]=a,e[21]=N):N=e[21];let v;e[22]!==n?(v=l.jsx(fe,{latency:n}),e[22]=n,e[23]=v):v=e[23];let _;e[24]!==N||e[25]!==v?(_=l.jsx(Y,{icon:S,title:N,state:"error",trailing:v}),e[24]=N,e[25]=v,e[26]=_):_=e[26],g=_;break e}if(f.length===0){let S;e[27]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(ke,{}),e[27]=S):S=e[27];let N;e[28]!==a?(N=a("chat.connectionList.emptyTitle"),e[28]=a,e[29]=N):N=e[29];let v;e[30]!==a?(v=a("chat.connectionList.emptySummary"),e[30]=a,e[31]=v):v=e[31];let _;e[32]!==n?(_=l.jsx(fe,{latency:n}),e[32]=n,e[33]=_):_=e[33];let T;e[34]!==N||e[35]!==v||e[36]!==_?(T=l.jsx(Y,{icon:S,title:N,summary:v,state:"idle",trailing:_}),e[34]=N,e[35]=v,e[36]=_,e[37]=T):T=e[37],g=T;break e}const k=f.slice(0,At);r=f.length-k.length;let j;e[38]===Symbol.for("react.memo_cache_sentinel")?(j=l.jsx(ke,{className:"text-success"}),e[38]=j):j=e[38];let w;e[39]!==n?(w=l.jsx(fe,{latency:n}),e[39]=n,e[40]=w):w=e[40],p=l.jsx(Y,{icon:j,title:f.length===1?a("chat.connectionList.singleConnection"):a("chat.connectionList.multipleConnections",{count:f.length}),state:"idle",trailing:w}),d="mt-2 flex flex-col gap-1.5",m=k.map(Qa)}e[2]=n,e[3]=t.output,e[4]=t.state,e[5]=u,e[6]=a,e[7]=r,e[8]=f,e[9]=d,e[10]=m,e[11]=p,e[12]=g}else r=e[7],f=e[8],d=e[9],m=e[10],p=e[11],g=e[12];if(g!==Symbol.for("react.early_return_sentinel"))return g;let x;e[41]!==r||e[42]!==f||e[43]!==o||e[44]!==c||e[45]!==a?(x=r>0&&l.jsx(Pt,{count:f.length,noun:a("chat.connectionList.connectionNoun"),onClick:()=>o({to:"/$org/settings/connections",params:{org:c.slug}})}),e[41]=r,e[42]=f,e[43]=o,e[44]=c,e[45]=a,e[46]=x):x=e[46];let h;e[47]!==d||e[48]!==m||e[49]!==x?(h=l.jsxs("div",{className:d,children:[m,x]}),e[47]=d,e[48]=m,e[49]=x,e[50]=h):h=e[50];let y;return e[51]!==p||e[52]!==h?(y=l.jsxs(l.Fragment,{children:[p,h]}),e[51]=p,e[52]=h,e[53]=y):y=e[53],y}function Qa(s){return l.jsx(Va,{connection:s},s.id)}function Xa(s){return s.connection_type!=="VIRTUAL"}function Ya(){const s=M.c(46),e=H(),t=je(),{sendMessage:n,isStreaming:a,messages:o}=Ks(),{org:c}=me(),i=t?.virtualMcpId,{prompts:u}=cn(c.slug),r=i??null;let f;s[0]!==c.id||s[1]!==c.slug||s[2]!==r?(f={connectionId:r,orgId:c.id,orgSlug:c.slug},s[0]=c.id,s[1]=c.slug,s[2]=r,s[3]=f):f=s[3];let d;s[4]!==i?(d=!!i&&et(i),s[4]=i,s[5]=d):d=s[5];let m;s[6]!==d?(m={enabled:d},s[6]=d,s[7]=m):m=s[7];const p=sn(f,m),[g,x]=z.useState(null);if(!i||a||!et(i)||!o.some(Za))return null;let y;if(s[8]!==u||s[9]!==i){let C;s[11]!==i?(C=R=>R.agentId===i&&R.promptName,s[11]=i,s[12]=C):C=s[12],y=u.find(C),s[8]=u,s[9]=i,s[10]=y}else y=s[10];const b=y;if(!b)return null;let k;s[13]!==p||s[14]!==n||s[15]!==e?(k=async(C,R)=>{if(!p){Re.error(e("chat.nextActionChip.mcpClientNotAvailable"));return}try{const D=await xn(p,C.name,R);await n({type:"doc",content:[{type:"paragraph",content:[Ps({id:C.name,name:wt(C.name,kt(C._meta)),metadata:D.messages,char:"/",kind:"prompt",args:R}),{type:"text",text:" "}]}]})}catch(D){console.error("[next-action-chip] failed",D),Re.error(e("chat.nextActionChip.failedLoadPrompt"))}},s[13]=p,s[14]=n,s[15]=e,s[16]=k):k=s[16];const j=k;let w;s[17]!==b._meta||s[18]!==b.arguments||s[19]!==b.description||s[20]!==b.promptName||s[21]!==b.title||s[22]!==j?(w=()=>{const C={name:b.promptName,title:b.title,description:b.description,arguments:b.arguments,_meta:b._meta};if(C.arguments&&C.arguments.length>0){x(C);return}j(C)},s[17]=b._meta,s[18]=b.arguments,s[19]=b.description,s[20]=b.promptName,s[21]=b.title,s[22]=j,s[23]=w):w=s[23];const S=w;let N;s[24]===Symbol.for("react.memo_cache_sentinel")?(N=l.jsx(gn,{size:12,className:"shrink-0 text-special"}),s[24]=N):N=s[24];let v;s[25]!==e?(v=e("chat.nextActionChip.next"),s[25]=e,s[26]=v):v=s[26];let _;s[27]!==v?(_=l.jsx("span",{className:"font-medium text-foreground/80",children:v}),s[27]=v,s[28]=_):_=s[28];let T;s[29]!==b.title?(T=l.jsx("span",{className:"truncate",children:b.title}),s[29]=b.title,s[30]=T):T=s[30];let A;s[31]===Symbol.for("react.memo_cache_sentinel")?(A=l.jsx(xt,{size:12,className:"shrink-0 transition-transform duration-150 group-hover:translate-x-0.5"}),s[31]=A):A=s[31];let P;s[32]!==S||s[33]!==T||s[34]!==_?(P=l.jsxs("button",{type:"button",onClick:S,className:"group mt-3 flex items-center gap-2 self-start rounded-lg border border-border bg-background px-3 py-1.5 text-xs text-muted-foreground transition-colors hover:border-border hover:bg-accent/40 hover:text-foreground",children:[N,_,T,A]}),s[32]=S,s[33]=T,s[34]=_,s[35]=P):P=s[35];let E;s[36]===Symbol.for("react.memo_cache_sentinel")?(E=C=>x(C),s[36]=E):E=s[36];let L;s[37]!==g||s[38]!==j?(L=async C=>{const R=g;x(null),R&&await j(R,C)},s[37]=g,s[38]=j,s[39]=L):L=s[39];let I;s[40]!==g||s[41]!==L?(I=l.jsx(Ls,{prompt:g,setPrompt:E,onSubmit:L}),s[40]=g,s[41]=L,s[42]=I):I=s[42];let $;return s[43]!==P||s[44]!==I?($=l.jsxs(l.Fragment,{children:[P,I]}),s[43]=P,s[44]=I,s[45]=$):$=s[45],$}function Za(s){return s.role==="user"||s.parts.some(el)}function el(s){return s.type==="tool-user_ask"&&s.state==="output-available"}function tl(s){const e=M.c(25),{event:t}=s,n=H(),[a,o]=z.useState(!1);let c;e[0]!==t.data?(c=JSON.stringify(t.data,null,2),e[0]=t.data,e[1]=c):c=e[1];const i=c;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=()=>o(sl),e[2]=u):u=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx(Ss,{className:"size-4 shrink-0 text-muted-foreground"}),e[3]=r):r=e[3];let f;e[4]!==n?(f=n("chat.triggerEventPart.triggeredByEvent"),e[4]=n,e[5]=f):f=e[5];let d;e[6]!==f?(d=l.jsx("span",{className:"font-medium",children:f}),e[6]=f,e[7]=d):d=e[7];let m;e[8]!==t.type?(m=l.jsx("span",{className:"min-w-0 truncate text-muted-foreground",children:t.type}),e[8]=t.type,e[9]=m):m=e[9];const p=a&&"rotate-180";let g;e[10]!==p?(g=V("ml-auto size-4 shrink-0 text-muted-foreground transition-transform",p),e[10]=p,e[11]=g):g=e[11];let x;e[12]!==g?(x=l.jsx(hn,{className:g}),e[12]=g,e[13]=x):x=e[13];let h;e[14]!==d||e[15]!==m||e[16]!==x?(h=l.jsxs("button",{type:"button",onClick:u,className:"flex w-full items-center gap-2 px-3 py-2 text-sm cursor-pointer",children:[r,d,m,x]}),e[14]=d,e[15]=m,e[16]=x,e[17]=h):h=e[17];let y;e[18]!==t.source||e[19]!==a||e[20]!==i?(y=a&&l.jsxs("div",{className:"border-t border-border/60 px-3 py-2",children:[l.jsx("div",{className:"mb-2 text-xs text-muted-foreground",children:t.source}),l.jsx("pre",{className:"overflow-auto whitespace-pre-wrap break-words text-xs text-foreground",children:i})]}),e[18]=t.source,e[19]=a,e[20]=i,e[21]=y):y=e[21];let b;return e[22]!==h||e[23]!==y?(b=l.jsxs("div",{className:"rounded-lg border border-border/60 bg-background overflow-hidden text-left",children:[h,y]}),e[22]=h,e[23]=y,e[24]=b):b=e[24],b}function sl(s){return!s}const nl=[Fs.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1}),Rs,zs];function al(s){const e=M.c(5),{tiptapDoc:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={attributes:{class:"prose prose-sm max-w-none focus:outline-none"}},e[0]=n):n=e[0];let a;e[1]!==t?(a={extensions:nl,content:t,editable:!1,editorProps:n},e[1]=t,e[2]=a):a=e[2];const o=Es(a);if(!o)return null;let c;return e[3]!==o?(c=l.jsx(Ds,{editor:o,className:"[&_.ProseMirror]:outline-none [&_.ProseMirror]:cursor-text"}),e[3]=o,e[4]=c):c=e[4],c}function Vt(s){const e=M.c(38),{message:t,className:n,onScrollToPair:a}=s,{id:o,parts:c,metadata:i}=t,[u,r]=z.useState(!1),[f,d]=z.useState(!1),m=z.useRef(!1);let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=I=>{I&&!m.current&&(m.current=!0,d(I.scrollHeight>I.clientHeight))},e[0]=p):p=e[0];const g=p;if(!c||c.length===0)return null;let x;e[1]!==a?(x=()=>{r(!0),a?.()},e[1]=a,e[2]=x):x=e[2];const h=x,y=i?.tiptapDoc;let b;e[3]!==n?(b=V("message-block w-full min-w-0 relative flex items-start gap-4 px-2.5 text-foreground flex-row-reverse",n),e[3]=n,e[4]=b):b=e[4];let k,j;e[5]===Symbol.for("react.memo_cache_sentinel")?(k=()=>r(!0),j=()=>r(!1),e[5]=k,e[6]=j):(k=e[5],j=e[6]);let w;e[7]===Symbol.for("react.memo_cache_sentinel")?(w=l.jsx("div",{className:"absolute inset-0 bg-muted/75 rounded-lg pointer-events-none"}),e[7]=w):w=e[7];let S;e[8]!==u||e[9]!==f?(S=V("z-10 px-4 py-2 flex-1 transition-[max-height,opacity] duration-300 ease-out",u?"max-h-[50vh] overflow-auto opacity-100":V("max-h-[84px] overflow-hidden opacity-99",f&&"mask-b-from-1%")),e[8]=u,e[9]=f,e[10]=S):S=e[10];let N;if(e[11]!==o||e[12]!==c){let I;e[14]!==o?(I=($,C)=>$.type==="data-trigger-event"?l.jsx(tl,{event:$.data},`${o}-${C}`):null,e[14]=o,e[15]=I):I=e[15],N=c.map(I),e[11]=o,e[12]=c,e[13]=N}else N=e[13];let v;e[16]!==y||e[17]!==o||e[18]!==i||e[19]!==c?(v=y?l.jsx(al,{tiptapDoc:i.tiptapDoc}):c.map((I,$)=>I.type==="text"?c[$-1]?.type==="data-trigger-event"?null:l.jsx(Ce,{id:o,part:I},`${o}-${$}`):null),e[16]=y,e[17]=o,e[18]=i,e[19]=c,e[20]=v):v=e[20];let _;e[21]!==N||e[22]!==v?(_=l.jsxs("div",{className:"flex flex-col gap-2",children:[N,v]}),e[21]=N,e[22]=v,e[23]=_):_=e[23];let T;e[24]!==_||e[25]!==S?(T=l.jsx("div",{ref:g,className:S,children:_}),e[24]=_,e[25]=S,e[26]=T):T=e[26];let A;e[27]!==h||e[28]!==T?(A=l.jsxs("div",{tabIndex:0,onClick:h,onFocus:k,onBlur:j,className:"w-full border border-border/60 min-w-0 shadow-xs rounded-lg text-[14px] wrap-break-word overflow-wrap-anywhere bg-background cursor-pointer transition-colors relative flex outline-none",children:[w,T]}),e[27]=h,e[28]=T,e[29]=A):A=e[29];let P;e[30]!==t?(P=l.jsx(Lt,{message:t,className:"mt-1 mr-1 self-end"}),e[30]=t,e[31]=P):P=e[31];let E;e[32]!==A||e[33]!==P?(E=l.jsxs("div",{className:"w-full min-w-0 flex flex-col",children:[A,P]}),e[32]=A,e[33]=P,e[34]=E):E=e[34];let L;return e[35]!==E||e[36]!==b?(L=l.jsx(l.Fragment,{children:l.jsx("div",{className:b,children:E})}),e[35]=E,e[36]=b,e[37]=L):L=e[37],L}function Jt(s){const e=M.c(10),{message:t,pending:n}=s,a=H();let o;e[0]!==n||e[1]!==a?(o=a(n?"chat.liveMessage.pending":"chat.liveMessage.readByAgent"),e[0]=n,e[1]=a,e[2]=o):o=e[2];let c;e[3]!==o?(c=l.jsx("span",{className:"self-end px-3 text-xs text-muted-foreground",children:o}),e[3]=o,e[4]=c):c=e[4];let i;e[5]!==t?(i=l.jsx(Vt,{message:t}),e[5]=t,e[6]=i):i=e[6];let u;return e[7]!==c||e[8]!==i?(u=l.jsxs("div",{className:"flex flex-col gap-1 py-1",children:[c,i]}),e[7]=c,e[8]=i,e[9]=u):u=e[9],u}function ll(s){const e=M.c(5),{part:t}=s,{read:n}=bt();let a;if(e[0]!==t||e[1]!==n){const i=Vs(t);a=i?n.get(i):void 0,e[0]=t,e[1]=n,e[2]=a}else a=e[2];const o=a;if(!o)return null;let c;return e[3]!==o?(c=l.jsx(Jt,{message:o,pending:!1}),e[3]=o,e[4]=c):c=e[4],c}function ol(s){const e=new Map;for(let t=s.length-1;t>=0;t--){const n=s[t]?.parts;if(n)for(const a of n){const o=a;if(o.type!=="data-deck-updated")continue;const c=o.data;if(!c?.path)continue;const i=`deck:${c.path}`;e.has(i)||e.set(i,{tabId:cs(c.path),label:c.name||c.path,kind:c.kind==="page"?"page":"deck"})}}return Array.from(e.values())}function rl(){const s=M.c(9),e=H(),{openPanel:t}=Ve(),n=ye()?.messages??[],a=ol(n);if(a.length===0)return null;const o=a.some(cl),c=a.some(il),i=e(o?c?"chat.threadHtmlPreviews.slidesAndPages":"chat.threadHtmlPreviews.slides":"chat.threadHtmlPreviews.pages"),u="flex flex-col gap-1.5 py-2";let r;s[0]!==i?(r=l.jsx("div",{className:"text-[12px] text-muted-foreground/70 uppercase tracking-wide",children:i}),s[0]=i,s[1]=r):r=s[1];const f="flex flex-wrap gap-2";let d;s[2]!==t?(d=x=>l.jsxs("button",{type:"button",onClick:()=>t(x.tabId),className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-lg border border-border bg-muted/30 hover:bg-muted/60 text-[13px] transition-colors",children:[x.kind==="deck"?l.jsx(bn,{className:"size-3.5 shrink-0 text-muted-foreground"}):l.jsx(Ns,{className:"size-3.5 shrink-0 text-muted-foreground"}),l.jsx("span",{className:"font-medium text-foreground",children:x.label})]},x.tabId),s[2]=t,s[3]=d):d=s[3];const m=a.map(d);let p;s[4]!==m?(p=l.jsx("div",{className:f,children:m}),s[4]=m,s[5]=p):p=s[5];let g;return s[6]!==r||s[7]!==p?(g=l.jsxs("div",{className:u,children:[r,p]}),s[6]=r,s[7]=p,s[8]=g):g=s[8],g}function il(s){return s.kind==="page"}function cl(s){return s.kind==="deck"}function ul(s){const e=M.c(29),{file:t}=s,n=H(),{openPanel:a}=Ve();let o;e[0]!==t.key||e[1]!==a?(o=()=>a(us(t.key)),e[0]=t.key,e[1]=a,e[2]=o):o=e[2];const c=o;let i;e[3]!==t.filename?(i=l.jsx(vn,{filename:t.filename,className:"h-5 w-4 shrink-0"}),e[3]=t.filename,e[4]=i):i=e[4];let u;e[5]!==t.filename||e[6]!==c?(u=l.jsx("button",{type:"button",onClick:c,className:"min-w-0 flex-1 truncate text-left text-[13px] font-medium text-foreground hover:underline",title:t.filename,children:t.filename}),e[5]=t.filename,e[6]=c,e[7]=u):u=e[7];const r=t.downloadUrl,f=t.filename;let d;e[8]!==n?(d=n("chat.outputFileRow.download"),e[8]=n,e[9]=d):d=e[9];let m;e[10]!==t.filename||e[11]!==n?(m=n("chat.outputFileRow.downloadFile",{filename:t.filename}),e[10]=t.filename,e[11]=n,e[12]=m):m=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=l.jsx(jn,{className:"size-3.5"}),e[13]=p):p=e[13];let g;e[14]!==t.downloadUrl||e[15]!==t.filename||e[16]!==d||e[17]!==m?(g=l.jsx("a",{href:r,download:f,className:"hidden shrink-0 text-muted-foreground hover:text-foreground group-hover:block group-focus-within:block",title:d,"aria-label":m,children:p}),e[14]=t.downloadUrl,e[15]=t.filename,e[16]=d,e[17]=m,e[18]=g):g=e[18];let x;e[19]!==n?(x=n("chat.outputFileRow.open"),e[19]=n,e[20]=x):x=e[20];let h;e[21]!==c||e[22]!==x?(h=l.jsx(Ue,{variant:"outline",size:"sm",className:"h-7 shrink-0 px-2.5 text-xs",onClick:c,children:x}),e[21]=c,e[22]=x,e[23]=h):h=e[23];let y;return e[24]!==h||e[25]!==i||e[26]!==u||e[27]!==g?(y=l.jsxs("div",{className:"group flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-2",children:[i,u,g,h]}),e[24]=h,e[25]=i,e[26]=u,e[27]=g,e[28]=y):y=e[28],y}function dl(s){return s.split("/").pop()??s}const fl=/(^|\/)output\//;function ml(s){const e=new Set;for(const t of s.parts??[]){const n=t;if(n.state==="output-available"&&n.type==="tool-write"){const a=n.input?.path;a&&fl.test(a)&&e.add(dl(a))}}return e}function pl(s){const e=M.c(4),{threadId:t,message:n}=s,a=ml(n),o=a.size>0;let c;e[0]!==o?(c={enabled:o},e[0]=o,e[1]=c):c=e[1];const{data:i}=yn(t,c);if(a.size===0)return null;const u=(i??[]).filter(m=>a.has(m.filename));if(u.length===0)return null;const r="flex flex-col gap-1.5 py-2",f=u.map(gl);let d;return e[2]!==f?(d=l.jsx("div",{className:r,children:f}),e[2]=f,e[3]=d):d=e[3],d}function gl(s){return l.jsx(ul,{file:s},s.key)}function xl(s){return s.type==="reasoning"}function hl(s){const e=[],t=new Set,n=new Map,a=new Map,o=new Map;if(s){let i=null;for(let u=0;u<s.parts.length;u++){const r=s.parts[u];if(xl(r)){i||(i={parts:[],startIndex:u},e.push(i)),i.parts.push(r),t.add(u);continue}if(i=null,r.type==="data-tool-metadata"&&"id"in r&&"data"in r){const f=r.data,d={};f.annotations&&(d.annotations=f.annotations),typeof f.latencyMs=="number"&&Number.isFinite(f.latencyMs)&&(d.latencySeconds=f.latencyMs/1e3),typeof f.outputBytes=="number"&&Number.isFinite(f.outputBytes)&&f.outputBytes>=0&&(d.outputBytes=f.outputBytes),f._meta&&typeof f._meta=="object"&&(d._meta=f._meta),n.set(r.id,d);continue}if(r.type==="data-tool-subtask-metadata"&&"id"in r){a.set(r.id,r.data);continue}if(r.type==="data-web-search"&&"id"in r&&"data"in r){const f=r.id,d=r.data;o.set(f,d.text??"");continue}}}const c=[];if(s)for(let i=0;i<s.parts.length;i++){const u=s.parts[i];if(u.type!=="step-start"){if(t.has(i)){const r=e.find(f=>f.startIndex===i);r&&c.push({kind:"reasoning-group",group:r});continue}u.type.startsWith("data-")&&u.type!==Ie||c.push({kind:"part",index:i})}}return{reasoningGroups:e,renderOrder:c,dataParts:{toolMetadata:n,toolSubtaskMetadata:a,webSearchStreaming:o}}}const bl=3;function yl(s,e){let t=-1;for(let o=s.length-1;o>=0;o--){const c=s[o];if(c.kind==="part"&&e[c.index]?.type==="text"){t=o;break}}if(t===-1)return{collapsed:[],tail:s};const n=s.findLastIndex(o=>o.kind==="part"&&e[o.index]?.type===Ie),a=n!==-1&&n<t?n:t;return{collapsed:s.slice(0,a),tail:s.slice(a)}}function Qt(s,e){return s.kind==="part"&&e[s.index]?.type!==Ie}function jl(s,e){let t=0,n=0;for(const a of s)if(a.kind==="reasoning-group")n++;else{const o=e[a.index]?.type;o==="text"?n++:(o==="dynamic-tool"||o?.startsWith("tool-"))&&o!=="tool-todo_write"&&o!=="tool-update_interests"&&t++}return{toolCalls:t,messages:n}}function vl(s){const e=M.c(10),{toolCalls:t,messages:n}=s,a=H();let o;e[0]!==n||e[1]!==a||e[2]!==t?(o=t>0&&l.jsxs(l.Fragment,{children:[l.jsx(pt,{className:"size-3.5 shrink-0"}),l.jsxs("span",{children:[a("chat.assistant.toolCallPlural",{count:t}),n>0?",":""]})]}),e[0]=n,e[1]=a,e[2]=t,e[3]=o):o=e[3];let c;e[4]!==n||e[5]!==a?(c=n>0&&l.jsxs(l.Fragment,{children:[l.jsx(ks,{className:"size-3.5 shrink-0"}),l.jsx("span",{children:a("chat.assistant.messagePlural",{count:n})})]}),e[4]=n,e[5]=a,e[6]=c):c=e[6];let i;return e[7]!==o||e[8]!==c?(i=l.jsxs("span",{className:"flex items-center gap-1.5 text-muted-foreground",children:[o,c]}),e[7]=o,e[8]=c,e[9]=i):i=e[9],i}function Sl(s){const e=M.c(28),{items:t,message:n,reasoningGroups:a,isReasoningActive:o,totalDuration:c,dataParts:i,isLoading:u,isLast:r}=s;let f;e[0]!==t||e[1]!==n.parts?(f=jl(t,n.parts),e[0]=t,e[1]=n.parts,e[2]=f):f=e[2];const{toolCalls:d,messages:m}=f;if(d===0&&m===0)return null;let p;e[3]!==m||e[4]!==d?(p=l.jsx(vl,{toolCalls:d,messages:m}),e[3]=m,e[4]=d,e[5]=p):p=e[5];let g;if(e[6]!==i||e[7]!==r||e[8]!==u||e[9]!==o||e[10]!==t||e[11]!==n||e[12]!==a||e[13]!==c){let y;e[15]!==i||e[16]!==r||e[17]!==u||e[18]!==o||e[19]!==n||e[20]!==a||e[21]!==c?(y=(b,k)=>Xt({item:b,renderIndex:k,message:n,reasoningGroups:a,isReasoningActive:o,totalDuration:c,dataParts:i,isLoading:u,isLast:r,isLastVisiblePart:!1}),e[15]=i,e[16]=r,e[17]=u,e[18]=o,e[19]=n,e[20]=a,e[21]=c,e[22]=y):y=e[22],g=t.map(y),e[6]=i,e[7]=r,e[8]=u,e[9]=o,e[10]=t,e[11]=n,e[12]=a,e[13]=c,e[14]=g}else g=e[14];let x;e[23]!==g?(x=l.jsx("div",{className:"flex flex-col gap-3 sm:gap-2 pt-1",children:g}),e[23]=g,e[24]=x):x=e[24];let h;return e[25]!==p||e[26]!==x?(h=l.jsx(Y,{icon:null,alwaysChevron:!0,title:p,state:"idle",children:x}),e[25]=p,e[26]=x,e[27]=h):h=e[27],h}function Xt({item:s,renderIndex:e,message:t,reasoningGroups:n,isReasoningActive:a,totalDuration:o,dataParts:c,isLoading:i,isLast:u,isLastVisiblePart:r,renderOrder:f}){if(s.kind==="reasoning-group"){const{group:g}=s,x=g===n[n.length-1],h=a&&x;if(!g.parts.some(k=>k.text?.trim())&&!h)return null;const b=n.length===1?o:null;return l.jsx(En,{duration:b,parts:g.parts,isStreaming:h},`${t.id}-reasoning-${g.startIndex}`)}const d=t.parts[s.index],m=r||(f?f.findLastIndex(g=>Qt(g,t.parts))===e:!1),p=m?Js(Qs(),t.metadata?.usage):null;return l.jsx(Nl,{part:d,id:t.id,usageStats:m&&l.jsx(Os,{usage:p,duration:o}),dataParts:c,isLoading:i,isLastMessage:u},`${t.id}-${s.index}`)}function Nl(s){const e=M.c(114),{part:t,id:n,usageStats:a,dataParts:o,isLoading:c,isLastMessage:i}=s;let u;e[0]!==o.toolMetadata?(u=m=>o.toolMetadata.get(m),e[0]=o.toolMetadata,e[1]=u):u=e[1];const r=u;let f;e[2]!==o.toolSubtaskMetadata?(f=m=>o.toolSubtaskMetadata.get(m),e[2]=o.toolSubtaskMetadata,e[3]=f):f=e[3];const d=f;switch(t.type){case"dynamic-tool":{let m;e[4]!==r||e[5]!==t.toolCallId?(m=r(t.toolCallId)?.annotations,e[4]=r,e[5]=t.toolCallId,e[6]=m):m=e[6];let p;e[7]!==r||e[8]!==t.toolCallId?(p=r(t.toolCallId)?.latencySeconds,e[7]=r,e[8]=t.toolCallId,e[9]=p):p=e[9];let g;e[10]!==r||e[11]!==t.toolCallId?(g=r(t.toolCallId)?.outputBytes,e[10]=r,e[11]=t.toolCallId,e[12]=g):g=e[12];let x;e[13]!==r||e[14]!==t.toolCallId?(x=r(t.toolCallId)?._meta,e[13]=r,e[14]=t.toolCallId,e[15]=x):x=e[15];let h;return e[16]!==i||e[17]!==t||e[18]!==m||e[19]!==p||e[20]!==g||e[21]!==x?(h=l.jsx(lt,{part:t,annotations:m,latency:p,outputBytes:g,isLastMessage:i,toolMeta:x}),e[16]=i,e[17]=t,e[18]=m,e[19]=p,e[20]=g,e[21]=x,e[22]=h):h=e[22],h}case"tool-todo_write":return null;case"tool-update_interests":return null;case"tool-user_ask":{let m;e[23]!==r||e[24]!==t.toolCallId?(m=r(t.toolCallId)?.latencySeconds,e[23]=r,e[24]=t.toolCallId,e[25]=m):m=e[25];let p;return e[26]!==t||e[27]!==m?(p=l.jsx(_a,{part:t,latency:m}),e[26]=t,e[27]=m,e[28]=p):p=e[28],p}case"tool-suggest_task":{let m;return e[29]!==t?(m=l.jsx(Ta,{part:t}),e[29]=t,e[30]=m):m=e[30],m}case"tool-propose_plan":{let m;return e[31]!==t?(m=l.jsx(Da,{part:t}),e[31]=t,e[32]=m):m=e[32],m}case"tool-generate_image":{let m;e[33]!==r||e[34]!==t.toolCallId?(m=r(t.toolCallId)?.latencySeconds,e[33]=r,e[34]=t.toolCallId,e[35]=m):m=e[35];let p;return e[36]!==t||e[37]!==m?(p=l.jsx(ma,{part:t,latency:m}),e[36]=t,e[37]=m,e[38]=p):p=e[38],p}case"tool-web_search":case"tool-deep_research":{let m;e[39]!==r||e[40]!==t.toolCallId?(m=r(t.toolCallId)?.latencySeconds,e[39]=r,e[40]=t.toolCallId,e[41]=m):m=e[41];let p;e[42]!==o.webSearchStreaming||e[43]!==t.toolCallId?(p=o.webSearchStreaming.get(t.toolCallId),e[42]=o.webSearchStreaming,e[43]=t.toolCallId,e[44]=p):p=e[44];let g;return e[45]!==t||e[46]!==m||e[47]!==p?(g=l.jsx(wa,{part:t,latency:m,streamingText:p}),e[45]=t,e[46]=m,e[47]=p,e[48]=g):g=e[48],g}case"tool-subtask":{let m;e[49]!==d||e[50]!==t.toolCallId?(m=d(t.toolCallId),e[49]=d,e[50]=t.toolCallId,e[51]=m):m=e[51];let p;e[52]!==r||e[53]!==t.toolCallId?(p=r(t.toolCallId)?.annotations,e[52]=r,e[53]=t.toolCallId,e[54]=p):p=e[54];let g;e[55]!==r||e[56]!==t.toolCallId?(g=r(t.toolCallId)?.latencySeconds,e[55]=r,e[56]=t.toolCallId,e[57]=g):g=e[57];let x;e[58]!==t||e[59]!==m||e[60]!==p||e[61]!==g?(x={part:t,subtaskMeta:m,annotations:p,latency:g},e[58]=t,e[59]=m,e[60]=p,e[61]=g,e[62]=x):x=e[62];const h=x;let y;return e[63]!==h?(y=l.jsx(z.Suspense,{fallback:l.jsx(za,{...h}),children:l.jsx(Fa,{...h})}),e[63]=h,e[64]=y):y=e[64],y}case"text":{const m=!!a&&!c,p=c&&i;let g;return e[65]!==n||e[66]!==t||e[67]!==m||e[68]!==p||e[69]!==a?(g=l.jsx(Ce,{id:n,part:t,extraActions:a,copyable:!0,alwaysShowActions:m,animate:p}),e[65]=n,e[66]=t,e[67]=m,e[68]=p,e[69]=a,e[70]=g):g=e[70],g}case"reasoning":return null;case"step-start":case"file":case"source-url":case"source-document":return null;case"data-tool-metadata":case"data-tool-subtask-metadata":case"data-generate-image":case"data-web-search":return null;default:{const m=t;if(m.type==="tool-COLLECTION_VIRTUAL_MCP_CREATE"){let p;e[71]!==m.toolCallId||e[72]!==r?(p=r(m.toolCallId)?.latencySeconds,e[71]=m.toolCallId,e[72]=r,e[73]=p):p=e[73];let g;return e[74]!==m||e[75]!==p?(g=l.jsx(Ba,{part:m,latency:p}),e[74]=m,e[75]=p,e[76]=g):g=e[76],g}if(m.type==="tool-COLLECTION_VIRTUAL_MCP_LIST"){let p;e[77]!==m.toolCallId||e[78]!==r?(p=r(m.toolCallId)?.latencySeconds,e[77]=m.toolCallId,e[78]=r,e[79]=p):p=e[79];let g;return e[80]!==m||e[81]!==p?(g=l.jsx(Wa,{part:m,latency:p}),e[80]=m,e[81]=p,e[82]=g):g=e[82],g}if(m.type==="tool-COLLECTION_CONNECTIONS_LIST"){let p;e[83]!==m.toolCallId||e[84]!==r?(p=r(m.toolCallId)?.latencySeconds,e[83]=m.toolCallId,e[84]=r,e[85]=p):p=e[85];let g;return e[86]!==m||e[87]!==p?(g=l.jsx(Ja,{part:m,latency:p}),e[86]=m,e[87]=p,e[88]=g):g=e[88],g}if(m.type.startsWith("tool-")){const p=m;let g;e[89]!==o.toolMetadata||e[90]!==p.toolCallId?(g=o.toolMetadata.get(p.toolCallId),e[89]=o.toolMetadata,e[90]=p.toolCallId,e[91]=g):g=e[91];const x=g;let h;e[92]!==m.type||e[93]!==p.output?(h=m.type.endsWith("__get_screenshot")?ca(p.output):null,e[92]=m.type,e[93]=p.output,e[94]=h):h=e[94];const y=h,b=x?.annotations,k=x?.latencySeconds,j=x?.outputBytes,w=x?._meta;let S;e[95]!==m||e[96]!==i||e[97]!==b||e[98]!==k||e[99]!==j||e[100]!==w?(S=l.jsx(lt,{part:m,annotations:b,latency:k,outputBytes:j,isLastMessage:i,toolMeta:w}),e[95]=m,e[96]=i,e[97]=b,e[98]=k,e[99]=j,e[100]=w,e[101]=S):S=e[101];const N=S;if(!y)return N;let v;e[102]!==y?(v=[y],e[102]=y,e[103]=v):v=e[103];let _;e[104]!==p.type?(_=p.type.slice(5),e[104]=p.type,e[105]=_):_=e[105];let T;e[106]!==v||e[107]!==_?(T=l.jsx(Ot,{srcs:v,alt:_}),e[106]=v,e[107]=_,e[108]=T):T=e[108];let A;return e[109]!==N||e[110]!==T?(A=l.jsxs("div",{className:"flex flex-col gap-2",children:[N,T]}),e[109]=N,e[110]=T,e[111]=A):A=e[111],A}if(t.type===Ie){let p;return e[112]!==t?(p=l.jsx(ll,{part:t}),e[112]=t,e[113]=p):p=e[113],p}if(m.type.startsWith("data-"))return null;throw new Error(`Unknown part type: ${m.type}`)}}}function kl(s){const e=M.c(3),{pending:t,children:n}=s;if(!t||t.length===0)return n;let a;return e[0]!==n||e[1]!==t?(a=l.jsxs("div",{className:"flex flex-col gap-3 sm:gap-2",children:[n,t]}),e[0]=n,e[1]=t,e[2]=a):a=e[2],a}function wl(s){const e=M.c(9),{isRunInProgress:t}=s,n=H();if(t){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx(Te,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),e[0]=c):c=e[0];let i;e[1]!==n?(i=n("chat.assistant.resumingTask"),e[1]=n,e[2]=i):i=e[2];let u;return e[3]!==i?(u=l.jsx("div",{className:"flex items-center gap-1.5 py-2 opacity-60",children:l.jsxs("span",{className:"flex items-center gap-1.5",children:[c,l.jsx("span",{className:"text-[14px] text-muted-foreground shimmer",children:i})]})}),e[3]=i,e[4]=u):u=e[4],u}let a;e[5]!==n?(a=n("chat.assistant.noResponseGenerated"),e[5]=n,e[6]=a):a=e[6];let o;return e[7]!==a?(o=l.jsx("div",{className:"text-[14px] text-muted-foreground/60 py-2",children:a}),e[7]=a,e[8]=o):o=e[8],o}function _l(s){const e=M.c(7),{className:t,children:n}=s;let a;e[0]!==t?(a=V("w-full min-w-0 group relative flex items-start gap-4 px-4 z-20 text-foreground flex-row",t),e[0]=t,e[1]=a):a=e[1];let o;e[2]!==n?(o=l.jsx("div",{className:"flex flex-col min-w-0 w-full items-start",children:l.jsx("div",{className:"w-full min-w-0 not-only:rounded-2xl text-[14px] wrap-break-word overflow-wrap-anywhere bg-transparent",children:n})}),e[2]=n,e[3]=o):o=e[3];let c;return e[4]!==a||e[5]!==o?(c=l.jsx("div",{className:a,children:o}),e[4]=a,e[5]=o,e[6]=c):c=e[6],c}function Tl(s){const e=M.c(16),{message:t,turnStartedAt:n,status:a,className:o,isLast:c}=s,i=c===void 0?!1:c,u=H(),{isRunInProgress:r}=ye()??{},f=r===void 0?!1:r,d=je()?.taskId??null,m=a==="streaming",g=m||a==="submitted";let x;e[0]!==n?(x=We(n),e[0]=n,e[1]=x):x=e[1];const h=x;let y;e[2]!==g?(y=()=>g?Date.now():null,e[2]=g,e[3]=y):y=e[3];const[b,k]=z.useState(y),[j,w]=z.useState(g);j!==g&&(w(g),k(()=>g?Date.now():null));const S=h??b,{reasoningGroups:N,renderOrder:v,dataParts:_}=hl(t),T=t!==null&&v.length>0,A=t&&t.parts.length>0?t.parts[t.parts.length-1]:null,P=m&&A?.type==="reasoning";let E;if(e[4]!==t){const G=t?.metadata?.reasoning_start_at?new Date(t.metadata.reasoning_start_at):null,Q=t?.metadata?.reasoning_end_at?new Date(t.metadata.reasoning_end_at):new Date;E=G!==null?Q.getTime()-G.getTime():null,e[4]=t,e[5]=E}else E=e[5];const L=E;let I;e[6]!==i||e[7]!==t?(I=!i||!t||!t.parts.some(Il),e[6]=i,e[7]=t,e[8]=I):I=e[8];const $=I,C=!g&&T&&$&&(()=>{let G=0;for(const Q of v)if(Q.kind==="part"){const ne=t.parts[Q.index]?.type;(ne==="dynamic-tool"||ne?.startsWith("tool-"))&&G++}return G>=bl})(),{collapsed:R,tail:D}=C?yl(v,t.parts):{collapsed:[],tail:v},{pending:B}=bt();let U;e[9]!==i||e[10]!==B?(U=i?B.map(Cl):null,e[9]=i,e[10]=B,e[11]=U):U=e[11];const W=U,K=_l,X=T?l.jsxs("div",{className:"flex flex-col gap-3 sm:gap-2",children:[t.metadata?.resumedFromBackground&&l.jsxs("div",{className:"flex items-center gap-1.5 text-[12px] text-muted-foreground/60 select-none",children:[l.jsx(dt,{className:"size-3 shrink-0"}),l.jsx("span",{children:u("chat.assistant.resumedBackgroundTask")})]}),R.length>0&&l.jsx(Sl,{items:R,message:t,reasoningGroups:N,isReasoningActive:P,totalDuration:L,dataParts:_,isLoading:g,isLast:i}),D.map((G,Q)=>{const ne=R.length+Q,oe=D.findLastIndex(ee=>Qt(ee,t.parts))===Q;return Xt({item:G,renderIndex:ne,message:t,reasoningGroups:N,isReasoningActive:P,totalDuration:L,dataParts:_,isLoading:g,isLast:i,isLastVisiblePart:oe,renderOrder:v})}),d&&l.jsx(pl,{threadId:d,message:t}),W,i&&g&&S!==null&&l.jsx(An,{startedAt:S}),i&&!g&&d&&l.jsxs(l.Fragment,{children:[l.jsx(rl,{}),$&&l.jsx(Ya,{})]}),!g&&l.jsx(Lt,{message:t})]}):l.jsx(kl,{pending:W,children:g?l.jsx(Ln,{startedAt:S}):l.jsx(wl,{isRunInProgress:i&&f})});let Z;return e[12]!==K||e[13]!==o||e[14]!==X?(Z=l.jsx(K,{className:o,children:X}),e[12]=K,e[13]=o,e[14]=X,e[15]=Z):Z=e[15],Z}function Cl(s){return l.jsx(Jt,{message:s,pending:!0},s.id)}function Il(s){const e=s.type;if(e!=="dynamic-tool"&&!e?.startsWith("tool-"))return!1;const t=s.state;return t==="input-streaming"||t==="input-available"||t==="approval-requested"}function yo(s){const e=[],t=s.filter(n=>n.role!=="system"&&!n.metadata?.internal&&!n.metadata?.subtaskJobId);for(let n=0;n<t.length;n++){const a=t[n];if(a)if(a.role==="user"){const o=t[n+1];o&&o.role==="assistant"?(e.push({user:a,assistant:o}),n++):e.push({user:a,assistant:null})}else a.role==="assistant"&&e.push({user:null,assistant:a})}return e}function jo(s){const e=M.c(19),{pair:t,isLastPair:n,status:a}=s,o=z.useRef(null),c=z.useRef(!1);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{o.current&&o.current.scrollIntoView({behavior:"smooth",block:"start"})},e[0]=i):i=e[0];const u=i;let r;e[1]!==n||e[2]!==t.assistant?.metadata?.resumedFromBackground||e[3]!==a?(r=y=>{if(o.current=y,!n||!y||c.current||(c.current=!0,t.assistant?.metadata?.resumedFromBackground))return;if(a==="submitted"||a==="streaming"){y.scrollIntoView({behavior:"smooth",block:"start"});return}const b=y.closest("[data-chat-scroller]");b?b.scrollTop=b.scrollHeight:y.scrollIntoView({behavior:"instant",block:"start"})},e[1]=n,e[2]=t.assistant?.metadata?.resumedFromBackground,e[3]=a,e[4]=r):r=e[4];const f=r,d=!t.user&&"pt-8 sm:pt-6";let m;e[5]!==d?(m=V("flex flex-col pb-2 sm:pb-2",d),e[5]=d,e[6]=m):m=e[6];let p;e[7]!==t.user?(p=t.user&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"sticky top-0 z-50 w-full h-4 bg-background"}),l.jsx("div",{className:"sticky mb-8 sm:mb-6 top-4 z-50",children:l.jsx(Vt,{message:t.user,onScrollToPair:u})})]}),e[7]=t.user,e[8]=p):p=e[8];const g=t.user?.created_at??null;let x;e[9]!==n||e[10]!==t.assistant||e[11]!==a||e[12]!==g?(x=l.jsx(Tl,{message:t.assistant,turnStartedAt:g,status:a,isLast:n}),e[9]=n,e[10]=t.assistant,e[11]=a,e[12]=g,e[13]=x):x=e[13];let h;return e[14]!==f||e[15]!==m||e[16]!==p||e[17]!==x?(h=l.jsxs("div",{ref:f,className:m,children:[p,x]}),e[14]=f,e[15]=m,e[16]=p,e[17]=x,e[18]=h):h=e[18],h}export{Sn as G,jo as M,ul as O,bo as S,Cn as a,On as f,yo as u};
|
|
48
|
+
… (${m.length-Ee} more characters)`:m,e[5]=t.input,e[6]=u}else u=e[6];const r=u;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(pt,{}),e[7]=f):f=e[7];let d;return e[8]!==r||e[9]!==o||e[10]!==i?(d=l.jsx(Y,{icon:f,title:o,summary:i,state:"idle",detail:r,detailVariant:"code"}),e[8]=r,e[9]=o,e[10]=i,e[11]=d):d=e[11],d}function La(s){const e=M.c(19),{jobId:t,prompt:n,items:a,streaming:o}=s,c=H();let i;e[0]!==c?(i=c("chat.subtask.taskLabel"),e[0]=c,e[1]=i):i=e[1];let u;e[2]!==i?(u=l.jsx("h3",{className:"text-xs font-medium text-muted-foreground/70 mb-1.5",children:i}),e[2]=i,e[3]=u):u=e[3];let r;e[4]!==n?(r=l.jsx("p",{className:"text-[13px] text-foreground/90 whitespace-pre-wrap wrap-break-word",children:n}),e[4]=n,e[5]=r):r=e[5];let f;e[6]!==u||e[7]!==r?(f=l.jsxs("section",{children:[u,r]}),e[6]=u,e[7]=r,e[8]=f):f=e[8];let d;e[9]!==a||e[10]!==t||e[11]!==o||e[12]!==c?(d=a.length===0?l.jsx("p",{className:"text-[13px] text-muted-foreground/60 italic py-1",children:c("chat.subtask.runningInBackground")}):a.map((g,x)=>{const h=g,y=h.type??"";return y==="text"?h.text?.trim()?l.jsx(Ce,{id:`${t}-sub-${x}`,part:g,animate:o},`${t}-sub-${x}`):null:y==="dynamic-tool"||y.startsWith("tool-")&&y!=="tool-todo_write"&&y!=="tool-update_interests"?l.jsx(Pa,{part:h},`${t}-sub-${x}`):null}),e[9]=a,e[10]=t,e[11]=o,e[12]=c,e[13]=d):d=e[13];let m;e[14]!==d?(m=l.jsx("section",{className:"flex flex-col gap-3 sm:gap-2",children:d}),e[14]=d,e[15]=m):m=e[15];let p;return e[16]!==f||e[17]!==m?(p=l.jsxs("div",{className:"flex flex-col gap-4",children:[f,m]}),e[16]=f,e[17]=m,e[18]=p):p=e[18],p}function Kt(s){const e=M.c(32),{part:t}=s,n=H(),a=t.output?.jobId,o=je()?.taskId??null,{org:c}=me(),[i,u]=z.useState(!1),r=Ca(a),f=o??"",d=i&&!!o;let m;e[0]!==a||e[1]!==c.slug||e[2]!==f||e[3]!==d?(m={orgSlug:c.slug,threadId:f,jobId:a,enabled:d},e[0]=a,e[1]=c.slug,e[2]=f,e[3]=d,e[4]=m):m=e[4];const p=$a(m);let g;e[5]!==p.messages?(g=p.messages.flatMap(Ra),e[5]=p.messages,e[6]=g):g=e[6];const x=g;let h;e[7]!==r?(h=r.flatMap(Ea),e[7]=r,e[8]=h):h=e[8];const y=h,b=x.length>0?x:y;let k;e[9]!==t.input?.prompt||e[10]!==n?(k=t.input?.prompt??n("chat.subtask.noPromptProvided"),e[9]=t.input?.prompt,e[10]=n,e[11]=k):k=e[11];const j=k;let w;e[12]!==j?(w=j.length>120?`${j.slice(0,120)}…`:j,e[12]=j,e[13]=w):w=e[13];const S=w,N=r.length===0;let v;e[14]!==n?(v=n("chat.subtask.subtaskNoun"),e[14]=n,e[15]=v):v=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=l.jsx(He,{}),e[16]=_):_=e[16];let T;e[17]!==v?(T=l.jsx(ve,{icon:void 0,name:v,size:"2xs",className:"rounded-xs",fallbackIcon:_}),e[17]=v,e[18]=T):T=e[18];let A;e[19]!==n?(A=n("chat.subtask.subtaskNoun"),e[19]=n,e[20]=A):A=e[20];const P=N?"loading":"idle",E=p.streaming||N;let L;e[21]!==b||e[22]!==a||e[23]!==j||e[24]!==E?(L=l.jsx(La,{jobId:a,prompt:j,items:b,streaming:E}),e[21]=b,e[22]=a,e[23]=j,e[24]=E,e[25]=L):L=e[25];let I;return e[26]!==S||e[27]!==T||e[28]!==A||e[29]!==P||e[30]!==L?(I=l.jsx(Qe,{icon:T,title:A,summary:S,state:P,onOpenChange:u,children:L}),e[26]=S,e[27]=T,e[28]=A,e[29]=P,e[30]=L,e[31]=I):I=e[31],I}function Ea(s){return s.parts??[]}function Ra(s){return s.parts??[]}function za(s){const e=M.c(24),t=H(),n=Wt(s.part.toolCallId);if(Ut(s.part.output)){let x;return e[0]!==s?(x=l.jsx(Kt,{...s}),e[0]=s,e[1]=x):x=e[1],x}let a;e[2]!==s||e[3]!==t?(a=Ht(s,t),e[2]=s,e[3]=t,e[4]=a):a=e[4];const{fallbackTitle:o,summary:c,usage:i,state:u}=a;let r;e[5]!==t?(r=t("chat.subtask.subtaskNoun"),e[5]=t,e[6]=r):r=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(He,{}),e[7]=f):f=e[7];let d;e[8]!==r?(d=l.jsx(ve,{icon:void 0,name:r,size:"2xs",className:"rounded-xs",fallbackIcon:f}),e[8]=r,e[9]=d):d=e[9];let m;e[10]!==n||e[11]!==s.part?(m=n&&qt(s.part)?n:void 0,e[10]=n,e[11]=s.part,e[12]=m):m=e[12];let p;e[13]!==s.part?(p=l.jsx(Gt,{part:s.part}),e[13]=s.part,e[14]=p):p=e[14];let g;return e[15]!==o||e[16]!==s.latency||e[17]!==u||e[18]!==c||e[19]!==d||e[20]!==m||e[21]!==p||e[22]!==i?(g=l.jsx(Qe,{icon:d,title:o,summary:c,state:u,usage:i,latency:s.latency,onFlip:m,children:p}),e[15]=o,e[16]=s.latency,e[17]=u,e[18]=c,e[19]=d,e[20]=m,e[21]=p,e[22]=i,e[23]=g):g=e[23],g}function Fa(s){const e=M.c(26),t=H(),n=It(s.part.input?.agent_id),a=Wt(s.part.toolCallId);if(Ut(s.part.output)){let b;return e[0]!==s?(b=l.jsx(Kt,{...s}),e[0]=s,e[1]=b):b=e[1],b}let o;e[2]!==s||e[3]!==t?(o=Ht(s,t),e[2]=s,e[3]=t,e[4]=o):o=e[4];const{fallbackTitle:c,summary:i,usage:u,state:r}=o,f=n?.icon;let d;e[5]!==t||e[6]!==n?.title?(d=n?.title??t("chat.subtask.subtaskNoun"),e[5]=t,e[6]=n?.title,e[7]=d):d=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=l.jsx(He,{}),e[8]=m):m=e[8];let p;e[9]!==f||e[10]!==d?(p=l.jsx(ve,{icon:f,name:d,size:"2xs",className:"rounded-xs",fallbackIcon:m}),e[9]=f,e[10]=d,e[11]=p):p=e[11];const g=n?.title??c;let x;e[12]!==a||e[13]!==s.part?(x=a&&qt(s.part)?a:void 0,e[12]=a,e[13]=s.part,e[14]=x):x=e[14];let h;e[15]!==s.part?(h=l.jsx(Gt,{part:s.part}),e[15]=s.part,e[16]=h):h=e[16];let y;return e[17]!==s.latency||e[18]!==r||e[19]!==i||e[20]!==p||e[21]!==g||e[22]!==x||e[23]!==h||e[24]!==u?(y=l.jsx(Qe,{icon:p,title:g,summary:i,state:r,usage:u,latency:s.latency,onFlip:x,children:h}),e[17]=s.latency,e[18]=r,e[19]=i,e[20]=p,e[21]=g,e[22]=x,e[23]=h,e[24]=u,e[25]=y):y=e[25],y}function Da(s){const e=M.c(28),{part:t}=s,n=H();if(!t.state.startsWith("output-"))return null;const a=t.input?.plan??"",c=t.output?.approved===!0;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(Fe,{className:"size-4 text-special shrink-0"}),e[0]=i):i=e[0];let u;e[1]!==n?(u=n("chat.proposePlan.implementationPlan"),e[1]=n,e[2]=u):u=e[2];let r;e[3]!==u?(r=l.jsx("span",{className:"text-[14px] font-medium text-foreground/80",children:u}),e[3]=u,e[4]=r):r=e[4];let f;e[5]!==c||e[6]!==n?(f=c&&l.jsxs("span",{className:"flex items-center gap-1 text-xs text-success bg-success/10 px-1.5 py-0.5 rounded-md",children:[l.jsx(ct,{size:12}),n("chat.proposePlan.approved")]}),e[5]=c,e[6]=n,e[7]=f):f=e[7];let d;e[8]!==c||e[9]!==t.state||e[10]!==n?(d=!c&&t.state==="output-available"&&l.jsx("span",{className:"text-xs text-muted-foreground/70 italic",children:n("chat.proposePlan.rejected")}),e[8]=c,e[9]=t.state,e[10]=n,e[11]=d):d=e[11];let m;e[12]!==r||e[13]!==f||e[14]!==d?(m=l.jsxs("div",{className:"flex items-center gap-2",children:[i,r,f,d]}),e[12]=r,e[13]=f,e[14]=d,e[15]=m):m=e[15];let p;e[16]!==n?(p=n("chat.proposePlan.viewPlan"),e[16]=n,e[17]=p):p=e[17];let g;e[18]!==p?(g=l.jsx("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:p}),e[18]=p,e[19]=g):g=e[19];let x;e[20]!==a?(x=l.jsx("div",{className:"mt-1 pl-2 border-l-2 border-special/30 prose prose-sm max-w-none text-sm",children:l.jsx(Ce,{id:"plan-content",part:{type:"text",text:a}})}),e[20]=a,e[21]=x):x=e[21];let h;e[22]!==g||e[23]!==x?(h=l.jsxs("details",{className:"ml-6",children:[g,x]}),e[22]=g,e[23]=x,e[24]=h):h=e[24];let y;return e[25]!==h||e[26]!==m?(y=l.jsxs("div",{className:"my-1.5 flex flex-col gap-1",children:[m,h]}),e[25]=h,e[26]=m,e[27]=y):y=e[27],y}function Be(s){const e=M.c(4),{connection_id:t,iconSize:n}=s,a=n===void 0?"xs":n,o=It(t);if(!o)return null;let c;return e[0]!==o.icon||e[1]!==o.title||e[2]!==a?(c=l.jsx("div",{className:"shrink-0 bg-background ring-1 ring-background rounded-lg",children:l.jsx(ve,{icon:o.icon,name:o.title,size:a})}),e[0]=o.icon,e[1]=o.title,e[2]=a,e[3]=c):c=e[3],c}Be.Fallback=function({iconSize:e="xs"}){const t=e==="sm"?"size-6":"size-5";return l.jsx("div",{className:"shrink-0 bg-background ring-1 ring-background rounded-lg",children:l.jsx("div",{className:V(t,"rounded bg-muted animate-pulse")})})};function he(s){const e=M.c(18),{connectionIds:t,maxVisibleIcons:n,iconSize:a,className:o}=s,c=n===void 0?2:n,i=a===void 0?"xs":a;if(t.length===0)return null;let u,r,f;if(e[0]!==o||e[1]!==t||e[2]!==i||e[3]!==c){const p=t.slice(0,c);u=t.length-c,e[7]!==o?(r=V("flex items-center justify-end -space-x-2",o),e[7]=o,e[8]=r):r=e[8];let g;e[9]!==i?(g=x=>l.jsx(z.Suspense,{fallback:l.jsx(Be.Fallback,{iconSize:i}),children:l.jsx(Be,{connection_id:x,iconSize:i})},x),e[9]=i,e[10]=g):g=e[10],f=p.map(g),e[0]=o,e[1]=t,e[2]=i,e[3]=c,e[4]=u,e[5]=r,e[6]=f}else u=e[4],r=e[5],f=e[6];let d;e[11]!==i||e[12]!==u?(d=u>0&&l.jsx("div",{className:V("shrink-0 bg-background ring-1 ring-background border border-border rounded-lg flex items-center justify-center",i==="sm"?"size-8":"size-6"),children:l.jsxs("span",{className:V(i==="sm"?"text-sm":"text-xs","font-medium text-muted-foreground"),"aria-label":`and ${u} more`,children:["+",u]})}),e[11]=i,e[12]=u,e[13]=d):d=e[13];let m;return e[14]!==r||e[15]!==f||e[16]!==d?(m=l.jsxs("div",{className:r,children:[f,d]}),e[14]=r,e[15]=f,e[16]=d,e[17]=m):m=e[17],m}he.Fallback=function({maxVisibleIcons:e=2,totalCount:t,iconSize:n="xs"}){const a=n==="sm"?"size-6":"size-5",o=n==="sm"?"size-8":"size-6",c=t!==void 0&&t>e;return l.jsxs("div",{className:"flex items-center -space-x-2",children:[Array.from({length:e}).map((i,u)=>l.jsx("div",{className:"shrink-0 bg-background ring-1 ring-background rounded-lg",children:l.jsx("div",{className:V(a,"rounded bg-muted animate-pulse")})},u)),c&&l.jsx("div",{className:V("shrink-0 bg-background ring-1 ring-background border border-border rounded-lg flex items-center justify-center",o),children:l.jsx("div",{className:V(n==="sm"?"h-3.5 w-5":"h-3 w-4","rounded bg-muted animate-pulse")})})]})};const Oa="This document certifies that the bearer agent has been granted authorized access to the tools and capabilities described herein. The agent is permitted to operate within the scope defined by its instructions and shall act in accordance with the constraints set forth by the issuing organization. This credential remains valid for the duration of the agent's active status. Unauthorized modification of this agent's permissions or scope is prohibited. The issuing authority reserves the right to revoke access at any time. All actions performed by this agent are subject to audit and review by the organization administrator. ",it=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)"):null;function Ba(s){const e=M.c(105),{part:t,latency:n}=s,a=H(),o=$t(),c=pe(t.state),i=z.useRef(null),u=z.useRef(null),r=z.useRef(null),f=z.useRef(null),d=z.useRef(null);let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{it?.matches||(d.current=i.current?.getBoundingClientRect()??null,i.current&&(i.current.style.willChange="transform"))},e[0]=m):m=e[0];const p=m;let g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g=F=>{if(it?.matches)return;const O=d.current,q=i.current;if(!O||!q)return;const ae=(F.clientX-O.left)/O.width*100,le=(F.clientY-O.top)/O.height*100;q.style.transform=`perspective(800px) rotateY(${(ae-50)*.05}deg) rotateX(${(le-50)*-.05}deg)`,u.current&&(u.current.style.opacity="1",u.current.style.transform=`translate(${(ae-50)*.15}px, ${(le-50)*.15}px)`),r.current&&(r.current.style.opacity="0.45"),f.current&&(f.current.style.opacity="0.45")},e[1]=g):g=e[1];const x=g;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{const F=i.current;F&&(F.style.transform="none",F.style.willChange="auto"),u.current&&(u.current.style.opacity="0.4",u.current.style.transform="translate(0, 0)"),r.current&&(r.current.style.opacity="0.3"),f.current&&(f.current.style.opacity="0.3"),d.current=null},e[2]=h):h=e[2];const y=h;if(c==="loading"){let F;e[3]===Symbol.for("react.memo_cache_sentinel")?(F=l.jsx(de,{className:"animate-pulse"}),e[3]=F):F=e[3];let O;e[4]!==a?(O=a("chat.agentCreate.creating"),e[4]=a,e[5]=O):O=e[5];let q;return e[6]!==O?(q=l.jsx(Y,{icon:F,title:O,state:"loading",defaultOpen:!0}),e[6]=O,e[7]=q):q=e[7],q}if(c==="approval"){let F;e[8]===Symbol.for("react.memo_cache_sentinel")?(F=l.jsx(de,{}),e[8]=F):F=e[8];let O;e[9]!==a?(O=a("chat.agentCreate.createAgent"),e[9]=a,e[10]=O):O=e[10];let q;return e[11]!==O?(q=l.jsx(Y,{icon:F,title:O,state:"idle"}),e[11]=O,e[12]=q):q=e[12],q}if(c==="error"){let F;e[13]===Symbol.for("react.memo_cache_sentinel")?(F=l.jsx(de,{}),e[13]=F):F=e[13];let O;e[14]!==t.state||e[15]!==a?(O=t.state==="output-denied"?a("chat.agentCreate.cancelled"):a("chat.agentCreate.couldntCreate"),e[14]=t.state,e[15]=a,e[16]=O):O=e[16];let q;e[17]!==n?(q=l.jsx(fe,{latency:n}),e[17]=n,e[18]=q):q=e[18];let ae;return e[19]!==O||e[20]!==q?(ae=l.jsx(Y,{icon:F,title:O,state:"error",trailing:q}),e[19]=O,e[20]=q,e[21]=ae):ae=e[21],ae}let b,k,j,w,S,N,v,_,T,A,P,E,L,I,$,C,R,D,B,U,W,K,X;if(e[22]!==n||e[23]!==o||e[24]!==t.output||e[25]!==a){R=Symbol.for("react.early_return_sentinel");e:{const F=Ke(t.output)?.item;if(!F?.id||!F?.title){let ie;e[49]===Symbol.for("react.memo_cache_sentinel")?(ie=l.jsx(de,{}),e[49]=ie):ie=e[49];let ce;e[50]!==a?(ce=a("chat.agentCreate.created"),e[50]=a,e[51]=ce):ce=e[51];let J;e[52]!==n?(J=l.jsx(fe,{latency:n}),e[52]=n,e[53]=J):J=e[53];let te;e[54]!==ce||e[55]!==J?(te=l.jsx(Y,{icon:ie,title:ce,state:"idle",trailing:J}),e[54]=ce,e[55]=J,e[56]=te):te=e[56],R=te;break e}const O=(F.connections??[]).map(Ua);let q;e[57]===Symbol.for("react.memo_cache_sentinel")?(q=l.jsx(de,{className:"text-success"}),e[57]=q):q=e[57];let ae;e[58]!==n?(ae=l.jsx(fe,{latency:n}),e[58]=n,e[59]=ae):ae=e[59],C=l.jsx(Y,{icon:q,title:a("chat.agentCreate.agentCreated",{name:F.title}),state:"idle",trailing:ae}),$="mt-2 overflow-hidden rounded-xl border-[0.5px] border-border bg-card p-2.5",j=i,w="relative overflow-hidden rounded-lg bg-accent/25 p-2",e[60]===Symbol.for("react.memo_cache_sentinel")?(S={transition:"transform 0.3s ease-out"},e[60]=S):S=e[60],N=p,v=x,_=y,e[61]===Symbol.for("react.memo_cache_sentinel")?(T=l.jsx("div",{ref:u,className:"pointer-events-none absolute inset-[-20%] z-[1] select-none rounded-lg",style:{background:"linear-gradient(135deg, hsla(280, 60%, 80%, 0.35) 0%, transparent 35%), linear-gradient(315deg, hsla(190, 70%, 80%, 0.35) 0%, transparent 35%), linear-gradient(225deg, hsla(140, 55%, 80%, 0.3) 0%, transparent 30%), linear-gradient(45deg, hsla(320, 55%, 82%, 0.3) 0%, transparent 30%)",opacity:.4,transition:"opacity 0.3s ease, transform 0.3s ease-out"},"aria-hidden":"true"}),e[61]=T):T=e[61];let le;e[62]===Symbol.for("react.memo_cache_sentinel")?(le={textAlign:"justify",wordBreak:"break-all"},e[62]=le):le=e[62],e[63]===Symbol.for("react.memo_cache_sentinel")?(A=l.jsx("p",{className:"pointer-events-none absolute inset-0 z-[1] select-none overflow-hidden text-[6px] font-light leading-[1.5] tracking-[0.06px] text-background opacity-50 mix-blend-overlay",style:le,"aria-hidden":"true",children:Oa.repeat(6)}),P=l.jsx("img",{src:"/stamp.svg",alt:"",className:"pointer-events-none absolute -right-10 -top-10 size-[140px] opacity-50 select-none","aria-hidden":"true"}),e[63]=A,e[64]=P):(A=e[63],P=e[64]),e[65]===Symbol.for("react.memo_cache_sentinel")?(E=l.jsx("img",{ref:r,src:"/left-guilloche.png",alt:"",className:"pointer-events-none absolute inset-y-0 left-0 h-full w-auto select-none z-[1] mix-blend-overlay",style:{opacity:.3,transition:"opacity 0.3s ease"},"aria-hidden":"true"}),e[65]=E):E=e[65],e[66]===Symbol.for("react.memo_cache_sentinel")?(L=l.jsx("img",{ref:f,src:"/right-guilloche.png",alt:"",className:"pointer-events-none absolute inset-y-0 right-0 h-full w-auto select-none z-[1] mix-blend-overlay",style:{opacity:.3,transition:"opacity 0.3s ease"},"aria-hidden":"true"}),e[66]=L):L=e[66],I=l.jsxs("div",{className:"relative",children:[l.jsxs("div",{className:"flex items-center gap-2.5 p-2",children:[l.jsx(gt,{icon:F.icon,name:F.title,size:"md"}),l.jsx("div",{className:"flex-1 min-w-0",children:l.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:F.title})})]}),F.description&&l.jsx("div",{className:"px-2 pt-1 pr-16",children:l.jsx("p",{className:"text-sm leading-snug text-muted-foreground line-clamp-2",children:F.description})})]}),X="relative z-[3] flex items-center gap-2.5 px-2 pt-6 pb-1";const ue=O.length>0&&l.jsx(z.Suspense,{fallback:l.jsx(he.Fallback,{iconSize:"xs",maxVisibleIcons:3,totalCount:O.length}),children:l.jsx(he,{connectionIds:O,iconSize:"xs",maxVisibleIcons:3,className:"flex items-center justify-start -space-x-1"})});e[67]!==ue?(k=l.jsx("div",{className:"flex-1 min-w-0",children:ue}),e[67]=ue,e[68]=k):k=e[68],K="flex items-center gap-2 shrink-0",b=Ue,D="sm",B="h-7",U=()=>o(F.id),W=a("chat.agentCreate.seeAgentLabel",{name:F.title})}e[22]=n,e[23]=o,e[24]=t.output,e[25]=a,e[26]=b,e[27]=k,e[28]=j,e[29]=w,e[30]=S,e[31]=N,e[32]=v,e[33]=_,e[34]=T,e[35]=A,e[36]=P,e[37]=E,e[38]=L,e[39]=I,e[40]=$,e[41]=C,e[42]=R,e[43]=D,e[44]=B,e[45]=U,e[46]=W,e[47]=K,e[48]=X}else b=e[26],k=e[27],j=e[28],w=e[29],S=e[30],N=e[31],v=e[32],_=e[33],T=e[34],A=e[35],P=e[36],E=e[37],L=e[38],I=e[39],$=e[40],C=e[41],R=e[42],D=e[43],B=e[44],U=e[45],W=e[46],K=e[47],X=e[48];if(R!==Symbol.for("react.early_return_sentinel"))return R;let Z;e[69]!==a?(Z=a("chat.agentCreate.seeAgent"),e[69]=a,e[70]=Z):Z=e[70];let G;e[71]!==b||e[72]!==Z||e[73]!==D||e[74]!==B||e[75]!==U||e[76]!==W?(G=l.jsx(b,{size:D,className:B,onClick:U,"aria-label":W,children:Z}),e[71]=b,e[72]=Z,e[73]=D,e[74]=B,e[75]=U,e[76]=W,e[77]=G):G=e[77];let Q;e[78]!==G||e[79]!==K?(Q=l.jsx("div",{className:K,children:G}),e[78]=G,e[79]=K,e[80]=Q):Q=e[80];let ne;e[81]!==k||e[82]!==Q||e[83]!==X?(ne=l.jsxs("div",{className:X,children:[k,Q]}),e[81]=k,e[82]=Q,e[83]=X,e[84]=ne):ne=e[84];let oe;e[85]!==j||e[86]!==w||e[87]!==S||e[88]!==N||e[89]!==v||e[90]!==_||e[91]!==T||e[92]!==A||e[93]!==P||e[94]!==E||e[95]!==L||e[96]!==I||e[97]!==ne?(oe=l.jsxs("div",{ref:j,className:w,style:S,onMouseEnter:N,onMouseMove:v,onMouseLeave:_,children:[T,A,P,E,L,I,ne]}),e[85]=j,e[86]=w,e[87]=S,e[88]=N,e[89]=v,e[90]=_,e[91]=T,e[92]=A,e[93]=P,e[94]=E,e[95]=L,e[96]=I,e[97]=ne,e[98]=oe):oe=e[98];let ee;e[99]!==$||e[100]!==oe?(ee=l.jsx("div",{className:$,children:oe}),e[99]=$,e[100]=oe,e[101]=ee):ee=e[101];let re;return e[102]!==C||e[103]!==ee?(re=l.jsxs(l.Fragment,{children:[C,ee]}),e[102]=C,e[103]=ee,e[104]=re):re=e[104],re}function Ua(s){return s.connection_id}function Ha(s){const e=M.c(24),{agent:t}=s,n=$t();if(!t.id)return null;let a;e[0]!==t.connections?(a=t.connections??[],e[0]=t.connections,e[1]=a):a=e[1];let o;e[2]!==a?(o=a.map(qa),e[2]=a,e[3]=o):o=e[3];const c=o;let i;e[4]!==t.id||e[5]!==n?(i=()=>n(t.id),e[4]=t.id,e[5]=n,e[6]=i):i=e[6];let u;e[7]!==t.icon||e[8]!==t.title?(u=l.jsx(gt,{icon:t.icon,name:t.title,size:"sm"}),e[7]=t.icon,e[8]=t.title,e[9]=u):u=e[9];let r;e[10]!==t.title?(r=l.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:t.title}),e[10]=t.title,e[11]=r):r=e[11];let f;e[12]!==t.description?(f=t.description&&l.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[12]=t.description,e[13]=f):f=e[13];let d;e[14]!==r||e[15]!==f?(d=l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[r,f]}),e[14]=r,e[15]=f,e[16]=d):d=e[16];let m;e[17]!==c?(m=c.length>0&&l.jsx(z.Suspense,{fallback:l.jsx(he.Fallback,{iconSize:"xs",maxVisibleIcons:3,totalCount:c.length}),children:l.jsx(he,{connectionIds:c,iconSize:"xs",maxVisibleIcons:3})}),e[17]=c,e[18]=m):m=e[18];let p;return e[19]!==i||e[20]!==u||e[21]!==d||e[22]!==m?(p=l.jsxs("button",{type:"button",onClick:i,className:"group flex w-full items-center gap-3 rounded-lg border border-border bg-card px-3 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[u,d,m]}),e[19]=i,e[20]=u,e[21]=d,e[22]=m,e[23]=p):p=e[23],p}function qa(s){return s.connection_id}function Wa(s){const e=M.c(59),{part:t,latency:n}=s,a=H(),o=qe(),{org:c}=me();let i;e[0]!==t.state?(i=pe(t.state),e[0]=t.state,e[1]=i):i=e[1];const u=i;let r,f,d,m,p,g;if(e[2]!==n||e[3]!==t.output||e[4]!==t.state||e[5]!==u||e[6]!==a){g=Symbol.for("react.early_return_sentinel");e:{const b=Ke(t.output);if(f=Array.isArray(b?.items)?b.items:[],u==="loading"){let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(de,{className:"animate-pulse"}),e[13]=S):S=e[13];let N;e[14]!==a?(N=a("chat.agentList.loading"),e[14]=a,e[15]=N):N=e[15];let v;e[16]!==N?(v=l.jsx(Y,{icon:S,title:N,state:"loading"}),e[16]=N,e[17]=v):v=e[17],g=v;break e}if(u==="approval"){let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(de,{}),e[18]=S):S=e[18];let N;e[19]!==a?(N=a("chat.agentList.listAgents"),e[19]=a,e[20]=N):N=e[20];let v;e[21]!==N?(v=l.jsx(Y,{icon:S,title:N,state:"idle"}),e[21]=N,e[22]=v):v=e[22],g=v;break e}if(u==="error"){let S;e[23]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(de,{}),e[23]=S):S=e[23];let N;e[24]!==t.state||e[25]!==a?(N=t.state==="output-denied"?a("chat.agentList.unavailable"):a("chat.agentList.couldntLoad"),e[24]=t.state,e[25]=a,e[26]=N):N=e[26];let v;e[27]!==n?(v=l.jsx(fe,{latency:n}),e[27]=n,e[28]=v):v=e[28];let _;e[29]!==N||e[30]!==v?(_=l.jsx(Y,{icon:S,title:N,state:"error",trailing:v}),e[29]=N,e[30]=v,e[31]=_):_=e[31],g=_;break e}if(f.length===0){let S;e[32]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(de,{}),e[32]=S):S=e[32];let N;e[33]!==a?(N=a("chat.agentList.noAgents"),e[33]=a,e[34]=N):N=e[34];let v;e[35]!==a?(v=a("chat.agentList.noAgentsDesc"),e[35]=a,e[36]=v):v=e[36];let _;e[37]!==n?(_=l.jsx(fe,{latency:n}),e[37]=n,e[38]=_):_=e[38];let T;e[39]!==N||e[40]!==v||e[41]!==_?(T=l.jsx(Y,{icon:S,title:N,summary:v,state:"idle",trailing:_}),e[39]=N,e[40]=v,e[41]=_,e[42]=T):T=e[42],g=T;break e}const k=f.slice(0,At);r=f.length-k.length;let j;e[43]===Symbol.for("react.memo_cache_sentinel")?(j=l.jsx(de,{className:"text-success"}),e[43]=j):j=e[43];let w;e[44]!==n?(w=l.jsx(fe,{latency:n}),e[44]=n,e[45]=w):w=e[45],p=l.jsx(Y,{icon:j,title:f.length===1?a("chat.agentList.oneAgent"):a("chat.agentList.multiAgents",{count:f.length}),state:"idle",trailing:w}),d="mt-2 flex flex-col gap-1.5",m=k.map(Ga)}e[2]=n,e[3]=t.output,e[4]=t.state,e[5]=u,e[6]=a,e[7]=r,e[8]=f,e[9]=d,e[10]=m,e[11]=p,e[12]=g}else r=e[7],f=e[8],d=e[9],m=e[10],p=e[11],g=e[12];if(g!==Symbol.for("react.early_return_sentinel"))return g;let x;e[46]!==r||e[47]!==f||e[48]!==o||e[49]!==c||e[50]!==a?(x=r>0&&l.jsx(Pt,{count:f.length,noun:a("chat.agentList.agentsNoun"),onClick:()=>o({to:"/$org/settings/projects",params:{org:c.slug}})}),e[46]=r,e[47]=f,e[48]=o,e[49]=c,e[50]=a,e[51]=x):x=e[51];let h;e[52]!==d||e[53]!==m||e[54]!==x?(h=l.jsxs("div",{className:d,children:[m,x]}),e[52]=d,e[53]=m,e[54]=x,e[55]=h):h=e[55];let y;return e[56]!==p||e[57]!==h?(y=l.jsxs(l.Fragment,{children:[p,h]}),e[56]=p,e[57]=h,e[58]=y):y=e[58],y}function Ga(s){return l.jsx(Ha,{agent:s},s.id)}const Ka={active:"bg-success",inactive:"bg-muted-foreground",error:"bg-destructive"};function Va(s){const e=M.c(27),{connection:t}=s,n=qe(),{org:a}=me(),o=t.slug,c=t.description||t.app_name,i=!o||void 0;let u;e[0]!==n||e[1]!==a||e[2]!==o?(u=()=>o&&n({to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:o}}),e[0]=n,e[1]=a,e[2]=o,e[3]=u):u=e[3];let r;e[4]!==t.icon||e[5]!==t.title?(r=l.jsx(ve,{icon:t.icon,name:t.title,size:"sm"}),e[4]=t.icon,e[5]=t.title,e[6]=r):r=e[6];let f;e[7]!==t.title?(f=l.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:t.title}),e[7]=t.title,e[8]=f):f=e[8];let d;e[9]!==c?(d=c&&l.jsx("span",{className:"truncate text-xs text-muted-foreground",children:c}),e[9]=c,e[10]=d):d=e[10];let m;e[11]!==f||e[12]!==d?(m=l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[f,d]}),e[11]=f,e[12]=d,e[13]=m):m=e[13];const p=Ka[t.status]??"bg-muted-foreground";let g;e[14]!==p?(g=V("size-2 shrink-0 rounded-full",p),e[14]=p,e[15]=g):g=e[15];let x;e[16]!==g?(x=l.jsx("span",{className:g,"aria-hidden":"true"}),e[16]=g,e[17]=x):x=e[17];let h;e[18]!==t.status?(h=l.jsx("span",{className:"sr-only",children:t.status}),e[18]=t.status,e[19]=h):h=e[19];let y;return e[20]!==i||e[21]!==h||e[22]!==u||e[23]!==r||e[24]!==m||e[25]!==x?(y=l.jsxs("button",{type:"button","aria-disabled":i,onClick:u,className:"group flex w-full items-center gap-3 rounded-lg border border-border bg-card px-3 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer aria-disabled:cursor-default aria-disabled:hover:bg-card",children:[r,m,x,h]}),e[20]=i,e[21]=h,e[22]=u,e[23]=r,e[24]=m,e[25]=x,e[26]=y):y=e[26],y}function Ja(s){const e=M.c(54),{part:t,latency:n}=s,a=H(),o=qe(),{org:c}=me();let i;e[0]!==t.state?(i=pe(t.state),e[0]=t.state,e[1]=i):i=e[1];const u=i;let r,f,d,m,p,g;if(e[2]!==n||e[3]!==t.output||e[4]!==t.state||e[5]!==u||e[6]!==a){g=Symbol.for("react.early_return_sentinel");e:{const b=Ke(t.output);if(f=(Array.isArray(b?.items)?b.items:[]).filter(Xa),u==="loading"||u==="approval"){let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(ke,{className:"animate-pulse"}),e[13]=S):S=e[13];let N;e[14]!==a?(N=a("chat.connectionList.loadingTitle"),e[14]=a,e[15]=N):N=e[15];let v;e[16]!==N?(v=l.jsx(Y,{icon:S,title:N,state:"loading"}),e[16]=N,e[17]=v):v=e[17],g=v;break e}if(u==="error"){let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(ke,{}),e[18]=S):S=e[18];let N;e[19]!==t.state||e[20]!==a?(N=t.state==="output-denied"?a("chat.connectionList.unavailableTitle"):a("chat.connectionList.errorTitle"),e[19]=t.state,e[20]=a,e[21]=N):N=e[21];let v;e[22]!==n?(v=l.jsx(fe,{latency:n}),e[22]=n,e[23]=v):v=e[23];let _;e[24]!==N||e[25]!==v?(_=l.jsx(Y,{icon:S,title:N,state:"error",trailing:v}),e[24]=N,e[25]=v,e[26]=_):_=e[26],g=_;break e}if(f.length===0){let S;e[27]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(ke,{}),e[27]=S):S=e[27];let N;e[28]!==a?(N=a("chat.connectionList.emptyTitle"),e[28]=a,e[29]=N):N=e[29];let v;e[30]!==a?(v=a("chat.connectionList.emptySummary"),e[30]=a,e[31]=v):v=e[31];let _;e[32]!==n?(_=l.jsx(fe,{latency:n}),e[32]=n,e[33]=_):_=e[33];let T;e[34]!==N||e[35]!==v||e[36]!==_?(T=l.jsx(Y,{icon:S,title:N,summary:v,state:"idle",trailing:_}),e[34]=N,e[35]=v,e[36]=_,e[37]=T):T=e[37],g=T;break e}const k=f.slice(0,At);r=f.length-k.length;let j;e[38]===Symbol.for("react.memo_cache_sentinel")?(j=l.jsx(ke,{className:"text-success"}),e[38]=j):j=e[38];let w;e[39]!==n?(w=l.jsx(fe,{latency:n}),e[39]=n,e[40]=w):w=e[40],p=l.jsx(Y,{icon:j,title:f.length===1?a("chat.connectionList.singleConnection"):a("chat.connectionList.multipleConnections",{count:f.length}),state:"idle",trailing:w}),d="mt-2 flex flex-col gap-1.5",m=k.map(Qa)}e[2]=n,e[3]=t.output,e[4]=t.state,e[5]=u,e[6]=a,e[7]=r,e[8]=f,e[9]=d,e[10]=m,e[11]=p,e[12]=g}else r=e[7],f=e[8],d=e[9],m=e[10],p=e[11],g=e[12];if(g!==Symbol.for("react.early_return_sentinel"))return g;let x;e[41]!==r||e[42]!==f||e[43]!==o||e[44]!==c||e[45]!==a?(x=r>0&&l.jsx(Pt,{count:f.length,noun:a("chat.connectionList.connectionNoun"),onClick:()=>o({to:"/$org/settings/connections",params:{org:c.slug}})}),e[41]=r,e[42]=f,e[43]=o,e[44]=c,e[45]=a,e[46]=x):x=e[46];let h;e[47]!==d||e[48]!==m||e[49]!==x?(h=l.jsxs("div",{className:d,children:[m,x]}),e[47]=d,e[48]=m,e[49]=x,e[50]=h):h=e[50];let y;return e[51]!==p||e[52]!==h?(y=l.jsxs(l.Fragment,{children:[p,h]}),e[51]=p,e[52]=h,e[53]=y):y=e[53],y}function Qa(s){return l.jsx(Va,{connection:s},s.id)}function Xa(s){return s.connection_type!=="VIRTUAL"}function Ya(){const s=M.c(46),e=H(),t=je(),{sendMessage:n,isStreaming:a,messages:o}=Ks(),{org:c}=me(),i=t?.virtualMcpId,{prompts:u}=cn(c.slug),r=i??null;let f;s[0]!==c.id||s[1]!==c.slug||s[2]!==r?(f={connectionId:r,orgId:c.id,orgSlug:c.slug},s[0]=c.id,s[1]=c.slug,s[2]=r,s[3]=f):f=s[3];let d;s[4]!==i?(d=!!i&&et(i),s[4]=i,s[5]=d):d=s[5];let m;s[6]!==d?(m={enabled:d},s[6]=d,s[7]=m):m=s[7];const p=sn(f,m),[g,x]=z.useState(null);if(!i||a||!et(i)||!o.some(Za))return null;let y;if(s[8]!==u||s[9]!==i){let C;s[11]!==i?(C=R=>R.agentId===i&&R.promptName,s[11]=i,s[12]=C):C=s[12],y=u.find(C),s[8]=u,s[9]=i,s[10]=y}else y=s[10];const b=y;if(!b)return null;let k;s[13]!==p||s[14]!==n||s[15]!==e?(k=async(C,R)=>{if(!p){Re.error(e("chat.nextActionChip.mcpClientNotAvailable"));return}try{const D=await xn(p,C.name,R);await n({type:"doc",content:[{type:"paragraph",content:[Ps({id:C.name,name:wt(C.name,kt(C._meta)),metadata:D.messages,char:"/",kind:"prompt",args:R}),{type:"text",text:" "}]}]})}catch(D){console.error("[next-action-chip] failed",D),Re.error(e("chat.nextActionChip.failedLoadPrompt"))}},s[13]=p,s[14]=n,s[15]=e,s[16]=k):k=s[16];const j=k;let w;s[17]!==b._meta||s[18]!==b.arguments||s[19]!==b.description||s[20]!==b.promptName||s[21]!==b.title||s[22]!==j?(w=()=>{const C={name:b.promptName,title:b.title,description:b.description,arguments:b.arguments,_meta:b._meta};if(C.arguments&&C.arguments.length>0){x(C);return}j(C)},s[17]=b._meta,s[18]=b.arguments,s[19]=b.description,s[20]=b.promptName,s[21]=b.title,s[22]=j,s[23]=w):w=s[23];const S=w;let N;s[24]===Symbol.for("react.memo_cache_sentinel")?(N=l.jsx(gn,{size:12,className:"shrink-0 text-special"}),s[24]=N):N=s[24];let v;s[25]!==e?(v=e("chat.nextActionChip.next"),s[25]=e,s[26]=v):v=s[26];let _;s[27]!==v?(_=l.jsx("span",{className:"font-medium text-foreground/80",children:v}),s[27]=v,s[28]=_):_=s[28];let T;s[29]!==b.title?(T=l.jsx("span",{className:"truncate",children:b.title}),s[29]=b.title,s[30]=T):T=s[30];let A;s[31]===Symbol.for("react.memo_cache_sentinel")?(A=l.jsx(xt,{size:12,className:"shrink-0 transition-transform duration-150 group-hover:translate-x-0.5"}),s[31]=A):A=s[31];let P;s[32]!==S||s[33]!==T||s[34]!==_?(P=l.jsxs("button",{type:"button",onClick:S,className:"group mt-3 flex items-center gap-2 self-start rounded-lg border border-border bg-background px-3 py-1.5 text-xs text-muted-foreground transition-colors hover:border-border hover:bg-accent/40 hover:text-foreground",children:[N,_,T,A]}),s[32]=S,s[33]=T,s[34]=_,s[35]=P):P=s[35];let E;s[36]===Symbol.for("react.memo_cache_sentinel")?(E=C=>x(C),s[36]=E):E=s[36];let L;s[37]!==g||s[38]!==j?(L=async C=>{const R=g;x(null),R&&await j(R,C)},s[37]=g,s[38]=j,s[39]=L):L=s[39];let I;s[40]!==g||s[41]!==L?(I=l.jsx(Ls,{prompt:g,setPrompt:E,onSubmit:L}),s[40]=g,s[41]=L,s[42]=I):I=s[42];let $;return s[43]!==P||s[44]!==I?($=l.jsxs(l.Fragment,{children:[P,I]}),s[43]=P,s[44]=I,s[45]=$):$=s[45],$}function Za(s){return s.role==="user"||s.parts.some(el)}function el(s){return s.type==="tool-user_ask"&&s.state==="output-available"}function tl(s){const e=M.c(25),{event:t}=s,n=H(),[a,o]=z.useState(!1);let c;e[0]!==t.data?(c=JSON.stringify(t.data,null,2),e[0]=t.data,e[1]=c):c=e[1];const i=c;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=()=>o(sl),e[2]=u):u=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx(Ss,{className:"size-4 shrink-0 text-muted-foreground"}),e[3]=r):r=e[3];let f;e[4]!==n?(f=n("chat.triggerEventPart.triggeredByEvent"),e[4]=n,e[5]=f):f=e[5];let d;e[6]!==f?(d=l.jsx("span",{className:"font-medium",children:f}),e[6]=f,e[7]=d):d=e[7];let m;e[8]!==t.type?(m=l.jsx("span",{className:"min-w-0 truncate text-muted-foreground",children:t.type}),e[8]=t.type,e[9]=m):m=e[9];const p=a&&"rotate-180";let g;e[10]!==p?(g=V("ml-auto size-4 shrink-0 text-muted-foreground transition-transform",p),e[10]=p,e[11]=g):g=e[11];let x;e[12]!==g?(x=l.jsx(hn,{className:g}),e[12]=g,e[13]=x):x=e[13];let h;e[14]!==d||e[15]!==m||e[16]!==x?(h=l.jsxs("button",{type:"button",onClick:u,className:"flex w-full items-center gap-2 px-3 py-2 text-sm cursor-pointer",children:[r,d,m,x]}),e[14]=d,e[15]=m,e[16]=x,e[17]=h):h=e[17];let y;e[18]!==t.source||e[19]!==a||e[20]!==i?(y=a&&l.jsxs("div",{className:"border-t border-border/60 px-3 py-2",children:[l.jsx("div",{className:"mb-2 text-xs text-muted-foreground",children:t.source}),l.jsx("pre",{className:"overflow-auto whitespace-pre-wrap break-words text-xs text-foreground",children:i})]}),e[18]=t.source,e[19]=a,e[20]=i,e[21]=y):y=e[21];let b;return e[22]!==h||e[23]!==y?(b=l.jsxs("div",{className:"rounded-lg border border-border/60 bg-background overflow-hidden text-left",children:[h,y]}),e[22]=h,e[23]=y,e[24]=b):b=e[24],b}function sl(s){return!s}const nl=[Fs.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1}),Rs,zs];function al(s){const e=M.c(5),{tiptapDoc:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={attributes:{class:"prose prose-sm max-w-none focus:outline-none"}},e[0]=n):n=e[0];let a;e[1]!==t?(a={extensions:nl,content:t,editable:!1,editorProps:n},e[1]=t,e[2]=a):a=e[2];const o=Es(a);if(!o)return null;let c;return e[3]!==o?(c=l.jsx(Ds,{editor:o,className:"[&_.ProseMirror]:outline-none [&_.ProseMirror]:cursor-text"}),e[3]=o,e[4]=c):c=e[4],c}function Vt(s){const e=M.c(38),{message:t,className:n,onScrollToPair:a}=s,{id:o,parts:c,metadata:i}=t,[u,r]=z.useState(!1),[f,d]=z.useState(!1),m=z.useRef(!1);let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=I=>{I&&!m.current&&(m.current=!0,d(I.scrollHeight>I.clientHeight))},e[0]=p):p=e[0];const g=p;if(!c||c.length===0)return null;let x;e[1]!==a?(x=()=>{r(!0),a?.()},e[1]=a,e[2]=x):x=e[2];const h=x,y=i?.tiptapDoc;let b;e[3]!==n?(b=V("message-block w-full min-w-0 relative flex items-start gap-4 px-2.5 text-foreground flex-row-reverse",n),e[3]=n,e[4]=b):b=e[4];let k,j;e[5]===Symbol.for("react.memo_cache_sentinel")?(k=()=>r(!0),j=()=>r(!1),e[5]=k,e[6]=j):(k=e[5],j=e[6]);let w;e[7]===Symbol.for("react.memo_cache_sentinel")?(w=l.jsx("div",{className:"absolute inset-0 bg-muted/75 rounded-lg pointer-events-none"}),e[7]=w):w=e[7];let S;e[8]!==u||e[9]!==f?(S=V("z-10 px-4 py-2 flex-1 transition-[max-height,opacity] duration-300 ease-out",u?"max-h-[50vh] overflow-auto opacity-100":V("max-h-[84px] overflow-hidden opacity-99",f&&"mask-b-from-1%")),e[8]=u,e[9]=f,e[10]=S):S=e[10];let N;if(e[11]!==o||e[12]!==c){let I;e[14]!==o?(I=($,C)=>$.type==="data-trigger-event"?l.jsx(tl,{event:$.data},`${o}-${C}`):null,e[14]=o,e[15]=I):I=e[15],N=c.map(I),e[11]=o,e[12]=c,e[13]=N}else N=e[13];let v;e[16]!==y||e[17]!==o||e[18]!==i||e[19]!==c?(v=y?l.jsx(al,{tiptapDoc:i.tiptapDoc}):c.map((I,$)=>I.type==="text"?c[$-1]?.type==="data-trigger-event"?null:l.jsx(Ce,{id:o,part:I},`${o}-${$}`):null),e[16]=y,e[17]=o,e[18]=i,e[19]=c,e[20]=v):v=e[20];let _;e[21]!==N||e[22]!==v?(_=l.jsxs("div",{className:"flex flex-col gap-2",children:[N,v]}),e[21]=N,e[22]=v,e[23]=_):_=e[23];let T;e[24]!==_||e[25]!==S?(T=l.jsx("div",{ref:g,className:S,children:_}),e[24]=_,e[25]=S,e[26]=T):T=e[26];let A;e[27]!==h||e[28]!==T?(A=l.jsxs("div",{tabIndex:0,onClick:h,onFocus:k,onBlur:j,className:"w-full border border-border/60 min-w-0 shadow-xs rounded-lg text-[14px] wrap-break-word overflow-wrap-anywhere bg-background cursor-pointer transition-colors relative flex outline-none",children:[w,T]}),e[27]=h,e[28]=T,e[29]=A):A=e[29];let P;e[30]!==t?(P=l.jsx(Lt,{message:t,className:"mt-1 mr-1 self-end"}),e[30]=t,e[31]=P):P=e[31];let E;e[32]!==A||e[33]!==P?(E=l.jsxs("div",{className:"w-full min-w-0 flex flex-col",children:[A,P]}),e[32]=A,e[33]=P,e[34]=E):E=e[34];let L;return e[35]!==E||e[36]!==b?(L=l.jsx(l.Fragment,{children:l.jsx("div",{className:b,children:E})}),e[35]=E,e[36]=b,e[37]=L):L=e[37],L}function Jt(s){const e=M.c(10),{message:t,pending:n}=s,a=H();let o;e[0]!==n||e[1]!==a?(o=a(n?"chat.liveMessage.pending":"chat.liveMessage.readByAgent"),e[0]=n,e[1]=a,e[2]=o):o=e[2];let c;e[3]!==o?(c=l.jsx("span",{className:"self-end px-3 text-xs text-muted-foreground",children:o}),e[3]=o,e[4]=c):c=e[4];let i;e[5]!==t?(i=l.jsx(Vt,{message:t}),e[5]=t,e[6]=i):i=e[6];let u;return e[7]!==c||e[8]!==i?(u=l.jsxs("div",{className:"flex flex-col gap-1 py-1",children:[c,i]}),e[7]=c,e[8]=i,e[9]=u):u=e[9],u}function ll(s){const e=M.c(5),{part:t}=s,{read:n}=bt();let a;if(e[0]!==t||e[1]!==n){const i=Vs(t);a=i?n.get(i):void 0,e[0]=t,e[1]=n,e[2]=a}else a=e[2];const o=a;if(!o)return null;let c;return e[3]!==o?(c=l.jsx(Jt,{message:o,pending:!1}),e[3]=o,e[4]=c):c=e[4],c}function ol(s){const e=new Map;for(let t=s.length-1;t>=0;t--){const n=s[t]?.parts;if(n)for(const a of n){const o=a;if(o.type!=="data-deck-updated")continue;const c=o.data;if(!c?.path)continue;const i=`deck:${c.path}`;e.has(i)||e.set(i,{tabId:cs(c.path),label:c.name||c.path,kind:c.kind==="page"?"page":"deck"})}}return Array.from(e.values())}function rl(){const s=M.c(9),e=H(),{openPanel:t}=Ve(),n=ye()?.messages??[],a=ol(n);if(a.length===0)return null;const o=a.some(cl),c=a.some(il),i=e(o?c?"chat.threadHtmlPreviews.slidesAndPages":"chat.threadHtmlPreviews.slides":"chat.threadHtmlPreviews.pages"),u="flex flex-col gap-1.5 py-2";let r;s[0]!==i?(r=l.jsx("div",{className:"text-[12px] text-muted-foreground/70 uppercase tracking-wide",children:i}),s[0]=i,s[1]=r):r=s[1];const f="flex flex-wrap gap-2";let d;s[2]!==t?(d=x=>l.jsxs("button",{type:"button",onClick:()=>t(x.tabId),className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-lg border border-border bg-muted/30 hover:bg-muted/60 text-[13px] transition-colors",children:[x.kind==="deck"?l.jsx(bn,{className:"size-3.5 shrink-0 text-muted-foreground"}):l.jsx(Ns,{className:"size-3.5 shrink-0 text-muted-foreground"}),l.jsx("span",{className:"font-medium text-foreground",children:x.label})]},x.tabId),s[2]=t,s[3]=d):d=s[3];const m=a.map(d);let p;s[4]!==m?(p=l.jsx("div",{className:f,children:m}),s[4]=m,s[5]=p):p=s[5];let g;return s[6]!==r||s[7]!==p?(g=l.jsxs("div",{className:u,children:[r,p]}),s[6]=r,s[7]=p,s[8]=g):g=s[8],g}function il(s){return s.kind==="page"}function cl(s){return s.kind==="deck"}function ul(s){const e=M.c(29),{file:t}=s,n=H(),{openPanel:a}=Ve();let o;e[0]!==t.key||e[1]!==a?(o=()=>a(us(t.key)),e[0]=t.key,e[1]=a,e[2]=o):o=e[2];const c=o;let i;e[3]!==t.filename?(i=l.jsx(vn,{filename:t.filename,className:"h-5 w-4 shrink-0"}),e[3]=t.filename,e[4]=i):i=e[4];let u;e[5]!==t.filename||e[6]!==c?(u=l.jsx("button",{type:"button",onClick:c,className:"min-w-0 flex-1 truncate text-left text-[13px] font-medium text-foreground hover:underline",title:t.filename,children:t.filename}),e[5]=t.filename,e[6]=c,e[7]=u):u=e[7];const r=t.downloadUrl,f=t.filename;let d;e[8]!==n?(d=n("chat.outputFileRow.download"),e[8]=n,e[9]=d):d=e[9];let m;e[10]!==t.filename||e[11]!==n?(m=n("chat.outputFileRow.downloadFile",{filename:t.filename}),e[10]=t.filename,e[11]=n,e[12]=m):m=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=l.jsx(jn,{className:"size-3.5"}),e[13]=p):p=e[13];let g;e[14]!==t.downloadUrl||e[15]!==t.filename||e[16]!==d||e[17]!==m?(g=l.jsx("a",{href:r,download:f,className:"hidden shrink-0 text-muted-foreground hover:text-foreground group-hover:block group-focus-within:block",title:d,"aria-label":m,children:p}),e[14]=t.downloadUrl,e[15]=t.filename,e[16]=d,e[17]=m,e[18]=g):g=e[18];let x;e[19]!==n?(x=n("chat.outputFileRow.open"),e[19]=n,e[20]=x):x=e[20];let h;e[21]!==c||e[22]!==x?(h=l.jsx(Ue,{variant:"outline",size:"sm",className:"h-7 shrink-0 px-2.5 text-xs",onClick:c,children:x}),e[21]=c,e[22]=x,e[23]=h):h=e[23];let y;return e[24]!==h||e[25]!==i||e[26]!==u||e[27]!==g?(y=l.jsxs("div",{className:"group flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-2",children:[i,u,g,h]}),e[24]=h,e[25]=i,e[26]=u,e[27]=g,e[28]=y):y=e[28],y}function dl(s){return s.split("/").pop()??s}const fl=/(^|\/)output\//;function ml(s){const e=new Set;for(const t of s.parts??[]){const n=t;if(n.state==="output-available"&&n.type==="tool-write"){const a=n.input?.path;a&&fl.test(a)&&e.add(dl(a))}}return e}function pl(s){const e=M.c(4),{threadId:t,message:n}=s,a=ml(n),o=a.size>0;let c;e[0]!==o?(c={enabled:o},e[0]=o,e[1]=c):c=e[1];const{data:i}=yn(t,c);if(a.size===0)return null;const u=(i??[]).filter(m=>a.has(m.filename));if(u.length===0)return null;const r="flex flex-col gap-1.5 py-2",f=u.map(gl);let d;return e[2]!==f?(d=l.jsx("div",{className:r,children:f}),e[2]=f,e[3]=d):d=e[3],d}function gl(s){return l.jsx(ul,{file:s},s.key)}function xl(s){return s.type==="reasoning"}function hl(s){const e=[],t=new Set,n=new Map,a=new Map,o=new Map;if(s){let i=null;for(let u=0;u<s.parts.length;u++){const r=s.parts[u];if(xl(r)){i||(i={parts:[],startIndex:u},e.push(i)),i.parts.push(r),t.add(u);continue}if(i=null,r.type==="data-tool-metadata"&&"id"in r&&"data"in r){const f=r.data,d={};f.annotations&&(d.annotations=f.annotations),typeof f.latencyMs=="number"&&Number.isFinite(f.latencyMs)&&(d.latencySeconds=f.latencyMs/1e3),typeof f.outputBytes=="number"&&Number.isFinite(f.outputBytes)&&f.outputBytes>=0&&(d.outputBytes=f.outputBytes),f._meta&&typeof f._meta=="object"&&(d._meta=f._meta),n.set(r.id,d);continue}if(r.type==="data-tool-subtask-metadata"&&"id"in r){a.set(r.id,r.data);continue}if(r.type==="data-web-search"&&"id"in r&&"data"in r){const f=r.id,d=r.data;o.set(f,d.text??"");continue}}}const c=[];if(s)for(let i=0;i<s.parts.length;i++){const u=s.parts[i];if(u.type!=="step-start"){if(t.has(i)){const r=e.find(f=>f.startIndex===i);r&&c.push({kind:"reasoning-group",group:r});continue}u.type.startsWith("data-")&&u.type!==Ie||c.push({kind:"part",index:i})}}return{reasoningGroups:e,renderOrder:c,dataParts:{toolMetadata:n,toolSubtaskMetadata:a,webSearchStreaming:o}}}const bl=3;function yl(s,e){let t=-1;for(let o=s.length-1;o>=0;o--){const c=s[o];if(c.kind==="part"&&e[c.index]?.type==="text"){t=o;break}}if(t===-1)return{collapsed:[],tail:s};const n=s.findLastIndex(o=>o.kind==="part"&&e[o.index]?.type===Ie),a=n!==-1&&n<t?n:t;return{collapsed:s.slice(0,a),tail:s.slice(a)}}function Qt(s,e){return s.kind==="part"&&e[s.index]?.type!==Ie}function jl(s,e){let t=0,n=0;for(const a of s)if(a.kind==="reasoning-group")n++;else{const o=e[a.index]?.type;o==="text"?n++:(o==="dynamic-tool"||o?.startsWith("tool-"))&&o!=="tool-todo_write"&&o!=="tool-update_interests"&&t++}return{toolCalls:t,messages:n}}function vl(s){const e=M.c(10),{toolCalls:t,messages:n}=s,a=H();let o;e[0]!==n||e[1]!==a||e[2]!==t?(o=t>0&&l.jsxs(l.Fragment,{children:[l.jsx(pt,{className:"size-3.5 shrink-0"}),l.jsxs("span",{children:[a("chat.assistant.toolCallPlural",{count:t}),n>0?",":""]})]}),e[0]=n,e[1]=a,e[2]=t,e[3]=o):o=e[3];let c;e[4]!==n||e[5]!==a?(c=n>0&&l.jsxs(l.Fragment,{children:[l.jsx(ks,{className:"size-3.5 shrink-0"}),l.jsx("span",{children:a("chat.assistant.messagePlural",{count:n})})]}),e[4]=n,e[5]=a,e[6]=c):c=e[6];let i;return e[7]!==o||e[8]!==c?(i=l.jsxs("span",{className:"flex items-center gap-1.5 text-muted-foreground",children:[o,c]}),e[7]=o,e[8]=c,e[9]=i):i=e[9],i}function Sl(s){const e=M.c(28),{items:t,message:n,reasoningGroups:a,isReasoningActive:o,totalDuration:c,dataParts:i,isLoading:u,isLast:r}=s;let f;e[0]!==t||e[1]!==n.parts?(f=jl(t,n.parts),e[0]=t,e[1]=n.parts,e[2]=f):f=e[2];const{toolCalls:d,messages:m}=f;if(d===0&&m===0)return null;let p;e[3]!==m||e[4]!==d?(p=l.jsx(vl,{toolCalls:d,messages:m}),e[3]=m,e[4]=d,e[5]=p):p=e[5];let g;if(e[6]!==i||e[7]!==r||e[8]!==u||e[9]!==o||e[10]!==t||e[11]!==n||e[12]!==a||e[13]!==c){let y;e[15]!==i||e[16]!==r||e[17]!==u||e[18]!==o||e[19]!==n||e[20]!==a||e[21]!==c?(y=(b,k)=>Xt({item:b,renderIndex:k,message:n,reasoningGroups:a,isReasoningActive:o,totalDuration:c,dataParts:i,isLoading:u,isLast:r,isLastVisiblePart:!1}),e[15]=i,e[16]=r,e[17]=u,e[18]=o,e[19]=n,e[20]=a,e[21]=c,e[22]=y):y=e[22],g=t.map(y),e[6]=i,e[7]=r,e[8]=u,e[9]=o,e[10]=t,e[11]=n,e[12]=a,e[13]=c,e[14]=g}else g=e[14];let x;e[23]!==g?(x=l.jsx("div",{className:"flex flex-col gap-3 sm:gap-2 pt-1",children:g}),e[23]=g,e[24]=x):x=e[24];let h;return e[25]!==p||e[26]!==x?(h=l.jsx(Y,{icon:null,alwaysChevron:!0,title:p,state:"idle",children:x}),e[25]=p,e[26]=x,e[27]=h):h=e[27],h}function Xt({item:s,renderIndex:e,message:t,reasoningGroups:n,isReasoningActive:a,totalDuration:o,dataParts:c,isLoading:i,isLast:u,isLastVisiblePart:r,renderOrder:f}){if(s.kind==="reasoning-group"){const{group:g}=s,x=g===n[n.length-1],h=a&&x;if(!g.parts.some(k=>k.text?.trim())&&!h)return null;const b=n.length===1?o:null;return l.jsx(En,{duration:b,parts:g.parts,isStreaming:h},`${t.id}-reasoning-${g.startIndex}`)}const d=t.parts[s.index],m=r||(f?f.findLastIndex(g=>Qt(g,t.parts))===e:!1),p=m?Js(Qs(),t.metadata?.usage):null;return l.jsx(Nl,{part:d,id:t.id,usageStats:m&&l.jsx(Os,{usage:p,duration:o}),dataParts:c,isLoading:i,isLastMessage:u},`${t.id}-${s.index}`)}function Nl(s){const e=M.c(114),{part:t,id:n,usageStats:a,dataParts:o,isLoading:c,isLastMessage:i}=s;let u;e[0]!==o.toolMetadata?(u=m=>o.toolMetadata.get(m),e[0]=o.toolMetadata,e[1]=u):u=e[1];const r=u;let f;e[2]!==o.toolSubtaskMetadata?(f=m=>o.toolSubtaskMetadata.get(m),e[2]=o.toolSubtaskMetadata,e[3]=f):f=e[3];const d=f;switch(t.type){case"dynamic-tool":{let m;e[4]!==r||e[5]!==t.toolCallId?(m=r(t.toolCallId)?.annotations,e[4]=r,e[5]=t.toolCallId,e[6]=m):m=e[6];let p;e[7]!==r||e[8]!==t.toolCallId?(p=r(t.toolCallId)?.latencySeconds,e[7]=r,e[8]=t.toolCallId,e[9]=p):p=e[9];let g;e[10]!==r||e[11]!==t.toolCallId?(g=r(t.toolCallId)?.outputBytes,e[10]=r,e[11]=t.toolCallId,e[12]=g):g=e[12];let x;e[13]!==r||e[14]!==t.toolCallId?(x=r(t.toolCallId)?._meta,e[13]=r,e[14]=t.toolCallId,e[15]=x):x=e[15];let h;return e[16]!==i||e[17]!==t||e[18]!==m||e[19]!==p||e[20]!==g||e[21]!==x?(h=l.jsx(lt,{part:t,annotations:m,latency:p,outputBytes:g,isLastMessage:i,toolMeta:x}),e[16]=i,e[17]=t,e[18]=m,e[19]=p,e[20]=g,e[21]=x,e[22]=h):h=e[22],h}case"tool-todo_write":return null;case"tool-update_interests":return null;case"tool-user_ask":{let m;e[23]!==r||e[24]!==t.toolCallId?(m=r(t.toolCallId)?.latencySeconds,e[23]=r,e[24]=t.toolCallId,e[25]=m):m=e[25];let p;return e[26]!==t||e[27]!==m?(p=l.jsx(_a,{part:t,latency:m}),e[26]=t,e[27]=m,e[28]=p):p=e[28],p}case"tool-suggest_task":{let m;return e[29]!==t?(m=l.jsx(Ta,{part:t}),e[29]=t,e[30]=m):m=e[30],m}case"tool-propose_plan":{let m;return e[31]!==t?(m=l.jsx(Da,{part:t}),e[31]=t,e[32]=m):m=e[32],m}case"tool-generate_image":{let m;e[33]!==r||e[34]!==t.toolCallId?(m=r(t.toolCallId)?.latencySeconds,e[33]=r,e[34]=t.toolCallId,e[35]=m):m=e[35];let p;return e[36]!==t||e[37]!==m?(p=l.jsx(ma,{part:t,latency:m}),e[36]=t,e[37]=m,e[38]=p):p=e[38],p}case"tool-web_search":case"tool-deep_research":{let m;e[39]!==r||e[40]!==t.toolCallId?(m=r(t.toolCallId)?.latencySeconds,e[39]=r,e[40]=t.toolCallId,e[41]=m):m=e[41];let p;e[42]!==o.webSearchStreaming||e[43]!==t.toolCallId?(p=o.webSearchStreaming.get(t.toolCallId),e[42]=o.webSearchStreaming,e[43]=t.toolCallId,e[44]=p):p=e[44];let g;return e[45]!==t||e[46]!==m||e[47]!==p?(g=l.jsx(wa,{part:t,latency:m,streamingText:p}),e[45]=t,e[46]=m,e[47]=p,e[48]=g):g=e[48],g}case"tool-subtask":{let m;e[49]!==d||e[50]!==t.toolCallId?(m=d(t.toolCallId),e[49]=d,e[50]=t.toolCallId,e[51]=m):m=e[51];let p;e[52]!==r||e[53]!==t.toolCallId?(p=r(t.toolCallId)?.annotations,e[52]=r,e[53]=t.toolCallId,e[54]=p):p=e[54];let g;e[55]!==r||e[56]!==t.toolCallId?(g=r(t.toolCallId)?.latencySeconds,e[55]=r,e[56]=t.toolCallId,e[57]=g):g=e[57];let x;e[58]!==t||e[59]!==m||e[60]!==p||e[61]!==g?(x={part:t,subtaskMeta:m,annotations:p,latency:g},e[58]=t,e[59]=m,e[60]=p,e[61]=g,e[62]=x):x=e[62];const h=x;let y;return e[63]!==h?(y=l.jsx(z.Suspense,{fallback:l.jsx(za,{...h}),children:l.jsx(Fa,{...h})}),e[63]=h,e[64]=y):y=e[64],y}case"text":{const m=!!a&&!c,p=c&&i;let g;return e[65]!==n||e[66]!==t||e[67]!==m||e[68]!==p||e[69]!==a?(g=l.jsx(Ce,{id:n,part:t,extraActions:a,copyable:!0,alwaysShowActions:m,animate:p}),e[65]=n,e[66]=t,e[67]=m,e[68]=p,e[69]=a,e[70]=g):g=e[70],g}case"reasoning":return null;case"step-start":case"file":case"source-url":case"source-document":return null;case"data-tool-metadata":case"data-tool-subtask-metadata":case"data-generate-image":case"data-web-search":return null;default:{const m=t;if(m.type==="tool-COLLECTION_VIRTUAL_MCP_CREATE"){let p;e[71]!==m.toolCallId||e[72]!==r?(p=r(m.toolCallId)?.latencySeconds,e[71]=m.toolCallId,e[72]=r,e[73]=p):p=e[73];let g;return e[74]!==m||e[75]!==p?(g=l.jsx(Ba,{part:m,latency:p}),e[74]=m,e[75]=p,e[76]=g):g=e[76],g}if(m.type==="tool-COLLECTION_VIRTUAL_MCP_LIST"){let p;e[77]!==m.toolCallId||e[78]!==r?(p=r(m.toolCallId)?.latencySeconds,e[77]=m.toolCallId,e[78]=r,e[79]=p):p=e[79];let g;return e[80]!==m||e[81]!==p?(g=l.jsx(Wa,{part:m,latency:p}),e[80]=m,e[81]=p,e[82]=g):g=e[82],g}if(m.type==="tool-COLLECTION_CONNECTIONS_LIST"){let p;e[83]!==m.toolCallId||e[84]!==r?(p=r(m.toolCallId)?.latencySeconds,e[83]=m.toolCallId,e[84]=r,e[85]=p):p=e[85];let g;return e[86]!==m||e[87]!==p?(g=l.jsx(Ja,{part:m,latency:p}),e[86]=m,e[87]=p,e[88]=g):g=e[88],g}if(m.type.startsWith("tool-")){const p=m;let g;e[89]!==o.toolMetadata||e[90]!==p.toolCallId?(g=o.toolMetadata.get(p.toolCallId),e[89]=o.toolMetadata,e[90]=p.toolCallId,e[91]=g):g=e[91];const x=g;let h;e[92]!==m.type||e[93]!==p.output?(h=m.type.endsWith("__get_screenshot")?ca(p.output):null,e[92]=m.type,e[93]=p.output,e[94]=h):h=e[94];const y=h,b=x?.annotations,k=x?.latencySeconds,j=x?.outputBytes,w=x?._meta;let S;e[95]!==m||e[96]!==i||e[97]!==b||e[98]!==k||e[99]!==j||e[100]!==w?(S=l.jsx(lt,{part:m,annotations:b,latency:k,outputBytes:j,isLastMessage:i,toolMeta:w}),e[95]=m,e[96]=i,e[97]=b,e[98]=k,e[99]=j,e[100]=w,e[101]=S):S=e[101];const N=S;if(!y)return N;let v;e[102]!==y?(v=[y],e[102]=y,e[103]=v):v=e[103];let _;e[104]!==p.type?(_=p.type.slice(5),e[104]=p.type,e[105]=_):_=e[105];let T;e[106]!==v||e[107]!==_?(T=l.jsx(Ot,{srcs:v,alt:_}),e[106]=v,e[107]=_,e[108]=T):T=e[108];let A;return e[109]!==N||e[110]!==T?(A=l.jsxs("div",{className:"flex flex-col gap-2",children:[N,T]}),e[109]=N,e[110]=T,e[111]=A):A=e[111],A}if(t.type===Ie){let p;return e[112]!==t?(p=l.jsx(ll,{part:t}),e[112]=t,e[113]=p):p=e[113],p}return m.type.startsWith("data-")||console.warn(`[chat] unknown message part type: ${m.type}`),null}}}function kl(s){const e=M.c(3),{pending:t,children:n}=s;if(!t||t.length===0)return n;let a;return e[0]!==n||e[1]!==t?(a=l.jsxs("div",{className:"flex flex-col gap-3 sm:gap-2",children:[n,t]}),e[0]=n,e[1]=t,e[2]=a):a=e[2],a}function wl(s){const e=M.c(9),{isRunInProgress:t}=s,n=H();if(t){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx(Te,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),e[0]=c):c=e[0];let i;e[1]!==n?(i=n("chat.assistant.resumingTask"),e[1]=n,e[2]=i):i=e[2];let u;return e[3]!==i?(u=l.jsx("div",{className:"flex items-center gap-1.5 py-2 opacity-60",children:l.jsxs("span",{className:"flex items-center gap-1.5",children:[c,l.jsx("span",{className:"text-[14px] text-muted-foreground shimmer",children:i})]})}),e[3]=i,e[4]=u):u=e[4],u}let a;e[5]!==n?(a=n("chat.assistant.noResponseGenerated"),e[5]=n,e[6]=a):a=e[6];let o;return e[7]!==a?(o=l.jsx("div",{className:"text-[14px] text-muted-foreground/60 py-2",children:a}),e[7]=a,e[8]=o):o=e[8],o}function _l(s){const e=M.c(7),{className:t,children:n}=s;let a;e[0]!==t?(a=V("w-full min-w-0 group relative flex items-start gap-4 px-4 z-20 text-foreground flex-row",t),e[0]=t,e[1]=a):a=e[1];let o;e[2]!==n?(o=l.jsx("div",{className:"flex flex-col min-w-0 w-full items-start",children:l.jsx("div",{className:"w-full min-w-0 not-only:rounded-2xl text-[14px] wrap-break-word overflow-wrap-anywhere bg-transparent",children:n})}),e[2]=n,e[3]=o):o=e[3];let c;return e[4]!==a||e[5]!==o?(c=l.jsx("div",{className:a,children:o}),e[4]=a,e[5]=o,e[6]=c):c=e[6],c}function Tl(s){const e=M.c(16),{message:t,turnStartedAt:n,status:a,className:o,isLast:c}=s,i=c===void 0?!1:c,u=H(),{isRunInProgress:r}=ye()??{},f=r===void 0?!1:r,d=je()?.taskId??null,m=a==="streaming",g=m||a==="submitted";let x;e[0]!==n?(x=We(n),e[0]=n,e[1]=x):x=e[1];const h=x;let y;e[2]!==g?(y=()=>g?Date.now():null,e[2]=g,e[3]=y):y=e[3];const[b,k]=z.useState(y),[j,w]=z.useState(g);j!==g&&(w(g),k(()=>g?Date.now():null));const S=h??b,{reasoningGroups:N,renderOrder:v,dataParts:_}=hl(t),T=t!==null&&v.length>0,A=t&&t.parts.length>0?t.parts[t.parts.length-1]:null,P=m&&A?.type==="reasoning";let E;if(e[4]!==t){const G=t?.metadata?.reasoning_start_at?new Date(t.metadata.reasoning_start_at):null,Q=t?.metadata?.reasoning_end_at?new Date(t.metadata.reasoning_end_at):new Date;E=G!==null?Q.getTime()-G.getTime():null,e[4]=t,e[5]=E}else E=e[5];const L=E;let I;e[6]!==i||e[7]!==t?(I=!i||!t||!t.parts.some(Il),e[6]=i,e[7]=t,e[8]=I):I=e[8];const $=I,C=!g&&T&&$&&(()=>{let G=0;for(const Q of v)if(Q.kind==="part"){const ne=t.parts[Q.index]?.type;(ne==="dynamic-tool"||ne?.startsWith("tool-"))&&G++}return G>=bl})(),{collapsed:R,tail:D}=C?yl(v,t.parts):{collapsed:[],tail:v},{pending:B}=bt();let U;e[9]!==i||e[10]!==B?(U=i?B.map(Cl):null,e[9]=i,e[10]=B,e[11]=U):U=e[11];const W=U,K=_l,X=T?l.jsxs("div",{className:"flex flex-col gap-3 sm:gap-2",children:[t.metadata?.resumedFromBackground&&l.jsxs("div",{className:"flex items-center gap-1.5 text-[12px] text-muted-foreground/60 select-none",children:[l.jsx(dt,{className:"size-3 shrink-0"}),l.jsx("span",{children:u("chat.assistant.resumedBackgroundTask")})]}),R.length>0&&l.jsx(Sl,{items:R,message:t,reasoningGroups:N,isReasoningActive:P,totalDuration:L,dataParts:_,isLoading:g,isLast:i}),D.map((G,Q)=>{const ne=R.length+Q,oe=D.findLastIndex(ee=>Qt(ee,t.parts))===Q;return Xt({item:G,renderIndex:ne,message:t,reasoningGroups:N,isReasoningActive:P,totalDuration:L,dataParts:_,isLoading:g,isLast:i,isLastVisiblePart:oe,renderOrder:v})}),d&&l.jsx(pl,{threadId:d,message:t}),W,i&&g&&S!==null&&l.jsx(An,{startedAt:S}),i&&!g&&d&&l.jsxs(l.Fragment,{children:[l.jsx(rl,{}),$&&l.jsx(Ya,{})]}),!g&&l.jsx(Lt,{message:t})]}):l.jsx(kl,{pending:W,children:g?l.jsx(Ln,{startedAt:S}):l.jsx(wl,{isRunInProgress:i&&f})});let Z;return e[12]!==K||e[13]!==o||e[14]!==X?(Z=l.jsx(K,{className:o,children:X}),e[12]=K,e[13]=o,e[14]=X,e[15]=Z):Z=e[15],Z}function Cl(s){return l.jsx(Jt,{message:s,pending:!0},s.id)}function Il(s){const e=s.type;if(e!=="dynamic-tool"&&!e?.startsWith("tool-"))return!1;const t=s.state;return t==="input-streaming"||t==="input-available"||t==="approval-requested"}function yo(s){const e=[],t=s.filter(n=>n.role!=="system"&&!n.metadata?.internal&&!n.metadata?.subtaskJobId);for(let n=0;n<t.length;n++){const a=t[n];if(a)if(a.role==="user"){const o=t[n+1];o&&o.role==="assistant"?(e.push({user:a,assistant:o}),n++):e.push({user:a,assistant:null})}else a.role==="assistant"&&e.push({user:null,assistant:a})}return e}function jo(s){const e=M.c(19),{pair:t,isLastPair:n,status:a}=s,o=z.useRef(null),c=z.useRef(!1);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{o.current&&o.current.scrollIntoView({behavior:"smooth",block:"start"})},e[0]=i):i=e[0];const u=i;let r;e[1]!==n||e[2]!==t.assistant?.metadata?.resumedFromBackground||e[3]!==a?(r=y=>{if(o.current=y,!n||!y||c.current||(c.current=!0,t.assistant?.metadata?.resumedFromBackground))return;if(a==="submitted"||a==="streaming"){y.scrollIntoView({behavior:"smooth",block:"start"});return}const b=y.closest("[data-chat-scroller]");b?b.scrollTop=b.scrollHeight:y.scrollIntoView({behavior:"instant",block:"start"})},e[1]=n,e[2]=t.assistant?.metadata?.resumedFromBackground,e[3]=a,e[4]=r):r=e[4];const f=r,d=!t.user&&"pt-8 sm:pt-6";let m;e[5]!==d?(m=V("flex flex-col pb-2 sm:pb-2",d),e[5]=d,e[6]=m):m=e[6];let p;e[7]!==t.user?(p=t.user&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"sticky top-0 z-50 w-full h-4 bg-background"}),l.jsx("div",{className:"sticky mb-8 sm:mb-6 top-4 z-50",children:l.jsx(Vt,{message:t.user,onScrollToPair:u})})]}),e[7]=t.user,e[8]=p):p=e[8];const g=t.user?.created_at??null;let x;e[9]!==n||e[10]!==t.assistant||e[11]!==a||e[12]!==g?(x=l.jsx(Tl,{message:t.assistant,turnStartedAt:g,status:a,isLast:n}),e[9]=n,e[10]=t.assistant,e[11]=a,e[12]=g,e[13]=x):x=e[13];let h;return e[14]!==f||e[15]!==m||e[16]!==p||e[17]!==x?(h=l.jsxs("div",{ref:f,className:m,children:[p,x]}),e[14]=f,e[15]=m,e[16]=p,e[17]=x,e[18]=h):h=e[18],h}export{Sn as G,jo as M,ul as O,bo as S,Cn as a,On as f,yo as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,a2 as g,a9 as P,K as _,m as y,l as h,j as d}from"./index-
|
|
1
|
+
import{c as f,a2 as g,a9 as P,K as _,m as y,l as h,j as d}from"./index-Dif2W-7O.js";import{u as A}from"./use-decopilot-events-BjrSXQDA.js";function I(){const e=f.c(6),t=P(),a=A();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=_.aiPlanPrices(),e[0]=o):o=e[0];let n;e[1]!==t?(n=async()=>{const{prices:r}=await t.call("ORGANIZATION_BILLING_PLAN_PRICES",{});return Object.fromEntries(r.map(p))},e[1]=t,e[2]=n):n=e[2];let s;return e[3]!==a||e[4]!==n?(s={queryKey:o,enabled:a,staleTime:6e5,queryFn:n},e[3]=a,e[4]=n,e[5]=s):s=e[5],y(s)}function p(e){return[e.planId,{amountCents:e.amountCents,currency:e.currency,interval:e.interval}]}function v(e,t){return(e.amountCents/100).toLocaleString(t,{style:"currency",currency:e.currency.toUpperCase(),maximumFractionDigits:0})}const F=["chat","cms","credits","monitoring","kanban","model_choice","diagnostic_enriched"];function R(e,t){if(!e)return null;const a=e.findIndex(n=>n.features[t]===!0),o=a>=0?e[a]:void 0;return o?{plan:o,index:a}:null}const j="custom",N=new Set(["ai_service"]);function O(e){return!!e&&N.has(e)}const w="mailto:sales@deco.cx";function q(){const e=f.c(8),{org:t}=g(),a=P(),o=A();let n;e[0]!==t.id?(n=_.aiPlanCatalog(t.id),e[0]=t.id,e[1]=n):n=e[1];let s;e[2]!==a?(s=async()=>{const{plans:c}=await a.call("AI_PLAN_LIST",{providerId:"deco"});return c.filter(E)},e[2]=a,e[3]=s):s=e[3];let r;return e[4]!==o||e[5]!==n||e[6]!==s?(r={queryKey:n,enabled:o,staleTime:3e5,queryFn:s},e[4]=o,e[5]=n,e[6]=s,e[7]=r):r=e[7],y(r)}function E(e){return e.id!=="free"}const u=[{symbol:"starter",color:"text-chart-4"},{symbol:"growth",color:"text-chart-1"},{symbol:"scale",color:"text-brand-blue"}],L=u[u.length-1];function D(e){return S(e).color}function S(e){return u[Math.min(e,u.length-1)]??L}function K(e){const t=f.c(13),{index:a,className:o}=e;let n,s,r,c;if(t[0]!==o||t[1]!==a){const{symbol:b,color:x}=S(a);n=b,s="0 0 16 16",r="true",c=h("size-8 shrink-0",x,o),t[0]=o,t[1]=a,t[2]=n,t[3]=s,t[4]=r,t[5]=c}else n=t[2],s=t[3],r=t[4],c=t[5];const m=`/plan-icons.svg#${n}-icon`;let l;t[6]!==m?(l=d.jsx("use",{href:m}),t[6]=m,t[7]=l):l=t[7];let i;return t[8]!==s||t[9]!==r||t[10]!==c||t[11]!==l?(i=d.jsx("svg",{viewBox:s,"aria-hidden":r,className:c,children:l}),t[8]=s,t[9]=r,t[10]=c,t[11]=l,t[12]=i):i=t[12],i}export{j as C,F,K as P,w as S,I as a,D as b,v as f,O as i,R as p,q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,bA as A,j as c,bC as O,bD as h,bB as _,bx as L,by as z,bz as G,bG as j,bP as H,dn as w,bK as K,bM as B,bQ as Q,bL as U,bN as V,bO as W,bR as Z,bS as q,bF as J,c as C,l as X}from"./index-
|
|
1
|
+
import{r as i,bA as A,j as c,bC as O,bD as h,bB as _,bx as L,by as z,bz as G,bG as j,bP as H,dn as w,bK as K,bM as B,bQ as Q,bL as U,bN as V,bO as W,bR as Z,bS as q,bF as J,c as C,l as X}from"./index-Dif2W-7O.js";var m="Popover",[E]=H(m,[j]),x=j(),[Y,v]=E(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=x(e),d=i.useRef(null),[l,u]=i.useState(!1),[f,P]=L({prop:r,defaultProp:n??!1,onChange:s,caller:m});return c.jsx(z,{...p,children:c.jsx(Y,{scope:e,contentId:G(),triggerRef:d,open:f,onOpenChange:P,onOpenToggle:i.useCallback(()=>P(R=>!R),[P]),hasCustomAnchor:l,onCustomAnchorAdd:i.useCallback(()=>u(!0),[]),onCustomAnchorRemove:i.useCallback(()=>u(!1),[]),modal:a,children:o})})};N.displayName=m;var F="PopoverAnchor",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(F,o),s=x(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(_,{...s,...r,ref:e})});S.displayName=F;var y="PopoverTrigger",D=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(y,o),s=x(o),a=A(e,n.triggerRef),p=c.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":$(n.open),...r,ref:a,onClick:h(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(_,{asChild:!0,...s,children:p})});D.displayName=y;var b="PopoverPortal",[ee,oe]=E(b,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=v(b,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(J,{asChild:!0,container:n,children:r})})})};M.displayName=b;var g="PopoverContent",T=i.forwardRef((t,e)=>{const o=oe(g,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=v(g,t.__scopePopover);return c.jsx(w,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});T.displayName=g;var te=Q("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return K(a)},[]),c.jsx(B,{as:te,allowPinchZoom:!0,children:c.jsx(k,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:h(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,d=p.button===0&&p.ctrlKey===!0,l=p.button===2||d;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:h(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(k,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),k=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:u,...f}=t,P=v(g,o),R=x(o);return U(),c.jsx(V,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(W,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onDismiss:()=>P.onOpenChange(!1),children:c.jsx(Z,{"data-state":$(P.open),role:"dialog",id:P.contentId,...R,...f,ref:e,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),I="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(I,o);return c.jsx(O.button,{type:"button",...r,ref:e,onClick:h(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=I;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=x(o);return c.jsx(q,{...n,...r,ref:e})});ce.displayName=ae;function $(t){return t?"open":"closed"}var ie=N,pe=S,le=D,ue=M,de=T;function ve(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(le,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=C.c(16);let o,r,n,s,a;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5]);const p=s===void 0?"center":s,d=a===void 0?4:a;let l;e[6]!==o?(l=X("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden border p-4 shadow-md outline-hidden",o),e[6]=o,e[7]=l):l=e[7];let u;e[8]!==p||e[9]!==n||e[10]!==d||e[11]!==l?(u=c.jsx(de,{"data-slot":"popover-content",align:p,sideOffset:d,translate:"no",className:l,...n}),e[8]=p,e[9]=n,e[10]=d,e[11]=l,e[12]=u):u=e[12];let f;return e[13]!==r||e[14]!==u?(f=c.jsx(ue,{container:r,children:u}),e[13]=r,e[14]=u,e[15]=f):f=e[15],f}function he(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ve as P,Pe as a,ge as b,he as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as it,b as pt,r as lt,F as vt,j as e,l as et,B as tt,au as Nt}from"./index-CZSkv8g1.js";import{a0 as Ct,D as Dt}from"./agent-icon-DoIYDFcR.js";import{s as kt}from"./Plus-Bah-JwsW.js";import{S as St}from"./scroll-area-BHXRD6k2.js";import{aJ as wt,l as zt,aE as Tt,aF as Et,aK as Pt,aD as ct,aH as dt}from"./content-tab-BmXoJKLU.js";import"./AlertCircle-BMMhb7se.js";import"./Tool01-CwSqD6lp.js";import"./ArrowUp-CEvmL_t8.js";import"./ArrowLeft-DZfjBi-1.js";import"./LinkBroken01-CXfqY9XE.js";import"./ShoppingBag01-DagopGag.js";import"./ZoomOut-BuT7I9z4.js";import"./Building02-DPyqSZzb.js";import"./CheckCircle-HwWiMbx-.js";import"./ChevronUp-CWS-cWjT.js";import"./ChevronSelectorVertical-DAeUzPm4.js";import"./UserSquare-CBISIUJN.js";import"./Copy01-D_JDMij1.js";import"./CreditCard01-A84DgQyt.js";import"./DotsVertical-DHY1JtEf.js";import"./Image01-CDAP7qzE.js";import"./Globe04-DdxRTg9B.js";import"./SwitchHorizontal01-DE-tfdq-.js";import"./Key01-Uf5NEuCB.js";import"./Link01-CHcFn0b2.js";import"./Monitor01-BNcbQ2qa.js";import"./Sun-BTI_jIbq.js";import"./Play-CHyaMX8g.js";import"./SearchMd-MjBL5rzF.js";import"./Trash01-D2hL36nK.js";import"./Upload01-jWqQbPqo.js";import"./User01-LL9r5P84.js";import"./Users01-Czq9-wm_.js";import"./XClose-CXmC5YJZ.js";import"./index-BdQq_4o_.js";import"./use-organization-settings-o1V7Wa6F.js";import"./schema-wvPEQjTn.js";import"./task-board-0Ue5jgdg.js";import"./chat-context-Cj8lRtpX.js";import"./use-panel-navigate-CemWnkPa.js";import"./thread-route-mDsyFTdQ.js";import"./use-project-scope-Bj5Fw44i.js";import"./repository-binding-ybDjDNUp.js";import"./use-mcp-client-BfRGoTzW.js";import"./auth-CTRZgQb-.js";import"./autosend-Bwz57Oob.js";import"./thread-intent-C3HjT5Xj.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-wst_QhmZ.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-BxJpoiX1.js";import"./use-ai-providers-Ctjp1uIK.js";import"./use-chat-navigation-DhD5bi3J.js";import"./location-BjlyegC2.js";import"./alert-dialog-COAq874v.js";import"./tooltip-32VKFB9k.js";import"./index-CeLJJwaJ.js";import"./site-editor-toast-CgPR9tqp.js";import"./input-r8Bz5MmS.js";import"./usage-stats-CIXS82Np.js";import"./tool-namespace-D0YHDA4R.js";import"./form-CFTSOQEI.js";import"./label-CUvw0CIN.js";import"./utils-CVEq3hMx.js";import"./markdown-xTfJU4ZI.js";import"./use-copy-CCa7OeKm.js";import"./use-mobile-120ghvW_.js";import"./format-time-CAj8AQXM.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-Dvd-Hbqj.js";import"./file-type-icon-CZja8M5H.js";import"./shell-layout-DMbUI291.js";import"./avatar-BqzGQX6u.js";import"./use-clock-tick-BMsmXORk.js";import"./command-xjp7U_6o.js";import"./index-MHwKIq8y.js";import"./integration-icon-DqgE-XgN.js";import"./project-icon-DhS5yRKd.js";import"./new-project-dialog-Bgi1m0oL.js";import"./repository-import-picker-WXSDvvSp.js";import"./use-navigate-to-agent-DbzqtBA0.js";import"./repository-picker-DjcUFiOj.js";import"./useInfiniteQuery-BszgtSKD.js";import"./infiniteQueryObserver-CjCcc5ls.js";import"./collection-search-8MVX3xhB.js";import"./use-debounced-value-fkneMIaZ.js";import"./required-auth-layout-CLl69sSm.js";import"./use-org-sso-MuG1ETRW.js";import"./chat-draft-DQ7Zh-ge.js";import"./select-sQhsGSu-.js";import"./tabs-Cf_-YArR.js";import"./use-deco-credits-DS7Tf9a6.js";import"./toggle-group-BprmAdhh.js";import"./use-open-billing-url-KtPa2dIG.js";import"./index-clim2OrQ.js";import"./checkbox-0AX4LQ84.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-C8iDLk0p.js";import"./drawer-Hg3yrLGb.js";import"./input-0Brs7Osm.js";import"./suggestion-aMdELt97.js";import"./use-mcp-prompts-qR7FWnTS.js";import"./use-org-fs-QTqb7Okr.js";import"./question-004-sINsf4GQ.js";import"./use-members-BwfqRX_b.js";import"./use-org-auth-client-BdP8iNKS.js";import"./feature-paywall-BKP7yW58.js";import"./plan-ladder-Cw5p1Mwy.js";import"./add-connection-dialog-DKWM5Vkc.js";import"./extract-connection-data-DR5UxnLo.js";import"./metadata-D72DunRR.js";import"./connection-DH8frA39.js";import"./url-slug-VbfAsI5Y.js";import"./connection-card-DZ81Xmwr.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-CLN5ZJXm.js";import"./use-connection-BLth9eEn.js";import"./schema-BgL0-2qc.js";import"./connection-form-helpers-C1GQW3b1.js";import"./authenticate-and-persist-oauth-BZfH0Yw8.js";import"./mcp-oauth-BtPQWb1B.js";import"./mcp-oauth-DH-nuezz.js";import"./collection-tabs-iwDSS1Gk.js";import"./badge-Dof8RzS5.js";import"./use-infinite-scroll-DGbkPvNj.js";import"./useSuspenseInfiniteQuery-BhSLtgqL.js";import"./use-task-board-events-D0ta6ytV.js";import"./use-project-native-view-presence-ChmXhpS6.js";import"./use-file-configs-1z12RUIF.js";import"./site-slug-DebpOoQq.js";import"./sandbox-url-D3mC8qhT.js";import"./utils-C8NvNrqd.js";import"./index-C-jiNxoJ.js";import"./pair-BYiKssvp.js";import"./collapsible-r6Q1npI9.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-D1btqiMZ.js";import"./types-lEVFbgsq.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-DINfogR5.js";import"./use-thread-outputs-CEOqf0ak.js";import"./sandbox-git-api-CRxdlhrN.js";import"./blocks-tab-states-DQZxzX4Q.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./secret-ciphertext-XeQexsho.js";import"./alert-DqfINKxW.js";import"./switch-CJCFpusd.js";import"./monaco-editor-BDxt_U55.js";import"./editor-BoKyJDJr.js";import"./calendar-DZ02RkKj.js";import"./editor-classes-DIcJFalo.js";import"./core.esm-CfFclpx-.js";import"./sortable.esm-cWIzqT3V.js";import"./view-mode-toggle-BVpGihk4.js";import"./combobox-C0MaRkga.js";import"./search-input-DYBHkKHy.js";import"./asset-utils-BDB3NRek.js";import"./empty-state-B7ov-HNf.js";import"./mustache-BpTVz02q.js";import"./use-content-sync-Bd4G4mdY.js";import"./sandbox-lifecycle-context-4GrxxXe6.js";import"./empty-state-DJq-iAX2.js";const ft="border-success/30 bg-success/10 text-success hover:bg-success/20",ut="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function Uo(h){const t=it.c(83),{decofile:b,selectedKey:d,onSelect:o,onCreate:m,onReschedule:i,isCreating:D}=h,s=D===void 0?!1:D,r=pt(),[v,N]=lt.useState(null),[rt]=vt(),[n,f]=lt.useState(Ht),p=rt.language;let C;t[0]!==n||t[1]!==p?(C=new Intl.DateTimeFormat(p,{month:"long",year:"numeric"}).format(n),t[0]=n,t[1]=p,t[2]=C):C=t[2];const y=C;let u,x,a,c,j,k,S,w,z,T;if(t[3]!==n||t[4]!==b||t[5]!==v||t[6]!==s||t[7]!==p||t[8]!==y||t[9]!==m||t[10]!==i||t[11]!==o||t[12]!==d||t[13]!==r){const xt=new Intl.DateTimeFormat(p,{weekday:"short"}),gt=new Intl.DateTimeFormat(p,{dateStyle:"long"}),{byDay:ht,undated:ot}=wt(zt(b)),st=Tt(n),bt=Et(new Date);x="flex h-full w-full flex-col";let G;t[24]===Symbol.for("react.memo_cache_sentinel")?(G=()=>f(ct(new Date)),t[24]=G):G=t[24];let H;t[25]!==r?(H=r("sandbox.postCalendar.today"),t[25]=r,t[26]=H):H=t[26];let I;t[27]!==H?(I=e.jsx(tt,{variant:"outline",size:"sm",onClick:G,children:H}),t[27]=H,t[28]=I):I=t[28];let Q;t[29]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>f(Mt),t[29]=Q):Q=t[29];let F;t[30]!==r?(F=r("sandbox.postCalendar.previous"),t[30]=r,t[31]=F):F=t[31];let V;t[32]===Symbol.for("react.memo_cache_sentinel")?(V=e.jsx(Dt,{size:16}),t[32]=V):V=t[32];let U;t[33]!==F?(U=e.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:Q,"aria-label":F,children:V}),t[33]=F,t[34]=U):U=t[34];let X;t[35]===Symbol.for("react.memo_cache_sentinel")?(X=()=>f(Lt),t[35]=X):X=t[35];let _;t[36]!==r?(_=r("sandbox.postCalendar.next"),t[36]=r,t[37]=_):_=t[37];let Y;t[38]===Symbol.for("react.memo_cache_sentinel")?(Y=e.jsx(Nt,{size:16}),t[38]=Y):Y=t[38];let $;t[39]!==_?($=e.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:X,"aria-label":_,children:Y}),t[39]=_,t[40]=$):$=t[40];let O;t[41]!==y?(O=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:y}),t[41]=y,t[42]=O):O=t[42];let B;t[43]!==r?(B=r("sandbox.postCalendar.legendScheduled"),t[43]=r,t[44]=B):B=t[44];let K;t[45]!==B?(K=e.jsx(mt,{className:ft,label:B}),t[45]=B,t[46]=K):K=t[46];let R;t[47]!==r?(R=r("sandbox.postCalendar.legendUnscheduled"),t[47]=r,t[48]=R):R=t[48];let A;t[49]!==R?(A=e.jsx(mt,{className:ut,label:R}),t[49]=R,t[50]=A):A=t[50];let W;t[51]!==K||t[52]!==A?(W=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[K,A]}),t[51]=K,t[52]=A,t[53]=W):W=t[53],t[54]!==I||t[55]!==U||t[56]!==$||t[57]!==O||t[58]!==W?(a=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[I,U,$,O,W]}),t[54]=I,t[55]=U,t[56]=$,t[57]=O,t[58]=W,t[59]=a):a=t[59],T="relative flex-1 min-h-0",u=St,z="h-full",S="flex min-w-[880px] gap-4 p-4";let J;t[60]!==r?(J=r("sandbox.postCalendar.unscheduledHint"),t[60]=r,t[61]=J):J=t[61];let Z;t[62]!==J?(Z=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:J}),t[62]=J,t[63]=Z):Z=t[63],w=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:st[0]?.map(l=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:xt.format(l)},l.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:st.flat().map(l=>{const yt=l.getMonth()===n.getMonth(),jt=ht.get(Pt(l))??[];return e.jsxs("div",{onDragOver:g=>{v&&(g.preventDefault(),g.dataTransfer.dropEffect="move")},onDrop:g=>{g.preventDefault();const at=g.dataTransfer.getData("text/plain");N(null),at&&i(at,l)},className:et("group/day min-h-28 space-y-1 p-2 transition-colors",yt?"bg-background":"bg-muted/40",v&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:et("grid size-6 place-items-center rounded-full text-xs",l.getTime()===bt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:l.getDate()}),e.jsx(tt,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:s,onClick:()=>m(l),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:gt.format(l)}),children:e.jsx(kt,{size:14})})]}),jt.map(g=>e.jsx(nt,{entry:g,active:g.post.key===d,draggable:g.scheduled,onSelect:o,onDragStateChange:N},g.post.key))]},l.getTime())})}),Z]}),c="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",j=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:ot.length})}),k=ot.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(Ct,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):ot.map(l=>e.jsx(nt,{entry:l,active:l.post.key===d,draggable:!1,onSelect:o,onDragStateChange:N},l.post.key)),t[3]=n,t[4]=b,t[5]=v,t[6]=s,t[7]=p,t[8]=y,t[9]=m,t[10]=i,t[11]=o,t[12]=d,t[13]=r,t[14]=u,t[15]=x,t[16]=a,t[17]=c,t[18]=j,t[19]=k,t[20]=S,t[21]=w,t[22]=z,t[23]=T}else u=t[14],x=t[15],a=t[16],c=t[17],j=t[18],k=t[19],S=t[20],w=t[21],z=t[22],T=t[23];let E;t[64]!==c||t[65]!==j||t[66]!==k?(E=e.jsxs("div",{className:c,children:[j,k]}),t[64]=c,t[65]=j,t[66]=k,t[67]=E):E=t[67];let P;t[68]!==E||t[69]!==S||t[70]!==w?(P=e.jsxs("div",{className:S,children:[w,E]}),t[68]=E,t[69]=S,t[70]=w,t[71]=P):P=t[71];let L;t[72]!==u||t[73]!==P||t[74]!==z?(L=e.jsx(u,{className:z,children:P}),t[72]=u,t[73]=P,t[74]=z,t[75]=L):L=t[75];let M;t[76]!==L||t[77]!==T?(M=e.jsx("div",{className:T,children:L}),t[76]=L,t[77]=T,t[78]=M):M=t[78];let q;return t[79]!==x||t[80]!==a||t[81]!==M?(q=e.jsxs("div",{className:x,children:[a,M]}),t[79]=x,t[80]=a,t[81]=M,t[82]=q):q=t[82],q}function Lt(h){return dt(h,1)}function Mt(h){return dt(h,-1)}function Ht(){return ct(new Date)}function mt(h){const t=it.c(7),{className:b,label:d}=h;let o;t[0]!==b?(o=et("size-3 rounded-sm border",b),t[0]=b,t[1]=o):o=t[1];let m;t[2]!==o?(m=e.jsx("span",{className:o}),t[2]=o,t[3]=m):m=t[3];let i;return t[4]!==d||t[5]!==m?(i=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[m,d]}),t[4]=d,t[5]=m,t[6]=i):i=t[6],i}function nt(h){const t=it.c(23),{entry:b,active:d,draggable:o,onSelect:m,onDragStateChange:i}=h,D=pt(),{post:s,scheduled:r}=b,v=r?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let N;t[0]!==D||t[1]!==v?(N=D(v),t[0]=D,t[1]=v,t[2]=N):N=t[2];const rt=N;let n;t[3]!==i||t[4]!==s.key?(n=j=>{j.dataTransfer.setData("text/plain",s.key),j.dataTransfer.effectAllowed="move",i(s.key)},t[3]=i,t[4]=s.key,t[5]=n):n=t[5];let f;t[6]!==i?(f=()=>i(null),t[6]=i,t[7]=f):f=t[7];let p;t[8]!==m||t[9]!==s.key?(p=()=>m(s.key),t[8]=m,t[9]=s.key,t[10]=p):p=t[10];const C=`${s.title} · ${rt}`,y=r?ft:ut,u=o&&"cursor-grab active:cursor-grabbing",x=d&&"ring-2 ring-primary";let a;t[11]!==y||t[12]!==u||t[13]!==x?(a=et("w-full truncate rounded-lg border px-2 py-1 text-left text-xs font-medium transition-colors",y,u,x),t[11]=y,t[12]=u,t[13]=x,t[14]=a):a=t[14];let c;return t[15]!==o||t[16]!==s.title||t[17]!==a||t[18]!==n||t[19]!==f||t[20]!==p||t[21]!==C?(c=e.jsx("button",{type:"button",draggable:o,onDragStart:n,onDragEnd:f,onClick:p,title:C,className:a,children:s.title}),t[15]=o,t[16]=s.title,t[17]=a,t[18]=n,t[19]=f,t[20]=p,t[21]=C,t[22]=c):c=t[22],c}export{Uo as PostCalendar};
|
|
1
|
+
import{c as it,b as pt,r as lt,F as vt,j as e,l as et,B as tt,au as Nt}from"./index-Dif2W-7O.js";import{a0 as Ct,D as Dt}from"./agent-icon-C8bMTp7B.js";import{s as kt}from"./Plus-DvMEY06p.js";import{S as St}from"./scroll-area-BqNRxpEO.js";import{aJ as wt,l as zt,aE as Tt,aF as Et,aK as Pt,aD as ct,aH as dt}from"./content-tab-C9fs50zD.js";import"./AlertCircle-YMl3_Yl_.js";import"./Tool01-CFZYsvfT.js";import"./ArrowUp-DOUrgoGa.js";import"./ArrowLeft-BBs5Bo74.js";import"./LinkBroken01-Bt4dCcO2.js";import"./ShoppingBag01-1dmzAnTp.js";import"./ZoomOut-BTCRJ-Cy.js";import"./Building02-BJ4kuMDR.js";import"./CheckCircle-BJoV2buB.js";import"./ChevronUp-Bk1lLXIE.js";import"./ChevronSelectorVertical-Cz68Xl4c.js";import"./UserSquare-CZee7kCi.js";import"./Copy01-DgkTTtAt.js";import"./CreditCard01-DM-SR88q.js";import"./DotsVertical-wwLxtTff.js";import"./Image01-CfFOGALp.js";import"./Globe04-BNStynYJ.js";import"./SwitchHorizontal01-Ye9lOvkq.js";import"./Key01-C75ijeKM.js";import"./Link01-DZOkcwx5.js";import"./Monitor01-BYsgDMs3.js";import"./Sun-zvXPMBE6.js";import"./Play-i9lPYWvE.js";import"./SearchMd-Be0mEQAk.js";import"./Trash01-BeM7jMku.js";import"./Upload01-w2_F9E6p.js";import"./User01-CVKWYZvh.js";import"./Users01-Dfk3XUhg.js";import"./XClose-z6Vm880I.js";import"./index-BdQq_4o_.js";import"./use-organization-settings-BZyvFOZ-.js";import"./schema-C5ll25-F.js";import"./task-board-BZa1GKE0.js";import"./chat-context-CdCmbIQJ.js";import"./use-panel-navigate-nrEaz6Gi.js";import"./thread-route-B-Pby_vt.js";import"./use-project-scope-D5dOeNxC.js";import"./repository-binding-CyvRd5qV.js";import"./use-mcp-client-DvMvMjon.js";import"./auth-GLn956Rh.js";import"./autosend-BbodPyfC.js";import"./thread-intent-BOI8Y8o4.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-n2RQj1o9.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-BjrSXQDA.js";import"./use-ai-providers-ByuweJjo.js";import"./use-chat-navigation-CDIbYaJL.js";import"./location-BjlyegC2.js";import"./alert-dialog-CMQkwBy5.js";import"./tooltip-Be6wo5tR.js";import"./index-Cdepno9I.js";import"./site-editor-toast-DXKvHmNX.js";import"./input-g6NzGPlJ.js";import"./usage-stats-NOThofFr.js";import"./tool-namespace-C03gU7a4.js";import"./form-DySs55Ou.js";import"./label-IXkYcTWD.js";import"./utils-CVEq3hMx.js";import"./markdown-C68Q-mkS.js";import"./use-copy-CZnKziVl.js";import"./use-mobile-DhCXGkCo.js";import"./format-time-CAj8AQXM.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-CPOdDL6Y.js";import"./file-type-icon-DF2XQzPr.js";import"./shell-layout-C50mG8ul.js";import"./avatar-DJQKqNuu.js";import"./use-clock-tick-C0eQyVp-.js";import"./command-hZ1y73c0.js";import"./index-nIHWX8bm.js";import"./integration-icon-Bo8-L4M5.js";import"./project-icon-C8H_L08H.js";import"./new-project-dialog-CCJZJ4cx.js";import"./repository-import-picker-BEUokmWQ.js";import"./use-navigate-to-agent-NXH_i538.js";import"./repository-picker-BQRDNsQ9.js";import"./useInfiniteQuery-CuM_l11Q.js";import"./infiniteQueryObserver-BXjuz8K2.js";import"./collection-search-rdO0NJJu.js";import"./use-debounced-value-DpoC-cU_.js";import"./required-auth-layout-D3GDxyGN.js";import"./use-org-sso-BOsHFRck.js";import"./chat-draft-CgdpCv_I.js";import"./select-7CSUe0XG.js";import"./tabs-CbKrt0S2.js";import"./use-deco-credits-BrUv9SlN.js";import"./toggle-group-BtWsCFES.js";import"./use-open-billing-url-CnPVNS1E.js";import"./index-CvlSodIk.js";import"./checkbox-uUb1TZ3_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-B9mcX7AX.js";import"./drawer-xGVi5OhM.js";import"./input-B4pEydDM.js";import"./suggestion-CBTCrHOQ.js";import"./use-mcp-prompts-DC5dS3tb.js";import"./use-org-fs-TCuMiJqS.js";import"./question-004-sINsf4GQ.js";import"./use-members-DZr_5YC1.js";import"./use-org-auth-client-CWCid2nZ.js";import"./feature-paywall-DA6siKP6.js";import"./plan-ladder-DLtWhNV9.js";import"./add-connection-dialog-Bi3ufT8K.js";import"./extract-connection-data-DRmTCuHC.js";import"./metadata-D72DunRR.js";import"./connection-BIr2JVH9.js";import"./url-slug-CP2sENZ9.js";import"./connection-card-BEaJgVph.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-CNnEFoSx.js";import"./use-connection-CsbXqvOQ.js";import"./schema-BXx2mRBE.js";import"./connection-form-helpers-D_lEyL1e.js";import"./authenticate-and-persist-oauth-LJquf42E.js";import"./mcp-oauth-BeIRiHEb.js";import"./mcp-oauth-CHRyQMfO.js";import"./collection-tabs-SP_Oxddc.js";import"./badge-MR8klHHZ.js";import"./use-infinite-scroll-DigXwy5i.js";import"./useSuspenseInfiniteQuery-CKyaMnVG.js";import"./use-task-board-events-DT0qRsJt.js";import"./use-project-native-view-presence-B9w77aQ3.js";import"./use-file-configs-CMwZdIta.js";import"./site-slug-DebpOoQq.js";import"./sandbox-url-D3mC8qhT.js";import"./utils-YiUcPnSq.js";import"./index-BgAqSIQ9.js";import"./pair-DkbJ98yd.js";import"./collapsible-Dh7-8yfe.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CIZFLg7D.js";import"./types-DeNiBNDA.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-CACWDefJ.js";import"./use-thread-outputs-Cb3lONDK.js";import"./sandbox-git-api-CRxdlhrN.js";import"./blocks-tab-states-CJcWY_b1.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./secret-ciphertext-CjSmOPah.js";import"./alert-D-uNQTTi.js";import"./switch-T6YV-pm3.js";import"./monaco-editor-BxMZnQ0j.js";import"./editor-Dy_ud1L1.js";import"./calendar-wiEtXR35.js";import"./editor-classes-YH9JoFd9.js";import"./core.esm-nksLbJN5.js";import"./sortable.esm-CkjhjaHY.js";import"./view-mode-toggle-Cf7jrZTp.js";import"./combobox-pfaZy3ZG.js";import"./search-input-CY8uhr2h.js";import"./asset-utils-ClMJxMY2.js";import"./empty-state-CJGWBYqN.js";import"./mustache-Pf5TCvpc.js";import"./use-content-sync-CFGjTSUB.js";import"./sandbox-lifecycle-context-C-CFz47M.js";import"./empty-state-Cz6B4cfX.js";const ft="border-success/30 bg-success/10 text-success hover:bg-success/20",ut="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function Uo(h){const t=it.c(83),{decofile:b,selectedKey:d,onSelect:o,onCreate:m,onReschedule:i,isCreating:D}=h,s=D===void 0?!1:D,r=pt(),[v,N]=lt.useState(null),[rt]=vt(),[n,f]=lt.useState(Ht),p=rt.language;let C;t[0]!==n||t[1]!==p?(C=new Intl.DateTimeFormat(p,{month:"long",year:"numeric"}).format(n),t[0]=n,t[1]=p,t[2]=C):C=t[2];const y=C;let u,x,a,c,j,k,S,w,z,T;if(t[3]!==n||t[4]!==b||t[5]!==v||t[6]!==s||t[7]!==p||t[8]!==y||t[9]!==m||t[10]!==i||t[11]!==o||t[12]!==d||t[13]!==r){const xt=new Intl.DateTimeFormat(p,{weekday:"short"}),gt=new Intl.DateTimeFormat(p,{dateStyle:"long"}),{byDay:ht,undated:ot}=wt(zt(b)),st=Tt(n),bt=Et(new Date);x="flex h-full w-full flex-col";let G;t[24]===Symbol.for("react.memo_cache_sentinel")?(G=()=>f(ct(new Date)),t[24]=G):G=t[24];let H;t[25]!==r?(H=r("sandbox.postCalendar.today"),t[25]=r,t[26]=H):H=t[26];let I;t[27]!==H?(I=e.jsx(tt,{variant:"outline",size:"sm",onClick:G,children:H}),t[27]=H,t[28]=I):I=t[28];let Q;t[29]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>f(Mt),t[29]=Q):Q=t[29];let F;t[30]!==r?(F=r("sandbox.postCalendar.previous"),t[30]=r,t[31]=F):F=t[31];let V;t[32]===Symbol.for("react.memo_cache_sentinel")?(V=e.jsx(Dt,{size:16}),t[32]=V):V=t[32];let U;t[33]!==F?(U=e.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:Q,"aria-label":F,children:V}),t[33]=F,t[34]=U):U=t[34];let X;t[35]===Symbol.for("react.memo_cache_sentinel")?(X=()=>f(Lt),t[35]=X):X=t[35];let _;t[36]!==r?(_=r("sandbox.postCalendar.next"),t[36]=r,t[37]=_):_=t[37];let Y;t[38]===Symbol.for("react.memo_cache_sentinel")?(Y=e.jsx(Nt,{size:16}),t[38]=Y):Y=t[38];let $;t[39]!==_?($=e.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:X,"aria-label":_,children:Y}),t[39]=_,t[40]=$):$=t[40];let O;t[41]!==y?(O=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:y}),t[41]=y,t[42]=O):O=t[42];let B;t[43]!==r?(B=r("sandbox.postCalendar.legendScheduled"),t[43]=r,t[44]=B):B=t[44];let K;t[45]!==B?(K=e.jsx(mt,{className:ft,label:B}),t[45]=B,t[46]=K):K=t[46];let R;t[47]!==r?(R=r("sandbox.postCalendar.legendUnscheduled"),t[47]=r,t[48]=R):R=t[48];let A;t[49]!==R?(A=e.jsx(mt,{className:ut,label:R}),t[49]=R,t[50]=A):A=t[50];let W;t[51]!==K||t[52]!==A?(W=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[K,A]}),t[51]=K,t[52]=A,t[53]=W):W=t[53],t[54]!==I||t[55]!==U||t[56]!==$||t[57]!==O||t[58]!==W?(a=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[I,U,$,O,W]}),t[54]=I,t[55]=U,t[56]=$,t[57]=O,t[58]=W,t[59]=a):a=t[59],T="relative flex-1 min-h-0",u=St,z="h-full",S="flex min-w-[880px] gap-4 p-4";let J;t[60]!==r?(J=r("sandbox.postCalendar.unscheduledHint"),t[60]=r,t[61]=J):J=t[61];let Z;t[62]!==J?(Z=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:J}),t[62]=J,t[63]=Z):Z=t[63],w=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:st[0]?.map(l=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:xt.format(l)},l.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:st.flat().map(l=>{const yt=l.getMonth()===n.getMonth(),jt=ht.get(Pt(l))??[];return e.jsxs("div",{onDragOver:g=>{v&&(g.preventDefault(),g.dataTransfer.dropEffect="move")},onDrop:g=>{g.preventDefault();const at=g.dataTransfer.getData("text/plain");N(null),at&&i(at,l)},className:et("group/day min-h-28 space-y-1 p-2 transition-colors",yt?"bg-background":"bg-muted/40",v&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:et("grid size-6 place-items-center rounded-full text-xs",l.getTime()===bt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:l.getDate()}),e.jsx(tt,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:s,onClick:()=>m(l),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:gt.format(l)}),children:e.jsx(kt,{size:14})})]}),jt.map(g=>e.jsx(nt,{entry:g,active:g.post.key===d,draggable:g.scheduled,onSelect:o,onDragStateChange:N},g.post.key))]},l.getTime())})}),Z]}),c="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",j=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:ot.length})}),k=ot.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(Ct,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):ot.map(l=>e.jsx(nt,{entry:l,active:l.post.key===d,draggable:!1,onSelect:o,onDragStateChange:N},l.post.key)),t[3]=n,t[4]=b,t[5]=v,t[6]=s,t[7]=p,t[8]=y,t[9]=m,t[10]=i,t[11]=o,t[12]=d,t[13]=r,t[14]=u,t[15]=x,t[16]=a,t[17]=c,t[18]=j,t[19]=k,t[20]=S,t[21]=w,t[22]=z,t[23]=T}else u=t[14],x=t[15],a=t[16],c=t[17],j=t[18],k=t[19],S=t[20],w=t[21],z=t[22],T=t[23];let E;t[64]!==c||t[65]!==j||t[66]!==k?(E=e.jsxs("div",{className:c,children:[j,k]}),t[64]=c,t[65]=j,t[66]=k,t[67]=E):E=t[67];let P;t[68]!==E||t[69]!==S||t[70]!==w?(P=e.jsxs("div",{className:S,children:[w,E]}),t[68]=E,t[69]=S,t[70]=w,t[71]=P):P=t[71];let L;t[72]!==u||t[73]!==P||t[74]!==z?(L=e.jsx(u,{className:z,children:P}),t[72]=u,t[73]=P,t[74]=z,t[75]=L):L=t[75];let M;t[76]!==L||t[77]!==T?(M=e.jsx("div",{className:T,children:L}),t[76]=L,t[77]=T,t[78]=M):M=t[78];let q;return t[79]!==x||t[80]!==a||t[81]!==M?(q=e.jsxs("div",{className:x,children:[a,M]}),t[79]=x,t[80]=a,t[81]=M,t[82]=q):q=t[82],q}function Lt(h){return dt(h,1)}function Mt(h){return dt(h,-1)}function Ht(){return ct(new Date)}function mt(h){const t=it.c(7),{className:b,label:d}=h;let o;t[0]!==b?(o=et("size-3 rounded-sm border",b),t[0]=b,t[1]=o):o=t[1];let m;t[2]!==o?(m=e.jsx("span",{className:o}),t[2]=o,t[3]=m):m=t[3];let i;return t[4]!==d||t[5]!==m?(i=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[m,d]}),t[4]=d,t[5]=m,t[6]=i):i=t[6],i}function nt(h){const t=it.c(23),{entry:b,active:d,draggable:o,onSelect:m,onDragStateChange:i}=h,D=pt(),{post:s,scheduled:r}=b,v=r?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let N;t[0]!==D||t[1]!==v?(N=D(v),t[0]=D,t[1]=v,t[2]=N):N=t[2];const rt=N;let n;t[3]!==i||t[4]!==s.key?(n=j=>{j.dataTransfer.setData("text/plain",s.key),j.dataTransfer.effectAllowed="move",i(s.key)},t[3]=i,t[4]=s.key,t[5]=n):n=t[5];let f;t[6]!==i?(f=()=>i(null),t[6]=i,t[7]=f):f=t[7];let p;t[8]!==m||t[9]!==s.key?(p=()=>m(s.key),t[8]=m,t[9]=s.key,t[10]=p):p=t[10];const C=`${s.title} · ${rt}`,y=r?ft:ut,u=o&&"cursor-grab active:cursor-grabbing",x=d&&"ring-2 ring-primary";let a;t[11]!==y||t[12]!==u||t[13]!==x?(a=et("w-full truncate rounded-lg border px-2 py-1 text-left text-xs font-medium transition-colors",y,u,x),t[11]=y,t[12]=u,t[13]=x,t[14]=a):a=t[14];let c;return t[15]!==o||t[16]!==s.title||t[17]!==a||t[18]!==n||t[19]!==f||t[20]!==p||t[21]!==C?(c=e.jsx("button",{type:"button",draggable:o,onDragStart:n,onDragEnd:f,onClick:p,title:C,className:a,children:s.title}),t[15]=o,t[16]=s.title,t[17]=a,t[18]=n,t[19]=f,t[20]=p,t[21]=C,t[22]=c):c=t[22],c}export{Uo as PostCalendar};
|