decocms 4.406.1 → 4.406.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BMZUDOL6.js → AlertCircle-BQVXEKUc.js} +1 -1
- package/dist/client/assets/{AreaChart-CW6iIyKs.js → AreaChart-B_KOVsWH.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BMV3kNGX.js → ArrowLeft-BeFq6jod.js} +1 -1
- package/dist/client/assets/{ArrowRight-CY8UzVvt.js → ArrowRight-DVxyJd1l.js} +1 -1
- package/dist/client/assets/{ArrowUp-1q450UE5.js → ArrowUp-MMes236V.js} +1 -1
- package/dist/client/assets/{CartesianChart-Bn45eUhI.js → CartesianChart-4nAUsvcH.js} +1 -1
- package/dist/client/assets/{Check-Uxo2nVs-.js → Check-DjwzpZIC.js} +1 -1
- package/dist/client/assets/{CheckCircle-R5XMxnne.js → CheckCircle-CflfIWoL.js} +1 -1
- package/dist/client/assets/{ChevronUp-CTy0hW7j.js → ChevronUp-BYWuf4SY.js} +1 -1
- package/dist/client/assets/{Copy01-BX8DnD6b.js → Copy01-CjQc-Ykz.js} +1 -1
- package/dist/client/assets/{CreditCard01-C8BHYRr1.js → CreditCard01-Cl8DBAML.js} +1 -1
- package/dist/client/assets/{DotsVertical-MRenFIT_.js → DotsVertical-BV4Cp92F.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-CBtxNMXg.js → ErrorBarContext-DMbtuZnP.js} +1 -1
- package/dist/client/assets/{Eye-D4vME5A5.js → Eye-CEZdPSLz.js} +1 -1
- package/dist/client/assets/{Globe04-CLHiIrHe.js → Globe04-t1_NZ4S5.js} +1 -1
- package/dist/client/assets/{Image01-BNQ-07ly.js → Image01-Bed8faGM.js} +1 -1
- package/dist/client/assets/{Key01-Bsh1NcW0.js → Key01-DDYGtlfn.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CIGnLzhm.js → LayoutLeft-CZkz1jNL.js} +1 -1
- package/dist/client/assets/{Line-38WFhupO.js → Line-CXvxeuZf.js} +1 -1
- package/dist/client/assets/{Link01-CfWWVz35.js → Link01-BbIArCE_.js} +1 -1
- package/dist/client/assets/{LinkExternal01-B3Oadyub.js → LinkExternal01-DpNDkCnx.js} +1 -1
- package/dist/client/assets/{Monitor01-d0CdDlQq.js → Monitor01-Ah5De9w0.js} +1 -1
- package/dist/client/assets/{Palette-CTJsl7OO.js → Palette-ChnBuAtH.js} +1 -1
- package/dist/client/assets/{Plus-BVkrfHyo.js → Plus-BICk297J.js} +1 -1
- package/dist/client/assets/{SearchMd-eUdGY5Sn.js → SearchMd-v8QAVRjQ.js} +1 -1
- package/dist/client/assets/{Sector-BEYnqX1d.js → Sector-Ch6wxiVl.js} +1 -1
- package/dist/client/assets/{Share07-DWgm4zN0.js → Share07-CmuXKCN5.js} +1 -1
- package/dist/client/assets/{Sun-CiOkBph5.js → Sun-DTRl56RH.js} +1 -1
- package/dist/client/assets/{Tool01-Dul2z-av.js → Tool01-Bdvuj8zb.js} +1 -1
- package/dist/client/assets/{Trash01-DRTwV71P.js → Trash01-B5wUzx2c.js} +1 -1
- package/dist/client/assets/{Upload01-DDGdS8dW.js → Upload01-Cu-9L0qW.js} +1 -1
- package/dist/client/assets/{User01-iwHZ7Pt8.js → User01-DaLqt8Zu.js} +1 -1
- package/dist/client/assets/{UserSquare-iycXUdrS.js → UserSquare-C7TikGGO.js} +1 -1
- package/dist/client/assets/{Users01-KO61nBd1.js → Users01-BGfUl9Z9.js} +1 -1
- package/dist/client/assets/{X-Eeg5vtSA.js → X-CRCA8SGk.js} +1 -1
- package/dist/client/assets/{XClose-C24l6Tjj.js → XClose-DJgtnkEc.js} +1 -1
- package/dist/client/assets/{Zap-CXtdNFNt.js → Zap-DHslHQ0t.js} +1 -1
- package/dist/client/assets/{ZoomOut-BYyA1Gna.js → ZoomOut-DIggrZVG.js} +1 -1
- package/dist/client/assets/{access-gate-Cag1qli0.js → access-gate-Cco763GH.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-Dw77PnzG.js → add-connection-dialog-CvOk-16j.js} +1 -1
- package/dist/client/assets/{agent-analytics-CpxyGgO5.js → agent-analytics-BuShy2lS.js} +1 -1
- package/dist/client/assets/agent-app-D6Tp5vlj.js +1 -0
- package/dist/client/assets/{agent-assets-D2iVG0Cm.js → agent-assets-R_wphq7p.js} +1 -1
- package/dist/client/assets/{agent-automation-D13G8VRF.js → agent-automation-C6iPqVOP.js} +1 -1
- package/dist/client/assets/{agent-automations-CC3H59q-.js → agent-automations-CLIHaUQn.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-dHqUzime.js → agent-connect-sources-tobP9soC.js} +1 -1
- package/dist/client/assets/agent-deck-DtlpMciC.js +1 -0
- package/dist/client/assets/{agent-e2e-CkY3VHlm.js → agent-e2e-DakaaNs8.js} +1 -1
- package/dist/client/assets/{agent-experiments-FJf-rkF_.js → agent-experiments-BhEpxS1S.js} +1 -1
- package/dist/client/assets/{agent-file-CETM1Biw.js → agent-file-B7S5_-vD.js} +1 -1
- package/dist/client/assets/{agent-git-DploM65C.js → agent-git-so-osFz0.js} +1 -1
- package/dist/client/assets/{agent-hosting-3EMznrYk.js → agent-hosting-BXsuvmaY.js} +1 -1
- package/dist/client/assets/{agent-icon-BbAHPL4a.js → agent-icon-DZc84vtW.js} +1 -1
- package/dist/client/assets/agent-library-file-BbHf83br.js +1 -0
- package/dist/client/assets/{agent-monitor-LuOArg8s.js → agent-monitor-Y-y8WkNo.js} +1 -1
- package/dist/client/assets/{agent-overview-Clr08HfW.js → agent-overview-Bxx3mqx3.js} +1 -1
- package/dist/client/assets/agent-settings-BdnQNFuI.js +1 -0
- package/dist/client/assets/{agent-site-editor-CvX-WJkX.js → agent-site-editor-CPf68n1p.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-C5W28gjl.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-CMAhKqch.js → agent-site-editor-content-Dbmoy-9X.js} +3 -3
- package/dist/client/assets/{agent-site-editor-preview-Bv2OsGkL.js → agent-site-editor-preview-GS0ijSSp.js} +3 -3
- package/dist/client/assets/agent-view-BjdG_eVV.js +1 -0
- package/dist/client/assets/{agent-view-guard-CXl3rJej.js → agent-view-guard-RZaWWh8q.js} +1 -1
- package/dist/client/assets/{agents-list-UztSg-xC.js → agents-list-BRhXk1wX.js} +1 -1
- package/dist/client/assets/{ai-providers-IddUt4QU.js → ai-providers-DsuBk_lC.js} +1 -1
- package/dist/client/assets/{alert-BvypNze8.js → alert-CyFB5Q7g.js} +1 -1
- package/dist/client/assets/{alert-dialog-CiUGDUaO.js → alert-dialog-Cp1oRtvU.js} +1 -1
- package/dist/client/assets/{analytics-sections-oJwfF9jF.js → analytics-sections-BvlUaDYV.js} +1 -1
- package/dist/client/assets/api-keys-C2GXQUdc.js +1 -0
- package/dist/client/assets/{api-keys-CmpQCrPa.js → api-keys-CClkqBtA.js} +1 -1
- package/dist/client/assets/app-editor-BXC1buiG.js +1 -0
- package/dist/client/assets/{asset-utils-Cga9GbiI.js → asset-utils-DmV7MwAi.js} +1 -1
- package/dist/client/assets/{auth-BoQKYNPm.js → auth-DewE0vsZ.js} +1 -1
- package/dist/client/assets/{auth-catchall-fXx8iWeW.js → auth-catchall-CnLOzh6z.js} +1 -1
- package/dist/client/assets/{auth-entry-fOMx0hAx.js → auth-entry-BYurZCL8.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DlWVVs1v.js → auth-split-layout-cVJzCAIz.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BJ3W_e_n.js → authenticate-and-persist-oauth-C0spMpLN.js} +1 -1
- package/dist/client/assets/{automation-list-row-OiduJx_2.js → automation-list-row-D9W4FguS.js} +1 -1
- package/dist/client/assets/{automation-runs-BacQofKy.js → automation-runs-pUjgCSfr.js} +1 -1
- package/dist/client/assets/{automations-C6yzslUZ.js → automations-BWboyFGA.js} +1 -1
- package/dist/client/assets/{autosend-CTfC0NfG.js → autosend-BOLn22FP.js} +1 -1
- package/dist/client/assets/{avatar-D8_8JBgF.js → avatar-BXB8p0uZ.js} +1 -1
- package/dist/client/assets/{badge-DCOAvM0o.js → badge-L3Pfb7lT.js} +1 -1
- package/dist/client/assets/{block-document-BgYMdS6P.js → block-document-CZmZt_GS.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-D_URmTJH.js → blocks-preview-workspace-context-C6-ILFRy.js} +1 -1
- package/dist/client/assets/{buckets-Cps6J5Tc.js → buckets-C_5U-zUS.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-EzprPzVZ.js → build-improve-prompt-doc-CYmkt9A_.js} +1 -1
- package/dist/client/assets/{calendar-BJDSU-Gq.js → calendar-mQVeScA0.js} +1 -1
- package/dist/client/assets/{capability-load-error-8CqKJnft.js → capability-load-error-BjPwGIMH.js} +1 -1
- package/dist/client/assets/{cards-BzXm19bh.js → cards-CfITToen.js} +1 -1
- package/dist/client/assets/{category-editor-B1IDthGO.js → category-editor-_XlPQ_JR.js} +1 -1
- package/dist/client/assets/{chart-C7InwkFZ.js → chart-B_RS6v6i.js} +1 -1
- package/dist/client/assets/{chat-context-teywT9wk.js → chat-context-IHDWgDQ6.js} +1 -1
- package/dist/client/assets/{chat-draft-yFoy6to9.js → chat-draft-bxwRcHk2.js} +1 -1
- package/dist/client/assets/{checkbox-DsixBwes.js → checkbox-WzAY3JJD.js} +1 -1
- package/dist/client/assets/{choose-editor-DoChRVJo.js → choose-editor-DHuVN8EQ.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-D_AWIP4o.js → claim-phase-copy-BXZD4tAp.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BTth5uJI.js → cli-auth-success-BekLnyCd.js} +1 -1
- package/dist/client/assets/{client-icons-BSTZpmyF.js → client-icons-BEF-E-JI.js} +1 -1
- package/dist/client/assets/{collapsible-DOTsTUq8.js → collapsible-BKe2_9O7.js} +1 -1
- package/dist/client/assets/{collection-detail-IncNxjTS.js → collection-detail-FqVAo6sr.js} +1 -1
- package/dist/client/assets/{collection-display-button-ClLs9OJ2.js → collection-display-button-B-NPFUs4.js} +1 -1
- package/dist/client/assets/{collection-search-CY7VRwQh.js → collection-search-66MPCgMJ.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CfSK7bdK.js → collection-table-wrapper-C04p-A9X.js} +1 -1
- package/dist/client/assets/{collection-tabs-DZUuAbe8.js → collection-tabs-PNDYs7Tm.js} +1 -1
- package/dist/client/assets/{combobox-CI_FTiFt.js → combobox-yM7XxeWn.js} +1 -1
- package/dist/client/assets/{command-BXH6927M.js → command-Dz5qWruW.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-C1oIVPDN.js → companion-mcps-section-CseZP29y.js} +1 -1
- package/dist/client/assets/{connect-CpGqKakr.js → connect-BbrTSpN5.js} +1 -1
- package/dist/client/assets/{connect-layout-DJiv1zPn.js → connect-layout-CDDVbEzl.js} +1 -1
- package/dist/client/assets/{connection-CTgdajy3.js → connection-D_Ad-k2g.js} +1 -1
- package/dist/client/assets/{connection-card-PffZYX-p.js → connection-card-D84FLYUf.js} +1 -1
- package/dist/client/assets/{connection-detail-C9Kvhp2D.js → connection-detail-CpZDxB7F.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-D1L33se0.js → connection-form-helpers-5k0v0Re8.js} +1 -1
- package/dist/client/assets/{connections-CFtbBwVe.js → connections-ByYjvA85.js} +1 -1
- package/dist/client/assets/{context-D3XZcnBH.js → context-DzVAzWtC.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-X1BXXZ2D.js → create-organization-dialog-DzedjPhW.js} +1 -1
- package/dist/client/assets/{decopilot-Q3Ku4QmG.js → decopilot-OImya6-h.js} +1 -1
- package/dist/client/assets/{dialog-CWboSmuJ.js → dialog-Cz2_YOoM.js} +1 -1
- package/dist/client/assets/{discover-D6lTzXvP.js → discover-BekL4zcZ.js} +1 -1
- package/dist/client/assets/{domain-settings-Dnoef5AZ.js → domain-settings-BNV22Gio.js} +1 -1
- package/dist/client/assets/{download-app-dialog-BEZbI2hi.js → download-app-dialog-CLcZY4uQ.js} +1 -1
- package/dist/client/assets/{drawer-Bz7Um_hZ.js → drawer-BVbxEc-U.js} +1 -1
- package/dist/client/assets/{editor-C73fouSJ.js → editor-zQPoF7nF.js} +1 -1
- package/dist/client/assets/{empty-state-CZVjrR7B.js → empty-state-BMXb2rB5.js} +1 -1
- package/dist/client/assets/{empty-state-DAkOJOYz.js → empty-state-Da-fHzIT.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DFUM61nw.js → extract-connection-data-BvsecQuq.js} +1 -1
- package/dist/client/assets/{feature-gate-CyfNojJy.js → feature-gate-DkU3CxuK.js} +1 -1
- package/dist/client/assets/{feature-paywall-cMtnQKn5.js → feature-paywall-D6H1XrEk.js} +1 -1
- package/dist/client/assets/{file-explorer-DfjPWPK0.js → file-explorer-CiVqz-p-.js} +1 -1
- package/dist/client/assets/{file-preview-C33qC3he.js → file-preview-BCzcW5IM.js} +1 -1
- package/dist/client/assets/{file-share-button-CdV2rPc-.js → file-share-button-BCbyDdG4.js} +1 -1
- package/dist/client/assets/{file-type-icon-DlQYiyj1.js → file-type-icon-DnKDJ8Kn.js} +1 -1
- package/dist/client/assets/{folder-icon-BMNdF1v9.js → folder-icon-gl7W6Tvq.js} +1 -1
- package/dist/client/assets/{form-DhEoM76N.js → form-BFyytVo6.js} +1 -1
- package/dist/client/assets/{gateway-client-CqqfBuyd.js → gateway-client-C_Ex0ISa.js} +1 -1
- package/dist/client/assets/{general-PGDCplM9.js → general-D6tjE2j7.js} +1 -1
- package/dist/client/assets/{github-icon-CMYp8VTY.js → github-icon-DWXYv1Ij.js} +1 -1
- package/dist/client/assets/{home-CyV_PL0j.js → home-CZA4NVdc.js} +1 -1
- package/dist/client/assets/{hooks-xfv55-Ph.js → hooks-ClyBk0k_.js} +1 -1
- package/dist/client/assets/{icon-button-CCManh84.js → icon-button-a1oHWXnD.js} +1 -1
- package/dist/client/assets/{index-BVMeVcie.js → index-B0_orRJ4.js} +1 -1
- package/dist/client/assets/{index-xT7zsaGR.js → index-BF_gwFuP.js} +1 -1
- package/dist/client/assets/{index-BOOsrJEE.js → index-CenNUKjy.js} +1 -1
- package/dist/client/assets/{index-B-CCfsah.js → index-CyuU6yZd.js} +1 -1
- package/dist/client/assets/{index-y92im7kz.js → index-Cz9e3Wwk.js} +1 -1
- package/dist/client/assets/{index-DixYTIcF.js → index-D6fwXcTM.js} +1 -1
- package/dist/client/assets/{index-CdMXuUm1.js → index-D7HYUfJC.js} +1 -1
- package/dist/client/assets/{index-IZH43uQu.js → index-DUDizWti.js} +1 -1
- package/dist/client/assets/{index-CFb91YXB.js → index-Dhz79JsH.js} +1 -1
- package/dist/client/assets/{index-iZV5xS-d.js → index-DuAhWQOd.js} +1 -1
- package/dist/client/assets/{index-CBsFdnEX.js → index-K4Vfh2kg.js} +2 -2
- package/dist/client/assets/{index-DAZel-Ed.js → index-XQdvud1d.js} +1 -1
- package/dist/client/assets/{index-Sgd4H7Dg.js → index-q4Xl54Dx.js} +1 -1
- package/dist/client/assets/{index-redirect-B4ebA__S.js → index-redirect-B6p9S-WJ.js} +1 -1
- package/dist/client/assets/{index-C2DT0lDw.js → index-wc3LsJ73.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BgUtgGcM.js → infiniteQueryObserver-DrFl4m2S.js} +1 -1
- package/dist/client/assets/{infra-billing-DiRZyMeC.js → infra-billing-HCI22mTY.js} +1 -1
- package/dist/client/assets/{input-CP316M20.js → input-CjG0yUIG.js} +1 -1
- package/dist/client/assets/{input-CSgd4vXY.js → input-DfvZ3ikK.js} +1 -1
- package/dist/client/assets/{input-lYbnPpE7.js → input-JwI18_DS.js} +1 -1
- package/dist/client/assets/{integration-icon-ChsPbtjQ.js → integration-icon-DrJdUHVx.js} +1 -1
- package/dist/client/assets/{label-DXIRxoWG.js → label-CbL3uHGW.js} +1 -1
- package/dist/client/assets/{last-preview-page-VABFwnaM.js → last-preview-page-DEzwzCp-.js} +1 -1
- package/dist/client/assets/{layout-BvRTdRgk.js → layout-DMcycabY.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-8AHbBgYQ.js → legacy-agents-deep-C3Zyezst.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-DhhcNVhF.js → legacy-main-redirect-COndmWyH.js} +1 -1
- package/dist/client/assets/{library-B2VAMUeT.js → library-DbAgblb-.js} +1 -1
- package/dist/client/assets/{login-Dmsib5c8.js → login-CXY1yuZY.js} +1 -1
- package/dist/client/assets/{markdown-CC2eXdPW.js → markdown-DOZYcDNd.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-Bn__yD7O.js → mcp-app-renderer-DRfDWjg6.js} +1 -1
- package/dist/client/assets/{mcp-oauth-T7jsPsTT.js → mcp-oauth-BTDQqGE0.js} +1 -1
- package/dist/client/assets/{members-D_q35Z4b.js → members-BEiKQ73m.js} +1 -1
- package/dist/client/assets/{message-templates-jdh9GNSZ.js → message-templates-CzGF1cA9.js} +1 -1
- package/dist/client/assets/{mini-report-page-BumIuskh.js → mini-report-page-D2baj09A.js} +1 -1
- package/dist/client/assets/{mock-board-CF2Fshay.js → mock-board-C8LOIHzu.js} +3 -3
- package/dist/client/assets/{monaco-editor-CxgjcBpA.js → monaco-editor-_MEmcrMi.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BBIYGrWY.js → monitoring-stats-row-B5_lpP36.js} +1 -1
- package/dist/client/assets/{multi-select-fHv-P5gR.js → multi-select-CdvqIvqU.js} +1 -1
- package/dist/client/assets/{mustache-BgUgm15E.js → mustache-CPcQeOG0.js} +1 -1
- package/dist/client/assets/{oauth-callback-CFCCbFe6.js → oauth-callback-C3bvGl4h.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-HdbiFmIU.js → oauth-callback-ai-provider-BFMT3UdD.js} +1 -1
- package/dist/client/assets/{onboarding-MjU4WNYq.js → onboarding-DtANDRsT.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-C810JGnm.js → optimistic-project-sidebar-views-DEWSMOzi.js} +1 -1
- package/dist/client/assets/{org-file-open-context-CQxYXDlh.js → org-file-open-context-Cej-kKNF.js} +1 -1
- package/dist/client/assets/{organization-choice-DjDav2kJ.js → organization-choice-DJxOpcPs.js} +1 -1
- package/dist/client/assets/{orgs-DBQqGzWc.js → orgs-6Wa09XqX.js} +1 -1
- package/dist/client/assets/{page-seo-form-Bi-dO1qZ.js → page-seo-form-DJY4lle7.js} +1 -1
- package/dist/client/assets/{pair-CqyLkvDl.js → pair-Bs4OFZd1.js} +1 -1
- package/dist/client/assets/{plan-ladder-BDBnCxd0.js → plan-ladder-8vg2rlwa.js} +1 -1
- package/dist/client/assets/{popover-Bv_Ss8X9.js → popover-BhNcAD5X.js} +1 -1
- package/dist/client/assets/{post-calendar-dtXCV8xx.js → post-calendar-8dVtvspR.js} +1 -1
- package/dist/client/assets/{post-editor-b6BLFpDg.js → post-editor-B3pGOrms.js} +1 -1
- package/dist/client/assets/{preview-content-CZLf7b0z.js → preview-content-D9TR_OCi.js} +1 -1
- package/dist/client/assets/{preview-dialog-BjoTY9WK.js → preview-dialog-uefldvQJ.js} +1 -1
- package/dist/client/assets/{profile-a410H4A3.js → profile-BOPnUUUc.js} +1 -1
- package/dist/client/assets/{project-app-view-BVQgIJHi.js → project-app-view-CXTxnzE0.js} +1 -1
- package/dist/client/assets/{project-feed-8wbF2ZiD.js → project-feed-B8QXSSsQ.js} +1 -1
- package/dist/client/assets/{project-icon-BIILPkZS.js → project-icon-BK7It3uv.js} +1 -1
- package/dist/client/assets/project-reports-CU7shTBi.js +1 -0
- package/dist/client/assets/project-tasks-DFi0AJKe.js +1 -0
- package/dist/client/assets/{prompts-CyXFR61W.js → prompts-Cp6MUNg1.js} +1 -1
- package/dist/client/assets/record-editor-BFnZqKUj.js +1 -0
- package/dist/client/assets/{redirect-editor-B1eIVecK.js → redirect-editor-BooBJZnR.js} +1 -1
- package/dist/client/assets/reports-BW-QoVax.js +1 -0
- package/dist/client/assets/{reports-Cws2blTH.js → reports-DpNr3YR6.js} +1 -1
- package/dist/client/assets/{reports-onboarding-Bc2JfiyI.js → reports-onboarding-D8veE4dS.js} +1 -1
- package/dist/client/assets/{reports-tab-CtR988-m.js → reports-tab-BrMcs3Pf.js} +2 -2
- package/dist/client/assets/{repositories-DVbgOOjf.js → repositories-D_tmdpJ8.js} +1 -1
- package/dist/client/assets/{repository-import-picker-DpKl197J.js → repository-import-picker-BrVrNQp2.js} +1 -1
- package/dist/client/assets/{repository-picker-CLN-ZFTY.js → repository-picker-5veCw3bv.js} +1 -1
- package/dist/client/assets/{require-capability-B4SGNks4.js → require-capability-BXbVP8Te.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BDuf7Hn9.js → required-auth-layout-q7AyqreJ.js} +1 -1
- package/dist/client/assets/{reset-password-Zzlq6HDI.js → reset-password-BV_oLArt.js} +1 -1
- package/dist/client/assets/{resizable-CJcXGBEw.js → resizable-D5h_i3Cv.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-D0pFaNsn.js → resolve-tab-icon-BRqSZn8F.js} +1 -1
- package/dist/client/assets/{review-settings-CDl9T-Q_.js → review-settings-CUXs59zb.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-DB2Yijsm.js → rich-text-link-control-hCgf6vwY.js} +1 -1
- package/dist/client/assets/{roles-ChzTwTom.js → roles-92Mfuaie.js} +1 -1
- package/dist/client/assets/{route-rzp3501Z.js → route-B07-zVJy.js} +1 -1
- package/dist/client/assets/{route-CJbcVx1m.js → route-Cq_E3u9y.js} +1 -1
- package/dist/client/assets/{route-v_MbtF1n.js → route-DzLLBN_l.js} +1 -1
- package/dist/client/assets/{route-page-header-B5SftBA5.js → route-page-header-D2v-N63X.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-DLDhY5NW.js → runnable-block-editor-D5Om2hS9.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-BvzefTRC.js → sandbox-lifecycle-context-DDvqjx4F.js} +1 -1
- package/dist/client/assets/{schema-WKdUWru-.js → schema-OZ6y31ku.js} +1 -1
- package/dist/client/assets/{scroll-area-2B0cu5Np.js → scroll-area-CrFzneCm.js} +1 -1
- package/dist/client/assets/{search-input-CpVytLUs.js → search-input-MXvNbubn.js} +1 -1
- package/dist/client/assets/{search-toggle-ChVDnaGw.js → search-toggle-OXNBAfan.js} +1 -1
- package/dist/client/assets/{secret-picker-Bys-CQOc.js → secret-picker-olJPqPoi.js} +1 -1
- package/dist/client/assets/{secrets-CcQ59nS1.js → secrets-Cttvdk2_.js} +1 -1
- package/dist/client/assets/{sections-editor-Cx8eLQu7.js → sections-editor-BkzNFswN.js} +1 -1
- package/dist/client/assets/{select-BSDrbu2c.js → select-DxOzi3UD.js} +1 -1
- package/dist/client/assets/{select-model-BDxC60Th.js → select-model-N7bwAuKh.js} +1 -1
- package/dist/client/assets/{seo-editor-Bc9yb_7d.js → seo-editor-BbScE4FO.js} +1 -1
- package/dist/client/assets/{separator-C7wJ_hFJ.js → separator-CmRrTp4P.js} +1 -1
- package/dist/client/assets/{settings-tab-DFKS8dv3.js → settings-tab-F5_VZsFA.js} +1 -1
- package/dist/client/assets/{sheet-DoGnuKpd.js → sheet-AhK1Q4GA.js} +1 -1
- package/dist/client/assets/{shell-layout-CPrcd0Hi.js → shell-layout-BbZrykxM.js} +1 -1
- package/dist/client/assets/{skill-preview-alBH1M4-.js → skill-preview-D2tUoLmU.js} +1 -1
- package/dist/client/assets/{skills-BRdbf9tA.js → skills-8G1WBDrj.js} +1 -1
- package/dist/client/assets/{sso-BuAI-sK0.js → sso-D1j1eaaw.js} +1 -1
- package/dist/client/assets/{suggestion-DEU_ZLi8.js → suggestion-D2LW2rth.js} +1 -1
- package/dist/client/assets/{switch-7IxKemWh.js → switch-Dxukqc0d.js} +1 -1
- package/dist/client/assets/{synced-repos-BJto36p4.js → synced-repos-QFrSnbHa.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-C31DClOy.js → tab-icon-glyph-BJ5K3vOh.js} +1 -1
- package/dist/client/assets/{table-DhchoeXT.js → table-DQGBCTGl.js} +1 -1
- package/dist/client/assets/{tabs-Ci70XPyP.js → tabs-CgudHfJv.js} +1 -1
- package/dist/client/assets/{task-board-DYHQVukW.js → task-board-Bc_5nEh1.js} +1 -1
- package/dist/client/assets/task-route-DMhHeGp_.js +1 -0
- package/dist/client/assets/{task-status-MCJD8A8L.js → task-status-CxrGIdHQ.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-DakyMYnA.js → taskboard-analytics-CkQr3tK7.js} +1 -1
- package/dist/client/assets/tasks-BLCuiNcA.js +1 -0
- package/dist/client/assets/{tasks-vBZKGLCF.js → tasks-Bnn9RQl1.js} +1 -1
- package/dist/client/assets/{textarea-B-_nJx6m.js → textarea-C4Fl7vcj.js} +1 -1
- package/dist/client/assets/{thread-analytics-COlxwJ0o.js → thread-analytics-CE0WviO_.js} +1 -1
- package/dist/client/assets/{thread-button-BmPBmPrQ.js → thread-button-EQmrPg3s.js} +1 -1
- package/dist/client/assets/{thread-intent-CGXgytJs.js → thread-intent-DxlkHtay.js} +1 -1
- package/dist/client/assets/{thread-route-DA0FuXUR.js → thread-route-DC9aU1My.js} +1 -1
- package/dist/client/assets/{thread-route-BFS2R0D6.js → thread-route-TxjlZd1E.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-uKQxod97.js → thread-sheet-body-BrDhZq1Z.js} +1 -1
- package/dist/client/assets/{toggle-group-BqiwVRK3.js → toggle-group-NfZmEEmD.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CSnKak3a.js → toolbar-icon-button-B_lHRucJ.js} +1 -1
- package/dist/client/assets/{tooltip-DuUHjyVe.js → tooltip-Cy80lI1Y.js} +1 -1
- package/dist/client/assets/{track-tpp92hMB.js → track-CKzt_alj.js} +1 -1
- package/dist/client/assets/{types-Q63ABua6.js → types-mQyngwgP.js} +1 -1
- package/dist/client/assets/{usage-stats-wuRH1JFT.js → usage-stats-B-kd-KGd.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BXPg_qYG.js → use-ai-providers-zjIftbuA.js} +1 -1
- package/dist/client/assets/{use-automations-CX9grFNQ.js → use-automations-Bos3c2CS.js} +1 -1
- package/dist/client/assets/{use-autosave-BFP6LbzY.js → use-autosave-BPZqx8ru.js} +1 -1
- package/dist/client/assets/{use-connect-companion-B0P3HgZd.js → use-connect-companion-DWeMHoIU.js} +1 -1
- package/dist/client/assets/{use-connection-BqnMg5At.js → use-connection-DT6Y_sWB.js} +1 -1
- package/dist/client/assets/{use-copy-Db4wQY3Q.js → use-copy-CCt9uq_y.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-B-4KdLAr.js → use-create-virtual-mcp-D8BgGLo0.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-Btt28LcW.js → use-date-fns-locale-8-Vndgvf.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CXOpi3yc.js → use-debounced-autosave-CVGhSw1y.js} +1 -1
- package/dist/client/assets/{use-debounced-value-N37o_v37.js → use-debounced-value-CQxBbX3z.js} +1 -1
- package/dist/client/assets/{use-deco-credits-R5CLdMrA.js → use-deco-credits-Bbxg62mu.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BTwa3qJx.js → use-decopilot-events-C-TjDtpG.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CgI1Z2NJ.js → use-delete-connection-DoGBhXiK.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-AmG5nqbI.js → use-deployment-admin-CMAr5-sz.js} +1 -1
- package/dist/client/assets/{use-entitlements-BJ1XklVO.js → use-entitlements-OYbyxqXu.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-BtwZrpID.js → use-fast-preview-draft-url-H9Q-1XHg.js} +1 -1
- package/dist/client/assets/{use-file-configs-BE7q3L-9.js → use-file-configs-C3rsyIax.js} +1 -1
- package/dist/client/assets/{use-in-settings-B0qrT211.js → use-in-settings-DTfVU5gG.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BXb46Iyl.js → use-infinite-scroll-CitEQv_Q.js} +1 -1
- package/dist/client/assets/{use-join-requests-DTS4o7ju.js → use-join-requests-DURmdBJt.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-Dirn1j-9.js → use-main-panel-tabs-DCZX5mxy.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BYTid8Bc.js → use-mcp-auth-status-DcPv-6wk.js} +1 -1
- package/dist/client/assets/{use-mcp-client-B_WbdCBW.js → use-mcp-client-CR19JjtG.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BqbE-BMb.js → use-mcp-prompts-C9ZSqhtN.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DmFbMLNT.js → use-mcp-tools-NQLn3o-8.js} +1 -1
- package/dist/client/assets/{use-members-DeWROnd7.js → use-members-DGHnBAVp.js} +1 -1
- package/dist/client/assets/{use-mobile-B_6YGShd.js → use-mobile-rtsj2MZ1.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Dua3a5ox.js → use-navigate-to-agent-DYgqDFZF.js} +1 -1
- package/dist/client/assets/use-new-blocks-editor-xOOrbCjh.js +1 -0
- package/dist/client/assets/{use-open-billing-url-BzNpZt3x.js → use-open-billing-url-1mXCzVjQ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-wADuJYoR.js → use-org-auth-client-Dq37iZE-.js} +1 -1
- package/dist/client/assets/{use-org-fs-CxNtLFye.js → use-org-fs-mfYIenam.js} +1 -1
- package/dist/client/assets/{use-org-sso-BM2DZrFU.js → use-org-sso-C8N9NZ6V.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Cu4FmGbL.js → use-organization-roles-B1Y6_86t.js} +1 -1
- package/dist/client/assets/{use-organization-settings-2AQQ6zJ7.js → use-organization-settings-CY6osCto.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DfjeIfmV.js → use-panel-navigate-BqFBzSWd.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-go2EFPHV.js → use-project-native-view-presence-7vj8rIc7.js} +1 -1
- package/dist/client/assets/{use-project-scope-BUvUuDNI.js → use-project-scope-CdGBXW9U.js} +1 -1
- package/dist/client/assets/{use-releases-jMja4dND.js → use-releases-DRDVY8Xc.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BjSpSbPy.js → use-reports-diagnostic-D48-pm_p.js} +1 -1
- package/dist/client/assets/{use-route-default-main-BmqlqZ2y.js → use-route-default-main-CG99dur1.js} +1 -1
- package/dist/client/assets/{use-secrets-QSC4tAOF.js → use-secrets-BQr1wgkC.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DzPk8DqQ.js → use-section-preview-base-Be_ffjg-.js} +1 -1
- package/dist/client/assets/{use-session-runtime-CW212IIS.js → use-session-runtime-epDsfla0.js} +1 -1
- package/dist/client/assets/{use-tags-DbJj5nUL.js → use-tags-BDr8xPIF.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-M-qmUGeJ.js → use-task-board-analytics-DyOwTb8x.js} +1 -1
- package/dist/client/assets/{use-task-metadata-Ac_51iQV.js → use-task-metadata-B625VJsm.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-CW90LB0d.js → use-thread-analytics-D4T2O8XJ.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-CoDLQ_W9.js → use-thread-outputs-CfLMzkB9.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BtdCxCWP.js → use-virtual-mcp-gM6wRQv6.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Bdkrqs8P.js +1 -0
- package/dist/client/assets/{useQueries-qTFt6XvG.js → useQueries-MatxMDm4.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-6_TWTeTT.js +1 -0
- package/dist/client/assets/{users-CSIpuUPp.js → users-DSJ7gYEW.js} +1 -1
- package/dist/client/assets/{utils-CV-Z0A60.js → utils-D2l1844I.js} +1 -1
- package/dist/client/assets/{variant-calendar-D2HLg6Y4.js → variant-calendar-DP0eqUJc.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-CMcQh1H4.js → variant-matcher-override-CHhx77jc.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BE5zxRei.js → view-mode-toggle-DSnYHXmD.js} +1 -1
- package/dist/client/assets/{virtual-mcp-D0faQ4Q6.js → virtual-mcp-BLyxO2qI.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-BJshIbjj.js +0 -1
- package/dist/client/assets/agent-deck-BISeHdhC.js +0 -1
- package/dist/client/assets/agent-library-file-B7tzfcS-.js +0 -1
- package/dist/client/assets/agent-settings-Cjtyz8JN.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Bl3BcMVB.js +0 -2
- package/dist/client/assets/agent-view-CX8fAH6a.js +0 -1
- package/dist/client/assets/api-keys-B0JOkiDU.js +0 -1
- package/dist/client/assets/app-editor-DRJ3aCH-.js +0 -1
- package/dist/client/assets/project-reports-CvJqdRrB.js +0 -1
- package/dist/client/assets/project-tasks-cEheCXmY.js +0 -1
- package/dist/client/assets/record-editor-HZUqyP4w.js +0 -1
- package/dist/client/assets/reports-DZimO8WM.js +0 -1
- package/dist/client/assets/task-route-e9pXIGAS.js +0 -1
- package/dist/client/assets/tasks-CSMbZQLX.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-CmJ15Y0w.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BJJKJSMY.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CI7vnjM8.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,b as U,r as O,l as Z,j as s,h as je,X as oe,ar as ke,aq as Le,E as St,a as $e,K as Nt,m as Tt,q as xe,a3 as st,as as ss,at as ns,U as _t,t as wt,ak as as,d as De,n as dt,au as rs,f as Se,C as ut,e as is,u as Fe,k as ls,av as os,aw as cs,O as Ct,ax as ds,N as us,B as fs,P as Ye}from"./index-CBsFdnEX.js";import{i as nt}from"./AlertCircle-BMZUDOL6.js";import{i as ms}from"./LayoutLeft-CIGnLzhm.js";import{u as hs}from"./use-in-settings-B0qrT211.js";import{T as Ae}from"./toolbar-icon-button-CSnKak3a.js";import{C as ee,w as ps}from"./index-C2DT0lDw.js";import{u as Re,a as Pt,b as Ee,c as At,d as xs,e as gs,s as bs}from"./chat-context-teywT9wk.js";import{u as It}from"./use-session-runtime-CW212IIS.js";import{u as vs}from"./use-ai-providers-BXPg_qYG.js";import{i as js}from"./CheckCircle-R5XMxnne.js";import{q as ys,r as ft,A as ye,u as ks,v as Ss,w as Ns,x as Ts,y as _s,z as ws,B as Mt,C as Cs,D as Ps,n as As}from"./agent-icon-BbAHPL4a.js";import{s as mt}from"./XClose-C24l6Tjj.js";import{a as ce,b as Lt}from"./use-virtual-mcp-BtdCxCWP.js";import{I as $t}from"./integration-icon-ChsPbtjQ.js";import{b as Is}from"./use-entitlements-BJ1XklVO.js";import{t as at}from"./ChevronUp-CTy0hW7j.js";import{O as Ms}from"./pair-CqyLkvDl.js";import{u as Ls,a as $s}from"./use-thread-outputs-CoDLQ_W9.js";import{u as Ds}from"./use-deco-credits-R5CLdMrA.js";import{a as rt,b as Fs,f as Rs,L as Es,s as Os,c as Bs}from"./shell-layout-CPrcd0Hi.js";import{f as zs,b as Gs}from"./use-project-scope-BUvUuDNI.js";import{g as Dt,u as Hs,n as Us,a as Ks}from"./use-releases-jMja4dND.js";import{d as Ft,c as Vs}from"./thread-intent-CGXgytJs.js";import{u as Ws,a as it,b as lt,c as ot}from"./hooks-xfv55-Ph.js";import{f as qs,a as Rt,b as Ys}from"./use-navigate-to-agent-Dua3a5ox.js";import{o as Xs,s as Zs,u as Qs,S as Js,a as en}from"./sandbox-lifecycle-context-BvzefTRC.js";import{E as Et}from"./empty-state-DAkOJOYz.js";import{t as tn,m as sn,u as nn}from"./thread-button-BmPBmPrQ.js";import{g as Ot}from"./github-repo-B15wwZ1g.js";import{ChatLayout as ht}from"./index-B-CCfsah.js";import{a as Bt,b as zt,P as Gt}from"./popover-Bv_Ss8X9.js";import{T as Oe,a as Be,c as ze}from"./tooltip-DuUHjyVe.js";import{T as an,a as rn}from"./toggle-group-BqiwVRK3.js";import{u as Ht,a as Ge,r as ln,b as Ut,c as on,d as cn}from"./thread-route-BFS2R0D6.js";import{d as dn,h as un,c as fn,b as mn,D as hn}from"./dialog-CWboSmuJ.js";import{c as pn,C as xn,a as gn,b as bn,e as vn,d as jn}from"./command-BXH6927M.js";import{i as Kt}from"./Zap-CXtdNFNt.js";import{A as yn,a as kn,b as Sn,c as Nn,g as Tn,d as _n,e as wn,f as Cn}from"./alert-dialog-CiUGDUaO.js";import{g as Pn,S as An}from"./task-status-MCJD8A8L.js";import{a as In}from"./format-time-BtXRrtv4.js";import{i as Mn,a as Ln}from"./Share07-DWgm4zN0.js";import{a as Vt,u as $n}from"./use-panel-navigate-DfjeIfmV.js";import{u as Wt}from"./use-main-panel-tabs-Dirn1j-9.js";import{T as Ie}from"./tab-icon-glyph-C31DClOy.js";import{i as Dn}from"./UserSquare-iycXUdrS.js";import{b as Fn,c as qt,S as Rn,d as En}from"./select-BSDrbu2c.js";import{u as On}from"./use-organization-settings-2AQQ6zJ7.js";import{L as ct,a as Bn}from"./legacy-main-redirect-DhhcNVhF.js";import{u as zn}from"./use-mobile-B_6YGShd.js";import{L as Gn}from"./preview-dialog-BjoTY9WK.js";import{O as Hn}from"./org-file-open-context-CQxYXDlh.js";import{B as pt}from"./blocks-preview-workspace-context-D_URmTJH.js";import{u as Yt}from"./use-is-desktop-app-BNujXJc_.js";import{p as Un}from"./virtual-mcp-D0faQ4Q6.js";import"./sheet-DoGnuKpd.js";import"./X-Eeg5vtSA.js";import"./ArrowUp-1q450UE5.js";import"./gateway-client-CqqfBuyd.js";import"./drawer-Bz7Um_hZ.js";import"./collection-search-CY7VRwQh.js";import"./SearchMd-eUdGY5Sn.js";import"./use-mcp-client-B_WbdCBW.js";import"./auth-BoQKYNPm.js";import"./use-mcp-prompts-BqbE-BMb.js";import"./index-DAZel-Ed.js";import"./form-DhEoM76N.js";import"./label-DXIRxoWG.js";import"./input-CP316M20.js";import"./utils-CVEq3hMx.js";import"./input-lYbnPpE7.js";import"./autosend-CTfC0NfG.js";import"./chat-draft-yFoy6to9.js";import"./ArrowRight-CY8UzVvt.js";import"./Check-Uxo2nVs-.js";import"./Image01-BNQ-07ly.js";import"./Upload01-DDGdS8dW.js";import"./Copy01-BX8DnD6b.js";import"./ArrowLeft-BMV3kNGX.js";import"./usage-stats-wuRH1JFT.js";import"./use-copy-Db4wQY3Q.js";import"./markdown-CC2eXdPW.js";import"./Eye-D4vME5A5.js";import"./ZoomOut-BYyA1Gna.js";import"./tabs-Ci70XPyP.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-BzNpZt3x.js";import"./decopilot-Q3Ku4QmG.js";import"./checkbox-DsixBwes.js";import"./Tool01-Dul2z-av.js";import"./Key01-Bsh1NcW0.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-d0CdDlQq.js";import"./avatar-D8_8JBgF.js";import"./User01-iwHZ7Pt8.js";import"./download-app-dialog-BEZbI2hi.js";import"./index-DixYTIcF.js";import"./input-CSgd4vXY.js";import"./suggestion-DEU_ZLi8.js";import"./use-org-fs-CxNtLFye.js";import"./Link01-CfWWVz35.js";import"./Plus-BVkrfHyo.js";import"./question-004-sINsf4GQ.js";import"./use-members-DeWROnd7.js";import"./use-org-auth-client-wADuJYoR.js";import"./feature-paywall-cMtnQKn5.js";import"./plan-ladder-BDBnCxd0.js";import"./add-connection-dialog-Dw77PnzG.js";import"./extract-connection-data-DFUM61nw.js";import"./metadata-D72DunRR.js";import"./connection-CTgdajy3.js";import"./connection-card-PffZYX-p.js";import"./useInfiniteQuery-BJJKJSMY.js";import"./infiniteQueryObserver-BgUtgGcM.js";import"./connection-slug-CITJ0kGN.js";import"./slugify-CEUa2lfQ.js";import"./textarea-B-_nJx6m.js";import"./use-connection-BqnMg5At.js";import"./connection-form-helpers-D1L33se0.js";import"./Trash01-DRTwV71P.js";import"./authenticate-and-persist-oauth-BJ3W_e_n.js";import"./mcp-oauth-T7jsPsTT.js";import"./collection-tabs-DZUuAbe8.js";import"./badge-DCOAvM0o.js";import"./use-infinite-scroll-BXb46Iyl.js";import"./useSuspenseInfiniteQuery-CI7vnjM8.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-BTwa3qJx.js";import"./Globe04-CLHiIrHe.js";import"./CreditCard01-C8BHYRr1.js";import"./DotsVertical-MRenFIT_.js";import"./LinkExternal01-B3Oadyub.js";import"./Sun-CiOkBph5.js";import"./Palette-CTJsl7OO.js";import"./Users01-KO61nBd1.js";import"./collapsible-DOTsTUq8.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Bn__yD7O.js";import"./types-Q63ABua6.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./file-type-icon-DlQYiyj1.js";import"./project-icon-BIILPkZS.js";import"./required-auth-layout-BDuf7Hn9.js";import"./use-org-sso-BM2DZrFU.js";import"./serial-task-queue-CGOeQgpr.js";import"./backoff-8mStPHYB.js";import"./task-board-DYHQVukW.js";import"./schema-WKdUWru-.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-route-default-main-BmqlqZ2y.js";import"./resizable-CJcXGBEw.js";import"./route-page-header-B5SftBA5.js";import"./index-CFb91YXB.js";import"./index-CdMXuUm1.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-tools-DmFbMLNT.js";import"./resolve-tab-icon-D0pFaNsn.js";import"./use-task-metadata-Ac_51iQV.js";import"./use-project-native-view-presence-go2EFPHV.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-BE7q3L-9.js";import"./site-slug-DebpOoQq.js";import"./preview-content-CZLf7b0z.js";import"./file-preview-C33qC3he.js";import"./utils-CV-Z0A60.js";import"./editor-C73fouSJ.js";import"./file-share-button-CdV2rPc-.js";function Kn({isThreadLocked:t,hasCloudProviderKeys:e}){return t?!1:!e}function Vn(){const t=$.c(3),e=vs(),r=Re()?.isThreadLocked??!1,i=e.length>0;let a;return t[0]!==r||t[1]!==i?(a=Kn({isThreadLocked:r,hasCloudProviderKeys:i}),t[0]=r,t[1]=i,t[2]=a):a=t[2],a}function ve(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function Xe(t){if(!t)return"—";const e=typeof t=="string"?new Date(t):t;return isNaN(e.getTime())?"—":e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function Wn(t){return t?t.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function qn(t){const e=$.c(4),{items:n}=t;let r;e[0]!==n?(r=n.map(Yn),e[0]=n,e[1]=r):r=e[1];let i;return e[2]!==r?(i=s.jsx("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6",children:r}),e[2]=r,e[3]=i):i=e[3],i}function Yn(t){return s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[s.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.label}),s.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:t.value})]},t.label)}function Xn(t){const e=$.c(33),{userTokens:n,assistantTokens:r,otherTokens:i}=t,a=U(),l=n+r+i,d=l>0?n/l*100:0,u=l>0?r/l*100:0,o=l>0?i/l*100:0;let c;e[0]!==d?(c=d>0&&s.jsx("div",{className:"h-full bg-chart-1",style:{width:`${d}%`}}),e[0]=d,e[1]=c):c=e[1];let f;e[2]!==u?(f=u>0&&s.jsx("div",{className:"h-full bg-chart-2",style:{width:`${u}%`}}),e[2]=u,e[3]=f):f=e[3];let m;e[4]!==o?(m=o>0&&s.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${o}%`}}),e[4]=o,e[5]=m):m=e[5];let h;e[6]!==c||e[7]!==f||e[8]!==m?(h=s.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[c,f,m]}),e[6]=c,e[7]=f,e[8]=m,e[9]=h):h=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=g):g=e[10];let j;e[11]!==a||e[12]!==d?(j=a("chat.contextPanel.userPercent",{pct:d.toFixed(1)}),e[11]=a,e[12]=d,e[13]=j):j=e[13];let k;e[14]!==j?(k=s.jsxs("div",{className:"flex items-center gap-1.5",children:[g,s.jsx("span",{className:"text-xs text-muted-foreground",children:j})]}),e[14]=j,e[15]=k):k=e[15];let p;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[16]=p):p=e[16];let b;e[17]!==u||e[18]!==a?(b=a("chat.contextPanel.assistantPercent",{pct:u.toFixed(1)}),e[17]=u,e[18]=a,e[19]=b):b=e[19];let y;e[20]!==b?(y=s.jsxs("div",{className:"flex items-center gap-1.5",children:[p,s.jsx("span",{className:"text-xs text-muted-foreground",children:b})]}),e[20]=b,e[21]=y):y=e[21];let v;e[22]!==o||e[23]!==i||e[24]!==a?(v=i>0&&s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.otherPercent",{pct:o.toFixed(1)})})]}),e[22]=o,e[23]=i,e[24]=a,e[25]=v):v=e[25];let x;e[26]!==y||e[27]!==v||e[28]!==k?(x=s.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[k,y,v]}),e[26]=y,e[27]=v,e[28]=k,e[29]=x):x=e[29];let T;return e[30]!==x||e[31]!==h?(T=s.jsxs("div",{className:"flex flex-col gap-2",children:[h,x]}),e[30]=x,e[31]=h,e[32]=T):T=e[32],T}function Zn(t){const e=$.c(14),{agentId:n,isError:r}=t,i=ce(n),a=U();let l;e[0]!==i?.title||e[1]!==a?(l=i?.title??a("chat.subtask.subtaskNoun"),e[0]=i?.title,e[1]=a,e[2]=l):l=e[2];const d=l,u=i?.icon??null;let o;e[3]!==u||e[4]!==d?(o=s.jsx($t,{icon:u,name:d,size:"xs",className:"size-6 rounded-md shrink-0"}),e[3]=u,e[4]=d,e[5]=o):o=e[5];const c=r?"text-destructive":"text-foreground";let f;e[6]!==c?(f=Z("shrink-0 font-medium",c),e[6]=c,e[7]=f):f=e[7];let m;e[8]!==d||e[9]!==f?(m=s.jsx("span",{className:f,children:d}),e[8]=d,e[9]=f,e[10]=m):m=e[10];let h;return e[11]!==o||e[12]!==m?(h=s.jsxs(s.Fragment,{children:[o,m]}),e[11]=o,e[12]=m,e[13]=h):h=e[13],h}function Qn(t){const e=$.c(12),{isError:n}=t,r=U();let i;e[0]!==r?(i=r("chat.contextPanel.subtask"),e[0]=r,e[1]=i):i=e[1];const a=i;let l;e[2]!==a?(l=s.jsx($t,{icon:null,name:a,size:"xs",className:"size-6 rounded-md shrink-0"}),e[2]=a,e[3]=l):l=e[3];const d=n?"text-destructive":"text-foreground";let u;e[4]!==d?(u=Z("shrink-0 font-medium",d),e[4]=d,e[5]=u):u=e[5];let o;e[6]!==a||e[7]!==u?(o=s.jsx("span",{className:u,children:a}),e[6]=a,e[7]=u,e[8]=o):o=e[8];let c;return e[9]!==l||e[10]!==o?(c=s.jsxs(s.Fragment,{children:[l,o]}),e[9]=l,e[10]=o,e[11]=c):c=e[11],c}function Jn(t){const e=$.c(18),{part:n}=t,r=n.input?.agent_id,i=n.state==="input-streaming"||n.state==="input-available"||n.state==="output-available"&&n.preliminary===!0,a=n.state==="output-error",l=n.state==="approval-requested";let d;e[0]!==a?(d=s.jsx(Qn,{isError:a}),e[0]=a,e[1]=d):d=e[1];let u;e[2]!==r||e[3]!==a?(u=s.jsx(Zn,{agentId:r,isError:a}),e[2]=r,e[3]=a,e[4]=u):u=e[4];let o;e[5]!==d||e[6]!==u?(o=s.jsx(O.Suspense,{fallback:d,children:u}),e[5]=d,e[6]=u,e[7]=o):o=e[7];let c;e[8]!==n.input?(c=n.input?.prompt&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-muted-foreground/50",children:"·"}),s.jsx("span",{className:"truncate text-muted-foreground",children:n.input.prompt})]}),e[8]=n.input,e[9]=c):c=e[9];let f;e[10]!==l||e[11]!==a||e[12]!==i?(f=s.jsx("span",{className:"ml-auto shrink-0",children:i?s.jsx(je,{className:"size-3 text-muted-foreground"}):a?s.jsx(ys,{size:12,className:"text-destructive"}):l?s.jsx(nt,{size:12,className:"text-warning"}):s.jsx(js,{size:12,className:"text-success"})}),e[10]=l,e[11]=a,e[12]=i,e[13]=f):f=e[13];let m;return e[14]!==o||e[15]!==c||e[16]!==f?(m=s.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[o,c,f]}),e[14]=o,e[15]=c,e[16]=f,e[17]=m):m=e[17],m}function ea(t){const e=$.c(51),{onClose:n,back:r,className:i}=t,a=U(),[l,d]=O.useState(null),{messages:u}=Pt(),{activeTask:o}=Ee(),{selectedModel:c,selectedVirtualMcp:f}=At(),m=xs(u),h=[...u].reverse().find(ua),g=h?.metadata?.usage,j=h?.metadata?.modelLimits?.contextWindow??c?.limits?.contextWindow??null,k=g?.contextTokens??0,p=j&&j>0?(k/j*100).toFixed(1):null,b=u;let y;e[0]!==b?(y=b.filter(da).reduce(ca,0),e[0]=b,e[1]=y):y=e[1];const v=y,x=u;let T;e[2]!==x?(T=x.filter(oa).reduce(la,0),e[2]=x,e[3]=T):T=e[3];const S=T,N=Math.max(0,m.totalTokens-v-S),_=u[0],w=u.at(-1),C=_?.metadata?.created_at??o?.created_at,I=w?.metadata?.created_at??o?.updated_at,P=u.filter(ia),M=u.flatMap(aa),A=c?.modelId?Wn(c.modelId):"—",D=f?.title??"Super Agent",F=Is(),E=[{label:a("chat.contextPanel.sessionLabel"),value:o?.title??a("chat.contextPanel.newChat")},{label:a("chat.contextPanel.messagesLabel"),value:P.length},{label:a("chat.contextPanel.agentLabel"),value:D},...F?[{label:a("chat.contextPanel.modelLabel"),value:A}]:[],{label:a("chat.contextPanel.contextLimitLabel"),value:j?ve(j):"—"},{label:a("chat.contextPanel.sessionTokensLabel"),value:m.totalTokens>0?ve(m.totalTokens):"0"},{label:a("chat.contextPanel.usageLabel"),value:p!==null?`${p}%`:"—"},{label:a("chat.contextPanel.inputTokensLabel"),value:m.inputTokens>0?ve(m.inputTokens):"0"},{label:a("chat.contextPanel.outputTokensLabel"),value:m.outputTokens>0?ve(m.outputTokens):"0"},{label:a("chat.contextPanel.reasoningTokensLabel"),value:m.reasoningTokens>0?ve(m.reasoningTokens):"0"},...F?[{label:a("chat.contextPanel.costLabel"),value:m.cost>0?`$${m.cost<.001?m.cost.toFixed(6):m.cost.toFixed(4)}`:"$0.00"}]:[],{label:a("chat.contextPanel.sessionCreatedLabel"),value:Xe(C)},{label:a("chat.contextPanel.lastActivityLabel"),value:Xe(I)}];if(!o&&P.length===0){let G;e[4]!==i?(G=Z("flex flex-col h-full w-full border-l border-border bg-background",i),e[4]=i,e[5]=G):G=e[5];let q;e[6]!==a?(q=a("chat.contextPanel.title"),e[6]=a,e[7]=q):q=e[7];let ae;e[8]!==q?(ae=s.jsx("span",{className:"text-sm font-medium text-foreground",children:q}),e[8]=q,e[9]=ae):ae=e[9];let ie;e[10]!==r?(ie=r?s.jsx(ft,{size:14,className:"text-muted-foreground"}):s.jsx(mt,{size:14,className:"text-muted-foreground"}),e[10]=r,e[11]=ie):ie=e[11];let J;e[12]!==n||e[13]!==ie?(J=s.jsx("button",{type:"button",onClick:n,className:"flex size-6 items-center justify-center hover:bg-accent transition-colors rounded-lg",children:ie}),e[12]=n,e[13]=ie,e[14]=J):J=e[14];let le;e[15]!==ae||e[16]!==J?(le=s.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[ae,J]}),e[15]=ae,e[16]=J,e[17]=le):le=e[17];let te;e[18]!==a?(te=a("chat.contextPanel.emptyState"),e[18]=a,e[19]=te):te=e[19];let se;e[20]!==te?(se=s.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:te})}),e[20]=te,e[21]=se):se=e[21];let re;return e[22]!==le||e[23]!==se||e[24]!==G?(re=s.jsxs("div",{className:G,children:[le,se]}),e[22]=le,e[23]=se,e[24]=G,e[25]=re):re=e[25],re}let L;e[26]!==i?(L=Z("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",i),e[26]=i,e[27]=L):L=e[27];let H;e[28]!==a?(H=a("chat.contextPanel.title"),e[28]=a,e[29]=H):H=e[29];let B;e[30]!==H?(B=s.jsx("span",{className:"text-sm font-medium text-foreground",children:H}),e[30]=H,e[31]=B):B=e[31];let V;e[32]!==r?(V=r?s.jsx(ft,{size:14}):s.jsx(mt,{size:14}),e[32]=r,e[33]=V):V=e[33];let R;e[34]!==n||e[35]!==V?(R=s.jsx("button",{type:"button",onClick:n,className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:V}),e[34]=n,e[35]=V,e[36]=R):R=e[36];let Y;e[37]!==B||e[38]!==R?(Y=s.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[B,R]}),e[37]=B,e[38]=R,e[39]=Y):Y=e[39];let K;e[40]!==a?(K=a("chat.contextPanel.contextBreakdownSection"),e[40]=a,e[41]=K):K=e[41];let W;e[42]!==K?(W=s.jsx("span",{className:"text-xs text-muted-foreground",children:K}),e[42]=K,e[43]=W):W=e[43];let X;e[44]!==S||e[45]!==N||e[46]!==v?(X=s.jsx(Xn,{userTokens:v,assistantTokens:S,otherTokens:N}),e[44]=S,e[45]=N,e[46]=v,e[47]=X):X=e[47];let Q;return e[48]!==W||e[49]!==X?(Q=s.jsxs("div",{className:"flex flex-col gap-3",children:[W,X]}),e[48]=W,e[49]=X,e[50]=Q):Q=e[50],s.jsxs("div",{className:L,children:[Y,s.jsxs("div",{className:"flex flex-col gap-8 p-6",children:[M.length>0&&s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.subtasksSection")}),s.jsx("div",{className:"flex flex-col gap-1",children:M.map(na)})]}),s.jsx(qn,{items:E}),Q,P.length>0&&s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.rawMessagesSection")}),s.jsx("div",{className:"flex flex-col gap-1",children:P.map(G=>{const q=G.metadata?.created_at,ae=l?.id===G.id;return s.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[s.jsxs("button",{type:"button",onClick:()=>d(ae?null:G),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent/50 w-full text-left cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("span",{className:Z("shrink-0 font-medium",G.role==="user"?"text-chart-1":"text-chart-2"),children:G.role}),s.jsx("span",{className:"text-muted-foreground",children:"•"}),s.jsx("span",{className:"truncate text-muted-foreground font-mono",children:G.id})]}),q&&s.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:Xe(q)})]}),ae&&s.jsxs(s.Fragment,{children:[G.role==="assistant"&&(()=>{const ie=G.metadata?._request;if(!ie)return null;const J=ie.systemSections??[],le=Math.max(1,...J.map(sa)),te=J.reduce(ta,0);return s.jsxs("div",{className:"border-t border-border/50 px-3 py-2.5 text-xs space-y-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"font-medium text-foreground",children:a("chat.contextPanel.requestLabel")}),s.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[ie.activeTools??0," / ",ie.tools??0," ",a("chat.contextPanel.toolsActive")]})]}),J.length>0&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("div",{className:"text-muted-foreground",children:[a("chat.contextPanel.systemPromptLabel")," ",s.jsxs("span",{className:"tabular-nums",children:["~",Math.round(te/4).toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),J.map((se,re)=>{const de=se.preview.match(/^<([a-z-]+)/i)?.[1]??`section ${re}`,ge=se.chars/le*100,ue=Math.round(se.chars/4);return s.jsxs("div",{className:"space-y-0.5",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("span",{className:"font-mono text-foreground truncate",children:de}),s.jsxs("span",{className:"text-muted-foreground tabular-nums shrink-0",children:["~",ue.toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),s.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full bg-chart-3",style:{width:`${ge}%`}})})]},re)})]})]})})(),s.jsx("pre",{className:"text-xs font-mono bg-muted px-3 py-2 overflow-auto whitespace-pre-wrap break-all border-t border-border/50 max-h-64",children:JSON.stringify(G,null,2)})]})]},G.id)})})]})]})]})}function ta(t,e){return t+e.chars}function sa(t){return t.chars}function na(t,e){return s.jsx(Jn,{part:t},e)}function aa(t){return(t.parts??[]).filter(ra)}function ra(t){return t.type==="tool-subtask"}function ia(t){return t.role!=="system"}function la(t,e){const n=e.metadata?.usage;return t+(n?.outputTokens??0)}function oa(t){return t.role==="assistant"}function ca(t,e){const n=e.metadata?.usage;return t+(n?.inputTokens??0)}function da(t){return t.role==="user"}function ua(t){return t.role==="assistant"&&t.metadata?.usage}function fa(t){const e=$.c(21),{onOpenContextPanel:n}=t,{org:r}=oe(),{selectedVirtualMcp:i}=At();let a;e[0]!==r.id?(a=ke(r.id),e[0]=r.id,e[1]=a):a=e[1];const d=i??a,o=ce(d.id)??d,c=o.title??"Super Agent",f=o.icon??null,m=o.description??null;let h;e[2]!==f||e[3]!==c?(h=s.jsx(ye,{icon:f,name:c,size:"lg"}),e[2]=f,e[3]=c,e[4]=h):h=e[4];let g;e[5]!==c?(g=s.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-foreground",children:c}),e[5]=c,e[6]=g):g=e[6];let j;e[7]!==m?(j=m?s.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-balance",children:m}):null,e[7]=m,e[8]=j):j=e[8];let k;e[9]!==g||e[10]!==j?(k=s.jsxs("div",{className:"space-y-1.5",children:[g,j]}),e[9]=g,e[10]=j,e[11]=k):k=e[11];let p;e[12]!==h||e[13]!==k?(p=s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center gap-4 px-6 text-center overflow-hidden",children:[h,k]}),e[12]=h,e[13]=k,e[14]=p):p=e[14];let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ee.IceBreakers,{className:"pb-3"}),e[15]=b):b=e[15];let y;e[16]!==n?(y=s.jsxs(ee.Footer,{children:[b,s.jsx(ee.Input,{onOpenContextPanel:n})]}),e[16]=n,e[17]=y):y=e[17];let v;return e[18]!==p||e[19]!==y?(v=s.jsxs(s.Fragment,{children:[p,y]}),e[18]=p,e[19]=y,e[20]=v):v=e[20],v}function xt(t){const e=$.c(17),{outputs:n,collapsed:r,onToggle:i,variant:a}=t,l=a==="card"?"rounded-xl border border-border bg-muted/95 shadow-sm backdrop-blur-sm":"border-b border-border bg-background";let d;e[0]!==l?(d=Z(l),e[0]=l,e[1]=d):d=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Files in this task"}),e[2]=u):u=e[2];const o=r&&"-rotate-90";let c;e[3]!==o?(c=Z("size-4 text-muted-foreground transition-transform",o),e[3]=o,e[4]=c):c=e[4];let f;e[5]!==c?(f=s.jsx(at,{className:c}),e[5]=c,e[6]=f):f=e[6];let m;e[7]!==i||e[8]!==f?(m=s.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between px-3 py-2.5 text-left",children:[u,f]}),e[7]=i,e[8]=f,e[9]=m):m=e[9];let h;e[10]!==r||e[11]!==n?(h=!r&&s.jsx("div",{className:"flex max-h-72 flex-col gap-1.5 overflow-y-auto px-2 pb-2",children:n.map(ma)}),e[10]=r,e[11]=n,e[12]=h):h=e[12];let g;return e[13]!==d||e[14]!==m||e[15]!==h?(g=s.jsxs("div",{className:d,children:[m,h]}),e[13]=d,e[14]=m,e[15]=h,e[16]=g):g=e[16],g}function ma(t){return s.jsx(Ms,{file:t},t.key)}function ha(){const t=$.c(13),e=Re()?.taskId??null,n=Ls();let r;t[0]!==n?(r={enabled:n},t[0]=n,t[1]=r):r=t[1];const{data:i}=$s(e,r),[a,l]=O.useState(!1),[d,u]=O.useState(!0);if(!e||!i||i.length===0)return null;let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=()=>l(xa),t[2]=o):o=t[2];let c;t[3]!==a||t[4]!==i?(c=s.jsx("div",{className:"absolute top-2 right-2 z-10 hidden w-72 @[1280px]:block",children:s.jsx(xt,{variant:"card",outputs:i,collapsed:a,onToggle:o})}),t[3]=a,t[4]=i,t[5]=c):c=t[5];let f;t[6]===Symbol.for("react.memo_cache_sentinel")?(f=()=>u(pa),t[6]=f):f=t[6];let m;t[7]!==d||t[8]!==i?(m=s.jsx("div",{className:"shrink-0 @[1280px]:hidden",children:s.jsx(xt,{variant:"bar",outputs:i,collapsed:d,onToggle:f})}),t[7]=d,t[8]=i,t[9]=m):m=t[9];let h;return t[10]!==c||t[11]!==m?(h=s.jsxs(s.Fragment,{children:[c,m]}),t[10]=c,t[11]=m,t[12]=h):h=t[12],h}function pa(t){return!t}function xa(t){return!t}function ga(){const t=$.c(31),{org:e}=oe(),n=Re(),{isChatEmpty:r}=Pt(),[i,a]=O.useState("chat"),l=Ds(),d=Vn(),{runtime:u}=It(n?.virtualMcpId);if(d&&u!=="cms"){let w;return t[0]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(ee,{className:"animate-in fade-in-0 duration-200",children:s.jsx(ee.Main,{className:"flex flex-col items-center",children:s.jsx(ee.EmptyState,{children:s.jsx(ee.NoAiProviderEmptyState,{})})})}),t[0]=w):w=t[0],w}let c;t[1]!==l.hasDecoKey||t[2]!==l.hasOnlyDecoProvider||t[3]!==l.isLoading||t[4]!==l.isZeroBalance||t[5]!==r||t[6]!==e?(c=l.hasDecoKey&&l.isZeroBalance&&l.hasOnlyDecoProvider&&!l.isLoading&&r&&!ps(e.id),t[1]=l.hasDecoKey,t[2]=l.hasOnlyDecoProvider,t[3]=l.isLoading,t[4]=l.isZeroBalance,t[5]=r,t[6]=e,t[7]=c):c=t[7];const f=c;let m;t[8]!==f?(m=f&&s.jsx(ee.CreditsEmptyState,{}),t[8]=f,t[9]=m):m=t[9];const h=i!=="chat"?!0:void 0,g=i!=="chat",j=i!=="chat"?"opacity-0 pointer-events-none":"opacity-100";let k;t[10]!==j?(k=Z("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",j),t[10]=j,t[11]=k):k=t[11];let p;t[12]!==r||t[13]!==u?(p=r&&u!=="cms"?s.jsx(fa,{onOpenContextPanel:()=>a("context")}):s.jsxs(s.Fragment,{children:[s.jsxs(ee.Main,{className:"relative flex flex-col overflow-hidden @container",children:[s.jsx(ha,{}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(ee.Messages,{})})]}),s.jsx(ee.Footer,{children:s.jsx(ee.Input,{onOpenContextPanel:()=>a("context")})})]}),t[12]=r,t[13]=u,t[14]=p):p=t[14];let b;t[15]!==h||t[16]!==g||t[17]!==k||t[18]!==p?(b=s.jsx("div",{inert:h,"aria-hidden":g,className:k,children:p}),t[15]=h,t[16]=g,t[17]=k,t[18]=p,t[19]=b):b=t[19];const y=i!=="context"?!0:void 0,v=i!=="context",x=i==="context"?"opacity-100":"opacity-0 pointer-events-none";let T;t[20]!==x?(T=Z("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",x),t[20]=x,t[21]=T):T=t[21];let S;t[22]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ea,{back:!0,onClose:()=>a("chat")}),t[22]=S):S=t[22];let N;t[23]!==T||t[24]!==y||t[25]!==v?(N=s.jsx("div",{inert:y,"aria-hidden":v,className:T,children:S}),t[23]=T,t[24]=y,t[25]=v,t[26]=N):N=t[26];let _;return t[27]!==m||t[28]!==N||t[29]!==b?(_=s.jsxs(ee,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[m,b,N]}),t[27]=m,t[28]=N,t[29]=b,t[30]=_):_=t[30],_}function ba(){const t=$.c(7),e=U();let n;t[0]!==e?(n=e("agentShellLayout.agentShellLayout.chatLoadingError"),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==n?(r=s.jsx("div",{role:"alert",className:"flex h-full flex-1 items-center justify-center text-sm text-muted-foreground",children:n}),t[2]=n,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Le,{children:s.jsx(ga,{})}),t[4]=i):i=t[4];let a;return t[5]!==r?(a=s.jsx(St,{fallback:r,children:i}),t[5]=r,t[6]=a):a=t[6],a}function va(t){const e=$.c(10),{org:n}=oe(),r=Ws(),{data:i}=$e.useSession(),a=i?.user?.id,l=t?.id??null,d=!!t&&!!a&&!!t.created_by&&t.created_by!==a;let u;e[0]!==n.id||e[1]!==l?(u=Nt.viewedThreadMetadataRefresh(n.id,l??""),e[0]=n.id,e[1]=l,e[2]=u):u=e[2];const o=!!r&&!!l&&d;let c;e[3]!==r||e[4]!==l?(c=async()=>(await r?.refreshThreadMetadata(l??""),!0),e[3]=r,e[4]=l,e[5]=c):c=e[5];let f;e[6]!==u||e[7]!==o||e[8]!==c?(f={queryKey:u,enabled:o,staleTime:Number.POSITIVE_INFINITY,queryFn:c},e[6]=u,e[7]=o,e[8]=c,e[9]=f):f=e[9],Tt(f)}function Ze(t){const e=$.c(14),{label:n,value:r,onChange:i,options:a}=t;let l;e[0]!==n?(l=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=l):l=e[1];let d;e[2]!==i?(d=f=>f&&i(f),e[2]=i,e[3]=d):d=e[3];let u;e[4]!==a?(u=a.map(ja),e[4]=a,e[5]=u):u=e[5];let o;e[6]!==n||e[7]!==d||e[8]!==u||e[9]!==r?(o=s.jsx(rn,{type:"single",size:"sm",value:r,onValueChange:d,"aria-label":n,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:u}),e[6]=n,e[7]=d,e[8]=u,e[9]=r,e[10]=o):o=e[10];let c;return e[11]!==l||e[12]!==o?(c=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l,o]}),e[11]=l,e[12]=o,e[13]=c):c=e[13],c}function ja(t){return s.jsxs(an,{value:t.value,className:"h-6 gap-1.5 rounded-lg border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function ya(t){const e=$.c(91),{panel:n,className:r}=t,i=r===void 0?"md:size-[34px]":r,a=U();let l;e[0]!==a?(l=a("sidebar.taskGroupsList.filterChats"),e[0]=a,e[1]=l):l=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ks,{size:16}),e[2]=d):d=e[2];let u;e[3]!==n.filtersActive?(u=n.filtersActive&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[3]=n.filtersActive,e[4]=u):u=e[4];let o;e[5]!==i||e[6]!==n.filtersActive||e[7]!==l||e[8]!==u?(o=s.jsx(Oe,{asChild:!0,children:s.jsx(Bt,{asChild:!0,children:s.jsxs(Ae,{"aria-label":l,active:n.filtersActive,className:i,children:[d,u]})})}),e[5]=i,e[6]=n.filtersActive,e[7]=l,e[8]=u,e[9]=o):o=e[9];let c;e[10]!==a?(c=a("sidebar.taskGroupsList.filterChats"),e[10]=a,e[11]=c):c=e[11];let f;e[12]!==c?(f=s.jsx(Be,{side:"bottom",children:c}),e[12]=c,e[13]=f):f=e[13];let m;e[14]!==o||e[15]!==f?(m=s.jsxs(ze,{children:[o,f]}),e[14]=o,e[15]=f,e[16]=m):m=e[16];let h;e[17]!==a?(h=a("sidebar.taskGroupsList.filterView"),e[17]=a,e[18]=h):h=e[18];const g=n.groupBy;let j;e[19]!==n?(j=q=>{xe("tasks_panel_group_by_changed",{to_value:q}),n.setGroupBy(q)},e[19]=n,e[20]=j):j=e[20];let k;e[21]!==a?(k=a("sidebar.taskGroupsList.viewList"),e[21]=a,e[22]=k):k=e[22];let p;e[23]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ss,{size:13}),e[23]=p):p=e[23];let b;e[24]!==k?(b={value:"flat",label:k,icon:p},e[24]=k,e[25]=b):b=e[25];let y;e[26]!==a?(y=a("sidebar.taskGroupsList.viewStatus"),e[26]=a,e[27]=y):y=e[27];let v;e[28]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Ns,{size:13}),e[28]=v):v=e[28];let x;e[29]!==y?(x={value:"status",label:y,icon:v},e[29]=y,e[30]=x):x=e[30];let T;e[31]!==b||e[32]!==x?(T=[b,x],e[31]=b,e[32]=x,e[33]=T):T=e[33];let S;e[34]!==n.groupBy||e[35]!==j||e[36]!==T||e[37]!==h?(S=s.jsx(Ze,{label:h,value:g,onChange:j,options:T}),e[34]=n.groupBy,e[35]=j,e[36]=T,e[37]=h,e[38]=S):S=e[38];let N;e[39]!==a?(N=a("sidebar.taskGroupsList.filterType"),e[39]=a,e[40]=N):N=e[40];const _=n.typeFilter;let w;e[41]!==n?(w=q=>{xe("tasks_panel_filter_changed",{to_value:q}),n.setTypeFilter(q)},e[41]=n,e[42]=w):w=e[42];let C;e[43]!==a?(C=a("sidebar.taskGroupsList.typeAll"),e[43]=a,e[44]=C):C=e[44];let I;e[45]!==C?(I={value:"all",label:C},e[45]=C,e[46]=I):I=e[46];let P;e[47]!==a?(P=a("sidebar.taskGroupsList.typeChats"),e[47]=a,e[48]=P):P=e[48];let M;e[49]!==P?(M={value:"manual",label:P},e[49]=P,e[50]=M):M=e[50];let A;e[51]!==a?(A=a("sidebar.taskGroupsList.typeAuto"),e[51]=a,e[52]=A):A=e[52];let D;e[53]!==A?(D={value:"automation",label:A},e[53]=A,e[54]=D):D=e[54];let F;e[55]!==I||e[56]!==M||e[57]!==D?(F=[I,M,D],e[55]=I,e[56]=M,e[57]=D,e[58]=F):F=e[58];let E;e[59]!==n.typeFilter||e[60]!==N||e[61]!==w||e[62]!==F?(E=s.jsx(Ze,{label:N,value:_,onChange:w,options:F}),e[59]=n.typeFilter,e[60]=N,e[61]=w,e[62]=F,e[63]=E):E=e[63];let L;e[64]!==a?(L=a("sidebar.taskGroupsList.filterScope"),e[64]=a,e[65]=L):L=e[65];const H=n.showAll?"team":"mine";let B;e[66]!==n?(B=q=>n.setShowAll(q==="team"),e[66]=n,e[67]=B):B=e[67];let V;e[68]!==a?(V=a("sidebar.taskGroupsList.scopeMine"),e[68]=a,e[69]=V):V=e[69];let R;e[70]!==V?(R={value:"mine",label:V},e[70]=V,e[71]=R):R=e[71];let Y;e[72]!==a?(Y=a("sidebar.taskGroupsList.scopeTeam"),e[72]=a,e[73]=Y):Y=e[73];let K;e[74]!==Y?(K={value:"team",label:Y},e[74]=Y,e[75]=K):K=e[75];let W;e[76]!==R||e[77]!==K?(W=[R,K],e[76]=R,e[77]=K,e[78]=W):W=e[78];let X;e[79]!==L||e[80]!==H||e[81]!==B||e[82]!==W?(X=s.jsx(Ze,{label:L,value:H,onChange:B,options:W}),e[79]=L,e[80]=H,e[81]=B,e[82]=W,e[83]=X):X=e[83];let Q;e[84]!==S||e[85]!==E||e[86]!==X?(Q=s.jsxs(zt,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[S,E,X]}),e[84]=S,e[85]=E,e[86]=X,e[87]=Q):Q=e[87];let G;return e[88]!==Q||e[89]!==m?(G=s.jsxs(Gt,{children:[m,Q]}),e[88]=Q,e[89]=m,e[90]=G):G=e[90],G}function ka(t,e){return t.filter(n=>n.id===e||!!n.trigger_id||tn(n))}function Sa(){const t=$.c(2),e=Lt()??[];let n;return t[0]!==e?(n=r=>{if(!r)return;const i=e.find(a=>a.id===r);return i?Ft(i.metadata):void 0},t[0]=e,t[1]=n):n=t[1],n}function Na(t){const e=$.c(9),{virtualMcpId:n,size:r,showAutomationBadge:i}=t,a=r===void 0?"sm":r,l=U();let d;e[0]!==a||e[1]!==n?(d=n?s.jsx(Ta,{virtualMcpId:n,size:a}):s.jsx(ye,{icon:null,name:"?",size:a}),e[0]=a,e[1]=n,e[2]=d):d=e[2];let u;e[3]!==i||e[4]!==l?(u=i&&s.jsx("span",{"aria-label":l("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-special border border-special text-special-foreground",children:s.jsx(Kt,{size:10,className:"text-white"})}),e[3]=i,e[4]=l,e[5]=u):u=e[5];let o;return e[6]!==d||e[7]!==u?(o=s.jsxs("div",{className:"relative shrink-0",children:[d,u]}),e[6]=d,e[7]=u,e[8]=o):o=e[8],o}function Ta(t){const e=$.c(6),{virtualMcpId:n,size:r}=t,i=ce(n);if(!i){let d;return e[0]!==r?(d=s.jsx(ye,{icon:null,name:"?",size:r}),e[0]=r,e[1]=d):d=e[1],d}const a=i.icon??null;let l;return e[2]!==i.title||e[3]!==r||e[4]!==a?(l=s.jsx(ye,{icon:a,name:i.title,size:r}),e[2]=i.title,e[3]=r,e[4]=a,e[5]=l):l=e[5],l}const gt=["thread"];function _a(t){const e=$.c(53),{open:n,onOpenChange:r}=t,[i,a]=O.useState(""),{org:l}=oe(),{setTaskId:d}=rt(),u=st(),o=U();let c,f,m,h;e[0]!==l.id||e[1]!==i?(h=i.trim(),c=h?20:10,m=Tt,f=Nt.globalSearch(l.id,h,c,gt),e[0]=l.id,e[1]=i,e[2]=c,e[3]=f,e[4]=m,e[5]=h):(c=e[2],f=e[3],m=e[4],h=e[5]);let g;e[6]!==c||e[7]!==u||e[8]!==h?(g=async()=>{const L=await u.call("GLOBAL_SEARCH",{query:h,limit:c,types:[...gt]});return{...L,items:L.items.filter(wa)}},e[6]=c,e[7]=u,e[8]=h,e[9]=g):g=e[9];let j;e[10]!==n||e[11]!==f||e[12]!==g?(j={queryKey:f,enabled:n,queryFn:g,staleTime:1e4},e[10]=n,e[11]=f,e[12]=g,e[13]=j):j=e[13];const{data:k,isFetching:p}=m(j);let b;e[14]!==k?.items?(b=k?.items??[],e[14]=k?.items,e[15]=b):b=e[15];const y=b;let v;e[16]!==r?(v=L=>{L||a(""),r(L)},e[16]=r,e[17]=v):v=e[17];const x=v;let T;e[18]!==x||e[19]!==d?(T=L=>{x(!1),d(L.id,L.virtual_mcp_id??void 0)},e[18]=x,e[19]=d,e[20]=T):T=e[20];const S=T;let N;e[21]!==o?(N=o("tasksPanel.globalSearchDialog.title"),e[21]=o,e[22]=N):N=e[22];let _;e[23]!==N?(_=s.jsx(dn,{children:N}),e[23]=N,e[24]=_):_=e[24];let w;e[25]!==o?(w=o("tasksPanel.globalSearchDialog.description"),e[25]=o,e[26]=w):w=e[26];let C;e[27]!==w?(C=s.jsx(un,{children:w}),e[27]=w,e[28]=C):C=e[28];let I;e[29]!==C||e[30]!==_?(I=s.jsxs(fn,{className:"sr-only",children:[_,C]}),e[29]=C,e[30]=_,e[31]=I):I=e[31];let P;e[32]!==o?(P=o("tasksPanel.globalSearchDialog.placeholder"),e[32]=o,e[33]=P):P=e[33];let M;e[34]!==i||e[35]!==P?(M=s.jsx(vn,{value:i,onValueChange:a,placeholder:P}),e[34]=i,e[35]=P,e[36]=M):M=e[36];let A;e[37]!==S||e[38]!==p||e[39]!==y||e[40]!==o||e[41]!==h?(A=s.jsx(pn,{children:p&&y.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:o("tasksPanel.globalSearchDialog.searching")}):y.length===0?s.jsx(xn,{children:o("tasksPanel.globalSearchDialog.noResults")}):s.jsx(gn,{heading:h?void 0:o("tasksPanel.globalSearchDialog.recent"),children:y.map(L=>L.type==="thread"?s.jsxs(bn,{value:`thread:${L.id}:${L.title}`,onSelect:()=>S(L),className:"gap-2.5",children:[s.jsx(Na,{virtualMcpId:L.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:L.title||o("tasksPanel.globalSearchDialog.untitledChat")})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(L.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${L.id}`):null)})}),e[37]=S,e[38]=p,e[39]=y,e[40]=o,e[41]=h,e[42]=A):A=e[42];let D;e[43]!==M||e[44]!==A?(D=s.jsxs(jn,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[M,A]}),e[43]=M,e[44]=A,e[45]=D):D=e[45];let F;e[46]!==I||e[47]!==D?(F=s.jsxs(mn,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[I,D]}),e[46]=I,e[47]=D,e[48]=F):F=e[48];let E;return e[49]!==x||e[50]!==n||e[51]!==F?(E=s.jsx(hn,{open:n,onOpenChange:x,children:F}),e[49]=x,e[50]=n,e[51]=F,e[52]=E):E=e[52],E}function wa(t){return t.type==="thread"}function Ca(t){const e=$.c(43),{branch:n,onOutcome:r}=t,i=U();let a;e[0]!==r?(a=S=>{S||r("cancel")},e[0]=r,e[1]=a):a=e[1];let l;e[2]!==i?(l=i("sidebar.archiveWorktreeDialog.title"),e[2]=i,e[3]=l):l=e[3];let d;e[4]!==l?(d=s.jsx(yn,{children:l}),e[4]=l,e[5]=d):d=e[5];let u;e[6]!==i?(u=i("sidebar.archiveWorktreeDialog.stopsAndDeletesBefore"),e[6]=i,e[7]=u):u=e[7];let o;e[8]!==n?(o=s.jsx("span",{className:"font-mono",children:n}),e[8]=n,e[9]=o):o=e[9];let c;e[10]!==i?(c=i("sidebar.archiveWorktreeDialog.stopsAndDeletesAfter"),e[10]=i,e[11]=c):c=e[11];let f;e[12]!==u||e[13]!==o||e[14]!==c?(f=s.jsxs(kn,{children:[u," ",o," ",c]}),e[12]=u,e[13]=o,e[14]=c,e[15]=f):f=e[15];let m;e[16]!==d||e[17]!==f?(m=s.jsxs(Sn,{children:[d,f]}),e[16]=d,e[17]=f,e[18]=m):m=e[18];let h;e[19]!==r?(h=()=>r("cancel"),e[19]=r,e[20]=h):h=e[20];let g;e[21]!==i?(g=i("sidebar.archiveWorktreeDialog.cancel"),e[21]=i,e[22]=g):g=e[22];let j;e[23]!==g||e[24]!==h?(j=s.jsx(Nn,{onClick:h,children:g}),e[23]=g,e[24]=h,e[25]=j):j=e[25];let k;e[26]===Symbol.for("react.memo_cache_sentinel")?(k=Z(ss({variant:"destructive"})),e[26]=k):k=e[26];let p;e[27]!==r?(p=()=>r("confirm"),e[27]=r,e[28]=p):p=e[28];let b;e[29]!==i?(b=i("sidebar.archiveWorktreeDialog.confirm"),e[29]=i,e[30]=b):b=e[30];let y;e[31]!==p||e[32]!==b?(y=s.jsx(Tn,{className:k,onClick:p,children:b}),e[31]=p,e[32]=b,e[33]=y):y=e[33];let v;e[34]!==j||e[35]!==y?(v=s.jsxs(_n,{children:[j,y]}),e[34]=j,e[35]=y,e[36]=v):v=e[36];let x;e[37]!==v||e[38]!==m?(x=s.jsxs(wn,{children:[m,v]}),e[37]=v,e[38]=m,e[39]=x):x=e[39];let T;return e[40]!==a||e[41]!==x?(T=s.jsx(Cn,{open:!0,onOpenChange:a,children:x}),e[40]=a,e[41]=x,e[42]=T):T=e[42],T}function Pa(t,e,n){if(!n)return;const r=t.findIndex(i=>i.id===e);if(r!==-1){for(let i=r+1;i<t.length;i++){const a=t[i];if(a?.created_by===n)return a}for(let i=r-1;i>=0;i--){const a=t[i];if(a?.created_by===n)return a}}}function Aa(t){return t==="ephemeral"||t.startsWith("thread:")}function Xt(t){const e=$.c(45),{task:n,isActive:r,onClick:i,onArchive:a,showAutomationBadge:l,showAgentIcon:d,hideStatusIdle:u,indented:o}=t,c=U(),f=Pn(n.status),m=f.icon,h=n.metadata?.kind==="tool_call_run",g=ce(h?void 0:n.virtual_mcp_id);let j;e[0]!==g?(j=Ot(g),e[0]=g,e[1]=j):j=e[1];const k=j;Fs(6e4);const p=l||!!n.trigger_id,b=n.id,y="button",v=0;let x;e[2]!==i?(x=B=>{B.target===B.currentTarget&&(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),i())},e[2]=i,e[3]=x):x=e[3];const T=o?"-ml-4 pl-6":"pl-[9px]",S=r?"bg-accent text-accent-foreground":"hover:bg-accent/60";let N;e[4]!==T||e[5]!==S?(N=Z("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",T,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",S),e[4]=T,e[5]=S,e[6]=N):N=e[6];let _;e[7]!==h||e[8]!==d||e[9]!==g?.icon||e[10]!==g?.title?(_=d&&!h&&s.jsx(ye,{icon:g?.icon??null,name:g?.title??"?",size:"2xs"}),e[7]=h,e[8]=d,e[9]=g?.icon,e[10]=g?.title,e[11]=_):_=e[11];let w;e[12]!==p||e[13]!==c?(w=p&&s.jsx(Kt,{size:12,"aria-label":c("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-special"}),e[12]=p,e[13]=c,e[14]=w):w=e[14];let C;e[15]!==c||e[16]!==n.title?(C=n.title||c("tasksPanel.taskRow.untitledTask"),e[15]=c,e[16]=n.title,e[17]=C):C=e[17];let I;e[18]!==C?(I=s.jsx("div",{className:"text-sm text-foreground truncate",children:C}),e[18]=C,e[19]=I):I=e[19];let P;e[20]!==w||e[21]!==I?(P=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[w,I]}),e[20]=w,e[21]=I,e[22]=P):P=e[22];let M;e[23]!==k||e[24]!==r||e[25]!==n.branch||e[26]!==n.updated_at?(M=n.updated_at&&s.jsxs("div",{className:Z("flex items-center gap-1 text-[11px] min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!Aa(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):k?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[k.owner,"/",k.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:In(new Date(n.updated_at))})]}),e[23]=k,e[24]=r,e[25]=n.branch,e[26]=n.updated_at,e[27]=M):M=e[27];let A;e[28]!==P||e[29]!==M?(A=s.jsxs("div",{className:"flex-1 min-w-0",children:[P,M]}),e[28]=P,e[29]=M,e[30]=A):A=e[30];const D="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",F=!u&&s.jsx("span",{className:Z("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",a&&"group-hover/row:opacity-0"),"aria-label":c("tasksPanel.taskRow.statusLabel",{status:c(f.labelKey)}),children:n.status==="in_progress"?s.jsx(je,{className:Z("size-3.5",f.iconClassName)}):s.jsx(m,{size:14,className:f.iconClassName})});let E;e[31]!==a||e[32]!==c?(E=a&&s.jsxs(ze,{children:[s.jsx(Oe,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":c("tasksPanel.taskRow.archiveTask"),onClick:B=>{B.stopPropagation(),a()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-8 items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(ns,{size:14})})}),s.jsx(Be,{side:"right",children:c("tasksPanel.taskRow.archive")})]}),e[31]=a,e[32]=c,e[33]=E):E=e[33];let L;e[34]!==F||e[35]!==E?(L=s.jsxs("div",{className:D,children:[F,E]}),e[34]=F,e[35]=E,e[36]=L):L=e[36];let H;return e[37]!==i||e[38]!==A||e[39]!==L||e[40]!==x||e[41]!==N||e[42]!==_||e[43]!==n.id?(H=s.jsxs("div",{"data-task-id":b,role:y,tabIndex:v,onClick:i,onKeyDown:x,className:N,children:[_,A,L]}),e[37]=i,e[38]=A,e[39]=L,e[40]=x,e[41]=N,e[42]=_,e[43]=n.id,e[44]=H):H=e[44],H}const bt=["requires_action","in_progress","failed","expired","completed"];function Ia(t){const e=new Map(bt.map(n=>[n,[]]));for(const n of t){const r=n.status??"completed";(e.get(r)??e.get("completed")).push(n)}return bt.map(n=>({status:n,threads:e.get(n)}))}const Ma="sidebar.group.expanded.";function La(t,e){const n=$.c(3),[r,i]=_t(`${Ma}${t}`,e);let a;return n[0]!==r||n[1]!==i?(a=[r,i],n[0]=r,n[1]=i,n[2]=a):a=n[2],a}function Zt(t){const e=$.c(18),{onClick:n,isFetching:r,indented:i}=t,a=U();let l;e[0]!==a?(l=a("sidebar.showMoreButton.ariaLabel"),e[0]=a,e[1]=l):l=e[1];const d=i?"-ml-4 pl-6 pr-2":"px-2";let u;e[2]!==d?(u=Z("flex items-center gap-2 py-1.5 rounded-lg text-sm text-muted-foreground",d,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=d,e[3]=u):u=e[3];let o;e[4]!==r?(o=r&&s.jsx(je,{className:"size-3.5"}),e[4]=r,e[5]=o):o=e[5];let c;e[6]!==r||e[7]!==a?(c=a(r?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=r,e[7]=a,e[8]=c):c=e[8];let f;e[9]!==c?(f=s.jsx("span",{children:c}),e[9]=c,e[10]=f):f=e[10];let m;return e[11]!==r||e[12]!==n||e[13]!==l||e[14]!==u||e[15]!==o||e[16]!==f?(m=s.jsxs("button",{type:"button","aria-label":l,onClick:n,disabled:r,className:u,children:[o,f]}),e[11]=r,e[12]=n,e[13]=l,e[14]=u,e[15]=o,e[16]=f,e[17]=m):m=e[17],m}function $a(t,e,n,r){return[t,e,n,r.type,r.member,r.currentUserId??""].join("|")}function Da(t){return t.member==="mine"&&!t.currentUserId}const Qt=4;let Pe=0;const et=[];function Fa(){for(;Pe<Qt&&et.length>0;){const t=et.shift();t&&t()}}function Jt(t){return new Promise((e,n)=>{const r=()=>{Pe++,t().then(e,n).finally(()=>{Pe--,Fa()})};Pe<Qt?r():et.push(r)})}const He=10;function vt(t,e,n,r,i){const a={hidden:!1};r.member==="mine"&&r.currentUserId&&(a.created_by=r.currentUserId),r.type==="automation"&&(a.has_trigger=!0),r.type==="manual"&&(a.has_trigger=!1);const l={where:a,limit:i,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return l.status=e,l}function Ra(t,e,n,r){let i=0;for(const a of t)es(a,e,n,r)&&i++;return i}function Qe(t,e,n,r){return Ra(t,e,n,r)}function Ea(t,e){return!!(t>=He||t===0&&e)}function jt(t,e){return t<e}function Oa(t,e){return e===!1?!1:e===!0?!0:t}function es(t,e,n,r){return!(t.hidden||(t.status??"completed")!==n||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const Me=new Map,Ce=new Map;function Ba(t,e){return e?t>=He?!0:null:!1}function yt(t){return Me.get(t)}function za(t,e){Me.set(t,e)}function Ga(t,e,n){const r=Me.get(t);if(r!==void 0){n(r);return}let i=Ce.get(t);i||(i=Jt(e).then(a=>(Me.set(t,a),Ce.delete(t),a)).catch(()=>(Ce.delete(t),Promise.reject(new Error("group probe failed")))),Ce.set(t,i)),i.then(n,()=>n(!1))}function kt(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===He,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Ha(t,e,n,r,i){let a=0;for(const l of t)e.has(l.id)||es(l,n,r,i)&&a++;return a}function Ua(t,e,n,r){const i=$.c(8),{org:a}=oe(),l=$a(a.id,t,e,n);let d;i[0]!==n?(d=Da(n),i[0]=n,i[1]=d):d=i[1];const u=d,[o,c]=O.useState({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});o.identity!==l&&c({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});const f=it(),{threads:m,hasMore:h}=lt(),g=Qe(m,t,e,n),j=Ea(g,h),k=Ba(g,h),p=st();if(o.identity===l&&o.serverHasMore===null){const S=k??yt(l);S!==void 0&&c({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:o.probeSubscribedIdentity,serverHasMore:S})}!u&&o.identity===l&&o.serverHasMore===null&&k===null&&yt(l)===void 0&&o.probeSubscribedIdentity!==l&&(c(S=>S.identity===l?{...S,isProbing:!0,probeSubscribedIdentity:l}:S),Ga(l,async()=>{const S=vt(t,e,0,n,1),N=await p.call("COLLECTION_THREADS_LIST",S),{totalCount:_}=kt(N),w=Qe(f.threads.get(),t,e,n);return _===void 0?!1:jt(w,_)},S=>{c(N=>N.identity!==l?N:{...N,isProbing:!1,serverHasMore:S})}));const y=async function(){if(o.isFetching||o.isProbing||u)return;const N=l;c(_=>_.identity===N?{..._,isFetching:!0}:_);try{const _=Qe(m,t,e,n),w=vt(t,e,_,n,He),C=await Jt(()=>p.call("COLLECTION_THREADS_LIST",w)),{items:I,hasMore:P,totalCount:M}=kt(C),A=new Set(m.map(Ka)),D=Ha(I,A,t,e,n),F=_;f.mergeThreads(I),c(E=>{if(E.identity!==N)return E;let L;return M!==void 0?L=jt(F+D,M):L=I.length===0||D===0?!1:P,za(N,L),{...E,isFetching:!1,serverHasMore:L}})}catch(_){const w=_,C=w instanceof Error?w.message:String(w);wt.error(`Could not load more tasks: ${C}`),c(I=>I.identity===N?{...I,isFetching:!1}:I)}},v=o.isFetching||o.isProbing,x=!u&&!v&&Oa(j,o.serverHasMore);let T;return i[2]!==v||i[3]!==y||i[4]!==x||i[5]!==o.isProbing||i[6]!==o.serverHasMore?(T={hasMore:x,isFetching:v,isProbing:o.isProbing,serverHasMore:o.serverHasMore,loadMore:y},i[2]=v,i[3]=y,i[4]=x,i[5]=o.isProbing,i[6]=o.serverHasMore,i[7]=T):T=i[7],T}function Ka(t){return t.id}function Va(t){const e=$.c(20),{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:d,filters:u}=t,{isFetching:o,isProbing:c,loadMore:f,hasMore:m,serverHasMore:h}=Ua("status",n,u),[g,j]=O.useState(!1);!g&&r.length===0&&h===!0&&!o&&!c&&(j(!0),queueMicrotask(()=>{f()}));let k;if(e[0]!==i||e[1]!==d||e[2]!==u||e[3]!==l||e[4]!==a||e[5]!==r){let y;e[7]!==i||e[8]!==d||e[9]!==u||e[10]!==l||e[11]!==a?(y=v=>s.jsx(Xt,{task:v,isActive:i===v.id,onClick:()=>a(v),onArchive:d&&v.created_by===u.currentUserId?()=>l(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=i,e[8]=d,e[9]=u,e[10]=l,e[11]=a,e[12]=y):y=e[12],k=r.map(y),e[0]=i,e[1]=d,e[2]=u,e[3]=l,e[4]=a,e[5]=r,e[6]=k}else k=e[6];let p;e[13]!==m||e[14]!==o||e[15]!==f?(p=(m||o)&&s.jsx(Zt,{onClick:()=>{f()},isFetching:o,indented:!0}),e[13]=m,e[14]=o,e[15]=f,e[16]=p):p=e[16];let b;return e[17]!==k||e[18]!==p?(b=s.jsxs(s.Fragment,{children:[k,p]}),e[17]=k,e[18]=p,e[19]=b):b=e[19],b}function Wa(t){const e=$.c(43),{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:d,filters:u}=t,o=U(),c=An[n],f=c.icon,[m,h]=La(`status-${n}`,!1);let g;e[0]!==m||e[1]!==h?(g=function(){h(!m)},e[0]=m,e[1]=h,e[2]=g):g=e[2];const j=g;let k;e[3]!==c.labelKey||e[4]!==o?(k=o("sidebar.taskGroupsList.toggleStatusGroup",{status:o(c.labelKey)}),e[3]=c.labelKey,e[4]=o,e[5]=k):k=e[5];let p;e[6]!==j?(p=C=>{C.target===C.currentTarget&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),j())},e[6]=j,e[7]=p):p=e[7];let b;e[8]!==f||e[9]!==c.iconClassName?(b=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(f,{size:12,className:c.iconClassName})}),e[8]=f,e[9]=c.iconClassName,e[10]=b):b=e[10];let y;e[11]!==m?(y=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:m?s.jsx(at,{size:14}):s.jsx(as,{size:14})}),e[11]=m,e[12]=y):y=e[12];let v;e[13]!==b||e[14]!==y?(v=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[b,y]}),e[13]=b,e[14]=y,e[15]=v):v=e[15];let x;e[16]!==c.labelKey||e[17]!==o?(x=o(c.labelKey),e[16]=c.labelKey,e[17]=o,e[18]=x):x=e[18];let T;e[19]!==x?(T=s.jsx("span",{className:"flex-1 truncate",children:x}),e[19]=x,e[20]=T):T=e[20];let S;e[21]!==r.length?(S=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:r.length})}),e[21]=r.length,e[22]=S):S=e[22];let N;e[23]!==m||e[24]!==j||e[25]!==k||e[26]!==p||e[27]!==v||e[28]!==T||e[29]!==S?(N=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":m,"aria-label":k,onClick:j,onKeyDown:p,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-lg text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[v,T,S]}),e[23]=m,e[24]=j,e[25]=k,e[26]=p,e[27]=v,e[28]=T,e[29]=S,e[30]=N):N=e[30];let _;e[31]!==i||e[32]!==d||e[33]!==m||e[34]!==u||e[35]!==l||e[36]!==a||e[37]!==n||e[38]!==r?(_=m&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(Va,{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:d,filters:u})}),e[31]=i,e[32]=d,e[33]=m,e[34]=u,e[35]=l,e[36]=a,e[37]=n,e[38]=r,e[39]=_):_=e[39];let w;return e[40]!==N||e[41]!==_?(w=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[N,_]}),e[40]=N,e[41]=_,e[42]=w):w=e[42],w}function qa(t){const e=$.c(41),{threads:n,groupBy:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,filters:d,hasMore:u,isFetchingMore:o,onLoadMore:c,filtersActive:f}=t,m=U();if(n.length===0&&!u&&!o){let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ts,{className:"size-6 opacity-60"}),e[0]=p):p=e[0];let b;e[1]!==f||e[2]!==m?(b=m(f?"sidebar.myThreadsSection.noChatsMatchFilters":"sidebar.myThreadsSection.noChatsYet"),e[1]=f,e[2]=m,e[3]=b):b=e[3];let y;return e[4]!==b?(y=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[p,s.jsx("p",{className:"text-sm",children:b})]}),e[4]=b,e[5]=y):y=e[5],y}const h=n.length>1||u;if(r==="status"){let p;if(e[6]!==i||e[7]!==h||e[8]!==d||e[9]!==l||e[10]!==a||e[11]!==n){let y;e[13]!==i||e[14]!==h||e[15]!==d||e[16]!==l||e[17]!==a?(y=v=>s.jsx(Wa,{status:v.status,threads:v.threads,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:h,filters:d},v.status),e[13]=i,e[14]=h,e[15]=d,e[16]=l,e[17]=a,e[18]=y):y=e[18],p=Ia(n).map(y),e[6]=i,e[7]=h,e[8]=d,e[9]=l,e[10]=a,e[11]=n,e[12]=p}else p=e[12];let b;return e[19]!==p?(b=s.jsx(s.Fragment,{children:p}),e[19]=p,e[20]=b):b=e[20],b}let g;if(e[21]!==i||e[22]!==h||e[23]!==d||e[24]!==l||e[25]!==a||e[26]!==n){let p;e[28]!==i||e[29]!==h||e[30]!==d||e[31]!==l||e[32]!==a?(p=b=>s.jsx(Xt,{task:b,isActive:i===b.id,onClick:()=>a(b),onArchive:h&&b.created_by===d.currentUserId?()=>l(b):void 0,showAutomationBadge:!!b.trigger_id,showAgentIcon:!0},b.id),e[28]=i,e[29]=h,e[30]=d,e[31]=l,e[32]=a,e[33]=p):p=e[33],g=n.map(p),e[21]=i,e[22]=h,e[23]=d,e[24]=l,e[25]=a,e[26]=n,e[27]=g}else g=e[27];let j;e[34]!==u||e[35]!==o||e[36]!==c?(j=(u||o)&&s.jsx(Zt,{onClick:c,isFetching:o}),e[34]=u,e[35]=o,e[36]=c,e[37]=j):j=e[37];let k;return e[38]!==g||e[39]!==j?(k=s.jsxs(s.Fragment,{children:[g,j]}),e[38]=g,e[39]=j,e[40]=k):k=e[40],k}function Ya(t,e){return null}function Xa(t,e){return t.some(n=>n.id!==e.taskId&&!n.hidden&&n.branch===e.branch&&n.virtual_mcp_id===e.virtualMcpId)}const Za=["archive","reclaim-worktree"],Qa=[];function Ja(t){return t==="confirm"?Za:Qa}function er(t){const e=$.c(11),{panel:n}=t;let r;return e[0]!==n.activeTaskId||e[1]!==n.archiveTask||e[2]!==n.filters||e[3]!==n.filtersActive||e[4]!==n.groupBy||e[5]!==n.hasMore||e[6]!==n.isFetchingMore||e[7]!==n.loadMore||e[8]!==n.selectTask||e[9]!==n.threads?(r=s.jsx(qa,{threads:n.threads,groupBy:n.groupBy,activeTaskId:n.activeTaskId,onSelectTask:n.selectTask,onArchiveTask:n.archiveTask,filters:n.filters,hasMore:n.hasMore,isFetchingMore:n.isFetchingMore,onLoadMore:n.loadMore,filtersActive:n.filtersActive}),e[0]=n.activeTaskId,e[1]=n.archiveTask,e[2]=n.filters,e[3]=n.filtersActive,e[4]=n.groupBy,e[5]=n.hasMore,e[6]=n.isFetchingMore,e[7]=n.loadMore,e[8]=n.selectTask,e[9]=n.threads,e[10]=r):r=e[10],r}function tr(t){const e=$.c(83);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{onNavigate:r}=n,i=U(),{data:a}=$e.useSession(),l=a?.user?.id,{org:d}=oe();let u;e[2]!==d.id?(u=ke(d.id),e[2]=d.id,e[3]=u):u=e[3];const o=u.id,c=Sa(),{threads:f,hasMore:m,isFetchingMore:h,fetchNextPage:g}=lt(),j=f.filter(rr),{hide:k,setScope:p}=ot(),b=De(),y=st(),{setTaskId:v,createNewTask:x}=rt(),T=Ht(),S=Ge();let N;e[4]!==S||e[5]!==f||e[6]!==T?(N=ln({routeAgentId:T,threadVirtualMcpId:f.find(z=>z.id===S)?.virtual_mcp_id}),e[4]=S,e[5]=f,e[6]=T,e[7]=N):N=e[7];const _=N;let w;e[8]!==r?(w=()=>{r?.()},e[8]=r,e[9]=w):w=e[9];const C=w,I=[...j].sort(ar),[P,M]=O.useState("all"),[A,D]=O.useState("flat"),[F,E]=_t("sidebar-threads-scope-all",!1),[L,H]=O.useState(!1),[B,V]=O.useState(!1);let R;e[10]!==H?(R=()=>{xe("tasks_panel_search_opened"),V(!0),H(!0)},e[10]=H,e[11]=R):R=e[11];const Y=R,[K,W]=O.useState(null),X=l??null;let Q;e[12]!==X||e[13]!==P?(Q={type:P,member:"mine",currentUserId:X},e[12]=X,e[13]=P,e[14]=Q):Q=e[14];const G=Q,q={};F||(q.created_by="me"),p(q);let ae;e[15]!==l?(ae=z=>l?z.filter(ne=>ne.created_by===l):[],e[15]=l,e[16]=ae):ae=e[16];const ie=ae;let J;e[17]!==P?(J=z=>P==="automation"?z.filter(nr):P==="manual"?z.filter(sr):z,e[17]=P,e[18]=J):J=e[18];const le=J,te=ka(le(F?I:ie(I)),S);let se;e[19]!==S||e[20]!==C||e[21]!==l||e[22]!==k||e[23]!==b||e[24]!==d.slug||e[25]!==v||e[26]!==te?(se=z=>{const ne=z.id===S,pe=k(z.id);if(Rs(z.id),!ne)return pe;const be=Pa(te,z.id,l);return C(),be?v(be.id,be.virtual_mcp_id):b({to:"/$org",params:{org:d.slug}}),pe},e[19]=S,e[20]=C,e[21]=l,e[22]=k,e[23]=b,e[24]=d.slug,e[25]=v,e[26]=te,e[27]=se):se=e[27];const re=se;let de;e[28]!==y||e[29]!==i?(de=async z=>{try{await y.call("SANDBOX_DELETE",{virtualMcpId:z.virtualMcpId,branch:z.branch,removeWorktree:!0})}catch{wt.error(i("sidebar.archiveWorktreeDialog.reclaimFailed",{branch:z.branch}))}},e[28]=y,e[29]=i,e[30]=de):de=e[30];const ge=de;let ue;e[31]!==f||e[32]!==re||e[33]!==l||e[34]!==W?(ue=z=>{if(l&&z.created_by&&z.created_by!==l)return;const ne=Ya();if(!ne||Xa(f,ne)){re(z);return}W({task:z,target:ne})},e[31]=f,e[32]=re,e[33]=l,e[34]=W,e[35]=ue):ue=e[35];const Ue=ue;let Ne;e[36]!==re||e[37]!==K||e[38]!==ge||e[39]!==W?(Ne=z=>{const ne=K;ne&&(W(null),(async()=>{for(const pe of Ja(z))if(pe==="archive")try{await re(ne.task)}catch{return}else await ge(ne.target)})())},e[36]=re,e[37]=K,e[38]=ge,e[39]=W,e[40]=Ne):Ne=e[40];const Ke=Ne;let Te;e[41]!==C||e[42]!==v?(Te=z=>{C(),v(z.id,z.virtual_mcp_id)},e[41]=C,e[42]=v,e[43]=Te):Te=e[43];const Ve=Te;let _e;e[44]!==_||e[45]!==S||e[46]!==f||e[47]!==C||e[48]!==x||e[49]!==l||e[50]!==o||e[51]!==c||e[52]!==v?(_e=()=>{const z=_??o;xe("sidebar_new_thread_clicked",{virtual_mcp_id:z}),C();const ne=qs(f,z,l,c(z));if(ne){v(ne.id,ne.virtual_mcp_id);return}const pe=f.find(be=>be.id===S)?.branch??null;x(z,pe)},e[44]=_,e[45]=S,e[46]=f,e[47]=C,e[48]=x,e[49]=l,e[50]=o,e[51]=c,e[52]=v,e[53]=_e):_e=e[53];const We=_e;let fe;e[54]!==g?(fe=()=>{g()},e[54]=g,e[55]=fe):fe=e[55];const qe=A!=="flat"||P!=="all"||F;let me;e[56]!==Ke||e[57]!==K?(me=K?s.jsx(Ca,{branch:K.target.branch,onOutcome:Ke}):null,e[56]=Ke,e[57]=K,e[58]=me):me=e[58];let he;e[59]!==B||e[60]!==L||e[61]!==H?(he=B?s.jsx(_a,{open:L,onOpenChange:H}):null,e[59]=B,e[60]=L,e[61]=H,e[62]=he):he=e[62];let we;return e[63]!==S||e[64]!==Ue||e[65]!==G||e[66]!==A||e[67]!==m||e[68]!==h||e[69]!==We||e[70]!==Y||e[71]!==Ve||e[72]!==D||e[73]!==E||e[74]!==M||e[75]!==F||e[76]!==fe||e[77]!==qe||e[78]!==me||e[79]!==he||e[80]!==P||e[81]!==te?(we={threads:te,activeTaskId:S,filters:G,hasMore:m,isFetchingMore:h,loadMore:fe,groupBy:A,setGroupBy:D,typeFilter:P,setTypeFilter:M,showAll:F,setShowAll:E,filtersActive:qe,selectTask:Ve,archiveTask:Ue,newThread:We,openSearch:Y,reclaimDialog:me,searchDialog:he},e[63]=S,e[64]=Ue,e[65]=G,e[66]=A,e[67]=m,e[68]=h,e[69]=We,e[70]=Y,e[71]=Ve,e[72]=D,e[73]=E,e[74]=M,e[75]=F,e[76]=fe,e[77]=qe,e[78]=me,e[79]=he,e[80]=P,e[81]=te,e[82]=we):we=e[82],we}function sr(t){return!t.trigger_id}function nr(t){return!!t.trigger_id}function ar(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function rr(t){return!t.hidden}function ir(){const t=$.c(60),e=U(),[n,r]=O.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={onNavigate:()=>r(!1)},t[0]=i):i=t[0];const a=tr(i),l=Re()?.activeTask;let d;t[1]!==l?.title||t[2]!==a.activeTaskId||t[3]!==a.threads||t[4]!==e?(d=l?.title||a.threads.find(E=>E.id===a.activeTaskId)?.title||e("tasksPanel.taskRow.untitledTask"),t[1]=l?.title,t[2]=a.activeTaskId,t[3]=a.threads,t[4]=e,t[5]=d):d=t[5];const u=d;let o;t[6]!==a?(o=()=>{r(!1),a.openSearch()},t[6]=a,t[7]=o):o=t[7];const c=o;let f;t[8]!==e?(f=e("chat.threadsMenu.chats"),t[8]=e,t[9]=f):f=t[9];const m=n&&"bg-sidebar-accent";let h;t[10]!==m?(h=Z("flex h-[34px] min-w-0 shrink items-center gap-1.5 rounded-lg px-2 text-sm text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",m),t[10]=m,t[11]=h):h=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(_s,{size:16,className:"shrink-0"}),t[12]=g):g=t[12];let j;t[13]!==u?(j=s.jsx("span",{className:"truncate max-w-[10rem] font-medium",children:u}),t[13]=u,t[14]=j):j=t[14];let k;t[15]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(at,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[15]=k):k=t[15];let p;t[16]!==f||t[17]!==h||t[18]!==j?(p=s.jsx(Oe,{asChild:!0,children:s.jsx(Bt,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":f,className:h,children:[g,j,k]})})}),t[16]=f,t[17]=h,t[18]=j,t[19]=p):p=t[19];let b;t[20]!==e?(b=e("chat.threadsMenu.chats"),t[20]=e,t[21]=b):b=t[21];let y;t[22]!==b?(y=s.jsx(Be,{side:"bottom",children:b}),t[22]=b,t[23]=y):y=t[23];let v;t[24]!==y||t[25]!==p?(v=s.jsxs(ze,{children:[p,y]}),t[24]=y,t[25]=p,t[26]=v):v=t[26];let x;t[27]!==a?(x=s.jsx(ya,{panel:a,className:"size-8"}),t[27]=a,t[28]=x):x=t[28];let T;t[29]!==e?(T=e("sidebar.taskGroupsList.searchChats"),t[29]=e,t[30]=T):T=t[30];let S;t[31]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ws,{size:16}),t[31]=S):S=t[31];let N;t[32]!==c||t[33]!==T?(N=s.jsx(Ae,{"aria-label":T,onClick:c,className:"size-8",children:S}),t[32]=c,t[33]=T,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=s.jsx(Mt,{size:16}),t[37]=w):w=t[37];let C;t[38]!==a.newThread||t[39]!==_?(C=s.jsx(Ae,{"aria-label":_,onClick:a.newThread,className:"size-8",children:w}),t[38]=a.newThread,t[39]=_,t[40]=C):C=t[40];let I;t[41]!==N||t[42]!==C?(I=s.jsxs("div",{className:"flex items-center gap-0.5",children:[N,C]}),t[41]=N,t[42]=C,t[43]=I):I=t[43];let P;t[44]!==x||t[45]!==I?(P=s.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[x,I]}),t[44]=x,t[45]=I,t[46]=P):P=t[46];let M;t[47]!==a?(M=s.jsx("div",{className:"flex max-h-[60vh] min-h-0 flex-col gap-0.5 overflow-y-auto overscroll-contain",children:s.jsx(er,{panel:a})}),t[47]=a,t[48]=M):M=t[48];let A;t[49]!==P||t[50]!==M?(A=s.jsxs(zt,{align:"start",side:"bottom",onOpenAutoFocus:lr,className:"flex w-80 flex-col gap-2 p-2",children:[P,M]}),t[49]=P,t[50]=M,t[51]=A):A=t[51];let D;t[52]!==n||t[53]!==v||t[54]!==A?(D=s.jsxs(Gt,{open:n,onOpenChange:r,children:[v,A]}),t[52]=n,t[53]=v,t[54]=A,t[55]=D):D=t[55];let F;return t[56]!==a.reclaimDialog||t[57]!==a.searchDialog||t[58]!==D?(F=s.jsxs(s.Fragment,{children:[D,a.searchDialog,a.reclaimDialog]}),t[56]=a.reclaimDialog,t[57]=a.searchDialog,t[58]=D,t[59]=F):F=t[59],F}function lr(t){return t.preventDefault()}function or(){const t=$.c(20),e=U(),{threads:n}=lt(),{createNewTask:r}=rt(),i=Ut(),a=Ge();let l;t[0]!==a||t[1]!==n?(l=n.find(k=>k.id===a)?.branch??null,t[0]=a,t[1]=n,t[2]=l):l=t[2];const d=l;let u;t[3]!==i||t[4]!==r||t[5]!==d?(u=()=>{r(i,d)},t[3]=i,t[4]=r,t[5]=d,t[6]=u):u=t[6];const o=u;let c;t[7]!==e?(c=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=c):c=t[8];let f;t[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Mt,{size:16}),t[9]=f):f=t[9];let m;t[10]!==o||t[11]!==c?(m=s.jsx(Oe,{asChild:!0,children:s.jsx("button",{type:"button",onClick:o,"aria-label":c,className:"flex shrink-0 items-center rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:f})}),t[10]=o,t[11]=c,t[12]=m):m=t[12];let h;t[13]!==e?(h=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=h):h=t[14];let g;t[15]!==h?(g=s.jsx(Be,{side:"bottom",children:h}),t[15]=h,t[16]=g):g=t[16];let j;return t[17]!==m||t[18]!==g?(j=s.jsxs(ze,{children:[m,g]}),t[17]=m,t[18]=g,t[19]=j):j=t[19],j}function cr(t){const e=$.c(14),{virtualMcp:n}=t,r=U(),i=Lt(),{navigateToTask:a}=gs(),{create:l}=ot();let d,u;if(e[0]!==i||e[1]!==l||e[2]!==a||e[3]!==r||e[4]!==n){u=Symbol.for("react.early_return_sentinel");e:{const o=zs(n,i);if(!o){u=null;break e}const c=o.mode==="dev";let f;e[7]!==l||e[8]!==a?(f=async p=>{const b=crypto.randomUUID();try{await l({id:b,virtual_mcp_id:p})}catch{}a(b,{virtualMcpId:p})},e[7]=l,e[8]=a,e[9]=f):f=e[9];const m=f,h=(p,b,y)=>s.jsxs("button",{type:"button","aria-pressed":b,"aria-label":p,title:p,onClick:()=>{b||m(o.targetId)},className:Z("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg transition-colors",b?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[s.jsx(y,{className:"size-3.5 shrink-0"}),s.jsx("span",{className:"@max-3xl/panel-header:hidden",children:p})]});let g;e[10]!==r?(g=r("devAgent.devAgentControl.develop"),e[10]=r,e[11]=g):g=e[11];const j=h(g,c,Cs);let k;e[12]!==r?(k=r("devAgent.devAgentControl.live"),e[12]=r,e[13]=k):k=e[13],d=s.jsxs("div",{className:"inline-flex items-center rounded-lg border border-border bg-muted p-0.5 text-xs font-medium",children:[j,h(k,!c,Mn)]})}e[0]=i,e[1]=l,e[2]=a,e[3]=r,e[4]=n,e[5]=d,e[6]=u}else d=e[5],u=e[6];return u!==Symbol.for("react.early_return_sentinel")?u:d}function dr(t){const e=$.c(16),{virtualMcpId:n,taskId:r}=t,{openPanel:i}=Vt();let a;e[0]!==r||e[1]!==n?(a={virtualMcpId:n,taskId:r},e[0]=r,e[1]=n,e[2]=a):a=e[2];const{tabs:l,activeTab:d,mainOpen:u}=Wt(a);if(l.length===0)return null;let o;if(e[3]!==d||e[4]!==u||e[5]!==i||e[6]!==l||e[7]!==n){let f;e[9]!==d||e[10]!==u||e[11]!==i||e[12]!==n?(f=m=>{const h=m.id==="automations"?rs({activeTab:d,mainOpen:u}):u&&m.id===d;return s.jsxs(dt.Tab,{active:h,onClick:()=>{h||(xe("main_panel_tab_clicked",{virtual_mcp_id:n,tab_id:m.id,tab_kind:m.kind,was_active:!1}),i(m.id))},children:[s.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:s.jsx(Ie,{icon:m.icon})}),m.title]},m.id)},e[9]=d,e[10]=u,e[11]=i,e[12]=n,e[13]=f):f=e[13],o=l.map(f),e[3]=d,e[4]=u,e[5]=i,e[6]=l,e[7]=n,e[8]=o}else o=e[8];let c;return e[14]!==o?(c=s.jsx(dt.Tabs,{"data-tour":Es.surfaceTabs,children:o}),e[14]=o,e[15]=c):c=e[15],c}function ur(t){return{threadId:t.routeThreadId,providerKey:t.routeThreadId??t.fallbackKey}}const Je="__mobile-main-panel-tab-select__",tt="main";function fr({tabs:t,activeTab:e,mainOpen:n,t:r}){const i=t.find(l=>l.id===e),a=r("mainPanelTabs.mobileMainPanelTabSelect.mainView");return n?i?.title??a:i?.title??t[0]?.title??a}const mr={kind:"component",Component:Ps},hr={kind:"component",Component:As},pr={kind:"component",Component:Ln},xr={kind:"component",Component:Dn};function gr({tabs:t,overlayEnabled:e,t:n}){return[{value:"chat",title:n("mainPanelTabs.mobileMainPanelTabSelect.chat"),icon:mr},...t.length>0?t.map(r=>({value:r.id,title:r.title,icon:r.icon})):[{value:tt,title:n("mainPanelTabs.mobileMainPanelTabSelect.mainView"),icon:xr}],...e?[{value:"board",title:n("mainPanelTabs.mobileMainPanelTabSelect.tasks"),icon:hr},{value:"files",title:n("mainPanelTabs.mobileMainPanelTabSelect.library"),icon:pr}]:[]]}function br(t){const e=$.c(53),{virtualMcpId:n,taskId:r}=t,i=U(),a=De(),{openPanel:l}=Vt();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},e[0]=d):d=e[0];const u=Se(d);let o;e[1]!==r||e[2]!==n?(o={virtualMcpId:n,taskId:r},e[1]=r,e[2]=n,e[3]=o):o=e[3];const{tabs:c,activeTab:f,mainOpen:m}=Wt(o),{org:h}=oe(),g=On();let j;e[4]!==h.id?(j=ut(h.id),e[4]=h.id,e[5]=j):j=e[5];const k=n===j;let p,b,y,v,x,T,S,N,_,w;if(e[6]!==f||e[7]!==m||e[8]!==a||e[9]!==k||e[10]!==l||e[11]!==h.id||e[12]!==u.org||e[13]!==u.taskId||e[14]!==g||e[15]!==i||e[16]!==c||e[17]!==n){v=Symbol.for("react.early_return_sentinel");e:{const P=gr({tabs:c,overlayEnabled:!!(u.org&&u.taskId),t:i}),M=m?P.find(R=>R.value===f)?.value??tt:"chat",A=P.find(R=>R.value===M),D=A?.title??fr({tabs:c,activeTab:f,mainOpen:m,t:i});let F;e[28]!==a?(F=R=>{a({to:".",search:Y=>({...Y,...sn(R)}),replace:!0})},e[28]=a,e[29]=F):F=e[29];const E=F;let L;e[30]!==k||e[31]!==l||e[32]!==h.id||e[33]!==g||e[34]!==E||e[35]!==n?(L=R=>{if(R!==Je){if(xe("main_panel_tab_clicked",{virtual_mcp_id:n,tab_id:R,source:"mobile_select"}),Os({reportsOnly:g,onReportAgent:k,tabId:R})){l(R,{virtualmcpid:ut(h.id),search:yr});return}if(R==="chat"||R===tt){E(R==="chat"?"chat":"main");return}l(R,{search:jr})}},e[30]=k,e[31]=l,e[32]=h.id,e[33]=g,e[34]=E,e[35]=n,e[36]=L):L=e[36];const H=L,B=P.find(R=>R.value!==M);if(P.length===2&&B){v=s.jsxs("button",{type:"button",onClick:()=>H(B.value),"aria-label":i("mainPanelTabs.mobileMainPanelTabSelect.switchTo",{name:B.title}),className:"flex h-10 min-w-0 max-w-[7.5rem] items-center gap-1.5 rounded-lg px-1.5 text-xs text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(Ie,{icon:B.icon,className:"size-5"})}),s.jsx("span",{className:"min-w-0 truncate",children:B.title})]});break e}b=Rn,_=Je,w=H;let V;e[37]!==i?(V=i("mainPanelTabs.mobileMainPanelTabSelect.view"),e[37]=i,e[38]=V):V=e[38],y=s.jsx(Fn,{"aria-label":V,className:"h-10! w-full min-w-0 max-w-[7.5rem] rounded-lg border-0 bg-transparent px-1.5 text-xs shadow-none [--card-shadow:none]",children:s.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[A&&s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(Ie,{icon:A.icon,className:"size-5"})}),s.jsx("span",{className:"min-w-0 truncate",children:D})]})}),p=En,x="end",T="w-56",e[39]!==D?(S=s.jsx(qt,{value:Je,disabled:!0,hideCheck:!0,className:"hidden",children:D}),e[39]=D,e[40]=S):S=e[40],N=P.map(vr)}e[6]=f,e[7]=m,e[8]=a,e[9]=k,e[10]=l,e[11]=h.id,e[12]=u.org,e[13]=u.taskId,e[14]=g,e[15]=i,e[16]=c,e[17]=n,e[18]=p,e[19]=b,e[20]=y,e[21]=v,e[22]=x,e[23]=T,e[24]=S,e[25]=N,e[26]=_,e[27]=w}else p=e[18],b=e[19],y=e[20],v=e[21],x=e[22],T=e[23],S=e[24],N=e[25],_=e[26],w=e[27];if(v!==Symbol.for("react.early_return_sentinel"))return v;let C;e[41]!==p||e[42]!==x||e[43]!==T||e[44]!==S||e[45]!==N?(C=s.jsxs(p,{align:x,className:T,children:[S,N]}),e[41]=p,e[42]=x,e[43]=T,e[44]=S,e[45]=N,e[46]=C):C=e[46];let I;return e[47]!==b||e[48]!==y||e[49]!==C||e[50]!==_||e[51]!==w?(I=s.jsxs(b,{value:_,onValueChange:w,children:[y,C]}),e[47]=b,e[48]=y,e[49]=C,e[50]=_,e[51]=w,e[52]=I):I=e[52],I}function vr(t){return s.jsx(qt,{value:t.value,children:s.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(Ie,{icon:t.icon})}),s.jsx("span",{className:"min-w-0 truncate",children:t.title})]})},t.value)}function jr(t){return{...t,sidepanel:!1}}function yr(t){return{...t,thread:void 0,sidepanel:!1}}function kr(t,e,n){const r=$.c(33),i=it(),{locator:a}=oe(),l=O.useSyncExternalStore(i.threads.subscribe,i.threads.get),d=O.useSyncExternalStore(i.threadsStatus.subscribe,i.threadsStatus.get);let u;r[0]!==t||r[1]!==l?(u=t===null?null:l.find(x=>x.id===t&&!x.partial)??null,r[0]=t,r[1]=l,r[2]=u):u=r[2];const o=u,[c,f]=O.useState(void 0),[m,h]=O.useState(t);m!==t&&(h(t),f(void 0));let g,j;r[3]!==c||r[4]!==t||r[5]!==o||r[6]!==i||r[7]!==d.kind?(g=()=>{t!==null&&(o||d.kind!=="loading"&&c===void 0&&(f("pending"),i.fetchThreadIntoSlot(t).then(x=>{f(x)})))},j=[t,o,d.kind,c,i],r[3]=c,r[4]=t,r[5]=o,r[6]=i,r[7]=d.kind,r[8]=g,r[9]=j):(g=r[8],j=r[9]),O.useEffect(g,j);let k;r[10]!==n||r[11]!==a||r[12]!==i||r[13]!==e?(k={mutationFn:async x=>i.create({id:x,virtual_mcp_id:e,...n?{branch:n}:{},...Vs(sessionStorage,a,x)})},r[10]=n,r[11]=a,r[12]=i,r[13]=e,r[14]=k):k=r[14];const p=is(k);let b,y;if(r[15]!==p||r[16]!==c||r[17]!==t||r[18]!==o||r[19]!==d.kind?(b=()=>{t!==null&&(o||c===null&&d.kind!=="loading"&&(p.isPending||p.variables!==t&&p.mutate(t)))},y=[t,o,c,d.kind,p],r[15]=p,r[16]=c,r[17]=t,r[18]=o,r[19]=d.kind,r[20]=b,r[21]=y):(b=r[20],y=r[21]),O.useEffect(b,y),t===null){let x;return r[22]===Symbol.for("react.memo_cache_sentinel")?(x={status:"ready",task:null},r[22]=x):x=r[22],x}if(o){let x;return r[23]!==o?(x={status:"ready",task:o},r[23]=o,r[24]=x):x=r[24],x}if(c&&typeof c=="object"){let x;return r[25]!==c?(x={status:"ready",task:c},r[25]=c,r[26]=x):x=r[26],x}if(p.data){let x;return r[27]!==p.data?(x={status:"ready",task:p.data},r[27]=p.data,r[28]=x):x=r[28],x}if(p.isError){let x;return r[29]!==p.error?(x={status:"error",error:p.error},r[29]=p.error,r[30]=x):x=r[30],x}if(p.isPending||d.kind!=="loading"){let x;return r[31]===Symbol.for("react.memo_cache_sentinel")?(x={status:"creating"},r[31]=x):x=r[31],x}let v;return r[32]===Symbol.for("react.memo_cache_sentinel")?(v={status:"loading"},r[32]=v):v=r[32],v}function Sr(t){const e=$.c(13),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=Se(r);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const l=Fe(a);let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d={select:Nr},e[2]=d):d=e[2];const u=ls(d),{org:o}=oe();let c;e[3]!==o||e[4]!==i.agentId||e[5]!==i.legacyView||e[6]!==i.org||e[7]!==u||e[8]!==l?(c=i.org?os({pathname:u,org:i.org,pathAgentId:i.agentId,pathLegacyView:i.legacyView,fallbackAgentId:ke(o.id).id,search:l}):null,e[3]=o,e[4]=i.agentId,e[5]=i.legacyView,e[6]=i.org,e[7]=u,e[8]=l,e[9]=c):c=e[9];const f=c;let m;return e[10]!==n||e[11]!==f?(m=f?s.jsx(ct,{target:f}):n,e[10]=n,e[11]=f,e[12]=m):m=e[12],m}function Nr(t){return t.matches.at(-1)?.pathname??t.location.pathname}function Tr(){const t=$.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const n=Se(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const i=Fe(r),{org:a}=oe(),{org:l,taskId:d}=n;if(!l||d===void 0)return null;let u;return t[2]!==l||t[3]!==a.id||t[4]!==i||t[5]!==d?(u=cs({org:l,taskId:d,fallbackAgentId:ke(a.id).id,search:i}),t[2]=l,t[3]=a.id,t[4]=i,t[5]=d,t[6]=u):u=t[6],u}function _r(){const t=$.c(2),e=Tr();let n;return t[0]!==e?(n=e?s.jsx(ct,{target:e}):null,t[0]=e,t[1]=n):n=t[1],n}function wr(){const t=$.c(6),e=zn(),n=De();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const{preview:i}=Fe(r);if(!e||!i)return null;let a;t[1]!==n?(a=()=>n({to:".",search:Cr}),t[1]=n,t[2]=a):a=t[2];let l;return t[3]!==i||t[4]!==a?(l=s.jsx(Gn,{previewPath:i,onClose:a,showSeeInLibrary:!0}),t[3]=i,t[4]=a,t[5]=l):l=t[5],l}function Cr(t){const{preview:e,...n}=t;return n}const Pr=O.createContext(null);function ts(){return O.useContext(Pr)}function Ar(t){const e=$.c(13),{children:n}=t,r=U(),i=Yt(),a=ts(),l=Ge()!==null;let d;e[0]!==l||e[1]!==i||e[2]!==a?(d=s.jsx(ba,{}),e[0]=l,e[1]=i,e[2]=a,e[3]=d):d=e[3];const u=d;let o;e[4]!==r?(o=r("agentShellLayout.agentShellLayout.chatLoadingError"),e[4]=r,e[5]=o):o=e[5];let c;e[6]!==o?(c=s.jsx("div",{role:"alert",className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:o}),e[6]=o,e[7]=c):c=e[7];const f=n??u;let m;e[8]!==f?(m=s.jsx(Le,{children:f}),e[8]=f,e[9]=m):m=e[9];let h;return e[10]!==c||e[11]!==m?(h=s.jsx(St,{fallback:c,children:m}),e[10]=c,e[11]=m,e[12]=h):h=e[12],h}function Ir(t){const e=$.c(13),{threadId:n,children:r}=t;if(U(),ts(),n===null){let a;return e[0]!==r?(a=s.jsx(ee.ThreadlessProvider,{children:r}),e[0]=r,e[1]=a):a=e[1],a}let i;return e[10]!==r||e[11]!==n?(i=s.jsx(ee.ActiveTaskProvider,{taskId:n,children:r}),e[10]=r,e[11]=n,e[12]=i):i=e[12],i}function Mr(t){const e=$.c(3),{onNewTaskRef:n,createNewTask:r}=t;let i;return e[0]!==r||e[1]!==n?(i=()=>(n.current=r,()=>{n.current=null}),e[0]=r,e[1]=n,e[2]=i):i=e[2],O.useLayoutEffect(i),null}function Lr({virtualMcpId:t,hasActiveGithubRepo:e,sandboxMap:n,children:r}){const i=U(),{currentBranch:a,activeTask:l,setCurrentTaskBranch:d}=Ee(),u=Yt(),o="agent-sandbox",{data:c}=$e.useSession(),f=c?.user?.id,m=!bs({isDesktopApp:u,harnessId:l?.harness_id}),h=Xs({agentSandboxMap:n,threadSandboxMap:l?.metadata?.sandboxMap,userId:f,ownerId:l?.created_by,branch:a}),g=e||Gs(l?.metadata),j=O.useRef(null),k=m&&Zs({threadLoaded:!!l,isOwner:!!f&&l?.created_by===f,hasActiveGithubRepo:g,branch:a??null,attempted:j.current===(l?.id??null)});O.useEffect(()=>{!k||!l||(j.current=l.id,d(Dt(c?.user?.name||c?.user?.email?.split("@")[0])))},[k,l,c,d]);const p=It(t),b=ce(t),y=Rt(b,a),{releases:v,createRelease:x}=Hs(t),S=!!f&&l?.created_by===f&&!!a&&a!==y&&!v.some(A=>A.branch===a),N=O.useRef(null);O.useEffect(()=>{!S||!a||N.current!==a&&(N.current=a,x({branch:a,name:Ks(v,i("thread.branchPicker.defaultVersionName")),color:Us(v.length),createdBy:f,createdAt:new Date().toISOString()}).catch(()=>{}))},[S,a,v,x,f,i]);const _=p.resolved?p.runtime:null,w=Qs(t,a??void 0),I=(f&&a?Un(h?.[f]?.[a]):{})[o]??null,P=I?.previewUrl??null,M=m&&_!=="cms"&&(!!I||w);return m?_==="cms"?s.jsx(pt,{children:r},`${t}:${a??"no-branch"}:${l?.id??""}`):s.jsx(Js,{virtualMcpId:t,branch:a??null,previewUrl:P,enabled:M,children:s.jsx(en,{executionEnabled:m,virtualMcpId:t,branch:a??null,userId:f??null,hasActiveGithubRepo:g,vmEntry:I,threadId:l?.id??null,children:s.jsx(pt,{children:r},`${t}:${a??"no-branch"}:${l?.id??""}`)})},l?.id??"no-thread"):s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsx("div",{className:"flex h-full rounded-[0.75rem] bg-background card-shadow",children:s.jsx(Et,{image:s.jsx(nt,{size:48,className:"text-muted-foreground"}),title:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWeb"),description:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWebDescription")})})})}function $r(){const t=$.c(16),e=U(),{toggleSidebar:n}=hs(),{virtualMcpId:r,taskId:i}=Ee();let a;t[0]!==e?(a=e("layouts.shellControls.toggleSidebar"),t[0]=e,t[1]=a):a=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ms,{size:16}),t[2]=l):l=t[2];let d;t[3]!==a||t[4]!==n?(d=s.jsx(Ae,{className:"md:hidden",onClick:n,"aria-label":a,children:l}),t[3]=a,t[4]=n,t[5]=d):d=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ir,{}),t[6]=u):u=t[6];let o;t[7]!==d?(o=s.jsxs(Ye.Topbar.Left,{children:[d,u]}),t[7]=d,t[8]=o):o=t[8];let c;t[9]!==i||t[10]!==r?(c=s.jsx("div",{className:"min-w-0 md:hidden",children:s.jsx(br,{virtualMcpId:r,taskId:i})}),t[9]=i,t[10]=r,t[11]=c):c=t[11];let f;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ye.Topbar.Right,{className:"shrink-0",children:s.jsx(or,{})}),t[12]=f):f=t[12];let m;return t[13]!==o||t[14]!==c?(m=s.jsxs(Ye.Topbar,{className:"border-b border-border/60 px-3",children:[o,c,f]}),t[13]=o,t[14]=c,t[15]=m):m=t[15],m}function Dr(t){const e=$.c(18),{layout:n,onNewTaskRef:r,createNewTask:i}=t,{virtualMcpId:a,taskId:l}=Ee(),d=ce(a),u=$n()??"overview";let o;e[0]!==i||e[1]!==r?(o=s.jsx(Mr,{onNewTaskRef:r,createNewTask:i}),e[0]=i,e[1]=r,e[2]=o):o=e[2];let c;e[3]!==l||e[4]!==a?(c=s.jsx(dr,{virtualMcpId:a,taskId:l}),e[3]=l,e[4]=a,e[5]=c):c=e[5];let f;e[6]!==d?(f=d&&s.jsx(cr,{virtualMcp:d}),e[6]=d,e[7]=f):f=e[7];let m,h;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ht.Thread,{topbar:s.jsx($r,{}),children:s.jsx(Ar,{})}),h=s.jsx(Ct,{}),e[8]=m,e[9]=h):(m=e[8],h=e[9]);let g;e[10]!==u||e[11]!==n||e[12]!==c||e[13]!==f?(g=s.jsxs(ht,{...n,contentKey:u,contentNavigation:c,contentActions:f,children:[m,h]}),e[10]=u,e[11]=n,e[12]=c,e[13]=f,e[14]=g):g=e[14];let j;return e[15]!==o||e[16]!==g?(j=s.jsxs(s.Fragment,{children:[o,g]}),e[15]=o,e[16]=g,e[17]=j):j=e[17],j}function Fr(){const t=U(),e=De(),n=on(),{create:r}=ot(),{org:i}=oe(),l=Se({strict:!1}).org??"",d=Fe({strict:!1}),u=Ge(),o=Ut(),c=Ht(),[f]=O.useState(()=>crypto.randomUUID()),{data:m}=$e.useSession(),[h]=O.useState(()=>Dt(m?.user?.name||m?.user?.email?.split("@")[0])),g=it(),j=O.useSyncExternalStore(g.threads.subscribe,g.threads.get),k=O.useSyncExternalStore(g.threadsStatus.subscribe,g.threadsStatus.get),p=ce(o),b=!!(p&&Ot(p)),y=Rt(p,null),v=kr(u,o,h);va(v.status==="ready"?v.task:null);const x=p?.metadata?.ui?.layout??null,T=x?{defaultMainView:x.defaultMainView??null,chatDefaultOpen:x.chatDefaultOpen??null}:null,S=nn(T),{threadId:N,providerKey:_}=ur({routeThreadId:u,fallbackKey:f}),w=async()=>{const M=crypto.randomUUID(),A=j.find(D=>D.id===N)?.branch??null;try{await r({id:M,virtual_mcp_id:o,...A?{branch:A}:{}})}catch{}n(M,()=>({}))},C=O.useRef(null);O.useEffect(()=>{const M=A=>{Bs(A)&&A.shiftKey&&A.code==="KeyS"&&!A.repeat&&(A.preventDefault(),C.current?.())};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[]);const I=v.status==="ready"?v.task:null,P=I?.virtual_mcp_id;if(I&&P&&!cn({routeAgentId:o,threadAgentId:P})){const M=ds({org:l,agentId:P,superAgentId:ke(i.id).id});return s.jsx(ct,{target:{route:M,search:{thread:I.id,sidepanel:d.sidepanel,mainpanel:d.mainpanel,autosend:d.autosend}}})}if(u===null&&c&&p){if(k.kind==="loading")return s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background card-shadow rounded-[0.75rem] text-sm text-muted-foreground",children:[s.jsx(je,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})});const A=Ys(j,o,m?.user?.id,Ft(p.metadata),b,{baseBranch:y})?.id??(b?f:null);if(A)return s.jsx(us,{to:".",replace:!0,search:D=>({...D,thread:A})})}return v.status==="creating"||v.status==="loading"?s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background card-shadow rounded-[0.75rem] text-sm text-muted-foreground",children:[s.jsx(je,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})}):v.status==="error"?s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"alert",className:"flex flex-col h-full items-center justify-center gap-2 bg-background card-shadow rounded-[0.75rem] p-8 text-sm",children:[s.jsx("div",{className:"font-medium",children:t("agentShellLayout.agentShellLayout.taskUnavailable")}),s.jsx("div",{className:"text-muted-foreground",children:v.error.message})]})}):p?s.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:s.jsx(ee.Provider,{virtualMcpId:o,task:v.status==="ready"?v.task:null,children:s.jsx(Lr,{virtualMcpId:o,hasActiveGithubRepo:b,sandboxMap:p.metadata?.sandboxMap,children:s.jsx(Ir,{threadId:N,children:s.jsx(Le,{children:s.jsx(Dr,{layout:S,onNewTaskRef:C,createNewTask:w})})},_)})},o)}):s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:s.jsx(Et,{image:s.jsx(nt,{size:48,className:"text-muted-foreground"}),title:t("agentShellLayout.agentShellLayout.agentNotFound"),description:t("agentShellLayout.agentShellLayout.agentNotFoundDescription",{virtualMcpId:o}),actions:s.jsx(fs,{variant:"outline",onClick:()=>e({to:"/$org",params:{org:l}}),children:t("agentShellLayout.agentShellLayout.goToOrgHome")})})})})}function Ho(){const t=$.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const n=Se(e);if(n.taskId!==void 0){let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(_r,{}),t[1]=i):i=t[1],i}if(n._splat!==void 0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ct,{}),t[2]=i):i=t[2],i}let r;return t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Le,{children:s.jsx(Sr,{children:s.jsx(Bn,{children:s.jsxs(Hn,{children:[s.jsx(Fr,{}),s.jsx(wr,{})]})})})}),t[3]=r):r=t[3],r}export{Ho as default};
|
|
1
|
+
import{c as $,b as U,r as O,l as Z,j as s,h as je,X as oe,ar as ke,aq as Le,E as St,a as $e,K as Nt,m as Tt,q as xe,a3 as st,as as ss,at as ns,U as _t,t as wt,ak as as,d as De,n as dt,au as rs,f as Se,C as ut,e as is,u as Fe,k as ls,av as os,aw as cs,O as Ct,ax as ds,N as us,B as fs,P as Ye}from"./index-K4Vfh2kg.js";import{i as nt}from"./AlertCircle-BQVXEKUc.js";import{i as ms}from"./LayoutLeft-CZkz1jNL.js";import{u as hs}from"./use-in-settings-DTfVU5gG.js";import{T as Ae}from"./toolbar-icon-button-B_lHRucJ.js";import{C as ee,w as ps}from"./index-wc3LsJ73.js";import{u as Re,a as Pt,b as Ee,c as At,d as xs,e as gs,s as bs}from"./chat-context-IHDWgDQ6.js";import{u as It}from"./use-session-runtime-epDsfla0.js";import{u as vs}from"./use-ai-providers-zjIftbuA.js";import{i as js}from"./CheckCircle-CflfIWoL.js";import{q as ys,r as ft,A as ye,u as ks,v as Ss,w as Ns,x as Ts,y as _s,z as ws,B as Mt,C as Cs,D as Ps,n as As}from"./agent-icon-DZc84vtW.js";import{s as mt}from"./XClose-DJgtnkEc.js";import{a as ce,b as Lt}from"./use-virtual-mcp-gM6wRQv6.js";import{I as $t}from"./integration-icon-DrJdUHVx.js";import{b as Is}from"./use-entitlements-OYbyxqXu.js";import{t as at}from"./ChevronUp-BYWuf4SY.js";import{O as Ms}from"./pair-Bs4OFZd1.js";import{u as Ls,a as $s}from"./use-thread-outputs-CfLMzkB9.js";import{u as Ds}from"./use-deco-credits-Bbxg62mu.js";import{a as rt,b as Fs,f as Rs,L as Es,s as Os,c as Bs}from"./shell-layout-BbZrykxM.js";import{f as zs,b as Gs}from"./use-project-scope-CdGBXW9U.js";import{g as Dt,u as Hs,n as Us,a as Ks}from"./use-releases-DRDVY8Xc.js";import{d as Ft,c as Vs}from"./thread-intent-DxlkHtay.js";import{u as Ws,a as it,b as lt,c as ot}from"./hooks-ClyBk0k_.js";import{f as qs,a as Rt,b as Ys}from"./use-navigate-to-agent-DYgqDFZF.js";import{o as Xs,s as Zs,u as Qs,S as Js,a as en}from"./sandbox-lifecycle-context-DDvqjx4F.js";import{E as Et}from"./empty-state-Da-fHzIT.js";import{t as tn,m as sn,u as nn}from"./thread-button-EQmrPg3s.js";import{g as Ot}from"./github-repo-B15wwZ1g.js";import{ChatLayout as ht}from"./index-CyuU6yZd.js";import{a as Bt,b as zt,P as Gt}from"./popover-BhNcAD5X.js";import{T as Oe,a as Be,c as ze}from"./tooltip-Cy80lI1Y.js";import{T as an,a as rn}from"./toggle-group-NfZmEEmD.js";import{u as Ht,a as Ge,r as ln,b as Ut,c as on,d as cn}from"./thread-route-TxjlZd1E.js";import{d as dn,h as un,c as fn,b as mn,D as hn}from"./dialog-Cz2_YOoM.js";import{c as pn,C as xn,a as gn,b as bn,e as vn,d as jn}from"./command-Dz5qWruW.js";import{i as Kt}from"./Zap-DHslHQ0t.js";import{A as yn,a as kn,b as Sn,c as Nn,g as Tn,d as _n,e as wn,f as Cn}from"./alert-dialog-Cp1oRtvU.js";import{g as Pn,S as An}from"./task-status-CxrGIdHQ.js";import{a as In}from"./format-time-BtXRrtv4.js";import{i as Mn,a as Ln}from"./Share07-CmuXKCN5.js";import{a as Vt,u as $n}from"./use-panel-navigate-BqFBzSWd.js";import{u as Wt}from"./use-main-panel-tabs-DCZX5mxy.js";import{T as Ie}from"./tab-icon-glyph-BJ5K3vOh.js";import{i as Dn}from"./UserSquare-C7TikGGO.js";import{b as Fn,c as qt,S as Rn,d as En}from"./select-DxOzi3UD.js";import{u as On}from"./use-organization-settings-CY6osCto.js";import{L as ct,a as Bn}from"./legacy-main-redirect-COndmWyH.js";import{u as zn}from"./use-mobile-rtsj2MZ1.js";import{L as Gn}from"./preview-dialog-uefldvQJ.js";import{O as Hn}from"./org-file-open-context-Cej-kKNF.js";import{B as pt}from"./blocks-preview-workspace-context-C6-ILFRy.js";import{u as Yt}from"./use-is-desktop-app-BNujXJc_.js";import{p as Un}from"./virtual-mcp-BLyxO2qI.js";import"./sheet-AhK1Q4GA.js";import"./X-CRCA8SGk.js";import"./ArrowUp-MMes236V.js";import"./gateway-client-C_Ex0ISa.js";import"./drawer-BVbxEc-U.js";import"./collection-search-66MPCgMJ.js";import"./SearchMd-v8QAVRjQ.js";import"./use-mcp-client-CR19JjtG.js";import"./auth-DewE0vsZ.js";import"./use-mcp-prompts-C9ZSqhtN.js";import"./index-XQdvud1d.js";import"./form-BFyytVo6.js";import"./label-CbL3uHGW.js";import"./input-CjG0yUIG.js";import"./utils-CVEq3hMx.js";import"./input-JwI18_DS.js";import"./autosend-BOLn22FP.js";import"./chat-draft-bxwRcHk2.js";import"./ArrowRight-DVxyJd1l.js";import"./Check-DjwzpZIC.js";import"./Image01-Bed8faGM.js";import"./Upload01-Cu-9L0qW.js";import"./Copy01-CjQc-Ykz.js";import"./ArrowLeft-BeFq6jod.js";import"./usage-stats-B-kd-KGd.js";import"./use-copy-CCt9uq_y.js";import"./markdown-DOZYcDNd.js";import"./Eye-CEZdPSLz.js";import"./ZoomOut-DIggrZVG.js";import"./tabs-CgudHfJv.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-1mXCzVjQ.js";import"./decopilot-OImya6-h.js";import"./checkbox-WzAY3JJD.js";import"./Tool01-Bdvuj8zb.js";import"./Key01-DDYGtlfn.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-Ah5De9w0.js";import"./avatar-BXB8p0uZ.js";import"./User01-DaLqt8Zu.js";import"./download-app-dialog-CLcZY4uQ.js";import"./index-D6fwXcTM.js";import"./input-DfvZ3ikK.js";import"./suggestion-D2LW2rth.js";import"./use-org-fs-mfYIenam.js";import"./Link01-BbIArCE_.js";import"./Plus-BICk297J.js";import"./question-004-sINsf4GQ.js";import"./use-members-DGHnBAVp.js";import"./use-org-auth-client-Dq37iZE-.js";import"./feature-paywall-D6H1XrEk.js";import"./plan-ladder-8vg2rlwa.js";import"./add-connection-dialog-CvOk-16j.js";import"./extract-connection-data-BvsecQuq.js";import"./metadata-D72DunRR.js";import"./connection-D_Ad-k2g.js";import"./connection-card-D84FLYUf.js";import"./useInfiniteQuery-Bdkrqs8P.js";import"./infiniteQueryObserver-DrFl4m2S.js";import"./connection-slug-CITJ0kGN.js";import"./slugify-CEUa2lfQ.js";import"./textarea-C4Fl7vcj.js";import"./use-connection-DT6Y_sWB.js";import"./connection-form-helpers-5k0v0Re8.js";import"./Trash01-B5wUzx2c.js";import"./authenticate-and-persist-oauth-C0spMpLN.js";import"./mcp-oauth-BTDQqGE0.js";import"./collection-tabs-PNDYs7Tm.js";import"./badge-L3Pfb7lT.js";import"./use-infinite-scroll-CitEQv_Q.js";import"./useSuspenseInfiniteQuery-6_TWTeTT.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-C-TjDtpG.js";import"./Globe04-t1_NZ4S5.js";import"./CreditCard01-Cl8DBAML.js";import"./DotsVertical-BV4Cp92F.js";import"./LinkExternal01-DpNDkCnx.js";import"./Sun-DTRl56RH.js";import"./Palette-ChnBuAtH.js";import"./Users01-BGfUl9Z9.js";import"./collapsible-BKe2_9O7.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DRfDWjg6.js";import"./types-mQyngwgP.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./file-type-icon-DnKDJ8Kn.js";import"./project-icon-BK7It3uv.js";import"./required-auth-layout-q7AyqreJ.js";import"./use-org-sso-C8N9NZ6V.js";import"./serial-task-queue-CGOeQgpr.js";import"./backoff-8mStPHYB.js";import"./task-board-Bc_5nEh1.js";import"./schema-OZ6y31ku.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-route-default-main-CG99dur1.js";import"./resizable-D5h_i3Cv.js";import"./route-page-header-D2v-N63X.js";import"./index-Dhz79JsH.js";import"./index-D7HYUfJC.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-tools-NQLn3o-8.js";import"./resolve-tab-icon-BRqSZn8F.js";import"./use-task-metadata-B625VJsm.js";import"./use-project-native-view-presence-7vj8rIc7.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-C3rsyIax.js";import"./site-slug-DebpOoQq.js";import"./preview-content-D9TR_OCi.js";import"./file-preview-BCzcW5IM.js";import"./utils-D2l1844I.js";import"./editor-zQPoF7nF.js";import"./file-share-button-BCbyDdG4.js";function Kn({isThreadLocked:t,hasCloudProviderKeys:e}){return t?!1:!e}function Vn(){const t=$.c(3),e=vs(),r=Re()?.isThreadLocked??!1,i=e.length>0;let a;return t[0]!==r||t[1]!==i?(a=Kn({isThreadLocked:r,hasCloudProviderKeys:i}),t[0]=r,t[1]=i,t[2]=a):a=t[2],a}function ve(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function Xe(t){if(!t)return"—";const e=typeof t=="string"?new Date(t):t;return isNaN(e.getTime())?"—":e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function Wn(t){return t?t.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function qn(t){const e=$.c(4),{items:n}=t;let r;e[0]!==n?(r=n.map(Yn),e[0]=n,e[1]=r):r=e[1];let i;return e[2]!==r?(i=s.jsx("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6",children:r}),e[2]=r,e[3]=i):i=e[3],i}function Yn(t){return s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[s.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.label}),s.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:t.value})]},t.label)}function Xn(t){const e=$.c(33),{userTokens:n,assistantTokens:r,otherTokens:i}=t,a=U(),l=n+r+i,d=l>0?n/l*100:0,u=l>0?r/l*100:0,o=l>0?i/l*100:0;let c;e[0]!==d?(c=d>0&&s.jsx("div",{className:"h-full bg-chart-1",style:{width:`${d}%`}}),e[0]=d,e[1]=c):c=e[1];let f;e[2]!==u?(f=u>0&&s.jsx("div",{className:"h-full bg-chart-2",style:{width:`${u}%`}}),e[2]=u,e[3]=f):f=e[3];let m;e[4]!==o?(m=o>0&&s.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${o}%`}}),e[4]=o,e[5]=m):m=e[5];let h;e[6]!==c||e[7]!==f||e[8]!==m?(h=s.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[c,f,m]}),e[6]=c,e[7]=f,e[8]=m,e[9]=h):h=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=g):g=e[10];let j;e[11]!==a||e[12]!==d?(j=a("chat.contextPanel.userPercent",{pct:d.toFixed(1)}),e[11]=a,e[12]=d,e[13]=j):j=e[13];let k;e[14]!==j?(k=s.jsxs("div",{className:"flex items-center gap-1.5",children:[g,s.jsx("span",{className:"text-xs text-muted-foreground",children:j})]}),e[14]=j,e[15]=k):k=e[15];let p;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[16]=p):p=e[16];let b;e[17]!==u||e[18]!==a?(b=a("chat.contextPanel.assistantPercent",{pct:u.toFixed(1)}),e[17]=u,e[18]=a,e[19]=b):b=e[19];let y;e[20]!==b?(y=s.jsxs("div",{className:"flex items-center gap-1.5",children:[p,s.jsx("span",{className:"text-xs text-muted-foreground",children:b})]}),e[20]=b,e[21]=y):y=e[21];let v;e[22]!==o||e[23]!==i||e[24]!==a?(v=i>0&&s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.otherPercent",{pct:o.toFixed(1)})})]}),e[22]=o,e[23]=i,e[24]=a,e[25]=v):v=e[25];let x;e[26]!==y||e[27]!==v||e[28]!==k?(x=s.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[k,y,v]}),e[26]=y,e[27]=v,e[28]=k,e[29]=x):x=e[29];let T;return e[30]!==x||e[31]!==h?(T=s.jsxs("div",{className:"flex flex-col gap-2",children:[h,x]}),e[30]=x,e[31]=h,e[32]=T):T=e[32],T}function Zn(t){const e=$.c(14),{agentId:n,isError:r}=t,i=ce(n),a=U();let l;e[0]!==i?.title||e[1]!==a?(l=i?.title??a("chat.subtask.subtaskNoun"),e[0]=i?.title,e[1]=a,e[2]=l):l=e[2];const d=l,u=i?.icon??null;let o;e[3]!==u||e[4]!==d?(o=s.jsx($t,{icon:u,name:d,size:"xs",className:"size-6 rounded-md shrink-0"}),e[3]=u,e[4]=d,e[5]=o):o=e[5];const c=r?"text-destructive":"text-foreground";let f;e[6]!==c?(f=Z("shrink-0 font-medium",c),e[6]=c,e[7]=f):f=e[7];let m;e[8]!==d||e[9]!==f?(m=s.jsx("span",{className:f,children:d}),e[8]=d,e[9]=f,e[10]=m):m=e[10];let h;return e[11]!==o||e[12]!==m?(h=s.jsxs(s.Fragment,{children:[o,m]}),e[11]=o,e[12]=m,e[13]=h):h=e[13],h}function Qn(t){const e=$.c(12),{isError:n}=t,r=U();let i;e[0]!==r?(i=r("chat.contextPanel.subtask"),e[0]=r,e[1]=i):i=e[1];const a=i;let l;e[2]!==a?(l=s.jsx($t,{icon:null,name:a,size:"xs",className:"size-6 rounded-md shrink-0"}),e[2]=a,e[3]=l):l=e[3];const d=n?"text-destructive":"text-foreground";let u;e[4]!==d?(u=Z("shrink-0 font-medium",d),e[4]=d,e[5]=u):u=e[5];let o;e[6]!==a||e[7]!==u?(o=s.jsx("span",{className:u,children:a}),e[6]=a,e[7]=u,e[8]=o):o=e[8];let c;return e[9]!==l||e[10]!==o?(c=s.jsxs(s.Fragment,{children:[l,o]}),e[9]=l,e[10]=o,e[11]=c):c=e[11],c}function Jn(t){const e=$.c(18),{part:n}=t,r=n.input?.agent_id,i=n.state==="input-streaming"||n.state==="input-available"||n.state==="output-available"&&n.preliminary===!0,a=n.state==="output-error",l=n.state==="approval-requested";let d;e[0]!==a?(d=s.jsx(Qn,{isError:a}),e[0]=a,e[1]=d):d=e[1];let u;e[2]!==r||e[3]!==a?(u=s.jsx(Zn,{agentId:r,isError:a}),e[2]=r,e[3]=a,e[4]=u):u=e[4];let o;e[5]!==d||e[6]!==u?(o=s.jsx(O.Suspense,{fallback:d,children:u}),e[5]=d,e[6]=u,e[7]=o):o=e[7];let c;e[8]!==n.input?(c=n.input?.prompt&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-muted-foreground/50",children:"·"}),s.jsx("span",{className:"truncate text-muted-foreground",children:n.input.prompt})]}),e[8]=n.input,e[9]=c):c=e[9];let f;e[10]!==l||e[11]!==a||e[12]!==i?(f=s.jsx("span",{className:"ml-auto shrink-0",children:i?s.jsx(je,{className:"size-3 text-muted-foreground"}):a?s.jsx(ys,{size:12,className:"text-destructive"}):l?s.jsx(nt,{size:12,className:"text-warning"}):s.jsx(js,{size:12,className:"text-success"})}),e[10]=l,e[11]=a,e[12]=i,e[13]=f):f=e[13];let m;return e[14]!==o||e[15]!==c||e[16]!==f?(m=s.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[o,c,f]}),e[14]=o,e[15]=c,e[16]=f,e[17]=m):m=e[17],m}function ea(t){const e=$.c(51),{onClose:n,back:r,className:i}=t,a=U(),[l,d]=O.useState(null),{messages:u}=Pt(),{activeTask:o}=Ee(),{selectedModel:c,selectedVirtualMcp:f}=At(),m=xs(u),h=[...u].reverse().find(ua),g=h?.metadata?.usage,j=h?.metadata?.modelLimits?.contextWindow??c?.limits?.contextWindow??null,k=g?.contextTokens??0,p=j&&j>0?(k/j*100).toFixed(1):null,b=u;let y;e[0]!==b?(y=b.filter(da).reduce(ca,0),e[0]=b,e[1]=y):y=e[1];const v=y,x=u;let T;e[2]!==x?(T=x.filter(oa).reduce(la,0),e[2]=x,e[3]=T):T=e[3];const S=T,N=Math.max(0,m.totalTokens-v-S),_=u[0],w=u.at(-1),C=_?.metadata?.created_at??o?.created_at,I=w?.metadata?.created_at??o?.updated_at,P=u.filter(ia),M=u.flatMap(aa),A=c?.modelId?Wn(c.modelId):"—",D=f?.title??"Super Agent",F=Is(),E=[{label:a("chat.contextPanel.sessionLabel"),value:o?.title??a("chat.contextPanel.newChat")},{label:a("chat.contextPanel.messagesLabel"),value:P.length},{label:a("chat.contextPanel.agentLabel"),value:D},...F?[{label:a("chat.contextPanel.modelLabel"),value:A}]:[],{label:a("chat.contextPanel.contextLimitLabel"),value:j?ve(j):"—"},{label:a("chat.contextPanel.sessionTokensLabel"),value:m.totalTokens>0?ve(m.totalTokens):"0"},{label:a("chat.contextPanel.usageLabel"),value:p!==null?`${p}%`:"—"},{label:a("chat.contextPanel.inputTokensLabel"),value:m.inputTokens>0?ve(m.inputTokens):"0"},{label:a("chat.contextPanel.outputTokensLabel"),value:m.outputTokens>0?ve(m.outputTokens):"0"},{label:a("chat.contextPanel.reasoningTokensLabel"),value:m.reasoningTokens>0?ve(m.reasoningTokens):"0"},...F?[{label:a("chat.contextPanel.costLabel"),value:m.cost>0?`$${m.cost<.001?m.cost.toFixed(6):m.cost.toFixed(4)}`:"$0.00"}]:[],{label:a("chat.contextPanel.sessionCreatedLabel"),value:Xe(C)},{label:a("chat.contextPanel.lastActivityLabel"),value:Xe(I)}];if(!o&&P.length===0){let G;e[4]!==i?(G=Z("flex flex-col h-full w-full border-l border-border bg-background",i),e[4]=i,e[5]=G):G=e[5];let q;e[6]!==a?(q=a("chat.contextPanel.title"),e[6]=a,e[7]=q):q=e[7];let ae;e[8]!==q?(ae=s.jsx("span",{className:"text-sm font-medium text-foreground",children:q}),e[8]=q,e[9]=ae):ae=e[9];let ie;e[10]!==r?(ie=r?s.jsx(ft,{size:14,className:"text-muted-foreground"}):s.jsx(mt,{size:14,className:"text-muted-foreground"}),e[10]=r,e[11]=ie):ie=e[11];let J;e[12]!==n||e[13]!==ie?(J=s.jsx("button",{type:"button",onClick:n,className:"flex size-6 items-center justify-center hover:bg-accent transition-colors rounded-lg",children:ie}),e[12]=n,e[13]=ie,e[14]=J):J=e[14];let le;e[15]!==ae||e[16]!==J?(le=s.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[ae,J]}),e[15]=ae,e[16]=J,e[17]=le):le=e[17];let te;e[18]!==a?(te=a("chat.contextPanel.emptyState"),e[18]=a,e[19]=te):te=e[19];let se;e[20]!==te?(se=s.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:te})}),e[20]=te,e[21]=se):se=e[21];let re;return e[22]!==le||e[23]!==se||e[24]!==G?(re=s.jsxs("div",{className:G,children:[le,se]}),e[22]=le,e[23]=se,e[24]=G,e[25]=re):re=e[25],re}let L;e[26]!==i?(L=Z("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",i),e[26]=i,e[27]=L):L=e[27];let H;e[28]!==a?(H=a("chat.contextPanel.title"),e[28]=a,e[29]=H):H=e[29];let B;e[30]!==H?(B=s.jsx("span",{className:"text-sm font-medium text-foreground",children:H}),e[30]=H,e[31]=B):B=e[31];let V;e[32]!==r?(V=r?s.jsx(ft,{size:14}):s.jsx(mt,{size:14}),e[32]=r,e[33]=V):V=e[33];let R;e[34]!==n||e[35]!==V?(R=s.jsx("button",{type:"button",onClick:n,className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:V}),e[34]=n,e[35]=V,e[36]=R):R=e[36];let Y;e[37]!==B||e[38]!==R?(Y=s.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[B,R]}),e[37]=B,e[38]=R,e[39]=Y):Y=e[39];let K;e[40]!==a?(K=a("chat.contextPanel.contextBreakdownSection"),e[40]=a,e[41]=K):K=e[41];let W;e[42]!==K?(W=s.jsx("span",{className:"text-xs text-muted-foreground",children:K}),e[42]=K,e[43]=W):W=e[43];let X;e[44]!==S||e[45]!==N||e[46]!==v?(X=s.jsx(Xn,{userTokens:v,assistantTokens:S,otherTokens:N}),e[44]=S,e[45]=N,e[46]=v,e[47]=X):X=e[47];let Q;return e[48]!==W||e[49]!==X?(Q=s.jsxs("div",{className:"flex flex-col gap-3",children:[W,X]}),e[48]=W,e[49]=X,e[50]=Q):Q=e[50],s.jsxs("div",{className:L,children:[Y,s.jsxs("div",{className:"flex flex-col gap-8 p-6",children:[M.length>0&&s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.subtasksSection")}),s.jsx("div",{className:"flex flex-col gap-1",children:M.map(na)})]}),s.jsx(qn,{items:E}),Q,P.length>0&&s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.rawMessagesSection")}),s.jsx("div",{className:"flex flex-col gap-1",children:P.map(G=>{const q=G.metadata?.created_at,ae=l?.id===G.id;return s.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[s.jsxs("button",{type:"button",onClick:()=>d(ae?null:G),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent/50 w-full text-left cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("span",{className:Z("shrink-0 font-medium",G.role==="user"?"text-chart-1":"text-chart-2"),children:G.role}),s.jsx("span",{className:"text-muted-foreground",children:"•"}),s.jsx("span",{className:"truncate text-muted-foreground font-mono",children:G.id})]}),q&&s.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:Xe(q)})]}),ae&&s.jsxs(s.Fragment,{children:[G.role==="assistant"&&(()=>{const ie=G.metadata?._request;if(!ie)return null;const J=ie.systemSections??[],le=Math.max(1,...J.map(sa)),te=J.reduce(ta,0);return s.jsxs("div",{className:"border-t border-border/50 px-3 py-2.5 text-xs space-y-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"font-medium text-foreground",children:a("chat.contextPanel.requestLabel")}),s.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[ie.activeTools??0," / ",ie.tools??0," ",a("chat.contextPanel.toolsActive")]})]}),J.length>0&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("div",{className:"text-muted-foreground",children:[a("chat.contextPanel.systemPromptLabel")," ",s.jsxs("span",{className:"tabular-nums",children:["~",Math.round(te/4).toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),J.map((se,re)=>{const de=se.preview.match(/^<([a-z-]+)/i)?.[1]??`section ${re}`,ge=se.chars/le*100,ue=Math.round(se.chars/4);return s.jsxs("div",{className:"space-y-0.5",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("span",{className:"font-mono text-foreground truncate",children:de}),s.jsxs("span",{className:"text-muted-foreground tabular-nums shrink-0",children:["~",ue.toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),s.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full bg-chart-3",style:{width:`${ge}%`}})})]},re)})]})]})})(),s.jsx("pre",{className:"text-xs font-mono bg-muted px-3 py-2 overflow-auto whitespace-pre-wrap break-all border-t border-border/50 max-h-64",children:JSON.stringify(G,null,2)})]})]},G.id)})})]})]})]})}function ta(t,e){return t+e.chars}function sa(t){return t.chars}function na(t,e){return s.jsx(Jn,{part:t},e)}function aa(t){return(t.parts??[]).filter(ra)}function ra(t){return t.type==="tool-subtask"}function ia(t){return t.role!=="system"}function la(t,e){const n=e.metadata?.usage;return t+(n?.outputTokens??0)}function oa(t){return t.role==="assistant"}function ca(t,e){const n=e.metadata?.usage;return t+(n?.inputTokens??0)}function da(t){return t.role==="user"}function ua(t){return t.role==="assistant"&&t.metadata?.usage}function fa(t){const e=$.c(21),{onOpenContextPanel:n}=t,{org:r}=oe(),{selectedVirtualMcp:i}=At();let a;e[0]!==r.id?(a=ke(r.id),e[0]=r.id,e[1]=a):a=e[1];const d=i??a,o=ce(d.id)??d,c=o.title??"Super Agent",f=o.icon??null,m=o.description??null;let h;e[2]!==f||e[3]!==c?(h=s.jsx(ye,{icon:f,name:c,size:"lg"}),e[2]=f,e[3]=c,e[4]=h):h=e[4];let g;e[5]!==c?(g=s.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-foreground",children:c}),e[5]=c,e[6]=g):g=e[6];let j;e[7]!==m?(j=m?s.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-balance",children:m}):null,e[7]=m,e[8]=j):j=e[8];let k;e[9]!==g||e[10]!==j?(k=s.jsxs("div",{className:"space-y-1.5",children:[g,j]}),e[9]=g,e[10]=j,e[11]=k):k=e[11];let p;e[12]!==h||e[13]!==k?(p=s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center gap-4 px-6 text-center overflow-hidden",children:[h,k]}),e[12]=h,e[13]=k,e[14]=p):p=e[14];let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ee.IceBreakers,{className:"pb-3"}),e[15]=b):b=e[15];let y;e[16]!==n?(y=s.jsxs(ee.Footer,{children:[b,s.jsx(ee.Input,{onOpenContextPanel:n})]}),e[16]=n,e[17]=y):y=e[17];let v;return e[18]!==p||e[19]!==y?(v=s.jsxs(s.Fragment,{children:[p,y]}),e[18]=p,e[19]=y,e[20]=v):v=e[20],v}function xt(t){const e=$.c(17),{outputs:n,collapsed:r,onToggle:i,variant:a}=t,l=a==="card"?"rounded-xl border border-border bg-muted/95 shadow-sm backdrop-blur-sm":"border-b border-border bg-background";let d;e[0]!==l?(d=Z(l),e[0]=l,e[1]=d):d=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Files in this task"}),e[2]=u):u=e[2];const o=r&&"-rotate-90";let c;e[3]!==o?(c=Z("size-4 text-muted-foreground transition-transform",o),e[3]=o,e[4]=c):c=e[4];let f;e[5]!==c?(f=s.jsx(at,{className:c}),e[5]=c,e[6]=f):f=e[6];let m;e[7]!==i||e[8]!==f?(m=s.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between px-3 py-2.5 text-left",children:[u,f]}),e[7]=i,e[8]=f,e[9]=m):m=e[9];let h;e[10]!==r||e[11]!==n?(h=!r&&s.jsx("div",{className:"flex max-h-72 flex-col gap-1.5 overflow-y-auto px-2 pb-2",children:n.map(ma)}),e[10]=r,e[11]=n,e[12]=h):h=e[12];let g;return e[13]!==d||e[14]!==m||e[15]!==h?(g=s.jsxs("div",{className:d,children:[m,h]}),e[13]=d,e[14]=m,e[15]=h,e[16]=g):g=e[16],g}function ma(t){return s.jsx(Ms,{file:t},t.key)}function ha(){const t=$.c(13),e=Re()?.taskId??null,n=Ls();let r;t[0]!==n?(r={enabled:n},t[0]=n,t[1]=r):r=t[1];const{data:i}=$s(e,r),[a,l]=O.useState(!1),[d,u]=O.useState(!0);if(!e||!i||i.length===0)return null;let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=()=>l(xa),t[2]=o):o=t[2];let c;t[3]!==a||t[4]!==i?(c=s.jsx("div",{className:"absolute top-2 right-2 z-10 hidden w-72 @[1280px]:block",children:s.jsx(xt,{variant:"card",outputs:i,collapsed:a,onToggle:o})}),t[3]=a,t[4]=i,t[5]=c):c=t[5];let f;t[6]===Symbol.for("react.memo_cache_sentinel")?(f=()=>u(pa),t[6]=f):f=t[6];let m;t[7]!==d||t[8]!==i?(m=s.jsx("div",{className:"shrink-0 @[1280px]:hidden",children:s.jsx(xt,{variant:"bar",outputs:i,collapsed:d,onToggle:f})}),t[7]=d,t[8]=i,t[9]=m):m=t[9];let h;return t[10]!==c||t[11]!==m?(h=s.jsxs(s.Fragment,{children:[c,m]}),t[10]=c,t[11]=m,t[12]=h):h=t[12],h}function pa(t){return!t}function xa(t){return!t}function ga(){const t=$.c(31),{org:e}=oe(),n=Re(),{isChatEmpty:r}=Pt(),[i,a]=O.useState("chat"),l=Ds(),d=Vn(),{runtime:u}=It(n?.virtualMcpId);if(d&&u!=="cms"){let w;return t[0]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(ee,{className:"animate-in fade-in-0 duration-200",children:s.jsx(ee.Main,{className:"flex flex-col items-center",children:s.jsx(ee.EmptyState,{children:s.jsx(ee.NoAiProviderEmptyState,{})})})}),t[0]=w):w=t[0],w}let c;t[1]!==l.hasDecoKey||t[2]!==l.hasOnlyDecoProvider||t[3]!==l.isLoading||t[4]!==l.isZeroBalance||t[5]!==r||t[6]!==e?(c=l.hasDecoKey&&l.isZeroBalance&&l.hasOnlyDecoProvider&&!l.isLoading&&r&&!ps(e.id),t[1]=l.hasDecoKey,t[2]=l.hasOnlyDecoProvider,t[3]=l.isLoading,t[4]=l.isZeroBalance,t[5]=r,t[6]=e,t[7]=c):c=t[7];const f=c;let m;t[8]!==f?(m=f&&s.jsx(ee.CreditsEmptyState,{}),t[8]=f,t[9]=m):m=t[9];const h=i!=="chat"?!0:void 0,g=i!=="chat",j=i!=="chat"?"opacity-0 pointer-events-none":"opacity-100";let k;t[10]!==j?(k=Z("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",j),t[10]=j,t[11]=k):k=t[11];let p;t[12]!==r||t[13]!==u?(p=r&&u!=="cms"?s.jsx(fa,{onOpenContextPanel:()=>a("context")}):s.jsxs(s.Fragment,{children:[s.jsxs(ee.Main,{className:"relative flex flex-col overflow-hidden @container",children:[s.jsx(ha,{}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(ee.Messages,{})})]}),s.jsx(ee.Footer,{children:s.jsx(ee.Input,{onOpenContextPanel:()=>a("context")})})]}),t[12]=r,t[13]=u,t[14]=p):p=t[14];let b;t[15]!==h||t[16]!==g||t[17]!==k||t[18]!==p?(b=s.jsx("div",{inert:h,"aria-hidden":g,className:k,children:p}),t[15]=h,t[16]=g,t[17]=k,t[18]=p,t[19]=b):b=t[19];const y=i!=="context"?!0:void 0,v=i!=="context",x=i==="context"?"opacity-100":"opacity-0 pointer-events-none";let T;t[20]!==x?(T=Z("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",x),t[20]=x,t[21]=T):T=t[21];let S;t[22]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ea,{back:!0,onClose:()=>a("chat")}),t[22]=S):S=t[22];let N;t[23]!==T||t[24]!==y||t[25]!==v?(N=s.jsx("div",{inert:y,"aria-hidden":v,className:T,children:S}),t[23]=T,t[24]=y,t[25]=v,t[26]=N):N=t[26];let _;return t[27]!==m||t[28]!==N||t[29]!==b?(_=s.jsxs(ee,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[m,b,N]}),t[27]=m,t[28]=N,t[29]=b,t[30]=_):_=t[30],_}function ba(){const t=$.c(7),e=U();let n;t[0]!==e?(n=e("agentShellLayout.agentShellLayout.chatLoadingError"),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==n?(r=s.jsx("div",{role:"alert",className:"flex h-full flex-1 items-center justify-center text-sm text-muted-foreground",children:n}),t[2]=n,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Le,{children:s.jsx(ga,{})}),t[4]=i):i=t[4];let a;return t[5]!==r?(a=s.jsx(St,{fallback:r,children:i}),t[5]=r,t[6]=a):a=t[6],a}function va(t){const e=$.c(10),{org:n}=oe(),r=Ws(),{data:i}=$e.useSession(),a=i?.user?.id,l=t?.id??null,d=!!t&&!!a&&!!t.created_by&&t.created_by!==a;let u;e[0]!==n.id||e[1]!==l?(u=Nt.viewedThreadMetadataRefresh(n.id,l??""),e[0]=n.id,e[1]=l,e[2]=u):u=e[2];const o=!!r&&!!l&&d;let c;e[3]!==r||e[4]!==l?(c=async()=>(await r?.refreshThreadMetadata(l??""),!0),e[3]=r,e[4]=l,e[5]=c):c=e[5];let f;e[6]!==u||e[7]!==o||e[8]!==c?(f={queryKey:u,enabled:o,staleTime:Number.POSITIVE_INFINITY,queryFn:c},e[6]=u,e[7]=o,e[8]=c,e[9]=f):f=e[9],Tt(f)}function Ze(t){const e=$.c(14),{label:n,value:r,onChange:i,options:a}=t;let l;e[0]!==n?(l=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=l):l=e[1];let d;e[2]!==i?(d=f=>f&&i(f),e[2]=i,e[3]=d):d=e[3];let u;e[4]!==a?(u=a.map(ja),e[4]=a,e[5]=u):u=e[5];let o;e[6]!==n||e[7]!==d||e[8]!==u||e[9]!==r?(o=s.jsx(rn,{type:"single",size:"sm",value:r,onValueChange:d,"aria-label":n,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:u}),e[6]=n,e[7]=d,e[8]=u,e[9]=r,e[10]=o):o=e[10];let c;return e[11]!==l||e[12]!==o?(c=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l,o]}),e[11]=l,e[12]=o,e[13]=c):c=e[13],c}function ja(t){return s.jsxs(an,{value:t.value,className:"h-6 gap-1.5 rounded-lg border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function ya(t){const e=$.c(91),{panel:n,className:r}=t,i=r===void 0?"md:size-[34px]":r,a=U();let l;e[0]!==a?(l=a("sidebar.taskGroupsList.filterChats"),e[0]=a,e[1]=l):l=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ks,{size:16}),e[2]=d):d=e[2];let u;e[3]!==n.filtersActive?(u=n.filtersActive&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[3]=n.filtersActive,e[4]=u):u=e[4];let o;e[5]!==i||e[6]!==n.filtersActive||e[7]!==l||e[8]!==u?(o=s.jsx(Oe,{asChild:!0,children:s.jsx(Bt,{asChild:!0,children:s.jsxs(Ae,{"aria-label":l,active:n.filtersActive,className:i,children:[d,u]})})}),e[5]=i,e[6]=n.filtersActive,e[7]=l,e[8]=u,e[9]=o):o=e[9];let c;e[10]!==a?(c=a("sidebar.taskGroupsList.filterChats"),e[10]=a,e[11]=c):c=e[11];let f;e[12]!==c?(f=s.jsx(Be,{side:"bottom",children:c}),e[12]=c,e[13]=f):f=e[13];let m;e[14]!==o||e[15]!==f?(m=s.jsxs(ze,{children:[o,f]}),e[14]=o,e[15]=f,e[16]=m):m=e[16];let h;e[17]!==a?(h=a("sidebar.taskGroupsList.filterView"),e[17]=a,e[18]=h):h=e[18];const g=n.groupBy;let j;e[19]!==n?(j=q=>{xe("tasks_panel_group_by_changed",{to_value:q}),n.setGroupBy(q)},e[19]=n,e[20]=j):j=e[20];let k;e[21]!==a?(k=a("sidebar.taskGroupsList.viewList"),e[21]=a,e[22]=k):k=e[22];let p;e[23]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ss,{size:13}),e[23]=p):p=e[23];let b;e[24]!==k?(b={value:"flat",label:k,icon:p},e[24]=k,e[25]=b):b=e[25];let y;e[26]!==a?(y=a("sidebar.taskGroupsList.viewStatus"),e[26]=a,e[27]=y):y=e[27];let v;e[28]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Ns,{size:13}),e[28]=v):v=e[28];let x;e[29]!==y?(x={value:"status",label:y,icon:v},e[29]=y,e[30]=x):x=e[30];let T;e[31]!==b||e[32]!==x?(T=[b,x],e[31]=b,e[32]=x,e[33]=T):T=e[33];let S;e[34]!==n.groupBy||e[35]!==j||e[36]!==T||e[37]!==h?(S=s.jsx(Ze,{label:h,value:g,onChange:j,options:T}),e[34]=n.groupBy,e[35]=j,e[36]=T,e[37]=h,e[38]=S):S=e[38];let N;e[39]!==a?(N=a("sidebar.taskGroupsList.filterType"),e[39]=a,e[40]=N):N=e[40];const _=n.typeFilter;let w;e[41]!==n?(w=q=>{xe("tasks_panel_filter_changed",{to_value:q}),n.setTypeFilter(q)},e[41]=n,e[42]=w):w=e[42];let C;e[43]!==a?(C=a("sidebar.taskGroupsList.typeAll"),e[43]=a,e[44]=C):C=e[44];let I;e[45]!==C?(I={value:"all",label:C},e[45]=C,e[46]=I):I=e[46];let P;e[47]!==a?(P=a("sidebar.taskGroupsList.typeChats"),e[47]=a,e[48]=P):P=e[48];let M;e[49]!==P?(M={value:"manual",label:P},e[49]=P,e[50]=M):M=e[50];let A;e[51]!==a?(A=a("sidebar.taskGroupsList.typeAuto"),e[51]=a,e[52]=A):A=e[52];let D;e[53]!==A?(D={value:"automation",label:A},e[53]=A,e[54]=D):D=e[54];let F;e[55]!==I||e[56]!==M||e[57]!==D?(F=[I,M,D],e[55]=I,e[56]=M,e[57]=D,e[58]=F):F=e[58];let E;e[59]!==n.typeFilter||e[60]!==N||e[61]!==w||e[62]!==F?(E=s.jsx(Ze,{label:N,value:_,onChange:w,options:F}),e[59]=n.typeFilter,e[60]=N,e[61]=w,e[62]=F,e[63]=E):E=e[63];let L;e[64]!==a?(L=a("sidebar.taskGroupsList.filterScope"),e[64]=a,e[65]=L):L=e[65];const H=n.showAll?"team":"mine";let B;e[66]!==n?(B=q=>n.setShowAll(q==="team"),e[66]=n,e[67]=B):B=e[67];let V;e[68]!==a?(V=a("sidebar.taskGroupsList.scopeMine"),e[68]=a,e[69]=V):V=e[69];let R;e[70]!==V?(R={value:"mine",label:V},e[70]=V,e[71]=R):R=e[71];let Y;e[72]!==a?(Y=a("sidebar.taskGroupsList.scopeTeam"),e[72]=a,e[73]=Y):Y=e[73];let K;e[74]!==Y?(K={value:"team",label:Y},e[74]=Y,e[75]=K):K=e[75];let W;e[76]!==R||e[77]!==K?(W=[R,K],e[76]=R,e[77]=K,e[78]=W):W=e[78];let X;e[79]!==L||e[80]!==H||e[81]!==B||e[82]!==W?(X=s.jsx(Ze,{label:L,value:H,onChange:B,options:W}),e[79]=L,e[80]=H,e[81]=B,e[82]=W,e[83]=X):X=e[83];let Q;e[84]!==S||e[85]!==E||e[86]!==X?(Q=s.jsxs(zt,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[S,E,X]}),e[84]=S,e[85]=E,e[86]=X,e[87]=Q):Q=e[87];let G;return e[88]!==Q||e[89]!==m?(G=s.jsxs(Gt,{children:[m,Q]}),e[88]=Q,e[89]=m,e[90]=G):G=e[90],G}function ka(t,e){return t.filter(n=>n.id===e||!!n.trigger_id||tn(n))}function Sa(){const t=$.c(2),e=Lt()??[];let n;return t[0]!==e?(n=r=>{if(!r)return;const i=e.find(a=>a.id===r);return i?Ft(i.metadata):void 0},t[0]=e,t[1]=n):n=t[1],n}function Na(t){const e=$.c(9),{virtualMcpId:n,size:r,showAutomationBadge:i}=t,a=r===void 0?"sm":r,l=U();let d;e[0]!==a||e[1]!==n?(d=n?s.jsx(Ta,{virtualMcpId:n,size:a}):s.jsx(ye,{icon:null,name:"?",size:a}),e[0]=a,e[1]=n,e[2]=d):d=e[2];let u;e[3]!==i||e[4]!==l?(u=i&&s.jsx("span",{"aria-label":l("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-special border border-special text-special-foreground",children:s.jsx(Kt,{size:10,className:"text-white"})}),e[3]=i,e[4]=l,e[5]=u):u=e[5];let o;return e[6]!==d||e[7]!==u?(o=s.jsxs("div",{className:"relative shrink-0",children:[d,u]}),e[6]=d,e[7]=u,e[8]=o):o=e[8],o}function Ta(t){const e=$.c(6),{virtualMcpId:n,size:r}=t,i=ce(n);if(!i){let d;return e[0]!==r?(d=s.jsx(ye,{icon:null,name:"?",size:r}),e[0]=r,e[1]=d):d=e[1],d}const a=i.icon??null;let l;return e[2]!==i.title||e[3]!==r||e[4]!==a?(l=s.jsx(ye,{icon:a,name:i.title,size:r}),e[2]=i.title,e[3]=r,e[4]=a,e[5]=l):l=e[5],l}const gt=["thread"];function _a(t){const e=$.c(53),{open:n,onOpenChange:r}=t,[i,a]=O.useState(""),{org:l}=oe(),{setTaskId:d}=rt(),u=st(),o=U();let c,f,m,h;e[0]!==l.id||e[1]!==i?(h=i.trim(),c=h?20:10,m=Tt,f=Nt.globalSearch(l.id,h,c,gt),e[0]=l.id,e[1]=i,e[2]=c,e[3]=f,e[4]=m,e[5]=h):(c=e[2],f=e[3],m=e[4],h=e[5]);let g;e[6]!==c||e[7]!==u||e[8]!==h?(g=async()=>{const L=await u.call("GLOBAL_SEARCH",{query:h,limit:c,types:[...gt]});return{...L,items:L.items.filter(wa)}},e[6]=c,e[7]=u,e[8]=h,e[9]=g):g=e[9];let j;e[10]!==n||e[11]!==f||e[12]!==g?(j={queryKey:f,enabled:n,queryFn:g,staleTime:1e4},e[10]=n,e[11]=f,e[12]=g,e[13]=j):j=e[13];const{data:k,isFetching:p}=m(j);let b;e[14]!==k?.items?(b=k?.items??[],e[14]=k?.items,e[15]=b):b=e[15];const y=b;let v;e[16]!==r?(v=L=>{L||a(""),r(L)},e[16]=r,e[17]=v):v=e[17];const x=v;let T;e[18]!==x||e[19]!==d?(T=L=>{x(!1),d(L.id,L.virtual_mcp_id??void 0)},e[18]=x,e[19]=d,e[20]=T):T=e[20];const S=T;let N;e[21]!==o?(N=o("tasksPanel.globalSearchDialog.title"),e[21]=o,e[22]=N):N=e[22];let _;e[23]!==N?(_=s.jsx(dn,{children:N}),e[23]=N,e[24]=_):_=e[24];let w;e[25]!==o?(w=o("tasksPanel.globalSearchDialog.description"),e[25]=o,e[26]=w):w=e[26];let C;e[27]!==w?(C=s.jsx(un,{children:w}),e[27]=w,e[28]=C):C=e[28];let I;e[29]!==C||e[30]!==_?(I=s.jsxs(fn,{className:"sr-only",children:[_,C]}),e[29]=C,e[30]=_,e[31]=I):I=e[31];let P;e[32]!==o?(P=o("tasksPanel.globalSearchDialog.placeholder"),e[32]=o,e[33]=P):P=e[33];let M;e[34]!==i||e[35]!==P?(M=s.jsx(vn,{value:i,onValueChange:a,placeholder:P}),e[34]=i,e[35]=P,e[36]=M):M=e[36];let A;e[37]!==S||e[38]!==p||e[39]!==y||e[40]!==o||e[41]!==h?(A=s.jsx(pn,{children:p&&y.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:o("tasksPanel.globalSearchDialog.searching")}):y.length===0?s.jsx(xn,{children:o("tasksPanel.globalSearchDialog.noResults")}):s.jsx(gn,{heading:h?void 0:o("tasksPanel.globalSearchDialog.recent"),children:y.map(L=>L.type==="thread"?s.jsxs(bn,{value:`thread:${L.id}:${L.title}`,onSelect:()=>S(L),className:"gap-2.5",children:[s.jsx(Na,{virtualMcpId:L.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:L.title||o("tasksPanel.globalSearchDialog.untitledChat")})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(L.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${L.id}`):null)})}),e[37]=S,e[38]=p,e[39]=y,e[40]=o,e[41]=h,e[42]=A):A=e[42];let D;e[43]!==M||e[44]!==A?(D=s.jsxs(jn,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[M,A]}),e[43]=M,e[44]=A,e[45]=D):D=e[45];let F;e[46]!==I||e[47]!==D?(F=s.jsxs(mn,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[I,D]}),e[46]=I,e[47]=D,e[48]=F):F=e[48];let E;return e[49]!==x||e[50]!==n||e[51]!==F?(E=s.jsx(hn,{open:n,onOpenChange:x,children:F}),e[49]=x,e[50]=n,e[51]=F,e[52]=E):E=e[52],E}function wa(t){return t.type==="thread"}function Ca(t){const e=$.c(43),{branch:n,onOutcome:r}=t,i=U();let a;e[0]!==r?(a=S=>{S||r("cancel")},e[0]=r,e[1]=a):a=e[1];let l;e[2]!==i?(l=i("sidebar.archiveWorktreeDialog.title"),e[2]=i,e[3]=l):l=e[3];let d;e[4]!==l?(d=s.jsx(yn,{children:l}),e[4]=l,e[5]=d):d=e[5];let u;e[6]!==i?(u=i("sidebar.archiveWorktreeDialog.stopsAndDeletesBefore"),e[6]=i,e[7]=u):u=e[7];let o;e[8]!==n?(o=s.jsx("span",{className:"font-mono",children:n}),e[8]=n,e[9]=o):o=e[9];let c;e[10]!==i?(c=i("sidebar.archiveWorktreeDialog.stopsAndDeletesAfter"),e[10]=i,e[11]=c):c=e[11];let f;e[12]!==u||e[13]!==o||e[14]!==c?(f=s.jsxs(kn,{children:[u," ",o," ",c]}),e[12]=u,e[13]=o,e[14]=c,e[15]=f):f=e[15];let m;e[16]!==d||e[17]!==f?(m=s.jsxs(Sn,{children:[d,f]}),e[16]=d,e[17]=f,e[18]=m):m=e[18];let h;e[19]!==r?(h=()=>r("cancel"),e[19]=r,e[20]=h):h=e[20];let g;e[21]!==i?(g=i("sidebar.archiveWorktreeDialog.cancel"),e[21]=i,e[22]=g):g=e[22];let j;e[23]!==g||e[24]!==h?(j=s.jsx(Nn,{onClick:h,children:g}),e[23]=g,e[24]=h,e[25]=j):j=e[25];let k;e[26]===Symbol.for("react.memo_cache_sentinel")?(k=Z(ss({variant:"destructive"})),e[26]=k):k=e[26];let p;e[27]!==r?(p=()=>r("confirm"),e[27]=r,e[28]=p):p=e[28];let b;e[29]!==i?(b=i("sidebar.archiveWorktreeDialog.confirm"),e[29]=i,e[30]=b):b=e[30];let y;e[31]!==p||e[32]!==b?(y=s.jsx(Tn,{className:k,onClick:p,children:b}),e[31]=p,e[32]=b,e[33]=y):y=e[33];let v;e[34]!==j||e[35]!==y?(v=s.jsxs(_n,{children:[j,y]}),e[34]=j,e[35]=y,e[36]=v):v=e[36];let x;e[37]!==v||e[38]!==m?(x=s.jsxs(wn,{children:[m,v]}),e[37]=v,e[38]=m,e[39]=x):x=e[39];let T;return e[40]!==a||e[41]!==x?(T=s.jsx(Cn,{open:!0,onOpenChange:a,children:x}),e[40]=a,e[41]=x,e[42]=T):T=e[42],T}function Pa(t,e,n){if(!n)return;const r=t.findIndex(i=>i.id===e);if(r!==-1){for(let i=r+1;i<t.length;i++){const a=t[i];if(a?.created_by===n)return a}for(let i=r-1;i>=0;i--){const a=t[i];if(a?.created_by===n)return a}}}function Aa(t){return t==="ephemeral"||t.startsWith("thread:")}function Xt(t){const e=$.c(45),{task:n,isActive:r,onClick:i,onArchive:a,showAutomationBadge:l,showAgentIcon:d,hideStatusIdle:u,indented:o}=t,c=U(),f=Pn(n.status),m=f.icon,h=n.metadata?.kind==="tool_call_run",g=ce(h?void 0:n.virtual_mcp_id);let j;e[0]!==g?(j=Ot(g),e[0]=g,e[1]=j):j=e[1];const k=j;Fs(6e4);const p=l||!!n.trigger_id,b=n.id,y="button",v=0;let x;e[2]!==i?(x=B=>{B.target===B.currentTarget&&(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),i())},e[2]=i,e[3]=x):x=e[3];const T=o?"-ml-4 pl-6":"pl-[9px]",S=r?"bg-accent text-accent-foreground":"hover:bg-accent/60";let N;e[4]!==T||e[5]!==S?(N=Z("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",T,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",S),e[4]=T,e[5]=S,e[6]=N):N=e[6];let _;e[7]!==h||e[8]!==d||e[9]!==g?.icon||e[10]!==g?.title?(_=d&&!h&&s.jsx(ye,{icon:g?.icon??null,name:g?.title??"?",size:"2xs"}),e[7]=h,e[8]=d,e[9]=g?.icon,e[10]=g?.title,e[11]=_):_=e[11];let w;e[12]!==p||e[13]!==c?(w=p&&s.jsx(Kt,{size:12,"aria-label":c("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-special"}),e[12]=p,e[13]=c,e[14]=w):w=e[14];let C;e[15]!==c||e[16]!==n.title?(C=n.title||c("tasksPanel.taskRow.untitledTask"),e[15]=c,e[16]=n.title,e[17]=C):C=e[17];let I;e[18]!==C?(I=s.jsx("div",{className:"text-sm text-foreground truncate",children:C}),e[18]=C,e[19]=I):I=e[19];let P;e[20]!==w||e[21]!==I?(P=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[w,I]}),e[20]=w,e[21]=I,e[22]=P):P=e[22];let M;e[23]!==k||e[24]!==r||e[25]!==n.branch||e[26]!==n.updated_at?(M=n.updated_at&&s.jsxs("div",{className:Z("flex items-center gap-1 text-[11px] min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!Aa(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):k?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[k.owner,"/",k.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:In(new Date(n.updated_at))})]}),e[23]=k,e[24]=r,e[25]=n.branch,e[26]=n.updated_at,e[27]=M):M=e[27];let A;e[28]!==P||e[29]!==M?(A=s.jsxs("div",{className:"flex-1 min-w-0",children:[P,M]}),e[28]=P,e[29]=M,e[30]=A):A=e[30];const D="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",F=!u&&s.jsx("span",{className:Z("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",a&&"group-hover/row:opacity-0"),"aria-label":c("tasksPanel.taskRow.statusLabel",{status:c(f.labelKey)}),children:n.status==="in_progress"?s.jsx(je,{className:Z("size-3.5",f.iconClassName)}):s.jsx(m,{size:14,className:f.iconClassName})});let E;e[31]!==a||e[32]!==c?(E=a&&s.jsxs(ze,{children:[s.jsx(Oe,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":c("tasksPanel.taskRow.archiveTask"),onClick:B=>{B.stopPropagation(),a()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-8 items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(ns,{size:14})})}),s.jsx(Be,{side:"right",children:c("tasksPanel.taskRow.archive")})]}),e[31]=a,e[32]=c,e[33]=E):E=e[33];let L;e[34]!==F||e[35]!==E?(L=s.jsxs("div",{className:D,children:[F,E]}),e[34]=F,e[35]=E,e[36]=L):L=e[36];let H;return e[37]!==i||e[38]!==A||e[39]!==L||e[40]!==x||e[41]!==N||e[42]!==_||e[43]!==n.id?(H=s.jsxs("div",{"data-task-id":b,role:y,tabIndex:v,onClick:i,onKeyDown:x,className:N,children:[_,A,L]}),e[37]=i,e[38]=A,e[39]=L,e[40]=x,e[41]=N,e[42]=_,e[43]=n.id,e[44]=H):H=e[44],H}const bt=["requires_action","in_progress","failed","expired","completed"];function Ia(t){const e=new Map(bt.map(n=>[n,[]]));for(const n of t){const r=n.status??"completed";(e.get(r)??e.get("completed")).push(n)}return bt.map(n=>({status:n,threads:e.get(n)}))}const Ma="sidebar.group.expanded.";function La(t,e){const n=$.c(3),[r,i]=_t(`${Ma}${t}`,e);let a;return n[0]!==r||n[1]!==i?(a=[r,i],n[0]=r,n[1]=i,n[2]=a):a=n[2],a}function Zt(t){const e=$.c(18),{onClick:n,isFetching:r,indented:i}=t,a=U();let l;e[0]!==a?(l=a("sidebar.showMoreButton.ariaLabel"),e[0]=a,e[1]=l):l=e[1];const d=i?"-ml-4 pl-6 pr-2":"px-2";let u;e[2]!==d?(u=Z("flex items-center gap-2 py-1.5 rounded-lg text-sm text-muted-foreground",d,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=d,e[3]=u):u=e[3];let o;e[4]!==r?(o=r&&s.jsx(je,{className:"size-3.5"}),e[4]=r,e[5]=o):o=e[5];let c;e[6]!==r||e[7]!==a?(c=a(r?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=r,e[7]=a,e[8]=c):c=e[8];let f;e[9]!==c?(f=s.jsx("span",{children:c}),e[9]=c,e[10]=f):f=e[10];let m;return e[11]!==r||e[12]!==n||e[13]!==l||e[14]!==u||e[15]!==o||e[16]!==f?(m=s.jsxs("button",{type:"button","aria-label":l,onClick:n,disabled:r,className:u,children:[o,f]}),e[11]=r,e[12]=n,e[13]=l,e[14]=u,e[15]=o,e[16]=f,e[17]=m):m=e[17],m}function $a(t,e,n,r){return[t,e,n,r.type,r.member,r.currentUserId??""].join("|")}function Da(t){return t.member==="mine"&&!t.currentUserId}const Qt=4;let Pe=0;const et=[];function Fa(){for(;Pe<Qt&&et.length>0;){const t=et.shift();t&&t()}}function Jt(t){return new Promise((e,n)=>{const r=()=>{Pe++,t().then(e,n).finally(()=>{Pe--,Fa()})};Pe<Qt?r():et.push(r)})}const He=10;function vt(t,e,n,r,i){const a={hidden:!1};r.member==="mine"&&r.currentUserId&&(a.created_by=r.currentUserId),r.type==="automation"&&(a.has_trigger=!0),r.type==="manual"&&(a.has_trigger=!1);const l={where:a,limit:i,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return l.status=e,l}function Ra(t,e,n,r){let i=0;for(const a of t)es(a,e,n,r)&&i++;return i}function Qe(t,e,n,r){return Ra(t,e,n,r)}function Ea(t,e){return!!(t>=He||t===0&&e)}function jt(t,e){return t<e}function Oa(t,e){return e===!1?!1:e===!0?!0:t}function es(t,e,n,r){return!(t.hidden||(t.status??"completed")!==n||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const Me=new Map,Ce=new Map;function Ba(t,e){return e?t>=He?!0:null:!1}function yt(t){return Me.get(t)}function za(t,e){Me.set(t,e)}function Ga(t,e,n){const r=Me.get(t);if(r!==void 0){n(r);return}let i=Ce.get(t);i||(i=Jt(e).then(a=>(Me.set(t,a),Ce.delete(t),a)).catch(()=>(Ce.delete(t),Promise.reject(new Error("group probe failed")))),Ce.set(t,i)),i.then(n,()=>n(!1))}function kt(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===He,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Ha(t,e,n,r,i){let a=0;for(const l of t)e.has(l.id)||es(l,n,r,i)&&a++;return a}function Ua(t,e,n,r){const i=$.c(8),{org:a}=oe(),l=$a(a.id,t,e,n);let d;i[0]!==n?(d=Da(n),i[0]=n,i[1]=d):d=i[1];const u=d,[o,c]=O.useState({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});o.identity!==l&&c({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});const f=it(),{threads:m,hasMore:h}=lt(),g=Qe(m,t,e,n),j=Ea(g,h),k=Ba(g,h),p=st();if(o.identity===l&&o.serverHasMore===null){const S=k??yt(l);S!==void 0&&c({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:o.probeSubscribedIdentity,serverHasMore:S})}!u&&o.identity===l&&o.serverHasMore===null&&k===null&&yt(l)===void 0&&o.probeSubscribedIdentity!==l&&(c(S=>S.identity===l?{...S,isProbing:!0,probeSubscribedIdentity:l}:S),Ga(l,async()=>{const S=vt(t,e,0,n,1),N=await p.call("COLLECTION_THREADS_LIST",S),{totalCount:_}=kt(N),w=Qe(f.threads.get(),t,e,n);return _===void 0?!1:jt(w,_)},S=>{c(N=>N.identity!==l?N:{...N,isProbing:!1,serverHasMore:S})}));const y=async function(){if(o.isFetching||o.isProbing||u)return;const N=l;c(_=>_.identity===N?{..._,isFetching:!0}:_);try{const _=Qe(m,t,e,n),w=vt(t,e,_,n,He),C=await Jt(()=>p.call("COLLECTION_THREADS_LIST",w)),{items:I,hasMore:P,totalCount:M}=kt(C),A=new Set(m.map(Ka)),D=Ha(I,A,t,e,n),F=_;f.mergeThreads(I),c(E=>{if(E.identity!==N)return E;let L;return M!==void 0?L=jt(F+D,M):L=I.length===0||D===0?!1:P,za(N,L),{...E,isFetching:!1,serverHasMore:L}})}catch(_){const w=_,C=w instanceof Error?w.message:String(w);wt.error(`Could not load more tasks: ${C}`),c(I=>I.identity===N?{...I,isFetching:!1}:I)}},v=o.isFetching||o.isProbing,x=!u&&!v&&Oa(j,o.serverHasMore);let T;return i[2]!==v||i[3]!==y||i[4]!==x||i[5]!==o.isProbing||i[6]!==o.serverHasMore?(T={hasMore:x,isFetching:v,isProbing:o.isProbing,serverHasMore:o.serverHasMore,loadMore:y},i[2]=v,i[3]=y,i[4]=x,i[5]=o.isProbing,i[6]=o.serverHasMore,i[7]=T):T=i[7],T}function Ka(t){return t.id}function Va(t){const e=$.c(20),{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:d,filters:u}=t,{isFetching:o,isProbing:c,loadMore:f,hasMore:m,serverHasMore:h}=Ua("status",n,u),[g,j]=O.useState(!1);!g&&r.length===0&&h===!0&&!o&&!c&&(j(!0),queueMicrotask(()=>{f()}));let k;if(e[0]!==i||e[1]!==d||e[2]!==u||e[3]!==l||e[4]!==a||e[5]!==r){let y;e[7]!==i||e[8]!==d||e[9]!==u||e[10]!==l||e[11]!==a?(y=v=>s.jsx(Xt,{task:v,isActive:i===v.id,onClick:()=>a(v),onArchive:d&&v.created_by===u.currentUserId?()=>l(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=i,e[8]=d,e[9]=u,e[10]=l,e[11]=a,e[12]=y):y=e[12],k=r.map(y),e[0]=i,e[1]=d,e[2]=u,e[3]=l,e[4]=a,e[5]=r,e[6]=k}else k=e[6];let p;e[13]!==m||e[14]!==o||e[15]!==f?(p=(m||o)&&s.jsx(Zt,{onClick:()=>{f()},isFetching:o,indented:!0}),e[13]=m,e[14]=o,e[15]=f,e[16]=p):p=e[16];let b;return e[17]!==k||e[18]!==p?(b=s.jsxs(s.Fragment,{children:[k,p]}),e[17]=k,e[18]=p,e[19]=b):b=e[19],b}function Wa(t){const e=$.c(43),{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:d,filters:u}=t,o=U(),c=An[n],f=c.icon,[m,h]=La(`status-${n}`,!1);let g;e[0]!==m||e[1]!==h?(g=function(){h(!m)},e[0]=m,e[1]=h,e[2]=g):g=e[2];const j=g;let k;e[3]!==c.labelKey||e[4]!==o?(k=o("sidebar.taskGroupsList.toggleStatusGroup",{status:o(c.labelKey)}),e[3]=c.labelKey,e[4]=o,e[5]=k):k=e[5];let p;e[6]!==j?(p=C=>{C.target===C.currentTarget&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),j())},e[6]=j,e[7]=p):p=e[7];let b;e[8]!==f||e[9]!==c.iconClassName?(b=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(f,{size:12,className:c.iconClassName})}),e[8]=f,e[9]=c.iconClassName,e[10]=b):b=e[10];let y;e[11]!==m?(y=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:m?s.jsx(at,{size:14}):s.jsx(as,{size:14})}),e[11]=m,e[12]=y):y=e[12];let v;e[13]!==b||e[14]!==y?(v=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[b,y]}),e[13]=b,e[14]=y,e[15]=v):v=e[15];let x;e[16]!==c.labelKey||e[17]!==o?(x=o(c.labelKey),e[16]=c.labelKey,e[17]=o,e[18]=x):x=e[18];let T;e[19]!==x?(T=s.jsx("span",{className:"flex-1 truncate",children:x}),e[19]=x,e[20]=T):T=e[20];let S;e[21]!==r.length?(S=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:r.length})}),e[21]=r.length,e[22]=S):S=e[22];let N;e[23]!==m||e[24]!==j||e[25]!==k||e[26]!==p||e[27]!==v||e[28]!==T||e[29]!==S?(N=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":m,"aria-label":k,onClick:j,onKeyDown:p,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-lg text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[v,T,S]}),e[23]=m,e[24]=j,e[25]=k,e[26]=p,e[27]=v,e[28]=T,e[29]=S,e[30]=N):N=e[30];let _;e[31]!==i||e[32]!==d||e[33]!==m||e[34]!==u||e[35]!==l||e[36]!==a||e[37]!==n||e[38]!==r?(_=m&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(Va,{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:d,filters:u})}),e[31]=i,e[32]=d,e[33]=m,e[34]=u,e[35]=l,e[36]=a,e[37]=n,e[38]=r,e[39]=_):_=e[39];let w;return e[40]!==N||e[41]!==_?(w=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[N,_]}),e[40]=N,e[41]=_,e[42]=w):w=e[42],w}function qa(t){const e=$.c(41),{threads:n,groupBy:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,filters:d,hasMore:u,isFetchingMore:o,onLoadMore:c,filtersActive:f}=t,m=U();if(n.length===0&&!u&&!o){let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ts,{className:"size-6 opacity-60"}),e[0]=p):p=e[0];let b;e[1]!==f||e[2]!==m?(b=m(f?"sidebar.myThreadsSection.noChatsMatchFilters":"sidebar.myThreadsSection.noChatsYet"),e[1]=f,e[2]=m,e[3]=b):b=e[3];let y;return e[4]!==b?(y=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[p,s.jsx("p",{className:"text-sm",children:b})]}),e[4]=b,e[5]=y):y=e[5],y}const h=n.length>1||u;if(r==="status"){let p;if(e[6]!==i||e[7]!==h||e[8]!==d||e[9]!==l||e[10]!==a||e[11]!==n){let y;e[13]!==i||e[14]!==h||e[15]!==d||e[16]!==l||e[17]!==a?(y=v=>s.jsx(Wa,{status:v.status,threads:v.threads,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:h,filters:d},v.status),e[13]=i,e[14]=h,e[15]=d,e[16]=l,e[17]=a,e[18]=y):y=e[18],p=Ia(n).map(y),e[6]=i,e[7]=h,e[8]=d,e[9]=l,e[10]=a,e[11]=n,e[12]=p}else p=e[12];let b;return e[19]!==p?(b=s.jsx(s.Fragment,{children:p}),e[19]=p,e[20]=b):b=e[20],b}let g;if(e[21]!==i||e[22]!==h||e[23]!==d||e[24]!==l||e[25]!==a||e[26]!==n){let p;e[28]!==i||e[29]!==h||e[30]!==d||e[31]!==l||e[32]!==a?(p=b=>s.jsx(Xt,{task:b,isActive:i===b.id,onClick:()=>a(b),onArchive:h&&b.created_by===d.currentUserId?()=>l(b):void 0,showAutomationBadge:!!b.trigger_id,showAgentIcon:!0},b.id),e[28]=i,e[29]=h,e[30]=d,e[31]=l,e[32]=a,e[33]=p):p=e[33],g=n.map(p),e[21]=i,e[22]=h,e[23]=d,e[24]=l,e[25]=a,e[26]=n,e[27]=g}else g=e[27];let j;e[34]!==u||e[35]!==o||e[36]!==c?(j=(u||o)&&s.jsx(Zt,{onClick:c,isFetching:o}),e[34]=u,e[35]=o,e[36]=c,e[37]=j):j=e[37];let k;return e[38]!==g||e[39]!==j?(k=s.jsxs(s.Fragment,{children:[g,j]}),e[38]=g,e[39]=j,e[40]=k):k=e[40],k}function Ya(t,e){return null}function Xa(t,e){return t.some(n=>n.id!==e.taskId&&!n.hidden&&n.branch===e.branch&&n.virtual_mcp_id===e.virtualMcpId)}const Za=["archive","reclaim-worktree"],Qa=[];function Ja(t){return t==="confirm"?Za:Qa}function er(t){const e=$.c(11),{panel:n}=t;let r;return e[0]!==n.activeTaskId||e[1]!==n.archiveTask||e[2]!==n.filters||e[3]!==n.filtersActive||e[4]!==n.groupBy||e[5]!==n.hasMore||e[6]!==n.isFetchingMore||e[7]!==n.loadMore||e[8]!==n.selectTask||e[9]!==n.threads?(r=s.jsx(qa,{threads:n.threads,groupBy:n.groupBy,activeTaskId:n.activeTaskId,onSelectTask:n.selectTask,onArchiveTask:n.archiveTask,filters:n.filters,hasMore:n.hasMore,isFetchingMore:n.isFetchingMore,onLoadMore:n.loadMore,filtersActive:n.filtersActive}),e[0]=n.activeTaskId,e[1]=n.archiveTask,e[2]=n.filters,e[3]=n.filtersActive,e[4]=n.groupBy,e[5]=n.hasMore,e[6]=n.isFetchingMore,e[7]=n.loadMore,e[8]=n.selectTask,e[9]=n.threads,e[10]=r):r=e[10],r}function tr(t){const e=$.c(83);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{onNavigate:r}=n,i=U(),{data:a}=$e.useSession(),l=a?.user?.id,{org:d}=oe();let u;e[2]!==d.id?(u=ke(d.id),e[2]=d.id,e[3]=u):u=e[3];const o=u.id,c=Sa(),{threads:f,hasMore:m,isFetchingMore:h,fetchNextPage:g}=lt(),j=f.filter(rr),{hide:k,setScope:p}=ot(),b=De(),y=st(),{setTaskId:v,createNewTask:x}=rt(),T=Ht(),S=Ge();let N;e[4]!==S||e[5]!==f||e[6]!==T?(N=ln({routeAgentId:T,threadVirtualMcpId:f.find(z=>z.id===S)?.virtual_mcp_id}),e[4]=S,e[5]=f,e[6]=T,e[7]=N):N=e[7];const _=N;let w;e[8]!==r?(w=()=>{r?.()},e[8]=r,e[9]=w):w=e[9];const C=w,I=[...j].sort(ar),[P,M]=O.useState("all"),[A,D]=O.useState("flat"),[F,E]=_t("sidebar-threads-scope-all",!1),[L,H]=O.useState(!1),[B,V]=O.useState(!1);let R;e[10]!==H?(R=()=>{xe("tasks_panel_search_opened"),V(!0),H(!0)},e[10]=H,e[11]=R):R=e[11];const Y=R,[K,W]=O.useState(null),X=l??null;let Q;e[12]!==X||e[13]!==P?(Q={type:P,member:"mine",currentUserId:X},e[12]=X,e[13]=P,e[14]=Q):Q=e[14];const G=Q,q={};F||(q.created_by="me"),p(q);let ae;e[15]!==l?(ae=z=>l?z.filter(ne=>ne.created_by===l):[],e[15]=l,e[16]=ae):ae=e[16];const ie=ae;let J;e[17]!==P?(J=z=>P==="automation"?z.filter(nr):P==="manual"?z.filter(sr):z,e[17]=P,e[18]=J):J=e[18];const le=J,te=ka(le(F?I:ie(I)),S);let se;e[19]!==S||e[20]!==C||e[21]!==l||e[22]!==k||e[23]!==b||e[24]!==d.slug||e[25]!==v||e[26]!==te?(se=z=>{const ne=z.id===S,pe=k(z.id);if(Rs(z.id),!ne)return pe;const be=Pa(te,z.id,l);return C(),be?v(be.id,be.virtual_mcp_id):b({to:"/$org",params:{org:d.slug}}),pe},e[19]=S,e[20]=C,e[21]=l,e[22]=k,e[23]=b,e[24]=d.slug,e[25]=v,e[26]=te,e[27]=se):se=e[27];const re=se;let de;e[28]!==y||e[29]!==i?(de=async z=>{try{await y.call("SANDBOX_DELETE",{virtualMcpId:z.virtualMcpId,branch:z.branch,removeWorktree:!0})}catch{wt.error(i("sidebar.archiveWorktreeDialog.reclaimFailed",{branch:z.branch}))}},e[28]=y,e[29]=i,e[30]=de):de=e[30];const ge=de;let ue;e[31]!==f||e[32]!==re||e[33]!==l||e[34]!==W?(ue=z=>{if(l&&z.created_by&&z.created_by!==l)return;const ne=Ya();if(!ne||Xa(f,ne)){re(z);return}W({task:z,target:ne})},e[31]=f,e[32]=re,e[33]=l,e[34]=W,e[35]=ue):ue=e[35];const Ue=ue;let Ne;e[36]!==re||e[37]!==K||e[38]!==ge||e[39]!==W?(Ne=z=>{const ne=K;ne&&(W(null),(async()=>{for(const pe of Ja(z))if(pe==="archive")try{await re(ne.task)}catch{return}else await ge(ne.target)})())},e[36]=re,e[37]=K,e[38]=ge,e[39]=W,e[40]=Ne):Ne=e[40];const Ke=Ne;let Te;e[41]!==C||e[42]!==v?(Te=z=>{C(),v(z.id,z.virtual_mcp_id)},e[41]=C,e[42]=v,e[43]=Te):Te=e[43];const Ve=Te;let _e;e[44]!==_||e[45]!==S||e[46]!==f||e[47]!==C||e[48]!==x||e[49]!==l||e[50]!==o||e[51]!==c||e[52]!==v?(_e=()=>{const z=_??o;xe("sidebar_new_thread_clicked",{virtual_mcp_id:z}),C();const ne=qs(f,z,l,c(z));if(ne){v(ne.id,ne.virtual_mcp_id);return}const pe=f.find(be=>be.id===S)?.branch??null;x(z,pe)},e[44]=_,e[45]=S,e[46]=f,e[47]=C,e[48]=x,e[49]=l,e[50]=o,e[51]=c,e[52]=v,e[53]=_e):_e=e[53];const We=_e;let fe;e[54]!==g?(fe=()=>{g()},e[54]=g,e[55]=fe):fe=e[55];const qe=A!=="flat"||P!=="all"||F;let me;e[56]!==Ke||e[57]!==K?(me=K?s.jsx(Ca,{branch:K.target.branch,onOutcome:Ke}):null,e[56]=Ke,e[57]=K,e[58]=me):me=e[58];let he;e[59]!==B||e[60]!==L||e[61]!==H?(he=B?s.jsx(_a,{open:L,onOpenChange:H}):null,e[59]=B,e[60]=L,e[61]=H,e[62]=he):he=e[62];let we;return e[63]!==S||e[64]!==Ue||e[65]!==G||e[66]!==A||e[67]!==m||e[68]!==h||e[69]!==We||e[70]!==Y||e[71]!==Ve||e[72]!==D||e[73]!==E||e[74]!==M||e[75]!==F||e[76]!==fe||e[77]!==qe||e[78]!==me||e[79]!==he||e[80]!==P||e[81]!==te?(we={threads:te,activeTaskId:S,filters:G,hasMore:m,isFetchingMore:h,loadMore:fe,groupBy:A,setGroupBy:D,typeFilter:P,setTypeFilter:M,showAll:F,setShowAll:E,filtersActive:qe,selectTask:Ve,archiveTask:Ue,newThread:We,openSearch:Y,reclaimDialog:me,searchDialog:he},e[63]=S,e[64]=Ue,e[65]=G,e[66]=A,e[67]=m,e[68]=h,e[69]=We,e[70]=Y,e[71]=Ve,e[72]=D,e[73]=E,e[74]=M,e[75]=F,e[76]=fe,e[77]=qe,e[78]=me,e[79]=he,e[80]=P,e[81]=te,e[82]=we):we=e[82],we}function sr(t){return!t.trigger_id}function nr(t){return!!t.trigger_id}function ar(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function rr(t){return!t.hidden}function ir(){const t=$.c(60),e=U(),[n,r]=O.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={onNavigate:()=>r(!1)},t[0]=i):i=t[0];const a=tr(i),l=Re()?.activeTask;let d;t[1]!==l?.title||t[2]!==a.activeTaskId||t[3]!==a.threads||t[4]!==e?(d=l?.title||a.threads.find(E=>E.id===a.activeTaskId)?.title||e("tasksPanel.taskRow.untitledTask"),t[1]=l?.title,t[2]=a.activeTaskId,t[3]=a.threads,t[4]=e,t[5]=d):d=t[5];const u=d;let o;t[6]!==a?(o=()=>{r(!1),a.openSearch()},t[6]=a,t[7]=o):o=t[7];const c=o;let f;t[8]!==e?(f=e("chat.threadsMenu.chats"),t[8]=e,t[9]=f):f=t[9];const m=n&&"bg-sidebar-accent";let h;t[10]!==m?(h=Z("flex h-[34px] min-w-0 shrink items-center gap-1.5 rounded-lg px-2 text-sm text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",m),t[10]=m,t[11]=h):h=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(_s,{size:16,className:"shrink-0"}),t[12]=g):g=t[12];let j;t[13]!==u?(j=s.jsx("span",{className:"truncate max-w-[10rem] font-medium",children:u}),t[13]=u,t[14]=j):j=t[14];let k;t[15]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(at,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[15]=k):k=t[15];let p;t[16]!==f||t[17]!==h||t[18]!==j?(p=s.jsx(Oe,{asChild:!0,children:s.jsx(Bt,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":f,className:h,children:[g,j,k]})})}),t[16]=f,t[17]=h,t[18]=j,t[19]=p):p=t[19];let b;t[20]!==e?(b=e("chat.threadsMenu.chats"),t[20]=e,t[21]=b):b=t[21];let y;t[22]!==b?(y=s.jsx(Be,{side:"bottom",children:b}),t[22]=b,t[23]=y):y=t[23];let v;t[24]!==y||t[25]!==p?(v=s.jsxs(ze,{children:[p,y]}),t[24]=y,t[25]=p,t[26]=v):v=t[26];let x;t[27]!==a?(x=s.jsx(ya,{panel:a,className:"size-8"}),t[27]=a,t[28]=x):x=t[28];let T;t[29]!==e?(T=e("sidebar.taskGroupsList.searchChats"),t[29]=e,t[30]=T):T=t[30];let S;t[31]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ws,{size:16}),t[31]=S):S=t[31];let N;t[32]!==c||t[33]!==T?(N=s.jsx(Ae,{"aria-label":T,onClick:c,className:"size-8",children:S}),t[32]=c,t[33]=T,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=s.jsx(Mt,{size:16}),t[37]=w):w=t[37];let C;t[38]!==a.newThread||t[39]!==_?(C=s.jsx(Ae,{"aria-label":_,onClick:a.newThread,className:"size-8",children:w}),t[38]=a.newThread,t[39]=_,t[40]=C):C=t[40];let I;t[41]!==N||t[42]!==C?(I=s.jsxs("div",{className:"flex items-center gap-0.5",children:[N,C]}),t[41]=N,t[42]=C,t[43]=I):I=t[43];let P;t[44]!==x||t[45]!==I?(P=s.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[x,I]}),t[44]=x,t[45]=I,t[46]=P):P=t[46];let M;t[47]!==a?(M=s.jsx("div",{className:"flex max-h-[60vh] min-h-0 flex-col gap-0.5 overflow-y-auto overscroll-contain",children:s.jsx(er,{panel:a})}),t[47]=a,t[48]=M):M=t[48];let A;t[49]!==P||t[50]!==M?(A=s.jsxs(zt,{align:"start",side:"bottom",onOpenAutoFocus:lr,className:"flex w-80 flex-col gap-2 p-2",children:[P,M]}),t[49]=P,t[50]=M,t[51]=A):A=t[51];let D;t[52]!==n||t[53]!==v||t[54]!==A?(D=s.jsxs(Gt,{open:n,onOpenChange:r,children:[v,A]}),t[52]=n,t[53]=v,t[54]=A,t[55]=D):D=t[55];let F;return t[56]!==a.reclaimDialog||t[57]!==a.searchDialog||t[58]!==D?(F=s.jsxs(s.Fragment,{children:[D,a.searchDialog,a.reclaimDialog]}),t[56]=a.reclaimDialog,t[57]=a.searchDialog,t[58]=D,t[59]=F):F=t[59],F}function lr(t){return t.preventDefault()}function or(){const t=$.c(20),e=U(),{threads:n}=lt(),{createNewTask:r}=rt(),i=Ut(),a=Ge();let l;t[0]!==a||t[1]!==n?(l=n.find(k=>k.id===a)?.branch??null,t[0]=a,t[1]=n,t[2]=l):l=t[2];const d=l;let u;t[3]!==i||t[4]!==r||t[5]!==d?(u=()=>{r(i,d)},t[3]=i,t[4]=r,t[5]=d,t[6]=u):u=t[6];const o=u;let c;t[7]!==e?(c=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=c):c=t[8];let f;t[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Mt,{size:16}),t[9]=f):f=t[9];let m;t[10]!==o||t[11]!==c?(m=s.jsx(Oe,{asChild:!0,children:s.jsx("button",{type:"button",onClick:o,"aria-label":c,className:"flex shrink-0 items-center rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:f})}),t[10]=o,t[11]=c,t[12]=m):m=t[12];let h;t[13]!==e?(h=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=h):h=t[14];let g;t[15]!==h?(g=s.jsx(Be,{side:"bottom",children:h}),t[15]=h,t[16]=g):g=t[16];let j;return t[17]!==m||t[18]!==g?(j=s.jsxs(ze,{children:[m,g]}),t[17]=m,t[18]=g,t[19]=j):j=t[19],j}function cr(t){const e=$.c(14),{virtualMcp:n}=t,r=U(),i=Lt(),{navigateToTask:a}=gs(),{create:l}=ot();let d,u;if(e[0]!==i||e[1]!==l||e[2]!==a||e[3]!==r||e[4]!==n){u=Symbol.for("react.early_return_sentinel");e:{const o=zs(n,i);if(!o){u=null;break e}const c=o.mode==="dev";let f;e[7]!==l||e[8]!==a?(f=async p=>{const b=crypto.randomUUID();try{await l({id:b,virtual_mcp_id:p})}catch{}a(b,{virtualMcpId:p})},e[7]=l,e[8]=a,e[9]=f):f=e[9];const m=f,h=(p,b,y)=>s.jsxs("button",{type:"button","aria-pressed":b,"aria-label":p,title:p,onClick:()=>{b||m(o.targetId)},className:Z("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg transition-colors",b?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[s.jsx(y,{className:"size-3.5 shrink-0"}),s.jsx("span",{className:"@max-3xl/panel-header:hidden",children:p})]});let g;e[10]!==r?(g=r("devAgent.devAgentControl.develop"),e[10]=r,e[11]=g):g=e[11];const j=h(g,c,Cs);let k;e[12]!==r?(k=r("devAgent.devAgentControl.live"),e[12]=r,e[13]=k):k=e[13],d=s.jsxs("div",{className:"inline-flex items-center rounded-lg border border-border bg-muted p-0.5 text-xs font-medium",children:[j,h(k,!c,Mn)]})}e[0]=i,e[1]=l,e[2]=a,e[3]=r,e[4]=n,e[5]=d,e[6]=u}else d=e[5],u=e[6];return u!==Symbol.for("react.early_return_sentinel")?u:d}function dr(t){const e=$.c(16),{virtualMcpId:n,taskId:r}=t,{openPanel:i}=Vt();let a;e[0]!==r||e[1]!==n?(a={virtualMcpId:n,taskId:r},e[0]=r,e[1]=n,e[2]=a):a=e[2];const{tabs:l,activeTab:d,mainOpen:u}=Wt(a);if(l.length===0)return null;let o;if(e[3]!==d||e[4]!==u||e[5]!==i||e[6]!==l||e[7]!==n){let f;e[9]!==d||e[10]!==u||e[11]!==i||e[12]!==n?(f=m=>{const h=m.id==="automations"?rs({activeTab:d,mainOpen:u}):u&&m.id===d;return s.jsxs(dt.Tab,{active:h,onClick:()=>{h||(xe("main_panel_tab_clicked",{virtual_mcp_id:n,tab_id:m.id,tab_kind:m.kind,was_active:!1}),i(m.id))},children:[s.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:s.jsx(Ie,{icon:m.icon})}),m.title]},m.id)},e[9]=d,e[10]=u,e[11]=i,e[12]=n,e[13]=f):f=e[13],o=l.map(f),e[3]=d,e[4]=u,e[5]=i,e[6]=l,e[7]=n,e[8]=o}else o=e[8];let c;return e[14]!==o?(c=s.jsx(dt.Tabs,{"data-tour":Es.surfaceTabs,children:o}),e[14]=o,e[15]=c):c=e[15],c}function ur(t){return{threadId:t.routeThreadId,providerKey:t.routeThreadId??t.fallbackKey}}const Je="__mobile-main-panel-tab-select__",tt="main";function fr({tabs:t,activeTab:e,mainOpen:n,t:r}){const i=t.find(l=>l.id===e),a=r("mainPanelTabs.mobileMainPanelTabSelect.mainView");return n?i?.title??a:i?.title??t[0]?.title??a}const mr={kind:"component",Component:Ps},hr={kind:"component",Component:As},pr={kind:"component",Component:Ln},xr={kind:"component",Component:Dn};function gr({tabs:t,overlayEnabled:e,t:n}){return[{value:"chat",title:n("mainPanelTabs.mobileMainPanelTabSelect.chat"),icon:mr},...t.length>0?t.map(r=>({value:r.id,title:r.title,icon:r.icon})):[{value:tt,title:n("mainPanelTabs.mobileMainPanelTabSelect.mainView"),icon:xr}],...e?[{value:"board",title:n("mainPanelTabs.mobileMainPanelTabSelect.tasks"),icon:hr},{value:"files",title:n("mainPanelTabs.mobileMainPanelTabSelect.library"),icon:pr}]:[]]}function br(t){const e=$.c(53),{virtualMcpId:n,taskId:r}=t,i=U(),a=De(),{openPanel:l}=Vt();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},e[0]=d):d=e[0];const u=Se(d);let o;e[1]!==r||e[2]!==n?(o={virtualMcpId:n,taskId:r},e[1]=r,e[2]=n,e[3]=o):o=e[3];const{tabs:c,activeTab:f,mainOpen:m}=Wt(o),{org:h}=oe(),g=On();let j;e[4]!==h.id?(j=ut(h.id),e[4]=h.id,e[5]=j):j=e[5];const k=n===j;let p,b,y,v,x,T,S,N,_,w;if(e[6]!==f||e[7]!==m||e[8]!==a||e[9]!==k||e[10]!==l||e[11]!==h.id||e[12]!==u.org||e[13]!==u.taskId||e[14]!==g||e[15]!==i||e[16]!==c||e[17]!==n){v=Symbol.for("react.early_return_sentinel");e:{const P=gr({tabs:c,overlayEnabled:!!(u.org&&u.taskId),t:i}),M=m?P.find(R=>R.value===f)?.value??tt:"chat",A=P.find(R=>R.value===M),D=A?.title??fr({tabs:c,activeTab:f,mainOpen:m,t:i});let F;e[28]!==a?(F=R=>{a({to:".",search:Y=>({...Y,...sn(R)}),replace:!0})},e[28]=a,e[29]=F):F=e[29];const E=F;let L;e[30]!==k||e[31]!==l||e[32]!==h.id||e[33]!==g||e[34]!==E||e[35]!==n?(L=R=>{if(R!==Je){if(xe("main_panel_tab_clicked",{virtual_mcp_id:n,tab_id:R,source:"mobile_select"}),Os({reportsOnly:g,onReportAgent:k,tabId:R})){l(R,{virtualmcpid:ut(h.id),search:yr});return}if(R==="chat"||R===tt){E(R==="chat"?"chat":"main");return}l(R,{search:jr})}},e[30]=k,e[31]=l,e[32]=h.id,e[33]=g,e[34]=E,e[35]=n,e[36]=L):L=e[36];const H=L,B=P.find(R=>R.value!==M);if(P.length===2&&B){v=s.jsxs("button",{type:"button",onClick:()=>H(B.value),"aria-label":i("mainPanelTabs.mobileMainPanelTabSelect.switchTo",{name:B.title}),className:"flex h-10 min-w-0 max-w-[7.5rem] items-center gap-1.5 rounded-lg px-1.5 text-xs text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(Ie,{icon:B.icon,className:"size-5"})}),s.jsx("span",{className:"min-w-0 truncate",children:B.title})]});break e}b=Rn,_=Je,w=H;let V;e[37]!==i?(V=i("mainPanelTabs.mobileMainPanelTabSelect.view"),e[37]=i,e[38]=V):V=e[38],y=s.jsx(Fn,{"aria-label":V,className:"h-10! w-full min-w-0 max-w-[7.5rem] rounded-lg border-0 bg-transparent px-1.5 text-xs shadow-none [--card-shadow:none]",children:s.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[A&&s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(Ie,{icon:A.icon,className:"size-5"})}),s.jsx("span",{className:"min-w-0 truncate",children:D})]})}),p=En,x="end",T="w-56",e[39]!==D?(S=s.jsx(qt,{value:Je,disabled:!0,hideCheck:!0,className:"hidden",children:D}),e[39]=D,e[40]=S):S=e[40],N=P.map(vr)}e[6]=f,e[7]=m,e[8]=a,e[9]=k,e[10]=l,e[11]=h.id,e[12]=u.org,e[13]=u.taskId,e[14]=g,e[15]=i,e[16]=c,e[17]=n,e[18]=p,e[19]=b,e[20]=y,e[21]=v,e[22]=x,e[23]=T,e[24]=S,e[25]=N,e[26]=_,e[27]=w}else p=e[18],b=e[19],y=e[20],v=e[21],x=e[22],T=e[23],S=e[24],N=e[25],_=e[26],w=e[27];if(v!==Symbol.for("react.early_return_sentinel"))return v;let C;e[41]!==p||e[42]!==x||e[43]!==T||e[44]!==S||e[45]!==N?(C=s.jsxs(p,{align:x,className:T,children:[S,N]}),e[41]=p,e[42]=x,e[43]=T,e[44]=S,e[45]=N,e[46]=C):C=e[46];let I;return e[47]!==b||e[48]!==y||e[49]!==C||e[50]!==_||e[51]!==w?(I=s.jsxs(b,{value:_,onValueChange:w,children:[y,C]}),e[47]=b,e[48]=y,e[49]=C,e[50]=_,e[51]=w,e[52]=I):I=e[52],I}function vr(t){return s.jsx(qt,{value:t.value,children:s.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(Ie,{icon:t.icon})}),s.jsx("span",{className:"min-w-0 truncate",children:t.title})]})},t.value)}function jr(t){return{...t,sidepanel:!1}}function yr(t){return{...t,thread:void 0,sidepanel:!1}}function kr(t,e,n){const r=$.c(33),i=it(),{locator:a}=oe(),l=O.useSyncExternalStore(i.threads.subscribe,i.threads.get),d=O.useSyncExternalStore(i.threadsStatus.subscribe,i.threadsStatus.get);let u;r[0]!==t||r[1]!==l?(u=t===null?null:l.find(x=>x.id===t&&!x.partial)??null,r[0]=t,r[1]=l,r[2]=u):u=r[2];const o=u,[c,f]=O.useState(void 0),[m,h]=O.useState(t);m!==t&&(h(t),f(void 0));let g,j;r[3]!==c||r[4]!==t||r[5]!==o||r[6]!==i||r[7]!==d.kind?(g=()=>{t!==null&&(o||d.kind!=="loading"&&c===void 0&&(f("pending"),i.fetchThreadIntoSlot(t).then(x=>{f(x)})))},j=[t,o,d.kind,c,i],r[3]=c,r[4]=t,r[5]=o,r[6]=i,r[7]=d.kind,r[8]=g,r[9]=j):(g=r[8],j=r[9]),O.useEffect(g,j);let k;r[10]!==n||r[11]!==a||r[12]!==i||r[13]!==e?(k={mutationFn:async x=>i.create({id:x,virtual_mcp_id:e,...n?{branch:n}:{},...Vs(sessionStorage,a,x)})},r[10]=n,r[11]=a,r[12]=i,r[13]=e,r[14]=k):k=r[14];const p=is(k);let b,y;if(r[15]!==p||r[16]!==c||r[17]!==t||r[18]!==o||r[19]!==d.kind?(b=()=>{t!==null&&(o||c===null&&d.kind!=="loading"&&(p.isPending||p.variables!==t&&p.mutate(t)))},y=[t,o,c,d.kind,p],r[15]=p,r[16]=c,r[17]=t,r[18]=o,r[19]=d.kind,r[20]=b,r[21]=y):(b=r[20],y=r[21]),O.useEffect(b,y),t===null){let x;return r[22]===Symbol.for("react.memo_cache_sentinel")?(x={status:"ready",task:null},r[22]=x):x=r[22],x}if(o){let x;return r[23]!==o?(x={status:"ready",task:o},r[23]=o,r[24]=x):x=r[24],x}if(c&&typeof c=="object"){let x;return r[25]!==c?(x={status:"ready",task:c},r[25]=c,r[26]=x):x=r[26],x}if(p.data){let x;return r[27]!==p.data?(x={status:"ready",task:p.data},r[27]=p.data,r[28]=x):x=r[28],x}if(p.isError){let x;return r[29]!==p.error?(x={status:"error",error:p.error},r[29]=p.error,r[30]=x):x=r[30],x}if(p.isPending||d.kind!=="loading"){let x;return r[31]===Symbol.for("react.memo_cache_sentinel")?(x={status:"creating"},r[31]=x):x=r[31],x}let v;return r[32]===Symbol.for("react.memo_cache_sentinel")?(v={status:"loading"},r[32]=v):v=r[32],v}function Sr(t){const e=$.c(13),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=Se(r);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const l=Fe(a);let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d={select:Nr},e[2]=d):d=e[2];const u=ls(d),{org:o}=oe();let c;e[3]!==o||e[4]!==i.agentId||e[5]!==i.legacyView||e[6]!==i.org||e[7]!==u||e[8]!==l?(c=i.org?os({pathname:u,org:i.org,pathAgentId:i.agentId,pathLegacyView:i.legacyView,fallbackAgentId:ke(o.id).id,search:l}):null,e[3]=o,e[4]=i.agentId,e[5]=i.legacyView,e[6]=i.org,e[7]=u,e[8]=l,e[9]=c):c=e[9];const f=c;let m;return e[10]!==n||e[11]!==f?(m=f?s.jsx(ct,{target:f}):n,e[10]=n,e[11]=f,e[12]=m):m=e[12],m}function Nr(t){return t.matches.at(-1)?.pathname??t.location.pathname}function Tr(){const t=$.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const n=Se(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const i=Fe(r),{org:a}=oe(),{org:l,taskId:d}=n;if(!l||d===void 0)return null;let u;return t[2]!==l||t[3]!==a.id||t[4]!==i||t[5]!==d?(u=cs({org:l,taskId:d,fallbackAgentId:ke(a.id).id,search:i}),t[2]=l,t[3]=a.id,t[4]=i,t[5]=d,t[6]=u):u=t[6],u}function _r(){const t=$.c(2),e=Tr();let n;return t[0]!==e?(n=e?s.jsx(ct,{target:e}):null,t[0]=e,t[1]=n):n=t[1],n}function wr(){const t=$.c(6),e=zn(),n=De();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const{preview:i}=Fe(r);if(!e||!i)return null;let a;t[1]!==n?(a=()=>n({to:".",search:Cr}),t[1]=n,t[2]=a):a=t[2];let l;return t[3]!==i||t[4]!==a?(l=s.jsx(Gn,{previewPath:i,onClose:a,showSeeInLibrary:!0}),t[3]=i,t[4]=a,t[5]=l):l=t[5],l}function Cr(t){const{preview:e,...n}=t;return n}const Pr=O.createContext(null);function ts(){return O.useContext(Pr)}function Ar(t){const e=$.c(13),{children:n}=t,r=U(),i=Yt(),a=ts(),l=Ge()!==null;let d;e[0]!==l||e[1]!==i||e[2]!==a?(d=s.jsx(ba,{}),e[0]=l,e[1]=i,e[2]=a,e[3]=d):d=e[3];const u=d;let o;e[4]!==r?(o=r("agentShellLayout.agentShellLayout.chatLoadingError"),e[4]=r,e[5]=o):o=e[5];let c;e[6]!==o?(c=s.jsx("div",{role:"alert",className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:o}),e[6]=o,e[7]=c):c=e[7];const f=n??u;let m;e[8]!==f?(m=s.jsx(Le,{children:f}),e[8]=f,e[9]=m):m=e[9];let h;return e[10]!==c||e[11]!==m?(h=s.jsx(St,{fallback:c,children:m}),e[10]=c,e[11]=m,e[12]=h):h=e[12],h}function Ir(t){const e=$.c(13),{threadId:n,children:r}=t;if(U(),ts(),n===null){let a;return e[0]!==r?(a=s.jsx(ee.ThreadlessProvider,{children:r}),e[0]=r,e[1]=a):a=e[1],a}let i;return e[10]!==r||e[11]!==n?(i=s.jsx(ee.ActiveTaskProvider,{taskId:n,children:r}),e[10]=r,e[11]=n,e[12]=i):i=e[12],i}function Mr(t){const e=$.c(3),{onNewTaskRef:n,createNewTask:r}=t;let i;return e[0]!==r||e[1]!==n?(i=()=>(n.current=r,()=>{n.current=null}),e[0]=r,e[1]=n,e[2]=i):i=e[2],O.useLayoutEffect(i),null}function Lr({virtualMcpId:t,hasActiveGithubRepo:e,sandboxMap:n,children:r}){const i=U(),{currentBranch:a,activeTask:l,setCurrentTaskBranch:d}=Ee(),u=Yt(),o="agent-sandbox",{data:c}=$e.useSession(),f=c?.user?.id,m=!bs({isDesktopApp:u,harnessId:l?.harness_id}),h=Xs({agentSandboxMap:n,threadSandboxMap:l?.metadata?.sandboxMap,userId:f,ownerId:l?.created_by,branch:a}),g=e||Gs(l?.metadata),j=O.useRef(null),k=m&&Zs({threadLoaded:!!l,isOwner:!!f&&l?.created_by===f,hasActiveGithubRepo:g,branch:a??null,attempted:j.current===(l?.id??null)});O.useEffect(()=>{!k||!l||(j.current=l.id,d(Dt(c?.user?.name||c?.user?.email?.split("@")[0])))},[k,l,c,d]);const p=It(t),b=ce(t),y=Rt(b,a),{releases:v,createRelease:x}=Hs(t),S=!!f&&l?.created_by===f&&!!a&&a!==y&&!v.some(A=>A.branch===a),N=O.useRef(null);O.useEffect(()=>{!S||!a||N.current!==a&&(N.current=a,x({branch:a,name:Ks(v,i("thread.branchPicker.defaultVersionName")),color:Us(v.length),createdBy:f,createdAt:new Date().toISOString()}).catch(()=>{}))},[S,a,v,x,f,i]);const _=p.resolved?p.runtime:null,w=Qs(t,a??void 0),I=(f&&a?Un(h?.[f]?.[a]):{})[o]??null,P=I?.previewUrl??null,M=m&&_!=="cms"&&(!!I||w);return m?_==="cms"?s.jsx(pt,{children:r},`${t}:${a??"no-branch"}:${l?.id??""}`):s.jsx(Js,{virtualMcpId:t,branch:a??null,previewUrl:P,enabled:M,children:s.jsx(en,{executionEnabled:m,virtualMcpId:t,branch:a??null,userId:f??null,hasActiveGithubRepo:g,vmEntry:I,threadId:l?.id??null,children:s.jsx(pt,{children:r},`${t}:${a??"no-branch"}:${l?.id??""}`)})},l?.id??"no-thread"):s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsx("div",{className:"flex h-full rounded-[0.75rem] bg-background card-shadow",children:s.jsx(Et,{image:s.jsx(nt,{size:48,className:"text-muted-foreground"}),title:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWeb"),description:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWebDescription")})})})}function $r(){const t=$.c(16),e=U(),{toggleSidebar:n}=hs(),{virtualMcpId:r,taskId:i}=Ee();let a;t[0]!==e?(a=e("layouts.shellControls.toggleSidebar"),t[0]=e,t[1]=a):a=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ms,{size:16}),t[2]=l):l=t[2];let d;t[3]!==a||t[4]!==n?(d=s.jsx(Ae,{className:"md:hidden",onClick:n,"aria-label":a,children:l}),t[3]=a,t[4]=n,t[5]=d):d=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ir,{}),t[6]=u):u=t[6];let o;t[7]!==d?(o=s.jsxs(Ye.Topbar.Left,{children:[d,u]}),t[7]=d,t[8]=o):o=t[8];let c;t[9]!==i||t[10]!==r?(c=s.jsx("div",{className:"min-w-0 md:hidden",children:s.jsx(br,{virtualMcpId:r,taskId:i})}),t[9]=i,t[10]=r,t[11]=c):c=t[11];let f;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ye.Topbar.Right,{className:"shrink-0",children:s.jsx(or,{})}),t[12]=f):f=t[12];let m;return t[13]!==o||t[14]!==c?(m=s.jsxs(Ye.Topbar,{className:"border-b border-border/60 px-3",children:[o,c,f]}),t[13]=o,t[14]=c,t[15]=m):m=t[15],m}function Dr(t){const e=$.c(18),{layout:n,onNewTaskRef:r,createNewTask:i}=t,{virtualMcpId:a,taskId:l}=Ee(),d=ce(a),u=$n()??"overview";let o;e[0]!==i||e[1]!==r?(o=s.jsx(Mr,{onNewTaskRef:r,createNewTask:i}),e[0]=i,e[1]=r,e[2]=o):o=e[2];let c;e[3]!==l||e[4]!==a?(c=s.jsx(dr,{virtualMcpId:a,taskId:l}),e[3]=l,e[4]=a,e[5]=c):c=e[5];let f;e[6]!==d?(f=d&&s.jsx(cr,{virtualMcp:d}),e[6]=d,e[7]=f):f=e[7];let m,h;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ht.Thread,{topbar:s.jsx($r,{}),children:s.jsx(Ar,{})}),h=s.jsx(Ct,{}),e[8]=m,e[9]=h):(m=e[8],h=e[9]);let g;e[10]!==u||e[11]!==n||e[12]!==c||e[13]!==f?(g=s.jsxs(ht,{...n,contentKey:u,contentNavigation:c,contentActions:f,children:[m,h]}),e[10]=u,e[11]=n,e[12]=c,e[13]=f,e[14]=g):g=e[14];let j;return e[15]!==o||e[16]!==g?(j=s.jsxs(s.Fragment,{children:[o,g]}),e[15]=o,e[16]=g,e[17]=j):j=e[17],j}function Fr(){const t=U(),e=De(),n=on(),{create:r}=ot(),{org:i}=oe(),l=Se({strict:!1}).org??"",d=Fe({strict:!1}),u=Ge(),o=Ut(),c=Ht(),[f]=O.useState(()=>crypto.randomUUID()),{data:m}=$e.useSession(),[h]=O.useState(()=>Dt(m?.user?.name||m?.user?.email?.split("@")[0])),g=it(),j=O.useSyncExternalStore(g.threads.subscribe,g.threads.get),k=O.useSyncExternalStore(g.threadsStatus.subscribe,g.threadsStatus.get),p=ce(o),b=!!(p&&Ot(p)),y=Rt(p,null),v=kr(u,o,h);va(v.status==="ready"?v.task:null);const x=p?.metadata?.ui?.layout??null,T=x?{defaultMainView:x.defaultMainView??null,chatDefaultOpen:x.chatDefaultOpen??null}:null,S=nn(T),{threadId:N,providerKey:_}=ur({routeThreadId:u,fallbackKey:f}),w=async()=>{const M=crypto.randomUUID(),A=j.find(D=>D.id===N)?.branch??null;try{await r({id:M,virtual_mcp_id:o,...A?{branch:A}:{}})}catch{}n(M,()=>({}))},C=O.useRef(null);O.useEffect(()=>{const M=A=>{Bs(A)&&A.shiftKey&&A.code==="KeyS"&&!A.repeat&&(A.preventDefault(),C.current?.())};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[]);const I=v.status==="ready"?v.task:null,P=I?.virtual_mcp_id;if(I&&P&&!cn({routeAgentId:o,threadAgentId:P})){const M=ds({org:l,agentId:P,superAgentId:ke(i.id).id});return s.jsx(ct,{target:{route:M,search:{thread:I.id,sidepanel:d.sidepanel,mainpanel:d.mainpanel,autosend:d.autosend}}})}if(u===null&&c&&p){if(k.kind==="loading")return s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background card-shadow rounded-[0.75rem] text-sm text-muted-foreground",children:[s.jsx(je,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})});const A=Ys(j,o,m?.user?.id,Ft(p.metadata),b,{baseBranch:y})?.id??(b?f:null);if(A)return s.jsx(us,{to:".",replace:!0,search:D=>({...D,thread:A})})}return v.status==="creating"||v.status==="loading"?s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background card-shadow rounded-[0.75rem] text-sm text-muted-foreground",children:[s.jsx(je,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})}):v.status==="error"?s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"alert",className:"flex flex-col h-full items-center justify-center gap-2 bg-background card-shadow rounded-[0.75rem] p-8 text-sm",children:[s.jsx("div",{className:"font-medium",children:t("agentShellLayout.agentShellLayout.taskUnavailable")}),s.jsx("div",{className:"text-muted-foreground",children:v.error.message})]})}):p?s.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:s.jsx(ee.Provider,{virtualMcpId:o,task:v.status==="ready"?v.task:null,children:s.jsx(Lr,{virtualMcpId:o,hasActiveGithubRepo:b,sandboxMap:p.metadata?.sandboxMap,children:s.jsx(Ir,{threadId:N,children:s.jsx(Le,{children:s.jsx(Dr,{layout:S,onNewTaskRef:C,createNewTask:w})})},_)})},o)}):s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:s.jsx(Et,{image:s.jsx(nt,{size:48,className:"text-muted-foreground"}),title:t("agentShellLayout.agentShellLayout.agentNotFound"),description:t("agentShellLayout.agentShellLayout.agentNotFoundDescription",{virtualMcpId:o}),actions:s.jsx(fs,{variant:"outline",onClick:()=>e({to:"/$org",params:{org:l}}),children:t("agentShellLayout.agentShellLayout.goToOrgHome")})})})})}function Ho(){const t=$.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const n=Se(e);if(n.taskId!==void 0){let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(_r,{}),t[1]=i):i=t[1],i}if(n._splat!==void 0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ct,{}),t[2]=i):i=t[2],i}let r;return t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Le,{children:s.jsx(Sr,{children:s.jsx(Bn,{children:s.jsxs(Hn,{children:[s.jsx(Fr,{}),s.jsx(wr,{})]})})})}),t[3]=r):r=t[3],r}export{Ho as default};
|