decocms 4.415.5 → 4.416.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CIFSd5U6.js → AlertCircle-RWTRMbKB.js} +1 -1
- package/dist/client/assets/{AreaChart-n2dZBP5X.js → AreaChart-DXYhyL1O.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Cs3E2BgS.js → ArrowLeft-B0Qy6MPA.js} +1 -1
- package/dist/client/assets/{ArrowRight-DdzTB6qI.js → ArrowRight-1ZRv0qj4.js} +1 -1
- package/dist/client/assets/{ArrowUp-D2UY3OMh.js → ArrowUp-CdkBKRTp.js} +1 -1
- package/dist/client/assets/{CartesianChart-V3ArQ0Ow.js → CartesianChart-DxxWBH9Y.js} +1 -1
- package/dist/client/assets/{Check-CaNT0o8-.js → Check-B08g8hfv.js} +1 -1
- package/dist/client/assets/{CheckCircle-BcLFM9-7.js → CheckCircle-C2FTUn3P.js} +1 -1
- package/dist/client/assets/{ChevronUp-BU7d4Get.js → ChevronUp-C43CLLe7.js} +1 -1
- package/dist/client/assets/{Copy01-BUTI0qm9.js → Copy01-BFGk4HTi.js} +1 -1
- package/dist/client/assets/{CreditCard01-JGaESeVs.js → CreditCard01-D1x66FDR.js} +1 -1
- package/dist/client/assets/{DotsVertical-CIYGxTTU.js → DotsVertical-D5Nqj0bW.js} +1 -1
- package/dist/client/assets/{ErrorBarContext--AuQGMxS.js → ErrorBarContext-Bka8_hCU.js} +1 -1
- package/dist/client/assets/{Image01-BZEauj2T.js → Image01-C3rMiZ72.js} +1 -1
- package/dist/client/assets/{Key01-RaCvEF1t.js → Key01-DJx3H4Mk.js} +1 -1
- package/dist/client/assets/{Line-Be2Fy-pZ.js → Line-U3trYLWi.js} +1 -1
- package/dist/client/assets/{Link01-B4kFCKUO.js → Link01-DpMZQMbW.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Cn0PsKoO.js → LinkExternal01-Hrpy2rKU.js} +1 -1
- package/dist/client/assets/{Monitor01-DDhoI_iK.js → Monitor01-CHeJ4cBZ.js} +1 -1
- package/dist/client/assets/{Palette-BUkGC_ZN.js → Palette-Bowo13XO.js} +1 -1
- package/dist/client/assets/{Plus-0VzOcDpy.js → Plus-g-qUeP-5.js} +1 -1
- package/dist/client/assets/{SearchMd-DvVcOTQO.js → SearchMd-Bu5ZPloJ.js} +1 -1
- package/dist/client/assets/{Sector-9tybsTj9.js → Sector-CoFH2hT0.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DkKlB-7l.js → ShoppingBag01-eap5At3d.js} +1 -1
- package/dist/client/assets/{Sun-X5oRKWho.js → Sun-CQdyCDq1.js} +1 -1
- package/dist/client/assets/{Tool01-BThW1knZ.js → Tool01-CQE4YIlY.js} +1 -1
- package/dist/client/assets/{Trash01-CWZehatA.js → Trash01-ttayP08D.js} +1 -1
- package/dist/client/assets/{Upload01-DBJMMF89.js → Upload01-CxxYSCYc.js} +1 -1
- package/dist/client/assets/{User01-CkC9PpwU.js → User01-gfze9rr9.js} +1 -1
- package/dist/client/assets/{UserSquare-D_CN0irU.js → UserSquare-OqUaFYcL.js} +1 -1
- package/dist/client/assets/{Users01-Bly3LhS2.js → Users01-CrUbTlAS.js} +1 -1
- package/dist/client/assets/{X-B2uln9s5.js → X-DmQciAIn.js} +1 -1
- package/dist/client/assets/{XAxis-M6tZ2obd.js → XAxis-CXI1Q_NM.js} +1 -1
- package/dist/client/assets/{XClose-BXY1fsWn.js → XClose-C_pErei1.js} +1 -1
- package/dist/client/assets/{ZoomOut-T_sjF8JP.js → ZoomOut-CacJRCxL.js} +1 -1
- package/dist/client/assets/{access-gate-CA8I0iHR.js → access-gate-Dfd2-cvG.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-kGctlCUa.js → add-connection-dialog-CpdIqje1.js} +1 -1
- package/dist/client/assets/{agent-analytics-BexuCA7I.js → agent-analytics-gXgo4wia.js} +1 -1
- package/dist/client/assets/agent-app-DEDo3dMv.js +1 -0
- package/dist/client/assets/{agent-assets-5R68kfP3.js → agent-assets-CZSlfOSJ.js} +1 -1
- package/dist/client/assets/{agent-automation-vuVO0lMZ.js → agent-automation-vBt8WQOK.js} +1 -1
- package/dist/client/assets/{agent-automations-BdmtLK0F.js → agent-automations-CP1b9Nsk.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-nPGJrjJB.js → agent-connect-sources-5sgGl2E-.js} +1 -1
- package/dist/client/assets/agent-deck-BJYJReZO.js +1 -0
- package/dist/client/assets/{agent-e2e-EFIGYD5n.js → agent-e2e-B4edQET4.js} +1 -1
- package/dist/client/assets/{agent-experiments-DskaK8J-.js → agent-experiments-DQzvZ_es.js} +1 -1
- package/dist/client/assets/{agent-file-Cu8RBins.js → agent-file-DLxt_ubk.js} +1 -1
- package/dist/client/assets/{agent-git-Qk00_Ilv.js → agent-git-DEl486St.js} +1 -1
- package/dist/client/assets/{agent-hosting-DpQzkSmA.js → agent-hosting-4LPaLHdE.js} +1 -1
- package/dist/client/assets/{agent-icon-B0fEYlzS.js → agent-icon-DIz0uejY.js} +1 -1
- package/dist/client/assets/agent-library-CoHgiZIn.js +1 -0
- package/dist/client/assets/agent-library-file-7lDILbsL.js +1 -0
- package/dist/client/assets/{agent-monitor-7fRsRp5r.js → agent-monitor-Ah3eDirJ.js} +1 -1
- package/dist/client/assets/{agent-overview-CI4IBzdY.js → agent-overview-8ZN9_3uB.js} +1 -1
- package/dist/client/assets/agent-settings-DJzG_zQJ.js +1 -0
- package/dist/client/assets/{agent-site-editor-D5zeaP6i.js → agent-site-editor-Bx2zsPso.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-ClSo7cnM.js +2 -0
- package/dist/client/assets/agent-site-editor-content-D_UDvzRI.js +9 -0
- package/dist/client/assets/{agent-site-editor-preview-zrEPcj_q.js → agent-site-editor-preview-C8TBrMnH.js} +3 -3
- package/dist/client/assets/agent-view-BZH9Da00.js +1 -0
- package/dist/client/assets/{agent-view-guard-CydgwF8V.js → agent-view-guard-xEP9IoJ0.js} +1 -1
- package/dist/client/assets/{agents-list-Dst0vLYD.js → agents-list-CtcL4kL-.js} +1 -1
- package/dist/client/assets/{ai-providers-Dyx-ekUR.js → ai-providers-Dj5oaz9D.js} +1 -1
- package/dist/client/assets/{alert-Cs3h8VEi.js → alert-BRnmUkhb.js} +1 -1
- package/dist/client/assets/{alert-dialog-DJp_Ityl.js → alert-dialog-UJiEdIyw.js} +1 -1
- package/dist/client/assets/{analytics-sections-DCH9uTvB.js → analytics-sections-B-DAxD5H.js} +1 -1
- package/dist/client/assets/{api-keys-1sQjJhuB.js → api-keys-BYl5Adwp.js} +1 -1
- package/dist/client/assets/api-keys-OITE72q9.js +1 -0
- package/dist/client/assets/app-editor-BOl-YTbj.js +1 -0
- package/dist/client/assets/{asset-utils-CH-E2ZK-.js → asset-utils-D9rWPK_p.js} +1 -1
- package/dist/client/assets/{auth-D32cXta1.js → auth-DATmrrln.js} +1 -1
- package/dist/client/assets/{auth-catchall-DMXzCu4C.js → auth-catchall-DuCdZlsp.js} +1 -1
- package/dist/client/assets/{auth-entry-DUD28kAE.js → auth-entry-BLVdqtxL.js} +1 -1
- package/dist/client/assets/{auth-split-layout-D4hDB6K9.js → auth-split-layout-hNFBrueo.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-nxqo5RHp.js → authenticate-and-persist-oauth-BLoneiuH.js} +1 -1
- package/dist/client/assets/{automation-list-row-DKge22DJ.js → automation-list-row-BtLqQMkH.js} +1 -1
- package/dist/client/assets/{automation-runs-BjPF6LD5.js → automation-runs-Bd5b1WuV.js} +1 -1
- package/dist/client/assets/{automations-CahUqw7W.js → automations-vKqxqQNC.js} +1 -1
- package/dist/client/assets/{autosend-B0cwcoZQ.js → autosend-CmBucBqr.js} +1 -1
- package/dist/client/assets/{avatar-DSv7rQey.js → avatar-DnHqCpqr.js} +1 -1
- package/dist/client/assets/{badge-BVm53kyq.js → badge-DsCXhAux.js} +1 -1
- package/dist/client/assets/{block-document-D8cOPhhp.js → block-document-mRUILn6g.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BKbOMRuN.js → blocks-preview-workspace-context-B0MPCoC-.js} +1 -1
- package/dist/client/assets/{buckets-qN50y_8N.js → buckets-BxgRyJ_U.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-CC90CrN1.js → build-improve-prompt-doc-B3NoXNkQ.js} +1 -1
- package/dist/client/assets/{calendar-DJtSYtKm.js → calendar-DqQMMLc-.js} +1 -1
- package/dist/client/assets/{capability-load-error-BE5lkHsD.js → capability-load-error-AKSk2IJm.js} +1 -1
- package/dist/client/assets/{category-editor-CiXlFZY7.js → category-editor-CMD4R07W.js} +1 -1
- package/dist/client/assets/{chart-DqY7SXIi.js → chart-CR5bi_LF.js} +1 -1
- package/dist/client/assets/{chat-context-DFdcIErL.js → chat-context-BUNOOLZ7.js} +1 -1
- package/dist/client/assets/{chat-draft-BtGF7bzA.js → chat-draft-BTyf-RT4.js} +1 -1
- package/dist/client/assets/{checkbox-CKTKlc0c.js → checkbox-kO5XQBSL.js} +1 -1
- package/dist/client/assets/{choose-editor-Err48-Lf.js → choose-editor-B6NluJVn.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-iLfMCvUg.js → claim-phase-copy-qWrlXIki.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BkmZGWTI.js → cli-auth-success-AbWgCiyC.js} +1 -1
- package/dist/client/assets/{client-icons-DAh8_gqZ.js → client-icons-CFQbQxLU.js} +1 -1
- package/dist/client/assets/{collapsible-CKtvk2qR.js → collapsible-cP4qew3h.js} +1 -1
- package/dist/client/assets/{collection-detail-Duw5_YbG.js → collection-detail-BLv1KOfa.js} +1 -1
- package/dist/client/assets/{collection-display-button-CoPEzt2N.js → collection-display-button-DaMyx89l.js} +1 -1
- package/dist/client/assets/{collection-search-BRvScCfK.js → collection-search-Ch2FLY2_.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BbFo2vuN.js → collection-table-wrapper-CHr7Adsw.js} +1 -1
- package/dist/client/assets/{collection-tabs-DYXVQ5CX.js → collection-tabs-DVUgETfM.js} +1 -1
- package/dist/client/assets/{combobox-BSDZKZEG.js → combobox-DMurdTGm.js} +1 -1
- package/dist/client/assets/{command-3VOIGXTI.js → command-BDRqfDOz.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-DjksUrm1.js → companion-mcps-section-Cc2aSyu_.js} +1 -1
- package/dist/client/assets/{config-CB5vGL2_.js → config-FL7tBmjS.js} +1 -1
- package/dist/client/assets/{connect-CJcFVZSc.js → connect-DuMnksNc.js} +1 -1
- package/dist/client/assets/{connect-layout-Df1OVOPH.js → connect-layout-Dynemyno.js} +1 -1
- package/dist/client/assets/{connection-CghRZvH1.js → connection-CTmr-OMV.js} +1 -1
- package/dist/client/assets/{connection-card-CM7cJdHp.js → connection-card-BMQxerrE.js} +1 -1
- package/dist/client/assets/{connection-detail-DZj5ll2f.js → connection-detail-BYLV3H48.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BXAo8rkG.js → connection-form-helpers-DwWzoy-c.js} +1 -1
- package/dist/client/assets/{connections-DOaUllXK.js → connections-DPwWFeUy.js} +1 -1
- package/dist/client/assets/{context-DD8l5XSD.js → context-CB_J_TC8.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-C_zeaDpV.js → create-organization-dialog-whUB6mPv.js} +1 -1
- package/dist/client/assets/{decopilot-fXzeGhfJ.js → decopilot-Bv_sAiFM.js} +1 -1
- package/dist/client/assets/{dialog-CYKucQEn.js → dialog-5o2urGn5.js} +1 -1
- package/dist/client/assets/{discover-BeDY4eoX.js → discover-oeQTrlAh.js} +1 -1
- package/dist/client/assets/{domain-settings-COnOYeBB.js → domain-settings-DDBWv2RW.js} +1 -1
- package/dist/client/assets/{download-app-dialog-ilxwkPe1.js → download-app-dialog-IVAbk28w.js} +1 -1
- package/dist/client/assets/{drawer-DG-A7uu9.js → drawer-CkYlAGZd.js} +1 -1
- package/dist/client/assets/{editor-D6m-Mg9w.js → editor-D-lV1BCh.js} +1 -1
- package/dist/client/assets/{empty-state-CLHHI2Dq.js → empty-state-Bm3wB0lq.js} +1 -1
- package/dist/client/assets/{empty-state-C-cMIo1T.js → empty-state-ae548Szk.js} +1 -1
- package/dist/client/assets/{extract-connection-data-B-G_DpF-.js → extract-connection-data-mgYWyu5I.js} +1 -1
- package/dist/client/assets/{feature-gate-CysfdGto.js → feature-gate-Cg4_Q8Ke.js} +1 -1
- package/dist/client/assets/{feature-paywall-D7E_OmlQ.js → feature-paywall-CNWP0h2q.js} +1 -1
- package/dist/client/assets/{file-explorer-CCx_G_Xm.js → file-explorer-Bnzy8sav.js} +1 -1
- package/dist/client/assets/{file-preview-C7iqsPcD.js → file-preview-Cd-BJ067.js} +1 -1
- package/dist/client/assets/{file-share-button-weodJ1fg.js → file-share-button-DpD-UIy8.js} +1 -1
- package/dist/client/assets/{file-type-icon-GNT0wjq6.js → file-type-icon-ChEWF5Jy.js} +1 -1
- package/dist/client/assets/flat-project-nbeY-YkM.js +1 -0
- package/dist/client/assets/{folder-icon-DNT5ZPCH.js → folder-icon-BrQ4KNEw.js} +1 -1
- package/dist/client/assets/{form-BuKMCQ_-.js → form-CparX5oE.js} +1 -1
- package/dist/client/assets/{gateway-client-BtY2d8II.js → gateway-client-DGz23Vlr.js} +1 -1
- package/dist/client/assets/{general-Dd-PiJly.js → general-D7PWQ7-z.js} +1 -1
- package/dist/client/assets/{home-CA465RbP.js → home-890Qnqbx.js} +1 -1
- package/dist/client/assets/{index-DzdUtt7w.js → index-33Is4zHe.js} +1 -1
- package/dist/client/assets/{index-ySi4Pwot.js → index-BNVSW_Xa.js} +1 -1
- package/dist/client/assets/{index-8DK0gqav.js → index-Bencuqrd.js} +1 -1
- package/dist/client/assets/{index-BJCqpqJd.js → index-Bo0F7TR2.js} +4 -4
- package/dist/client/assets/{index-BUGmQlES.js → index-C-t9tcus.js} +1 -1
- package/dist/client/assets/{index-QiV1VAG0.js → index-C4bAKRLA.js} +1 -1
- package/dist/client/assets/{index-B20d8ck9.js → index-C5-WvLpU.js} +1 -1
- package/dist/client/assets/{index-D0r-H4rb.js → index-CQV19DFZ.js} +1 -1
- package/dist/client/assets/{index-CGwg_b5-.js → index-CSFjWyPp.js} +1 -1
- package/dist/client/assets/{index-DIZnX8_b.js → index-CUa4r7Sg.js} +3 -3
- package/dist/client/assets/{index-X0RgFz8Y.js → index-N982P05Q.js} +1 -1
- package/dist/client/assets/{index-Cv3qPBot.js → index-NYSezzil.js} +1 -1
- package/dist/client/assets/{index-_bGtHSkW.js → index-SNhzEDgK.js} +1 -1
- package/dist/client/assets/{index-BMdQXKlL.js → index-brBX7xEM.js} +1 -1
- package/dist/client/assets/{index-redirect-COkcwXCv.js → index-redirect-C3Q4Ea2j.js} +1 -1
- package/dist/client/assets/{index-Bz8Yokmw.js → index-vBxL1reA.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DWdmBz6y.js → infiniteQueryObserver-CJ3Kym5O.js} +1 -1
- package/dist/client/assets/{infra-billing-ItyhV52m.js → infra-billing-BPGokhjB.js} +1 -1
- package/dist/client/assets/{input-CE59clBd.js → input-Bg2anvwf.js} +1 -1
- package/dist/client/assets/{input-BjKsQzeZ.js → input-CymJ2z2F.js} +1 -1
- package/dist/client/assets/{input-CR5CoVD3.js → input-DDDJO7Ga.js} +1 -1
- package/dist/client/assets/{integration-icon-BjqLrrwW.js → integration-icon-ChmmjcAp.js} +1 -1
- package/dist/client/assets/{label-6ZrdaA5F.js → label-CuQBcvRg.js} +1 -1
- package/dist/client/assets/{last-preview-page-D1GT2WOl.js → last-preview-page-Ck1yMgyH.js} +1 -1
- package/dist/client/assets/{layout-kv8jD_6_.js → layout-L3W31J2n.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-C3JURVIJ.js → legacy-agents-deep-BodINWdJ.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BBWHiN88.js → legacy-main-redirect-CMY7Rgwi.js} +1 -1
- package/dist/client/assets/library-DTGCzA9b.js +1 -0
- package/dist/client/assets/{library-tab-CPVjxTSo.js → library-tab-BBYiaPlx.js} +1 -1
- package/dist/client/assets/{login-DDQDV_ae.js → login-_DLabRI3.js} +1 -1
- package/dist/client/assets/{markdown-JTzUPlKH.js → markdown-ByHIpwAl.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-k0tZLm07.js → mcp-app-renderer-C0Zh7icj.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C3J5q_hp.js → mcp-oauth-C7dtavBP.js} +1 -1
- package/dist/client/assets/{members-CZCpvZYc.js → members-B2F-Smyi.js} +1 -1
- package/dist/client/assets/{message-templates-lHg6ZlFI.js → message-templates-BBwpfvEM.js} +1 -1
- package/dist/client/assets/{mini-report-page-C9UKk1Vu.js → mini-report-page-Cuda554v.js} +1 -1
- package/dist/client/assets/{mock-board-CezSoFB6.js → mock-board-C601dKME.js} +1 -1
- package/dist/client/assets/{monaco-editor-CKKWy-x3.js → monaco-editor-CG3zzzea.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Chh148qF.js → monitoring-stats-row-D90UQUZW.js} +1 -1
- package/dist/client/assets/{multi-select-BF6_Adhk.js → multi-select-BkL-dpTY.js} +1 -1
- package/dist/client/assets/{mustache-Cu104CQF.js → mustache-FFyi4GTi.js} +1 -1
- package/dist/client/assets/{new-project-dialog-BmmmSjjo.js → new-project-dialog-CmsEVtp0.js} +1 -1
- package/dist/client/assets/{oauth-callback-ywzLtSuG.js → oauth-callback-C_kdODmn.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CeS8kqA6.js → oauth-callback-ai-provider-Dfv924hu.js} +1 -1
- package/dist/client/assets/{onboarding-ZV52ZojZ.js → onboarding-CSOdI0rM.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-Db3TOzmO.js → optimistic-project-sidebar-views-DkmrtEno.js} +1 -1
- package/dist/client/assets/{org-file-open-context-kXusxtya.js → org-file-open-context-A6PAiYSr.js} +1 -1
- package/dist/client/assets/{organization-choice-B0xp612m.js → organization-choice-DZORHGb2.js} +1 -1
- package/dist/client/assets/{orgs-BQyi9DSo.js → orgs-3aCjhk83.js} +1 -1
- package/dist/client/assets/{page-seo-form-J76EvRZe.js → page-seo-form-CqpdqbvS.js} +1 -1
- package/dist/client/assets/{pair-BolEqp4H.js → pair-BCvCT-GT.js} +1 -1
- package/dist/client/assets/{plan-ladder-DxETvjP6.js → plan-ladder-BwZyCGet.js} +1 -1
- package/dist/client/assets/{popover-CxnAOud0.js → popover-a7N6zy94.js} +1 -1
- package/dist/client/assets/{post-calendar-BsKIBdi3.js → post-calendar-DWa-EtOs.js} +1 -1
- package/dist/client/assets/{post-editor-CKJ8pkhP.js → post-editor-av0QWKfS.js} +1 -1
- package/dist/client/assets/{preview-content-JHqQ9fqd.js → preview-content-CKQ8AZkH.js} +1 -1
- package/dist/client/assets/{preview-dialog-BXXWFhIT.js → preview-dialog-eYgaESCb.js} +1 -1
- package/dist/client/assets/{profile-GZ4cJ3Nb.js → profile-ChpZb0yE.js} +1 -1
- package/dist/client/assets/{project-app-view-CQb-TK1P.js → project-app-view-CR4akuKE.js} +1 -1
- package/dist/client/assets/{project-feed-DWzyADfx.js → project-feed-CA_L0suZ.js} +1 -1
- package/dist/client/assets/{project-icon-BWs8G7QE.js → project-icon-BE7eT2UX.js} +1 -1
- package/dist/client/assets/project-reports-BiEV7dxJ.js +1 -0
- package/dist/client/assets/project-tasks-B0NPlZ-3.js +1 -0
- package/dist/client/assets/{projects-BnImtVuG.js → projects-C-2UITE5.js} +1 -1
- package/dist/client/assets/{projects-empty-state-Yja7EiQA.js → projects-empty-state-CeqZ7rP7.js} +1 -1
- package/dist/client/assets/{prompts-B_jhy1Zt.js → prompts-D4zN017b.js} +1 -1
- package/dist/client/assets/record-editor-D_uvPYcM.js +1 -0
- package/dist/client/assets/{redirect-editor-BTQazxtK.js → redirect-editor-W70vWVrb.js} +1 -1
- package/dist/client/assets/{reports-CFcJ9_dw.js → reports-1jURhkyW.js} +1 -1
- package/dist/client/assets/reports-C5_7ssUz.js +1 -0
- package/dist/client/assets/{reports-onboarding-DsFX6Q2Y.js → reports-onboarding-VDeG9MUr.js} +1 -1
- package/dist/client/assets/{reports-tab-BMRQLhrU.js → reports-tab-CxLnzoM4.js} +2 -2
- package/dist/client/assets/{repositories-Cxp5gec8.js → repositories-DFQE8EEv.js} +1 -1
- package/dist/client/assets/{repository-binding--R5a6meD.js → repository-binding-BGULsexx.js} +1 -1
- package/dist/client/assets/{repository-import-picker-zA2aRMgM.js → repository-import-picker-Blpga-5j.js} +1 -1
- package/dist/client/assets/{repository-picker-Ch8MjhWT.js → repository-picker-B8Yoh_bh.js} +1 -1
- package/dist/client/assets/{require-capability-z1ZYrtyD.js → require-capability-1wZrr2Ds.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DrK2Ahbq.js → required-auth-layout-DJxAIvUt.js} +1 -1
- package/dist/client/assets/{reset-password-o9kRT8P-.js → reset-password-D2-FVHfz.js} +1 -1
- package/dist/client/assets/{resizable-DRo3WucN.js → resizable-DT-ha9BR.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-BC_jCwlY.js → resolve-tab-icon-25xT6OFp.js} +1 -1
- package/dist/client/assets/{review-settings-BHVALtQt.js → review-settings-DaYTV2bK.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-CKZNrR9n.js → rich-text-link-control-Bk19iHyH.js} +1 -1
- package/dist/client/assets/{roles-CGFPftX7.js → roles-DbbiUQ2v.js} +1 -1
- package/dist/client/assets/{route-BuDFfTf7.js → route-Bo7hoS8S.js} +1 -1
- package/dist/client/assets/{route-CwFuHhC1.js → route-Bz1yG2e8.js} +1 -1
- package/dist/client/assets/route-CnHChob6.js +1 -0
- package/dist/client/assets/{runnable-block-editor-q8wiTpdB.js → runnable-block-editor-tki6UkBr.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-CwxdQlSb.js → sandbox-lifecycle-context-B-LQFFsw.js} +1 -1
- package/dist/client/assets/schema-CJ-VqkAD.js +1 -0
- package/dist/client/assets/{scroll-area-dZYwQnHa.js → scroll-area-B1sX42nb.js} +1 -1
- package/dist/client/assets/{search-input-BBMyMvHh.js → search-input-DhsU7Ify.js} +1 -1
- package/dist/client/assets/{search-toggle-DcNdKksf.js → search-toggle-DmuwYEgq.js} +1 -1
- package/dist/client/assets/{secret-picker-D2smZAsf.js → secret-picker-Dqn44GSh.js} +1 -1
- package/dist/client/assets/{secrets-DEuR_SKQ.js → secrets-BdtkdwtN.js} +1 -1
- package/dist/client/assets/{sections-editor-CXuKyDSq.js → sections-editor-B71EyeoU.js} +1 -1
- package/dist/client/assets/{select-CV06ESGC.js → select-B29Xhi6X.js} +1 -1
- package/dist/client/assets/{select-model-9Q75oIJD.js → select-model-Dmkrjf0v.js} +1 -1
- package/dist/client/assets/{seo-editor-DgkdnJ38.js → seo-editor-DFJ9VsFU.js} +1 -1
- package/dist/client/assets/{separator-DD8SvIJt.js → separator-BgwMr24m.js} +1 -1
- package/dist/client/assets/{settings-tab-DrI9h0MP.js → settings-tab-BoNmfuAJ.js} +1 -1
- package/dist/client/assets/{sheet-COySNUi4.js → sheet-Ds43gFnt.js} +1 -1
- package/dist/client/assets/{shell-layout-BR24Afar.js → shell-layout-DTPbTm7i.js} +1 -1
- package/dist/client/assets/{skills-DBhh4jev.js → skills-Bq-81Lp0.js} +1 -1
- package/dist/client/assets/{sso-_tSIdymt.js → sso-oY7z8oxv.js} +1 -1
- package/dist/client/assets/{suggestion-CqfoTsij.js → suggestion-DSzvJMf5.js} +1 -1
- package/dist/client/assets/{switch-DcKRnaVG.js → switch-chDwefPP.js} +1 -1
- package/dist/client/assets/{synced-repos-VW_LJoE6.js → synced-repos-BlExJ0qV.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-Bpgp9cBx.js → tab-icon-glyph-Chq2d8cr.js} +1 -1
- package/dist/client/assets/{table-ChI81Khw.js → table-BFhRn6m5.js} +1 -1
- package/dist/client/assets/{tabs-Bhcrjsbm.js → tabs-Bq5-PfFl.js} +1 -1
- package/dist/client/assets/{task-board-CJjc4xI-.js → task-board-C6pPuzYa.js} +1 -1
- package/dist/client/assets/{task-route-DhT_vkgX.js → task-route-BnZ6hudq.js} +1 -1
- package/dist/client/assets/{task-status-DB9VzvnI.js → task-status-D3QqYPID.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-D2i3U7yF.js → taskboard-analytics-BMAi2ly0.js} +1 -1
- package/dist/client/assets/tasks-BUP0oNUi.js +1 -0
- package/dist/client/assets/{tasks-JNpK11cV.js → tasks-zArzTN8t.js} +1 -1
- package/dist/client/assets/{textarea-BXhBwPZM.js → textarea-CE_tOq7F.js} +1 -1
- package/dist/client/assets/{thread-analytics-Cih69yRb.js → thread-analytics-DAmG6cwU.js} +1 -1
- package/dist/client/assets/{thread-button-AF1WSMlL.js → thread-button-C7RONiC_.js} +1 -1
- package/dist/client/assets/{thread-intent-BUShkesP.js → thread-intent-J3vN5Vs_.js} +1 -1
- package/dist/client/assets/{thread-route-DQM8B2sI.js → thread-route-X4GbG7FV.js} +1 -1
- package/dist/client/assets/{thread-route-CqYgZaDv.js → thread-route-c94iFegN.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-DwAizuR8.js → thread-sheet-body-DMUuynmz.js} +1 -1
- package/dist/client/assets/{toggle-group-DVGTd7pP.js → toggle-group-DNCEl3IR.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Bzitet5K.js → toolbar-icon-button-BtgLueB7.js} +1 -1
- package/dist/client/assets/{tooltip-DymYYuRo.js → tooltip-CbYF5mhk.js} +1 -1
- package/dist/client/assets/{track-BsEyW3He.js → track-DvMbEwKy.js} +1 -1
- package/dist/client/assets/{types-cb53ubAI.js → types-ByzlXSpq.js} +1 -1
- package/dist/client/assets/{usage-stats-zkwjwtUJ.js → usage-stats-Bd-A9GxK.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BkzLFMQR.js → use-ai-providers-C99u_E8Y.js} +1 -1
- package/dist/client/assets/{use-automations-D1SUlKHV.js → use-automations-BcWa2mzr.js} +1 -1
- package/dist/client/assets/{use-autosave-CB-vej23.js → use-autosave-DCrsKem-.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-CRef6D4d.js → use-chat-layout-state-BWgbiPAM.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BBvbZk76.js → use-connect-companion-DqzvyX8B.js} +1 -1
- package/dist/client/assets/{use-connection-rm3wb9zf.js → use-connection-x5NSsBTY.js} +1 -1
- package/dist/client/assets/{use-copy-Bb6V_Y-2.js → use-copy-BfHUaImm.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-EiOYXG3-.js → use-create-virtual-mcp-CeGeCrlx.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-C9CWZMOZ.js → use-date-fns-locale-By6eCcki.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-D0o2B4Xo.js → use-debounced-autosave-1STwXu9S.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BAjT0z0V.js → use-debounced-value-ClYZnycZ.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CayxoltY.js → use-deco-credits-BmfUoRp4.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BXaRjj_f.js → use-decopilot-events-Bz4QYcmu.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CynD9NKl.js → use-delete-connection-mxqSD2MW.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BMoGThMy.js → use-deployment-admin-DHv7D-iA.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-Cv_bGV8Q.js → use-fast-preview-draft-url-wdnp9Gsw.js} +1 -1
- package/dist/client/assets/{use-file-configs-CQr5ImoR.js → use-file-configs-B4qsGcHc.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CnOZ3QQs.js → use-infinite-scroll-B8GLgbd5.js} +1 -1
- package/dist/client/assets/{use-join-requests-CIOXMLDr.js → use-join-requests-DaoxOszb.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-Bu2rGt1b.js → use-main-panel-tabs-BUvooKW_.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DkUE1YUf.js → use-mcp-auth-status-C1FbOTFp.js} +1 -1
- package/dist/client/assets/{use-mcp-client-dYAEJ2Jd.js → use-mcp-client-CgAwsTXX.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CytnXWFX.js → use-mcp-prompts-BIwfN9eR.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DKcS99WV.js → use-mcp-tools-DWBMbNzW.js} +1 -1
- package/dist/client/assets/{use-members-BGeBcZAI.js → use-members-B5WIwJLk.js} +1 -1
- package/dist/client/assets/{use-mobile-Cr6YJGI_.js → use-mobile-BTzo-yNE.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DoVNCwHy.js → use-navigate-to-agent-CUailOkl.js} +1 -1
- package/dist/client/assets/use-new-blocks-editor-5rrvUzSm.js +1 -0
- package/dist/client/assets/{use-open-billing-url-D5IYp8zD.js → use-open-billing-url-hrUTQY32.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Cj2S4VtF.js → use-org-auth-client-VwQi3i7g.js} +1 -1
- package/dist/client/assets/{use-org-fs-DBAxCQBE.js → use-org-fs-JCXip5_c.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DASdWM3g.js → use-org-repo-syncs-CeS8Ysed.js} +1 -1
- package/dist/client/assets/{use-org-sso-C6AFvIzX.js → use-org-sso-C9wS7ZE_.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CdTybrJA.js → use-organization-roles-BlaiSg9K.js} +1 -1
- package/dist/client/assets/{use-organization-settings-B7IVGPSk.js → use-organization-settings-C-0W-ky3.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BDo5oxs2.js → use-panel-navigate-EwAAwlcx.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-DM97JCfv.js → use-project-native-view-presence-Bh04AhwN.js} +1 -1
- package/dist/client/assets/{use-project-scope-ELhrNYxO.js → use-project-scope-BQkBdDIR.js} +1 -1
- package/dist/client/assets/{use-releases-C6by0aYf.js → use-releases-eOVPDU9o.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-D6LAqZld.js → use-reports-diagnostic-BH0V95xq.js} +1 -1
- package/dist/client/assets/{use-secrets-CETMiKli.js → use-secrets-B9XBVByA.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-iMXSXAXB.js → use-section-preview-base-DVGdnf65.js} +1 -1
- package/dist/client/assets/{use-session-runtime-7EKtYywq.js → use-session-runtime-Bi7LhVpC.js} +1 -1
- package/dist/client/assets/{use-tags-CGk04KKn.js → use-tags-D6lRTA5X.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CcDxmijQ.js → use-task-board-analytics-BQJBm-B1.js} +1 -1
- package/dist/client/assets/{use-task-metadata-CHjvR9nL.js → use-task-metadata-QWnE0BBk.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-DgyRTsuJ.js → use-thread-analytics-B_SQZb1Z.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BEwXZ8Vh.js → use-thread-outputs-CKvUbe8p.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BUmcOy3_.js +1 -0
- package/dist/client/assets/{useQueries-IXTpZeMS.js → useQueries-DD2WW-FQ.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BBD5zNHU.js +1 -0
- package/dist/client/assets/{users-CRc2HLrw.js → users-hMUh3_Dc.js} +1 -1
- package/dist/client/assets/{utils-BHJpTmNN.js → utils-DJvBBb8P.js} +1 -1
- package/dist/client/assets/{variant-calendar-BVIyYUNc.js → variant-calendar-BBLtccxZ.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-D3ZX5GGx.js → variant-matcher-override-BlA7dm-k.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-xsYxeBhI.js → view-mode-toggle--jH7JTVP.js} +1 -1
- package/dist/client/assets/{virtual-mcp-Bq8CmmOy.js → virtual-mcp-OnNDTvZE.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +132 -132
- package/dist/server/server.js +117 -117
- package/package.json +1 -1
- package/dist/client/assets/agent-app-D7JXTBCq.js +0 -1
- package/dist/client/assets/agent-deck-D3yxTAhn.js +0 -1
- package/dist/client/assets/agent-library-BXp8X7Kb.js +0 -1
- package/dist/client/assets/agent-library-file-DBTLr6wD.js +0 -1
- package/dist/client/assets/agent-settings-B02qGu9T.js +0 -1
- package/dist/client/assets/agent-site-editor-code-C1rCwcip.js +0 -2
- package/dist/client/assets/agent-site-editor-content-D-WwcHO0.js +0 -9
- package/dist/client/assets/agent-view-DNB9Q5mk.js +0 -1
- package/dist/client/assets/api-keys-Cid803mQ.js +0 -1
- package/dist/client/assets/app-editor-B04OoaGI.js +0 -1
- package/dist/client/assets/flat-project-DTc0SWpt.js +0 -1
- package/dist/client/assets/library-BYCJESrt.js +0 -1
- package/dist/client/assets/project-reports-DWdFvTXe.js +0 -1
- package/dist/client/assets/project-tasks-Cvmm21fI.js +0 -1
- package/dist/client/assets/record-editor-CN4HNCDe.js +0 -1
- package/dist/client/assets/reports-ftm5Lh7G.js +0 -1
- package/dist/client/assets/route-Crert7MH.js +0 -1
- package/dist/client/assets/schema-BPGmAw0J.js +0 -1
- package/dist/client/assets/tasks-C9nYVcwD.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-CTbC874V.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CrHqvHwZ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Di3mCiFx.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,b as V,r as O,l as Z,j as s,h as je,X as oe,as as ke,ar as Le,E as St,a as $e,K as Nt,m as Tt,q as xe,a2 as st,at as ss,au as ns,U as _t,t as wt,af as as,d as De,n as dt,av as rs,f as Se,C as ut,e as is,u as Fe,k as ls,aw as os,ax as cs,O as Ct,ay as ds,N as us,B as fs,P as Ye}from"./index-BJCqpqJd.js";import{i as nt}from"./AlertCircle-CIFSd5U6.js";import{v as ms,w as ft,A as ye,x as hs,y as ps,z as xs,B as gs,C as bs,D as vs,E as Pt,F as js,b as ys,G as ks,n as Ss,l as Ns,j as Ts}from"./agent-icon-B0fEYlzS.js";import{u as _s,a as ws}from"./thread-button-AF1WSMlL.js";import{T as Ae}from"./toolbar-icon-button-Bzitet5K.js";import{C as ee,w as Cs}from"./index-BUGmQlES.js";import{u as Re,a as At,b as Ee,c as It,d as Ps,e as As,s as Is}from"./chat-context-DFdcIErL.js";import{u as Mt}from"./use-session-runtime-7EKtYywq.js";import{u as Ms}from"./use-ai-providers-BkzLFMQR.js";import{i as Ls}from"./CheckCircle-BcLFM9-7.js";import{s as mt}from"./XClose-BXY1fsWn.js";import{a as ce,b as Lt,g as $t}from"./repository-binding--R5a6meD.js";import{I as Dt}from"./integration-icon-BjqLrrwW.js";import{c as $s}from"./use-decopilot-events-BXaRjj_f.js";import{t as at}from"./ChevronUp-BU7d4Get.js";import{O as Ds}from"./pair-BolEqp4H.js";import{u as Fs,a as Rs}from"./use-thread-outputs-BEwXZ8Vh.js";import{u as Es}from"./use-deco-credits-CayxoltY.js";import{C as Os,u as Bs,V as zs,a as Gs}from"./input-CR5CoVD3.js";import{a as rt,b as Hs,f as Vs,L as Us,s as Ks,c as Ws}from"./shell-layout-BR24Afar.js";import{f as qs,b as Ys}from"./use-project-scope-ELhrNYxO.js";import{g as Ft,u as Xs,n as Zs,a as Qs}from"./use-releases-C6by0aYf.js";import{u as Js,d as Rt,a as it,b as lt,c as ot,e as en}from"./thread-intent-BUShkesP.js";import{f as tn,a as Et,b as sn}from"./use-navigate-to-agent-DoVNCwHy.js";import{o as nn,s as an,u as rn,S as ln,a as on}from"./sandbox-lifecycle-context-CwxdQlSb.js";import{E as Ot}from"./empty-state-C-cMIo1T.js";import{t as cn,m as dn,u as un}from"./use-chat-layout-state-CRef6D4d.js";import{C as ht}from"./index-_bGtHSkW.js";import{a as Bt,b as zt,P as Gt}from"./popover-CxnAOud0.js";import{T as Oe,a as Be,b as ze}from"./tooltip-DymYYuRo.js";import{T as fn,a as mn}from"./toggle-group-DVGTd7pP.js";import{u as Ht,a as Ge,r as hn,b as Vt,c as pn,d as xn}from"./thread-route-DQM8B2sI.js";import{d as gn,h as bn,c as vn,b as jn,D as yn}from"./dialog-CYKucQEn.js";import{c as kn,a as Sn,e as Nn,b as Tn,C as _n,f as wn}from"./command-3VOIGXTI.js";import{i as Ut}from"./ZoomOut-T_sjF8JP.js";import{A as Cn,a as Pn,b as An,c as In,g as Mn,d as Ln,e as $n,f as Dn}from"./alert-dialog-DJp_Ityl.js";import{g as Fn,S as Rn}from"./task-status-DB9VzvnI.js";import{a as En}from"./format-time-CjIPQhCN.js";import{a as Kt,u as On}from"./use-panel-navigate-BDo5oxs2.js";import{u as Wt}from"./use-main-panel-tabs-Bu2rGt1b.js";import{T as Ie}from"./tab-icon-glyph-Bpgp9cBx.js";import{a as Bn}from"./UserSquare-D_CN0irU.js";import{b as zn,c as qt,S as Gn,d as Hn}from"./select-CV06ESGC.js";import{u as Vn}from"./use-organization-settings-B7IVGPSk.js";import{L as ct,a as Un}from"./legacy-main-redirect-BBWHiN88.js";import{u as Kn}from"./use-mobile-Cr6YJGI_.js";import{L as Wn}from"./preview-dialog-BXXWFhIT.js";import{O as qn}from"./org-file-open-context-kXusxtya.js";import{B as pt}from"./blocks-preview-workspace-context-BKbOMRuN.js";import{u as Yt}from"./use-is-desktop-app-BNujXJc_.js";import{p as Yn}from"./virtual-mcp-Bq8CmmOy.js";import"./Tool01-BThW1knZ.js";import"./ArrowUp-D2UY3OMh.js";import"./ArrowLeft-Cs3E2BgS.js";import"./ArrowRight-DdzTB6qI.js";import"./ShoppingBag01-DkKlB-7l.js";import"./Palette-BUkGC_ZN.js";import"./Check-CaNT0o8-.js";import"./Copy01-BUTI0qm9.js";import"./CreditCard01-JGaESeVs.js";import"./DotsVertical-CIYGxTTU.js";import"./Image01-BZEauj2T.js";import"./Key01-RaCvEF1t.js";import"./Link01-B4kFCKUO.js";import"./LinkExternal01-Cn0PsKoO.js";import"./Monitor01-DDhoI_iK.js";import"./Sun-X5oRKWho.js";import"./Plus-0VzOcDpy.js";import"./SearchMd-DvVcOTQO.js";import"./Trash01-CWZehatA.js";import"./Upload01-DBJMMF89.js";import"./User01-CkC9PpwU.js";import"./Users01-Bly3LhS2.js";import"./X-B2uln9s5.js";import"./sheet-COySNUi4.js";import"./gateway-client-BtY2d8II.js";import"./drawer-DG-A7uu9.js";import"./collection-search-BRvScCfK.js";import"./use-mcp-client-dYAEJ2Jd.js";import"./auth-D32cXta1.js";import"./use-mcp-prompts-CytnXWFX.js";import"./index-ySi4Pwot.js";import"./form-BuKMCQ_-.js";import"./label-6ZrdaA5F.js";import"./input-CE59clBd.js";import"./utils-CVEq3hMx.js";import"./decopilot-fXzeGhfJ.js";import"./checkbox-CKTKlc0c.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-DSv7rQey.js";import"./download-app-dialog-ilxwkPe1.js";import"./feature-paywall-D7E_OmlQ.js";import"./plan-ladder-DxETvjP6.js";import"./autosend-B0cwcoZQ.js";import"./location-DBePU4bz.js";import"./collapsible-CKtvk2qR.js";import"./use-copy-Bb6V_Y-2.js";import"./usage-stats-zkwjwtUJ.js";import"./markdown-JTzUPlKH.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-k0tZLm07.js";import"./types-cb53ubAI.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./tool-namespace-DmnQIdtF.js";import"./use-connection-rm3wb9zf.js";import"./file-type-icon-GNT0wjq6.js";import"./chat-draft-BtGF7bzA.js";import"./tabs-Bhcrjsbm.js";import"./use-open-billing-url-D5IYp8zD.js";import"./index-D0r-H4rb.js";import"./input-BjKsQzeZ.js";import"./suggestion-CqfoTsij.js";import"./use-org-fs-DBAxCQBE.js";import"./question-004-sINsf4GQ.js";import"./use-members-BGeBcZAI.js";import"./use-org-auth-client-Cj2S4VtF.js";import"./add-connection-dialog-kGctlCUa.js";import"./extract-connection-data-B-G_DpF-.js";import"./metadata-D72DunRR.js";import"./connection-CghRZvH1.js";import"./connection-card-CM7cJdHp.js";import"./useInfiniteQuery-CrHqvHwZ.js";import"./infiniteQueryObserver-DWdmBz6y.js";import"./connection-slug-CITJ0kGN.js";import"./slugify-CEUa2lfQ.js";import"./textarea-BXhBwPZM.js";import"./connection-form-helpers-BXAo8rkG.js";import"./authenticate-and-persist-oauth-nxqo5RHp.js";import"./mcp-oauth-C3J5q_hp.js";import"./collection-tabs-DYXVQ5CX.js";import"./badge-BVm53kyq.js";import"./use-infinite-scroll-CnOZ3QQs.js";import"./useSuspenseInfiniteQuery-Di3mCiFx.js";import"./project-icon-BWs8G7QE.js";import"./new-project-dialog-BmmmSjjo.js";import"./repository-import-picker-zA2aRMgM.js";import"./repository-picker-Ch8MjhWT.js";import"./use-debounced-value-BAjT0z0V.js";import"./required-auth-layout-DrK2Ahbq.js";import"./use-org-sso-C6AFvIzX.js";import"./serial-task-queue-CGOeQgpr.js";import"./backoff-8mStPHYB.js";import"./task-board-CJjc4xI-.js";import"./schema-BPGmAw0J.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resizable-DRo3WucN.js";import"./index-Cv3qPBot.js";import"./index-CGwg_b5-.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-tools-DKcS99WV.js";import"./resolve-tab-icon-BC_jCwlY.js";import"./use-task-metadata-CHjvR9nL.js";import"./use-project-native-view-presence-DM97JCfv.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-CQr5ImoR.js";import"./site-slug-DebpOoQq.js";import"./preview-content-JHqQ9fqd.js";import"./file-preview-C7iqsPcD.js";import"./utils-BHJpTmNN.js";import"./editor-D6m-Mg9w.js";import"./file-share-button-weodJ1fg.js";function Xn({isThreadLocked:t,hasCloudProviderKeys:e}){return t?!1:!e}function Zn(){const t=$.c(3),e=Ms(),r=Re()?.isThreadLocked??!1,i=e.length>0;let a;return t[0]!==r||t[1]!==i?(a=Xn({isThreadLocked:r,hasCloudProviderKeys:i}),t[0]=r,t[1]=i,t[2]=a):a=t[2],a}function ve(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function Xe(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 Qn(t){return t?t.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function Jn(t){const e=$.c(4),{items:n}=t;let r;e[0]!==n?(r=n.map(ea),e[0]=n,e[1]=r):r=e[1];let i;return e[2]!==r?(i=s.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 ea(t){return s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[s.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.label}),s.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:t.value})]},t.label)}function ta(t){const e=$.c(33),{userTokens:n,assistantTokens:r,otherTokens:i}=t,a=V(),l=n+r+i,c=l>0?n/l*100:0,u=l>0?r/l*100:0,o=l>0?i/l*100:0;let d;e[0]!==c?(d=c>0&&s.jsx("div",{className:"h-full bg-chart-1",style:{width:`${c}%`}}),e[0]=c,e[1]=d):d=e[1];let f;e[2]!==u?(f=u>0&&s.jsx("div",{className:"h-full bg-chart-2",style:{width:`${u}%`}}),e[2]=u,e[3]=f):f=e[3];let m;e[4]!==o?(m=o>0&&s.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${o}%`}}),e[4]=o,e[5]=m):m=e[5];let h;e[6]!==d||e[7]!==f||e[8]!==m?(h=s.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[d,f,m]}),e[6]=d,e[7]=f,e[8]=m,e[9]=h):h=e[9];let v;e[10]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=v):v=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 k;e[14]!==y?(k=s.jsxs("div",{className:"flex items-center gap-1.5",children:[v,s.jsx("span",{className:"text-xs text-muted-foreground",children:y})]}),e[14]=y,e[15]=k):k=e[15];let p;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[16]=p):p=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 j;e[20]!==g?(j=s.jsxs("div",{className:"flex items-center gap-1.5",children:[p,s.jsx("span",{className:"text-xs text-muted-foreground",children:g})]}),e[20]=g,e[21]=j):j=e[21];let b;e[22]!==o||e[23]!==i||e[24]!==a?(b=i>0&&s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.otherPercent",{pct:o.toFixed(1)})})]}),e[22]=o,e[23]=i,e[24]=a,e[25]=b):b=e[25];let x;e[26]!==j||e[27]!==b||e[28]!==k?(x=s.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[k,j,b]}),e[26]=j,e[27]=b,e[28]=k,e[29]=x):x=e[29];let N;return e[30]!==x||e[31]!==h?(N=s.jsxs("div",{className:"flex flex-col gap-2",children:[h,x]}),e[30]=x,e[31]=h,e[32]=N):N=e[32],N}function sa(t){const e=$.c(14),{agentId:n,isError:r}=t,i=ce(n),a=V();let l;e[0]!==i?.title||e[1]!==a?(l=i?.title??a("chat.subtask.subtaskNoun"),e[0]=i?.title,e[1]=a,e[2]=l):l=e[2];const c=l,u=i?.icon??null;let o;e[3]!==u||e[4]!==c?(o=s.jsx(Dt,{icon:u,name:c,size:"xs",className:"size-6 rounded-md shrink-0"}),e[3]=u,e[4]=c,e[5]=o):o=e[5];const d=r?"text-destructive":"text-foreground";let f;e[6]!==d?(f=Z("shrink-0 font-medium",d),e[6]=d,e[7]=f):f=e[7];let m;e[8]!==c||e[9]!==f?(m=s.jsx("span",{className:f,children:c}),e[8]=c,e[9]=f,e[10]=m):m=e[10];let h;return e[11]!==o||e[12]!==m?(h=s.jsxs(s.Fragment,{children:[o,m]}),e[11]=o,e[12]=m,e[13]=h):h=e[13],h}function na(t){const e=$.c(12),{isError:n}=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 l;e[2]!==a?(l=s.jsx(Dt,{icon:null,name:a,size:"xs",className:"size-6 rounded-md shrink-0"}),e[2]=a,e[3]=l):l=e[3];const c=n?"text-destructive":"text-foreground";let u;e[4]!==c?(u=Z("shrink-0 font-medium",c),e[4]=c,e[5]=u):u=e[5];let o;e[6]!==a||e[7]!==u?(o=s.jsx("span",{className:u,children:a}),e[6]=a,e[7]=u,e[8]=o):o=e[8];let d;return e[9]!==l||e[10]!==o?(d=s.jsxs(s.Fragment,{children:[l,o]}),e[9]=l,e[10]=o,e[11]=d):d=e[11],d}function aa(t){const e=$.c(18),{part:n}=t,r=n.input?.agent_id,i=n.state==="input-streaming"||n.state==="input-available"||n.state==="output-available"&&n.preliminary===!0,a=n.state==="output-error",l=n.state==="approval-requested";let c;e[0]!==a?(c=s.jsx(na,{isError:a}),e[0]=a,e[1]=c):c=e[1];let u;e[2]!==r||e[3]!==a?(u=s.jsx(sa,{agentId:r,isError:a}),e[2]=r,e[3]=a,e[4]=u):u=e[4];let o;e[5]!==c||e[6]!==u?(o=s.jsx(O.Suspense,{fallback:c,children:u}),e[5]=c,e[6]=u,e[7]=o):o=e[7];let d;e[8]!==n.input?(d=n.input?.prompt&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-muted-foreground/50",children:"·"}),s.jsx("span",{className:"truncate text-muted-foreground",children:n.input.prompt})]}),e[8]=n.input,e[9]=d):d=e[9];let f;e[10]!==l||e[11]!==a||e[12]!==i?(f=s.jsx("span",{className:"ml-auto shrink-0",children:i?s.jsx(je,{className:"size-3 text-muted-foreground"}):a?s.jsx(ms,{size:12,className:"text-destructive"}):l?s.jsx(nt,{size:12,className:"text-warning"}):s.jsx(Ls,{size:12,className:"text-success"})}),e[10]=l,e[11]=a,e[12]=i,e[13]=f):f=e[13];let m;return e[14]!==o||e[15]!==d||e[16]!==f?(m=s.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[o,d,f]}),e[14]=o,e[15]=d,e[16]=f,e[17]=m):m=e[17],m}function ra(t){const e=$.c(51),{onClose:n,back:r,className:i}=t,a=V(),[l,c]=O.useState(null),{messages:u}=At(),{activeTask:o}=Ee(),{selectedModel:d,selectedVirtualMcp:f}=It(),m=Ps(u),h=[...u].reverse().find(xa),v=h?.metadata?.usage,y=h?.metadata?.modelLimits?.contextWindow??d?.limits?.contextWindow??null,k=v?.contextTokens??0,p=y&&y>0?(k/y*100).toFixed(1):null,g=u;let j;e[0]!==g?(j=g.filter(pa).reduce(ha,0),e[0]=g,e[1]=j):j=e[1];const b=j,x=u;let N;e[2]!==x?(N=x.filter(ma).reduce(fa,0),e[2]=x,e[3]=N):N=e[3];const S=N,T=Math.max(0,m.totalTokens-b-S),w=u[0],P=u.at(-1),_=w?.metadata?.created_at??o?.created_at,I=P?.metadata?.created_at??o?.updated_at,C=u.filter(ua),M=u.flatMap(ca),A=d?.modelId?Qn(d.modelId):"—",D=f?.title??"Super Agent",F=$s(),E=[{label:a("chat.contextPanel.sessionLabel"),value:o?.title??a("chat.contextPanel.newChat")},{label:a("chat.contextPanel.messagesLabel"),value:C.length},{label:a("chat.contextPanel.agentLabel"),value:D},...F?[{label:a("chat.contextPanel.modelLabel"),value:A}]:[],{label:a("chat.contextPanel.contextLimitLabel"),value:y?ve(y):"—"},{label:a("chat.contextPanel.sessionTokensLabel"),value:m.totalTokens>0?ve(m.totalTokens):"0"},{label:a("chat.contextPanel.usageLabel"),value:p!==null?`${p}%`:"—"},{label:a("chat.contextPanel.inputTokensLabel"),value:m.inputTokens>0?ve(m.inputTokens):"0"},{label:a("chat.contextPanel.outputTokensLabel"),value:m.outputTokens>0?ve(m.outputTokens):"0"},{label:a("chat.contextPanel.reasoningTokensLabel"),value:m.reasoningTokens>0?ve(m.reasoningTokens):"0"},...F?[{label:a("chat.contextPanel.costLabel"),value:m.cost>0?`$${m.cost<.001?m.cost.toFixed(6):m.cost.toFixed(4)}`:"$0.00"}]:[],{label:a("chat.contextPanel.sessionCreatedLabel"),value:Xe(_)},{label:a("chat.contextPanel.lastActivityLabel"),value:Xe(I)}];if(!o&&C.length===0){let G;e[4]!==i?(G=Z("flex flex-col h-full w-full border-l border-border bg-background",i),e[4]=i,e[5]=G):G=e[5];let q;e[6]!==a?(q=a("chat.contextPanel.title"),e[6]=a,e[7]=q):q=e[7];let ae;e[8]!==q?(ae=s.jsx("span",{className:"text-sm font-medium text-foreground",children:q}),e[8]=q,e[9]=ae):ae=e[9];let ie;e[10]!==r?(ie=r?s.jsx(ft,{size:14,className:"text-muted-foreground"}):s.jsx(mt,{size:14,className:"text-muted-foreground"}),e[10]=r,e[11]=ie):ie=e[11];let J;e[12]!==n||e[13]!==ie?(J=s.jsx("button",{type:"button",onClick:n,className:"flex size-6 items-center justify-center hover:bg-accent transition-colors rounded-lg",children:ie}),e[12]=n,e[13]=ie,e[14]=J):J=e[14];let le;e[15]!==ae||e[16]!==J?(le=s.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[ae,J]}),e[15]=ae,e[16]=J,e[17]=le):le=e[17];let te;e[18]!==a?(te=a("chat.contextPanel.emptyState"),e[18]=a,e[19]=te):te=e[19];let se;e[20]!==te?(se=s.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:te})}),e[20]=te,e[21]=se):se=e[21];let re;return e[22]!==le||e[23]!==se||e[24]!==G?(re=s.jsxs("div",{className:G,children:[le,se]}),e[22]=le,e[23]=se,e[24]=G,e[25]=re):re=e[25],re}let L;e[26]!==i?(L=Z("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",i),e[26]=i,e[27]=L):L=e[27];let H;e[28]!==a?(H=a("chat.contextPanel.title"),e[28]=a,e[29]=H):H=e[29];let B;e[30]!==H?(B=s.jsx("span",{className:"text-sm font-medium text-foreground",children:H}),e[30]=H,e[31]=B):B=e[31];let K;e[32]!==r?(K=r?s.jsx(ft,{size:14}):s.jsx(mt,{size:14}),e[32]=r,e[33]=K):K=e[33];let R;e[34]!==n||e[35]!==K?(R=s.jsx("button",{type:"button",onClick:n,className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:K}),e[34]=n,e[35]=K,e[36]=R):R=e[36];let Y;e[37]!==B||e[38]!==R?(Y=s.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[B,R]}),e[37]=B,e[38]=R,e[39]=Y):Y=e[39];let U;e[40]!==a?(U=a("chat.contextPanel.contextBreakdownSection"),e[40]=a,e[41]=U):U=e[41];let W;e[42]!==U?(W=s.jsx("span",{className:"text-xs text-muted-foreground",children:U}),e[42]=U,e[43]=W):W=e[43];let X;e[44]!==S||e[45]!==T||e[46]!==b?(X=s.jsx(ta,{userTokens:b,assistantTokens:S,otherTokens:T}),e[44]=S,e[45]=T,e[46]=b,e[47]=X):X=e[47];let Q;return e[48]!==W||e[49]!==X?(Q=s.jsxs("div",{className:"flex flex-col gap-3",children:[W,X]}),e[48]=W,e[49]=X,e[50]=Q):Q=e[50],s.jsxs("div",{className:L,children:[Y,s.jsxs("div",{className:"flex flex-col gap-8 p-6",children:[M.length>0&&s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.subtasksSection")}),s.jsx("div",{className:"flex flex-col gap-1",children:M.map(oa)})]}),s.jsx(Jn,{items:E}),Q,C.length>0&&s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.rawMessagesSection")}),s.jsx("div",{className:"flex flex-col gap-1",children:C.map(G=>{const q=G.metadata?.created_at,ae=l?.id===G.id;return s.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[s.jsxs("button",{type:"button",onClick:()=>c(ae?null:G),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent/50 w-full text-left cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("span",{className:Z("shrink-0 font-medium",G.role==="user"?"text-chart-1":"text-chart-2"),children:G.role}),s.jsx("span",{className:"text-muted-foreground",children:"•"}),s.jsx("span",{className:"truncate text-muted-foreground font-mono",children:G.id})]}),q&&s.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:Xe(q)})]}),ae&&s.jsxs(s.Fragment,{children:[G.role==="assistant"&&(()=>{const ie=G.metadata?._request;if(!ie)return null;const J=ie.systemSections??[],le=Math.max(1,...J.map(la)),te=J.reduce(ia,0);return s.jsxs("div",{className:"border-t border-border/50 px-3 py-2.5 text-xs space-y-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"font-medium text-foreground",children:a("chat.contextPanel.requestLabel")}),s.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[ie.activeTools??0," / ",ie.tools??0," ",a("chat.contextPanel.toolsActive")]})]}),J.length>0&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("div",{className:"text-muted-foreground",children:[a("chat.contextPanel.systemPromptLabel")," ",s.jsxs("span",{className:"tabular-nums",children:["~",Math.round(te/4).toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),J.map((se,re)=>{const de=se.preview.match(/^<([a-z-]+)/i)?.[1]??`section ${re}`,ge=se.chars/le*100,ue=Math.round(se.chars/4);return s.jsxs("div",{className:"space-y-0.5",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("span",{className:"font-mono text-foreground truncate",children:de}),s.jsxs("span",{className:"text-muted-foreground tabular-nums shrink-0",children:["~",ue.toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),s.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full bg-chart-3",style:{width:`${ge}%`}})})]},re)})]})]})})(),s.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 ia(t,e){return t+e.chars}function la(t){return t.chars}function oa(t,e){return s.jsx(aa,{part:t},e)}function ca(t){return(t.parts??[]).filter(da)}function da(t){return t.type==="tool-subtask"}function ua(t){return t.role!=="system"}function fa(t,e){const n=e.metadata?.usage;return t+(n?.outputTokens??0)}function ma(t){return t.role==="assistant"}function ha(t,e){const n=e.metadata?.usage;return t+(n?.inputTokens??0)}function pa(t){return t.role==="user"}function xa(t){return t.role==="assistant"&&t.metadata?.usage}function ga(t){const e=$.c(21),{onOpenContextPanel:n}=t,{org:r}=oe(),{selectedVirtualMcp:i}=It();let a;e[0]!==r.id?(a=ke(r.id),e[0]=r.id,e[1]=a):a=e[1];const c=i??a,o=ce(c.id)??c,d=o.title??"Super Agent",f=o.icon??null,m=o.description??null;let h;e[2]!==f||e[3]!==d?(h=s.jsx(ye,{icon:f,name:d,size:"lg"}),e[2]=f,e[3]=d,e[4]=h):h=e[4];let v;e[5]!==d?(v=s.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-foreground",children:d}),e[5]=d,e[6]=v):v=e[6];let y;e[7]!==m?(y=m?s.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-balance",children:m}):null,e[7]=m,e[8]=y):y=e[8];let k;e[9]!==v||e[10]!==y?(k=s.jsxs("div",{className:"space-y-1.5",children:[v,y]}),e[9]=v,e[10]=y,e[11]=k):k=e[11];let p;e[12]!==h||e[13]!==k?(p=s.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,k]}),e[12]=h,e[13]=k,e[14]=p):p=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ee.IceBreakers,{className:"pb-3"}),e[15]=g):g=e[15];let j;e[16]!==n?(j=s.jsxs(ee.Footer,{children:[g,s.jsx(ee.Input,{onOpenContextPanel:n})]}),e[16]=n,e[17]=j):j=e[17];let b;return e[18]!==p||e[19]!==j?(b=s.jsxs(s.Fragment,{children:[p,j]}),e[18]=p,e[19]=j,e[20]=b):b=e[20],b}function xt(t){const e=$.c(17),{outputs:n,collapsed:r,onToggle:i,variant:a}=t,l=a==="card"?"rounded-xl border border-border bg-muted/95 shadow-sm backdrop-blur-sm":"border-b border-border bg-background";let c;e[0]!==l?(c=Z(l),e[0]=l,e[1]=c):c=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Files in this task"}),e[2]=u):u=e[2];const o=r&&"-rotate-90";let d;e[3]!==o?(d=Z("size-4 text-muted-foreground transition-transform",o),e[3]=o,e[4]=d):d=e[4];let f;e[5]!==d?(f=s.jsx(at,{className:d}),e[5]=d,e[6]=f):f=e[6];let m;e[7]!==i||e[8]!==f?(m=s.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between px-3 py-2.5 text-left",children:[u,f]}),e[7]=i,e[8]=f,e[9]=m):m=e[9];let h;e[10]!==r||e[11]!==n?(h=!r&&s.jsx("div",{className:"flex max-h-72 flex-col gap-1.5 overflow-y-auto px-2 pb-2",children:n.map(ba)}),e[10]=r,e[11]=n,e[12]=h):h=e[12];let v;return e[13]!==c||e[14]!==m||e[15]!==h?(v=s.jsxs("div",{className:c,children:[m,h]}),e[13]=c,e[14]=m,e[15]=h,e[16]=v):v=e[16],v}function ba(t){return s.jsx(Ds,{file:t},t.key)}function va(){const t=$.c(13),e=Re()?.taskId??null,n=Fs();let r;t[0]!==n?(r={enabled:n},t[0]=n,t[1]=r):r=t[1];const{data:i}=Rs(e,r),[a,l]=O.useState(!1),[c,u]=O.useState(!0);if(!e||!i||i.length===0)return null;let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=()=>l(ya),t[2]=o):o=t[2];let d;t[3]!==a||t[4]!==i?(d=s.jsx("div",{className:"absolute top-2 right-2 z-10 hidden w-72 @[1280px]:block",children:s.jsx(xt,{variant:"card",outputs:i,collapsed:a,onToggle:o})}),t[3]=a,t[4]=i,t[5]=d):d=t[5];let f;t[6]===Symbol.for("react.memo_cache_sentinel")?(f=()=>u(ja),t[6]=f):f=t[6];let m;t[7]!==c||t[8]!==i?(m=s.jsx("div",{className:"shrink-0 @[1280px]:hidden",children:s.jsx(xt,{variant:"bar",outputs:i,collapsed:c,onToggle:f})}),t[7]=c,t[8]=i,t[9]=m):m=t[9];let h;return t[10]!==d||t[11]!==m?(h=s.jsxs(s.Fragment,{children:[d,m]}),t[10]=d,t[11]=m,t[12]=h):h=t[12],h}function ja(t){return!t}function ya(t){return!t}function ka(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Os,{children:s.jsx(Sa,{})}),t[0]=e):e=t[0],e}function Sa(){const t=$.c(27),{active:e}=Bs(),{org:n}=oe(),r=Re(),{isChatEmpty:i}=At(),[a,l]=O.useState("chat"),c=Es(),u=Zn(),{runtime:o}=Mt(r?.virtualMcpId);if(u&&o!=="cms"){let S;return t[0]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ee,{className:"animate-in fade-in-0 duration-200",children:s.jsx(ee.Main,{className:"flex flex-col items-center",children:s.jsx(ee.EmptyState,{children:s.jsx(ee.NoAiProviderEmptyState,{})})})}),t[0]=S):S=t[0],S}let f;t[1]!==c.hasDecoKey||t[2]!==c.hasOnlyDecoProvider||t[3]!==c.isLoading||t[4]!==c.isZeroBalance||t[5]!==i||t[6]!==n?(f=c.hasDecoKey&&c.isZeroBalance&&c.hasOnlyDecoProvider&&!c.isLoading&&i&&!Cs(n.id),t[1]=c.hasDecoKey,t[2]=c.hasOnlyDecoProvider,t[3]=c.isLoading,t[4]=c.isZeroBalance,t[5]=i,t[6]=n,t[7]=f):f=t[7];const m=f;let h;t[8]!==m?(h=m&&s.jsx(ee.CreditsEmptyState,{}),t[8]=m,t[9]=h):h=t[9];let v;t[10]!==a||t[11]!==i||t[12]!==o||t[13]!==e?(v=!e&&s.jsx("div",{inert:a!=="chat"?!0:void 0,"aria-hidden":a!=="chat",className:Z("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",a!=="chat"?"opacity-0 pointer-events-none":"opacity-100"),children:i&&o!=="cms"?s.jsx(ga,{onOpenContextPanel:()=>l("context")}):s.jsxs(s.Fragment,{children:[s.jsxs(ee.Main,{className:"relative flex flex-col overflow-hidden @container",children:[s.jsx(va,{}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(ee.Messages,{})})]}),s.jsx(ee.Footer,{children:s.jsx(ee.Input,{onOpenContextPanel:()=>l("context")})})]})}),t[10]=a,t[11]=i,t[12]=o,t[13]=e,t[14]=v):v=t[14];let y;t[15]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(zs,{}),t[15]=y):y=t[15];const k=a!=="context"?!0:void 0,p=a!=="context",g=a==="context"?"opacity-100":"opacity-0 pointer-events-none";let j;t[16]!==g?(j=Z("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",g),t[16]=g,t[17]=j):j=t[17];let b;t[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ra,{back:!0,onClose:()=>l("chat")}),t[18]=b):b=t[18];let x;t[19]!==k||t[20]!==p||t[21]!==j?(x=s.jsx("div",{inert:k,"aria-hidden":p,className:j,children:b}),t[19]=k,t[20]=p,t[21]=j,t[22]=x):x=t[22];let N;return t[23]!==h||t[24]!==v||t[25]!==x?(N=s.jsxs(ee,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[h,v,y,x]}),t[23]=h,t[24]=v,t[25]=x,t[26]=N):N=t[26],N}function Na(){const t=$.c(7),e=V();let n;t[0]!==e?(n=e("agentShellLayout.agentShellLayout.chatLoadingError"),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==n?(r=s.jsx("div",{role:"alert",className:"flex h-full flex-1 items-center justify-center text-sm text-muted-foreground",children:n}),t[2]=n,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Le,{children:s.jsx(ka,{})}),t[4]=i):i=t[4];let a;return t[5]!==r?(a=s.jsx(St,{fallback:r,children:i}),t[5]=r,t[6]=a):a=t[6],a}function Ta(t){const e=$.c(10),{org:n}=oe(),r=Js(),{data:i}=$e.useSession(),a=i?.user?.id,l=t?.id??null,c=!!t&&!!a&&!!t.created_by&&t.created_by!==a;let u;e[0]!==n.id||e[1]!==l?(u=Nt.viewedThreadMetadataRefresh(n.id,l??""),e[0]=n.id,e[1]=l,e[2]=u):u=e[2];const o=!!r&&!!l&&c;let d;e[3]!==r||e[4]!==l?(d=async()=>(await r?.refreshThreadMetadata(l??""),!0),e[3]=r,e[4]=l,e[5]=d):d=e[5];let f;e[6]!==u||e[7]!==o||e[8]!==d?(f={queryKey:u,enabled:o,staleTime:Number.POSITIVE_INFINITY,queryFn:d},e[6]=u,e[7]=o,e[8]=d,e[9]=f):f=e[9],Tt(f)}function Ze(t){const e=$.c(14),{label:n,value:r,onChange:i,options:a}=t;let l;e[0]!==n?(l=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=l):l=e[1];let c;e[2]!==i?(c=f=>f&&i(f),e[2]=i,e[3]=c):c=e[3];let u;e[4]!==a?(u=a.map(_a),e[4]=a,e[5]=u):u=e[5];let o;e[6]!==n||e[7]!==c||e[8]!==u||e[9]!==r?(o=s.jsx(mn,{type:"single",size:"sm",value:r,onValueChange:c,"aria-label":n,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:u}),e[6]=n,e[7]=c,e[8]=u,e[9]=r,e[10]=o):o=e[10];let d;return e[11]!==l||e[12]!==o?(d=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l,o]}),e[11]=l,e[12]=o,e[13]=d):d=e[13],d}function _a(t){return s.jsxs(fn,{value:t.value,className:"h-6 gap-1.5 rounded-lg border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function wa(t){const e=$.c(91),{panel:n,className:r}=t,i=r===void 0?"md:size-[34px]":r,a=V();let l;e[0]!==a?(l=a("sidebar.taskGroupsList.filterChats"),e[0]=a,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(hs,{size:16}),e[2]=c):c=e[2];let u;e[3]!==n.filtersActive?(u=n.filtersActive&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[3]=n.filtersActive,e[4]=u):u=e[4];let o;e[5]!==i||e[6]!==n.filtersActive||e[7]!==l||e[8]!==u?(o=s.jsx(Oe,{asChild:!0,children:s.jsx(Bt,{asChild:!0,children:s.jsxs(Ae,{"aria-label":l,active:n.filtersActive,className:i,children:[c,u]})})}),e[5]=i,e[6]=n.filtersActive,e[7]=l,e[8]=u,e[9]=o):o=e[9];let d;e[10]!==a?(d=a("sidebar.taskGroupsList.filterChats"),e[10]=a,e[11]=d):d=e[11];let f;e[12]!==d?(f=s.jsx(Be,{side:"bottom",children:d}),e[12]=d,e[13]=f):f=e[13];let m;e[14]!==o||e[15]!==f?(m=s.jsxs(ze,{children:[o,f]}),e[14]=o,e[15]=f,e[16]=m):m=e[16];let h;e[17]!==a?(h=a("sidebar.taskGroupsList.filterView"),e[17]=a,e[18]=h):h=e[18];const v=n.groupBy;let y;e[19]!==n?(y=q=>{xe("tasks_panel_group_by_changed",{to_value:q}),n.setGroupBy(q)},e[19]=n,e[20]=y):y=e[20];let k;e[21]!==a?(k=a("sidebar.taskGroupsList.viewList"),e[21]=a,e[22]=k):k=e[22];let p;e[23]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ps,{size:13}),e[23]=p):p=e[23];let g;e[24]!==k?(g={value:"flat",label:k,icon:p},e[24]=k,e[25]=g):g=e[25];let j;e[26]!==a?(j=a("sidebar.taskGroupsList.viewStatus"),e[26]=a,e[27]=j):j=e[27];let b;e[28]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(xs,{size:13}),e[28]=b):b=e[28];let x;e[29]!==j?(x={value:"status",label:j,icon:b},e[29]=j,e[30]=x):x=e[30];let N;e[31]!==g||e[32]!==x?(N=[g,x],e[31]=g,e[32]=x,e[33]=N):N=e[33];let S;e[34]!==n.groupBy||e[35]!==y||e[36]!==N||e[37]!==h?(S=s.jsx(Ze,{label:h,value:v,onChange:y,options:N}),e[34]=n.groupBy,e[35]=y,e[36]=N,e[37]=h,e[38]=S):S=e[38];let T;e[39]!==a?(T=a("sidebar.taskGroupsList.filterType"),e[39]=a,e[40]=T):T=e[40];const w=n.typeFilter;let P;e[41]!==n?(P=q=>{xe("tasks_panel_filter_changed",{to_value:q}),n.setTypeFilter(q)},e[41]=n,e[42]=P):P=e[42];let _;e[43]!==a?(_=a("sidebar.taskGroupsList.typeAll"),e[43]=a,e[44]=_):_=e[44];let I;e[45]!==_?(I={value:"all",label:_},e[45]=_,e[46]=I):I=e[46];let C;e[47]!==a?(C=a("sidebar.taskGroupsList.typeChats"),e[47]=a,e[48]=C):C=e[48];let M;e[49]!==C?(M={value:"manual",label:C},e[49]=C,e[50]=M):M=e[50];let A;e[51]!==a?(A=a("sidebar.taskGroupsList.typeAuto"),e[51]=a,e[52]=A):A=e[52];let D;e[53]!==A?(D={value:"automation",label:A},e[53]=A,e[54]=D):D=e[54];let F;e[55]!==I||e[56]!==M||e[57]!==D?(F=[I,M,D],e[55]=I,e[56]=M,e[57]=D,e[58]=F):F=e[58];let E;e[59]!==n.typeFilter||e[60]!==T||e[61]!==P||e[62]!==F?(E=s.jsx(Ze,{label:T,value:w,onChange:P,options:F}),e[59]=n.typeFilter,e[60]=T,e[61]=P,e[62]=F,e[63]=E):E=e[63];let L;e[64]!==a?(L=a("sidebar.taskGroupsList.filterScope"),e[64]=a,e[65]=L):L=e[65];const H=n.showAll?"team":"mine";let B;e[66]!==n?(B=q=>n.setShowAll(q==="team"),e[66]=n,e[67]=B):B=e[67];let K;e[68]!==a?(K=a("sidebar.taskGroupsList.scopeMine"),e[68]=a,e[69]=K):K=e[69];let R;e[70]!==K?(R={value:"mine",label:K},e[70]=K,e[71]=R):R=e[71];let Y;e[72]!==a?(Y=a("sidebar.taskGroupsList.scopeTeam"),e[72]=a,e[73]=Y):Y=e[73];let U;e[74]!==Y?(U={value:"team",label:Y},e[74]=Y,e[75]=U):U=e[75];let W;e[76]!==R||e[77]!==U?(W=[R,U],e[76]=R,e[77]=U,e[78]=W):W=e[78];let X;e[79]!==L||e[80]!==H||e[81]!==B||e[82]!==W?(X=s.jsx(Ze,{label:L,value:H,onChange:B,options:W}),e[79]=L,e[80]=H,e[81]=B,e[82]=W,e[83]=X):X=e[83];let Q;e[84]!==S||e[85]!==E||e[86]!==X?(Q=s.jsxs(zt,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[S,E,X]}),e[84]=S,e[85]=E,e[86]=X,e[87]=Q):Q=e[87];let G;return e[88]!==Q||e[89]!==m?(G=s.jsxs(Gt,{children:[m,Q]}),e[88]=Q,e[89]=m,e[90]=G):G=e[90],G}function Ca(t,e){return t.filter(n=>n.id===e||!!n.trigger_id||cn(n))}function Pa(){const t=$.c(2),e=Lt()??[];let n;return t[0]!==e?(n=r=>{if(!r)return;const i=e.find(a=>a.id===r);return i?Rt(i.metadata):void 0},t[0]=e,t[1]=n):n=t[1],n}function Aa(t){const e=$.c(9),{virtualMcpId:n,size:r,showAutomationBadge:i}=t,a=r===void 0?"sm":r,l=V();let c;e[0]!==a||e[1]!==n?(c=n?s.jsx(Ia,{virtualMcpId:n,size:a}):s.jsx(ye,{icon:null,name:"?",size:a}),e[0]=a,e[1]=n,e[2]=c):c=e[2];let u;e[3]!==i||e[4]!==l?(u=i&&s.jsx("span",{"aria-label":l("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:s.jsx(Ut,{size:10,className:"text-white"})}),e[3]=i,e[4]=l,e[5]=u):u=e[5];let o;return e[6]!==c||e[7]!==u?(o=s.jsxs("div",{className:"relative shrink-0",children:[c,u]}),e[6]=c,e[7]=u,e[8]=o):o=e[8],o}function Ia(t){const e=$.c(6),{virtualMcpId:n,size:r}=t,i=ce(n);if(!i){let c;return e[0]!==r?(c=s.jsx(ye,{icon:null,name:"?",size:r}),e[0]=r,e[1]=c):c=e[1],c}const a=i.icon??null;let l;return e[2]!==i.title||e[3]!==r||e[4]!==a?(l=s.jsx(ye,{icon:a,name:i.title,size:r}),e[2]=i.title,e[3]=r,e[4]=a,e[5]=l):l=e[5],l}const gt=["thread"];function Ma(t){const e=$.c(53),{open:n,onOpenChange:r}=t,[i,a]=O.useState(""),{org:l}=oe(),{setTaskId:c}=rt(),u=st(),o=V();let d,f,m,h;e[0]!==l.id||e[1]!==i?(h=i.trim(),d=h?20:10,m=Tt,f=Nt.globalSearch(l.id,h,d,gt),e[0]=l.id,e[1]=i,e[2]=d,e[3]=f,e[4]=m,e[5]=h):(d=e[2],f=e[3],m=e[4],h=e[5]);let v;e[6]!==d||e[7]!==u||e[8]!==h?(v=async()=>{const L=await u.call("GLOBAL_SEARCH",{query:h,limit:d,types:[...gt]});return{...L,items:L.items.filter(La)}},e[6]=d,e[7]=u,e[8]=h,e[9]=v):v=e[9];let y;e[10]!==n||e[11]!==f||e[12]!==v?(y={queryKey:f,enabled:n,queryFn:v,staleTime:1e4},e[10]=n,e[11]=f,e[12]=v,e[13]=y):y=e[13];const{data:k,isFetching:p}=m(y);let g;e[14]!==k?.items?(g=k?.items??[],e[14]=k?.items,e[15]=g):g=e[15];const j=g;let b;e[16]!==r?(b=L=>{L||a(""),r(L)},e[16]=r,e[17]=b):b=e[17];const x=b;let N;e[18]!==x||e[19]!==c?(N=L=>{x(!1),c(L.id,L.virtual_mcp_id??void 0)},e[18]=x,e[19]=c,e[20]=N):N=e[20];const S=N;let T;e[21]!==o?(T=o("tasksPanel.globalSearchDialog.title"),e[21]=o,e[22]=T):T=e[22];let w;e[23]!==T?(w=s.jsx(gn,{children:T}),e[23]=T,e[24]=w):w=e[24];let P;e[25]!==o?(P=o("tasksPanel.globalSearchDialog.description"),e[25]=o,e[26]=P):P=e[26];let _;e[27]!==P?(_=s.jsx(bn,{children:P}),e[27]=P,e[28]=_):_=e[28];let I;e[29]!==_||e[30]!==w?(I=s.jsxs(vn,{className:"sr-only",children:[w,_]}),e[29]=_,e[30]=w,e[31]=I):I=e[31];let C;e[32]!==o?(C=o("tasksPanel.globalSearchDialog.placeholder"),e[32]=o,e[33]=C):C=e[33];let M;e[34]!==i||e[35]!==C?(M=s.jsx(_n,{value:i,onValueChange:a,placeholder:C}),e[34]=i,e[35]=C,e[36]=M):M=e[36];let A;e[37]!==S||e[38]!==p||e[39]!==j||e[40]!==o||e[41]!==h?(A=s.jsx(kn,{children:p&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:o("tasksPanel.globalSearchDialog.searching")}):j.length===0?s.jsx(Sn,{children:o("tasksPanel.globalSearchDialog.noResults")}):s.jsx(Nn,{heading:h?void 0:o("tasksPanel.globalSearchDialog.recent"),children:j.map(L=>L.type==="thread"?s.jsxs(Tn,{value:`thread:${L.id}:${L.title}`,onSelect:()=>S(L),className:"gap-2.5",children:[s.jsx(Aa,{virtualMcpId:L.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:L.title||o("tasksPanel.globalSearchDialog.untitledChat")})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(L.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${L.id}`):null)})}),e[37]=S,e[38]=p,e[39]=j,e[40]=o,e[41]=h,e[42]=A):A=e[42];let D;e[43]!==M||e[44]!==A?(D=s.jsxs(wn,{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:[M,A]}),e[43]=M,e[44]=A,e[45]=D):D=e[45];let F;e[46]!==I||e[47]!==D?(F=s.jsxs(jn,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[I,D]}),e[46]=I,e[47]=D,e[48]=F):F=e[48];let E;return e[49]!==x||e[50]!==n||e[51]!==F?(E=s.jsx(yn,{open:n,onOpenChange:x,children:F}),e[49]=x,e[50]=n,e[51]=F,e[52]=E):E=e[52],E}function La(t){return t.type==="thread"}function $a(t){const e=$.c(43),{branch:n,onOutcome:r}=t,i=V();let a;e[0]!==r?(a=S=>{S||r("cancel")},e[0]=r,e[1]=a):a=e[1];let l;e[2]!==i?(l=i("sidebar.archiveWorktreeDialog.title"),e[2]=i,e[3]=l):l=e[3];let c;e[4]!==l?(c=s.jsx(Cn,{children:l}),e[4]=l,e[5]=c):c=e[5];let u;e[6]!==i?(u=i("sidebar.archiveWorktreeDialog.stopsAndDeletesBefore"),e[6]=i,e[7]=u):u=e[7];let o;e[8]!==n?(o=s.jsx("span",{className:"font-mono",children:n}),e[8]=n,e[9]=o):o=e[9];let d;e[10]!==i?(d=i("sidebar.archiveWorktreeDialog.stopsAndDeletesAfter"),e[10]=i,e[11]=d):d=e[11];let f;e[12]!==u||e[13]!==o||e[14]!==d?(f=s.jsxs(Pn,{children:[u," ",o," ",d]}),e[12]=u,e[13]=o,e[14]=d,e[15]=f):f=e[15];let m;e[16]!==c||e[17]!==f?(m=s.jsxs(An,{children:[c,f]}),e[16]=c,e[17]=f,e[18]=m):m=e[18];let h;e[19]!==r?(h=()=>r("cancel"),e[19]=r,e[20]=h):h=e[20];let v;e[21]!==i?(v=i("sidebar.archiveWorktreeDialog.cancel"),e[21]=i,e[22]=v):v=e[22];let y;e[23]!==v||e[24]!==h?(y=s.jsx(In,{onClick:h,children:v}),e[23]=v,e[24]=h,e[25]=y):y=e[25];let k;e[26]===Symbol.for("react.memo_cache_sentinel")?(k=Z(ss({variant:"destructive"})),e[26]=k):k=e[26];let p;e[27]!==r?(p=()=>r("confirm"),e[27]=r,e[28]=p):p=e[28];let g;e[29]!==i?(g=i("sidebar.archiveWorktreeDialog.confirm"),e[29]=i,e[30]=g):g=e[30];let j;e[31]!==p||e[32]!==g?(j=s.jsx(Mn,{className:k,onClick:p,children:g}),e[31]=p,e[32]=g,e[33]=j):j=e[33];let b;e[34]!==y||e[35]!==j?(b=s.jsxs(Ln,{children:[y,j]}),e[34]=y,e[35]=j,e[36]=b):b=e[36];let x;e[37]!==b||e[38]!==m?(x=s.jsxs($n,{children:[m,b]}),e[37]=b,e[38]=m,e[39]=x):x=e[39];let N;return e[40]!==a||e[41]!==x?(N=s.jsx(Dn,{open:!0,onOpenChange:a,children:x}),e[40]=a,e[41]=x,e[42]=N):N=e[42],N}function Da(t,e,n){if(!n)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===n)return a}for(let i=r-1;i>=0;i--){const a=t[i];if(a?.created_by===n)return a}}}function Fa(t){return t==="ephemeral"||t.startsWith("thread:")}function Xt(t){const e=$.c(45),{task:n,isActive:r,onClick:i,onArchive:a,showAutomationBadge:l,showAgentIcon:c,hideStatusIdle:u,indented:o}=t,d=V(),f=Fn(n.status),m=f.icon,h=n.metadata?.kind==="tool_call_run",v=ce(h?void 0:n.virtual_mcp_id);let y;e[0]!==v?(y=$t(v),e[0]=v,e[1]=y):y=e[1];const k=y;Hs(6e4);const p=l||!!n.trigger_id,g=n.id,j="button",b=0;let x;e[2]!==i?(x=B=>{B.target===B.currentTarget&&(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),i())},e[2]=i,e[3]=x):x=e[3];const N=o?"-ml-4 pl-6":"pl-[9px]",S=r?"bg-accent text-accent-foreground":"hover:bg-accent/60";let T;e[4]!==N||e[5]!==S?(T=Z("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",N,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",S),e[4]=N,e[5]=S,e[6]=T):T=e[6];let w;e[7]!==h||e[8]!==c||e[9]!==v?.icon||e[10]!==v?.title?(w=c&&!h&&s.jsx(ye,{icon:v?.icon??null,name:v?.title??"?",size:"2xs"}),e[7]=h,e[8]=c,e[9]=v?.icon,e[10]=v?.title,e[11]=w):w=e[11];let P;e[12]!==p||e[13]!==d?(P=p&&s.jsx(Ut,{size:12,"aria-label":d("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-special"}),e[12]=p,e[13]=d,e[14]=P):P=e[14];let _;e[15]!==d||e[16]!==n.title?(_=n.title||d("tasksPanel.taskRow.untitledTask"),e[15]=d,e[16]=n.title,e[17]=_):_=e[17];let I;e[18]!==_?(I=s.jsx("div",{className:"text-sm text-foreground truncate",children:_}),e[18]=_,e[19]=I):I=e[19];let C;e[20]!==P||e[21]!==I?(C=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[P,I]}),e[20]=P,e[21]=I,e[22]=C):C=e[22];let M;e[23]!==r||e[24]!==k||e[25]!==n.branch||e[26]!==n.updated_at?(M=n.updated_at&&s.jsxs("div",{className:Z("flex items-center gap-1 text-[11px] min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!Fa(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):k?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[k.owner,"/",k.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:En(new Date(n.updated_at))})]}),e[23]=r,e[24]=k,e[25]=n.branch,e[26]=n.updated_at,e[27]=M):M=e[27];let A;e[28]!==C||e[29]!==M?(A=s.jsxs("div",{className:"flex-1 min-w-0",children:[C,M]}),e[28]=C,e[29]=M,e[30]=A):A=e[30];const D="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",F=!u&&s.jsx("span",{className:Z("[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(f.labelKey)}),children:n.status==="in_progress"?s.jsx(je,{className:Z("size-3.5",f.iconClassName)}):s.jsx(m,{size:14,className:f.iconClassName})});let E;e[31]!==a||e[32]!==d?(E=a&&s.jsxs(ze,{children:[s.jsx(Oe,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":d("tasksPanel.taskRow.archiveTask"),onClick:B=>{B.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 transition-opacity flex size-8 items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(ns,{size:14})})}),s.jsx(Be,{side:"right",children:d("tasksPanel.taskRow.archive")})]}),e[31]=a,e[32]=d,e[33]=E):E=e[33];let L;e[34]!==F||e[35]!==E?(L=s.jsxs("div",{className:D,children:[F,E]}),e[34]=F,e[35]=E,e[36]=L):L=e[36];let H;return e[37]!==i||e[38]!==A||e[39]!==L||e[40]!==x||e[41]!==T||e[42]!==w||e[43]!==n.id?(H=s.jsxs("div",{"data-task-id":g,role:j,tabIndex:b,onClick:i,onKeyDown:x,className:T,children:[w,A,L]}),e[37]=i,e[38]=A,e[39]=L,e[40]=x,e[41]=T,e[42]=w,e[43]=n.id,e[44]=H):H=e[44],H}const bt=["requires_action","in_progress","failed","expired","completed"];function Ra(t){const e=new Map(bt.map(n=>[n,[]]));for(const n of t){const r=n.status??"completed";(e.get(r)??e.get("completed")).push(n)}return bt.map(n=>({status:n,threads:e.get(n)}))}const Ea="sidebar.group.expanded.";function Oa(t,e){const n=$.c(3),[r,i]=_t(`${Ea}${t}`,e);let a;return n[0]!==r||n[1]!==i?(a=[r,i],n[0]=r,n[1]=i,n[2]=a):a=n[2],a}function Zt(t){const e=$.c(18),{onClick:n,isFetching:r,indented:i}=t,a=V();let l;e[0]!==a?(l=a("sidebar.showMoreButton.ariaLabel"),e[0]=a,e[1]=l):l=e[1];const c=i?"-ml-4 pl-6 pr-2":"px-2";let u;e[2]!==c?(u=Z("flex items-center gap-2 py-1.5 rounded-lg text-sm text-muted-foreground",c,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=c,e[3]=u):u=e[3];let o;e[4]!==r?(o=r&&s.jsx(je,{className:"size-3.5"}),e[4]=r,e[5]=o):o=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 f;e[9]!==d?(f=s.jsx("span",{children:d}),e[9]=d,e[10]=f):f=e[10];let m;return e[11]!==r||e[12]!==n||e[13]!==l||e[14]!==u||e[15]!==o||e[16]!==f?(m=s.jsxs("button",{type:"button","aria-label":l,onClick:n,disabled:r,className:u,children:[o,f]}),e[11]=r,e[12]=n,e[13]=l,e[14]=u,e[15]=o,e[16]=f,e[17]=m):m=e[17],m}function Ba(t,e,n,r){return[t,e,n,r.type,r.member,r.currentUserId??""].join("|")}function za(t){return t.member==="mine"&&!t.currentUserId}const Qt=4;let Pe=0;const et=[];function Ga(){for(;Pe<Qt&&et.length>0;){const t=et.shift();t&&t()}}function Jt(t){return new Promise((e,n)=>{const r=()=>{Pe++,t().then(e,n).finally(()=>{Pe--,Ga()})};Pe<Qt?r():et.push(r)})}const He=10;function vt(t,e,n,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 l={where:a,limit:i,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return l.status=e,l}function Ha(t,e,n,r){let i=0;for(const a of t)es(a,e,n,r)&&i++;return i}function Qe(t,e,n,r){return Ha(t,e,n,r)}function Va(t,e){return!!(t>=He||t===0&&e)}function jt(t,e){return t<e}function Ua(t,e){return e===!1?!1:e===!0?!0:t}function es(t,e,n,r){return!(t.hidden||(t.status??"completed")!==n||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const Me=new Map,Ce=new Map;function Ka(t,e){return e?t>=He?!0:null:!1}function yt(t){return Me.get(t)}function Wa(t,e){Me.set(t,e)}function qa(t,e,n){const r=Me.get(t);if(r!==void 0){n(r);return}let i=Ce.get(t);i||(i=Jt(e).then(a=>(Me.set(t,a),Ce.delete(t),a)).catch(()=>(Ce.delete(t),Promise.reject(new Error("group probe failed")))),Ce.set(t,i)),i.then(n,()=>n(!1))}function kt(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===He,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Ya(t,e,n,r,i){let a=0;for(const l of t)e.has(l.id)||es(l,n,r,i)&&a++;return a}function Xa(t,e,n,r){const i=$.c(8),{org:a}=oe(),l=Ba(a.id,t,e,n);let c;i[0]!==n?(c=za(n),i[0]=n,i[1]=c):c=i[1];const u=c,[o,d]=O.useState({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});o.identity!==l&&d({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});const f=it(),{threads:m,hasMore:h}=lt(),v=Qe(m,t,e,n),y=Va(v,h),k=Ka(v,h),p=st();if(o.identity===l&&o.serverHasMore===null){const S=k??yt(l);S!==void 0&&d({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:o.probeSubscribedIdentity,serverHasMore:S})}!u&&o.identity===l&&o.serverHasMore===null&&k===null&&yt(l)===void 0&&o.probeSubscribedIdentity!==l&&(d(S=>S.identity===l?{...S,isProbing:!0,probeSubscribedIdentity:l}:S),qa(l,async()=>{const S=vt(t,e,0,n,1),T=await p.call("COLLECTION_THREADS_LIST",S),{totalCount:w}=kt(T),P=Qe(f.threads.get(),t,e,n);return w===void 0?!1:jt(P,w)},S=>{d(T=>T.identity!==l?T:{...T,isProbing:!1,serverHasMore:S})}));const j=async function(){if(o.isFetching||o.isProbing||u)return;const T=l;d(w=>w.identity===T?{...w,isFetching:!0}:w);try{const w=Qe(m,t,e,n),P=vt(t,e,w,n,He),_=await Jt(()=>p.call("COLLECTION_THREADS_LIST",P)),{items:I,hasMore:C,totalCount:M}=kt(_),A=new Set(m.map(Za)),D=Ya(I,A,t,e,n),F=w;f.mergeThreads(I),d(E=>{if(E.identity!==T)return E;let L;return M!==void 0?L=jt(F+D,M):L=I.length===0||D===0?!1:C,Wa(T,L),{...E,isFetching:!1,serverHasMore:L}})}catch(w){const P=w,_=P instanceof Error?P.message:String(P);wt.error(`Could not load more tasks: ${_}`),d(I=>I.identity===T?{...I,isFetching:!1}:I)}},b=o.isFetching||o.isProbing,x=!u&&!b&&Ua(y,o.serverHasMore);let N;return i[2]!==b||i[3]!==j||i[4]!==x||i[5]!==o.isProbing||i[6]!==o.serverHasMore?(N={hasMore:x,isFetching:b,isProbing:o.isProbing,serverHasMore:o.serverHasMore,loadMore:j},i[2]=b,i[3]=j,i[4]=x,i[5]=o.isProbing,i[6]=o.serverHasMore,i[7]=N):N=i[7],N}function Za(t){return t.id}function Qa(t){const e=$.c(20),{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:c,filters:u}=t,{isFetching:o,isProbing:d,loadMore:f,hasMore:m,serverHasMore:h}=Xa("status",n,u),[v,y]=O.useState(!1);!v&&r.length===0&&h===!0&&!o&&!d&&(y(!0),queueMicrotask(()=>{f()}));let k;if(e[0]!==i||e[1]!==c||e[2]!==u||e[3]!==l||e[4]!==a||e[5]!==r){let j;e[7]!==i||e[8]!==c||e[9]!==u||e[10]!==l||e[11]!==a?(j=b=>s.jsx(Xt,{task:b,isActive:i===b.id,onClick:()=>a(b),onArchive:c&&b.created_by===u.currentUserId?()=>l(b):void 0,showAutomationBadge:!!b.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},b.id),e[7]=i,e[8]=c,e[9]=u,e[10]=l,e[11]=a,e[12]=j):j=e[12],k=r.map(j),e[0]=i,e[1]=c,e[2]=u,e[3]=l,e[4]=a,e[5]=r,e[6]=k}else k=e[6];let p;e[13]!==m||e[14]!==o||e[15]!==f?(p=(m||o)&&s.jsx(Zt,{onClick:()=>{f()},isFetching:o,indented:!0}),e[13]=m,e[14]=o,e[15]=f,e[16]=p):p=e[16];let g;return e[17]!==k||e[18]!==p?(g=s.jsxs(s.Fragment,{children:[k,p]}),e[17]=k,e[18]=p,e[19]=g):g=e[19],g}function Ja(t){const e=$.c(43),{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:c,filters:u}=t,o=V(),d=Rn[n],f=d.icon,[m,h]=Oa(`status-${n}`,!1);let v;e[0]!==m||e[1]!==h?(v=function(){h(!m)},e[0]=m,e[1]=h,e[2]=v):v=e[2];const y=v;let k;e[3]!==d.labelKey||e[4]!==o?(k=o("sidebar.taskGroupsList.toggleStatusGroup",{status:o(d.labelKey)}),e[3]=d.labelKey,e[4]=o,e[5]=k):k=e[5];let p;e[6]!==y?(p=_=>{_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),y())},e[6]=y,e[7]=p):p=e[7];let g;e[8]!==f||e[9]!==d.iconClassName?(g=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(f,{size:12,className:d.iconClassName})}),e[8]=f,e[9]=d.iconClassName,e[10]=g):g=e[10];let j;e[11]!==m?(j=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:m?s.jsx(at,{size:14}):s.jsx(as,{size:14})}),e[11]=m,e[12]=j):j=e[12];let b;e[13]!==g||e[14]!==j?(b=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[g,j]}),e[13]=g,e[14]=j,e[15]=b):b=e[15];let x;e[16]!==d.labelKey||e[17]!==o?(x=o(d.labelKey),e[16]=d.labelKey,e[17]=o,e[18]=x):x=e[18];let N;e[19]!==x?(N=s.jsx("span",{className:"flex-1 truncate",children:x}),e[19]=x,e[20]=N):N=e[20];let S;e[21]!==r.length?(S=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:r.length})}),e[21]=r.length,e[22]=S):S=e[22];let T;e[23]!==m||e[24]!==y||e[25]!==k||e[26]!==p||e[27]!==b||e[28]!==N||e[29]!==S?(T=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":m,"aria-label":k,onClick:y,onKeyDown:p,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-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[b,N,S]}),e[23]=m,e[24]=y,e[25]=k,e[26]=p,e[27]=b,e[28]=N,e[29]=S,e[30]=T):T=e[30];let w;e[31]!==i||e[32]!==c||e[33]!==m||e[34]!==u||e[35]!==l||e[36]!==a||e[37]!==n||e[38]!==r?(w=m&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(Qa,{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:c,filters:u})}),e[31]=i,e[32]=c,e[33]=m,e[34]=u,e[35]=l,e[36]=a,e[37]=n,e[38]=r,e[39]=w):w=e[39];let P;return e[40]!==T||e[41]!==w?(P=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[T,w]}),e[40]=T,e[41]=w,e[42]=P):P=e[42],P}function er(t){const e=$.c(41),{threads:n,groupBy:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,filters:c,hasMore:u,isFetchingMore:o,onLoadMore:d,filtersActive:f}=t,m=V();if(n.length===0&&!u&&!o){let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(gs,{className:"size-6 opacity-60"}),e[0]=p):p=e[0];let g;e[1]!==f||e[2]!==m?(g=m(f?"sidebar.myThreadsSection.noChatsMatchFilters":"sidebar.myThreadsSection.noChatsYet"),e[1]=f,e[2]=m,e[3]=g):g=e[3];let j;return e[4]!==g?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[p,s.jsx("p",{className:"text-sm",children:g})]}),e[4]=g,e[5]=j):j=e[5],j}const h=n.length>1||u;if(r==="status"){let p;if(e[6]!==i||e[7]!==h||e[8]!==c||e[9]!==l||e[10]!==a||e[11]!==n){let j;e[13]!==i||e[14]!==h||e[15]!==c||e[16]!==l||e[17]!==a?(j=b=>s.jsx(Ja,{status:b.status,threads:b.threads,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:h,filters:c},b.status),e[13]=i,e[14]=h,e[15]=c,e[16]=l,e[17]=a,e[18]=j):j=e[18],p=Ra(n).map(j),e[6]=i,e[7]=h,e[8]=c,e[9]=l,e[10]=a,e[11]=n,e[12]=p}else p=e[12];let g;return e[19]!==p?(g=s.jsx(s.Fragment,{children:p}),e[19]=p,e[20]=g):g=e[20],g}let v;if(e[21]!==i||e[22]!==h||e[23]!==c||e[24]!==l||e[25]!==a||e[26]!==n){let p;e[28]!==i||e[29]!==h||e[30]!==c||e[31]!==l||e[32]!==a?(p=g=>s.jsx(Xt,{task:g,isActive:i===g.id,onClick:()=>a(g),onArchive:h&&g.created_by===c.currentUserId?()=>l(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0},g.id),e[28]=i,e[29]=h,e[30]=c,e[31]=l,e[32]=a,e[33]=p):p=e[33],v=n.map(p),e[21]=i,e[22]=h,e[23]=c,e[24]=l,e[25]=a,e[26]=n,e[27]=v}else v=e[27];let y;e[34]!==u||e[35]!==o||e[36]!==d?(y=(u||o)&&s.jsx(Zt,{onClick:d,isFetching:o}),e[34]=u,e[35]=o,e[36]=d,e[37]=y):y=e[37];let k;return e[38]!==v||e[39]!==y?(k=s.jsxs(s.Fragment,{children:[v,y]}),e[38]=v,e[39]=y,e[40]=k):k=e[40],k}function tr(t,e){return null}function sr(t,e){return t.some(n=>n.id!==e.taskId&&!n.hidden&&n.branch===e.branch&&n.virtual_mcp_id===e.virtualMcpId)}const nr=["archive","reclaim-worktree"],ar=[];function rr(t){return t==="confirm"?nr:ar}function ir(t){const e=$.c(11),{panel:n}=t;let r;return e[0]!==n.activeTaskId||e[1]!==n.archiveTask||e[2]!==n.filters||e[3]!==n.filtersActive||e[4]!==n.groupBy||e[5]!==n.hasMore||e[6]!==n.isFetchingMore||e[7]!==n.loadMore||e[8]!==n.selectTask||e[9]!==n.threads?(r=s.jsx(er,{threads:n.threads,groupBy:n.groupBy,activeTaskId:n.activeTaskId,onSelectTask:n.selectTask,onArchiveTask:n.archiveTask,filters:n.filters,hasMore:n.hasMore,isFetchingMore:n.isFetchingMore,onLoadMore:n.loadMore,filtersActive:n.filtersActive}),e[0]=n.activeTaskId,e[1]=n.archiveTask,e[2]=n.filters,e[3]=n.filtersActive,e[4]=n.groupBy,e[5]=n.hasMore,e[6]=n.isFetchingMore,e[7]=n.loadMore,e[8]=n.selectTask,e[9]=n.threads,e[10]=r):r=e[10],r}function lr(t){const e=$.c(83);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{onNavigate:r}=n,i=V(),{data:a}=$e.useSession(),l=a?.user?.id,{org:c}=oe();let u;e[2]!==c.id?(u=ke(c.id),e[2]=c.id,e[3]=u):u=e[3];const o=u.id,d=Pa(),{threads:f,hasMore:m,isFetchingMore:h,fetchNextPage:v}=lt(),y=f.filter(ur),{hide:k,setScope:p}=ot(),g=De(),j=st(),{setTaskId:b,createNewTask:x}=rt(),N=Ht(),S=Ge();let T;e[4]!==S||e[5]!==f||e[6]!==N?(T=hn({routeAgentId:N,threadVirtualMcpId:f.find(z=>z.id===S)?.virtual_mcp_id}),e[4]=S,e[5]=f,e[6]=N,e[7]=T):T=e[7];const w=T;let P;e[8]!==r?(P=()=>{r?.()},e[8]=r,e[9]=P):P=e[9];const _=P,I=[...y].sort(dr),[C,M]=O.useState("all"),[A,D]=O.useState("flat"),[F,E]=_t("sidebar-threads-scope-all",!1),[L,H]=O.useState(!1),[B,K]=O.useState(!1);let R;e[10]!==H?(R=()=>{xe("tasks_panel_search_opened"),K(!0),H(!0)},e[10]=H,e[11]=R):R=e[11];const Y=R,[U,W]=O.useState(null),X=l??null;let Q;e[12]!==X||e[13]!==C?(Q={type:C,member:"mine",currentUserId:X},e[12]=X,e[13]=C,e[14]=Q):Q=e[14];const G=Q,q={};F||(q.created_by="me"),p(q);let ae;e[15]!==l?(ae=z=>l?z.filter(ne=>ne.created_by===l):[],e[15]=l,e[16]=ae):ae=e[16];const ie=ae;let J;e[17]!==C?(J=z=>C==="automation"?z.filter(cr):C==="manual"?z.filter(or):z,e[17]=C,e[18]=J):J=e[18];const le=J,te=Ca(le(F?I:ie(I)),S);let se;e[19]!==S||e[20]!==_||e[21]!==l||e[22]!==k||e[23]!==g||e[24]!==c.slug||e[25]!==b||e[26]!==te?(se=z=>{const ne=z.id===S,pe=k(z.id);if(Vs(z.id),!ne)return pe;const be=Da(te,z.id,l);return _(),be?b(be.id,be.virtual_mcp_id):g({to:"/$org",params:{org:c.slug}}),pe},e[19]=S,e[20]=_,e[21]=l,e[22]=k,e[23]=g,e[24]=c.slug,e[25]=b,e[26]=te,e[27]=se):se=e[27];const re=se;let de;e[28]!==j||e[29]!==i?(de=async z=>{try{await j.call("SANDBOX_DELETE",{virtualMcpId:z.virtualMcpId,branch:z.branch,removeWorktree:!0})}catch{wt.error(i("sidebar.archiveWorktreeDialog.reclaimFailed",{branch:z.branch}))}},e[28]=j,e[29]=i,e[30]=de):de=e[30];const ge=de;let ue;e[31]!==f||e[32]!==re||e[33]!==l||e[34]!==W?(ue=z=>{if(l&&z.created_by&&z.created_by!==l)return;const ne=tr();if(!ne||sr(f,ne)){re(z);return}W({task:z,target:ne})},e[31]=f,e[32]=re,e[33]=l,e[34]=W,e[35]=ue):ue=e[35];const Ve=ue;let Ne;e[36]!==re||e[37]!==U||e[38]!==ge||e[39]!==W?(Ne=z=>{const ne=U;ne&&(W(null),(async()=>{for(const pe of rr(z))if(pe==="archive")try{await re(ne.task)}catch{return}else await ge(ne.target)})())},e[36]=re,e[37]=U,e[38]=ge,e[39]=W,e[40]=Ne):Ne=e[40];const Ue=Ne;let Te;e[41]!==_||e[42]!==b?(Te=z=>{_(),b(z.id,z.virtual_mcp_id)},e[41]=_,e[42]=b,e[43]=Te):Te=e[43];const Ke=Te;let _e;e[44]!==w||e[45]!==S||e[46]!==f||e[47]!==_||e[48]!==x||e[49]!==l||e[50]!==o||e[51]!==d||e[52]!==b?(_e=()=>{const z=w??o;xe("sidebar_new_thread_clicked",{virtual_mcp_id:z}),_();const ne=tn(f,z,l,d(z));if(ne){b(ne.id,ne.virtual_mcp_id);return}const pe=f.find(be=>be.id===S)?.branch??null;x(z,pe)},e[44]=w,e[45]=S,e[46]=f,e[47]=_,e[48]=x,e[49]=l,e[50]=o,e[51]=d,e[52]=b,e[53]=_e):_e=e[53];const We=_e;let fe;e[54]!==v?(fe=()=>{v()},e[54]=v,e[55]=fe):fe=e[55];const qe=A!=="flat"||C!=="all"||F;let me;e[56]!==Ue||e[57]!==U?(me=U?s.jsx($a,{branch:U.target.branch,onOutcome:Ue}):null,e[56]=Ue,e[57]=U,e[58]=me):me=e[58];let he;e[59]!==B||e[60]!==L||e[61]!==H?(he=B?s.jsx(Ma,{open:L,onOpenChange:H}):null,e[59]=B,e[60]=L,e[61]=H,e[62]=he):he=e[62];let we;return e[63]!==S||e[64]!==Ve||e[65]!==G||e[66]!==A||e[67]!==m||e[68]!==h||e[69]!==We||e[70]!==Y||e[71]!==Ke||e[72]!==D||e[73]!==E||e[74]!==M||e[75]!==F||e[76]!==fe||e[77]!==qe||e[78]!==me||e[79]!==he||e[80]!==C||e[81]!==te?(we={threads:te,activeTaskId:S,filters:G,hasMore:m,isFetchingMore:h,loadMore:fe,groupBy:A,setGroupBy:D,typeFilter:C,setTypeFilter:M,showAll:F,setShowAll:E,filtersActive:qe,selectTask:Ke,archiveTask:Ve,newThread:We,openSearch:Y,reclaimDialog:me,searchDialog:he},e[63]=S,e[64]=Ve,e[65]=G,e[66]=A,e[67]=m,e[68]=h,e[69]=We,e[70]=Y,e[71]=Ke,e[72]=D,e[73]=E,e[74]=M,e[75]=F,e[76]=fe,e[77]=qe,e[78]=me,e[79]=he,e[80]=C,e[81]=te,e[82]=we):we=e[82],we}function or(t){return!t.trigger_id}function cr(t){return!!t.trigger_id}function dr(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function ur(t){return!t.hidden}function fr(){const t=$.c(60),e=V(),[n,r]=O.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={onNavigate:()=>r(!1)},t[0]=i):i=t[0];const a=lr(i),l=Re()?.activeTask;let c;t[1]!==l?.title||t[2]!==a.activeTaskId||t[3]!==a.threads||t[4]!==e?(c=l?.title||a.threads.find(E=>E.id===a.activeTaskId)?.title||e("tasksPanel.taskRow.untitledTask"),t[1]=l?.title,t[2]=a.activeTaskId,t[3]=a.threads,t[4]=e,t[5]=c):c=t[5];const u=c;let o;t[6]!==a?(o=()=>{r(!1),a.openSearch()},t[6]=a,t[7]=o):o=t[7];const d=o;let f;t[8]!==e?(f=e("chat.threadsMenu.chats"),t[8]=e,t[9]=f):f=t[9];const m=n&&"bg-sidebar-accent";let h;t[10]!==m?(h=Z("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/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",m),t[10]=m,t[11]=h):h=t[11];let v;t[12]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(bs,{size:16,className:"shrink-0"}),t[12]=v):v=t[12];let y;t[13]!==u?(y=s.jsx("span",{className:"truncate max-w-[10rem] font-medium",children:u}),t[13]=u,t[14]=y):y=t[14];let k;t[15]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(at,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[15]=k):k=t[15];let p;t[16]!==f||t[17]!==h||t[18]!==y?(p=s.jsx(Oe,{asChild:!0,children:s.jsx(Bt,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":f,className:h,children:[v,y,k]})})}),t[16]=f,t[17]=h,t[18]=y,t[19]=p):p=t[19];let g;t[20]!==e?(g=e("chat.threadsMenu.chats"),t[20]=e,t[21]=g):g=t[21];let j;t[22]!==g?(j=s.jsx(Be,{side:"bottom",children:g}),t[22]=g,t[23]=j):j=t[23];let b;t[24]!==j||t[25]!==p?(b=s.jsxs(ze,{children:[p,j]}),t[24]=j,t[25]=p,t[26]=b):b=t[26];let x;t[27]!==a?(x=s.jsx(wa,{panel:a,className:"size-8"}),t[27]=a,t[28]=x):x=t[28];let N;t[29]!==e?(N=e("sidebar.taskGroupsList.searchChats"),t[29]=e,t[30]=N):N=t[30];let S;t[31]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(vs,{size:16}),t[31]=S):S=t[31];let T;t[32]!==d||t[33]!==N?(T=s.jsx(Ae,{"aria-label":N,onClick:d,className:"size-8",children:S}),t[32]=d,t[33]=N,t[34]=T):T=t[34];let w;t[35]!==e?(w=e("sidebar.taskGroupsList.newChat"),t[35]=e,t[36]=w):w=t[36];let P;t[37]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(Pt,{size:16}),t[37]=P):P=t[37];let _;t[38]!==a.newThread||t[39]!==w?(_=s.jsx(Ae,{"aria-label":w,onClick:a.newThread,className:"size-8",children:P}),t[38]=a.newThread,t[39]=w,t[40]=_):_=t[40];let I;t[41]!==T||t[42]!==_?(I=s.jsxs("div",{className:"flex items-center gap-0.5",children:[T,_]}),t[41]=T,t[42]=_,t[43]=I):I=t[43];let C;t[44]!==x||t[45]!==I?(C=s.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[x,I]}),t[44]=x,t[45]=I,t[46]=C):C=t[46];let M;t[47]!==a?(M=s.jsx("div",{className:"flex max-h-[60vh] min-h-0 flex-col gap-0.5 overflow-y-auto overscroll-contain",children:s.jsx(ir,{panel:a})}),t[47]=a,t[48]=M):M=t[48];let A;t[49]!==C||t[50]!==M?(A=s.jsxs(zt,{align:"start",side:"bottom",onOpenAutoFocus:mr,className:"flex w-80 flex-col gap-2 p-2",children:[C,M]}),t[49]=C,t[50]=M,t[51]=A):A=t[51];let D;t[52]!==n||t[53]!==b||t[54]!==A?(D=s.jsxs(Gt,{open:n,onOpenChange:r,children:[b,A]}),t[52]=n,t[53]=b,t[54]=A,t[55]=D):D=t[55];let F;return t[56]!==a.reclaimDialog||t[57]!==a.searchDialog||t[58]!==D?(F=s.jsxs(s.Fragment,{children:[D,a.searchDialog,a.reclaimDialog]}),t[56]=a.reclaimDialog,t[57]=a.searchDialog,t[58]=D,t[59]=F):F=t[59],F}function mr(t){return t.preventDefault()}function hr(){const t=$.c(20),e=V(),{threads:n}=lt(),{createNewTask:r}=rt(),i=Vt(),a=Ge();let l;t[0]!==a||t[1]!==n?(l=n.find(k=>k.id===a)?.branch??null,t[0]=a,t[1]=n,t[2]=l):l=t[2];const c=l;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 o=u;let d;t[7]!==e?(d=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=d):d=t[8];let f;t[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Pt,{size:16}),t[9]=f):f=t[9];let m;t[10]!==o||t[11]!==d?(m=s.jsx(Oe,{asChild:!0,children:s.jsx("button",{type:"button",onClick:o,"aria-label":d,className:"flex shrink-0 items-center rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:f})}),t[10]=o,t[11]=d,t[12]=m):m=t[12];let h;t[13]!==e?(h=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=h):h=t[14];let v;t[15]!==h?(v=s.jsx(Be,{side:"bottom",children:h}),t[15]=h,t[16]=v):v=t[16];let y;return t[17]!==m||t[18]!==v?(y=s.jsxs(ze,{children:[m,v]}),t[17]=m,t[18]=v,t[19]=y):y=t[19],y}function pr(t){const e=$.c(14),{virtualMcp:n}=t,r=V(),i=Lt(),{navigateToTask:a}=As(),{create:l}=ot();let c,u;if(e[0]!==i||e[1]!==l||e[2]!==a||e[3]!==r||e[4]!==n){u=Symbol.for("react.early_return_sentinel");e:{const o=qs(n,i);if(!o){u=null;break e}const d=o.mode==="dev";let f;e[7]!==l||e[8]!==a?(f=async p=>{const g=crypto.randomUUID();try{await l({id:g,virtual_mcp_id:p})}catch{}a(g,{virtualMcpId:p})},e[7]=l,e[8]=a,e[9]=f):f=e[9];const m=f,h=(p,g,j)=>s.jsxs("button",{type:"button","aria-pressed":g,"aria-label":p,title:p,onClick:()=>{g||m(o.targetId)},className:Z("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg transition-colors",g?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[s.jsx(j,{className:"size-3.5 shrink-0"}),s.jsx("span",{className:"@max-3xl/panel-header:hidden",children:p})]});let v;e[10]!==r?(v=r("devAgent.devAgentControl.develop"),e[10]=r,e[11]=v):v=e[11];const y=h(v,d,js);let k;e[12]!==r?(k=r("devAgent.devAgentControl.live"),e[12]=r,e[13]=k):k=e[13],c=s.jsxs("div",{className:"inline-flex items-center rounded-lg border border-border bg-muted p-0.5 text-xs font-medium",children:[y,h(k,!d,ys)]})}e[0]=i,e[1]=l,e[2]=a,e[3]=r,e[4]=n,e[5]=c,e[6]=u}else c=e[5],u=e[6];return u!==Symbol.for("react.early_return_sentinel")?u:c}function xr(t){const e=$.c(16),{virtualMcpId:n,taskId:r}=t,{openPanel:i}=Kt();let a;e[0]!==r||e[1]!==n?(a={virtualMcpId:n,taskId:r},e[0]=r,e[1]=n,e[2]=a):a=e[2];const{tabs:l,activeTab:c,mainOpen:u}=Wt(a);if(l.length===0)return null;let o;if(e[3]!==c||e[4]!==u||e[5]!==i||e[6]!==l||e[7]!==n){let f;e[9]!==c||e[10]!==u||e[11]!==i||e[12]!==n?(f=m=>{const h=m.id==="automations"?rs({activeTab:c,mainOpen:u}):u&&m.id===c;return s.jsxs(dt.Tab,{active:h,onClick:()=>{h||(xe("main_panel_tab_clicked",{virtual_mcp_id:n,tab_id:m.id,tab_kind:m.kind,was_active:!1}),i(m.id))},children:[s.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:s.jsx(Ie,{icon:m.icon})}),m.title]},m.id)},e[9]=c,e[10]=u,e[11]=i,e[12]=n,e[13]=f):f=e[13],o=l.map(f),e[3]=c,e[4]=u,e[5]=i,e[6]=l,e[7]=n,e[8]=o}else o=e[8];let d;return e[14]!==o?(d=s.jsx(dt.Tabs,{"data-tour":Us.surfaceTabs,children:o}),e[14]=o,e[15]=d):d=e[15],d}function gr(t){return{threadId:t.routeThreadId,providerKey:t.routeThreadId??t.fallbackKey}}const Je="__mobile-main-panel-tab-select__",tt="main";function br({tabs:t,activeTab:e,mainOpen:n,t:r}){const i=t.find(l=>l.id===e),a=r("mainPanelTabs.mobileMainPanelTabSelect.mainView");return n?i?.title??a:i?.title??t[0]?.title??a}const vr={kind:"component",Component:ks},jr={kind:"component",Component:Ss},yr={kind:"component",Component:Ns},kr={kind:"component",Component:Bn};function Sr({tabs:t,overlayEnabled:e,t:n}){return[{value:"chat",title:n("mainPanelTabs.mobileMainPanelTabSelect.chat"),icon:vr},...t.length>0?t.map(r=>({value:r.id,title:r.title,icon:r.icon})):[{value:tt,title:n("mainPanelTabs.mobileMainPanelTabSelect.mainView"),icon:kr}],...e?[{value:"board",title:n("mainPanelTabs.mobileMainPanelTabSelect.tasks"),icon:jr},{value:"files",title:n("mainPanelTabs.mobileMainPanelTabSelect.library"),icon:yr}]:[]]}function Nr(t){const e=$.c(53),{virtualMcpId:n,taskId:r}=t,i=V(),a=De(),{openPanel:l}=Kt();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const u=Se(c);let o;e[1]!==r||e[2]!==n?(o={virtualMcpId:n,taskId:r},e[1]=r,e[2]=n,e[3]=o):o=e[3];const{tabs:d,activeTab:f,mainOpen:m}=Wt(o),{org:h}=oe(),v=Vn();let y;e[4]!==h.id?(y=ut(h.id),e[4]=h.id,e[5]=y):y=e[5];const k=n===y;let p,g,j,b,x,N,S,T,w,P;if(e[6]!==f||e[7]!==m||e[8]!==a||e[9]!==k||e[10]!==l||e[11]!==h.id||e[12]!==u.org||e[13]!==u.taskId||e[14]!==v||e[15]!==i||e[16]!==d||e[17]!==n){b=Symbol.for("react.early_return_sentinel");e:{const C=Sr({tabs:d,overlayEnabled:!!(u.org&&u.taskId),t:i}),M=m?C.find(R=>R.value===f)?.value??tt:"chat",A=C.find(R=>R.value===M),D=A?.title??br({tabs:d,activeTab:f,mainOpen:m,t:i});let F;e[28]!==a?(F=R=>{a({to:".",search:Y=>({...Y,...dn(R)}),replace:!0})},e[28]=a,e[29]=F):F=e[29];const E=F;let L;e[30]!==k||e[31]!==l||e[32]!==h.id||e[33]!==v||e[34]!==E||e[35]!==n?(L=R=>{if(R!==Je){if(xe("main_panel_tab_clicked",{virtual_mcp_id:n,tab_id:R,source:"mobile_select"}),Ks({reportsOnly:v,onReportAgent:k,tabId:R})){l(R,{virtualmcpid:ut(h.id),search:wr});return}if(R==="chat"||R===tt){E(R==="chat"?"chat":"main");return}l(R,{search:_r})}},e[30]=k,e[31]=l,e[32]=h.id,e[33]=v,e[34]=E,e[35]=n,e[36]=L):L=e[36];const H=L,B=C.find(R=>R.value!==M);if(C.length===2&&B){b=s.jsxs("button",{type:"button",onClick:()=>H(B.value),"aria-label":i("mainPanelTabs.mobileMainPanelTabSelect.switchTo",{name:B.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/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(Ie,{icon:B.icon,className:"size-5"})}),s.jsx("span",{className:"min-w-0 truncate",children:B.title})]});break e}g=Gn,w=Je,P=H;let K;e[37]!==i?(K=i("mainPanelTabs.mobileMainPanelTabSelect.view"),e[37]=i,e[38]=K):K=e[38],j=s.jsx(zn,{"aria-label":K,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 [--card-shadow:none]",children:s.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[A&&s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(Ie,{icon:A.icon,className:"size-5"})}),s.jsx("span",{className:"min-w-0 truncate",children:D})]})}),p=Hn,x="end",N="w-56",e[39]!==D?(S=s.jsx(qt,{value:Je,disabled:!0,hideCheck:!0,className:"hidden",children:D}),e[39]=D,e[40]=S):S=e[40],T=C.map(Tr)}e[6]=f,e[7]=m,e[8]=a,e[9]=k,e[10]=l,e[11]=h.id,e[12]=u.org,e[13]=u.taskId,e[14]=v,e[15]=i,e[16]=d,e[17]=n,e[18]=p,e[19]=g,e[20]=j,e[21]=b,e[22]=x,e[23]=N,e[24]=S,e[25]=T,e[26]=w,e[27]=P}else p=e[18],g=e[19],j=e[20],b=e[21],x=e[22],N=e[23],S=e[24],T=e[25],w=e[26],P=e[27];if(b!==Symbol.for("react.early_return_sentinel"))return b;let _;e[41]!==p||e[42]!==x||e[43]!==N||e[44]!==S||e[45]!==T?(_=s.jsxs(p,{align:x,className:N,children:[S,T]}),e[41]=p,e[42]=x,e[43]=N,e[44]=S,e[45]=T,e[46]=_):_=e[46];let I;return e[47]!==g||e[48]!==j||e[49]!==_||e[50]!==w||e[51]!==P?(I=s.jsxs(g,{value:w,onValueChange:P,children:[j,_]}),e[47]=g,e[48]=j,e[49]=_,e[50]=w,e[51]=P,e[52]=I):I=e[52],I}function Tr(t){return s.jsx(qt,{value:t.value,children:s.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(Ie,{icon:t.icon})}),s.jsx("span",{className:"min-w-0 truncate",children:t.title})]})},t.value)}function _r(t){return{...t,sidepanel:!1}}function wr(t){return{...t,thread:void 0,sidepanel:!1}}function Cr(t,e,n){const r=$.c(33),i=it(),{locator:a}=oe(),l=O.useSyncExternalStore(i.threads.subscribe,i.threads.get),c=O.useSyncExternalStore(i.threadsStatus.subscribe,i.threadsStatus.get);let u;r[0]!==t||r[1]!==l?(u=t===null?null:l.find(x=>x.id===t&&!x.partial)??null,r[0]=t,r[1]=l,r[2]=u):u=r[2];const o=u,[d,f]=O.useState(void 0),[m,h]=O.useState(t);m!==t&&(h(t),f(void 0));let v,y;r[3]!==d||r[4]!==t||r[5]!==o||r[6]!==i||r[7]!==c.kind?(v=()=>{t!==null&&(o||c.kind!=="loading"&&d===void 0&&(f("pending"),i.fetchThreadIntoSlot(t).then(x=>{f(x)})))},y=[t,o,c.kind,d,i],r[3]=d,r[4]=t,r[5]=o,r[6]=i,r[7]=c.kind,r[8]=v,r[9]=y):(v=r[8],y=r[9]),O.useEffect(v,y);let k;r[10]!==n||r[11]!==a||r[12]!==i||r[13]!==e?(k={mutationFn:async x=>i.create({id:x,virtual_mcp_id:e,...n?{branch:n}:{},...en(sessionStorage,a,x)})},r[10]=n,r[11]=a,r[12]=i,r[13]=e,r[14]=k):k=r[14];const p=is(k);let g,j;if(r[15]!==p||r[16]!==d||r[17]!==t||r[18]!==o||r[19]!==c.kind?(g=()=>{t!==null&&(o||d===null&&c.kind!=="loading"&&(p.isPending||p.variables!==t&&p.mutate(t)))},j=[t,o,d,c.kind,p],r[15]=p,r[16]=d,r[17]=t,r[18]=o,r[19]=c.kind,r[20]=g,r[21]=j):(g=r[20],j=r[21]),O.useEffect(g,j),t===null){let x;return r[22]===Symbol.for("react.memo_cache_sentinel")?(x={status:"ready",task:null},r[22]=x):x=r[22],x}if(o){let x;return r[23]!==o?(x={status:"ready",task:o},r[23]=o,r[24]=x):x=r[24],x}if(d&&typeof d=="object"){let x;return r[25]!==d?(x={status:"ready",task:d},r[25]=d,r[26]=x):x=r[26],x}if(p.data){let x;return r[27]!==p.data?(x={status:"ready",task:p.data},r[27]=p.data,r[28]=x):x=r[28],x}if(p.isError){let x;return r[29]!==p.error?(x={status:"error",error:p.error},r[29]=p.error,r[30]=x):x=r[30],x}if(p.isPending||c.kind!=="loading"){let x;return r[31]===Symbol.for("react.memo_cache_sentinel")?(x={status:"creating"},r[31]=x):x=r[31],x}let b;return r[32]===Symbol.for("react.memo_cache_sentinel")?(b={status:"loading"},r[32]=b):b=r[32],b}function Pr(t){const e=$.c(13),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=Se(r);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const l=Fe(a);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={select:Ar},e[2]=c):c=e[2];const u=ls(c),{org:o}=oe();let d;e[3]!==o||e[4]!==i.agentId||e[5]!==i.legacyView||e[6]!==i.org||e[7]!==u||e[8]!==l?(d=i.org?os({pathname:u,org:i.org,pathAgentId:i.agentId,pathLegacyView:i.legacyView,fallbackAgentId:ke(o.id).id,search:l}):null,e[3]=o,e[4]=i.agentId,e[5]=i.legacyView,e[6]=i.org,e[7]=u,e[8]=l,e[9]=d):d=e[9];const f=d;let m;return e[10]!==n||e[11]!==f?(m=f?s.jsx(ct,{target:f}):n,e[10]=n,e[11]=f,e[12]=m):m=e[12],m}function Ar(t){return t.matches.at(-1)?.pathname??t.location.pathname}function Ir(){const t=$.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const n=Se(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const i=Fe(r),{org:a}=oe(),{org:l,taskId:c}=n;if(!l||c===void 0)return null;let u;return t[2]!==l||t[3]!==a.id||t[4]!==i||t[5]!==c?(u=cs({org:l,taskId:c,fallbackAgentId:ke(a.id).id,search:i}),t[2]=l,t[3]=a.id,t[4]=i,t[5]=c,t[6]=u):u=t[6],u}function Mr(){const t=$.c(2),e=Ir();let n;return t[0]!==e?(n=e?s.jsx(ct,{target:e}):null,t[0]=e,t[1]=n):n=t[1],n}function Lr(){const t=$.c(6),e=Kn(),n=De();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const{preview:i}=Fe(r);if(!e||!i)return null;let a;t[1]!==n?(a=()=>n({to:".",search:$r}),t[1]=n,t[2]=a):a=t[2];let l;return t[3]!==i||t[4]!==a?(l=s.jsx(Wn,{previewPath:i,onClose:a,showSeeInLibrary:!0}),t[3]=i,t[4]=a,t[5]=l):l=t[5],l}function $r(t){const{preview:e,...n}=t;return n}const Dr=O.createContext(null);function ts(){return O.useContext(Dr)}function Fr(t){const e=$.c(13),{children:n}=t,r=V(),i=Yt(),a=ts(),l=Ge()!==null;let c;e[0]!==l||e[1]!==i||e[2]!==a?(c=s.jsx(Na,{}),e[0]=l,e[1]=i,e[2]=a,e[3]=c):c=e[3];const u=c;let o;e[4]!==r?(o=r("agentShellLayout.agentShellLayout.chatLoadingError"),e[4]=r,e[5]=o):o=e[5];let d;e[6]!==o?(d=s.jsx("div",{role:"alert",className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:o}),e[6]=o,e[7]=d):d=e[7];const f=n??u;let m;e[8]!==f?(m=s.jsx(Le,{children:f}),e[8]=f,e[9]=m):m=e[9];let h;return e[10]!==d||e[11]!==m?(h=s.jsx(St,{fallback:d,children:m}),e[10]=d,e[11]=m,e[12]=h):h=e[12],h}function Rr(t){const e=$.c(13),{threadId:n,children:r}=t;if(V(),ts(),n===null){let a;return e[0]!==r?(a=s.jsx(ee.ThreadlessProvider,{children:r}),e[0]=r,e[1]=a):a=e[1],a}let i;return e[10]!==r||e[11]!==n?(i=s.jsx(ee.ActiveTaskProvider,{taskId:n,children:r}),e[10]=r,e[11]=n,e[12]=i):i=e[12],i}function Er(t){const e=$.c(3),{onNewTaskRef:n,createNewTask:r}=t;let i;return e[0]!==r||e[1]!==n?(i=()=>(n.current=r,()=>{n.current=null}),e[0]=r,e[1]=n,e[2]=i):i=e[2],O.useLayoutEffect(i),null}function Or({virtualMcpId:t,hasActiveRepository:e,sandboxMap:n,children:r}){const i=V(),{currentBranch:a,activeTask:l,setCurrentTaskBranch:c}=Ee(),u=Yt(),o="agent-sandbox",{data:d}=$e.useSession(),f=d?.user?.id,m=!Is({isDesktopApp:u,harnessId:l?.harness_id}),h=nn({agentSandboxMap:n,threadSandboxMap:l?.metadata?.sandboxMap,userId:f,ownerId:l?.created_by,branch:a}),v=e||Ys(l?.metadata),y=O.useRef(null),k=m&&an({threadLoaded:!!l,isOwner:!!f&&l?.created_by===f,hasActiveRepository:v,branch:a??null,attempted:y.current===(l?.id??null)});O.useEffect(()=>{!k||!l||(y.current=l.id,c(Ft(d?.user?.name||d?.user?.email?.split("@")[0])))},[k,l,d,c]);const p=Mt(t),g=ce(t),j=Et(g,a),{releases:b,createRelease:x}=Xs(t),S=!!f&&l?.created_by===f&&!!a&&a!==j&&!b.some(A=>A.branch===a),T=O.useRef(null);O.useEffect(()=>{!S||!a||T.current!==a&&(T.current=a,x({branch:a,name:Qs(b,i("thread.branchPicker.defaultVersionName")),color:Zs(b.length),createdBy:f,createdAt:new Date().toISOString()}).catch(()=>{}))},[S,a,b,x,f,i]);const w=p.resolved?p.runtime:null,P=rn(t,a??void 0),I=(f&&a?Yn(h?.[f]?.[a]):{})[o]??null,C=I?.previewUrl??null,M=m&&w!=="cms"&&(!!I||P);return m?w==="cms"?s.jsx(pt,{children:r},`${t}:${a??"no-branch"}:${l?.id??""}`):s.jsx(ln,{virtualMcpId:t,branch:a??null,previewUrl:C,enabled:M,children:s.jsx(on,{executionEnabled:m,virtualMcpId:t,branch:a??null,userId:f??null,hasActiveRepository:v,vmEntry:I,threadId:l?.id??null,children:s.jsx(pt,{children:r},`${t}:${a??"no-branch"}:${l?.id??""}`)})},l?.id??"no-thread"):s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsx("div",{className:"flex h-full rounded-[0.75rem] bg-background card-shadow",children:s.jsx(Ot,{image:s.jsx(nt,{size:48,className:"text-muted-foreground"}),title:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWeb"),description:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWebDescription")})})})}function Br(){const t=$.c(16),e=V(),{toggleSidebar:n}=ws(),{virtualMcpId:r,taskId:i}=Ee();let a;t[0]!==e?(a=e("layouts.shellControls.toggleSidebar"),t[0]=e,t[1]=a):a=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ts,{size:16}),t[2]=l):l=t[2];let c;t[3]!==a||t[4]!==n?(c=s.jsx(Ae,{className:"md:hidden",onClick:n,"aria-label":a,children:l}),t[3]=a,t[4]=n,t[5]=c):c=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(fr,{}),t[6]=u):u=t[6];let o;t[7]!==c?(o=s.jsxs(Ye.Topbar.Left,{children:[c,u]}),t[7]=c,t[8]=o):o=t[8];let d;t[9]!==i||t[10]!==r?(d=s.jsx("div",{className:"min-w-0 md:hidden",children:s.jsx(Nr,{virtualMcpId:r,taskId:i})}),t[9]=i,t[10]=r,t[11]=d):d=t[11];let f;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ye.Topbar.Right,{className:"shrink-0",children:s.jsx(hr,{})}),t[12]=f):f=t[12];let m;return t[13]!==o||t[14]!==d?(m=s.jsxs(Ye.Topbar,{className:"border-b border-border/60 px-3",children:[o,d,f]}),t[13]=o,t[14]=d,t[15]=m):m=t[15],m}function zr(t){const e=$.c(25),{layout:n,onNewTaskRef:r,createNewTask:i}=t,{virtualMcpId:a,taskId:l}=Ee(),c=ce(a),u=On()??"overview",o=_s(),[d,f]=O.useState(null),m=d===u,h=o?m:n.threadOpen;let v;e[0]!==u||e[1]!==n||e[2]!==o||e[3]!==m?(v=o?()=>f(m?null:u):n.toggleThread,e[0]=u,e[1]=n,e[2]=o,e[3]=m,e[4]=v):v=e[4];const y=v;let k;e[5]!==i||e[6]!==r?(k=s.jsx(Er,{onNewTaskRef:r,createNewTask:i}),e[5]=i,e[6]=r,e[7]=k):k=e[7];let p;e[8]!==l||e[9]!==a?(p=s.jsx(xr,{virtualMcpId:a,taskId:l}),e[8]=l,e[9]=a,e[10]=p):p=e[10];let g;e[11]!==c?(g=c&&s.jsx(pr,{virtualMcp:c}),e[11]=c,e[12]=g):g=e[12];let j,b;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ht.Thread,{topbar:s.jsx(Br,{}),children:s.jsx(Fr,{})}),b=s.jsx(Ct,{}),e[13]=j,e[14]=b):(j=e[13],b=e[14]);let x;e[15]!==u||e[16]!==n||e[17]!==p||e[18]!==g||e[19]!==h||e[20]!==y?(x=s.jsxs(ht,{...n,threadOpen:h,toggleThread:y,contentKey:u,contentNavigation:p,contentActions:g,children:[j,b]}),e[15]=u,e[16]=n,e[17]=p,e[18]=g,e[19]=h,e[20]=y,e[21]=x):x=e[21];let N;return e[22]!==k||e[23]!==x?(N=s.jsxs(s.Fragment,{children:[k,x]}),e[22]=k,e[23]=x,e[24]=N):N=e[24],N}function Gr(){const t=V(),e=De(),n=pn(),{create:r}=ot(),{org:i}=oe(),l=Se({strict:!1}).org??"",c=Fe({strict:!1}),u=Ge(),o=Vt(),d=Ht(),[f]=O.useState(()=>crypto.randomUUID()),{data:m}=$e.useSession(),[h]=O.useState(()=>Ft(m?.user?.name||m?.user?.email?.split("@")[0])),v=it(),y=O.useSyncExternalStore(v.threads.subscribe,v.threads.get),k=O.useSyncExternalStore(v.threadsStatus.subscribe,v.threadsStatus.get),p=ce(o),g=!!(p&&$t(p)),j=Et(p,null),b=Cr(u,o,h);Ta(b.status==="ready"?b.task:null);const x=p?.metadata?.ui?.layout??null,N=x?{defaultMainView:x.defaultMainView??null,chatDefaultOpen:x.chatDefaultOpen??null}:null,S=un(N),{threadId:T,providerKey:w}=gr({routeThreadId:u,fallbackKey:f}),P=async()=>{const M=crypto.randomUUID(),A=y.find(D=>D.id===T)?.branch??null;try{await r({id:M,virtual_mcp_id:o,...A?{branch:A}:{}})}catch{}n(M,()=>({}))},_=O.useRef(null);O.useEffect(()=>{const M=A=>{Ws(A)&&A.shiftKey&&A.code==="KeyS"&&!A.repeat&&(A.preventDefault(),_.current?.())};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[]);const I=b.status==="ready"?b.task:null,C=I?.virtual_mcp_id;if(I&&C&&!xn({routeAgentId:o,threadAgentId:C})){const M=ds({org:l,agentId:C,superAgentId:ke(i.id).id});return s.jsx(ct,{target:{route:M,search:{thread:I.id,sidepanel:c.sidepanel,mainpanel:c.mainpanel,autosend:c.autosend}}})}if(u===null&&d&&p){if(k.kind==="loading")return s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background card-shadow rounded-[0.75rem] text-sm text-muted-foreground",children:[s.jsx(je,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})});const A=sn(y,o,m?.user?.id,Rt(p.metadata),g,{baseBranch:j})?.id??(g?f:null);if(A)return s.jsx(us,{to:".",replace:!0,search:D=>({...D,thread:A})})}return b.status==="creating"||b.status==="loading"?s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background card-shadow rounded-[0.75rem] text-sm text-muted-foreground",children:[s.jsx(je,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})}):b.status==="error"?s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"alert",className:"flex flex-col h-full items-center justify-center gap-2 bg-background card-shadow rounded-[0.75rem] p-8 text-sm",children:[s.jsx("div",{className:"font-medium",children:t("agentShellLayout.agentShellLayout.taskUnavailable")}),s.jsx("div",{className:"text-muted-foreground",children:b.error.message})]})}):p?s.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:s.jsx(ee.Provider,{virtualMcpId:o,task:b.status==="ready"?b.task:null,children:s.jsx(Gs,{layout:S,children:s.jsx(Or,{virtualMcpId:o,hasActiveRepository:g,sandboxMap:p.metadata?.sandboxMap,children:s.jsx(Rr,{threadId:T,children:s.jsx(Le,{children:s.jsx(zr,{layout:S,onNewTaskRef:_,createNewTask:P})})},w)})})},o)}):s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:s.jsx(Ot,{image:s.jsx(nt,{size:48,className:"text-muted-foreground"}),title:t("agentShellLayout.agentShellLayout.agentNotFound"),description:t("agentShellLayout.agentShellLayout.agentNotFoundDescription",{virtualMcpId:o}),actions:s.jsx(fs,{variant:"outline",onClick:()=>e({to:"/$org",params:{org:l}}),children:t("agentShellLayout.agentShellLayout.goToOrgHome")})})})})}function Vo(){const t=$.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const n=Se(e);if(n.taskId!==void 0){let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Mr,{}),t[1]=i):i=t[1],i}if(n._splat!==void 0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ct,{}),t[2]=i):i=t[2],i}let r;return t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Le,{children:s.jsx(Pr,{children:s.jsx(Un,{children:s.jsxs(qn,{children:[s.jsx(Gr,{}),s.jsx(Lr,{})]})})})}),t[3]=r):r=t[3],r}export{Vo as default};
|
|
1
|
+
import{c as $,b as V,r as O,l as Z,j as s,h as je,X as oe,as as ke,ar as Le,E as St,a as $e,K as Nt,m as Tt,q as xe,a2 as st,at as ss,au as ns,U as _t,t as wt,af as as,d as De,n as dt,av as rs,f as Se,C as ut,e as is,u as Fe,k as ls,aw as os,ax as cs,O as Ct,ay as ds,N as us,B as fs,P as Ye}from"./index-Bo0F7TR2.js";import{i as nt}from"./AlertCircle-RWTRMbKB.js";import{v as ms,w as ft,A as ye,x as hs,y as ps,z as xs,B as gs,C as bs,D as vs,E as Pt,F as js,b as ys,G as ks,n as Ss,l as Ns,j as Ts}from"./agent-icon-DIz0uejY.js";import{u as _s,a as ws}from"./thread-button-C7RONiC_.js";import{T as Ae}from"./toolbar-icon-button-BtgLueB7.js";import{C as ee,w as Cs}from"./index-C-t9tcus.js";import{u as Re,a as At,b as Ee,c as It,d as Ps,e as As,s as Is}from"./chat-context-BUNOOLZ7.js";import{u as Mt}from"./use-session-runtime-Bi7LhVpC.js";import{u as Ms}from"./use-ai-providers-C99u_E8Y.js";import{i as Ls}from"./CheckCircle-C2FTUn3P.js";import{s as mt}from"./XClose-C_pErei1.js";import{a as ce,b as Lt,g as $t}from"./repository-binding-BGULsexx.js";import{I as Dt}from"./integration-icon-ChmmjcAp.js";import{c as $s}from"./use-decopilot-events-Bz4QYcmu.js";import{t as at}from"./ChevronUp-C43CLLe7.js";import{O as Ds}from"./pair-BCvCT-GT.js";import{u as Fs,a as Rs}from"./use-thread-outputs-CKvUbe8p.js";import{u as Es}from"./use-deco-credits-BmfUoRp4.js";import{C as Os,u as Bs,V as zs,a as Gs}from"./input-DDDJO7Ga.js";import{a as rt,b as Hs,f as Vs,L as Us,s as Ks,c as Ws}from"./shell-layout-DTPbTm7i.js";import{f as qs,b as Ys}from"./use-project-scope-BQkBdDIR.js";import{g as Ft,u as Xs,n as Zs,a as Qs}from"./use-releases-eOVPDU9o.js";import{u as Js,d as Rt,a as it,b as lt,c as ot,e as en}from"./thread-intent-J3vN5Vs_.js";import{f as tn,a as Et,b as sn}from"./use-navigate-to-agent-CUailOkl.js";import{o as nn,s as an,u as rn,S as ln,a as on}from"./sandbox-lifecycle-context-B-LQFFsw.js";import{E as Ot}from"./empty-state-ae548Szk.js";import{t as cn,m as dn,u as un}from"./use-chat-layout-state-BWgbiPAM.js";import{C as ht}from"./index-SNhzEDgK.js";import{a as Bt,b as zt,P as Gt}from"./popover-a7N6zy94.js";import{T as Oe,a as Be,b as ze}from"./tooltip-CbYF5mhk.js";import{T as fn,a as mn}from"./toggle-group-DNCEl3IR.js";import{u as Ht,a as Ge,r as hn,b as Vt,c as pn,d as xn}from"./thread-route-X4GbG7FV.js";import{d as gn,h as bn,c as vn,b as jn,D as yn}from"./dialog-5o2urGn5.js";import{c as kn,a as Sn,e as Nn,b as Tn,C as _n,f as wn}from"./command-BDRqfDOz.js";import{i as Ut}from"./ZoomOut-CacJRCxL.js";import{A as Cn,a as Pn,b as An,c as In,g as Mn,d as Ln,e as $n,f as Dn}from"./alert-dialog-UJiEdIyw.js";import{g as Fn,S as Rn}from"./task-status-D3QqYPID.js";import{a as En}from"./format-time-CjIPQhCN.js";import{a as Kt,u as On}from"./use-panel-navigate-EwAAwlcx.js";import{u as Wt}from"./use-main-panel-tabs-BUvooKW_.js";import{T as Ie}from"./tab-icon-glyph-Chq2d8cr.js";import{a as Bn}from"./UserSquare-OqUaFYcL.js";import{b as zn,c as qt,S as Gn,d as Hn}from"./select-B29Xhi6X.js";import{u as Vn}from"./use-organization-settings-C-0W-ky3.js";import{L as ct,a as Un}from"./legacy-main-redirect-CMY7Rgwi.js";import{u as Kn}from"./use-mobile-BTzo-yNE.js";import{L as Wn}from"./preview-dialog-eYgaESCb.js";import{O as qn}from"./org-file-open-context-A6PAiYSr.js";import{B as pt}from"./blocks-preview-workspace-context-B0MPCoC-.js";import{u as Yt}from"./use-is-desktop-app-BNujXJc_.js";import{p as Yn}from"./virtual-mcp-OnNDTvZE.js";import"./Tool01-CQE4YIlY.js";import"./ArrowUp-CdkBKRTp.js";import"./ArrowLeft-B0Qy6MPA.js";import"./ArrowRight-1ZRv0qj4.js";import"./ShoppingBag01-eap5At3d.js";import"./Palette-Bowo13XO.js";import"./Check-B08g8hfv.js";import"./Copy01-BFGk4HTi.js";import"./CreditCard01-D1x66FDR.js";import"./DotsVertical-D5Nqj0bW.js";import"./Image01-C3rMiZ72.js";import"./Key01-DJx3H4Mk.js";import"./Link01-DpMZQMbW.js";import"./LinkExternal01-Hrpy2rKU.js";import"./Monitor01-CHeJ4cBZ.js";import"./Sun-CQdyCDq1.js";import"./Plus-g-qUeP-5.js";import"./SearchMd-Bu5ZPloJ.js";import"./Trash01-ttayP08D.js";import"./Upload01-CxxYSCYc.js";import"./User01-gfze9rr9.js";import"./Users01-CrUbTlAS.js";import"./X-DmQciAIn.js";import"./sheet-Ds43gFnt.js";import"./gateway-client-DGz23Vlr.js";import"./drawer-CkYlAGZd.js";import"./collection-search-Ch2FLY2_.js";import"./use-mcp-client-CgAwsTXX.js";import"./auth-DATmrrln.js";import"./use-mcp-prompts-BIwfN9eR.js";import"./index-BNVSW_Xa.js";import"./form-CparX5oE.js";import"./label-CuQBcvRg.js";import"./input-Bg2anvwf.js";import"./utils-CVEq3hMx.js";import"./decopilot-Bv_sAiFM.js";import"./checkbox-kO5XQBSL.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-DnHqCpqr.js";import"./download-app-dialog-IVAbk28w.js";import"./feature-paywall-CNWP0h2q.js";import"./plan-ladder-BwZyCGet.js";import"./autosend-CmBucBqr.js";import"./location-DBePU4bz.js";import"./collapsible-cP4qew3h.js";import"./use-copy-BfHUaImm.js";import"./usage-stats-Bd-A9GxK.js";import"./markdown-ByHIpwAl.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-C0Zh7icj.js";import"./types-ByzlXSpq.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./tool-namespace-DmnQIdtF.js";import"./use-connection-x5NSsBTY.js";import"./file-type-icon-ChEWF5Jy.js";import"./chat-draft-BTyf-RT4.js";import"./tabs-Bq5-PfFl.js";import"./use-open-billing-url-hrUTQY32.js";import"./index-CQV19DFZ.js";import"./input-CymJ2z2F.js";import"./suggestion-DSzvJMf5.js";import"./use-org-fs-JCXip5_c.js";import"./question-004-sINsf4GQ.js";import"./use-members-B5WIwJLk.js";import"./use-org-auth-client-VwQi3i7g.js";import"./add-connection-dialog-CpdIqje1.js";import"./extract-connection-data-mgYWyu5I.js";import"./metadata-D72DunRR.js";import"./connection-CTmr-OMV.js";import"./connection-card-BMQxerrE.js";import"./useInfiniteQuery-BUmcOy3_.js";import"./infiniteQueryObserver-CJ3Kym5O.js";import"./connection-slug-CITJ0kGN.js";import"./slugify-CEUa2lfQ.js";import"./textarea-CE_tOq7F.js";import"./connection-form-helpers-DwWzoy-c.js";import"./authenticate-and-persist-oauth-BLoneiuH.js";import"./mcp-oauth-C7dtavBP.js";import"./collection-tabs-DVUgETfM.js";import"./badge-DsCXhAux.js";import"./use-infinite-scroll-B8GLgbd5.js";import"./useSuspenseInfiniteQuery-BBD5zNHU.js";import"./project-icon-BE7eT2UX.js";import"./new-project-dialog-CmsEVtp0.js";import"./repository-import-picker-Blpga-5j.js";import"./repository-picker-B8Yoh_bh.js";import"./use-debounced-value-ClYZnycZ.js";import"./required-auth-layout-DJxAIvUt.js";import"./use-org-sso-C9wS7ZE_.js";import"./serial-task-queue-CGOeQgpr.js";import"./backoff-8mStPHYB.js";import"./task-board-C6pPuzYa.js";import"./schema-CJ-VqkAD.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resizable-DT-ha9BR.js";import"./index-NYSezzil.js";import"./index-CSFjWyPp.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-tools-DWBMbNzW.js";import"./resolve-tab-icon-25xT6OFp.js";import"./use-task-metadata-QWnE0BBk.js";import"./use-project-native-view-presence-Bh04AhwN.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-B4qsGcHc.js";import"./site-slug-DebpOoQq.js";import"./preview-content-CKQ8AZkH.js";import"./file-preview-Cd-BJ067.js";import"./utils-DJvBBb8P.js";import"./editor-D-lV1BCh.js";import"./file-share-button-DpD-UIy8.js";function Xn({isThreadLocked:t,hasCloudProviderKeys:e}){return t?!1:!e}function Zn(){const t=$.c(3),e=Ms(),r=Re()?.isThreadLocked??!1,i=e.length>0;let a;return t[0]!==r||t[1]!==i?(a=Xn({isThreadLocked:r,hasCloudProviderKeys:i}),t[0]=r,t[1]=i,t[2]=a):a=t[2],a}function ve(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function Xe(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 Qn(t){return t?t.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function Jn(t){const e=$.c(4),{items:n}=t;let r;e[0]!==n?(r=n.map(ea),e[0]=n,e[1]=r):r=e[1];let i;return e[2]!==r?(i=s.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 ea(t){return s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[s.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.label}),s.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:t.value})]},t.label)}function ta(t){const e=$.c(33),{userTokens:n,assistantTokens:r,otherTokens:i}=t,a=V(),l=n+r+i,c=l>0?n/l*100:0,u=l>0?r/l*100:0,o=l>0?i/l*100:0;let d;e[0]!==c?(d=c>0&&s.jsx("div",{className:"h-full bg-chart-1",style:{width:`${c}%`}}),e[0]=c,e[1]=d):d=e[1];let f;e[2]!==u?(f=u>0&&s.jsx("div",{className:"h-full bg-chart-2",style:{width:`${u}%`}}),e[2]=u,e[3]=f):f=e[3];let m;e[4]!==o?(m=o>0&&s.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${o}%`}}),e[4]=o,e[5]=m):m=e[5];let h;e[6]!==d||e[7]!==f||e[8]!==m?(h=s.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[d,f,m]}),e[6]=d,e[7]=f,e[8]=m,e[9]=h):h=e[9];let v;e[10]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=v):v=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 k;e[14]!==y?(k=s.jsxs("div",{className:"flex items-center gap-1.5",children:[v,s.jsx("span",{className:"text-xs text-muted-foreground",children:y})]}),e[14]=y,e[15]=k):k=e[15];let p;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[16]=p):p=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 j;e[20]!==g?(j=s.jsxs("div",{className:"flex items-center gap-1.5",children:[p,s.jsx("span",{className:"text-xs text-muted-foreground",children:g})]}),e[20]=g,e[21]=j):j=e[21];let b;e[22]!==o||e[23]!==i||e[24]!==a?(b=i>0&&s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.otherPercent",{pct:o.toFixed(1)})})]}),e[22]=o,e[23]=i,e[24]=a,e[25]=b):b=e[25];let x;e[26]!==j||e[27]!==b||e[28]!==k?(x=s.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[k,j,b]}),e[26]=j,e[27]=b,e[28]=k,e[29]=x):x=e[29];let N;return e[30]!==x||e[31]!==h?(N=s.jsxs("div",{className:"flex flex-col gap-2",children:[h,x]}),e[30]=x,e[31]=h,e[32]=N):N=e[32],N}function sa(t){const e=$.c(14),{agentId:n,isError:r}=t,i=ce(n),a=V();let l;e[0]!==i?.title||e[1]!==a?(l=i?.title??a("chat.subtask.subtaskNoun"),e[0]=i?.title,e[1]=a,e[2]=l):l=e[2];const c=l,u=i?.icon??null;let o;e[3]!==u||e[4]!==c?(o=s.jsx(Dt,{icon:u,name:c,size:"xs",className:"size-6 rounded-md shrink-0"}),e[3]=u,e[4]=c,e[5]=o):o=e[5];const d=r?"text-destructive":"text-foreground";let f;e[6]!==d?(f=Z("shrink-0 font-medium",d),e[6]=d,e[7]=f):f=e[7];let m;e[8]!==c||e[9]!==f?(m=s.jsx("span",{className:f,children:c}),e[8]=c,e[9]=f,e[10]=m):m=e[10];let h;return e[11]!==o||e[12]!==m?(h=s.jsxs(s.Fragment,{children:[o,m]}),e[11]=o,e[12]=m,e[13]=h):h=e[13],h}function na(t){const e=$.c(12),{isError:n}=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 l;e[2]!==a?(l=s.jsx(Dt,{icon:null,name:a,size:"xs",className:"size-6 rounded-md shrink-0"}),e[2]=a,e[3]=l):l=e[3];const c=n?"text-destructive":"text-foreground";let u;e[4]!==c?(u=Z("shrink-0 font-medium",c),e[4]=c,e[5]=u):u=e[5];let o;e[6]!==a||e[7]!==u?(o=s.jsx("span",{className:u,children:a}),e[6]=a,e[7]=u,e[8]=o):o=e[8];let d;return e[9]!==l||e[10]!==o?(d=s.jsxs(s.Fragment,{children:[l,o]}),e[9]=l,e[10]=o,e[11]=d):d=e[11],d}function aa(t){const e=$.c(18),{part:n}=t,r=n.input?.agent_id,i=n.state==="input-streaming"||n.state==="input-available"||n.state==="output-available"&&n.preliminary===!0,a=n.state==="output-error",l=n.state==="approval-requested";let c;e[0]!==a?(c=s.jsx(na,{isError:a}),e[0]=a,e[1]=c):c=e[1];let u;e[2]!==r||e[3]!==a?(u=s.jsx(sa,{agentId:r,isError:a}),e[2]=r,e[3]=a,e[4]=u):u=e[4];let o;e[5]!==c||e[6]!==u?(o=s.jsx(O.Suspense,{fallback:c,children:u}),e[5]=c,e[6]=u,e[7]=o):o=e[7];let d;e[8]!==n.input?(d=n.input?.prompt&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-muted-foreground/50",children:"·"}),s.jsx("span",{className:"truncate text-muted-foreground",children:n.input.prompt})]}),e[8]=n.input,e[9]=d):d=e[9];let f;e[10]!==l||e[11]!==a||e[12]!==i?(f=s.jsx("span",{className:"ml-auto shrink-0",children:i?s.jsx(je,{className:"size-3 text-muted-foreground"}):a?s.jsx(ms,{size:12,className:"text-destructive"}):l?s.jsx(nt,{size:12,className:"text-warning"}):s.jsx(Ls,{size:12,className:"text-success"})}),e[10]=l,e[11]=a,e[12]=i,e[13]=f):f=e[13];let m;return e[14]!==o||e[15]!==d||e[16]!==f?(m=s.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[o,d,f]}),e[14]=o,e[15]=d,e[16]=f,e[17]=m):m=e[17],m}function ra(t){const e=$.c(51),{onClose:n,back:r,className:i}=t,a=V(),[l,c]=O.useState(null),{messages:u}=At(),{activeTask:o}=Ee(),{selectedModel:d,selectedVirtualMcp:f}=It(),m=Ps(u),h=[...u].reverse().find(xa),v=h?.metadata?.usage,y=h?.metadata?.modelLimits?.contextWindow??d?.limits?.contextWindow??null,k=v?.contextTokens??0,p=y&&y>0?(k/y*100).toFixed(1):null,g=u;let j;e[0]!==g?(j=g.filter(pa).reduce(ha,0),e[0]=g,e[1]=j):j=e[1];const b=j,x=u;let N;e[2]!==x?(N=x.filter(ma).reduce(fa,0),e[2]=x,e[3]=N):N=e[3];const S=N,T=Math.max(0,m.totalTokens-b-S),w=u[0],P=u.at(-1),_=w?.metadata?.created_at??o?.created_at,I=P?.metadata?.created_at??o?.updated_at,C=u.filter(ua),M=u.flatMap(ca),A=d?.modelId?Qn(d.modelId):"—",D=f?.title??"Super Agent",F=$s(),E=[{label:a("chat.contextPanel.sessionLabel"),value:o?.title??a("chat.contextPanel.newChat")},{label:a("chat.contextPanel.messagesLabel"),value:C.length},{label:a("chat.contextPanel.agentLabel"),value:D},...F?[{label:a("chat.contextPanel.modelLabel"),value:A}]:[],{label:a("chat.contextPanel.contextLimitLabel"),value:y?ve(y):"—"},{label:a("chat.contextPanel.sessionTokensLabel"),value:m.totalTokens>0?ve(m.totalTokens):"0"},{label:a("chat.contextPanel.usageLabel"),value:p!==null?`${p}%`:"—"},{label:a("chat.contextPanel.inputTokensLabel"),value:m.inputTokens>0?ve(m.inputTokens):"0"},{label:a("chat.contextPanel.outputTokensLabel"),value:m.outputTokens>0?ve(m.outputTokens):"0"},{label:a("chat.contextPanel.reasoningTokensLabel"),value:m.reasoningTokens>0?ve(m.reasoningTokens):"0"},...F?[{label:a("chat.contextPanel.costLabel"),value:m.cost>0?`$${m.cost<.001?m.cost.toFixed(6):m.cost.toFixed(4)}`:"$0.00"}]:[],{label:a("chat.contextPanel.sessionCreatedLabel"),value:Xe(_)},{label:a("chat.contextPanel.lastActivityLabel"),value:Xe(I)}];if(!o&&C.length===0){let G;e[4]!==i?(G=Z("flex flex-col h-full w-full border-l border-border bg-background",i),e[4]=i,e[5]=G):G=e[5];let q;e[6]!==a?(q=a("chat.contextPanel.title"),e[6]=a,e[7]=q):q=e[7];let ae;e[8]!==q?(ae=s.jsx("span",{className:"text-sm font-medium text-foreground",children:q}),e[8]=q,e[9]=ae):ae=e[9];let ie;e[10]!==r?(ie=r?s.jsx(ft,{size:14,className:"text-muted-foreground"}):s.jsx(mt,{size:14,className:"text-muted-foreground"}),e[10]=r,e[11]=ie):ie=e[11];let J;e[12]!==n||e[13]!==ie?(J=s.jsx("button",{type:"button",onClick:n,className:"flex size-6 items-center justify-center hover:bg-accent transition-colors rounded-lg",children:ie}),e[12]=n,e[13]=ie,e[14]=J):J=e[14];let le;e[15]!==ae||e[16]!==J?(le=s.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[ae,J]}),e[15]=ae,e[16]=J,e[17]=le):le=e[17];let te;e[18]!==a?(te=a("chat.contextPanel.emptyState"),e[18]=a,e[19]=te):te=e[19];let se;e[20]!==te?(se=s.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:te})}),e[20]=te,e[21]=se):se=e[21];let re;return e[22]!==le||e[23]!==se||e[24]!==G?(re=s.jsxs("div",{className:G,children:[le,se]}),e[22]=le,e[23]=se,e[24]=G,e[25]=re):re=e[25],re}let L;e[26]!==i?(L=Z("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",i),e[26]=i,e[27]=L):L=e[27];let H;e[28]!==a?(H=a("chat.contextPanel.title"),e[28]=a,e[29]=H):H=e[29];let B;e[30]!==H?(B=s.jsx("span",{className:"text-sm font-medium text-foreground",children:H}),e[30]=H,e[31]=B):B=e[31];let K;e[32]!==r?(K=r?s.jsx(ft,{size:14}):s.jsx(mt,{size:14}),e[32]=r,e[33]=K):K=e[33];let R;e[34]!==n||e[35]!==K?(R=s.jsx("button",{type:"button",onClick:n,className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:K}),e[34]=n,e[35]=K,e[36]=R):R=e[36];let Y;e[37]!==B||e[38]!==R?(Y=s.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[B,R]}),e[37]=B,e[38]=R,e[39]=Y):Y=e[39];let U;e[40]!==a?(U=a("chat.contextPanel.contextBreakdownSection"),e[40]=a,e[41]=U):U=e[41];let W;e[42]!==U?(W=s.jsx("span",{className:"text-xs text-muted-foreground",children:U}),e[42]=U,e[43]=W):W=e[43];let X;e[44]!==S||e[45]!==T||e[46]!==b?(X=s.jsx(ta,{userTokens:b,assistantTokens:S,otherTokens:T}),e[44]=S,e[45]=T,e[46]=b,e[47]=X):X=e[47];let Q;return e[48]!==W||e[49]!==X?(Q=s.jsxs("div",{className:"flex flex-col gap-3",children:[W,X]}),e[48]=W,e[49]=X,e[50]=Q):Q=e[50],s.jsxs("div",{className:L,children:[Y,s.jsxs("div",{className:"flex flex-col gap-8 p-6",children:[M.length>0&&s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.subtasksSection")}),s.jsx("div",{className:"flex flex-col gap-1",children:M.map(oa)})]}),s.jsx(Jn,{items:E}),Q,C.length>0&&s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.rawMessagesSection")}),s.jsx("div",{className:"flex flex-col gap-1",children:C.map(G=>{const q=G.metadata?.created_at,ae=l?.id===G.id;return s.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[s.jsxs("button",{type:"button",onClick:()=>c(ae?null:G),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent/50 w-full text-left cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("span",{className:Z("shrink-0 font-medium",G.role==="user"?"text-chart-1":"text-chart-2"),children:G.role}),s.jsx("span",{className:"text-muted-foreground",children:"•"}),s.jsx("span",{className:"truncate text-muted-foreground font-mono",children:G.id})]}),q&&s.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:Xe(q)})]}),ae&&s.jsxs(s.Fragment,{children:[G.role==="assistant"&&(()=>{const ie=G.metadata?._request;if(!ie)return null;const J=ie.systemSections??[],le=Math.max(1,...J.map(la)),te=J.reduce(ia,0);return s.jsxs("div",{className:"border-t border-border/50 px-3 py-2.5 text-xs space-y-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"font-medium text-foreground",children:a("chat.contextPanel.requestLabel")}),s.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[ie.activeTools??0," / ",ie.tools??0," ",a("chat.contextPanel.toolsActive")]})]}),J.length>0&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("div",{className:"text-muted-foreground",children:[a("chat.contextPanel.systemPromptLabel")," ",s.jsxs("span",{className:"tabular-nums",children:["~",Math.round(te/4).toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),J.map((se,re)=>{const de=se.preview.match(/^<([a-z-]+)/i)?.[1]??`section ${re}`,ge=se.chars/le*100,ue=Math.round(se.chars/4);return s.jsxs("div",{className:"space-y-0.5",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("span",{className:"font-mono text-foreground truncate",children:de}),s.jsxs("span",{className:"text-muted-foreground tabular-nums shrink-0",children:["~",ue.toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),s.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full bg-chart-3",style:{width:`${ge}%`}})})]},re)})]})]})})(),s.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 ia(t,e){return t+e.chars}function la(t){return t.chars}function oa(t,e){return s.jsx(aa,{part:t},e)}function ca(t){return(t.parts??[]).filter(da)}function da(t){return t.type==="tool-subtask"}function ua(t){return t.role!=="system"}function fa(t,e){const n=e.metadata?.usage;return t+(n?.outputTokens??0)}function ma(t){return t.role==="assistant"}function ha(t,e){const n=e.metadata?.usage;return t+(n?.inputTokens??0)}function pa(t){return t.role==="user"}function xa(t){return t.role==="assistant"&&t.metadata?.usage}function ga(t){const e=$.c(21),{onOpenContextPanel:n}=t,{org:r}=oe(),{selectedVirtualMcp:i}=It();let a;e[0]!==r.id?(a=ke(r.id),e[0]=r.id,e[1]=a):a=e[1];const c=i??a,o=ce(c.id)??c,d=o.title??"Super Agent",f=o.icon??null,m=o.description??null;let h;e[2]!==f||e[3]!==d?(h=s.jsx(ye,{icon:f,name:d,size:"lg"}),e[2]=f,e[3]=d,e[4]=h):h=e[4];let v;e[5]!==d?(v=s.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-foreground",children:d}),e[5]=d,e[6]=v):v=e[6];let y;e[7]!==m?(y=m?s.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-balance",children:m}):null,e[7]=m,e[8]=y):y=e[8];let k;e[9]!==v||e[10]!==y?(k=s.jsxs("div",{className:"space-y-1.5",children:[v,y]}),e[9]=v,e[10]=y,e[11]=k):k=e[11];let p;e[12]!==h||e[13]!==k?(p=s.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,k]}),e[12]=h,e[13]=k,e[14]=p):p=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ee.IceBreakers,{className:"pb-3"}),e[15]=g):g=e[15];let j;e[16]!==n?(j=s.jsxs(ee.Footer,{children:[g,s.jsx(ee.Input,{onOpenContextPanel:n})]}),e[16]=n,e[17]=j):j=e[17];let b;return e[18]!==p||e[19]!==j?(b=s.jsxs(s.Fragment,{children:[p,j]}),e[18]=p,e[19]=j,e[20]=b):b=e[20],b}function xt(t){const e=$.c(17),{outputs:n,collapsed:r,onToggle:i,variant:a}=t,l=a==="card"?"rounded-xl border border-border bg-muted/95 shadow-sm backdrop-blur-sm":"border-b border-border bg-background";let c;e[0]!==l?(c=Z(l),e[0]=l,e[1]=c):c=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Files in this task"}),e[2]=u):u=e[2];const o=r&&"-rotate-90";let d;e[3]!==o?(d=Z("size-4 text-muted-foreground transition-transform",o),e[3]=o,e[4]=d):d=e[4];let f;e[5]!==d?(f=s.jsx(at,{className:d}),e[5]=d,e[6]=f):f=e[6];let m;e[7]!==i||e[8]!==f?(m=s.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between px-3 py-2.5 text-left",children:[u,f]}),e[7]=i,e[8]=f,e[9]=m):m=e[9];let h;e[10]!==r||e[11]!==n?(h=!r&&s.jsx("div",{className:"flex max-h-72 flex-col gap-1.5 overflow-y-auto px-2 pb-2",children:n.map(ba)}),e[10]=r,e[11]=n,e[12]=h):h=e[12];let v;return e[13]!==c||e[14]!==m||e[15]!==h?(v=s.jsxs("div",{className:c,children:[m,h]}),e[13]=c,e[14]=m,e[15]=h,e[16]=v):v=e[16],v}function ba(t){return s.jsx(Ds,{file:t},t.key)}function va(){const t=$.c(13),e=Re()?.taskId??null,n=Fs();let r;t[0]!==n?(r={enabled:n},t[0]=n,t[1]=r):r=t[1];const{data:i}=Rs(e,r),[a,l]=O.useState(!1),[c,u]=O.useState(!0);if(!e||!i||i.length===0)return null;let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=()=>l(ya),t[2]=o):o=t[2];let d;t[3]!==a||t[4]!==i?(d=s.jsx("div",{className:"absolute top-2 right-2 z-10 hidden w-72 @[1280px]:block",children:s.jsx(xt,{variant:"card",outputs:i,collapsed:a,onToggle:o})}),t[3]=a,t[4]=i,t[5]=d):d=t[5];let f;t[6]===Symbol.for("react.memo_cache_sentinel")?(f=()=>u(ja),t[6]=f):f=t[6];let m;t[7]!==c||t[8]!==i?(m=s.jsx("div",{className:"shrink-0 @[1280px]:hidden",children:s.jsx(xt,{variant:"bar",outputs:i,collapsed:c,onToggle:f})}),t[7]=c,t[8]=i,t[9]=m):m=t[9];let h;return t[10]!==d||t[11]!==m?(h=s.jsxs(s.Fragment,{children:[d,m]}),t[10]=d,t[11]=m,t[12]=h):h=t[12],h}function ja(t){return!t}function ya(t){return!t}function ka(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Os,{children:s.jsx(Sa,{})}),t[0]=e):e=t[0],e}function Sa(){const t=$.c(27),{active:e}=Bs(),{org:n}=oe(),r=Re(),{isChatEmpty:i}=At(),[a,l]=O.useState("chat"),c=Es(),u=Zn(),{runtime:o}=Mt(r?.virtualMcpId);if(u&&o!=="cms"){let S;return t[0]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ee,{className:"animate-in fade-in-0 duration-200",children:s.jsx(ee.Main,{className:"flex flex-col items-center",children:s.jsx(ee.EmptyState,{children:s.jsx(ee.NoAiProviderEmptyState,{})})})}),t[0]=S):S=t[0],S}let f;t[1]!==c.hasDecoKey||t[2]!==c.hasOnlyDecoProvider||t[3]!==c.isLoading||t[4]!==c.isZeroBalance||t[5]!==i||t[6]!==n?(f=c.hasDecoKey&&c.isZeroBalance&&c.hasOnlyDecoProvider&&!c.isLoading&&i&&!Cs(n.id),t[1]=c.hasDecoKey,t[2]=c.hasOnlyDecoProvider,t[3]=c.isLoading,t[4]=c.isZeroBalance,t[5]=i,t[6]=n,t[7]=f):f=t[7];const m=f;let h;t[8]!==m?(h=m&&s.jsx(ee.CreditsEmptyState,{}),t[8]=m,t[9]=h):h=t[9];let v;t[10]!==a||t[11]!==i||t[12]!==o||t[13]!==e?(v=!e&&s.jsx("div",{inert:a!=="chat"?!0:void 0,"aria-hidden":a!=="chat",className:Z("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",a!=="chat"?"opacity-0 pointer-events-none":"opacity-100"),children:i&&o!=="cms"?s.jsx(ga,{onOpenContextPanel:()=>l("context")}):s.jsxs(s.Fragment,{children:[s.jsxs(ee.Main,{className:"relative flex flex-col overflow-hidden @container",children:[s.jsx(va,{}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(ee.Messages,{})})]}),s.jsx(ee.Footer,{children:s.jsx(ee.Input,{onOpenContextPanel:()=>l("context")})})]})}),t[10]=a,t[11]=i,t[12]=o,t[13]=e,t[14]=v):v=t[14];let y;t[15]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(zs,{}),t[15]=y):y=t[15];const k=a!=="context"?!0:void 0,p=a!=="context",g=a==="context"?"opacity-100":"opacity-0 pointer-events-none";let j;t[16]!==g?(j=Z("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",g),t[16]=g,t[17]=j):j=t[17];let b;t[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ra,{back:!0,onClose:()=>l("chat")}),t[18]=b):b=t[18];let x;t[19]!==k||t[20]!==p||t[21]!==j?(x=s.jsx("div",{inert:k,"aria-hidden":p,className:j,children:b}),t[19]=k,t[20]=p,t[21]=j,t[22]=x):x=t[22];let N;return t[23]!==h||t[24]!==v||t[25]!==x?(N=s.jsxs(ee,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[h,v,y,x]}),t[23]=h,t[24]=v,t[25]=x,t[26]=N):N=t[26],N}function Na(){const t=$.c(7),e=V();let n;t[0]!==e?(n=e("agentShellLayout.agentShellLayout.chatLoadingError"),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==n?(r=s.jsx("div",{role:"alert",className:"flex h-full flex-1 items-center justify-center text-sm text-muted-foreground",children:n}),t[2]=n,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Le,{children:s.jsx(ka,{})}),t[4]=i):i=t[4];let a;return t[5]!==r?(a=s.jsx(St,{fallback:r,children:i}),t[5]=r,t[6]=a):a=t[6],a}function Ta(t){const e=$.c(10),{org:n}=oe(),r=Js(),{data:i}=$e.useSession(),a=i?.user?.id,l=t?.id??null,c=!!t&&!!a&&!!t.created_by&&t.created_by!==a;let u;e[0]!==n.id||e[1]!==l?(u=Nt.viewedThreadMetadataRefresh(n.id,l??""),e[0]=n.id,e[1]=l,e[2]=u):u=e[2];const o=!!r&&!!l&&c;let d;e[3]!==r||e[4]!==l?(d=async()=>(await r?.refreshThreadMetadata(l??""),!0),e[3]=r,e[4]=l,e[5]=d):d=e[5];let f;e[6]!==u||e[7]!==o||e[8]!==d?(f={queryKey:u,enabled:o,staleTime:Number.POSITIVE_INFINITY,queryFn:d},e[6]=u,e[7]=o,e[8]=d,e[9]=f):f=e[9],Tt(f)}function Ze(t){const e=$.c(14),{label:n,value:r,onChange:i,options:a}=t;let l;e[0]!==n?(l=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=l):l=e[1];let c;e[2]!==i?(c=f=>f&&i(f),e[2]=i,e[3]=c):c=e[3];let u;e[4]!==a?(u=a.map(_a),e[4]=a,e[5]=u):u=e[5];let o;e[6]!==n||e[7]!==c||e[8]!==u||e[9]!==r?(o=s.jsx(mn,{type:"single",size:"sm",value:r,onValueChange:c,"aria-label":n,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:u}),e[6]=n,e[7]=c,e[8]=u,e[9]=r,e[10]=o):o=e[10];let d;return e[11]!==l||e[12]!==o?(d=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l,o]}),e[11]=l,e[12]=o,e[13]=d):d=e[13],d}function _a(t){return s.jsxs(fn,{value:t.value,className:"h-6 gap-1.5 rounded-lg border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function wa(t){const e=$.c(91),{panel:n,className:r}=t,i=r===void 0?"md:size-[34px]":r,a=V();let l;e[0]!==a?(l=a("sidebar.taskGroupsList.filterChats"),e[0]=a,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(hs,{size:16}),e[2]=c):c=e[2];let u;e[3]!==n.filtersActive?(u=n.filtersActive&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[3]=n.filtersActive,e[4]=u):u=e[4];let o;e[5]!==i||e[6]!==n.filtersActive||e[7]!==l||e[8]!==u?(o=s.jsx(Oe,{asChild:!0,children:s.jsx(Bt,{asChild:!0,children:s.jsxs(Ae,{"aria-label":l,active:n.filtersActive,className:i,children:[c,u]})})}),e[5]=i,e[6]=n.filtersActive,e[7]=l,e[8]=u,e[9]=o):o=e[9];let d;e[10]!==a?(d=a("sidebar.taskGroupsList.filterChats"),e[10]=a,e[11]=d):d=e[11];let f;e[12]!==d?(f=s.jsx(Be,{side:"bottom",children:d}),e[12]=d,e[13]=f):f=e[13];let m;e[14]!==o||e[15]!==f?(m=s.jsxs(ze,{children:[o,f]}),e[14]=o,e[15]=f,e[16]=m):m=e[16];let h;e[17]!==a?(h=a("sidebar.taskGroupsList.filterView"),e[17]=a,e[18]=h):h=e[18];const v=n.groupBy;let y;e[19]!==n?(y=q=>{xe("tasks_panel_group_by_changed",{to_value:q}),n.setGroupBy(q)},e[19]=n,e[20]=y):y=e[20];let k;e[21]!==a?(k=a("sidebar.taskGroupsList.viewList"),e[21]=a,e[22]=k):k=e[22];let p;e[23]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ps,{size:13}),e[23]=p):p=e[23];let g;e[24]!==k?(g={value:"flat",label:k,icon:p},e[24]=k,e[25]=g):g=e[25];let j;e[26]!==a?(j=a("sidebar.taskGroupsList.viewStatus"),e[26]=a,e[27]=j):j=e[27];let b;e[28]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(xs,{size:13}),e[28]=b):b=e[28];let x;e[29]!==j?(x={value:"status",label:j,icon:b},e[29]=j,e[30]=x):x=e[30];let N;e[31]!==g||e[32]!==x?(N=[g,x],e[31]=g,e[32]=x,e[33]=N):N=e[33];let S;e[34]!==n.groupBy||e[35]!==y||e[36]!==N||e[37]!==h?(S=s.jsx(Ze,{label:h,value:v,onChange:y,options:N}),e[34]=n.groupBy,e[35]=y,e[36]=N,e[37]=h,e[38]=S):S=e[38];let T;e[39]!==a?(T=a("sidebar.taskGroupsList.filterType"),e[39]=a,e[40]=T):T=e[40];const w=n.typeFilter;let P;e[41]!==n?(P=q=>{xe("tasks_panel_filter_changed",{to_value:q}),n.setTypeFilter(q)},e[41]=n,e[42]=P):P=e[42];let _;e[43]!==a?(_=a("sidebar.taskGroupsList.typeAll"),e[43]=a,e[44]=_):_=e[44];let I;e[45]!==_?(I={value:"all",label:_},e[45]=_,e[46]=I):I=e[46];let C;e[47]!==a?(C=a("sidebar.taskGroupsList.typeChats"),e[47]=a,e[48]=C):C=e[48];let M;e[49]!==C?(M={value:"manual",label:C},e[49]=C,e[50]=M):M=e[50];let A;e[51]!==a?(A=a("sidebar.taskGroupsList.typeAuto"),e[51]=a,e[52]=A):A=e[52];let D;e[53]!==A?(D={value:"automation",label:A},e[53]=A,e[54]=D):D=e[54];let F;e[55]!==I||e[56]!==M||e[57]!==D?(F=[I,M,D],e[55]=I,e[56]=M,e[57]=D,e[58]=F):F=e[58];let E;e[59]!==n.typeFilter||e[60]!==T||e[61]!==P||e[62]!==F?(E=s.jsx(Ze,{label:T,value:w,onChange:P,options:F}),e[59]=n.typeFilter,e[60]=T,e[61]=P,e[62]=F,e[63]=E):E=e[63];let L;e[64]!==a?(L=a("sidebar.taskGroupsList.filterScope"),e[64]=a,e[65]=L):L=e[65];const H=n.showAll?"team":"mine";let B;e[66]!==n?(B=q=>n.setShowAll(q==="team"),e[66]=n,e[67]=B):B=e[67];let K;e[68]!==a?(K=a("sidebar.taskGroupsList.scopeMine"),e[68]=a,e[69]=K):K=e[69];let R;e[70]!==K?(R={value:"mine",label:K},e[70]=K,e[71]=R):R=e[71];let Y;e[72]!==a?(Y=a("sidebar.taskGroupsList.scopeTeam"),e[72]=a,e[73]=Y):Y=e[73];let U;e[74]!==Y?(U={value:"team",label:Y},e[74]=Y,e[75]=U):U=e[75];let W;e[76]!==R||e[77]!==U?(W=[R,U],e[76]=R,e[77]=U,e[78]=W):W=e[78];let X;e[79]!==L||e[80]!==H||e[81]!==B||e[82]!==W?(X=s.jsx(Ze,{label:L,value:H,onChange:B,options:W}),e[79]=L,e[80]=H,e[81]=B,e[82]=W,e[83]=X):X=e[83];let Q;e[84]!==S||e[85]!==E||e[86]!==X?(Q=s.jsxs(zt,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[S,E,X]}),e[84]=S,e[85]=E,e[86]=X,e[87]=Q):Q=e[87];let G;return e[88]!==Q||e[89]!==m?(G=s.jsxs(Gt,{children:[m,Q]}),e[88]=Q,e[89]=m,e[90]=G):G=e[90],G}function Ca(t,e){return t.filter(n=>n.id===e||!!n.trigger_id||cn(n))}function Pa(){const t=$.c(2),e=Lt()??[];let n;return t[0]!==e?(n=r=>{if(!r)return;const i=e.find(a=>a.id===r);return i?Rt(i.metadata):void 0},t[0]=e,t[1]=n):n=t[1],n}function Aa(t){const e=$.c(9),{virtualMcpId:n,size:r,showAutomationBadge:i}=t,a=r===void 0?"sm":r,l=V();let c;e[0]!==a||e[1]!==n?(c=n?s.jsx(Ia,{virtualMcpId:n,size:a}):s.jsx(ye,{icon:null,name:"?",size:a}),e[0]=a,e[1]=n,e[2]=c):c=e[2];let u;e[3]!==i||e[4]!==l?(u=i&&s.jsx("span",{"aria-label":l("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:s.jsx(Ut,{size:10,className:"text-white"})}),e[3]=i,e[4]=l,e[5]=u):u=e[5];let o;return e[6]!==c||e[7]!==u?(o=s.jsxs("div",{className:"relative shrink-0",children:[c,u]}),e[6]=c,e[7]=u,e[8]=o):o=e[8],o}function Ia(t){const e=$.c(6),{virtualMcpId:n,size:r}=t,i=ce(n);if(!i){let c;return e[0]!==r?(c=s.jsx(ye,{icon:null,name:"?",size:r}),e[0]=r,e[1]=c):c=e[1],c}const a=i.icon??null;let l;return e[2]!==i.title||e[3]!==r||e[4]!==a?(l=s.jsx(ye,{icon:a,name:i.title,size:r}),e[2]=i.title,e[3]=r,e[4]=a,e[5]=l):l=e[5],l}const gt=["thread"];function Ma(t){const e=$.c(53),{open:n,onOpenChange:r}=t,[i,a]=O.useState(""),{org:l}=oe(),{setTaskId:c}=rt(),u=st(),o=V();let d,f,m,h;e[0]!==l.id||e[1]!==i?(h=i.trim(),d=h?20:10,m=Tt,f=Nt.globalSearch(l.id,h,d,gt),e[0]=l.id,e[1]=i,e[2]=d,e[3]=f,e[4]=m,e[5]=h):(d=e[2],f=e[3],m=e[4],h=e[5]);let v;e[6]!==d||e[7]!==u||e[8]!==h?(v=async()=>{const L=await u.call("GLOBAL_SEARCH",{query:h,limit:d,types:[...gt]});return{...L,items:L.items.filter(La)}},e[6]=d,e[7]=u,e[8]=h,e[9]=v):v=e[9];let y;e[10]!==n||e[11]!==f||e[12]!==v?(y={queryKey:f,enabled:n,queryFn:v,staleTime:1e4},e[10]=n,e[11]=f,e[12]=v,e[13]=y):y=e[13];const{data:k,isFetching:p}=m(y);let g;e[14]!==k?.items?(g=k?.items??[],e[14]=k?.items,e[15]=g):g=e[15];const j=g;let b;e[16]!==r?(b=L=>{L||a(""),r(L)},e[16]=r,e[17]=b):b=e[17];const x=b;let N;e[18]!==x||e[19]!==c?(N=L=>{x(!1),c(L.id,L.virtual_mcp_id??void 0)},e[18]=x,e[19]=c,e[20]=N):N=e[20];const S=N;let T;e[21]!==o?(T=o("tasksPanel.globalSearchDialog.title"),e[21]=o,e[22]=T):T=e[22];let w;e[23]!==T?(w=s.jsx(gn,{children:T}),e[23]=T,e[24]=w):w=e[24];let P;e[25]!==o?(P=o("tasksPanel.globalSearchDialog.description"),e[25]=o,e[26]=P):P=e[26];let _;e[27]!==P?(_=s.jsx(bn,{children:P}),e[27]=P,e[28]=_):_=e[28];let I;e[29]!==_||e[30]!==w?(I=s.jsxs(vn,{className:"sr-only",children:[w,_]}),e[29]=_,e[30]=w,e[31]=I):I=e[31];let C;e[32]!==o?(C=o("tasksPanel.globalSearchDialog.placeholder"),e[32]=o,e[33]=C):C=e[33];let M;e[34]!==i||e[35]!==C?(M=s.jsx(_n,{value:i,onValueChange:a,placeholder:C}),e[34]=i,e[35]=C,e[36]=M):M=e[36];let A;e[37]!==S||e[38]!==p||e[39]!==j||e[40]!==o||e[41]!==h?(A=s.jsx(kn,{children:p&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:o("tasksPanel.globalSearchDialog.searching")}):j.length===0?s.jsx(Sn,{children:o("tasksPanel.globalSearchDialog.noResults")}):s.jsx(Nn,{heading:h?void 0:o("tasksPanel.globalSearchDialog.recent"),children:j.map(L=>L.type==="thread"?s.jsxs(Tn,{value:`thread:${L.id}:${L.title}`,onSelect:()=>S(L),className:"gap-2.5",children:[s.jsx(Aa,{virtualMcpId:L.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:L.title||o("tasksPanel.globalSearchDialog.untitledChat")})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(L.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${L.id}`):null)})}),e[37]=S,e[38]=p,e[39]=j,e[40]=o,e[41]=h,e[42]=A):A=e[42];let D;e[43]!==M||e[44]!==A?(D=s.jsxs(wn,{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:[M,A]}),e[43]=M,e[44]=A,e[45]=D):D=e[45];let F;e[46]!==I||e[47]!==D?(F=s.jsxs(jn,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[I,D]}),e[46]=I,e[47]=D,e[48]=F):F=e[48];let E;return e[49]!==x||e[50]!==n||e[51]!==F?(E=s.jsx(yn,{open:n,onOpenChange:x,children:F}),e[49]=x,e[50]=n,e[51]=F,e[52]=E):E=e[52],E}function La(t){return t.type==="thread"}function $a(t){const e=$.c(43),{branch:n,onOutcome:r}=t,i=V();let a;e[0]!==r?(a=S=>{S||r("cancel")},e[0]=r,e[1]=a):a=e[1];let l;e[2]!==i?(l=i("sidebar.archiveWorktreeDialog.title"),e[2]=i,e[3]=l):l=e[3];let c;e[4]!==l?(c=s.jsx(Cn,{children:l}),e[4]=l,e[5]=c):c=e[5];let u;e[6]!==i?(u=i("sidebar.archiveWorktreeDialog.stopsAndDeletesBefore"),e[6]=i,e[7]=u):u=e[7];let o;e[8]!==n?(o=s.jsx("span",{className:"font-mono",children:n}),e[8]=n,e[9]=o):o=e[9];let d;e[10]!==i?(d=i("sidebar.archiveWorktreeDialog.stopsAndDeletesAfter"),e[10]=i,e[11]=d):d=e[11];let f;e[12]!==u||e[13]!==o||e[14]!==d?(f=s.jsxs(Pn,{children:[u," ",o," ",d]}),e[12]=u,e[13]=o,e[14]=d,e[15]=f):f=e[15];let m;e[16]!==c||e[17]!==f?(m=s.jsxs(An,{children:[c,f]}),e[16]=c,e[17]=f,e[18]=m):m=e[18];let h;e[19]!==r?(h=()=>r("cancel"),e[19]=r,e[20]=h):h=e[20];let v;e[21]!==i?(v=i("sidebar.archiveWorktreeDialog.cancel"),e[21]=i,e[22]=v):v=e[22];let y;e[23]!==v||e[24]!==h?(y=s.jsx(In,{onClick:h,children:v}),e[23]=v,e[24]=h,e[25]=y):y=e[25];let k;e[26]===Symbol.for("react.memo_cache_sentinel")?(k=Z(ss({variant:"destructive"})),e[26]=k):k=e[26];let p;e[27]!==r?(p=()=>r("confirm"),e[27]=r,e[28]=p):p=e[28];let g;e[29]!==i?(g=i("sidebar.archiveWorktreeDialog.confirm"),e[29]=i,e[30]=g):g=e[30];let j;e[31]!==p||e[32]!==g?(j=s.jsx(Mn,{className:k,onClick:p,children:g}),e[31]=p,e[32]=g,e[33]=j):j=e[33];let b;e[34]!==y||e[35]!==j?(b=s.jsxs(Ln,{children:[y,j]}),e[34]=y,e[35]=j,e[36]=b):b=e[36];let x;e[37]!==b||e[38]!==m?(x=s.jsxs($n,{children:[m,b]}),e[37]=b,e[38]=m,e[39]=x):x=e[39];let N;return e[40]!==a||e[41]!==x?(N=s.jsx(Dn,{open:!0,onOpenChange:a,children:x}),e[40]=a,e[41]=x,e[42]=N):N=e[42],N}function Da(t,e,n){if(!n)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===n)return a}for(let i=r-1;i>=0;i--){const a=t[i];if(a?.created_by===n)return a}}}function Fa(t){return t==="ephemeral"||t.startsWith("thread:")}function Xt(t){const e=$.c(45),{task:n,isActive:r,onClick:i,onArchive:a,showAutomationBadge:l,showAgentIcon:c,hideStatusIdle:u,indented:o}=t,d=V(),f=Fn(n.status),m=f.icon,h=n.metadata?.kind==="tool_call_run",v=ce(h?void 0:n.virtual_mcp_id);let y;e[0]!==v?(y=$t(v),e[0]=v,e[1]=y):y=e[1];const k=y;Hs(6e4);const p=l||!!n.trigger_id,g=n.id,j="button",b=0;let x;e[2]!==i?(x=B=>{B.target===B.currentTarget&&(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),i())},e[2]=i,e[3]=x):x=e[3];const N=o?"-ml-4 pl-6":"pl-[9px]",S=r?"bg-accent text-accent-foreground":"hover:bg-accent/60";let T;e[4]!==N||e[5]!==S?(T=Z("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",N,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",S),e[4]=N,e[5]=S,e[6]=T):T=e[6];let w;e[7]!==h||e[8]!==c||e[9]!==v?.icon||e[10]!==v?.title?(w=c&&!h&&s.jsx(ye,{icon:v?.icon??null,name:v?.title??"?",size:"2xs"}),e[7]=h,e[8]=c,e[9]=v?.icon,e[10]=v?.title,e[11]=w):w=e[11];let P;e[12]!==p||e[13]!==d?(P=p&&s.jsx(Ut,{size:12,"aria-label":d("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-special"}),e[12]=p,e[13]=d,e[14]=P):P=e[14];let _;e[15]!==d||e[16]!==n.title?(_=n.title||d("tasksPanel.taskRow.untitledTask"),e[15]=d,e[16]=n.title,e[17]=_):_=e[17];let I;e[18]!==_?(I=s.jsx("div",{className:"text-sm text-foreground truncate",children:_}),e[18]=_,e[19]=I):I=e[19];let C;e[20]!==P||e[21]!==I?(C=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[P,I]}),e[20]=P,e[21]=I,e[22]=C):C=e[22];let M;e[23]!==r||e[24]!==k||e[25]!==n.branch||e[26]!==n.updated_at?(M=n.updated_at&&s.jsxs("div",{className:Z("flex items-center gap-1 text-[11px] min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!Fa(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):k?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[k.owner,"/",k.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:En(new Date(n.updated_at))})]}),e[23]=r,e[24]=k,e[25]=n.branch,e[26]=n.updated_at,e[27]=M):M=e[27];let A;e[28]!==C||e[29]!==M?(A=s.jsxs("div",{className:"flex-1 min-w-0",children:[C,M]}),e[28]=C,e[29]=M,e[30]=A):A=e[30];const D="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",F=!u&&s.jsx("span",{className:Z("[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(f.labelKey)}),children:n.status==="in_progress"?s.jsx(je,{className:Z("size-3.5",f.iconClassName)}):s.jsx(m,{size:14,className:f.iconClassName})});let E;e[31]!==a||e[32]!==d?(E=a&&s.jsxs(ze,{children:[s.jsx(Oe,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":d("tasksPanel.taskRow.archiveTask"),onClick:B=>{B.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 transition-opacity flex size-8 items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(ns,{size:14})})}),s.jsx(Be,{side:"right",children:d("tasksPanel.taskRow.archive")})]}),e[31]=a,e[32]=d,e[33]=E):E=e[33];let L;e[34]!==F||e[35]!==E?(L=s.jsxs("div",{className:D,children:[F,E]}),e[34]=F,e[35]=E,e[36]=L):L=e[36];let H;return e[37]!==i||e[38]!==A||e[39]!==L||e[40]!==x||e[41]!==T||e[42]!==w||e[43]!==n.id?(H=s.jsxs("div",{"data-task-id":g,role:j,tabIndex:b,onClick:i,onKeyDown:x,className:T,children:[w,A,L]}),e[37]=i,e[38]=A,e[39]=L,e[40]=x,e[41]=T,e[42]=w,e[43]=n.id,e[44]=H):H=e[44],H}const bt=["requires_action","in_progress","failed","expired","completed"];function Ra(t){const e=new Map(bt.map(n=>[n,[]]));for(const n of t){const r=n.status??"completed";(e.get(r)??e.get("completed")).push(n)}return bt.map(n=>({status:n,threads:e.get(n)}))}const Ea="sidebar.group.expanded.";function Oa(t,e){const n=$.c(3),[r,i]=_t(`${Ea}${t}`,e);let a;return n[0]!==r||n[1]!==i?(a=[r,i],n[0]=r,n[1]=i,n[2]=a):a=n[2],a}function Zt(t){const e=$.c(18),{onClick:n,isFetching:r,indented:i}=t,a=V();let l;e[0]!==a?(l=a("sidebar.showMoreButton.ariaLabel"),e[0]=a,e[1]=l):l=e[1];const c=i?"-ml-4 pl-6 pr-2":"px-2";let u;e[2]!==c?(u=Z("flex items-center gap-2 py-1.5 rounded-lg text-sm text-muted-foreground",c,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=c,e[3]=u):u=e[3];let o;e[4]!==r?(o=r&&s.jsx(je,{className:"size-3.5"}),e[4]=r,e[5]=o):o=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 f;e[9]!==d?(f=s.jsx("span",{children:d}),e[9]=d,e[10]=f):f=e[10];let m;return e[11]!==r||e[12]!==n||e[13]!==l||e[14]!==u||e[15]!==o||e[16]!==f?(m=s.jsxs("button",{type:"button","aria-label":l,onClick:n,disabled:r,className:u,children:[o,f]}),e[11]=r,e[12]=n,e[13]=l,e[14]=u,e[15]=o,e[16]=f,e[17]=m):m=e[17],m}function Ba(t,e,n,r){return[t,e,n,r.type,r.member,r.currentUserId??""].join("|")}function za(t){return t.member==="mine"&&!t.currentUserId}const Qt=4;let Pe=0;const et=[];function Ga(){for(;Pe<Qt&&et.length>0;){const t=et.shift();t&&t()}}function Jt(t){return new Promise((e,n)=>{const r=()=>{Pe++,t().then(e,n).finally(()=>{Pe--,Ga()})};Pe<Qt?r():et.push(r)})}const He=10;function vt(t,e,n,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 l={where:a,limit:i,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return l.status=e,l}function Ha(t,e,n,r){let i=0;for(const a of t)es(a,e,n,r)&&i++;return i}function Qe(t,e,n,r){return Ha(t,e,n,r)}function Va(t,e){return!!(t>=He||t===0&&e)}function jt(t,e){return t<e}function Ua(t,e){return e===!1?!1:e===!0?!0:t}function es(t,e,n,r){return!(t.hidden||(t.status??"completed")!==n||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const Me=new Map,Ce=new Map;function Ka(t,e){return e?t>=He?!0:null:!1}function yt(t){return Me.get(t)}function Wa(t,e){Me.set(t,e)}function qa(t,e,n){const r=Me.get(t);if(r!==void 0){n(r);return}let i=Ce.get(t);i||(i=Jt(e).then(a=>(Me.set(t,a),Ce.delete(t),a)).catch(()=>(Ce.delete(t),Promise.reject(new Error("group probe failed")))),Ce.set(t,i)),i.then(n,()=>n(!1))}function kt(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===He,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Ya(t,e,n,r,i){let a=0;for(const l of t)e.has(l.id)||es(l,n,r,i)&&a++;return a}function Xa(t,e,n,r){const i=$.c(8),{org:a}=oe(),l=Ba(a.id,t,e,n);let c;i[0]!==n?(c=za(n),i[0]=n,i[1]=c):c=i[1];const u=c,[o,d]=O.useState({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});o.identity!==l&&d({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});const f=it(),{threads:m,hasMore:h}=lt(),v=Qe(m,t,e,n),y=Va(v,h),k=Ka(v,h),p=st();if(o.identity===l&&o.serverHasMore===null){const S=k??yt(l);S!==void 0&&d({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:o.probeSubscribedIdentity,serverHasMore:S})}!u&&o.identity===l&&o.serverHasMore===null&&k===null&&yt(l)===void 0&&o.probeSubscribedIdentity!==l&&(d(S=>S.identity===l?{...S,isProbing:!0,probeSubscribedIdentity:l}:S),qa(l,async()=>{const S=vt(t,e,0,n,1),T=await p.call("COLLECTION_THREADS_LIST",S),{totalCount:w}=kt(T),P=Qe(f.threads.get(),t,e,n);return w===void 0?!1:jt(P,w)},S=>{d(T=>T.identity!==l?T:{...T,isProbing:!1,serverHasMore:S})}));const j=async function(){if(o.isFetching||o.isProbing||u)return;const T=l;d(w=>w.identity===T?{...w,isFetching:!0}:w);try{const w=Qe(m,t,e,n),P=vt(t,e,w,n,He),_=await Jt(()=>p.call("COLLECTION_THREADS_LIST",P)),{items:I,hasMore:C,totalCount:M}=kt(_),A=new Set(m.map(Za)),D=Ya(I,A,t,e,n),F=w;f.mergeThreads(I),d(E=>{if(E.identity!==T)return E;let L;return M!==void 0?L=jt(F+D,M):L=I.length===0||D===0?!1:C,Wa(T,L),{...E,isFetching:!1,serverHasMore:L}})}catch(w){const P=w,_=P instanceof Error?P.message:String(P);wt.error(`Could not load more tasks: ${_}`),d(I=>I.identity===T?{...I,isFetching:!1}:I)}},b=o.isFetching||o.isProbing,x=!u&&!b&&Ua(y,o.serverHasMore);let N;return i[2]!==b||i[3]!==j||i[4]!==x||i[5]!==o.isProbing||i[6]!==o.serverHasMore?(N={hasMore:x,isFetching:b,isProbing:o.isProbing,serverHasMore:o.serverHasMore,loadMore:j},i[2]=b,i[3]=j,i[4]=x,i[5]=o.isProbing,i[6]=o.serverHasMore,i[7]=N):N=i[7],N}function Za(t){return t.id}function Qa(t){const e=$.c(20),{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:c,filters:u}=t,{isFetching:o,isProbing:d,loadMore:f,hasMore:m,serverHasMore:h}=Xa("status",n,u),[v,y]=O.useState(!1);!v&&r.length===0&&h===!0&&!o&&!d&&(y(!0),queueMicrotask(()=>{f()}));let k;if(e[0]!==i||e[1]!==c||e[2]!==u||e[3]!==l||e[4]!==a||e[5]!==r){let j;e[7]!==i||e[8]!==c||e[9]!==u||e[10]!==l||e[11]!==a?(j=b=>s.jsx(Xt,{task:b,isActive:i===b.id,onClick:()=>a(b),onArchive:c&&b.created_by===u.currentUserId?()=>l(b):void 0,showAutomationBadge:!!b.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},b.id),e[7]=i,e[8]=c,e[9]=u,e[10]=l,e[11]=a,e[12]=j):j=e[12],k=r.map(j),e[0]=i,e[1]=c,e[2]=u,e[3]=l,e[4]=a,e[5]=r,e[6]=k}else k=e[6];let p;e[13]!==m||e[14]!==o||e[15]!==f?(p=(m||o)&&s.jsx(Zt,{onClick:()=>{f()},isFetching:o,indented:!0}),e[13]=m,e[14]=o,e[15]=f,e[16]=p):p=e[16];let g;return e[17]!==k||e[18]!==p?(g=s.jsxs(s.Fragment,{children:[k,p]}),e[17]=k,e[18]=p,e[19]=g):g=e[19],g}function Ja(t){const e=$.c(43),{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:c,filters:u}=t,o=V(),d=Rn[n],f=d.icon,[m,h]=Oa(`status-${n}`,!1);let v;e[0]!==m||e[1]!==h?(v=function(){h(!m)},e[0]=m,e[1]=h,e[2]=v):v=e[2];const y=v;let k;e[3]!==d.labelKey||e[4]!==o?(k=o("sidebar.taskGroupsList.toggleStatusGroup",{status:o(d.labelKey)}),e[3]=d.labelKey,e[4]=o,e[5]=k):k=e[5];let p;e[6]!==y?(p=_=>{_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),y())},e[6]=y,e[7]=p):p=e[7];let g;e[8]!==f||e[9]!==d.iconClassName?(g=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(f,{size:12,className:d.iconClassName})}),e[8]=f,e[9]=d.iconClassName,e[10]=g):g=e[10];let j;e[11]!==m?(j=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:m?s.jsx(at,{size:14}):s.jsx(as,{size:14})}),e[11]=m,e[12]=j):j=e[12];let b;e[13]!==g||e[14]!==j?(b=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[g,j]}),e[13]=g,e[14]=j,e[15]=b):b=e[15];let x;e[16]!==d.labelKey||e[17]!==o?(x=o(d.labelKey),e[16]=d.labelKey,e[17]=o,e[18]=x):x=e[18];let N;e[19]!==x?(N=s.jsx("span",{className:"flex-1 truncate",children:x}),e[19]=x,e[20]=N):N=e[20];let S;e[21]!==r.length?(S=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:r.length})}),e[21]=r.length,e[22]=S):S=e[22];let T;e[23]!==m||e[24]!==y||e[25]!==k||e[26]!==p||e[27]!==b||e[28]!==N||e[29]!==S?(T=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":m,"aria-label":k,onClick:y,onKeyDown:p,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-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[b,N,S]}),e[23]=m,e[24]=y,e[25]=k,e[26]=p,e[27]=b,e[28]=N,e[29]=S,e[30]=T):T=e[30];let w;e[31]!==i||e[32]!==c||e[33]!==m||e[34]!==u||e[35]!==l||e[36]!==a||e[37]!==n||e[38]!==r?(w=m&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(Qa,{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:c,filters:u})}),e[31]=i,e[32]=c,e[33]=m,e[34]=u,e[35]=l,e[36]=a,e[37]=n,e[38]=r,e[39]=w):w=e[39];let P;return e[40]!==T||e[41]!==w?(P=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[T,w]}),e[40]=T,e[41]=w,e[42]=P):P=e[42],P}function er(t){const e=$.c(41),{threads:n,groupBy:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,filters:c,hasMore:u,isFetchingMore:o,onLoadMore:d,filtersActive:f}=t,m=V();if(n.length===0&&!u&&!o){let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(gs,{className:"size-6 opacity-60"}),e[0]=p):p=e[0];let g;e[1]!==f||e[2]!==m?(g=m(f?"sidebar.myThreadsSection.noChatsMatchFilters":"sidebar.myThreadsSection.noChatsYet"),e[1]=f,e[2]=m,e[3]=g):g=e[3];let j;return e[4]!==g?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[p,s.jsx("p",{className:"text-sm",children:g})]}),e[4]=g,e[5]=j):j=e[5],j}const h=n.length>1||u;if(r==="status"){let p;if(e[6]!==i||e[7]!==h||e[8]!==c||e[9]!==l||e[10]!==a||e[11]!==n){let j;e[13]!==i||e[14]!==h||e[15]!==c||e[16]!==l||e[17]!==a?(j=b=>s.jsx(Ja,{status:b.status,threads:b.threads,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:h,filters:c},b.status),e[13]=i,e[14]=h,e[15]=c,e[16]=l,e[17]=a,e[18]=j):j=e[18],p=Ra(n).map(j),e[6]=i,e[7]=h,e[8]=c,e[9]=l,e[10]=a,e[11]=n,e[12]=p}else p=e[12];let g;return e[19]!==p?(g=s.jsx(s.Fragment,{children:p}),e[19]=p,e[20]=g):g=e[20],g}let v;if(e[21]!==i||e[22]!==h||e[23]!==c||e[24]!==l||e[25]!==a||e[26]!==n){let p;e[28]!==i||e[29]!==h||e[30]!==c||e[31]!==l||e[32]!==a?(p=g=>s.jsx(Xt,{task:g,isActive:i===g.id,onClick:()=>a(g),onArchive:h&&g.created_by===c.currentUserId?()=>l(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0},g.id),e[28]=i,e[29]=h,e[30]=c,e[31]=l,e[32]=a,e[33]=p):p=e[33],v=n.map(p),e[21]=i,e[22]=h,e[23]=c,e[24]=l,e[25]=a,e[26]=n,e[27]=v}else v=e[27];let y;e[34]!==u||e[35]!==o||e[36]!==d?(y=(u||o)&&s.jsx(Zt,{onClick:d,isFetching:o}),e[34]=u,e[35]=o,e[36]=d,e[37]=y):y=e[37];let k;return e[38]!==v||e[39]!==y?(k=s.jsxs(s.Fragment,{children:[v,y]}),e[38]=v,e[39]=y,e[40]=k):k=e[40],k}function tr(t,e){return null}function sr(t,e){return t.some(n=>n.id!==e.taskId&&!n.hidden&&n.branch===e.branch&&n.virtual_mcp_id===e.virtualMcpId)}const nr=["archive","reclaim-worktree"],ar=[];function rr(t){return t==="confirm"?nr:ar}function ir(t){const e=$.c(11),{panel:n}=t;let r;return e[0]!==n.activeTaskId||e[1]!==n.archiveTask||e[2]!==n.filters||e[3]!==n.filtersActive||e[4]!==n.groupBy||e[5]!==n.hasMore||e[6]!==n.isFetchingMore||e[7]!==n.loadMore||e[8]!==n.selectTask||e[9]!==n.threads?(r=s.jsx(er,{threads:n.threads,groupBy:n.groupBy,activeTaskId:n.activeTaskId,onSelectTask:n.selectTask,onArchiveTask:n.archiveTask,filters:n.filters,hasMore:n.hasMore,isFetchingMore:n.isFetchingMore,onLoadMore:n.loadMore,filtersActive:n.filtersActive}),e[0]=n.activeTaskId,e[1]=n.archiveTask,e[2]=n.filters,e[3]=n.filtersActive,e[4]=n.groupBy,e[5]=n.hasMore,e[6]=n.isFetchingMore,e[7]=n.loadMore,e[8]=n.selectTask,e[9]=n.threads,e[10]=r):r=e[10],r}function lr(t){const e=$.c(83);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{onNavigate:r}=n,i=V(),{data:a}=$e.useSession(),l=a?.user?.id,{org:c}=oe();let u;e[2]!==c.id?(u=ke(c.id),e[2]=c.id,e[3]=u):u=e[3];const o=u.id,d=Pa(),{threads:f,hasMore:m,isFetchingMore:h,fetchNextPage:v}=lt(),y=f.filter(ur),{hide:k,setScope:p}=ot(),g=De(),j=st(),{setTaskId:b,createNewTask:x}=rt(),N=Ht(),S=Ge();let T;e[4]!==S||e[5]!==f||e[6]!==N?(T=hn({routeAgentId:N,threadVirtualMcpId:f.find(z=>z.id===S)?.virtual_mcp_id}),e[4]=S,e[5]=f,e[6]=N,e[7]=T):T=e[7];const w=T;let P;e[8]!==r?(P=()=>{r?.()},e[8]=r,e[9]=P):P=e[9];const _=P,I=[...y].sort(dr),[C,M]=O.useState("all"),[A,D]=O.useState("flat"),[F,E]=_t("sidebar-threads-scope-all",!1),[L,H]=O.useState(!1),[B,K]=O.useState(!1);let R;e[10]!==H?(R=()=>{xe("tasks_panel_search_opened"),K(!0),H(!0)},e[10]=H,e[11]=R):R=e[11];const Y=R,[U,W]=O.useState(null),X=l??null;let Q;e[12]!==X||e[13]!==C?(Q={type:C,member:"mine",currentUserId:X},e[12]=X,e[13]=C,e[14]=Q):Q=e[14];const G=Q,q={};F||(q.created_by="me"),p(q);let ae;e[15]!==l?(ae=z=>l?z.filter(ne=>ne.created_by===l):[],e[15]=l,e[16]=ae):ae=e[16];const ie=ae;let J;e[17]!==C?(J=z=>C==="automation"?z.filter(cr):C==="manual"?z.filter(or):z,e[17]=C,e[18]=J):J=e[18];const le=J,te=Ca(le(F?I:ie(I)),S);let se;e[19]!==S||e[20]!==_||e[21]!==l||e[22]!==k||e[23]!==g||e[24]!==c.slug||e[25]!==b||e[26]!==te?(se=z=>{const ne=z.id===S,pe=k(z.id);if(Vs(z.id),!ne)return pe;const be=Da(te,z.id,l);return _(),be?b(be.id,be.virtual_mcp_id):g({to:"/$org",params:{org:c.slug}}),pe},e[19]=S,e[20]=_,e[21]=l,e[22]=k,e[23]=g,e[24]=c.slug,e[25]=b,e[26]=te,e[27]=se):se=e[27];const re=se;let de;e[28]!==j||e[29]!==i?(de=async z=>{try{await j.call("SANDBOX_DELETE",{virtualMcpId:z.virtualMcpId,branch:z.branch,removeWorktree:!0})}catch{wt.error(i("sidebar.archiveWorktreeDialog.reclaimFailed",{branch:z.branch}))}},e[28]=j,e[29]=i,e[30]=de):de=e[30];const ge=de;let ue;e[31]!==f||e[32]!==re||e[33]!==l||e[34]!==W?(ue=z=>{if(l&&z.created_by&&z.created_by!==l)return;const ne=tr();if(!ne||sr(f,ne)){re(z);return}W({task:z,target:ne})},e[31]=f,e[32]=re,e[33]=l,e[34]=W,e[35]=ue):ue=e[35];const Ve=ue;let Ne;e[36]!==re||e[37]!==U||e[38]!==ge||e[39]!==W?(Ne=z=>{const ne=U;ne&&(W(null),(async()=>{for(const pe of rr(z))if(pe==="archive")try{await re(ne.task)}catch{return}else await ge(ne.target)})())},e[36]=re,e[37]=U,e[38]=ge,e[39]=W,e[40]=Ne):Ne=e[40];const Ue=Ne;let Te;e[41]!==_||e[42]!==b?(Te=z=>{_(),b(z.id,z.virtual_mcp_id)},e[41]=_,e[42]=b,e[43]=Te):Te=e[43];const Ke=Te;let _e;e[44]!==w||e[45]!==S||e[46]!==f||e[47]!==_||e[48]!==x||e[49]!==l||e[50]!==o||e[51]!==d||e[52]!==b?(_e=()=>{const z=w??o;xe("sidebar_new_thread_clicked",{virtual_mcp_id:z}),_();const ne=tn(f,z,l,d(z));if(ne){b(ne.id,ne.virtual_mcp_id);return}const pe=f.find(be=>be.id===S)?.branch??null;x(z,pe)},e[44]=w,e[45]=S,e[46]=f,e[47]=_,e[48]=x,e[49]=l,e[50]=o,e[51]=d,e[52]=b,e[53]=_e):_e=e[53];const We=_e;let fe;e[54]!==v?(fe=()=>{v()},e[54]=v,e[55]=fe):fe=e[55];const qe=A!=="flat"||C!=="all"||F;let me;e[56]!==Ue||e[57]!==U?(me=U?s.jsx($a,{branch:U.target.branch,onOutcome:Ue}):null,e[56]=Ue,e[57]=U,e[58]=me):me=e[58];let he;e[59]!==B||e[60]!==L||e[61]!==H?(he=B?s.jsx(Ma,{open:L,onOpenChange:H}):null,e[59]=B,e[60]=L,e[61]=H,e[62]=he):he=e[62];let we;return e[63]!==S||e[64]!==Ve||e[65]!==G||e[66]!==A||e[67]!==m||e[68]!==h||e[69]!==We||e[70]!==Y||e[71]!==Ke||e[72]!==D||e[73]!==E||e[74]!==M||e[75]!==F||e[76]!==fe||e[77]!==qe||e[78]!==me||e[79]!==he||e[80]!==C||e[81]!==te?(we={threads:te,activeTaskId:S,filters:G,hasMore:m,isFetchingMore:h,loadMore:fe,groupBy:A,setGroupBy:D,typeFilter:C,setTypeFilter:M,showAll:F,setShowAll:E,filtersActive:qe,selectTask:Ke,archiveTask:Ve,newThread:We,openSearch:Y,reclaimDialog:me,searchDialog:he},e[63]=S,e[64]=Ve,e[65]=G,e[66]=A,e[67]=m,e[68]=h,e[69]=We,e[70]=Y,e[71]=Ke,e[72]=D,e[73]=E,e[74]=M,e[75]=F,e[76]=fe,e[77]=qe,e[78]=me,e[79]=he,e[80]=C,e[81]=te,e[82]=we):we=e[82],we}function or(t){return!t.trigger_id}function cr(t){return!!t.trigger_id}function dr(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function ur(t){return!t.hidden}function fr(){const t=$.c(60),e=V(),[n,r]=O.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={onNavigate:()=>r(!1)},t[0]=i):i=t[0];const a=lr(i),l=Re()?.activeTask;let c;t[1]!==l?.title||t[2]!==a.activeTaskId||t[3]!==a.threads||t[4]!==e?(c=l?.title||a.threads.find(E=>E.id===a.activeTaskId)?.title||e("tasksPanel.taskRow.untitledTask"),t[1]=l?.title,t[2]=a.activeTaskId,t[3]=a.threads,t[4]=e,t[5]=c):c=t[5];const u=c;let o;t[6]!==a?(o=()=>{r(!1),a.openSearch()},t[6]=a,t[7]=o):o=t[7];const d=o;let f;t[8]!==e?(f=e("chat.threadsMenu.chats"),t[8]=e,t[9]=f):f=t[9];const m=n&&"bg-sidebar-accent";let h;t[10]!==m?(h=Z("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/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",m),t[10]=m,t[11]=h):h=t[11];let v;t[12]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(bs,{size:16,className:"shrink-0"}),t[12]=v):v=t[12];let y;t[13]!==u?(y=s.jsx("span",{className:"truncate max-w-[10rem] font-medium",children:u}),t[13]=u,t[14]=y):y=t[14];let k;t[15]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(at,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[15]=k):k=t[15];let p;t[16]!==f||t[17]!==h||t[18]!==y?(p=s.jsx(Oe,{asChild:!0,children:s.jsx(Bt,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":f,className:h,children:[v,y,k]})})}),t[16]=f,t[17]=h,t[18]=y,t[19]=p):p=t[19];let g;t[20]!==e?(g=e("chat.threadsMenu.chats"),t[20]=e,t[21]=g):g=t[21];let j;t[22]!==g?(j=s.jsx(Be,{side:"bottom",children:g}),t[22]=g,t[23]=j):j=t[23];let b;t[24]!==j||t[25]!==p?(b=s.jsxs(ze,{children:[p,j]}),t[24]=j,t[25]=p,t[26]=b):b=t[26];let x;t[27]!==a?(x=s.jsx(wa,{panel:a,className:"size-8"}),t[27]=a,t[28]=x):x=t[28];let N;t[29]!==e?(N=e("sidebar.taskGroupsList.searchChats"),t[29]=e,t[30]=N):N=t[30];let S;t[31]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(vs,{size:16}),t[31]=S):S=t[31];let T;t[32]!==d||t[33]!==N?(T=s.jsx(Ae,{"aria-label":N,onClick:d,className:"size-8",children:S}),t[32]=d,t[33]=N,t[34]=T):T=t[34];let w;t[35]!==e?(w=e("sidebar.taskGroupsList.newChat"),t[35]=e,t[36]=w):w=t[36];let P;t[37]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(Pt,{size:16}),t[37]=P):P=t[37];let _;t[38]!==a.newThread||t[39]!==w?(_=s.jsx(Ae,{"aria-label":w,onClick:a.newThread,className:"size-8",children:P}),t[38]=a.newThread,t[39]=w,t[40]=_):_=t[40];let I;t[41]!==T||t[42]!==_?(I=s.jsxs("div",{className:"flex items-center gap-0.5",children:[T,_]}),t[41]=T,t[42]=_,t[43]=I):I=t[43];let C;t[44]!==x||t[45]!==I?(C=s.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[x,I]}),t[44]=x,t[45]=I,t[46]=C):C=t[46];let M;t[47]!==a?(M=s.jsx("div",{className:"flex max-h-[60vh] min-h-0 flex-col gap-0.5 overflow-y-auto overscroll-contain",children:s.jsx(ir,{panel:a})}),t[47]=a,t[48]=M):M=t[48];let A;t[49]!==C||t[50]!==M?(A=s.jsxs(zt,{align:"start",side:"bottom",onOpenAutoFocus:mr,className:"flex w-80 flex-col gap-2 p-2",children:[C,M]}),t[49]=C,t[50]=M,t[51]=A):A=t[51];let D;t[52]!==n||t[53]!==b||t[54]!==A?(D=s.jsxs(Gt,{open:n,onOpenChange:r,children:[b,A]}),t[52]=n,t[53]=b,t[54]=A,t[55]=D):D=t[55];let F;return t[56]!==a.reclaimDialog||t[57]!==a.searchDialog||t[58]!==D?(F=s.jsxs(s.Fragment,{children:[D,a.searchDialog,a.reclaimDialog]}),t[56]=a.reclaimDialog,t[57]=a.searchDialog,t[58]=D,t[59]=F):F=t[59],F}function mr(t){return t.preventDefault()}function hr(){const t=$.c(20),e=V(),{threads:n}=lt(),{createNewTask:r}=rt(),i=Vt(),a=Ge();let l;t[0]!==a||t[1]!==n?(l=n.find(k=>k.id===a)?.branch??null,t[0]=a,t[1]=n,t[2]=l):l=t[2];const c=l;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 o=u;let d;t[7]!==e?(d=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=d):d=t[8];let f;t[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Pt,{size:16}),t[9]=f):f=t[9];let m;t[10]!==o||t[11]!==d?(m=s.jsx(Oe,{asChild:!0,children:s.jsx("button",{type:"button",onClick:o,"aria-label":d,className:"flex shrink-0 items-center rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:f})}),t[10]=o,t[11]=d,t[12]=m):m=t[12];let h;t[13]!==e?(h=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=h):h=t[14];let v;t[15]!==h?(v=s.jsx(Be,{side:"bottom",children:h}),t[15]=h,t[16]=v):v=t[16];let y;return t[17]!==m||t[18]!==v?(y=s.jsxs(ze,{children:[m,v]}),t[17]=m,t[18]=v,t[19]=y):y=t[19],y}function pr(t){const e=$.c(14),{virtualMcp:n}=t,r=V(),i=Lt(),{navigateToTask:a}=As(),{create:l}=ot();let c,u;if(e[0]!==i||e[1]!==l||e[2]!==a||e[3]!==r||e[4]!==n){u=Symbol.for("react.early_return_sentinel");e:{const o=qs(n,i);if(!o){u=null;break e}const d=o.mode==="dev";let f;e[7]!==l||e[8]!==a?(f=async p=>{const g=crypto.randomUUID();try{await l({id:g,virtual_mcp_id:p})}catch{}a(g,{virtualMcpId:p})},e[7]=l,e[8]=a,e[9]=f):f=e[9];const m=f,h=(p,g,j)=>s.jsxs("button",{type:"button","aria-pressed":g,"aria-label":p,title:p,onClick:()=>{g||m(o.targetId)},className:Z("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg transition-colors",g?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[s.jsx(j,{className:"size-3.5 shrink-0"}),s.jsx("span",{className:"@max-3xl/panel-header:hidden",children:p})]});let v;e[10]!==r?(v=r("devAgent.devAgentControl.develop"),e[10]=r,e[11]=v):v=e[11];const y=h(v,d,js);let k;e[12]!==r?(k=r("devAgent.devAgentControl.live"),e[12]=r,e[13]=k):k=e[13],c=s.jsxs("div",{className:"inline-flex items-center rounded-lg border border-border bg-muted p-0.5 text-xs font-medium",children:[y,h(k,!d,ys)]})}e[0]=i,e[1]=l,e[2]=a,e[3]=r,e[4]=n,e[5]=c,e[6]=u}else c=e[5],u=e[6];return u!==Symbol.for("react.early_return_sentinel")?u:c}function xr(t){const e=$.c(16),{virtualMcpId:n,taskId:r}=t,{openPanel:i}=Kt();let a;e[0]!==r||e[1]!==n?(a={virtualMcpId:n,taskId:r},e[0]=r,e[1]=n,e[2]=a):a=e[2];const{tabs:l,activeTab:c,mainOpen:u}=Wt(a);if(l.length===0)return null;let o;if(e[3]!==c||e[4]!==u||e[5]!==i||e[6]!==l||e[7]!==n){let f;e[9]!==c||e[10]!==u||e[11]!==i||e[12]!==n?(f=m=>{const h=m.id==="automations"?rs({activeTab:c,mainOpen:u}):u&&m.id===c;return s.jsxs(dt.Tab,{active:h,onClick:()=>{h||(xe("main_panel_tab_clicked",{virtual_mcp_id:n,tab_id:m.id,tab_kind:m.kind,was_active:!1}),i(m.id))},children:[s.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:s.jsx(Ie,{icon:m.icon})}),m.title]},m.id)},e[9]=c,e[10]=u,e[11]=i,e[12]=n,e[13]=f):f=e[13],o=l.map(f),e[3]=c,e[4]=u,e[5]=i,e[6]=l,e[7]=n,e[8]=o}else o=e[8];let d;return e[14]!==o?(d=s.jsx(dt.Tabs,{"data-tour":Us.surfaceTabs,children:o}),e[14]=o,e[15]=d):d=e[15],d}function gr(t){return{threadId:t.routeThreadId,providerKey:t.routeThreadId??t.fallbackKey}}const Je="__mobile-main-panel-tab-select__",tt="main";function br({tabs:t,activeTab:e,mainOpen:n,t:r}){const i=t.find(l=>l.id===e),a=r("mainPanelTabs.mobileMainPanelTabSelect.mainView");return n?i?.title??a:i?.title??t[0]?.title??a}const vr={kind:"component",Component:ks},jr={kind:"component",Component:Ss},yr={kind:"component",Component:Ns},kr={kind:"component",Component:Bn};function Sr({tabs:t,overlayEnabled:e,t:n}){return[{value:"chat",title:n("mainPanelTabs.mobileMainPanelTabSelect.chat"),icon:vr},...t.length>0?t.map(r=>({value:r.id,title:r.title,icon:r.icon})):[{value:tt,title:n("mainPanelTabs.mobileMainPanelTabSelect.mainView"),icon:kr}],...e?[{value:"board",title:n("mainPanelTabs.mobileMainPanelTabSelect.tasks"),icon:jr},{value:"files",title:n("mainPanelTabs.mobileMainPanelTabSelect.library"),icon:yr}]:[]]}function Nr(t){const e=$.c(53),{virtualMcpId:n,taskId:r}=t,i=V(),a=De(),{openPanel:l}=Kt();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const u=Se(c);let o;e[1]!==r||e[2]!==n?(o={virtualMcpId:n,taskId:r},e[1]=r,e[2]=n,e[3]=o):o=e[3];const{tabs:d,activeTab:f,mainOpen:m}=Wt(o),{org:h}=oe(),v=Vn();let y;e[4]!==h.id?(y=ut(h.id),e[4]=h.id,e[5]=y):y=e[5];const k=n===y;let p,g,j,b,x,N,S,T,w,P;if(e[6]!==f||e[7]!==m||e[8]!==a||e[9]!==k||e[10]!==l||e[11]!==h.id||e[12]!==u.org||e[13]!==u.taskId||e[14]!==v||e[15]!==i||e[16]!==d||e[17]!==n){b=Symbol.for("react.early_return_sentinel");e:{const C=Sr({tabs:d,overlayEnabled:!!(u.org&&u.taskId),t:i}),M=m?C.find(R=>R.value===f)?.value??tt:"chat",A=C.find(R=>R.value===M),D=A?.title??br({tabs:d,activeTab:f,mainOpen:m,t:i});let F;e[28]!==a?(F=R=>{a({to:".",search:Y=>({...Y,...dn(R)}),replace:!0})},e[28]=a,e[29]=F):F=e[29];const E=F;let L;e[30]!==k||e[31]!==l||e[32]!==h.id||e[33]!==v||e[34]!==E||e[35]!==n?(L=R=>{if(R!==Je){if(xe("main_panel_tab_clicked",{virtual_mcp_id:n,tab_id:R,source:"mobile_select"}),Ks({reportsOnly:v,onReportAgent:k,tabId:R})){l(R,{virtualmcpid:ut(h.id),search:wr});return}if(R==="chat"||R===tt){E(R==="chat"?"chat":"main");return}l(R,{search:_r})}},e[30]=k,e[31]=l,e[32]=h.id,e[33]=v,e[34]=E,e[35]=n,e[36]=L):L=e[36];const H=L,B=C.find(R=>R.value!==M);if(C.length===2&&B){b=s.jsxs("button",{type:"button",onClick:()=>H(B.value),"aria-label":i("mainPanelTabs.mobileMainPanelTabSelect.switchTo",{name:B.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/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(Ie,{icon:B.icon,className:"size-5"})}),s.jsx("span",{className:"min-w-0 truncate",children:B.title})]});break e}g=Gn,w=Je,P=H;let K;e[37]!==i?(K=i("mainPanelTabs.mobileMainPanelTabSelect.view"),e[37]=i,e[38]=K):K=e[38],j=s.jsx(zn,{"aria-label":K,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 [--card-shadow:none]",children:s.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[A&&s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(Ie,{icon:A.icon,className:"size-5"})}),s.jsx("span",{className:"min-w-0 truncate",children:D})]})}),p=Hn,x="end",N="w-56",e[39]!==D?(S=s.jsx(qt,{value:Je,disabled:!0,hideCheck:!0,className:"hidden",children:D}),e[39]=D,e[40]=S):S=e[40],T=C.map(Tr)}e[6]=f,e[7]=m,e[8]=a,e[9]=k,e[10]=l,e[11]=h.id,e[12]=u.org,e[13]=u.taskId,e[14]=v,e[15]=i,e[16]=d,e[17]=n,e[18]=p,e[19]=g,e[20]=j,e[21]=b,e[22]=x,e[23]=N,e[24]=S,e[25]=T,e[26]=w,e[27]=P}else p=e[18],g=e[19],j=e[20],b=e[21],x=e[22],N=e[23],S=e[24],T=e[25],w=e[26],P=e[27];if(b!==Symbol.for("react.early_return_sentinel"))return b;let _;e[41]!==p||e[42]!==x||e[43]!==N||e[44]!==S||e[45]!==T?(_=s.jsxs(p,{align:x,className:N,children:[S,T]}),e[41]=p,e[42]=x,e[43]=N,e[44]=S,e[45]=T,e[46]=_):_=e[46];let I;return e[47]!==g||e[48]!==j||e[49]!==_||e[50]!==w||e[51]!==P?(I=s.jsxs(g,{value:w,onValueChange:P,children:[j,_]}),e[47]=g,e[48]=j,e[49]=_,e[50]=w,e[51]=P,e[52]=I):I=e[52],I}function Tr(t){return s.jsx(qt,{value:t.value,children:s.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(Ie,{icon:t.icon})}),s.jsx("span",{className:"min-w-0 truncate",children:t.title})]})},t.value)}function _r(t){return{...t,sidepanel:!1}}function wr(t){return{...t,thread:void 0,sidepanel:!1}}function Cr(t,e,n){const r=$.c(33),i=it(),{locator:a}=oe(),l=O.useSyncExternalStore(i.threads.subscribe,i.threads.get),c=O.useSyncExternalStore(i.threadsStatus.subscribe,i.threadsStatus.get);let u;r[0]!==t||r[1]!==l?(u=t===null?null:l.find(x=>x.id===t&&!x.partial)??null,r[0]=t,r[1]=l,r[2]=u):u=r[2];const o=u,[d,f]=O.useState(void 0),[m,h]=O.useState(t);m!==t&&(h(t),f(void 0));let v,y;r[3]!==d||r[4]!==t||r[5]!==o||r[6]!==i||r[7]!==c.kind?(v=()=>{t!==null&&(o||c.kind!=="loading"&&d===void 0&&(f("pending"),i.fetchThreadIntoSlot(t).then(x=>{f(x)})))},y=[t,o,c.kind,d,i],r[3]=d,r[4]=t,r[5]=o,r[6]=i,r[7]=c.kind,r[8]=v,r[9]=y):(v=r[8],y=r[9]),O.useEffect(v,y);let k;r[10]!==n||r[11]!==a||r[12]!==i||r[13]!==e?(k={mutationFn:async x=>i.create({id:x,virtual_mcp_id:e,...n?{branch:n}:{},...en(sessionStorage,a,x)})},r[10]=n,r[11]=a,r[12]=i,r[13]=e,r[14]=k):k=r[14];const p=is(k);let g,j;if(r[15]!==p||r[16]!==d||r[17]!==t||r[18]!==o||r[19]!==c.kind?(g=()=>{t!==null&&(o||d===null&&c.kind!=="loading"&&(p.isPending||p.variables!==t&&p.mutate(t)))},j=[t,o,d,c.kind,p],r[15]=p,r[16]=d,r[17]=t,r[18]=o,r[19]=c.kind,r[20]=g,r[21]=j):(g=r[20],j=r[21]),O.useEffect(g,j),t===null){let x;return r[22]===Symbol.for("react.memo_cache_sentinel")?(x={status:"ready",task:null},r[22]=x):x=r[22],x}if(o){let x;return r[23]!==o?(x={status:"ready",task:o},r[23]=o,r[24]=x):x=r[24],x}if(d&&typeof d=="object"){let x;return r[25]!==d?(x={status:"ready",task:d},r[25]=d,r[26]=x):x=r[26],x}if(p.data){let x;return r[27]!==p.data?(x={status:"ready",task:p.data},r[27]=p.data,r[28]=x):x=r[28],x}if(p.isError){let x;return r[29]!==p.error?(x={status:"error",error:p.error},r[29]=p.error,r[30]=x):x=r[30],x}if(p.isPending||c.kind!=="loading"){let x;return r[31]===Symbol.for("react.memo_cache_sentinel")?(x={status:"creating"},r[31]=x):x=r[31],x}let b;return r[32]===Symbol.for("react.memo_cache_sentinel")?(b={status:"loading"},r[32]=b):b=r[32],b}function Pr(t){const e=$.c(13),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=Se(r);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const l=Fe(a);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={select:Ar},e[2]=c):c=e[2];const u=ls(c),{org:o}=oe();let d;e[3]!==o||e[4]!==i.agentId||e[5]!==i.legacyView||e[6]!==i.org||e[7]!==u||e[8]!==l?(d=i.org?os({pathname:u,org:i.org,pathAgentId:i.agentId,pathLegacyView:i.legacyView,fallbackAgentId:ke(o.id).id,search:l}):null,e[3]=o,e[4]=i.agentId,e[5]=i.legacyView,e[6]=i.org,e[7]=u,e[8]=l,e[9]=d):d=e[9];const f=d;let m;return e[10]!==n||e[11]!==f?(m=f?s.jsx(ct,{target:f}):n,e[10]=n,e[11]=f,e[12]=m):m=e[12],m}function Ar(t){return t.matches.at(-1)?.pathname??t.location.pathname}function Ir(){const t=$.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const n=Se(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const i=Fe(r),{org:a}=oe(),{org:l,taskId:c}=n;if(!l||c===void 0)return null;let u;return t[2]!==l||t[3]!==a.id||t[4]!==i||t[5]!==c?(u=cs({org:l,taskId:c,fallbackAgentId:ke(a.id).id,search:i}),t[2]=l,t[3]=a.id,t[4]=i,t[5]=c,t[6]=u):u=t[6],u}function Mr(){const t=$.c(2),e=Ir();let n;return t[0]!==e?(n=e?s.jsx(ct,{target:e}):null,t[0]=e,t[1]=n):n=t[1],n}function Lr(){const t=$.c(6),e=Kn(),n=De();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const{preview:i}=Fe(r);if(!e||!i)return null;let a;t[1]!==n?(a=()=>n({to:".",search:$r}),t[1]=n,t[2]=a):a=t[2];let l;return t[3]!==i||t[4]!==a?(l=s.jsx(Wn,{previewPath:i,onClose:a,showSeeInLibrary:!0}),t[3]=i,t[4]=a,t[5]=l):l=t[5],l}function $r(t){const{preview:e,...n}=t;return n}const Dr=O.createContext(null);function ts(){return O.useContext(Dr)}function Fr(t){const e=$.c(13),{children:n}=t,r=V(),i=Yt(),a=ts(),l=Ge()!==null;let c;e[0]!==l||e[1]!==i||e[2]!==a?(c=s.jsx(Na,{}),e[0]=l,e[1]=i,e[2]=a,e[3]=c):c=e[3];const u=c;let o;e[4]!==r?(o=r("agentShellLayout.agentShellLayout.chatLoadingError"),e[4]=r,e[5]=o):o=e[5];let d;e[6]!==o?(d=s.jsx("div",{role:"alert",className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:o}),e[6]=o,e[7]=d):d=e[7];const f=n??u;let m;e[8]!==f?(m=s.jsx(Le,{children:f}),e[8]=f,e[9]=m):m=e[9];let h;return e[10]!==d||e[11]!==m?(h=s.jsx(St,{fallback:d,children:m}),e[10]=d,e[11]=m,e[12]=h):h=e[12],h}function Rr(t){const e=$.c(13),{threadId:n,children:r}=t;if(V(),ts(),n===null){let a;return e[0]!==r?(a=s.jsx(ee.ThreadlessProvider,{children:r}),e[0]=r,e[1]=a):a=e[1],a}let i;return e[10]!==r||e[11]!==n?(i=s.jsx(ee.ActiveTaskProvider,{taskId:n,children:r}),e[10]=r,e[11]=n,e[12]=i):i=e[12],i}function Er(t){const e=$.c(3),{onNewTaskRef:n,createNewTask:r}=t;let i;return e[0]!==r||e[1]!==n?(i=()=>(n.current=r,()=>{n.current=null}),e[0]=r,e[1]=n,e[2]=i):i=e[2],O.useLayoutEffect(i),null}function Or({virtualMcpId:t,hasActiveRepository:e,sandboxMap:n,children:r}){const i=V(),{currentBranch:a,activeTask:l,setCurrentTaskBranch:c}=Ee(),u=Yt(),o="agent-sandbox",{data:d}=$e.useSession(),f=d?.user?.id,m=!Is({isDesktopApp:u,harnessId:l?.harness_id}),h=nn({agentSandboxMap:n,threadSandboxMap:l?.metadata?.sandboxMap,userId:f,ownerId:l?.created_by,branch:a}),v=e||Ys(l?.metadata),y=O.useRef(null),k=m&&an({threadLoaded:!!l,isOwner:!!f&&l?.created_by===f,hasActiveRepository:v,branch:a??null,attempted:y.current===(l?.id??null)});O.useEffect(()=>{!k||!l||(y.current=l.id,c(Ft(d?.user?.name||d?.user?.email?.split("@")[0])))},[k,l,d,c]);const p=Mt(t),g=ce(t),j=Et(g,a),{releases:b,createRelease:x}=Xs(t),S=!!f&&l?.created_by===f&&!!a&&a!==j&&!b.some(A=>A.branch===a),T=O.useRef(null);O.useEffect(()=>{!S||!a||T.current!==a&&(T.current=a,x({branch:a,name:Qs(b,i("thread.branchPicker.defaultVersionName")),color:Zs(b.length),createdBy:f,createdAt:new Date().toISOString()}).catch(()=>{}))},[S,a,b,x,f,i]);const w=p.resolved?p.runtime:null,P=rn(t,a??void 0),I=(f&&a?Yn(h?.[f]?.[a]):{})[o]??null,C=I?.previewUrl??null,M=m&&w!=="cms"&&(!!I||P);return m?w==="cms"?s.jsx(pt,{children:r},`${t}:${a??"no-branch"}:${l?.id??""}`):s.jsx(ln,{virtualMcpId:t,branch:a??null,previewUrl:C,enabled:M,children:s.jsx(on,{executionEnabled:m,virtualMcpId:t,branch:a??null,userId:f??null,hasActiveRepository:v,vmEntry:I,threadId:l?.id??null,children:s.jsx(pt,{children:r},`${t}:${a??"no-branch"}:${l?.id??""}`)})},l?.id??"no-thread"):s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsx("div",{className:"flex h-full rounded-[0.75rem] bg-background card-shadow",children:s.jsx(Ot,{image:s.jsx(nt,{size:48,className:"text-muted-foreground"}),title:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWeb"),description:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWebDescription")})})})}function Br(){const t=$.c(16),e=V(),{toggleSidebar:n}=ws(),{virtualMcpId:r,taskId:i}=Ee();let a;t[0]!==e?(a=e("layouts.shellControls.toggleSidebar"),t[0]=e,t[1]=a):a=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ts,{size:16}),t[2]=l):l=t[2];let c;t[3]!==a||t[4]!==n?(c=s.jsx(Ae,{className:"md:hidden",onClick:n,"aria-label":a,children:l}),t[3]=a,t[4]=n,t[5]=c):c=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(fr,{}),t[6]=u):u=t[6];let o;t[7]!==c?(o=s.jsxs(Ye.Topbar.Left,{children:[c,u]}),t[7]=c,t[8]=o):o=t[8];let d;t[9]!==i||t[10]!==r?(d=s.jsx("div",{className:"min-w-0 md:hidden",children:s.jsx(Nr,{virtualMcpId:r,taskId:i})}),t[9]=i,t[10]=r,t[11]=d):d=t[11];let f;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ye.Topbar.Right,{className:"shrink-0",children:s.jsx(hr,{})}),t[12]=f):f=t[12];let m;return t[13]!==o||t[14]!==d?(m=s.jsxs(Ye.Topbar,{className:"border-b border-border/60 px-3",children:[o,d,f]}),t[13]=o,t[14]=d,t[15]=m):m=t[15],m}function zr(t){const e=$.c(25),{layout:n,onNewTaskRef:r,createNewTask:i}=t,{virtualMcpId:a,taskId:l}=Ee(),c=ce(a),u=On()??"overview",o=_s(),[d,f]=O.useState(null),m=d===u,h=o?m:n.threadOpen;let v;e[0]!==u||e[1]!==n||e[2]!==o||e[3]!==m?(v=o?()=>f(m?null:u):n.toggleThread,e[0]=u,e[1]=n,e[2]=o,e[3]=m,e[4]=v):v=e[4];const y=v;let k;e[5]!==i||e[6]!==r?(k=s.jsx(Er,{onNewTaskRef:r,createNewTask:i}),e[5]=i,e[6]=r,e[7]=k):k=e[7];let p;e[8]!==l||e[9]!==a?(p=s.jsx(xr,{virtualMcpId:a,taskId:l}),e[8]=l,e[9]=a,e[10]=p):p=e[10];let g;e[11]!==c?(g=c&&s.jsx(pr,{virtualMcp:c}),e[11]=c,e[12]=g):g=e[12];let j,b;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ht.Thread,{topbar:s.jsx(Br,{}),children:s.jsx(Fr,{})}),b=s.jsx(Ct,{}),e[13]=j,e[14]=b):(j=e[13],b=e[14]);let x;e[15]!==u||e[16]!==n||e[17]!==p||e[18]!==g||e[19]!==h||e[20]!==y?(x=s.jsxs(ht,{...n,threadOpen:h,toggleThread:y,contentKey:u,contentNavigation:p,contentActions:g,children:[j,b]}),e[15]=u,e[16]=n,e[17]=p,e[18]=g,e[19]=h,e[20]=y,e[21]=x):x=e[21];let N;return e[22]!==k||e[23]!==x?(N=s.jsxs(s.Fragment,{children:[k,x]}),e[22]=k,e[23]=x,e[24]=N):N=e[24],N}function Gr(){const t=V(),e=De(),n=pn(),{create:r}=ot(),{org:i}=oe(),l=Se({strict:!1}).org??"",c=Fe({strict:!1}),u=Ge(),o=Vt(),d=Ht(),[f]=O.useState(()=>crypto.randomUUID()),{data:m}=$e.useSession(),[h]=O.useState(()=>Ft(m?.user?.name||m?.user?.email?.split("@")[0])),v=it(),y=O.useSyncExternalStore(v.threads.subscribe,v.threads.get),k=O.useSyncExternalStore(v.threadsStatus.subscribe,v.threadsStatus.get),p=ce(o),g=!!(p&&$t(p)),j=Et(p,null),b=Cr(u,o,h);Ta(b.status==="ready"?b.task:null);const x=p?.metadata?.ui?.layout??null,N=x?{defaultMainView:x.defaultMainView??null,chatDefaultOpen:x.chatDefaultOpen??null}:null,S=un(N),{threadId:T,providerKey:w}=gr({routeThreadId:u,fallbackKey:f}),P=async()=>{const M=crypto.randomUUID(),A=y.find(D=>D.id===T)?.branch??null;try{await r({id:M,virtual_mcp_id:o,...A?{branch:A}:{}})}catch{}n(M,()=>({}))},_=O.useRef(null);O.useEffect(()=>{const M=A=>{Ws(A)&&A.shiftKey&&A.code==="KeyS"&&!A.repeat&&(A.preventDefault(),_.current?.())};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[]);const I=b.status==="ready"?b.task:null,C=I?.virtual_mcp_id;if(I&&C&&!xn({routeAgentId:o,threadAgentId:C})){const M=ds({org:l,agentId:C,superAgentId:ke(i.id).id});return s.jsx(ct,{target:{route:M,search:{thread:I.id,sidepanel:c.sidepanel,mainpanel:c.mainpanel,autosend:c.autosend}}})}if(u===null&&d&&p){if(k.kind==="loading")return s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background card-shadow rounded-[0.75rem] text-sm text-muted-foreground",children:[s.jsx(je,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})});const A=sn(y,o,m?.user?.id,Rt(p.metadata),g,{baseBranch:j})?.id??(g?f:null);if(A)return s.jsx(us,{to:".",replace:!0,search:D=>({...D,thread:A})})}return b.status==="creating"||b.status==="loading"?s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background card-shadow rounded-[0.75rem] text-sm text-muted-foreground",children:[s.jsx(je,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})}):b.status==="error"?s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"alert",className:"flex flex-col h-full items-center justify-center gap-2 bg-background card-shadow rounded-[0.75rem] p-8 text-sm",children:[s.jsx("div",{className:"font-medium",children:t("agentShellLayout.agentShellLayout.taskUnavailable")}),s.jsx("div",{className:"text-muted-foreground",children:b.error.message})]})}):p?s.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:s.jsx(ee.Provider,{virtualMcpId:o,task:b.status==="ready"?b.task:null,children:s.jsx(Gs,{layout:S,children:s.jsx(Or,{virtualMcpId:o,hasActiveRepository:g,sandboxMap:p.metadata?.sandboxMap,children:s.jsx(Rr,{threadId:T,children:s.jsx(Le,{children:s.jsx(zr,{layout:S,onNewTaskRef:_,createNewTask:P})})},w)})})},o)}):s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:s.jsx(Ot,{image:s.jsx(nt,{size:48,className:"text-muted-foreground"}),title:t("agentShellLayout.agentShellLayout.agentNotFound"),description:t("agentShellLayout.agentShellLayout.agentNotFoundDescription",{virtualMcpId:o}),actions:s.jsx(fs,{variant:"outline",onClick:()=>e({to:"/$org",params:{org:l}}),children:t("agentShellLayout.agentShellLayout.goToOrgHome")})})})})}function Vo(){const t=$.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const n=Se(e);if(n.taskId!==void 0){let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Mr,{}),t[1]=i):i=t[1],i}if(n._splat!==void 0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ct,{}),t[2]=i):i=t[2],i}let r;return t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Le,{children:s.jsx(Pr,{children:s.jsx(Un,{children:s.jsxs(qn,{children:[s.jsx(Gr,{}),s.jsx(Lr,{})]})})})}),t[3]=r):r=t[3],r}export{Vo as default};
|