decocms 4.532.2 → 4.532.3
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-DenZ78VA.js → ActiveShapeUtils-BqDyGFZ7.js} +1 -1
- package/dist/client/assets/{AlertCircle-BWrNX7mN.js → AlertCircle-Cl7lPwXU.js} +1 -1
- package/dist/client/assets/{AreaChart-DNs2YwPE.js → AreaChart-CgNLciWa.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DHx5ko4s.js → ArrowLeft-DHpl6k89.js} +1 -1
- package/dist/client/assets/{ArrowUp-CyzDPNV4.js → ArrowUp-CCRch_5n.js} +1 -1
- package/dist/client/assets/{BarChart-CXwRHR1B.js → BarChart-CgwMaEcR.js} +1 -1
- package/dist/client/assets/{Building02-DhL5SQYW.js → Building02-CvAuH__b.js} +1 -1
- package/dist/client/assets/{CartesianChart-bUujzX18.js → CartesianChart-jWKNX8JU.js} +1 -1
- package/dist/client/assets/{CategoricalChart-hUgIZ_pD.js → CategoricalChart-llxjaCK5.js} +1 -1
- package/dist/client/assets/{CheckCircle-BJwUqTIe.js → CheckCircle-hp3ioCW_.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BsFKOzFl.js → ChevronSelectorVertical-DTyNJuny.js} +1 -1
- package/dist/client/assets/{ChevronUp-BsFnjeNK.js → ChevronUp-CCD43oX-.js} +1 -1
- package/dist/client/assets/{Copy01-BMtss9AJ.js → Copy01-BMaHAxTm.js} +1 -1
- package/dist/client/assets/{CreditCard01-DpJ5HaJ6.js → CreditCard01-C0q6WjY1.js} +1 -1
- package/dist/client/assets/{DotsVertical-7Rm5ttPh.js → DotsVertical-DJmcbJ4K.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-B8n7TKqU.js → ErrorBarContext-Dy68CBdM.js} +1 -1
- package/dist/client/assets/{Globe04-BJeMTkc9.js → Globe04-BSAiLhce.js} +1 -1
- package/dist/client/assets/{Image01-B1C03E_N.js → Image01-CKWtV0l9.js} +1 -1
- package/dist/client/assets/{Key01-AhMvx8Bf.js → Key01-D2_-kM68.js} +1 -1
- package/dist/client/assets/{Link01-p8humFYG.js → Link01-HbY8A4ox.js} +1 -1
- package/dist/client/assets/{LinkBroken01-C5q0tEvS.js → LinkBroken01-BgMERPB2.js} +1 -1
- package/dist/client/assets/{Minus-BMakGco3.js → Minus-C-AJk_C6.js} +1 -1
- package/dist/client/assets/{Monitor01-CLwaIfNu.js → Monitor01-B100isce.js} +1 -1
- package/dist/client/assets/{Play-BoOYKEkH.js → Play-B-0E4pTK.js} +1 -1
- package/dist/client/assets/{Plus-D7X276kv.js → Plus-imVVIoVd.js} +1 -1
- package/dist/client/assets/{ReferenceLine-UiDLzqoj.js → ReferenceLine-CqdTT5eh.js} +1 -1
- package/dist/client/assets/{SearchMd-BzDAUJSU.js → SearchMd-DyPaHuer.js} +1 -1
- package/dist/client/assets/{Sector-DZu8Iagq.js → Sector-DkakaTuw.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-UnxomIP0.js → ShoppingBag01-C2pyKO9h.js} +1 -1
- package/dist/client/assets/{Sun-B5QvK7X9.js → Sun-sC1lwILE.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Dr_PPdbH.js → SwitchHorizontal01-C7CobzPb.js} +1 -1
- package/dist/client/assets/{Tool01-OTauJJp3.js → Tool01-DSL_ntjS.js} +1 -1
- package/dist/client/assets/{Trash01-DzCXEeuM.js → Trash01-2YmzJ--g.js} +1 -1
- package/dist/client/assets/{Upload01-2E_Vrojt.js → Upload01-DICy44Oo.js} +1 -1
- package/dist/client/assets/{UserSquare-CmbcjiWL.js → UserSquare-i-ypi26L.js} +1 -1
- package/dist/client/assets/{Users01-BFgiCQPh.js → Users01-CzRZKRqu.js} +1 -1
- package/dist/client/assets/{XClose-BF4dTiHJ.js → XClose-DxOoWNFF.js} +1 -1
- package/dist/client/assets/{ZoomOut-BIPVG3Mi.js → ZoomOut-vrNny0H4.js} +1 -1
- package/dist/client/assets/{access-gate-BrHHSKUI.js → access-gate-DVRnUxMX.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-84lGCknH.js → add-connection-dialog-D0tg1TJV.js} +1 -1
- package/dist/client/assets/agent-analytics-0wCceQxB.js +2 -0
- package/dist/client/assets/agent-app-CMMDwOAo.js +1 -0
- package/dist/client/assets/{agent-assets-DkTI28JC.js → agent-assets-Bs4kuiam.js} +1 -1
- package/dist/client/assets/{agent-automation-F0B4MP-_.js → agent-automation-DiigIe1Q.js} +1 -1
- package/dist/client/assets/{agent-automations-cb9A7zzk.js → agent-automations-CxLdxRGT.js} +1 -1
- package/dist/client/assets/{agent-calendar-B3d7D0Bd.js → agent-calendar-DxWQxrPV.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-D2B4_Vnn.js → agent-connect-sources-BAO9oQzK.js} +1 -1
- package/dist/client/assets/agent-deck-BlDseEN7.js +1 -0
- package/dist/client/assets/{agent-e2e-COljZ8mH.js → agent-e2e-DhYxMwgk.js} +1 -1
- package/dist/client/assets/agent-experiments-D81JgE0g.js +1 -0
- package/dist/client/assets/{agent-file-BWUqgQfU.js → agent-file-DeUOMaWf.js} +1 -1
- package/dist/client/assets/{agent-hosting-DQRni5C3.js → agent-hosting-CDCU8rbd.js} +1 -1
- package/dist/client/assets/{agent-icon-DMLbHyqZ.js → agent-icon-B8D9Gfvd.js} +1 -1
- package/dist/client/assets/agent-library-BB6GSi0n.js +1 -0
- package/dist/client/assets/agent-library-file-BfQc6Xv5.js +1 -0
- package/dist/client/assets/agent-monitor-IXQDM2HW.js +1 -0
- package/dist/client/assets/{agent-overview-DQfGfiWL.js → agent-overview-DSg0Kd7z.js} +1 -1
- package/dist/client/assets/{agent-releases-DmNYUENl.js → agent-releases-CVk6STnu.js} +1 -1
- package/dist/client/assets/agent-settings-Bp7tIKg6.js +1 -0
- package/dist/client/assets/agent-site-editor-code-qC85DoYU.js +2 -0
- package/dist/client/assets/agent-site-editor-content-DR_mJ3c0.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-ByuhwZMp.js +1 -0
- package/dist/client/assets/{agent-site-editor-LiXNvVzd.js → agent-site-editor-yQYOFQWa.js} +1 -1
- package/dist/client/assets/agent-view-BOMKiSl6.js +1 -0
- package/dist/client/assets/{agent-view-guard-CIzLYG9Z.js → agent-view-guard-_cEjlf1v.js} +1 -1
- package/dist/client/assets/{agents-list-JqKBXhBb.js → agents-list-BLSC1Di9.js} +1 -1
- package/dist/client/assets/{ai-providers-BMdVqDyj.js → ai-providers-BGW2DNP-.js} +1 -1
- package/dist/client/assets/{alert-BAjsKun9.js → alert-BnCVVuNl.js} +1 -1
- package/dist/client/assets/{analytics-sections-2r9JgnkF.js → analytics-sections-wyJg4kpg.js} +1 -1
- package/dist/client/assets/api-keys-D-xxl29k.js +1 -0
- package/dist/client/assets/{api-keys-D_a2AabQ.js → api-keys-U9RNdUek.js} +1 -1
- package/dist/client/assets/{app-editor-hGtjMe2U.js → app-editor-Cx6h5tGz.js} +1 -1
- package/dist/client/assets/{asset-utils-BljmC-O4.js → asset-utils-CowFLRlk.js} +1 -1
- package/dist/client/assets/{auth-BawzvLgB.js → auth-C31upNbt.js} +1 -1
- package/dist/client/assets/{auth-catchall-L4otHxQ4.js → auth-catchall-Czzs7hqL.js} +1 -1
- package/dist/client/assets/{auth-entry-DHl3Qa2p.js → auth-entry-wLbrz5aE.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Bpnft0WY.js → auth-split-layout-D-PBFcAB.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CL5vwYY0.js → authenticate-and-persist-oauth-crIDWJ6N.js} +1 -1
- package/dist/client/assets/{automation-list-row-B1qIGbz-.js → automation-list-row-DM_birCq.js} +1 -1
- package/dist/client/assets/{automation-runs-Dgzto0gK.js → automation-runs-BcgaNiX0.js} +1 -1
- package/dist/client/assets/{automations-C5lyWSek.js → automations-CT3Dvct6.js} +1 -1
- package/dist/client/assets/{autosend-BSe8DnJN.js → autosend-Dt99VIFN.js} +1 -1
- package/dist/client/assets/{badge-Dk9QaMHv.js → badge-DNaCaxWj.js} +1 -1
- package/dist/client/assets/{block-document-DlaqZi3o.js → block-document-ZSs8a5bY.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BzMwrhCE.js → blocks-preview-workspace-context-Bd8C8dyy.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-B7iQVWp6.js → blocks-tab-states-DGoshb0H.js} +1 -1
- package/dist/client/assets/{blog-schema-BHmzvrMx.js → blog-schema-CH04Llum.js} +1 -1
- package/dist/client/assets/{buckets-CVEqMqkM.js → buckets-DSxOf2AY.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-B6DMhmUe.js → build-improve-prompt-doc-B_bSopgf.js} +1 -1
- package/dist/client/assets/{calendar-nGMQX5H2.js → calendar-BO9Nr1M_.js} +1 -1
- package/dist/client/assets/{capability-load-error-BX1SCP0_.js → capability-load-error-vQljenRs.js} +1 -1
- package/dist/client/assets/{category-editor-B4n2VHEp.js → category-editor-nUerpPfd.js} +1 -1
- package/dist/client/assets/{cdn-tab-BPWLqXqs.js → cdn-tab-DT_Z_ffb.js} +1 -1
- package/dist/client/assets/{chart-BOjeMD0e.js → chart-ByN0MGja.js} +1 -1
- package/dist/client/assets/{chat-context-D2EaExW5.js → chat-context-8d724Biw.js} +1 -1
- package/dist/client/assets/{chat-draft-C-EHUjTp.js → chat-draft-C5BwFiIm.js} +1 -1
- package/dist/client/assets/{checkbox--Oh7M1o0.js → checkbox-B6B4GfAg.js} +1 -1
- package/dist/client/assets/{choose-editor-CHcjiEH4.js → choose-editor-cwBA4AN0.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BfeyrT2F.js → cli-auth-success-C8pJ2BT2.js} +1 -1
- package/dist/client/assets/{client-icons-DQkGfKDh.js → client-icons-wsm5E6op.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-DwJYbiAD.js → cms-settings-editor-DMrPsNZl.js} +1 -1
- package/dist/client/assets/{collapsible-DTK_WJix.js → collapsible-3SKHGphM.js} +1 -1
- package/dist/client/assets/{collection-detail-C0KsWIh2.js → collection-detail-BWnA80Zh.js} +1 -1
- package/dist/client/assets/{collection-display-button-K6Znqj-g.js → collection-display-button-DfdF6cOY.js} +1 -1
- package/dist/client/assets/{collection-search-Qr0hkbHz.js → collection-search-C4cRWusY.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D6zxNCnG.js → collection-table-wrapper-CNOtj_SI.js} +1 -1
- package/dist/client/assets/{collection-tabs-Ma8F53u0.js → collection-tabs-a38TB_62.js} +1 -1
- package/dist/client/assets/{column-rules-IVYKsmdv.js → column-rules-DXrawuAz.js} +1 -1
- package/dist/client/assets/{combobox-BDOw2yEp.js → combobox-GlEL6Xnn.js} +1 -1
- package/dist/client/assets/{command-MDi6OAC1.js → command-CE1yLWfJ.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CVi8OvfW.js → companion-mcps-section-DH2KAGSr.js} +1 -1
- package/dist/client/assets/{config-Dym8HnZx.js → config-BaIfGsO-.js} +1 -1
- package/dist/client/assets/{connect-fTG8J5lb.js → connect-TrA7xY0i.js} +1 -1
- package/dist/client/assets/{connect-layout-CZZqsNI2.js → connect-layout-YDmvQh5t.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-CncrwAT8.js → connect-source-dialog-CJFwb-Pv.js} +1 -1
- package/dist/client/assets/{connection-O8PnXJZi.js → connection-1AeUs-hI.js} +1 -1
- package/dist/client/assets/{connection-card-RdKzW886.js → connection-card-C6tJSG9A.js} +1 -1
- package/dist/client/assets/{connection-detail-DnfNkGSf.js → connection-detail-BAdrWZOi.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DVNTeSdC.js → connection-form-helpers-BH-331g7.js} +1 -1
- package/dist/client/assets/{connections-ByI0uD_U.js → connections-C8tDel1L.js} +1 -1
- package/dist/client/assets/{content-tab-2K6f0sFB.js → content-tab-DatSho4V.js} +3 -3
- package/dist/client/assets/{context-Dgv8u1kZ.js → context-DC17p4VB.js} +1 -1
- package/dist/client/assets/{context-menu-_6aSLrNv.js → context-menu-CM8EuOIb.js} +1 -1
- package/dist/client/assets/{context-shell-Dkh3MlNJ.js → context-shell-6bG12s6J.js} +3 -3
- package/dist/client/assets/{core.esm-Co0itmj7.js → core.esm-BS-fbyHU.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-QEydhapH.js → create-organization-dialog-CHqaag5i.js} +1 -1
- package/dist/client/assets/{daily-pulse-D_SGGhIw.js → daily-pulse-DVMn88HS.js} +1 -1
- package/dist/client/assets/{discover-DmiBR0qW.js → discover-DwwIyML5.js} +1 -1
- package/dist/client/assets/{domain-settings-Cf2W5c-a.js → domain-settings-DX175kFz.js} +1 -1
- package/dist/client/assets/{drawer-DgxlyKrC.js → drawer-GqwKUn7Z.js} +1 -1
- package/dist/client/assets/{editor-BlDtkpHT.js → editor-66i9SBVx.js} +1 -1
- package/dist/client/assets/{editor-classes-DHW6XsZP.js → editor-classes-3Rme3mQZ.js} +1 -1
- package/dist/client/assets/{empty-state-DQH-DiCp.js → empty-state-BOEouiZH.js} +1 -1
- package/dist/client/assets/{empty-state-CnCcC-8N.js → empty-state-Dk7OA6FI.js} +1 -1
- package/dist/client/assets/{experiments-tab-DN2DbmCx.js → experiments-tab-D6juVLvh.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-B2cKHyhG.js → experiments-tab-choice-CPEmnQsJ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BRZSg9CO.js → extract-connection-data-CeTNnU_i.js} +1 -1
- package/dist/client/assets/{feature-gate-x6qhrhaG.js → feature-gate-CvRJmjvu.js} +1 -1
- package/dist/client/assets/{feature-paywall-CypZbR93.js → feature-paywall-DCw_cj-g.js} +1 -1
- package/dist/client/assets/{file-explorer-DG9-Rlc5.js → file-explorer-BvmclAYx.js} +1 -1
- package/dist/client/assets/{file-preview-C4Z-YwH_.js → file-preview-C07bLEQA.js} +1 -1
- package/dist/client/assets/{file-share-button-DKZ7oEEn.js → file-share-button-B8TNwLwz.js} +1 -1
- package/dist/client/assets/{file-type-icon-BrZE8mnq.js → file-type-icon-D7rbXSkW.js} +1 -1
- package/dist/client/assets/{folder-icon-C8Dw6D6B.js → folder-icon-DxXjwnjy.js} +1 -1
- package/dist/client/assets/{form-DAT0TK1w.js → form-Bymz6d0n.js} +1 -1
- package/dist/client/assets/{general-PUVNuDbw.js → general-g7tJdqdD.js} +1 -1
- package/dist/client/assets/{held-block-view-rTOQRrzA.js → held-block-view-DEPvO0cs.js} +3 -3
- package/dist/client/assets/{home-B7Ic73m_.js → home-BnTwEiNz.js} +1 -1
- package/dist/client/assets/{hosted-publish-feedback-BYd2t20V.js → hosted-publish-feedback-CHh3DpeQ.js} +1 -1
- package/dist/client/assets/{icon-button-DIxoXQKV.js → icon-button-DNB1B8hy.js} +1 -1
- package/dist/client/assets/{index-Cuqx2rXt.js → index-6EA_iA9h.js} +1 -1
- package/dist/client/assets/{index-DbfDgKss.js → index-BA4mOY4Z.js} +1 -1
- package/dist/client/assets/{index-BZRrEhsu.js → index-BWCxl69P.js} +1 -1
- package/dist/client/assets/{index-qt5sLImf.js → index-BdUExej6.js} +1 -1
- package/dist/client/assets/{index-TAei2O9I.js → index-BeHjP7VX.js} +1 -1
- package/dist/client/assets/{index-CquZHSaS.js → index-BjA5bh1K.js} +1 -1
- package/dist/client/assets/{index-7SN0ucfq.js → index-BsHW3BGu.js} +1 -1
- package/dist/client/assets/{index-BYpbKN34.js → index-CKRg2y80.js} +1 -1
- package/dist/client/assets/{index-DZn-HYwc.js → index-D1ugmRMj.js} +1 -1
- package/dist/client/assets/{index-Ca4Q75r_.js → index-D3ScAucs.js} +1 -1
- package/dist/client/assets/{index-BIIhX81I.js → index-D5Vi_4vo.js} +1 -1
- package/dist/client/assets/{index-z9eosAhj.js → index-DPRssy9N.js} +1 -1
- package/dist/client/assets/{index-CQj5kSP7.js → index-DWtN3gop.js} +1 -1
- package/dist/client/assets/{index-Cxx5SZO5.js → index-Df31jXxo.js} +5 -5
- package/dist/client/assets/{index-CjPh5dsm.js → index-IfhHuBaK.js} +1 -1
- package/dist/client/assets/{index-redirect-C2mEcSuz.js → index-redirect-D2WCbXzv.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-B9PBW4Q3.js → infiniteQueryObserver-QWUcOo9q.js} +1 -1
- package/dist/client/assets/{infra-billing-Cdw4wy6i.js → infra-billing-DI8WnEsT.js} +1 -1
- package/dist/client/assets/{input-dt9X0pvp.js → input-B9AC97ib.js} +3 -3
- package/dist/client/assets/{input-BFXymFUo.js → input-pZWuEflz.js} +1 -1
- package/dist/client/assets/{integration-icon-DGyeG5wp.js → integration-icon-CX1D_V3Z.js} +1 -1
- package/dist/client/assets/{jira-icon-aE2LRXUv.js → jira-icon-CrJbOaem.js} +1 -1
- package/dist/client/assets/{label-Ctu3ACGH.js → label-C1DxVrJb.js} +1 -1
- package/dist/client/assets/{layout-BBi67rPP.js → layout-Co5PS1zK.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DXm2VUys.js → legacy-agents-deep-DwRBJb4S.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-xLzp4sos.js → legacy-main-redirect-DFKFdz8r.js} +1 -1
- package/dist/client/assets/library-DCyznvHe.js +1 -0
- package/dist/client/assets/{login-C4ik3KAa.js → login-BdZ_2mZB.js} +1 -1
- package/dist/client/assets/{markdown-CWAWXi60.js → markdown-BaA5eol3.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-C2UU8TPW.js → mcp-app-renderer-DkXlKGsA.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BgczWCl7.js → mcp-oauth-DMxGzETt.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DPnnrdpS.js → mcp-oauth-DVXIbfq7.js} +1 -1
- package/dist/client/assets/{members-DYgO8xeR.js → members-f3hqsDJ0.js} +1 -1
- package/dist/client/assets/{memory-8RSHKutI.js → memory-BC5tlA-x.js} +1 -1
- package/dist/client/assets/{mini-report-page-Cok-AWQD.js → mini-report-page-ThLgGtsw.js} +1 -1
- package/dist/client/assets/{mock-board-Nc8P3HCB.js → mock-board-oVS8k8JY.js} +3 -3
- package/dist/client/assets/{monaco-editor-D4Zh5ulV.js → monaco-editor-BMj9ndKI.js} +1 -1
- package/dist/client/assets/{monitoring-00U9_JaZ.js → monitoring-BBn_6bn2.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Bo4buMTd.js → monitoring-stats-row-Us3D_pYk.js} +1 -1
- package/dist/client/assets/{multi-select-Dgh7zCRl.js → multi-select-YCf5rhfR.js} +1 -1
- package/dist/client/assets/{mustache-BUKtJZnS.js → mustache-d_OV0Sqo.js} +1 -1
- package/dist/client/assets/{named-rule-uses-CILvps79.js → named-rule-uses-D9geTw6w.js} +1 -1
- package/dist/client/assets/{new-project-dialog-C8Z9rxsK.js → new-project-dialog-C3TUUDBv.js} +1 -1
- package/dist/client/assets/{oauth-callback-CE7Uxghr.js → oauth-callback-Dv9r9wZ_.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CFmbF-CP.js → oauth-callback-ai-provider-CjWL1XO5.js} +1 -1
- package/dist/client/assets/{onboarding-mOv2Iyev.js → onboarding-BejB9V13.js} +1 -1
- package/dist/client/assets/{openai-conversation-DziaKIXJ.js → openai-conversation-GecH_2pX.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-BA4lpO5g.js → optimistic-project-sidebar-views-CAA-EMWH.js} +1 -1
- package/dist/client/assets/{order-monitor-day-BBlstwBq.js → order-monitor-day-CAFy7-L0.js} +1 -1
- package/dist/client/assets/{organization-choice--RODmYz9.js → organization-choice-LduKCDrf.js} +1 -1
- package/dist/client/assets/{orgs-cjaXJmLi.js → orgs-BCUVSU3w.js} +1 -1
- package/dist/client/assets/{page-seo-form-EchOknJY.js → page-seo-form-DUU1C-6q.js} +1 -1
- package/dist/client/assets/{pair-D81VUoh8.js → pair-B-_qdC4y.js} +1 -1
- package/dist/client/assets/{parse-sections-DqiKgsi7.js → parse-sections-B6OFIoIV.js} +1 -1
- package/dist/client/assets/{plan-D1zAf_A4.js → plan-CjldBZPb.js} +1 -1
- package/dist/client/assets/{plan-ladder-BM0vfuMg.js → plan-ladder-DrHQyVHN.js} +1 -1
- package/dist/client/assets/{popover-Cf5bE8mq.js → popover-B_I8LDF7.js} +1 -1
- package/dist/client/assets/{post-calendar-YSAaYkEq.js → post-calendar-BXSPdtSv.js} +1 -1
- package/dist/client/assets/{post-editor-BhE1Cpdl.js → post-editor-5M5eW2rD.js} +1 -1
- package/dist/client/assets/{preview-content-CD6AbYC3.js → preview-content-BSEpMJ_f.js} +1 -1
- package/dist/client/assets/{preview-dialog-CDAUzIIz.js → preview-dialog-CyuTO-Nj.js} +1 -1
- package/dist/client/assets/{preview-panel-CSWXyf1I.js → preview-panel-zBGzI7ac.js} +1 -1
- package/dist/client/assets/{preview-tab-C8fq_RoO.js → preview-tab-CBpLR0vZ.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-CxqpXPuE.js → product-picker-dialog-C1HdN3HS.js} +1 -1
- package/dist/client/assets/{profile-CqAQF01N.js → profile-Bn1uXmaj.js} +1 -1
- package/dist/client/assets/{project-app-view-D3SaQmET.js → project-app-view-BkE8gxNZ.js} +1 -1
- package/dist/client/assets/{project-apps-CcjoYUnG.js → project-apps-6jAsRK71.js} +1 -1
- package/dist/client/assets/{project-feed-BwJVQ7vC.js → project-feed-DU7KOynB.js} +1 -1
- package/dist/client/assets/{project-icon-iIrZc685.js → project-icon-D9wVAFzd.js} +1 -1
- package/dist/client/assets/project-reports-CoToFlrf.js +1 -0
- package/dist/client/assets/project-tasks-DoZw7fPU.js +1 -0
- package/dist/client/assets/{projects-B1CcZpiT.js → projects-C-Yb71Zw.js} +1 -1
- package/dist/client/assets/{projects-empty-state-Bv5rWYhh.js → projects-empty-state-7CRc8HoV.js} +1 -1
- package/dist/client/assets/{prompts-Cf1xjNSu.js → prompts-CWNnIGH8.js} +1 -1
- package/dist/client/assets/record-editor-L60U2ftu.js +1 -0
- package/dist/client/assets/{redirect-editor-DIiWED7H.js → redirect-editor-j7oyCbUQ.js} +1 -1
- package/dist/client/assets/{releases-api-DGvWHx7z.js → releases-api-BPQ4-CE2.js} +1 -1
- package/dist/client/assets/reports-C3nCqIRq.js +1 -0
- package/dist/client/assets/{reports-DzSrMl4z.js → reports-D1bLhy55.js} +1 -1
- package/dist/client/assets/{reports-onboarding-BME_pd6z.js → reports-onboarding-Br02-2BX.js} +1 -1
- package/dist/client/assets/{reports-tab-BXCeTXce.js → reports-tab-NXH4YBX6.js} +2 -2
- package/dist/client/assets/repositories-CMQDzY2K.js +1 -0
- package/dist/client/assets/{repositories-Cfi5wijd.js → repositories-CbppdbMb.js} +1 -1
- package/dist/client/assets/{repository-binding-CkScpIsb.js → repository-binding-ChFtIyYh.js} +1 -1
- package/dist/client/assets/{repository-import-picker-BS8H9PxV.js → repository-import-picker-Dqcyo_Vj.js} +1 -1
- package/dist/client/assets/{repository-picker-l4M27wFx.js → repository-picker-DWYzqSxW.js} +1 -1
- package/dist/client/assets/{require-capability-DLhsbUyc.js → require-capability-BeSsgEhw.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CulRsSVA.js → required-auth-layout-KHMRM84i.js} +1 -1
- package/dist/client/assets/{reset-password-CfDFawIV.js → reset-password-r8BWIBki.js} +1 -1
- package/dist/client/assets/{resizable-BFC1GeuR.js → resizable-C_RuwlQZ.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-BsW126zu.js → resolve-tab-icon-L08uJp19.js} +1 -1
- package/dist/client/assets/{review-settings-BayMZpjl.js → review-settings-DojAE0jY.js} +1 -1
- package/dist/client/assets/{roles-DjGn6KVP.js → roles-D6_fwqh1.js} +1 -1
- package/dist/client/assets/{route-iXyqQPnW.js → route-C4tVpiaX.js} +1 -1
- package/dist/client/assets/route-DgmGSsat.js +1 -0
- package/dist/client/assets/{route-EfequOdl.js → route-Lxa6t3DR.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-Dz_wNlv5.js → sandbox-lifecycle-context-DVjTP20B.js} +1 -1
- package/dist/client/assets/{schema-B6wL-gff.js → schema-CBMv4uZ-.js} +1 -1
- package/dist/client/assets/{schema-WheR11j2.js → schema-Dc9nPV4z.js} +1 -1
- package/dist/client/assets/{scroll-area-rwjRqyfO.js → scroll-area-DaWGdqx1.js} +1 -1
- package/dist/client/assets/{search-input-CzCH_VIY.js → search-input-DvYu4A0A.js} +1 -1
- package/dist/client/assets/{search-toggle-BLa7geCi.js → search-toggle-BUhavGY8.js} +1 -1
- package/dist/client/assets/{secret-picker-3QlkMO3w.js → secret-picker-B2imvRnF.js} +1 -1
- package/dist/client/assets/{secrets-BhKAJ53J.js → secrets-CpSoee_i.js} +1 -1
- package/dist/client/assets/{section-array-field-D9y7NMQM.js → section-array-field-BJZ1wiNE.js} +1 -1
- package/dist/client/assets/{sections-DvRVP9Dz.js → sections-O1s6Ya_g.js} +1 -1
- package/dist/client/assets/{sections-editor-Cy509EcE.js → sections-editor-Bi9TOkvW.js} +1 -1
- package/dist/client/assets/{select-UpCSfNOV.js → select-BfhHhadQ.js} +1 -1
- package/dist/client/assets/{select-model-xVaNPfcs.js → select-model-CQqkBPt_.js} +1 -1
- package/dist/client/assets/{seo-editor-BO3Jt0hb.js → seo-editor-BM7MOIs2.js} +1 -1
- package/dist/client/assets/{separator-BPjv6lnz.js → separator-BL9f54K4.js} +1 -1
- package/dist/client/assets/settings-tab-DGrxw_Br.js +1 -0
- package/dist/client/assets/{sheet-COugYrjn.js → sheet-CGAbOd40.js} +1 -1
- package/dist/client/assets/{shell-layout-e38uIahb.js → shell-layout-x8Rpz59I.js} +1 -1
- package/dist/client/assets/{site-draft-actions-BXCMIWnV.js → site-draft-actions-BxVMQk52.js} +1 -1
- package/dist/client/assets/{site-draft-view-BfiVi6ch.js → site-draft-view-eAeyHemD.js} +2 -2
- package/dist/client/assets/site-editor-Y3f6GiRg.js +1 -0
- package/dist/client/assets/{site-editor-toast-BafJU0kP.js → site-editor-toast-CNioLEYY.js} +1 -1
- package/dist/client/assets/{skills-Dw8G18Wk.js → skills-ADJZIWwa.js} +1 -1
- package/dist/client/assets/{slider-CW5CKPMF.js → slider-BGAbx3P6.js} +1 -1
- package/dist/client/assets/{sortable.esm-BfvWiQ7R.js → sortable.esm-D2v1hurq.js} +1 -1
- package/dist/client/assets/{sso-C-6FjTmB.js → sso-DiSbySZe.js} +1 -1
- package/dist/client/assets/{suggestion-DmUPHSiw.js → suggestion-Dv6GPkzt.js} +1 -1
- package/dist/client/assets/{switch-C5GqEaZ9.js → switch-BrgZ4lcs.js} +1 -1
- package/dist/client/assets/{symbol-B_TAz0Ej.js → symbol-B0k2Fmal.js} +1 -1
- package/dist/client/assets/{synced-repos-BvOzTrqp.js → synced-repos-iwxe29k_.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-CjnfHMM2.js → tab-icon-glyph-7Mf2iIYQ.js} +1 -1
- package/dist/client/assets/{table-B203jObX.js → table-CWpkoJyg.js} +1 -1
- package/dist/client/assets/{tabs-DFO0cUd4.js → tabs-_e3w7wMl.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-Dcgi6zr9.js → task-assignee-avatar-DWd0heQ0.js} +1 -1
- package/dist/client/assets/{task-board-D0I9TrF7.js → task-board-Bwc-6POa.js} +1 -1
- package/dist/client/assets/{task-route-F6hd-KVw.js → task-route-DeETVOfh.js} +1 -1
- package/dist/client/assets/{task-status-OQPi7i4V.js → task-status-BmXUld3j.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-eo8rY3BR.js → taskboard-analytics-DvtLAbX2.js} +1 -1
- package/dist/client/assets/{tasks-Bkp6Ztlp.js → tasks-B0mbYQ9j.js} +1 -1
- package/dist/client/assets/tasks-DA_sNmDG.js +1 -0
- package/dist/client/assets/{textarea-xiPVXzgn.js → textarea-6PmeS9wv.js} +1 -1
- package/dist/client/assets/{thread-analytics-D1pWKSrS.js → thread-analytics-Bw5C_zB1.js} +1 -1
- package/dist/client/assets/{thread-intent-DJ7MUI-X.js → thread-intent-Bdfd2QLx.js} +1 -1
- package/dist/client/assets/{thread-route-DwUdsrkJ.js → thread-route-C2KtVc9o.js} +1 -1
- package/dist/client/assets/{thread-route-p_tHH1KN.js → thread-route-C3dw8Zzp.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-B5yV21k9.js → thread-sheet-body-D_8bAkjs.js} +1 -1
- package/dist/client/assets/{time-range-picker-B9K0oYAh.js → time-range-picker-DvWeQLVi.js} +1 -1
- package/dist/client/assets/{toggle-group-epTzYWN_.js → toggle-group-Dd6F_mst.js} +1 -1
- package/dist/client/assets/{tool-namespace-BnR-5HvH.js → tool-namespace-BRBiFCQ_.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BtdQ071s.js → toolbar-icon-button-DYeJGszf.js} +1 -1
- package/dist/client/assets/{tooltip-BFWyx7Tu.js → tooltip-C_Y_Rf94.js} +1 -1
- package/dist/client/assets/{tooltipContext-HIsDwgpv.js → tooltipContext-Br4BrEeg.js} +1 -1
- package/dist/client/assets/{track-D-nJPAhp.js → track-DbPHq5xf.js} +1 -1
- package/dist/client/assets/{types-Bg6xzMsU.js → types-BhYop-72.js} +1 -1
- package/dist/client/assets/{url-slug-CtldY3Fc.js → url-slug-rdmPuytX.js} +1 -1
- package/dist/client/assets/{usage-stats-BmyhY2hQ.js → usage-stats-Cn2qCRA8.js} +1 -1
- package/dist/client/assets/{use-ai-providers-D9fgOV9l.js → use-ai-providers-Cx5UT-vT.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-IXYmBDIE.js → use-apply-named-rule-COSs23AZ.js} +1 -1
- package/dist/client/assets/{use-automations-C69NPUwP.js → use-automations-CnZ_1JAW.js} +1 -1
- package/dist/client/assets/{use-autosave-CTJSaQ0_.js → use-autosave-C6eNyinK.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-CJZYxlgv.js → use-chat-layout-state-Bj-Wwagx.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DREB10jn.js → use-clock-tick-Coa6KXLi.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-DMKczmsK.js → use-cms-publish-actions-PKBwvQ19.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BjwYn44-.js → use-connect-companion-DkoM-J86.js} +1 -1
- package/dist/client/assets/{use-connection-K2ZmGfOt.js → use-connection-Dc63mME4.js} +1 -1
- package/dist/client/assets/{use-copy-BaUwV4kr.js → use-copy-D4hLaNAN.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BwVPiDjw.js → use-create-virtual-mcp-EGfMshVo.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DENjQBhy.js → use-date-fns-locale-BbAH1_Ri.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-dbZuRAQA.js → use-debounced-autosave-CWkGAvNc.js} +1 -1
- package/dist/client/assets/{use-debounced-value-FWET2Ehv.js → use-debounced-value-C347aQV_.js} +1 -1
- package/dist/client/assets/{use-deco-credits-1VNQ8RMw.js → use-deco-credits-DND4JPOw.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CUD4NK1e.js → use-decopilot-events-BRJljIy6.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CgFangVs.js → use-delete-connection-eplMquo9.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-zH7DDGue.js → use-deployment-admin-DU13nGdE.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-DoiFL4L5.js → use-fast-preview-draft-url-BjJTEZ7g.js} +1 -1
- package/dist/client/assets/{use-file-configs-DUC_lmME.js → use-file-configs-N7Tlds3U.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-CqYC-MvT.js → use-inbox-feed-BIicUPsc.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Ch7Ei01m.js → use-infinite-scroll-Bw1U14jt.js} +1 -1
- package/dist/client/assets/{use-join-requests-DErzm4wT.js → use-join-requests-DPqVtpJ2.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-BSyzNm2k.js → use-main-panel-tabs-Bwt-KKWc.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-k4owDbnR.js → use-mcp-auth-status-D4ClK6a8.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DogzcDtd.js → use-mcp-client-Dfp_zv7i.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BWPx5MeN.js → use-mcp-prompts-B7r5mSAi.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DdYwCCdP.js → use-mcp-tools-C20OcDyu.js} +1 -1
- package/dist/client/assets/{use-mobile-DcPhAAsp.js → use-mobile-jttq61S0.js} +1 -1
- package/dist/client/assets/{use-move-blocks-DWaZEG7l.js → use-move-blocks-Ce6eWoe9.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-IXTtvMGy.js → use-navigate-to-agent-WZ3sN4Lv.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-NkAi-AAT.js → use-open-billing-url-B0KVr1q2.js} +1 -1
- package/dist/client/assets/{use-org-fs-DjqN5PQk.js → use-org-fs-CpxLC6mJ.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-Cb1LW2ou.js → use-org-repo-syncs-CuCpDjP7.js} +1 -1
- package/dist/client/assets/{use-org-sso-C5KRT8Da.js → use-org-sso-Cq36gzuS.js} +1 -1
- package/dist/client/assets/{use-organization-roles-D7Za_lux.js → use-organization-roles-D5xtpVOM.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DR7d93_z.js → use-organization-settings-Dt8SOUZs.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BCKq-TfH.js → use-panel-navigate-BTZCdBFp.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-CJUNczNu.js → use-project-native-view-presence-czhv_owV.js} +1 -1
- package/dist/client/assets/{use-project-scope-B0et_e8n.js → use-project-scope--fGDju-q.js} +1 -1
- package/dist/client/assets/{use-recent-apps-4hKksVnL.js → use-recent-apps-CYfrDyiU.js} +1 -1
- package/dist/client/assets/{use-releases-Brxi4pIf.js → use-releases-BH8e0b1y.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BrQisY2f.js → use-reports-diagnostic-BTPs0_JC.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-BY2iUkYN.js → use-sandbox-events-DBlkaRHT.js} +1 -1
- package/dist/client/assets/{use-secrets-BadtzYAw.js → use-secrets-BWLFd6sE.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-dBughhn0.js → use-section-preview-base-2hoLVPT_.js} +1 -1
- package/dist/client/assets/{use-session-runtime-B4KIbkK7.js → use-session-runtime-BgpZYJe5.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-cT1Flise.js → use-sidebar-collapsed-jUE24mDX.js} +1 -1
- package/dist/client/assets/{use-tags-TSeOGije.js → use-tags-BeBBBS9o.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-DDlJfCk9.js → use-task-board-analytics-B9aU0hXj.js} +1 -1
- package/dist/client/assets/{use-task-board-events-DgTjbss7.js → use-task-board-events-B63hjUIR.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-JnKytEtF.js → use-task-board-item-prs-BEs657vt.js} +1 -1
- package/dist/client/assets/{use-task-metadata-CqY7HgDo.js → use-task-metadata-Dze4qB0D.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-BPVVv0U5.js → use-thread-analytics-BgxNb0K_.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-CjJgHscq.js → use-thread-outputs-9pOmHwSy.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DbCJne-X.js +1 -0
- package/dist/client/assets/{useQueries-BxI-y7oE.js → useQueries-DpzZ9d-4.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D8hE82mX.js +1 -0
- package/dist/client/assets/{users-DgL9fzoZ.js → users-_VPzVwGC.js} +1 -1
- package/dist/client/assets/{utils-CEKLHG87.js → utils-Bv6P_eDj.js} +1 -1
- package/dist/client/assets/{variant-calendar-rECJW6F2.js → variant-calendar-vlVpSUNv.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-B10eyFaR.js → variant-matcher-override-Cyowv-Np.js} +1 -1
- package/dist/client/assets/{view-header-CnoXEZ6r.js → view-header-CpfRppDY.js} +1 -1
- package/dist/client/assets/{virtual-mcp-skvwiaad.js → virtual-mcp-psEuyUkr.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BD6-sAKH.js → watch-sse-pool-BjVibsQB.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-analytics-CaqNBpQA.js +0 -2
- package/dist/client/assets/agent-app-DjBhUw5o.js +0 -1
- package/dist/client/assets/agent-deck-5QYiPo7g.js +0 -1
- package/dist/client/assets/agent-experiments-DbScA798.js +0 -1
- package/dist/client/assets/agent-library-Dn9V9HRF.js +0 -1
- package/dist/client/assets/agent-library-file-DwvWIojZ.js +0 -1
- package/dist/client/assets/agent-monitor-BfOHieYM.js +0 -1
- package/dist/client/assets/agent-settings-BBVQpT76.js +0 -1
- package/dist/client/assets/agent-site-editor-code-DaRLEV5p.js +0 -2
- package/dist/client/assets/agent-site-editor-content--qfnrcml.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-BUTGq7zp.js +0 -1
- package/dist/client/assets/agent-view-CsFo6WNW.js +0 -1
- package/dist/client/assets/api-keys-DOllUAfq.js +0 -1
- package/dist/client/assets/library-DXmyt1Gx.js +0 -1
- package/dist/client/assets/project-reports-BMuAb39w.js +0 -1
- package/dist/client/assets/project-tasks-DoKHGxuy.js +0 -1
- package/dist/client/assets/record-editor-AV1QHLlq.js +0 -1
- package/dist/client/assets/reports-BNzwh8kk.js +0 -1
- package/dist/client/assets/repositories-yB6zWwua.js +0 -1
- package/dist/client/assets/route-BR5FTjOO.js +0 -1
- package/dist/client/assets/settings-tab-BFy7GozF.js +0 -1
- package/dist/client/assets/site-editor-BSPzYjtA.js +0 -1
- package/dist/client/assets/tasks-ofNfVL13.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DocXgAgp.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DfsNYX5W.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as L,a4 as ae,a as pe,aq as Ce,K as fe,m as me,b as V,r as D,l as se,j as n,h as Pe,B as qe,aX as ye,aW as Ie,M as pt,C as he,x as Wt,aY as Yt,w as Zt,v as Xt,D as Jt,ab as Qt,aZ as es,ax as xt,t as ts,ay as ss,d as Me,n as st,a_ as ns,f as je,T as nt,ad as as,k as gt,e as rs,u as Ae,a$ as is,b0 as ls,O as bt,b1 as os,b2 as cs,N as ds,b3 as us,P as De}from"./index-Cxx5SZO5.js";import{i as We}from"./AlertCircle-BWrNX7mN.js";import{G as fs,H as at,A as ve,I as ms,J as hs,j as ps,K as xs,L as gs,M as bs,N as vt,O as vs,n as ys,k as js,m as Ss}from"./agent-icon-DMLbHyqZ.js";import{c as ks}from"./use-sidebar-collapsed-cT1Flise.js";import{T as Ne}from"./toolbar-icon-button-BtdQ071s.js";import{C as q,w as Ts}from"./index-qt5sLImf.js";import{s as yt,C as Ns,u as _s,V as ws,a as Cs}from"./input-dt9X0pvp.js";import{u as Le,b as Ye,c as $e,d as jt,e as Ps,s as Is}from"./chat-context-D2EaExW5.js";import{u as St}from"./use-session-runtime-B4KIbkK7.js";import{u as Ms,s as kt}from"./use-ai-providers-D9fgOV9l.js";import{b as Tt,a as As,u as Ls}from"./use-organization-settings-DR7d93_z.js";import{i as $s}from"./CheckCircle-BJwUqTIe.js";import{s as rt}from"./XClose-BF4dTiHJ.js";import{a as Fe,b as Fs,c as Nt,g as _t}from"./repository-binding-CkScpIsb.js";import{I as wt}from"./integration-icon-DGyeG5wp.js";import{c as Es}from"./use-decopilot-events-CUD4NK1e.js";import{t as Ze}from"./ChevronUp-BsFnjeNK.js";import{O as Rs}from"./pair-D81VUoh8.js";import{u as Os,a as Bs}from"./use-thread-outputs-CjJgHscq.js";import{u as Ds}from"./use-deco-credits-1VNQ8RMw.js";import{a as zs}from"./experiments-tab-choice-B2cKHyhG.js";import{g as Ct,u as Gs,n as Hs,a as Ks}from"./use-releases-Brxi4pIf.js";import{u as Vs,d as Pt,a as Xe,b as Je,c as It,e as Us}from"./thread-intent-DJ7MUI-X.js";import{f as qs,c as Mt,d as Ws}from"./use-navigate-to-agent-IXTtvMGy.js";import{o as Ys,s as Zs,u as Xs,S as Js}from"./sandbox-lifecycle-context-Dz_wNlv5.js";import{E as At}from"./empty-state-CnCcC-8N.js";import{t as Qs,m as en,u as tn}from"./use-chat-layout-state-CJZYxlgv.js";import{C as it}from"./index-BIIhX81I.js";import{a as Lt,b as $t,P as Ft}from"./popover-Cf5bE8mq.js";import{T as Ee,a as Re,c as Oe}from"./tooltip-BFWyx7Tu.js";import{T as sn,a as nn}from"./toggle-group-epTzYWN_.js";import{a as Qe,f as an,L as rn,s as ln}from"./shell-layout-e38uIahb.js";import{u as Et,a as et,r as on,b as Rt,c as cn,d as dn}from"./thread-route-p_tHH1KN.js";import{c as un,C as fn,a as mn,b as hn,e as pn,d as xn}from"./command-MDi6OAC1.js";import{i as Ot}from"./ZoomOut-BIPVG3Mi.js";import{g as gn,S as bn}from"./task-status-OQPi7i4V.js";import{u as vn}from"./use-clock-tick-DREB10jn.js";import{a as Bt,u as yn}from"./use-panel-navigate-BCKq-TfH.js";import{u as Dt}from"./use-main-panel-tabs-BSyzNm2k.js";import{T as _e}from"./tab-icon-glyph-CjnfHMM2.js";import{a as jn}from"./UserSquare-CmbcjiWL.js";import{b as Sn,c as zt,S as kn,d as Tn}from"./select-UpCSfNOV.js";import{S as Nn}from"./use-sandbox-events-BY2iUkYN.js";import{L as _n}from"./project-apps-CcjoYUnG.js";import{L as tt,a as wn}from"./legacy-main-redirect-xLzp4sos.js";import{u as Cn}from"./use-mobile-DcPhAAsp.js";import{L as Pn}from"./preview-dialog-CDAUzIIz.js";import{O as In}from"./markdown-CWAWXi60.js";import{B as lt}from"./blocks-preview-workspace-context-BzMwrhCE.js";import{p as Mn}from"./virtual-mcp-skvwiaad.js";import"./Tool01-OTauJJp3.js";import"./ArrowUp-CyzDPNV4.js";import"./ArrowLeft-DHx5ko4s.js";import"./LinkBroken01-C5q0tEvS.js";import"./ShoppingBag01-UnxomIP0.js";import"./Building02-DhL5SQYW.js";import"./ChevronSelectorVertical-BsFKOzFl.js";import"./Copy01-BMtss9AJ.js";import"./CreditCard01-DpJ5HaJ6.js";import"./DotsVertical-7Rm5ttPh.js";import"./Image01-B1C03E_N.js";import"./Globe04-BJeMTkc9.js";import"./SwitchHorizontal01-Dr_PPdbH.js";import"./Key01-AhMvx8Bf.js";import"./Link01-p8humFYG.js";import"./Minus-BMakGco3.js";import"./Monitor01-CLwaIfNu.js";import"./Sun-B5QvK7X9.js";import"./Play-BoOYKEkH.js";import"./Plus-D7X276kv.js";import"./SearchMd-BzDAUJSU.js";import"./Trash01-DzCXEeuM.js";import"./Upload01-2E_Vrojt.js";import"./Users01-BFgiCQPh.js";import"./sheet-COugYrjn.js";import"./tool-namespace-BnR-5HvH.js";import"./drawer-DgxlyKrC.js";import"./collection-search-Qr0hkbHz.js";import"./use-mcp-client-DogzcDtd.js";import"./auth-BawzvLgB.js";import"./use-mcp-prompts-BWPx5MeN.js";import"./usage-stats-BmyhY2hQ.js";import"./form-DAT0TK1w.js";import"./label-Ctu3ACGH.js";import"./utils-CVEq3hMx.js";import"./use-copy-BaUwV4kr.js";import"./index-Cuqx2rXt.js";import"./checkbox--Oh7M1o0.js";import"./ai-providers-logos-DD3qZ33J.js";import"./feature-paywall-CypZbR93.js";import"./plan-ladder-BM0vfuMg.js";import"./icon-button-DIxoXQKV.js";import"./file-type-icon-BrZE8mnq.js";import"./location-V0VwTJTt.js";import"./autosend-BSe8DnJN.js";import"./chat-draft-C-EHUjTp.js";import"./tabs-DFO0cUd4.js";import"./active-indicator-CCMhAsc_.js";import"./use-open-billing-url-NkAi-AAT.js";import"./input-BFXymFUo.js";import"./suggestion-DmUPHSiw.js";import"./use-org-fs-DjqN5PQk.js";import"./useInfiniteQuery-DocXgAgp.js";import"./infiniteQueryObserver-B9PBW4Q3.js";import"./question-004-sINsf4GQ.js";import"./add-connection-dialog-84lGCknH.js";import"./extract-connection-data-BRZSg9CO.js";import"./metadata-D72DunRR.js";import"./connection-O8PnXJZi.js";import"./url-slug-CtldY3Fc.js";import"./connection-card-RdKzW886.js";import"./connection-slug-CITJ0kGN.js";import"./slugify-CEUa2lfQ.js";import"./textarea-xiPVXzgn.js";import"./use-connection-K2ZmGfOt.js";import"./schema-B6wL-gff.js";import"./connection-form-helpers-DVNTeSdC.js";import"./authenticate-and-persist-oauth-CL5vwYY0.js";import"./mcp-oauth-BgczWCl7.js";import"./mcp-oauth-DPnnrdpS.js";import"./collection-tabs-Ma8F53u0.js";import"./badge-Dk9QaMHv.js";import"./use-infinite-scroll-Ch7Ei01m.js";import"./useSuspenseInfiniteQuery-DfsNYX5W.js";import"./use-task-board-events-DgTjbss7.js";import"./task-board-D0I9TrF7.js";import"./schema-WheR11j2.js";import"./watch-sse-pool-BD6-sAKH.js";import"./backoff-CrEUbyZT.js";import"./collapsible-DTK_WJix.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-C2UU8TPW.js";import"./types-Bg6xzMsU.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./serial-task-queue-CGOeQgpr.js";import"./delay-CnY5UFtP.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resizable-BFC1GeuR.js";import"./use-project-scope-B0et_e8n.js";import"./index-z9eosAhj.js";import"./use-deployment-admin-zH7DDGue.js";import"./admin-fetch-BhTJlAsX.js";import"./project-icon-iIrZc685.js";import"./new-project-dialog-C8Z9rxsK.js";import"./repository-import-picker-BS8H9PxV.js";import"./repository-picker-l4M27wFx.js";import"./use-debounced-value-FWET2Ehv.js";import"./required-auth-layout-CulRsSVA.js";import"./use-org-sso-C5KRT8Da.js";import"./index-7SN0ucfq.js";import"./use-mcp-tools-DdYwCCdP.js";import"./resolve-tab-icon-BsW126zu.js";import"./use-task-metadata-CqY7HgDo.js";import"./preview-source-BsRLGWUP.js";import"./use-project-native-view-presence-CJUNczNu.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-DUC_lmME.js";import"./site-slug-DebpOoQq.js";import"./index-BdQq_4o_.js";import"./sandbox-url-D3mC8qhT.js";import"./preview-content-CD6AbYC3.js";import"./file-share-button-DKZ7oEEn.js";import"./file-preview-C4Z-YwH_.js";import"./utils-CEKLHG87.js";import"./editor-BlDtkpHT.js";function An({isThreadLocked:t,hasCloudProviderKeys:e,sandboxOnlyChats:s,canRunClaudeCode:r}){return t?null:!e&&!(s&&r)?"provider":s&&!r?"claude-code-provider":null}function Ln(){const t=L.c(26),e=Ms(),s=Le(),r=Tt(),i=As("chat_harness_codex"),{org:a}=ae(),{data:o}=pe.useSession(),c=o?.user.id??"",u=Ce(),l=e.some(Fn);let d;t[0]!==a.id||t[1]!==c?(d=fe.claudeSubscription(a.id,c),t[0]=a.id,t[1]=c,t[2]=d):d=t[2];let m;t[3]!==u?(m=()=>u.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=u,t[4]=m):m=t[4];const f=r&&!i&&!l;let h;t[5]!==d||t[6]!==m||t[7]!==f?(h={queryKey:d,queryFn:m,enabled:f},t[5]=d,t[6]=m,t[7]=f,t[8]=h):h=t[8];const j=me(h);let y;t[9]!==a.id?(y=fe.githubCopilot(a.id),t[9]=a.id,t[10]=y):y=t[10];let v;t[11]!==u?(v=()=>u.call("GITHUB_COPILOT_STATUS",{}),t[11]=u,t[12]=v):v=t[12];const x=r&&!i&&!l;let g;t[13]!==y||t[14]!==v||t[15]!==x?(g={queryKey:y,queryFn:v,enabled:x},t[13]=y,t[14]=v,t[15]=x,t[16]=g):g=t[16];const b=me(g);let S;t[17]!==a.id||t[18]!==c?(S=fe.codexSubscription(a.id,c),t[17]=a.id,t[18]=c,t[19]=S):S=t[19];let p;t[20]!==u?(p=()=>u.call("CODEX_SUBSCRIPTION_STATUS",{}),t[20]=u,t[21]=p):p=t[21];const k=r&&i;let T;t[22]!==k||t[23]!==S||t[24]!==p?(T={queryKey:S,queryFn:p,enabled:k},t[22]=k,t[23]=S,t[24]=p,t[25]=T):T=t[25];const N=me(T);return r&&i&&!s?.isThreadLocked?e.some($n)||N.data?.connected!==!1?null:"codex-provider":An({isThreadLocked:s?.isThreadLocked??!1,hasCloudProviderKeys:e.length>0,sandboxOnlyChats:r,canRunClaudeCode:l||j.data?.connected!==!1||b.data?.connected!==!1||!!b.data?.orgShare})}function $n(t){return yt(t.providerId)}function Fn(t){return kt(t.providerId)}function be(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function ze(t){if(!t)return"—";const e=typeof t=="string"?new Date(t):t;return isNaN(e.getTime())?"—":e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function En(t){return t?t.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function Rn(t){const e=L.c(4),{items:s}=t;let r;e[0]!==s?(r=s.map(On),e[0]=s,e[1]=r):r=e[1];let i;return e[2]!==r?(i=n.jsx("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6",children:r}),e[2]=r,e[3]=i):i=e[3],i}function On(t){return n.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.label}),n.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:t.value})]},t.label)}function Bn(t){const e=L.c(33),{userTokens:s,assistantTokens:r,otherTokens:i}=t,a=V(),o=s+r+i,c=o>0?s/o*100:0,u=o>0?r/o*100:0,l=o>0?i/o*100:0;let d;e[0]!==c?(d=c>0&&n.jsx("div",{className:"h-full bg-chart-1",style:{width:`${c}%`}}),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==u?(m=u>0&&n.jsx("div",{className:"h-full bg-chart-2",style:{width:`${u}%`}}),e[2]=u,e[3]=m):m=e[3];let f;e[4]!==l?(f=l>0&&n.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${l}%`}}),e[4]=l,e[5]=f):f=e[5];let h;e[6]!==d||e[7]!==m||e[8]!==f?(h=n.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[d,m,f]}),e[6]=d,e[7]=m,e[8]=f,e[9]=h):h=e[9];let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=j):j=e[10];let y;e[11]!==a||e[12]!==c?(y=a("chat.contextPanel.userPercent",{pct:c.toFixed(1)}),e[11]=a,e[12]=c,e[13]=y):y=e[13];let v;e[14]!==y?(v=n.jsxs("div",{className:"flex items-center gap-1.5",children:[j,n.jsx("span",{className:"text-xs text-muted-foreground",children:y})]}),e[14]=y,e[15]=v):v=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[16]=x):x=e[16];let g;e[17]!==u||e[18]!==a?(g=a("chat.contextPanel.assistantPercent",{pct:u.toFixed(1)}),e[17]=u,e[18]=a,e[19]=g):g=e[19];let b;e[20]!==g?(b=n.jsxs("div",{className:"flex items-center gap-1.5",children:[x,n.jsx("span",{className:"text-xs text-muted-foreground",children:g})]}),e[20]=g,e[21]=b):b=e[21];let S;e[22]!==l||e[23]!==i||e[24]!==a?(S=i>0&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.otherPercent",{pct:l.toFixed(1)})})]}),e[22]=l,e[23]=i,e[24]=a,e[25]=S):S=e[25];let p;e[26]!==b||e[27]!==S||e[28]!==v?(p=n.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[v,b,S]}),e[26]=b,e[27]=S,e[28]=v,e[29]=p):p=e[29];let k;return e[30]!==p||e[31]!==h?(k=n.jsxs("div",{className:"flex flex-col gap-2",children:[h,p]}),e[30]=p,e[31]=h,e[32]=k):k=e[32],k}function Dn(t){const e=L.c(14),{agentId:s,isError:r}=t,i=Fe(s),a=V();let o;e[0]!==i?.title||e[1]!==a?(o=i?.title??a("chat.subtask.subtaskNoun"),e[0]=i?.title,e[1]=a,e[2]=o):o=e[2];const c=o,u=i?.icon??null;let l;e[3]!==u||e[4]!==c?(l=n.jsx(wt,{icon:u,name:c,size:"xs",className:"size-6 rounded-md shrink-0"}),e[3]=u,e[4]=c,e[5]=l):l=e[5];const d=r?"text-destructive":"text-foreground";let m;e[6]!==d?(m=se("shrink-0 font-medium",d),e[6]=d,e[7]=m):m=e[7];let f;e[8]!==c||e[9]!==m?(f=n.jsx("span",{className:m,children:c}),e[8]=c,e[9]=m,e[10]=f):f=e[10];let h;return e[11]!==l||e[12]!==f?(h=n.jsxs(n.Fragment,{children:[l,f]}),e[11]=l,e[12]=f,e[13]=h):h=e[13],h}function zn(t){const e=L.c(12),{isError:s}=t,r=V();let i;e[0]!==r?(i=r("chat.contextPanel.subtask"),e[0]=r,e[1]=i):i=e[1];const a=i;let o;e[2]!==a?(o=n.jsx(wt,{icon:null,name:a,size:"xs",className:"size-6 rounded-md shrink-0"}),e[2]=a,e[3]=o):o=e[3];const c=s?"text-destructive":"text-foreground";let u;e[4]!==c?(u=se("shrink-0 font-medium",c),e[4]=c,e[5]=u):u=e[5];let l;e[6]!==a||e[7]!==u?(l=n.jsx("span",{className:u,children:a}),e[6]=a,e[7]=u,e[8]=l):l=e[8];let d;return e[9]!==o||e[10]!==l?(d=n.jsxs(n.Fragment,{children:[o,l]}),e[9]=o,e[10]=l,e[11]=d):d=e[11],d}function Gn(t){const e=L.c(18),{part:s}=t,r=s.input?.agent_id,i=s.state==="input-streaming"||s.state==="input-available"||s.state==="output-available"&&s.preliminary===!0,a=s.state==="output-error",o=s.state==="approval-requested";let c;e[0]!==a?(c=n.jsx(zn,{isError:a}),e[0]=a,e[1]=c):c=e[1];let u;e[2]!==r||e[3]!==a?(u=n.jsx(Dn,{agentId:r,isError:a}),e[2]=r,e[3]=a,e[4]=u):u=e[4];let l;e[5]!==c||e[6]!==u?(l=n.jsx(D.Suspense,{fallback:c,children:u}),e[5]=c,e[6]=u,e[7]=l):l=e[7];let d;e[8]!==s.input?(d=s.input?.prompt&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted-foreground/50",children:"·"}),n.jsx("span",{className:"truncate text-muted-foreground",children:s.input.prompt})]}),e[8]=s.input,e[9]=d):d=e[9];let m;e[10]!==o||e[11]!==a||e[12]!==i?(m=n.jsx("span",{className:"ml-auto shrink-0",children:i?n.jsx(Pe,{className:"size-3 text-muted-foreground"}):a?n.jsx(fs,{size:12,className:"text-destructive"}):o?n.jsx(We,{size:12,className:"text-warning"}):n.jsx($s,{size:12,className:"text-success"})}),e[10]=o,e[11]=a,e[12]=i,e[13]=m):m=e[13];let f;return e[14]!==l||e[15]!==d||e[16]!==m?(f=n.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[l,d,m]}),e[14]=l,e[15]=d,e[16]=m,e[17]=f):f=e[17],f}function Hn(t){const e=L.c(51),{onClose:s,back:r,className:i}=t,a=V(),[o,c]=D.useState(null),{messages:u}=Ye(),{activeTask:l}=$e(),{selectedModel:d,selectedVirtualMcp:m}=jt(),f=Ps(u),h=[...u].reverse().find(ta),j=h?.metadata?.usage,y=[...u].reverse().find(ea)?.metadata?.models?.thinking,v=h?.metadata?.modelLimits?.contextWindow??(!y||y.id===d?.modelId?d?.limits?.contextWindow:null)??null,x=j?.contextTokens??0,g=v&&v>0?(x/v*100).toFixed(1):null,b=u;let S;e[0]!==b?(S=b.filter(Qn).reduce(Jn,0),e[0]=b,e[1]=S):S=e[1];const p=S,k=u;let T;e[2]!==k?(T=k.filter(Xn).reduce(Zn,0),e[2]=k,e[3]=T):T=e[3];const N=T,w=Math.max(0,f.totalTokens-p-N),_=u[0],P=u.at(-1),C=_?.metadata?.created_at??l?.created_at,M=P?.metadata?.created_at??l?.updated_at,A=u.filter(Yn),$=u.flatMap(qn),F=En(y?.id??d?.modelId),O=m?.title??"Super Agent",R=Es(),I=[{label:a("chat.contextPanel.sessionLabel"),value:l?.title??a("chat.contextPanel.newChat")},{label:a("chat.contextPanel.messagesLabel"),value:A.length},{label:a("chat.contextPanel.agentLabel"),value:O},...R?[{label:a("chat.contextPanel.modelLabel"),value:F}]:[],{label:a("chat.contextPanel.contextLimitLabel"),value:v?be(v):"—"},{label:a("chat.contextPanel.sessionTokensLabel"),value:f.totalTokens>0?be(f.totalTokens):"0"},{label:a("chat.contextPanel.usageLabel"),value:g!==null?`${g}%`:"—"},{label:a("chat.contextPanel.inputTokensLabel"),value:f.inputTokens>0?be(f.inputTokens):"0"},{label:a("chat.contextPanel.outputTokensLabel"),value:f.outputTokens>0?be(f.outputTokens):"0"},{label:a("chat.contextPanel.reasoningTokensLabel"),value:f.reasoningTokens>0?be(f.reasoningTokens):"0"},...R?[{label:a("chat.contextPanel.costLabel"),value:f.cost>0?`$${f.cost<.001?f.cost.toFixed(6):f.cost.toFixed(4)}`:"$0.00"}]:[],{label:a("chat.contextPanel.sessionCreatedLabel"),value:ze(C)},{label:a("chat.contextPanel.lastActivityLabel"),value:ze(M)}];if(!l&&A.length===0){let G;e[4]!==i?(G=se("flex flex-col h-full w-full border-l border-border bg-background",i),e[4]=i,e[5]=G):G=e[5];let re;e[6]!==a?(re=a("chat.contextPanel.title"),e[6]=a,e[7]=re):re=e[7];let J;e[8]!==re?(J=n.jsx("span",{className:"text-sm font-medium text-foreground",children:re}),e[8]=re,e[9]=J):J=e[9];let Q;e[10]!==r?(Q=r?n.jsx(at,{size:14,className:"text-muted-foreground"}):n.jsx(rt,{size:14,className:"text-muted-foreground"}),e[10]=r,e[11]=Q):Q=e[11];let ee;e[12]!==s||e[13]!==Q?(ee=n.jsx("button",{type:"button",onClick:s,className:"flex size-6 items-center justify-center hover:bg-accent transition-colors rounded-lg",children:Q}),e[12]=s,e[13]=Q,e[14]=ee):ee=e[14];let ne;e[15]!==J||e[16]!==ee?(ne=n.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[J,ee]}),e[15]=J,e[16]=ee,e[17]=ne):ne=e[17];let ie;e[18]!==a?(ie=a("chat.contextPanel.emptyState"),e[18]=a,e[19]=ie):ie=e[19];let te;e[20]!==ie?(te=n.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:n.jsx("p",{className:"text-xs text-muted-foreground",children:ie})}),e[20]=ie,e[21]=te):te=e[21];let oe;return e[22]!==ne||e[23]!==te||e[24]!==G?(oe=n.jsxs("div",{className:G,children:[ne,te]}),e[22]=ne,e[23]=te,e[24]=G,e[25]=oe):oe=e[25],oe}let z;e[26]!==i?(z=se("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",i),e[26]=i,e[27]=z):z=e[27];let E;e[28]!==a?(E=a("chat.contextPanel.title"),e[28]=a,e[29]=E):E=e[29];let H;e[30]!==E?(H=n.jsx("span",{className:"text-sm font-medium text-foreground",children:E}),e[30]=E,e[31]=H):H=e[31];let B;e[32]!==r?(B=r?n.jsx(at,{className:"size-3.5"}):n.jsx(rt,{className:"size-3.5"}),e[32]=r,e[33]=B):B=e[33];let U;e[34]!==s||e[35]!==B?(U=n.jsx(qe,{type:"button",variant:"ghost",size:"icon-sm",onClick:s,className:"text-muted-foreground",children:B}),e[34]=s,e[35]=B,e[36]=U):U=e[36];let Z;e[37]!==H||e[38]!==U?(Z=n.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[H,U]}),e[37]=H,e[38]=U,e[39]=Z):Z=e[39];let Y;e[40]!==a?(Y=a("chat.contextPanel.contextBreakdownSection"),e[40]=a,e[41]=Y):Y=e[41];let X;e[42]!==Y?(X=n.jsx("span",{className:"text-xs text-muted-foreground",children:Y}),e[42]=Y,e[43]=X):X=e[43];let W;e[44]!==N||e[45]!==w||e[46]!==p?(W=n.jsx(Bn,{userTokens:p,assistantTokens:N,otherTokens:w}),e[44]=N,e[45]=w,e[46]=p,e[47]=W):W=e[47];let le;return e[48]!==X||e[49]!==W?(le=n.jsxs("div",{className:"flex flex-col gap-3",children:[X,W]}),e[48]=X,e[49]=W,e[50]=le):le=e[50],n.jsxs("div",{className:z,children:[Z,n.jsxs("div",{className:"flex flex-col gap-8 p-6",children:[$.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.subtasksSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:$.map(Un)})]}),n.jsx(Rn,{items:I}),le,A.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.rawMessagesSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:A.map(G=>{const re=G.metadata?.created_at,J=o?.id===G.id;return n.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[n.jsxs("button",{type:"button",onClick:()=>c(J?null:G),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent w-full text-left cursor-pointer",children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[n.jsx("span",{className:se("shrink-0 font-medium",G.role==="user"?"text-chart-1":"text-chart-2"),children:G.role}),n.jsx("span",{className:"text-muted-foreground",children:"•"}),n.jsx("span",{className:"truncate text-muted-foreground font-mono",children:G.id})]}),re&&n.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:ze(re)})]}),J&&n.jsxs(n.Fragment,{children:[G.role==="assistant"&&(()=>{const Q=G.metadata?._request;if(!Q)return null;const ee=Q.systemSections??[],ne=Math.max(1,...ee.map(Vn)),ie=ee.reduce(Kn,0);return n.jsxs("div",{className:"border-t border-border/50 px-3 py-2.5 text-xs space-y-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"font-medium text-foreground",children:a("chat.contextPanel.requestLabel")}),n.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[Q.activeTools??0," / ",Q.tools??0," ",a("chat.contextPanel.toolsActive")]})]}),ee.length>0&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("div",{className:"text-muted-foreground",children:[a("chat.contextPanel.systemPromptLabel")," ",n.jsxs("span",{className:"tabular-nums",children:["~",Math.round(ie/4).toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),ee.map((te,oe)=>{const ce=te.preview.match(/^<([a-z-]+)/i)?.[1]??`section ${oe}`,xe=te.chars/ne*100,de=Math.round(te.chars/4);return n.jsxs("div",{className:"space-y-0.5",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("span",{className:"font-mono text-foreground truncate",children:ce}),n.jsxs("span",{className:"text-muted-foreground tabular-nums shrink-0",children:["~",de.toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),n.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-chart-3",style:{width:`${xe}%`}})})]},oe)})]})]})})(),n.jsx("pre",{className:"text-xs font-mono bg-muted px-3 py-2 overflow-auto whitespace-pre-wrap break-all border-t border-border/50 max-h-64",children:JSON.stringify(G,null,2)})]})]},G.id)})})]})]})]})}function Kn(t,e){return t+e.chars}function Vn(t){return t.chars}function Un(t,e){return n.jsx(Gn,{part:t},e)}function qn(t){return(t.parts??[]).filter(Wn)}function Wn(t){return t.type==="tool-subtask"}function Yn(t){return t.role!=="system"}function Zn(t,e){const s=e.metadata?.usage;return t+(s?.outputTokens??0)}function Xn(t){return t.role==="assistant"}function Jn(t,e){const s=e.metadata?.usage;return t+(s?.inputTokens??0)}function Qn(t){return t.role==="user"}function ea(t){return t.role==="assistant"&&t.metadata?.models}function ta(t){return t.role==="assistant"&&t.metadata?.usage}function sa(t){const e=L.c(21),{onOpenContextPanel:s}=t,{org:r}=ae(),{selectedVirtualMcp:i}=jt();let a;e[0]!==r.id?(a=ye(r.id),e[0]=r.id,e[1]=a):a=e[1];const c=i??a,l=Fe(c.id)??c,d=l.title??"Super Agent",m=l.icon??null,f=l.description??null;let h;e[2]!==m||e[3]!==d?(h=n.jsx(ve,{icon:m,name:d,size:"lg"}),e[2]=m,e[3]=d,e[4]=h):h=e[4];let j;e[5]!==d?(j=n.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-foreground",children:d}),e[5]=d,e[6]=j):j=e[6];let y;e[7]!==f?(y=f?n.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-balance",children:f}):null,e[7]=f,e[8]=y):y=e[8];let v;e[9]!==j||e[10]!==y?(v=n.jsxs("div",{className:"space-y-1.5",children:[j,y]}),e[9]=j,e[10]=y,e[11]=v):v=e[11];let x;e[12]!==h||e[13]!==v?(x=n.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center gap-4 px-6 text-center overflow-hidden",children:[h,v]}),e[12]=h,e[13]=v,e[14]=x):x=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(q.IceBreakers,{className:"pb-3"}),e[15]=g):g=e[15];let b;e[16]!==s?(b=n.jsxs(q.Footer,{children:[g,n.jsx(q.Input,{onOpenContextPanel:s})]}),e[16]=s,e[17]=b):b=e[17];let S;return e[18]!==x||e[19]!==b?(S=n.jsxs(n.Fragment,{children:[x,b]}),e[18]=x,e[19]=b,e[20]=S):S=e[20],S}function ot(t){const e=L.c(17),{outputs:s,collapsed:r,onToggle:i,variant:a}=t,o=a==="card"?"rounded-xl bg-muted/95 shadow-edge backdrop-blur-sm":"border-b border-border bg-background";let c;e[0]!==o?(c=se(o),e[0]=o,e[1]=c):c=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("span",{className:"text-sm font-medium text-foreground",children:"Files in this task"}),e[2]=u):u=e[2];const l=r&&"-rotate-90";let d;e[3]!==l?(d=se("size-4 text-muted-foreground transition-transform",l),e[3]=l,e[4]=d):d=e[4];let m;e[5]!==d?(m=n.jsx(Ze,{className:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==m?(f=n.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between px-3 py-2.5 text-left",children:[u,m]}),e[7]=i,e[8]=m,e[9]=f):f=e[9];let h;e[10]!==r||e[11]!==s?(h=!r&&n.jsx("div",{className:"flex max-h-72 flex-col gap-1.5 overflow-y-auto px-2 pb-2",children:s.map(na)}),e[10]=r,e[11]=s,e[12]=h):h=e[12];let j;return e[13]!==c||e[14]!==f||e[15]!==h?(j=n.jsxs("div",{className:c,children:[f,h]}),e[13]=c,e[14]=f,e[15]=h,e[16]=j):j=e[16],j}function na(t){return n.jsx(Rs,{file:t},t.key)}function aa(){const t=L.c(13),e=Le()?.taskId??null,s=Os();let r;t[0]!==s?(r={enabled:s},t[0]=s,t[1]=r):r=t[1];const{data:i}=Bs(e,r),[a,o]=D.useState(!1),[c,u]=D.useState(!0);if(!e||!i||i.length===0)return null;let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>o(ia),t[2]=l):l=t[2];let d;t[3]!==a||t[4]!==i?(d=n.jsx("div",{className:"absolute top-2 right-2 z-10 hidden w-72 @[1280px]:block",children:n.jsx(ot,{variant:"card",outputs:i,collapsed:a,onToggle:l})}),t[3]=a,t[4]=i,t[5]=d):d=t[5];let m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=()=>u(ra),t[6]=m):m=t[6];let f;t[7]!==c||t[8]!==i?(f=n.jsx("div",{className:"shrink-0 @[1280px]:hidden",children:n.jsx(ot,{variant:"bar",outputs:i,collapsed:c,onToggle:m})}),t[7]=c,t[8]=i,t[9]=f):f=t[9];let h;return t[10]!==d||t[11]!==f?(h=n.jsxs(n.Fragment,{children:[d,f]}),t[10]=d,t[11]=f,t[12]=h):h=t[12],h}function ra(t){return!t}function ia(t){return!t}function la(){const t=L.c(1);D.use(Ye().ready);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Ns,{children:n.jsx(oa,{})}),t[0]=e):e=t[0],e}function oa(){const t=L.c(29),{active:e}=_s(),{org:s}=ae(),r=Le(),{isChatEmpty:i}=Ye(),[a,o]=D.useState("chat"),c=Ds(),u=V(),l=Ln(),{runtime:d}=St(r?.virtualMcpId);if(l!==null&&d!=="cms"){let N;return t[0]!==l||t[1]!==u?(N=n.jsx(q,{className:"animate-in fade-in-0 duration-200",children:n.jsx(q.Main,{className:"flex flex-col items-center",children:n.jsx(q.EmptyState,{children:l==="codex-provider"?n.jsx(q.NoAiProviderEmptyState,{title:u("settings.codexSubscription.setupHeading"),description:u("settings.codexSubscription.setupDescription"),providerFilter:yt}):l==="claude-code-provider"?n.jsx(q.NoAiProviderEmptyState,{title:u("chat.noAiProviderEmptyState.supportedHeading"),description:u("chat.noAiProviderEmptyState.supportedSubtitle"),providerFilter:kt}):n.jsx(q.NoAiProviderEmptyState,{})})})}),t[0]=l,t[1]=u,t[2]=N):N=t[2],N}let f;t[3]!==c.hasDecoKey||t[4]!==c.hasOnlyDecoProvider||t[5]!==c.isLoading||t[6]!==c.isZeroBalance||t[7]!==i||t[8]!==s?(f=c.hasDecoKey&&c.isZeroBalance&&c.hasOnlyDecoProvider&&!c.isLoading&&i&&!Ts(s.id),t[3]=c.hasDecoKey,t[4]=c.hasOnlyDecoProvider,t[5]=c.isLoading,t[6]=c.isZeroBalance,t[7]=i,t[8]=s,t[9]=f):f=t[9];const h=f;let j;t[10]!==h?(j=h&&n.jsx(q.CreditsEmptyState,{}),t[10]=h,t[11]=j):j=t[11];let y;t[12]!==a||t[13]!==i||t[14]!==d||t[15]!==e?(y=!e&&n.jsx("div",{inert:a!=="chat"?!0:void 0,"aria-hidden":a!=="chat",className:se("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",a!=="chat"?"opacity-0 pointer-events-none":"opacity-100"),children:i&&d!=="cms"?n.jsx(sa,{onOpenContextPanel:()=>o("context")}):n.jsxs(n.Fragment,{children:[n.jsxs(q.Main,{className:"relative flex flex-col overflow-hidden @container",children:[n.jsx(aa,{}),n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(q.Messages,{})})]}),n.jsx(q.Footer,{children:n.jsx(q.Input,{onOpenContextPanel:()=>o("context")})})]})}),t[12]=a,t[13]=i,t[14]=d,t[15]=e,t[16]=y):y=t[16];let v;t[17]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(ws,{}),t[17]=v):v=t[17];const x=a!=="context"?!0:void 0,g=a!=="context",b=a==="context"?"opacity-100":"opacity-0 pointer-events-none";let S;t[18]!==b?(S=se("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",b),t[18]=b,t[19]=S):S=t[19];let p;t[20]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(Hn,{back:!0,onClose:()=>o("chat")}),t[20]=p):p=t[20];let k;t[21]!==x||t[22]!==g||t[23]!==S?(k=n.jsx("div",{inert:x,"aria-hidden":g,className:S,children:p}),t[21]=x,t[22]=g,t[23]=S,t[24]=k):k=t[24];let T;return t[25]!==j||t[26]!==y||t[27]!==k?(T=n.jsxs(q,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[j,y,v,k]}),t[25]=j,t[26]=y,t[27]=k,t[28]=T):T=t[28],T}function ca(){const t=L.c(7),e=V();let s;t[0]!==e?(s=e("agentShellLayout.agentShellLayout.chatLoadingError"),t[0]=e,t[1]=s):s=t[1];let r;t[2]!==s?(r=n.jsx("div",{role:"alert",className:"flex h-full flex-1 items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Ie,{children:n.jsx(la,{})}),t[4]=i):i=t[4];let a;return t[5]!==r?(a=n.jsx(pt,{fallback:r,children:i}),t[5]=r,t[6]=a):a=t[6],a}function da(t){const e=L.c(10),{org:s}=ae(),r=Vs(),{data:i}=pe.useSession(),a=i?.user?.id,o=t?.id??null,c=!!t&&!!a&&!!t.created_by&&t.created_by!==a;let u;e[0]!==s.id||e[1]!==o?(u=fe.viewedThreadMetadataRefresh(s.id,o??""),e[0]=s.id,e[1]=o,e[2]=u):u=e[2];const l=!!r&&!!o&&c;let d;e[3]!==r||e[4]!==o?(d=async()=>(await r?.refreshThreadMetadata(o??""),!0),e[3]=r,e[4]=o,e[5]=d):d=e[5];let m;e[6]!==u||e[7]!==l||e[8]!==d?(m={queryKey:u,enabled:l,staleTime:Number.POSITIVE_INFINITY,queryFn:d},e[6]=u,e[7]=l,e[8]=d,e[9]=m):m=e[9],me(m)}function Ge(t){const e=L.c(14),{label:s,value:r,onChange:i,options:a}=t;let o;e[0]!==s?(o=n.jsx("span",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=o):o=e[1];let c;e[2]!==i?(c=m=>m&&i(m),e[2]=i,e[3]=c):c=e[3];let u;e[4]!==a?(u=a.map(ua),e[4]=a,e[5]=u):u=e[5];let l;e[6]!==s||e[7]!==c||e[8]!==u||e[9]!==r?(l=n.jsx(nn,{type:"single",size:"sm",value:r,onValueChange:c,"aria-label":s,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:u}),e[6]=s,e[7]=c,e[8]=u,e[9]=r,e[10]=l):l=e[10];let d;return e[11]!==o||e[12]!==l?(d=n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,l]}),e[11]=o,e[12]=l,e[13]=d):d=e[13],d}function ua(t){return n.jsxs(sn,{value:t.value,className:"h-6 gap-1.5 rounded-lg px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:bg-card data-[state=on]:text-foreground data-[state=on]:shadow-edge",children:[t.icon,t.label]},t.value)}function fa(t){const e=L.c(91),{panel:s,className:r}=t,i=r===void 0?"md:size-[34px]":r,a=V();let o;e[0]!==a?(o=a("sidebar.taskGroupsList.filterChats"),e[0]=a,e[1]=o):o=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(ms,{size:16}),e[2]=c):c=e[2];let u;e[3]!==s.filtersActive?(u=s.filtersActive&&n.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[3]=s.filtersActive,e[4]=u):u=e[4];let l;e[5]!==i||e[6]!==s.filtersActive||e[7]!==o||e[8]!==u?(l=n.jsx(Ee,{asChild:!0,children:n.jsx(Lt,{asChild:!0,children:n.jsxs(Ne,{"aria-label":o,active:s.filtersActive,className:i,children:[c,u]})})}),e[5]=i,e[6]=s.filtersActive,e[7]=o,e[8]=u,e[9]=l):l=e[9];let d;e[10]!==a?(d=a("sidebar.taskGroupsList.filterChats"),e[10]=a,e[11]=d):d=e[11];let m;e[12]!==d?(m=n.jsx(Re,{side:"bottom",children:d}),e[12]=d,e[13]=m):m=e[13];let f;e[14]!==l||e[15]!==m?(f=n.jsxs(Oe,{children:[l,m]}),e[14]=l,e[15]=m,e[16]=f):f=e[16];let h;e[17]!==a?(h=a("sidebar.taskGroupsList.filterView"),e[17]=a,e[18]=h):h=e[18];const j=s.groupBy;let y;e[19]!==s?(y=G=>{he("tasks_panel_group_by_changed",{to_value:G}),s.setGroupBy(G)},e[19]=s,e[20]=y):y=e[20];let v;e[21]!==a?(v=a("sidebar.taskGroupsList.viewList"),e[21]=a,e[22]=v):v=e[22];let x;e[23]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(hs,{size:13}),e[23]=x):x=e[23];let g;e[24]!==v?(g={value:"flat",label:v,icon:x},e[24]=v,e[25]=g):g=e[25];let b;e[26]!==a?(b=a("sidebar.taskGroupsList.viewStatus"),e[26]=a,e[27]=b):b=e[27];let S;e[28]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(ps,{size:13}),e[28]=S):S=e[28];let p;e[29]!==b?(p={value:"status",label:b,icon:S},e[29]=b,e[30]=p):p=e[30];let k;e[31]!==g||e[32]!==p?(k=[g,p],e[31]=g,e[32]=p,e[33]=k):k=e[33];let T;e[34]!==s.groupBy||e[35]!==y||e[36]!==k||e[37]!==h?(T=n.jsx(Ge,{label:h,value:j,onChange:y,options:k}),e[34]=s.groupBy,e[35]=y,e[36]=k,e[37]=h,e[38]=T):T=e[38];let N;e[39]!==a?(N=a("sidebar.taskGroupsList.filterType"),e[39]=a,e[40]=N):N=e[40];const w=s.typeFilter;let _;e[41]!==s?(_=G=>{he("tasks_panel_filter_changed",{to_value:G}),s.setTypeFilter(G)},e[41]=s,e[42]=_):_=e[42];let P;e[43]!==a?(P=a("sidebar.taskGroupsList.typeAll"),e[43]=a,e[44]=P):P=e[44];let C;e[45]!==P?(C={value:"all",label:P},e[45]=P,e[46]=C):C=e[46];let M;e[47]!==a?(M=a("sidebar.taskGroupsList.typeChats"),e[47]=a,e[48]=M):M=e[48];let A;e[49]!==M?(A={value:"manual",label:M},e[49]=M,e[50]=A):A=e[50];let $;e[51]!==a?($=a("sidebar.taskGroupsList.typeAuto"),e[51]=a,e[52]=$):$=e[52];let F;e[53]!==$?(F={value:"automation",label:$},e[53]=$,e[54]=F):F=e[54];let O;e[55]!==C||e[56]!==A||e[57]!==F?(O=[C,A,F],e[55]=C,e[56]=A,e[57]=F,e[58]=O):O=e[58];let R;e[59]!==s.typeFilter||e[60]!==N||e[61]!==_||e[62]!==O?(R=n.jsx(Ge,{label:N,value:w,onChange:_,options:O}),e[59]=s.typeFilter,e[60]=N,e[61]=_,e[62]=O,e[63]=R):R=e[63];let I;e[64]!==a?(I=a("sidebar.taskGroupsList.filterScope"),e[64]=a,e[65]=I):I=e[65];const z=s.showAll?"team":"mine";let E;e[66]!==s?(E=G=>s.setShowAll(G==="team"),e[66]=s,e[67]=E):E=e[67];let H;e[68]!==a?(H=a("sidebar.taskGroupsList.scopeMine"),e[68]=a,e[69]=H):H=e[69];let B;e[70]!==H?(B={value:"mine",label:H},e[70]=H,e[71]=B):B=e[71];let U;e[72]!==a?(U=a("sidebar.taskGroupsList.scopeTeam"),e[72]=a,e[73]=U):U=e[73];let Z;e[74]!==U?(Z={value:"team",label:U},e[74]=U,e[75]=Z):Z=e[75];let Y;e[76]!==B||e[77]!==Z?(Y=[B,Z],e[76]=B,e[77]=Z,e[78]=Y):Y=e[78];let X;e[79]!==I||e[80]!==z||e[81]!==E||e[82]!==Y?(X=n.jsx(Ge,{label:I,value:z,onChange:E,options:Y}),e[79]=I,e[80]=z,e[81]=E,e[82]=Y,e[83]=X):X=e[83];let W;e[84]!==T||e[85]!==R||e[86]!==X?(W=n.jsxs($t,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[T,R,X]}),e[84]=T,e[85]=R,e[86]=X,e[87]=W):W=e[87];let le;return e[88]!==W||e[89]!==f?(le=n.jsxs(Ft,{children:[f,W]}),e[88]=W,e[89]=f,e[90]=le):le=e[90],le}function ma(t,e){return t.filter(s=>s.id===e||!!s.trigger_id||Qs(s))}function ha(){const t=L.c(2),e=Fs()??[];let s;return t[0]!==e?(s=r=>{if(!r)return;const i=e.find(a=>a.id===r);return i?Pt(i.metadata):void 0},t[0]=e,t[1]=s):s=t[1],s}function pa(t){const e=L.c(9),{virtualMcpId:s,size:r,showAutomationBadge:i}=t,a=r===void 0?"sm":r,o=V();let c;e[0]!==a||e[1]!==s?(c=s?n.jsx(xa,{virtualMcpId:s,size:a}):n.jsx(ve,{icon:null,name:"?",size:a}),e[0]=a,e[1]=s,e[2]=c):c=e[2];let u;e[3]!==i||e[4]!==o?(u=i&&n.jsx("span",{"aria-label":o("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-special border border-special text-special-foreground",children:n.jsx(Ot,{size:10,className:"text-white"})}),e[3]=i,e[4]=o,e[5]=u):u=e[5];let l;return e[6]!==c||e[7]!==u?(l=n.jsxs("div",{className:"relative shrink-0",children:[c,u]}),e[6]=c,e[7]=u,e[8]=l):l=e[8],l}function xa(t){const e=L.c(6),{virtualMcpId:s,size:r}=t,i=Nt(s);if(!i){let c;return e[0]!==r?(c=n.jsx(ve,{icon:null,name:"?",size:r}),e[0]=r,e[1]=c):c=e[1],c}const a=i.icon??null;let o;return e[2]!==i.title||e[3]!==r||e[4]!==a?(o=n.jsx(ve,{icon:a,name:i.title,size:r}),e[2]=i.title,e[3]=r,e[4]=a,e[5]=o):o=e[5],o}const ct=["thread"];function ga(t){const e=L.c(53),{open:s,onOpenChange:r}=t,[i,a]=D.useState(""),{org:o}=ae(),{setTaskId:c}=Qe(),u=Ce(),l=V();let d,m,f,h;e[0]!==o.id||e[1]!==i?(h=i.trim(),d=h?20:10,f=me,m=fe.globalSearch(o.id,h,d,ct),e[0]=o.id,e[1]=i,e[2]=d,e[3]=m,e[4]=f,e[5]=h):(d=e[2],m=e[3],f=e[4],h=e[5]);let j;e[6]!==d||e[7]!==u||e[8]!==h?(j=async()=>{const I=await u.call("GLOBAL_SEARCH",{query:h,limit:d,types:[...ct]});return{...I,items:I.items.filter(ba)}},e[6]=d,e[7]=u,e[8]=h,e[9]=j):j=e[9];let y;e[10]!==s||e[11]!==m||e[12]!==j?(y={queryKey:m,enabled:s,queryFn:j,staleTime:1e4},e[10]=s,e[11]=m,e[12]=j,e[13]=y):y=e[13];const{data:v,isFetching:x}=f(y);let g;e[14]!==v?.items?(g=v?.items??[],e[14]=v?.items,e[15]=g):g=e[15];const b=g;let S;e[16]!==r?(S=I=>{I||a(""),r(I)},e[16]=r,e[17]=S):S=e[17];const p=S;let k;e[18]!==p||e[19]!==c?(k=I=>{p(!1),c(I.id,I.virtual_mcp_id??void 0)},e[18]=p,e[19]=c,e[20]=k):k=e[20];const T=k;let N;e[21]!==l?(N=l("tasksPanel.globalSearchDialog.title"),e[21]=l,e[22]=N):N=e[22];let w;e[23]!==N?(w=n.jsx(Wt,{children:N}),e[23]=N,e[24]=w):w=e[24];let _;e[25]!==l?(_=l("tasksPanel.globalSearchDialog.description"),e[25]=l,e[26]=_):_=e[26];let P;e[27]!==_?(P=n.jsx(Yt,{children:_}),e[27]=_,e[28]=P):P=e[28];let C;e[29]!==P||e[30]!==w?(C=n.jsxs(Zt,{className:"sr-only",children:[w,P]}),e[29]=P,e[30]=w,e[31]=C):C=e[31];let M;e[32]!==l?(M=l("tasksPanel.globalSearchDialog.placeholder"),e[32]=l,e[33]=M):M=e[33];let A;e[34]!==i||e[35]!==M?(A=n.jsx(pn,{value:i,onValueChange:a,placeholder:M}),e[34]=i,e[35]=M,e[36]=A):A=e[36];let $;e[37]!==T||e[38]!==x||e[39]!==b||e[40]!==l||e[41]!==h?($=n.jsx(un,{children:x&&b.length===0?n.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l("tasksPanel.globalSearchDialog.searching")}):b.length===0?n.jsx(fn,{children:l("tasksPanel.globalSearchDialog.noResults")}):n.jsx(mn,{heading:h?void 0:l("tasksPanel.globalSearchDialog.recent"),children:b.map(I=>I.type==="thread"?n.jsxs(hn,{value:`thread:${I.id}:${I.title}`,onSelect:()=>T(I),className:"gap-2.5",children:[n.jsx(pa,{virtualMcpId:I.virtual_mcp_id,size:"xs"}),n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx("div",{className:"text-sm text-foreground truncate",children:I.title||l("tasksPanel.globalSearchDialog.untitledChat")})}),n.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(I.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${I.id}`):null)})}),e[37]=T,e[38]=x,e[39]=b,e[40]=l,e[41]=h,e[42]=$):$=e[42];let F;e[43]!==A||e[44]!==$?(F=n.jsxs(xn,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[A,$]}),e[43]=A,e[44]=$,e[45]=F):F=e[45];let O;e[46]!==C||e[47]!==F?(O=n.jsxs(Xt,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[C,F]}),e[46]=C,e[47]=F,e[48]=O):O=e[48];let R;return e[49]!==p||e[50]!==s||e[51]!==O?(R=n.jsx(Jt,{open:s,onOpenChange:p,children:O}),e[49]=p,e[50]=s,e[51]=O,e[52]=R):R=e[52],R}function ba(t){return t.type==="thread"}function va(t,e,s){if(!s)return;const r=t.findIndex(i=>i.id===e);if(r!==-1){for(let i=r+1;i<t.length;i++){const a=t[i];if(a?.created_by===s)return a}for(let i=r-1;i>=0;i--){const a=t[i];if(a?.created_by===s)return a}}}function ya(t){return t==="ephemeral"||t.startsWith("thread:")}function Gt(t){const e=L.c(45),{task:s,isActive:r,onClick:i,onArchive:a,showAutomationBadge:o,showAgentIcon:c,hideStatusIdle:u,indented:l}=t,d=V(),m=gn(s.status),f=m.icon,h=s.metadata?.kind==="tool_call_run",j=Nt(h?void 0:s.virtual_mcp_id);let y;e[0]!==j?(y=_t(j),e[0]=j,e[1]=y):y=e[1];const v=y;vn(6e4);const x=o||!!s.trigger_id,g=s.id,b="button",S=0;let p;e[2]!==i?(p=E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),i())},e[2]=i,e[3]=p):p=e[3];const k=l?"-ml-4 pl-6":"pl-[9px]",T=r?"bg-accent text-accent-foreground":"hover:bg-accent";let N;e[4]!==k||e[5]!==T?(N=se("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",k,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",T),e[4]=k,e[5]=T,e[6]=N):N=e[6];let w;e[7]!==h||e[8]!==c||e[9]!==j?.icon||e[10]!==j?.title?(w=c&&!h&&n.jsx(ve,{icon:j?.icon??null,name:j?.title??"?",size:"2xs"}),e[7]=h,e[8]=c,e[9]=j?.icon,e[10]=j?.title,e[11]=w):w=e[11];let _;e[12]!==x||e[13]!==d?(_=x&&n.jsx(Ot,{size:12,"aria-label":d("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-special"}),e[12]=x,e[13]=d,e[14]=_):_=e[14];let P;e[15]!==d||e[16]!==s.title?(P=s.title||d("tasksPanel.taskRow.untitledTask"),e[15]=d,e[16]=s.title,e[17]=P):P=e[17];let C;e[18]!==P?(C=n.jsx("div",{className:"text-sm text-foreground truncate",children:P}),e[18]=P,e[19]=C):C=e[19];let M;e[20]!==_||e[21]!==C?(M=n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[_,C]}),e[20]=_,e[21]=C,e[22]=M):M=e[22];let A;e[23]!==r||e[24]!==v||e[25]!==s.branch||e[26]!==s.updated_at?(A=s.updated_at&&n.jsxs("div",{className:se("flex items-center gap-1 text-2xs min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[s.branch&&!ya(s.branch)?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"truncate font-mono",children:s.branch}),n.jsx("span",{className:"shrink-0",children:"·"})]}):v?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"truncate",children:[v.owner,"/",v.name]}),n.jsx("span",{className:"shrink-0",children:"·"})]}):null,n.jsx("span",{className:"shrink-0",children:Qt(new Date(s.updated_at))})]}),e[23]=r,e[24]=v,e[25]=s.branch,e[26]=s.updated_at,e[27]=A):A=e[27];let $;e[28]!==M||e[29]!==A?($=n.jsxs("div",{className:"flex-1 min-w-0",children:[M,A]}),e[28]=M,e[29]=A,e[30]=$):$=e[30];const F="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",O=!u&&n.jsx("span",{className:se("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",a&&"group-hover/row:opacity-0"),"aria-label":d("tasksPanel.taskRow.statusLabel",{status:d(m.labelKey)}),children:s.status==="in_progress"?n.jsx(Pe,{className:se("size-3.5",m.iconClassName)}):n.jsx(f,{size:14,className:m.iconClassName})});let R;e[31]!==a||e[32]!==d?(R=a&&n.jsxs(Oe,{children:[n.jsx(Ee,{asChild:!0,children:n.jsx(qe,{variant:"ghost",size:"icon","aria-label":d("tasksPanel.taskRow.archiveTask"),onClick:E=>{E.stopPropagation(),a()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto text-muted-foreground",children:n.jsx(es,{className:"size-3.5"})})}),n.jsx(Re,{side:"right",children:d("tasksPanel.taskRow.archive")})]}),e[31]=a,e[32]=d,e[33]=R):R=e[33];let I;e[34]!==O||e[35]!==R?(I=n.jsxs("div",{className:F,children:[O,R]}),e[34]=O,e[35]=R,e[36]=I):I=e[36];let z;return e[37]!==i||e[38]!==$||e[39]!==I||e[40]!==p||e[41]!==N||e[42]!==w||e[43]!==s.id?(z=n.jsxs("div",{"data-task-id":g,role:b,tabIndex:S,onClick:i,onKeyDown:p,className:N,children:[w,$,I]}),e[37]=i,e[38]=$,e[39]=I,e[40]=p,e[41]=N,e[42]=w,e[43]=s.id,e[44]=z):z=e[44],z}const dt=["requires_action","in_progress","failed","expired","completed"];function ja(t){const e=new Map(dt.map(s=>[s,[]]));for(const s of t){const r=s.status??"completed";(e.get(r)??e.get("completed")).push(s)}return dt.map(s=>({status:s,threads:e.get(s)}))}const Sa="sidebar.group.expanded.";function ka(t,e){const s=L.c(3),[r,i]=xt(`${Sa}${t}`,e);let a;return s[0]!==r||s[1]!==i?(a=[r,i],s[0]=r,s[1]=i,s[2]=a):a=s[2],a}function Ht(t){const e=L.c(18),{onClick:s,isFetching:r,indented:i}=t,a=V();let o;e[0]!==a?(o=a("sidebar.showMoreButton.ariaLabel"),e[0]=a,e[1]=o):o=e[1];const c=i?"-ml-4 pl-6 pr-2":"px-2";let u;e[2]!==c?(u=se("flex items-center gap-2 py-1.5 rounded-lg text-sm text-muted-foreground",c,"hover:bg-sidebar-accent hover:text-foreground focus-ring","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=c,e[3]=u):u=e[3];let l;e[4]!==r?(l=r&&n.jsx(Pe,{className:"size-3.5"}),e[4]=r,e[5]=l):l=e[5];let d;e[6]!==r||e[7]!==a?(d=a(r?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=r,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==d?(m=n.jsx("span",{children:d}),e[9]=d,e[10]=m):m=e[10];let f;return e[11]!==r||e[12]!==s||e[13]!==o||e[14]!==u||e[15]!==l||e[16]!==m?(f=n.jsxs("button",{type:"button","aria-label":o,onClick:s,disabled:r,className:u,children:[l,m]}),e[11]=r,e[12]=s,e[13]=o,e[14]=u,e[15]=l,e[16]=m,e[17]=f):f=e[17],f}function Ta(t,e,s,r){return[t,e,s,r.type,r.member,r.currentUserId??""].join("|")}function Na(t){return t.member==="mine"&&!t.currentUserId}const Kt=4;let Te=0;const Ve=[];function _a(){for(;Te<Kt&&Ve.length>0;){const t=Ve.shift();t&&t()}}function Vt(t){return new Promise((e,s)=>{const r=()=>{Te++,t().then(e,s).finally(()=>{Te--,_a()})};Te<Kt?r():Ve.push(r)})}const Be=10;function ut(t,e,s,r,i){const a={hidden:!1};r.member==="mine"&&r.currentUserId&&(a.created_by=r.currentUserId),r.type==="automation"&&(a.has_trigger=!0),r.type==="manual"&&(a.has_trigger=!1);const o={where:a,limit:i,offset:s,orderBy:[{field:["updated_at"],direction:"desc"}]};return o.status=e,o}function wa(t,e,s,r){let i=0;for(const a of t)Ut(a,e,s,r)&&i++;return i}function He(t,e,s,r){return wa(t,e,s,r)}function Ca(t,e){return!!(t>=Be||t===0&&e)}function ft(t,e){return t<e}function Pa(t,e){return e===!1?!1:e===!0?!0:t}function Ut(t,e,s,r){return!(t.hidden||(t.status??"completed")!==s||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const we=new Map,ke=new Map;function Ia(t,e){return e?t>=Be?!0:null:!1}function mt(t){return we.get(t)}function Ma(t,e){we.set(t,e)}function Aa(t,e,s){const r=we.get(t);if(r!==void 0){s(r);return}let i=ke.get(t);i||(i=Vt(e).then(a=>(we.set(t,a),ke.delete(t),a)).catch(()=>(ke.delete(t),Promise.reject(new Error("group probe failed")))),ke.set(t,i)),i.then(s,()=>s(!1))}function ht(t){const e=t,s=Array.isArray(e.items)?e.items:[];return{items:s,hasMore:e.hasMore??s.length===Be,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function La(t,e,s,r,i){let a=0;for(const o of t)e.has(o.id)||Ut(o,s,r,i)&&a++;return a}function $a(t,e,s,r){const i=L.c(8),{org:a}=ae(),o=Ta(a.id,t,e,s);let c;i[0]!==s?(c=Na(s),i[0]=s,i[1]=c):c=i[1];const u=c,[l,d]=D.useState({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});l.identity!==o&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});const m=Xe(),{threads:f,hasMore:h}=Je(),j=He(f,t,e,s),y=Ca(j,h),v=Ia(j,h),x=Ce();if(l.identity===o&&l.serverHasMore===null){const T=v??mt(o);T!==void 0&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:l.probeSubscribedIdentity,serverHasMore:T})}!u&&l.identity===o&&l.serverHasMore===null&&v===null&&mt(o)===void 0&&l.probeSubscribedIdentity!==o&&(d(T=>T.identity===o?{...T,isProbing:!0,probeSubscribedIdentity:o}:T),Aa(o,async()=>{const T=ut(t,e,0,s,1),N=await x.call("COLLECTION_THREADS_LIST",T),{totalCount:w}=ht(N),_=He(m.threads.get(),t,e,s);return w===void 0?!1:ft(_,w)},T=>{d(N=>N.identity!==o?N:{...N,isProbing:!1,serverHasMore:T})}));const b=async function(){if(l.isFetching||l.isProbing||u)return;const N=o;d(w=>w.identity===N?{...w,isFetching:!0}:w);try{const w=He(f,t,e,s),_=ut(t,e,w,s,Be),P=await Vt(()=>x.call("COLLECTION_THREADS_LIST",_)),{items:C,hasMore:M,totalCount:A}=ht(P),$=new Set(f.map(Fa)),F=La(C,$,t,e,s),O=w;m.mergeThreads(C),d(R=>{if(R.identity!==N)return R;let I;return A!==void 0?I=ft(O+F,A):I=C.length===0||F===0?!1:M,Ma(N,I),{...R,isFetching:!1,serverHasMore:I}})}catch(w){const _=w,P=_ instanceof Error?_.message:String(_);ts.error(`Could not load more tasks: ${P}`),d(C=>C.identity===N?{...C,isFetching:!1}:C)}},S=l.isFetching||l.isProbing,p=!u&&!S&&Pa(y,l.serverHasMore);let k;return i[2]!==S||i[3]!==b||i[4]!==p||i[5]!==l.isProbing||i[6]!==l.serverHasMore?(k={hasMore:p,isFetching:S,isProbing:l.isProbing,serverHasMore:l.serverHasMore,loadMore:b},i[2]=S,i[3]=b,i[4]=p,i[5]=l.isProbing,i[6]=l.serverHasMore,i[7]=k):k=i[7],k}function Fa(t){return t.id}function Ea(t){const e=L.c(20),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u}=t,{isFetching:l,isProbing:d,loadMore:m,hasMore:f,serverHasMore:h}=$a("status",s,u),[j,y]=D.useState(!1);!j&&r.length===0&&h===!0&&!l&&!d&&(y(!0),queueMicrotask(()=>{m()}));let v;if(e[0]!==i||e[1]!==c||e[2]!==u||e[3]!==o||e[4]!==a||e[5]!==r){let b;e[7]!==i||e[8]!==c||e[9]!==u||e[10]!==o||e[11]!==a?(b=S=>n.jsx(Gt,{task:S,isActive:i===S.id,onClick:()=>a(S),onArchive:c&&S.created_by===u.currentUserId?()=>o(S):void 0,showAutomationBadge:!!S.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},S.id),e[7]=i,e[8]=c,e[9]=u,e[10]=o,e[11]=a,e[12]=b):b=e[12],v=r.map(b),e[0]=i,e[1]=c,e[2]=u,e[3]=o,e[4]=a,e[5]=r,e[6]=v}else v=e[6];let x;e[13]!==f||e[14]!==l||e[15]!==m?(x=(f||l)&&n.jsx(Ht,{onClick:()=>{m()},isFetching:l,indented:!0}),e[13]=f,e[14]=l,e[15]=m,e[16]=x):x=e[16];let g;return e[17]!==v||e[18]!==x?(g=n.jsxs(n.Fragment,{children:[v,x]}),e[17]=v,e[18]=x,e[19]=g):g=e[19],g}function Ra(t){const e=L.c(43),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u}=t,l=V(),d=bn[s],m=d.icon,[f,h]=ka(`status-${s}`,!1);let j;e[0]!==f||e[1]!==h?(j=function(){h(!f)},e[0]=f,e[1]=h,e[2]=j):j=e[2];const y=j;let v;e[3]!==d.labelKey||e[4]!==l?(v=l("sidebar.taskGroupsList.toggleStatusGroup",{status:l(d.labelKey)}),e[3]=d.labelKey,e[4]=l,e[5]=v):v=e[5];let x;e[6]!==y?(x=P=>{P.target===P.currentTarget&&(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),y())},e[6]=y,e[7]=x):x=e[7];let g;e[8]!==m||e[9]!==d.iconClassName?(g=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:n.jsx(m,{size:12,className:d.iconClassName})}),e[8]=m,e[9]=d.iconClassName,e[10]=g):g=e[10];let b;e[11]!==f?(b=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:f?n.jsx(Ze,{size:14}):n.jsx(ss,{size:14})}),e[11]=f,e[12]=b):b=e[12];let S;e[13]!==g||e[14]!==b?(S=n.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[g,b]}),e[13]=g,e[14]=b,e[15]=S):S=e[15];let p;e[16]!==d.labelKey||e[17]!==l?(p=l(d.labelKey),e[16]=d.labelKey,e[17]=l,e[18]=p):p=e[18];let k;e[19]!==p?(k=n.jsx("span",{className:"flex-1 truncate",children:p}),e[19]=p,e[20]=k):k=e[20];let T;e[21]!==r.length?(T=n.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:n.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:r.length})}),e[21]=r.length,e[22]=T):T=e[22];let N;e[23]!==f||e[24]!==y||e[25]!==v||e[26]!==x||e[27]!==S||e[28]!==k||e[29]!==T?(N=n.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":f,"aria-label":v,onClick:y,onKeyDown:x,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-lg text-sm font-medium text-foreground cursor-pointer hover:bg-sidebar-accent focus-ring transition-colors",children:[S,k,T]}),e[23]=f,e[24]=y,e[25]=v,e[26]=x,e[27]=S,e[28]=k,e[29]=T,e[30]=N):N=e[30];let w;e[31]!==i||e[32]!==c||e[33]!==f||e[34]!==u||e[35]!==o||e[36]!==a||e[37]!==s||e[38]!==r?(w=f&&n.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:n.jsx(Ea,{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u})}),e[31]=i,e[32]=c,e[33]=f,e[34]=u,e[35]=o,e[36]=a,e[37]=s,e[38]=r,e[39]=w):w=e[39];let _;return e[40]!==N||e[41]!==w?(_=n.jsxs("div",{className:"flex flex-col gap-0.5",children:[N,w]}),e[40]=N,e[41]=w,e[42]=_):_=e[42],_}function Oa(t){const e=L.c(41),{threads:s,groupBy:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,filters:c,hasMore:u,isFetchingMore:l,onLoadMore:d,filtersActive:m}=t,f=V();if(s.length===0&&!u&&!l){let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(xs,{className:"size-6 opacity-60"}),e[0]=x):x=e[0];let g;e[1]!==m||e[2]!==f?(g=f(m?"sidebar.myThreadsSection.noChatsMatchFilters":"sidebar.myThreadsSection.noChatsYet"),e[1]=m,e[2]=f,e[3]=g):g=e[3];let b;return e[4]!==g?(b=n.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[x,n.jsx("p",{className:"text-sm",children:g})]}),e[4]=g,e[5]=b):b=e[5],b}const h=s.length>1||u;if(r==="status"){let x;if(e[6]!==i||e[7]!==h||e[8]!==c||e[9]!==o||e[10]!==a||e[11]!==s){let b;e[13]!==i||e[14]!==h||e[15]!==c||e[16]!==o||e[17]!==a?(b=S=>n.jsx(Ra,{status:S.status,threads:S.threads,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:h,filters:c},S.status),e[13]=i,e[14]=h,e[15]=c,e[16]=o,e[17]=a,e[18]=b):b=e[18],x=ja(s).map(b),e[6]=i,e[7]=h,e[8]=c,e[9]=o,e[10]=a,e[11]=s,e[12]=x}else x=e[12];let g;return e[19]!==x?(g=n.jsx(n.Fragment,{children:x}),e[19]=x,e[20]=g):g=e[20],g}let j;if(e[21]!==i||e[22]!==h||e[23]!==c||e[24]!==o||e[25]!==a||e[26]!==s){let x;e[28]!==i||e[29]!==h||e[30]!==c||e[31]!==o||e[32]!==a?(x=g=>n.jsx(Gt,{task:g,isActive:i===g.id,onClick:()=>a(g),onArchive:h&&g.created_by===c.currentUserId?()=>o(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0},g.id),e[28]=i,e[29]=h,e[30]=c,e[31]=o,e[32]=a,e[33]=x):x=e[33],j=s.map(x),e[21]=i,e[22]=h,e[23]=c,e[24]=o,e[25]=a,e[26]=s,e[27]=j}else j=e[27];let y;e[34]!==u||e[35]!==l||e[36]!==d?(y=(u||l)&&n.jsx(Ht,{onClick:d,isFetching:l}),e[34]=u,e[35]=l,e[36]=d,e[37]=y):y=e[37];let v;return e[38]!==j||e[39]!==y?(v=n.jsxs(n.Fragment,{children:[j,y]}),e[38]=j,e[39]=y,e[40]=v):v=e[40],v}function Ba(t){const e=L.c(11),{panel:s}=t;let r;return e[0]!==s.activeTaskId||e[1]!==s.archiveTask||e[2]!==s.filters||e[3]!==s.filtersActive||e[4]!==s.groupBy||e[5]!==s.hasMore||e[6]!==s.isFetchingMore||e[7]!==s.loadMore||e[8]!==s.selectTask||e[9]!==s.threads?(r=n.jsx(Oa,{threads:s.threads,groupBy:s.groupBy,activeTaskId:s.activeTaskId,onSelectTask:s.selectTask,onArchiveTask:s.archiveTask,filters:s.filters,hasMore:s.hasMore,isFetchingMore:s.isFetchingMore,onLoadMore:s.loadMore,filtersActive:s.filtersActive}),e[0]=s.activeTaskId,e[1]=s.archiveTask,e[2]=s.filters,e[3]=s.filtersActive,e[4]=s.groupBy,e[5]=s.hasMore,e[6]=s.isFetchingMore,e[7]=s.loadMore,e[8]=s.selectTask,e[9]=s.threads,e[10]=r):r=e[10],r}function Da(t){const e=L.c(67);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{onNavigate:r}=s,{data:i}=pe.useSession(),a=i?.user?.id,{org:o}=ae();let c;e[2]!==o.id?(c=ye(o.id),e[2]=o.id,e[3]=c):c=e[3];const u=c.id,l=ha(),d=Tt(),{threads:m,hasMore:f,isFetchingMore:h,fetchNextPage:j}=Je(),y=m.filter(Ka),{hide:v,setScope:x}=It(),g=Me(),{setTaskId:b,createNewTask:S}=Qe(),p=Et(),k=et();let T;e[4]!==k||e[5]!==m||e[6]!==p?(T=on({routeAgentId:p,threadVirtualMcpId:m.find(K=>K.id===k)?.virtual_mcp_id}),e[4]=k,e[5]=m,e[6]=p,e[7]=T):T=e[7];const N=T;let w;e[8]!==r?(w=()=>{r?.()},e[8]=r,e[9]=w):w=e[9];const _=w,P=[...y].sort(Ha),[C,M]=D.useState("all"),[A,$]=D.useState("flat"),[F,O]=xt("sidebar-threads-scope-all",!1),[R,I]=D.useState(!1),[z,E]=D.useState(!1);let H;e[10]!==I?(H=()=>{he("tasks_panel_search_opened"),E(!0),I(!0)},e[10]=I,e[11]=H):H=e[11];const B=H,U=a??null;let Z;e[12]!==U||e[13]!==C?(Z={type:C,member:"mine",currentUserId:U},e[12]=U,e[13]=C,e[14]=Z):Z=e[14];const Y=Z,X={};F||(X.created_by="me"),x(X);let W;e[15]!==a?(W=K=>a?K.filter(ue=>ue.created_by===a):[],e[15]=a,e[16]=W):W=e[16];const le=W;let G;e[17]!==C?(G=K=>C==="automation"?K.filter(Ga):C==="manual"?K.filter(za):K,e[17]=C,e[18]=G):G=e[18];const re=G,J=ma(re(F?P:le(P)),k);let Q;e[19]!==k||e[20]!==_||e[21]!==a||e[22]!==v||e[23]!==g||e[24]!==o.slug||e[25]!==b||e[26]!==J?(Q=K=>{if(a&&K.created_by&&K.created_by!==a)return;const ue=K.id===k;if(v(K.id),an(K.id),!ue)return;const ge=va(J,K.id,a);_(),ge?b(ge.id,ge.virtual_mcp_id):g({to:"/$org",params:{org:o.slug}})},e[19]=k,e[20]=_,e[21]=a,e[22]=v,e[23]=g,e[24]=o.slug,e[25]=b,e[26]=J,e[27]=Q):Q=e[27];const ee=Q;let ne;e[28]!==_||e[29]!==b?(ne=K=>{_(),b(K.id,K.virtual_mcp_id)},e[28]=_,e[29]=b,e[30]=ne):ne=e[30];const ie=ne;let te;e[31]!==N||e[32]!==k||e[33]!==m||e[34]!==_||e[35]!==S||e[36]!==a||e[37]!==u||e[38]!==l||e[39]!==d||e[40]!==b?(te=()=>{const K=N??u;he("sidebar_new_thread_clicked",{virtual_mcp_id:K}),_();const ue=qs(m,K,a,l(K));if(ue){b(ue.id,ue.virtual_mcp_id,{newThread:!0});return}const ge=d?null:m.find(qt=>qt.id===k)?.branch??null;S(K,ge)},e[31]=N,e[32]=k,e[33]=m,e[34]=_,e[35]=S,e[36]=a,e[37]=u,e[38]=l,e[39]=d,e[40]=b,e[41]=te):te=e[41];const oe=te;let ce;e[42]!==j?(ce=()=>{j()},e[42]=j,e[43]=ce):ce=e[43];const xe=A!=="flat"||C!=="all"||F;let de;e[44]!==z||e[45]!==R||e[46]!==I?(de=z?n.jsx(ga,{open:R,onOpenChange:I}):null,e[44]=z,e[45]=R,e[46]=I,e[47]=de):de=e[47];let Se;return e[48]!==k||e[49]!==ee||e[50]!==Y||e[51]!==A||e[52]!==f||e[53]!==h||e[54]!==oe||e[55]!==B||e[56]!==ie||e[57]!==$||e[58]!==O||e[59]!==M||e[60]!==F||e[61]!==ce||e[62]!==xe||e[63]!==de||e[64]!==C||e[65]!==J?(Se={threads:J,activeTaskId:k,filters:Y,hasMore:f,isFetchingMore:h,loadMore:ce,groupBy:A,setGroupBy:$,typeFilter:C,setTypeFilter:M,showAll:F,setShowAll:O,filtersActive:xe,selectTask:ie,archiveTask:ee,newThread:oe,openSearch:B,searchDialog:de},e[48]=k,e[49]=ee,e[50]=Y,e[51]=A,e[52]=f,e[53]=h,e[54]=oe,e[55]=B,e[56]=ie,e[57]=$,e[58]=O,e[59]=M,e[60]=F,e[61]=ce,e[62]=xe,e[63]=de,e[64]=C,e[65]=J,e[66]=Se):Se=e[66],Se}function za(t){return!t.trigger_id}function Ga(t){return!!t.trigger_id}function Ha(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function Ka(t){return!t.hidden}function Va(){const t=L.c(59),e=V(),[s,r]=D.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={onNavigate:()=>r(!1)},t[0]=i):i=t[0];const a=Da(i),o=Le()?.activeTask;let c;t[1]!==o?.title||t[2]!==a.activeTaskId||t[3]!==a.threads||t[4]!==e?(c=o?.title||a.threads.find(R=>R.id===a.activeTaskId)?.title||e("tasksPanel.taskRow.untitledTask"),t[1]=o?.title,t[2]=a.activeTaskId,t[3]=a.threads,t[4]=e,t[5]=c):c=t[5];const u=c;let l;t[6]!==a?(l=()=>{r(!1),a.openSearch()},t[6]=a,t[7]=l):l=t[7];const d=l;let m;t[8]!==e?(m=e("chat.threadsMenu.chats"),t[8]=e,t[9]=m):m=t[9];const f=s&&"bg-sidebar-accent";let h;t[10]!==f?(h=se("flex h-[34px] min-w-0 shrink items-center gap-1.5 rounded-lg px-2 text-sm text-foreground transition-colors hover:bg-accent focus-ring",f),t[10]=f,t[11]=h):h=t[11];let j;t[12]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(gs,{size:16,className:"shrink-0"}),t[12]=j):j=t[12];let y;t[13]!==u?(y=n.jsx("span",{className:"truncate max-w-[10rem] font-medium",children:u}),t[13]=u,t[14]=y):y=t[14];let v;t[15]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Ze,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[15]=v):v=t[15];let x;t[16]!==m||t[17]!==h||t[18]!==y?(x=n.jsx(Ee,{asChild:!0,children:n.jsx(Lt,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":m,className:h,children:[j,y,v]})})}),t[16]=m,t[17]=h,t[18]=y,t[19]=x):x=t[19];let g;t[20]!==e?(g=e("chat.threadsMenu.chats"),t[20]=e,t[21]=g):g=t[21];let b;t[22]!==g?(b=n.jsx(Re,{side:"bottom",children:g}),t[22]=g,t[23]=b):b=t[23];let S;t[24]!==b||t[25]!==x?(S=n.jsxs(Oe,{children:[x,b]}),t[24]=b,t[25]=x,t[26]=S):S=t[26];let p;t[27]!==a?(p=n.jsx(fa,{panel:a,className:"size-8"}),t[27]=a,t[28]=p):p=t[28];let k;t[29]!==e?(k=e("sidebar.taskGroupsList.searchChats"),t[29]=e,t[30]=k):k=t[30];let T;t[31]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(bs,{size:16}),t[31]=T):T=t[31];let N;t[32]!==d||t[33]!==k?(N=n.jsx(Ne,{"aria-label":k,onClick:d,className:"size-8",children:T}),t[32]=d,t[33]=k,t[34]=N):N=t[34];let w;t[35]!==e?(w=e("sidebar.taskGroupsList.newChat"),t[35]=e,t[36]=w):w=t[36];let _;t[37]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(vt,{size:16}),t[37]=_):_=t[37];let P;t[38]!==a.newThread||t[39]!==w?(P=n.jsx(Ne,{"aria-label":w,onClick:a.newThread,className:"size-8",children:_}),t[38]=a.newThread,t[39]=w,t[40]=P):P=t[40];let C;t[41]!==N||t[42]!==P?(C=n.jsxs("div",{className:"flex items-center gap-0.5",children:[N,P]}),t[41]=N,t[42]=P,t[43]=C):C=t[43];let M;t[44]!==p||t[45]!==C?(M=n.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[p,C]}),t[44]=p,t[45]=C,t[46]=M):M=t[46];let A;t[47]!==a?(A=n.jsx("div",{className:"flex max-h-[60vh] min-h-0 flex-col gap-0.5 overflow-y-auto overscroll-contain",children:n.jsx(Ba,{panel:a})}),t[47]=a,t[48]=A):A=t[48];let $;t[49]!==M||t[50]!==A?($=n.jsxs($t,{align:"start",side:"bottom",onOpenAutoFocus:Ua,className:"flex w-80 flex-col gap-2 p-2",children:[M,A]}),t[49]=M,t[50]=A,t[51]=$):$=t[51];let F;t[52]!==s||t[53]!==S||t[54]!==$?(F=n.jsxs(Ft,{open:s,onOpenChange:r,children:[S,$]}),t[52]=s,t[53]=S,t[54]=$,t[55]=F):F=t[55];let O;return t[56]!==a.searchDialog||t[57]!==F?(O=n.jsxs(n.Fragment,{children:[F,a.searchDialog]}),t[56]=a.searchDialog,t[57]=F,t[58]=O):O=t[58],O}function Ua(t){return t.preventDefault()}function qa(){const t=L.c(20),e=V(),{threads:s}=Je(),{createNewTask:r}=Qe(),i=Rt(),a=et();let o;t[0]!==a||t[1]!==s?(o=s.find(v=>v.id===a)?.branch??null,t[0]=a,t[1]=s,t[2]=o):o=t[2];const c=o;let u;t[3]!==i||t[4]!==r||t[5]!==c?(u=()=>{r(i,c)},t[3]=i,t[4]=r,t[5]=c,t[6]=u):u=t[6];const l=u;let d;t[7]!==e?(d=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=d):d=t[8];let m;t[9]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(vt,{size:16}),t[9]=m):m=t[9];let f;t[10]!==l||t[11]!==d?(f=n.jsx(Ee,{asChild:!0,children:n.jsx("button",{type:"button",onClick:l,"aria-label":d,className:"flex shrink-0 items-center rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-ring",children:m})}),t[10]=l,t[11]=d,t[12]=f):f=t[12];let h;t[13]!==e?(h=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=h):h=t[14];let j;t[15]!==h?(j=n.jsx(Re,{side:"bottom",children:h}),t[15]=h,t[16]=j):j=t[16];let y;return t[17]!==f||t[18]!==j?(y=n.jsxs(Oe,{children:[f,j]}),t[17]=f,t[18]=j,t[19]=y):y=t[19],y}function Wa(t){const e=L.c(16),{virtualMcpId:s,taskId:r}=t,{openPanel:i}=Bt();let a;e[0]!==r||e[1]!==s?(a={virtualMcpId:s,taskId:r},e[0]=r,e[1]=s,e[2]=a):a=e[2];const{tabs:o,activeTab:c,mainOpen:u}=Dt(a);if(o.length===0)return null;let l;if(e[3]!==c||e[4]!==u||e[5]!==i||e[6]!==o||e[7]!==s){let m;e[9]!==c||e[10]!==u||e[11]!==i||e[12]!==s?(m=f=>{const h=f.id==="automations"?ns({activeTab:c,mainOpen:u}):u&&f.id===c;return n.jsxs(st.Tab,{active:h,onClick:()=>{h||(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:f.id,tab_kind:f.kind,was_active:!1}),i(f.id))},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(_e,{icon:f.icon})}),f.title]},f.id)},e[9]=c,e[10]=u,e[11]=i,e[12]=s,e[13]=m):m=e[13],l=o.map(m),e[3]=c,e[4]=u,e[5]=i,e[6]=o,e[7]=s,e[8]=l}else l=e[8];let d;return e[14]!==l?(d=n.jsx(st.Tabs,{"data-tour":rn.surfaceTabs,children:l}),e[14]=l,e[15]=d):d=e[15],d}function Ya(t){return{threadId:t.routeThreadId,providerKey:t.routeThreadId??t.fallbackKey}}const Ke="__mobile-main-panel-tab-select__",Ue="main";function Za({tabs:t,activeTab:e,mainOpen:s,t:r}){const i=t.find(o=>o.id===e),a=r("mainPanelTabs.mobileMainPanelTabSelect.mainView");return s?i?.title??a:i?.title??t[0]?.title??a}const Xa={kind:"component",Component:vs},Ja={kind:"component",Component:ys},Qa={kind:"component",Component:js},er={kind:"component",Component:jn};function tr({tabs:t,overlayEnabled:e,t:s}){return[{value:"chat",title:s("mainPanelTabs.mobileMainPanelTabSelect.chat"),icon:Xa},...t.length>0?t.map(r=>({value:r.id,title:r.title,icon:r.icon})):[{value:Ue,title:s("mainPanelTabs.mobileMainPanelTabSelect.mainView"),icon:er}],...e?[{value:"board",title:s("mainPanelTabs.mobileMainPanelTabSelect.tasks"),icon:Ja},{value:"files",title:s("mainPanelTabs.mobileMainPanelTabSelect.library"),icon:Qa}]:[]]}function sr(t){const e=L.c(53),{virtualMcpId:s,taskId:r}=t,i=V(),a=Me(),{openPanel:o}=Bt();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const u=je(c);let l;e[1]!==r||e[2]!==s?(l={virtualMcpId:s,taskId:r},e[1]=r,e[2]=s,e[3]=l):l=e[3];const{tabs:d,activeTab:m,mainOpen:f}=Dt(l),{org:h}=ae(),j=Ls();let y;e[4]!==h.id?(y=nt(h.id),e[4]=h.id,e[5]=y):y=e[5];const v=s===y;let x,g,b,S,p,k,T,N,w,_;if(e[6]!==m||e[7]!==f||e[8]!==a||e[9]!==v||e[10]!==o||e[11]!==h.id||e[12]!==u.org||e[13]!==u.taskId||e[14]!==j||e[15]!==i||e[16]!==d||e[17]!==s){S=Symbol.for("react.early_return_sentinel");e:{const M=tr({tabs:d,overlayEnabled:!!(u.org&&u.taskId),t:i}),A=f?M.find(B=>B.value===m)?.value??Ue:"chat",$=M.find(B=>B.value===A),F=$?.title??Za({tabs:d,activeTab:m,mainOpen:f,t:i});let O;e[28]!==a?(O=B=>{a({to:".",search:U=>({...U,...en(B)}),replace:!0})},e[28]=a,e[29]=O):O=e[29];const R=O;let I;e[30]!==v||e[31]!==o||e[32]!==h.id||e[33]!==j||e[34]!==R||e[35]!==s?(I=B=>{if(B!==Ke){if(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:B,source:"mobile_select"}),ln({reportsOnly:j,onReportAgent:v,tabId:B})){o(B,{virtualmcpid:nt(h.id),search:rr});return}if(B==="chat"||B===Ue){R(B==="chat"?"chat":"main");return}o(B,{search:ar})}},e[30]=v,e[31]=o,e[32]=h.id,e[33]=j,e[34]=R,e[35]=s,e[36]=I):I=e[36];const z=I,E=M.find(B=>B.value!==A);if(M.length===2&&E){S=n.jsxs("button",{type:"button",onClick:()=>z(E.value),"aria-label":i("mainPanelTabs.mobileMainPanelTabSelect.switchTo",{name:E.title}),className:"flex h-10 min-w-0 max-w-[7.5rem] items-center gap-1.5 rounded-lg px-1.5 text-xs text-foreground transition-colors hover:bg-accent focus-ring",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(_e,{icon:E.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:E.title})]});break e}g=kn,w=Ke,_=z;let H;e[37]!==i?(H=i("mainPanelTabs.mobileMainPanelTabSelect.view"),e[37]=i,e[38]=H):H=e[38],b=n.jsx(Sn,{"aria-label":H,className:"h-10! w-full min-w-0 max-w-[7.5rem] rounded-lg border-0 bg-transparent px-1.5 text-xs shadow-none [--shadow-edge:none]",children:n.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[$&&n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(_e,{icon:$.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:F})]})}),x=Tn,p="end",k="w-56",e[39]!==F?(T=n.jsx(zt,{value:Ke,disabled:!0,hideCheck:!0,className:"hidden",children:F}),e[39]=F,e[40]=T):T=e[40],N=M.map(nr)}e[6]=m,e[7]=f,e[8]=a,e[9]=v,e[10]=o,e[11]=h.id,e[12]=u.org,e[13]=u.taskId,e[14]=j,e[15]=i,e[16]=d,e[17]=s,e[18]=x,e[19]=g,e[20]=b,e[21]=S,e[22]=p,e[23]=k,e[24]=T,e[25]=N,e[26]=w,e[27]=_}else x=e[18],g=e[19],b=e[20],S=e[21],p=e[22],k=e[23],T=e[24],N=e[25],w=e[26],_=e[27];if(S!==Symbol.for("react.early_return_sentinel"))return S;let P;e[41]!==x||e[42]!==p||e[43]!==k||e[44]!==T||e[45]!==N?(P=n.jsxs(x,{align:p,className:k,children:[T,N]}),e[41]=x,e[42]=p,e[43]=k,e[44]=T,e[45]=N,e[46]=P):P=e[46];let C;return e[47]!==g||e[48]!==b||e[49]!==P||e[50]!==w||e[51]!==_?(C=n.jsxs(g,{value:w,onValueChange:_,children:[b,P]}),e[47]=g,e[48]=b,e[49]=P,e[50]=w,e[51]=_,e[52]=C):C=e[52],C}function nr(t){return n.jsx(zt,{value:t.value,children:n.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(_e,{icon:t.icon})}),n.jsx("span",{className:"min-w-0 truncate",children:t.title})]})},t.value)}function ar(t){return{...t,sidepanel:!1}}function rr(t){return{...t,thread:void 0,sidepanel:!1}}function ir(){const t=L.c(3),e=as();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={select:lr},t[0]=s):s=t[0];const r=gt(s);if(!e||!r)return!1;let i;return t[1]!==r?(i=r==="app"||_n.includes(r),t[1]=r,t[2]=i):i=t[2],i}function lr(t){const{staticData:e}=t.matches.findLast(or)??{};return e?.siteEditorView?"site-editor":e?.mainView}function or(t){return t.staticData.mainView}function cr(t,e,s){const r=L.c(33),i=Xe(),{locator:a}=ae(),o=D.useSyncExternalStore(i.threads.subscribe,i.threads.get),c=D.useSyncExternalStore(i.threadsStatus.subscribe,i.threadsStatus.get);let u;r[0]!==t||r[1]!==o?(u=t===null?null:o.find(p=>p.id===t&&!p.partial)??null,r[0]=t,r[1]=o,r[2]=u):u=r[2];const l=u,[d,m]=D.useState(void 0),[f,h]=D.useState(t);f!==t&&(h(t),m(void 0));let j,y;r[3]!==d||r[4]!==t||r[5]!==l||r[6]!==i||r[7]!==c.kind?(j=()=>{t!==null&&(l||c.kind!=="loading"&&d===void 0&&(m("pending"),i.fetchThreadIntoSlot(t).then(p=>{m(p)})))},y=[t,l,c.kind,d,i],r[3]=d,r[4]=t,r[5]=l,r[6]=i,r[7]=c.kind,r[8]=j,r[9]=y):(j=r[8],y=r[9]),D.useEffect(j,y);let v;r[10]!==s||r[11]!==a||r[12]!==i||r[13]!==e?(v={mutationFn:async p=>i.create({id:p,virtual_mcp_id:e,...s?{branch:s}:{},...Us(sessionStorage,a,p)})},r[10]=s,r[11]=a,r[12]=i,r[13]=e,r[14]=v):v=r[14];const x=rs(v);let g,b;if(r[15]!==x||r[16]!==d||r[17]!==t||r[18]!==l||r[19]!==c.kind?(g=()=>{t!==null&&(l||d===null&&c.kind!=="loading"&&(x.isPending||x.variables!==t&&x.mutate(t)))},b=[t,l,d,c.kind,x],r[15]=x,r[16]=d,r[17]=t,r[18]=l,r[19]=c.kind,r[20]=g,r[21]=b):(g=r[20],b=r[21]),D.useEffect(g,b),t===null){let p;return r[22]===Symbol.for("react.memo_cache_sentinel")?(p={status:"ready",task:null},r[22]=p):p=r[22],p}if(l){let p;return r[23]!==l?(p={status:"ready",task:l},r[23]=l,r[24]=p):p=r[24],p}if(d&&typeof d=="object"){let p;return r[25]!==d?(p={status:"ready",task:d},r[25]=d,r[26]=p):p=r[26],p}if(x.data){let p;return r[27]!==x.data?(p={status:"ready",task:x.data},r[27]=x.data,r[28]=p):p=r[28],p}if(x.isError){let p;return r[29]!==x.error?(p={status:"error",error:x.error},r[29]=x.error,r[30]=p):p=r[30],p}if(x.isPending||c.kind!=="loading"){let p;return r[31]===Symbol.for("react.memo_cache_sentinel")?(p={status:"creating"},r[31]=p):p=r[31],p}let S;return r[32]===Symbol.for("react.memo_cache_sentinel")?(S={status:"loading"},r[32]=S):S=r[32],S}const dr=50;function ur(t,e){const s=L.c(15),{org:r}=ae(),i=Ce(),{data:a}=pe.useSession(),o=a?.user?.id??"";let c;s[0]!==r.id||s[1]!==o||s[2]!==t?(c=fe.agentEntryThreads(r.id,o,t),s[0]=r.id,s[1]=o,s[2]=t,s[3]=c):c=s[3];const u=e&&!!o;let l;s[4]!==i||s[5]!==t?(l=async()=>{try{return(await i.call("COLLECTION_THREADS_LIST",{limit:dr,offset:0,orderBy:[{field:["updated_at"],direction:"desc"}],where:{hidden:!1,created_by:"me",virtual_mcp_id:t}})).items}catch{return[]}},s[4]=i,s[5]=t,s[6]=l):l=s[6];let d;s[7]!==c||s[8]!==u||s[9]!==l?(d={queryKey:c,enabled:u,staleTime:0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,queryFn:l},s[7]=c,s[8]=u,s[9]=l,s[10]=d):d=s[10];const m=me(d);if(!e||!o){let h;return s[11]===Symbol.for("react.memo_cache_sentinel")?(h={status:"idle"},s[11]=h):h=s[11],h}if(!m.data||m.isFetching){let h;return s[12]===Symbol.for("react.memo_cache_sentinel")?(h={status:"loading"},s[12]=h):h=s[12],h}let f;return s[13]!==m.data?(f={status:"ready",threads:m.data},s[13]=m.data,s[14]=f):f=s[14],f}function fr(t){const e=L.c(13),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=je(r);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const o=Ae(a);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={select:mr},e[2]=c):c=e[2];const u=gt(c),{org:l}=ae();let d;e[3]!==l||e[4]!==i.agentId||e[5]!==i.legacyView||e[6]!==i.org||e[7]!==u||e[8]!==o?(d=i.org?is({pathname:u,org:i.org,pathAgentId:i.agentId,pathLegacyView:i.legacyView,fallbackAgentId:ye(l.id).id,search:o}):null,e[3]=l,e[4]=i.agentId,e[5]=i.legacyView,e[6]=i.org,e[7]=u,e[8]=o,e[9]=d):d=e[9];const m=d;let f;return e[10]!==s||e[11]!==m?(f=m?n.jsx(tt,{target:m}):s,e[10]=s,e[11]=m,e[12]=f):f=e[12],f}function mr(t){return t.matches.at(-1)?.pathname??t.location.pathname}function hr(){const t=L.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=je(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const i=Ae(r),{org:a}=ae(),{org:o,taskId:c}=s;if(!o||c===void 0)return null;let u;return t[2]!==o||t[3]!==a.id||t[4]!==i||t[5]!==c?(u=ls({org:o,taskId:c,fallbackAgentId:ye(a.id).id,search:i}),t[2]=o,t[3]=a.id,t[4]=i,t[5]=c,t[6]=u):u=t[6],u}function pr(){const t=L.c(2),e=hr();let s;return t[0]!==e?(s=e?n.jsx(tt,{target:e}):null,t[0]=e,t[1]=s):s=t[1],s}function xr(){const t=L.c(6),e=Cn(),s=Me();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const{preview:i}=Ae(r);if(!e||!i)return null;let a;t[1]!==s?(a=()=>s({to:".",search:gr}),t[1]=s,t[2]=a):a=t[2];let o;return t[3]!==i||t[4]!==a?(o=n.jsx(Pn,{previewPath:i,onClose:a,showSeeInLibrary:!0}),t[3]=i,t[4]=a,t[5]=o):o=t[5],o}function gr(t){const{preview:e,...s}=t;return s}function br(t){const e=L.c(11),{children:s}=t,r=V();let i;e[0]!==r?(i=r("agentShellLayout.agentShellLayout.chatLoadingError"),e[0]=r,e[1]=i):i=e[1];let a;e[2]!==i?(a=n.jsx("div",{role:"alert",className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:i}),e[2]=i,e[3]=a):a=e[3];let o;e[4]!==s?(o=s??n.jsx(ca,{}),e[4]=s,e[5]=o):o=e[5];let c;e[6]!==o?(c=n.jsx(Ie,{children:o}),e[6]=o,e[7]=c):c=e[7];let u;return e[8]!==a||e[9]!==c?(u=n.jsx(pt,{fallback:a,children:c}),e[8]=a,e[9]=c,e[10]=u):u=e[10],u}function vr(t){const e=L.c(6),{threadId:s,providerKey:r,children:i}=t;let a;e[0]!==r||e[1]!==s?(a=s===null?n.jsx(q.ThreadlessStreamSource,{},r):n.jsx(q.ActiveTaskStreamSource,{taskId:s},r),e[0]=r,e[1]=s,e[2]=a):a=e[2];let o;return e[3]!==i||e[4]!==a?(o=n.jsx(q.StreamHost,{source:a,children:i}),e[3]=i,e[4]=a,e[5]=o):o=e[5],o}function yr(t){const e=L.c(3),{onNewTaskRef:s,createNewTask:r}=t;let i;return e[0]!==r||e[1]!==s?(i=()=>(s.current=r,()=>{s.current=null}),e[0]=r,e[1]=s,e[2]=i):i=e[2],D.useLayoutEffect(i),null}function jr({virtualMcpId:t,hasActiveRepository:e,sandboxMap:s,children:r}){const i=V(),{currentBranch:a,activeTask:o,setCurrentTaskBranch:c}=$e(),{data:u}=pe.useSession(),l=u?.user?.id,d=!Is(o?.harness_id),m=Ys({agentSandboxMap:s,threadSandboxMap:o?.metadata?.sandboxMap,userId:l,ownerId:o?.created_by,branch:a}),f=e||zs(o?.metadata),h=D.useRef(null),j=d&&Zs({threadLoaded:!!o,isOwner:!!l&&o?.created_by===l,hasActiveRepository:f,branch:a??null,attempted:h.current===(o?.id??null)});D.useEffect(()=>{!j||!o||(h.current=o.id,c(Ct(u?.user?.name||u?.user?.email?.split("@")[0])))},[j,o,u,c]);const y=St(t),v=Fe(t),x=Mt(v,a),{releases:g,createRelease:b}=Gs(t),p=!!l&&o?.created_by===l&&!!a&&a!==x&&!g.some(M=>M.branch===a),k=D.useRef(null);D.useEffect(()=>{!p||!a||k.current!==a&&(k.current=a,b({branch:a,name:Ks(g,i("thread.branchPicker.defaultVersionName")),color:Hs(g.length),createdBy:l,createdAt:new Date().toISOString()}).catch(()=>{}))},[p,a,g,b,l,i]);const T=y.resolved?y.runtime:null,N=Xs(t,a??void 0),_=(l&&a?Mn(m?.[l]?.[a]):{})["agent-sandbox"]??null,P=_?.previewUrl??null,C=d&&T!=="cms"&&(!!_||N);return d?T==="cms"?n.jsx(lt,{resetKey:`${t}:${a??"no-branch"}:${o?.id??""}`,children:r}):n.jsx(Nn,{resetKey:o?.id??"no-thread",virtualMcpId:t,branch:a??null,previewUrl:P,enabled:C,children:n.jsx(Js,{resetKey:o?.id??"no-thread",executionEnabled:d,virtualMcpId:t,branch:a??null,userId:l??null,hasActiveRepository:f,vmEntry:_,threadId:o?.id??null,children:n.jsx(lt,{resetKey:`${t}:${a??"no-branch"}:${o?.id??""}`,children:r})})}):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex h-full rounded-[0.75rem] bg-background shadow-edge",children:n.jsx(At,{image:n.jsx(We,{size:48,className:"text-muted-foreground"}),title:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWeb"),description:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWebDescription")})})})}function Sr(){const t=L.c(16),e=V(),{toggleSidebar:s}=ks(),{virtualMcpId:r,taskId:i}=$e();let a;t[0]!==e?(a=e("layouts.shellControls.toggleSidebar"),t[0]=e,t[1]=a):a=t[1];let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Ss,{size:16}),t[2]=o):o=t[2];let c;t[3]!==a||t[4]!==s?(c=n.jsx(Ne,{className:"md:hidden",onClick:s,"aria-label":a,children:o}),t[3]=a,t[4]=s,t[5]=c):c=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Va,{}),t[6]=u):u=t[6];let l;t[7]!==c?(l=n.jsxs(De.Topbar.Left,{children:[c,u]}),t[7]=c,t[8]=l):l=t[8];let d;t[9]!==i||t[10]!==r?(d=n.jsx("div",{className:"min-w-0 md:hidden",children:n.jsx(sr,{virtualMcpId:r,taskId:i})}),t[9]=i,t[10]=r,t[11]=d):d=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(De.Topbar.Right,{className:"shrink-0",children:n.jsx(qa,{})}),t[12]=m):m=t[12];let f;return t[13]!==l||t[14]!==d?(f=n.jsxs(De.Topbar,{className:"border-b border-border/60 px-3",children:[l,d,m]}),t[13]=l,t[14]=d,t[15]=f):f=t[15],f}function kr(t){const e=L.c(25),{layout:s,onNewTaskRef:r,createNewTask:i}=t,{virtualMcpId:a,taskId:o}=$e(),c=yn()??"overview",u=ir(),[l,d]=D.useState(null),m=l===c,f=u?m:s.threadOpen;let h;e[0]!==c||e[1]!==s||e[2]!==u||e[3]!==m?(h=u?()=>d(m?null:c):s.toggleThread,e[0]=c,e[1]=s,e[2]=u,e[3]=m,e[4]=h):h=e[4];const j=h;let y;e[5]!==i||e[6]!==r?(y=n.jsx(yr,{onNewTaskRef:r,createNewTask:i}),e[5]=i,e[6]=r,e[7]=y):y=e[7];let v;e[8]!==o||e[9]!==a?(v=n.jsx(Wa,{virtualMcpId:a,taskId:o}),e[8]=o,e[9]=a,e[10]=v):v=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Sr,{}),e[11]=x):x=e[11];const g=o??"threadless";let b;e[12]!==g?(b=n.jsx(it.Thread,{topbar:x,children:n.jsx(br,{},g)}),e[12]=g,e[13]=b):b=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(bt,{}),e[14]=S):S=e[14];let p;e[15]!==c||e[16]!==s||e[17]!==v||e[18]!==b||e[19]!==f||e[20]!==j?(p=n.jsxs(it,{...s,threadOpen:f,toggleThread:j,contentKey:c,contentNavigation:v,children:[b,S]}),e[15]=c,e[16]=s,e[17]=v,e[18]=b,e[19]=f,e[20]=j,e[21]=p):p=e[21];let k;return e[22]!==y||e[23]!==p?(k=n.jsxs(n.Fragment,{children:[y,p]}),e[22]=y,e[23]=p,e[24]=k):k=e[24],k}function Tr(){const t=V(),e=Me(),s=cn(),{create:r}=It(),{org:i}=ae(),o=je({strict:!1}).org??"",c=Ae({strict:!1}),u=et(),l=Rt(),d=Et(),[m]=D.useState(()=>crypto.randomUUID()),{data:f}=pe.useSession(),[h]=D.useState(()=>Ct(f?.user?.name||f?.user?.email?.split("@")[0])),j=Xe(),y=D.useSyncExternalStore(j.threads.subscribe,j.threads.get),v=D.useSyncExternalStore(j.threadsStatus.subscribe,j.threadsStatus.get),x=Fe(l),g=!!(x&&_t(x)),b=Mt(x,null),[S,p]=D.useState(null);u!==null&&S!==null&&p(null);const k=u===null&&!!d&&!!x&&S!==l,T=z=>Ws(z,l,f?.user?.id,Pt(x?.metadata),g,{baseBranch:b}),N=k&&v.kind!=="loading"?T(y):void 0,w=ur(l,k&&v.kind!=="loading"&&!N),_=cr(u,l,h);da(_.status==="ready"?_.task:null);const P=x?.metadata?.ui?.layout??null,C=P?{defaultMainView:P.defaultMainView??null,chatDefaultOpen:P.chatDefaultOpen??null}:null,M=tn(C),{threadId:A,providerKey:$}=Ya({routeThreadId:u,fallbackKey:m}),F=async()=>{const z=crypto.randomUUID(),E=y.find(H=>H.id===A)?.branch??null;try{await r({id:z,virtual_mcp_id:l,...E?{branch:E}:{}})}catch{}s(z,()=>({}))},O=D.useRef(null);D.useEffect(()=>{const z=E=>{us(E)&&E.shiftKey&&E.code==="KeyS"&&!E.repeat&&(E.preventDefault(),O.current?.())};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[]);const R=_.status==="ready"?_.task:null,I=R?.virtual_mcp_id;if(R&&I&&!dn({routeAgentId:l,threadAgentId:I})){const z=os({org:o,agentId:I,superAgentId:ye(i.id).id});return n.jsx(tt,{target:{route:z,search:{thread:R.id,sidepanel:c.sidepanel,mainpanel:c.mainpanel,autosend:c.autosend}}})}if(k){if(v.kind==="loading"||w.status==="loading")return n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex h-full bg-background shadow-edge rounded-[0.75rem]",children:n.jsx(cs,{})})});const E=(N??(w.status==="ready"?T(w.threads):void 0))?.id??(g?m:null);if(E)return n.jsx(ds,{to:".",replace:!0,search:H=>({...H,thread:E})});p(l)}return _.status==="creating"||_.status==="loading"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background shadow-edge rounded-[0.75rem] text-sm text-muted-foreground",children:[n.jsx(Pe,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})}):_.status==="error"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"alert",className:"flex flex-col h-full items-center justify-center gap-2 bg-background shadow-edge rounded-[0.75rem] p-8 text-sm",children:[n.jsx("div",{className:"font-medium",children:t("agentShellLayout.agentShellLayout.taskUnavailable")}),n.jsx("div",{className:"text-muted-foreground",children:_.error.message})]})}):x?n.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:n.jsx(q.Provider,{virtualMcpId:l,task:_.status==="ready"?_.task:null,children:n.jsx(Cs,{layout:M,children:n.jsx(jr,{virtualMcpId:l,hasActiveRepository:g,sandboxMap:x.metadata?.sandboxMap,children:n.jsx(vr,{threadId:A,providerKey:$,children:n.jsx(Ie,{children:n.jsx(kr,{layout:M,onNewTaskRef:O,createNewTask:F})})})})})},l)}):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden shadow-edge rounded-[0.75rem]",children:n.jsx(At,{image:n.jsx(We,{size:48,className:"text-muted-foreground"}),title:t("agentShellLayout.agentShellLayout.agentNotFound"),description:t("agentShellLayout.agentShellLayout.agentNotFoundDescription",{virtualMcpId:l}),actions:n.jsx(qe,{variant:"outline",onClick:()=>e({to:"/$org",params:{org:o}}),children:t("agentShellLayout.agentShellLayout.goToOrgHome")})})})})}function Po(){const t=L.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=je(e);if(s.taskId!==void 0){let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(pr,{}),t[1]=i):i=t[1],i}if(s._splat!==void 0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(bt,{}),t[2]=i):i=t[2],i}let r;return t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Ie,{children:n.jsx(fr,{children:n.jsx(wn,{children:n.jsxs(In,{children:[n.jsx(Tr,{}),n.jsx(xr,{})]})})})}),t[3]=r):r=t[3],r}export{Po as default};
|
|
1
|
+
import{c as L,a4 as ae,a as pe,aq as Ce,K as fe,m as me,b as V,r as D,l as se,j as n,h as Pe,B as qe,aX as ye,aW as Ie,M as pt,C as he,x as Wt,aY as Yt,w as Zt,v as Xt,D as Jt,ab as Qt,aZ as es,ax as xt,t as ts,ay as ss,d as Me,n as st,a_ as ns,f as je,T as nt,ad as as,k as gt,e as rs,u as Ae,a$ as is,b0 as ls,O as bt,b1 as os,b2 as cs,N as ds,b3 as us,P as De}from"./index-Df31jXxo.js";import{i as We}from"./AlertCircle-Cl7lPwXU.js";import{G as fs,H as at,A as ve,I as ms,J as hs,j as ps,K as xs,L as gs,M as bs,N as vt,O as vs,n as ys,k as js,m as Ss}from"./agent-icon-B8D9Gfvd.js";import{c as ks}from"./use-sidebar-collapsed-jUE24mDX.js";import{T as Ne}from"./toolbar-icon-button-DYeJGszf.js";import{C as q,w as Ts}from"./index-BdUExej6.js";import{s as yt,C as Ns,u as _s,V as ws,a as Cs}from"./input-B9AC97ib.js";import{u as Le,b as Ye,c as $e,d as jt,e as Ps,s as Is}from"./chat-context-8d724Biw.js";import{u as St}from"./use-session-runtime-BgpZYJe5.js";import{u as Ms,s as kt}from"./use-ai-providers-Cx5UT-vT.js";import{b as Tt,a as As,u as Ls}from"./use-organization-settings-Dt8SOUZs.js";import{i as $s}from"./CheckCircle-hp3ioCW_.js";import{s as rt}from"./XClose-DxOoWNFF.js";import{a as Fe,b as Fs,c as Nt,g as _t}from"./repository-binding-ChFtIyYh.js";import{I as wt}from"./integration-icon-CX1D_V3Z.js";import{c as Es}from"./use-decopilot-events-BRJljIy6.js";import{t as Ze}from"./ChevronUp-CCD43oX-.js";import{O as Rs}from"./pair-B-_qdC4y.js";import{u as Os,a as Bs}from"./use-thread-outputs-9pOmHwSy.js";import{u as Ds}from"./use-deco-credits-DND4JPOw.js";import{a as zs}from"./experiments-tab-choice-CPEmnQsJ.js";import{g as Ct,u as Gs,n as Hs,a as Ks}from"./use-releases-BH8e0b1y.js";import{u as Vs,d as Pt,a as Xe,b as Je,c as It,e as Us}from"./thread-intent-Bdfd2QLx.js";import{f as qs,c as Mt,d as Ws}from"./use-navigate-to-agent-WZ3sN4Lv.js";import{o as Ys,s as Zs,u as Xs,S as Js}from"./sandbox-lifecycle-context-DVjTP20B.js";import{E as At}from"./empty-state-Dk7OA6FI.js";import{t as Qs,m as en,u as tn}from"./use-chat-layout-state-Bj-Wwagx.js";import{C as it}from"./index-D5Vi_4vo.js";import{a as Lt,b as $t,P as Ft}from"./popover-B_I8LDF7.js";import{T as Ee,a as Re,c as Oe}from"./tooltip-C_Y_Rf94.js";import{T as sn,a as nn}from"./toggle-group-Dd6F_mst.js";import{a as Qe,f as an,L as rn,s as ln}from"./shell-layout-x8Rpz59I.js";import{u as Et,a as et,r as on,b as Rt,c as cn,d as dn}from"./thread-route-C3dw8Zzp.js";import{c as un,C as fn,a as mn,b as hn,e as pn,d as xn}from"./command-CE1yLWfJ.js";import{i as Ot}from"./ZoomOut-vrNny0H4.js";import{g as gn,S as bn}from"./task-status-BmXUld3j.js";import{u as vn}from"./use-clock-tick-Coa6KXLi.js";import{a as Bt,u as yn}from"./use-panel-navigate-BTZCdBFp.js";import{u as Dt}from"./use-main-panel-tabs-Bwt-KKWc.js";import{T as _e}from"./tab-icon-glyph-7Mf2iIYQ.js";import{a as jn}from"./UserSquare-i-ypi26L.js";import{b as Sn,c as zt,S as kn,d as Tn}from"./select-BfhHhadQ.js";import{S as Nn}from"./use-sandbox-events-DBlkaRHT.js";import{L as _n}from"./project-apps-6jAsRK71.js";import{L as tt,a as wn}from"./legacy-main-redirect-DFKFdz8r.js";import{u as Cn}from"./use-mobile-jttq61S0.js";import{L as Pn}from"./preview-dialog-CyuTO-Nj.js";import{O as In}from"./markdown-BaA5eol3.js";import{B as lt}from"./blocks-preview-workspace-context-Bd8C8dyy.js";import{p as Mn}from"./virtual-mcp-psEuyUkr.js";import"./Tool01-DSL_ntjS.js";import"./ArrowUp-CCRch_5n.js";import"./ArrowLeft-DHpl6k89.js";import"./LinkBroken01-BgMERPB2.js";import"./ShoppingBag01-C2pyKO9h.js";import"./Building02-CvAuH__b.js";import"./ChevronSelectorVertical-DTyNJuny.js";import"./Copy01-BMaHAxTm.js";import"./CreditCard01-C0q6WjY1.js";import"./DotsVertical-DJmcbJ4K.js";import"./Image01-CKWtV0l9.js";import"./Globe04-BSAiLhce.js";import"./SwitchHorizontal01-C7CobzPb.js";import"./Key01-D2_-kM68.js";import"./Link01-HbY8A4ox.js";import"./Minus-C-AJk_C6.js";import"./Monitor01-B100isce.js";import"./Sun-sC1lwILE.js";import"./Play-B-0E4pTK.js";import"./Plus-imVVIoVd.js";import"./SearchMd-DyPaHuer.js";import"./Trash01-2YmzJ--g.js";import"./Upload01-DICy44Oo.js";import"./Users01-CzRZKRqu.js";import"./sheet-CGAbOd40.js";import"./tool-namespace-BRBiFCQ_.js";import"./drawer-GqwKUn7Z.js";import"./collection-search-C4cRWusY.js";import"./use-mcp-client-Dfp_zv7i.js";import"./auth-C31upNbt.js";import"./use-mcp-prompts-B7r5mSAi.js";import"./usage-stats-Cn2qCRA8.js";import"./form-Bymz6d0n.js";import"./label-C1DxVrJb.js";import"./utils-CVEq3hMx.js";import"./use-copy-D4hLaNAN.js";import"./index-6EA_iA9h.js";import"./checkbox-B6B4GfAg.js";import"./ai-providers-logos-DD3qZ33J.js";import"./feature-paywall-DCw_cj-g.js";import"./plan-ladder-DrHQyVHN.js";import"./icon-button-DNB1B8hy.js";import"./file-type-icon-D7rbXSkW.js";import"./location-V0VwTJTt.js";import"./autosend-Dt99VIFN.js";import"./chat-draft-C5BwFiIm.js";import"./tabs-_e3w7wMl.js";import"./active-indicator-CCMhAsc_.js";import"./use-open-billing-url-B0KVr1q2.js";import"./input-pZWuEflz.js";import"./suggestion-Dv6GPkzt.js";import"./use-org-fs-CpxLC6mJ.js";import"./useInfiniteQuery-DbCJne-X.js";import"./infiniteQueryObserver-QWUcOo9q.js";import"./question-004-sINsf4GQ.js";import"./add-connection-dialog-D0tg1TJV.js";import"./extract-connection-data-CeTNnU_i.js";import"./metadata-D72DunRR.js";import"./connection-1AeUs-hI.js";import"./url-slug-rdmPuytX.js";import"./connection-card-C6tJSG9A.js";import"./connection-slug-CITJ0kGN.js";import"./slugify-CEUa2lfQ.js";import"./textarea-6PmeS9wv.js";import"./use-connection-Dc63mME4.js";import"./schema-CBMv4uZ-.js";import"./connection-form-helpers-BH-331g7.js";import"./authenticate-and-persist-oauth-crIDWJ6N.js";import"./mcp-oauth-DMxGzETt.js";import"./mcp-oauth-DVXIbfq7.js";import"./collection-tabs-a38TB_62.js";import"./badge-DNaCaxWj.js";import"./use-infinite-scroll-Bw1U14jt.js";import"./useSuspenseInfiniteQuery-D8hE82mX.js";import"./use-task-board-events-B63hjUIR.js";import"./task-board-Bwc-6POa.js";import"./schema-Dc9nPV4z.js";import"./watch-sse-pool-BjVibsQB.js";import"./backoff-CrEUbyZT.js";import"./collapsible-3SKHGphM.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DkXlKGsA.js";import"./types-BhYop-72.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./serial-task-queue-CGOeQgpr.js";import"./delay-CnY5UFtP.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resizable-C_RuwlQZ.js";import"./use-project-scope--fGDju-q.js";import"./index-DPRssy9N.js";import"./use-deployment-admin-DU13nGdE.js";import"./admin-fetch-BhTJlAsX.js";import"./project-icon-D9wVAFzd.js";import"./new-project-dialog-C3TUUDBv.js";import"./repository-import-picker-Dqcyo_Vj.js";import"./repository-picker-DWYzqSxW.js";import"./use-debounced-value-C347aQV_.js";import"./required-auth-layout-KHMRM84i.js";import"./use-org-sso-Cq36gzuS.js";import"./index-BsHW3BGu.js";import"./use-mcp-tools-C20OcDyu.js";import"./resolve-tab-icon-L08uJp19.js";import"./use-task-metadata-Dze4qB0D.js";import"./preview-source-BsRLGWUP.js";import"./use-project-native-view-presence-czhv_owV.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-N7Tlds3U.js";import"./site-slug-DebpOoQq.js";import"./index-BdQq_4o_.js";import"./sandbox-url-D3mC8qhT.js";import"./preview-content-BSEpMJ_f.js";import"./file-share-button-B8TNwLwz.js";import"./file-preview-C07bLEQA.js";import"./utils-Bv6P_eDj.js";import"./editor-66i9SBVx.js";function An({isThreadLocked:t,hasCloudProviderKeys:e,sandboxOnlyChats:s,canRunClaudeCode:r}){return t?null:!e&&!(s&&r)?"provider":s&&!r?"claude-code-provider":null}function Ln(){const t=L.c(26),e=Ms(),s=Le(),r=Tt(),i=As("chat_harness_codex"),{org:a}=ae(),{data:o}=pe.useSession(),c=o?.user.id??"",u=Ce(),l=e.some(Fn);let d;t[0]!==a.id||t[1]!==c?(d=fe.claudeSubscription(a.id,c),t[0]=a.id,t[1]=c,t[2]=d):d=t[2];let m;t[3]!==u?(m=()=>u.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=u,t[4]=m):m=t[4];const f=r&&!i&&!l;let h;t[5]!==d||t[6]!==m||t[7]!==f?(h={queryKey:d,queryFn:m,enabled:f},t[5]=d,t[6]=m,t[7]=f,t[8]=h):h=t[8];const j=me(h);let y;t[9]!==a.id?(y=fe.githubCopilot(a.id),t[9]=a.id,t[10]=y):y=t[10];let v;t[11]!==u?(v=()=>u.call("GITHUB_COPILOT_STATUS",{}),t[11]=u,t[12]=v):v=t[12];const x=r&&!i&&!l;let g;t[13]!==y||t[14]!==v||t[15]!==x?(g={queryKey:y,queryFn:v,enabled:x},t[13]=y,t[14]=v,t[15]=x,t[16]=g):g=t[16];const b=me(g);let S;t[17]!==a.id||t[18]!==c?(S=fe.codexSubscription(a.id,c),t[17]=a.id,t[18]=c,t[19]=S):S=t[19];let p;t[20]!==u?(p=()=>u.call("CODEX_SUBSCRIPTION_STATUS",{}),t[20]=u,t[21]=p):p=t[21];const k=r&&i;let T;t[22]!==k||t[23]!==S||t[24]!==p?(T={queryKey:S,queryFn:p,enabled:k},t[22]=k,t[23]=S,t[24]=p,t[25]=T):T=t[25];const N=me(T);return r&&i&&!s?.isThreadLocked?e.some($n)||N.data?.connected!==!1?null:"codex-provider":An({isThreadLocked:s?.isThreadLocked??!1,hasCloudProviderKeys:e.length>0,sandboxOnlyChats:r,canRunClaudeCode:l||j.data?.connected!==!1||b.data?.connected!==!1||!!b.data?.orgShare})}function $n(t){return yt(t.providerId)}function Fn(t){return kt(t.providerId)}function be(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function ze(t){if(!t)return"—";const e=typeof t=="string"?new Date(t):t;return isNaN(e.getTime())?"—":e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function En(t){return t?t.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function Rn(t){const e=L.c(4),{items:s}=t;let r;e[0]!==s?(r=s.map(On),e[0]=s,e[1]=r):r=e[1];let i;return e[2]!==r?(i=n.jsx("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6",children:r}),e[2]=r,e[3]=i):i=e[3],i}function On(t){return n.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.label}),n.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:t.value})]},t.label)}function Bn(t){const e=L.c(33),{userTokens:s,assistantTokens:r,otherTokens:i}=t,a=V(),o=s+r+i,c=o>0?s/o*100:0,u=o>0?r/o*100:0,l=o>0?i/o*100:0;let d;e[0]!==c?(d=c>0&&n.jsx("div",{className:"h-full bg-chart-1",style:{width:`${c}%`}}),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==u?(m=u>0&&n.jsx("div",{className:"h-full bg-chart-2",style:{width:`${u}%`}}),e[2]=u,e[3]=m):m=e[3];let f;e[4]!==l?(f=l>0&&n.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${l}%`}}),e[4]=l,e[5]=f):f=e[5];let h;e[6]!==d||e[7]!==m||e[8]!==f?(h=n.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[d,m,f]}),e[6]=d,e[7]=m,e[8]=f,e[9]=h):h=e[9];let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=j):j=e[10];let y;e[11]!==a||e[12]!==c?(y=a("chat.contextPanel.userPercent",{pct:c.toFixed(1)}),e[11]=a,e[12]=c,e[13]=y):y=e[13];let v;e[14]!==y?(v=n.jsxs("div",{className:"flex items-center gap-1.5",children:[j,n.jsx("span",{className:"text-xs text-muted-foreground",children:y})]}),e[14]=y,e[15]=v):v=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[16]=x):x=e[16];let g;e[17]!==u||e[18]!==a?(g=a("chat.contextPanel.assistantPercent",{pct:u.toFixed(1)}),e[17]=u,e[18]=a,e[19]=g):g=e[19];let b;e[20]!==g?(b=n.jsxs("div",{className:"flex items-center gap-1.5",children:[x,n.jsx("span",{className:"text-xs text-muted-foreground",children:g})]}),e[20]=g,e[21]=b):b=e[21];let S;e[22]!==l||e[23]!==i||e[24]!==a?(S=i>0&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.otherPercent",{pct:l.toFixed(1)})})]}),e[22]=l,e[23]=i,e[24]=a,e[25]=S):S=e[25];let p;e[26]!==b||e[27]!==S||e[28]!==v?(p=n.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[v,b,S]}),e[26]=b,e[27]=S,e[28]=v,e[29]=p):p=e[29];let k;return e[30]!==p||e[31]!==h?(k=n.jsxs("div",{className:"flex flex-col gap-2",children:[h,p]}),e[30]=p,e[31]=h,e[32]=k):k=e[32],k}function Dn(t){const e=L.c(14),{agentId:s,isError:r}=t,i=Fe(s),a=V();let o;e[0]!==i?.title||e[1]!==a?(o=i?.title??a("chat.subtask.subtaskNoun"),e[0]=i?.title,e[1]=a,e[2]=o):o=e[2];const c=o,u=i?.icon??null;let l;e[3]!==u||e[4]!==c?(l=n.jsx(wt,{icon:u,name:c,size:"xs",className:"size-6 rounded-md shrink-0"}),e[3]=u,e[4]=c,e[5]=l):l=e[5];const d=r?"text-destructive":"text-foreground";let m;e[6]!==d?(m=se("shrink-0 font-medium",d),e[6]=d,e[7]=m):m=e[7];let f;e[8]!==c||e[9]!==m?(f=n.jsx("span",{className:m,children:c}),e[8]=c,e[9]=m,e[10]=f):f=e[10];let h;return e[11]!==l||e[12]!==f?(h=n.jsxs(n.Fragment,{children:[l,f]}),e[11]=l,e[12]=f,e[13]=h):h=e[13],h}function zn(t){const e=L.c(12),{isError:s}=t,r=V();let i;e[0]!==r?(i=r("chat.contextPanel.subtask"),e[0]=r,e[1]=i):i=e[1];const a=i;let o;e[2]!==a?(o=n.jsx(wt,{icon:null,name:a,size:"xs",className:"size-6 rounded-md shrink-0"}),e[2]=a,e[3]=o):o=e[3];const c=s?"text-destructive":"text-foreground";let u;e[4]!==c?(u=se("shrink-0 font-medium",c),e[4]=c,e[5]=u):u=e[5];let l;e[6]!==a||e[7]!==u?(l=n.jsx("span",{className:u,children:a}),e[6]=a,e[7]=u,e[8]=l):l=e[8];let d;return e[9]!==o||e[10]!==l?(d=n.jsxs(n.Fragment,{children:[o,l]}),e[9]=o,e[10]=l,e[11]=d):d=e[11],d}function Gn(t){const e=L.c(18),{part:s}=t,r=s.input?.agent_id,i=s.state==="input-streaming"||s.state==="input-available"||s.state==="output-available"&&s.preliminary===!0,a=s.state==="output-error",o=s.state==="approval-requested";let c;e[0]!==a?(c=n.jsx(zn,{isError:a}),e[0]=a,e[1]=c):c=e[1];let u;e[2]!==r||e[3]!==a?(u=n.jsx(Dn,{agentId:r,isError:a}),e[2]=r,e[3]=a,e[4]=u):u=e[4];let l;e[5]!==c||e[6]!==u?(l=n.jsx(D.Suspense,{fallback:c,children:u}),e[5]=c,e[6]=u,e[7]=l):l=e[7];let d;e[8]!==s.input?(d=s.input?.prompt&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted-foreground/50",children:"·"}),n.jsx("span",{className:"truncate text-muted-foreground",children:s.input.prompt})]}),e[8]=s.input,e[9]=d):d=e[9];let m;e[10]!==o||e[11]!==a||e[12]!==i?(m=n.jsx("span",{className:"ml-auto shrink-0",children:i?n.jsx(Pe,{className:"size-3 text-muted-foreground"}):a?n.jsx(fs,{size:12,className:"text-destructive"}):o?n.jsx(We,{size:12,className:"text-warning"}):n.jsx($s,{size:12,className:"text-success"})}),e[10]=o,e[11]=a,e[12]=i,e[13]=m):m=e[13];let f;return e[14]!==l||e[15]!==d||e[16]!==m?(f=n.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[l,d,m]}),e[14]=l,e[15]=d,e[16]=m,e[17]=f):f=e[17],f}function Hn(t){const e=L.c(51),{onClose:s,back:r,className:i}=t,a=V(),[o,c]=D.useState(null),{messages:u}=Ye(),{activeTask:l}=$e(),{selectedModel:d,selectedVirtualMcp:m}=jt(),f=Ps(u),h=[...u].reverse().find(ta),j=h?.metadata?.usage,y=[...u].reverse().find(ea)?.metadata?.models?.thinking,v=h?.metadata?.modelLimits?.contextWindow??(!y||y.id===d?.modelId?d?.limits?.contextWindow:null)??null,x=j?.contextTokens??0,g=v&&v>0?(x/v*100).toFixed(1):null,b=u;let S;e[0]!==b?(S=b.filter(Qn).reduce(Jn,0),e[0]=b,e[1]=S):S=e[1];const p=S,k=u;let T;e[2]!==k?(T=k.filter(Xn).reduce(Zn,0),e[2]=k,e[3]=T):T=e[3];const N=T,w=Math.max(0,f.totalTokens-p-N),_=u[0],P=u.at(-1),C=_?.metadata?.created_at??l?.created_at,M=P?.metadata?.created_at??l?.updated_at,A=u.filter(Yn),$=u.flatMap(qn),F=En(y?.id??d?.modelId),O=m?.title??"Super Agent",R=Es(),I=[{label:a("chat.contextPanel.sessionLabel"),value:l?.title??a("chat.contextPanel.newChat")},{label:a("chat.contextPanel.messagesLabel"),value:A.length},{label:a("chat.contextPanel.agentLabel"),value:O},...R?[{label:a("chat.contextPanel.modelLabel"),value:F}]:[],{label:a("chat.contextPanel.contextLimitLabel"),value:v?be(v):"—"},{label:a("chat.contextPanel.sessionTokensLabel"),value:f.totalTokens>0?be(f.totalTokens):"0"},{label:a("chat.contextPanel.usageLabel"),value:g!==null?`${g}%`:"—"},{label:a("chat.contextPanel.inputTokensLabel"),value:f.inputTokens>0?be(f.inputTokens):"0"},{label:a("chat.contextPanel.outputTokensLabel"),value:f.outputTokens>0?be(f.outputTokens):"0"},{label:a("chat.contextPanel.reasoningTokensLabel"),value:f.reasoningTokens>0?be(f.reasoningTokens):"0"},...R?[{label:a("chat.contextPanel.costLabel"),value:f.cost>0?`$${f.cost<.001?f.cost.toFixed(6):f.cost.toFixed(4)}`:"$0.00"}]:[],{label:a("chat.contextPanel.sessionCreatedLabel"),value:ze(C)},{label:a("chat.contextPanel.lastActivityLabel"),value:ze(M)}];if(!l&&A.length===0){let G;e[4]!==i?(G=se("flex flex-col h-full w-full border-l border-border bg-background",i),e[4]=i,e[5]=G):G=e[5];let re;e[6]!==a?(re=a("chat.contextPanel.title"),e[6]=a,e[7]=re):re=e[7];let J;e[8]!==re?(J=n.jsx("span",{className:"text-sm font-medium text-foreground",children:re}),e[8]=re,e[9]=J):J=e[9];let Q;e[10]!==r?(Q=r?n.jsx(at,{size:14,className:"text-muted-foreground"}):n.jsx(rt,{size:14,className:"text-muted-foreground"}),e[10]=r,e[11]=Q):Q=e[11];let ee;e[12]!==s||e[13]!==Q?(ee=n.jsx("button",{type:"button",onClick:s,className:"flex size-6 items-center justify-center hover:bg-accent transition-colors rounded-lg",children:Q}),e[12]=s,e[13]=Q,e[14]=ee):ee=e[14];let ne;e[15]!==J||e[16]!==ee?(ne=n.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[J,ee]}),e[15]=J,e[16]=ee,e[17]=ne):ne=e[17];let ie;e[18]!==a?(ie=a("chat.contextPanel.emptyState"),e[18]=a,e[19]=ie):ie=e[19];let te;e[20]!==ie?(te=n.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:n.jsx("p",{className:"text-xs text-muted-foreground",children:ie})}),e[20]=ie,e[21]=te):te=e[21];let oe;return e[22]!==ne||e[23]!==te||e[24]!==G?(oe=n.jsxs("div",{className:G,children:[ne,te]}),e[22]=ne,e[23]=te,e[24]=G,e[25]=oe):oe=e[25],oe}let z;e[26]!==i?(z=se("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",i),e[26]=i,e[27]=z):z=e[27];let E;e[28]!==a?(E=a("chat.contextPanel.title"),e[28]=a,e[29]=E):E=e[29];let H;e[30]!==E?(H=n.jsx("span",{className:"text-sm font-medium text-foreground",children:E}),e[30]=E,e[31]=H):H=e[31];let B;e[32]!==r?(B=r?n.jsx(at,{className:"size-3.5"}):n.jsx(rt,{className:"size-3.5"}),e[32]=r,e[33]=B):B=e[33];let U;e[34]!==s||e[35]!==B?(U=n.jsx(qe,{type:"button",variant:"ghost",size:"icon-sm",onClick:s,className:"text-muted-foreground",children:B}),e[34]=s,e[35]=B,e[36]=U):U=e[36];let Z;e[37]!==H||e[38]!==U?(Z=n.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[H,U]}),e[37]=H,e[38]=U,e[39]=Z):Z=e[39];let Y;e[40]!==a?(Y=a("chat.contextPanel.contextBreakdownSection"),e[40]=a,e[41]=Y):Y=e[41];let X;e[42]!==Y?(X=n.jsx("span",{className:"text-xs text-muted-foreground",children:Y}),e[42]=Y,e[43]=X):X=e[43];let W;e[44]!==N||e[45]!==w||e[46]!==p?(W=n.jsx(Bn,{userTokens:p,assistantTokens:N,otherTokens:w}),e[44]=N,e[45]=w,e[46]=p,e[47]=W):W=e[47];let le;return e[48]!==X||e[49]!==W?(le=n.jsxs("div",{className:"flex flex-col gap-3",children:[X,W]}),e[48]=X,e[49]=W,e[50]=le):le=e[50],n.jsxs("div",{className:z,children:[Z,n.jsxs("div",{className:"flex flex-col gap-8 p-6",children:[$.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.subtasksSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:$.map(Un)})]}),n.jsx(Rn,{items:I}),le,A.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.rawMessagesSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:A.map(G=>{const re=G.metadata?.created_at,J=o?.id===G.id;return n.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[n.jsxs("button",{type:"button",onClick:()=>c(J?null:G),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent w-full text-left cursor-pointer",children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[n.jsx("span",{className:se("shrink-0 font-medium",G.role==="user"?"text-chart-1":"text-chart-2"),children:G.role}),n.jsx("span",{className:"text-muted-foreground",children:"•"}),n.jsx("span",{className:"truncate text-muted-foreground font-mono",children:G.id})]}),re&&n.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:ze(re)})]}),J&&n.jsxs(n.Fragment,{children:[G.role==="assistant"&&(()=>{const Q=G.metadata?._request;if(!Q)return null;const ee=Q.systemSections??[],ne=Math.max(1,...ee.map(Vn)),ie=ee.reduce(Kn,0);return n.jsxs("div",{className:"border-t border-border/50 px-3 py-2.5 text-xs space-y-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"font-medium text-foreground",children:a("chat.contextPanel.requestLabel")}),n.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[Q.activeTools??0," / ",Q.tools??0," ",a("chat.contextPanel.toolsActive")]})]}),ee.length>0&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("div",{className:"text-muted-foreground",children:[a("chat.contextPanel.systemPromptLabel")," ",n.jsxs("span",{className:"tabular-nums",children:["~",Math.round(ie/4).toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),ee.map((te,oe)=>{const ce=te.preview.match(/^<([a-z-]+)/i)?.[1]??`section ${oe}`,xe=te.chars/ne*100,de=Math.round(te.chars/4);return n.jsxs("div",{className:"space-y-0.5",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("span",{className:"font-mono text-foreground truncate",children:ce}),n.jsxs("span",{className:"text-muted-foreground tabular-nums shrink-0",children:["~",de.toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),n.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-chart-3",style:{width:`${xe}%`}})})]},oe)})]})]})})(),n.jsx("pre",{className:"text-xs font-mono bg-muted px-3 py-2 overflow-auto whitespace-pre-wrap break-all border-t border-border/50 max-h-64",children:JSON.stringify(G,null,2)})]})]},G.id)})})]})]})]})}function Kn(t,e){return t+e.chars}function Vn(t){return t.chars}function Un(t,e){return n.jsx(Gn,{part:t},e)}function qn(t){return(t.parts??[]).filter(Wn)}function Wn(t){return t.type==="tool-subtask"}function Yn(t){return t.role!=="system"}function Zn(t,e){const s=e.metadata?.usage;return t+(s?.outputTokens??0)}function Xn(t){return t.role==="assistant"}function Jn(t,e){const s=e.metadata?.usage;return t+(s?.inputTokens??0)}function Qn(t){return t.role==="user"}function ea(t){return t.role==="assistant"&&t.metadata?.models}function ta(t){return t.role==="assistant"&&t.metadata?.usage}function sa(t){const e=L.c(21),{onOpenContextPanel:s}=t,{org:r}=ae(),{selectedVirtualMcp:i}=jt();let a;e[0]!==r.id?(a=ye(r.id),e[0]=r.id,e[1]=a):a=e[1];const c=i??a,l=Fe(c.id)??c,d=l.title??"Super Agent",m=l.icon??null,f=l.description??null;let h;e[2]!==m||e[3]!==d?(h=n.jsx(ve,{icon:m,name:d,size:"lg"}),e[2]=m,e[3]=d,e[4]=h):h=e[4];let j;e[5]!==d?(j=n.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-foreground",children:d}),e[5]=d,e[6]=j):j=e[6];let y;e[7]!==f?(y=f?n.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-balance",children:f}):null,e[7]=f,e[8]=y):y=e[8];let v;e[9]!==j||e[10]!==y?(v=n.jsxs("div",{className:"space-y-1.5",children:[j,y]}),e[9]=j,e[10]=y,e[11]=v):v=e[11];let x;e[12]!==h||e[13]!==v?(x=n.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center gap-4 px-6 text-center overflow-hidden",children:[h,v]}),e[12]=h,e[13]=v,e[14]=x):x=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(q.IceBreakers,{className:"pb-3"}),e[15]=g):g=e[15];let b;e[16]!==s?(b=n.jsxs(q.Footer,{children:[g,n.jsx(q.Input,{onOpenContextPanel:s})]}),e[16]=s,e[17]=b):b=e[17];let S;return e[18]!==x||e[19]!==b?(S=n.jsxs(n.Fragment,{children:[x,b]}),e[18]=x,e[19]=b,e[20]=S):S=e[20],S}function ot(t){const e=L.c(17),{outputs:s,collapsed:r,onToggle:i,variant:a}=t,o=a==="card"?"rounded-xl bg-muted/95 shadow-edge backdrop-blur-sm":"border-b border-border bg-background";let c;e[0]!==o?(c=se(o),e[0]=o,e[1]=c):c=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("span",{className:"text-sm font-medium text-foreground",children:"Files in this task"}),e[2]=u):u=e[2];const l=r&&"-rotate-90";let d;e[3]!==l?(d=se("size-4 text-muted-foreground transition-transform",l),e[3]=l,e[4]=d):d=e[4];let m;e[5]!==d?(m=n.jsx(Ze,{className:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==m?(f=n.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between px-3 py-2.5 text-left",children:[u,m]}),e[7]=i,e[8]=m,e[9]=f):f=e[9];let h;e[10]!==r||e[11]!==s?(h=!r&&n.jsx("div",{className:"flex max-h-72 flex-col gap-1.5 overflow-y-auto px-2 pb-2",children:s.map(na)}),e[10]=r,e[11]=s,e[12]=h):h=e[12];let j;return e[13]!==c||e[14]!==f||e[15]!==h?(j=n.jsxs("div",{className:c,children:[f,h]}),e[13]=c,e[14]=f,e[15]=h,e[16]=j):j=e[16],j}function na(t){return n.jsx(Rs,{file:t},t.key)}function aa(){const t=L.c(13),e=Le()?.taskId??null,s=Os();let r;t[0]!==s?(r={enabled:s},t[0]=s,t[1]=r):r=t[1];const{data:i}=Bs(e,r),[a,o]=D.useState(!1),[c,u]=D.useState(!0);if(!e||!i||i.length===0)return null;let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>o(ia),t[2]=l):l=t[2];let d;t[3]!==a||t[4]!==i?(d=n.jsx("div",{className:"absolute top-2 right-2 z-10 hidden w-72 @[1280px]:block",children:n.jsx(ot,{variant:"card",outputs:i,collapsed:a,onToggle:l})}),t[3]=a,t[4]=i,t[5]=d):d=t[5];let m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=()=>u(ra),t[6]=m):m=t[6];let f;t[7]!==c||t[8]!==i?(f=n.jsx("div",{className:"shrink-0 @[1280px]:hidden",children:n.jsx(ot,{variant:"bar",outputs:i,collapsed:c,onToggle:m})}),t[7]=c,t[8]=i,t[9]=f):f=t[9];let h;return t[10]!==d||t[11]!==f?(h=n.jsxs(n.Fragment,{children:[d,f]}),t[10]=d,t[11]=f,t[12]=h):h=t[12],h}function ra(t){return!t}function ia(t){return!t}function la(){const t=L.c(1);D.use(Ye().ready);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Ns,{children:n.jsx(oa,{})}),t[0]=e):e=t[0],e}function oa(){const t=L.c(29),{active:e}=_s(),{org:s}=ae(),r=Le(),{isChatEmpty:i}=Ye(),[a,o]=D.useState("chat"),c=Ds(),u=V(),l=Ln(),{runtime:d}=St(r?.virtualMcpId);if(l!==null&&d!=="cms"){let N;return t[0]!==l||t[1]!==u?(N=n.jsx(q,{className:"animate-in fade-in-0 duration-200",children:n.jsx(q.Main,{className:"flex flex-col items-center",children:n.jsx(q.EmptyState,{children:l==="codex-provider"?n.jsx(q.NoAiProviderEmptyState,{title:u("settings.codexSubscription.setupHeading"),description:u("settings.codexSubscription.setupDescription"),providerFilter:yt}):l==="claude-code-provider"?n.jsx(q.NoAiProviderEmptyState,{title:u("chat.noAiProviderEmptyState.supportedHeading"),description:u("chat.noAiProviderEmptyState.supportedSubtitle"),providerFilter:kt}):n.jsx(q.NoAiProviderEmptyState,{})})})}),t[0]=l,t[1]=u,t[2]=N):N=t[2],N}let f;t[3]!==c.hasDecoKey||t[4]!==c.hasOnlyDecoProvider||t[5]!==c.isLoading||t[6]!==c.isZeroBalance||t[7]!==i||t[8]!==s?(f=c.hasDecoKey&&c.isZeroBalance&&c.hasOnlyDecoProvider&&!c.isLoading&&i&&!Ts(s.id),t[3]=c.hasDecoKey,t[4]=c.hasOnlyDecoProvider,t[5]=c.isLoading,t[6]=c.isZeroBalance,t[7]=i,t[8]=s,t[9]=f):f=t[9];const h=f;let j;t[10]!==h?(j=h&&n.jsx(q.CreditsEmptyState,{}),t[10]=h,t[11]=j):j=t[11];let y;t[12]!==a||t[13]!==i||t[14]!==d||t[15]!==e?(y=!e&&n.jsx("div",{inert:a!=="chat"?!0:void 0,"aria-hidden":a!=="chat",className:se("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",a!=="chat"?"opacity-0 pointer-events-none":"opacity-100"),children:i&&d!=="cms"?n.jsx(sa,{onOpenContextPanel:()=>o("context")}):n.jsxs(n.Fragment,{children:[n.jsxs(q.Main,{className:"relative flex flex-col overflow-hidden @container",children:[n.jsx(aa,{}),n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(q.Messages,{})})]}),n.jsx(q.Footer,{children:n.jsx(q.Input,{onOpenContextPanel:()=>o("context")})})]})}),t[12]=a,t[13]=i,t[14]=d,t[15]=e,t[16]=y):y=t[16];let v;t[17]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(ws,{}),t[17]=v):v=t[17];const x=a!=="context"?!0:void 0,g=a!=="context",b=a==="context"?"opacity-100":"opacity-0 pointer-events-none";let S;t[18]!==b?(S=se("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",b),t[18]=b,t[19]=S):S=t[19];let p;t[20]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(Hn,{back:!0,onClose:()=>o("chat")}),t[20]=p):p=t[20];let k;t[21]!==x||t[22]!==g||t[23]!==S?(k=n.jsx("div",{inert:x,"aria-hidden":g,className:S,children:p}),t[21]=x,t[22]=g,t[23]=S,t[24]=k):k=t[24];let T;return t[25]!==j||t[26]!==y||t[27]!==k?(T=n.jsxs(q,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[j,y,v,k]}),t[25]=j,t[26]=y,t[27]=k,t[28]=T):T=t[28],T}function ca(){const t=L.c(7),e=V();let s;t[0]!==e?(s=e("agentShellLayout.agentShellLayout.chatLoadingError"),t[0]=e,t[1]=s):s=t[1];let r;t[2]!==s?(r=n.jsx("div",{role:"alert",className:"flex h-full flex-1 items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Ie,{children:n.jsx(la,{})}),t[4]=i):i=t[4];let a;return t[5]!==r?(a=n.jsx(pt,{fallback:r,children:i}),t[5]=r,t[6]=a):a=t[6],a}function da(t){const e=L.c(10),{org:s}=ae(),r=Vs(),{data:i}=pe.useSession(),a=i?.user?.id,o=t?.id??null,c=!!t&&!!a&&!!t.created_by&&t.created_by!==a;let u;e[0]!==s.id||e[1]!==o?(u=fe.viewedThreadMetadataRefresh(s.id,o??""),e[0]=s.id,e[1]=o,e[2]=u):u=e[2];const l=!!r&&!!o&&c;let d;e[3]!==r||e[4]!==o?(d=async()=>(await r?.refreshThreadMetadata(o??""),!0),e[3]=r,e[4]=o,e[5]=d):d=e[5];let m;e[6]!==u||e[7]!==l||e[8]!==d?(m={queryKey:u,enabled:l,staleTime:Number.POSITIVE_INFINITY,queryFn:d},e[6]=u,e[7]=l,e[8]=d,e[9]=m):m=e[9],me(m)}function Ge(t){const e=L.c(14),{label:s,value:r,onChange:i,options:a}=t;let o;e[0]!==s?(o=n.jsx("span",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=o):o=e[1];let c;e[2]!==i?(c=m=>m&&i(m),e[2]=i,e[3]=c):c=e[3];let u;e[4]!==a?(u=a.map(ua),e[4]=a,e[5]=u):u=e[5];let l;e[6]!==s||e[7]!==c||e[8]!==u||e[9]!==r?(l=n.jsx(nn,{type:"single",size:"sm",value:r,onValueChange:c,"aria-label":s,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:u}),e[6]=s,e[7]=c,e[8]=u,e[9]=r,e[10]=l):l=e[10];let d;return e[11]!==o||e[12]!==l?(d=n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,l]}),e[11]=o,e[12]=l,e[13]=d):d=e[13],d}function ua(t){return n.jsxs(sn,{value:t.value,className:"h-6 gap-1.5 rounded-lg px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:bg-card data-[state=on]:text-foreground data-[state=on]:shadow-edge",children:[t.icon,t.label]},t.value)}function fa(t){const e=L.c(91),{panel:s,className:r}=t,i=r===void 0?"md:size-[34px]":r,a=V();let o;e[0]!==a?(o=a("sidebar.taskGroupsList.filterChats"),e[0]=a,e[1]=o):o=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(ms,{size:16}),e[2]=c):c=e[2];let u;e[3]!==s.filtersActive?(u=s.filtersActive&&n.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[3]=s.filtersActive,e[4]=u):u=e[4];let l;e[5]!==i||e[6]!==s.filtersActive||e[7]!==o||e[8]!==u?(l=n.jsx(Ee,{asChild:!0,children:n.jsx(Lt,{asChild:!0,children:n.jsxs(Ne,{"aria-label":o,active:s.filtersActive,className:i,children:[c,u]})})}),e[5]=i,e[6]=s.filtersActive,e[7]=o,e[8]=u,e[9]=l):l=e[9];let d;e[10]!==a?(d=a("sidebar.taskGroupsList.filterChats"),e[10]=a,e[11]=d):d=e[11];let m;e[12]!==d?(m=n.jsx(Re,{side:"bottom",children:d}),e[12]=d,e[13]=m):m=e[13];let f;e[14]!==l||e[15]!==m?(f=n.jsxs(Oe,{children:[l,m]}),e[14]=l,e[15]=m,e[16]=f):f=e[16];let h;e[17]!==a?(h=a("sidebar.taskGroupsList.filterView"),e[17]=a,e[18]=h):h=e[18];const j=s.groupBy;let y;e[19]!==s?(y=G=>{he("tasks_panel_group_by_changed",{to_value:G}),s.setGroupBy(G)},e[19]=s,e[20]=y):y=e[20];let v;e[21]!==a?(v=a("sidebar.taskGroupsList.viewList"),e[21]=a,e[22]=v):v=e[22];let x;e[23]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(hs,{size:13}),e[23]=x):x=e[23];let g;e[24]!==v?(g={value:"flat",label:v,icon:x},e[24]=v,e[25]=g):g=e[25];let b;e[26]!==a?(b=a("sidebar.taskGroupsList.viewStatus"),e[26]=a,e[27]=b):b=e[27];let S;e[28]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(ps,{size:13}),e[28]=S):S=e[28];let p;e[29]!==b?(p={value:"status",label:b,icon:S},e[29]=b,e[30]=p):p=e[30];let k;e[31]!==g||e[32]!==p?(k=[g,p],e[31]=g,e[32]=p,e[33]=k):k=e[33];let T;e[34]!==s.groupBy||e[35]!==y||e[36]!==k||e[37]!==h?(T=n.jsx(Ge,{label:h,value:j,onChange:y,options:k}),e[34]=s.groupBy,e[35]=y,e[36]=k,e[37]=h,e[38]=T):T=e[38];let N;e[39]!==a?(N=a("sidebar.taskGroupsList.filterType"),e[39]=a,e[40]=N):N=e[40];const w=s.typeFilter;let _;e[41]!==s?(_=G=>{he("tasks_panel_filter_changed",{to_value:G}),s.setTypeFilter(G)},e[41]=s,e[42]=_):_=e[42];let P;e[43]!==a?(P=a("sidebar.taskGroupsList.typeAll"),e[43]=a,e[44]=P):P=e[44];let C;e[45]!==P?(C={value:"all",label:P},e[45]=P,e[46]=C):C=e[46];let M;e[47]!==a?(M=a("sidebar.taskGroupsList.typeChats"),e[47]=a,e[48]=M):M=e[48];let A;e[49]!==M?(A={value:"manual",label:M},e[49]=M,e[50]=A):A=e[50];let $;e[51]!==a?($=a("sidebar.taskGroupsList.typeAuto"),e[51]=a,e[52]=$):$=e[52];let F;e[53]!==$?(F={value:"automation",label:$},e[53]=$,e[54]=F):F=e[54];let O;e[55]!==C||e[56]!==A||e[57]!==F?(O=[C,A,F],e[55]=C,e[56]=A,e[57]=F,e[58]=O):O=e[58];let R;e[59]!==s.typeFilter||e[60]!==N||e[61]!==_||e[62]!==O?(R=n.jsx(Ge,{label:N,value:w,onChange:_,options:O}),e[59]=s.typeFilter,e[60]=N,e[61]=_,e[62]=O,e[63]=R):R=e[63];let I;e[64]!==a?(I=a("sidebar.taskGroupsList.filterScope"),e[64]=a,e[65]=I):I=e[65];const z=s.showAll?"team":"mine";let E;e[66]!==s?(E=G=>s.setShowAll(G==="team"),e[66]=s,e[67]=E):E=e[67];let H;e[68]!==a?(H=a("sidebar.taskGroupsList.scopeMine"),e[68]=a,e[69]=H):H=e[69];let B;e[70]!==H?(B={value:"mine",label:H},e[70]=H,e[71]=B):B=e[71];let U;e[72]!==a?(U=a("sidebar.taskGroupsList.scopeTeam"),e[72]=a,e[73]=U):U=e[73];let Z;e[74]!==U?(Z={value:"team",label:U},e[74]=U,e[75]=Z):Z=e[75];let Y;e[76]!==B||e[77]!==Z?(Y=[B,Z],e[76]=B,e[77]=Z,e[78]=Y):Y=e[78];let X;e[79]!==I||e[80]!==z||e[81]!==E||e[82]!==Y?(X=n.jsx(Ge,{label:I,value:z,onChange:E,options:Y}),e[79]=I,e[80]=z,e[81]=E,e[82]=Y,e[83]=X):X=e[83];let W;e[84]!==T||e[85]!==R||e[86]!==X?(W=n.jsxs($t,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[T,R,X]}),e[84]=T,e[85]=R,e[86]=X,e[87]=W):W=e[87];let le;return e[88]!==W||e[89]!==f?(le=n.jsxs(Ft,{children:[f,W]}),e[88]=W,e[89]=f,e[90]=le):le=e[90],le}function ma(t,e){return t.filter(s=>s.id===e||!!s.trigger_id||Qs(s))}function ha(){const t=L.c(2),e=Fs()??[];let s;return t[0]!==e?(s=r=>{if(!r)return;const i=e.find(a=>a.id===r);return i?Pt(i.metadata):void 0},t[0]=e,t[1]=s):s=t[1],s}function pa(t){const e=L.c(9),{virtualMcpId:s,size:r,showAutomationBadge:i}=t,a=r===void 0?"sm":r,o=V();let c;e[0]!==a||e[1]!==s?(c=s?n.jsx(xa,{virtualMcpId:s,size:a}):n.jsx(ve,{icon:null,name:"?",size:a}),e[0]=a,e[1]=s,e[2]=c):c=e[2];let u;e[3]!==i||e[4]!==o?(u=i&&n.jsx("span",{"aria-label":o("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-special border border-special text-special-foreground",children:n.jsx(Ot,{size:10,className:"text-white"})}),e[3]=i,e[4]=o,e[5]=u):u=e[5];let l;return e[6]!==c||e[7]!==u?(l=n.jsxs("div",{className:"relative shrink-0",children:[c,u]}),e[6]=c,e[7]=u,e[8]=l):l=e[8],l}function xa(t){const e=L.c(6),{virtualMcpId:s,size:r}=t,i=Nt(s);if(!i){let c;return e[0]!==r?(c=n.jsx(ve,{icon:null,name:"?",size:r}),e[0]=r,e[1]=c):c=e[1],c}const a=i.icon??null;let o;return e[2]!==i.title||e[3]!==r||e[4]!==a?(o=n.jsx(ve,{icon:a,name:i.title,size:r}),e[2]=i.title,e[3]=r,e[4]=a,e[5]=o):o=e[5],o}const ct=["thread"];function ga(t){const e=L.c(53),{open:s,onOpenChange:r}=t,[i,a]=D.useState(""),{org:o}=ae(),{setTaskId:c}=Qe(),u=Ce(),l=V();let d,m,f,h;e[0]!==o.id||e[1]!==i?(h=i.trim(),d=h?20:10,f=me,m=fe.globalSearch(o.id,h,d,ct),e[0]=o.id,e[1]=i,e[2]=d,e[3]=m,e[4]=f,e[5]=h):(d=e[2],m=e[3],f=e[4],h=e[5]);let j;e[6]!==d||e[7]!==u||e[8]!==h?(j=async()=>{const I=await u.call("GLOBAL_SEARCH",{query:h,limit:d,types:[...ct]});return{...I,items:I.items.filter(ba)}},e[6]=d,e[7]=u,e[8]=h,e[9]=j):j=e[9];let y;e[10]!==s||e[11]!==m||e[12]!==j?(y={queryKey:m,enabled:s,queryFn:j,staleTime:1e4},e[10]=s,e[11]=m,e[12]=j,e[13]=y):y=e[13];const{data:v,isFetching:x}=f(y);let g;e[14]!==v?.items?(g=v?.items??[],e[14]=v?.items,e[15]=g):g=e[15];const b=g;let S;e[16]!==r?(S=I=>{I||a(""),r(I)},e[16]=r,e[17]=S):S=e[17];const p=S;let k;e[18]!==p||e[19]!==c?(k=I=>{p(!1),c(I.id,I.virtual_mcp_id??void 0)},e[18]=p,e[19]=c,e[20]=k):k=e[20];const T=k;let N;e[21]!==l?(N=l("tasksPanel.globalSearchDialog.title"),e[21]=l,e[22]=N):N=e[22];let w;e[23]!==N?(w=n.jsx(Wt,{children:N}),e[23]=N,e[24]=w):w=e[24];let _;e[25]!==l?(_=l("tasksPanel.globalSearchDialog.description"),e[25]=l,e[26]=_):_=e[26];let P;e[27]!==_?(P=n.jsx(Yt,{children:_}),e[27]=_,e[28]=P):P=e[28];let C;e[29]!==P||e[30]!==w?(C=n.jsxs(Zt,{className:"sr-only",children:[w,P]}),e[29]=P,e[30]=w,e[31]=C):C=e[31];let M;e[32]!==l?(M=l("tasksPanel.globalSearchDialog.placeholder"),e[32]=l,e[33]=M):M=e[33];let A;e[34]!==i||e[35]!==M?(A=n.jsx(pn,{value:i,onValueChange:a,placeholder:M}),e[34]=i,e[35]=M,e[36]=A):A=e[36];let $;e[37]!==T||e[38]!==x||e[39]!==b||e[40]!==l||e[41]!==h?($=n.jsx(un,{children:x&&b.length===0?n.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l("tasksPanel.globalSearchDialog.searching")}):b.length===0?n.jsx(fn,{children:l("tasksPanel.globalSearchDialog.noResults")}):n.jsx(mn,{heading:h?void 0:l("tasksPanel.globalSearchDialog.recent"),children:b.map(I=>I.type==="thread"?n.jsxs(hn,{value:`thread:${I.id}:${I.title}`,onSelect:()=>T(I),className:"gap-2.5",children:[n.jsx(pa,{virtualMcpId:I.virtual_mcp_id,size:"xs"}),n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx("div",{className:"text-sm text-foreground truncate",children:I.title||l("tasksPanel.globalSearchDialog.untitledChat")})}),n.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(I.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${I.id}`):null)})}),e[37]=T,e[38]=x,e[39]=b,e[40]=l,e[41]=h,e[42]=$):$=e[42];let F;e[43]!==A||e[44]!==$?(F=n.jsxs(xn,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[A,$]}),e[43]=A,e[44]=$,e[45]=F):F=e[45];let O;e[46]!==C||e[47]!==F?(O=n.jsxs(Xt,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[C,F]}),e[46]=C,e[47]=F,e[48]=O):O=e[48];let R;return e[49]!==p||e[50]!==s||e[51]!==O?(R=n.jsx(Jt,{open:s,onOpenChange:p,children:O}),e[49]=p,e[50]=s,e[51]=O,e[52]=R):R=e[52],R}function ba(t){return t.type==="thread"}function va(t,e,s){if(!s)return;const r=t.findIndex(i=>i.id===e);if(r!==-1){for(let i=r+1;i<t.length;i++){const a=t[i];if(a?.created_by===s)return a}for(let i=r-1;i>=0;i--){const a=t[i];if(a?.created_by===s)return a}}}function ya(t){return t==="ephemeral"||t.startsWith("thread:")}function Gt(t){const e=L.c(45),{task:s,isActive:r,onClick:i,onArchive:a,showAutomationBadge:o,showAgentIcon:c,hideStatusIdle:u,indented:l}=t,d=V(),m=gn(s.status),f=m.icon,h=s.metadata?.kind==="tool_call_run",j=Nt(h?void 0:s.virtual_mcp_id);let y;e[0]!==j?(y=_t(j),e[0]=j,e[1]=y):y=e[1];const v=y;vn(6e4);const x=o||!!s.trigger_id,g=s.id,b="button",S=0;let p;e[2]!==i?(p=E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),i())},e[2]=i,e[3]=p):p=e[3];const k=l?"-ml-4 pl-6":"pl-[9px]",T=r?"bg-accent text-accent-foreground":"hover:bg-accent";let N;e[4]!==k||e[5]!==T?(N=se("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",k,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",T),e[4]=k,e[5]=T,e[6]=N):N=e[6];let w;e[7]!==h||e[8]!==c||e[9]!==j?.icon||e[10]!==j?.title?(w=c&&!h&&n.jsx(ve,{icon:j?.icon??null,name:j?.title??"?",size:"2xs"}),e[7]=h,e[8]=c,e[9]=j?.icon,e[10]=j?.title,e[11]=w):w=e[11];let _;e[12]!==x||e[13]!==d?(_=x&&n.jsx(Ot,{size:12,"aria-label":d("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-special"}),e[12]=x,e[13]=d,e[14]=_):_=e[14];let P;e[15]!==d||e[16]!==s.title?(P=s.title||d("tasksPanel.taskRow.untitledTask"),e[15]=d,e[16]=s.title,e[17]=P):P=e[17];let C;e[18]!==P?(C=n.jsx("div",{className:"text-sm text-foreground truncate",children:P}),e[18]=P,e[19]=C):C=e[19];let M;e[20]!==_||e[21]!==C?(M=n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[_,C]}),e[20]=_,e[21]=C,e[22]=M):M=e[22];let A;e[23]!==r||e[24]!==v||e[25]!==s.branch||e[26]!==s.updated_at?(A=s.updated_at&&n.jsxs("div",{className:se("flex items-center gap-1 text-2xs min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[s.branch&&!ya(s.branch)?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"truncate font-mono",children:s.branch}),n.jsx("span",{className:"shrink-0",children:"·"})]}):v?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"truncate",children:[v.owner,"/",v.name]}),n.jsx("span",{className:"shrink-0",children:"·"})]}):null,n.jsx("span",{className:"shrink-0",children:Qt(new Date(s.updated_at))})]}),e[23]=r,e[24]=v,e[25]=s.branch,e[26]=s.updated_at,e[27]=A):A=e[27];let $;e[28]!==M||e[29]!==A?($=n.jsxs("div",{className:"flex-1 min-w-0",children:[M,A]}),e[28]=M,e[29]=A,e[30]=$):$=e[30];const F="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",O=!u&&n.jsx("span",{className:se("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",a&&"group-hover/row:opacity-0"),"aria-label":d("tasksPanel.taskRow.statusLabel",{status:d(m.labelKey)}),children:s.status==="in_progress"?n.jsx(Pe,{className:se("size-3.5",m.iconClassName)}):n.jsx(f,{size:14,className:m.iconClassName})});let R;e[31]!==a||e[32]!==d?(R=a&&n.jsxs(Oe,{children:[n.jsx(Ee,{asChild:!0,children:n.jsx(qe,{variant:"ghost",size:"icon","aria-label":d("tasksPanel.taskRow.archiveTask"),onClick:E=>{E.stopPropagation(),a()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto text-muted-foreground",children:n.jsx(es,{className:"size-3.5"})})}),n.jsx(Re,{side:"right",children:d("tasksPanel.taskRow.archive")})]}),e[31]=a,e[32]=d,e[33]=R):R=e[33];let I;e[34]!==O||e[35]!==R?(I=n.jsxs("div",{className:F,children:[O,R]}),e[34]=O,e[35]=R,e[36]=I):I=e[36];let z;return e[37]!==i||e[38]!==$||e[39]!==I||e[40]!==p||e[41]!==N||e[42]!==w||e[43]!==s.id?(z=n.jsxs("div",{"data-task-id":g,role:b,tabIndex:S,onClick:i,onKeyDown:p,className:N,children:[w,$,I]}),e[37]=i,e[38]=$,e[39]=I,e[40]=p,e[41]=N,e[42]=w,e[43]=s.id,e[44]=z):z=e[44],z}const dt=["requires_action","in_progress","failed","expired","completed"];function ja(t){const e=new Map(dt.map(s=>[s,[]]));for(const s of t){const r=s.status??"completed";(e.get(r)??e.get("completed")).push(s)}return dt.map(s=>({status:s,threads:e.get(s)}))}const Sa="sidebar.group.expanded.";function ka(t,e){const s=L.c(3),[r,i]=xt(`${Sa}${t}`,e);let a;return s[0]!==r||s[1]!==i?(a=[r,i],s[0]=r,s[1]=i,s[2]=a):a=s[2],a}function Ht(t){const e=L.c(18),{onClick:s,isFetching:r,indented:i}=t,a=V();let o;e[0]!==a?(o=a("sidebar.showMoreButton.ariaLabel"),e[0]=a,e[1]=o):o=e[1];const c=i?"-ml-4 pl-6 pr-2":"px-2";let u;e[2]!==c?(u=se("flex items-center gap-2 py-1.5 rounded-lg text-sm text-muted-foreground",c,"hover:bg-sidebar-accent hover:text-foreground focus-ring","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=c,e[3]=u):u=e[3];let l;e[4]!==r?(l=r&&n.jsx(Pe,{className:"size-3.5"}),e[4]=r,e[5]=l):l=e[5];let d;e[6]!==r||e[7]!==a?(d=a(r?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=r,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==d?(m=n.jsx("span",{children:d}),e[9]=d,e[10]=m):m=e[10];let f;return e[11]!==r||e[12]!==s||e[13]!==o||e[14]!==u||e[15]!==l||e[16]!==m?(f=n.jsxs("button",{type:"button","aria-label":o,onClick:s,disabled:r,className:u,children:[l,m]}),e[11]=r,e[12]=s,e[13]=o,e[14]=u,e[15]=l,e[16]=m,e[17]=f):f=e[17],f}function Ta(t,e,s,r){return[t,e,s,r.type,r.member,r.currentUserId??""].join("|")}function Na(t){return t.member==="mine"&&!t.currentUserId}const Kt=4;let Te=0;const Ve=[];function _a(){for(;Te<Kt&&Ve.length>0;){const t=Ve.shift();t&&t()}}function Vt(t){return new Promise((e,s)=>{const r=()=>{Te++,t().then(e,s).finally(()=>{Te--,_a()})};Te<Kt?r():Ve.push(r)})}const Be=10;function ut(t,e,s,r,i){const a={hidden:!1};r.member==="mine"&&r.currentUserId&&(a.created_by=r.currentUserId),r.type==="automation"&&(a.has_trigger=!0),r.type==="manual"&&(a.has_trigger=!1);const o={where:a,limit:i,offset:s,orderBy:[{field:["updated_at"],direction:"desc"}]};return o.status=e,o}function wa(t,e,s,r){let i=0;for(const a of t)Ut(a,e,s,r)&&i++;return i}function He(t,e,s,r){return wa(t,e,s,r)}function Ca(t,e){return!!(t>=Be||t===0&&e)}function ft(t,e){return t<e}function Pa(t,e){return e===!1?!1:e===!0?!0:t}function Ut(t,e,s,r){return!(t.hidden||(t.status??"completed")!==s||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const we=new Map,ke=new Map;function Ia(t,e){return e?t>=Be?!0:null:!1}function mt(t){return we.get(t)}function Ma(t,e){we.set(t,e)}function Aa(t,e,s){const r=we.get(t);if(r!==void 0){s(r);return}let i=ke.get(t);i||(i=Vt(e).then(a=>(we.set(t,a),ke.delete(t),a)).catch(()=>(ke.delete(t),Promise.reject(new Error("group probe failed")))),ke.set(t,i)),i.then(s,()=>s(!1))}function ht(t){const e=t,s=Array.isArray(e.items)?e.items:[];return{items:s,hasMore:e.hasMore??s.length===Be,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function La(t,e,s,r,i){let a=0;for(const o of t)e.has(o.id)||Ut(o,s,r,i)&&a++;return a}function $a(t,e,s,r){const i=L.c(8),{org:a}=ae(),o=Ta(a.id,t,e,s);let c;i[0]!==s?(c=Na(s),i[0]=s,i[1]=c):c=i[1];const u=c,[l,d]=D.useState({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});l.identity!==o&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});const m=Xe(),{threads:f,hasMore:h}=Je(),j=He(f,t,e,s),y=Ca(j,h),v=Ia(j,h),x=Ce();if(l.identity===o&&l.serverHasMore===null){const T=v??mt(o);T!==void 0&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:l.probeSubscribedIdentity,serverHasMore:T})}!u&&l.identity===o&&l.serverHasMore===null&&v===null&&mt(o)===void 0&&l.probeSubscribedIdentity!==o&&(d(T=>T.identity===o?{...T,isProbing:!0,probeSubscribedIdentity:o}:T),Aa(o,async()=>{const T=ut(t,e,0,s,1),N=await x.call("COLLECTION_THREADS_LIST",T),{totalCount:w}=ht(N),_=He(m.threads.get(),t,e,s);return w===void 0?!1:ft(_,w)},T=>{d(N=>N.identity!==o?N:{...N,isProbing:!1,serverHasMore:T})}));const b=async function(){if(l.isFetching||l.isProbing||u)return;const N=o;d(w=>w.identity===N?{...w,isFetching:!0}:w);try{const w=He(f,t,e,s),_=ut(t,e,w,s,Be),P=await Vt(()=>x.call("COLLECTION_THREADS_LIST",_)),{items:C,hasMore:M,totalCount:A}=ht(P),$=new Set(f.map(Fa)),F=La(C,$,t,e,s),O=w;m.mergeThreads(C),d(R=>{if(R.identity!==N)return R;let I;return A!==void 0?I=ft(O+F,A):I=C.length===0||F===0?!1:M,Ma(N,I),{...R,isFetching:!1,serverHasMore:I}})}catch(w){const _=w,P=_ instanceof Error?_.message:String(_);ts.error(`Could not load more tasks: ${P}`),d(C=>C.identity===N?{...C,isFetching:!1}:C)}},S=l.isFetching||l.isProbing,p=!u&&!S&&Pa(y,l.serverHasMore);let k;return i[2]!==S||i[3]!==b||i[4]!==p||i[5]!==l.isProbing||i[6]!==l.serverHasMore?(k={hasMore:p,isFetching:S,isProbing:l.isProbing,serverHasMore:l.serverHasMore,loadMore:b},i[2]=S,i[3]=b,i[4]=p,i[5]=l.isProbing,i[6]=l.serverHasMore,i[7]=k):k=i[7],k}function Fa(t){return t.id}function Ea(t){const e=L.c(20),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u}=t,{isFetching:l,isProbing:d,loadMore:m,hasMore:f,serverHasMore:h}=$a("status",s,u),[j,y]=D.useState(!1);!j&&r.length===0&&h===!0&&!l&&!d&&(y(!0),queueMicrotask(()=>{m()}));let v;if(e[0]!==i||e[1]!==c||e[2]!==u||e[3]!==o||e[4]!==a||e[5]!==r){let b;e[7]!==i||e[8]!==c||e[9]!==u||e[10]!==o||e[11]!==a?(b=S=>n.jsx(Gt,{task:S,isActive:i===S.id,onClick:()=>a(S),onArchive:c&&S.created_by===u.currentUserId?()=>o(S):void 0,showAutomationBadge:!!S.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},S.id),e[7]=i,e[8]=c,e[9]=u,e[10]=o,e[11]=a,e[12]=b):b=e[12],v=r.map(b),e[0]=i,e[1]=c,e[2]=u,e[3]=o,e[4]=a,e[5]=r,e[6]=v}else v=e[6];let x;e[13]!==f||e[14]!==l||e[15]!==m?(x=(f||l)&&n.jsx(Ht,{onClick:()=>{m()},isFetching:l,indented:!0}),e[13]=f,e[14]=l,e[15]=m,e[16]=x):x=e[16];let g;return e[17]!==v||e[18]!==x?(g=n.jsxs(n.Fragment,{children:[v,x]}),e[17]=v,e[18]=x,e[19]=g):g=e[19],g}function Ra(t){const e=L.c(43),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u}=t,l=V(),d=bn[s],m=d.icon,[f,h]=ka(`status-${s}`,!1);let j;e[0]!==f||e[1]!==h?(j=function(){h(!f)},e[0]=f,e[1]=h,e[2]=j):j=e[2];const y=j;let v;e[3]!==d.labelKey||e[4]!==l?(v=l("sidebar.taskGroupsList.toggleStatusGroup",{status:l(d.labelKey)}),e[3]=d.labelKey,e[4]=l,e[5]=v):v=e[5];let x;e[6]!==y?(x=P=>{P.target===P.currentTarget&&(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),y())},e[6]=y,e[7]=x):x=e[7];let g;e[8]!==m||e[9]!==d.iconClassName?(g=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:n.jsx(m,{size:12,className:d.iconClassName})}),e[8]=m,e[9]=d.iconClassName,e[10]=g):g=e[10];let b;e[11]!==f?(b=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:f?n.jsx(Ze,{size:14}):n.jsx(ss,{size:14})}),e[11]=f,e[12]=b):b=e[12];let S;e[13]!==g||e[14]!==b?(S=n.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[g,b]}),e[13]=g,e[14]=b,e[15]=S):S=e[15];let p;e[16]!==d.labelKey||e[17]!==l?(p=l(d.labelKey),e[16]=d.labelKey,e[17]=l,e[18]=p):p=e[18];let k;e[19]!==p?(k=n.jsx("span",{className:"flex-1 truncate",children:p}),e[19]=p,e[20]=k):k=e[20];let T;e[21]!==r.length?(T=n.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:n.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:r.length})}),e[21]=r.length,e[22]=T):T=e[22];let N;e[23]!==f||e[24]!==y||e[25]!==v||e[26]!==x||e[27]!==S||e[28]!==k||e[29]!==T?(N=n.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":f,"aria-label":v,onClick:y,onKeyDown:x,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-lg text-sm font-medium text-foreground cursor-pointer hover:bg-sidebar-accent focus-ring transition-colors",children:[S,k,T]}),e[23]=f,e[24]=y,e[25]=v,e[26]=x,e[27]=S,e[28]=k,e[29]=T,e[30]=N):N=e[30];let w;e[31]!==i||e[32]!==c||e[33]!==f||e[34]!==u||e[35]!==o||e[36]!==a||e[37]!==s||e[38]!==r?(w=f&&n.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:n.jsx(Ea,{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u})}),e[31]=i,e[32]=c,e[33]=f,e[34]=u,e[35]=o,e[36]=a,e[37]=s,e[38]=r,e[39]=w):w=e[39];let _;return e[40]!==N||e[41]!==w?(_=n.jsxs("div",{className:"flex flex-col gap-0.5",children:[N,w]}),e[40]=N,e[41]=w,e[42]=_):_=e[42],_}function Oa(t){const e=L.c(41),{threads:s,groupBy:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,filters:c,hasMore:u,isFetchingMore:l,onLoadMore:d,filtersActive:m}=t,f=V();if(s.length===0&&!u&&!l){let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(xs,{className:"size-6 opacity-60"}),e[0]=x):x=e[0];let g;e[1]!==m||e[2]!==f?(g=f(m?"sidebar.myThreadsSection.noChatsMatchFilters":"sidebar.myThreadsSection.noChatsYet"),e[1]=m,e[2]=f,e[3]=g):g=e[3];let b;return e[4]!==g?(b=n.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[x,n.jsx("p",{className:"text-sm",children:g})]}),e[4]=g,e[5]=b):b=e[5],b}const h=s.length>1||u;if(r==="status"){let x;if(e[6]!==i||e[7]!==h||e[8]!==c||e[9]!==o||e[10]!==a||e[11]!==s){let b;e[13]!==i||e[14]!==h||e[15]!==c||e[16]!==o||e[17]!==a?(b=S=>n.jsx(Ra,{status:S.status,threads:S.threads,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:h,filters:c},S.status),e[13]=i,e[14]=h,e[15]=c,e[16]=o,e[17]=a,e[18]=b):b=e[18],x=ja(s).map(b),e[6]=i,e[7]=h,e[8]=c,e[9]=o,e[10]=a,e[11]=s,e[12]=x}else x=e[12];let g;return e[19]!==x?(g=n.jsx(n.Fragment,{children:x}),e[19]=x,e[20]=g):g=e[20],g}let j;if(e[21]!==i||e[22]!==h||e[23]!==c||e[24]!==o||e[25]!==a||e[26]!==s){let x;e[28]!==i||e[29]!==h||e[30]!==c||e[31]!==o||e[32]!==a?(x=g=>n.jsx(Gt,{task:g,isActive:i===g.id,onClick:()=>a(g),onArchive:h&&g.created_by===c.currentUserId?()=>o(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0},g.id),e[28]=i,e[29]=h,e[30]=c,e[31]=o,e[32]=a,e[33]=x):x=e[33],j=s.map(x),e[21]=i,e[22]=h,e[23]=c,e[24]=o,e[25]=a,e[26]=s,e[27]=j}else j=e[27];let y;e[34]!==u||e[35]!==l||e[36]!==d?(y=(u||l)&&n.jsx(Ht,{onClick:d,isFetching:l}),e[34]=u,e[35]=l,e[36]=d,e[37]=y):y=e[37];let v;return e[38]!==j||e[39]!==y?(v=n.jsxs(n.Fragment,{children:[j,y]}),e[38]=j,e[39]=y,e[40]=v):v=e[40],v}function Ba(t){const e=L.c(11),{panel:s}=t;let r;return e[0]!==s.activeTaskId||e[1]!==s.archiveTask||e[2]!==s.filters||e[3]!==s.filtersActive||e[4]!==s.groupBy||e[5]!==s.hasMore||e[6]!==s.isFetchingMore||e[7]!==s.loadMore||e[8]!==s.selectTask||e[9]!==s.threads?(r=n.jsx(Oa,{threads:s.threads,groupBy:s.groupBy,activeTaskId:s.activeTaskId,onSelectTask:s.selectTask,onArchiveTask:s.archiveTask,filters:s.filters,hasMore:s.hasMore,isFetchingMore:s.isFetchingMore,onLoadMore:s.loadMore,filtersActive:s.filtersActive}),e[0]=s.activeTaskId,e[1]=s.archiveTask,e[2]=s.filters,e[3]=s.filtersActive,e[4]=s.groupBy,e[5]=s.hasMore,e[6]=s.isFetchingMore,e[7]=s.loadMore,e[8]=s.selectTask,e[9]=s.threads,e[10]=r):r=e[10],r}function Da(t){const e=L.c(67);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{onNavigate:r}=s,{data:i}=pe.useSession(),a=i?.user?.id,{org:o}=ae();let c;e[2]!==o.id?(c=ye(o.id),e[2]=o.id,e[3]=c):c=e[3];const u=c.id,l=ha(),d=Tt(),{threads:m,hasMore:f,isFetchingMore:h,fetchNextPage:j}=Je(),y=m.filter(Ka),{hide:v,setScope:x}=It(),g=Me(),{setTaskId:b,createNewTask:S}=Qe(),p=Et(),k=et();let T;e[4]!==k||e[5]!==m||e[6]!==p?(T=on({routeAgentId:p,threadVirtualMcpId:m.find(K=>K.id===k)?.virtual_mcp_id}),e[4]=k,e[5]=m,e[6]=p,e[7]=T):T=e[7];const N=T;let w;e[8]!==r?(w=()=>{r?.()},e[8]=r,e[9]=w):w=e[9];const _=w,P=[...y].sort(Ha),[C,M]=D.useState("all"),[A,$]=D.useState("flat"),[F,O]=xt("sidebar-threads-scope-all",!1),[R,I]=D.useState(!1),[z,E]=D.useState(!1);let H;e[10]!==I?(H=()=>{he("tasks_panel_search_opened"),E(!0),I(!0)},e[10]=I,e[11]=H):H=e[11];const B=H,U=a??null;let Z;e[12]!==U||e[13]!==C?(Z={type:C,member:"mine",currentUserId:U},e[12]=U,e[13]=C,e[14]=Z):Z=e[14];const Y=Z,X={};F||(X.created_by="me"),x(X);let W;e[15]!==a?(W=K=>a?K.filter(ue=>ue.created_by===a):[],e[15]=a,e[16]=W):W=e[16];const le=W;let G;e[17]!==C?(G=K=>C==="automation"?K.filter(Ga):C==="manual"?K.filter(za):K,e[17]=C,e[18]=G):G=e[18];const re=G,J=ma(re(F?P:le(P)),k);let Q;e[19]!==k||e[20]!==_||e[21]!==a||e[22]!==v||e[23]!==g||e[24]!==o.slug||e[25]!==b||e[26]!==J?(Q=K=>{if(a&&K.created_by&&K.created_by!==a)return;const ue=K.id===k;if(v(K.id),an(K.id),!ue)return;const ge=va(J,K.id,a);_(),ge?b(ge.id,ge.virtual_mcp_id):g({to:"/$org",params:{org:o.slug}})},e[19]=k,e[20]=_,e[21]=a,e[22]=v,e[23]=g,e[24]=o.slug,e[25]=b,e[26]=J,e[27]=Q):Q=e[27];const ee=Q;let ne;e[28]!==_||e[29]!==b?(ne=K=>{_(),b(K.id,K.virtual_mcp_id)},e[28]=_,e[29]=b,e[30]=ne):ne=e[30];const ie=ne;let te;e[31]!==N||e[32]!==k||e[33]!==m||e[34]!==_||e[35]!==S||e[36]!==a||e[37]!==u||e[38]!==l||e[39]!==d||e[40]!==b?(te=()=>{const K=N??u;he("sidebar_new_thread_clicked",{virtual_mcp_id:K}),_();const ue=qs(m,K,a,l(K));if(ue){b(ue.id,ue.virtual_mcp_id,{newThread:!0});return}const ge=d?null:m.find(qt=>qt.id===k)?.branch??null;S(K,ge)},e[31]=N,e[32]=k,e[33]=m,e[34]=_,e[35]=S,e[36]=a,e[37]=u,e[38]=l,e[39]=d,e[40]=b,e[41]=te):te=e[41];const oe=te;let ce;e[42]!==j?(ce=()=>{j()},e[42]=j,e[43]=ce):ce=e[43];const xe=A!=="flat"||C!=="all"||F;let de;e[44]!==z||e[45]!==R||e[46]!==I?(de=z?n.jsx(ga,{open:R,onOpenChange:I}):null,e[44]=z,e[45]=R,e[46]=I,e[47]=de):de=e[47];let Se;return e[48]!==k||e[49]!==ee||e[50]!==Y||e[51]!==A||e[52]!==f||e[53]!==h||e[54]!==oe||e[55]!==B||e[56]!==ie||e[57]!==$||e[58]!==O||e[59]!==M||e[60]!==F||e[61]!==ce||e[62]!==xe||e[63]!==de||e[64]!==C||e[65]!==J?(Se={threads:J,activeTaskId:k,filters:Y,hasMore:f,isFetchingMore:h,loadMore:ce,groupBy:A,setGroupBy:$,typeFilter:C,setTypeFilter:M,showAll:F,setShowAll:O,filtersActive:xe,selectTask:ie,archiveTask:ee,newThread:oe,openSearch:B,searchDialog:de},e[48]=k,e[49]=ee,e[50]=Y,e[51]=A,e[52]=f,e[53]=h,e[54]=oe,e[55]=B,e[56]=ie,e[57]=$,e[58]=O,e[59]=M,e[60]=F,e[61]=ce,e[62]=xe,e[63]=de,e[64]=C,e[65]=J,e[66]=Se):Se=e[66],Se}function za(t){return!t.trigger_id}function Ga(t){return!!t.trigger_id}function Ha(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function Ka(t){return!t.hidden}function Va(){const t=L.c(59),e=V(),[s,r]=D.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={onNavigate:()=>r(!1)},t[0]=i):i=t[0];const a=Da(i),o=Le()?.activeTask;let c;t[1]!==o?.title||t[2]!==a.activeTaskId||t[3]!==a.threads||t[4]!==e?(c=o?.title||a.threads.find(R=>R.id===a.activeTaskId)?.title||e("tasksPanel.taskRow.untitledTask"),t[1]=o?.title,t[2]=a.activeTaskId,t[3]=a.threads,t[4]=e,t[5]=c):c=t[5];const u=c;let l;t[6]!==a?(l=()=>{r(!1),a.openSearch()},t[6]=a,t[7]=l):l=t[7];const d=l;let m;t[8]!==e?(m=e("chat.threadsMenu.chats"),t[8]=e,t[9]=m):m=t[9];const f=s&&"bg-sidebar-accent";let h;t[10]!==f?(h=se("flex h-[34px] min-w-0 shrink items-center gap-1.5 rounded-lg px-2 text-sm text-foreground transition-colors hover:bg-accent focus-ring",f),t[10]=f,t[11]=h):h=t[11];let j;t[12]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(gs,{size:16,className:"shrink-0"}),t[12]=j):j=t[12];let y;t[13]!==u?(y=n.jsx("span",{className:"truncate max-w-[10rem] font-medium",children:u}),t[13]=u,t[14]=y):y=t[14];let v;t[15]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Ze,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[15]=v):v=t[15];let x;t[16]!==m||t[17]!==h||t[18]!==y?(x=n.jsx(Ee,{asChild:!0,children:n.jsx(Lt,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":m,className:h,children:[j,y,v]})})}),t[16]=m,t[17]=h,t[18]=y,t[19]=x):x=t[19];let g;t[20]!==e?(g=e("chat.threadsMenu.chats"),t[20]=e,t[21]=g):g=t[21];let b;t[22]!==g?(b=n.jsx(Re,{side:"bottom",children:g}),t[22]=g,t[23]=b):b=t[23];let S;t[24]!==b||t[25]!==x?(S=n.jsxs(Oe,{children:[x,b]}),t[24]=b,t[25]=x,t[26]=S):S=t[26];let p;t[27]!==a?(p=n.jsx(fa,{panel:a,className:"size-8"}),t[27]=a,t[28]=p):p=t[28];let k;t[29]!==e?(k=e("sidebar.taskGroupsList.searchChats"),t[29]=e,t[30]=k):k=t[30];let T;t[31]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(bs,{size:16}),t[31]=T):T=t[31];let N;t[32]!==d||t[33]!==k?(N=n.jsx(Ne,{"aria-label":k,onClick:d,className:"size-8",children:T}),t[32]=d,t[33]=k,t[34]=N):N=t[34];let w;t[35]!==e?(w=e("sidebar.taskGroupsList.newChat"),t[35]=e,t[36]=w):w=t[36];let _;t[37]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(vt,{size:16}),t[37]=_):_=t[37];let P;t[38]!==a.newThread||t[39]!==w?(P=n.jsx(Ne,{"aria-label":w,onClick:a.newThread,className:"size-8",children:_}),t[38]=a.newThread,t[39]=w,t[40]=P):P=t[40];let C;t[41]!==N||t[42]!==P?(C=n.jsxs("div",{className:"flex items-center gap-0.5",children:[N,P]}),t[41]=N,t[42]=P,t[43]=C):C=t[43];let M;t[44]!==p||t[45]!==C?(M=n.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[p,C]}),t[44]=p,t[45]=C,t[46]=M):M=t[46];let A;t[47]!==a?(A=n.jsx("div",{className:"flex max-h-[60vh] min-h-0 flex-col gap-0.5 overflow-y-auto overscroll-contain",children:n.jsx(Ba,{panel:a})}),t[47]=a,t[48]=A):A=t[48];let $;t[49]!==M||t[50]!==A?($=n.jsxs($t,{align:"start",side:"bottom",onOpenAutoFocus:Ua,className:"flex w-80 flex-col gap-2 p-2",children:[M,A]}),t[49]=M,t[50]=A,t[51]=$):$=t[51];let F;t[52]!==s||t[53]!==S||t[54]!==$?(F=n.jsxs(Ft,{open:s,onOpenChange:r,children:[S,$]}),t[52]=s,t[53]=S,t[54]=$,t[55]=F):F=t[55];let O;return t[56]!==a.searchDialog||t[57]!==F?(O=n.jsxs(n.Fragment,{children:[F,a.searchDialog]}),t[56]=a.searchDialog,t[57]=F,t[58]=O):O=t[58],O}function Ua(t){return t.preventDefault()}function qa(){const t=L.c(20),e=V(),{threads:s}=Je(),{createNewTask:r}=Qe(),i=Rt(),a=et();let o;t[0]!==a||t[1]!==s?(o=s.find(v=>v.id===a)?.branch??null,t[0]=a,t[1]=s,t[2]=o):o=t[2];const c=o;let u;t[3]!==i||t[4]!==r||t[5]!==c?(u=()=>{r(i,c)},t[3]=i,t[4]=r,t[5]=c,t[6]=u):u=t[6];const l=u;let d;t[7]!==e?(d=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=d):d=t[8];let m;t[9]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(vt,{size:16}),t[9]=m):m=t[9];let f;t[10]!==l||t[11]!==d?(f=n.jsx(Ee,{asChild:!0,children:n.jsx("button",{type:"button",onClick:l,"aria-label":d,className:"flex shrink-0 items-center rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-ring",children:m})}),t[10]=l,t[11]=d,t[12]=f):f=t[12];let h;t[13]!==e?(h=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=h):h=t[14];let j;t[15]!==h?(j=n.jsx(Re,{side:"bottom",children:h}),t[15]=h,t[16]=j):j=t[16];let y;return t[17]!==f||t[18]!==j?(y=n.jsxs(Oe,{children:[f,j]}),t[17]=f,t[18]=j,t[19]=y):y=t[19],y}function Wa(t){const e=L.c(16),{virtualMcpId:s,taskId:r}=t,{openPanel:i}=Bt();let a;e[0]!==r||e[1]!==s?(a={virtualMcpId:s,taskId:r},e[0]=r,e[1]=s,e[2]=a):a=e[2];const{tabs:o,activeTab:c,mainOpen:u}=Dt(a);if(o.length===0)return null;let l;if(e[3]!==c||e[4]!==u||e[5]!==i||e[6]!==o||e[7]!==s){let m;e[9]!==c||e[10]!==u||e[11]!==i||e[12]!==s?(m=f=>{const h=f.id==="automations"?ns({activeTab:c,mainOpen:u}):u&&f.id===c;return n.jsxs(st.Tab,{active:h,onClick:()=>{h||(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:f.id,tab_kind:f.kind,was_active:!1}),i(f.id))},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(_e,{icon:f.icon})}),f.title]},f.id)},e[9]=c,e[10]=u,e[11]=i,e[12]=s,e[13]=m):m=e[13],l=o.map(m),e[3]=c,e[4]=u,e[5]=i,e[6]=o,e[7]=s,e[8]=l}else l=e[8];let d;return e[14]!==l?(d=n.jsx(st.Tabs,{"data-tour":rn.surfaceTabs,children:l}),e[14]=l,e[15]=d):d=e[15],d}function Ya(t){return{threadId:t.routeThreadId,providerKey:t.routeThreadId??t.fallbackKey}}const Ke="__mobile-main-panel-tab-select__",Ue="main";function Za({tabs:t,activeTab:e,mainOpen:s,t:r}){const i=t.find(o=>o.id===e),a=r("mainPanelTabs.mobileMainPanelTabSelect.mainView");return s?i?.title??a:i?.title??t[0]?.title??a}const Xa={kind:"component",Component:vs},Ja={kind:"component",Component:ys},Qa={kind:"component",Component:js},er={kind:"component",Component:jn};function tr({tabs:t,overlayEnabled:e,t:s}){return[{value:"chat",title:s("mainPanelTabs.mobileMainPanelTabSelect.chat"),icon:Xa},...t.length>0?t.map(r=>({value:r.id,title:r.title,icon:r.icon})):[{value:Ue,title:s("mainPanelTabs.mobileMainPanelTabSelect.mainView"),icon:er}],...e?[{value:"board",title:s("mainPanelTabs.mobileMainPanelTabSelect.tasks"),icon:Ja},{value:"files",title:s("mainPanelTabs.mobileMainPanelTabSelect.library"),icon:Qa}]:[]]}function sr(t){const e=L.c(53),{virtualMcpId:s,taskId:r}=t,i=V(),a=Me(),{openPanel:o}=Bt();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const u=je(c);let l;e[1]!==r||e[2]!==s?(l={virtualMcpId:s,taskId:r},e[1]=r,e[2]=s,e[3]=l):l=e[3];const{tabs:d,activeTab:m,mainOpen:f}=Dt(l),{org:h}=ae(),j=Ls();let y;e[4]!==h.id?(y=nt(h.id),e[4]=h.id,e[5]=y):y=e[5];const v=s===y;let x,g,b,S,p,k,T,N,w,_;if(e[6]!==m||e[7]!==f||e[8]!==a||e[9]!==v||e[10]!==o||e[11]!==h.id||e[12]!==u.org||e[13]!==u.taskId||e[14]!==j||e[15]!==i||e[16]!==d||e[17]!==s){S=Symbol.for("react.early_return_sentinel");e:{const M=tr({tabs:d,overlayEnabled:!!(u.org&&u.taskId),t:i}),A=f?M.find(B=>B.value===m)?.value??Ue:"chat",$=M.find(B=>B.value===A),F=$?.title??Za({tabs:d,activeTab:m,mainOpen:f,t:i});let O;e[28]!==a?(O=B=>{a({to:".",search:U=>({...U,...en(B)}),replace:!0})},e[28]=a,e[29]=O):O=e[29];const R=O;let I;e[30]!==v||e[31]!==o||e[32]!==h.id||e[33]!==j||e[34]!==R||e[35]!==s?(I=B=>{if(B!==Ke){if(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:B,source:"mobile_select"}),ln({reportsOnly:j,onReportAgent:v,tabId:B})){o(B,{virtualmcpid:nt(h.id),search:rr});return}if(B==="chat"||B===Ue){R(B==="chat"?"chat":"main");return}o(B,{search:ar})}},e[30]=v,e[31]=o,e[32]=h.id,e[33]=j,e[34]=R,e[35]=s,e[36]=I):I=e[36];const z=I,E=M.find(B=>B.value!==A);if(M.length===2&&E){S=n.jsxs("button",{type:"button",onClick:()=>z(E.value),"aria-label":i("mainPanelTabs.mobileMainPanelTabSelect.switchTo",{name:E.title}),className:"flex h-10 min-w-0 max-w-[7.5rem] items-center gap-1.5 rounded-lg px-1.5 text-xs text-foreground transition-colors hover:bg-accent focus-ring",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(_e,{icon:E.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:E.title})]});break e}g=kn,w=Ke,_=z;let H;e[37]!==i?(H=i("mainPanelTabs.mobileMainPanelTabSelect.view"),e[37]=i,e[38]=H):H=e[38],b=n.jsx(Sn,{"aria-label":H,className:"h-10! w-full min-w-0 max-w-[7.5rem] rounded-lg border-0 bg-transparent px-1.5 text-xs shadow-none [--shadow-edge:none]",children:n.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[$&&n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(_e,{icon:$.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:F})]})}),x=Tn,p="end",k="w-56",e[39]!==F?(T=n.jsx(zt,{value:Ke,disabled:!0,hideCheck:!0,className:"hidden",children:F}),e[39]=F,e[40]=T):T=e[40],N=M.map(nr)}e[6]=m,e[7]=f,e[8]=a,e[9]=v,e[10]=o,e[11]=h.id,e[12]=u.org,e[13]=u.taskId,e[14]=j,e[15]=i,e[16]=d,e[17]=s,e[18]=x,e[19]=g,e[20]=b,e[21]=S,e[22]=p,e[23]=k,e[24]=T,e[25]=N,e[26]=w,e[27]=_}else x=e[18],g=e[19],b=e[20],S=e[21],p=e[22],k=e[23],T=e[24],N=e[25],w=e[26],_=e[27];if(S!==Symbol.for("react.early_return_sentinel"))return S;let P;e[41]!==x||e[42]!==p||e[43]!==k||e[44]!==T||e[45]!==N?(P=n.jsxs(x,{align:p,className:k,children:[T,N]}),e[41]=x,e[42]=p,e[43]=k,e[44]=T,e[45]=N,e[46]=P):P=e[46];let C;return e[47]!==g||e[48]!==b||e[49]!==P||e[50]!==w||e[51]!==_?(C=n.jsxs(g,{value:w,onValueChange:_,children:[b,P]}),e[47]=g,e[48]=b,e[49]=P,e[50]=w,e[51]=_,e[52]=C):C=e[52],C}function nr(t){return n.jsx(zt,{value:t.value,children:n.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(_e,{icon:t.icon})}),n.jsx("span",{className:"min-w-0 truncate",children:t.title})]})},t.value)}function ar(t){return{...t,sidepanel:!1}}function rr(t){return{...t,thread:void 0,sidepanel:!1}}function ir(){const t=L.c(3),e=as();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={select:lr},t[0]=s):s=t[0];const r=gt(s);if(!e||!r)return!1;let i;return t[1]!==r?(i=r==="app"||_n.includes(r),t[1]=r,t[2]=i):i=t[2],i}function lr(t){const{staticData:e}=t.matches.findLast(or)??{};return e?.siteEditorView?"site-editor":e?.mainView}function or(t){return t.staticData.mainView}function cr(t,e,s){const r=L.c(33),i=Xe(),{locator:a}=ae(),o=D.useSyncExternalStore(i.threads.subscribe,i.threads.get),c=D.useSyncExternalStore(i.threadsStatus.subscribe,i.threadsStatus.get);let u;r[0]!==t||r[1]!==o?(u=t===null?null:o.find(p=>p.id===t&&!p.partial)??null,r[0]=t,r[1]=o,r[2]=u):u=r[2];const l=u,[d,m]=D.useState(void 0),[f,h]=D.useState(t);f!==t&&(h(t),m(void 0));let j,y;r[3]!==d||r[4]!==t||r[5]!==l||r[6]!==i||r[7]!==c.kind?(j=()=>{t!==null&&(l||c.kind!=="loading"&&d===void 0&&(m("pending"),i.fetchThreadIntoSlot(t).then(p=>{m(p)})))},y=[t,l,c.kind,d,i],r[3]=d,r[4]=t,r[5]=l,r[6]=i,r[7]=c.kind,r[8]=j,r[9]=y):(j=r[8],y=r[9]),D.useEffect(j,y);let v;r[10]!==s||r[11]!==a||r[12]!==i||r[13]!==e?(v={mutationFn:async p=>i.create({id:p,virtual_mcp_id:e,...s?{branch:s}:{},...Us(sessionStorage,a,p)})},r[10]=s,r[11]=a,r[12]=i,r[13]=e,r[14]=v):v=r[14];const x=rs(v);let g,b;if(r[15]!==x||r[16]!==d||r[17]!==t||r[18]!==l||r[19]!==c.kind?(g=()=>{t!==null&&(l||d===null&&c.kind!=="loading"&&(x.isPending||x.variables!==t&&x.mutate(t)))},b=[t,l,d,c.kind,x],r[15]=x,r[16]=d,r[17]=t,r[18]=l,r[19]=c.kind,r[20]=g,r[21]=b):(g=r[20],b=r[21]),D.useEffect(g,b),t===null){let p;return r[22]===Symbol.for("react.memo_cache_sentinel")?(p={status:"ready",task:null},r[22]=p):p=r[22],p}if(l){let p;return r[23]!==l?(p={status:"ready",task:l},r[23]=l,r[24]=p):p=r[24],p}if(d&&typeof d=="object"){let p;return r[25]!==d?(p={status:"ready",task:d},r[25]=d,r[26]=p):p=r[26],p}if(x.data){let p;return r[27]!==x.data?(p={status:"ready",task:x.data},r[27]=x.data,r[28]=p):p=r[28],p}if(x.isError){let p;return r[29]!==x.error?(p={status:"error",error:x.error},r[29]=x.error,r[30]=p):p=r[30],p}if(x.isPending||c.kind!=="loading"){let p;return r[31]===Symbol.for("react.memo_cache_sentinel")?(p={status:"creating"},r[31]=p):p=r[31],p}let S;return r[32]===Symbol.for("react.memo_cache_sentinel")?(S={status:"loading"},r[32]=S):S=r[32],S}const dr=50;function ur(t,e){const s=L.c(15),{org:r}=ae(),i=Ce(),{data:a}=pe.useSession(),o=a?.user?.id??"";let c;s[0]!==r.id||s[1]!==o||s[2]!==t?(c=fe.agentEntryThreads(r.id,o,t),s[0]=r.id,s[1]=o,s[2]=t,s[3]=c):c=s[3];const u=e&&!!o;let l;s[4]!==i||s[5]!==t?(l=async()=>{try{return(await i.call("COLLECTION_THREADS_LIST",{limit:dr,offset:0,orderBy:[{field:["updated_at"],direction:"desc"}],where:{hidden:!1,created_by:"me",virtual_mcp_id:t}})).items}catch{return[]}},s[4]=i,s[5]=t,s[6]=l):l=s[6];let d;s[7]!==c||s[8]!==u||s[9]!==l?(d={queryKey:c,enabled:u,staleTime:0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,queryFn:l},s[7]=c,s[8]=u,s[9]=l,s[10]=d):d=s[10];const m=me(d);if(!e||!o){let h;return s[11]===Symbol.for("react.memo_cache_sentinel")?(h={status:"idle"},s[11]=h):h=s[11],h}if(!m.data||m.isFetching){let h;return s[12]===Symbol.for("react.memo_cache_sentinel")?(h={status:"loading"},s[12]=h):h=s[12],h}let f;return s[13]!==m.data?(f={status:"ready",threads:m.data},s[13]=m.data,s[14]=f):f=s[14],f}function fr(t){const e=L.c(13),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=je(r);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const o=Ae(a);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={select:mr},e[2]=c):c=e[2];const u=gt(c),{org:l}=ae();let d;e[3]!==l||e[4]!==i.agentId||e[5]!==i.legacyView||e[6]!==i.org||e[7]!==u||e[8]!==o?(d=i.org?is({pathname:u,org:i.org,pathAgentId:i.agentId,pathLegacyView:i.legacyView,fallbackAgentId:ye(l.id).id,search:o}):null,e[3]=l,e[4]=i.agentId,e[5]=i.legacyView,e[6]=i.org,e[7]=u,e[8]=o,e[9]=d):d=e[9];const m=d;let f;return e[10]!==s||e[11]!==m?(f=m?n.jsx(tt,{target:m}):s,e[10]=s,e[11]=m,e[12]=f):f=e[12],f}function mr(t){return t.matches.at(-1)?.pathname??t.location.pathname}function hr(){const t=L.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=je(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const i=Ae(r),{org:a}=ae(),{org:o,taskId:c}=s;if(!o||c===void 0)return null;let u;return t[2]!==o||t[3]!==a.id||t[4]!==i||t[5]!==c?(u=ls({org:o,taskId:c,fallbackAgentId:ye(a.id).id,search:i}),t[2]=o,t[3]=a.id,t[4]=i,t[5]=c,t[6]=u):u=t[6],u}function pr(){const t=L.c(2),e=hr();let s;return t[0]!==e?(s=e?n.jsx(tt,{target:e}):null,t[0]=e,t[1]=s):s=t[1],s}function xr(){const t=L.c(6),e=Cn(),s=Me();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const{preview:i}=Ae(r);if(!e||!i)return null;let a;t[1]!==s?(a=()=>s({to:".",search:gr}),t[1]=s,t[2]=a):a=t[2];let o;return t[3]!==i||t[4]!==a?(o=n.jsx(Pn,{previewPath:i,onClose:a,showSeeInLibrary:!0}),t[3]=i,t[4]=a,t[5]=o):o=t[5],o}function gr(t){const{preview:e,...s}=t;return s}function br(t){const e=L.c(11),{children:s}=t,r=V();let i;e[0]!==r?(i=r("agentShellLayout.agentShellLayout.chatLoadingError"),e[0]=r,e[1]=i):i=e[1];let a;e[2]!==i?(a=n.jsx("div",{role:"alert",className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:i}),e[2]=i,e[3]=a):a=e[3];let o;e[4]!==s?(o=s??n.jsx(ca,{}),e[4]=s,e[5]=o):o=e[5];let c;e[6]!==o?(c=n.jsx(Ie,{children:o}),e[6]=o,e[7]=c):c=e[7];let u;return e[8]!==a||e[9]!==c?(u=n.jsx(pt,{fallback:a,children:c}),e[8]=a,e[9]=c,e[10]=u):u=e[10],u}function vr(t){const e=L.c(6),{threadId:s,providerKey:r,children:i}=t;let a;e[0]!==r||e[1]!==s?(a=s===null?n.jsx(q.ThreadlessStreamSource,{},r):n.jsx(q.ActiveTaskStreamSource,{taskId:s},r),e[0]=r,e[1]=s,e[2]=a):a=e[2];let o;return e[3]!==i||e[4]!==a?(o=n.jsx(q.StreamHost,{source:a,children:i}),e[3]=i,e[4]=a,e[5]=o):o=e[5],o}function yr(t){const e=L.c(3),{onNewTaskRef:s,createNewTask:r}=t;let i;return e[0]!==r||e[1]!==s?(i=()=>(s.current=r,()=>{s.current=null}),e[0]=r,e[1]=s,e[2]=i):i=e[2],D.useLayoutEffect(i),null}function jr({virtualMcpId:t,hasActiveRepository:e,sandboxMap:s,children:r}){const i=V(),{currentBranch:a,activeTask:o,setCurrentTaskBranch:c}=$e(),{data:u}=pe.useSession(),l=u?.user?.id,d=!Is(o?.harness_id),m=Ys({agentSandboxMap:s,threadSandboxMap:o?.metadata?.sandboxMap,userId:l,ownerId:o?.created_by,branch:a}),f=e||zs(o?.metadata),h=D.useRef(null),j=d&&Zs({threadLoaded:!!o,isOwner:!!l&&o?.created_by===l,hasActiveRepository:f,branch:a??null,attempted:h.current===(o?.id??null)});D.useEffect(()=>{!j||!o||(h.current=o.id,c(Ct(u?.user?.name||u?.user?.email?.split("@")[0])))},[j,o,u,c]);const y=St(t),v=Fe(t),x=Mt(v,a),{releases:g,createRelease:b}=Gs(t),p=!!l&&o?.created_by===l&&!!a&&a!==x&&!g.some(M=>M.branch===a),k=D.useRef(null);D.useEffect(()=>{!p||!a||k.current!==a&&(k.current=a,b({branch:a,name:Ks(g,i("thread.branchPicker.defaultVersionName")),color:Hs(g.length),createdBy:l,createdAt:new Date().toISOString()}).catch(()=>{}))},[p,a,g,b,l,i]);const T=y.resolved?y.runtime:null,N=Xs(t,a??void 0),_=(l&&a?Mn(m?.[l]?.[a]):{})["agent-sandbox"]??null,P=_?.previewUrl??null,C=d&&T!=="cms"&&(!!_||N);return d?T==="cms"?n.jsx(lt,{resetKey:`${t}:${a??"no-branch"}:${o?.id??""}`,children:r}):n.jsx(Nn,{resetKey:o?.id??"no-thread",virtualMcpId:t,branch:a??null,previewUrl:P,enabled:C,children:n.jsx(Js,{resetKey:o?.id??"no-thread",executionEnabled:d,virtualMcpId:t,branch:a??null,userId:l??null,hasActiveRepository:f,vmEntry:_,threadId:o?.id??null,children:n.jsx(lt,{resetKey:`${t}:${a??"no-branch"}:${o?.id??""}`,children:r})})}):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex h-full rounded-[0.75rem] bg-background shadow-edge",children:n.jsx(At,{image:n.jsx(We,{size:48,className:"text-muted-foreground"}),title:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWeb"),description:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWebDescription")})})})}function Sr(){const t=L.c(16),e=V(),{toggleSidebar:s}=ks(),{virtualMcpId:r,taskId:i}=$e();let a;t[0]!==e?(a=e("layouts.shellControls.toggleSidebar"),t[0]=e,t[1]=a):a=t[1];let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Ss,{size:16}),t[2]=o):o=t[2];let c;t[3]!==a||t[4]!==s?(c=n.jsx(Ne,{className:"md:hidden",onClick:s,"aria-label":a,children:o}),t[3]=a,t[4]=s,t[5]=c):c=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Va,{}),t[6]=u):u=t[6];let l;t[7]!==c?(l=n.jsxs(De.Topbar.Left,{children:[c,u]}),t[7]=c,t[8]=l):l=t[8];let d;t[9]!==i||t[10]!==r?(d=n.jsx("div",{className:"min-w-0 md:hidden",children:n.jsx(sr,{virtualMcpId:r,taskId:i})}),t[9]=i,t[10]=r,t[11]=d):d=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(De.Topbar.Right,{className:"shrink-0",children:n.jsx(qa,{})}),t[12]=m):m=t[12];let f;return t[13]!==l||t[14]!==d?(f=n.jsxs(De.Topbar,{className:"border-b border-border/60 px-3",children:[l,d,m]}),t[13]=l,t[14]=d,t[15]=f):f=t[15],f}function kr(t){const e=L.c(25),{layout:s,onNewTaskRef:r,createNewTask:i}=t,{virtualMcpId:a,taskId:o}=$e(),c=yn()??"overview",u=ir(),[l,d]=D.useState(null),m=l===c,f=u?m:s.threadOpen;let h;e[0]!==c||e[1]!==s||e[2]!==u||e[3]!==m?(h=u?()=>d(m?null:c):s.toggleThread,e[0]=c,e[1]=s,e[2]=u,e[3]=m,e[4]=h):h=e[4];const j=h;let y;e[5]!==i||e[6]!==r?(y=n.jsx(yr,{onNewTaskRef:r,createNewTask:i}),e[5]=i,e[6]=r,e[7]=y):y=e[7];let v;e[8]!==o||e[9]!==a?(v=n.jsx(Wa,{virtualMcpId:a,taskId:o}),e[8]=o,e[9]=a,e[10]=v):v=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Sr,{}),e[11]=x):x=e[11];const g=o??"threadless";let b;e[12]!==g?(b=n.jsx(it.Thread,{topbar:x,children:n.jsx(br,{},g)}),e[12]=g,e[13]=b):b=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(bt,{}),e[14]=S):S=e[14];let p;e[15]!==c||e[16]!==s||e[17]!==v||e[18]!==b||e[19]!==f||e[20]!==j?(p=n.jsxs(it,{...s,threadOpen:f,toggleThread:j,contentKey:c,contentNavigation:v,children:[b,S]}),e[15]=c,e[16]=s,e[17]=v,e[18]=b,e[19]=f,e[20]=j,e[21]=p):p=e[21];let k;return e[22]!==y||e[23]!==p?(k=n.jsxs(n.Fragment,{children:[y,p]}),e[22]=y,e[23]=p,e[24]=k):k=e[24],k}function Tr(){const t=V(),e=Me(),s=cn(),{create:r}=It(),{org:i}=ae(),o=je({strict:!1}).org??"",c=Ae({strict:!1}),u=et(),l=Rt(),d=Et(),[m]=D.useState(()=>crypto.randomUUID()),{data:f}=pe.useSession(),[h]=D.useState(()=>Ct(f?.user?.name||f?.user?.email?.split("@")[0])),j=Xe(),y=D.useSyncExternalStore(j.threads.subscribe,j.threads.get),v=D.useSyncExternalStore(j.threadsStatus.subscribe,j.threadsStatus.get),x=Fe(l),g=!!(x&&_t(x)),b=Mt(x,null),[S,p]=D.useState(null);u!==null&&S!==null&&p(null);const k=u===null&&!!d&&!!x&&S!==l,T=z=>Ws(z,l,f?.user?.id,Pt(x?.metadata),g,{baseBranch:b}),N=k&&v.kind!=="loading"?T(y):void 0,w=ur(l,k&&v.kind!=="loading"&&!N),_=cr(u,l,h);da(_.status==="ready"?_.task:null);const P=x?.metadata?.ui?.layout??null,C=P?{defaultMainView:P.defaultMainView??null,chatDefaultOpen:P.chatDefaultOpen??null}:null,M=tn(C),{threadId:A,providerKey:$}=Ya({routeThreadId:u,fallbackKey:m}),F=async()=>{const z=crypto.randomUUID(),E=y.find(H=>H.id===A)?.branch??null;try{await r({id:z,virtual_mcp_id:l,...E?{branch:E}:{}})}catch{}s(z,()=>({}))},O=D.useRef(null);D.useEffect(()=>{const z=E=>{us(E)&&E.shiftKey&&E.code==="KeyS"&&!E.repeat&&(E.preventDefault(),O.current?.())};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[]);const R=_.status==="ready"?_.task:null,I=R?.virtual_mcp_id;if(R&&I&&!dn({routeAgentId:l,threadAgentId:I})){const z=os({org:o,agentId:I,superAgentId:ye(i.id).id});return n.jsx(tt,{target:{route:z,search:{thread:R.id,sidepanel:c.sidepanel,mainpanel:c.mainpanel,autosend:c.autosend}}})}if(k){if(v.kind==="loading"||w.status==="loading")return n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex h-full bg-background shadow-edge rounded-[0.75rem]",children:n.jsx(cs,{})})});const E=(N??(w.status==="ready"?T(w.threads):void 0))?.id??(g?m:null);if(E)return n.jsx(ds,{to:".",replace:!0,search:H=>({...H,thread:E})});p(l)}return _.status==="creating"||_.status==="loading"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background shadow-edge rounded-[0.75rem] text-sm text-muted-foreground",children:[n.jsx(Pe,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})}):_.status==="error"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"alert",className:"flex flex-col h-full items-center justify-center gap-2 bg-background shadow-edge rounded-[0.75rem] p-8 text-sm",children:[n.jsx("div",{className:"font-medium",children:t("agentShellLayout.agentShellLayout.taskUnavailable")}),n.jsx("div",{className:"text-muted-foreground",children:_.error.message})]})}):x?n.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:n.jsx(q.Provider,{virtualMcpId:l,task:_.status==="ready"?_.task:null,children:n.jsx(Cs,{layout:M,children:n.jsx(jr,{virtualMcpId:l,hasActiveRepository:g,sandboxMap:x.metadata?.sandboxMap,children:n.jsx(vr,{threadId:A,providerKey:$,children:n.jsx(Ie,{children:n.jsx(kr,{layout:M,onNewTaskRef:O,createNewTask:F})})})})})},l)}):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden shadow-edge rounded-[0.75rem]",children:n.jsx(At,{image:n.jsx(We,{size:48,className:"text-muted-foreground"}),title:t("agentShellLayout.agentShellLayout.agentNotFound"),description:t("agentShellLayout.agentShellLayout.agentNotFoundDescription",{virtualMcpId:l}),actions:n.jsx(qe,{variant:"outline",onClick:()=>e({to:"/$org",params:{org:o}}),children:t("agentShellLayout.agentShellLayout.goToOrgHome")})})})})}function Po(){const t=L.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=je(e);if(s.taskId!==void 0){let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(pr,{}),t[1]=i):i=t[1],i}if(s._splat!==void 0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(bt,{}),t[2]=i):i=t[2],i}let r;return t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Ie,{children:n.jsx(fr,{children:n.jsx(wn,{children:n.jsxs(In,{children:[n.jsx(Tr,{}),n.jsx(xr,{})]})})})}),t[3]=r):r=t[3],r}export{Po as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as P,r as i,eB as ce,br as le,c as X,e as de,ec as q,j as I,a4 as fe,R as Se}from"./index-
|
|
1
|
+
import{q as P,r as i,eB as ce,br as le,c as X,e as de,ec as q,j as I,a4 as fe,R as Se}from"./index-Df31jXxo.js";import{i as me,c as pe,u as ye}from"./chat-context-8d724Biw.js";import{u as Ee}from"./use-mcp-client-Dfp_zv7i.js";import{u as he}from"./use-session-runtime-BgpZYJe5.js";import{u as xe}from"./thread-intent-Bdfd2QLx.js";import{e as Re}from"./backoff-CrEUbyZT.js";import{u as we}from"./use-sandbox-events-DBlkaRHT.js";import{d as Ae}from"./sandbox-start-errors-BK_aDCyt.js";function be(e,t){const n=P(t);return Pe({filters:{...e,status:"pending"}},n).length}function j(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function Pe(e={},t){const n=P(t).getMutationCache(),r=i.useRef(e),s=i.useRef(null);return s.current===null&&(s.current=j(n,e)),i.useEffect(()=>{r.current=e}),i.useSyncExternalStore(i.useCallback(o=>n.subscribe(()=>{const u=ce(s.current,j(n,r.current));s.current!==u&&(s.current=u,le.schedule(o))}),[n]),()=>s.current,()=>s.current)}async function Te(e,t,n){const r=await e.callTool({name:t,arguments:n});if(r.isError){const s=r.content?.[0]?.text??`Tool ${t} failed without a message`;throw new Error(s)}return r}const Y=["SANDBOX_START"],w=new Map,Ce=e=>`${e.virtualMcpId}::${e.branch??""}`,ke=e=>e.message.includes("retry shortly"),L=new Set,g={mark:(e,t)=>L.add(`${e}::${t}`),clear:(e,t)=>L.delete(`${e}::${t}`),isStopped:(e,t)=>L.has(`${e}::${t}`)};function _e(e,t){const n=P();return de({mutationKey:Y,retry:(r,s)=>ke(s)&&r<6,retryDelay:r=>Re(5e3,500,r,2,0),mutationFn:async r=>{r.branch&&g.clear(r.virtualMcpId,r.branch);const s=Ce(r),o=w.get(s);if(o)return o;const u=(async()=>(await Te(e,"SANDBOX_START",r)).structuredContent)();w.set(s,u);try{return await u}finally{w.get(s)===u&&w.delete(s)}},onSuccess:()=>{q(n),t?.onStarted?.()}})}function Ge(e,t){const n=X.c(3);let r;return n[0]!==t||n[1]!==e?(r={mutationKey:Y,predicate:o=>{if(!e)return!1;const u=o.state.variables;return!u||u.virtualMcpId!==e?!1:(u.branch??"")===(t??"")}},n[0]=t,n[1]=e,n[2]=r):r=n[2],be(r)>0}function Ue(e){return e.appPaused||e.userStopped?{kind:"suspended"}:e.startError&&!e.previewUrl?{kind:"errored",error:e.startError}:e.previewUrl?{kind:"iframe",previewUrl:e.previewUrl}:{kind:"starting"}}function Le(e){return e.executionEnabled&&e.sessionRuntime==="sandbox"&&e.hasActiveRepository&&!!e.userId&&!!e.branch&&!e.vmEntry&&!e.userStopped&&!e.isPending&&!e.attempted}function Ze(e){return e.threadLoaded&&e.isOwner&&e.hasActiveRepository&&!e.branch&&!e.attempted}function ge(e){return e.executionEnabled&&e.notFound&&!!e.deadVmId&&!e.isPending&&!e.userStopped&&e.deadVmId!==e.lastDeadVmId}function et(e){const{agentSandboxMap:t,threadSandboxMap:n,userId:r,branch:s}=e,o=e.ownerId??r;if(!r||!o||!s)return t;const u=n?.[o]?.[s];return u?{...t??{},[r]:{...t?.[r]??{},[s]:u}}:t}function A(e,t,n){const r={virtualMcpId:e};return t&&(r.branch=t),n&&(r.threadId=n),r}const Q=2,De=new Set(["scheduling-timeout","reconciler-error","claim-never-created","unknown"]);function J(e){return De.has(e)}function $e(e){return e.executionEnabled&&e.failedReason!==null&&J(e.failedReason)&&e.attempts<Q&&!e.isPending&&!e.userStopped&&!e.alreadyHandled}const Be={branch:null,count:0,handled:!1};function Oe(e,t){return e.branch===t?e:{branch:t,count:0,handled:!1}}function Ve(e){return e.mutationError?e.mutationError:e.phase?.kind==="failed"&&!e.startPending&&e.claimRetryExhausted?{code:null,message:e.phase.message}:null}function Fe(e){switch(e.kind){case"suspended":return"suspended";case"iframe":return"running";case"starting":return"starting";case"errored":return"errored"}}function M(e,t){return`${e??""}::${t??""}`}function ve(e){const t=e.vmEntry?.previewUrl??null;return t||(e.seeded?.key===e.key?e.seeded.url:null)}function b(e){const{data:t,virtualMcpId:n,branch:r}=e;t?.branch&&!r&&e.setCurrentTaskBranch(t.branch),t?.previewUrl&&e.setSeededPreviewUrl({key:M(n,t.branch??r),url:t.previewUrl})}const Ke={branch:null,previewState:{kind:"starting"},status:"idle",vmEntry:null,previewUrl:null,userStopped:!1,start:()=>{},stop:async()=>{},restart:async()=>{},retry:()=>{},resume:()=>{}},W=i.createContext(Ke);function tt(){return i.use(W)}const z=me(W);function nt(e){const t=X.c(10);let n,r,s;t[0]!==e?({resetKey:s,children:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=s):(n=t[1],r=t[2],s=t[3]);let o;t[4]!==r||t[5]!==s?(o=I.jsx(Ne,{...r},s),t[4]=r,t[5]=s,t[6]=o):o=t[6];let u;return t[7]!==n||t[8]!==o?(u=I.jsx(z.Host,{source:o,children:n}),t[7]=n,t[8]=o,t[9]=u):u=t[9],u}function Ne(e){return z.usePublish(He(e)),null}function He({executionEnabled:e,virtualMcpId:t,branch:n,userId:r,hasActiveRepository:s,vmEntry:o,threadId:u}){const{org:T}=fe(),{setCurrentTaskBranch:l}=pe(),G=xe(),p=we(),Z=P(),D=he(t),ee=D.resolved?D.runtime:null,d=ye()?.taskId??null,$=Ee({connectionId:Se,orgId:T.id,orgSlug:T.slug}),c=_e($,{onStarted:()=>{u&&G?.refreshThreadMetadata(u)}}),{mutate:f,reset:te}=c,[ne,S]=i.useState(null),C=i.useRef(new Set),k=i.useRef(null),[B,x]=i.useState(Be),E=Oe(B,n);E!==B&&x(E);const y=p.phase?.kind==="failed"?p.phase:null,O=ve({vmEntry:o,seeded:y?null:ne,key:M(t,n)}),h=!!t&&!!n&&g.isStopped(t,n),re=p.status.state==="paused",se=!y||!J(y.reason)||E.count>=Q,oe=Ve({mutationError:c.isError&&c.error?Ae(c.error.message):null,phase:p.phase,startPending:c.isPending,claimRetryExhausted:se}),V=Ue({previewUrl:O,appPaused:re,userStopped:h,startError:oe}),ae=Fe(V),_=n??"",ue=C.current.has(_),F=Le({executionEnabled:e,hasActiveRepository:s,userId:r,branch:n,vmEntry:o,userStopped:h,isPending:c.isPending,attempted:ue,sessionRuntime:ee});i.useEffect(()=>{if(!F||!t)return;C.current.add(_);const m=A(t,n,d);f(m,{onSuccess:a=>{b({data:a,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:a=>{console.error("[sandbox-lifecycle] auto-start failed:",a)}})},[F,_,n,t,d,f,l,S]);const R=p.notFound?o?.sandboxHandle??null:null,v=ge({executionEnabled:e,notFound:p.notFound,deadVmId:R,lastDeadVmId:k.current,isPending:c.isPending,userStopped:h});i.useEffect(()=>{if(!v||!R||!t)return;k.current=R;const m=A(t,n,d);f(m,{onSuccess:a=>{b({data:a,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:a=>{console.error("[sandbox-lifecycle] self-heal failed:",a)}})},[v,R,t,n,d,f,l,S]);const K=$e({executionEnabled:e,failedReason:y?.reason??null,attempts:E.count,isPending:c.isPending,userStopped:h,alreadyHandled:E.handled});i.useEffect(()=>{if(!y){x(a=>a.handled?{...a,handled:!1}:a);return}if(!K||!t)return;x(a=>({...a,handled:!0,count:a.count+1}));const m=A(t,n,d);f(m,{onSuccess:a=>{b({data:a,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:a=>{console.error("[sandbox-lifecycle] claim auto-retry failed:",a)}})},[y,K,t,n,d,f,l,S]);const U=()=>{if(!e||!t)return;const m=A(t,n,d);f(m,{onSuccess:a=>{b({data:a,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:a=>{console.error("[sandbox-lifecycle] user start failed:",a)}})},N=async()=>{if(!(!e||!t||!n)&&o){g.mark(t,n);try{await $.callTool({name:"SANDBOX_DELETE",arguments:{virtualMcpId:t,branch:n}})}catch{}q(Z)}},ie=async()=>{await N(),U()},H=()=>{C.current=new Set,k.current=null,x({branch:n,count:0,handled:!1}),te(),U()};return{branch:n,previewState:V,status:ae,vmEntry:o,previewUrl:O,userStopped:h,start:U,stop:N,restart:ie,retry:H,resume:H}}export{nt as S,tt as a,_e as b,et as o,Ze as s,Ge as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aK as r,dZ as p,dX as _,aL as n,cU as o,cT as m}from"./index-
|
|
1
|
+
import{aK as r,dZ as p,dX as _,aL as n,cU as o,cT as m}from"./index-Df31jXxo.js";const f=r({key:n().min(1,"Key is required"),value:n()}),g=r({title:n().min(1,"Name is required"),description:n().nullable().optional(),icon:n().nullable().optional(),ui_type:m(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:n().optional(),connection_token:n().nullable().optional(),npx_package:n().optional(),stdio_command:n().optional(),stdio_args:n().optional(),stdio_cwd:n().optional(),env_vars:o(f).optional(),configuration_scopes:o(n()).nullable().optional(),configuration_state:p(n(),_()).nullable().optional()}).refine(e=>e.ui_type==="NPX"?!!e.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(e=>e.ui_type==="STDIO"?!!e.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(e=>e.ui_type==="HTTP"||e.ui_type==="SSE"||e.ui_type==="Websocket"?!!e.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]}).refine(e=>(e.ui_type==="HTTP"||e.ui_type==="SSE"||e.ui_type==="Websocket")&&e.connection_url?.trim()?n().url().safeParse(e.connection_url.trim()).success:!0,{message:"Enter a valid URL",path:["connection_url"]});function S(e,u,s){const a=i=>{if(i==="*")return!0;const c=i.split("::")[0]??"";let t=s;for(const l of c.split(".")){if(t===null||typeof t!="object")return!1;t=t[l]}return t!=null};return[...new Set([...e,...u.filter(a)])]}export{S as a,g as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aK as s,cS as e,aL as a,cT as d,cU as l}from"./index-
|
|
1
|
+
import{aK as s,cS as e,aL as a,cT as d,cU as l}from"./index-Df31jXxo.js";const o=500;s({title:a().max(o),url:a().max(o),icon:a().max(o)});const t=s({keyId:a().max(o),modelId:a().max(o),title:a().max(o).optional()}).nullable();d(["fast","smart","thinking","image","web_search","deep_research"]);d(["fast","smart","thinking"]);const b=s({tiers:s({fast:t,smart:t,thinking:t,image:t,web_search:t,deep_research:t})});s({tiers:s({fast:t.optional(),smart:t.optional(),thinking:t.optional()})});const f=50,c=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/;s({host:a().trim().toLowerCase().min(1).max(o).regex(c).describe("Git host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:a().min(1).max(o).describe("Vault secret id holding the PAT used to authenticate this host.")});s({ids:l(a().max(o)).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});const u=s({voice_mode:e().optional(),home_task_intake_enabled:e().optional().describe("Show Task mode on the Home composer and allow reports to start tasks."),demo_mode:e().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),demo_board_reset:e().optional().describe("Curated demo org: every morning the task board returns to its captured snapshot, and admins can reset or recapture it on demand."),reports_only:e().optional().describe("Curated Deco Score look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),reviewer_enabled:e().optional().describe("Run the Reviewer on a task's pull request when the card reaches In Review — it reviews the code with the repo's stack-appropriate skills, fixes what it finds on the PR's own branch, then exercises the change on the deploy preview and approves or hands the card to a human."),qa_agent_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:e().optional().describe("When a card reaches Ready for Deployment, merge its pull request automatically instead of waiting for someone to press Ship."),auto_resolve_conflicts:e().optional().describe("When a pull request in Ready for Deployment can't be merged because it conflicts with its base branch, hand it back to the Super Agent to resolve the conflict (check out the branch, merge the base, push). Unset, it follows `auto_merge`; set it explicitly to run one without the other."),cheap_reviewer_model:e().optional().describe("Run the Reviewer on a cheaper model than the Super Agent that wrote the code. On by default — turning it off trades cost for some review depth."),coding_agent_org_mcps:e().optional().describe("Give a coding-agent run (the claude-code harness in a sandbox) every MCP connection in the org as its own MCP server, on top of the narrow Studio surface it always gets. Off by default: each connection is one more server the agent connects to at session start, and all of their tools land in its context."),coding_agents_claude_code:e().optional().describe("Run chats on a Code Agent (an agent imported from a GitHub repo) with the claude-code harness inside its sandbox, instead of hosted Decopilot. Off by default: it changes the runtime of every such chat, and claude-code flushes whole turns rather than streaming tokens."),task_board_codex:e().optional().describe("Allow tasks to select the Codex harness. Off by default; existing tasks keep Claude Code. Reviewers keep their own runtime."),chat_harness_codex:e().optional().describe("Use Codex for new sandbox chats. Off by default; requires hosted sandboxes and a ChatGPT subscription or Responses API provider. Existing chats keep their pinned runtime."),chat_harness_sandbox_only:e().optional().describe("Run every chat with the claude-code harness in its own sandbox instead of hosted Decopilot. On by default (see DEFAULT_ON_FLAGS); a deployment without hosted sandboxes keeps Decopilot regardless."),sandbox_run_metadata:e().optional().describe("Forward a sandbox run's metadata (such as a webhook trigger's run_metadata) to the MCP tools it calls, as hosted Decopilot runs do. Off by default."),sandbox_repo_snapshots:e().optional().describe("Keep a Freestyle snapshot of each project repo at its default branch's head, with its dependencies installed and its dev server running, so a new sandbox for that repo starts already serving. Off by default: each push to a default branch costs a snapshot build the next time a sandbox starts."),auto_assign_report_tasks_to_super_agent:e().optional().describe("When a Deco Score import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),hosting_enabled:e().optional().describe("Per-site Hosting tab (deployments, domains, deploy outcomes). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),deco_analytics_enabled:e().optional().describe("Per-site Deco Analytics tab (traffic, realtime, usage & limits). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),e2e_enabled:e().optional().describe("Per-site E2E tab (end-to-end test runs). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),experiments_enabled:e().optional().describe("Per-site Experiments tab (A/B tests + variant results). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org."),experiments_v2_enabled:e().optional().describe("Rebuilt Experiments tab: describe the test in prose and an agent drafts it, plus inline editing and the implement/preview tools that write the split into the site. Off by default — an org without it keeps the table-and-dialog tab, which only records experiment metadata. Requires `experiments_enabled`, which still decides whether the tab exists at all."),monitor_enabled:e().optional().describe("Per-site Monitor tab (CDN Performance + Audience from the stats-lake warehouse). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. Its own deployment-wide switch `MONITOR_GA` opens it to every org at once (independent of the control-plane trio)."),site_create_enabled:e().optional().describe('The "Create a new site" option under New project: generates a GitHub repository from a site template in an account the org connected, and opens it as a project. Off by default, for every org — deco.cx staff included.'),new_blocks_editor:e().optional().describe("Use the redesigned blocks editor for every member of the organization. Off by default — the classic editor stays until an admin opts the org in."),blog_ai_enabled:e().optional().describe("The blog's brand context tab and its agentic generation — campaigns, post drafting and link suggestions. Off by default; with it off the blog is written by hand and every BLOG_* tool refuses, over MCP and in the app alike, so an agent cannot spend the organization's credits on a feature it turned off."),site_apps_install_enabled:e().optional().describe("Installing a site app from the Apps tab: writes the app module, the npm dependency and the registry entry into the project's repository, then reinstalls dependencies and restarts the dev script on the running sandbox. Off by default, for every org — the catalogue stays browsable without it and nothing is installable. Rollout lever, separate from the deploy."),multi_app_preview:e().optional().describe("Previewing more than one app of a monorepo: an Apps list in project settings, app tabs with a split view in the preview, and a dev server per extra app in the sandbox, served at its own preview host. Off by default."),hide_default_blog_blocks:e().optional().describe("Hide the `deco-cms/blog` built-in post blocks everywhere a post is written — the inserter, the format briefs, and generated drafts — so only the site's own `site/sections/Blog/Post/*` blocks are eligible. Off by default. Blocks already present in a post keep rendering; this only governs what can be added.")}),h=new Set(["reviewer_enabled","cheap_reviewer_model","chat_harness_sandbox_only"]);function g(i,n){const r=i?.[n];return h.has(n)?r!==!1:r===!0}function m(i){const n=i?.auto_resolve_conflicts;return typeof n=="boolean"?n:i?.auto_merge===!0}export{h as D,f as G,u as O,b as S,m as a,c as b,g as o};
|