decocms 4.514.5 → 4.514.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{ActiveShapeUtils-CDpScllU.js → ActiveShapeUtils-DV40gvcg.js} +1 -1
- package/dist/client/assets/{AlertCircle-xI8XX-bi.js → AlertCircle-Ctbquk5a.js} +1 -1
- package/dist/client/assets/{AreaChart-Du66qHXY.js → AreaChart-C_4ebEom.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BKYzlDQY.js → ArrowLeft-DZ0mAFgb.js} +1 -1
- package/dist/client/assets/{ArrowUp-Cq3iZIwL.js → ArrowUp-bYg1aEOe.js} +1 -1
- package/dist/client/assets/{BarChart-BXz-bUtC.js → BarChart-DfTtCBDv.js} +1 -1
- package/dist/client/assets/{Building02-C9KWPxlH.js → Building02-BHIVlbfK.js} +1 -1
- package/dist/client/assets/{CartesianChart-BZmgsxge.js → CartesianChart-uNdbRuTj.js} +1 -1
- package/dist/client/assets/{CategoricalChart-DkwWvFDx.js → CategoricalChart-CRSSpo7X.js} +1 -1
- package/dist/client/assets/{CheckCircle-D30wPP6A.js → CheckCircle-C2ndOEUO.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CknWVrzo.js → ChevronSelectorVertical-DaUdbCWk.js} +1 -1
- package/dist/client/assets/{ChevronUp-CFN68hLk.js → ChevronUp-C8mqlnDX.js} +1 -1
- package/dist/client/assets/{Copy01-C73PJJxr.js → Copy01-DC8f0fwU.js} +1 -1
- package/dist/client/assets/{CreditCard01-C8DlQ7Ge.js → CreditCard01-P7j8oDkg.js} +1 -1
- package/dist/client/assets/{DotsVertical-BvyfZIer.js → DotsVertical-BvwGTDkC.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-Bhpq3Y0r.js → ErrorBarContext-KwnilJkg.js} +1 -1
- package/dist/client/assets/{Globe04-CVLAzwjm.js → Globe04-D6C-ihBU.js} +1 -1
- package/dist/client/assets/{Image01-DowwsvYG.js → Image01-D7F4wuKx.js} +1 -1
- package/dist/client/assets/{Key01-rbnGMz2E.js → Key01-u4HXXUPa.js} +1 -1
- package/dist/client/assets/{Link01-DRsKyIm5.js → Link01-BoUupQbW.js} +1 -1
- package/dist/client/assets/{LinkBroken01-ZRquEJUl.js → LinkBroken01-BJx0R97x.js} +1 -1
- package/dist/client/assets/{Minus-DPDq6KAA.js → Minus-C1PMcNV0.js} +1 -1
- package/dist/client/assets/{Monitor01-DMME8GIo.js → Monitor01-D3VwU2ni.js} +1 -1
- package/dist/client/assets/{Play-c6bc1b3-.js → Play-DxsFk4r2.js} +1 -1
- package/dist/client/assets/{Plus-xabrshQG.js → Plus-BDveVGJf.js} +1 -1
- package/dist/client/assets/{ReferenceLine-BPq2MnBR.js → ReferenceLine-ILm1GG8J.js} +1 -1
- package/dist/client/assets/{SearchMd-BODiv7c9.js → SearchMd-Cuf45jFP.js} +1 -1
- package/dist/client/assets/{Sector-BraX9V6h.js → Sector-D2xOkxuc.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DAjyOiiw.js → ShoppingBag01-BMRnsG58.js} +1 -1
- package/dist/client/assets/{Sun-BqmeoxcG.js → Sun-sKGpeIhM.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CESO3nxl.js → SwitchHorizontal01-CshMTQzi.js} +1 -1
- package/dist/client/assets/{Tool01-BGL2Qt57.js → Tool01-BM29_KWq.js} +1 -1
- package/dist/client/assets/{Trash01-Cf6bGuCZ.js → Trash01-D92WhXf2.js} +1 -1
- package/dist/client/assets/{Upload01-ZLE7vfB9.js → Upload01-BSDy4f7m.js} +1 -1
- package/dist/client/assets/{User01-Cfg0yVvz.js → User01-Cn3JqTjv.js} +1 -1
- package/dist/client/assets/{UserSquare-DJngEPjS.js → UserSquare-Drp4z0v0.js} +1 -1
- package/dist/client/assets/{Users01-vn3EOu8A.js → Users01-Cxbx87gg.js} +1 -1
- package/dist/client/assets/{XClose-CdzjyNb0.js → XClose-dOW_RI9u.js} +1 -1
- package/dist/client/assets/{ZoomOut-B55seUHX.js → ZoomOut-BfQx-fBr.js} +1 -1
- package/dist/client/assets/{access-gate-CgSSvGG3.js → access-gate-BjUA5Gw_.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-O4xCe9BP.js → add-connection-dialog-B0vtW1sl.js} +1 -1
- package/dist/client/assets/{agent-analytics-Biob4Jvo.js → agent-analytics-D74l8HWB.js} +1 -1
- package/dist/client/assets/agent-app-CEBVAZwO.js +1 -0
- package/dist/client/assets/{agent-assets-DpuZ7qUq.js → agent-assets-Bwo-LFkg.js} +1 -1
- package/dist/client/assets/{agent-automation-DBMflQw2.js → agent-automation-Cc45Az0m.js} +1 -1
- package/dist/client/assets/{agent-automations-CHJpber1.js → agent-automations-Du82D3qr.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-CX6V3W-l.js → agent-connect-sources-mK6fw0FS.js} +1 -1
- package/dist/client/assets/agent-deck-BZZHzjdZ.js +1 -0
- package/dist/client/assets/{agent-e2e-rlzvrptO.js → agent-e2e-D6ovLSkg.js} +1 -1
- package/dist/client/assets/{agent-experiments-BzSUejrS.js → agent-experiments-Bf1OqB1m.js} +1 -1
- package/dist/client/assets/agent-file-CzvpBEaK.js +1 -0
- package/dist/client/assets/{agent-hosting-CIblOaW0.js → agent-hosting-6te_9jdz.js} +1 -1
- package/dist/client/assets/{agent-icon-c0hRUHIU.js → agent-icon-U4gZaLOQ.js} +1 -1
- package/dist/client/assets/agent-library-BOSIxUYz.js +1 -0
- package/dist/client/assets/agent-library-file-C0RqJ45T.js +1 -0
- package/dist/client/assets/{agent-monitor-CMU4bHqc.js → agent-monitor-C3Fta9kk.js} +1 -1
- package/dist/client/assets/{agent-overview-C0WObUrB.js → agent-overview-NPCMkyDB.js} +1 -1
- package/dist/client/assets/{agent-releases-CEAPMdCY.js → agent-releases-COSsnWfe.js} +1 -1
- package/dist/client/assets/agent-settings-DDIl5jyz.js +1 -0
- package/dist/client/assets/{agent-site-editor-WHTbnkdB.js → agent-site-editor-DlN_1OE1.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-ByOIwjcy.js +2 -0
- package/dist/client/assets/agent-site-editor-content-DSEuxkJh.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-pw2RBbYs.js +1 -0
- package/dist/client/assets/agent-view-IbmF6KBh.js +1 -0
- package/dist/client/assets/{agent-view-guard-CY0RZ3mz.js → agent-view-guard-Bk4OTT2f.js} +1 -1
- package/dist/client/assets/{agents-list-lrkIUH1p.js → agents-list-B_j46cpj.js} +1 -1
- package/dist/client/assets/{ai-providers-BJRpwnf3.js → ai-providers-Cb4AWs2D.js} +1 -1
- package/dist/client/assets/{alert-J8Wo4iMe.js → alert-B29bfkXd.js} +1 -1
- package/dist/client/assets/{alert-dialog-M8Y0zqSA.js → alert-dialog-CKDHmJ-l.js} +1 -1
- package/dist/client/assets/{analytics-sections-Crtm-SOa.js → analytics-sections-wgH0NLyS.js} +1 -1
- package/dist/client/assets/api-keys-CiMyiLjo.js +1 -0
- package/dist/client/assets/{api-keys-BuJhmHVr.js → api-keys-Xjw7lgqR.js} +1 -1
- package/dist/client/assets/{app-editor-CWO6RLKf.js → app-editor-DgdEdwhZ.js} +1 -1
- package/dist/client/assets/{asset-utils-D4ZYWTsd.js → asset-utils-DrTFUoo_.js} +1 -1
- package/dist/client/assets/{auth-catchall-PMDrOrh4.js → auth-catchall-CIV9IiTJ.js} +1 -1
- package/dist/client/assets/{auth-entry-D45yK4lP.js → auth-entry-ctrK7teX.js} +1 -1
- package/dist/client/assets/{auth-CJCUdDnK.js → auth-hgpoCSIS.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BeoAmW98.js → auth-split-layout-DkyooQGo.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-D7W1mkzH.js → authenticate-and-persist-oauth-jn1R1qId.js} +1 -1
- package/dist/client/assets/{automation-list-row-CO-7cr0O.js → automation-list-row-qFFhCtZo.js} +1 -1
- package/dist/client/assets/{automation-runs-7CDwsw1m.js → automation-runs-C367-v6a.js} +1 -1
- package/dist/client/assets/{automations-DpOWGNx_.js → automations-8JKgpNEK.js} +1 -1
- package/dist/client/assets/{autosend-BiXCzDoT.js → autosend-BZOm698U.js} +1 -1
- package/dist/client/assets/{avatar-CVrfZDpI.js → avatar-RpIBVCkY.js} +1 -1
- package/dist/client/assets/{badge-ByzdbptS.js → badge-Cnnepvq1.js} +1 -1
- package/dist/client/assets/{block-document-EFEgqy7V.js → block-document-baEM6UJG.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-FfAtB7Mh.js → blocks-preview-workspace-context-Ca46yWEV.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-diUqUrAK.js → blocks-tab-states-jGeS9iVz.js} +3 -3
- package/dist/client/assets/{blog-schema-pXyj_uKN.js → blog-schema-CUOOV4a2.js} +1 -1
- package/dist/client/assets/{buckets-EuucCx-Z.js → buckets-p2Fiyc0f.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-0HVt3TgE.js → build-improve-prompt-doc-ClmcYJRa.js} +1 -1
- package/dist/client/assets/{calendar-B3WUDV6V.js → calendar-DqVFnL9A.js} +1 -1
- package/dist/client/assets/{capability-load-error-CaA022rx.js → capability-load-error-DdN4o47w.js} +1 -1
- package/dist/client/assets/{category-editor-16fFMZmU.js → category-editor-Gr46SDP4.js} +1 -1
- package/dist/client/assets/{chart-B6d33H1D.js → chart-B5vy2nis.js} +1 -1
- package/dist/client/assets/{chat-context-BnuwMOfj.js → chat-context-_d3c57p1.js} +1 -1
- package/dist/client/assets/{chat-draft-D3EwPWFD.js → chat-draft-CKcHhXuF.js} +1 -1
- package/dist/client/assets/{checkbox-Dla8kRWj.js → checkbox-CUzk21sc.js} +1 -1
- package/dist/client/assets/{choose-editor-CFsJlwqs.js → choose-editor-BFcNvSv4.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DADJ0ld_.js → cli-auth-success-BolfyrKO.js} +1 -1
- package/dist/client/assets/{client-icons-M2KssD4J.js → client-icons-50FpZDWK.js} +1 -1
- package/dist/client/assets/cms-settings-editor-CxJ3W3GB.js +1 -0
- package/dist/client/assets/{collapsible-BWjY8cOG.js → collapsible-CeBZpglT.js} +1 -1
- package/dist/client/assets/{collection-detail-BVMX_w00.js → collection-detail-BXVqh2XU.js} +1 -1
- package/dist/client/assets/{collection-display-button-DcSGVqBT.js → collection-display-button-El-xnsaW.js} +1 -1
- package/dist/client/assets/{collection-search-C0nHL4Zi.js → collection-search-gW4FCqmq.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BqLbzGMr.js → collection-table-wrapper-CB0t7kAl.js} +1 -1
- package/dist/client/assets/{collection-tabs-DJst1PBn.js → collection-tabs-DIFXv7hR.js} +1 -1
- package/dist/client/assets/{column-rules-C6rmmvcZ.js → column-rules-o-DlIK_-.js} +1 -1
- package/dist/client/assets/{combobox-DJtWtG8e.js → combobox-DlpsfK7m.js} +1 -1
- package/dist/client/assets/{coming-soon-page-CycWyIEs.js → coming-soon-page-ZTZUbFgV.js} +1 -1
- package/dist/client/assets/{command-DQxPvzO0.js → command-C7n5qLsN.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BaIOrb8k.js → companion-mcps-section-C2rDEgkL.js} +1 -1
- package/dist/client/assets/{config-0dQr8OOs.js → config-BCpfsSBB.js} +1 -1
- package/dist/client/assets/{connect-AQ7wxQDD.js → connect-Du_rXIM1.js} +1 -1
- package/dist/client/assets/{connect-layout-CsBnyYo4.js → connect-layout-DyGwITyt.js} +1 -1
- package/dist/client/assets/{connection-B5x-rxzp.js → connection-Dik4epzq.js} +1 -1
- package/dist/client/assets/{connection-card-CFqu0_G8.js → connection-card-DCnmTKpJ.js} +1 -1
- package/dist/client/assets/{connection-detail-B_xaSLIN.js → connection-detail-CaTyUBlA.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CouK82td.js → connection-form-helpers-ta2yIvIb.js} +1 -1
- package/dist/client/assets/{connections-CrdtyJFL.js → connections-Dy2qa1bG.js} +1 -1
- package/dist/client/assets/{content-tab-CTbbT9Kp.js → content-tab-YH7YYY48.js} +3 -3
- package/dist/client/assets/{context-DwXA-O6V.js → context-3twD8BEv.js} +1 -1
- package/dist/client/assets/{context-menu-CI-AryjZ.js → context-menu-BUZj1ZG7.js} +1 -1
- package/dist/client/assets/{context-shell-BsFUt-ob.js → context-shell-CWF9i3Vt.js} +3 -3
- package/dist/client/assets/{core.esm-DOdwJCI5.js → core.esm-DNra8pgf.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CDMsJ1wq.js → create-organization-dialog-BkJvAp86.js} +1 -1
- package/dist/client/assets/{daily-pulse-A6lEoniM.js → daily-pulse-DYjhyf3I.js} +1 -1
- package/dist/client/assets/{discover-JQgSyvWz.js → discover-nnC5Qnas.js} +1 -1
- package/dist/client/assets/{domain-settings-CNG0968P.js → domain-settings-CpxFWOzU.js} +1 -1
- package/dist/client/assets/{drawer-CEiS53oX.js → drawer-ZlYTI3Z6.js} +1 -1
- package/dist/client/assets/{editor-DWhRi1_f.js → editor-BFHySd1K.js} +1 -1
- package/dist/client/assets/{editor-classes-CZOMDDcn.js → editor-classes-DPi5BWR5.js} +1 -1
- package/dist/client/assets/{empty-state-B1xpK558.js → empty-state-Bok1L2hc.js} +1 -1
- package/dist/client/assets/{empty-state-BoFIIv2e.js → empty-state-Cu20Qj3-.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CUvLfXNU.js → extract-connection-data-CNLani4P.js} +1 -1
- package/dist/client/assets/{feature-gate-B9a4dBc0.js → feature-gate-dfnyrtcC.js} +1 -1
- package/dist/client/assets/{feature-paywall-DINMFUUx.js → feature-paywall-D-GfxA1X.js} +1 -1
- package/dist/client/assets/{file-explorer-2Z0Qhvp_.js → file-explorer-DOlx1A5r.js} +1 -1
- package/dist/client/assets/{file-preview-BFXgyqHl.js → file-preview-DSIiiWjA.js} +1 -1
- package/dist/client/assets/{file-share-button-BIOHr9Xv.js → file-share-button-CB7fcIJI.js} +1 -1
- package/dist/client/assets/{file-type-icon-Ez8-DRHg.js → file-type-icon-DPqHd815.js} +1 -1
- package/dist/client/assets/{folder-icon-JgTmBbpC.js → folder-icon-qexQSaYN.js} +1 -1
- package/dist/client/assets/{form-Bdh0vUeg.js → form-Dpwt-9St.js} +1 -1
- package/dist/client/assets/{general-Dvy5SU0P.js → general-DJuGMWNv.js} +1 -1
- package/dist/client/assets/{home-UtAOwZ_a.js → home-D9ErGwHG.js} +1 -1
- package/dist/client/assets/{hosted-publish-feedback-NabikYNC.js → hosted-publish-feedback-9IsLIhi6.js} +1 -1
- package/dist/client/assets/{icon-button-Dg2jSe-y.js → icon-button-CwrVRVUS.js} +1 -1
- package/dist/client/assets/{index-ILRCn1qM.js → index-2uBqLA9S.js} +1 -1
- package/dist/client/assets/{index-CxtzBp5_.js → index-BRzGXE32.js} +1 -1
- package/dist/client/assets/{index-DYLyKNcw.js → index-BWUABroT.js} +1 -1
- package/dist/client/assets/{index-De44zW_k.js → index-BpRXpcv4.js} +1 -1
- package/dist/client/assets/{index-WjQsIrkp.js → index-C9OgV5Vt.js} +1 -1
- package/dist/client/assets/{index-_y92DzgS.js → index-CJu3ft8V.js} +1 -1
- package/dist/client/assets/{index-DcU2uHG-.js → index-CaH7O3hJ.js} +2 -2
- package/dist/client/assets/{index-7svLQYvL.js → index-Cd_jqW-G.js} +1 -1
- package/dist/client/assets/{index-1XeDvVO_.js → index-DJM5MV7l.js} +1 -1
- package/dist/client/assets/{index-DxbCP5B6.js → index-DK4LlU65.js} +1 -1
- package/dist/client/assets/{index-CrgWXxvo.js → index-DLuP-oy3.js} +1 -1
- package/dist/client/assets/{index-DKOhwHAG.js → index-DPulqOQn.js} +1 -1
- package/dist/client/assets/{index-CXeJCI0G.js → index-DUXVtfV1.js} +1 -1
- package/dist/client/assets/{index-DincrG3Y.js → index-DzppA2EQ.js} +1 -1
- package/dist/client/assets/{index-6B342dVL.js → index-TNsA6rsO.js} +1 -1
- package/dist/client/assets/{index-redirect-BHJ13xlS.js → index-redirect-CLzDU0fe.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-P7ZNg4ZF.js → infiniteQueryObserver-u-Zd7Oxq.js} +1 -1
- package/dist/client/assets/{infra-billing-kRHrP-RL.js → infra-billing-DkMlIjvS.js} +1 -1
- package/dist/client/assets/{input-pg_Munw1.js → input-D2sd1bar.js} +3 -3
- package/dist/client/assets/{input-HXHaYrka.js → input-DN6U5jAj.js} +1 -1
- package/dist/client/assets/{integration-icon-aeIvRSnw.js → integration-icon-DCiBepJw.js} +1 -1
- package/dist/client/assets/{jira-icon-CZLCmGol.js → jira-icon-DoiJbCfx.js} +1 -1
- package/dist/client/assets/{label-DDPD5LQh.js → label-Cnc4HQwP.js} +1 -1
- package/dist/client/assets/{layout-DGYUOV2D.js → layout-BVW5q62A.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-B3GKD6WQ.js → legacy-agents-deep-DMfsC9-u.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BdnJuiDi.js → legacy-main-redirect-mSx9JMxj.js} +1 -1
- package/dist/client/assets/library-BNARKbpY.js +1 -0
- package/dist/client/assets/{login-syjpZA32.js → login-CN9ueiIT.js} +1 -1
- package/dist/client/assets/{markdown-1PeXOKNt.js → markdown-CA3yd3L6.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DTPlWHGT.js → mcp-app-renderer-Xaw0krD3.js} +1 -1
- package/dist/client/assets/{mcp-oauth-xBzZujQ_.js → mcp-oauth-3Gakbc_U.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DP6VNnFQ.js → mcp-oauth-CxgfM8zh.js} +1 -1
- package/dist/client/assets/{members-uR8n9Rms.js → members-54kLIghY.js} +1 -1
- package/dist/client/assets/{memory-BYqDBVHV.js → memory-CQX6dqQP.js} +1 -1
- package/dist/client/assets/{mini-report-page-D7tpDtif.js → mini-report-page-DCq4FNu-.js} +1 -1
- package/dist/client/assets/{mock-board-BOSDq94-.js → mock-board-CrlDKQvj.js} +3 -3
- package/dist/client/assets/{monaco-editor-e80GuCNv.js → monaco-editor-C7rmyhBT.js} +1 -1
- package/dist/client/assets/monitoring-DX0mWeP-.js +1 -0
- package/dist/client/assets/{monitoring-stats-row-94Mta4Nq.js → monitoring-stats-row-Bhxzz0Gz.js} +1 -1
- package/dist/client/assets/{multi-select-CmbGOwtN.js → multi-select-DtSzZ5RJ.js} +1 -1
- package/dist/client/assets/{mustache-Aw4qvxEW.js → mustache-BxPGtFxk.js} +1 -1
- package/dist/client/assets/{new-project-dialog-ShudNZIG.js → new-project-dialog-DpHJ0D5s.js} +1 -1
- package/dist/client/assets/{oauth-callback-CuZCWVkp.js → oauth-callback-ChXsONZm.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DQtTsT-Q.js → oauth-callback-ai-provider-BnJfOlsF.js} +1 -1
- package/dist/client/assets/{onboarding-BYvWDC_s.js → onboarding-CuSBfoiA.js} +1 -1
- package/dist/client/assets/{openai-conversation-DgaJVito.js → openai-conversation-B0QRsRtq.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-CKzSSiC-.js → optimistic-project-sidebar-views-Cgq6MsN2.js} +1 -1
- package/dist/client/assets/{order-monitor-day-CIHUt3pK.js → order-monitor-day-BHpHKh9K.js} +1 -1
- package/dist/client/assets/{organization-choice-D_5aYbIz.js → organization-choice-hoXHHizl.js} +1 -1
- package/dist/client/assets/{orgs-CN3Yh6bp.js → orgs-CsgsGgsX.js} +1 -1
- package/dist/client/assets/{page-seo-form-CnjlIIXj.js → page-seo-form-PX_1VQkb.js} +1 -1
- package/dist/client/assets/{pair-Cn70Tm81.js → pair-5gOZrfkD.js} +1 -1
- package/dist/client/assets/plan-BnqYpKp5.js +1 -0
- package/dist/client/assets/{plan-ladder-D5aCNSRy.js → plan-ladder-BydnH1hR.js} +1 -1
- package/dist/client/assets/{popover-CVCbWisj.js → popover-DSRFfUdL.js} +1 -1
- package/dist/client/assets/{post-calendar-Dq_uFQwi.js → post-calendar-D_8Ms9Cq.js} +1 -1
- package/dist/client/assets/{post-editor-DPLEIDHY.js → post-editor-lU8h7ku9.js} +1 -1
- package/dist/client/assets/{preview-content-Bin2hNFJ.js → preview-content-hWNiqB3L.js} +1 -1
- package/dist/client/assets/{preview-dialog-Fls4giAH.js → preview-dialog-HJF1l34b.js} +1 -1
- package/dist/client/assets/{preview-panel-BPPH_1cI.js → preview-panel-PigPEt4W.js} +1 -1
- package/dist/client/assets/{preview-tab-BHT_7Qja.js → preview-tab-B-uX9H3E.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-p0Ic9l9I.js → product-picker-dialog-BUcziHgK.js} +1 -1
- package/dist/client/assets/{profile-BZA6I0p4.js → profile-D-LHzn9e.js} +1 -1
- package/dist/client/assets/{project-app-view-B2uzp3zO.js → project-app-view-CGbP48WX.js} +1 -1
- package/dist/client/assets/{project-apps-v-sauknl.js → project-apps-CajNRGrz.js} +1 -1
- package/dist/client/assets/{project-feed-CxXgvjMu.js → project-feed-uKBIzmIi.js} +1 -1
- package/dist/client/assets/{project-icon-Dy5ndHVf.js → project-icon-njec1yh1.js} +1 -1
- package/dist/client/assets/project-reports-BwZ6fxIs.js +1 -0
- package/dist/client/assets/project-tasks-zYigtiRn.js +1 -0
- package/dist/client/assets/{projects-6tFWscR3.js → projects-OJnagyMB.js} +1 -1
- package/dist/client/assets/{projects-empty-state-B25sfM8y.js → projects-empty-state-C9IhB7We.js} +1 -1
- package/dist/client/assets/{prompts-C8y9cYvX.js → prompts-B590L6x_.js} +1 -1
- package/dist/client/assets/record-editor-BxllIkC_.js +1 -0
- package/dist/client/assets/{redirect-editor-DQhKbdsA.js → redirect-editor-CTLxiYxe.js} +1 -1
- package/dist/client/assets/reports-CJqSx9sD.js +1 -0
- package/dist/client/assets/{reports-DZf5GwgJ.js → reports-DBL7SnEu.js} +1 -1
- package/dist/client/assets/{reports-onboarding-Ba6c9nYx.js → reports-onboarding-Be9p494r.js} +1 -1
- package/dist/client/assets/{reports-tab-aEhqa7te.js → reports-tab-B0M7UKAQ.js} +2 -2
- package/dist/client/assets/{repositories-D_HBag21.js → repositories-BEFfDE3p.js} +1 -1
- package/dist/client/assets/repositories-DceuH_GA.js +1 -0
- package/dist/client/assets/{repository-binding-B-JblZ3B.js → repository-binding-BLgLcT4o.js} +1 -1
- package/dist/client/assets/{repository-import-picker-Aq7ItYog.js → repository-import-picker-lphgZTGu.js} +1 -1
- package/dist/client/assets/{repository-picker-CigkRPj6.js → repository-picker-Dadd-3sc.js} +1 -1
- package/dist/client/assets/{require-capability-fF33BjRE.js → require-capability-D4hkdMxt.js} +1 -1
- package/dist/client/assets/{required-auth-layout-n4GqwjUS.js → required-auth-layout-e3_y0Tns.js} +1 -1
- package/dist/client/assets/{reset-password-FYcr_EOZ.js → reset-password-DPAO5WIu.js} +1 -1
- package/dist/client/assets/{resizable-B1jyEV0m.js → resizable-D4wP3vt7.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-DtNff2Yq.js → resolve-tab-icon-CE5OwNrK.js} +1 -1
- package/dist/client/assets/{review-settings-w0gSi3zN.js → review-settings-BJK_0aY-.js} +1 -1
- package/dist/client/assets/{roles-CD7KBus5.js → roles-CJ569tPn.js} +1 -1
- package/dist/client/assets/{route-P4X0mipC.js → route-Bzf1UEGL.js} +1 -1
- package/dist/client/assets/route-CG_vDQP9.js +1 -0
- package/dist/client/assets/{route-D9eWdPea.js → route-Dfqmjwjm.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-Cyz-VR-q.js → sandbox-lifecycle-context-v9W7lV1M.js} +1 -1
- package/dist/client/assets/{schema-DTqdooJM.js → schema-BdFq22Hl.js} +1 -1
- package/dist/client/assets/{schema-Jt-SHSRj.js → schema-Cx9ZLa-H.js} +1 -1
- package/dist/client/assets/{scroll-area-DowOzl5a.js → scroll-area-Bnrys5oj.js} +1 -1
- package/dist/client/assets/{search-input-C77c23a_.js → search-input-CXQLMhKZ.js} +1 -1
- package/dist/client/assets/{search-toggle-BqUvwbnO.js → search-toggle-DxUZFRWy.js} +1 -1
- package/dist/client/assets/{secret-ciphertext-CI3Fu2ro.js → secret-ciphertext-DZr2qcb4.js} +1 -1
- package/dist/client/assets/{secret-picker-D6q2PbZG.js → secret-picker-HHgZv9y6.js} +1 -1
- package/dist/client/assets/{secrets-C6FiSzJz.js → secrets-Cm2ZaKef.js} +1 -1
- package/dist/client/assets/{sections-uFSvOb1s.js → sections-DT5ozPKC.js} +1 -1
- package/dist/client/assets/{sections-editor-BgMrH8fq.js → sections-editor-CkId24Js.js} +1 -1
- package/dist/client/assets/{select-B47VUguS.js → select-CSQbGY9x.js} +1 -1
- package/dist/client/assets/{select-model-B0eE99E3.js → select-model-NUb0C_oX.js} +1 -1
- package/dist/client/assets/{seo-editor-C-YMij5b.js → seo-editor-D886xssW.js} +1 -1
- package/dist/client/assets/{separator-tMi_6w_o.js → separator-CjiQChVR.js} +1 -1
- package/dist/client/assets/settings-tab-BmEKDSFe.js +1 -0
- package/dist/client/assets/{sheet-R9Pr50Sb.js → sheet-C-yunzji.js} +1 -1
- package/dist/client/assets/{shell-layout-DNfiem0_.js → shell-layout-vQvYndIW.js} +1 -1
- package/dist/client/assets/site-editor-1ZGqBXbh.js +1 -0
- package/dist/client/assets/{site-editor-toast-L4A-Cxh7.js → site-editor-toast-BtFL0E4q.js} +1 -1
- package/dist/client/assets/{skills-DTPuV4HK.js → skills-9HRxIPqn.js} +1 -1
- package/dist/client/assets/{slider-B9iKqweT.js → slider-DB0IY-tO.js} +1 -1
- package/dist/client/assets/{sortable.esm-7lfZBBX2.js → sortable.esm-C1zl1f3P.js} +1 -1
- package/dist/client/assets/{sso-lvoln_ad.js → sso-PqsQn3xP.js} +1 -1
- package/dist/client/assets/{suggestion-D_Z3LuMt.js → suggestion-Wgq7DDQo.js} +1 -1
- package/dist/client/assets/{switch-BQFbXMA-.js → switch-DYA2xfHU.js} +1 -1
- package/dist/client/assets/{symbol-CIh5AfyD.js → symbol-B8wQ7lKk.js} +1 -1
- package/dist/client/assets/{synced-repos-DQxi8k5O.js → synced-repos-mXhCt1sQ.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-B2rDBqdy.js → tab-icon-glyph-BpaLtZlY.js} +1 -1
- package/dist/client/assets/{table-DuCeyVXY.js → table-BQLxO2Sb.js} +1 -1
- package/dist/client/assets/{tabs-CJ70csAp.js → tabs-2NCCfhSA.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-vyXzgPAK.js → task-assignee-avatar-FdiZZP36.js} +1 -1
- package/dist/client/assets/{task-board-CSpxMIw7.js → task-board-DRNr9Dsj.js} +1 -1
- package/dist/client/assets/{task-route-CeJ19bNy.js → task-route-BaANwBST.js} +1 -1
- package/dist/client/assets/{task-status-CFz3dyVR.js → task-status-VcYcBtq_.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-CfseXo9_.js → taskboard-analytics-RJkelUr8.js} +1 -1
- package/dist/client/assets/{tasks-C3liOhO2.js → tasks-COZY0QCJ.js} +1 -1
- package/dist/client/assets/tasks-CYZeHeAX.js +1 -0
- package/dist/client/assets/{textarea-BDWvYouR.js → textarea-CxhXyMKI.js} +1 -1
- package/dist/client/assets/{thread-analytics-Bp5Zz9ej.js → thread-analytics-BGQNbVS2.js} +1 -1
- package/dist/client/assets/{thread-intent-DlbBEzNn.js → thread-intent-DKuqiaG7.js} +1 -1
- package/dist/client/assets/{thread-route-DsRsjMOv.js → thread-route-CQ0phZyI.js} +1 -1
- package/dist/client/assets/{thread-route-glK7AgQo.js → thread-route-jNELZX1N.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BW8H1wdb.js → thread-sheet-body-Cdv_wHnA.js} +1 -1
- package/dist/client/assets/{time-range-picker-Dm5YljWh.js → time-range-picker-DEciYFPf.js} +1 -1
- package/dist/client/assets/{toggle-group-CtPF-F41.js → toggle-group-CtdhsZGp.js} +1 -1
- package/dist/client/assets/{tool-namespace-FeAXQzXg.js → tool-namespace-DTl3so75.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CTGjpqPD.js → toolbar-icon-button-BPY5dUh9.js} +1 -1
- package/dist/client/assets/{tooltip-BqHx2R4U.js → tooltip-B5RmO6BW.js} +1 -1
- package/dist/client/assets/{tooltipContext-DFq6ns9J.js → tooltipContext-C93Q6WFf.js} +1 -1
- package/dist/client/assets/{track-vnmuUrPF.js → track-BBpplM-4.js} +1 -1
- package/dist/client/assets/{types-Cj3BjtjJ.js → types-Bt5yyj-z.js} +1 -1
- package/dist/client/assets/{url-slug-DfovzTSP.js → url-slug-B41xLFy_.js} +1 -1
- package/dist/client/assets/{usage-stats-DcyLnEOC.js → usage-stats-BkcKNXzu.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DugUJNG4.js → use-ai-providers-D1TJRnIR.js} +1 -1
- package/dist/client/assets/{use-automations-Dhy5bAQi.js → use-automations-B9eI7BBQ.js} +1 -1
- package/dist/client/assets/{use-autosave-BKifxWxQ.js → use-autosave-D3uy94Wi.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-CqPKeLYn.js → use-chat-layout-state-BNudmQ0u.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CbuQEbGd.js → use-clock-tick-D3FoyBXt.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BBUs22Yl.js → use-connect-companion-BLomLbPK.js} +1 -1
- package/dist/client/assets/{use-connection-Dj54skEw.js → use-connection-BwU_KLSF.js} +1 -1
- package/dist/client/assets/{use-content-sync-D4PHTEJr.js → use-content-sync-BgOMBs5q.js} +1 -1
- package/dist/client/assets/{use-copy-K9rQ1PJH.js → use-copy-d7X6hrKI.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-C4gtrY2f.js → use-create-virtual-mcp-OUIvni0u.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-CEVf4Ifn.js → use-date-fns-locale-BuGEMgXR.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-D0TGgFvB.js → use-debounced-autosave-KHVF-MyQ.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CDunmz6Z.js → use-debounced-value-DJkh4QSx.js} +1 -1
- package/dist/client/assets/{use-deco-credits-orVqTX6I.js → use-deco-credits-Dx8wT8P5.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-TumByBkr.js → use-decopilot-events-AlKmmETJ.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BllZSjRL.js → use-delete-connection-BQjQHz64.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BBVz6SL_.js → use-deployment-admin-BIA7CHLS.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-6p2QJIdt.js → use-fast-preview-draft-url-5oeXM-kY.js} +1 -1
- package/dist/client/assets/{use-file-configs-BFq_wpSt.js → use-file-configs-tsH4be9V.js} +1 -1
- package/dist/client/assets/{use-inbox-feed--WBiu__i.js → use-inbox-feed-bGge9UaE.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-7dT9x3fg.js → use-infinite-scroll-BO0n6TVn.js} +1 -1
- package/dist/client/assets/{use-join-requests-ilYuD6XT.js → use-join-requests-DqhkfI-R.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-kHysLFoZ.js → use-main-panel-tabs-BrJK-bL3.js} +1 -1
- package/dist/client/assets/{use-main-schema-v8-Dcb6Yskn.js → use-main-schema-v8-CZLsOlEV.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-2A9iou5g.js → use-mcp-auth-status-DmZSbEuf.js} +1 -1
- package/dist/client/assets/{use-mcp-client-ZokR8_74.js → use-mcp-client-MRThuZpK.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-JJb6q8dH.js → use-mcp-prompts-DHm-ZTib.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BwuN38Gh.js → use-mcp-tools-DiCKzhUm.js} +1 -1
- package/dist/client/assets/{use-members-CzSQTDAS.js → use-members-h3MYd8gX.js} +1 -1
- package/dist/client/assets/{use-mobile-BfmJV4wy.js → use-mobile-DCpa1RnA.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-D05JNc-L.js → use-navigate-to-agent-Bt0oZ-ou.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-pmLoKOyH.js → use-open-billing-url-B2NuYLXS.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-fPRUht_a.js → use-org-auth-client-CL0a2tPL.js} +1 -1
- package/dist/client/assets/{use-org-fs-D82Vx4hB.js → use-org-fs-D_4Q985K.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CD8TZnkH.js → use-org-repo-syncs-CC0BNhdO.js} +1 -1
- package/dist/client/assets/{use-org-sso-ClJ8vn5f.js → use-org-sso-LC63-uuA.js} +1 -1
- package/dist/client/assets/{use-organization-roles-iaQivkLI.js → use-organization-roles-D1Q7317o.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DFkNTsS0.js → use-organization-settings-DhvN44pQ.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-K8ACrPML.js → use-panel-navigate-DoD4Atgz.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-DJiBua9F.js → use-project-native-view-presence-DF_1PP5b.js} +1 -1
- package/dist/client/assets/{use-project-scope-CGMALc0e.js → use-project-scope-Cq4vb2Sy.js} +1 -1
- package/dist/client/assets/{use-recent-apps-C1945uiL.js → use-recent-apps-CeIVmzp8.js} +1 -1
- package/dist/client/assets/{use-releases-D15mHXXN.js → use-releases-DQ--CsAF.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BdbGTuns.js → use-reports-diagnostic-CWir9L_Y.js} +1 -1
- package/dist/client/assets/{use-secrets-DbkATagb.js → use-secrets-D6tUoaJC.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-De54Y3vh.js → use-section-preview-base-Ca45yoz9.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-BqLmDXCH.js → use-sidebar-collapsed-DPHQfMII.js} +1 -1
- package/dist/client/assets/{use-tags-Cn5U7HDa.js → use-tags-DE48pnzl.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CftsNPjL.js → use-task-board-analytics-DlTk43Uu.js} +1 -1
- package/dist/client/assets/{use-task-board-events-BDk-u9KA.js → use-task-board-events-CSRq29Tm.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CNMGpOwt.js → use-task-board-item-prs-BsxjjcBf.js} +1 -1
- package/dist/client/assets/{use-task-metadata-0ueqwOxI.js → use-task-metadata-ToXrxOCT.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-CgQGRl3S.js → use-thread-analytics-Bu_i1v9r.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DLitie4Q.js → use-thread-outputs-jyAHyZHI.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-ZoWXsJcj.js +1 -0
- package/dist/client/assets/{useQueries-BfkCTicr.js → useQueries-CddGJ3VE.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D2W70ffp.js +1 -0
- package/dist/client/assets/{users-BIkPJzOg.js → users-2guAvf9G.js} +1 -1
- package/dist/client/assets/{utils-Bp3fKbm9.js → utils-DzhKsxx8.js} +1 -1
- package/dist/client/assets/{variant-calendar-BIblXEHb.js → variant-calendar-Bdj0O-mA.js} +1 -1
- package/dist/client/assets/{variant-draft-pointer-fs9iIwvq.js → variant-draft-pointer-_apEPqxm.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CeCtCq_o.js → virtual-mcp-CMZ8dHEU.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-CrLAsZHh.js → watch-sse-pool-DwBbAQ97.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-DTwyyqho.js +0 -1
- package/dist/client/assets/agent-deck-DRCJIHES.js +0 -1
- package/dist/client/assets/agent-file-pM3fkLSV.js +0 -1
- package/dist/client/assets/agent-library-BF5T38g7.js +0 -1
- package/dist/client/assets/agent-library-file-BTDXrKvZ.js +0 -1
- package/dist/client/assets/agent-settings-9voN143W.js +0 -1
- package/dist/client/assets/agent-site-editor-code-DxTJ31bR.js +0 -2
- package/dist/client/assets/agent-site-editor-content-B8OXp1G1.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-Bu7A4U4r.js +0 -1
- package/dist/client/assets/agent-view-DW3bjKRU.js +0 -1
- package/dist/client/assets/api-keys-DPclIgvr.js +0 -1
- package/dist/client/assets/cms-settings-editor-Cowvog2q.js +0 -1
- package/dist/client/assets/library-DYD_N6_K.js +0 -1
- package/dist/client/assets/monitoring-CgqK6OeU.js +0 -1
- package/dist/client/assets/plan-ByMMI8KU.js +0 -1
- package/dist/client/assets/project-reports-CZJuTnYB.js +0 -1
- package/dist/client/assets/project-tasks-CGicoIeY.js +0 -1
- package/dist/client/assets/record-editor-Bh04Pm0_.js +0 -1
- package/dist/client/assets/reports-BupQ5Xhd.js +0 -1
- package/dist/client/assets/repositories-CEC-SgTJ.js +0 -1
- package/dist/client/assets/route-Co7AkL50.js +0 -1
- package/dist/client/assets/settings-tab-Cp5pryb2.js +0 -1
- package/dist/client/assets/site-editor-Dsm_SPF7.js +0 -1
- package/dist/client/assets/tasks-DrfrXIxf.js +0 -1
- package/dist/client/assets/useInfiniteQuery-B7za82zu.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B0JY_wMj.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as A,a2 as ae,a as pe,an as Pe,K as fe,m as me,b as K,r as B,l as se,j as n,h as ve,B as qe,aL as je,aK as Ie,H as pt,y as he,v as Wt,aM as Yt,s as Zt,q as Qt,D as Xt,aN as Jt,au as xt,t as es,av as ts,d as Me,n as st,aO as ss,f as Se,M as nt,aa as ns,k as gt,e as as,u as Ae,aP as rs,aQ as is,O as bt,aR as ls,N as os,P as De}from"./index-DcU2uHG-.js";import{i as We}from"./AlertCircle-xI8XX-bi.js";import{F as cs,G as at,A as ye,H as ds,I as us,j as fs,J as ms,K as hs,L as ps,M as vt,N as xs,n as gs,k as bs,m as vs}from"./agent-icon-c0hRUHIU.js";import{c as ys}from"./use-sidebar-collapsed-BqLmDXCH.js";import{T as _e}from"./toolbar-icon-button-CTGjpqPD.js";import{C as W,w as js,S as Ss}from"./index-_y92DzgS.js";import{s as yt,C as ks,u as Ns,a as jt,V as Ts,b as _s}from"./input-pg_Munw1.js";import{u as Le,b as Ye,c as $e,d as St,e as ws,s as Cs}from"./chat-context-BnuwMOfj.js";import{u as Ps,s as kt}from"./use-ai-providers-DugUJNG4.js";import{b as Nt,a as Is,u as Ms}from"./use-organization-settings-DFkNTsS0.js";import{i as As}from"./CheckCircle-D30wPP6A.js";import{s as rt}from"./XClose-CdzjyNb0.js";import{a as Ee,b as Ls,c as Tt,g as _t}from"./repository-binding-B-JblZ3B.js";import{I as wt}from"./integration-icon-aeIvRSnw.js";import{c as $s}from"./use-decopilot-events-TumByBkr.js";import{t as Ze}from"./ChevronUp-CFN68hLk.js";import{O as Es}from"./pair-Cn70Tm81.js";import{u as Fs,a as Rs}from"./use-thread-outputs-DLitie4Q.js";import{u as Os}from"./use-deco-credits-orVqTX6I.js";import{a as Qe,f as Bs,L as Ds,s as zs,b as Gs}from"./shell-layout-DNfiem0_.js";import{a as Hs}from"./use-main-schema-v8-Dcb6Yskn.js";import{g as Ct,u as Vs,n as Ks,a as Us}from"./use-releases-D15mHXXN.js";import{u as qs,d as Pt,a as Xe,b as Je,c as It,e as Ws}from"./thread-intent-DlbBEzNn.js";import{f as Ys,c as Mt,d as Zs}from"./use-navigate-to-agent-D05JNc-L.js";import{o as Qs,s as Xs,u as Js,S as en}from"./sandbox-lifecycle-context-Cyz-VR-q.js";import{E as At}from"./empty-state-B1xpK558.js";import{t as tn,m as sn,u as nn}from"./use-chat-layout-state-CqPKeLYn.js";import{C as it}from"./index-CXeJCI0G.js";import{a as Lt,b as $t,P as Et}from"./popover-CVCbWisj.js";import{T as Fe,a as Re,c as Oe}from"./tooltip-BqHx2R4U.js";import{T as an,a as rn}from"./toggle-group-CtPF-F41.js";import{u as Ft,a as et,r as ln,b as Rt,c as on,d as cn}from"./thread-route-DsRsjMOv.js";import{c as dn,C as un,a as fn,b as mn,e as hn,d as pn}from"./command-DQxPvzO0.js";import{i as Ot}from"./ZoomOut-B55seUHX.js";import{g as xn,S as gn}from"./task-status-CFz3dyVR.js";import{a as bn}from"./format-time-Cq80KKvY.js";import{u as vn}from"./use-clock-tick-CbuQEbGd.js";import{a as Bt,u as yn}from"./use-panel-navigate-K8ACrPML.js";import{u as Dt}from"./use-main-panel-tabs-kHysLFoZ.js";import{T as we}from"./tab-icon-glyph-B2rDBqdy.js";import{a as jn}from"./UserSquare-DJngEPjS.js";import{b as Sn,c as zt,S as kn,d as Nn}from"./select-B47VUguS.js";import{L as Tn}from"./project-apps-v-sauknl.js";import{L as tt,a as _n}from"./legacy-main-redirect-BdnJuiDi.js";import{u as wn}from"./use-mobile-BfmJV4wy.js";import{L as Cn}from"./preview-dialog-Fls4giAH.js";import{O as Pn}from"./markdown-1PeXOKNt.js";import{B as lt}from"./blocks-preview-workspace-context-FfAtB7Mh.js";import{p as In}from"./virtual-mcp-CeCtCq_o.js";import"./Tool01-BGL2Qt57.js";import"./ArrowUp-Cq3iZIwL.js";import"./ArrowLeft-BKYzlDQY.js";import"./LinkBroken01-ZRquEJUl.js";import"./ShoppingBag01-DAjyOiiw.js";import"./Building02-C9KWPxlH.js";import"./ChevronSelectorVertical-CknWVrzo.js";import"./Copy01-C73PJJxr.js";import"./CreditCard01-C8DlQ7Ge.js";import"./DotsVertical-BvyfZIer.js";import"./Image01-DowwsvYG.js";import"./Globe04-CVLAzwjm.js";import"./SwitchHorizontal01-CESO3nxl.js";import"./Key01-rbnGMz2E.js";import"./Link01-DRsKyIm5.js";import"./Minus-DPDq6KAA.js";import"./Monitor01-DMME8GIo.js";import"./Sun-BqmeoxcG.js";import"./Play-c6bc1b3-.js";import"./Plus-xabrshQG.js";import"./SearchMd-BODiv7c9.js";import"./Trash01-Cf6bGuCZ.js";import"./Upload01-ZLE7vfB9.js";import"./User01-Cfg0yVvz.js";import"./Users01-vn3EOu8A.js";import"./sheet-R9Pr50Sb.js";import"./sandbox-url-D3mC8qhT.js";import"./backoff-CrEUbyZT.js";import"./tool-namespace-FeAXQzXg.js";import"./drawer-CEiS53oX.js";import"./collection-search-C0nHL4Zi.js";import"./use-mcp-client-ZokR8_74.js";import"./auth-CJCUdDnK.js";import"./use-mcp-prompts-JJb6q8dH.js";import"./usage-stats-DcyLnEOC.js";import"./form-Bdh0vUeg.js";import"./label-DDPD5LQh.js";import"./utils-CVEq3hMx.js";import"./use-copy-K9rQ1PJH.js";import"./index-De44zW_k.js";import"./checkbox-Dla8kRWj.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-CVrfZDpI.js";import"./feature-paywall-DINMFUUx.js";import"./plan-ladder-D5aCNSRy.js";import"./icon-button-Dg2jSe-y.js";import"./file-type-icon-Ez8-DRHg.js";import"./location-V0VwTJTt.js";import"./autosend-BiXCzDoT.js";import"./chat-draft-D3EwPWFD.js";import"./tabs-CJ70csAp.js";import"./active-indicator-CCMhAsc_.js";import"./use-open-billing-url-pmLoKOyH.js";import"./input-HXHaYrka.js";import"./suggestion-D_Z3LuMt.js";import"./use-org-fs-D82Vx4hB.js";import"./useInfiniteQuery-B7za82zu.js";import"./infiniteQueryObserver-P7ZNg4ZF.js";import"./question-004-sINsf4GQ.js";import"./use-members-CzSQTDAS.js";import"./use-org-auth-client-fPRUht_a.js";import"./add-connection-dialog-O4xCe9BP.js";import"./extract-connection-data-CUvLfXNU.js";import"./metadata-D72DunRR.js";import"./connection-B5x-rxzp.js";import"./url-slug-DfovzTSP.js";import"./connection-card-CFqu0_G8.js";import"./connection-slug-CITJ0kGN.js";import"./slugify-CEUa2lfQ.js";import"./textarea-BDWvYouR.js";import"./use-connection-Dj54skEw.js";import"./schema-Jt-SHSRj.js";import"./connection-form-helpers-CouK82td.js";import"./authenticate-and-persist-oauth-D7W1mkzH.js";import"./mcp-oauth-xBzZujQ_.js";import"./mcp-oauth-DP6VNnFQ.js";import"./collection-tabs-DJst1PBn.js";import"./badge-ByzdbptS.js";import"./use-infinite-scroll-7dT9x3fg.js";import"./useSuspenseInfiniteQuery-B0JY_wMj.js";import"./use-task-board-events-BDk-u9KA.js";import"./task-board-CSpxMIw7.js";import"./schema-DTqdooJM.js";import"./watch-sse-pool-CrLAsZHh.js";import"./collapsible-BWjY8cOG.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DTPlWHGT.js";import"./types-Cj3BjtjJ.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-project-scope-CGMALc0e.js";import"./project-icon-Dy5ndHVf.js";import"./new-project-dialog-ShudNZIG.js";import"./repository-import-picker-Aq7ItYog.js";import"./repository-picker-CigkRPj6.js";import"./use-debounced-value-CDunmz6Z.js";import"./required-auth-layout-n4GqwjUS.js";import"./use-org-sso-ClJ8vn5f.js";import"./serial-task-queue-CGOeQgpr.js";import"./delay-CnY5UFtP.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resizable-B1jyEV0m.js";import"./index-WjQsIrkp.js";import"./index-DxbCP5B6.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-tools-BwuN38Gh.js";import"./resolve-tab-icon-DtNff2Yq.js";import"./use-task-metadata-0ueqwOxI.js";import"./preview-source-BsRLGWUP.js";import"./use-project-native-view-presence-DJiBua9F.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-BFq_wpSt.js";import"./site-slug-DebpOoQq.js";import"./index-BdQq_4o_.js";import"./preview-content-Bin2hNFJ.js";import"./file-share-button-BIOHr9Xv.js";import"./file-preview-BFXgyqHl.js";import"./utils-Bp3fKbm9.js";import"./editor-DWhRi1_f.js";function Mn({isThreadLocked:t,hasCloudProviderKeys:e,sandboxOnlyChats:s,canRunClaudeCode:r}){return t?null:!e&&!(s&&r)?"provider":s&&!r?"claude-code-provider":null}function An(){const t=A.c(26),e=Ps(),s=Le(),r=Nt(),i=Is("chat_harness_codex"),{org:a}=ae(),{data:o}=pe.useSession(),c=o?.user.id??"",u=Pe(),l=e.some($n);let d;t[0]!==a.id||t[1]!==c?(d=fe.claudeSubscription(a.id,c),t[0]=a.id,t[1]=c,t[2]=d):d=t[2];let m;t[3]!==u?(m=()=>u.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=u,t[4]=m):m=t[4];const f=r&&!i&&!l;let h;t[5]!==d||t[6]!==m||t[7]!==f?(h={queryKey:d,queryFn:m,enabled:f},t[5]=d,t[6]=m,t[7]=f,t[8]=h):h=t[8];const j=me(h);let y;t[9]!==a.id?(y=fe.githubCopilot(a.id),t[9]=a.id,t[10]=y):y=t[10];let v;t[11]!==u?(v=()=>u.call("GITHUB_COPILOT_STATUS",{}),t[11]=u,t[12]=v):v=t[12];const x=r&&!i&&!l;let g;t[13]!==y||t[14]!==v||t[15]!==x?(g={queryKey:y,queryFn:v,enabled:x},t[13]=y,t[14]=v,t[15]=x,t[16]=g):g=t[16];const b=me(g);let S;t[17]!==a.id||t[18]!==c?(S=fe.codexSubscription(a.id,c),t[17]=a.id,t[18]=c,t[19]=S):S=t[19];let p;t[20]!==u?(p=()=>u.call("CODEX_SUBSCRIPTION_STATUS",{}),t[20]=u,t[21]=p):p=t[21];const k=r&&i;let T;t[22]!==k||t[23]!==S||t[24]!==p?(T={queryKey:S,queryFn:p,enabled:k},t[22]=k,t[23]=S,t[24]=p,t[25]=T):T=t[25];const N=me(T);return r&&i&&!s?.isThreadLocked?e.some(Ln)||N.data?.connected!==!1?null:"codex-provider":Mn({isThreadLocked:s?.isThreadLocked??!1,hasCloudProviderKeys:e.length>0,sandboxOnlyChats:r,canRunClaudeCode:l||j.data?.connected!==!1||b.data?.connected!==!1||!!b.data?.orgShare})}function Ln(t){return yt(t.providerId)}function $n(t){return kt(t.providerId)}function be(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function ze(t){if(!t)return"—";const e=typeof t=="string"?new Date(t):t;return isNaN(e.getTime())?"—":e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function En(t){return t?t.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function Fn(t){const e=A.c(4),{items:s}=t;let r;e[0]!==s?(r=s.map(Rn),e[0]=s,e[1]=r):r=e[1];let i;return e[2]!==r?(i=n.jsx("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6",children:r}),e[2]=r,e[3]=i):i=e[3],i}function Rn(t){return n.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.label}),n.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:t.value})]},t.label)}function On(t){const e=A.c(33),{userTokens:s,assistantTokens:r,otherTokens:i}=t,a=K(),o=s+r+i,c=o>0?s/o*100:0,u=o>0?r/o*100:0,l=o>0?i/o*100:0;let d;e[0]!==c?(d=c>0&&n.jsx("div",{className:"h-full bg-chart-1",style:{width:`${c}%`}}),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==u?(m=u>0&&n.jsx("div",{className:"h-full bg-chart-2",style:{width:`${u}%`}}),e[2]=u,e[3]=m):m=e[3];let f;e[4]!==l?(f=l>0&&n.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${l}%`}}),e[4]=l,e[5]=f):f=e[5];let h;e[6]!==d||e[7]!==m||e[8]!==f?(h=n.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[d,m,f]}),e[6]=d,e[7]=m,e[8]=f,e[9]=h):h=e[9];let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=j):j=e[10];let y;e[11]!==a||e[12]!==c?(y=a("chat.contextPanel.userPercent",{pct:c.toFixed(1)}),e[11]=a,e[12]=c,e[13]=y):y=e[13];let v;e[14]!==y?(v=n.jsxs("div",{className:"flex items-center gap-1.5",children:[j,n.jsx("span",{className:"text-xs text-muted-foreground",children:y})]}),e[14]=y,e[15]=v):v=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[16]=x):x=e[16];let g;e[17]!==u||e[18]!==a?(g=a("chat.contextPanel.assistantPercent",{pct:u.toFixed(1)}),e[17]=u,e[18]=a,e[19]=g):g=e[19];let b;e[20]!==g?(b=n.jsxs("div",{className:"flex items-center gap-1.5",children:[x,n.jsx("span",{className:"text-xs text-muted-foreground",children:g})]}),e[20]=g,e[21]=b):b=e[21];let S;e[22]!==l||e[23]!==i||e[24]!==a?(S=i>0&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.otherPercent",{pct:l.toFixed(1)})})]}),e[22]=l,e[23]=i,e[24]=a,e[25]=S):S=e[25];let p;e[26]!==b||e[27]!==S||e[28]!==v?(p=n.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[v,b,S]}),e[26]=b,e[27]=S,e[28]=v,e[29]=p):p=e[29];let k;return e[30]!==p||e[31]!==h?(k=n.jsxs("div",{className:"flex flex-col gap-2",children:[h,p]}),e[30]=p,e[31]=h,e[32]=k):k=e[32],k}function Bn(t){const e=A.c(14),{agentId:s,isError:r}=t,i=Ee(s),a=K();let o;e[0]!==i?.title||e[1]!==a?(o=i?.title??a("chat.subtask.subtaskNoun"),e[0]=i?.title,e[1]=a,e[2]=o):o=e[2];const c=o,u=i?.icon??null;let l;e[3]!==u||e[4]!==c?(l=n.jsx(wt,{icon:u,name:c,size:"xs",className:"size-6 rounded-md shrink-0"}),e[3]=u,e[4]=c,e[5]=l):l=e[5];const d=r?"text-destructive":"text-foreground";let m;e[6]!==d?(m=se("shrink-0 font-medium",d),e[6]=d,e[7]=m):m=e[7];let f;e[8]!==c||e[9]!==m?(f=n.jsx("span",{className:m,children:c}),e[8]=c,e[9]=m,e[10]=f):f=e[10];let h;return e[11]!==l||e[12]!==f?(h=n.jsxs(n.Fragment,{children:[l,f]}),e[11]=l,e[12]=f,e[13]=h):h=e[13],h}function Dn(t){const e=A.c(12),{isError:s}=t,r=K();let i;e[0]!==r?(i=r("chat.contextPanel.subtask"),e[0]=r,e[1]=i):i=e[1];const a=i;let o;e[2]!==a?(o=n.jsx(wt,{icon:null,name:a,size:"xs",className:"size-6 rounded-md shrink-0"}),e[2]=a,e[3]=o):o=e[3];const c=s?"text-destructive":"text-foreground";let u;e[4]!==c?(u=se("shrink-0 font-medium",c),e[4]=c,e[5]=u):u=e[5];let l;e[6]!==a||e[7]!==u?(l=n.jsx("span",{className:u,children:a}),e[6]=a,e[7]=u,e[8]=l):l=e[8];let d;return e[9]!==o||e[10]!==l?(d=n.jsxs(n.Fragment,{children:[o,l]}),e[9]=o,e[10]=l,e[11]=d):d=e[11],d}function zn(t){const e=A.c(18),{part:s}=t,r=s.input?.agent_id,i=s.state==="input-streaming"||s.state==="input-available"||s.state==="output-available"&&s.preliminary===!0,a=s.state==="output-error",o=s.state==="approval-requested";let c;e[0]!==a?(c=n.jsx(Dn,{isError:a}),e[0]=a,e[1]=c):c=e[1];let u;e[2]!==r||e[3]!==a?(u=n.jsx(Bn,{agentId:r,isError:a}),e[2]=r,e[3]=a,e[4]=u):u=e[4];let l;e[5]!==c||e[6]!==u?(l=n.jsx(B.Suspense,{fallback:c,children:u}),e[5]=c,e[6]=u,e[7]=l):l=e[7];let d;e[8]!==s.input?(d=s.input?.prompt&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted-foreground/50",children:"·"}),n.jsx("span",{className:"truncate text-muted-foreground",children:s.input.prompt})]}),e[8]=s.input,e[9]=d):d=e[9];let m;e[10]!==o||e[11]!==a||e[12]!==i?(m=n.jsx("span",{className:"ml-auto shrink-0",children:i?n.jsx(ve,{className:"size-3 text-muted-foreground"}):a?n.jsx(cs,{size:12,className:"text-destructive"}):o?n.jsx(We,{size:12,className:"text-warning"}):n.jsx(As,{size:12,className:"text-success"})}),e[10]=o,e[11]=a,e[12]=i,e[13]=m):m=e[13];let f;return e[14]!==l||e[15]!==d||e[16]!==m?(f=n.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[l,d,m]}),e[14]=l,e[15]=d,e[16]=m,e[17]=f):f=e[17],f}function Gn(t){const e=A.c(51),{onClose:s,back:r,className:i}=t,a=K(),[o,c]=B.useState(null),{messages:u}=Ye(),{activeTask:l}=$e(),{selectedModel:d,selectedVirtualMcp:m}=St(),f=ws(u),h=[...u].reverse().find(ea),j=h?.metadata?.usage,y=[...u].reverse().find(Jn)?.metadata?.models?.thinking,v=h?.metadata?.modelLimits?.contextWindow??(!y||y.id===d?.modelId?d?.limits?.contextWindow:null)??null,x=j?.contextTokens??0,g=v&&v>0?(x/v*100).toFixed(1):null,b=u;let S;e[0]!==b?(S=b.filter(Xn).reduce(Qn,0),e[0]=b,e[1]=S):S=e[1];const p=S,k=u;let T;e[2]!==k?(T=k.filter(Zn).reduce(Yn,0),e[2]=k,e[3]=T):T=e[3];const N=T,_=Math.max(0,f.totalTokens-p-N),w=u[0],I=u.at(-1),P=w?.metadata?.created_at??l?.created_at,L=I?.metadata?.created_at??l?.updated_at,$=u.filter(Wn),E=u.flatMap(Un),F=En(y?.id??d?.modelId),R=m?.title??"Super Agent",M=$s(),C=[{label:a("chat.contextPanel.sessionLabel"),value:l?.title??a("chat.contextPanel.newChat")},{label:a("chat.contextPanel.messagesLabel"),value:$.length},{label:a("chat.contextPanel.agentLabel"),value:R},...M?[{label:a("chat.contextPanel.modelLabel"),value:F}]:[],{label:a("chat.contextPanel.contextLimitLabel"),value:v?be(v):"—"},{label:a("chat.contextPanel.sessionTokensLabel"),value:f.totalTokens>0?be(f.totalTokens):"0"},{label:a("chat.contextPanel.usageLabel"),value:g!==null?`${g}%`:"—"},{label:a("chat.contextPanel.inputTokensLabel"),value:f.inputTokens>0?be(f.inputTokens):"0"},{label:a("chat.contextPanel.outputTokensLabel"),value:f.outputTokens>0?be(f.outputTokens):"0"},{label:a("chat.contextPanel.reasoningTokensLabel"),value:f.reasoningTokens>0?be(f.reasoningTokens):"0"},...M?[{label:a("chat.contextPanel.costLabel"),value:f.cost>0?`$${f.cost<.001?f.cost.toFixed(6):f.cost.toFixed(4)}`:"$0.00"}]:[],{label:a("chat.contextPanel.sessionCreatedLabel"),value:ze(P)},{label:a("chat.contextPanel.lastActivityLabel"),value:ze(L)}];if(!l&&$.length===0){let D;e[4]!==i?(D=se("flex flex-col h-full w-full border-l border-border bg-background",i),e[4]=i,e[5]=D):D=e[5];let re;e[6]!==a?(re=a("chat.contextPanel.title"),e[6]=a,e[7]=re):re=e[7];let X;e[8]!==re?(X=n.jsx("span",{className:"text-sm font-medium text-foreground",children:re}),e[8]=re,e[9]=X):X=e[9];let J;e[10]!==r?(J=r?n.jsx(at,{size:14,className:"text-muted-foreground"}):n.jsx(rt,{size:14,className:"text-muted-foreground"}),e[10]=r,e[11]=J):J=e[11];let ee;e[12]!==s||e[13]!==J?(ee=n.jsx("button",{type:"button",onClick:s,className:"flex size-6 items-center justify-center hover:bg-accent transition-colors rounded-lg",children:J}),e[12]=s,e[13]=J,e[14]=ee):ee=e[14];let ne;e[15]!==X||e[16]!==ee?(ne=n.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[X,ee]}),e[15]=X,e[16]=ee,e[17]=ne):ne=e[17];let ie;e[18]!==a?(ie=a("chat.contextPanel.emptyState"),e[18]=a,e[19]=ie):ie=e[19];let te;e[20]!==ie?(te=n.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:n.jsx("p",{className:"text-xs text-muted-foreground",children:ie})}),e[20]=ie,e[21]=te):te=e[21];let oe;return e[22]!==ne||e[23]!==te||e[24]!==D?(oe=n.jsxs("div",{className:D,children:[ne,te]}),e[22]=ne,e[23]=te,e[24]=D,e[25]=oe):oe=e[25],oe}let G;e[26]!==i?(G=se("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",i),e[26]=i,e[27]=G):G=e[27];let z;e[28]!==a?(z=a("chat.contextPanel.title"),e[28]=a,e[29]=z):z=e[29];let H;e[30]!==z?(H=n.jsx("span",{className:"text-sm font-medium text-foreground",children:z}),e[30]=z,e[31]=H):H=e[31];let O;e[32]!==r?(O=r?n.jsx(at,{className:"size-3.5"}):n.jsx(rt,{className:"size-3.5"}),e[32]=r,e[33]=O):O=e[33];let U;e[34]!==s||e[35]!==O?(U=n.jsx(qe,{type:"button",variant:"ghost",size:"icon-sm",onClick:s,className:"text-muted-foreground",children:O}),e[34]=s,e[35]=O,e[36]=U):U=e[36];let Z;e[37]!==H||e[38]!==U?(Z=n.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[H,U]}),e[37]=H,e[38]=U,e[39]=Z):Z=e[39];let Y;e[40]!==a?(Y=a("chat.contextPanel.contextBreakdownSection"),e[40]=a,e[41]=Y):Y=e[41];let Q;e[42]!==Y?(Q=n.jsx("span",{className:"text-xs text-muted-foreground",children:Y}),e[42]=Y,e[43]=Q):Q=e[43];let q;e[44]!==N||e[45]!==_||e[46]!==p?(q=n.jsx(On,{userTokens:p,assistantTokens:N,otherTokens:_}),e[44]=N,e[45]=_,e[46]=p,e[47]=q):q=e[47];let le;return e[48]!==Q||e[49]!==q?(le=n.jsxs("div",{className:"flex flex-col gap-3",children:[Q,q]}),e[48]=Q,e[49]=q,e[50]=le):le=e[50],n.jsxs("div",{className:G,children:[Z,n.jsxs("div",{className:"flex flex-col gap-8 p-6",children:[E.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.subtasksSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:E.map(Kn)})]}),n.jsx(Fn,{items:C}),le,$.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.rawMessagesSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:$.map(D=>{const re=D.metadata?.created_at,X=o?.id===D.id;return n.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[n.jsxs("button",{type:"button",onClick:()=>c(X?null:D),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent w-full text-left cursor-pointer",children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[n.jsx("span",{className:se("shrink-0 font-medium",D.role==="user"?"text-chart-1":"text-chart-2"),children:D.role}),n.jsx("span",{className:"text-muted-foreground",children:"•"}),n.jsx("span",{className:"truncate text-muted-foreground font-mono",children:D.id})]}),re&&n.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:ze(re)})]}),X&&n.jsxs(n.Fragment,{children:[D.role==="assistant"&&(()=>{const J=D.metadata?._request;if(!J)return null;const ee=J.systemSections??[],ne=Math.max(1,...ee.map(Vn)),ie=ee.reduce(Hn,0);return n.jsxs("div",{className:"border-t border-border/50 px-3 py-2.5 text-xs space-y-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"font-medium text-foreground",children:a("chat.contextPanel.requestLabel")}),n.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[J.activeTools??0," / ",J.tools??0," ",a("chat.contextPanel.toolsActive")]})]}),ee.length>0&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("div",{className:"text-muted-foreground",children:[a("chat.contextPanel.systemPromptLabel")," ",n.jsxs("span",{className:"tabular-nums",children:["~",Math.round(ie/4).toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),ee.map((te,oe)=>{const ce=te.preview.match(/^<([a-z-]+)/i)?.[1]??`section ${oe}`,xe=te.chars/ne*100,de=Math.round(te.chars/4);return n.jsxs("div",{className:"space-y-0.5",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("span",{className:"font-mono text-foreground truncate",children:ce}),n.jsxs("span",{className:"text-muted-foreground tabular-nums shrink-0",children:["~",de.toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),n.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-chart-3",style:{width:`${xe}%`}})})]},oe)})]})]})})(),n.jsx("pre",{className:"text-xs font-mono bg-muted px-3 py-2 overflow-auto whitespace-pre-wrap break-all border-t border-border/50 max-h-64",children:JSON.stringify(D,null,2)})]})]},D.id)})})]})]})]})}function Hn(t,e){return t+e.chars}function Vn(t){return t.chars}function Kn(t,e){return n.jsx(zn,{part:t},e)}function Un(t){return(t.parts??[]).filter(qn)}function qn(t){return t.type==="tool-subtask"}function Wn(t){return t.role!=="system"}function Yn(t,e){const s=e.metadata?.usage;return t+(s?.outputTokens??0)}function Zn(t){return t.role==="assistant"}function Qn(t,e){const s=e.metadata?.usage;return t+(s?.inputTokens??0)}function Xn(t){return t.role==="user"}function Jn(t){return t.role==="assistant"&&t.metadata?.models}function ea(t){return t.role==="assistant"&&t.metadata?.usage}function ta(t){const e=A.c(21),{onOpenContextPanel:s}=t,{org:r}=ae(),{selectedVirtualMcp:i}=St();let a;e[0]!==r.id?(a=je(r.id),e[0]=r.id,e[1]=a):a=e[1];const c=i??a,l=Ee(c.id)??c,d=l.title??"Super Agent",m=l.icon??null,f=l.description??null;let h;e[2]!==m||e[3]!==d?(h=n.jsx(ye,{icon:m,name:d,size:"lg"}),e[2]=m,e[3]=d,e[4]=h):h=e[4];let j;e[5]!==d?(j=n.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-foreground",children:d}),e[5]=d,e[6]=j):j=e[6];let y;e[7]!==f?(y=f?n.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-balance",children:f}):null,e[7]=f,e[8]=y):y=e[8];let v;e[9]!==j||e[10]!==y?(v=n.jsxs("div",{className:"space-y-1.5",children:[j,y]}),e[9]=j,e[10]=y,e[11]=v):v=e[11];let x;e[12]!==h||e[13]!==v?(x=n.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center gap-4 px-6 text-center overflow-hidden",children:[h,v]}),e[12]=h,e[13]=v,e[14]=x):x=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(W.IceBreakers,{className:"pb-3"}),e[15]=g):g=e[15];let b;e[16]!==s?(b=n.jsxs(W.Footer,{children:[g,n.jsx(W.Input,{onOpenContextPanel:s})]}),e[16]=s,e[17]=b):b=e[17];let S;return e[18]!==x||e[19]!==b?(S=n.jsxs(n.Fragment,{children:[x,b]}),e[18]=x,e[19]=b,e[20]=S):S=e[20],S}function ot(t){const e=A.c(17),{outputs:s,collapsed:r,onToggle:i,variant:a}=t,o=a==="card"?"rounded-xl bg-muted/95 shadow-edge backdrop-blur-sm":"border-b border-border bg-background";let c;e[0]!==o?(c=se(o),e[0]=o,e[1]=c):c=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("span",{className:"text-sm font-medium text-foreground",children:"Files in this task"}),e[2]=u):u=e[2];const l=r&&"-rotate-90";let d;e[3]!==l?(d=se("size-4 text-muted-foreground transition-transform",l),e[3]=l,e[4]=d):d=e[4];let m;e[5]!==d?(m=n.jsx(Ze,{className:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==m?(f=n.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between px-3 py-2.5 text-left",children:[u,m]}),e[7]=i,e[8]=m,e[9]=f):f=e[9];let h;e[10]!==r||e[11]!==s?(h=!r&&n.jsx("div",{className:"flex max-h-72 flex-col gap-1.5 overflow-y-auto px-2 pb-2",children:s.map(sa)}),e[10]=r,e[11]=s,e[12]=h):h=e[12];let j;return e[13]!==c||e[14]!==f||e[15]!==h?(j=n.jsxs("div",{className:c,children:[f,h]}),e[13]=c,e[14]=f,e[15]=h,e[16]=j):j=e[16],j}function sa(t){return n.jsx(Es,{file:t},t.key)}function na(){const t=A.c(13),e=Le()?.taskId??null,s=Fs();let r;t[0]!==s?(r={enabled:s},t[0]=s,t[1]=r):r=t[1];const{data:i}=Rs(e,r),[a,o]=B.useState(!1),[c,u]=B.useState(!0);if(!e||!i||i.length===0)return null;let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>o(ra),t[2]=l):l=t[2];let d;t[3]!==a||t[4]!==i?(d=n.jsx("div",{className:"absolute top-2 right-2 z-10 hidden w-72 @[1280px]:block",children:n.jsx(ot,{variant:"card",outputs:i,collapsed:a,onToggle:l})}),t[3]=a,t[4]=i,t[5]=d):d=t[5];let m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=()=>u(aa),t[6]=m):m=t[6];let f;t[7]!==c||t[8]!==i?(f=n.jsx("div",{className:"shrink-0 @[1280px]:hidden",children:n.jsx(ot,{variant:"bar",outputs:i,collapsed:c,onToggle:m})}),t[7]=c,t[8]=i,t[9]=f):f=t[9];let h;return t[10]!==d||t[11]!==f?(h=n.jsxs(n.Fragment,{children:[d,f]}),t[10]=d,t[11]=f,t[12]=h):h=t[12],h}function aa(t){return!t}function ra(t){return!t}function ia(){const t=A.c(1);B.use(Ye().ready);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(ks,{children:n.jsx(la,{})}),t[0]=e):e=t[0],e}function la(){const t=A.c(29),{active:e}=Ns(),{org:s}=ae(),r=Le(),{isChatEmpty:i}=Ye(),[a,o]=B.useState("chat"),c=Os(),u=K(),l=An(),{runtime:d}=jt(r?.virtualMcpId);if(l!==null&&d!=="cms"){let N;return t[0]!==l||t[1]!==u?(N=n.jsx(W,{className:"animate-in fade-in-0 duration-200",children:n.jsx(W.Main,{className:"flex flex-col items-center",children:n.jsx(W.EmptyState,{children:l==="codex-provider"?n.jsx(W.NoAiProviderEmptyState,{title:u("settings.codexSubscription.setupHeading"),description:u("settings.codexSubscription.setupDescription"),providerFilter:yt}):l==="claude-code-provider"?n.jsx(W.NoAiProviderEmptyState,{title:u("chat.noAiProviderEmptyState.supportedHeading"),description:u("chat.noAiProviderEmptyState.supportedSubtitle"),providerFilter:kt}):n.jsx(W.NoAiProviderEmptyState,{})})})}),t[0]=l,t[1]=u,t[2]=N):N=t[2],N}let f;t[3]!==c.hasDecoKey||t[4]!==c.hasOnlyDecoProvider||t[5]!==c.isLoading||t[6]!==c.isZeroBalance||t[7]!==i||t[8]!==s?(f=c.hasDecoKey&&c.isZeroBalance&&c.hasOnlyDecoProvider&&!c.isLoading&&i&&!js(s.id),t[3]=c.hasDecoKey,t[4]=c.hasOnlyDecoProvider,t[5]=c.isLoading,t[6]=c.isZeroBalance,t[7]=i,t[8]=s,t[9]=f):f=t[9];const h=f;let j;t[10]!==h?(j=h&&n.jsx(W.CreditsEmptyState,{}),t[10]=h,t[11]=j):j=t[11];let y;t[12]!==a||t[13]!==i||t[14]!==d||t[15]!==e?(y=!e&&n.jsx("div",{inert:a!=="chat"?!0:void 0,"aria-hidden":a!=="chat",className:se("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",a!=="chat"?"opacity-0 pointer-events-none":"opacity-100"),children:i&&d!=="cms"?n.jsx(ta,{onOpenContextPanel:()=>o("context")}):n.jsxs(n.Fragment,{children:[n.jsxs(W.Main,{className:"relative flex flex-col overflow-hidden @container",children:[n.jsx(na,{}),n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(W.Messages,{})})]}),n.jsx(W.Footer,{children:n.jsx(W.Input,{onOpenContextPanel:()=>o("context")})})]})}),t[12]=a,t[13]=i,t[14]=d,t[15]=e,t[16]=y):y=t[16];let v;t[17]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Ts,{}),t[17]=v):v=t[17];const x=a!=="context"?!0:void 0,g=a!=="context",b=a==="context"?"opacity-100":"opacity-0 pointer-events-none";let S;t[18]!==b?(S=se("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",b),t[18]=b,t[19]=S):S=t[19];let p;t[20]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(Gn,{back:!0,onClose:()=>o("chat")}),t[20]=p):p=t[20];let k;t[21]!==x||t[22]!==g||t[23]!==S?(k=n.jsx("div",{inert:x,"aria-hidden":g,className:S,children:p}),t[21]=x,t[22]=g,t[23]=S,t[24]=k):k=t[24];let T;return t[25]!==j||t[26]!==y||t[27]!==k?(T=n.jsxs(W,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[j,y,v,k]}),t[25]=j,t[26]=y,t[27]=k,t[28]=T):T=t[28],T}function oa(){const t=A.c(7),e=K();let s;t[0]!==e?(s=e("agentShellLayout.agentShellLayout.chatLoadingError"),t[0]=e,t[1]=s):s=t[1];let r;t[2]!==s?(r=n.jsx("div",{role:"alert",className:"flex h-full flex-1 items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Ie,{children:n.jsx(ia,{})}),t[4]=i):i=t[4];let a;return t[5]!==r?(a=n.jsx(pt,{fallback:r,children:i}),t[5]=r,t[6]=a):a=t[6],a}function ca(t){const e=A.c(10),{org:s}=ae(),r=qs(),{data:i}=pe.useSession(),a=i?.user?.id,o=t?.id??null,c=!!t&&!!a&&!!t.created_by&&t.created_by!==a;let u;e[0]!==s.id||e[1]!==o?(u=fe.viewedThreadMetadataRefresh(s.id,o??""),e[0]=s.id,e[1]=o,e[2]=u):u=e[2];const l=!!r&&!!o&&c;let d;e[3]!==r||e[4]!==o?(d=async()=>(await r?.refreshThreadMetadata(o??""),!0),e[3]=r,e[4]=o,e[5]=d):d=e[5];let m;e[6]!==u||e[7]!==l||e[8]!==d?(m={queryKey:u,enabled:l,staleTime:Number.POSITIVE_INFINITY,queryFn:d},e[6]=u,e[7]=l,e[8]=d,e[9]=m):m=e[9],me(m)}function Ge(t){const e=A.c(14),{label:s,value:r,onChange:i,options:a}=t;let o;e[0]!==s?(o=n.jsx("span",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=o):o=e[1];let c;e[2]!==i?(c=m=>m&&i(m),e[2]=i,e[3]=c):c=e[3];let u;e[4]!==a?(u=a.map(da),e[4]=a,e[5]=u):u=e[5];let l;e[6]!==s||e[7]!==c||e[8]!==u||e[9]!==r?(l=n.jsx(rn,{type:"single",size:"sm",value:r,onValueChange:c,"aria-label":s,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:u}),e[6]=s,e[7]=c,e[8]=u,e[9]=r,e[10]=l):l=e[10];let d;return e[11]!==o||e[12]!==l?(d=n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,l]}),e[11]=o,e[12]=l,e[13]=d):d=e[13],d}function da(t){return n.jsxs(an,{value:t.value,className:"h-6 gap-1.5 rounded-lg px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:bg-card data-[state=on]:text-foreground data-[state=on]:shadow-edge",children:[t.icon,t.label]},t.value)}function ua(t){const e=A.c(91),{panel:s,className:r}=t,i=r===void 0?"md:size-[34px]":r,a=K();let o;e[0]!==a?(o=a("sidebar.taskGroupsList.filterChats"),e[0]=a,e[1]=o):o=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(ds,{size:16}),e[2]=c):c=e[2];let u;e[3]!==s.filtersActive?(u=s.filtersActive&&n.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[3]=s.filtersActive,e[4]=u):u=e[4];let l;e[5]!==i||e[6]!==s.filtersActive||e[7]!==o||e[8]!==u?(l=n.jsx(Fe,{asChild:!0,children:n.jsx(Lt,{asChild:!0,children:n.jsxs(_e,{"aria-label":o,active:s.filtersActive,className:i,children:[c,u]})})}),e[5]=i,e[6]=s.filtersActive,e[7]=o,e[8]=u,e[9]=l):l=e[9];let d;e[10]!==a?(d=a("sidebar.taskGroupsList.filterChats"),e[10]=a,e[11]=d):d=e[11];let m;e[12]!==d?(m=n.jsx(Re,{side:"bottom",children:d}),e[12]=d,e[13]=m):m=e[13];let f;e[14]!==l||e[15]!==m?(f=n.jsxs(Oe,{children:[l,m]}),e[14]=l,e[15]=m,e[16]=f):f=e[16];let h;e[17]!==a?(h=a("sidebar.taskGroupsList.filterView"),e[17]=a,e[18]=h):h=e[18];const j=s.groupBy;let y;e[19]!==s?(y=D=>{he("tasks_panel_group_by_changed",{to_value:D}),s.setGroupBy(D)},e[19]=s,e[20]=y):y=e[20];let v;e[21]!==a?(v=a("sidebar.taskGroupsList.viewList"),e[21]=a,e[22]=v):v=e[22];let x;e[23]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(us,{size:13}),e[23]=x):x=e[23];let g;e[24]!==v?(g={value:"flat",label:v,icon:x},e[24]=v,e[25]=g):g=e[25];let b;e[26]!==a?(b=a("sidebar.taskGroupsList.viewStatus"),e[26]=a,e[27]=b):b=e[27];let S;e[28]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(fs,{size:13}),e[28]=S):S=e[28];let p;e[29]!==b?(p={value:"status",label:b,icon:S},e[29]=b,e[30]=p):p=e[30];let k;e[31]!==g||e[32]!==p?(k=[g,p],e[31]=g,e[32]=p,e[33]=k):k=e[33];let T;e[34]!==s.groupBy||e[35]!==y||e[36]!==k||e[37]!==h?(T=n.jsx(Ge,{label:h,value:j,onChange:y,options:k}),e[34]=s.groupBy,e[35]=y,e[36]=k,e[37]=h,e[38]=T):T=e[38];let N;e[39]!==a?(N=a("sidebar.taskGroupsList.filterType"),e[39]=a,e[40]=N):N=e[40];const _=s.typeFilter;let w;e[41]!==s?(w=D=>{he("tasks_panel_filter_changed",{to_value:D}),s.setTypeFilter(D)},e[41]=s,e[42]=w):w=e[42];let I;e[43]!==a?(I=a("sidebar.taskGroupsList.typeAll"),e[43]=a,e[44]=I):I=e[44];let P;e[45]!==I?(P={value:"all",label:I},e[45]=I,e[46]=P):P=e[46];let L;e[47]!==a?(L=a("sidebar.taskGroupsList.typeChats"),e[47]=a,e[48]=L):L=e[48];let $;e[49]!==L?($={value:"manual",label:L},e[49]=L,e[50]=$):$=e[50];let E;e[51]!==a?(E=a("sidebar.taskGroupsList.typeAuto"),e[51]=a,e[52]=E):E=e[52];let F;e[53]!==E?(F={value:"automation",label:E},e[53]=E,e[54]=F):F=e[54];let R;e[55]!==P||e[56]!==$||e[57]!==F?(R=[P,$,F],e[55]=P,e[56]=$,e[57]=F,e[58]=R):R=e[58];let M;e[59]!==s.typeFilter||e[60]!==N||e[61]!==w||e[62]!==R?(M=n.jsx(Ge,{label:N,value:_,onChange:w,options:R}),e[59]=s.typeFilter,e[60]=N,e[61]=w,e[62]=R,e[63]=M):M=e[63];let C;e[64]!==a?(C=a("sidebar.taskGroupsList.filterScope"),e[64]=a,e[65]=C):C=e[65];const G=s.showAll?"team":"mine";let z;e[66]!==s?(z=D=>s.setShowAll(D==="team"),e[66]=s,e[67]=z):z=e[67];let H;e[68]!==a?(H=a("sidebar.taskGroupsList.scopeMine"),e[68]=a,e[69]=H):H=e[69];let O;e[70]!==H?(O={value:"mine",label:H},e[70]=H,e[71]=O):O=e[71];let U;e[72]!==a?(U=a("sidebar.taskGroupsList.scopeTeam"),e[72]=a,e[73]=U):U=e[73];let Z;e[74]!==U?(Z={value:"team",label:U},e[74]=U,e[75]=Z):Z=e[75];let Y;e[76]!==O||e[77]!==Z?(Y=[O,Z],e[76]=O,e[77]=Z,e[78]=Y):Y=e[78];let Q;e[79]!==C||e[80]!==G||e[81]!==z||e[82]!==Y?(Q=n.jsx(Ge,{label:C,value:G,onChange:z,options:Y}),e[79]=C,e[80]=G,e[81]=z,e[82]=Y,e[83]=Q):Q=e[83];let q;e[84]!==T||e[85]!==M||e[86]!==Q?(q=n.jsxs($t,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[T,M,Q]}),e[84]=T,e[85]=M,e[86]=Q,e[87]=q):q=e[87];let le;return e[88]!==q||e[89]!==f?(le=n.jsxs(Et,{children:[f,q]}),e[88]=q,e[89]=f,e[90]=le):le=e[90],le}function fa(t,e){return t.filter(s=>s.id===e||!!s.trigger_id||tn(s))}function ma(){const t=A.c(2),e=Ls()??[];let s;return t[0]!==e?(s=r=>{if(!r)return;const i=e.find(a=>a.id===r);return i?Pt(i.metadata):void 0},t[0]=e,t[1]=s):s=t[1],s}function ha(t){const e=A.c(9),{virtualMcpId:s,size:r,showAutomationBadge:i}=t,a=r===void 0?"sm":r,o=K();let c;e[0]!==a||e[1]!==s?(c=s?n.jsx(pa,{virtualMcpId:s,size:a}):n.jsx(ye,{icon:null,name:"?",size:a}),e[0]=a,e[1]=s,e[2]=c):c=e[2];let u;e[3]!==i||e[4]!==o?(u=i&&n.jsx("span",{"aria-label":o("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-special border border-special text-special-foreground",children:n.jsx(Ot,{size:10,className:"text-white"})}),e[3]=i,e[4]=o,e[5]=u):u=e[5];let l;return e[6]!==c||e[7]!==u?(l=n.jsxs("div",{className:"relative shrink-0",children:[c,u]}),e[6]=c,e[7]=u,e[8]=l):l=e[8],l}function pa(t){const e=A.c(6),{virtualMcpId:s,size:r}=t,i=Tt(s);if(!i){let c;return e[0]!==r?(c=n.jsx(ye,{icon:null,name:"?",size:r}),e[0]=r,e[1]=c):c=e[1],c}const a=i.icon??null;let o;return e[2]!==i.title||e[3]!==r||e[4]!==a?(o=n.jsx(ye,{icon:a,name:i.title,size:r}),e[2]=i.title,e[3]=r,e[4]=a,e[5]=o):o=e[5],o}const ct=["thread"];function xa(t){const e=A.c(53),{open:s,onOpenChange:r}=t,[i,a]=B.useState(""),{org:o}=ae(),{setTaskId:c}=Qe(),u=Pe(),l=K();let d,m,f,h;e[0]!==o.id||e[1]!==i?(h=i.trim(),d=h?20:10,f=me,m=fe.globalSearch(o.id,h,d,ct),e[0]=o.id,e[1]=i,e[2]=d,e[3]=m,e[4]=f,e[5]=h):(d=e[2],m=e[3],f=e[4],h=e[5]);let j;e[6]!==d||e[7]!==u||e[8]!==h?(j=async()=>{const C=await u.call("GLOBAL_SEARCH",{query:h,limit:d,types:[...ct]});return{...C,items:C.items.filter(ga)}},e[6]=d,e[7]=u,e[8]=h,e[9]=j):j=e[9];let y;e[10]!==s||e[11]!==m||e[12]!==j?(y={queryKey:m,enabled:s,queryFn:j,staleTime:1e4},e[10]=s,e[11]=m,e[12]=j,e[13]=y):y=e[13];const{data:v,isFetching:x}=f(y);let g;e[14]!==v?.items?(g=v?.items??[],e[14]=v?.items,e[15]=g):g=e[15];const b=g;let S;e[16]!==r?(S=C=>{C||a(""),r(C)},e[16]=r,e[17]=S):S=e[17];const p=S;let k;e[18]!==p||e[19]!==c?(k=C=>{p(!1),c(C.id,C.virtual_mcp_id??void 0)},e[18]=p,e[19]=c,e[20]=k):k=e[20];const T=k;let N;e[21]!==l?(N=l("tasksPanel.globalSearchDialog.title"),e[21]=l,e[22]=N):N=e[22];let _;e[23]!==N?(_=n.jsx(Wt,{children:N}),e[23]=N,e[24]=_):_=e[24];let w;e[25]!==l?(w=l("tasksPanel.globalSearchDialog.description"),e[25]=l,e[26]=w):w=e[26];let I;e[27]!==w?(I=n.jsx(Yt,{children:w}),e[27]=w,e[28]=I):I=e[28];let P;e[29]!==I||e[30]!==_?(P=n.jsxs(Zt,{className:"sr-only",children:[_,I]}),e[29]=I,e[30]=_,e[31]=P):P=e[31];let L;e[32]!==l?(L=l("tasksPanel.globalSearchDialog.placeholder"),e[32]=l,e[33]=L):L=e[33];let $;e[34]!==i||e[35]!==L?($=n.jsx(hn,{value:i,onValueChange:a,placeholder:L}),e[34]=i,e[35]=L,e[36]=$):$=e[36];let E;e[37]!==T||e[38]!==x||e[39]!==b||e[40]!==l||e[41]!==h?(E=n.jsx(dn,{children:x&&b.length===0?n.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l("tasksPanel.globalSearchDialog.searching")}):b.length===0?n.jsx(un,{children:l("tasksPanel.globalSearchDialog.noResults")}):n.jsx(fn,{heading:h?void 0:l("tasksPanel.globalSearchDialog.recent"),children:b.map(C=>C.type==="thread"?n.jsxs(mn,{value:`thread:${C.id}:${C.title}`,onSelect:()=>T(C),className:"gap-2.5",children:[n.jsx(ha,{virtualMcpId:C.virtual_mcp_id,size:"xs"}),n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx("div",{className:"text-sm text-foreground truncate",children:C.title||l("tasksPanel.globalSearchDialog.untitledChat")})}),n.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(C.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${C.id}`):null)})}),e[37]=T,e[38]=x,e[39]=b,e[40]=l,e[41]=h,e[42]=E):E=e[42];let F;e[43]!==$||e[44]!==E?(F=n.jsxs(pn,{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:[$,E]}),e[43]=$,e[44]=E,e[45]=F):F=e[45];let R;e[46]!==P||e[47]!==F?(R=n.jsxs(Qt,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[P,F]}),e[46]=P,e[47]=F,e[48]=R):R=e[48];let M;return e[49]!==p||e[50]!==s||e[51]!==R?(M=n.jsx(Xt,{open:s,onOpenChange:p,children:R}),e[49]=p,e[50]=s,e[51]=R,e[52]=M):M=e[52],M}function ga(t){return t.type==="thread"}function ba(t,e,s){if(!s)return;const r=t.findIndex(i=>i.id===e);if(r!==-1){for(let i=r+1;i<t.length;i++){const a=t[i];if(a?.created_by===s)return a}for(let i=r-1;i>=0;i--){const a=t[i];if(a?.created_by===s)return a}}}function va(t){return t==="ephemeral"||t.startsWith("thread:")}function Gt(t){const e=A.c(45),{task:s,isActive:r,onClick:i,onArchive:a,showAutomationBadge:o,showAgentIcon:c,hideStatusIdle:u,indented:l}=t,d=K(),m=xn(s.status),f=m.icon,h=s.metadata?.kind==="tool_call_run",j=Tt(h?void 0:s.virtual_mcp_id);let y;e[0]!==j?(y=_t(j),e[0]=j,e[1]=y):y=e[1];const v=y;vn(6e4);const x=o||!!s.trigger_id,g=s.id,b="button",S=0;let p;e[2]!==i?(p=z=>{z.target===z.currentTarget&&(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),i())},e[2]=i,e[3]=p):p=e[3];const k=l?"-ml-4 pl-6":"pl-[9px]",T=r?"bg-accent text-accent-foreground":"hover:bg-accent";let N;e[4]!==k||e[5]!==T?(N=se("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",k,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",T),e[4]=k,e[5]=T,e[6]=N):N=e[6];let _;e[7]!==h||e[8]!==c||e[9]!==j?.icon||e[10]!==j?.title?(_=c&&!h&&n.jsx(ye,{icon:j?.icon??null,name:j?.title??"?",size:"2xs"}),e[7]=h,e[8]=c,e[9]=j?.icon,e[10]=j?.title,e[11]=_):_=e[11];let w;e[12]!==x||e[13]!==d?(w=x&&n.jsx(Ot,{size:12,"aria-label":d("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-special"}),e[12]=x,e[13]=d,e[14]=w):w=e[14];let I;e[15]!==d||e[16]!==s.title?(I=s.title||d("tasksPanel.taskRow.untitledTask"),e[15]=d,e[16]=s.title,e[17]=I):I=e[17];let P;e[18]!==I?(P=n.jsx("div",{className:"text-sm text-foreground truncate",children:I}),e[18]=I,e[19]=P):P=e[19];let L;e[20]!==w||e[21]!==P?(L=n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[w,P]}),e[20]=w,e[21]=P,e[22]=L):L=e[22];let $;e[23]!==r||e[24]!==v||e[25]!==s.branch||e[26]!==s.updated_at?($=s.updated_at&&n.jsxs("div",{className:se("flex items-center gap-1 text-2xs min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[s.branch&&!va(s.branch)?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"truncate font-mono",children:s.branch}),n.jsx("span",{className:"shrink-0",children:"·"})]}):v?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"truncate",children:[v.owner,"/",v.name]}),n.jsx("span",{className:"shrink-0",children:"·"})]}):null,n.jsx("span",{className:"shrink-0",children:bn(new Date(s.updated_at))})]}),e[23]=r,e[24]=v,e[25]=s.branch,e[26]=s.updated_at,e[27]=$):$=e[27];let E;e[28]!==L||e[29]!==$?(E=n.jsxs("div",{className:"flex-1 min-w-0",children:[L,$]}),e[28]=L,e[29]=$,e[30]=E):E=e[30];const F="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",R=!u&&n.jsx("span",{className:se("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",a&&"group-hover/row:opacity-0"),"aria-label":d("tasksPanel.taskRow.statusLabel",{status:d(m.labelKey)}),children:s.status==="in_progress"?n.jsx(ve,{className:se("size-3.5",m.iconClassName)}):n.jsx(f,{size:14,className:m.iconClassName})});let M;e[31]!==a||e[32]!==d?(M=a&&n.jsxs(Oe,{children:[n.jsx(Fe,{asChild:!0,children:n.jsx(qe,{variant:"ghost",size:"icon","aria-label":d("tasksPanel.taskRow.archiveTask"),onClick:z=>{z.stopPropagation(),a()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto text-muted-foreground",children:n.jsx(Jt,{className:"size-3.5"})})}),n.jsx(Re,{side:"right",children:d("tasksPanel.taskRow.archive")})]}),e[31]=a,e[32]=d,e[33]=M):M=e[33];let C;e[34]!==R||e[35]!==M?(C=n.jsxs("div",{className:F,children:[R,M]}),e[34]=R,e[35]=M,e[36]=C):C=e[36];let G;return e[37]!==i||e[38]!==E||e[39]!==C||e[40]!==p||e[41]!==N||e[42]!==_||e[43]!==s.id?(G=n.jsxs("div",{"data-task-id":g,role:b,tabIndex:S,onClick:i,onKeyDown:p,className:N,children:[_,E,C]}),e[37]=i,e[38]=E,e[39]=C,e[40]=p,e[41]=N,e[42]=_,e[43]=s.id,e[44]=G):G=e[44],G}const dt=["requires_action","in_progress","failed","expired","completed"];function ya(t){const e=new Map(dt.map(s=>[s,[]]));for(const s of t){const r=s.status??"completed";(e.get(r)??e.get("completed")).push(s)}return dt.map(s=>({status:s,threads:e.get(s)}))}const ja="sidebar.group.expanded.";function Sa(t,e){const s=A.c(3),[r,i]=xt(`${ja}${t}`,e);let a;return s[0]!==r||s[1]!==i?(a=[r,i],s[0]=r,s[1]=i,s[2]=a):a=s[2],a}function Ht(t){const e=A.c(18),{onClick:s,isFetching:r,indented:i}=t,a=K();let o;e[0]!==a?(o=a("sidebar.showMoreButton.ariaLabel"),e[0]=a,e[1]=o):o=e[1];const c=i?"-ml-4 pl-6 pr-2":"px-2";let u;e[2]!==c?(u=se("flex items-center gap-2 py-1.5 rounded-lg text-sm text-muted-foreground",c,"hover:bg-sidebar-accent hover:text-foreground focus-ring","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=c,e[3]=u):u=e[3];let l;e[4]!==r?(l=r&&n.jsx(ve,{className:"size-3.5"}),e[4]=r,e[5]=l):l=e[5];let d;e[6]!==r||e[7]!==a?(d=a(r?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=r,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==d?(m=n.jsx("span",{children:d}),e[9]=d,e[10]=m):m=e[10];let f;return e[11]!==r||e[12]!==s||e[13]!==o||e[14]!==u||e[15]!==l||e[16]!==m?(f=n.jsxs("button",{type:"button","aria-label":o,onClick:s,disabled:r,className:u,children:[l,m]}),e[11]=r,e[12]=s,e[13]=o,e[14]=u,e[15]=l,e[16]=m,e[17]=f):f=e[17],f}function ka(t,e,s,r){return[t,e,s,r.type,r.member,r.currentUserId??""].join("|")}function Na(t){return t.member==="mine"&&!t.currentUserId}const Vt=4;let Te=0;const Ke=[];function Ta(){for(;Te<Vt&&Ke.length>0;){const t=Ke.shift();t&&t()}}function Kt(t){return new Promise((e,s)=>{const r=()=>{Te++,t().then(e,s).finally(()=>{Te--,Ta()})};Te<Vt?r():Ke.push(r)})}const Be=10;function ut(t,e,s,r,i){const a={hidden:!1};r.member==="mine"&&r.currentUserId&&(a.created_by=r.currentUserId),r.type==="automation"&&(a.has_trigger=!0),r.type==="manual"&&(a.has_trigger=!1);const o={where:a,limit:i,offset:s,orderBy:[{field:["updated_at"],direction:"desc"}]};return o.status=e,o}function _a(t,e,s,r){let i=0;for(const a of t)Ut(a,e,s,r)&&i++;return i}function He(t,e,s,r){return _a(t,e,s,r)}function wa(t,e){return!!(t>=Be||t===0&&e)}function ft(t,e){return t<e}function Ca(t,e){return e===!1?!1:e===!0?!0:t}function Ut(t,e,s,r){return!(t.hidden||(t.status??"completed")!==s||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const Ce=new Map,Ne=new Map;function Pa(t,e){return e?t>=Be?!0:null:!1}function mt(t){return Ce.get(t)}function Ia(t,e){Ce.set(t,e)}function Ma(t,e,s){const r=Ce.get(t);if(r!==void 0){s(r);return}let i=Ne.get(t);i||(i=Kt(e).then(a=>(Ce.set(t,a),Ne.delete(t),a)).catch(()=>(Ne.delete(t),Promise.reject(new Error("group probe failed")))),Ne.set(t,i)),i.then(s,()=>s(!1))}function ht(t){const e=t,s=Array.isArray(e.items)?e.items:[];return{items:s,hasMore:e.hasMore??s.length===Be,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Aa(t,e,s,r,i){let a=0;for(const o of t)e.has(o.id)||Ut(o,s,r,i)&&a++;return a}function La(t,e,s,r){const i=A.c(8),{org:a}=ae(),o=ka(a.id,t,e,s);let c;i[0]!==s?(c=Na(s),i[0]=s,i[1]=c):c=i[1];const u=c,[l,d]=B.useState({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});l.identity!==o&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});const m=Xe(),{threads:f,hasMore:h}=Je(),j=He(f,t,e,s),y=wa(j,h),v=Pa(j,h),x=Pe();if(l.identity===o&&l.serverHasMore===null){const T=v??mt(o);T!==void 0&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:l.probeSubscribedIdentity,serverHasMore:T})}!u&&l.identity===o&&l.serverHasMore===null&&v===null&&mt(o)===void 0&&l.probeSubscribedIdentity!==o&&(d(T=>T.identity===o?{...T,isProbing:!0,probeSubscribedIdentity:o}:T),Ma(o,async()=>{const T=ut(t,e,0,s,1),N=await x.call("COLLECTION_THREADS_LIST",T),{totalCount:_}=ht(N),w=He(m.threads.get(),t,e,s);return _===void 0?!1:ft(w,_)},T=>{d(N=>N.identity!==o?N:{...N,isProbing:!1,serverHasMore:T})}));const b=async function(){if(l.isFetching||l.isProbing||u)return;const N=o;d(_=>_.identity===N?{..._,isFetching:!0}:_);try{const _=He(f,t,e,s),w=ut(t,e,_,s,Be),I=await Kt(()=>x.call("COLLECTION_THREADS_LIST",w)),{items:P,hasMore:L,totalCount:$}=ht(I),E=new Set(f.map($a)),F=Aa(P,E,t,e,s),R=_;m.mergeThreads(P),d(M=>{if(M.identity!==N)return M;let C;return $!==void 0?C=ft(R+F,$):C=P.length===0||F===0?!1:L,Ia(N,C),{...M,isFetching:!1,serverHasMore:C}})}catch(_){const w=_,I=w instanceof Error?w.message:String(w);es.error(`Could not load more tasks: ${I}`),d(P=>P.identity===N?{...P,isFetching:!1}:P)}},S=l.isFetching||l.isProbing,p=!u&&!S&&Ca(y,l.serverHasMore);let k;return i[2]!==S||i[3]!==b||i[4]!==p||i[5]!==l.isProbing||i[6]!==l.serverHasMore?(k={hasMore:p,isFetching:S,isProbing:l.isProbing,serverHasMore:l.serverHasMore,loadMore:b},i[2]=S,i[3]=b,i[4]=p,i[5]=l.isProbing,i[6]=l.serverHasMore,i[7]=k):k=i[7],k}function $a(t){return t.id}function Ea(t){const e=A.c(20),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u}=t,{isFetching:l,isProbing:d,loadMore:m,hasMore:f,serverHasMore:h}=La("status",s,u),[j,y]=B.useState(!1);!j&&r.length===0&&h===!0&&!l&&!d&&(y(!0),queueMicrotask(()=>{m()}));let v;if(e[0]!==i||e[1]!==c||e[2]!==u||e[3]!==o||e[4]!==a||e[5]!==r){let b;e[7]!==i||e[8]!==c||e[9]!==u||e[10]!==o||e[11]!==a?(b=S=>n.jsx(Gt,{task:S,isActive:i===S.id,onClick:()=>a(S),onArchive:c&&S.created_by===u.currentUserId?()=>o(S):void 0,showAutomationBadge:!!S.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},S.id),e[7]=i,e[8]=c,e[9]=u,e[10]=o,e[11]=a,e[12]=b):b=e[12],v=r.map(b),e[0]=i,e[1]=c,e[2]=u,e[3]=o,e[4]=a,e[5]=r,e[6]=v}else v=e[6];let x;e[13]!==f||e[14]!==l||e[15]!==m?(x=(f||l)&&n.jsx(Ht,{onClick:()=>{m()},isFetching:l,indented:!0}),e[13]=f,e[14]=l,e[15]=m,e[16]=x):x=e[16];let g;return e[17]!==v||e[18]!==x?(g=n.jsxs(n.Fragment,{children:[v,x]}),e[17]=v,e[18]=x,e[19]=g):g=e[19],g}function Fa(t){const e=A.c(43),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u}=t,l=K(),d=gn[s],m=d.icon,[f,h]=Sa(`status-${s}`,!1);let j;e[0]!==f||e[1]!==h?(j=function(){h(!f)},e[0]=f,e[1]=h,e[2]=j):j=e[2];const y=j;let v;e[3]!==d.labelKey||e[4]!==l?(v=l("sidebar.taskGroupsList.toggleStatusGroup",{status:l(d.labelKey)}),e[3]=d.labelKey,e[4]=l,e[5]=v):v=e[5];let x;e[6]!==y?(x=I=>{I.target===I.currentTarget&&(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),y())},e[6]=y,e[7]=x):x=e[7];let g;e[8]!==m||e[9]!==d.iconClassName?(g=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:n.jsx(m,{size:12,className:d.iconClassName})}),e[8]=m,e[9]=d.iconClassName,e[10]=g):g=e[10];let b;e[11]!==f?(b=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:f?n.jsx(Ze,{size:14}):n.jsx(ts,{size:14})}),e[11]=f,e[12]=b):b=e[12];let S;e[13]!==g||e[14]!==b?(S=n.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[g,b]}),e[13]=g,e[14]=b,e[15]=S):S=e[15];let p;e[16]!==d.labelKey||e[17]!==l?(p=l(d.labelKey),e[16]=d.labelKey,e[17]=l,e[18]=p):p=e[18];let k;e[19]!==p?(k=n.jsx("span",{className:"flex-1 truncate",children:p}),e[19]=p,e[20]=k):k=e[20];let T;e[21]!==r.length?(T=n.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:n.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:r.length})}),e[21]=r.length,e[22]=T):T=e[22];let N;e[23]!==f||e[24]!==y||e[25]!==v||e[26]!==x||e[27]!==S||e[28]!==k||e[29]!==T?(N=n.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":f,"aria-label":v,onClick:y,onKeyDown:x,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-lg text-sm font-medium text-foreground cursor-pointer hover:bg-sidebar-accent focus-ring transition-colors",children:[S,k,T]}),e[23]=f,e[24]=y,e[25]=v,e[26]=x,e[27]=S,e[28]=k,e[29]=T,e[30]=N):N=e[30];let _;e[31]!==i||e[32]!==c||e[33]!==f||e[34]!==u||e[35]!==o||e[36]!==a||e[37]!==s||e[38]!==r?(_=f&&n.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:n.jsx(Ea,{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u})}),e[31]=i,e[32]=c,e[33]=f,e[34]=u,e[35]=o,e[36]=a,e[37]=s,e[38]=r,e[39]=_):_=e[39];let w;return e[40]!==N||e[41]!==_?(w=n.jsxs("div",{className:"flex flex-col gap-0.5",children:[N,_]}),e[40]=N,e[41]=_,e[42]=w):w=e[42],w}function Ra(t){const e=A.c(41),{threads:s,groupBy:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,filters:c,hasMore:u,isFetchingMore:l,onLoadMore:d,filtersActive:m}=t,f=K();if(s.length===0&&!u&&!l){let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(ms,{className:"size-6 opacity-60"}),e[0]=x):x=e[0];let g;e[1]!==m||e[2]!==f?(g=f(m?"sidebar.myThreadsSection.noChatsMatchFilters":"sidebar.myThreadsSection.noChatsYet"),e[1]=m,e[2]=f,e[3]=g):g=e[3];let b;return e[4]!==g?(b=n.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[x,n.jsx("p",{className:"text-sm",children:g})]}),e[4]=g,e[5]=b):b=e[5],b}const h=s.length>1||u;if(r==="status"){let x;if(e[6]!==i||e[7]!==h||e[8]!==c||e[9]!==o||e[10]!==a||e[11]!==s){let b;e[13]!==i||e[14]!==h||e[15]!==c||e[16]!==o||e[17]!==a?(b=S=>n.jsx(Fa,{status:S.status,threads:S.threads,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:h,filters:c},S.status),e[13]=i,e[14]=h,e[15]=c,e[16]=o,e[17]=a,e[18]=b):b=e[18],x=ya(s).map(b),e[6]=i,e[7]=h,e[8]=c,e[9]=o,e[10]=a,e[11]=s,e[12]=x}else x=e[12];let g;return e[19]!==x?(g=n.jsx(n.Fragment,{children:x}),e[19]=x,e[20]=g):g=e[20],g}let j;if(e[21]!==i||e[22]!==h||e[23]!==c||e[24]!==o||e[25]!==a||e[26]!==s){let x;e[28]!==i||e[29]!==h||e[30]!==c||e[31]!==o||e[32]!==a?(x=g=>n.jsx(Gt,{task:g,isActive:i===g.id,onClick:()=>a(g),onArchive:h&&g.created_by===c.currentUserId?()=>o(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0},g.id),e[28]=i,e[29]=h,e[30]=c,e[31]=o,e[32]=a,e[33]=x):x=e[33],j=s.map(x),e[21]=i,e[22]=h,e[23]=c,e[24]=o,e[25]=a,e[26]=s,e[27]=j}else j=e[27];let y;e[34]!==u||e[35]!==l||e[36]!==d?(y=(u||l)&&n.jsx(Ht,{onClick:d,isFetching:l}),e[34]=u,e[35]=l,e[36]=d,e[37]=y):y=e[37];let v;return e[38]!==j||e[39]!==y?(v=n.jsxs(n.Fragment,{children:[j,y]}),e[38]=j,e[39]=y,e[40]=v):v=e[40],v}function Oa(t){const e=A.c(11),{panel:s}=t;let r;return e[0]!==s.activeTaskId||e[1]!==s.archiveTask||e[2]!==s.filters||e[3]!==s.filtersActive||e[4]!==s.groupBy||e[5]!==s.hasMore||e[6]!==s.isFetchingMore||e[7]!==s.loadMore||e[8]!==s.selectTask||e[9]!==s.threads?(r=n.jsx(Ra,{threads:s.threads,groupBy:s.groupBy,activeTaskId:s.activeTaskId,onSelectTask:s.selectTask,onArchiveTask:s.archiveTask,filters:s.filters,hasMore:s.hasMore,isFetchingMore:s.isFetchingMore,onLoadMore:s.loadMore,filtersActive:s.filtersActive}),e[0]=s.activeTaskId,e[1]=s.archiveTask,e[2]=s.filters,e[3]=s.filtersActive,e[4]=s.groupBy,e[5]=s.hasMore,e[6]=s.isFetchingMore,e[7]=s.loadMore,e[8]=s.selectTask,e[9]=s.threads,e[10]=r):r=e[10],r}function Ba(t){const e=A.c(67);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{onNavigate:r}=s,{data:i}=pe.useSession(),a=i?.user?.id,{org:o}=ae();let c;e[2]!==o.id?(c=je(o.id),e[2]=o.id,e[3]=c):c=e[3];const u=c.id,l=ma(),d=Nt(),{threads:m,hasMore:f,isFetchingMore:h,fetchNextPage:j}=Je(),y=m.filter(Ha),{hide:v,setScope:x}=It(),g=Me(),{setTaskId:b,createNewTask:S}=Qe(),p=Ft(),k=et();let T;e[4]!==k||e[5]!==m||e[6]!==p?(T=ln({routeAgentId:p,threadVirtualMcpId:m.find(V=>V.id===k)?.virtual_mcp_id}),e[4]=k,e[5]=m,e[6]=p,e[7]=T):T=e[7];const N=T;let _;e[8]!==r?(_=()=>{r?.()},e[8]=r,e[9]=_):_=e[9];const w=_,I=[...y].sort(Ga),[P,L]=B.useState("all"),[$,E]=B.useState("flat"),[F,R]=xt("sidebar-threads-scope-all",!1),[M,C]=B.useState(!1),[G,z]=B.useState(!1);let H;e[10]!==C?(H=()=>{he("tasks_panel_search_opened"),z(!0),C(!0)},e[10]=C,e[11]=H):H=e[11];const O=H,U=a??null;let Z;e[12]!==U||e[13]!==P?(Z={type:P,member:"mine",currentUserId:U},e[12]=U,e[13]=P,e[14]=Z):Z=e[14];const Y=Z,Q={};F||(Q.created_by="me"),x(Q);let q;e[15]!==a?(q=V=>a?V.filter(ue=>ue.created_by===a):[],e[15]=a,e[16]=q):q=e[16];const le=q;let D;e[17]!==P?(D=V=>P==="automation"?V.filter(za):P==="manual"?V.filter(Da):V,e[17]=P,e[18]=D):D=e[18];const re=D,X=fa(re(F?I:le(I)),k);let J;e[19]!==k||e[20]!==w||e[21]!==a||e[22]!==v||e[23]!==g||e[24]!==o.slug||e[25]!==b||e[26]!==X?(J=V=>{if(a&&V.created_by&&V.created_by!==a)return;const ue=V.id===k;if(v(V.id),Bs(V.id),!ue)return;const ge=ba(X,V.id,a);w(),ge?b(ge.id,ge.virtual_mcp_id):g({to:"/$org",params:{org:o.slug}})},e[19]=k,e[20]=w,e[21]=a,e[22]=v,e[23]=g,e[24]=o.slug,e[25]=b,e[26]=X,e[27]=J):J=e[27];const ee=J;let ne;e[28]!==w||e[29]!==b?(ne=V=>{w(),b(V.id,V.virtual_mcp_id)},e[28]=w,e[29]=b,e[30]=ne):ne=e[30];const ie=ne;let te;e[31]!==N||e[32]!==k||e[33]!==m||e[34]!==w||e[35]!==S||e[36]!==a||e[37]!==u||e[38]!==l||e[39]!==d||e[40]!==b?(te=()=>{const V=N??u;he("sidebar_new_thread_clicked",{virtual_mcp_id:V}),w();const ue=Ys(m,V,a,l(V));if(ue){b(ue.id,ue.virtual_mcp_id,{newThread:!0});return}const ge=d?null:m.find(qt=>qt.id===k)?.branch??null;S(V,ge)},e[31]=N,e[32]=k,e[33]=m,e[34]=w,e[35]=S,e[36]=a,e[37]=u,e[38]=l,e[39]=d,e[40]=b,e[41]=te):te=e[41];const oe=te;let ce;e[42]!==j?(ce=()=>{j()},e[42]=j,e[43]=ce):ce=e[43];const xe=$!=="flat"||P!=="all"||F;let de;e[44]!==G||e[45]!==M||e[46]!==C?(de=G?n.jsx(xa,{open:M,onOpenChange:C}):null,e[44]=G,e[45]=M,e[46]=C,e[47]=de):de=e[47];let ke;return e[48]!==k||e[49]!==ee||e[50]!==Y||e[51]!==$||e[52]!==f||e[53]!==h||e[54]!==oe||e[55]!==O||e[56]!==ie||e[57]!==E||e[58]!==R||e[59]!==L||e[60]!==F||e[61]!==ce||e[62]!==xe||e[63]!==de||e[64]!==P||e[65]!==X?(ke={threads:X,activeTaskId:k,filters:Y,hasMore:f,isFetchingMore:h,loadMore:ce,groupBy:$,setGroupBy:E,typeFilter:P,setTypeFilter:L,showAll:F,setShowAll:R,filtersActive:xe,selectTask:ie,archiveTask:ee,newThread:oe,openSearch:O,searchDialog:de},e[48]=k,e[49]=ee,e[50]=Y,e[51]=$,e[52]=f,e[53]=h,e[54]=oe,e[55]=O,e[56]=ie,e[57]=E,e[58]=R,e[59]=L,e[60]=F,e[61]=ce,e[62]=xe,e[63]=de,e[64]=P,e[65]=X,e[66]=ke):ke=e[66],ke}function Da(t){return!t.trigger_id}function za(t){return!!t.trigger_id}function Ga(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function Ha(t){return!t.hidden}function Va(){const t=A.c(59),e=K(),[s,r]=B.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={onNavigate:()=>r(!1)},t[0]=i):i=t[0];const a=Ba(i),o=Le()?.activeTask;let c;t[1]!==o?.title||t[2]!==a.activeTaskId||t[3]!==a.threads||t[4]!==e?(c=o?.title||a.threads.find(M=>M.id===a.activeTaskId)?.title||e("tasksPanel.taskRow.untitledTask"),t[1]=o?.title,t[2]=a.activeTaskId,t[3]=a.threads,t[4]=e,t[5]=c):c=t[5];const u=c;let l;t[6]!==a?(l=()=>{r(!1),a.openSearch()},t[6]=a,t[7]=l):l=t[7];const d=l;let m;t[8]!==e?(m=e("chat.threadsMenu.chats"),t[8]=e,t[9]=m):m=t[9];const f=s&&"bg-sidebar-accent";let h;t[10]!==f?(h=se("flex h-[34px] min-w-0 shrink items-center gap-1.5 rounded-lg px-2 text-sm text-foreground transition-colors hover:bg-accent focus-ring",f),t[10]=f,t[11]=h):h=t[11];let j;t[12]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(hs,{size:16,className:"shrink-0"}),t[12]=j):j=t[12];let y;t[13]!==u?(y=n.jsx("span",{className:"truncate max-w-[10rem] font-medium",children:u}),t[13]=u,t[14]=y):y=t[14];let v;t[15]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Ze,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[15]=v):v=t[15];let x;t[16]!==m||t[17]!==h||t[18]!==y?(x=n.jsx(Fe,{asChild:!0,children:n.jsx(Lt,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":m,className:h,children:[j,y,v]})})}),t[16]=m,t[17]=h,t[18]=y,t[19]=x):x=t[19];let g;t[20]!==e?(g=e("chat.threadsMenu.chats"),t[20]=e,t[21]=g):g=t[21];let b;t[22]!==g?(b=n.jsx(Re,{side:"bottom",children:g}),t[22]=g,t[23]=b):b=t[23];let S;t[24]!==b||t[25]!==x?(S=n.jsxs(Oe,{children:[x,b]}),t[24]=b,t[25]=x,t[26]=S):S=t[26];let p;t[27]!==a?(p=n.jsx(ua,{panel:a,className:"size-8"}),t[27]=a,t[28]=p):p=t[28];let k;t[29]!==e?(k=e("sidebar.taskGroupsList.searchChats"),t[29]=e,t[30]=k):k=t[30];let T;t[31]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(ps,{size:16}),t[31]=T):T=t[31];let N;t[32]!==d||t[33]!==k?(N=n.jsx(_e,{"aria-label":k,onClick:d,className:"size-8",children:T}),t[32]=d,t[33]=k,t[34]=N):N=t[34];let _;t[35]!==e?(_=e("sidebar.taskGroupsList.newChat"),t[35]=e,t[36]=_):_=t[36];let w;t[37]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(vt,{size:16}),t[37]=w):w=t[37];let I;t[38]!==a.newThread||t[39]!==_?(I=n.jsx(_e,{"aria-label":_,onClick:a.newThread,className:"size-8",children:w}),t[38]=a.newThread,t[39]=_,t[40]=I):I=t[40];let P;t[41]!==N||t[42]!==I?(P=n.jsxs("div",{className:"flex items-center gap-0.5",children:[N,I]}),t[41]=N,t[42]=I,t[43]=P):P=t[43];let L;t[44]!==p||t[45]!==P?(L=n.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[p,P]}),t[44]=p,t[45]=P,t[46]=L):L=t[46];let $;t[47]!==a?($=n.jsx("div",{className:"flex max-h-[60vh] min-h-0 flex-col gap-0.5 overflow-y-auto overscroll-contain",children:n.jsx(Oa,{panel:a})}),t[47]=a,t[48]=$):$=t[48];let E;t[49]!==L||t[50]!==$?(E=n.jsxs($t,{align:"start",side:"bottom",onOpenAutoFocus:Ka,className:"flex w-80 flex-col gap-2 p-2",children:[L,$]}),t[49]=L,t[50]=$,t[51]=E):E=t[51];let F;t[52]!==s||t[53]!==S||t[54]!==E?(F=n.jsxs(Et,{open:s,onOpenChange:r,children:[S,E]}),t[52]=s,t[53]=S,t[54]=E,t[55]=F):F=t[55];let R;return t[56]!==a.searchDialog||t[57]!==F?(R=n.jsxs(n.Fragment,{children:[F,a.searchDialog]}),t[56]=a.searchDialog,t[57]=F,t[58]=R):R=t[58],R}function Ka(t){return t.preventDefault()}function Ua(){const t=A.c(20),e=K(),{threads:s}=Je(),{createNewTask:r}=Qe(),i=Rt(),a=et();let o;t[0]!==a||t[1]!==s?(o=s.find(v=>v.id===a)?.branch??null,t[0]=a,t[1]=s,t[2]=o):o=t[2];const c=o;let u;t[3]!==i||t[4]!==r||t[5]!==c?(u=()=>{r(i,c)},t[3]=i,t[4]=r,t[5]=c,t[6]=u):u=t[6];const l=u;let d;t[7]!==e?(d=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=d):d=t[8];let m;t[9]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(vt,{size:16}),t[9]=m):m=t[9];let f;t[10]!==l||t[11]!==d?(f=n.jsx(Fe,{asChild:!0,children:n.jsx("button",{type:"button",onClick:l,"aria-label":d,className:"flex shrink-0 items-center rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-ring",children:m})}),t[10]=l,t[11]=d,t[12]=f):f=t[12];let h;t[13]!==e?(h=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=h):h=t[14];let j;t[15]!==h?(j=n.jsx(Re,{side:"bottom",children:h}),t[15]=h,t[16]=j):j=t[16];let y;return t[17]!==f||t[18]!==j?(y=n.jsxs(Oe,{children:[f,j]}),t[17]=f,t[18]=j,t[19]=y):y=t[19],y}function qa(t){const e=A.c(16),{virtualMcpId:s,taskId:r}=t,{openPanel:i}=Bt();let a;e[0]!==r||e[1]!==s?(a={virtualMcpId:s,taskId:r},e[0]=r,e[1]=s,e[2]=a):a=e[2];const{tabs:o,activeTab:c,mainOpen:u}=Dt(a);if(o.length===0)return null;let l;if(e[3]!==c||e[4]!==u||e[5]!==i||e[6]!==o||e[7]!==s){let m;e[9]!==c||e[10]!==u||e[11]!==i||e[12]!==s?(m=f=>{const h=f.id==="automations"?ss({activeTab:c,mainOpen:u}):u&&f.id===c;return n.jsxs(st.Tab,{active:h,onClick:()=>{h||(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:f.id,tab_kind:f.kind,was_active:!1}),i(f.id))},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(we,{icon:f.icon})}),f.title]},f.id)},e[9]=c,e[10]=u,e[11]=i,e[12]=s,e[13]=m):m=e[13],l=o.map(m),e[3]=c,e[4]=u,e[5]=i,e[6]=o,e[7]=s,e[8]=l}else l=e[8];let d;return e[14]!==l?(d=n.jsx(st.Tabs,{"data-tour":Ds.surfaceTabs,children:l}),e[14]=l,e[15]=d):d=e[15],d}function Wa(t){return{threadId:t.routeThreadId,providerKey:t.routeThreadId??t.fallbackKey}}const Ve="__mobile-main-panel-tab-select__",Ue="main";function Ya({tabs:t,activeTab:e,mainOpen:s,t:r}){const i=t.find(o=>o.id===e),a=r("mainPanelTabs.mobileMainPanelTabSelect.mainView");return s?i?.title??a:i?.title??t[0]?.title??a}const Za={kind:"component",Component:xs},Qa={kind:"component",Component:gs},Xa={kind:"component",Component:bs},Ja={kind:"component",Component:jn};function er({tabs:t,overlayEnabled:e,t:s}){return[{value:"chat",title:s("mainPanelTabs.mobileMainPanelTabSelect.chat"),icon:Za},...t.length>0?t.map(r=>({value:r.id,title:r.title,icon:r.icon})):[{value:Ue,title:s("mainPanelTabs.mobileMainPanelTabSelect.mainView"),icon:Ja}],...e?[{value:"board",title:s("mainPanelTabs.mobileMainPanelTabSelect.tasks"),icon:Qa},{value:"files",title:s("mainPanelTabs.mobileMainPanelTabSelect.library"),icon:Xa}]:[]]}function tr(t){const e=A.c(53),{virtualMcpId:s,taskId:r}=t,i=K(),a=Me(),{openPanel:o}=Bt();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const u=Se(c);let l;e[1]!==r||e[2]!==s?(l={virtualMcpId:s,taskId:r},e[1]=r,e[2]=s,e[3]=l):l=e[3];const{tabs:d,activeTab:m,mainOpen:f}=Dt(l),{org:h}=ae(),j=Ms();let y;e[4]!==h.id?(y=nt(h.id),e[4]=h.id,e[5]=y):y=e[5];const v=s===y;let x,g,b,S,p,k,T,N,_,w;if(e[6]!==m||e[7]!==f||e[8]!==a||e[9]!==v||e[10]!==o||e[11]!==h.id||e[12]!==u.org||e[13]!==u.taskId||e[14]!==j||e[15]!==i||e[16]!==d||e[17]!==s){S=Symbol.for("react.early_return_sentinel");e:{const L=er({tabs:d,overlayEnabled:!!(u.org&&u.taskId),t:i}),$=f?L.find(O=>O.value===m)?.value??Ue:"chat",E=L.find(O=>O.value===$),F=E?.title??Ya({tabs:d,activeTab:m,mainOpen:f,t:i});let R;e[28]!==a?(R=O=>{a({to:".",search:U=>({...U,...sn(O)}),replace:!0})},e[28]=a,e[29]=R):R=e[29];const M=R;let C;e[30]!==v||e[31]!==o||e[32]!==h.id||e[33]!==j||e[34]!==M||e[35]!==s?(C=O=>{if(O!==Ve){if(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:O,source:"mobile_select"}),zs({reportsOnly:j,onReportAgent:v,tabId:O})){o(O,{virtualmcpid:nt(h.id),search:ar});return}if(O==="chat"||O===Ue){M(O==="chat"?"chat":"main");return}o(O,{search:nr})}},e[30]=v,e[31]=o,e[32]=h.id,e[33]=j,e[34]=M,e[35]=s,e[36]=C):C=e[36];const G=C,z=L.find(O=>O.value!==$);if(L.length===2&&z){S=n.jsxs("button",{type:"button",onClick:()=>G(z.value),"aria-label":i("mainPanelTabs.mobileMainPanelTabSelect.switchTo",{name:z.title}),className:"flex h-10 min-w-0 max-w-[7.5rem] items-center gap-1.5 rounded-lg px-1.5 text-xs text-foreground transition-colors hover:bg-accent focus-ring",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(we,{icon:z.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:z.title})]});break e}g=kn,_=Ve,w=G;let H;e[37]!==i?(H=i("mainPanelTabs.mobileMainPanelTabSelect.view"),e[37]=i,e[38]=H):H=e[38],b=n.jsx(Sn,{"aria-label":H,className:"h-10! w-full min-w-0 max-w-[7.5rem] rounded-lg border-0 bg-transparent px-1.5 text-xs shadow-none [--shadow-edge:none]",children:n.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[E&&n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(we,{icon:E.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:F})]})}),x=Nn,p="end",k="w-56",e[39]!==F?(T=n.jsx(zt,{value:Ve,disabled:!0,hideCheck:!0,className:"hidden",children:F}),e[39]=F,e[40]=T):T=e[40],N=L.map(sr)}e[6]=m,e[7]=f,e[8]=a,e[9]=v,e[10]=o,e[11]=h.id,e[12]=u.org,e[13]=u.taskId,e[14]=j,e[15]=i,e[16]=d,e[17]=s,e[18]=x,e[19]=g,e[20]=b,e[21]=S,e[22]=p,e[23]=k,e[24]=T,e[25]=N,e[26]=_,e[27]=w}else x=e[18],g=e[19],b=e[20],S=e[21],p=e[22],k=e[23],T=e[24],N=e[25],_=e[26],w=e[27];if(S!==Symbol.for("react.early_return_sentinel"))return S;let I;e[41]!==x||e[42]!==p||e[43]!==k||e[44]!==T||e[45]!==N?(I=n.jsxs(x,{align:p,className:k,children:[T,N]}),e[41]=x,e[42]=p,e[43]=k,e[44]=T,e[45]=N,e[46]=I):I=e[46];let P;return e[47]!==g||e[48]!==b||e[49]!==I||e[50]!==_||e[51]!==w?(P=n.jsxs(g,{value:_,onValueChange:w,children:[b,I]}),e[47]=g,e[48]=b,e[49]=I,e[50]=_,e[51]=w,e[52]=P):P=e[52],P}function sr(t){return n.jsx(zt,{value:t.value,children:n.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(we,{icon:t.icon})}),n.jsx("span",{className:"min-w-0 truncate",children:t.title})]})},t.value)}function nr(t){return{...t,sidepanel:!1}}function ar(t){return{...t,thread:void 0,sidepanel:!1}}function rr(){const t=A.c(3),e=ns();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={select:ir},t[0]=s):s=t[0];const r=gt(s);if(!e||!r)return!1;let i;return t[1]!==r?(i=r==="app"||Tn.includes(r),t[1]=r,t[2]=i):i=t[2],i}function ir(t){const{staticData:e}=t.matches.findLast(lr)??{};return e?.siteEditorView?"site-editor":e?.mainView}function lr(t){return t.staticData.mainView}function or(t,e,s){const r=A.c(33),i=Xe(),{locator:a}=ae(),o=B.useSyncExternalStore(i.threads.subscribe,i.threads.get),c=B.useSyncExternalStore(i.threadsStatus.subscribe,i.threadsStatus.get);let u;r[0]!==t||r[1]!==o?(u=t===null?null:o.find(p=>p.id===t&&!p.partial)??null,r[0]=t,r[1]=o,r[2]=u):u=r[2];const l=u,[d,m]=B.useState(void 0),[f,h]=B.useState(t);f!==t&&(h(t),m(void 0));let j,y;r[3]!==d||r[4]!==t||r[5]!==l||r[6]!==i||r[7]!==c.kind?(j=()=>{t!==null&&(l||c.kind!=="loading"&&d===void 0&&(m("pending"),i.fetchThreadIntoSlot(t).then(p=>{m(p)})))},y=[t,l,c.kind,d,i],r[3]=d,r[4]=t,r[5]=l,r[6]=i,r[7]=c.kind,r[8]=j,r[9]=y):(j=r[8],y=r[9]),B.useEffect(j,y);let v;r[10]!==s||r[11]!==a||r[12]!==i||r[13]!==e?(v={mutationFn:async p=>i.create({id:p,virtual_mcp_id:e,...s?{branch:s}:{},...Ws(sessionStorage,a,p)})},r[10]=s,r[11]=a,r[12]=i,r[13]=e,r[14]=v):v=r[14];const x=as(v);let g,b;if(r[15]!==x||r[16]!==d||r[17]!==t||r[18]!==l||r[19]!==c.kind?(g=()=>{t!==null&&(l||d===null&&c.kind!=="loading"&&(x.isPending||x.variables!==t&&x.mutate(t)))},b=[t,l,d,c.kind,x],r[15]=x,r[16]=d,r[17]=t,r[18]=l,r[19]=c.kind,r[20]=g,r[21]=b):(g=r[20],b=r[21]),B.useEffect(g,b),t===null){let p;return r[22]===Symbol.for("react.memo_cache_sentinel")?(p={status:"ready",task:null},r[22]=p):p=r[22],p}if(l){let p;return r[23]!==l?(p={status:"ready",task:l},r[23]=l,r[24]=p):p=r[24],p}if(d&&typeof d=="object"){let p;return r[25]!==d?(p={status:"ready",task:d},r[25]=d,r[26]=p):p=r[26],p}if(x.data){let p;return r[27]!==x.data?(p={status:"ready",task:x.data},r[27]=x.data,r[28]=p):p=r[28],p}if(x.isError){let p;return r[29]!==x.error?(p={status:"error",error:x.error},r[29]=x.error,r[30]=p):p=r[30],p}if(x.isPending||c.kind!=="loading"){let p;return r[31]===Symbol.for("react.memo_cache_sentinel")?(p={status:"creating"},r[31]=p):p=r[31],p}let S;return r[32]===Symbol.for("react.memo_cache_sentinel")?(S={status:"loading"},r[32]=S):S=r[32],S}const cr=50;function dr(t,e){const s=A.c(15),{org:r}=ae(),i=Pe(),{data:a}=pe.useSession(),o=a?.user?.id??"";let c;s[0]!==r.id||s[1]!==o||s[2]!==t?(c=fe.agentEntryThreads(r.id,o,t),s[0]=r.id,s[1]=o,s[2]=t,s[3]=c):c=s[3];const u=e&&!!o;let l;s[4]!==i||s[5]!==t?(l=async()=>{try{return(await i.call("COLLECTION_THREADS_LIST",{limit:cr,offset:0,orderBy:[{field:["updated_at"],direction:"desc"}],where:{hidden:!1,created_by:"me",virtual_mcp_id:t}})).items}catch{return[]}},s[4]=i,s[5]=t,s[6]=l):l=s[6];let d;s[7]!==c||s[8]!==u||s[9]!==l?(d={queryKey:c,enabled:u,staleTime:0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,queryFn:l},s[7]=c,s[8]=u,s[9]=l,s[10]=d):d=s[10];const m=me(d);if(!e||!o){let h;return s[11]===Symbol.for("react.memo_cache_sentinel")?(h={status:"idle"},s[11]=h):h=s[11],h}if(!m.data||m.isFetching){let h;return s[12]===Symbol.for("react.memo_cache_sentinel")?(h={status:"loading"},s[12]=h):h=s[12],h}let f;return s[13]!==m.data?(f={status:"ready",threads:m.data},s[13]=m.data,s[14]=f):f=s[14],f}function ur(t){const e=A.c(13),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=Se(r);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const o=Ae(a);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={select:fr},e[2]=c):c=e[2];const u=gt(c),{org:l}=ae();let d;e[3]!==l||e[4]!==i.agentId||e[5]!==i.legacyView||e[6]!==i.org||e[7]!==u||e[8]!==o?(d=i.org?rs({pathname:u,org:i.org,pathAgentId:i.agentId,pathLegacyView:i.legacyView,fallbackAgentId:je(l.id).id,search:o}):null,e[3]=l,e[4]=i.agentId,e[5]=i.legacyView,e[6]=i.org,e[7]=u,e[8]=o,e[9]=d):d=e[9];const m=d;let f;return e[10]!==s||e[11]!==m?(f=m?n.jsx(tt,{target:m}):s,e[10]=s,e[11]=m,e[12]=f):f=e[12],f}function fr(t){return t.matches.at(-1)?.pathname??t.location.pathname}function mr(){const t=A.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=Se(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const i=Ae(r),{org:a}=ae(),{org:o,taskId:c}=s;if(!o||c===void 0)return null;let u;return t[2]!==o||t[3]!==a.id||t[4]!==i||t[5]!==c?(u=is({org:o,taskId:c,fallbackAgentId:je(a.id).id,search:i}),t[2]=o,t[3]=a.id,t[4]=i,t[5]=c,t[6]=u):u=t[6],u}function hr(){const t=A.c(2),e=mr();let s;return t[0]!==e?(s=e?n.jsx(tt,{target:e}):null,t[0]=e,t[1]=s):s=t[1],s}function pr(){const t=A.c(6),e=wn(),s=Me();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const{preview:i}=Ae(r);if(!e||!i)return null;let a;t[1]!==s?(a=()=>s({to:".",search:xr}),t[1]=s,t[2]=a):a=t[2];let o;return t[3]!==i||t[4]!==a?(o=n.jsx(Cn,{previewPath:i,onClose:a,showSeeInLibrary:!0}),t[3]=i,t[4]=a,t[5]=o):o=t[5],o}function xr(t){const{preview:e,...s}=t;return s}function gr(t){const e=A.c(11),{children:s}=t,r=K();let i;e[0]!==r?(i=r("agentShellLayout.agentShellLayout.chatLoadingError"),e[0]=r,e[1]=i):i=e[1];let a;e[2]!==i?(a=n.jsx("div",{role:"alert",className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:i}),e[2]=i,e[3]=a):a=e[3];let o;e[4]!==s?(o=s??n.jsx(oa,{}),e[4]=s,e[5]=o):o=e[5];let c;e[6]!==o?(c=n.jsx(Ie,{children:o}),e[6]=o,e[7]=c):c=e[7];let u;return e[8]!==a||e[9]!==c?(u=n.jsx(pt,{fallback:a,children:c}),e[8]=a,e[9]=c,e[10]=u):u=e[10],u}function br(t){const e=A.c(5),{threadId:s,children:r}=t;if(s===null){let a;return e[0]!==r?(a=n.jsx(W.ThreadlessProvider,{children:r}),e[0]=r,e[1]=a):a=e[1],a}let i;return e[2]!==r||e[3]!==s?(i=n.jsx(W.ActiveTaskProvider,{taskId:s,children:r}),e[2]=r,e[3]=s,e[4]=i):i=e[4],i}function vr(t){const e=A.c(3),{onNewTaskRef:s,createNewTask:r}=t;let i;return e[0]!==r||e[1]!==s?(i=()=>(s.current=r,()=>{s.current=null}),e[0]=r,e[1]=s,e[2]=i):i=e[2],B.useLayoutEffect(i),null}function yr({virtualMcpId:t,hasActiveRepository:e,sandboxMap:s,children:r}){const i=K(),{currentBranch:a,activeTask:o,setCurrentTaskBranch:c}=$e(),{data:u}=pe.useSession(),l=u?.user?.id,d=!Cs(o?.harness_id),m=Qs({agentSandboxMap:s,threadSandboxMap:o?.metadata?.sandboxMap,userId:l,ownerId:o?.created_by,branch:a}),f=e||Hs(o?.metadata),h=B.useRef(null),j=d&&Xs({threadLoaded:!!o,isOwner:!!l&&o?.created_by===l,hasActiveRepository:f,branch:a??null,attempted:h.current===(o?.id??null)});B.useEffect(()=>{!j||!o||(h.current=o.id,c(Ct(u?.user?.name||u?.user?.email?.split("@")[0])))},[j,o,u,c]);const y=jt(t),v=Ee(t),x=Mt(v,a),{releases:g,createRelease:b}=Vs(t),p=!!l&&o?.created_by===l&&!!a&&a!==x&&!g.some(L=>L.branch===a),k=B.useRef(null);B.useEffect(()=>{!p||!a||k.current!==a&&(k.current=a,b({branch:a,name:Us(g,i("thread.branchPicker.defaultVersionName")),color:Ks(g.length),createdBy:l,createdAt:new Date().toISOString()}).catch(()=>{}))},[p,a,g,b,l,i]);const T=y.resolved?y.runtime:null,N=Js(t,a??void 0),w=(l&&a?In(m?.[l]?.[a]):{})["agent-sandbox"]??null,I=w?.previewUrl??null,P=d&&T!=="cms"&&(!!w||N);return d?T==="cms"?n.jsx(lt,{children:r},`${t}:${a??"no-branch"}:${o?.id??""}`):n.jsx(Ss,{virtualMcpId:t,branch:a??null,previewUrl:I,enabled:P,children:n.jsx(en,{executionEnabled:d,virtualMcpId:t,branch:a??null,userId:l??null,hasActiveRepository:f,vmEntry:w,threadId:o?.id??null,children:n.jsx(lt,{children:r},`${t}:${a??"no-branch"}:${o?.id??""}`)})},o?.id??"no-thread"):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex h-full rounded-[0.75rem] bg-background shadow-edge",children:n.jsx(At,{image:n.jsx(We,{size:48,className:"text-muted-foreground"}),title:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWeb"),description:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWebDescription")})})})}function jr(){const t=A.c(16),e=K(),{toggleSidebar:s}=ys(),{virtualMcpId:r,taskId:i}=$e();let a;t[0]!==e?(a=e("layouts.shellControls.toggleSidebar"),t[0]=e,t[1]=a):a=t[1];let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(vs,{size:16}),t[2]=o):o=t[2];let c;t[3]!==a||t[4]!==s?(c=n.jsx(_e,{className:"md:hidden",onClick:s,"aria-label":a,children:o}),t[3]=a,t[4]=s,t[5]=c):c=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Va,{}),t[6]=u):u=t[6];let l;t[7]!==c?(l=n.jsxs(De.Topbar.Left,{children:[c,u]}),t[7]=c,t[8]=l):l=t[8];let d;t[9]!==i||t[10]!==r?(d=n.jsx("div",{className:"min-w-0 md:hidden",children:n.jsx(tr,{virtualMcpId:r,taskId:i})}),t[9]=i,t[10]=r,t[11]=d):d=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(De.Topbar.Right,{className:"shrink-0",children:n.jsx(Ua,{})}),t[12]=m):m=t[12];let f;return t[13]!==l||t[14]!==d?(f=n.jsxs(De.Topbar,{className:"border-b border-border/60 px-3",children:[l,d,m]}),t[13]=l,t[14]=d,t[15]=f):f=t[15],f}function Sr(t){const e=A.c(22),{layout:s,onNewTaskRef:r,createNewTask:i}=t,{virtualMcpId:a,taskId:o}=$e(),c=yn()??"overview",u=rr(),[l,d]=B.useState(null),m=l===c,f=u?m:s.threadOpen;let h;e[0]!==c||e[1]!==s||e[2]!==u||e[3]!==m?(h=u?()=>d(m?null:c):s.toggleThread,e[0]=c,e[1]=s,e[2]=u,e[3]=m,e[4]=h):h=e[4];const j=h;let y;e[5]!==i||e[6]!==r?(y=n.jsx(vr,{onNewTaskRef:r,createNewTask:i}),e[5]=i,e[6]=r,e[7]=y):y=e[7];let v;e[8]!==o||e[9]!==a?(v=n.jsx(qa,{virtualMcpId:a,taskId:o}),e[8]=o,e[9]=a,e[10]=v):v=e[10];let x,g;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(it.Thread,{topbar:n.jsx(jr,{}),children:n.jsx(gr,{})}),g=n.jsx(bt,{}),e[11]=x,e[12]=g):(x=e[11],g=e[12]);let b;e[13]!==c||e[14]!==s||e[15]!==v||e[16]!==f||e[17]!==j?(b=n.jsxs(it,{...s,threadOpen:f,toggleThread:j,contentKey:c,contentNavigation:v,children:[x,g]}),e[13]=c,e[14]=s,e[15]=v,e[16]=f,e[17]=j,e[18]=b):b=e[18];let S;return e[19]!==y||e[20]!==b?(S=n.jsxs(n.Fragment,{children:[y,b]}),e[19]=y,e[20]=b,e[21]=S):S=e[21],S}function kr(){const t=K(),e=Me(),s=on(),{create:r}=It(),{org:i}=ae(),o=Se({strict:!1}).org??"",c=Ae({strict:!1}),u=et(),l=Rt(),d=Ft(),[m]=B.useState(()=>crypto.randomUUID()),{data:f}=pe.useSession(),[h]=B.useState(()=>Ct(f?.user?.name||f?.user?.email?.split("@")[0])),j=Xe(),y=B.useSyncExternalStore(j.threads.subscribe,j.threads.get),v=B.useSyncExternalStore(j.threadsStatus.subscribe,j.threadsStatus.get),x=Ee(l),g=!!(x&&_t(x)),b=Mt(x,null),S=u===null&&!!d&&!!x,p=M=>Zs(M,l,f?.user?.id,Pt(x?.metadata),g,{baseBranch:b}),k=S&&v.kind!=="loading"?p(y):void 0,T=dr(l,S&&v.kind!=="loading"&&!k),N=or(u,l,h);ca(N.status==="ready"?N.task:null);const _=x?.metadata?.ui?.layout??null,w=_?{defaultMainView:_.defaultMainView??null,chatDefaultOpen:_.chatDefaultOpen??null}:null,I=nn(w),{threadId:P,providerKey:L}=Wa({routeThreadId:u,fallbackKey:m}),$=async()=>{const M=crypto.randomUUID(),C=y.find(G=>G.id===P)?.branch??null;try{await r({id:M,virtual_mcp_id:l,...C?{branch:C}:{}})}catch{}s(M,()=>({}))},E=B.useRef(null);B.useEffect(()=>{const M=C=>{Gs(C)&&C.shiftKey&&C.code==="KeyS"&&!C.repeat&&(C.preventDefault(),E.current?.())};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[]);const F=N.status==="ready"?N.task:null,R=F?.virtual_mcp_id;if(F&&R&&!cn({routeAgentId:l,threadAgentId:R})){const M=ls({org:o,agentId:R,superAgentId:je(i.id).id});return n.jsx(tt,{target:{route:M,search:{thread:F.id,sidepanel:c.sidepanel,mainpanel:c.mainpanel,autosend:c.autosend}}})}if(S){if(v.kind==="loading"||T.status==="loading")return n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background shadow-edge rounded-[0.75rem] text-sm text-muted-foreground",children:[n.jsx(ve,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})});const C=(k??(T.status==="ready"?p(T.threads):void 0))?.id??(g?m:null);if(C)return n.jsx(os,{to:".",replace:!0,search:G=>({...G,thread:C})})}return N.status==="creating"||N.status==="loading"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background shadow-edge rounded-[0.75rem] text-sm text-muted-foreground",children:[n.jsx(ve,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})}):N.status==="error"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"alert",className:"flex flex-col h-full items-center justify-center gap-2 bg-background shadow-edge rounded-[0.75rem] p-8 text-sm",children:[n.jsx("div",{className:"font-medium",children:t("agentShellLayout.agentShellLayout.taskUnavailable")}),n.jsx("div",{className:"text-muted-foreground",children:N.error.message})]})}):x?n.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:n.jsx(W.Provider,{virtualMcpId:l,task:N.status==="ready"?N.task:null,children:n.jsx(_s,{layout:I,children:n.jsx(yr,{virtualMcpId:l,hasActiveRepository:g,sandboxMap:x.metadata?.sandboxMap,children:n.jsx(br,{threadId:P,children:n.jsx(Ie,{children:n.jsx(Sr,{layout:I,onNewTaskRef:E,createNewTask:$})})},L)})})},l)}):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden shadow-edge rounded-[0.75rem]",children:n.jsx(At,{image:n.jsx(We,{size:48,className:"text-muted-foreground"}),title:t("agentShellLayout.agentShellLayout.agentNotFound"),description:t("agentShellLayout.agentShellLayout.agentNotFoundDescription",{virtualMcpId:l}),actions:n.jsx(qe,{variant:"outline",onClick:()=>e({to:"/$org",params:{org:o}}),children:t("agentShellLayout.agentShellLayout.goToOrgHome")})})})})}function Io(){const t=A.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=Se(e);if(s.taskId!==void 0){let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(hr,{}),t[1]=i):i=t[1],i}if(s._splat!==void 0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(bt,{}),t[2]=i):i=t[2],i}let r;return t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Ie,{children:n.jsx(ur,{children:n.jsx(_n,{children:n.jsxs(Pn,{children:[n.jsx(kr,{}),n.jsx(pr,{})]})})})}),t[3]=r):r=t[3],r}export{Io as default};
|
|
1
|
+
import{c as A,a2 as ae,a as pe,an as Pe,K as fe,m as me,b as K,r as B,l as se,j as n,h as ve,B as qe,aL as je,aK as Ie,H as pt,y as he,v as Wt,aM as Yt,s as Zt,q as Qt,D as Xt,aN as Jt,au as xt,t as es,av as ts,d as Me,n as st,aO as ss,f as Se,M as nt,aa as ns,k as gt,e as as,u as Ae,aP as rs,aQ as is,O as bt,aR as ls,N as os,P as De}from"./index-CaH7O3hJ.js";import{i as We}from"./AlertCircle-Ctbquk5a.js";import{F as cs,G as at,A as ye,H as ds,I as us,j as fs,J as ms,K as hs,L as ps,M as vt,N as xs,n as gs,k as bs,m as vs}from"./agent-icon-U4gZaLOQ.js";import{c as ys}from"./use-sidebar-collapsed-DPHQfMII.js";import{T as _e}from"./toolbar-icon-button-BPY5dUh9.js";import{C as W,w as js,S as Ss}from"./index-CJu3ft8V.js";import{s as yt,C as ks,u as Ns,a as jt,V as Ts,b as _s}from"./input-D2sd1bar.js";import{u as Le,b as Ye,c as $e,d as St,e as ws,s as Cs}from"./chat-context-_d3c57p1.js";import{u as Ps,s as kt}from"./use-ai-providers-D1TJRnIR.js";import{b as Nt,a as Is,u as Ms}from"./use-organization-settings-DhvN44pQ.js";import{i as As}from"./CheckCircle-C2ndOEUO.js";import{s as rt}from"./XClose-dOW_RI9u.js";import{a as Ee,b as Ls,c as Tt,g as _t}from"./repository-binding-BLgLcT4o.js";import{I as wt}from"./integration-icon-DCiBepJw.js";import{c as $s}from"./use-decopilot-events-AlKmmETJ.js";import{t as Ze}from"./ChevronUp-C8mqlnDX.js";import{O as Es}from"./pair-5gOZrfkD.js";import{u as Fs,a as Rs}from"./use-thread-outputs-jyAHyZHI.js";import{u as Os}from"./use-deco-credits-Dx8wT8P5.js";import{a as Qe,f as Bs,L as Ds,s as zs,b as Gs}from"./shell-layout-vQvYndIW.js";import{a as Hs}from"./use-main-schema-v8-CZLsOlEV.js";import{g as Ct,u as Vs,n as Ks,a as Us}from"./use-releases-DQ--CsAF.js";import{u as qs,d as Pt,a as Xe,b as Je,c as It,e as Ws}from"./thread-intent-DKuqiaG7.js";import{f as Ys,c as Mt,d as Zs}from"./use-navigate-to-agent-Bt0oZ-ou.js";import{o as Qs,s as Xs,u as Js,S as en}from"./sandbox-lifecycle-context-v9W7lV1M.js";import{E as At}from"./empty-state-Bok1L2hc.js";import{t as tn,m as sn,u as nn}from"./use-chat-layout-state-BNudmQ0u.js";import{C as it}from"./index-DUXVtfV1.js";import{a as Lt,b as $t,P as Et}from"./popover-DSRFfUdL.js";import{T as Fe,a as Re,c as Oe}from"./tooltip-B5RmO6BW.js";import{T as an,a as rn}from"./toggle-group-CtdhsZGp.js";import{u as Ft,a as et,r as ln,b as Rt,c as on,d as cn}from"./thread-route-CQ0phZyI.js";import{c as dn,C as un,a as fn,b as mn,e as hn,d as pn}from"./command-C7n5qLsN.js";import{i as Ot}from"./ZoomOut-BfQx-fBr.js";import{g as xn,S as gn}from"./task-status-VcYcBtq_.js";import{a as bn}from"./format-time-Cq80KKvY.js";import{u as vn}from"./use-clock-tick-D3FoyBXt.js";import{a as Bt,u as yn}from"./use-panel-navigate-DoD4Atgz.js";import{u as Dt}from"./use-main-panel-tabs-BrJK-bL3.js";import{T as we}from"./tab-icon-glyph-BpaLtZlY.js";import{a as jn}from"./UserSquare-Drp4z0v0.js";import{b as Sn,c as zt,S as kn,d as Nn}from"./select-CSQbGY9x.js";import{L as Tn}from"./project-apps-CajNRGrz.js";import{L as tt,a as _n}from"./legacy-main-redirect-mSx9JMxj.js";import{u as wn}from"./use-mobile-DCpa1RnA.js";import{L as Cn}from"./preview-dialog-HJF1l34b.js";import{O as Pn}from"./markdown-CA3yd3L6.js";import{B as lt}from"./blocks-preview-workspace-context-Ca46yWEV.js";import{p as In}from"./virtual-mcp-CMZ8dHEU.js";import"./Tool01-BM29_KWq.js";import"./ArrowUp-bYg1aEOe.js";import"./ArrowLeft-DZ0mAFgb.js";import"./LinkBroken01-BJx0R97x.js";import"./ShoppingBag01-BMRnsG58.js";import"./Building02-BHIVlbfK.js";import"./ChevronSelectorVertical-DaUdbCWk.js";import"./Copy01-DC8f0fwU.js";import"./CreditCard01-P7j8oDkg.js";import"./DotsVertical-BvwGTDkC.js";import"./Image01-D7F4wuKx.js";import"./Globe04-D6C-ihBU.js";import"./SwitchHorizontal01-CshMTQzi.js";import"./Key01-u4HXXUPa.js";import"./Link01-BoUupQbW.js";import"./Minus-C1PMcNV0.js";import"./Monitor01-D3VwU2ni.js";import"./Sun-sKGpeIhM.js";import"./Play-DxsFk4r2.js";import"./Plus-BDveVGJf.js";import"./SearchMd-Cuf45jFP.js";import"./Trash01-D92WhXf2.js";import"./Upload01-BSDy4f7m.js";import"./User01-Cn3JqTjv.js";import"./Users01-Cxbx87gg.js";import"./sheet-C-yunzji.js";import"./sandbox-url-D3mC8qhT.js";import"./backoff-CrEUbyZT.js";import"./tool-namespace-DTl3so75.js";import"./drawer-ZlYTI3Z6.js";import"./collection-search-gW4FCqmq.js";import"./use-mcp-client-MRThuZpK.js";import"./auth-hgpoCSIS.js";import"./use-mcp-prompts-DHm-ZTib.js";import"./usage-stats-BkcKNXzu.js";import"./form-Dpwt-9St.js";import"./label-Cnc4HQwP.js";import"./utils-CVEq3hMx.js";import"./use-copy-d7X6hrKI.js";import"./index-BpRXpcv4.js";import"./checkbox-CUzk21sc.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-RpIBVCkY.js";import"./feature-paywall-D-GfxA1X.js";import"./plan-ladder-BydnH1hR.js";import"./icon-button-CwrVRVUS.js";import"./file-type-icon-DPqHd815.js";import"./location-V0VwTJTt.js";import"./autosend-BZOm698U.js";import"./chat-draft-CKcHhXuF.js";import"./tabs-2NCCfhSA.js";import"./active-indicator-CCMhAsc_.js";import"./use-open-billing-url-B2NuYLXS.js";import"./input-DN6U5jAj.js";import"./suggestion-Wgq7DDQo.js";import"./use-org-fs-D_4Q985K.js";import"./useInfiniteQuery-ZoWXsJcj.js";import"./infiniteQueryObserver-u-Zd7Oxq.js";import"./question-004-sINsf4GQ.js";import"./use-members-h3MYd8gX.js";import"./use-org-auth-client-CL0a2tPL.js";import"./add-connection-dialog-B0vtW1sl.js";import"./extract-connection-data-CNLani4P.js";import"./metadata-D72DunRR.js";import"./connection-Dik4epzq.js";import"./url-slug-B41xLFy_.js";import"./connection-card-DCnmTKpJ.js";import"./connection-slug-CITJ0kGN.js";import"./slugify-CEUa2lfQ.js";import"./textarea-CxhXyMKI.js";import"./use-connection-BwU_KLSF.js";import"./schema-Cx9ZLa-H.js";import"./connection-form-helpers-ta2yIvIb.js";import"./authenticate-and-persist-oauth-jn1R1qId.js";import"./mcp-oauth-3Gakbc_U.js";import"./mcp-oauth-CxgfM8zh.js";import"./collection-tabs-DIFXv7hR.js";import"./badge-Cnnepvq1.js";import"./use-infinite-scroll-BO0n6TVn.js";import"./useSuspenseInfiniteQuery-D2W70ffp.js";import"./use-task-board-events-CSRq29Tm.js";import"./task-board-DRNr9Dsj.js";import"./schema-BdFq22Hl.js";import"./watch-sse-pool-DwBbAQ97.js";import"./collapsible-CeBZpglT.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Xaw0krD3.js";import"./types-Bt5yyj-z.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-project-scope-Cq4vb2Sy.js";import"./project-icon-njec1yh1.js";import"./new-project-dialog-DpHJ0D5s.js";import"./repository-import-picker-lphgZTGu.js";import"./repository-picker-Dadd-3sc.js";import"./use-debounced-value-DJkh4QSx.js";import"./required-auth-layout-e3_y0Tns.js";import"./use-org-sso-LC63-uuA.js";import"./serial-task-queue-CGOeQgpr.js";import"./delay-CnY5UFtP.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resizable-D4wP3vt7.js";import"./index-C9OgV5Vt.js";import"./index-DK4LlU65.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-tools-DiCKzhUm.js";import"./resolve-tab-icon-CE5OwNrK.js";import"./use-task-metadata-ToXrxOCT.js";import"./preview-source-BsRLGWUP.js";import"./use-project-native-view-presence-DF_1PP5b.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-tsH4be9V.js";import"./site-slug-DebpOoQq.js";import"./index-BdQq_4o_.js";import"./preview-content-hWNiqB3L.js";import"./file-share-button-CB7fcIJI.js";import"./file-preview-DSIiiWjA.js";import"./utils-DzhKsxx8.js";import"./editor-BFHySd1K.js";function Mn({isThreadLocked:t,hasCloudProviderKeys:e,sandboxOnlyChats:s,canRunClaudeCode:r}){return t?null:!e&&!(s&&r)?"provider":s&&!r?"claude-code-provider":null}function An(){const t=A.c(26),e=Ps(),s=Le(),r=Nt(),i=Is("chat_harness_codex"),{org:a}=ae(),{data:o}=pe.useSession(),c=o?.user.id??"",u=Pe(),l=e.some($n);let d;t[0]!==a.id||t[1]!==c?(d=fe.claudeSubscription(a.id,c),t[0]=a.id,t[1]=c,t[2]=d):d=t[2];let m;t[3]!==u?(m=()=>u.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=u,t[4]=m):m=t[4];const f=r&&!i&&!l;let h;t[5]!==d||t[6]!==m||t[7]!==f?(h={queryKey:d,queryFn:m,enabled:f},t[5]=d,t[6]=m,t[7]=f,t[8]=h):h=t[8];const j=me(h);let y;t[9]!==a.id?(y=fe.githubCopilot(a.id),t[9]=a.id,t[10]=y):y=t[10];let v;t[11]!==u?(v=()=>u.call("GITHUB_COPILOT_STATUS",{}),t[11]=u,t[12]=v):v=t[12];const x=r&&!i&&!l;let g;t[13]!==y||t[14]!==v||t[15]!==x?(g={queryKey:y,queryFn:v,enabled:x},t[13]=y,t[14]=v,t[15]=x,t[16]=g):g=t[16];const b=me(g);let S;t[17]!==a.id||t[18]!==c?(S=fe.codexSubscription(a.id,c),t[17]=a.id,t[18]=c,t[19]=S):S=t[19];let p;t[20]!==u?(p=()=>u.call("CODEX_SUBSCRIPTION_STATUS",{}),t[20]=u,t[21]=p):p=t[21];const k=r&&i;let T;t[22]!==k||t[23]!==S||t[24]!==p?(T={queryKey:S,queryFn:p,enabled:k},t[22]=k,t[23]=S,t[24]=p,t[25]=T):T=t[25];const N=me(T);return r&&i&&!s?.isThreadLocked?e.some(Ln)||N.data?.connected!==!1?null:"codex-provider":Mn({isThreadLocked:s?.isThreadLocked??!1,hasCloudProviderKeys:e.length>0,sandboxOnlyChats:r,canRunClaudeCode:l||j.data?.connected!==!1||b.data?.connected!==!1||!!b.data?.orgShare})}function Ln(t){return yt(t.providerId)}function $n(t){return kt(t.providerId)}function be(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function ze(t){if(!t)return"—";const e=typeof t=="string"?new Date(t):t;return isNaN(e.getTime())?"—":e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function En(t){return t?t.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function Fn(t){const e=A.c(4),{items:s}=t;let r;e[0]!==s?(r=s.map(Rn),e[0]=s,e[1]=r):r=e[1];let i;return e[2]!==r?(i=n.jsx("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6",children:r}),e[2]=r,e[3]=i):i=e[3],i}function Rn(t){return n.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.label}),n.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:t.value})]},t.label)}function On(t){const e=A.c(33),{userTokens:s,assistantTokens:r,otherTokens:i}=t,a=K(),o=s+r+i,c=o>0?s/o*100:0,u=o>0?r/o*100:0,l=o>0?i/o*100:0;let d;e[0]!==c?(d=c>0&&n.jsx("div",{className:"h-full bg-chart-1",style:{width:`${c}%`}}),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==u?(m=u>0&&n.jsx("div",{className:"h-full bg-chart-2",style:{width:`${u}%`}}),e[2]=u,e[3]=m):m=e[3];let f;e[4]!==l?(f=l>0&&n.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${l}%`}}),e[4]=l,e[5]=f):f=e[5];let h;e[6]!==d||e[7]!==m||e[8]!==f?(h=n.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[d,m,f]}),e[6]=d,e[7]=m,e[8]=f,e[9]=h):h=e[9];let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=j):j=e[10];let y;e[11]!==a||e[12]!==c?(y=a("chat.contextPanel.userPercent",{pct:c.toFixed(1)}),e[11]=a,e[12]=c,e[13]=y):y=e[13];let v;e[14]!==y?(v=n.jsxs("div",{className:"flex items-center gap-1.5",children:[j,n.jsx("span",{className:"text-xs text-muted-foreground",children:y})]}),e[14]=y,e[15]=v):v=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[16]=x):x=e[16];let g;e[17]!==u||e[18]!==a?(g=a("chat.contextPanel.assistantPercent",{pct:u.toFixed(1)}),e[17]=u,e[18]=a,e[19]=g):g=e[19];let b;e[20]!==g?(b=n.jsxs("div",{className:"flex items-center gap-1.5",children:[x,n.jsx("span",{className:"text-xs text-muted-foreground",children:g})]}),e[20]=g,e[21]=b):b=e[21];let S;e[22]!==l||e[23]!==i||e[24]!==a?(S=i>0&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.otherPercent",{pct:l.toFixed(1)})})]}),e[22]=l,e[23]=i,e[24]=a,e[25]=S):S=e[25];let p;e[26]!==b||e[27]!==S||e[28]!==v?(p=n.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[v,b,S]}),e[26]=b,e[27]=S,e[28]=v,e[29]=p):p=e[29];let k;return e[30]!==p||e[31]!==h?(k=n.jsxs("div",{className:"flex flex-col gap-2",children:[h,p]}),e[30]=p,e[31]=h,e[32]=k):k=e[32],k}function Bn(t){const e=A.c(14),{agentId:s,isError:r}=t,i=Ee(s),a=K();let o;e[0]!==i?.title||e[1]!==a?(o=i?.title??a("chat.subtask.subtaskNoun"),e[0]=i?.title,e[1]=a,e[2]=o):o=e[2];const c=o,u=i?.icon??null;let l;e[3]!==u||e[4]!==c?(l=n.jsx(wt,{icon:u,name:c,size:"xs",className:"size-6 rounded-md shrink-0"}),e[3]=u,e[4]=c,e[5]=l):l=e[5];const d=r?"text-destructive":"text-foreground";let m;e[6]!==d?(m=se("shrink-0 font-medium",d),e[6]=d,e[7]=m):m=e[7];let f;e[8]!==c||e[9]!==m?(f=n.jsx("span",{className:m,children:c}),e[8]=c,e[9]=m,e[10]=f):f=e[10];let h;return e[11]!==l||e[12]!==f?(h=n.jsxs(n.Fragment,{children:[l,f]}),e[11]=l,e[12]=f,e[13]=h):h=e[13],h}function Dn(t){const e=A.c(12),{isError:s}=t,r=K();let i;e[0]!==r?(i=r("chat.contextPanel.subtask"),e[0]=r,e[1]=i):i=e[1];const a=i;let o;e[2]!==a?(o=n.jsx(wt,{icon:null,name:a,size:"xs",className:"size-6 rounded-md shrink-0"}),e[2]=a,e[3]=o):o=e[3];const c=s?"text-destructive":"text-foreground";let u;e[4]!==c?(u=se("shrink-0 font-medium",c),e[4]=c,e[5]=u):u=e[5];let l;e[6]!==a||e[7]!==u?(l=n.jsx("span",{className:u,children:a}),e[6]=a,e[7]=u,e[8]=l):l=e[8];let d;return e[9]!==o||e[10]!==l?(d=n.jsxs(n.Fragment,{children:[o,l]}),e[9]=o,e[10]=l,e[11]=d):d=e[11],d}function zn(t){const e=A.c(18),{part:s}=t,r=s.input?.agent_id,i=s.state==="input-streaming"||s.state==="input-available"||s.state==="output-available"&&s.preliminary===!0,a=s.state==="output-error",o=s.state==="approval-requested";let c;e[0]!==a?(c=n.jsx(Dn,{isError:a}),e[0]=a,e[1]=c):c=e[1];let u;e[2]!==r||e[3]!==a?(u=n.jsx(Bn,{agentId:r,isError:a}),e[2]=r,e[3]=a,e[4]=u):u=e[4];let l;e[5]!==c||e[6]!==u?(l=n.jsx(B.Suspense,{fallback:c,children:u}),e[5]=c,e[6]=u,e[7]=l):l=e[7];let d;e[8]!==s.input?(d=s.input?.prompt&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted-foreground/50",children:"·"}),n.jsx("span",{className:"truncate text-muted-foreground",children:s.input.prompt})]}),e[8]=s.input,e[9]=d):d=e[9];let m;e[10]!==o||e[11]!==a||e[12]!==i?(m=n.jsx("span",{className:"ml-auto shrink-0",children:i?n.jsx(ve,{className:"size-3 text-muted-foreground"}):a?n.jsx(cs,{size:12,className:"text-destructive"}):o?n.jsx(We,{size:12,className:"text-warning"}):n.jsx(As,{size:12,className:"text-success"})}),e[10]=o,e[11]=a,e[12]=i,e[13]=m):m=e[13];let f;return e[14]!==l||e[15]!==d||e[16]!==m?(f=n.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[l,d,m]}),e[14]=l,e[15]=d,e[16]=m,e[17]=f):f=e[17],f}function Gn(t){const e=A.c(51),{onClose:s,back:r,className:i}=t,a=K(),[o,c]=B.useState(null),{messages:u}=Ye(),{activeTask:l}=$e(),{selectedModel:d,selectedVirtualMcp:m}=St(),f=ws(u),h=[...u].reverse().find(ea),j=h?.metadata?.usage,y=[...u].reverse().find(Jn)?.metadata?.models?.thinking,v=h?.metadata?.modelLimits?.contextWindow??(!y||y.id===d?.modelId?d?.limits?.contextWindow:null)??null,x=j?.contextTokens??0,g=v&&v>0?(x/v*100).toFixed(1):null,b=u;let S;e[0]!==b?(S=b.filter(Xn).reduce(Qn,0),e[0]=b,e[1]=S):S=e[1];const p=S,k=u;let T;e[2]!==k?(T=k.filter(Zn).reduce(Yn,0),e[2]=k,e[3]=T):T=e[3];const N=T,_=Math.max(0,f.totalTokens-p-N),w=u[0],I=u.at(-1),P=w?.metadata?.created_at??l?.created_at,L=I?.metadata?.created_at??l?.updated_at,$=u.filter(Wn),E=u.flatMap(Un),F=En(y?.id??d?.modelId),R=m?.title??"Super Agent",M=$s(),C=[{label:a("chat.contextPanel.sessionLabel"),value:l?.title??a("chat.contextPanel.newChat")},{label:a("chat.contextPanel.messagesLabel"),value:$.length},{label:a("chat.contextPanel.agentLabel"),value:R},...M?[{label:a("chat.contextPanel.modelLabel"),value:F}]:[],{label:a("chat.contextPanel.contextLimitLabel"),value:v?be(v):"—"},{label:a("chat.contextPanel.sessionTokensLabel"),value:f.totalTokens>0?be(f.totalTokens):"0"},{label:a("chat.contextPanel.usageLabel"),value:g!==null?`${g}%`:"—"},{label:a("chat.contextPanel.inputTokensLabel"),value:f.inputTokens>0?be(f.inputTokens):"0"},{label:a("chat.contextPanel.outputTokensLabel"),value:f.outputTokens>0?be(f.outputTokens):"0"},{label:a("chat.contextPanel.reasoningTokensLabel"),value:f.reasoningTokens>0?be(f.reasoningTokens):"0"},...M?[{label:a("chat.contextPanel.costLabel"),value:f.cost>0?`$${f.cost<.001?f.cost.toFixed(6):f.cost.toFixed(4)}`:"$0.00"}]:[],{label:a("chat.contextPanel.sessionCreatedLabel"),value:ze(P)},{label:a("chat.contextPanel.lastActivityLabel"),value:ze(L)}];if(!l&&$.length===0){let D;e[4]!==i?(D=se("flex flex-col h-full w-full border-l border-border bg-background",i),e[4]=i,e[5]=D):D=e[5];let re;e[6]!==a?(re=a("chat.contextPanel.title"),e[6]=a,e[7]=re):re=e[7];let X;e[8]!==re?(X=n.jsx("span",{className:"text-sm font-medium text-foreground",children:re}),e[8]=re,e[9]=X):X=e[9];let J;e[10]!==r?(J=r?n.jsx(at,{size:14,className:"text-muted-foreground"}):n.jsx(rt,{size:14,className:"text-muted-foreground"}),e[10]=r,e[11]=J):J=e[11];let ee;e[12]!==s||e[13]!==J?(ee=n.jsx("button",{type:"button",onClick:s,className:"flex size-6 items-center justify-center hover:bg-accent transition-colors rounded-lg",children:J}),e[12]=s,e[13]=J,e[14]=ee):ee=e[14];let ne;e[15]!==X||e[16]!==ee?(ne=n.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[X,ee]}),e[15]=X,e[16]=ee,e[17]=ne):ne=e[17];let ie;e[18]!==a?(ie=a("chat.contextPanel.emptyState"),e[18]=a,e[19]=ie):ie=e[19];let te;e[20]!==ie?(te=n.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:n.jsx("p",{className:"text-xs text-muted-foreground",children:ie})}),e[20]=ie,e[21]=te):te=e[21];let oe;return e[22]!==ne||e[23]!==te||e[24]!==D?(oe=n.jsxs("div",{className:D,children:[ne,te]}),e[22]=ne,e[23]=te,e[24]=D,e[25]=oe):oe=e[25],oe}let G;e[26]!==i?(G=se("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",i),e[26]=i,e[27]=G):G=e[27];let z;e[28]!==a?(z=a("chat.contextPanel.title"),e[28]=a,e[29]=z):z=e[29];let H;e[30]!==z?(H=n.jsx("span",{className:"text-sm font-medium text-foreground",children:z}),e[30]=z,e[31]=H):H=e[31];let O;e[32]!==r?(O=r?n.jsx(at,{className:"size-3.5"}):n.jsx(rt,{className:"size-3.5"}),e[32]=r,e[33]=O):O=e[33];let U;e[34]!==s||e[35]!==O?(U=n.jsx(qe,{type:"button",variant:"ghost",size:"icon-sm",onClick:s,className:"text-muted-foreground",children:O}),e[34]=s,e[35]=O,e[36]=U):U=e[36];let Z;e[37]!==H||e[38]!==U?(Z=n.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[H,U]}),e[37]=H,e[38]=U,e[39]=Z):Z=e[39];let Y;e[40]!==a?(Y=a("chat.contextPanel.contextBreakdownSection"),e[40]=a,e[41]=Y):Y=e[41];let Q;e[42]!==Y?(Q=n.jsx("span",{className:"text-xs text-muted-foreground",children:Y}),e[42]=Y,e[43]=Q):Q=e[43];let q;e[44]!==N||e[45]!==_||e[46]!==p?(q=n.jsx(On,{userTokens:p,assistantTokens:N,otherTokens:_}),e[44]=N,e[45]=_,e[46]=p,e[47]=q):q=e[47];let le;return e[48]!==Q||e[49]!==q?(le=n.jsxs("div",{className:"flex flex-col gap-3",children:[Q,q]}),e[48]=Q,e[49]=q,e[50]=le):le=e[50],n.jsxs("div",{className:G,children:[Z,n.jsxs("div",{className:"flex flex-col gap-8 p-6",children:[E.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.subtasksSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:E.map(Kn)})]}),n.jsx(Fn,{items:C}),le,$.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.rawMessagesSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:$.map(D=>{const re=D.metadata?.created_at,X=o?.id===D.id;return n.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[n.jsxs("button",{type:"button",onClick:()=>c(X?null:D),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent w-full text-left cursor-pointer",children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[n.jsx("span",{className:se("shrink-0 font-medium",D.role==="user"?"text-chart-1":"text-chart-2"),children:D.role}),n.jsx("span",{className:"text-muted-foreground",children:"•"}),n.jsx("span",{className:"truncate text-muted-foreground font-mono",children:D.id})]}),re&&n.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:ze(re)})]}),X&&n.jsxs(n.Fragment,{children:[D.role==="assistant"&&(()=>{const J=D.metadata?._request;if(!J)return null;const ee=J.systemSections??[],ne=Math.max(1,...ee.map(Vn)),ie=ee.reduce(Hn,0);return n.jsxs("div",{className:"border-t border-border/50 px-3 py-2.5 text-xs space-y-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"font-medium text-foreground",children:a("chat.contextPanel.requestLabel")}),n.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[J.activeTools??0," / ",J.tools??0," ",a("chat.contextPanel.toolsActive")]})]}),ee.length>0&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("div",{className:"text-muted-foreground",children:[a("chat.contextPanel.systemPromptLabel")," ",n.jsxs("span",{className:"tabular-nums",children:["~",Math.round(ie/4).toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),ee.map((te,oe)=>{const ce=te.preview.match(/^<([a-z-]+)/i)?.[1]??`section ${oe}`,xe=te.chars/ne*100,de=Math.round(te.chars/4);return n.jsxs("div",{className:"space-y-0.5",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("span",{className:"font-mono text-foreground truncate",children:ce}),n.jsxs("span",{className:"text-muted-foreground tabular-nums shrink-0",children:["~",de.toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),n.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-chart-3",style:{width:`${xe}%`}})})]},oe)})]})]})})(),n.jsx("pre",{className:"text-xs font-mono bg-muted px-3 py-2 overflow-auto whitespace-pre-wrap break-all border-t border-border/50 max-h-64",children:JSON.stringify(D,null,2)})]})]},D.id)})})]})]})]})}function Hn(t,e){return t+e.chars}function Vn(t){return t.chars}function Kn(t,e){return n.jsx(zn,{part:t},e)}function Un(t){return(t.parts??[]).filter(qn)}function qn(t){return t.type==="tool-subtask"}function Wn(t){return t.role!=="system"}function Yn(t,e){const s=e.metadata?.usage;return t+(s?.outputTokens??0)}function Zn(t){return t.role==="assistant"}function Qn(t,e){const s=e.metadata?.usage;return t+(s?.inputTokens??0)}function Xn(t){return t.role==="user"}function Jn(t){return t.role==="assistant"&&t.metadata?.models}function ea(t){return t.role==="assistant"&&t.metadata?.usage}function ta(t){const e=A.c(21),{onOpenContextPanel:s}=t,{org:r}=ae(),{selectedVirtualMcp:i}=St();let a;e[0]!==r.id?(a=je(r.id),e[0]=r.id,e[1]=a):a=e[1];const c=i??a,l=Ee(c.id)??c,d=l.title??"Super Agent",m=l.icon??null,f=l.description??null;let h;e[2]!==m||e[3]!==d?(h=n.jsx(ye,{icon:m,name:d,size:"lg"}),e[2]=m,e[3]=d,e[4]=h):h=e[4];let j;e[5]!==d?(j=n.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-foreground",children:d}),e[5]=d,e[6]=j):j=e[6];let y;e[7]!==f?(y=f?n.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-balance",children:f}):null,e[7]=f,e[8]=y):y=e[8];let v;e[9]!==j||e[10]!==y?(v=n.jsxs("div",{className:"space-y-1.5",children:[j,y]}),e[9]=j,e[10]=y,e[11]=v):v=e[11];let x;e[12]!==h||e[13]!==v?(x=n.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center gap-4 px-6 text-center overflow-hidden",children:[h,v]}),e[12]=h,e[13]=v,e[14]=x):x=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(W.IceBreakers,{className:"pb-3"}),e[15]=g):g=e[15];let b;e[16]!==s?(b=n.jsxs(W.Footer,{children:[g,n.jsx(W.Input,{onOpenContextPanel:s})]}),e[16]=s,e[17]=b):b=e[17];let S;return e[18]!==x||e[19]!==b?(S=n.jsxs(n.Fragment,{children:[x,b]}),e[18]=x,e[19]=b,e[20]=S):S=e[20],S}function ot(t){const e=A.c(17),{outputs:s,collapsed:r,onToggle:i,variant:a}=t,o=a==="card"?"rounded-xl bg-muted/95 shadow-edge backdrop-blur-sm":"border-b border-border bg-background";let c;e[0]!==o?(c=se(o),e[0]=o,e[1]=c):c=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("span",{className:"text-sm font-medium text-foreground",children:"Files in this task"}),e[2]=u):u=e[2];const l=r&&"-rotate-90";let d;e[3]!==l?(d=se("size-4 text-muted-foreground transition-transform",l),e[3]=l,e[4]=d):d=e[4];let m;e[5]!==d?(m=n.jsx(Ze,{className:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==m?(f=n.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between px-3 py-2.5 text-left",children:[u,m]}),e[7]=i,e[8]=m,e[9]=f):f=e[9];let h;e[10]!==r||e[11]!==s?(h=!r&&n.jsx("div",{className:"flex max-h-72 flex-col gap-1.5 overflow-y-auto px-2 pb-2",children:s.map(sa)}),e[10]=r,e[11]=s,e[12]=h):h=e[12];let j;return e[13]!==c||e[14]!==f||e[15]!==h?(j=n.jsxs("div",{className:c,children:[f,h]}),e[13]=c,e[14]=f,e[15]=h,e[16]=j):j=e[16],j}function sa(t){return n.jsx(Es,{file:t},t.key)}function na(){const t=A.c(13),e=Le()?.taskId??null,s=Fs();let r;t[0]!==s?(r={enabled:s},t[0]=s,t[1]=r):r=t[1];const{data:i}=Rs(e,r),[a,o]=B.useState(!1),[c,u]=B.useState(!0);if(!e||!i||i.length===0)return null;let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>o(ra),t[2]=l):l=t[2];let d;t[3]!==a||t[4]!==i?(d=n.jsx("div",{className:"absolute top-2 right-2 z-10 hidden w-72 @[1280px]:block",children:n.jsx(ot,{variant:"card",outputs:i,collapsed:a,onToggle:l})}),t[3]=a,t[4]=i,t[5]=d):d=t[5];let m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=()=>u(aa),t[6]=m):m=t[6];let f;t[7]!==c||t[8]!==i?(f=n.jsx("div",{className:"shrink-0 @[1280px]:hidden",children:n.jsx(ot,{variant:"bar",outputs:i,collapsed:c,onToggle:m})}),t[7]=c,t[8]=i,t[9]=f):f=t[9];let h;return t[10]!==d||t[11]!==f?(h=n.jsxs(n.Fragment,{children:[d,f]}),t[10]=d,t[11]=f,t[12]=h):h=t[12],h}function aa(t){return!t}function ra(t){return!t}function ia(){const t=A.c(1);B.use(Ye().ready);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(ks,{children:n.jsx(la,{})}),t[0]=e):e=t[0],e}function la(){const t=A.c(29),{active:e}=Ns(),{org:s}=ae(),r=Le(),{isChatEmpty:i}=Ye(),[a,o]=B.useState("chat"),c=Os(),u=K(),l=An(),{runtime:d}=jt(r?.virtualMcpId);if(l!==null&&d!=="cms"){let N;return t[0]!==l||t[1]!==u?(N=n.jsx(W,{className:"animate-in fade-in-0 duration-200",children:n.jsx(W.Main,{className:"flex flex-col items-center",children:n.jsx(W.EmptyState,{children:l==="codex-provider"?n.jsx(W.NoAiProviderEmptyState,{title:u("settings.codexSubscription.setupHeading"),description:u("settings.codexSubscription.setupDescription"),providerFilter:yt}):l==="claude-code-provider"?n.jsx(W.NoAiProviderEmptyState,{title:u("chat.noAiProviderEmptyState.supportedHeading"),description:u("chat.noAiProviderEmptyState.supportedSubtitle"),providerFilter:kt}):n.jsx(W.NoAiProviderEmptyState,{})})})}),t[0]=l,t[1]=u,t[2]=N):N=t[2],N}let f;t[3]!==c.hasDecoKey||t[4]!==c.hasOnlyDecoProvider||t[5]!==c.isLoading||t[6]!==c.isZeroBalance||t[7]!==i||t[8]!==s?(f=c.hasDecoKey&&c.isZeroBalance&&c.hasOnlyDecoProvider&&!c.isLoading&&i&&!js(s.id),t[3]=c.hasDecoKey,t[4]=c.hasOnlyDecoProvider,t[5]=c.isLoading,t[6]=c.isZeroBalance,t[7]=i,t[8]=s,t[9]=f):f=t[9];const h=f;let j;t[10]!==h?(j=h&&n.jsx(W.CreditsEmptyState,{}),t[10]=h,t[11]=j):j=t[11];let y;t[12]!==a||t[13]!==i||t[14]!==d||t[15]!==e?(y=!e&&n.jsx("div",{inert:a!=="chat"?!0:void 0,"aria-hidden":a!=="chat",className:se("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",a!=="chat"?"opacity-0 pointer-events-none":"opacity-100"),children:i&&d!=="cms"?n.jsx(ta,{onOpenContextPanel:()=>o("context")}):n.jsxs(n.Fragment,{children:[n.jsxs(W.Main,{className:"relative flex flex-col overflow-hidden @container",children:[n.jsx(na,{}),n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(W.Messages,{})})]}),n.jsx(W.Footer,{children:n.jsx(W.Input,{onOpenContextPanel:()=>o("context")})})]})}),t[12]=a,t[13]=i,t[14]=d,t[15]=e,t[16]=y):y=t[16];let v;t[17]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Ts,{}),t[17]=v):v=t[17];const x=a!=="context"?!0:void 0,g=a!=="context",b=a==="context"?"opacity-100":"opacity-0 pointer-events-none";let S;t[18]!==b?(S=se("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",b),t[18]=b,t[19]=S):S=t[19];let p;t[20]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(Gn,{back:!0,onClose:()=>o("chat")}),t[20]=p):p=t[20];let k;t[21]!==x||t[22]!==g||t[23]!==S?(k=n.jsx("div",{inert:x,"aria-hidden":g,className:S,children:p}),t[21]=x,t[22]=g,t[23]=S,t[24]=k):k=t[24];let T;return t[25]!==j||t[26]!==y||t[27]!==k?(T=n.jsxs(W,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[j,y,v,k]}),t[25]=j,t[26]=y,t[27]=k,t[28]=T):T=t[28],T}function oa(){const t=A.c(7),e=K();let s;t[0]!==e?(s=e("agentShellLayout.agentShellLayout.chatLoadingError"),t[0]=e,t[1]=s):s=t[1];let r;t[2]!==s?(r=n.jsx("div",{role:"alert",className:"flex h-full flex-1 items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Ie,{children:n.jsx(ia,{})}),t[4]=i):i=t[4];let a;return t[5]!==r?(a=n.jsx(pt,{fallback:r,children:i}),t[5]=r,t[6]=a):a=t[6],a}function ca(t){const e=A.c(10),{org:s}=ae(),r=qs(),{data:i}=pe.useSession(),a=i?.user?.id,o=t?.id??null,c=!!t&&!!a&&!!t.created_by&&t.created_by!==a;let u;e[0]!==s.id||e[1]!==o?(u=fe.viewedThreadMetadataRefresh(s.id,o??""),e[0]=s.id,e[1]=o,e[2]=u):u=e[2];const l=!!r&&!!o&&c;let d;e[3]!==r||e[4]!==o?(d=async()=>(await r?.refreshThreadMetadata(o??""),!0),e[3]=r,e[4]=o,e[5]=d):d=e[5];let m;e[6]!==u||e[7]!==l||e[8]!==d?(m={queryKey:u,enabled:l,staleTime:Number.POSITIVE_INFINITY,queryFn:d},e[6]=u,e[7]=l,e[8]=d,e[9]=m):m=e[9],me(m)}function Ge(t){const e=A.c(14),{label:s,value:r,onChange:i,options:a}=t;let o;e[0]!==s?(o=n.jsx("span",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=o):o=e[1];let c;e[2]!==i?(c=m=>m&&i(m),e[2]=i,e[3]=c):c=e[3];let u;e[4]!==a?(u=a.map(da),e[4]=a,e[5]=u):u=e[5];let l;e[6]!==s||e[7]!==c||e[8]!==u||e[9]!==r?(l=n.jsx(rn,{type:"single",size:"sm",value:r,onValueChange:c,"aria-label":s,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:u}),e[6]=s,e[7]=c,e[8]=u,e[9]=r,e[10]=l):l=e[10];let d;return e[11]!==o||e[12]!==l?(d=n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,l]}),e[11]=o,e[12]=l,e[13]=d):d=e[13],d}function da(t){return n.jsxs(an,{value:t.value,className:"h-6 gap-1.5 rounded-lg px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:bg-card data-[state=on]:text-foreground data-[state=on]:shadow-edge",children:[t.icon,t.label]},t.value)}function ua(t){const e=A.c(91),{panel:s,className:r}=t,i=r===void 0?"md:size-[34px]":r,a=K();let o;e[0]!==a?(o=a("sidebar.taskGroupsList.filterChats"),e[0]=a,e[1]=o):o=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(ds,{size:16}),e[2]=c):c=e[2];let u;e[3]!==s.filtersActive?(u=s.filtersActive&&n.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[3]=s.filtersActive,e[4]=u):u=e[4];let l;e[5]!==i||e[6]!==s.filtersActive||e[7]!==o||e[8]!==u?(l=n.jsx(Fe,{asChild:!0,children:n.jsx(Lt,{asChild:!0,children:n.jsxs(_e,{"aria-label":o,active:s.filtersActive,className:i,children:[c,u]})})}),e[5]=i,e[6]=s.filtersActive,e[7]=o,e[8]=u,e[9]=l):l=e[9];let d;e[10]!==a?(d=a("sidebar.taskGroupsList.filterChats"),e[10]=a,e[11]=d):d=e[11];let m;e[12]!==d?(m=n.jsx(Re,{side:"bottom",children:d}),e[12]=d,e[13]=m):m=e[13];let f;e[14]!==l||e[15]!==m?(f=n.jsxs(Oe,{children:[l,m]}),e[14]=l,e[15]=m,e[16]=f):f=e[16];let h;e[17]!==a?(h=a("sidebar.taskGroupsList.filterView"),e[17]=a,e[18]=h):h=e[18];const j=s.groupBy;let y;e[19]!==s?(y=D=>{he("tasks_panel_group_by_changed",{to_value:D}),s.setGroupBy(D)},e[19]=s,e[20]=y):y=e[20];let v;e[21]!==a?(v=a("sidebar.taskGroupsList.viewList"),e[21]=a,e[22]=v):v=e[22];let x;e[23]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(us,{size:13}),e[23]=x):x=e[23];let g;e[24]!==v?(g={value:"flat",label:v,icon:x},e[24]=v,e[25]=g):g=e[25];let b;e[26]!==a?(b=a("sidebar.taskGroupsList.viewStatus"),e[26]=a,e[27]=b):b=e[27];let S;e[28]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(fs,{size:13}),e[28]=S):S=e[28];let p;e[29]!==b?(p={value:"status",label:b,icon:S},e[29]=b,e[30]=p):p=e[30];let k;e[31]!==g||e[32]!==p?(k=[g,p],e[31]=g,e[32]=p,e[33]=k):k=e[33];let T;e[34]!==s.groupBy||e[35]!==y||e[36]!==k||e[37]!==h?(T=n.jsx(Ge,{label:h,value:j,onChange:y,options:k}),e[34]=s.groupBy,e[35]=y,e[36]=k,e[37]=h,e[38]=T):T=e[38];let N;e[39]!==a?(N=a("sidebar.taskGroupsList.filterType"),e[39]=a,e[40]=N):N=e[40];const _=s.typeFilter;let w;e[41]!==s?(w=D=>{he("tasks_panel_filter_changed",{to_value:D}),s.setTypeFilter(D)},e[41]=s,e[42]=w):w=e[42];let I;e[43]!==a?(I=a("sidebar.taskGroupsList.typeAll"),e[43]=a,e[44]=I):I=e[44];let P;e[45]!==I?(P={value:"all",label:I},e[45]=I,e[46]=P):P=e[46];let L;e[47]!==a?(L=a("sidebar.taskGroupsList.typeChats"),e[47]=a,e[48]=L):L=e[48];let $;e[49]!==L?($={value:"manual",label:L},e[49]=L,e[50]=$):$=e[50];let E;e[51]!==a?(E=a("sidebar.taskGroupsList.typeAuto"),e[51]=a,e[52]=E):E=e[52];let F;e[53]!==E?(F={value:"automation",label:E},e[53]=E,e[54]=F):F=e[54];let R;e[55]!==P||e[56]!==$||e[57]!==F?(R=[P,$,F],e[55]=P,e[56]=$,e[57]=F,e[58]=R):R=e[58];let M;e[59]!==s.typeFilter||e[60]!==N||e[61]!==w||e[62]!==R?(M=n.jsx(Ge,{label:N,value:_,onChange:w,options:R}),e[59]=s.typeFilter,e[60]=N,e[61]=w,e[62]=R,e[63]=M):M=e[63];let C;e[64]!==a?(C=a("sidebar.taskGroupsList.filterScope"),e[64]=a,e[65]=C):C=e[65];const G=s.showAll?"team":"mine";let z;e[66]!==s?(z=D=>s.setShowAll(D==="team"),e[66]=s,e[67]=z):z=e[67];let H;e[68]!==a?(H=a("sidebar.taskGroupsList.scopeMine"),e[68]=a,e[69]=H):H=e[69];let O;e[70]!==H?(O={value:"mine",label:H},e[70]=H,e[71]=O):O=e[71];let U;e[72]!==a?(U=a("sidebar.taskGroupsList.scopeTeam"),e[72]=a,e[73]=U):U=e[73];let Z;e[74]!==U?(Z={value:"team",label:U},e[74]=U,e[75]=Z):Z=e[75];let Y;e[76]!==O||e[77]!==Z?(Y=[O,Z],e[76]=O,e[77]=Z,e[78]=Y):Y=e[78];let Q;e[79]!==C||e[80]!==G||e[81]!==z||e[82]!==Y?(Q=n.jsx(Ge,{label:C,value:G,onChange:z,options:Y}),e[79]=C,e[80]=G,e[81]=z,e[82]=Y,e[83]=Q):Q=e[83];let q;e[84]!==T||e[85]!==M||e[86]!==Q?(q=n.jsxs($t,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[T,M,Q]}),e[84]=T,e[85]=M,e[86]=Q,e[87]=q):q=e[87];let le;return e[88]!==q||e[89]!==f?(le=n.jsxs(Et,{children:[f,q]}),e[88]=q,e[89]=f,e[90]=le):le=e[90],le}function fa(t,e){return t.filter(s=>s.id===e||!!s.trigger_id||tn(s))}function ma(){const t=A.c(2),e=Ls()??[];let s;return t[0]!==e?(s=r=>{if(!r)return;const i=e.find(a=>a.id===r);return i?Pt(i.metadata):void 0},t[0]=e,t[1]=s):s=t[1],s}function ha(t){const e=A.c(9),{virtualMcpId:s,size:r,showAutomationBadge:i}=t,a=r===void 0?"sm":r,o=K();let c;e[0]!==a||e[1]!==s?(c=s?n.jsx(pa,{virtualMcpId:s,size:a}):n.jsx(ye,{icon:null,name:"?",size:a}),e[0]=a,e[1]=s,e[2]=c):c=e[2];let u;e[3]!==i||e[4]!==o?(u=i&&n.jsx("span",{"aria-label":o("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-special border border-special text-special-foreground",children:n.jsx(Ot,{size:10,className:"text-white"})}),e[3]=i,e[4]=o,e[5]=u):u=e[5];let l;return e[6]!==c||e[7]!==u?(l=n.jsxs("div",{className:"relative shrink-0",children:[c,u]}),e[6]=c,e[7]=u,e[8]=l):l=e[8],l}function pa(t){const e=A.c(6),{virtualMcpId:s,size:r}=t,i=Tt(s);if(!i){let c;return e[0]!==r?(c=n.jsx(ye,{icon:null,name:"?",size:r}),e[0]=r,e[1]=c):c=e[1],c}const a=i.icon??null;let o;return e[2]!==i.title||e[3]!==r||e[4]!==a?(o=n.jsx(ye,{icon:a,name:i.title,size:r}),e[2]=i.title,e[3]=r,e[4]=a,e[5]=o):o=e[5],o}const ct=["thread"];function xa(t){const e=A.c(53),{open:s,onOpenChange:r}=t,[i,a]=B.useState(""),{org:o}=ae(),{setTaskId:c}=Qe(),u=Pe(),l=K();let d,m,f,h;e[0]!==o.id||e[1]!==i?(h=i.trim(),d=h?20:10,f=me,m=fe.globalSearch(o.id,h,d,ct),e[0]=o.id,e[1]=i,e[2]=d,e[3]=m,e[4]=f,e[5]=h):(d=e[2],m=e[3],f=e[4],h=e[5]);let j;e[6]!==d||e[7]!==u||e[8]!==h?(j=async()=>{const C=await u.call("GLOBAL_SEARCH",{query:h,limit:d,types:[...ct]});return{...C,items:C.items.filter(ga)}},e[6]=d,e[7]=u,e[8]=h,e[9]=j):j=e[9];let y;e[10]!==s||e[11]!==m||e[12]!==j?(y={queryKey:m,enabled:s,queryFn:j,staleTime:1e4},e[10]=s,e[11]=m,e[12]=j,e[13]=y):y=e[13];const{data:v,isFetching:x}=f(y);let g;e[14]!==v?.items?(g=v?.items??[],e[14]=v?.items,e[15]=g):g=e[15];const b=g;let S;e[16]!==r?(S=C=>{C||a(""),r(C)},e[16]=r,e[17]=S):S=e[17];const p=S;let k;e[18]!==p||e[19]!==c?(k=C=>{p(!1),c(C.id,C.virtual_mcp_id??void 0)},e[18]=p,e[19]=c,e[20]=k):k=e[20];const T=k;let N;e[21]!==l?(N=l("tasksPanel.globalSearchDialog.title"),e[21]=l,e[22]=N):N=e[22];let _;e[23]!==N?(_=n.jsx(Wt,{children:N}),e[23]=N,e[24]=_):_=e[24];let w;e[25]!==l?(w=l("tasksPanel.globalSearchDialog.description"),e[25]=l,e[26]=w):w=e[26];let I;e[27]!==w?(I=n.jsx(Yt,{children:w}),e[27]=w,e[28]=I):I=e[28];let P;e[29]!==I||e[30]!==_?(P=n.jsxs(Zt,{className:"sr-only",children:[_,I]}),e[29]=I,e[30]=_,e[31]=P):P=e[31];let L;e[32]!==l?(L=l("tasksPanel.globalSearchDialog.placeholder"),e[32]=l,e[33]=L):L=e[33];let $;e[34]!==i||e[35]!==L?($=n.jsx(hn,{value:i,onValueChange:a,placeholder:L}),e[34]=i,e[35]=L,e[36]=$):$=e[36];let E;e[37]!==T||e[38]!==x||e[39]!==b||e[40]!==l||e[41]!==h?(E=n.jsx(dn,{children:x&&b.length===0?n.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l("tasksPanel.globalSearchDialog.searching")}):b.length===0?n.jsx(un,{children:l("tasksPanel.globalSearchDialog.noResults")}):n.jsx(fn,{heading:h?void 0:l("tasksPanel.globalSearchDialog.recent"),children:b.map(C=>C.type==="thread"?n.jsxs(mn,{value:`thread:${C.id}:${C.title}`,onSelect:()=>T(C),className:"gap-2.5",children:[n.jsx(ha,{virtualMcpId:C.virtual_mcp_id,size:"xs"}),n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx("div",{className:"text-sm text-foreground truncate",children:C.title||l("tasksPanel.globalSearchDialog.untitledChat")})}),n.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(C.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${C.id}`):null)})}),e[37]=T,e[38]=x,e[39]=b,e[40]=l,e[41]=h,e[42]=E):E=e[42];let F;e[43]!==$||e[44]!==E?(F=n.jsxs(pn,{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:[$,E]}),e[43]=$,e[44]=E,e[45]=F):F=e[45];let R;e[46]!==P||e[47]!==F?(R=n.jsxs(Qt,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[P,F]}),e[46]=P,e[47]=F,e[48]=R):R=e[48];let M;return e[49]!==p||e[50]!==s||e[51]!==R?(M=n.jsx(Xt,{open:s,onOpenChange:p,children:R}),e[49]=p,e[50]=s,e[51]=R,e[52]=M):M=e[52],M}function ga(t){return t.type==="thread"}function ba(t,e,s){if(!s)return;const r=t.findIndex(i=>i.id===e);if(r!==-1){for(let i=r+1;i<t.length;i++){const a=t[i];if(a?.created_by===s)return a}for(let i=r-1;i>=0;i--){const a=t[i];if(a?.created_by===s)return a}}}function va(t){return t==="ephemeral"||t.startsWith("thread:")}function Gt(t){const e=A.c(45),{task:s,isActive:r,onClick:i,onArchive:a,showAutomationBadge:o,showAgentIcon:c,hideStatusIdle:u,indented:l}=t,d=K(),m=xn(s.status),f=m.icon,h=s.metadata?.kind==="tool_call_run",j=Tt(h?void 0:s.virtual_mcp_id);let y;e[0]!==j?(y=_t(j),e[0]=j,e[1]=y):y=e[1];const v=y;vn(6e4);const x=o||!!s.trigger_id,g=s.id,b="button",S=0;let p;e[2]!==i?(p=z=>{z.target===z.currentTarget&&(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),i())},e[2]=i,e[3]=p):p=e[3];const k=l?"-ml-4 pl-6":"pl-[9px]",T=r?"bg-accent text-accent-foreground":"hover:bg-accent";let N;e[4]!==k||e[5]!==T?(N=se("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",k,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",T),e[4]=k,e[5]=T,e[6]=N):N=e[6];let _;e[7]!==h||e[8]!==c||e[9]!==j?.icon||e[10]!==j?.title?(_=c&&!h&&n.jsx(ye,{icon:j?.icon??null,name:j?.title??"?",size:"2xs"}),e[7]=h,e[8]=c,e[9]=j?.icon,e[10]=j?.title,e[11]=_):_=e[11];let w;e[12]!==x||e[13]!==d?(w=x&&n.jsx(Ot,{size:12,"aria-label":d("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-special"}),e[12]=x,e[13]=d,e[14]=w):w=e[14];let I;e[15]!==d||e[16]!==s.title?(I=s.title||d("tasksPanel.taskRow.untitledTask"),e[15]=d,e[16]=s.title,e[17]=I):I=e[17];let P;e[18]!==I?(P=n.jsx("div",{className:"text-sm text-foreground truncate",children:I}),e[18]=I,e[19]=P):P=e[19];let L;e[20]!==w||e[21]!==P?(L=n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[w,P]}),e[20]=w,e[21]=P,e[22]=L):L=e[22];let $;e[23]!==r||e[24]!==v||e[25]!==s.branch||e[26]!==s.updated_at?($=s.updated_at&&n.jsxs("div",{className:se("flex items-center gap-1 text-2xs min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[s.branch&&!va(s.branch)?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"truncate font-mono",children:s.branch}),n.jsx("span",{className:"shrink-0",children:"·"})]}):v?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"truncate",children:[v.owner,"/",v.name]}),n.jsx("span",{className:"shrink-0",children:"·"})]}):null,n.jsx("span",{className:"shrink-0",children:bn(new Date(s.updated_at))})]}),e[23]=r,e[24]=v,e[25]=s.branch,e[26]=s.updated_at,e[27]=$):$=e[27];let E;e[28]!==L||e[29]!==$?(E=n.jsxs("div",{className:"flex-1 min-w-0",children:[L,$]}),e[28]=L,e[29]=$,e[30]=E):E=e[30];const F="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",R=!u&&n.jsx("span",{className:se("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",a&&"group-hover/row:opacity-0"),"aria-label":d("tasksPanel.taskRow.statusLabel",{status:d(m.labelKey)}),children:s.status==="in_progress"?n.jsx(ve,{className:se("size-3.5",m.iconClassName)}):n.jsx(f,{size:14,className:m.iconClassName})});let M;e[31]!==a||e[32]!==d?(M=a&&n.jsxs(Oe,{children:[n.jsx(Fe,{asChild:!0,children:n.jsx(qe,{variant:"ghost",size:"icon","aria-label":d("tasksPanel.taskRow.archiveTask"),onClick:z=>{z.stopPropagation(),a()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto text-muted-foreground",children:n.jsx(Jt,{className:"size-3.5"})})}),n.jsx(Re,{side:"right",children:d("tasksPanel.taskRow.archive")})]}),e[31]=a,e[32]=d,e[33]=M):M=e[33];let C;e[34]!==R||e[35]!==M?(C=n.jsxs("div",{className:F,children:[R,M]}),e[34]=R,e[35]=M,e[36]=C):C=e[36];let G;return e[37]!==i||e[38]!==E||e[39]!==C||e[40]!==p||e[41]!==N||e[42]!==_||e[43]!==s.id?(G=n.jsxs("div",{"data-task-id":g,role:b,tabIndex:S,onClick:i,onKeyDown:p,className:N,children:[_,E,C]}),e[37]=i,e[38]=E,e[39]=C,e[40]=p,e[41]=N,e[42]=_,e[43]=s.id,e[44]=G):G=e[44],G}const dt=["requires_action","in_progress","failed","expired","completed"];function ya(t){const e=new Map(dt.map(s=>[s,[]]));for(const s of t){const r=s.status??"completed";(e.get(r)??e.get("completed")).push(s)}return dt.map(s=>({status:s,threads:e.get(s)}))}const ja="sidebar.group.expanded.";function Sa(t,e){const s=A.c(3),[r,i]=xt(`${ja}${t}`,e);let a;return s[0]!==r||s[1]!==i?(a=[r,i],s[0]=r,s[1]=i,s[2]=a):a=s[2],a}function Ht(t){const e=A.c(18),{onClick:s,isFetching:r,indented:i}=t,a=K();let o;e[0]!==a?(o=a("sidebar.showMoreButton.ariaLabel"),e[0]=a,e[1]=o):o=e[1];const c=i?"-ml-4 pl-6 pr-2":"px-2";let u;e[2]!==c?(u=se("flex items-center gap-2 py-1.5 rounded-lg text-sm text-muted-foreground",c,"hover:bg-sidebar-accent hover:text-foreground focus-ring","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=c,e[3]=u):u=e[3];let l;e[4]!==r?(l=r&&n.jsx(ve,{className:"size-3.5"}),e[4]=r,e[5]=l):l=e[5];let d;e[6]!==r||e[7]!==a?(d=a(r?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=r,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==d?(m=n.jsx("span",{children:d}),e[9]=d,e[10]=m):m=e[10];let f;return e[11]!==r||e[12]!==s||e[13]!==o||e[14]!==u||e[15]!==l||e[16]!==m?(f=n.jsxs("button",{type:"button","aria-label":o,onClick:s,disabled:r,className:u,children:[l,m]}),e[11]=r,e[12]=s,e[13]=o,e[14]=u,e[15]=l,e[16]=m,e[17]=f):f=e[17],f}function ka(t,e,s,r){return[t,e,s,r.type,r.member,r.currentUserId??""].join("|")}function Na(t){return t.member==="mine"&&!t.currentUserId}const Vt=4;let Te=0;const Ke=[];function Ta(){for(;Te<Vt&&Ke.length>0;){const t=Ke.shift();t&&t()}}function Kt(t){return new Promise((e,s)=>{const r=()=>{Te++,t().then(e,s).finally(()=>{Te--,Ta()})};Te<Vt?r():Ke.push(r)})}const Be=10;function ut(t,e,s,r,i){const a={hidden:!1};r.member==="mine"&&r.currentUserId&&(a.created_by=r.currentUserId),r.type==="automation"&&(a.has_trigger=!0),r.type==="manual"&&(a.has_trigger=!1);const o={where:a,limit:i,offset:s,orderBy:[{field:["updated_at"],direction:"desc"}]};return o.status=e,o}function _a(t,e,s,r){let i=0;for(const a of t)Ut(a,e,s,r)&&i++;return i}function He(t,e,s,r){return _a(t,e,s,r)}function wa(t,e){return!!(t>=Be||t===0&&e)}function ft(t,e){return t<e}function Ca(t,e){return e===!1?!1:e===!0?!0:t}function Ut(t,e,s,r){return!(t.hidden||(t.status??"completed")!==s||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const Ce=new Map,Ne=new Map;function Pa(t,e){return e?t>=Be?!0:null:!1}function mt(t){return Ce.get(t)}function Ia(t,e){Ce.set(t,e)}function Ma(t,e,s){const r=Ce.get(t);if(r!==void 0){s(r);return}let i=Ne.get(t);i||(i=Kt(e).then(a=>(Ce.set(t,a),Ne.delete(t),a)).catch(()=>(Ne.delete(t),Promise.reject(new Error("group probe failed")))),Ne.set(t,i)),i.then(s,()=>s(!1))}function ht(t){const e=t,s=Array.isArray(e.items)?e.items:[];return{items:s,hasMore:e.hasMore??s.length===Be,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Aa(t,e,s,r,i){let a=0;for(const o of t)e.has(o.id)||Ut(o,s,r,i)&&a++;return a}function La(t,e,s,r){const i=A.c(8),{org:a}=ae(),o=ka(a.id,t,e,s);let c;i[0]!==s?(c=Na(s),i[0]=s,i[1]=c):c=i[1];const u=c,[l,d]=B.useState({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});l.identity!==o&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});const m=Xe(),{threads:f,hasMore:h}=Je(),j=He(f,t,e,s),y=wa(j,h),v=Pa(j,h),x=Pe();if(l.identity===o&&l.serverHasMore===null){const T=v??mt(o);T!==void 0&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:l.probeSubscribedIdentity,serverHasMore:T})}!u&&l.identity===o&&l.serverHasMore===null&&v===null&&mt(o)===void 0&&l.probeSubscribedIdentity!==o&&(d(T=>T.identity===o?{...T,isProbing:!0,probeSubscribedIdentity:o}:T),Ma(o,async()=>{const T=ut(t,e,0,s,1),N=await x.call("COLLECTION_THREADS_LIST",T),{totalCount:_}=ht(N),w=He(m.threads.get(),t,e,s);return _===void 0?!1:ft(w,_)},T=>{d(N=>N.identity!==o?N:{...N,isProbing:!1,serverHasMore:T})}));const b=async function(){if(l.isFetching||l.isProbing||u)return;const N=o;d(_=>_.identity===N?{..._,isFetching:!0}:_);try{const _=He(f,t,e,s),w=ut(t,e,_,s,Be),I=await Kt(()=>x.call("COLLECTION_THREADS_LIST",w)),{items:P,hasMore:L,totalCount:$}=ht(I),E=new Set(f.map($a)),F=Aa(P,E,t,e,s),R=_;m.mergeThreads(P),d(M=>{if(M.identity!==N)return M;let C;return $!==void 0?C=ft(R+F,$):C=P.length===0||F===0?!1:L,Ia(N,C),{...M,isFetching:!1,serverHasMore:C}})}catch(_){const w=_,I=w instanceof Error?w.message:String(w);es.error(`Could not load more tasks: ${I}`),d(P=>P.identity===N?{...P,isFetching:!1}:P)}},S=l.isFetching||l.isProbing,p=!u&&!S&&Ca(y,l.serverHasMore);let k;return i[2]!==S||i[3]!==b||i[4]!==p||i[5]!==l.isProbing||i[6]!==l.serverHasMore?(k={hasMore:p,isFetching:S,isProbing:l.isProbing,serverHasMore:l.serverHasMore,loadMore:b},i[2]=S,i[3]=b,i[4]=p,i[5]=l.isProbing,i[6]=l.serverHasMore,i[7]=k):k=i[7],k}function $a(t){return t.id}function Ea(t){const e=A.c(20),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u}=t,{isFetching:l,isProbing:d,loadMore:m,hasMore:f,serverHasMore:h}=La("status",s,u),[j,y]=B.useState(!1);!j&&r.length===0&&h===!0&&!l&&!d&&(y(!0),queueMicrotask(()=>{m()}));let v;if(e[0]!==i||e[1]!==c||e[2]!==u||e[3]!==o||e[4]!==a||e[5]!==r){let b;e[7]!==i||e[8]!==c||e[9]!==u||e[10]!==o||e[11]!==a?(b=S=>n.jsx(Gt,{task:S,isActive:i===S.id,onClick:()=>a(S),onArchive:c&&S.created_by===u.currentUserId?()=>o(S):void 0,showAutomationBadge:!!S.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},S.id),e[7]=i,e[8]=c,e[9]=u,e[10]=o,e[11]=a,e[12]=b):b=e[12],v=r.map(b),e[0]=i,e[1]=c,e[2]=u,e[3]=o,e[4]=a,e[5]=r,e[6]=v}else v=e[6];let x;e[13]!==f||e[14]!==l||e[15]!==m?(x=(f||l)&&n.jsx(Ht,{onClick:()=>{m()},isFetching:l,indented:!0}),e[13]=f,e[14]=l,e[15]=m,e[16]=x):x=e[16];let g;return e[17]!==v||e[18]!==x?(g=n.jsxs(n.Fragment,{children:[v,x]}),e[17]=v,e[18]=x,e[19]=g):g=e[19],g}function Fa(t){const e=A.c(43),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u}=t,l=K(),d=gn[s],m=d.icon,[f,h]=Sa(`status-${s}`,!1);let j;e[0]!==f||e[1]!==h?(j=function(){h(!f)},e[0]=f,e[1]=h,e[2]=j):j=e[2];const y=j;let v;e[3]!==d.labelKey||e[4]!==l?(v=l("sidebar.taskGroupsList.toggleStatusGroup",{status:l(d.labelKey)}),e[3]=d.labelKey,e[4]=l,e[5]=v):v=e[5];let x;e[6]!==y?(x=I=>{I.target===I.currentTarget&&(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),y())},e[6]=y,e[7]=x):x=e[7];let g;e[8]!==m||e[9]!==d.iconClassName?(g=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:n.jsx(m,{size:12,className:d.iconClassName})}),e[8]=m,e[9]=d.iconClassName,e[10]=g):g=e[10];let b;e[11]!==f?(b=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:f?n.jsx(Ze,{size:14}):n.jsx(ts,{size:14})}),e[11]=f,e[12]=b):b=e[12];let S;e[13]!==g||e[14]!==b?(S=n.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[g,b]}),e[13]=g,e[14]=b,e[15]=S):S=e[15];let p;e[16]!==d.labelKey||e[17]!==l?(p=l(d.labelKey),e[16]=d.labelKey,e[17]=l,e[18]=p):p=e[18];let k;e[19]!==p?(k=n.jsx("span",{className:"flex-1 truncate",children:p}),e[19]=p,e[20]=k):k=e[20];let T;e[21]!==r.length?(T=n.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:n.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:r.length})}),e[21]=r.length,e[22]=T):T=e[22];let N;e[23]!==f||e[24]!==y||e[25]!==v||e[26]!==x||e[27]!==S||e[28]!==k||e[29]!==T?(N=n.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":f,"aria-label":v,onClick:y,onKeyDown:x,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-lg text-sm font-medium text-foreground cursor-pointer hover:bg-sidebar-accent focus-ring transition-colors",children:[S,k,T]}),e[23]=f,e[24]=y,e[25]=v,e[26]=x,e[27]=S,e[28]=k,e[29]=T,e[30]=N):N=e[30];let _;e[31]!==i||e[32]!==c||e[33]!==f||e[34]!==u||e[35]!==o||e[36]!==a||e[37]!==s||e[38]!==r?(_=f&&n.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:n.jsx(Ea,{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u})}),e[31]=i,e[32]=c,e[33]=f,e[34]=u,e[35]=o,e[36]=a,e[37]=s,e[38]=r,e[39]=_):_=e[39];let w;return e[40]!==N||e[41]!==_?(w=n.jsxs("div",{className:"flex flex-col gap-0.5",children:[N,_]}),e[40]=N,e[41]=_,e[42]=w):w=e[42],w}function Ra(t){const e=A.c(41),{threads:s,groupBy:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,filters:c,hasMore:u,isFetchingMore:l,onLoadMore:d,filtersActive:m}=t,f=K();if(s.length===0&&!u&&!l){let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(ms,{className:"size-6 opacity-60"}),e[0]=x):x=e[0];let g;e[1]!==m||e[2]!==f?(g=f(m?"sidebar.myThreadsSection.noChatsMatchFilters":"sidebar.myThreadsSection.noChatsYet"),e[1]=m,e[2]=f,e[3]=g):g=e[3];let b;return e[4]!==g?(b=n.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[x,n.jsx("p",{className:"text-sm",children:g})]}),e[4]=g,e[5]=b):b=e[5],b}const h=s.length>1||u;if(r==="status"){let x;if(e[6]!==i||e[7]!==h||e[8]!==c||e[9]!==o||e[10]!==a||e[11]!==s){let b;e[13]!==i||e[14]!==h||e[15]!==c||e[16]!==o||e[17]!==a?(b=S=>n.jsx(Fa,{status:S.status,threads:S.threads,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:h,filters:c},S.status),e[13]=i,e[14]=h,e[15]=c,e[16]=o,e[17]=a,e[18]=b):b=e[18],x=ya(s).map(b),e[6]=i,e[7]=h,e[8]=c,e[9]=o,e[10]=a,e[11]=s,e[12]=x}else x=e[12];let g;return e[19]!==x?(g=n.jsx(n.Fragment,{children:x}),e[19]=x,e[20]=g):g=e[20],g}let j;if(e[21]!==i||e[22]!==h||e[23]!==c||e[24]!==o||e[25]!==a||e[26]!==s){let x;e[28]!==i||e[29]!==h||e[30]!==c||e[31]!==o||e[32]!==a?(x=g=>n.jsx(Gt,{task:g,isActive:i===g.id,onClick:()=>a(g),onArchive:h&&g.created_by===c.currentUserId?()=>o(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0},g.id),e[28]=i,e[29]=h,e[30]=c,e[31]=o,e[32]=a,e[33]=x):x=e[33],j=s.map(x),e[21]=i,e[22]=h,e[23]=c,e[24]=o,e[25]=a,e[26]=s,e[27]=j}else j=e[27];let y;e[34]!==u||e[35]!==l||e[36]!==d?(y=(u||l)&&n.jsx(Ht,{onClick:d,isFetching:l}),e[34]=u,e[35]=l,e[36]=d,e[37]=y):y=e[37];let v;return e[38]!==j||e[39]!==y?(v=n.jsxs(n.Fragment,{children:[j,y]}),e[38]=j,e[39]=y,e[40]=v):v=e[40],v}function Oa(t){const e=A.c(11),{panel:s}=t;let r;return e[0]!==s.activeTaskId||e[1]!==s.archiveTask||e[2]!==s.filters||e[3]!==s.filtersActive||e[4]!==s.groupBy||e[5]!==s.hasMore||e[6]!==s.isFetchingMore||e[7]!==s.loadMore||e[8]!==s.selectTask||e[9]!==s.threads?(r=n.jsx(Ra,{threads:s.threads,groupBy:s.groupBy,activeTaskId:s.activeTaskId,onSelectTask:s.selectTask,onArchiveTask:s.archiveTask,filters:s.filters,hasMore:s.hasMore,isFetchingMore:s.isFetchingMore,onLoadMore:s.loadMore,filtersActive:s.filtersActive}),e[0]=s.activeTaskId,e[1]=s.archiveTask,e[2]=s.filters,e[3]=s.filtersActive,e[4]=s.groupBy,e[5]=s.hasMore,e[6]=s.isFetchingMore,e[7]=s.loadMore,e[8]=s.selectTask,e[9]=s.threads,e[10]=r):r=e[10],r}function Ba(t){const e=A.c(67);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{onNavigate:r}=s,{data:i}=pe.useSession(),a=i?.user?.id,{org:o}=ae();let c;e[2]!==o.id?(c=je(o.id),e[2]=o.id,e[3]=c):c=e[3];const u=c.id,l=ma(),d=Nt(),{threads:m,hasMore:f,isFetchingMore:h,fetchNextPage:j}=Je(),y=m.filter(Ha),{hide:v,setScope:x}=It(),g=Me(),{setTaskId:b,createNewTask:S}=Qe(),p=Ft(),k=et();let T;e[4]!==k||e[5]!==m||e[6]!==p?(T=ln({routeAgentId:p,threadVirtualMcpId:m.find(V=>V.id===k)?.virtual_mcp_id}),e[4]=k,e[5]=m,e[6]=p,e[7]=T):T=e[7];const N=T;let _;e[8]!==r?(_=()=>{r?.()},e[8]=r,e[9]=_):_=e[9];const w=_,I=[...y].sort(Ga),[P,L]=B.useState("all"),[$,E]=B.useState("flat"),[F,R]=xt("sidebar-threads-scope-all",!1),[M,C]=B.useState(!1),[G,z]=B.useState(!1);let H;e[10]!==C?(H=()=>{he("tasks_panel_search_opened"),z(!0),C(!0)},e[10]=C,e[11]=H):H=e[11];const O=H,U=a??null;let Z;e[12]!==U||e[13]!==P?(Z={type:P,member:"mine",currentUserId:U},e[12]=U,e[13]=P,e[14]=Z):Z=e[14];const Y=Z,Q={};F||(Q.created_by="me"),x(Q);let q;e[15]!==a?(q=V=>a?V.filter(ue=>ue.created_by===a):[],e[15]=a,e[16]=q):q=e[16];const le=q;let D;e[17]!==P?(D=V=>P==="automation"?V.filter(za):P==="manual"?V.filter(Da):V,e[17]=P,e[18]=D):D=e[18];const re=D,X=fa(re(F?I:le(I)),k);let J;e[19]!==k||e[20]!==w||e[21]!==a||e[22]!==v||e[23]!==g||e[24]!==o.slug||e[25]!==b||e[26]!==X?(J=V=>{if(a&&V.created_by&&V.created_by!==a)return;const ue=V.id===k;if(v(V.id),Bs(V.id),!ue)return;const ge=ba(X,V.id,a);w(),ge?b(ge.id,ge.virtual_mcp_id):g({to:"/$org",params:{org:o.slug}})},e[19]=k,e[20]=w,e[21]=a,e[22]=v,e[23]=g,e[24]=o.slug,e[25]=b,e[26]=X,e[27]=J):J=e[27];const ee=J;let ne;e[28]!==w||e[29]!==b?(ne=V=>{w(),b(V.id,V.virtual_mcp_id)},e[28]=w,e[29]=b,e[30]=ne):ne=e[30];const ie=ne;let te;e[31]!==N||e[32]!==k||e[33]!==m||e[34]!==w||e[35]!==S||e[36]!==a||e[37]!==u||e[38]!==l||e[39]!==d||e[40]!==b?(te=()=>{const V=N??u;he("sidebar_new_thread_clicked",{virtual_mcp_id:V}),w();const ue=Ys(m,V,a,l(V));if(ue){b(ue.id,ue.virtual_mcp_id,{newThread:!0});return}const ge=d?null:m.find(qt=>qt.id===k)?.branch??null;S(V,ge)},e[31]=N,e[32]=k,e[33]=m,e[34]=w,e[35]=S,e[36]=a,e[37]=u,e[38]=l,e[39]=d,e[40]=b,e[41]=te):te=e[41];const oe=te;let ce;e[42]!==j?(ce=()=>{j()},e[42]=j,e[43]=ce):ce=e[43];const xe=$!=="flat"||P!=="all"||F;let de;e[44]!==G||e[45]!==M||e[46]!==C?(de=G?n.jsx(xa,{open:M,onOpenChange:C}):null,e[44]=G,e[45]=M,e[46]=C,e[47]=de):de=e[47];let ke;return e[48]!==k||e[49]!==ee||e[50]!==Y||e[51]!==$||e[52]!==f||e[53]!==h||e[54]!==oe||e[55]!==O||e[56]!==ie||e[57]!==E||e[58]!==R||e[59]!==L||e[60]!==F||e[61]!==ce||e[62]!==xe||e[63]!==de||e[64]!==P||e[65]!==X?(ke={threads:X,activeTaskId:k,filters:Y,hasMore:f,isFetchingMore:h,loadMore:ce,groupBy:$,setGroupBy:E,typeFilter:P,setTypeFilter:L,showAll:F,setShowAll:R,filtersActive:xe,selectTask:ie,archiveTask:ee,newThread:oe,openSearch:O,searchDialog:de},e[48]=k,e[49]=ee,e[50]=Y,e[51]=$,e[52]=f,e[53]=h,e[54]=oe,e[55]=O,e[56]=ie,e[57]=E,e[58]=R,e[59]=L,e[60]=F,e[61]=ce,e[62]=xe,e[63]=de,e[64]=P,e[65]=X,e[66]=ke):ke=e[66],ke}function Da(t){return!t.trigger_id}function za(t){return!!t.trigger_id}function Ga(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function Ha(t){return!t.hidden}function Va(){const t=A.c(59),e=K(),[s,r]=B.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={onNavigate:()=>r(!1)},t[0]=i):i=t[0];const a=Ba(i),o=Le()?.activeTask;let c;t[1]!==o?.title||t[2]!==a.activeTaskId||t[3]!==a.threads||t[4]!==e?(c=o?.title||a.threads.find(M=>M.id===a.activeTaskId)?.title||e("tasksPanel.taskRow.untitledTask"),t[1]=o?.title,t[2]=a.activeTaskId,t[3]=a.threads,t[4]=e,t[5]=c):c=t[5];const u=c;let l;t[6]!==a?(l=()=>{r(!1),a.openSearch()},t[6]=a,t[7]=l):l=t[7];const d=l;let m;t[8]!==e?(m=e("chat.threadsMenu.chats"),t[8]=e,t[9]=m):m=t[9];const f=s&&"bg-sidebar-accent";let h;t[10]!==f?(h=se("flex h-[34px] min-w-0 shrink items-center gap-1.5 rounded-lg px-2 text-sm text-foreground transition-colors hover:bg-accent focus-ring",f),t[10]=f,t[11]=h):h=t[11];let j;t[12]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(hs,{size:16,className:"shrink-0"}),t[12]=j):j=t[12];let y;t[13]!==u?(y=n.jsx("span",{className:"truncate max-w-[10rem] font-medium",children:u}),t[13]=u,t[14]=y):y=t[14];let v;t[15]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Ze,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[15]=v):v=t[15];let x;t[16]!==m||t[17]!==h||t[18]!==y?(x=n.jsx(Fe,{asChild:!0,children:n.jsx(Lt,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":m,className:h,children:[j,y,v]})})}),t[16]=m,t[17]=h,t[18]=y,t[19]=x):x=t[19];let g;t[20]!==e?(g=e("chat.threadsMenu.chats"),t[20]=e,t[21]=g):g=t[21];let b;t[22]!==g?(b=n.jsx(Re,{side:"bottom",children:g}),t[22]=g,t[23]=b):b=t[23];let S;t[24]!==b||t[25]!==x?(S=n.jsxs(Oe,{children:[x,b]}),t[24]=b,t[25]=x,t[26]=S):S=t[26];let p;t[27]!==a?(p=n.jsx(ua,{panel:a,className:"size-8"}),t[27]=a,t[28]=p):p=t[28];let k;t[29]!==e?(k=e("sidebar.taskGroupsList.searchChats"),t[29]=e,t[30]=k):k=t[30];let T;t[31]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(ps,{size:16}),t[31]=T):T=t[31];let N;t[32]!==d||t[33]!==k?(N=n.jsx(_e,{"aria-label":k,onClick:d,className:"size-8",children:T}),t[32]=d,t[33]=k,t[34]=N):N=t[34];let _;t[35]!==e?(_=e("sidebar.taskGroupsList.newChat"),t[35]=e,t[36]=_):_=t[36];let w;t[37]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(vt,{size:16}),t[37]=w):w=t[37];let I;t[38]!==a.newThread||t[39]!==_?(I=n.jsx(_e,{"aria-label":_,onClick:a.newThread,className:"size-8",children:w}),t[38]=a.newThread,t[39]=_,t[40]=I):I=t[40];let P;t[41]!==N||t[42]!==I?(P=n.jsxs("div",{className:"flex items-center gap-0.5",children:[N,I]}),t[41]=N,t[42]=I,t[43]=P):P=t[43];let L;t[44]!==p||t[45]!==P?(L=n.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[p,P]}),t[44]=p,t[45]=P,t[46]=L):L=t[46];let $;t[47]!==a?($=n.jsx("div",{className:"flex max-h-[60vh] min-h-0 flex-col gap-0.5 overflow-y-auto overscroll-contain",children:n.jsx(Oa,{panel:a})}),t[47]=a,t[48]=$):$=t[48];let E;t[49]!==L||t[50]!==$?(E=n.jsxs($t,{align:"start",side:"bottom",onOpenAutoFocus:Ka,className:"flex w-80 flex-col gap-2 p-2",children:[L,$]}),t[49]=L,t[50]=$,t[51]=E):E=t[51];let F;t[52]!==s||t[53]!==S||t[54]!==E?(F=n.jsxs(Et,{open:s,onOpenChange:r,children:[S,E]}),t[52]=s,t[53]=S,t[54]=E,t[55]=F):F=t[55];let R;return t[56]!==a.searchDialog||t[57]!==F?(R=n.jsxs(n.Fragment,{children:[F,a.searchDialog]}),t[56]=a.searchDialog,t[57]=F,t[58]=R):R=t[58],R}function Ka(t){return t.preventDefault()}function Ua(){const t=A.c(20),e=K(),{threads:s}=Je(),{createNewTask:r}=Qe(),i=Rt(),a=et();let o;t[0]!==a||t[1]!==s?(o=s.find(v=>v.id===a)?.branch??null,t[0]=a,t[1]=s,t[2]=o):o=t[2];const c=o;let u;t[3]!==i||t[4]!==r||t[5]!==c?(u=()=>{r(i,c)},t[3]=i,t[4]=r,t[5]=c,t[6]=u):u=t[6];const l=u;let d;t[7]!==e?(d=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=d):d=t[8];let m;t[9]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(vt,{size:16}),t[9]=m):m=t[9];let f;t[10]!==l||t[11]!==d?(f=n.jsx(Fe,{asChild:!0,children:n.jsx("button",{type:"button",onClick:l,"aria-label":d,className:"flex shrink-0 items-center rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-ring",children:m})}),t[10]=l,t[11]=d,t[12]=f):f=t[12];let h;t[13]!==e?(h=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=h):h=t[14];let j;t[15]!==h?(j=n.jsx(Re,{side:"bottom",children:h}),t[15]=h,t[16]=j):j=t[16];let y;return t[17]!==f||t[18]!==j?(y=n.jsxs(Oe,{children:[f,j]}),t[17]=f,t[18]=j,t[19]=y):y=t[19],y}function qa(t){const e=A.c(16),{virtualMcpId:s,taskId:r}=t,{openPanel:i}=Bt();let a;e[0]!==r||e[1]!==s?(a={virtualMcpId:s,taskId:r},e[0]=r,e[1]=s,e[2]=a):a=e[2];const{tabs:o,activeTab:c,mainOpen:u}=Dt(a);if(o.length===0)return null;let l;if(e[3]!==c||e[4]!==u||e[5]!==i||e[6]!==o||e[7]!==s){let m;e[9]!==c||e[10]!==u||e[11]!==i||e[12]!==s?(m=f=>{const h=f.id==="automations"?ss({activeTab:c,mainOpen:u}):u&&f.id===c;return n.jsxs(st.Tab,{active:h,onClick:()=>{h||(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:f.id,tab_kind:f.kind,was_active:!1}),i(f.id))},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(we,{icon:f.icon})}),f.title]},f.id)},e[9]=c,e[10]=u,e[11]=i,e[12]=s,e[13]=m):m=e[13],l=o.map(m),e[3]=c,e[4]=u,e[5]=i,e[6]=o,e[7]=s,e[8]=l}else l=e[8];let d;return e[14]!==l?(d=n.jsx(st.Tabs,{"data-tour":Ds.surfaceTabs,children:l}),e[14]=l,e[15]=d):d=e[15],d}function Wa(t){return{threadId:t.routeThreadId,providerKey:t.routeThreadId??t.fallbackKey}}const Ve="__mobile-main-panel-tab-select__",Ue="main";function Ya({tabs:t,activeTab:e,mainOpen:s,t:r}){const i=t.find(o=>o.id===e),a=r("mainPanelTabs.mobileMainPanelTabSelect.mainView");return s?i?.title??a:i?.title??t[0]?.title??a}const Za={kind:"component",Component:xs},Qa={kind:"component",Component:gs},Xa={kind:"component",Component:bs},Ja={kind:"component",Component:jn};function er({tabs:t,overlayEnabled:e,t:s}){return[{value:"chat",title:s("mainPanelTabs.mobileMainPanelTabSelect.chat"),icon:Za},...t.length>0?t.map(r=>({value:r.id,title:r.title,icon:r.icon})):[{value:Ue,title:s("mainPanelTabs.mobileMainPanelTabSelect.mainView"),icon:Ja}],...e?[{value:"board",title:s("mainPanelTabs.mobileMainPanelTabSelect.tasks"),icon:Qa},{value:"files",title:s("mainPanelTabs.mobileMainPanelTabSelect.library"),icon:Xa}]:[]]}function tr(t){const e=A.c(53),{virtualMcpId:s,taskId:r}=t,i=K(),a=Me(),{openPanel:o}=Bt();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const u=Se(c);let l;e[1]!==r||e[2]!==s?(l={virtualMcpId:s,taskId:r},e[1]=r,e[2]=s,e[3]=l):l=e[3];const{tabs:d,activeTab:m,mainOpen:f}=Dt(l),{org:h}=ae(),j=Ms();let y;e[4]!==h.id?(y=nt(h.id),e[4]=h.id,e[5]=y):y=e[5];const v=s===y;let x,g,b,S,p,k,T,N,_,w;if(e[6]!==m||e[7]!==f||e[8]!==a||e[9]!==v||e[10]!==o||e[11]!==h.id||e[12]!==u.org||e[13]!==u.taskId||e[14]!==j||e[15]!==i||e[16]!==d||e[17]!==s){S=Symbol.for("react.early_return_sentinel");e:{const L=er({tabs:d,overlayEnabled:!!(u.org&&u.taskId),t:i}),$=f?L.find(O=>O.value===m)?.value??Ue:"chat",E=L.find(O=>O.value===$),F=E?.title??Ya({tabs:d,activeTab:m,mainOpen:f,t:i});let R;e[28]!==a?(R=O=>{a({to:".",search:U=>({...U,...sn(O)}),replace:!0})},e[28]=a,e[29]=R):R=e[29];const M=R;let C;e[30]!==v||e[31]!==o||e[32]!==h.id||e[33]!==j||e[34]!==M||e[35]!==s?(C=O=>{if(O!==Ve){if(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:O,source:"mobile_select"}),zs({reportsOnly:j,onReportAgent:v,tabId:O})){o(O,{virtualmcpid:nt(h.id),search:ar});return}if(O==="chat"||O===Ue){M(O==="chat"?"chat":"main");return}o(O,{search:nr})}},e[30]=v,e[31]=o,e[32]=h.id,e[33]=j,e[34]=M,e[35]=s,e[36]=C):C=e[36];const G=C,z=L.find(O=>O.value!==$);if(L.length===2&&z){S=n.jsxs("button",{type:"button",onClick:()=>G(z.value),"aria-label":i("mainPanelTabs.mobileMainPanelTabSelect.switchTo",{name:z.title}),className:"flex h-10 min-w-0 max-w-[7.5rem] items-center gap-1.5 rounded-lg px-1.5 text-xs text-foreground transition-colors hover:bg-accent focus-ring",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(we,{icon:z.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:z.title})]});break e}g=kn,_=Ve,w=G;let H;e[37]!==i?(H=i("mainPanelTabs.mobileMainPanelTabSelect.view"),e[37]=i,e[38]=H):H=e[38],b=n.jsx(Sn,{"aria-label":H,className:"h-10! w-full min-w-0 max-w-[7.5rem] rounded-lg border-0 bg-transparent px-1.5 text-xs shadow-none [--shadow-edge:none]",children:n.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[E&&n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(we,{icon:E.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:F})]})}),x=Nn,p="end",k="w-56",e[39]!==F?(T=n.jsx(zt,{value:Ve,disabled:!0,hideCheck:!0,className:"hidden",children:F}),e[39]=F,e[40]=T):T=e[40],N=L.map(sr)}e[6]=m,e[7]=f,e[8]=a,e[9]=v,e[10]=o,e[11]=h.id,e[12]=u.org,e[13]=u.taskId,e[14]=j,e[15]=i,e[16]=d,e[17]=s,e[18]=x,e[19]=g,e[20]=b,e[21]=S,e[22]=p,e[23]=k,e[24]=T,e[25]=N,e[26]=_,e[27]=w}else x=e[18],g=e[19],b=e[20],S=e[21],p=e[22],k=e[23],T=e[24],N=e[25],_=e[26],w=e[27];if(S!==Symbol.for("react.early_return_sentinel"))return S;let I;e[41]!==x||e[42]!==p||e[43]!==k||e[44]!==T||e[45]!==N?(I=n.jsxs(x,{align:p,className:k,children:[T,N]}),e[41]=x,e[42]=p,e[43]=k,e[44]=T,e[45]=N,e[46]=I):I=e[46];let P;return e[47]!==g||e[48]!==b||e[49]!==I||e[50]!==_||e[51]!==w?(P=n.jsxs(g,{value:_,onValueChange:w,children:[b,I]}),e[47]=g,e[48]=b,e[49]=I,e[50]=_,e[51]=w,e[52]=P):P=e[52],P}function sr(t){return n.jsx(zt,{value:t.value,children:n.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(we,{icon:t.icon})}),n.jsx("span",{className:"min-w-0 truncate",children:t.title})]})},t.value)}function nr(t){return{...t,sidepanel:!1}}function ar(t){return{...t,thread:void 0,sidepanel:!1}}function rr(){const t=A.c(3),e=ns();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={select:ir},t[0]=s):s=t[0];const r=gt(s);if(!e||!r)return!1;let i;return t[1]!==r?(i=r==="app"||Tn.includes(r),t[1]=r,t[2]=i):i=t[2],i}function ir(t){const{staticData:e}=t.matches.findLast(lr)??{};return e?.siteEditorView?"site-editor":e?.mainView}function lr(t){return t.staticData.mainView}function or(t,e,s){const r=A.c(33),i=Xe(),{locator:a}=ae(),o=B.useSyncExternalStore(i.threads.subscribe,i.threads.get),c=B.useSyncExternalStore(i.threadsStatus.subscribe,i.threadsStatus.get);let u;r[0]!==t||r[1]!==o?(u=t===null?null:o.find(p=>p.id===t&&!p.partial)??null,r[0]=t,r[1]=o,r[2]=u):u=r[2];const l=u,[d,m]=B.useState(void 0),[f,h]=B.useState(t);f!==t&&(h(t),m(void 0));let j,y;r[3]!==d||r[4]!==t||r[5]!==l||r[6]!==i||r[7]!==c.kind?(j=()=>{t!==null&&(l||c.kind!=="loading"&&d===void 0&&(m("pending"),i.fetchThreadIntoSlot(t).then(p=>{m(p)})))},y=[t,l,c.kind,d,i],r[3]=d,r[4]=t,r[5]=l,r[6]=i,r[7]=c.kind,r[8]=j,r[9]=y):(j=r[8],y=r[9]),B.useEffect(j,y);let v;r[10]!==s||r[11]!==a||r[12]!==i||r[13]!==e?(v={mutationFn:async p=>i.create({id:p,virtual_mcp_id:e,...s?{branch:s}:{},...Ws(sessionStorage,a,p)})},r[10]=s,r[11]=a,r[12]=i,r[13]=e,r[14]=v):v=r[14];const x=as(v);let g,b;if(r[15]!==x||r[16]!==d||r[17]!==t||r[18]!==l||r[19]!==c.kind?(g=()=>{t!==null&&(l||d===null&&c.kind!=="loading"&&(x.isPending||x.variables!==t&&x.mutate(t)))},b=[t,l,d,c.kind,x],r[15]=x,r[16]=d,r[17]=t,r[18]=l,r[19]=c.kind,r[20]=g,r[21]=b):(g=r[20],b=r[21]),B.useEffect(g,b),t===null){let p;return r[22]===Symbol.for("react.memo_cache_sentinel")?(p={status:"ready",task:null},r[22]=p):p=r[22],p}if(l){let p;return r[23]!==l?(p={status:"ready",task:l},r[23]=l,r[24]=p):p=r[24],p}if(d&&typeof d=="object"){let p;return r[25]!==d?(p={status:"ready",task:d},r[25]=d,r[26]=p):p=r[26],p}if(x.data){let p;return r[27]!==x.data?(p={status:"ready",task:x.data},r[27]=x.data,r[28]=p):p=r[28],p}if(x.isError){let p;return r[29]!==x.error?(p={status:"error",error:x.error},r[29]=x.error,r[30]=p):p=r[30],p}if(x.isPending||c.kind!=="loading"){let p;return r[31]===Symbol.for("react.memo_cache_sentinel")?(p={status:"creating"},r[31]=p):p=r[31],p}let S;return r[32]===Symbol.for("react.memo_cache_sentinel")?(S={status:"loading"},r[32]=S):S=r[32],S}const cr=50;function dr(t,e){const s=A.c(15),{org:r}=ae(),i=Pe(),{data:a}=pe.useSession(),o=a?.user?.id??"";let c;s[0]!==r.id||s[1]!==o||s[2]!==t?(c=fe.agentEntryThreads(r.id,o,t),s[0]=r.id,s[1]=o,s[2]=t,s[3]=c):c=s[3];const u=e&&!!o;let l;s[4]!==i||s[5]!==t?(l=async()=>{try{return(await i.call("COLLECTION_THREADS_LIST",{limit:cr,offset:0,orderBy:[{field:["updated_at"],direction:"desc"}],where:{hidden:!1,created_by:"me",virtual_mcp_id:t}})).items}catch{return[]}},s[4]=i,s[5]=t,s[6]=l):l=s[6];let d;s[7]!==c||s[8]!==u||s[9]!==l?(d={queryKey:c,enabled:u,staleTime:0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,queryFn:l},s[7]=c,s[8]=u,s[9]=l,s[10]=d):d=s[10];const m=me(d);if(!e||!o){let h;return s[11]===Symbol.for("react.memo_cache_sentinel")?(h={status:"idle"},s[11]=h):h=s[11],h}if(!m.data||m.isFetching){let h;return s[12]===Symbol.for("react.memo_cache_sentinel")?(h={status:"loading"},s[12]=h):h=s[12],h}let f;return s[13]!==m.data?(f={status:"ready",threads:m.data},s[13]=m.data,s[14]=f):f=s[14],f}function ur(t){const e=A.c(13),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=Se(r);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const o=Ae(a);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={select:fr},e[2]=c):c=e[2];const u=gt(c),{org:l}=ae();let d;e[3]!==l||e[4]!==i.agentId||e[5]!==i.legacyView||e[6]!==i.org||e[7]!==u||e[8]!==o?(d=i.org?rs({pathname:u,org:i.org,pathAgentId:i.agentId,pathLegacyView:i.legacyView,fallbackAgentId:je(l.id).id,search:o}):null,e[3]=l,e[4]=i.agentId,e[5]=i.legacyView,e[6]=i.org,e[7]=u,e[8]=o,e[9]=d):d=e[9];const m=d;let f;return e[10]!==s||e[11]!==m?(f=m?n.jsx(tt,{target:m}):s,e[10]=s,e[11]=m,e[12]=f):f=e[12],f}function fr(t){return t.matches.at(-1)?.pathname??t.location.pathname}function mr(){const t=A.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=Se(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const i=Ae(r),{org:a}=ae(),{org:o,taskId:c}=s;if(!o||c===void 0)return null;let u;return t[2]!==o||t[3]!==a.id||t[4]!==i||t[5]!==c?(u=is({org:o,taskId:c,fallbackAgentId:je(a.id).id,search:i}),t[2]=o,t[3]=a.id,t[4]=i,t[5]=c,t[6]=u):u=t[6],u}function hr(){const t=A.c(2),e=mr();let s;return t[0]!==e?(s=e?n.jsx(tt,{target:e}):null,t[0]=e,t[1]=s):s=t[1],s}function pr(){const t=A.c(6),e=wn(),s=Me();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const{preview:i}=Ae(r);if(!e||!i)return null;let a;t[1]!==s?(a=()=>s({to:".",search:xr}),t[1]=s,t[2]=a):a=t[2];let o;return t[3]!==i||t[4]!==a?(o=n.jsx(Cn,{previewPath:i,onClose:a,showSeeInLibrary:!0}),t[3]=i,t[4]=a,t[5]=o):o=t[5],o}function xr(t){const{preview:e,...s}=t;return s}function gr(t){const e=A.c(11),{children:s}=t,r=K();let i;e[0]!==r?(i=r("agentShellLayout.agentShellLayout.chatLoadingError"),e[0]=r,e[1]=i):i=e[1];let a;e[2]!==i?(a=n.jsx("div",{role:"alert",className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:i}),e[2]=i,e[3]=a):a=e[3];let o;e[4]!==s?(o=s??n.jsx(oa,{}),e[4]=s,e[5]=o):o=e[5];let c;e[6]!==o?(c=n.jsx(Ie,{children:o}),e[6]=o,e[7]=c):c=e[7];let u;return e[8]!==a||e[9]!==c?(u=n.jsx(pt,{fallback:a,children:c}),e[8]=a,e[9]=c,e[10]=u):u=e[10],u}function br(t){const e=A.c(5),{threadId:s,children:r}=t;if(s===null){let a;return e[0]!==r?(a=n.jsx(W.ThreadlessProvider,{children:r}),e[0]=r,e[1]=a):a=e[1],a}let i;return e[2]!==r||e[3]!==s?(i=n.jsx(W.ActiveTaskProvider,{taskId:s,children:r}),e[2]=r,e[3]=s,e[4]=i):i=e[4],i}function vr(t){const e=A.c(3),{onNewTaskRef:s,createNewTask:r}=t;let i;return e[0]!==r||e[1]!==s?(i=()=>(s.current=r,()=>{s.current=null}),e[0]=r,e[1]=s,e[2]=i):i=e[2],B.useLayoutEffect(i),null}function yr({virtualMcpId:t,hasActiveRepository:e,sandboxMap:s,children:r}){const i=K(),{currentBranch:a,activeTask:o,setCurrentTaskBranch:c}=$e(),{data:u}=pe.useSession(),l=u?.user?.id,d=!Cs(o?.harness_id),m=Qs({agentSandboxMap:s,threadSandboxMap:o?.metadata?.sandboxMap,userId:l,ownerId:o?.created_by,branch:a}),f=e||Hs(o?.metadata),h=B.useRef(null),j=d&&Xs({threadLoaded:!!o,isOwner:!!l&&o?.created_by===l,hasActiveRepository:f,branch:a??null,attempted:h.current===(o?.id??null)});B.useEffect(()=>{!j||!o||(h.current=o.id,c(Ct(u?.user?.name||u?.user?.email?.split("@")[0])))},[j,o,u,c]);const y=jt(t),v=Ee(t),x=Mt(v,a),{releases:g,createRelease:b}=Vs(t),p=!!l&&o?.created_by===l&&!!a&&a!==x&&!g.some(L=>L.branch===a),k=B.useRef(null);B.useEffect(()=>{!p||!a||k.current!==a&&(k.current=a,b({branch:a,name:Us(g,i("thread.branchPicker.defaultVersionName")),color:Ks(g.length),createdBy:l,createdAt:new Date().toISOString()}).catch(()=>{}))},[p,a,g,b,l,i]);const T=y.resolved?y.runtime:null,N=Js(t,a??void 0),w=(l&&a?In(m?.[l]?.[a]):{})["agent-sandbox"]??null,I=w?.previewUrl??null,P=d&&T!=="cms"&&(!!w||N);return d?T==="cms"?n.jsx(lt,{children:r},`${t}:${a??"no-branch"}:${o?.id??""}`):n.jsx(Ss,{virtualMcpId:t,branch:a??null,previewUrl:I,enabled:P,children:n.jsx(en,{executionEnabled:d,virtualMcpId:t,branch:a??null,userId:l??null,hasActiveRepository:f,vmEntry:w,threadId:o?.id??null,children:n.jsx(lt,{children:r},`${t}:${a??"no-branch"}:${o?.id??""}`)})},o?.id??"no-thread"):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex h-full rounded-[0.75rem] bg-background shadow-edge",children:n.jsx(At,{image:n.jsx(We,{size:48,className:"text-muted-foreground"}),title:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWeb"),description:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWebDescription")})})})}function jr(){const t=A.c(16),e=K(),{toggleSidebar:s}=ys(),{virtualMcpId:r,taskId:i}=$e();let a;t[0]!==e?(a=e("layouts.shellControls.toggleSidebar"),t[0]=e,t[1]=a):a=t[1];let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(vs,{size:16}),t[2]=o):o=t[2];let c;t[3]!==a||t[4]!==s?(c=n.jsx(_e,{className:"md:hidden",onClick:s,"aria-label":a,children:o}),t[3]=a,t[4]=s,t[5]=c):c=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Va,{}),t[6]=u):u=t[6];let l;t[7]!==c?(l=n.jsxs(De.Topbar.Left,{children:[c,u]}),t[7]=c,t[8]=l):l=t[8];let d;t[9]!==i||t[10]!==r?(d=n.jsx("div",{className:"min-w-0 md:hidden",children:n.jsx(tr,{virtualMcpId:r,taskId:i})}),t[9]=i,t[10]=r,t[11]=d):d=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(De.Topbar.Right,{className:"shrink-0",children:n.jsx(Ua,{})}),t[12]=m):m=t[12];let f;return t[13]!==l||t[14]!==d?(f=n.jsxs(De.Topbar,{className:"border-b border-border/60 px-3",children:[l,d,m]}),t[13]=l,t[14]=d,t[15]=f):f=t[15],f}function Sr(t){const e=A.c(22),{layout:s,onNewTaskRef:r,createNewTask:i}=t,{virtualMcpId:a,taskId:o}=$e(),c=yn()??"overview",u=rr(),[l,d]=B.useState(null),m=l===c,f=u?m:s.threadOpen;let h;e[0]!==c||e[1]!==s||e[2]!==u||e[3]!==m?(h=u?()=>d(m?null:c):s.toggleThread,e[0]=c,e[1]=s,e[2]=u,e[3]=m,e[4]=h):h=e[4];const j=h;let y;e[5]!==i||e[6]!==r?(y=n.jsx(vr,{onNewTaskRef:r,createNewTask:i}),e[5]=i,e[6]=r,e[7]=y):y=e[7];let v;e[8]!==o||e[9]!==a?(v=n.jsx(qa,{virtualMcpId:a,taskId:o}),e[8]=o,e[9]=a,e[10]=v):v=e[10];let x,g;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(it.Thread,{topbar:n.jsx(jr,{}),children:n.jsx(gr,{})}),g=n.jsx(bt,{}),e[11]=x,e[12]=g):(x=e[11],g=e[12]);let b;e[13]!==c||e[14]!==s||e[15]!==v||e[16]!==f||e[17]!==j?(b=n.jsxs(it,{...s,threadOpen:f,toggleThread:j,contentKey:c,contentNavigation:v,children:[x,g]}),e[13]=c,e[14]=s,e[15]=v,e[16]=f,e[17]=j,e[18]=b):b=e[18];let S;return e[19]!==y||e[20]!==b?(S=n.jsxs(n.Fragment,{children:[y,b]}),e[19]=y,e[20]=b,e[21]=S):S=e[21],S}function kr(){const t=K(),e=Me(),s=on(),{create:r}=It(),{org:i}=ae(),o=Se({strict:!1}).org??"",c=Ae({strict:!1}),u=et(),l=Rt(),d=Ft(),[m]=B.useState(()=>crypto.randomUUID()),{data:f}=pe.useSession(),[h]=B.useState(()=>Ct(f?.user?.name||f?.user?.email?.split("@")[0])),j=Xe(),y=B.useSyncExternalStore(j.threads.subscribe,j.threads.get),v=B.useSyncExternalStore(j.threadsStatus.subscribe,j.threadsStatus.get),x=Ee(l),g=!!(x&&_t(x)),b=Mt(x,null),S=u===null&&!!d&&!!x,p=M=>Zs(M,l,f?.user?.id,Pt(x?.metadata),g,{baseBranch:b}),k=S&&v.kind!=="loading"?p(y):void 0,T=dr(l,S&&v.kind!=="loading"&&!k),N=or(u,l,h);ca(N.status==="ready"?N.task:null);const _=x?.metadata?.ui?.layout??null,w=_?{defaultMainView:_.defaultMainView??null,chatDefaultOpen:_.chatDefaultOpen??null}:null,I=nn(w),{threadId:P,providerKey:L}=Wa({routeThreadId:u,fallbackKey:m}),$=async()=>{const M=crypto.randomUUID(),C=y.find(G=>G.id===P)?.branch??null;try{await r({id:M,virtual_mcp_id:l,...C?{branch:C}:{}})}catch{}s(M,()=>({}))},E=B.useRef(null);B.useEffect(()=>{const M=C=>{Gs(C)&&C.shiftKey&&C.code==="KeyS"&&!C.repeat&&(C.preventDefault(),E.current?.())};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[]);const F=N.status==="ready"?N.task:null,R=F?.virtual_mcp_id;if(F&&R&&!cn({routeAgentId:l,threadAgentId:R})){const M=ls({org:o,agentId:R,superAgentId:je(i.id).id});return n.jsx(tt,{target:{route:M,search:{thread:F.id,sidepanel:c.sidepanel,mainpanel:c.mainpanel,autosend:c.autosend}}})}if(S){if(v.kind==="loading"||T.status==="loading")return n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background shadow-edge rounded-[0.75rem] text-sm text-muted-foreground",children:[n.jsx(ve,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})});const C=(k??(T.status==="ready"?p(T.threads):void 0))?.id??(g?m:null);if(C)return n.jsx(os,{to:".",replace:!0,search:G=>({...G,thread:C})})}return N.status==="creating"||N.status==="loading"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background shadow-edge rounded-[0.75rem] text-sm text-muted-foreground",children:[n.jsx(ve,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})}):N.status==="error"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"alert",className:"flex flex-col h-full items-center justify-center gap-2 bg-background shadow-edge rounded-[0.75rem] p-8 text-sm",children:[n.jsx("div",{className:"font-medium",children:t("agentShellLayout.agentShellLayout.taskUnavailable")}),n.jsx("div",{className:"text-muted-foreground",children:N.error.message})]})}):x?n.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:n.jsx(W.Provider,{virtualMcpId:l,task:N.status==="ready"?N.task:null,children:n.jsx(_s,{layout:I,children:n.jsx(yr,{virtualMcpId:l,hasActiveRepository:g,sandboxMap:x.metadata?.sandboxMap,children:n.jsx(br,{threadId:P,children:n.jsx(Ie,{children:n.jsx(Sr,{layout:I,onNewTaskRef:E,createNewTask:$})})},L)})})},l)}):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden shadow-edge rounded-[0.75rem]",children:n.jsx(At,{image:n.jsx(We,{size:48,className:"text-muted-foreground"}),title:t("agentShellLayout.agentShellLayout.agentNotFound"),description:t("agentShellLayout.agentShellLayout.agentNotFoundDescription",{virtualMcpId:l}),actions:n.jsx(qe,{variant:"outline",onClick:()=>e({to:"/$org",params:{org:o}}),children:t("agentShellLayout.agentShellLayout.goToOrgHome")})})})})}function Io(){const t=A.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=Se(e);if(s.taskId!==void 0){let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(hr,{}),t[1]=i):i=t[1],i}if(s._splat!==void 0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(bt,{}),t[2]=i):i=t[2],i}let r;return t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Ie,{children:n.jsx(ur,{children:n.jsx(_n,{children:n.jsxs(Pn,{children:[n.jsx(kr,{}),n.jsx(pr,{})]})})})}),t[3]=r):r=t[3],r}export{Io as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as P,r as i,b7 as ie,b8 as ce,e as le,b9 as j,c as de,a2 as fe,J as Se,j as me}from"./index-
|
|
1
|
+
import{o as P,r as i,b7 as ie,b8 as ce,e as le,b9 as j,c as de,a2 as fe,J as Se,j as me}from"./index-CaH7O3hJ.js";import{u as pe}from"./use-mcp-client-MRThuZpK.js";import{a as ye}from"./input-D2sd1bar.js";import{c as Ee,u as he}from"./chat-context-_d3c57p1.js";import{u as Re}from"./thread-intent-DKuqiaG7.js";import{e as xe}from"./backoff-CrEUbyZT.js";import{u as we}from"./index-CJu3ft8V.js";import{d as Ae}from"./sandbox-start-errors-BK_aDCyt.js";function Te(e,t){const n=P(t);return Pe({filters:{...e,status:"pending"}},n).length}function X(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function Pe(e={},t){const n=P(t).getMutationCache(),r=i.useRef(e),s=i.useRef(null);return s.current===null&&(s.current=X(n,e)),i.useEffect(()=>{r.current=e}),i.useSyncExternalStore(i.useCallback(u=>n.subscribe(()=>{const a=ie(s.current,X(n,r.current));s.current!==a&&(s.current=a,ce.schedule(u))}),[n]),()=>s.current,()=>s.current)}async function be(e,t,n){const r=await e.callTool({name:t,arguments:n});if(r.isError){const s=r.content?.[0]?.text??`Tool ${t} failed without a message`;throw new Error(s)}return r}const q=["SANDBOX_START"],w=new Map,Ce=e=>`${e.virtualMcpId}::${e.branch??""}`,ke=e=>e.message.includes("retry shortly"),U=new Set,g={mark:(e,t)=>U.add(`${e}::${t}`),clear:(e,t)=>U.delete(`${e}::${t}`),isStopped:(e,t)=>U.has(`${e}::${t}`)};function _e(e,t){const n=P();return le({mutationKey:q,retry:(r,s)=>ke(s)&&r<6,retryDelay:r=>xe(5e3,500,r,2,0),mutationFn:async r=>{r.branch&&g.clear(r.virtualMcpId,r.branch);const s=Ce(r),u=w.get(s);if(u)return u;const a=(async()=>(await be(e,"SANDBOX_START",r)).structuredContent)();w.set(s,a);try{return await a}finally{w.get(s)===a&&w.delete(s)}},onSuccess:()=>{j(n),t?.onStarted?.()}})}function Me(e,t){const n=de.c(3);let r;return n[0]!==t||n[1]!==e?(r={mutationKey:q,predicate:u=>{if(!e)return!1;const a=u.state.variables;return!a||a.virtualMcpId!==e?!1:(a.branch??"")===(t??"")}},n[0]=t,n[1]=e,n[2]=r):r=n[2],Te(r)>0}function Ue(e){return e.appPaused||e.userStopped?{kind:"suspended"}:e.startError&&!e.previewUrl?{kind:"errored",error:e.startError}:e.previewUrl?{kind:"iframe",previewUrl:e.previewUrl}:{kind:"starting"}}function ge(e){return e.executionEnabled&&e.sessionRuntime==="sandbox"&&e.hasActiveRepository&&!!e.userId&&!!e.branch&&!e.vmEntry&&!e.userStopped&&!e.isPending&&!e.attempted}function We(e){return e.threadLoaded&&e.isOwner&&e.hasActiveRepository&&!e.branch&&!e.attempted}function De(e){return e.executionEnabled&&e.notFound&&!!e.deadVmId&&!e.isPending&&!e.userStopped&&e.deadVmId!==e.lastDeadVmId}function ze(e){const{agentSandboxMap:t,threadSandboxMap:n,userId:r,branch:s}=e,u=e.ownerId??r;if(!r||!u||!s)return t;const a=n?.[u]?.[s];return a?{...t??{},[r]:{...t?.[r]??{},[s]:a}}:t}function A(e,t,n){const r={virtualMcpId:e};return t&&(r.branch=t),n&&(r.threadId=n),r}const Y=2,Le=new Set(["scheduling-timeout","reconciler-error","claim-never-created","unknown"]);function J(e){return Le.has(e)}function Oe(e){return e.executionEnabled&&e.failedReason!==null&&J(e.failedReason)&&e.attempts<Y&&!e.isPending&&!e.userStopped&&!e.alreadyHandled}const $e={branch:null,count:0,handled:!1};function Be(e,t){return e.branch===t?e:{branch:t,count:0,handled:!1}}function Ve(e){return e.mutationError?e.mutationError:e.phase?.kind==="failed"&&!e.startPending&&e.claimRetryExhausted?{code:null,message:e.phase.message}:null}function Fe(e){switch(e.kind){case"suspended":return"suspended";case"iframe":return"running";case"starting":return"starting";case"errored":return"errored"}}function Q(e,t){return`${e??""}::${t??""}`}function ve(e){const t=e.vmEntry?.previewUrl??null;return t||(e.seeded?.key===e.key?e.seeded.url:null)}function T(e){const{data:t,virtualMcpId:n,branch:r}=e;t?.branch&&!r&&e.setCurrentTaskBranch(t.branch),t?.previewUrl&&e.setSeededPreviewUrl({key:Q(n,t.branch??r),url:t.previewUrl})}const Ne={branch:null,previewState:{kind:"starting"},status:"idle",vmEntry:null,previewUrl:null,userStopped:!1,start:()=>{},stop:async()=>{},restart:async()=>{},retry:()=>{},resume:()=>{}},M=i.createContext(Ne);function Ge(){return i.use(M)}function Ze({executionEnabled:e,virtualMcpId:t,branch:n,userId:r,hasActiveRepository:s,vmEntry:u,threadId:a,children:D}){const{org:L}=fe(),{setCurrentTaskBranch:l}=Ee(),W=Re(),p=we(),z=P(),O=ye(t),G=O.resolved?O.runtime:null,d=he()?.taskId??null,$=pe({connectionId:Se,orgId:L.id,orgSlug:L.slug}),c=_e($,{onStarted:()=>{a&&W?.refreshThreadMetadata(a)}}),{mutate:f,reset:Z}=c,[ee,S]=i.useState(null),b=i.useRef(new Set),C=i.useRef(null),[B,R]=i.useState($e),E=Be(B,n);E!==B&&R(E);const y=p.phase?.kind==="failed"?p.phase:null,V=ve({vmEntry:u,seeded:y?null:ee,key:Q(t,n)}),h=!!t&&!!n&&g.isStopped(t,n),te=p.status.state==="paused",ne=!y||!J(y.reason)||E.count>=Y,re=Ve({mutationError:c.isError&&c.error?Ae(c.error.message):null,phase:p.phase,startPending:c.isPending,claimRetryExhausted:ne}),F=Ue({previewUrl:V,appPaused:te,userStopped:h,startError:re}),se=Fe(F),k=n??"",oe=b.current.has(k),v=ge({executionEnabled:e,hasActiveRepository:s,userId:r,branch:n,vmEntry:u,userStopped:h,isPending:c.isPending,attempted:oe,sessionRuntime:G});i.useEffect(()=>{if(!v||!t)return;b.current.add(k);const m=A(t,n,d);f(m,{onSuccess:o=>{T({data:o,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:o=>{console.error("[sandbox-lifecycle] auto-start failed:",o)}})},[v,k,n,t,d,f,l,S]);const x=p.notFound?u?.sandboxHandle??null:null,N=De({executionEnabled:e,notFound:p.notFound,deadVmId:x,lastDeadVmId:C.current,isPending:c.isPending,userStopped:h});i.useEffect(()=>{if(!N||!x||!t)return;C.current=x;const m=A(t,n,d);f(m,{onSuccess:o=>{T({data:o,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:o=>{console.error("[sandbox-lifecycle] self-heal failed:",o)}})},[N,x,t,n,d,f,l,S]);const I=Oe({executionEnabled:e,failedReason:y?.reason??null,attempts:E.count,isPending:c.isPending,userStopped:h,alreadyHandled:E.handled});i.useEffect(()=>{if(!y){R(o=>o.handled?{...o,handled:!1}:o);return}if(!I||!t)return;R(o=>({...o,handled:!0,count:o.count+1}));const m=A(t,n,d);f(m,{onSuccess:o=>{T({data:o,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:o=>{console.error("[sandbox-lifecycle] claim auto-retry failed:",o)}})},[y,I,t,n,d,f,l,S]);const _=()=>{if(!e||!t)return;const m=A(t,n,d);f(m,{onSuccess:o=>{T({data:o,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:o=>{console.error("[sandbox-lifecycle] user start failed:",o)}})},K=async()=>{if(!(!e||!t||!n)&&u){g.mark(t,n);try{await $.callTool({name:"SANDBOX_DELETE",arguments:{virtualMcpId:t,branch:n}})}catch{}j(z)}},ae=async()=>{await K(),_()},H=()=>{b.current=new Set,C.current=null,R({branch:n,count:0,handled:!1}),Z(),_()},ue={branch:n,previewState:F,status:se,vmEntry:u,previewUrl:V,userStopped:h,start:_,stop:K,restart:ae,retry:H,resume:H};return me.jsx(M,{value:ue,children:D})}export{Ze as S,_e as a,Ge as b,ze as o,We as s,Me as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aF as s,bY as e,aG as o,bZ as d,b_ as l}from"./index-
|
|
1
|
+
import{aF as s,bY as e,aG as o,bZ as d,b_ as l}from"./index-CaH7O3hJ.js";const a=500;s({title:o().max(a),url:o().max(a),icon:o().max(a)});const t=s({keyId:o().max(a),modelId:o().max(a),title:o().max(a).optional()}).nullable();d(["fast","smart","thinking","image","web_search","deep_research"]);d(["fast","smart","thinking"]);const b=s({tiers:s({fast:t,smart:t,thinking:t,image:t,web_search:t,deep_research:t})});s({tiers:s({fast:t.optional(),smart:t.optional(),thinking:t.optional()})});const f=50,c=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/;s({host:o().trim().toLowerCase().min(1).max(a).regex(c).describe("Git host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:o().min(1).max(a).describe("Vault secret id holding the PAT used to authenticate this host.")});s({ids:l(o().max(a)).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});const u=s({voice_mode:e().optional(),home_task_intake_enabled:e().optional().describe("Show Task mode on the Home composer and allow reports to start tasks."),demo_mode:e().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),reports_only:e().optional().describe("Curated Deco Score look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),reviewer_enabled:e().optional().describe("Run the Reviewer on a task's pull request when the card reaches In Review — it reviews the code with the repo's stack-appropriate skills, fixes what it finds on the PR's own branch, then exercises the change on the deploy preview and approves or hands the card to a human."),qa_agent_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:e().optional().describe("When a card reaches Ready for Deployment, merge its pull request automatically instead of waiting for someone to press Ship."),auto_resolve_conflicts:e().optional().describe("When a pull request in Ready for Deployment can't be merged because it conflicts with its base branch, hand it back to the Super Agent to resolve the conflict (check out the branch, merge the base, push). Unset, it follows `auto_merge`; set it explicitly to run one without the other."),cheap_reviewer_model:e().optional().describe("Run the Reviewer on a cheaper model than the Super Agent that wrote the code. On by default — turning it off trades cost for some review depth."),coding_agent_org_mcps:e().optional().describe("Give a coding-agent run (the claude-code harness in a sandbox) every MCP connection in the org as its own MCP server, on top of the narrow Studio surface it always gets. Off by default: each connection is one more server the agent connects to at session start, and all of their tools land in its context."),coding_agents_claude_code:e().optional().describe("Run chats on a Code Agent (an agent imported from a GitHub repo) with the claude-code harness inside its sandbox, instead of hosted Decopilot. Off by default: it changes the runtime of every such chat, and claude-code flushes whole turns rather than streaming tokens."),task_board_codex:e().optional().describe("Allow tasks to select the Codex harness. Off by default; existing tasks keep Claude Code. Reviewers keep their own runtime."),chat_harness_codex:e().optional().describe("Use Codex for new sandbox chats. Off by default; requires hosted sandboxes and a ChatGPT subscription or Responses API provider. Existing chats keep their pinned runtime."),chat_harness_sandbox_only:e().optional().describe("Run every chat with the claude-code harness in its own sandbox instead of hosted Decopilot. On by default (see DEFAULT_ON_FLAGS); a deployment without hosted sandboxes keeps Decopilot regardless."),sandbox_repo_snapshots:e().optional().describe("Keep a Freestyle snapshot of each project repo at its default branch's head, with its dependencies installed and its dev server running, so a new sandbox for that repo starts already serving. Off by default: each push to a default branch costs a snapshot build the next time a sandbox starts."),auto_assign_report_tasks_to_super_agent:e().optional().describe("When a Deco Score import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),hosting_enabled:e().optional().describe("Per-site Hosting tab (deployments, domains, deploy outcomes). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),deco_analytics_enabled:e().optional().describe("Per-site Deco Analytics tab (traffic, realtime, usage & limits). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),e2e_enabled:e().optional().describe("Per-site E2E tab (end-to-end test runs). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),experiments_enabled:e().optional().describe("Per-site Experiments tab (A/B tests + variant results). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org."),experiments_v2_enabled:e().optional().describe("Rebuilt Experiments tab: describe the test in prose and an agent drafts it, plus inline editing and the implement/preview tools that write the split into the site. Off by default — an org without it keeps the table-and-dialog tab, which only records experiment metadata. Requires `experiments_enabled`, which still decides whether the tab exists at all."),monitor_enabled:e().optional().describe("Per-site Monitor tab (CDN Performance + Audience from the stats-lake warehouse). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. Its own deployment-wide switch `MONITOR_GA` opens it to every org at once (independent of the control-plane trio)."),site_create_enabled:e().optional().describe('The "Create a new site" option under New project: generates a GitHub repository from a site template in an account the org connected, and opens it as a project. Off by default, for every org — deco.cx staff included.'),new_blocks_editor:e().optional().describe("Use the redesigned blocks editor for every member of the organization. Off by default — the classic editor stays until an admin opts the org in."),blog_ai_enabled:e().optional().describe("The blog's brand context tab and its agentic generation — campaigns, post drafting and link suggestions. Off by default; with it off the blog is written by hand and every BLOG_* tool refuses, over MCP and in the app alike, so an agent cannot spend the organization's credits on a feature it turned off."),site_apps_install_enabled:e().optional().describe("Installing a site app from the Apps tab: writes the app module, the npm dependency and the registry entry into the project's repository, then reinstalls dependencies and restarts the dev script on the running sandbox. Off by default, for every org — the catalogue stays browsable without it and nothing is installable. Rollout lever, separate from the deploy."),hide_default_blog_blocks:e().optional().describe("Hide the `deco-cms/blog` built-in post blocks everywhere a post is written — the inserter, the format briefs, and generated drafts — so only the site's own `site/sections/Blog/Post/*` blocks are eligible. Off by default. Blocks already present in a post keep rendering; this only governs what can be added.")}),h=new Set(["reviewer_enabled","cheap_reviewer_model","chat_harness_sandbox_only"]);function g(i,n){const r=i?.[n];return h.has(n)?r!==!1:r===!0}function m(i){const n=i?.auto_resolve_conflicts;return typeof n=="boolean"?n:i?.auto_merge===!0}export{h as D,f as G,u as O,b as S,m as a,c as b,g as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aF as r,d1 as p,c$ as _,aG as n,b_ as o,bZ as m}from"./index-
|
|
1
|
+
import{aF as r,d1 as p,c$ as _,aG as n,b_ as o,bZ as m}from"./index-CaH7O3hJ.js";const f=r({key:n().min(1,"Key is required"),value:n()}),g=r({title:n().min(1,"Name is required"),description:n().nullable().optional(),icon:n().nullable().optional(),ui_type:m(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:n().optional(),connection_token:n().nullable().optional(),npx_package:n().optional(),stdio_command:n().optional(),stdio_args:n().optional(),stdio_cwd:n().optional(),env_vars:o(f).optional(),configuration_scopes:o(n()).nullable().optional(),configuration_state:p(n(),_()).nullable().optional()}).refine(e=>e.ui_type==="NPX"?!!e.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(e=>e.ui_type==="STDIO"?!!e.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(e=>e.ui_type==="HTTP"||e.ui_type==="SSE"||e.ui_type==="Websocket"?!!e.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]}).refine(e=>(e.ui_type==="HTTP"||e.ui_type==="SSE"||e.ui_type==="Websocket")&&e.connection_url?.trim()?n().url().safeParse(e.connection_url.trim()).success:!0,{message:"Enter a valid URL",path:["connection_url"]});function S(e,u,s){const a=i=>{if(i==="*")return!0;const c=i.split("::")[0]??"";let t=s;for(const l of c.split(".")){if(t===null||typeof t!="object")return!1;t=t[l]}return t!=null};return[...new Set([...e,...u.filter(a)])]}export{S as a,g as c};
|