decocms 4.502.2 → 4.502.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-BmpX0aJ4.js → ActiveShapeUtils-BSxdgR9C.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-BugQG9bV.js → AlertCircle-ezsenyDA.js} +1 -1
  3. package/dist/client/assets/{AreaChart-C2JGxQiA.js → AreaChart-ZKSUgQFl.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-BsOtfvqw.js → ArrowLeft-XWagtiKt.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BM60-fZY.js → ArrowUp-1Pn6KcFo.js} +1 -1
  6. package/dist/client/assets/{BarChart-B7UShXEl.js → BarChart-DJ64O8MN.js} +1 -1
  7. package/dist/client/assets/{Building02-DqK4SREZ.js → Building02-DVmqpekj.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-B4irlNQB.js → CategoricalChart-CNSzufmI.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-DIUFnJQp.js → CheckCircle-CN4P8qA2.js} +1 -1
  10. package/dist/client/assets/{ChevronSelectorVertical-CRMiEVEY.js → ChevronSelectorVertical-t7oZTVYb.js} +1 -1
  11. package/dist/client/assets/{ChevronUp-C9gm2RHA.js → ChevronUp-DgF_0akr.js} +1 -1
  12. package/dist/client/assets/{Copy01-BrqDGrTX.js → Copy01-DD7TBaxd.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-C7MhbtAI.js → CreditCard01-BqWXWcAN.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-DjBJNxxU.js → DotsVertical-D63daqR4.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-Duc4DanJ.js → ErrorBarContext-B4iJvc9K.js} +1 -1
  16. package/dist/client/assets/{Globe04-Bi1qDXFD.js → Globe04-CAZFyv9C.js} +1 -1
  17. package/dist/client/assets/{Image01-LmX-9DTg.js → Image01-BmLj4iEQ.js} +1 -1
  18. package/dist/client/assets/{Key01-D7fc2of0.js → Key01-BCoXSbsF.js} +1 -1
  19. package/dist/client/assets/{Link01-UOxGnkqg.js → Link01-DKrKZRUt.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-D4fcNp0y.js → LinkBroken01-DQvdTTgG.js} +1 -1
  21. package/dist/client/assets/{Monitor01-zCUpqs5C.js → Monitor01-BL49Kh8w.js} +1 -1
  22. package/dist/client/assets/{Play-BaMMHzUS.js → Play-3PdWOSem.js} +1 -1
  23. package/dist/client/assets/{Plus-DBwsZRbL.js → Plus-BGSMJ3F-.js} +1 -1
  24. package/dist/client/assets/{SearchMd-Cz9CjV4u.js → SearchMd-gvLMH1IR.js} +1 -1
  25. package/dist/client/assets/{Sector-DRzP1YgK.js → Sector-B3DAIw7y.js} +1 -1
  26. package/dist/client/assets/{ShoppingBag01-FE4oAEwY.js → ShoppingBag01-4HryX9q-.js} +1 -1
  27. package/dist/client/assets/{Sun-lUDK8Dny.js → Sun-xJ1qtoxz.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-BLoNOmQx.js → SwitchHorizontal01-CL7aXkdk.js} +1 -1
  29. package/dist/client/assets/{Tool01-BYtrXXg0.js → Tool01-DmCjPcwM.js} +1 -1
  30. package/dist/client/assets/{Trash01-DmGIq4LE.js → Trash01-B0MFAKuS.js} +1 -1
  31. package/dist/client/assets/{Upload01-B1KubIEG.js → Upload01-AYcSEbb9.js} +1 -1
  32. package/dist/client/assets/{User01-DxYW6D1x.js → User01-CvrqyM7d.js} +1 -1
  33. package/dist/client/assets/{UserSquare-B3hi5v4G.js → UserSquare-Bkrct5dy.js} +1 -1
  34. package/dist/client/assets/{Users01-Dg9yGM1q.js → Users01-DavPAvfh.js} +1 -1
  35. package/dist/client/assets/{XAxis-BriqOO10.js → XAxis-FlBA9n9J.js} +1 -1
  36. package/dist/client/assets/{XClose-D_NlSxSm.js → XClose-BIF2YR7O.js} +1 -1
  37. package/dist/client/assets/{ZoomOut-BpMDqvoU.js → ZoomOut-C8fNa3eF.js} +1 -1
  38. package/dist/client/assets/{access-gate-DawpkWaC.js → access-gate-BZb7qW2_.js} +1 -1
  39. package/dist/client/assets/{add-connection-dialog-lyugU_mj.js → add-connection-dialog-7u1gOtS6.js} +1 -1
  40. package/dist/client/assets/{agent-analytics-DEQNBU8x.js → agent-analytics-VOh2JKx_.js} +1 -1
  41. package/dist/client/assets/agent-app-Cy-7mlbG.js +1 -0
  42. package/dist/client/assets/{agent-assets-DpD_FYPJ.js → agent-assets-DfhNQhte.js} +1 -1
  43. package/dist/client/assets/{agent-automation-y8Q_blPP.js → agent-automation-aOpYgFy7.js} +1 -1
  44. package/dist/client/assets/{agent-automations-G_wOHGxQ.js → agent-automations-x4khpOSq.js} +1 -1
  45. package/dist/client/assets/{agent-connect-sources-0w-hFhuF.js → agent-connect-sources-CrF1lRWL.js} +1 -1
  46. package/dist/client/assets/agent-deck-u2JWs68G.js +1 -0
  47. package/dist/client/assets/{agent-e2e-DDS2OBYo.js → agent-e2e-CHwlZzp2.js} +1 -1
  48. package/dist/client/assets/{agent-experiments-CDaNVjiN.js → agent-experiments-DX3CG9k0.js} +1 -1
  49. package/dist/client/assets/{agent-file-CZwBMDPX.js → agent-file-D1m_qTrV.js} +1 -1
  50. package/dist/client/assets/{agent-hosting-CDM9c3HL.js → agent-hosting-Dcgfj4zI.js} +1 -1
  51. package/dist/client/assets/{agent-icon-Cwi3uRdu.js → agent-icon-D4A6sHBt.js} +1 -1
  52. package/dist/client/assets/agent-library-D67pzeYP.js +1 -0
  53. package/dist/client/assets/agent-library-file-CZJsu_ea.js +1 -0
  54. package/dist/client/assets/{agent-monitor-DgbGzFfm.js → agent-monitor-douBnctS.js} +1 -1
  55. package/dist/client/assets/{agent-overview-D7sXtedV.js → agent-overview-B5GH8Rkv.js} +1 -1
  56. package/dist/client/assets/{agent-releases-DBGhKiDv.js → agent-releases-BlVq1e_9.js} +1 -1
  57. package/dist/client/assets/agent-settings-5-SGNKaX.js +1 -0
  58. package/dist/client/assets/{agent-site-editor-CPneBPX9.js → agent-site-editor-C8GxpVWe.js} +3 -3
  59. package/dist/client/assets/agent-site-editor-code-D4faSpmS.js +2 -0
  60. package/dist/client/assets/agent-site-editor-content-BmAOigay.js +1 -0
  61. package/dist/client/assets/agent-site-editor-preview-DiMqUzkm.js +1 -0
  62. package/dist/client/assets/agent-view-CK7HM1il.js +1 -0
  63. package/dist/client/assets/{agent-view-guard-B7DCW97m.js → agent-view-guard-BqFtgH83.js} +1 -1
  64. package/dist/client/assets/{agents-list-WKtrnsCY.js → agents-list-DRk1BKzK.js} +1 -1
  65. package/dist/client/assets/{ai-providers-gwsES712.js → ai-providers-C1NEDtlg.js} +1 -1
  66. package/dist/client/assets/{alert-DD0xrZ6s.js → alert-Jt-lWiyr.js} +1 -1
  67. package/dist/client/assets/{alert-dialog-Cww2cCKj.js → alert-dialog-Bw24kVyb.js} +1 -1
  68. package/dist/client/assets/{analytics-sections-fsDdSYtz.js → analytics-sections-CSGEHq6o.js} +1 -1
  69. package/dist/client/assets/{api-keys-C4RupExd.js → api-keys-Dl5THCry.js} +1 -1
  70. package/dist/client/assets/api-keys-rr9eHiX_.js +1 -0
  71. package/dist/client/assets/{app-editor-BunD9Cep.js → app-editor-CwYBhRA6.js} +1 -1
  72. package/dist/client/assets/{asset-utils-B7vSk_IG.js → asset-utils-DWQUDlWC.js} +1 -1
  73. package/dist/client/assets/{auth-d1Zn25hw.js → auth-CxFoeet-.js} +1 -1
  74. package/dist/client/assets/{auth-catchall-DXOnI1Dn.js → auth-catchall-wTTbbvcB.js} +1 -1
  75. package/dist/client/assets/{auth-entry-QKE13w72.js → auth-entry-CHhgR4id.js} +1 -1
  76. package/dist/client/assets/{auth-split-layout-BOn9jzuY.js → auth-split-layout-DHbd5zbD.js} +1 -1
  77. package/dist/client/assets/{authenticate-and-persist-oauth-p8iXxMbw.js → authenticate-and-persist-oauth-D6-DRm7Z.js} +1 -1
  78. package/dist/client/assets/{automation-list-row-aeiODfl-.js → automation-list-row-BVDOJL2t.js} +1 -1
  79. package/dist/client/assets/{automation-runs-gnGbUEYl.js → automation-runs-jswuOSPW.js} +1 -1
  80. package/dist/client/assets/{automations-D6uaxrsR.js → automations-BPz-wjFv.js} +1 -1
  81. package/dist/client/assets/{autosend-DkgNxXhw.js → autosend-BP7dIixd.js} +1 -1
  82. package/dist/client/assets/{avatar-Bp-EkB-V.js → avatar-BmEw6w6S.js} +1 -1
  83. package/dist/client/assets/{badge-BIePf0xK.js → badge-DEUubLaF.js} +1 -1
  84. package/dist/client/assets/{block-document-D9afNZe_.js → block-document-Bybf3vEH.js} +1 -1
  85. package/dist/client/assets/{blocks-preview-workspace-context-CVDMxLIY.js → blocks-preview-workspace-context--3frzfSc.js} +1 -1
  86. package/dist/client/assets/{blocks-tab-states-Dgf9O_BB.js → blocks-tab-states-naQuVzsL.js} +3 -3
  87. package/dist/client/assets/{blog-schema-D_8LQntk.js → blog-schema-Cp6WcU58.js} +1 -1
  88. package/dist/client/assets/{board-analytics-QsikkAwD.js → board-analytics-C8ltYk1N.js} +1 -1
  89. package/dist/client/assets/{buckets-CELYezv2.js → buckets-bUK4w-wv.js} +1 -1
  90. package/dist/client/assets/{build-improve-prompt-doc-d10qBCA_.js → build-improve-prompt-doc-BhyCVv20.js} +1 -1
  91. package/dist/client/assets/{calendar-BnpyhDmY.js → calendar-9j-mqApB.js} +1 -1
  92. package/dist/client/assets/{capability-load-error-D8PnCnVx.js → capability-load-error-yDSS8G5I.js} +1 -1
  93. package/dist/client/assets/{category-editor-BosHSdme.js → category-editor-CsYCI60-.js} +1 -1
  94. package/dist/client/assets/{chart-Bv9NYntf.js → chart-DezRUEbd.js} +1 -1
  95. package/dist/client/assets/{chat-context-CKK4nwlA.js → chat-context-CkzpVzP2.js} +1 -1
  96. package/dist/client/assets/{chat-draft-BMAMpVi3.js → chat-draft-DWoo8adU.js} +1 -1
  97. package/dist/client/assets/{checkbox-Dwjm_TLd.js → checkbox-JNUYg61n.js} +1 -1
  98. package/dist/client/assets/{choose-editor-CZoejY4P.js → choose-editor-DOmwg3bb.js} +1 -1
  99. package/dist/client/assets/{cli-auth-success-B_GTleKO.js → cli-auth-success-CqsVLwAX.js} +1 -1
  100. package/dist/client/assets/{client-icons-rqhSDiCg.js → client-icons-Bwor7VIE.js} +1 -1
  101. package/dist/client/assets/cms-settings-editor-BQ-ZfMjM.js +1 -0
  102. package/dist/client/assets/{collapsible-BEHE2idT.js → collapsible-Dzdq3pSP.js} +1 -1
  103. package/dist/client/assets/{collection-detail-CEB1twCS.js → collection-detail-Cgelc8Mb.js} +1 -1
  104. package/dist/client/assets/{collection-display-button-CZETvC3F.js → collection-display-button-ByLAV5dY.js} +1 -1
  105. package/dist/client/assets/{collection-search-mDMHjO22.js → collection-search-Bett-OVD.js} +1 -1
  106. package/dist/client/assets/{collection-table-wrapper-BTz_B-8u.js → collection-table-wrapper-BwA0TEGQ.js} +1 -1
  107. package/dist/client/assets/{collection-tabs-C8f6Only.js → collection-tabs-DXjqVmA6.js} +1 -1
  108. package/dist/client/assets/{column-rules-CHHzpXer.js → column-rules-2b0FUhGT.js} +1 -1
  109. package/dist/client/assets/{combobox-DsvKNdY8.js → combobox-CTVgkErb.js} +1 -1
  110. package/dist/client/assets/{command-D2C8egnH.js → command-MB9q2Bfp.js} +1 -1
  111. package/dist/client/assets/{companion-mcps-section-980W-E9y.js → companion-mcps-section-WvUH8gDg.js} +1 -1
  112. package/dist/client/assets/{config-Df4GVvvj.js → config-BAMpwNkJ.js} +1 -1
  113. package/dist/client/assets/{connect-BCz-doDt.js → connect-BiJ195BR.js} +1 -1
  114. package/dist/client/assets/{connect-layout-dj6lGUOP.js → connect-layout-D-p04rP3.js} +1 -1
  115. package/dist/client/assets/{connection-CXmYeQRu.js → connection-DBgzwh-b.js} +1 -1
  116. package/dist/client/assets/{connection-card-BnbrpDH3.js → connection-card-C7m_7jQA.js} +1 -1
  117. package/dist/client/assets/{connection-detail-DgPXb5ec.js → connection-detail-BSvB999D.js} +1 -1
  118. package/dist/client/assets/{connection-form-helpers-a4JD1Ns8.js → connection-form-helpers-DJxQ1TYC.js} +1 -1
  119. package/dist/client/assets/{connections-Cywtpg_p.js → connections-BH5Tkpsh.js} +1 -1
  120. package/dist/client/assets/{content-tab-DJpFcjvc.js → content-tab-dqeIiRI4.js} +3 -3
  121. package/dist/client/assets/{context-D3qk5qiN.js → context-CtsgmNcA.js} +1 -1
  122. package/dist/client/assets/{context-menu-BAv_ihvH.js → context-menu-DMMg9CvV.js} +1 -1
  123. package/dist/client/assets/{core.esm-D0fLNP6n.js → core.esm-DEpuNZ-Z.js} +1 -1
  124. package/dist/client/assets/{create-organization-dialog-Dz2w339w.js → create-organization-dialog-dwl05WWi.js} +1 -1
  125. package/dist/client/assets/{daily-pulse-BvFEfYSA.js → daily-pulse-ZuOVF8uj.js} +1 -1
  126. package/dist/client/assets/{discover-LQfpS4xG.js → discover-BWl5fHPo.js} +1 -1
  127. package/dist/client/assets/{domain-settings-B0WV9_Uz.js → domain-settings-CPOfvf7F.js} +1 -1
  128. package/dist/client/assets/{drawer-C7TJoqXz.js → drawer-0WwoG1lv.js} +1 -1
  129. package/dist/client/assets/{editor-r9_MTJH5.js → editor-DMSnXQVS.js} +1 -1
  130. package/dist/client/assets/{editor-classes-B9HFPeRc.js → editor-classes-_D3aVIkt.js} +1 -1
  131. package/dist/client/assets/{empty-state-DXyqmsSi.js → empty-state-Ch_8FU-6.js} +1 -1
  132. package/dist/client/assets/{empty-state-ChkfcEnf.js → empty-state-D86dkAEs.js} +1 -1
  133. package/dist/client/assets/{extract-connection-data-B2gWRdBp.js → extract-connection-data-CienK9Kp.js} +1 -1
  134. package/dist/client/assets/{feature-gate-B6qb42zy.js → feature-gate-DxADFYEr.js} +1 -1
  135. package/dist/client/assets/{feature-paywall-DXx7v-jJ.js → feature-paywall-Bl1dj-EJ.js} +1 -1
  136. package/dist/client/assets/{file-explorer-B67HF6Wo.js → file-explorer-CByrrLxR.js} +1 -1
  137. package/dist/client/assets/{file-preview-Baou4Z0N.js → file-preview-DTJTxkww.js} +1 -1
  138. package/dist/client/assets/{file-share-button-DtVBXYxU.js → file-share-button-DS4I5txo.js} +1 -1
  139. package/dist/client/assets/{file-type-icon-C2mdy7vI.js → file-type-icon-CkYEjqoY.js} +1 -1
  140. package/dist/client/assets/flat-project-BwbxsLnc.js +1 -0
  141. package/dist/client/assets/{folder-icon-Bqx-rRTJ.js → folder-icon-CbWhX04z.js} +1 -1
  142. package/dist/client/assets/{form-DDdiF5DN.js → form-QiGH5N0B.js} +1 -1
  143. package/dist/client/assets/{general-JuFqcNqn.js → general-EGzzrvYz.js} +1 -1
  144. package/dist/client/assets/{home-UcHgTtiG.js → home-Bch3495O.js} +1 -1
  145. package/dist/client/assets/{hosted-publish-feedback-5DTVDnQ-.js → hosted-publish-feedback-CkiqNKkc.js} +1 -1
  146. package/dist/client/assets/{icon-button-DfjCa6Mk.js → icon-button-D8YCRkH3.js} +1 -1
  147. package/dist/client/assets/{index-D5I6z1z8.js → index-2oVSUqBv.js} +1 -1
  148. package/dist/client/assets/{index-BHzdhQYD.js → index-BHsQFo2r.js} +1 -1
  149. package/dist/client/assets/{index-sLNiMwXT.js → index-BQmgF11e.js} +1 -1
  150. package/dist/client/assets/{index-DCg7x8H-.js → index-BhNYHVP1.js} +1 -1
  151. package/dist/client/assets/{index-BlWeDA0T.js → index-C4rtGZhj.js} +3 -3
  152. package/dist/client/assets/{index-CCq4aC_-.js → index-C7oyzWQm.js} +3 -3
  153. package/dist/client/assets/{index-DrHP_BcE.js → index-C9L_7jwF.js} +1 -1
  154. package/dist/client/assets/{index-2M41MwRq.js → index-CsA2bVbS.js} +1 -1
  155. package/dist/client/assets/{index-BuXV8w2T.js → index-CswhgI6v.js} +1 -1
  156. package/dist/client/assets/{index-BOey0PQ3.js → index-CuaYFVYi.js} +1 -1
  157. package/dist/client/assets/{index-D1I5UKBv.js → index-DMvNt2yg.js} +1 -1
  158. package/dist/client/assets/{index-Cb4Qh-54.js → index-DtX8u4h5.js} +1 -1
  159. package/dist/client/assets/{index-CYLF_RCH.js → index-NEsUnXIa.js} +1 -1
  160. package/dist/client/assets/{index-BVXKUS4M.js → index-i3pR_VKW.js} +1 -1
  161. package/dist/client/assets/{index-redirect-BL8ikpY8.js → index-redirect-Ced0s2QX.js} +1 -1
  162. package/dist/client/assets/{index-LPxqYo8X.js → index-x_aJQLvk.js} +1 -1
  163. package/dist/client/assets/{infiniteQueryObserver-C9osZa8h.js → infiniteQueryObserver-DRgbaZZO.js} +1 -1
  164. package/dist/client/assets/{infra-billing-Cs3idU5N.js → infra-billing-DtIbIUN4.js} +1 -1
  165. package/dist/client/assets/{input-BSKhVE-B.js → input-Aj2kXTDz.js} +1 -1
  166. package/dist/client/assets/{input-3uLsKqBB.js → input-BXtqV7BY.js} +3 -3
  167. package/dist/client/assets/{integration-icon-BRfynNZ5.js → integration-icon-B-VuBONI.js} +1 -1
  168. package/dist/client/assets/{jira-icon-KByV_Mf3.js → jira-icon-hzyShKUY.js} +1 -1
  169. package/dist/client/assets/{label-CCf767lm.js → label-BjPw9Rfi.js} +1 -1
  170. package/dist/client/assets/{layout-COMw43Ge.js → layout-5pLw498Y.js} +1 -1
  171. package/dist/client/assets/{legacy-agents-deep-bTO0GYdo.js → legacy-agents-deep-CxZxvx2y.js} +1 -1
  172. package/dist/client/assets/{legacy-main-redirect-TCc947lk.js → legacy-main-redirect-C7tMt1xT.js} +1 -1
  173. package/dist/client/assets/library-iXbb4Z9h.js +1 -0
  174. package/dist/client/assets/{library-tab-BGwlABCU.js → library-tab-CMc2XXjq.js} +1 -1
  175. package/dist/client/assets/{login-Cs3tkGZ_.js → login-Jzazo7Mm.js} +1 -1
  176. package/dist/client/assets/{markdown-BRIlR7nZ.js → markdown-Fzwq5r4L.js} +1 -1
  177. package/dist/client/assets/{mcp-app-renderer-BdWVQtZT.js → mcp-app-renderer-CLrd0dRs.js} +1 -1
  178. package/dist/client/assets/{mcp-oauth-Wpa3RhmZ.js → mcp-oauth-Biav5sbQ.js} +1 -1
  179. package/dist/client/assets/{mcp-oauth-CbRV1ySf.js → mcp-oauth-xTPg9JeG.js} +1 -1
  180. package/dist/client/assets/{members-D2nKnBqd.js → members-CdvpgtKw.js} +1 -1
  181. package/dist/client/assets/{memory-BOidyMfA.js → memory-y9e4Ido5.js} +1 -1
  182. package/dist/client/assets/{mini-report-page-Dvm9KZA4.js → mini-report-page-MTRv9XKL.js} +1 -1
  183. package/dist/client/assets/{mock-board-D7x3oR1J.js → mock-board-CMGHUOrw.js} +1 -1
  184. package/dist/client/assets/{monaco-editor-CGec7a_K.js → monaco-editor-BfdWIqSi.js} +1 -1
  185. package/dist/client/assets/{monitoring-stats-row-BBfe42aa.js → monitoring-stats-row-DxnqczB_.js} +1 -1
  186. package/dist/client/assets/{multi-select-CWeD2kOU.js → multi-select-BHYZFxI5.js} +1 -1
  187. package/dist/client/assets/{mustache-CwHM8aj-.js → mustache-DhZE0kvx.js} +1 -1
  188. package/dist/client/assets/{new-project-dialog-D9WaXvgl.js → new-project-dialog-D0Tv538i.js} +1 -1
  189. package/dist/client/assets/{oauth-callback-ai-provider-CgO92uMO.js → oauth-callback-ai-provider-DrLQ8Q2N.js} +1 -1
  190. package/dist/client/assets/{oauth-callback-BdiwSco0.js → oauth-callback-po8q6AyA.js} +1 -1
  191. package/dist/client/assets/{onboarding-C0FoRXam.js → onboarding-DrXh1YvN.js} +1 -1
  192. package/dist/client/assets/{openai-conversation-DScTerkb.js → openai-conversation-BH8Fgesh.js} +1 -1
  193. package/dist/client/assets/{optimistic-project-sidebar-views--iSxVboR.js → optimistic-project-sidebar-views-D__5Cr6g.js} +1 -1
  194. package/dist/client/assets/{organization-choice-BfKg9bh6.js → organization-choice-C0En1OpW.js} +1 -1
  195. package/dist/client/assets/{orgs-DuBdGAZM.js → orgs-CK_DfZKd.js} +1 -1
  196. package/dist/client/assets/{page-seo-form-DobjM56n.js → page-seo-form-D1btP2ap.js} +1 -1
  197. package/dist/client/assets/{pair-Boroas12.js → pair-xLeCyNWu.js} +1 -1
  198. package/dist/client/assets/{plan-ladder-DRlbA6Oe.js → plan-ladder-DzICO7G_.js} +1 -1
  199. package/dist/client/assets/{popover-C86-20Mm.js → popover-BpfU2ryl.js} +1 -1
  200. package/dist/client/assets/{post-calendar-BCVyphrd.js → post-calendar-KeJhSxdr.js} +1 -1
  201. package/dist/client/assets/{post-editor-BcCUjE05.js → post-editor-CwWzdA0E.js} +1 -1
  202. package/dist/client/assets/{preview-content-Dk4Scdb5.js → preview-content-CcwX4f0y.js} +1 -1
  203. package/dist/client/assets/{preview-dialog-BP2Zt8Py.js → preview-dialog-B4mPpBCx.js} +1 -1
  204. package/dist/client/assets/{preview-panel-BGjEJtqj.js → preview-panel-DBxZxCWH.js} +1 -1
  205. package/dist/client/assets/{preview-tab-DJ2raYQ6.js → preview-tab-aiSzbsJL.js} +3 -3
  206. package/dist/client/assets/{product-picker-dialog-g66EoJ_T.js → product-picker-dialog-BiyexHdY.js} +1 -1
  207. package/dist/client/assets/{profile-BT5VjyCv.js → profile-DQcWjPxa.js} +1 -1
  208. package/dist/client/assets/{project-app-view-DmFCm9cm.js → project-app-view-Cfg5pwFE.js} +1 -1
  209. package/dist/client/assets/{project-feed-B4yf-56T.js → project-feed-CGmAQDLM.js} +1 -1
  210. package/dist/client/assets/{project-icon-CJp8KUWK.js → project-icon-BLicVbcB.js} +1 -1
  211. package/dist/client/assets/project-reports-BT-5gixX.js +1 -0
  212. package/dist/client/assets/project-tasks-BVM_y4Ay.js +1 -0
  213. package/dist/client/assets/{projects-7LPBT4kF.js → projects-BuXCzkbr.js} +1 -1
  214. package/dist/client/assets/{projects-empty-state-Bwas41PR.js → projects-empty-state-CRQsU5Mq.js} +1 -1
  215. package/dist/client/assets/{prompts-BVvVWZvL.js → prompts-CyMiInu-.js} +1 -1
  216. package/dist/client/assets/record-editor-Bh24cg7u.js +1 -0
  217. package/dist/client/assets/{redirect-editor-CBUBt5If.js → redirect-editor-Cft_OJ74.js} +1 -1
  218. package/dist/client/assets/{reports-BEw3YAN9.js → reports-DINK48W4.js} +1 -1
  219. package/dist/client/assets/reports-EeF58y4M.js +1 -0
  220. package/dist/client/assets/{reports-onboarding-C2RC2ok9.js → reports-onboarding-BlMHj-cr.js} +1 -1
  221. package/dist/client/assets/{reports-tab-cAMVw7Rk.js → reports-tab-CSLImW5W.js} +2 -2
  222. package/dist/client/assets/{repositories-C9isGzNA.js → repositories-CSth04qV.js} +1 -1
  223. package/dist/client/assets/{repository-binding-Ds0zXEVH.js → repository-binding-C-QRBZ2o.js} +1 -1
  224. package/dist/client/assets/{repository-import-picker-CJrt2Qyf.js → repository-import-picker-Ck-W8Fet.js} +1 -1
  225. package/dist/client/assets/{repository-picker-DoUZKYGY.js → repository-picker-D0Kp2t1m.js} +1 -1
  226. package/dist/client/assets/{require-capability-Canamm7b.js → require-capability-vyLDKVOB.js} +1 -1
  227. package/dist/client/assets/{required-auth-layout-CoQlG-uh.js → required-auth-layout-BLCp7vSK.js} +1 -1
  228. package/dist/client/assets/{reset-password-BIKAyV8Z.js → reset-password-DXNPcDpp.js} +1 -1
  229. package/dist/client/assets/{resizable-Bu_8_8YG.js → resizable-DwozeJKF.js} +1 -1
  230. package/dist/client/assets/{resolve-tab-icon-BYZBv0qd.js → resolve-tab-icon-CEo8MQEa.js} +1 -1
  231. package/dist/client/assets/{review-settings-dkP8FuZW.js → review-settings-BebeoRFU.js} +1 -1
  232. package/dist/client/assets/{roles-B5cvsmrd.js → roles-D-CzNTdG.js} +1 -1
  233. package/dist/client/assets/{route-1w9x4x4x.js → route-BWjfp1kO.js} +1 -1
  234. package/dist/client/assets/{route-BhzRlDpl.js → route-D1sLLo_F.js} +1 -1
  235. package/dist/client/assets/route-nPXlAoyw.js +1 -0
  236. package/dist/client/assets/{sandbox-lifecycle-context-DHjDdwbp.js → sandbox-lifecycle-context-BS-O8VCE.js} +1 -1
  237. package/dist/client/assets/{schema-DO5D2eCO.js → schema-BfTWP2eM.js} +1 -1
  238. package/dist/client/assets/{schema-D-34ICTJ.js → schema-CaduOy_B.js} +1 -1
  239. package/dist/client/assets/{scroll-area-BjUjV0Z5.js → scroll-area-HU3PM_-R.js} +1 -1
  240. package/dist/client/assets/{search-input-BaljBVL8.js → search-input-gCUrqSdC.js} +1 -1
  241. package/dist/client/assets/{search-toggle-BagUH5ou.js → search-toggle-BT0XOqxY.js} +1 -1
  242. package/dist/client/assets/{secret-ciphertext-B8vjXVJK.js → secret-ciphertext-DZXGQ0YC.js} +1 -1
  243. package/dist/client/assets/{secret-picker-CNgtWTyP.js → secret-picker-B2mcOvDG.js} +1 -1
  244. package/dist/client/assets/{secrets-Bgw4Vhpc.js → secrets-De4gayfI.js} +1 -1
  245. package/dist/client/assets/{sections-editor-DrdT1MI7.js → sections-editor-ZFiUMhtI.js} +1 -1
  246. package/dist/client/assets/{select-B54nmexC.js → select-B08ML6hj.js} +1 -1
  247. package/dist/client/assets/{select-model-BoCP7Le0.js → select-model-DPot5KJo.js} +1 -1
  248. package/dist/client/assets/{seo-editor-CReMwULk.js → seo-editor-SsRbvjPL.js} +1 -1
  249. package/dist/client/assets/{separator-BeOkUBr0.js → separator-B8ZUCiwI.js} +1 -1
  250. package/dist/client/assets/{settings-tab-D75yr9EZ.js → settings-tab-BWigvuuU.js} +1 -1
  251. package/dist/client/assets/{sheet-2W5SODwA.js → sheet-BgQYccYB.js} +1 -1
  252. package/dist/client/assets/{shell-layout-xMF7zZJW.js → shell-layout-28JRcfGc.js} +1 -1
  253. package/dist/client/assets/site-editor-Dpbvs0CS.js +1 -0
  254. package/dist/client/assets/{site-editor-toast-B6rO5nP0.js → site-editor-toast-BKnWJ7cQ.js} +1 -1
  255. package/dist/client/assets/{skills-C1sp0eJN.js → skills-pJFxGkQF.js} +1 -1
  256. package/dist/client/assets/{slider-BpixRq8v.js → slider-DjnSjzoJ.js} +1 -1
  257. package/dist/client/assets/{sortable.esm-B1VIDqmY.js → sortable.esm-vimQurcR.js} +1 -1
  258. package/dist/client/assets/{sso-B50YHclH.js → sso-COuGQVy-.js} +1 -1
  259. package/dist/client/assets/{suggestion-DjstHMLc.js → suggestion-DCMEkjoc.js} +1 -1
  260. package/dist/client/assets/{switch-ZvhKKFCY.js → switch-D548fZxN.js} +1 -1
  261. package/dist/client/assets/{symbol-CRqLTukg.js → symbol-d_WIAIBz.js} +1 -1
  262. package/dist/client/assets/{synced-repos-D0e12nej.js → synced-repos-DXRVRdeV.js} +1 -1
  263. package/dist/client/assets/{tab-icon-glyph-By9Irlxn.js → tab-icon-glyph-Cn1hJWKm.js} +1 -1
  264. package/dist/client/assets/{table-iG31aWmE.js → table-CI1oZOKj.js} +1 -1
  265. package/dist/client/assets/{tabs-CtKgNHMr.js → tabs-D9YXIhLT.js} +1 -1
  266. package/dist/client/assets/{task-board-C00mxWAh.js → task-board-DVS-070d.js} +1 -1
  267. package/dist/client/assets/{task-route-BCPomVVQ.js → task-route-BTeUbfS2.js} +1 -1
  268. package/dist/client/assets/{task-status-BDiexprl.js → task-status-CtMWxsza.js} +1 -1
  269. package/dist/client/assets/taskboard-analytics-BluYo63O.js +1 -0
  270. package/dist/client/assets/{tasks-AIRARaPK.js → tasks-CoTUYQBN.js} +1 -1
  271. package/dist/client/assets/tasks-Da9LhO-m.js +1 -0
  272. package/dist/client/assets/{textarea-BLu1V32o.js → textarea-Cm9WuKCc.js} +1 -1
  273. package/dist/client/assets/{thread-analytics-BMKFoeky.js → thread-analytics-C8KbYKAA.js} +1 -1
  274. package/dist/client/assets/{thread-intent-9GHukD-s.js → thread-intent-DWGyzG2H.js} +1 -1
  275. package/dist/client/assets/{thread-route-B1NXGQXt.js → thread-route-B_o5Zjl2.js} +1 -1
  276. package/dist/client/assets/{thread-route-CW7xmu6G.js → thread-route-CHlbKw5S.js} +1 -1
  277. package/dist/client/assets/{thread-sheet-body-rJHE2tap.js → thread-sheet-body-BkMk6e3g.js} +1 -1
  278. package/dist/client/assets/{time-range-picker-CNeKIOXx.js → time-range-picker-GZrtbU09.js} +1 -1
  279. package/dist/client/assets/{toggle-group-BLxmrLuD.js → toggle-group-CVV3QgOq.js} +1 -1
  280. package/dist/client/assets/{tool-namespace-Cu-DNTic.js → tool-namespace-JguyqV9V.js} +1 -1
  281. package/dist/client/assets/{toolbar-icon-button-670IDOJM.js → toolbar-icon-button-DJJccvHi.js} +1 -1
  282. package/dist/client/assets/{tooltip-B6W7NpVz.js → tooltip-knB_BmiO.js} +1 -1
  283. package/dist/client/assets/{tooltipContext-BWgKo-Vc.js → tooltipContext-B1sYDOEv.js} +1 -1
  284. package/dist/client/assets/{track-j7cOVNc5.js → track-BChCsB4E.js} +1 -1
  285. package/dist/client/assets/{types-C4NGZqb0.js → types-Tl69lmSm.js} +1 -1
  286. package/dist/client/assets/{url-slug-CCgQongS.js → url-slug-CzQ7Mi0G.js} +1 -1
  287. package/dist/client/assets/{usage-stats-2c6yVTyC.js → usage-stats-D0e4-Doz.js} +1 -1
  288. package/dist/client/assets/{use-ai-providers-BWqKJRmf.js → use-ai-providers-BLLCJ82i.js} +1 -1
  289. package/dist/client/assets/{use-app-takeover-DUugSHjQ.js → use-app-takeover-rF8JMh38.js} +1 -1
  290. package/dist/client/assets/{use-automations-DOCjbfCs.js → use-automations-st590zyh.js} +1 -1
  291. package/dist/client/assets/{use-autosave-BpEFoeBr.js → use-autosave-go0omyd9.js} +1 -1
  292. package/dist/client/assets/{use-chat-navigation-CmNsxQBq.js → use-chat-navigation-DrhyLHlD.js} +1 -1
  293. package/dist/client/assets/{use-clock-tick-B2MqiplU.js → use-clock-tick-DissHE7g.js} +1 -1
  294. package/dist/client/assets/{use-connect-companion-DCgJdQ-W.js → use-connect-companion-z1pYEImn.js} +1 -1
  295. package/dist/client/assets/{use-connection-BDpvwZcn.js → use-connection-mfEI4HYb.js} +1 -1
  296. package/dist/client/assets/{use-copy-_ycKA-XN.js → use-copy-BCgrYqWn.js} +1 -1
  297. package/dist/client/assets/{use-create-virtual-mcp-CXKmymqn.js → use-create-virtual-mcp-vIbXVTWJ.js} +1 -1
  298. package/dist/client/assets/{use-date-fns-locale-fMKfOMsB.js → use-date-fns-locale-CykwPDZa.js} +1 -1
  299. package/dist/client/assets/{use-debounced-autosave-B9xt5l_2.js → use-debounced-autosave-Xfan-H8l.js} +1 -1
  300. package/dist/client/assets/{use-debounced-value-ByyoTH63.js → use-debounced-value-BQw-U7yI.js} +1 -1
  301. package/dist/client/assets/{use-deco-credits-CT_j_qxS.js → use-deco-credits-yhiLjBMs.js} +1 -1
  302. package/dist/client/assets/{use-decopilot-events-Bd-4vex6.js → use-decopilot-events--SDGmxUY.js} +1 -1
  303. package/dist/client/assets/{use-delete-connection-DJ4nDOEg.js → use-delete-connection-BL-nx9aS.js} +1 -1
  304. package/dist/client/assets/{use-deployment-admin-BoLt0KCx.js → use-deployment-admin-Bj--7auC.js} +1 -1
  305. package/dist/client/assets/{use-ensure-project-folder-Dd1Qlz-V.js → use-ensure-project-folder-pIwHCsD5.js} +1 -1
  306. package/dist/client/assets/{use-fast-preview-draft-url-DZRNnF9t.js → use-fast-preview-draft-url-CQyP80WK.js} +1 -1
  307. package/dist/client/assets/{use-file-configs-DgLGloNq.js → use-file-configs-4iMZ7Oja.js} +1 -1
  308. package/dist/client/assets/{use-infinite-scroll-F7T2FF-S.js → use-infinite-scroll-BfZrsHvo.js} +1 -1
  309. package/dist/client/assets/{use-join-requests-DqXVwXAp.js → use-join-requests-aVVPMK5j.js} +1 -1
  310. package/dist/client/assets/{use-main-panel-tabs-CAJkn_vg.js → use-main-panel-tabs-uwm6yOAh.js} +1 -1
  311. package/dist/client/assets/{use-mcp-auth-status-2eKyky0r.js → use-mcp-auth-status-BSsISA4U.js} +1 -1
  312. package/dist/client/assets/{use-mcp-client-B333X4fs.js → use-mcp-client-iEvULqcR.js} +1 -1
  313. package/dist/client/assets/{use-mcp-prompts-P2KMjN9W.js → use-mcp-prompts-aNIE_qf0.js} +1 -1
  314. package/dist/client/assets/{use-mcp-tools-56vayh3K.js → use-mcp-tools-v8AMxGBw.js} +1 -1
  315. package/dist/client/assets/{use-members-DfdZqgw8.js → use-members-B2pgOmcT.js} +1 -1
  316. package/dist/client/assets/{use-mobile-hkvDmO1w.js → use-mobile-DR0ou4Mg.js} +1 -1
  317. package/dist/client/assets/{use-navigate-to-agent-Dzg43OKn.js → use-navigate-to-agent-ChjWG67f.js} +1 -1
  318. package/dist/client/assets/{use-open-billing-url-DJYL8W0U.js → use-open-billing-url-B2DuyyPV.js} +1 -1
  319. package/dist/client/assets/{use-org-auth-client-DROvF2zH.js → use-org-auth-client-Cy1K9alo.js} +1 -1
  320. package/dist/client/assets/{use-org-fs-D6VAaLCr.js → use-org-fs-B0T2bC7C.js} +1 -1
  321. package/dist/client/assets/{use-org-repo-syncs-DlDJxigu.js → use-org-repo-syncs-CDhTlqqP.js} +1 -1
  322. package/dist/client/assets/{use-org-sso-CH28wOEA.js → use-org-sso-dcnzEZJT.js} +1 -1
  323. package/dist/client/assets/{use-organization-roles-BQ-3VnZ-.js → use-organization-roles-DjUZ-DE_.js} +1 -1
  324. package/dist/client/assets/{use-organization-settings-DxTssZLI.js → use-organization-settings-CHQPn47n.js} +1 -1
  325. package/dist/client/assets/{use-panel-navigate-C2cHRlDL.js → use-panel-navigate-CTGXxycL.js} +1 -1
  326. package/dist/client/assets/{use-project-native-view-presence-bO2szMt1.js → use-project-native-view-presence-CIKytFPd.js} +1 -1
  327. package/dist/client/assets/{use-project-scope-BROCSZWk.js → use-project-scope-Z7wAK5MJ.js} +1 -1
  328. package/dist/client/assets/{use-recent-apps-DhLr7_TT.js → use-recent-apps-oeEnkRiE.js} +1 -1
  329. package/dist/client/assets/{use-releases-D6ba4LWy.js → use-releases-BWxjuvCL.js} +1 -1
  330. package/dist/client/assets/{use-reports-diagnostic-BYrSJ1-D.js → use-reports-diagnostic-xbuM_E_0.js} +1 -1
  331. package/dist/client/assets/{use-secrets-znuJNv0F.js → use-secrets-qjgwykUa.js} +1 -1
  332. package/dist/client/assets/{use-section-preview-base-CDeugTlj.js → use-section-preview-base-B5MZ5VcF.js} +1 -1
  333. package/dist/client/assets/{use-tags-frFveynu.js → use-tags-BH3EMa60.js} +1 -1
  334. package/dist/client/assets/{use-task-board-analytics-BLvo5Ioy.js → use-task-board-analytics-Tx5Fx3q9.js} +1 -1
  335. package/dist/client/assets/{use-task-board-events-BNCUuZ7v.js → use-task-board-events-CFP9J6zo.js} +1 -1
  336. package/dist/client/assets/{use-task-board-item-prs-C03gSLLs.js → use-task-board-item-prs-iw8jFozb.js} +1 -1
  337. package/dist/client/assets/{use-task-board-items-gTQZEpDz.js → use-task-board-items-BgANW4xl.js} +1 -1
  338. package/dist/client/assets/{use-task-metadata-D3ZyQdu3.js → use-task-metadata-Byl1laHV.js} +1 -1
  339. package/dist/client/assets/{use-thread-analytics-pc4Cx2fq.js → use-thread-analytics-BMao9ena.js} +1 -1
  340. package/dist/client/assets/{use-thread-outputs-BwFYAN97.js → use-thread-outputs-CnXr-3J8.js} +1 -1
  341. package/dist/client/assets/useInfiniteQuery-CH2YwNOR.js +1 -0
  342. package/dist/client/assets/{useQueries-6AB3hL0G.js → useQueries-Cc_lhKs7.js} +1 -1
  343. package/dist/client/assets/useSuspenseInfiniteQuery-9FV3iOtp.js +1 -0
  344. package/dist/client/assets/{users-DsZm3Nkx.js → users-zpa5Z81C.js} +1 -1
  345. package/dist/client/assets/{utils-D-T02kS4.js → utils-DdBqTK5U.js} +1 -1
  346. package/dist/client/assets/{variant-calendar-DoUmbH6Q.js → variant-calendar-BVMnrVNl.js} +1 -1
  347. package/dist/client/assets/{variant-draft-pointer-CGTqYMj8.js → variant-draft-pointer-DXvQS9LN.js} +1 -1
  348. package/dist/client/assets/{view-mode-toggle-BM2WBWnv.js → view-mode-toggle-B-G_ZgpR.js} +1 -1
  349. package/dist/client/assets/{virtual-mcp-CM_cNcV_.js → virtual-mcp-B_ndt1aK.js} +1 -1
  350. package/dist/client/assets/{watch-sse-pool-C1f9T3Cq.js → watch-sse-pool-BGVIlM9_.js} +1 -1
  351. package/dist/client/index.html +1 -1
  352. package/dist/server/server.js +1 -1
  353. package/package.json +1 -1
  354. package/dist/client/assets/agent-app-B_p1zClu.js +0 -1
  355. package/dist/client/assets/agent-deck-Bv4Ea3n5.js +0 -1
  356. package/dist/client/assets/agent-library-B8Kx2dH6.js +0 -1
  357. package/dist/client/assets/agent-library-file-D6BfiqFR.js +0 -1
  358. package/dist/client/assets/agent-settings-CYtLsqfY.js +0 -1
  359. package/dist/client/assets/agent-site-editor-code-CoA0Y8Pm.js +0 -2
  360. package/dist/client/assets/agent-site-editor-content-B6s0vW0K.js +0 -1
  361. package/dist/client/assets/agent-site-editor-preview-Deycj8Hn.js +0 -1
  362. package/dist/client/assets/agent-view-DKBEZHZf.js +0 -1
  363. package/dist/client/assets/api-keys-DIX6Wq_J.js +0 -1
  364. package/dist/client/assets/cms-settings-editor-B950DCbJ.js +0 -1
  365. package/dist/client/assets/flat-project-CqneD8tb.js +0 -1
  366. package/dist/client/assets/library-D9_ShewK.js +0 -1
  367. package/dist/client/assets/project-reports-D8ocu1pR.js +0 -1
  368. package/dist/client/assets/project-tasks-DJVmaqrl.js +0 -1
  369. package/dist/client/assets/record-editor-DywGKfn_.js +0 -1
  370. package/dist/client/assets/reports-wAXvk8Rj.js +0 -1
  371. package/dist/client/assets/route-y_BiPuKo.js +0 -1
  372. package/dist/client/assets/site-editor-BpVflMAH.js +0 -1
  373. package/dist/client/assets/taskboard-analytics-dOoDSrcB.js +0 -1
  374. package/dist/client/assets/tasks-D17PyrkT.js +0 -1
  375. package/dist/client/assets/useInfiniteQuery-Z8R3F4Sd.js +0 -1
  376. package/dist/client/assets/useSuspenseInfiniteQuery-CccYtrDO.js +0 -1
@@ -1 +1 @@
1
- import{c as A,a2 as ne,a as pe,a9 as Ie,K as fe,m as me,b as K,r as B,l as ee,j as n,h as ve,aL as je,aK as Me,H as pt,y as he,v as qt,aM as Wt,s as Yt,q as Qt,D as Zt,aN as Xt,at as xt,t as Jt,au as es,d as Ae,o as ts,n as st,aO as ss,f as ke,M as nt,e as ns,u as Le,k as as,aP as rs,aQ as is,O as gt,aR as ls,N as os,B as cs,P as De}from"./index-BlWeDA0T.js";import{i as qe}from"./AlertCircle-BugQG9bV.js";import{C as ds,D as at,A as ye,E as us,F as fs,G as ms,H as hs,I as ps,J as xs,K as bt,L as gs,b as bs,M as vs,n as ys,h as js,k as ks}from"./agent-icon-Cwi3uRdu.js";import{h as Ss,u as Ts}from"./use-app-takeover-DUugSHjQ.js";import{T as we}from"./toolbar-icon-button-670IDOJM.js";import{C as W,w as Ns,S as _s}from"./index-BVXKUS4M.js";import{s as vt,C as ws,u as Cs,a as yt,V as Ps,b as Is}from"./input-3uLsKqBB.js";import{u as $e,b as We,c as Ee,d as jt,e as Ms,s as As}from"./chat-context-CKK4nwlA.js";import{u as Ls,s as kt}from"./use-ai-providers-BWqKJRmf.js";import{b as St,a as $s,u as Es}from"./use-organization-settings-DxTssZLI.js";import{i as Fs}from"./CheckCircle-DIUFnJQp.js";import{s as rt}from"./XClose-D_NlSxSm.js";import{a as Se,b as Tt,c as Nt,g as _t,p as Rs}from"./repository-binding-Ds0zXEVH.js";import{I as wt}from"./integration-icon-BRfynNZ5.js";import{c as Os}from"./use-decopilot-events-Bd-4vex6.js";import{t as Ye}from"./ChevronUp-C9gm2RHA.js";import{O as Bs}from"./pair-Boroas12.js";import{u as Ds,a as zs}from"./use-thread-outputs-BwFYAN97.js";import{u as Gs}from"./use-deco-credits-CT_j_qxS.js";import{a as Qe,f as Hs,L as Us,s as Ks,b as Vs}from"./shell-layout-xMF7zZJW.js";import{t as qs,f as Ws,m as Ys,b as Qs,a as Zs}from"./use-project-native-view-presence-bO2szMt1.js";import{g as Ct,u as Xs,n as Js,a as en}from"./use-releases-D6ba4LWy.js";import{u as tn,d as Pt,a as Ze,b as Xe,c as Je,e as sn}from"./thread-intent-9GHukD-s.js";import{f as nn,b as It,c as an}from"./use-navigate-to-agent-Dzg43OKn.js";import{o as rn,s as ln,u as on,S as cn}from"./sandbox-lifecycle-context-DHjDdwbp.js";import{E as Mt}from"./empty-state-ChkfcEnf.js";import{C as it}from"./index-Cb4Qh-54.js";import{a as At,b as Lt,P as $t}from"./popover-C86-20Mm.js";import{T as Fe,a as Re,c as Oe}from"./tooltip-B6W7NpVz.js";import{T as dn,a as un}from"./toggle-group-BLxmrLuD.js";import{u as Et,a as et,r as fn,b as Ft,c as mn,d as hn}from"./thread-route-CW7xmu6G.js";import{c as pn,C as xn,a as gn,b as bn,e as vn,d as yn}from"./command-D2C8egnH.js";import{i as Rt}from"./ZoomOut-BpMDqvoU.js";import{g as jn,S as kn}from"./task-status-BDiexprl.js";import{a as Sn}from"./format-time-CAj8AQXM.js";import{u as Tn}from"./use-clock-tick-B2MqiplU.js";import{u as Nn}from"./use-chat-navigation-CmNsxQBq.js";import{a as Ot,u as _n}from"./use-panel-navigate-C2cHRlDL.js";import{u as Bt}from"./use-main-panel-tabs-CAJkn_vg.js";import{T as Ce}from"./tab-icon-glyph-By9Irlxn.js";import{a as wn}from"./UserSquare-B3hi5v4G.js";import{b as Cn,c as Dt,S as Pn,d as In}from"./select-B54nmexC.js";import{L as tt,a as Mn}from"./legacy-main-redirect-TCc947lk.js";import{u as An}from"./use-mobile-hkvDmO1w.js";import{L as Ln}from"./preview-dialog-BP2Zt8Py.js";import{O as $n}from"./markdown-BRIlR7nZ.js";import{B as lt}from"./blocks-preview-workspace-context-CVDMxLIY.js";import{p as En}from"./virtual-mcp-CM_cNcV_.js";import"./Tool01-BYtrXXg0.js";import"./ArrowUp-BM60-fZY.js";import"./ArrowLeft-BsOtfvqw.js";import"./LinkBroken01-D4fcNp0y.js";import"./ShoppingBag01-FE4oAEwY.js";import"./Building02-DqK4SREZ.js";import"./ChevronSelectorVertical-CRMiEVEY.js";import"./Copy01-BrqDGrTX.js";import"./CreditCard01-C7MhbtAI.js";import"./DotsVertical-DjBJNxxU.js";import"./Image01-LmX-9DTg.js";import"./Globe04-Bi1qDXFD.js";import"./SwitchHorizontal01-BLoNOmQx.js";import"./Key01-D7fc2of0.js";import"./Link01-UOxGnkqg.js";import"./Monitor01-zCUpqs5C.js";import"./Sun-lUDK8Dny.js";import"./Play-BaMMHzUS.js";import"./Plus-DBwsZRbL.js";import"./SearchMd-Cz9CjV4u.js";import"./Trash01-DmGIq4LE.js";import"./Upload01-B1KubIEG.js";import"./User01-DxYW6D1x.js";import"./Users01-Dg9yGM1q.js";import"./sheet-2W5SODwA.js";import"./sandbox-url-D3mC8qhT.js";import"./backoff-CrEUbyZT.js";import"./tool-namespace-Cu-DNTic.js";import"./drawer-C7TJoqXz.js";import"./collection-search-mDMHjO22.js";import"./use-mcp-client-B333X4fs.js";import"./auth-d1Zn25hw.js";import"./use-mcp-prompts-P2KMjN9W.js";import"./usage-stats-2c6yVTyC.js";import"./form-DDdiF5DN.js";import"./label-CCf767lm.js";import"./utils-CVEq3hMx.js";import"./use-copy-_ycKA-XN.js";import"./index-sLNiMwXT.js";import"./checkbox-Dwjm_TLd.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-Bp-EkB-V.js";import"./feature-paywall-DXx7v-jJ.js";import"./plan-ladder-DRlbA6Oe.js";import"./icon-button-DfjCa6Mk.js";import"./file-type-icon-C2mdy7vI.js";import"./location-BjlyegC2.js";import"./autosend-DkgNxXhw.js";import"./chat-draft-BMAMpVi3.js";import"./tabs-CtKgNHMr.js";import"./use-open-billing-url-DJYL8W0U.js";import"./input-BSKhVE-B.js";import"./suggestion-DjstHMLc.js";import"./use-org-fs-D6VAaLCr.js";import"./useInfiniteQuery-Z8R3F4Sd.js";import"./infiniteQueryObserver-C9osZa8h.js";import"./question-004-sINsf4GQ.js";import"./use-members-DfdZqgw8.js";import"./use-org-auth-client-DROvF2zH.js";import"./add-connection-dialog-lyugU_mj.js";import"./extract-connection-data-B2gWRdBp.js";import"./metadata-D72DunRR.js";import"./connection-CXmYeQRu.js";import"./url-slug-CCgQongS.js";import"./connection-card-BnbrpDH3.js";import"./connection-slug-CITJ0kGN.js";import"./slugify-CEUa2lfQ.js";import"./textarea-BLu1V32o.js";import"./use-connection-BDpvwZcn.js";import"./schema-D-34ICTJ.js";import"./connection-form-helpers-a4JD1Ns8.js";import"./authenticate-and-persist-oauth-p8iXxMbw.js";import"./mcp-oauth-Wpa3RhmZ.js";import"./mcp-oauth-CbRV1ySf.js";import"./collection-tabs-C8f6Only.js";import"./badge-BIePf0xK.js";import"./use-infinite-scroll-F7T2FF-S.js";import"./useSuspenseInfiniteQuery-CccYtrDO.js";import"./use-task-board-events-BNCUuZ7v.js";import"./task-board-C00mxWAh.js";import"./schema-DO5D2eCO.js";import"./watch-sse-pool-C1f9T3Cq.js";import"./collapsible-BEHE2idT.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BdWVQtZT.js";import"./types-C4NGZqb0.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-project-scope-BROCSZWk.js";import"./project-icon-CJp8KUWK.js";import"./new-project-dialog-D9WaXvgl.js";import"./repository-import-picker-CJrt2Qyf.js";import"./repository-picker-DoUZKYGY.js";import"./use-debounced-value-ByyoTH63.js";import"./required-auth-layout-CoQlG-uh.js";import"./use-org-sso-CH28wOEA.js";import"./use-file-configs-DgLGloNq.js";import"./site-slug-DebpOoQq.js";import"./serial-task-queue-CGOeQgpr.js";import"./delay-CnY5UFtP.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resizable-Bu_8_8YG.js";import"./index-DrHP_BcE.js";import"./index-BHzdhQYD.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-tools-56vayh3K.js";import"./resolve-tab-icon-BYZBv0qd.js";import"./use-task-metadata-D3ZyQdu3.js";import"./preview-source-BsRLGWUP.js";import"./index-BdQq_4o_.js";import"./preview-content-Dk4Scdb5.js";import"./file-share-button-DtVBXYxU.js";import"./file-preview-Baou4Z0N.js";import"./utils-D-T02kS4.js";import"./editor-r9_MTJH5.js";function Fn({isThreadLocked:t,hasCloudProviderKeys:e,sandboxOnlyChats:s,canRunClaudeCode:r}){return t?null:!e&&!(s&&r)?"provider":s&&!r?"claude-code-provider":null}function Rn(){const t=A.c(25),e=Ls(),s=$e(),r=St(),i=$s("chat_harness_codex"),{org:a}=ne(),{data:o}=pe.useSession(),c=o?.user.id??"",u=Ie(),l=e.some(Bn);let d;t[0]!==a.id?(d=fe.claudeSubscription(a.id),t[0]=a.id,t[1]=d):d=t[1];let m;t[2]!==u?(m=()=>u.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[2]=u,t[3]=m):m=t[3];const f=r&&!i&&!l;let h;t[4]!==d||t[5]!==m||t[6]!==f?(h={queryKey:d,queryFn:m,enabled:f},t[4]=d,t[5]=m,t[6]=f,t[7]=h):h=t[7];const j=me(h);let k;t[8]!==a.id?(k=fe.githubCopilot(a.id),t[8]=a.id,t[9]=k):k=t[9];let v;t[10]!==u?(v=()=>u.call("GITHUB_COPILOT_STATUS",{}),t[10]=u,t[11]=v):v=t[11];const x=r&&!i&&!l;let g;t[12]!==k||t[13]!==v||t[14]!==x?(g={queryKey:k,queryFn:v,enabled:x},t[12]=k,t[13]=v,t[14]=x,t[15]=g):g=t[15];const b=me(g);let y;t[16]!==a.id||t[17]!==c?(y=fe.codexSubscription(a.id,c),t[16]=a.id,t[17]=c,t[18]=y):y=t[18];let p;t[19]!==u?(p=()=>u.call("CODEX_SUBSCRIPTION_STATUS",{}),t[19]=u,t[20]=p):p=t[20];const S=r&&i;let N;t[21]!==S||t[22]!==y||t[23]!==p?(N={queryKey:y,queryFn:p,enabled:S},t[21]=S,t[22]=y,t[23]=p,t[24]=N):N=t[24];const T=me(N);return r&&i&&!s?.isThreadLocked?e.some(On)||T.data?.connected!==!1?null:"codex-provider":Fn({isThreadLocked:s?.isThreadLocked??!1,hasCloudProviderKeys:e.length>0,sandboxOnlyChats:r,canRunClaudeCode:l||j.data?.connected!==!1||b.data?.connected!==!1||!!b.data?.orgShare})}function On(t){return vt(t.providerId)}function Bn(t){return kt(t.providerId)}function be(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function ze(t){if(!t)return"—";const e=typeof t=="string"?new Date(t):t;return isNaN(e.getTime())?"—":e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function Dn(t){return t?t.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function zn(t){const e=A.c(4),{items:s}=t;let r;e[0]!==s?(r=s.map(Gn),e[0]=s,e[1]=r):r=e[1];let i;return e[2]!==r?(i=n.jsx("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6",children:r}),e[2]=r,e[3]=i):i=e[3],i}function Gn(t){return n.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.label}),n.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:t.value})]},t.label)}function Hn(t){const e=A.c(33),{userTokens:s,assistantTokens:r,otherTokens:i}=t,a=K(),o=s+r+i,c=o>0?s/o*100:0,u=o>0?r/o*100:0,l=o>0?i/o*100:0;let d;e[0]!==c?(d=c>0&&n.jsx("div",{className:"h-full bg-chart-1",style:{width:`${c}%`}}),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==u?(m=u>0&&n.jsx("div",{className:"h-full bg-chart-2",style:{width:`${u}%`}}),e[2]=u,e[3]=m):m=e[3];let f;e[4]!==l?(f=l>0&&n.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${l}%`}}),e[4]=l,e[5]=f):f=e[5];let h;e[6]!==d||e[7]!==m||e[8]!==f?(h=n.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[d,m,f]}),e[6]=d,e[7]=m,e[8]=f,e[9]=h):h=e[9];let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=j):j=e[10];let k;e[11]!==a||e[12]!==c?(k=a("chat.contextPanel.userPercent",{pct:c.toFixed(1)}),e[11]=a,e[12]=c,e[13]=k):k=e[13];let v;e[14]!==k?(v=n.jsxs("div",{className:"flex items-center gap-1.5",children:[j,n.jsx("span",{className:"text-xs text-muted-foreground",children:k})]}),e[14]=k,e[15]=v):v=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[16]=x):x=e[16];let g;e[17]!==u||e[18]!==a?(g=a("chat.contextPanel.assistantPercent",{pct:u.toFixed(1)}),e[17]=u,e[18]=a,e[19]=g):g=e[19];let b;e[20]!==g?(b=n.jsxs("div",{className:"flex items-center gap-1.5",children:[x,n.jsx("span",{className:"text-xs text-muted-foreground",children:g})]}),e[20]=g,e[21]=b):b=e[21];let y;e[22]!==l||e[23]!==i||e[24]!==a?(y=i>0&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.otherPercent",{pct:l.toFixed(1)})})]}),e[22]=l,e[23]=i,e[24]=a,e[25]=y):y=e[25];let p;e[26]!==b||e[27]!==y||e[28]!==v?(p=n.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[v,b,y]}),e[26]=b,e[27]=y,e[28]=v,e[29]=p):p=e[29];let S;return e[30]!==p||e[31]!==h?(S=n.jsxs("div",{className:"flex flex-col gap-2",children:[h,p]}),e[30]=p,e[31]=h,e[32]=S):S=e[32],S}function Un(t){const e=A.c(14),{agentId:s,isError:r}=t,i=Se(s),a=K();let o;e[0]!==i?.title||e[1]!==a?(o=i?.title??a("chat.subtask.subtaskNoun"),e[0]=i?.title,e[1]=a,e[2]=o):o=e[2];const c=o,u=i?.icon??null;let l;e[3]!==u||e[4]!==c?(l=n.jsx(wt,{icon:u,name:c,size:"xs",className:"size-6 rounded-md shrink-0"}),e[3]=u,e[4]=c,e[5]=l):l=e[5];const d=r?"text-destructive":"text-foreground";let m;e[6]!==d?(m=ee("shrink-0 font-medium",d),e[6]=d,e[7]=m):m=e[7];let f;e[8]!==c||e[9]!==m?(f=n.jsx("span",{className:m,children:c}),e[8]=c,e[9]=m,e[10]=f):f=e[10];let h;return e[11]!==l||e[12]!==f?(h=n.jsxs(n.Fragment,{children:[l,f]}),e[11]=l,e[12]=f,e[13]=h):h=e[13],h}function Kn(t){const e=A.c(12),{isError:s}=t,r=K();let i;e[0]!==r?(i=r("chat.contextPanel.subtask"),e[0]=r,e[1]=i):i=e[1];const a=i;let o;e[2]!==a?(o=n.jsx(wt,{icon:null,name:a,size:"xs",className:"size-6 rounded-md shrink-0"}),e[2]=a,e[3]=o):o=e[3];const c=s?"text-destructive":"text-foreground";let u;e[4]!==c?(u=ee("shrink-0 font-medium",c),e[4]=c,e[5]=u):u=e[5];let l;e[6]!==a||e[7]!==u?(l=n.jsx("span",{className:u,children:a}),e[6]=a,e[7]=u,e[8]=l):l=e[8];let d;return e[9]!==o||e[10]!==l?(d=n.jsxs(n.Fragment,{children:[o,l]}),e[9]=o,e[10]=l,e[11]=d):d=e[11],d}function Vn(t){const e=A.c(18),{part:s}=t,r=s.input?.agent_id,i=s.state==="input-streaming"||s.state==="input-available"||s.state==="output-available"&&s.preliminary===!0,a=s.state==="output-error",o=s.state==="approval-requested";let c;e[0]!==a?(c=n.jsx(Kn,{isError:a}),e[0]=a,e[1]=c):c=e[1];let u;e[2]!==r||e[3]!==a?(u=n.jsx(Un,{agentId:r,isError:a}),e[2]=r,e[3]=a,e[4]=u):u=e[4];let l;e[5]!==c||e[6]!==u?(l=n.jsx(B.Suspense,{fallback:c,children:u}),e[5]=c,e[6]=u,e[7]=l):l=e[7];let d;e[8]!==s.input?(d=s.input?.prompt&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted-foreground/50",children:"·"}),n.jsx("span",{className:"truncate text-muted-foreground",children:s.input.prompt})]}),e[8]=s.input,e[9]=d):d=e[9];let m;e[10]!==o||e[11]!==a||e[12]!==i?(m=n.jsx("span",{className:"ml-auto shrink-0",children:i?n.jsx(ve,{className:"size-3 text-muted-foreground"}):a?n.jsx(ds,{size:12,className:"text-destructive"}):o?n.jsx(qe,{size:12,className:"text-warning"}):n.jsx(Fs,{size:12,className:"text-success"})}),e[10]=o,e[11]=a,e[12]=i,e[13]=m):m=e[13];let f;return e[14]!==l||e[15]!==d||e[16]!==m?(f=n.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[l,d,m]}),e[14]=l,e[15]=d,e[16]=m,e[17]=f):f=e[17],f}function qn(t){const e=A.c(51),{onClose:s,back:r,className:i}=t,a=K(),[o,c]=B.useState(null),{messages:u}=We(),{activeTask:l}=Ee(),{selectedModel:d,selectedVirtualMcp:m}=jt(),f=Ms(u),h=[...u].reverse().find(ra),j=h?.metadata?.usage,k=[...u].reverse().find(aa)?.metadata?.models?.thinking,v=h?.metadata?.modelLimits?.contextWindow??(!k||k.id===d?.modelId?d?.limits?.contextWindow:null)??null,x=j?.contextTokens??0,g=v&&v>0?(x/v*100).toFixed(1):null,b=u;let y;e[0]!==b?(y=b.filter(na).reduce(sa,0),e[0]=b,e[1]=y):y=e[1];const p=y,S=u;let N;e[2]!==S?(N=S.filter(ta).reduce(ea,0),e[2]=S,e[3]=N):N=e[3];const T=N,_=Math.max(0,f.totalTokens-p-T),w=u[0],I=u.at(-1),P=w?.metadata?.created_at??l?.created_at,L=I?.metadata?.created_at??l?.updated_at,$=u.filter(Jn),E=u.flatMap(Zn),F=Dn(k?.id??d?.modelId),R=m?.title??"Super Agent",M=Os(),C=[{label:a("chat.contextPanel.sessionLabel"),value:l?.title??a("chat.contextPanel.newChat")},{label:a("chat.contextPanel.messagesLabel"),value:$.length},{label:a("chat.contextPanel.agentLabel"),value:R},...M?[{label:a("chat.contextPanel.modelLabel"),value:F}]:[],{label:a("chat.contextPanel.contextLimitLabel"),value:v?be(v):"—"},{label:a("chat.contextPanel.sessionTokensLabel"),value:f.totalTokens>0?be(f.totalTokens):"0"},{label:a("chat.contextPanel.usageLabel"),value:g!==null?`${g}%`:"—"},{label:a("chat.contextPanel.inputTokensLabel"),value:f.inputTokens>0?be(f.inputTokens):"0"},{label:a("chat.contextPanel.outputTokensLabel"),value:f.outputTokens>0?be(f.outputTokens):"0"},{label:a("chat.contextPanel.reasoningTokensLabel"),value:f.reasoningTokens>0?be(f.reasoningTokens):"0"},...M?[{label:a("chat.contextPanel.costLabel"),value:f.cost>0?`$${f.cost<.001?f.cost.toFixed(6):f.cost.toFixed(4)}`:"$0.00"}]:[],{label:a("chat.contextPanel.sessionCreatedLabel"),value:ze(P)},{label:a("chat.contextPanel.lastActivityLabel"),value:ze(L)}];if(!l&&$.length===0){let D;e[4]!==i?(D=ee("flex flex-col h-full w-full border-l border-border bg-background",i),e[4]=i,e[5]=D):D=e[5];let re;e[6]!==a?(re=a("chat.contextPanel.title"),e[6]=a,e[7]=re):re=e[7];let X;e[8]!==re?(X=n.jsx("span",{className:"text-sm font-medium text-foreground",children:re}),e[8]=re,e[9]=X):X=e[9];let J;e[10]!==r?(J=r?n.jsx(at,{size:14,className:"text-muted-foreground"}):n.jsx(rt,{size:14,className:"text-muted-foreground"}),e[10]=r,e[11]=J):J=e[11];let te;e[12]!==s||e[13]!==J?(te=n.jsx("button",{type:"button",onClick:s,className:"flex size-6 items-center justify-center hover:bg-accent transition-colors rounded-lg",children:J}),e[12]=s,e[13]=J,e[14]=te):te=e[14];let ae;e[15]!==X||e[16]!==te?(ae=n.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[X,te]}),e[15]=X,e[16]=te,e[17]=ae):ae=e[17];let ie;e[18]!==a?(ie=a("chat.contextPanel.emptyState"),e[18]=a,e[19]=ie):ie=e[19];let se;e[20]!==ie?(se=n.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:n.jsx("p",{className:"text-xs text-muted-foreground",children:ie})}),e[20]=ie,e[21]=se):se=e[21];let oe;return e[22]!==ae||e[23]!==se||e[24]!==D?(oe=n.jsxs("div",{className:D,children:[ae,se]}),e[22]=ae,e[23]=se,e[24]=D,e[25]=oe):oe=e[25],oe}let G;e[26]!==i?(G=ee("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",i),e[26]=i,e[27]=G):G=e[27];let z;e[28]!==a?(z=a("chat.contextPanel.title"),e[28]=a,e[29]=z):z=e[29];let H;e[30]!==z?(H=n.jsx("span",{className:"text-sm font-medium text-foreground",children:z}),e[30]=z,e[31]=H):H=e[31];let O;e[32]!==r?(O=r?n.jsx(at,{size:14}):n.jsx(rt,{size:14}),e[32]=r,e[33]=O):O=e[33];let V;e[34]!==s||e[35]!==O?(V=n.jsx("button",{type:"button",onClick:s,className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:O}),e[34]=s,e[35]=O,e[36]=V):V=e[36];let Q;e[37]!==H||e[38]!==V?(Q=n.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[H,V]}),e[37]=H,e[38]=V,e[39]=Q):Q=e[39];let Y;e[40]!==a?(Y=a("chat.contextPanel.contextBreakdownSection"),e[40]=a,e[41]=Y):Y=e[41];let Z;e[42]!==Y?(Z=n.jsx("span",{className:"text-xs text-muted-foreground",children:Y}),e[42]=Y,e[43]=Z):Z=e[43];let q;e[44]!==T||e[45]!==_||e[46]!==p?(q=n.jsx(Hn,{userTokens:p,assistantTokens:T,otherTokens:_}),e[44]=T,e[45]=_,e[46]=p,e[47]=q):q=e[47];let le;return e[48]!==Z||e[49]!==q?(le=n.jsxs("div",{className:"flex flex-col gap-3",children:[Z,q]}),e[48]=Z,e[49]=q,e[50]=le):le=e[50],n.jsxs("div",{className:G,children:[Q,n.jsxs("div",{className:"flex flex-col gap-8 p-6",children:[E.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.subtasksSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:E.map(Qn)})]}),n.jsx(zn,{items:C}),le,$.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.rawMessagesSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:$.map(D=>{const re=D.metadata?.created_at,X=o?.id===D.id;return n.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[n.jsxs("button",{type:"button",onClick:()=>c(X?null:D),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent/50 w-full text-left cursor-pointer",children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[n.jsx("span",{className:ee("shrink-0 font-medium",D.role==="user"?"text-chart-1":"text-chart-2"),children:D.role}),n.jsx("span",{className:"text-muted-foreground",children:"•"}),n.jsx("span",{className:"truncate text-muted-foreground font-mono",children:D.id})]}),re&&n.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:ze(re)})]}),X&&n.jsxs(n.Fragment,{children:[D.role==="assistant"&&(()=>{const J=D.metadata?._request;if(!J)return null;const te=J.systemSections??[],ae=Math.max(1,...te.map(Yn)),ie=te.reduce(Wn,0);return n.jsxs("div",{className:"border-t border-border/50 px-3 py-2.5 text-xs space-y-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"font-medium text-foreground",children:a("chat.contextPanel.requestLabel")}),n.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[J.activeTools??0," / ",J.tools??0," ",a("chat.contextPanel.toolsActive")]})]}),te.length>0&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("div",{className:"text-muted-foreground",children:[a("chat.contextPanel.systemPromptLabel")," ",n.jsxs("span",{className:"tabular-nums",children:["~",Math.round(ie/4).toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),te.map((se,oe)=>{const ce=se.preview.match(/^<([a-z-]+)/i)?.[1]??`section ${oe}`,xe=se.chars/ae*100,de=Math.round(se.chars/4);return n.jsxs("div",{className:"space-y-0.5",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("span",{className:"font-mono text-foreground truncate",children:ce}),n.jsxs("span",{className:"text-muted-foreground tabular-nums shrink-0",children:["~",de.toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),n.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-chart-3",style:{width:`${xe}%`}})})]},oe)})]})]})})(),n.jsx("pre",{className:"text-xs font-mono bg-muted px-3 py-2 overflow-auto whitespace-pre-wrap break-all border-t border-border/50 max-h-64",children:JSON.stringify(D,null,2)})]})]},D.id)})})]})]})]})}function Wn(t,e){return t+e.chars}function Yn(t){return t.chars}function Qn(t,e){return n.jsx(Vn,{part:t},e)}function Zn(t){return(t.parts??[]).filter(Xn)}function Xn(t){return t.type==="tool-subtask"}function Jn(t){return t.role!=="system"}function ea(t,e){const s=e.metadata?.usage;return t+(s?.outputTokens??0)}function ta(t){return t.role==="assistant"}function sa(t,e){const s=e.metadata?.usage;return t+(s?.inputTokens??0)}function na(t){return t.role==="user"}function aa(t){return t.role==="assistant"&&t.metadata?.models}function ra(t){return t.role==="assistant"&&t.metadata?.usage}function ia(t){const e=A.c(21),{onOpenContextPanel:s}=t,{org:r}=ne(),{selectedVirtualMcp:i}=jt();let a;e[0]!==r.id?(a=je(r.id),e[0]=r.id,e[1]=a):a=e[1];const c=i??a,l=Se(c.id)??c,d=l.title??"Super Agent",m=l.icon??null,f=l.description??null;let h;e[2]!==m||e[3]!==d?(h=n.jsx(ye,{icon:m,name:d,size:"lg"}),e[2]=m,e[3]=d,e[4]=h):h=e[4];let j;e[5]!==d?(j=n.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-foreground",children:d}),e[5]=d,e[6]=j):j=e[6];let k;e[7]!==f?(k=f?n.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-balance",children:f}):null,e[7]=f,e[8]=k):k=e[8];let v;e[9]!==j||e[10]!==k?(v=n.jsxs("div",{className:"space-y-1.5",children:[j,k]}),e[9]=j,e[10]=k,e[11]=v):v=e[11];let x;e[12]!==h||e[13]!==v?(x=n.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center gap-4 px-6 text-center overflow-hidden",children:[h,v]}),e[12]=h,e[13]=v,e[14]=x):x=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(W.IceBreakers,{className:"pb-3"}),e[15]=g):g=e[15];let b;e[16]!==s?(b=n.jsxs(W.Footer,{children:[g,n.jsx(W.Input,{onOpenContextPanel:s})]}),e[16]=s,e[17]=b):b=e[17];let y;return e[18]!==x||e[19]!==b?(y=n.jsxs(n.Fragment,{children:[x,b]}),e[18]=x,e[19]=b,e[20]=y):y=e[20],y}function ot(t){const e=A.c(17),{outputs:s,collapsed:r,onToggle:i,variant:a}=t,o=a==="card"?"rounded-xl border border-border bg-muted/95 shadow-sm backdrop-blur-sm":"border-b border-border bg-background";let c;e[0]!==o?(c=ee(o),e[0]=o,e[1]=c):c=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("span",{className:"text-sm font-medium text-foreground",children:"Files in this task"}),e[2]=u):u=e[2];const l=r&&"-rotate-90";let d;e[3]!==l?(d=ee("size-4 text-muted-foreground transition-transform",l),e[3]=l,e[4]=d):d=e[4];let m;e[5]!==d?(m=n.jsx(Ye,{className:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==m?(f=n.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between px-3 py-2.5 text-left",children:[u,m]}),e[7]=i,e[8]=m,e[9]=f):f=e[9];let h;e[10]!==r||e[11]!==s?(h=!r&&n.jsx("div",{className:"flex max-h-72 flex-col gap-1.5 overflow-y-auto px-2 pb-2",children:s.map(la)}),e[10]=r,e[11]=s,e[12]=h):h=e[12];let j;return e[13]!==c||e[14]!==f||e[15]!==h?(j=n.jsxs("div",{className:c,children:[f,h]}),e[13]=c,e[14]=f,e[15]=h,e[16]=j):j=e[16],j}function la(t){return n.jsx(Bs,{file:t},t.key)}function oa(){const t=A.c(13),e=$e()?.taskId??null,s=Ds();let r;t[0]!==s?(r={enabled:s},t[0]=s,t[1]=r):r=t[1];const{data:i}=zs(e,r),[a,o]=B.useState(!1),[c,u]=B.useState(!0);if(!e||!i||i.length===0)return null;let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>o(da),t[2]=l):l=t[2];let d;t[3]!==a||t[4]!==i?(d=n.jsx("div",{className:"absolute top-2 right-2 z-10 hidden w-72 @[1280px]:block",children:n.jsx(ot,{variant:"card",outputs:i,collapsed:a,onToggle:l})}),t[3]=a,t[4]=i,t[5]=d):d=t[5];let m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=()=>u(ca),t[6]=m):m=t[6];let f;t[7]!==c||t[8]!==i?(f=n.jsx("div",{className:"shrink-0 @[1280px]:hidden",children:n.jsx(ot,{variant:"bar",outputs:i,collapsed:c,onToggle:m})}),t[7]=c,t[8]=i,t[9]=f):f=t[9];let h;return t[10]!==d||t[11]!==f?(h=n.jsxs(n.Fragment,{children:[d,f]}),t[10]=d,t[11]=f,t[12]=h):h=t[12],h}function ca(t){return!t}function da(t){return!t}function ua(){const t=A.c(1);B.use(We().ready);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(ws,{children:n.jsx(fa,{})}),t[0]=e):e=t[0],e}function fa(){const t=A.c(29),{active:e}=Cs(),{org:s}=ne(),r=$e(),{isChatEmpty:i}=We(),[a,o]=B.useState("chat"),c=Gs(),u=K(),l=Rn(),{runtime:d}=yt(r?.virtualMcpId);if(l!==null&&d!=="cms"){let T;return t[0]!==l||t[1]!==u?(T=n.jsx(W,{className:"animate-in fade-in-0 duration-200",children:n.jsx(W.Main,{className:"flex flex-col items-center",children:n.jsx(W.EmptyState,{children:l==="codex-provider"?n.jsx(W.NoAiProviderEmptyState,{title:u("settings.codexSubscription.setupHeading"),description:u("settings.codexSubscription.setupDescription"),providerFilter:vt}):l==="claude-code-provider"?n.jsx(W.NoAiProviderEmptyState,{title:u("chat.noAiProviderEmptyState.supportedHeading"),description:u("chat.noAiProviderEmptyState.supportedSubtitle"),providerFilter:kt}):n.jsx(W.NoAiProviderEmptyState,{})})})}),t[0]=l,t[1]=u,t[2]=T):T=t[2],T}let f;t[3]!==c.hasDecoKey||t[4]!==c.hasOnlyDecoProvider||t[5]!==c.isLoading||t[6]!==c.isZeroBalance||t[7]!==i||t[8]!==s?(f=c.hasDecoKey&&c.isZeroBalance&&c.hasOnlyDecoProvider&&!c.isLoading&&i&&!Ns(s.id),t[3]=c.hasDecoKey,t[4]=c.hasOnlyDecoProvider,t[5]=c.isLoading,t[6]=c.isZeroBalance,t[7]=i,t[8]=s,t[9]=f):f=t[9];const h=f;let j;t[10]!==h?(j=h&&n.jsx(W.CreditsEmptyState,{}),t[10]=h,t[11]=j):j=t[11];let k;t[12]!==a||t[13]!==i||t[14]!==d||t[15]!==e?(k=!e&&n.jsx("div",{inert:a!=="chat"?!0:void 0,"aria-hidden":a!=="chat",className:ee("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",a!=="chat"?"opacity-0 pointer-events-none":"opacity-100"),children:i&&d!=="cms"?n.jsx(ia,{onOpenContextPanel:()=>o("context")}):n.jsxs(n.Fragment,{children:[n.jsxs(W.Main,{className:"relative flex flex-col overflow-hidden @container",children:[n.jsx(oa,{}),n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(W.Messages,{})})]}),n.jsx(W.Footer,{children:n.jsx(W.Input,{onOpenContextPanel:()=>o("context")})})]})}),t[12]=a,t[13]=i,t[14]=d,t[15]=e,t[16]=k):k=t[16];let v;t[17]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Ps,{}),t[17]=v):v=t[17];const x=a!=="context"?!0:void 0,g=a!=="context",b=a==="context"?"opacity-100":"opacity-0 pointer-events-none";let y;t[18]!==b?(y=ee("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",b),t[18]=b,t[19]=y):y=t[19];let p;t[20]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(qn,{back:!0,onClose:()=>o("chat")}),t[20]=p):p=t[20];let S;t[21]!==x||t[22]!==g||t[23]!==y?(S=n.jsx("div",{inert:x,"aria-hidden":g,className:y,children:p}),t[21]=x,t[22]=g,t[23]=y,t[24]=S):S=t[24];let N;return t[25]!==j||t[26]!==k||t[27]!==S?(N=n.jsxs(W,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[j,k,v,S]}),t[25]=j,t[26]=k,t[27]=S,t[28]=N):N=t[28],N}function ma(){const t=A.c(7),e=K();let s;t[0]!==e?(s=e("agentShellLayout.agentShellLayout.chatLoadingError"),t[0]=e,t[1]=s):s=t[1];let r;t[2]!==s?(r=n.jsx("div",{role:"alert",className:"flex h-full flex-1 items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Me,{children:n.jsx(ua,{})}),t[4]=i):i=t[4];let a;return t[5]!==r?(a=n.jsx(pt,{fallback:r,children:i}),t[5]=r,t[6]=a):a=t[6],a}function ha(t){const e=A.c(10),{org:s}=ne(),r=tn(),{data:i}=pe.useSession(),a=i?.user?.id,o=t?.id??null,c=!!t&&!!a&&!!t.created_by&&t.created_by!==a;let u;e[0]!==s.id||e[1]!==o?(u=fe.viewedThreadMetadataRefresh(s.id,o??""),e[0]=s.id,e[1]=o,e[2]=u):u=e[2];const l=!!r&&!!o&&c;let d;e[3]!==r||e[4]!==o?(d=async()=>(await r?.refreshThreadMetadata(o??""),!0),e[3]=r,e[4]=o,e[5]=d):d=e[5];let m;e[6]!==u||e[7]!==l||e[8]!==d?(m={queryKey:u,enabled:l,staleTime:Number.POSITIVE_INFINITY,queryFn:d},e[6]=u,e[7]=l,e[8]=d,e[9]=m):m=e[9],me(m)}function Ge(t){const e=A.c(14),{label:s,value:r,onChange:i,options:a}=t;let o;e[0]!==s?(o=n.jsx("span",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=o):o=e[1];let c;e[2]!==i?(c=m=>m&&i(m),e[2]=i,e[3]=c):c=e[3];let u;e[4]!==a?(u=a.map(pa),e[4]=a,e[5]=u):u=e[5];let l;e[6]!==s||e[7]!==c||e[8]!==u||e[9]!==r?(l=n.jsx(un,{type:"single",size:"sm",value:r,onValueChange:c,"aria-label":s,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:u}),e[6]=s,e[7]=c,e[8]=u,e[9]=r,e[10]=l):l=e[10];let d;return e[11]!==o||e[12]!==l?(d=n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,l]}),e[11]=o,e[12]=l,e[13]=d):d=e[13],d}function pa(t){return n.jsxs(dn,{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 xa(t){const e=A.c(91),{panel:s,className:r}=t,i=r===void 0?"md:size-[34px]":r,a=K();let o;e[0]!==a?(o=a("sidebar.taskGroupsList.filterChats"),e[0]=a,e[1]=o):o=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(us,{size:16}),e[2]=c):c=e[2];let u;e[3]!==s.filtersActive?(u=s.filtersActive&&n.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[3]=s.filtersActive,e[4]=u):u=e[4];let l;e[5]!==i||e[6]!==s.filtersActive||e[7]!==o||e[8]!==u?(l=n.jsx(Fe,{asChild:!0,children:n.jsx(At,{asChild:!0,children:n.jsxs(we,{"aria-label":o,active:s.filtersActive,className:i,children:[c,u]})})}),e[5]=i,e[6]=s.filtersActive,e[7]=o,e[8]=u,e[9]=l):l=e[9];let d;e[10]!==a?(d=a("sidebar.taskGroupsList.filterChats"),e[10]=a,e[11]=d):d=e[11];let m;e[12]!==d?(m=n.jsx(Re,{side:"bottom",children:d}),e[12]=d,e[13]=m):m=e[13];let f;e[14]!==l||e[15]!==m?(f=n.jsxs(Oe,{children:[l,m]}),e[14]=l,e[15]=m,e[16]=f):f=e[16];let h;e[17]!==a?(h=a("sidebar.taskGroupsList.filterView"),e[17]=a,e[18]=h):h=e[18];const j=s.groupBy;let k;e[19]!==s?(k=D=>{he("tasks_panel_group_by_changed",{to_value:D}),s.setGroupBy(D)},e[19]=s,e[20]=k):k=e[20];let v;e[21]!==a?(v=a("sidebar.taskGroupsList.viewList"),e[21]=a,e[22]=v):v=e[22];let x;e[23]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(fs,{size:13}),e[23]=x):x=e[23];let g;e[24]!==v?(g={value:"flat",label:v,icon:x},e[24]=v,e[25]=g):g=e[25];let b;e[26]!==a?(b=a("sidebar.taskGroupsList.viewStatus"),e[26]=a,e[27]=b):b=e[27];let y;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(ms,{size:13}),e[28]=y):y=e[28];let p;e[29]!==b?(p={value:"status",label:b,icon:y},e[29]=b,e[30]=p):p=e[30];let S;e[31]!==g||e[32]!==p?(S=[g,p],e[31]=g,e[32]=p,e[33]=S):S=e[33];let N;e[34]!==s.groupBy||e[35]!==k||e[36]!==S||e[37]!==h?(N=n.jsx(Ge,{label:h,value:j,onChange:k,options:S}),e[34]=s.groupBy,e[35]=k,e[36]=S,e[37]=h,e[38]=N):N=e[38];let T;e[39]!==a?(T=a("sidebar.taskGroupsList.filterType"),e[39]=a,e[40]=T):T=e[40];const _=s.typeFilter;let w;e[41]!==s?(w=D=>{he("tasks_panel_filter_changed",{to_value:D}),s.setTypeFilter(D)},e[41]=s,e[42]=w):w=e[42];let I;e[43]!==a?(I=a("sidebar.taskGroupsList.typeAll"),e[43]=a,e[44]=I):I=e[44];let P;e[45]!==I?(P={value:"all",label:I},e[45]=I,e[46]=P):P=e[46];let L;e[47]!==a?(L=a("sidebar.taskGroupsList.typeChats"),e[47]=a,e[48]=L):L=e[48];let $;e[49]!==L?($={value:"manual",label:L},e[49]=L,e[50]=$):$=e[50];let E;e[51]!==a?(E=a("sidebar.taskGroupsList.typeAuto"),e[51]=a,e[52]=E):E=e[52];let F;e[53]!==E?(F={value:"automation",label:E},e[53]=E,e[54]=F):F=e[54];let R;e[55]!==P||e[56]!==$||e[57]!==F?(R=[P,$,F],e[55]=P,e[56]=$,e[57]=F,e[58]=R):R=e[58];let M;e[59]!==s.typeFilter||e[60]!==T||e[61]!==w||e[62]!==R?(M=n.jsx(Ge,{label:T,value:_,onChange:w,options:R}),e[59]=s.typeFilter,e[60]=T,e[61]=w,e[62]=R,e[63]=M):M=e[63];let C;e[64]!==a?(C=a("sidebar.taskGroupsList.filterScope"),e[64]=a,e[65]=C):C=e[65];const G=s.showAll?"team":"mine";let z;e[66]!==s?(z=D=>s.setShowAll(D==="team"),e[66]=s,e[67]=z):z=e[67];let H;e[68]!==a?(H=a("sidebar.taskGroupsList.scopeMine"),e[68]=a,e[69]=H):H=e[69];let O;e[70]!==H?(O={value:"mine",label:H},e[70]=H,e[71]=O):O=e[71];let V;e[72]!==a?(V=a("sidebar.taskGroupsList.scopeTeam"),e[72]=a,e[73]=V):V=e[73];let Q;e[74]!==V?(Q={value:"team",label:V},e[74]=V,e[75]=Q):Q=e[75];let Y;e[76]!==O||e[77]!==Q?(Y=[O,Q],e[76]=O,e[77]=Q,e[78]=Y):Y=e[78];let Z;e[79]!==C||e[80]!==G||e[81]!==z||e[82]!==Y?(Z=n.jsx(Ge,{label:C,value:G,onChange:z,options:Y}),e[79]=C,e[80]=G,e[81]=z,e[82]=Y,e[83]=Z):Z=e[83];let q;e[84]!==N||e[85]!==M||e[86]!==Z?(q=n.jsxs(Lt,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[N,M,Z]}),e[84]=N,e[85]=M,e[86]=Z,e[87]=q):q=e[87];let le;return e[88]!==q||e[89]!==f?(le=n.jsxs($t,{children:[f,q]}),e[88]=q,e[89]=f,e[90]=le):le=e[90],le}function ga(t,e){return t.filter(s=>s.id===e||!!s.trigger_id||qs(s))}function ba(){const t=A.c(2),e=Tt()??[];let s;return t[0]!==e?(s=r=>{if(!r)return;const i=e.find(a=>a.id===r);return i?Pt(i.metadata):void 0},t[0]=e,t[1]=s):s=t[1],s}function va(t){const e=A.c(9),{virtualMcpId:s,size:r,showAutomationBadge:i}=t,a=r===void 0?"sm":r,o=K();let c;e[0]!==a||e[1]!==s?(c=s?n.jsx(ya,{virtualMcpId:s,size:a}):n.jsx(ye,{icon:null,name:"?",size:a}),e[0]=a,e[1]=s,e[2]=c):c=e[2];let u;e[3]!==i||e[4]!==o?(u=i&&n.jsx("span",{"aria-label":o("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-special border border-special text-special-foreground",children:n.jsx(Rt,{size:10,className:"text-white"})}),e[3]=i,e[4]=o,e[5]=u):u=e[5];let l;return e[6]!==c||e[7]!==u?(l=n.jsxs("div",{className:"relative shrink-0",children:[c,u]}),e[6]=c,e[7]=u,e[8]=l):l=e[8],l}function ya(t){const e=A.c(6),{virtualMcpId:s,size:r}=t,i=Nt(s);if(!i){let c;return e[0]!==r?(c=n.jsx(ye,{icon:null,name:"?",size:r}),e[0]=r,e[1]=c):c=e[1],c}const a=i.icon??null;let o;return e[2]!==i.title||e[3]!==r||e[4]!==a?(o=n.jsx(ye,{icon:a,name:i.title,size:r}),e[2]=i.title,e[3]=r,e[4]=a,e[5]=o):o=e[5],o}const ct=["thread"];function ja(t){const e=A.c(53),{open:s,onOpenChange:r}=t,[i,a]=B.useState(""),{org:o}=ne(),{setTaskId:c}=Qe(),u=Ie(),l=K();let d,m,f,h;e[0]!==o.id||e[1]!==i?(h=i.trim(),d=h?20:10,f=me,m=fe.globalSearch(o.id,h,d,ct),e[0]=o.id,e[1]=i,e[2]=d,e[3]=m,e[4]=f,e[5]=h):(d=e[2],m=e[3],f=e[4],h=e[5]);let j;e[6]!==d||e[7]!==u||e[8]!==h?(j=async()=>{const C=await u.call("GLOBAL_SEARCH",{query:h,limit:d,types:[...ct]});return{...C,items:C.items.filter(ka)}},e[6]=d,e[7]=u,e[8]=h,e[9]=j):j=e[9];let k;e[10]!==s||e[11]!==m||e[12]!==j?(k={queryKey:m,enabled:s,queryFn:j,staleTime:1e4},e[10]=s,e[11]=m,e[12]=j,e[13]=k):k=e[13];const{data:v,isFetching:x}=f(k);let g;e[14]!==v?.items?(g=v?.items??[],e[14]=v?.items,e[15]=g):g=e[15];const b=g;let y;e[16]!==r?(y=C=>{C||a(""),r(C)},e[16]=r,e[17]=y):y=e[17];const p=y;let S;e[18]!==p||e[19]!==c?(S=C=>{p(!1),c(C.id,C.virtual_mcp_id??void 0)},e[18]=p,e[19]=c,e[20]=S):S=e[20];const N=S;let T;e[21]!==l?(T=l("tasksPanel.globalSearchDialog.title"),e[21]=l,e[22]=T):T=e[22];let _;e[23]!==T?(_=n.jsx(qt,{children:T}),e[23]=T,e[24]=_):_=e[24];let w;e[25]!==l?(w=l("tasksPanel.globalSearchDialog.description"),e[25]=l,e[26]=w):w=e[26];let I;e[27]!==w?(I=n.jsx(Wt,{children:w}),e[27]=w,e[28]=I):I=e[28];let P;e[29]!==I||e[30]!==_?(P=n.jsxs(Yt,{className:"sr-only",children:[_,I]}),e[29]=I,e[30]=_,e[31]=P):P=e[31];let L;e[32]!==l?(L=l("tasksPanel.globalSearchDialog.placeholder"),e[32]=l,e[33]=L):L=e[33];let $;e[34]!==i||e[35]!==L?($=n.jsx(vn,{value:i,onValueChange:a,placeholder:L}),e[34]=i,e[35]=L,e[36]=$):$=e[36];let E;e[37]!==N||e[38]!==x||e[39]!==b||e[40]!==l||e[41]!==h?(E=n.jsx(pn,{children:x&&b.length===0?n.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l("tasksPanel.globalSearchDialog.searching")}):b.length===0?n.jsx(xn,{children:l("tasksPanel.globalSearchDialog.noResults")}):n.jsx(gn,{heading:h?void 0:l("tasksPanel.globalSearchDialog.recent"),children:b.map(C=>C.type==="thread"?n.jsxs(bn,{value:`thread:${C.id}:${C.title}`,onSelect:()=>N(C),className:"gap-2.5",children:[n.jsx(va,{virtualMcpId:C.virtual_mcp_id,size:"xs"}),n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx("div",{className:"text-sm text-foreground truncate",children:C.title||l("tasksPanel.globalSearchDialog.untitledChat")})}),n.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(C.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${C.id}`):null)})}),e[37]=N,e[38]=x,e[39]=b,e[40]=l,e[41]=h,e[42]=E):E=e[42];let F;e[43]!==$||e[44]!==E?(F=n.jsxs(yn,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[$,E]}),e[43]=$,e[44]=E,e[45]=F):F=e[45];let R;e[46]!==P||e[47]!==F?(R=n.jsxs(Qt,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[P,F]}),e[46]=P,e[47]=F,e[48]=R):R=e[48];let M;return e[49]!==p||e[50]!==s||e[51]!==R?(M=n.jsx(Zt,{open:s,onOpenChange:p,children:R}),e[49]=p,e[50]=s,e[51]=R,e[52]=M):M=e[52],M}function ka(t){return t.type==="thread"}function Sa(t,e,s){if(!s)return;const r=t.findIndex(i=>i.id===e);if(r!==-1){for(let i=r+1;i<t.length;i++){const a=t[i];if(a?.created_by===s)return a}for(let i=r-1;i>=0;i--){const a=t[i];if(a?.created_by===s)return a}}}function Ta(t){return t==="ephemeral"||t.startsWith("thread:")}function zt(t){const e=A.c(45),{task:s,isActive:r,onClick:i,onArchive:a,showAutomationBadge:o,showAgentIcon:c,hideStatusIdle:u,indented:l}=t,d=K(),m=jn(s.status),f=m.icon,h=s.metadata?.kind==="tool_call_run",j=Nt(h?void 0:s.virtual_mcp_id);let k;e[0]!==j?(k=_t(j),e[0]=j,e[1]=k):k=e[1];const v=k;Tn(6e4);const x=o||!!s.trigger_id,g=s.id,b="button",y=0;let p;e[2]!==i?(p=z=>{z.target===z.currentTarget&&(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),i())},e[2]=i,e[3]=p):p=e[3];const S=l?"-ml-4 pl-6":"pl-[9px]",N=r?"bg-accent text-accent-foreground":"hover:bg-accent/60";let T;e[4]!==S||e[5]!==N?(T=ee("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",S,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",N),e[4]=S,e[5]=N,e[6]=T):T=e[6];let _;e[7]!==h||e[8]!==c||e[9]!==j?.icon||e[10]!==j?.title?(_=c&&!h&&n.jsx(ye,{icon:j?.icon??null,name:j?.title??"?",size:"2xs"}),e[7]=h,e[8]=c,e[9]=j?.icon,e[10]=j?.title,e[11]=_):_=e[11];let w;e[12]!==x||e[13]!==d?(w=x&&n.jsx(Rt,{size:12,"aria-label":d("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-special"}),e[12]=x,e[13]=d,e[14]=w):w=e[14];let I;e[15]!==d||e[16]!==s.title?(I=s.title||d("tasksPanel.taskRow.untitledTask"),e[15]=d,e[16]=s.title,e[17]=I):I=e[17];let P;e[18]!==I?(P=n.jsx("div",{className:"text-sm text-foreground truncate",children:I}),e[18]=I,e[19]=P):P=e[19];let L;e[20]!==w||e[21]!==P?(L=n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[w,P]}),e[20]=w,e[21]=P,e[22]=L):L=e[22];let $;e[23]!==r||e[24]!==v||e[25]!==s.branch||e[26]!==s.updated_at?($=s.updated_at&&n.jsxs("div",{className:ee("flex items-center gap-1 text-[11px] min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[s.branch&&!Ta(s.branch)?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"truncate font-mono",children:s.branch}),n.jsx("span",{className:"shrink-0",children:"·"})]}):v?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"truncate",children:[v.owner,"/",v.name]}),n.jsx("span",{className:"shrink-0",children:"·"})]}):null,n.jsx("span",{className:"shrink-0",children:Sn(new Date(s.updated_at))})]}),e[23]=r,e[24]=v,e[25]=s.branch,e[26]=s.updated_at,e[27]=$):$=e[27];let E;e[28]!==L||e[29]!==$?(E=n.jsxs("div",{className:"flex-1 min-w-0",children:[L,$]}),e[28]=L,e[29]=$,e[30]=E):E=e[30];const F="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",R=!u&&n.jsx("span",{className:ee("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",a&&"group-hover/row:opacity-0"),"aria-label":d("tasksPanel.taskRow.statusLabel",{status:d(m.labelKey)}),children:s.status==="in_progress"?n.jsx(ve,{className:ee("size-3.5",m.iconClassName)}):n.jsx(f,{size:14,className:m.iconClassName})});let M;e[31]!==a||e[32]!==d?(M=a&&n.jsxs(Oe,{children:[n.jsx(Fe,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":d("tasksPanel.taskRow.archiveTask"),onClick:z=>{z.stopPropagation(),a()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto 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:n.jsx(Xt,{size:14})})}),n.jsx(Re,{side:"right",children:d("tasksPanel.taskRow.archive")})]}),e[31]=a,e[32]=d,e[33]=M):M=e[33];let C;e[34]!==R||e[35]!==M?(C=n.jsxs("div",{className:F,children:[R,M]}),e[34]=R,e[35]=M,e[36]=C):C=e[36];let G;return e[37]!==i||e[38]!==E||e[39]!==C||e[40]!==p||e[41]!==T||e[42]!==_||e[43]!==s.id?(G=n.jsxs("div",{"data-task-id":g,role:b,tabIndex:y,onClick:i,onKeyDown:p,className:T,children:[_,E,C]}),e[37]=i,e[38]=E,e[39]=C,e[40]=p,e[41]=T,e[42]=_,e[43]=s.id,e[44]=G):G=e[44],G}const dt=["requires_action","in_progress","failed","expired","completed"];function Na(t){const e=new Map(dt.map(s=>[s,[]]));for(const s of t){const r=s.status??"completed";(e.get(r)??e.get("completed")).push(s)}return dt.map(s=>({status:s,threads:e.get(s)}))}const _a="sidebar.group.expanded.";function wa(t,e){const s=A.c(3),[r,i]=xt(`${_a}${t}`,e);let a;return s[0]!==r||s[1]!==i?(a=[r,i],s[0]=r,s[1]=i,s[2]=a):a=s[2],a}function Gt(t){const e=A.c(18),{onClick:s,isFetching:r,indented:i}=t,a=K();let o;e[0]!==a?(o=a("sidebar.showMoreButton.ariaLabel"),e[0]=a,e[1]=o):o=e[1];const c=i?"-ml-4 pl-6 pr-2":"px-2";let u;e[2]!==c?(u=ee("flex items-center gap-2 py-1.5 rounded-lg text-sm text-muted-foreground",c,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=c,e[3]=u):u=e[3];let l;e[4]!==r?(l=r&&n.jsx(ve,{className:"size-3.5"}),e[4]=r,e[5]=l):l=e[5];let d;e[6]!==r||e[7]!==a?(d=a(r?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=r,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==d?(m=n.jsx("span",{children:d}),e[9]=d,e[10]=m):m=e[10];let f;return e[11]!==r||e[12]!==s||e[13]!==o||e[14]!==u||e[15]!==l||e[16]!==m?(f=n.jsxs("button",{type:"button","aria-label":o,onClick:s,disabled:r,className:u,children:[l,m]}),e[11]=r,e[12]=s,e[13]=o,e[14]=u,e[15]=l,e[16]=m,e[17]=f):f=e[17],f}function Ca(t,e,s,r){return[t,e,s,r.type,r.member,r.currentUserId??""].join("|")}function Pa(t){return t.member==="mine"&&!t.currentUserId}const Ht=4;let _e=0;const Ke=[];function Ia(){for(;_e<Ht&&Ke.length>0;){const t=Ke.shift();t&&t()}}function Ut(t){return new Promise((e,s)=>{const r=()=>{_e++,t().then(e,s).finally(()=>{_e--,Ia()})};_e<Ht?r():Ke.push(r)})}const Be=10;function ut(t,e,s,r,i){const a={hidden:!1};r.member==="mine"&&r.currentUserId&&(a.created_by=r.currentUserId),r.type==="automation"&&(a.has_trigger=!0),r.type==="manual"&&(a.has_trigger=!1);const o={where:a,limit:i,offset:s,orderBy:[{field:["updated_at"],direction:"desc"}]};return o.status=e,o}function Ma(t,e,s,r){let i=0;for(const a of t)Kt(a,e,s,r)&&i++;return i}function He(t,e,s,r){return Ma(t,e,s,r)}function Aa(t,e){return!!(t>=Be||t===0&&e)}function ft(t,e){return t<e}function La(t,e){return e===!1?!1:e===!0?!0:t}function Kt(t,e,s,r){return!(t.hidden||(t.status??"completed")!==s||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const Pe=new Map,Ne=new Map;function $a(t,e){return e?t>=Be?!0:null:!1}function mt(t){return Pe.get(t)}function Ea(t,e){Pe.set(t,e)}function Fa(t,e,s){const r=Pe.get(t);if(r!==void 0){s(r);return}let i=Ne.get(t);i||(i=Ut(e).then(a=>(Pe.set(t,a),Ne.delete(t),a)).catch(()=>(Ne.delete(t),Promise.reject(new Error("group probe failed")))),Ne.set(t,i)),i.then(s,()=>s(!1))}function ht(t){const e=t,s=Array.isArray(e.items)?e.items:[];return{items:s,hasMore:e.hasMore??s.length===Be,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Ra(t,e,s,r,i){let a=0;for(const o of t)e.has(o.id)||Kt(o,s,r,i)&&a++;return a}function Oa(t,e,s,r){const i=A.c(8),{org:a}=ne(),o=Ca(a.id,t,e,s);let c;i[0]!==s?(c=Pa(s),i[0]=s,i[1]=c):c=i[1];const u=c,[l,d]=B.useState({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});l.identity!==o&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});const m=Ze(),{threads:f,hasMore:h}=Xe(),j=He(f,t,e,s),k=Aa(j,h),v=$a(j,h),x=Ie();if(l.identity===o&&l.serverHasMore===null){const N=v??mt(o);N!==void 0&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:l.probeSubscribedIdentity,serverHasMore:N})}!u&&l.identity===o&&l.serverHasMore===null&&v===null&&mt(o)===void 0&&l.probeSubscribedIdentity!==o&&(d(N=>N.identity===o?{...N,isProbing:!0,probeSubscribedIdentity:o}:N),Fa(o,async()=>{const N=ut(t,e,0,s,1),T=await x.call("COLLECTION_THREADS_LIST",N),{totalCount:_}=ht(T),w=He(m.threads.get(),t,e,s);return _===void 0?!1:ft(w,_)},N=>{d(T=>T.identity!==o?T:{...T,isProbing:!1,serverHasMore:N})}));const b=async function(){if(l.isFetching||l.isProbing||u)return;const T=o;d(_=>_.identity===T?{..._,isFetching:!0}:_);try{const _=He(f,t,e,s),w=ut(t,e,_,s,Be),I=await Ut(()=>x.call("COLLECTION_THREADS_LIST",w)),{items:P,hasMore:L,totalCount:$}=ht(I),E=new Set(f.map(Ba)),F=Ra(P,E,t,e,s),R=_;m.mergeThreads(P),d(M=>{if(M.identity!==T)return M;let C;return $!==void 0?C=ft(R+F,$):C=P.length===0||F===0?!1:L,Ea(T,C),{...M,isFetching:!1,serverHasMore:C}})}catch(_){const w=_,I=w instanceof Error?w.message:String(w);Jt.error(`Could not load more tasks: ${I}`),d(P=>P.identity===T?{...P,isFetching:!1}:P)}},y=l.isFetching||l.isProbing,p=!u&&!y&&La(k,l.serverHasMore);let S;return i[2]!==y||i[3]!==b||i[4]!==p||i[5]!==l.isProbing||i[6]!==l.serverHasMore?(S={hasMore:p,isFetching:y,isProbing:l.isProbing,serverHasMore:l.serverHasMore,loadMore:b},i[2]=y,i[3]=b,i[4]=p,i[5]=l.isProbing,i[6]=l.serverHasMore,i[7]=S):S=i[7],S}function Ba(t){return t.id}function Da(t){const e=A.c(20),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u}=t,{isFetching:l,isProbing:d,loadMore:m,hasMore:f,serverHasMore:h}=Oa("status",s,u),[j,k]=B.useState(!1);!j&&r.length===0&&h===!0&&!l&&!d&&(k(!0),queueMicrotask(()=>{m()}));let v;if(e[0]!==i||e[1]!==c||e[2]!==u||e[3]!==o||e[4]!==a||e[5]!==r){let b;e[7]!==i||e[8]!==c||e[9]!==u||e[10]!==o||e[11]!==a?(b=y=>n.jsx(zt,{task:y,isActive:i===y.id,onClick:()=>a(y),onArchive:c&&y.created_by===u.currentUserId?()=>o(y):void 0,showAutomationBadge:!!y.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},y.id),e[7]=i,e[8]=c,e[9]=u,e[10]=o,e[11]=a,e[12]=b):b=e[12],v=r.map(b),e[0]=i,e[1]=c,e[2]=u,e[3]=o,e[4]=a,e[5]=r,e[6]=v}else v=e[6];let x;e[13]!==f||e[14]!==l||e[15]!==m?(x=(f||l)&&n.jsx(Gt,{onClick:()=>{m()},isFetching:l,indented:!0}),e[13]=f,e[14]=l,e[15]=m,e[16]=x):x=e[16];let g;return e[17]!==v||e[18]!==x?(g=n.jsxs(n.Fragment,{children:[v,x]}),e[17]=v,e[18]=x,e[19]=g):g=e[19],g}function za(t){const e=A.c(43),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u}=t,l=K(),d=kn[s],m=d.icon,[f,h]=wa(`status-${s}`,!1);let j;e[0]!==f||e[1]!==h?(j=function(){h(!f)},e[0]=f,e[1]=h,e[2]=j):j=e[2];const k=j;let v;e[3]!==d.labelKey||e[4]!==l?(v=l("sidebar.taskGroupsList.toggleStatusGroup",{status:l(d.labelKey)}),e[3]=d.labelKey,e[4]=l,e[5]=v):v=e[5];let x;e[6]!==k?(x=I=>{I.target===I.currentTarget&&(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),k())},e[6]=k,e[7]=x):x=e[7];let g;e[8]!==m||e[9]!==d.iconClassName?(g=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:n.jsx(m,{size:12,className:d.iconClassName})}),e[8]=m,e[9]=d.iconClassName,e[10]=g):g=e[10];let b;e[11]!==f?(b=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:f?n.jsx(Ye,{size:14}):n.jsx(es,{size:14})}),e[11]=f,e[12]=b):b=e[12];let y;e[13]!==g||e[14]!==b?(y=n.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[g,b]}),e[13]=g,e[14]=b,e[15]=y):y=e[15];let p;e[16]!==d.labelKey||e[17]!==l?(p=l(d.labelKey),e[16]=d.labelKey,e[17]=l,e[18]=p):p=e[18];let S;e[19]!==p?(S=n.jsx("span",{className:"flex-1 truncate",children:p}),e[19]=p,e[20]=S):S=e[20];let N;e[21]!==r.length?(N=n.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:n.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:r.length})}),e[21]=r.length,e[22]=N):N=e[22];let T;e[23]!==f||e[24]!==k||e[25]!==v||e[26]!==x||e[27]!==y||e[28]!==S||e[29]!==N?(T=n.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":f,"aria-label":v,onClick:k,onKeyDown:x,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-lg text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[y,S,N]}),e[23]=f,e[24]=k,e[25]=v,e[26]=x,e[27]=y,e[28]=S,e[29]=N,e[30]=T):T=e[30];let _;e[31]!==i||e[32]!==c||e[33]!==f||e[34]!==u||e[35]!==o||e[36]!==a||e[37]!==s||e[38]!==r?(_=f&&n.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:n.jsx(Da,{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u})}),e[31]=i,e[32]=c,e[33]=f,e[34]=u,e[35]=o,e[36]=a,e[37]=s,e[38]=r,e[39]=_):_=e[39];let w;return e[40]!==T||e[41]!==_?(w=n.jsxs("div",{className:"flex flex-col gap-0.5",children:[T,_]}),e[40]=T,e[41]=_,e[42]=w):w=e[42],w}function Ga(t){const e=A.c(41),{threads:s,groupBy:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,filters:c,hasMore:u,isFetchingMore:l,onLoadMore:d,filtersActive:m}=t,f=K();if(s.length===0&&!u&&!l){let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(hs,{className:"size-6 opacity-60"}),e[0]=x):x=e[0];let g;e[1]!==m||e[2]!==f?(g=f(m?"sidebar.myThreadsSection.noChatsMatchFilters":"sidebar.myThreadsSection.noChatsYet"),e[1]=m,e[2]=f,e[3]=g):g=e[3];let b;return e[4]!==g?(b=n.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[x,n.jsx("p",{className:"text-sm",children:g})]}),e[4]=g,e[5]=b):b=e[5],b}const h=s.length>1||u;if(r==="status"){let x;if(e[6]!==i||e[7]!==h||e[8]!==c||e[9]!==o||e[10]!==a||e[11]!==s){let b;e[13]!==i||e[14]!==h||e[15]!==c||e[16]!==o||e[17]!==a?(b=y=>n.jsx(za,{status:y.status,threads:y.threads,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:h,filters:c},y.status),e[13]=i,e[14]=h,e[15]=c,e[16]=o,e[17]=a,e[18]=b):b=e[18],x=Na(s).map(b),e[6]=i,e[7]=h,e[8]=c,e[9]=o,e[10]=a,e[11]=s,e[12]=x}else x=e[12];let g;return e[19]!==x?(g=n.jsx(n.Fragment,{children:x}),e[19]=x,e[20]=g):g=e[20],g}let j;if(e[21]!==i||e[22]!==h||e[23]!==c||e[24]!==o||e[25]!==a||e[26]!==s){let x;e[28]!==i||e[29]!==h||e[30]!==c||e[31]!==o||e[32]!==a?(x=g=>n.jsx(zt,{task:g,isActive:i===g.id,onClick:()=>a(g),onArchive:h&&g.created_by===c.currentUserId?()=>o(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0},g.id),e[28]=i,e[29]=h,e[30]=c,e[31]=o,e[32]=a,e[33]=x):x=e[33],j=s.map(x),e[21]=i,e[22]=h,e[23]=c,e[24]=o,e[25]=a,e[26]=s,e[27]=j}else j=e[27];let k;e[34]!==u||e[35]!==l||e[36]!==d?(k=(u||l)&&n.jsx(Gt,{onClick:d,isFetching:l}),e[34]=u,e[35]=l,e[36]=d,e[37]=k):k=e[37];let v;return e[38]!==j||e[39]!==k?(v=n.jsxs(n.Fragment,{children:[j,k]}),e[38]=j,e[39]=k,e[40]=v):v=e[40],v}function Ha(t){const e=A.c(11),{panel:s}=t;let r;return e[0]!==s.activeTaskId||e[1]!==s.archiveTask||e[2]!==s.filters||e[3]!==s.filtersActive||e[4]!==s.groupBy||e[5]!==s.hasMore||e[6]!==s.isFetchingMore||e[7]!==s.loadMore||e[8]!==s.selectTask||e[9]!==s.threads?(r=n.jsx(Ga,{threads:s.threads,groupBy:s.groupBy,activeTaskId:s.activeTaskId,onSelectTask:s.selectTask,onArchiveTask:s.archiveTask,filters:s.filters,hasMore:s.hasMore,isFetchingMore:s.isFetchingMore,onLoadMore:s.loadMore,filtersActive:s.filtersActive}),e[0]=s.activeTaskId,e[1]=s.archiveTask,e[2]=s.filters,e[3]=s.filtersActive,e[4]=s.groupBy,e[5]=s.hasMore,e[6]=s.isFetchingMore,e[7]=s.loadMore,e[8]=s.selectTask,e[9]=s.threads,e[10]=r):r=e[10],r}function Ua(t){const e=A.c(67);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{onNavigate:r}=s,{data:i}=pe.useSession(),a=i?.user?.id,{org:o}=ne();let c;e[2]!==o.id?(c=je(o.id),e[2]=o.id,e[3]=c):c=e[3];const u=c.id,l=ba(),d=St(),{threads:m,hasMore:f,isFetchingMore:h,fetchNextPage:j}=Xe(),k=m.filter(Wa),{hide:v,setScope:x}=Je(),g=Ae(),{setTaskId:b,createNewTask:y}=Qe(),p=Et(),S=et();let N;e[4]!==S||e[5]!==m||e[6]!==p?(N=fn({routeAgentId:p,threadVirtualMcpId:m.find(U=>U.id===S)?.virtual_mcp_id}),e[4]=S,e[5]=m,e[6]=p,e[7]=N):N=e[7];const T=N;let _;e[8]!==r?(_=()=>{r?.()},e[8]=r,e[9]=_):_=e[9];const w=_,I=[...k].sort(qa),[P,L]=B.useState("all"),[$,E]=B.useState("flat"),[F,R]=xt("sidebar-threads-scope-all",!1),[M,C]=B.useState(!1),[G,z]=B.useState(!1);let H;e[10]!==C?(H=()=>{he("tasks_panel_search_opened"),z(!0),C(!0)},e[10]=C,e[11]=H):H=e[11];const O=H,V=a??null;let Q;e[12]!==V||e[13]!==P?(Q={type:P,member:"mine",currentUserId:V},e[12]=V,e[13]=P,e[14]=Q):Q=e[14];const Y=Q,Z={};F||(Z.created_by="me"),x(Z);let q;e[15]!==a?(q=U=>a?U.filter(ue=>ue.created_by===a):[],e[15]=a,e[16]=q):q=e[16];const le=q;let D;e[17]!==P?(D=U=>P==="automation"?U.filter(Va):P==="manual"?U.filter(Ka):U,e[17]=P,e[18]=D):D=e[18];const re=D,X=ga(re(F?I:le(I)),S);let J;e[19]!==S||e[20]!==w||e[21]!==a||e[22]!==v||e[23]!==g||e[24]!==o.slug||e[25]!==b||e[26]!==X?(J=U=>{if(a&&U.created_by&&U.created_by!==a)return;const ue=U.id===S;if(v(U.id),Hs(U.id),!ue)return;const ge=Sa(X,U.id,a);w(),ge?b(ge.id,ge.virtual_mcp_id):g({to:"/$org",params:{org:o.slug}})},e[19]=S,e[20]=w,e[21]=a,e[22]=v,e[23]=g,e[24]=o.slug,e[25]=b,e[26]=X,e[27]=J):J=e[27];const te=J;let ae;e[28]!==w||e[29]!==b?(ae=U=>{w(),b(U.id,U.virtual_mcp_id)},e[28]=w,e[29]=b,e[30]=ae):ae=e[30];const ie=ae;let se;e[31]!==T||e[32]!==S||e[33]!==m||e[34]!==w||e[35]!==y||e[36]!==a||e[37]!==u||e[38]!==l||e[39]!==d||e[40]!==b?(se=()=>{const U=T??u;he("sidebar_new_thread_clicked",{virtual_mcp_id:U}),w();const ue=nn(m,U,a,l(U));if(ue){b(ue.id,ue.virtual_mcp_id);return}const ge=d?null:m.find(Vt=>Vt.id===S)?.branch??null;y(U,ge)},e[31]=T,e[32]=S,e[33]=m,e[34]=w,e[35]=y,e[36]=a,e[37]=u,e[38]=l,e[39]=d,e[40]=b,e[41]=se):se=e[41];const oe=se;let ce;e[42]!==j?(ce=()=>{j()},e[42]=j,e[43]=ce):ce=e[43];const xe=$!=="flat"||P!=="all"||F;let de;e[44]!==G||e[45]!==M||e[46]!==C?(de=G?n.jsx(ja,{open:M,onOpenChange:C}):null,e[44]=G,e[45]=M,e[46]=C,e[47]=de):de=e[47];let Te;return e[48]!==S||e[49]!==te||e[50]!==Y||e[51]!==$||e[52]!==f||e[53]!==h||e[54]!==oe||e[55]!==O||e[56]!==ie||e[57]!==E||e[58]!==R||e[59]!==L||e[60]!==F||e[61]!==ce||e[62]!==xe||e[63]!==de||e[64]!==P||e[65]!==X?(Te={threads:X,activeTaskId:S,filters:Y,hasMore:f,isFetchingMore:h,loadMore:ce,groupBy:$,setGroupBy:E,typeFilter:P,setTypeFilter:L,showAll:F,setShowAll:R,filtersActive:xe,selectTask:ie,archiveTask:te,newThread:oe,openSearch:O,searchDialog:de},e[48]=S,e[49]=te,e[50]=Y,e[51]=$,e[52]=f,e[53]=h,e[54]=oe,e[55]=O,e[56]=ie,e[57]=E,e[58]=R,e[59]=L,e[60]=F,e[61]=ce,e[62]=xe,e[63]=de,e[64]=P,e[65]=X,e[66]=Te):Te=e[66],Te}function Ka(t){return!t.trigger_id}function Va(t){return!!t.trigger_id}function qa(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function Wa(t){return!t.hidden}function Ya(){const t=A.c(59),e=K(),[s,r]=B.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={onNavigate:()=>r(!1)},t[0]=i):i=t[0];const a=Ua(i),o=$e()?.activeTask;let c;t[1]!==o?.title||t[2]!==a.activeTaskId||t[3]!==a.threads||t[4]!==e?(c=o?.title||a.threads.find(M=>M.id===a.activeTaskId)?.title||e("tasksPanel.taskRow.untitledTask"),t[1]=o?.title,t[2]=a.activeTaskId,t[3]=a.threads,t[4]=e,t[5]=c):c=t[5];const u=c;let l;t[6]!==a?(l=()=>{r(!1),a.openSearch()},t[6]=a,t[7]=l):l=t[7];const d=l;let m;t[8]!==e?(m=e("chat.threadsMenu.chats"),t[8]=e,t[9]=m):m=t[9];const f=s&&"bg-sidebar-accent";let h;t[10]!==f?(h=ee("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",f),t[10]=f,t[11]=h):h=t[11];let j;t[12]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(ps,{size:16,className:"shrink-0"}),t[12]=j):j=t[12];let k;t[13]!==u?(k=n.jsx("span",{className:"truncate max-w-[10rem] font-medium",children:u}),t[13]=u,t[14]=k):k=t[14];let v;t[15]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Ye,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[15]=v):v=t[15];let x;t[16]!==m||t[17]!==h||t[18]!==k?(x=n.jsx(Fe,{asChild:!0,children:n.jsx(At,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":m,className:h,children:[j,k,v]})})}),t[16]=m,t[17]=h,t[18]=k,t[19]=x):x=t[19];let g;t[20]!==e?(g=e("chat.threadsMenu.chats"),t[20]=e,t[21]=g):g=t[21];let b;t[22]!==g?(b=n.jsx(Re,{side:"bottom",children:g}),t[22]=g,t[23]=b):b=t[23];let y;t[24]!==b||t[25]!==x?(y=n.jsxs(Oe,{children:[x,b]}),t[24]=b,t[25]=x,t[26]=y):y=t[26];let p;t[27]!==a?(p=n.jsx(xa,{panel:a,className:"size-8"}),t[27]=a,t[28]=p):p=t[28];let S;t[29]!==e?(S=e("sidebar.taskGroupsList.searchChats"),t[29]=e,t[30]=S):S=t[30];let N;t[31]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(xs,{size:16}),t[31]=N):N=t[31];let T;t[32]!==d||t[33]!==S?(T=n.jsx(we,{"aria-label":S,onClick:d,className:"size-8",children:N}),t[32]=d,t[33]=S,t[34]=T):T=t[34];let _;t[35]!==e?(_=e("sidebar.taskGroupsList.newChat"),t[35]=e,t[36]=_):_=t[36];let w;t[37]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(bt,{size:16}),t[37]=w):w=t[37];let I;t[38]!==a.newThread||t[39]!==_?(I=n.jsx(we,{"aria-label":_,onClick:a.newThread,className:"size-8",children:w}),t[38]=a.newThread,t[39]=_,t[40]=I):I=t[40];let P;t[41]!==T||t[42]!==I?(P=n.jsxs("div",{className:"flex items-center gap-0.5",children:[T,I]}),t[41]=T,t[42]=I,t[43]=P):P=t[43];let L;t[44]!==p||t[45]!==P?(L=n.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[p,P]}),t[44]=p,t[45]=P,t[46]=L):L=t[46];let $;t[47]!==a?($=n.jsx("div",{className:"flex max-h-[60vh] min-h-0 flex-col gap-0.5 overflow-y-auto overscroll-contain",children:n.jsx(Ha,{panel:a})}),t[47]=a,t[48]=$):$=t[48];let E;t[49]!==L||t[50]!==$?(E=n.jsxs(Lt,{align:"start",side:"bottom",onOpenAutoFocus:Qa,className:"flex w-80 flex-col gap-2 p-2",children:[L,$]}),t[49]=L,t[50]=$,t[51]=E):E=t[51];let F;t[52]!==s||t[53]!==y||t[54]!==E?(F=n.jsxs($t,{open:s,onOpenChange:r,children:[y,E]}),t[52]=s,t[53]=y,t[54]=E,t[55]=F):F=t[55];let R;return t[56]!==a.searchDialog||t[57]!==F?(R=n.jsxs(n.Fragment,{children:[F,a.searchDialog]}),t[56]=a.searchDialog,t[57]=F,t[58]=R):R=t[58],R}function Qa(t){return t.preventDefault()}function Za(){const t=A.c(20),e=K(),{threads:s}=Xe(),{createNewTask:r}=Qe(),i=Ft(),a=et();let o;t[0]!==a||t[1]!==s?(o=s.find(v=>v.id===a)?.branch??null,t[0]=a,t[1]=s,t[2]=o):o=t[2];const c=o;let u;t[3]!==i||t[4]!==r||t[5]!==c?(u=()=>{r(i,c)},t[3]=i,t[4]=r,t[5]=c,t[6]=u):u=t[6];const l=u;let d;t[7]!==e?(d=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=d):d=t[8];let m;t[9]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(bt,{size:16}),t[9]=m):m=t[9];let f;t[10]!==l||t[11]!==d?(f=n.jsx(Fe,{asChild:!0,children:n.jsx("button",{type:"button",onClick:l,"aria-label":d,className:"flex shrink-0 items-center rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:m})}),t[10]=l,t[11]=d,t[12]=f):f=t[12];let h;t[13]!==e?(h=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=h):h=t[14];let j;t[15]!==h?(j=n.jsx(Re,{side:"bottom",children:h}),t[15]=h,t[16]=j):j=t[16];let k;return t[17]!==f||t[18]!==j?(k=n.jsxs(Oe,{children:[f,j]}),t[17]=f,t[18]=j,t[19]=k):k=t[19],k}function Xa(t){const e=A.c(18),{virtualMcp:s}=t,r=K(),i=Tt(),{navigateToTask:a}=Nn(),{create:o}=Je(),c=ts(),{org:u}=ne();let l,d;if(e[0]!==i||e[1]!==o||e[2]!==a||e[3]!==u||e[4]!==c||e[5]!==r||e[6]!==s){d=Symbol.for("react.early_return_sentinel");e:{const m=Ws(s,i);if(!m){d=null;break e}const f=m.mode==="dev";let h;e[9]!==o||e[10]!==a||e[11]!==u||e[12]!==c?(h=async b=>{const y=crypto.randomUUID();await Promise.all([o({id:y,virtual_mcp_id:b}).catch(er),Rs(c,u,b).catch(Ja)]),a(y,{virtualMcpId:b})},e[9]=o,e[10]=a,e[11]=u,e[12]=c,e[13]=h):h=e[13];const j=h,k=(b,y,p)=>n.jsxs("button",{type:"button","aria-pressed":y,"aria-label":b,title:b,onClick:()=>{y||j(m.targetId)},className:ee("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg transition-colors",y?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[n.jsx(p,{className:"size-3.5 shrink-0"}),n.jsx("span",{className:"@max-3xl/panel-header:hidden",children:b})]});let v;e[14]!==r?(v=r("devAgent.devAgentControl.develop"),e[14]=r,e[15]=v):v=e[15];const x=k(v,f,gs);let g;e[16]!==r?(g=r("devAgent.devAgentControl.live"),e[16]=r,e[17]=g):g=e[17],l=n.jsxs("div",{className:"inline-flex items-center rounded-lg border border-border bg-muted p-0.5 text-xs font-medium",children:[x,k(g,!f,bs)]})}e[0]=i,e[1]=o,e[2]=a,e[3]=u,e[4]=c,e[5]=r,e[6]=s,e[7]=l,e[8]=d}else l=e[7],d=e[8];return d!==Symbol.for("react.early_return_sentinel")?d:l}function Ja(){}function er(){}function tr(t){const e=A.c(16),{virtualMcpId:s,taskId:r}=t,{openPanel:i}=Ot();let a;e[0]!==r||e[1]!==s?(a={virtualMcpId:s,taskId:r},e[0]=r,e[1]=s,e[2]=a):a=e[2];const{tabs:o,activeTab:c,mainOpen:u}=Bt(a);if(o.length===0)return null;let l;if(e[3]!==c||e[4]!==u||e[5]!==i||e[6]!==o||e[7]!==s){let m;e[9]!==c||e[10]!==u||e[11]!==i||e[12]!==s?(m=f=>{const h=f.id==="automations"?ss({activeTab:c,mainOpen:u}):u&&f.id===c;return n.jsxs(st.Tab,{active:h,onClick:()=>{h||(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:f.id,tab_kind:f.kind,was_active:!1}),i(f.id))},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(Ce,{icon:f.icon})}),f.title]},f.id)},e[9]=c,e[10]=u,e[11]=i,e[12]=s,e[13]=m):m=e[13],l=o.map(m),e[3]=c,e[4]=u,e[5]=i,e[6]=o,e[7]=s,e[8]=l}else l=e[8];let d;return e[14]!==l?(d=n.jsx(st.Tabs,{"data-tour":Us.surfaceTabs,children:l}),e[14]=l,e[15]=d):d=e[15],d}function sr(t){return{threadId:t.routeThreadId,providerKey:t.routeThreadId??t.fallbackKey}}const Ue="__mobile-main-panel-tab-select__",Ve="main";function nr({tabs:t,activeTab:e,mainOpen:s,t:r}){const i=t.find(o=>o.id===e),a=r("mainPanelTabs.mobileMainPanelTabSelect.mainView");return s?i?.title??a:i?.title??t[0]?.title??a}const ar={kind:"component",Component:vs},rr={kind:"component",Component:ys},ir={kind:"component",Component:js},lr={kind:"component",Component:wn};function or({tabs:t,overlayEnabled:e,t:s}){return[{value:"chat",title:s("mainPanelTabs.mobileMainPanelTabSelect.chat"),icon:ar},...t.length>0?t.map(r=>({value:r.id,title:r.title,icon:r.icon})):[{value:Ve,title:s("mainPanelTabs.mobileMainPanelTabSelect.mainView"),icon:lr}],...e?[{value:"board",title:s("mainPanelTabs.mobileMainPanelTabSelect.tasks"),icon:rr},{value:"files",title:s("mainPanelTabs.mobileMainPanelTabSelect.library"),icon:ir}]:[]]}function cr(t){const e=A.c(53),{virtualMcpId:s,taskId:r}=t,i=K(),a=Ae(),{openPanel:o}=Ot();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const u=ke(c);let l;e[1]!==r||e[2]!==s?(l={virtualMcpId:s,taskId:r},e[1]=r,e[2]=s,e[3]=l):l=e[3];const{tabs:d,activeTab:m,mainOpen:f}=Bt(l),{org:h}=ne(),j=Es();let k;e[4]!==h.id?(k=nt(h.id),e[4]=h.id,e[5]=k):k=e[5];const v=s===k;let x,g,b,y,p,S,N,T,_,w;if(e[6]!==m||e[7]!==f||e[8]!==a||e[9]!==v||e[10]!==o||e[11]!==h.id||e[12]!==u.org||e[13]!==u.taskId||e[14]!==j||e[15]!==i||e[16]!==d||e[17]!==s){y=Symbol.for("react.early_return_sentinel");e:{const L=or({tabs:d,overlayEnabled:!!(u.org&&u.taskId),t:i}),$=f?L.find(O=>O.value===m)?.value??Ve:"chat",E=L.find(O=>O.value===$),F=E?.title??nr({tabs:d,activeTab:m,mainOpen:f,t:i});let R;e[28]!==a?(R=O=>{a({to:".",search:V=>({...V,...Ys(O)}),replace:!0})},e[28]=a,e[29]=R):R=e[29];const M=R;let C;e[30]!==v||e[31]!==o||e[32]!==h.id||e[33]!==j||e[34]!==M||e[35]!==s?(C=O=>{if(O!==Ue){if(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:O,source:"mobile_select"}),Ks({reportsOnly:j,onReportAgent:v,tabId:O})){o(O,{virtualmcpid:nt(h.id),search:fr});return}if(O==="chat"||O===Ve){M(O==="chat"?"chat":"main");return}o(O,{search:ur})}},e[30]=v,e[31]=o,e[32]=h.id,e[33]=j,e[34]=M,e[35]=s,e[36]=C):C=e[36];const G=C,z=L.find(O=>O.value!==$);if(L.length===2&&z){y=n.jsxs("button",{type:"button",onClick:()=>G(z.value),"aria-label":i("mainPanelTabs.mobileMainPanelTabSelect.switchTo",{name:z.title}),className:"flex h-10 min-w-0 max-w-[7.5rem] items-center gap-1.5 rounded-lg px-1.5 text-xs text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(Ce,{icon:z.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:z.title})]});break e}g=Pn,_=Ue,w=G;let H;e[37]!==i?(H=i("mainPanelTabs.mobileMainPanelTabSelect.view"),e[37]=i,e[38]=H):H=e[38],b=n.jsx(Cn,{"aria-label":H,className:"h-10! w-full min-w-0 max-w-[7.5rem] rounded-lg border-0 bg-transparent px-1.5 text-xs shadow-none [--card-shadow:none]",children:n.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[E&&n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(Ce,{icon:E.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:F})]})}),x=In,p="end",S="w-56",e[39]!==F?(N=n.jsx(Dt,{value:Ue,disabled:!0,hideCheck:!0,className:"hidden",children:F}),e[39]=F,e[40]=N):N=e[40],T=L.map(dr)}e[6]=m,e[7]=f,e[8]=a,e[9]=v,e[10]=o,e[11]=h.id,e[12]=u.org,e[13]=u.taskId,e[14]=j,e[15]=i,e[16]=d,e[17]=s,e[18]=x,e[19]=g,e[20]=b,e[21]=y,e[22]=p,e[23]=S,e[24]=N,e[25]=T,e[26]=_,e[27]=w}else x=e[18],g=e[19],b=e[20],y=e[21],p=e[22],S=e[23],N=e[24],T=e[25],_=e[26],w=e[27];if(y!==Symbol.for("react.early_return_sentinel"))return y;let I;e[41]!==x||e[42]!==p||e[43]!==S||e[44]!==N||e[45]!==T?(I=n.jsxs(x,{align:p,className:S,children:[N,T]}),e[41]=x,e[42]=p,e[43]=S,e[44]=N,e[45]=T,e[46]=I):I=e[46];let P;return e[47]!==g||e[48]!==b||e[49]!==I||e[50]!==_||e[51]!==w?(P=n.jsxs(g,{value:_,onValueChange:w,children:[b,I]}),e[47]=g,e[48]=b,e[49]=I,e[50]=_,e[51]=w,e[52]=P):P=e[52],P}function dr(t){return n.jsx(Dt,{value:t.value,children:n.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(Ce,{icon:t.icon})}),n.jsx("span",{className:"min-w-0 truncate",children:t.title})]})},t.value)}function ur(t){return{...t,sidepanel:!1}}function fr(t){return{...t,thread:void 0,sidepanel:!1}}function mr(t,e,s){const r=A.c(33),i=Ze(),{locator:a}=ne(),o=B.useSyncExternalStore(i.threads.subscribe,i.threads.get),c=B.useSyncExternalStore(i.threadsStatus.subscribe,i.threadsStatus.get);let u;r[0]!==t||r[1]!==o?(u=t===null?null:o.find(p=>p.id===t&&!p.partial)??null,r[0]=t,r[1]=o,r[2]=u):u=r[2];const l=u,[d,m]=B.useState(void 0),[f,h]=B.useState(t);f!==t&&(h(t),m(void 0));let j,k;r[3]!==d||r[4]!==t||r[5]!==l||r[6]!==i||r[7]!==c.kind?(j=()=>{t!==null&&(l||c.kind!=="loading"&&d===void 0&&(m("pending"),i.fetchThreadIntoSlot(t).then(p=>{m(p)})))},k=[t,l,c.kind,d,i],r[3]=d,r[4]=t,r[5]=l,r[6]=i,r[7]=c.kind,r[8]=j,r[9]=k):(j=r[8],k=r[9]),B.useEffect(j,k);let v;r[10]!==s||r[11]!==a||r[12]!==i||r[13]!==e?(v={mutationFn:async p=>i.create({id:p,virtual_mcp_id:e,...s?{branch:s}:{},...sn(sessionStorage,a,p)})},r[10]=s,r[11]=a,r[12]=i,r[13]=e,r[14]=v):v=r[14];const x=ns(v);let g,b;if(r[15]!==x||r[16]!==d||r[17]!==t||r[18]!==l||r[19]!==c.kind?(g=()=>{t!==null&&(l||d===null&&c.kind!=="loading"&&(x.isPending||x.variables!==t&&x.mutate(t)))},b=[t,l,d,c.kind,x],r[15]=x,r[16]=d,r[17]=t,r[18]=l,r[19]=c.kind,r[20]=g,r[21]=b):(g=r[20],b=r[21]),B.useEffect(g,b),t===null){let p;return r[22]===Symbol.for("react.memo_cache_sentinel")?(p={status:"ready",task:null},r[22]=p):p=r[22],p}if(l){let p;return r[23]!==l?(p={status:"ready",task:l},r[23]=l,r[24]=p):p=r[24],p}if(d&&typeof d=="object"){let p;return r[25]!==d?(p={status:"ready",task:d},r[25]=d,r[26]=p):p=r[26],p}if(x.data){let p;return r[27]!==x.data?(p={status:"ready",task:x.data},r[27]=x.data,r[28]=p):p=r[28],p}if(x.isError){let p;return r[29]!==x.error?(p={status:"error",error:x.error},r[29]=x.error,r[30]=p):p=r[30],p}if(x.isPending||c.kind!=="loading"){let p;return r[31]===Symbol.for("react.memo_cache_sentinel")?(p={status:"creating"},r[31]=p):p=r[31],p}let y;return r[32]===Symbol.for("react.memo_cache_sentinel")?(y={status:"loading"},r[32]=y):y=r[32],y}const hr=50;function pr(t,e){const s=A.c(15),{org:r}=ne(),i=Ie(),{data:a}=pe.useSession(),o=a?.user?.id??"";let c;s[0]!==r.id||s[1]!==o||s[2]!==t?(c=fe.agentEntryThreads(r.id,o,t),s[0]=r.id,s[1]=o,s[2]=t,s[3]=c):c=s[3];const u=e&&!!o;let l;s[4]!==i||s[5]!==t?(l=async()=>{try{return(await i.call("COLLECTION_THREADS_LIST",{limit:hr,offset:0,orderBy:[{field:["updated_at"],direction:"desc"}],where:{hidden:!1,created_by:"me",virtual_mcp_id:t}})).items}catch{return[]}},s[4]=i,s[5]=t,s[6]=l):l=s[6];let d;s[7]!==c||s[8]!==u||s[9]!==l?(d={queryKey:c,enabled:u,staleTime:0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,queryFn:l},s[7]=c,s[8]=u,s[9]=l,s[10]=d):d=s[10];const m=me(d);if(!e||!o){let h;return s[11]===Symbol.for("react.memo_cache_sentinel")?(h={status:"idle"},s[11]=h):h=s[11],h}if(!m.data||m.isFetching){let h;return s[12]===Symbol.for("react.memo_cache_sentinel")?(h={status:"loading"},s[12]=h):h=s[12],h}let f;return s[13]!==m.data?(f={status:"ready",threads:m.data},s[13]=m.data,s[14]=f):f=s[14],f}function xr(t){const e=A.c(13),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=ke(r);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const o=Le(a);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={select:gr},e[2]=c):c=e[2];const u=as(c),{org:l}=ne();let d;e[3]!==l||e[4]!==i.agentId||e[5]!==i.legacyView||e[6]!==i.org||e[7]!==u||e[8]!==o?(d=i.org?rs({pathname:u,org:i.org,pathAgentId:i.agentId,pathLegacyView:i.legacyView,fallbackAgentId:je(l.id).id,search:o}):null,e[3]=l,e[4]=i.agentId,e[5]=i.legacyView,e[6]=i.org,e[7]=u,e[8]=o,e[9]=d):d=e[9];const m=d;let f;return e[10]!==s||e[11]!==m?(f=m?n.jsx(tt,{target:m}):s,e[10]=s,e[11]=m,e[12]=f):f=e[12],f}function gr(t){return t.matches.at(-1)?.pathname??t.location.pathname}function br(){const t=A.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=ke(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const i=Le(r),{org:a}=ne(),{org:o,taskId:c}=s;if(!o||c===void 0)return null;let u;return t[2]!==o||t[3]!==a.id||t[4]!==i||t[5]!==c?(u=is({org:o,taskId:c,fallbackAgentId:je(a.id).id,search:i}),t[2]=o,t[3]=a.id,t[4]=i,t[5]=c,t[6]=u):u=t[6],u}function vr(){const t=A.c(2),e=br();let s;return t[0]!==e?(s=e?n.jsx(tt,{target:e}):null,t[0]=e,t[1]=s):s=t[1],s}function yr(){const t=A.c(6),e=An(),s=Ae();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const{preview:i}=Le(r);if(!e||!i)return null;let a;t[1]!==s?(a=()=>s({to:".",search:jr}),t[1]=s,t[2]=a):a=t[2];let o;return t[3]!==i||t[4]!==a?(o=n.jsx(Ln,{previewPath:i,onClose:a,showSeeInLibrary:!0}),t[3]=i,t[4]=a,t[5]=o):o=t[5],o}function jr(t){const{preview:e,...s}=t;return s}function kr(t){const e=A.c(11),{children:s}=t,r=K();let i;e[0]!==r?(i=r("agentShellLayout.agentShellLayout.chatLoadingError"),e[0]=r,e[1]=i):i=e[1];let a;e[2]!==i?(a=n.jsx("div",{role:"alert",className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:i}),e[2]=i,e[3]=a):a=e[3];let o;e[4]!==s?(o=s??n.jsx(ma,{}),e[4]=s,e[5]=o):o=e[5];let c;e[6]!==o?(c=n.jsx(Me,{children:o}),e[6]=o,e[7]=c):c=e[7];let u;return e[8]!==a||e[9]!==c?(u=n.jsx(pt,{fallback:a,children:c}),e[8]=a,e[9]=c,e[10]=u):u=e[10],u}function Sr(t){const e=A.c(5),{threadId:s,children:r}=t;if(s===null){let a;return e[0]!==r?(a=n.jsx(W.ThreadlessProvider,{children:r}),e[0]=r,e[1]=a):a=e[1],a}let i;return e[2]!==r||e[3]!==s?(i=n.jsx(W.ActiveTaskProvider,{taskId:s,children:r}),e[2]=r,e[3]=s,e[4]=i):i=e[4],i}function Tr(t){const e=A.c(3),{onNewTaskRef:s,createNewTask:r}=t;let i;return e[0]!==r||e[1]!==s?(i=()=>(s.current=r,()=>{s.current=null}),e[0]=r,e[1]=s,e[2]=i):i=e[2],B.useLayoutEffect(i),null}function Nr({virtualMcpId:t,hasActiveRepository:e,sandboxMap:s,children:r}){const i=K(),{currentBranch:a,activeTask:o,setCurrentTaskBranch:c}=Ee(),{data:u}=pe.useSession(),l=u?.user?.id,d=!As(o?.harness_id),m=rn({agentSandboxMap:s,threadSandboxMap:o?.metadata?.sandboxMap,userId:l,ownerId:o?.created_by,branch:a}),f=e||Zs(o?.metadata),h=B.useRef(null),j=d&&ln({threadLoaded:!!o,isOwner:!!l&&o?.created_by===l,hasActiveRepository:f,branch:a??null,attempted:h.current===(o?.id??null)});B.useEffect(()=>{!j||!o||(h.current=o.id,c(Ct(u?.user?.name||u?.user?.email?.split("@")[0])))},[j,o,u,c]);const k=yt(t),v=Se(t),x=It(v,a),{releases:g,createRelease:b}=Xs(t),p=!!l&&o?.created_by===l&&!!a&&a!==x&&!g.some(L=>L.branch===a),S=B.useRef(null);B.useEffect(()=>{!p||!a||S.current!==a&&(S.current=a,b({branch:a,name:en(g,i("thread.branchPicker.defaultVersionName")),color:Js(g.length),createdBy:l,createdAt:new Date().toISOString()}).catch(()=>{}))},[p,a,g,b,l,i]);const N=k.resolved?k.runtime:null,T=on(t,a??void 0),w=(l&&a?En(m?.[l]?.[a]):{})["agent-sandbox"]??null,I=w?.previewUrl??null,P=d&&N!=="cms"&&(!!w||T);return d?N==="cms"?n.jsx(lt,{children:r},`${t}:${a??"no-branch"}:${o?.id??""}`):n.jsx(_s,{virtualMcpId:t,branch:a??null,previewUrl:I,enabled:P,children:n.jsx(cn,{executionEnabled:d,virtualMcpId:t,branch:a??null,userId:l??null,hasActiveRepository:f,vmEntry:w,threadId:o?.id??null,children:n.jsx(lt,{children:r},`${t}:${a??"no-branch"}:${o?.id??""}`)})},o?.id??"no-thread"):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex h-full rounded-[0.75rem] bg-background card-shadow",children:n.jsx(Mt,{image:n.jsx(qe,{size:48,className:"text-muted-foreground"}),title:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWeb"),description:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWebDescription")})})})}function _r(){const t=A.c(16),e=K(),{toggleSidebar:s}=Ts(),{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 o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ks,{size:16}),t[2]=o):o=t[2];let c;t[3]!==a||t[4]!==s?(c=n.jsx(we,{className:"md:hidden",onClick:s,"aria-label":a,children:o}),t[3]=a,t[4]=s,t[5]=c):c=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Ya,{}),t[6]=u):u=t[6];let l;t[7]!==c?(l=n.jsxs(De.Topbar.Left,{children:[c,u]}),t[7]=c,t[8]=l):l=t[8];let d;t[9]!==i||t[10]!==r?(d=n.jsx("div",{className:"min-w-0 md:hidden",children:n.jsx(cr,{virtualMcpId:r,taskId:i})}),t[9]=i,t[10]=r,t[11]=d):d=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(De.Topbar.Right,{className:"shrink-0",children:n.jsx(Za,{})}),t[12]=m):m=t[12];let f;return t[13]!==l||t[14]!==d?(f=n.jsxs(De.Topbar,{className:"border-b border-border/60 px-3",children:[l,d,m]}),t[13]=l,t[14]=d,t[15]=f):f=t[15],f}function wr(t){const e=A.c(25),{layout:s,onNewTaskRef:r,createNewTask:i}=t,{virtualMcpId:a,taskId:o}=Ee(),c=Se(a),u=_n()??"overview",l=Ss(),[d,m]=B.useState(null),f=d===u,h=l?f:s.threadOpen;let j;e[0]!==u||e[1]!==s||e[2]!==l||e[3]!==f?(j=l?()=>m(f?null:u):s.toggleThread,e[0]=u,e[1]=s,e[2]=l,e[3]=f,e[4]=j):j=e[4];const k=j;let v;e[5]!==i||e[6]!==r?(v=n.jsx(Tr,{onNewTaskRef:r,createNewTask:i}),e[5]=i,e[6]=r,e[7]=v):v=e[7];let x;e[8]!==o||e[9]!==a?(x=n.jsx(tr,{virtualMcpId:a,taskId:o}),e[8]=o,e[9]=a,e[10]=x):x=e[10];let g;e[11]!==c?(g=c&&n.jsx(Xa,{virtualMcp:c}),e[11]=c,e[12]=g):g=e[12];let b,y;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(it.Thread,{topbar:n.jsx(_r,{}),children:n.jsx(kr,{})}),y=n.jsx(gt,{}),e[13]=b,e[14]=y):(b=e[13],y=e[14]);let p;e[15]!==u||e[16]!==s||e[17]!==x||e[18]!==g||e[19]!==h||e[20]!==k?(p=n.jsxs(it,{...s,threadOpen:h,toggleThread:k,contentKey:u,contentNavigation:x,contentActions:g,children:[b,y]}),e[15]=u,e[16]=s,e[17]=x,e[18]=g,e[19]=h,e[20]=k,e[21]=p):p=e[21];let S;return e[22]!==v||e[23]!==p?(S=n.jsxs(n.Fragment,{children:[v,p]}),e[22]=v,e[23]=p,e[24]=S):S=e[24],S}function Cr(){const t=K(),e=Ae(),s=mn(),{create:r}=Je(),{org:i}=ne(),o=ke({strict:!1}).org??"",c=Le({strict:!1}),u=et(),l=Ft(),d=Et(),[m]=B.useState(()=>crypto.randomUUID()),{data:f}=pe.useSession(),[h]=B.useState(()=>Ct(f?.user?.name||f?.user?.email?.split("@")[0])),j=Ze(),k=B.useSyncExternalStore(j.threads.subscribe,j.threads.get),v=B.useSyncExternalStore(j.threadsStatus.subscribe,j.threadsStatus.get),x=Se(l),g=!!(x&&_t(x)),b=It(x,null),y=u===null&&!!d&&!!x,p=M=>an(M,l,f?.user?.id,Pt(x?.metadata),g,{baseBranch:b}),S=y&&v.kind!=="loading"?p(k):void 0,N=pr(l,y&&v.kind!=="loading"&&!S),T=mr(u,l,h);ha(T.status==="ready"?T.task:null);const _=x?.metadata?.ui?.layout??null,w=_?{defaultMainView:_.defaultMainView??null,chatDefaultOpen:_.chatDefaultOpen??null}:null,I=Qs(w),{threadId:P,providerKey:L}=sr({routeThreadId:u,fallbackKey:m}),$=async()=>{const M=crypto.randomUUID(),C=k.find(G=>G.id===P)?.branch??null;try{await r({id:M,virtual_mcp_id:l,...C?{branch:C}:{}})}catch{}s(M,()=>({}))},E=B.useRef(null);B.useEffect(()=>{const M=C=>{Vs(C)&&C.shiftKey&&C.code==="KeyS"&&!C.repeat&&(C.preventDefault(),E.current?.())};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[]);const F=T.status==="ready"?T.task:null,R=F?.virtual_mcp_id;if(F&&R&&!hn({routeAgentId:l,threadAgentId:R})){const M=ls({org:o,agentId:R,superAgentId:je(i.id).id});return n.jsx(tt,{target:{route:M,search:{thread:F.id,sidepanel:c.sidepanel,mainpanel:c.mainpanel,autosend:c.autosend}}})}if(y){if(v.kind==="loading"||N.status==="loading")return n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background card-shadow rounded-[0.75rem] text-sm text-muted-foreground",children:[n.jsx(ve,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})});const C=(S??(N.status==="ready"?p(N.threads):void 0))?.id??(g?m:null);if(C)return n.jsx(os,{to:".",replace:!0,search:G=>({...G,thread:C})})}return T.status==="creating"||T.status==="loading"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background card-shadow rounded-[0.75rem] text-sm text-muted-foreground",children:[n.jsx(ve,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})}):T.status==="error"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"alert",className:"flex flex-col h-full items-center justify-center gap-2 bg-background card-shadow rounded-[0.75rem] p-8 text-sm",children:[n.jsx("div",{className:"font-medium",children:t("agentShellLayout.agentShellLayout.taskUnavailable")}),n.jsx("div",{className:"text-muted-foreground",children:T.error.message})]})}):x?n.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:n.jsx(W.Provider,{virtualMcpId:l,task:T.status==="ready"?T.task:null,children:n.jsx(Is,{layout:I,children:n.jsx(Nr,{virtualMcpId:l,hasActiveRepository:g,sandboxMap:x.metadata?.sandboxMap,children:n.jsx(Sr,{threadId:P,children:n.jsx(Me,{children:n.jsx(wr,{layout:I,onNewTaskRef:E,createNewTask:$})})},L)})})},l)}):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:n.jsx(Mt,{image:n.jsx(qe,{size:48,className:"text-muted-foreground"}),title:t("agentShellLayout.agentShellLayout.agentNotFound"),description:t("agentShellLayout.agentShellLayout.agentNotFoundDescription",{virtualMcpId:l}),actions:n.jsx(cs,{variant:"outline",onClick:()=>e({to:"/$org",params:{org:o}}),children:t("agentShellLayout.agentShellLayout.goToOrgHome")})})})})}function Io(){const t=A.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=ke(e);if(s.taskId!==void 0){let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(vr,{}),t[1]=i):i=t[1],i}if(s._splat!==void 0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(gt,{}),t[2]=i):i=t[2],i}let r;return t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Me,{children:n.jsx(xr,{children:n.jsx(Mn,{children:n.jsxs($n,{children:[n.jsx(Cr,{}),n.jsx(yr,{})]})})})}),t[3]=r):r=t[3],r}export{Io as default};
1
+ import{c as A,a2 as ne,a as pe,a9 as Ie,K as fe,m as me,b as K,r as B,l as ee,j as n,h as ve,aL as je,aK as Me,H as pt,y as he,v as qt,aM as Wt,s as Yt,q as Qt,D as Zt,aN as Xt,at as xt,t as Jt,au as es,d as Ae,o as ts,n as st,aO as ss,f as ke,M as nt,e as ns,u as Le,k as as,aP as rs,aQ as is,O as gt,aR as ls,N as os,B as cs,P as De}from"./index-C4rtGZhj.js";import{i as qe}from"./AlertCircle-ezsenyDA.js";import{C as ds,D as at,A as ye,E as us,F as fs,G as ms,H as hs,I as ps,J as xs,K as bt,L as gs,b as bs,M as vs,n as ys,h as js,k as ks}from"./agent-icon-D4A6sHBt.js";import{h as Ss,u as Ts}from"./use-app-takeover-rF8JMh38.js";import{T as we}from"./toolbar-icon-button-DJJccvHi.js";import{C as W,w as Ns,S as _s}from"./index-i3pR_VKW.js";import{s as vt,C as ws,u as Cs,a as yt,V as Ps,b as Is}from"./input-BXtqV7BY.js";import{u as $e,b as We,c as Ee,d as jt,e as Ms,s as As}from"./chat-context-CkzpVzP2.js";import{u as Ls,s as kt}from"./use-ai-providers-BLLCJ82i.js";import{b as St,a as $s,u as Es}from"./use-organization-settings-CHQPn47n.js";import{i as Fs}from"./CheckCircle-CN4P8qA2.js";import{s as rt}from"./XClose-BIF2YR7O.js";import{a as Se,b as Tt,c as Nt,g as _t,p as Rs}from"./repository-binding-C-QRBZ2o.js";import{I as wt}from"./integration-icon-B-VuBONI.js";import{c as Os}from"./use-decopilot-events--SDGmxUY.js";import{t as Ye}from"./ChevronUp-DgF_0akr.js";import{O as Bs}from"./pair-xLeCyNWu.js";import{u as Ds,a as zs}from"./use-thread-outputs-CnXr-3J8.js";import{u as Gs}from"./use-deco-credits-yhiLjBMs.js";import{a as Qe,f as Hs,L as Us,s as Ks,b as Vs}from"./shell-layout-28JRcfGc.js";import{t as qs,f as Ws,m as Ys,b as Qs,a as Zs}from"./use-project-native-view-presence-CIKytFPd.js";import{g as Ct,u as Xs,n as Js,a as en}from"./use-releases-BWxjuvCL.js";import{u as tn,d as Pt,a as Ze,b as Xe,c as Je,e as sn}from"./thread-intent-DWGyzG2H.js";import{f as nn,b as It,c as an}from"./use-navigate-to-agent-ChjWG67f.js";import{o as rn,s as ln,u as on,S as cn}from"./sandbox-lifecycle-context-BS-O8VCE.js";import{E as Mt}from"./empty-state-D86dkAEs.js";import{C as it}from"./index-DtX8u4h5.js";import{a as At,b as Lt,P as $t}from"./popover-BpfU2ryl.js";import{T as Fe,a as Re,c as Oe}from"./tooltip-knB_BmiO.js";import{T as dn,a as un}from"./toggle-group-CVV3QgOq.js";import{u as Et,a as et,r as fn,b as Ft,c as mn,d as hn}from"./thread-route-CHlbKw5S.js";import{c as pn,C as xn,a as gn,b as bn,e as vn,d as yn}from"./command-MB9q2Bfp.js";import{i as Rt}from"./ZoomOut-C8fNa3eF.js";import{g as jn,S as kn}from"./task-status-CtMWxsza.js";import{a as Sn}from"./format-time-CAj8AQXM.js";import{u as Tn}from"./use-clock-tick-DissHE7g.js";import{u as Nn}from"./use-chat-navigation-DrhyLHlD.js";import{a as Ot,u as _n}from"./use-panel-navigate-CTGXxycL.js";import{u as Bt}from"./use-main-panel-tabs-uwm6yOAh.js";import{T as Ce}from"./tab-icon-glyph-Cn1hJWKm.js";import{a as wn}from"./UserSquare-Bkrct5dy.js";import{b as Cn,c as Dt,S as Pn,d as In}from"./select-B08ML6hj.js";import{L as tt,a as Mn}from"./legacy-main-redirect-C7tMt1xT.js";import{u as An}from"./use-mobile-DR0ou4Mg.js";import{L as Ln}from"./preview-dialog-B4mPpBCx.js";import{O as $n}from"./markdown-Fzwq5r4L.js";import{B as lt}from"./blocks-preview-workspace-context--3frzfSc.js";import{p as En}from"./virtual-mcp-B_ndt1aK.js";import"./Tool01-DmCjPcwM.js";import"./ArrowUp-1Pn6KcFo.js";import"./ArrowLeft-XWagtiKt.js";import"./LinkBroken01-DQvdTTgG.js";import"./ShoppingBag01-4HryX9q-.js";import"./Building02-DVmqpekj.js";import"./ChevronSelectorVertical-t7oZTVYb.js";import"./Copy01-DD7TBaxd.js";import"./CreditCard01-BqWXWcAN.js";import"./DotsVertical-D63daqR4.js";import"./Image01-BmLj4iEQ.js";import"./Globe04-CAZFyv9C.js";import"./SwitchHorizontal01-CL7aXkdk.js";import"./Key01-BCoXSbsF.js";import"./Link01-DKrKZRUt.js";import"./Monitor01-BL49Kh8w.js";import"./Sun-xJ1qtoxz.js";import"./Play-3PdWOSem.js";import"./Plus-BGSMJ3F-.js";import"./SearchMd-gvLMH1IR.js";import"./Trash01-B0MFAKuS.js";import"./Upload01-AYcSEbb9.js";import"./User01-CvrqyM7d.js";import"./Users01-DavPAvfh.js";import"./sheet-BgQYccYB.js";import"./sandbox-url-D3mC8qhT.js";import"./backoff-CrEUbyZT.js";import"./tool-namespace-JguyqV9V.js";import"./drawer-0WwoG1lv.js";import"./collection-search-Bett-OVD.js";import"./use-mcp-client-iEvULqcR.js";import"./auth-CxFoeet-.js";import"./use-mcp-prompts-aNIE_qf0.js";import"./usage-stats-D0e4-Doz.js";import"./form-QiGH5N0B.js";import"./label-BjPw9Rfi.js";import"./utils-CVEq3hMx.js";import"./use-copy-BCgrYqWn.js";import"./index-BQmgF11e.js";import"./checkbox-JNUYg61n.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-BmEw6w6S.js";import"./feature-paywall-Bl1dj-EJ.js";import"./plan-ladder-DzICO7G_.js";import"./icon-button-D8YCRkH3.js";import"./file-type-icon-CkYEjqoY.js";import"./location-BjlyegC2.js";import"./autosend-BP7dIixd.js";import"./chat-draft-DWoo8adU.js";import"./tabs-D9YXIhLT.js";import"./use-open-billing-url-B2DuyyPV.js";import"./input-Aj2kXTDz.js";import"./suggestion-DCMEkjoc.js";import"./use-org-fs-B0T2bC7C.js";import"./useInfiniteQuery-CH2YwNOR.js";import"./infiniteQueryObserver-DRgbaZZO.js";import"./question-004-sINsf4GQ.js";import"./use-members-B2pgOmcT.js";import"./use-org-auth-client-Cy1K9alo.js";import"./add-connection-dialog-7u1gOtS6.js";import"./extract-connection-data-CienK9Kp.js";import"./metadata-D72DunRR.js";import"./connection-DBgzwh-b.js";import"./url-slug-CzQ7Mi0G.js";import"./connection-card-C7m_7jQA.js";import"./connection-slug-CITJ0kGN.js";import"./slugify-CEUa2lfQ.js";import"./textarea-Cm9WuKCc.js";import"./use-connection-mfEI4HYb.js";import"./schema-CaduOy_B.js";import"./connection-form-helpers-DJxQ1TYC.js";import"./authenticate-and-persist-oauth-D6-DRm7Z.js";import"./mcp-oauth-Biav5sbQ.js";import"./mcp-oauth-xTPg9JeG.js";import"./collection-tabs-DXjqVmA6.js";import"./badge-DEUubLaF.js";import"./use-infinite-scroll-BfZrsHvo.js";import"./useSuspenseInfiniteQuery-9FV3iOtp.js";import"./use-task-board-events-CFP9J6zo.js";import"./task-board-DVS-070d.js";import"./schema-BfTWP2eM.js";import"./watch-sse-pool-BGVIlM9_.js";import"./collapsible-Dzdq3pSP.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CLrd0dRs.js";import"./types-Tl69lmSm.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-project-scope-Z7wAK5MJ.js";import"./project-icon-BLicVbcB.js";import"./new-project-dialog-D0Tv538i.js";import"./repository-import-picker-Ck-W8Fet.js";import"./repository-picker-D0Kp2t1m.js";import"./use-debounced-value-BQw-U7yI.js";import"./required-auth-layout-BLCp7vSK.js";import"./use-org-sso-dcnzEZJT.js";import"./use-file-configs-4iMZ7Oja.js";import"./site-slug-DebpOoQq.js";import"./serial-task-queue-CGOeQgpr.js";import"./delay-CnY5UFtP.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resizable-DwozeJKF.js";import"./index-C9L_7jwF.js";import"./index-BHsQFo2r.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-tools-v8AMxGBw.js";import"./resolve-tab-icon-CEo8MQEa.js";import"./use-task-metadata-Byl1laHV.js";import"./preview-source-BsRLGWUP.js";import"./index-BdQq_4o_.js";import"./preview-content-CcwX4f0y.js";import"./file-share-button-DS4I5txo.js";import"./file-preview-DTJTxkww.js";import"./utils-DdBqTK5U.js";import"./editor-DMSnXQVS.js";function Fn({isThreadLocked:t,hasCloudProviderKeys:e,sandboxOnlyChats:s,canRunClaudeCode:r}){return t?null:!e&&!(s&&r)?"provider":s&&!r?"claude-code-provider":null}function Rn(){const t=A.c(25),e=Ls(),s=$e(),r=St(),i=$s("chat_harness_codex"),{org:a}=ne(),{data:o}=pe.useSession(),c=o?.user.id??"",u=Ie(),l=e.some(Bn);let d;t[0]!==a.id?(d=fe.claudeSubscription(a.id),t[0]=a.id,t[1]=d):d=t[1];let m;t[2]!==u?(m=()=>u.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[2]=u,t[3]=m):m=t[3];const f=r&&!i&&!l;let h;t[4]!==d||t[5]!==m||t[6]!==f?(h={queryKey:d,queryFn:m,enabled:f},t[4]=d,t[5]=m,t[6]=f,t[7]=h):h=t[7];const j=me(h);let k;t[8]!==a.id?(k=fe.githubCopilot(a.id),t[8]=a.id,t[9]=k):k=t[9];let v;t[10]!==u?(v=()=>u.call("GITHUB_COPILOT_STATUS",{}),t[10]=u,t[11]=v):v=t[11];const x=r&&!i&&!l;let g;t[12]!==k||t[13]!==v||t[14]!==x?(g={queryKey:k,queryFn:v,enabled:x},t[12]=k,t[13]=v,t[14]=x,t[15]=g):g=t[15];const b=me(g);let y;t[16]!==a.id||t[17]!==c?(y=fe.codexSubscription(a.id,c),t[16]=a.id,t[17]=c,t[18]=y):y=t[18];let p;t[19]!==u?(p=()=>u.call("CODEX_SUBSCRIPTION_STATUS",{}),t[19]=u,t[20]=p):p=t[20];const S=r&&i;let N;t[21]!==S||t[22]!==y||t[23]!==p?(N={queryKey:y,queryFn:p,enabled:S},t[21]=S,t[22]=y,t[23]=p,t[24]=N):N=t[24];const T=me(N);return r&&i&&!s?.isThreadLocked?e.some(On)||T.data?.connected!==!1?null:"codex-provider":Fn({isThreadLocked:s?.isThreadLocked??!1,hasCloudProviderKeys:e.length>0,sandboxOnlyChats:r,canRunClaudeCode:l||j.data?.connected!==!1||b.data?.connected!==!1||!!b.data?.orgShare})}function On(t){return vt(t.providerId)}function Bn(t){return kt(t.providerId)}function be(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function ze(t){if(!t)return"—";const e=typeof t=="string"?new Date(t):t;return isNaN(e.getTime())?"—":e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function Dn(t){return t?t.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function zn(t){const e=A.c(4),{items:s}=t;let r;e[0]!==s?(r=s.map(Gn),e[0]=s,e[1]=r):r=e[1];let i;return e[2]!==r?(i=n.jsx("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6",children:r}),e[2]=r,e[3]=i):i=e[3],i}function Gn(t){return n.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.label}),n.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:t.value})]},t.label)}function Hn(t){const e=A.c(33),{userTokens:s,assistantTokens:r,otherTokens:i}=t,a=K(),o=s+r+i,c=o>0?s/o*100:0,u=o>0?r/o*100:0,l=o>0?i/o*100:0;let d;e[0]!==c?(d=c>0&&n.jsx("div",{className:"h-full bg-chart-1",style:{width:`${c}%`}}),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==u?(m=u>0&&n.jsx("div",{className:"h-full bg-chart-2",style:{width:`${u}%`}}),e[2]=u,e[3]=m):m=e[3];let f;e[4]!==l?(f=l>0&&n.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${l}%`}}),e[4]=l,e[5]=f):f=e[5];let h;e[6]!==d||e[7]!==m||e[8]!==f?(h=n.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[d,m,f]}),e[6]=d,e[7]=m,e[8]=f,e[9]=h):h=e[9];let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=j):j=e[10];let k;e[11]!==a||e[12]!==c?(k=a("chat.contextPanel.userPercent",{pct:c.toFixed(1)}),e[11]=a,e[12]=c,e[13]=k):k=e[13];let v;e[14]!==k?(v=n.jsxs("div",{className:"flex items-center gap-1.5",children:[j,n.jsx("span",{className:"text-xs text-muted-foreground",children:k})]}),e[14]=k,e[15]=v):v=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[16]=x):x=e[16];let g;e[17]!==u||e[18]!==a?(g=a("chat.contextPanel.assistantPercent",{pct:u.toFixed(1)}),e[17]=u,e[18]=a,e[19]=g):g=e[19];let b;e[20]!==g?(b=n.jsxs("div",{className:"flex items-center gap-1.5",children:[x,n.jsx("span",{className:"text-xs text-muted-foreground",children:g})]}),e[20]=g,e[21]=b):b=e[21];let y;e[22]!==l||e[23]!==i||e[24]!==a?(y=i>0&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.otherPercent",{pct:l.toFixed(1)})})]}),e[22]=l,e[23]=i,e[24]=a,e[25]=y):y=e[25];let p;e[26]!==b||e[27]!==y||e[28]!==v?(p=n.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[v,b,y]}),e[26]=b,e[27]=y,e[28]=v,e[29]=p):p=e[29];let S;return e[30]!==p||e[31]!==h?(S=n.jsxs("div",{className:"flex flex-col gap-2",children:[h,p]}),e[30]=p,e[31]=h,e[32]=S):S=e[32],S}function Un(t){const e=A.c(14),{agentId:s,isError:r}=t,i=Se(s),a=K();let o;e[0]!==i?.title||e[1]!==a?(o=i?.title??a("chat.subtask.subtaskNoun"),e[0]=i?.title,e[1]=a,e[2]=o):o=e[2];const c=o,u=i?.icon??null;let l;e[3]!==u||e[4]!==c?(l=n.jsx(wt,{icon:u,name:c,size:"xs",className:"size-6 rounded-md shrink-0"}),e[3]=u,e[4]=c,e[5]=l):l=e[5];const d=r?"text-destructive":"text-foreground";let m;e[6]!==d?(m=ee("shrink-0 font-medium",d),e[6]=d,e[7]=m):m=e[7];let f;e[8]!==c||e[9]!==m?(f=n.jsx("span",{className:m,children:c}),e[8]=c,e[9]=m,e[10]=f):f=e[10];let h;return e[11]!==l||e[12]!==f?(h=n.jsxs(n.Fragment,{children:[l,f]}),e[11]=l,e[12]=f,e[13]=h):h=e[13],h}function Kn(t){const e=A.c(12),{isError:s}=t,r=K();let i;e[0]!==r?(i=r("chat.contextPanel.subtask"),e[0]=r,e[1]=i):i=e[1];const a=i;let o;e[2]!==a?(o=n.jsx(wt,{icon:null,name:a,size:"xs",className:"size-6 rounded-md shrink-0"}),e[2]=a,e[3]=o):o=e[3];const c=s?"text-destructive":"text-foreground";let u;e[4]!==c?(u=ee("shrink-0 font-medium",c),e[4]=c,e[5]=u):u=e[5];let l;e[6]!==a||e[7]!==u?(l=n.jsx("span",{className:u,children:a}),e[6]=a,e[7]=u,e[8]=l):l=e[8];let d;return e[9]!==o||e[10]!==l?(d=n.jsxs(n.Fragment,{children:[o,l]}),e[9]=o,e[10]=l,e[11]=d):d=e[11],d}function Vn(t){const e=A.c(18),{part:s}=t,r=s.input?.agent_id,i=s.state==="input-streaming"||s.state==="input-available"||s.state==="output-available"&&s.preliminary===!0,a=s.state==="output-error",o=s.state==="approval-requested";let c;e[0]!==a?(c=n.jsx(Kn,{isError:a}),e[0]=a,e[1]=c):c=e[1];let u;e[2]!==r||e[3]!==a?(u=n.jsx(Un,{agentId:r,isError:a}),e[2]=r,e[3]=a,e[4]=u):u=e[4];let l;e[5]!==c||e[6]!==u?(l=n.jsx(B.Suspense,{fallback:c,children:u}),e[5]=c,e[6]=u,e[7]=l):l=e[7];let d;e[8]!==s.input?(d=s.input?.prompt&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted-foreground/50",children:"·"}),n.jsx("span",{className:"truncate text-muted-foreground",children:s.input.prompt})]}),e[8]=s.input,e[9]=d):d=e[9];let m;e[10]!==o||e[11]!==a||e[12]!==i?(m=n.jsx("span",{className:"ml-auto shrink-0",children:i?n.jsx(ve,{className:"size-3 text-muted-foreground"}):a?n.jsx(ds,{size:12,className:"text-destructive"}):o?n.jsx(qe,{size:12,className:"text-warning"}):n.jsx(Fs,{size:12,className:"text-success"})}),e[10]=o,e[11]=a,e[12]=i,e[13]=m):m=e[13];let f;return e[14]!==l||e[15]!==d||e[16]!==m?(f=n.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[l,d,m]}),e[14]=l,e[15]=d,e[16]=m,e[17]=f):f=e[17],f}function qn(t){const e=A.c(51),{onClose:s,back:r,className:i}=t,a=K(),[o,c]=B.useState(null),{messages:u}=We(),{activeTask:l}=Ee(),{selectedModel:d,selectedVirtualMcp:m}=jt(),f=Ms(u),h=[...u].reverse().find(ra),j=h?.metadata?.usage,k=[...u].reverse().find(aa)?.metadata?.models?.thinking,v=h?.metadata?.modelLimits?.contextWindow??(!k||k.id===d?.modelId?d?.limits?.contextWindow:null)??null,x=j?.contextTokens??0,g=v&&v>0?(x/v*100).toFixed(1):null,b=u;let y;e[0]!==b?(y=b.filter(na).reduce(sa,0),e[0]=b,e[1]=y):y=e[1];const p=y,S=u;let N;e[2]!==S?(N=S.filter(ta).reduce(ea,0),e[2]=S,e[3]=N):N=e[3];const T=N,_=Math.max(0,f.totalTokens-p-T),w=u[0],I=u.at(-1),P=w?.metadata?.created_at??l?.created_at,L=I?.metadata?.created_at??l?.updated_at,$=u.filter(Jn),E=u.flatMap(Zn),F=Dn(k?.id??d?.modelId),R=m?.title??"Super Agent",M=Os(),C=[{label:a("chat.contextPanel.sessionLabel"),value:l?.title??a("chat.contextPanel.newChat")},{label:a("chat.contextPanel.messagesLabel"),value:$.length},{label:a("chat.contextPanel.agentLabel"),value:R},...M?[{label:a("chat.contextPanel.modelLabel"),value:F}]:[],{label:a("chat.contextPanel.contextLimitLabel"),value:v?be(v):"—"},{label:a("chat.contextPanel.sessionTokensLabel"),value:f.totalTokens>0?be(f.totalTokens):"0"},{label:a("chat.contextPanel.usageLabel"),value:g!==null?`${g}%`:"—"},{label:a("chat.contextPanel.inputTokensLabel"),value:f.inputTokens>0?be(f.inputTokens):"0"},{label:a("chat.contextPanel.outputTokensLabel"),value:f.outputTokens>0?be(f.outputTokens):"0"},{label:a("chat.contextPanel.reasoningTokensLabel"),value:f.reasoningTokens>0?be(f.reasoningTokens):"0"},...M?[{label:a("chat.contextPanel.costLabel"),value:f.cost>0?`$${f.cost<.001?f.cost.toFixed(6):f.cost.toFixed(4)}`:"$0.00"}]:[],{label:a("chat.contextPanel.sessionCreatedLabel"),value:ze(P)},{label:a("chat.contextPanel.lastActivityLabel"),value:ze(L)}];if(!l&&$.length===0){let D;e[4]!==i?(D=ee("flex flex-col h-full w-full border-l border-border bg-background",i),e[4]=i,e[5]=D):D=e[5];let re;e[6]!==a?(re=a("chat.contextPanel.title"),e[6]=a,e[7]=re):re=e[7];let X;e[8]!==re?(X=n.jsx("span",{className:"text-sm font-medium text-foreground",children:re}),e[8]=re,e[9]=X):X=e[9];let J;e[10]!==r?(J=r?n.jsx(at,{size:14,className:"text-muted-foreground"}):n.jsx(rt,{size:14,className:"text-muted-foreground"}),e[10]=r,e[11]=J):J=e[11];let te;e[12]!==s||e[13]!==J?(te=n.jsx("button",{type:"button",onClick:s,className:"flex size-6 items-center justify-center hover:bg-accent transition-colors rounded-lg",children:J}),e[12]=s,e[13]=J,e[14]=te):te=e[14];let ae;e[15]!==X||e[16]!==te?(ae=n.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[X,te]}),e[15]=X,e[16]=te,e[17]=ae):ae=e[17];let ie;e[18]!==a?(ie=a("chat.contextPanel.emptyState"),e[18]=a,e[19]=ie):ie=e[19];let se;e[20]!==ie?(se=n.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:n.jsx("p",{className:"text-xs text-muted-foreground",children:ie})}),e[20]=ie,e[21]=se):se=e[21];let oe;return e[22]!==ae||e[23]!==se||e[24]!==D?(oe=n.jsxs("div",{className:D,children:[ae,se]}),e[22]=ae,e[23]=se,e[24]=D,e[25]=oe):oe=e[25],oe}let G;e[26]!==i?(G=ee("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",i),e[26]=i,e[27]=G):G=e[27];let z;e[28]!==a?(z=a("chat.contextPanel.title"),e[28]=a,e[29]=z):z=e[29];let H;e[30]!==z?(H=n.jsx("span",{className:"text-sm font-medium text-foreground",children:z}),e[30]=z,e[31]=H):H=e[31];let O;e[32]!==r?(O=r?n.jsx(at,{size:14}):n.jsx(rt,{size:14}),e[32]=r,e[33]=O):O=e[33];let V;e[34]!==s||e[35]!==O?(V=n.jsx("button",{type:"button",onClick:s,className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:O}),e[34]=s,e[35]=O,e[36]=V):V=e[36];let Q;e[37]!==H||e[38]!==V?(Q=n.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[H,V]}),e[37]=H,e[38]=V,e[39]=Q):Q=e[39];let Y;e[40]!==a?(Y=a("chat.contextPanel.contextBreakdownSection"),e[40]=a,e[41]=Y):Y=e[41];let Z;e[42]!==Y?(Z=n.jsx("span",{className:"text-xs text-muted-foreground",children:Y}),e[42]=Y,e[43]=Z):Z=e[43];let q;e[44]!==T||e[45]!==_||e[46]!==p?(q=n.jsx(Hn,{userTokens:p,assistantTokens:T,otherTokens:_}),e[44]=T,e[45]=_,e[46]=p,e[47]=q):q=e[47];let le;return e[48]!==Z||e[49]!==q?(le=n.jsxs("div",{className:"flex flex-col gap-3",children:[Z,q]}),e[48]=Z,e[49]=q,e[50]=le):le=e[50],n.jsxs("div",{className:G,children:[Q,n.jsxs("div",{className:"flex flex-col gap-8 p-6",children:[E.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.subtasksSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:E.map(Qn)})]}),n.jsx(zn,{items:C}),le,$.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.rawMessagesSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:$.map(D=>{const re=D.metadata?.created_at,X=o?.id===D.id;return n.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[n.jsxs("button",{type:"button",onClick:()=>c(X?null:D),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent/50 w-full text-left cursor-pointer",children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[n.jsx("span",{className:ee("shrink-0 font-medium",D.role==="user"?"text-chart-1":"text-chart-2"),children:D.role}),n.jsx("span",{className:"text-muted-foreground",children:"•"}),n.jsx("span",{className:"truncate text-muted-foreground font-mono",children:D.id})]}),re&&n.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:ze(re)})]}),X&&n.jsxs(n.Fragment,{children:[D.role==="assistant"&&(()=>{const J=D.metadata?._request;if(!J)return null;const te=J.systemSections??[],ae=Math.max(1,...te.map(Yn)),ie=te.reduce(Wn,0);return n.jsxs("div",{className:"border-t border-border/50 px-3 py-2.5 text-xs space-y-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"font-medium text-foreground",children:a("chat.contextPanel.requestLabel")}),n.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[J.activeTools??0," / ",J.tools??0," ",a("chat.contextPanel.toolsActive")]})]}),te.length>0&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("div",{className:"text-muted-foreground",children:[a("chat.contextPanel.systemPromptLabel")," ",n.jsxs("span",{className:"tabular-nums",children:["~",Math.round(ie/4).toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),te.map((se,oe)=>{const ce=se.preview.match(/^<([a-z-]+)/i)?.[1]??`section ${oe}`,xe=se.chars/ae*100,de=Math.round(se.chars/4);return n.jsxs("div",{className:"space-y-0.5",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("span",{className:"font-mono text-foreground truncate",children:ce}),n.jsxs("span",{className:"text-muted-foreground tabular-nums shrink-0",children:["~",de.toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),n.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-chart-3",style:{width:`${xe}%`}})})]},oe)})]})]})})(),n.jsx("pre",{className:"text-xs font-mono bg-muted px-3 py-2 overflow-auto whitespace-pre-wrap break-all border-t border-border/50 max-h-64",children:JSON.stringify(D,null,2)})]})]},D.id)})})]})]})]})}function Wn(t,e){return t+e.chars}function Yn(t){return t.chars}function Qn(t,e){return n.jsx(Vn,{part:t},e)}function Zn(t){return(t.parts??[]).filter(Xn)}function Xn(t){return t.type==="tool-subtask"}function Jn(t){return t.role!=="system"}function ea(t,e){const s=e.metadata?.usage;return t+(s?.outputTokens??0)}function ta(t){return t.role==="assistant"}function sa(t,e){const s=e.metadata?.usage;return t+(s?.inputTokens??0)}function na(t){return t.role==="user"}function aa(t){return t.role==="assistant"&&t.metadata?.models}function ra(t){return t.role==="assistant"&&t.metadata?.usage}function ia(t){const e=A.c(21),{onOpenContextPanel:s}=t,{org:r}=ne(),{selectedVirtualMcp:i}=jt();let a;e[0]!==r.id?(a=je(r.id),e[0]=r.id,e[1]=a):a=e[1];const c=i??a,l=Se(c.id)??c,d=l.title??"Super Agent",m=l.icon??null,f=l.description??null;let h;e[2]!==m||e[3]!==d?(h=n.jsx(ye,{icon:m,name:d,size:"lg"}),e[2]=m,e[3]=d,e[4]=h):h=e[4];let j;e[5]!==d?(j=n.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-foreground",children:d}),e[5]=d,e[6]=j):j=e[6];let k;e[7]!==f?(k=f?n.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-balance",children:f}):null,e[7]=f,e[8]=k):k=e[8];let v;e[9]!==j||e[10]!==k?(v=n.jsxs("div",{className:"space-y-1.5",children:[j,k]}),e[9]=j,e[10]=k,e[11]=v):v=e[11];let x;e[12]!==h||e[13]!==v?(x=n.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center gap-4 px-6 text-center overflow-hidden",children:[h,v]}),e[12]=h,e[13]=v,e[14]=x):x=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(W.IceBreakers,{className:"pb-3"}),e[15]=g):g=e[15];let b;e[16]!==s?(b=n.jsxs(W.Footer,{children:[g,n.jsx(W.Input,{onOpenContextPanel:s})]}),e[16]=s,e[17]=b):b=e[17];let y;return e[18]!==x||e[19]!==b?(y=n.jsxs(n.Fragment,{children:[x,b]}),e[18]=x,e[19]=b,e[20]=y):y=e[20],y}function ot(t){const e=A.c(17),{outputs:s,collapsed:r,onToggle:i,variant:a}=t,o=a==="card"?"rounded-xl border border-border bg-muted/95 shadow-sm backdrop-blur-sm":"border-b border-border bg-background";let c;e[0]!==o?(c=ee(o),e[0]=o,e[1]=c):c=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("span",{className:"text-sm font-medium text-foreground",children:"Files in this task"}),e[2]=u):u=e[2];const l=r&&"-rotate-90";let d;e[3]!==l?(d=ee("size-4 text-muted-foreground transition-transform",l),e[3]=l,e[4]=d):d=e[4];let m;e[5]!==d?(m=n.jsx(Ye,{className:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==m?(f=n.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between px-3 py-2.5 text-left",children:[u,m]}),e[7]=i,e[8]=m,e[9]=f):f=e[9];let h;e[10]!==r||e[11]!==s?(h=!r&&n.jsx("div",{className:"flex max-h-72 flex-col gap-1.5 overflow-y-auto px-2 pb-2",children:s.map(la)}),e[10]=r,e[11]=s,e[12]=h):h=e[12];let j;return e[13]!==c||e[14]!==f||e[15]!==h?(j=n.jsxs("div",{className:c,children:[f,h]}),e[13]=c,e[14]=f,e[15]=h,e[16]=j):j=e[16],j}function la(t){return n.jsx(Bs,{file:t},t.key)}function oa(){const t=A.c(13),e=$e()?.taskId??null,s=Ds();let r;t[0]!==s?(r={enabled:s},t[0]=s,t[1]=r):r=t[1];const{data:i}=zs(e,r),[a,o]=B.useState(!1),[c,u]=B.useState(!0);if(!e||!i||i.length===0)return null;let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>o(da),t[2]=l):l=t[2];let d;t[3]!==a||t[4]!==i?(d=n.jsx("div",{className:"absolute top-2 right-2 z-10 hidden w-72 @[1280px]:block",children:n.jsx(ot,{variant:"card",outputs:i,collapsed:a,onToggle:l})}),t[3]=a,t[4]=i,t[5]=d):d=t[5];let m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=()=>u(ca),t[6]=m):m=t[6];let f;t[7]!==c||t[8]!==i?(f=n.jsx("div",{className:"shrink-0 @[1280px]:hidden",children:n.jsx(ot,{variant:"bar",outputs:i,collapsed:c,onToggle:m})}),t[7]=c,t[8]=i,t[9]=f):f=t[9];let h;return t[10]!==d||t[11]!==f?(h=n.jsxs(n.Fragment,{children:[d,f]}),t[10]=d,t[11]=f,t[12]=h):h=t[12],h}function ca(t){return!t}function da(t){return!t}function ua(){const t=A.c(1);B.use(We().ready);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(ws,{children:n.jsx(fa,{})}),t[0]=e):e=t[0],e}function fa(){const t=A.c(29),{active:e}=Cs(),{org:s}=ne(),r=$e(),{isChatEmpty:i}=We(),[a,o]=B.useState("chat"),c=Gs(),u=K(),l=Rn(),{runtime:d}=yt(r?.virtualMcpId);if(l!==null&&d!=="cms"){let T;return t[0]!==l||t[1]!==u?(T=n.jsx(W,{className:"animate-in fade-in-0 duration-200",children:n.jsx(W.Main,{className:"flex flex-col items-center",children:n.jsx(W.EmptyState,{children:l==="codex-provider"?n.jsx(W.NoAiProviderEmptyState,{title:u("settings.codexSubscription.setupHeading"),description:u("settings.codexSubscription.setupDescription"),providerFilter:vt}):l==="claude-code-provider"?n.jsx(W.NoAiProviderEmptyState,{title:u("chat.noAiProviderEmptyState.supportedHeading"),description:u("chat.noAiProviderEmptyState.supportedSubtitle"),providerFilter:kt}):n.jsx(W.NoAiProviderEmptyState,{})})})}),t[0]=l,t[1]=u,t[2]=T):T=t[2],T}let f;t[3]!==c.hasDecoKey||t[4]!==c.hasOnlyDecoProvider||t[5]!==c.isLoading||t[6]!==c.isZeroBalance||t[7]!==i||t[8]!==s?(f=c.hasDecoKey&&c.isZeroBalance&&c.hasOnlyDecoProvider&&!c.isLoading&&i&&!Ns(s.id),t[3]=c.hasDecoKey,t[4]=c.hasOnlyDecoProvider,t[5]=c.isLoading,t[6]=c.isZeroBalance,t[7]=i,t[8]=s,t[9]=f):f=t[9];const h=f;let j;t[10]!==h?(j=h&&n.jsx(W.CreditsEmptyState,{}),t[10]=h,t[11]=j):j=t[11];let k;t[12]!==a||t[13]!==i||t[14]!==d||t[15]!==e?(k=!e&&n.jsx("div",{inert:a!=="chat"?!0:void 0,"aria-hidden":a!=="chat",className:ee("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",a!=="chat"?"opacity-0 pointer-events-none":"opacity-100"),children:i&&d!=="cms"?n.jsx(ia,{onOpenContextPanel:()=>o("context")}):n.jsxs(n.Fragment,{children:[n.jsxs(W.Main,{className:"relative flex flex-col overflow-hidden @container",children:[n.jsx(oa,{}),n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(W.Messages,{})})]}),n.jsx(W.Footer,{children:n.jsx(W.Input,{onOpenContextPanel:()=>o("context")})})]})}),t[12]=a,t[13]=i,t[14]=d,t[15]=e,t[16]=k):k=t[16];let v;t[17]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Ps,{}),t[17]=v):v=t[17];const x=a!=="context"?!0:void 0,g=a!=="context",b=a==="context"?"opacity-100":"opacity-0 pointer-events-none";let y;t[18]!==b?(y=ee("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",b),t[18]=b,t[19]=y):y=t[19];let p;t[20]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(qn,{back:!0,onClose:()=>o("chat")}),t[20]=p):p=t[20];let S;t[21]!==x||t[22]!==g||t[23]!==y?(S=n.jsx("div",{inert:x,"aria-hidden":g,className:y,children:p}),t[21]=x,t[22]=g,t[23]=y,t[24]=S):S=t[24];let N;return t[25]!==j||t[26]!==k||t[27]!==S?(N=n.jsxs(W,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[j,k,v,S]}),t[25]=j,t[26]=k,t[27]=S,t[28]=N):N=t[28],N}function ma(){const t=A.c(7),e=K();let s;t[0]!==e?(s=e("agentShellLayout.agentShellLayout.chatLoadingError"),t[0]=e,t[1]=s):s=t[1];let r;t[2]!==s?(r=n.jsx("div",{role:"alert",className:"flex h-full flex-1 items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Me,{children:n.jsx(ua,{})}),t[4]=i):i=t[4];let a;return t[5]!==r?(a=n.jsx(pt,{fallback:r,children:i}),t[5]=r,t[6]=a):a=t[6],a}function ha(t){const e=A.c(10),{org:s}=ne(),r=tn(),{data:i}=pe.useSession(),a=i?.user?.id,o=t?.id??null,c=!!t&&!!a&&!!t.created_by&&t.created_by!==a;let u;e[0]!==s.id||e[1]!==o?(u=fe.viewedThreadMetadataRefresh(s.id,o??""),e[0]=s.id,e[1]=o,e[2]=u):u=e[2];const l=!!r&&!!o&&c;let d;e[3]!==r||e[4]!==o?(d=async()=>(await r?.refreshThreadMetadata(o??""),!0),e[3]=r,e[4]=o,e[5]=d):d=e[5];let m;e[6]!==u||e[7]!==l||e[8]!==d?(m={queryKey:u,enabled:l,staleTime:Number.POSITIVE_INFINITY,queryFn:d},e[6]=u,e[7]=l,e[8]=d,e[9]=m):m=e[9],me(m)}function Ge(t){const e=A.c(14),{label:s,value:r,onChange:i,options:a}=t;let o;e[0]!==s?(o=n.jsx("span",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=o):o=e[1];let c;e[2]!==i?(c=m=>m&&i(m),e[2]=i,e[3]=c):c=e[3];let u;e[4]!==a?(u=a.map(pa),e[4]=a,e[5]=u):u=e[5];let l;e[6]!==s||e[7]!==c||e[8]!==u||e[9]!==r?(l=n.jsx(un,{type:"single",size:"sm",value:r,onValueChange:c,"aria-label":s,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:u}),e[6]=s,e[7]=c,e[8]=u,e[9]=r,e[10]=l):l=e[10];let d;return e[11]!==o||e[12]!==l?(d=n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,l]}),e[11]=o,e[12]=l,e[13]=d):d=e[13],d}function pa(t){return n.jsxs(dn,{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 xa(t){const e=A.c(91),{panel:s,className:r}=t,i=r===void 0?"md:size-[34px]":r,a=K();let o;e[0]!==a?(o=a("sidebar.taskGroupsList.filterChats"),e[0]=a,e[1]=o):o=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(us,{size:16}),e[2]=c):c=e[2];let u;e[3]!==s.filtersActive?(u=s.filtersActive&&n.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[3]=s.filtersActive,e[4]=u):u=e[4];let l;e[5]!==i||e[6]!==s.filtersActive||e[7]!==o||e[8]!==u?(l=n.jsx(Fe,{asChild:!0,children:n.jsx(At,{asChild:!0,children:n.jsxs(we,{"aria-label":o,active:s.filtersActive,className:i,children:[c,u]})})}),e[5]=i,e[6]=s.filtersActive,e[7]=o,e[8]=u,e[9]=l):l=e[9];let d;e[10]!==a?(d=a("sidebar.taskGroupsList.filterChats"),e[10]=a,e[11]=d):d=e[11];let m;e[12]!==d?(m=n.jsx(Re,{side:"bottom",children:d}),e[12]=d,e[13]=m):m=e[13];let f;e[14]!==l||e[15]!==m?(f=n.jsxs(Oe,{children:[l,m]}),e[14]=l,e[15]=m,e[16]=f):f=e[16];let h;e[17]!==a?(h=a("sidebar.taskGroupsList.filterView"),e[17]=a,e[18]=h):h=e[18];const j=s.groupBy;let k;e[19]!==s?(k=D=>{he("tasks_panel_group_by_changed",{to_value:D}),s.setGroupBy(D)},e[19]=s,e[20]=k):k=e[20];let v;e[21]!==a?(v=a("sidebar.taskGroupsList.viewList"),e[21]=a,e[22]=v):v=e[22];let x;e[23]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(fs,{size:13}),e[23]=x):x=e[23];let g;e[24]!==v?(g={value:"flat",label:v,icon:x},e[24]=v,e[25]=g):g=e[25];let b;e[26]!==a?(b=a("sidebar.taskGroupsList.viewStatus"),e[26]=a,e[27]=b):b=e[27];let y;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(ms,{size:13}),e[28]=y):y=e[28];let p;e[29]!==b?(p={value:"status",label:b,icon:y},e[29]=b,e[30]=p):p=e[30];let S;e[31]!==g||e[32]!==p?(S=[g,p],e[31]=g,e[32]=p,e[33]=S):S=e[33];let N;e[34]!==s.groupBy||e[35]!==k||e[36]!==S||e[37]!==h?(N=n.jsx(Ge,{label:h,value:j,onChange:k,options:S}),e[34]=s.groupBy,e[35]=k,e[36]=S,e[37]=h,e[38]=N):N=e[38];let T;e[39]!==a?(T=a("sidebar.taskGroupsList.filterType"),e[39]=a,e[40]=T):T=e[40];const _=s.typeFilter;let w;e[41]!==s?(w=D=>{he("tasks_panel_filter_changed",{to_value:D}),s.setTypeFilter(D)},e[41]=s,e[42]=w):w=e[42];let I;e[43]!==a?(I=a("sidebar.taskGroupsList.typeAll"),e[43]=a,e[44]=I):I=e[44];let P;e[45]!==I?(P={value:"all",label:I},e[45]=I,e[46]=P):P=e[46];let L;e[47]!==a?(L=a("sidebar.taskGroupsList.typeChats"),e[47]=a,e[48]=L):L=e[48];let $;e[49]!==L?($={value:"manual",label:L},e[49]=L,e[50]=$):$=e[50];let E;e[51]!==a?(E=a("sidebar.taskGroupsList.typeAuto"),e[51]=a,e[52]=E):E=e[52];let F;e[53]!==E?(F={value:"automation",label:E},e[53]=E,e[54]=F):F=e[54];let R;e[55]!==P||e[56]!==$||e[57]!==F?(R=[P,$,F],e[55]=P,e[56]=$,e[57]=F,e[58]=R):R=e[58];let M;e[59]!==s.typeFilter||e[60]!==T||e[61]!==w||e[62]!==R?(M=n.jsx(Ge,{label:T,value:_,onChange:w,options:R}),e[59]=s.typeFilter,e[60]=T,e[61]=w,e[62]=R,e[63]=M):M=e[63];let C;e[64]!==a?(C=a("sidebar.taskGroupsList.filterScope"),e[64]=a,e[65]=C):C=e[65];const G=s.showAll?"team":"mine";let z;e[66]!==s?(z=D=>s.setShowAll(D==="team"),e[66]=s,e[67]=z):z=e[67];let H;e[68]!==a?(H=a("sidebar.taskGroupsList.scopeMine"),e[68]=a,e[69]=H):H=e[69];let O;e[70]!==H?(O={value:"mine",label:H},e[70]=H,e[71]=O):O=e[71];let V;e[72]!==a?(V=a("sidebar.taskGroupsList.scopeTeam"),e[72]=a,e[73]=V):V=e[73];let Q;e[74]!==V?(Q={value:"team",label:V},e[74]=V,e[75]=Q):Q=e[75];let Y;e[76]!==O||e[77]!==Q?(Y=[O,Q],e[76]=O,e[77]=Q,e[78]=Y):Y=e[78];let Z;e[79]!==C||e[80]!==G||e[81]!==z||e[82]!==Y?(Z=n.jsx(Ge,{label:C,value:G,onChange:z,options:Y}),e[79]=C,e[80]=G,e[81]=z,e[82]=Y,e[83]=Z):Z=e[83];let q;e[84]!==N||e[85]!==M||e[86]!==Z?(q=n.jsxs(Lt,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[N,M,Z]}),e[84]=N,e[85]=M,e[86]=Z,e[87]=q):q=e[87];let le;return e[88]!==q||e[89]!==f?(le=n.jsxs($t,{children:[f,q]}),e[88]=q,e[89]=f,e[90]=le):le=e[90],le}function ga(t,e){return t.filter(s=>s.id===e||!!s.trigger_id||qs(s))}function ba(){const t=A.c(2),e=Tt()??[];let s;return t[0]!==e?(s=r=>{if(!r)return;const i=e.find(a=>a.id===r);return i?Pt(i.metadata):void 0},t[0]=e,t[1]=s):s=t[1],s}function va(t){const e=A.c(9),{virtualMcpId:s,size:r,showAutomationBadge:i}=t,a=r===void 0?"sm":r,o=K();let c;e[0]!==a||e[1]!==s?(c=s?n.jsx(ya,{virtualMcpId:s,size:a}):n.jsx(ye,{icon:null,name:"?",size:a}),e[0]=a,e[1]=s,e[2]=c):c=e[2];let u;e[3]!==i||e[4]!==o?(u=i&&n.jsx("span",{"aria-label":o("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-special border border-special text-special-foreground",children:n.jsx(Rt,{size:10,className:"text-white"})}),e[3]=i,e[4]=o,e[5]=u):u=e[5];let l;return e[6]!==c||e[7]!==u?(l=n.jsxs("div",{className:"relative shrink-0",children:[c,u]}),e[6]=c,e[7]=u,e[8]=l):l=e[8],l}function ya(t){const e=A.c(6),{virtualMcpId:s,size:r}=t,i=Nt(s);if(!i){let c;return e[0]!==r?(c=n.jsx(ye,{icon:null,name:"?",size:r}),e[0]=r,e[1]=c):c=e[1],c}const a=i.icon??null;let o;return e[2]!==i.title||e[3]!==r||e[4]!==a?(o=n.jsx(ye,{icon:a,name:i.title,size:r}),e[2]=i.title,e[3]=r,e[4]=a,e[5]=o):o=e[5],o}const ct=["thread"];function ja(t){const e=A.c(53),{open:s,onOpenChange:r}=t,[i,a]=B.useState(""),{org:o}=ne(),{setTaskId:c}=Qe(),u=Ie(),l=K();let d,m,f,h;e[0]!==o.id||e[1]!==i?(h=i.trim(),d=h?20:10,f=me,m=fe.globalSearch(o.id,h,d,ct),e[0]=o.id,e[1]=i,e[2]=d,e[3]=m,e[4]=f,e[5]=h):(d=e[2],m=e[3],f=e[4],h=e[5]);let j;e[6]!==d||e[7]!==u||e[8]!==h?(j=async()=>{const C=await u.call("GLOBAL_SEARCH",{query:h,limit:d,types:[...ct]});return{...C,items:C.items.filter(ka)}},e[6]=d,e[7]=u,e[8]=h,e[9]=j):j=e[9];let k;e[10]!==s||e[11]!==m||e[12]!==j?(k={queryKey:m,enabled:s,queryFn:j,staleTime:1e4},e[10]=s,e[11]=m,e[12]=j,e[13]=k):k=e[13];const{data:v,isFetching:x}=f(k);let g;e[14]!==v?.items?(g=v?.items??[],e[14]=v?.items,e[15]=g):g=e[15];const b=g;let y;e[16]!==r?(y=C=>{C||a(""),r(C)},e[16]=r,e[17]=y):y=e[17];const p=y;let S;e[18]!==p||e[19]!==c?(S=C=>{p(!1),c(C.id,C.virtual_mcp_id??void 0)},e[18]=p,e[19]=c,e[20]=S):S=e[20];const N=S;let T;e[21]!==l?(T=l("tasksPanel.globalSearchDialog.title"),e[21]=l,e[22]=T):T=e[22];let _;e[23]!==T?(_=n.jsx(qt,{children:T}),e[23]=T,e[24]=_):_=e[24];let w;e[25]!==l?(w=l("tasksPanel.globalSearchDialog.description"),e[25]=l,e[26]=w):w=e[26];let I;e[27]!==w?(I=n.jsx(Wt,{children:w}),e[27]=w,e[28]=I):I=e[28];let P;e[29]!==I||e[30]!==_?(P=n.jsxs(Yt,{className:"sr-only",children:[_,I]}),e[29]=I,e[30]=_,e[31]=P):P=e[31];let L;e[32]!==l?(L=l("tasksPanel.globalSearchDialog.placeholder"),e[32]=l,e[33]=L):L=e[33];let $;e[34]!==i||e[35]!==L?($=n.jsx(vn,{value:i,onValueChange:a,placeholder:L}),e[34]=i,e[35]=L,e[36]=$):$=e[36];let E;e[37]!==N||e[38]!==x||e[39]!==b||e[40]!==l||e[41]!==h?(E=n.jsx(pn,{children:x&&b.length===0?n.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:l("tasksPanel.globalSearchDialog.searching")}):b.length===0?n.jsx(xn,{children:l("tasksPanel.globalSearchDialog.noResults")}):n.jsx(gn,{heading:h?void 0:l("tasksPanel.globalSearchDialog.recent"),children:b.map(C=>C.type==="thread"?n.jsxs(bn,{value:`thread:${C.id}:${C.title}`,onSelect:()=>N(C),className:"gap-2.5",children:[n.jsx(va,{virtualMcpId:C.virtual_mcp_id,size:"xs"}),n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx("div",{className:"text-sm text-foreground truncate",children:C.title||l("tasksPanel.globalSearchDialog.untitledChat")})}),n.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(C.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${C.id}`):null)})}),e[37]=N,e[38]=x,e[39]=b,e[40]=l,e[41]=h,e[42]=E):E=e[42];let F;e[43]!==$||e[44]!==E?(F=n.jsxs(yn,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[$,E]}),e[43]=$,e[44]=E,e[45]=F):F=e[45];let R;e[46]!==P||e[47]!==F?(R=n.jsxs(Qt,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[P,F]}),e[46]=P,e[47]=F,e[48]=R):R=e[48];let M;return e[49]!==p||e[50]!==s||e[51]!==R?(M=n.jsx(Zt,{open:s,onOpenChange:p,children:R}),e[49]=p,e[50]=s,e[51]=R,e[52]=M):M=e[52],M}function ka(t){return t.type==="thread"}function Sa(t,e,s){if(!s)return;const r=t.findIndex(i=>i.id===e);if(r!==-1){for(let i=r+1;i<t.length;i++){const a=t[i];if(a?.created_by===s)return a}for(let i=r-1;i>=0;i--){const a=t[i];if(a?.created_by===s)return a}}}function Ta(t){return t==="ephemeral"||t.startsWith("thread:")}function zt(t){const e=A.c(45),{task:s,isActive:r,onClick:i,onArchive:a,showAutomationBadge:o,showAgentIcon:c,hideStatusIdle:u,indented:l}=t,d=K(),m=jn(s.status),f=m.icon,h=s.metadata?.kind==="tool_call_run",j=Nt(h?void 0:s.virtual_mcp_id);let k;e[0]!==j?(k=_t(j),e[0]=j,e[1]=k):k=e[1];const v=k;Tn(6e4);const x=o||!!s.trigger_id,g=s.id,b="button",y=0;let p;e[2]!==i?(p=z=>{z.target===z.currentTarget&&(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),i())},e[2]=i,e[3]=p):p=e[3];const S=l?"-ml-4 pl-6":"pl-[9px]",N=r?"bg-accent text-accent-foreground":"hover:bg-accent/60";let T;e[4]!==S||e[5]!==N?(T=ee("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",S,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",N),e[4]=S,e[5]=N,e[6]=T):T=e[6];let _;e[7]!==h||e[8]!==c||e[9]!==j?.icon||e[10]!==j?.title?(_=c&&!h&&n.jsx(ye,{icon:j?.icon??null,name:j?.title??"?",size:"2xs"}),e[7]=h,e[8]=c,e[9]=j?.icon,e[10]=j?.title,e[11]=_):_=e[11];let w;e[12]!==x||e[13]!==d?(w=x&&n.jsx(Rt,{size:12,"aria-label":d("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-special"}),e[12]=x,e[13]=d,e[14]=w):w=e[14];let I;e[15]!==d||e[16]!==s.title?(I=s.title||d("tasksPanel.taskRow.untitledTask"),e[15]=d,e[16]=s.title,e[17]=I):I=e[17];let P;e[18]!==I?(P=n.jsx("div",{className:"text-sm text-foreground truncate",children:I}),e[18]=I,e[19]=P):P=e[19];let L;e[20]!==w||e[21]!==P?(L=n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[w,P]}),e[20]=w,e[21]=P,e[22]=L):L=e[22];let $;e[23]!==r||e[24]!==v||e[25]!==s.branch||e[26]!==s.updated_at?($=s.updated_at&&n.jsxs("div",{className:ee("flex items-center gap-1 text-[11px] min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[s.branch&&!Ta(s.branch)?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"truncate font-mono",children:s.branch}),n.jsx("span",{className:"shrink-0",children:"·"})]}):v?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"truncate",children:[v.owner,"/",v.name]}),n.jsx("span",{className:"shrink-0",children:"·"})]}):null,n.jsx("span",{className:"shrink-0",children:Sn(new Date(s.updated_at))})]}),e[23]=r,e[24]=v,e[25]=s.branch,e[26]=s.updated_at,e[27]=$):$=e[27];let E;e[28]!==L||e[29]!==$?(E=n.jsxs("div",{className:"flex-1 min-w-0",children:[L,$]}),e[28]=L,e[29]=$,e[30]=E):E=e[30];const F="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",R=!u&&n.jsx("span",{className:ee("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",a&&"group-hover/row:opacity-0"),"aria-label":d("tasksPanel.taskRow.statusLabel",{status:d(m.labelKey)}),children:s.status==="in_progress"?n.jsx(ve,{className:ee("size-3.5",m.iconClassName)}):n.jsx(f,{size:14,className:m.iconClassName})});let M;e[31]!==a||e[32]!==d?(M=a&&n.jsxs(Oe,{children:[n.jsx(Fe,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":d("tasksPanel.taskRow.archiveTask"),onClick:z=>{z.stopPropagation(),a()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto 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:n.jsx(Xt,{size:14})})}),n.jsx(Re,{side:"right",children:d("tasksPanel.taskRow.archive")})]}),e[31]=a,e[32]=d,e[33]=M):M=e[33];let C;e[34]!==R||e[35]!==M?(C=n.jsxs("div",{className:F,children:[R,M]}),e[34]=R,e[35]=M,e[36]=C):C=e[36];let G;return e[37]!==i||e[38]!==E||e[39]!==C||e[40]!==p||e[41]!==T||e[42]!==_||e[43]!==s.id?(G=n.jsxs("div",{"data-task-id":g,role:b,tabIndex:y,onClick:i,onKeyDown:p,className:T,children:[_,E,C]}),e[37]=i,e[38]=E,e[39]=C,e[40]=p,e[41]=T,e[42]=_,e[43]=s.id,e[44]=G):G=e[44],G}const dt=["requires_action","in_progress","failed","expired","completed"];function Na(t){const e=new Map(dt.map(s=>[s,[]]));for(const s of t){const r=s.status??"completed";(e.get(r)??e.get("completed")).push(s)}return dt.map(s=>({status:s,threads:e.get(s)}))}const _a="sidebar.group.expanded.";function wa(t,e){const s=A.c(3),[r,i]=xt(`${_a}${t}`,e);let a;return s[0]!==r||s[1]!==i?(a=[r,i],s[0]=r,s[1]=i,s[2]=a):a=s[2],a}function Gt(t){const e=A.c(18),{onClick:s,isFetching:r,indented:i}=t,a=K();let o;e[0]!==a?(o=a("sidebar.showMoreButton.ariaLabel"),e[0]=a,e[1]=o):o=e[1];const c=i?"-ml-4 pl-6 pr-2":"px-2";let u;e[2]!==c?(u=ee("flex items-center gap-2 py-1.5 rounded-lg text-sm text-muted-foreground",c,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=c,e[3]=u):u=e[3];let l;e[4]!==r?(l=r&&n.jsx(ve,{className:"size-3.5"}),e[4]=r,e[5]=l):l=e[5];let d;e[6]!==r||e[7]!==a?(d=a(r?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=r,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==d?(m=n.jsx("span",{children:d}),e[9]=d,e[10]=m):m=e[10];let f;return e[11]!==r||e[12]!==s||e[13]!==o||e[14]!==u||e[15]!==l||e[16]!==m?(f=n.jsxs("button",{type:"button","aria-label":o,onClick:s,disabled:r,className:u,children:[l,m]}),e[11]=r,e[12]=s,e[13]=o,e[14]=u,e[15]=l,e[16]=m,e[17]=f):f=e[17],f}function Ca(t,e,s,r){return[t,e,s,r.type,r.member,r.currentUserId??""].join("|")}function Pa(t){return t.member==="mine"&&!t.currentUserId}const Ht=4;let _e=0;const Ke=[];function Ia(){for(;_e<Ht&&Ke.length>0;){const t=Ke.shift();t&&t()}}function Ut(t){return new Promise((e,s)=>{const r=()=>{_e++,t().then(e,s).finally(()=>{_e--,Ia()})};_e<Ht?r():Ke.push(r)})}const Be=10;function ut(t,e,s,r,i){const a={hidden:!1};r.member==="mine"&&r.currentUserId&&(a.created_by=r.currentUserId),r.type==="automation"&&(a.has_trigger=!0),r.type==="manual"&&(a.has_trigger=!1);const o={where:a,limit:i,offset:s,orderBy:[{field:["updated_at"],direction:"desc"}]};return o.status=e,o}function Ma(t,e,s,r){let i=0;for(const a of t)Kt(a,e,s,r)&&i++;return i}function He(t,e,s,r){return Ma(t,e,s,r)}function Aa(t,e){return!!(t>=Be||t===0&&e)}function ft(t,e){return t<e}function La(t,e){return e===!1?!1:e===!0?!0:t}function Kt(t,e,s,r){return!(t.hidden||(t.status??"completed")!==s||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const Pe=new Map,Ne=new Map;function $a(t,e){return e?t>=Be?!0:null:!1}function mt(t){return Pe.get(t)}function Ea(t,e){Pe.set(t,e)}function Fa(t,e,s){const r=Pe.get(t);if(r!==void 0){s(r);return}let i=Ne.get(t);i||(i=Ut(e).then(a=>(Pe.set(t,a),Ne.delete(t),a)).catch(()=>(Ne.delete(t),Promise.reject(new Error("group probe failed")))),Ne.set(t,i)),i.then(s,()=>s(!1))}function ht(t){const e=t,s=Array.isArray(e.items)?e.items:[];return{items:s,hasMore:e.hasMore??s.length===Be,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Ra(t,e,s,r,i){let a=0;for(const o of t)e.has(o.id)||Kt(o,s,r,i)&&a++;return a}function Oa(t,e,s,r){const i=A.c(8),{org:a}=ne(),o=Ca(a.id,t,e,s);let c;i[0]!==s?(c=Pa(s),i[0]=s,i[1]=c):c=i[1];const u=c,[l,d]=B.useState({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});l.identity!==o&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});const m=Ze(),{threads:f,hasMore:h}=Xe(),j=He(f,t,e,s),k=Aa(j,h),v=$a(j,h),x=Ie();if(l.identity===o&&l.serverHasMore===null){const N=v??mt(o);N!==void 0&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:l.probeSubscribedIdentity,serverHasMore:N})}!u&&l.identity===o&&l.serverHasMore===null&&v===null&&mt(o)===void 0&&l.probeSubscribedIdentity!==o&&(d(N=>N.identity===o?{...N,isProbing:!0,probeSubscribedIdentity:o}:N),Fa(o,async()=>{const N=ut(t,e,0,s,1),T=await x.call("COLLECTION_THREADS_LIST",N),{totalCount:_}=ht(T),w=He(m.threads.get(),t,e,s);return _===void 0?!1:ft(w,_)},N=>{d(T=>T.identity!==o?T:{...T,isProbing:!1,serverHasMore:N})}));const b=async function(){if(l.isFetching||l.isProbing||u)return;const T=o;d(_=>_.identity===T?{..._,isFetching:!0}:_);try{const _=He(f,t,e,s),w=ut(t,e,_,s,Be),I=await Ut(()=>x.call("COLLECTION_THREADS_LIST",w)),{items:P,hasMore:L,totalCount:$}=ht(I),E=new Set(f.map(Ba)),F=Ra(P,E,t,e,s),R=_;m.mergeThreads(P),d(M=>{if(M.identity!==T)return M;let C;return $!==void 0?C=ft(R+F,$):C=P.length===0||F===0?!1:L,Ea(T,C),{...M,isFetching:!1,serverHasMore:C}})}catch(_){const w=_,I=w instanceof Error?w.message:String(w);Jt.error(`Could not load more tasks: ${I}`),d(P=>P.identity===T?{...P,isFetching:!1}:P)}},y=l.isFetching||l.isProbing,p=!u&&!y&&La(k,l.serverHasMore);let S;return i[2]!==y||i[3]!==b||i[4]!==p||i[5]!==l.isProbing||i[6]!==l.serverHasMore?(S={hasMore:p,isFetching:y,isProbing:l.isProbing,serverHasMore:l.serverHasMore,loadMore:b},i[2]=y,i[3]=b,i[4]=p,i[5]=l.isProbing,i[6]=l.serverHasMore,i[7]=S):S=i[7],S}function Ba(t){return t.id}function Da(t){const e=A.c(20),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u}=t,{isFetching:l,isProbing:d,loadMore:m,hasMore:f,serverHasMore:h}=Oa("status",s,u),[j,k]=B.useState(!1);!j&&r.length===0&&h===!0&&!l&&!d&&(k(!0),queueMicrotask(()=>{m()}));let v;if(e[0]!==i||e[1]!==c||e[2]!==u||e[3]!==o||e[4]!==a||e[5]!==r){let b;e[7]!==i||e[8]!==c||e[9]!==u||e[10]!==o||e[11]!==a?(b=y=>n.jsx(zt,{task:y,isActive:i===y.id,onClick:()=>a(y),onArchive:c&&y.created_by===u.currentUserId?()=>o(y):void 0,showAutomationBadge:!!y.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},y.id),e[7]=i,e[8]=c,e[9]=u,e[10]=o,e[11]=a,e[12]=b):b=e[12],v=r.map(b),e[0]=i,e[1]=c,e[2]=u,e[3]=o,e[4]=a,e[5]=r,e[6]=v}else v=e[6];let x;e[13]!==f||e[14]!==l||e[15]!==m?(x=(f||l)&&n.jsx(Gt,{onClick:()=>{m()},isFetching:l,indented:!0}),e[13]=f,e[14]=l,e[15]=m,e[16]=x):x=e[16];let g;return e[17]!==v||e[18]!==x?(g=n.jsxs(n.Fragment,{children:[v,x]}),e[17]=v,e[18]=x,e[19]=g):g=e[19],g}function za(t){const e=A.c(43),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u}=t,l=K(),d=kn[s],m=d.icon,[f,h]=wa(`status-${s}`,!1);let j;e[0]!==f||e[1]!==h?(j=function(){h(!f)},e[0]=f,e[1]=h,e[2]=j):j=e[2];const k=j;let v;e[3]!==d.labelKey||e[4]!==l?(v=l("sidebar.taskGroupsList.toggleStatusGroup",{status:l(d.labelKey)}),e[3]=d.labelKey,e[4]=l,e[5]=v):v=e[5];let x;e[6]!==k?(x=I=>{I.target===I.currentTarget&&(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),k())},e[6]=k,e[7]=x):x=e[7];let g;e[8]!==m||e[9]!==d.iconClassName?(g=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:n.jsx(m,{size:12,className:d.iconClassName})}),e[8]=m,e[9]=d.iconClassName,e[10]=g):g=e[10];let b;e[11]!==f?(b=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:f?n.jsx(Ye,{size:14}):n.jsx(es,{size:14})}),e[11]=f,e[12]=b):b=e[12];let y;e[13]!==g||e[14]!==b?(y=n.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[g,b]}),e[13]=g,e[14]=b,e[15]=y):y=e[15];let p;e[16]!==d.labelKey||e[17]!==l?(p=l(d.labelKey),e[16]=d.labelKey,e[17]=l,e[18]=p):p=e[18];let S;e[19]!==p?(S=n.jsx("span",{className:"flex-1 truncate",children:p}),e[19]=p,e[20]=S):S=e[20];let N;e[21]!==r.length?(N=n.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:n.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:r.length})}),e[21]=r.length,e[22]=N):N=e[22];let T;e[23]!==f||e[24]!==k||e[25]!==v||e[26]!==x||e[27]!==y||e[28]!==S||e[29]!==N?(T=n.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":f,"aria-label":v,onClick:k,onKeyDown:x,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-lg text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[y,S,N]}),e[23]=f,e[24]=k,e[25]=v,e[26]=x,e[27]=y,e[28]=S,e[29]=N,e[30]=T):T=e[30];let _;e[31]!==i||e[32]!==c||e[33]!==f||e[34]!==u||e[35]!==o||e[36]!==a||e[37]!==s||e[38]!==r?(_=f&&n.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:n.jsx(Da,{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:c,filters:u})}),e[31]=i,e[32]=c,e[33]=f,e[34]=u,e[35]=o,e[36]=a,e[37]=s,e[38]=r,e[39]=_):_=e[39];let w;return e[40]!==T||e[41]!==_?(w=n.jsxs("div",{className:"flex flex-col gap-0.5",children:[T,_]}),e[40]=T,e[41]=_,e[42]=w):w=e[42],w}function Ga(t){const e=A.c(41),{threads:s,groupBy:r,activeTaskId:i,onSelectTask:a,onArchiveTask:o,filters:c,hasMore:u,isFetchingMore:l,onLoadMore:d,filtersActive:m}=t,f=K();if(s.length===0&&!u&&!l){let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(hs,{className:"size-6 opacity-60"}),e[0]=x):x=e[0];let g;e[1]!==m||e[2]!==f?(g=f(m?"sidebar.myThreadsSection.noChatsMatchFilters":"sidebar.myThreadsSection.noChatsYet"),e[1]=m,e[2]=f,e[3]=g):g=e[3];let b;return e[4]!==g?(b=n.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[x,n.jsx("p",{className:"text-sm",children:g})]}),e[4]=g,e[5]=b):b=e[5],b}const h=s.length>1||u;if(r==="status"){let x;if(e[6]!==i||e[7]!==h||e[8]!==c||e[9]!==o||e[10]!==a||e[11]!==s){let b;e[13]!==i||e[14]!==h||e[15]!==c||e[16]!==o||e[17]!==a?(b=y=>n.jsx(za,{status:y.status,threads:y.threads,activeTaskId:i,onSelectTask:a,onArchiveTask:o,canArchive:h,filters:c},y.status),e[13]=i,e[14]=h,e[15]=c,e[16]=o,e[17]=a,e[18]=b):b=e[18],x=Na(s).map(b),e[6]=i,e[7]=h,e[8]=c,e[9]=o,e[10]=a,e[11]=s,e[12]=x}else x=e[12];let g;return e[19]!==x?(g=n.jsx(n.Fragment,{children:x}),e[19]=x,e[20]=g):g=e[20],g}let j;if(e[21]!==i||e[22]!==h||e[23]!==c||e[24]!==o||e[25]!==a||e[26]!==s){let x;e[28]!==i||e[29]!==h||e[30]!==c||e[31]!==o||e[32]!==a?(x=g=>n.jsx(zt,{task:g,isActive:i===g.id,onClick:()=>a(g),onArchive:h&&g.created_by===c.currentUserId?()=>o(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0},g.id),e[28]=i,e[29]=h,e[30]=c,e[31]=o,e[32]=a,e[33]=x):x=e[33],j=s.map(x),e[21]=i,e[22]=h,e[23]=c,e[24]=o,e[25]=a,e[26]=s,e[27]=j}else j=e[27];let k;e[34]!==u||e[35]!==l||e[36]!==d?(k=(u||l)&&n.jsx(Gt,{onClick:d,isFetching:l}),e[34]=u,e[35]=l,e[36]=d,e[37]=k):k=e[37];let v;return e[38]!==j||e[39]!==k?(v=n.jsxs(n.Fragment,{children:[j,k]}),e[38]=j,e[39]=k,e[40]=v):v=e[40],v}function Ha(t){const e=A.c(11),{panel:s}=t;let r;return e[0]!==s.activeTaskId||e[1]!==s.archiveTask||e[2]!==s.filters||e[3]!==s.filtersActive||e[4]!==s.groupBy||e[5]!==s.hasMore||e[6]!==s.isFetchingMore||e[7]!==s.loadMore||e[8]!==s.selectTask||e[9]!==s.threads?(r=n.jsx(Ga,{threads:s.threads,groupBy:s.groupBy,activeTaskId:s.activeTaskId,onSelectTask:s.selectTask,onArchiveTask:s.archiveTask,filters:s.filters,hasMore:s.hasMore,isFetchingMore:s.isFetchingMore,onLoadMore:s.loadMore,filtersActive:s.filtersActive}),e[0]=s.activeTaskId,e[1]=s.archiveTask,e[2]=s.filters,e[3]=s.filtersActive,e[4]=s.groupBy,e[5]=s.hasMore,e[6]=s.isFetchingMore,e[7]=s.loadMore,e[8]=s.selectTask,e[9]=s.threads,e[10]=r):r=e[10],r}function Ua(t){const e=A.c(67);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{onNavigate:r}=s,{data:i}=pe.useSession(),a=i?.user?.id,{org:o}=ne();let c;e[2]!==o.id?(c=je(o.id),e[2]=o.id,e[3]=c):c=e[3];const u=c.id,l=ba(),d=St(),{threads:m,hasMore:f,isFetchingMore:h,fetchNextPage:j}=Xe(),k=m.filter(Wa),{hide:v,setScope:x}=Je(),g=Ae(),{setTaskId:b,createNewTask:y}=Qe(),p=Et(),S=et();let N;e[4]!==S||e[5]!==m||e[6]!==p?(N=fn({routeAgentId:p,threadVirtualMcpId:m.find(U=>U.id===S)?.virtual_mcp_id}),e[4]=S,e[5]=m,e[6]=p,e[7]=N):N=e[7];const T=N;let _;e[8]!==r?(_=()=>{r?.()},e[8]=r,e[9]=_):_=e[9];const w=_,I=[...k].sort(qa),[P,L]=B.useState("all"),[$,E]=B.useState("flat"),[F,R]=xt("sidebar-threads-scope-all",!1),[M,C]=B.useState(!1),[G,z]=B.useState(!1);let H;e[10]!==C?(H=()=>{he("tasks_panel_search_opened"),z(!0),C(!0)},e[10]=C,e[11]=H):H=e[11];const O=H,V=a??null;let Q;e[12]!==V||e[13]!==P?(Q={type:P,member:"mine",currentUserId:V},e[12]=V,e[13]=P,e[14]=Q):Q=e[14];const Y=Q,Z={};F||(Z.created_by="me"),x(Z);let q;e[15]!==a?(q=U=>a?U.filter(ue=>ue.created_by===a):[],e[15]=a,e[16]=q):q=e[16];const le=q;let D;e[17]!==P?(D=U=>P==="automation"?U.filter(Va):P==="manual"?U.filter(Ka):U,e[17]=P,e[18]=D):D=e[18];const re=D,X=ga(re(F?I:le(I)),S);let J;e[19]!==S||e[20]!==w||e[21]!==a||e[22]!==v||e[23]!==g||e[24]!==o.slug||e[25]!==b||e[26]!==X?(J=U=>{if(a&&U.created_by&&U.created_by!==a)return;const ue=U.id===S;if(v(U.id),Hs(U.id),!ue)return;const ge=Sa(X,U.id,a);w(),ge?b(ge.id,ge.virtual_mcp_id):g({to:"/$org",params:{org:o.slug}})},e[19]=S,e[20]=w,e[21]=a,e[22]=v,e[23]=g,e[24]=o.slug,e[25]=b,e[26]=X,e[27]=J):J=e[27];const te=J;let ae;e[28]!==w||e[29]!==b?(ae=U=>{w(),b(U.id,U.virtual_mcp_id)},e[28]=w,e[29]=b,e[30]=ae):ae=e[30];const ie=ae;let se;e[31]!==T||e[32]!==S||e[33]!==m||e[34]!==w||e[35]!==y||e[36]!==a||e[37]!==u||e[38]!==l||e[39]!==d||e[40]!==b?(se=()=>{const U=T??u;he("sidebar_new_thread_clicked",{virtual_mcp_id:U}),w();const ue=nn(m,U,a,l(U));if(ue){b(ue.id,ue.virtual_mcp_id);return}const ge=d?null:m.find(Vt=>Vt.id===S)?.branch??null;y(U,ge)},e[31]=T,e[32]=S,e[33]=m,e[34]=w,e[35]=y,e[36]=a,e[37]=u,e[38]=l,e[39]=d,e[40]=b,e[41]=se):se=e[41];const oe=se;let ce;e[42]!==j?(ce=()=>{j()},e[42]=j,e[43]=ce):ce=e[43];const xe=$!=="flat"||P!=="all"||F;let de;e[44]!==G||e[45]!==M||e[46]!==C?(de=G?n.jsx(ja,{open:M,onOpenChange:C}):null,e[44]=G,e[45]=M,e[46]=C,e[47]=de):de=e[47];let Te;return e[48]!==S||e[49]!==te||e[50]!==Y||e[51]!==$||e[52]!==f||e[53]!==h||e[54]!==oe||e[55]!==O||e[56]!==ie||e[57]!==E||e[58]!==R||e[59]!==L||e[60]!==F||e[61]!==ce||e[62]!==xe||e[63]!==de||e[64]!==P||e[65]!==X?(Te={threads:X,activeTaskId:S,filters:Y,hasMore:f,isFetchingMore:h,loadMore:ce,groupBy:$,setGroupBy:E,typeFilter:P,setTypeFilter:L,showAll:F,setShowAll:R,filtersActive:xe,selectTask:ie,archiveTask:te,newThread:oe,openSearch:O,searchDialog:de},e[48]=S,e[49]=te,e[50]=Y,e[51]=$,e[52]=f,e[53]=h,e[54]=oe,e[55]=O,e[56]=ie,e[57]=E,e[58]=R,e[59]=L,e[60]=F,e[61]=ce,e[62]=xe,e[63]=de,e[64]=P,e[65]=X,e[66]=Te):Te=e[66],Te}function Ka(t){return!t.trigger_id}function Va(t){return!!t.trigger_id}function qa(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function Wa(t){return!t.hidden}function Ya(){const t=A.c(59),e=K(),[s,r]=B.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={onNavigate:()=>r(!1)},t[0]=i):i=t[0];const a=Ua(i),o=$e()?.activeTask;let c;t[1]!==o?.title||t[2]!==a.activeTaskId||t[3]!==a.threads||t[4]!==e?(c=o?.title||a.threads.find(M=>M.id===a.activeTaskId)?.title||e("tasksPanel.taskRow.untitledTask"),t[1]=o?.title,t[2]=a.activeTaskId,t[3]=a.threads,t[4]=e,t[5]=c):c=t[5];const u=c;let l;t[6]!==a?(l=()=>{r(!1),a.openSearch()},t[6]=a,t[7]=l):l=t[7];const d=l;let m;t[8]!==e?(m=e("chat.threadsMenu.chats"),t[8]=e,t[9]=m):m=t[9];const f=s&&"bg-sidebar-accent";let h;t[10]!==f?(h=ee("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",f),t[10]=f,t[11]=h):h=t[11];let j;t[12]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(ps,{size:16,className:"shrink-0"}),t[12]=j):j=t[12];let k;t[13]!==u?(k=n.jsx("span",{className:"truncate max-w-[10rem] font-medium",children:u}),t[13]=u,t[14]=k):k=t[14];let v;t[15]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Ye,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[15]=v):v=t[15];let x;t[16]!==m||t[17]!==h||t[18]!==k?(x=n.jsx(Fe,{asChild:!0,children:n.jsx(At,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":m,className:h,children:[j,k,v]})})}),t[16]=m,t[17]=h,t[18]=k,t[19]=x):x=t[19];let g;t[20]!==e?(g=e("chat.threadsMenu.chats"),t[20]=e,t[21]=g):g=t[21];let b;t[22]!==g?(b=n.jsx(Re,{side:"bottom",children:g}),t[22]=g,t[23]=b):b=t[23];let y;t[24]!==b||t[25]!==x?(y=n.jsxs(Oe,{children:[x,b]}),t[24]=b,t[25]=x,t[26]=y):y=t[26];let p;t[27]!==a?(p=n.jsx(xa,{panel:a,className:"size-8"}),t[27]=a,t[28]=p):p=t[28];let S;t[29]!==e?(S=e("sidebar.taskGroupsList.searchChats"),t[29]=e,t[30]=S):S=t[30];let N;t[31]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(xs,{size:16}),t[31]=N):N=t[31];let T;t[32]!==d||t[33]!==S?(T=n.jsx(we,{"aria-label":S,onClick:d,className:"size-8",children:N}),t[32]=d,t[33]=S,t[34]=T):T=t[34];let _;t[35]!==e?(_=e("sidebar.taskGroupsList.newChat"),t[35]=e,t[36]=_):_=t[36];let w;t[37]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(bt,{size:16}),t[37]=w):w=t[37];let I;t[38]!==a.newThread||t[39]!==_?(I=n.jsx(we,{"aria-label":_,onClick:a.newThread,className:"size-8",children:w}),t[38]=a.newThread,t[39]=_,t[40]=I):I=t[40];let P;t[41]!==T||t[42]!==I?(P=n.jsxs("div",{className:"flex items-center gap-0.5",children:[T,I]}),t[41]=T,t[42]=I,t[43]=P):P=t[43];let L;t[44]!==p||t[45]!==P?(L=n.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[p,P]}),t[44]=p,t[45]=P,t[46]=L):L=t[46];let $;t[47]!==a?($=n.jsx("div",{className:"flex max-h-[60vh] min-h-0 flex-col gap-0.5 overflow-y-auto overscroll-contain",children:n.jsx(Ha,{panel:a})}),t[47]=a,t[48]=$):$=t[48];let E;t[49]!==L||t[50]!==$?(E=n.jsxs(Lt,{align:"start",side:"bottom",onOpenAutoFocus:Qa,className:"flex w-80 flex-col gap-2 p-2",children:[L,$]}),t[49]=L,t[50]=$,t[51]=E):E=t[51];let F;t[52]!==s||t[53]!==y||t[54]!==E?(F=n.jsxs($t,{open:s,onOpenChange:r,children:[y,E]}),t[52]=s,t[53]=y,t[54]=E,t[55]=F):F=t[55];let R;return t[56]!==a.searchDialog||t[57]!==F?(R=n.jsxs(n.Fragment,{children:[F,a.searchDialog]}),t[56]=a.searchDialog,t[57]=F,t[58]=R):R=t[58],R}function Qa(t){return t.preventDefault()}function Za(){const t=A.c(20),e=K(),{threads:s}=Xe(),{createNewTask:r}=Qe(),i=Ft(),a=et();let o;t[0]!==a||t[1]!==s?(o=s.find(v=>v.id===a)?.branch??null,t[0]=a,t[1]=s,t[2]=o):o=t[2];const c=o;let u;t[3]!==i||t[4]!==r||t[5]!==c?(u=()=>{r(i,c)},t[3]=i,t[4]=r,t[5]=c,t[6]=u):u=t[6];const l=u;let d;t[7]!==e?(d=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=d):d=t[8];let m;t[9]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(bt,{size:16}),t[9]=m):m=t[9];let f;t[10]!==l||t[11]!==d?(f=n.jsx(Fe,{asChild:!0,children:n.jsx("button",{type:"button",onClick:l,"aria-label":d,className:"flex shrink-0 items-center rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:m})}),t[10]=l,t[11]=d,t[12]=f):f=t[12];let h;t[13]!==e?(h=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=h):h=t[14];let j;t[15]!==h?(j=n.jsx(Re,{side:"bottom",children:h}),t[15]=h,t[16]=j):j=t[16];let k;return t[17]!==f||t[18]!==j?(k=n.jsxs(Oe,{children:[f,j]}),t[17]=f,t[18]=j,t[19]=k):k=t[19],k}function Xa(t){const e=A.c(18),{virtualMcp:s}=t,r=K(),i=Tt(),{navigateToTask:a}=Nn(),{create:o}=Je(),c=ts(),{org:u}=ne();let l,d;if(e[0]!==i||e[1]!==o||e[2]!==a||e[3]!==u||e[4]!==c||e[5]!==r||e[6]!==s){d=Symbol.for("react.early_return_sentinel");e:{const m=Ws(s,i);if(!m){d=null;break e}const f=m.mode==="dev";let h;e[9]!==o||e[10]!==a||e[11]!==u||e[12]!==c?(h=async b=>{const y=crypto.randomUUID();await Promise.all([o({id:y,virtual_mcp_id:b}).catch(er),Rs(c,u,b).catch(Ja)]),a(y,{virtualMcpId:b})},e[9]=o,e[10]=a,e[11]=u,e[12]=c,e[13]=h):h=e[13];const j=h,k=(b,y,p)=>n.jsxs("button",{type:"button","aria-pressed":y,"aria-label":b,title:b,onClick:()=>{y||j(m.targetId)},className:ee("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg transition-colors",y?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[n.jsx(p,{className:"size-3.5 shrink-0"}),n.jsx("span",{className:"@max-3xl/panel-header:hidden",children:b})]});let v;e[14]!==r?(v=r("devAgent.devAgentControl.develop"),e[14]=r,e[15]=v):v=e[15];const x=k(v,f,gs);let g;e[16]!==r?(g=r("devAgent.devAgentControl.live"),e[16]=r,e[17]=g):g=e[17],l=n.jsxs("div",{className:"inline-flex items-center rounded-lg border border-border bg-muted p-0.5 text-xs font-medium",children:[x,k(g,!f,bs)]})}e[0]=i,e[1]=o,e[2]=a,e[3]=u,e[4]=c,e[5]=r,e[6]=s,e[7]=l,e[8]=d}else l=e[7],d=e[8];return d!==Symbol.for("react.early_return_sentinel")?d:l}function Ja(){}function er(){}function tr(t){const e=A.c(16),{virtualMcpId:s,taskId:r}=t,{openPanel:i}=Ot();let a;e[0]!==r||e[1]!==s?(a={virtualMcpId:s,taskId:r},e[0]=r,e[1]=s,e[2]=a):a=e[2];const{tabs:o,activeTab:c,mainOpen:u}=Bt(a);if(o.length===0)return null;let l;if(e[3]!==c||e[4]!==u||e[5]!==i||e[6]!==o||e[7]!==s){let m;e[9]!==c||e[10]!==u||e[11]!==i||e[12]!==s?(m=f=>{const h=f.id==="automations"?ss({activeTab:c,mainOpen:u}):u&&f.id===c;return n.jsxs(st.Tab,{active:h,onClick:()=>{h||(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:f.id,tab_kind:f.kind,was_active:!1}),i(f.id))},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(Ce,{icon:f.icon})}),f.title]},f.id)},e[9]=c,e[10]=u,e[11]=i,e[12]=s,e[13]=m):m=e[13],l=o.map(m),e[3]=c,e[4]=u,e[5]=i,e[6]=o,e[7]=s,e[8]=l}else l=e[8];let d;return e[14]!==l?(d=n.jsx(st.Tabs,{"data-tour":Us.surfaceTabs,children:l}),e[14]=l,e[15]=d):d=e[15],d}function sr(t){return{threadId:t.routeThreadId,providerKey:t.routeThreadId??t.fallbackKey}}const Ue="__mobile-main-panel-tab-select__",Ve="main";function nr({tabs:t,activeTab:e,mainOpen:s,t:r}){const i=t.find(o=>o.id===e),a=r("mainPanelTabs.mobileMainPanelTabSelect.mainView");return s?i?.title??a:i?.title??t[0]?.title??a}const ar={kind:"component",Component:vs},rr={kind:"component",Component:ys},ir={kind:"component",Component:js},lr={kind:"component",Component:wn};function or({tabs:t,overlayEnabled:e,t:s}){return[{value:"chat",title:s("mainPanelTabs.mobileMainPanelTabSelect.chat"),icon:ar},...t.length>0?t.map(r=>({value:r.id,title:r.title,icon:r.icon})):[{value:Ve,title:s("mainPanelTabs.mobileMainPanelTabSelect.mainView"),icon:lr}],...e?[{value:"board",title:s("mainPanelTabs.mobileMainPanelTabSelect.tasks"),icon:rr},{value:"files",title:s("mainPanelTabs.mobileMainPanelTabSelect.library"),icon:ir}]:[]]}function cr(t){const e=A.c(53),{virtualMcpId:s,taskId:r}=t,i=K(),a=Ae(),{openPanel:o}=Ot();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const u=ke(c);let l;e[1]!==r||e[2]!==s?(l={virtualMcpId:s,taskId:r},e[1]=r,e[2]=s,e[3]=l):l=e[3];const{tabs:d,activeTab:m,mainOpen:f}=Bt(l),{org:h}=ne(),j=Es();let k;e[4]!==h.id?(k=nt(h.id),e[4]=h.id,e[5]=k):k=e[5];const v=s===k;let x,g,b,y,p,S,N,T,_,w;if(e[6]!==m||e[7]!==f||e[8]!==a||e[9]!==v||e[10]!==o||e[11]!==h.id||e[12]!==u.org||e[13]!==u.taskId||e[14]!==j||e[15]!==i||e[16]!==d||e[17]!==s){y=Symbol.for("react.early_return_sentinel");e:{const L=or({tabs:d,overlayEnabled:!!(u.org&&u.taskId),t:i}),$=f?L.find(O=>O.value===m)?.value??Ve:"chat",E=L.find(O=>O.value===$),F=E?.title??nr({tabs:d,activeTab:m,mainOpen:f,t:i});let R;e[28]!==a?(R=O=>{a({to:".",search:V=>({...V,...Ys(O)}),replace:!0})},e[28]=a,e[29]=R):R=e[29];const M=R;let C;e[30]!==v||e[31]!==o||e[32]!==h.id||e[33]!==j||e[34]!==M||e[35]!==s?(C=O=>{if(O!==Ue){if(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:O,source:"mobile_select"}),Ks({reportsOnly:j,onReportAgent:v,tabId:O})){o(O,{virtualmcpid:nt(h.id),search:fr});return}if(O==="chat"||O===Ve){M(O==="chat"?"chat":"main");return}o(O,{search:ur})}},e[30]=v,e[31]=o,e[32]=h.id,e[33]=j,e[34]=M,e[35]=s,e[36]=C):C=e[36];const G=C,z=L.find(O=>O.value!==$);if(L.length===2&&z){y=n.jsxs("button",{type:"button",onClick:()=>G(z.value),"aria-label":i("mainPanelTabs.mobileMainPanelTabSelect.switchTo",{name:z.title}),className:"flex h-10 min-w-0 max-w-[7.5rem] items-center gap-1.5 rounded-lg px-1.5 text-xs text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(Ce,{icon:z.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:z.title})]});break e}g=Pn,_=Ue,w=G;let H;e[37]!==i?(H=i("mainPanelTabs.mobileMainPanelTabSelect.view"),e[37]=i,e[38]=H):H=e[38],b=n.jsx(Cn,{"aria-label":H,className:"h-10! w-full min-w-0 max-w-[7.5rem] rounded-lg border-0 bg-transparent px-1.5 text-xs shadow-none [--card-shadow:none]",children:n.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[E&&n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(Ce,{icon:E.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:F})]})}),x=In,p="end",S="w-56",e[39]!==F?(N=n.jsx(Dt,{value:Ue,disabled:!0,hideCheck:!0,className:"hidden",children:F}),e[39]=F,e[40]=N):N=e[40],T=L.map(dr)}e[6]=m,e[7]=f,e[8]=a,e[9]=v,e[10]=o,e[11]=h.id,e[12]=u.org,e[13]=u.taskId,e[14]=j,e[15]=i,e[16]=d,e[17]=s,e[18]=x,e[19]=g,e[20]=b,e[21]=y,e[22]=p,e[23]=S,e[24]=N,e[25]=T,e[26]=_,e[27]=w}else x=e[18],g=e[19],b=e[20],y=e[21],p=e[22],S=e[23],N=e[24],T=e[25],_=e[26],w=e[27];if(y!==Symbol.for("react.early_return_sentinel"))return y;let I;e[41]!==x||e[42]!==p||e[43]!==S||e[44]!==N||e[45]!==T?(I=n.jsxs(x,{align:p,className:S,children:[N,T]}),e[41]=x,e[42]=p,e[43]=S,e[44]=N,e[45]=T,e[46]=I):I=e[46];let P;return e[47]!==g||e[48]!==b||e[49]!==I||e[50]!==_||e[51]!==w?(P=n.jsxs(g,{value:_,onValueChange:w,children:[b,I]}),e[47]=g,e[48]=b,e[49]=I,e[50]=_,e[51]=w,e[52]=P):P=e[52],P}function dr(t){return n.jsx(Dt,{value:t.value,children:n.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(Ce,{icon:t.icon})}),n.jsx("span",{className:"min-w-0 truncate",children:t.title})]})},t.value)}function ur(t){return{...t,sidepanel:!1}}function fr(t){return{...t,thread:void 0,sidepanel:!1}}function mr(t,e,s){const r=A.c(33),i=Ze(),{locator:a}=ne(),o=B.useSyncExternalStore(i.threads.subscribe,i.threads.get),c=B.useSyncExternalStore(i.threadsStatus.subscribe,i.threadsStatus.get);let u;r[0]!==t||r[1]!==o?(u=t===null?null:o.find(p=>p.id===t&&!p.partial)??null,r[0]=t,r[1]=o,r[2]=u):u=r[2];const l=u,[d,m]=B.useState(void 0),[f,h]=B.useState(t);f!==t&&(h(t),m(void 0));let j,k;r[3]!==d||r[4]!==t||r[5]!==l||r[6]!==i||r[7]!==c.kind?(j=()=>{t!==null&&(l||c.kind!=="loading"&&d===void 0&&(m("pending"),i.fetchThreadIntoSlot(t).then(p=>{m(p)})))},k=[t,l,c.kind,d,i],r[3]=d,r[4]=t,r[5]=l,r[6]=i,r[7]=c.kind,r[8]=j,r[9]=k):(j=r[8],k=r[9]),B.useEffect(j,k);let v;r[10]!==s||r[11]!==a||r[12]!==i||r[13]!==e?(v={mutationFn:async p=>i.create({id:p,virtual_mcp_id:e,...s?{branch:s}:{},...sn(sessionStorage,a,p)})},r[10]=s,r[11]=a,r[12]=i,r[13]=e,r[14]=v):v=r[14];const x=ns(v);let g,b;if(r[15]!==x||r[16]!==d||r[17]!==t||r[18]!==l||r[19]!==c.kind?(g=()=>{t!==null&&(l||d===null&&c.kind!=="loading"&&(x.isPending||x.variables!==t&&x.mutate(t)))},b=[t,l,d,c.kind,x],r[15]=x,r[16]=d,r[17]=t,r[18]=l,r[19]=c.kind,r[20]=g,r[21]=b):(g=r[20],b=r[21]),B.useEffect(g,b),t===null){let p;return r[22]===Symbol.for("react.memo_cache_sentinel")?(p={status:"ready",task:null},r[22]=p):p=r[22],p}if(l){let p;return r[23]!==l?(p={status:"ready",task:l},r[23]=l,r[24]=p):p=r[24],p}if(d&&typeof d=="object"){let p;return r[25]!==d?(p={status:"ready",task:d},r[25]=d,r[26]=p):p=r[26],p}if(x.data){let p;return r[27]!==x.data?(p={status:"ready",task:x.data},r[27]=x.data,r[28]=p):p=r[28],p}if(x.isError){let p;return r[29]!==x.error?(p={status:"error",error:x.error},r[29]=x.error,r[30]=p):p=r[30],p}if(x.isPending||c.kind!=="loading"){let p;return r[31]===Symbol.for("react.memo_cache_sentinel")?(p={status:"creating"},r[31]=p):p=r[31],p}let y;return r[32]===Symbol.for("react.memo_cache_sentinel")?(y={status:"loading"},r[32]=y):y=r[32],y}const hr=50;function pr(t,e){const s=A.c(15),{org:r}=ne(),i=Ie(),{data:a}=pe.useSession(),o=a?.user?.id??"";let c;s[0]!==r.id||s[1]!==o||s[2]!==t?(c=fe.agentEntryThreads(r.id,o,t),s[0]=r.id,s[1]=o,s[2]=t,s[3]=c):c=s[3];const u=e&&!!o;let l;s[4]!==i||s[5]!==t?(l=async()=>{try{return(await i.call("COLLECTION_THREADS_LIST",{limit:hr,offset:0,orderBy:[{field:["updated_at"],direction:"desc"}],where:{hidden:!1,created_by:"me",virtual_mcp_id:t}})).items}catch{return[]}},s[4]=i,s[5]=t,s[6]=l):l=s[6];let d;s[7]!==c||s[8]!==u||s[9]!==l?(d={queryKey:c,enabled:u,staleTime:0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,queryFn:l},s[7]=c,s[8]=u,s[9]=l,s[10]=d):d=s[10];const m=me(d);if(!e||!o){let h;return s[11]===Symbol.for("react.memo_cache_sentinel")?(h={status:"idle"},s[11]=h):h=s[11],h}if(!m.data||m.isFetching){let h;return s[12]===Symbol.for("react.memo_cache_sentinel")?(h={status:"loading"},s[12]=h):h=s[12],h}let f;return s[13]!==m.data?(f={status:"ready",threads:m.data},s[13]=m.data,s[14]=f):f=s[14],f}function xr(t){const e=A.c(13),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=ke(r);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const o=Le(a);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={select:gr},e[2]=c):c=e[2];const u=as(c),{org:l}=ne();let d;e[3]!==l||e[4]!==i.agentId||e[5]!==i.legacyView||e[6]!==i.org||e[7]!==u||e[8]!==o?(d=i.org?rs({pathname:u,org:i.org,pathAgentId:i.agentId,pathLegacyView:i.legacyView,fallbackAgentId:je(l.id).id,search:o}):null,e[3]=l,e[4]=i.agentId,e[5]=i.legacyView,e[6]=i.org,e[7]=u,e[8]=o,e[9]=d):d=e[9];const m=d;let f;return e[10]!==s||e[11]!==m?(f=m?n.jsx(tt,{target:m}):s,e[10]=s,e[11]=m,e[12]=f):f=e[12],f}function gr(t){return t.matches.at(-1)?.pathname??t.location.pathname}function br(){const t=A.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=ke(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const i=Le(r),{org:a}=ne(),{org:o,taskId:c}=s;if(!o||c===void 0)return null;let u;return t[2]!==o||t[3]!==a.id||t[4]!==i||t[5]!==c?(u=is({org:o,taskId:c,fallbackAgentId:je(a.id).id,search:i}),t[2]=o,t[3]=a.id,t[4]=i,t[5]=c,t[6]=u):u=t[6],u}function vr(){const t=A.c(2),e=br();let s;return t[0]!==e?(s=e?n.jsx(tt,{target:e}):null,t[0]=e,t[1]=s):s=t[1],s}function yr(){const t=A.c(6),e=An(),s=Ae();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const{preview:i}=Le(r);if(!e||!i)return null;let a;t[1]!==s?(a=()=>s({to:".",search:jr}),t[1]=s,t[2]=a):a=t[2];let o;return t[3]!==i||t[4]!==a?(o=n.jsx(Ln,{previewPath:i,onClose:a,showSeeInLibrary:!0}),t[3]=i,t[4]=a,t[5]=o):o=t[5],o}function jr(t){const{preview:e,...s}=t;return s}function kr(t){const e=A.c(11),{children:s}=t,r=K();let i;e[0]!==r?(i=r("agentShellLayout.agentShellLayout.chatLoadingError"),e[0]=r,e[1]=i):i=e[1];let a;e[2]!==i?(a=n.jsx("div",{role:"alert",className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:i}),e[2]=i,e[3]=a):a=e[3];let o;e[4]!==s?(o=s??n.jsx(ma,{}),e[4]=s,e[5]=o):o=e[5];let c;e[6]!==o?(c=n.jsx(Me,{children:o}),e[6]=o,e[7]=c):c=e[7];let u;return e[8]!==a||e[9]!==c?(u=n.jsx(pt,{fallback:a,children:c}),e[8]=a,e[9]=c,e[10]=u):u=e[10],u}function Sr(t){const e=A.c(5),{threadId:s,children:r}=t;if(s===null){let a;return e[0]!==r?(a=n.jsx(W.ThreadlessProvider,{children:r}),e[0]=r,e[1]=a):a=e[1],a}let i;return e[2]!==r||e[3]!==s?(i=n.jsx(W.ActiveTaskProvider,{taskId:s,children:r}),e[2]=r,e[3]=s,e[4]=i):i=e[4],i}function Tr(t){const e=A.c(3),{onNewTaskRef:s,createNewTask:r}=t;let i;return e[0]!==r||e[1]!==s?(i=()=>(s.current=r,()=>{s.current=null}),e[0]=r,e[1]=s,e[2]=i):i=e[2],B.useLayoutEffect(i),null}function Nr({virtualMcpId:t,hasActiveRepository:e,sandboxMap:s,children:r}){const i=K(),{currentBranch:a,activeTask:o,setCurrentTaskBranch:c}=Ee(),{data:u}=pe.useSession(),l=u?.user?.id,d=!As(o?.harness_id),m=rn({agentSandboxMap:s,threadSandboxMap:o?.metadata?.sandboxMap,userId:l,ownerId:o?.created_by,branch:a}),f=e||Zs(o?.metadata),h=B.useRef(null),j=d&&ln({threadLoaded:!!o,isOwner:!!l&&o?.created_by===l,hasActiveRepository:f,branch:a??null,attempted:h.current===(o?.id??null)});B.useEffect(()=>{!j||!o||(h.current=o.id,c(Ct(u?.user?.name||u?.user?.email?.split("@")[0])))},[j,o,u,c]);const k=yt(t),v=Se(t),x=It(v,a),{releases:g,createRelease:b}=Xs(t),p=!!l&&o?.created_by===l&&!!a&&a!==x&&!g.some(L=>L.branch===a),S=B.useRef(null);B.useEffect(()=>{!p||!a||S.current!==a&&(S.current=a,b({branch:a,name:en(g,i("thread.branchPicker.defaultVersionName")),color:Js(g.length),createdBy:l,createdAt:new Date().toISOString()}).catch(()=>{}))},[p,a,g,b,l,i]);const N=k.resolved?k.runtime:null,T=on(t,a??void 0),w=(l&&a?En(m?.[l]?.[a]):{})["agent-sandbox"]??null,I=w?.previewUrl??null,P=d&&N!=="cms"&&(!!w||T);return d?N==="cms"?n.jsx(lt,{children:r},`${t}:${a??"no-branch"}:${o?.id??""}`):n.jsx(_s,{virtualMcpId:t,branch:a??null,previewUrl:I,enabled:P,children:n.jsx(cn,{executionEnabled:d,virtualMcpId:t,branch:a??null,userId:l??null,hasActiveRepository:f,vmEntry:w,threadId:o?.id??null,children:n.jsx(lt,{children:r},`${t}:${a??"no-branch"}:${o?.id??""}`)})},o?.id??"no-thread"):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex h-full rounded-[0.75rem] bg-background card-shadow",children:n.jsx(Mt,{image:n.jsx(qe,{size:48,className:"text-muted-foreground"}),title:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWeb"),description:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWebDescription")})})})}function _r(){const t=A.c(16),e=K(),{toggleSidebar:s}=Ts(),{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 o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ks,{size:16}),t[2]=o):o=t[2];let c;t[3]!==a||t[4]!==s?(c=n.jsx(we,{className:"md:hidden",onClick:s,"aria-label":a,children:o}),t[3]=a,t[4]=s,t[5]=c):c=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Ya,{}),t[6]=u):u=t[6];let l;t[7]!==c?(l=n.jsxs(De.Topbar.Left,{children:[c,u]}),t[7]=c,t[8]=l):l=t[8];let d;t[9]!==i||t[10]!==r?(d=n.jsx("div",{className:"min-w-0 md:hidden",children:n.jsx(cr,{virtualMcpId:r,taskId:i})}),t[9]=i,t[10]=r,t[11]=d):d=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(De.Topbar.Right,{className:"shrink-0",children:n.jsx(Za,{})}),t[12]=m):m=t[12];let f;return t[13]!==l||t[14]!==d?(f=n.jsxs(De.Topbar,{className:"border-b border-border/60 px-3",children:[l,d,m]}),t[13]=l,t[14]=d,t[15]=f):f=t[15],f}function wr(t){const e=A.c(25),{layout:s,onNewTaskRef:r,createNewTask:i}=t,{virtualMcpId:a,taskId:o}=Ee(),c=Se(a),u=_n()??"overview",l=Ss(),[d,m]=B.useState(null),f=d===u,h=l?f:s.threadOpen;let j;e[0]!==u||e[1]!==s||e[2]!==l||e[3]!==f?(j=l?()=>m(f?null:u):s.toggleThread,e[0]=u,e[1]=s,e[2]=l,e[3]=f,e[4]=j):j=e[4];const k=j;let v;e[5]!==i||e[6]!==r?(v=n.jsx(Tr,{onNewTaskRef:r,createNewTask:i}),e[5]=i,e[6]=r,e[7]=v):v=e[7];let x;e[8]!==o||e[9]!==a?(x=n.jsx(tr,{virtualMcpId:a,taskId:o}),e[8]=o,e[9]=a,e[10]=x):x=e[10];let g;e[11]!==c?(g=c&&n.jsx(Xa,{virtualMcp:c}),e[11]=c,e[12]=g):g=e[12];let b,y;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(it.Thread,{topbar:n.jsx(_r,{}),children:n.jsx(kr,{})}),y=n.jsx(gt,{}),e[13]=b,e[14]=y):(b=e[13],y=e[14]);let p;e[15]!==u||e[16]!==s||e[17]!==x||e[18]!==g||e[19]!==h||e[20]!==k?(p=n.jsxs(it,{...s,threadOpen:h,toggleThread:k,contentKey:u,contentNavigation:x,contentActions:g,children:[b,y]}),e[15]=u,e[16]=s,e[17]=x,e[18]=g,e[19]=h,e[20]=k,e[21]=p):p=e[21];let S;return e[22]!==v||e[23]!==p?(S=n.jsxs(n.Fragment,{children:[v,p]}),e[22]=v,e[23]=p,e[24]=S):S=e[24],S}function Cr(){const t=K(),e=Ae(),s=mn(),{create:r}=Je(),{org:i}=ne(),o=ke({strict:!1}).org??"",c=Le({strict:!1}),u=et(),l=Ft(),d=Et(),[m]=B.useState(()=>crypto.randomUUID()),{data:f}=pe.useSession(),[h]=B.useState(()=>Ct(f?.user?.name||f?.user?.email?.split("@")[0])),j=Ze(),k=B.useSyncExternalStore(j.threads.subscribe,j.threads.get),v=B.useSyncExternalStore(j.threadsStatus.subscribe,j.threadsStatus.get),x=Se(l),g=!!(x&&_t(x)),b=It(x,null),y=u===null&&!!d&&!!x,p=M=>an(M,l,f?.user?.id,Pt(x?.metadata),g,{baseBranch:b}),S=y&&v.kind!=="loading"?p(k):void 0,N=pr(l,y&&v.kind!=="loading"&&!S),T=mr(u,l,h);ha(T.status==="ready"?T.task:null);const _=x?.metadata?.ui?.layout??null,w=_?{defaultMainView:_.defaultMainView??null,chatDefaultOpen:_.chatDefaultOpen??null}:null,I=Qs(w),{threadId:P,providerKey:L}=sr({routeThreadId:u,fallbackKey:m}),$=async()=>{const M=crypto.randomUUID(),C=k.find(G=>G.id===P)?.branch??null;try{await r({id:M,virtual_mcp_id:l,...C?{branch:C}:{}})}catch{}s(M,()=>({}))},E=B.useRef(null);B.useEffect(()=>{const M=C=>{Vs(C)&&C.shiftKey&&C.code==="KeyS"&&!C.repeat&&(C.preventDefault(),E.current?.())};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[]);const F=T.status==="ready"?T.task:null,R=F?.virtual_mcp_id;if(F&&R&&!hn({routeAgentId:l,threadAgentId:R})){const M=ls({org:o,agentId:R,superAgentId:je(i.id).id});return n.jsx(tt,{target:{route:M,search:{thread:F.id,sidepanel:c.sidepanel,mainpanel:c.mainpanel,autosend:c.autosend}}})}if(y){if(v.kind==="loading"||N.status==="loading")return n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background card-shadow rounded-[0.75rem] text-sm text-muted-foreground",children:[n.jsx(ve,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})});const C=(S??(N.status==="ready"?p(N.threads):void 0))?.id??(g?m:null);if(C)return n.jsx(os,{to:".",replace:!0,search:G=>({...G,thread:C})})}return T.status==="creating"||T.status==="loading"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background card-shadow rounded-[0.75rem] text-sm text-muted-foreground",children:[n.jsx(ve,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})}):T.status==="error"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"alert",className:"flex flex-col h-full items-center justify-center gap-2 bg-background card-shadow rounded-[0.75rem] p-8 text-sm",children:[n.jsx("div",{className:"font-medium",children:t("agentShellLayout.agentShellLayout.taskUnavailable")}),n.jsx("div",{className:"text-muted-foreground",children:T.error.message})]})}):x?n.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:n.jsx(W.Provider,{virtualMcpId:l,task:T.status==="ready"?T.task:null,children:n.jsx(Is,{layout:I,children:n.jsx(Nr,{virtualMcpId:l,hasActiveRepository:g,sandboxMap:x.metadata?.sandboxMap,children:n.jsx(Sr,{threadId:P,children:n.jsx(Me,{children:n.jsx(wr,{layout:I,onNewTaskRef:E,createNewTask:$})})},L)})})},l)}):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:n.jsx(Mt,{image:n.jsx(qe,{size:48,className:"text-muted-foreground"}),title:t("agentShellLayout.agentShellLayout.agentNotFound"),description:t("agentShellLayout.agentShellLayout.agentNotFoundDescription",{virtualMcpId:l}),actions:n.jsx(cs,{variant:"outline",onClick:()=>e({to:"/$org",params:{org:o}}),children:t("agentShellLayout.agentShellLayout.goToOrgHome")})})})})}function Io(){const t=A.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=ke(e);if(s.taskId!==void 0){let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(vr,{}),t[1]=i):i=t[1],i}if(s._splat!==void 0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(gt,{}),t[2]=i):i=t[2],i}let r;return t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Me,{children:n.jsx(xr,{children:n.jsx(Mn,{children:n.jsxs($n,{children:[n.jsx(Cr,{}),n.jsx(yr,{})]})})})}),t[3]=r):r=t[3],r}export{Io as default};
@@ -0,0 +1 @@
1
+ import{c,l as d,j as i,n as f,P as l,aK as u,O as x}from"./index-C4rtGZhj.js";import{u as j}from"./use-mobile-DR0ou4Mg.js";import{R as h}from"./index-DtX8u4h5.js";import"./use-app-takeover-rF8JMh38.js";import"./sheet-BgQYccYB.js";import"./tooltip-knB_BmiO.js";import"./index-C9L_7jwF.js";import"./use-project-native-view-presence-CIKytFPd.js";import"./thread-route-CHlbKw5S.js";import"./use-panel-navigate-CTGXxycL.js";import"./use-project-scope-Z7wAK5MJ.js";import"./repository-binding-C-QRBZ2o.js";import"./use-mcp-client-iEvULqcR.js";import"./auth-CxFoeet-.js";import"./thread-intent-DWGyzG2H.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BGVIlM9_.js";import"./task-board-DVS-070d.js";import"./schema-BfTWP2eM.js";import"./slugify-CEUa2lfQ.js";import"./use-file-configs-4iMZ7Oja.js";import"./use-organization-settings-CHQPn47n.js";import"./site-slug-DebpOoQq.js";import"./agent-icon-D4A6sHBt.js";import"./AlertCircle-ezsenyDA.js";import"./Tool01-DmCjPcwM.js";import"./ArrowUp-1Pn6KcFo.js";import"./ArrowLeft-XWagtiKt.js";import"./LinkBroken01-DQvdTTgG.js";import"./ShoppingBag01-4HryX9q-.js";import"./ZoomOut-C8fNa3eF.js";import"./Building02-DVmqpekj.js";import"./CheckCircle-CN4P8qA2.js";import"./ChevronUp-DgF_0akr.js";import"./ChevronSelectorVertical-t7oZTVYb.js";import"./UserSquare-Bkrct5dy.js";import"./Copy01-DD7TBaxd.js";import"./CreditCard01-BqWXWcAN.js";import"./DotsVertical-D63daqR4.js";import"./Image01-BmLj4iEQ.js";import"./Globe04-CAZFyv9C.js";import"./SwitchHorizontal01-CL7aXkdk.js";import"./Key01-BCoXSbsF.js";import"./Link01-DKrKZRUt.js";import"./Monitor01-BL49Kh8w.js";import"./Sun-xJ1qtoxz.js";import"./Play-3PdWOSem.js";import"./Plus-BGSMJ3F-.js";import"./SearchMd-gvLMH1IR.js";import"./Trash01-B0MFAKuS.js";import"./Upload01-AYcSEbb9.js";import"./User01-CvrqyM7d.js";import"./Users01-DavPAvfh.js";import"./XClose-BIF2YR7O.js";import"./toolbar-icon-button-DJJccvHi.js";import"./shell-layout-28JRcfGc.js";import"./avatar-BmEw6w6S.js";import"./use-clock-tick-DissHE7g.js";import"./command-MB9q2Bfp.js";import"./index-BHsQFo2r.js";import"./integration-icon-B-VuBONI.js";import"./project-icon-BLicVbcB.js";import"./new-project-dialog-D0Tv538i.js";import"./label-BjPw9Rfi.js";import"./repository-import-picker-Ck-W8Fet.js";import"./use-navigate-to-agent-ChjWG67f.js";import"./repository-picker-D0Kp2t1m.js";import"./useInfiniteQuery-CH2YwNOR.js";import"./infiniteQueryObserver-DRgbaZZO.js";import"./collection-search-Bett-OVD.js";import"./use-debounced-value-BQw-U7yI.js";import"./required-auth-layout-BLCp7vSK.js";import"./autosend-BP7dIixd.js";import"./use-org-sso-dcnzEZJT.js";import"./resizable-DwozeJKF.js";import"./icon-button-D8YCRkH3.js";function Dt(){const t=c.c(9),n=j(),s=!n&&"p-1.5";let r;t[0]!==s?(r=d("flex-1 min-h-0",s),t[0]=s,t[1]=r):r=t[1];const a=n?"plain":"card";let m;t[2]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(h,{}),t[2]=m):m=t[2];let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsxs(f.Breadcrumbs.Provider,{children:[m,i.jsx(l.Content,{children:i.jsx(u,{children:i.jsx(x,{})})})]}),t[3]=p):p=t[3];let o;t[4]!==a?(o=i.jsx(l,{"data-testid":"settings-panel",variant:a,children:p}),t[4]=a,t[5]=o):o=t[5];let e;return t[6]!==r||t[7]!==o?(e=i.jsx("div",{className:r,children:o}),t[6]=r,t[7]=o,t[8]=e):e=t[8],e}export{Dt as default};
@@ -1 +1 @@
1
- import{o as P,r as i,b6 as ie,b7 as ce,e as le,b8 as j,c as de,a2 as fe,J as Se,j as me}from"./index-BlWeDA0T.js";import{u as pe}from"./use-mcp-client-B333X4fs.js";import{a as ye}from"./input-3uLsKqBB.js";import{c as Ee,u as he}from"./chat-context-CKK4nwlA.js";import{u as Re}from"./thread-intent-9GHukD-s.js";import{e as xe}from"./backoff-CrEUbyZT.js";import{u as we}from"./index-BVXKUS4M.js";import{d as Ae}from"./sandbox-start-errors-BK_aDCyt.js";function Te(e,t){const n=P(t);return Pe({filters:{...e,status:"pending"}},n).length}function X(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function Pe(e={},t){const n=P(t).getMutationCache(),r=i.useRef(e),s=i.useRef(null);return s.current===null&&(s.current=X(n,e)),i.useEffect(()=>{r.current=e}),i.useSyncExternalStore(i.useCallback(u=>n.subscribe(()=>{const a=ie(s.current,X(n,r.current));s.current!==a&&(s.current=a,ce.schedule(u))}),[n]),()=>s.current,()=>s.current)}async function be(e,t,n){const r=await e.callTool({name:t,arguments:n});if(r.isError){const s=r.content?.[0]?.text??`Tool ${t} failed without a message`;throw new Error(s)}return r}const q=["SANDBOX_START"],w=new Map,Ce=e=>`${e.virtualMcpId}::${e.branch??""}`,ke=e=>e.message.includes("retry shortly"),U=new Set,g={mark:(e,t)=>U.add(`${e}::${t}`),clear:(e,t)=>U.delete(`${e}::${t}`),isStopped:(e,t)=>U.has(`${e}::${t}`)};function _e(e,t){const n=P();return le({mutationKey:q,retry:(r,s)=>ke(s)&&r<6,retryDelay:r=>xe(5e3,500,r,2,0),mutationFn:async r=>{r.branch&&g.clear(r.virtualMcpId,r.branch);const s=Ce(r),u=w.get(s);if(u)return u;const a=(async()=>(await be(e,"SANDBOX_START",r)).structuredContent)();w.set(s,a);try{return await a}finally{w.get(s)===a&&w.delete(s)}},onSuccess:()=>{j(n),t?.onStarted?.()}})}function Me(e,t){const n=de.c(3);let r;return n[0]!==t||n[1]!==e?(r={mutationKey:q,predicate:u=>{if(!e)return!1;const a=u.state.variables;return!a||a.virtualMcpId!==e?!1:(a.branch??"")===(t??"")}},n[0]=t,n[1]=e,n[2]=r):r=n[2],Te(r)>0}function Ue(e){return e.appPaused||e.userStopped?{kind:"suspended"}:e.startError&&!e.previewUrl?{kind:"errored",error:e.startError}:e.previewUrl?{kind:"iframe",previewUrl:e.previewUrl}:{kind:"starting"}}function ge(e){return e.executionEnabled&&e.sessionRuntime==="sandbox"&&e.hasActiveRepository&&!!e.userId&&!!e.branch&&!e.vmEntry&&!e.userStopped&&!e.isPending&&!e.attempted}function We(e){return e.threadLoaded&&e.isOwner&&e.hasActiveRepository&&!e.branch&&!e.attempted}function De(e){return e.executionEnabled&&e.notFound&&!!e.deadVmId&&!e.isPending&&!e.userStopped&&e.deadVmId!==e.lastDeadVmId}function ze(e){const{agentSandboxMap:t,threadSandboxMap:n,userId:r,branch:s}=e,u=e.ownerId??r;if(!r||!u||!s)return t;const a=n?.[u]?.[s];return a?{...t??{},[r]:{...t?.[r]??{},[s]:a}}:t}function A(e,t,n){const r={virtualMcpId:e};return t&&(r.branch=t),n&&(r.threadId=n),r}const Y=2,Le=new Set(["scheduling-timeout","reconciler-error","claim-never-created","unknown"]);function J(e){return Le.has(e)}function Oe(e){return e.executionEnabled&&e.failedReason!==null&&J(e.failedReason)&&e.attempts<Y&&!e.isPending&&!e.userStopped&&!e.alreadyHandled}const $e={branch:null,count:0,handled:!1};function Be(e,t){return e.branch===t?e:{branch:t,count:0,handled:!1}}function Ve(e){return e.mutationError?e.mutationError:e.phase?.kind==="failed"&&!e.startPending&&e.claimRetryExhausted?{code:null,message:e.phase.message}:null}function Fe(e){switch(e.kind){case"suspended":return"suspended";case"iframe":return"running";case"starting":return"starting";case"errored":return"errored"}}function Q(e,t){return`${e??""}::${t??""}`}function ve(e){const t=e.vmEntry?.previewUrl??null;return t||(e.seeded?.key===e.key?e.seeded.url:null)}function T(e){const{data:t,virtualMcpId:n,branch:r}=e;t?.branch&&!r&&e.setCurrentTaskBranch(t.branch),t?.previewUrl&&e.setSeededPreviewUrl({key:Q(n,t.branch??r),url:t.previewUrl})}const Ne={branch:null,previewState:{kind:"starting"},status:"idle",vmEntry:null,previewUrl:null,userStopped:!1,start:()=>{},stop:async()=>{},restart:async()=>{},retry:()=>{},resume:()=>{}},M=i.createContext(Ne);function Ge(){return i.use(M)}function Ze({executionEnabled:e,virtualMcpId:t,branch:n,userId:r,hasActiveRepository:s,vmEntry:u,threadId:a,children:D}){const{org:L}=fe(),{setCurrentTaskBranch:l}=Ee(),W=Re(),p=we(),z=P(),O=ye(t),G=O.resolved?O.runtime:null,d=he()?.taskId??null,$=pe({connectionId:Se,orgId:L.id,orgSlug:L.slug}),c=_e($,{onStarted:()=>{a&&W?.refreshThreadMetadata(a)}}),{mutate:f,reset:Z}=c,[ee,S]=i.useState(null),b=i.useRef(new Set),C=i.useRef(null),[B,R]=i.useState($e),E=Be(B,n);E!==B&&R(E);const y=p.phase?.kind==="failed"?p.phase:null,V=ve({vmEntry:u,seeded:y?null:ee,key:Q(t,n)}),h=!!t&&!!n&&g.isStopped(t,n),te=p.status.state==="paused",ne=!y||!J(y.reason)||E.count>=Y,re=Ve({mutationError:c.isError&&c.error?Ae(c.error.message):null,phase:p.phase,startPending:c.isPending,claimRetryExhausted:ne}),F=Ue({previewUrl:V,appPaused:te,userStopped:h,startError:re}),se=Fe(F),k=n??"",oe=b.current.has(k),v=ge({executionEnabled:e,hasActiveRepository:s,userId:r,branch:n,vmEntry:u,userStopped:h,isPending:c.isPending,attempted:oe,sessionRuntime:G});i.useEffect(()=>{if(!v||!t)return;b.current.add(k);const m=A(t,n,d);f(m,{onSuccess:o=>{T({data:o,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:o=>{console.error("[sandbox-lifecycle] auto-start failed:",o)}})},[v,k,n,t,d,f,l,S]);const x=p.notFound?u?.sandboxHandle??null:null,N=De({executionEnabled:e,notFound:p.notFound,deadVmId:x,lastDeadVmId:C.current,isPending:c.isPending,userStopped:h});i.useEffect(()=>{if(!N||!x||!t)return;C.current=x;const m=A(t,n,d);f(m,{onSuccess:o=>{T({data:o,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:o=>{console.error("[sandbox-lifecycle] self-heal failed:",o)}})},[N,x,t,n,d,f,l,S]);const I=Oe({executionEnabled:e,failedReason:y?.reason??null,attempts:E.count,isPending:c.isPending,userStopped:h,alreadyHandled:E.handled});i.useEffect(()=>{if(!y){R(o=>o.handled?{...o,handled:!1}:o);return}if(!I||!t)return;R(o=>({...o,handled:!0,count:o.count+1}));const m=A(t,n,d);f(m,{onSuccess:o=>{T({data:o,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:o=>{console.error("[sandbox-lifecycle] claim auto-retry failed:",o)}})},[y,I,t,n,d,f,l,S]);const _=()=>{if(!e||!t)return;const m=A(t,n,d);f(m,{onSuccess:o=>{T({data:o,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:o=>{console.error("[sandbox-lifecycle] user start failed:",o)}})},K=async()=>{if(!(!e||!t||!n)&&u){g.mark(t,n);try{await $.callTool({name:"SANDBOX_DELETE",arguments:{virtualMcpId:t,branch:n}})}catch{}j(z)}},ae=async()=>{await K(),_()},H=()=>{b.current=new Set,C.current=null,R({branch:n,count:0,handled:!1}),Z(),_()},ue={branch:n,previewState:F,status:se,vmEntry:u,previewUrl:V,userStopped:h,start:_,stop:K,restart:ae,retry:H,resume:H};return me.jsx(M,{value:ue,children:D})}export{Ze as S,_e as a,Ge as b,ze as o,We as s,Me as u};
1
+ import{o as P,r as i,b6 as ie,b7 as ce,e as le,b8 as j,c as de,a2 as fe,J as Se,j as me}from"./index-C4rtGZhj.js";import{u as pe}from"./use-mcp-client-iEvULqcR.js";import{a as ye}from"./input-BXtqV7BY.js";import{c as Ee,u as he}from"./chat-context-CkzpVzP2.js";import{u as Re}from"./thread-intent-DWGyzG2H.js";import{e as xe}from"./backoff-CrEUbyZT.js";import{u as we}from"./index-i3pR_VKW.js";import{d as Ae}from"./sandbox-start-errors-BK_aDCyt.js";function Te(e,t){const n=P(t);return Pe({filters:{...e,status:"pending"}},n).length}function X(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function Pe(e={},t){const n=P(t).getMutationCache(),r=i.useRef(e),s=i.useRef(null);return s.current===null&&(s.current=X(n,e)),i.useEffect(()=>{r.current=e}),i.useSyncExternalStore(i.useCallback(u=>n.subscribe(()=>{const a=ie(s.current,X(n,r.current));s.current!==a&&(s.current=a,ce.schedule(u))}),[n]),()=>s.current,()=>s.current)}async function be(e,t,n){const r=await e.callTool({name:t,arguments:n});if(r.isError){const s=r.content?.[0]?.text??`Tool ${t} failed without a message`;throw new Error(s)}return r}const q=["SANDBOX_START"],w=new Map,Ce=e=>`${e.virtualMcpId}::${e.branch??""}`,ke=e=>e.message.includes("retry shortly"),U=new Set,g={mark:(e,t)=>U.add(`${e}::${t}`),clear:(e,t)=>U.delete(`${e}::${t}`),isStopped:(e,t)=>U.has(`${e}::${t}`)};function _e(e,t){const n=P();return le({mutationKey:q,retry:(r,s)=>ke(s)&&r<6,retryDelay:r=>xe(5e3,500,r,2,0),mutationFn:async r=>{r.branch&&g.clear(r.virtualMcpId,r.branch);const s=Ce(r),u=w.get(s);if(u)return u;const a=(async()=>(await be(e,"SANDBOX_START",r)).structuredContent)();w.set(s,a);try{return await a}finally{w.get(s)===a&&w.delete(s)}},onSuccess:()=>{j(n),t?.onStarted?.()}})}function Me(e,t){const n=de.c(3);let r;return n[0]!==t||n[1]!==e?(r={mutationKey:q,predicate:u=>{if(!e)return!1;const a=u.state.variables;return!a||a.virtualMcpId!==e?!1:(a.branch??"")===(t??"")}},n[0]=t,n[1]=e,n[2]=r):r=n[2],Te(r)>0}function Ue(e){return e.appPaused||e.userStopped?{kind:"suspended"}:e.startError&&!e.previewUrl?{kind:"errored",error:e.startError}:e.previewUrl?{kind:"iframe",previewUrl:e.previewUrl}:{kind:"starting"}}function ge(e){return e.executionEnabled&&e.sessionRuntime==="sandbox"&&e.hasActiveRepository&&!!e.userId&&!!e.branch&&!e.vmEntry&&!e.userStopped&&!e.isPending&&!e.attempted}function We(e){return e.threadLoaded&&e.isOwner&&e.hasActiveRepository&&!e.branch&&!e.attempted}function De(e){return e.executionEnabled&&e.notFound&&!!e.deadVmId&&!e.isPending&&!e.userStopped&&e.deadVmId!==e.lastDeadVmId}function ze(e){const{agentSandboxMap:t,threadSandboxMap:n,userId:r,branch:s}=e,u=e.ownerId??r;if(!r||!u||!s)return t;const a=n?.[u]?.[s];return a?{...t??{},[r]:{...t?.[r]??{},[s]:a}}:t}function A(e,t,n){const r={virtualMcpId:e};return t&&(r.branch=t),n&&(r.threadId=n),r}const Y=2,Le=new Set(["scheduling-timeout","reconciler-error","claim-never-created","unknown"]);function J(e){return Le.has(e)}function Oe(e){return e.executionEnabled&&e.failedReason!==null&&J(e.failedReason)&&e.attempts<Y&&!e.isPending&&!e.userStopped&&!e.alreadyHandled}const $e={branch:null,count:0,handled:!1};function Be(e,t){return e.branch===t?e:{branch:t,count:0,handled:!1}}function Ve(e){return e.mutationError?e.mutationError:e.phase?.kind==="failed"&&!e.startPending&&e.claimRetryExhausted?{code:null,message:e.phase.message}:null}function Fe(e){switch(e.kind){case"suspended":return"suspended";case"iframe":return"running";case"starting":return"starting";case"errored":return"errored"}}function Q(e,t){return`${e??""}::${t??""}`}function ve(e){const t=e.vmEntry?.previewUrl??null;return t||(e.seeded?.key===e.key?e.seeded.url:null)}function T(e){const{data:t,virtualMcpId:n,branch:r}=e;t?.branch&&!r&&e.setCurrentTaskBranch(t.branch),t?.previewUrl&&e.setSeededPreviewUrl({key:Q(n,t.branch??r),url:t.previewUrl})}const Ne={branch:null,previewState:{kind:"starting"},status:"idle",vmEntry:null,previewUrl:null,userStopped:!1,start:()=>{},stop:async()=>{},restart:async()=>{},retry:()=>{},resume:()=>{}},M=i.createContext(Ne);function Ge(){return i.use(M)}function Ze({executionEnabled:e,virtualMcpId:t,branch:n,userId:r,hasActiveRepository:s,vmEntry:u,threadId:a,children:D}){const{org:L}=fe(),{setCurrentTaskBranch:l}=Ee(),W=Re(),p=we(),z=P(),O=ye(t),G=O.resolved?O.runtime:null,d=he()?.taskId??null,$=pe({connectionId:Se,orgId:L.id,orgSlug:L.slug}),c=_e($,{onStarted:()=>{a&&W?.refreshThreadMetadata(a)}}),{mutate:f,reset:Z}=c,[ee,S]=i.useState(null),b=i.useRef(new Set),C=i.useRef(null),[B,R]=i.useState($e),E=Be(B,n);E!==B&&R(E);const y=p.phase?.kind==="failed"?p.phase:null,V=ve({vmEntry:u,seeded:y?null:ee,key:Q(t,n)}),h=!!t&&!!n&&g.isStopped(t,n),te=p.status.state==="paused",ne=!y||!J(y.reason)||E.count>=Y,re=Ve({mutationError:c.isError&&c.error?Ae(c.error.message):null,phase:p.phase,startPending:c.isPending,claimRetryExhausted:ne}),F=Ue({previewUrl:V,appPaused:te,userStopped:h,startError:re}),se=Fe(F),k=n??"",oe=b.current.has(k),v=ge({executionEnabled:e,hasActiveRepository:s,userId:r,branch:n,vmEntry:u,userStopped:h,isPending:c.isPending,attempted:oe,sessionRuntime:G});i.useEffect(()=>{if(!v||!t)return;b.current.add(k);const m=A(t,n,d);f(m,{onSuccess:o=>{T({data:o,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:o=>{console.error("[sandbox-lifecycle] auto-start failed:",o)}})},[v,k,n,t,d,f,l,S]);const x=p.notFound?u?.sandboxHandle??null:null,N=De({executionEnabled:e,notFound:p.notFound,deadVmId:x,lastDeadVmId:C.current,isPending:c.isPending,userStopped:h});i.useEffect(()=>{if(!N||!x||!t)return;C.current=x;const m=A(t,n,d);f(m,{onSuccess:o=>{T({data:o,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:o=>{console.error("[sandbox-lifecycle] self-heal failed:",o)}})},[N,x,t,n,d,f,l,S]);const I=Oe({executionEnabled:e,failedReason:y?.reason??null,attempts:E.count,isPending:c.isPending,userStopped:h,alreadyHandled:E.handled});i.useEffect(()=>{if(!y){R(o=>o.handled?{...o,handled:!1}:o);return}if(!I||!t)return;R(o=>({...o,handled:!0,count:o.count+1}));const m=A(t,n,d);f(m,{onSuccess:o=>{T({data:o,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:o=>{console.error("[sandbox-lifecycle] claim auto-retry failed:",o)}})},[y,I,t,n,d,f,l,S]);const _=()=>{if(!e||!t)return;const m=A(t,n,d);f(m,{onSuccess:o=>{T({data:o,virtualMcpId:t,branch:n,setCurrentTaskBranch:l,setSeededPreviewUrl:S})},onError:o=>{console.error("[sandbox-lifecycle] user start failed:",o)}})},K=async()=>{if(!(!e||!t||!n)&&u){g.mark(t,n);try{await $.callTool({name:"SANDBOX_DELETE",arguments:{virtualMcpId:t,branch:n}})}catch{}j(z)}},ae=async()=>{await K(),_()},H=()=>{b.current=new Set,C.current=null,R({branch:n,count:0,handled:!1}),Z(),_()},ue={branch:n,previewState:F,status:se,vmEntry:u,previewUrl:V,userStopped:h,start:_,stop:K,restart:ae,retry:H,resume:H};return me.jsx(M,{value:ue,children:D})}export{Ze as S,_e as a,Ge as b,ze as o,We as s,Me as u};
@@ -1 +1 @@
1
- import{aF as s,bU as e,aG as o,bV as d,bW as l}from"./index-BlWeDA0T.js";const a=500;s({title:o().max(a),url:o().max(a),icon:o().max(a)});const t=s({keyId:o().max(a),modelId:o().max(a),title:o().max(a).optional()}).nullable();d(["fast","smart","thinking","image","web_search","deep_research"]);d(["fast","smart","thinking"]);const b=s({tiers:s({fast:t,smart:t,thinking:t,image:t,web_search:t,deep_research:t})});s({tiers:s({fast:t.optional(),smart:t.optional(),thinking:t.optional()})});const f=50,c=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/;s({host:o().min(1).max(a).regex(c).describe("Git host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:o().min(1).max(a).describe("Vault secret id holding the PAT used to authenticate this host.")});s({ids:l(o().max(a)).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});const u=s({voice_mode:e().optional(),home_task_intake_enabled:e().optional().describe("Show Task mode on the Home composer and allow reports to start tasks."),demo_mode:e().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),reports_only:e().optional().describe("Curated Deco Score look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),reviewer_enabled:e().optional().describe("Run the Reviewer on a task's pull request when the card reaches In Review — it reviews the code with the repo's stack-appropriate skills, fixes what it finds on the PR's own branch, then exercises the change on the deploy preview and approves or hands the card to a human."),qa_agent_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:e().optional().describe("When a card reaches Ready for Deployment, merge its pull request automatically instead of waiting for someone to press Ship."),auto_resolve_conflicts:e().optional().describe("When a pull request in Ready for Deployment can't be merged because it conflicts with its base branch, hand it back to the Super Agent to resolve the conflict (check out the branch, merge the base, push). Unset, it follows `auto_merge`; set it explicitly to run one without the other."),cheap_reviewer_model:e().optional().describe("Run the Reviewer on a cheaper model than the Super Agent that wrote the code. On by default — turning it off trades cost for some review depth."),coding_agent_org_mcps:e().optional().describe("Give a coding-agent run (the claude-code harness in a sandbox) every MCP connection in the org as its own MCP server, on top of the narrow Studio surface it always gets. Off by default: each connection is one more server the agent connects to at session start, and all of their tools land in its context."),coding_agents_claude_code:e().optional().describe("Run chats on a Code Agent (an agent imported from a GitHub repo) with the claude-code harness inside its sandbox, instead of hosted Decopilot. Off by default: it changes the runtime of every such chat, and claude-code flushes whole turns rather than streaming tokens."),chat_harness_codex:e().optional().describe("Use Codex for new sandbox chats. Off by default; requires hosted sandboxes and a ChatGPT subscription or Responses API provider. Existing chats keep their pinned runtime."),chat_harness_sandbox_only:e().optional().describe("Run every chat with the claude-code harness in its own sandbox instead of hosted Decopilot. On by default (see DEFAULT_ON_FLAGS); a deployment without hosted sandboxes keeps Decopilot regardless."),sandbox_repo_snapshots:e().optional().describe("Keep a Freestyle snapshot of each project repo at its default branch's head, with its dependencies installed and its dev server running, so a new sandbox for that repo starts already serving. Off by default: each push to a default branch costs a snapshot build the next time a sandbox starts."),auto_assign_report_tasks_to_super_agent:e().optional().describe("When a Deco Score import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),hosting_enabled:e().optional().describe("Per-site Hosting tab (deployments, domains, deploy outcomes). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),deco_analytics_enabled:e().optional().describe("Per-site Deco Analytics tab (traffic, realtime, usage & limits). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),e2e_enabled:e().optional().describe("Per-site E2E tab (end-to-end test runs). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),experiments_enabled:e().optional().describe("Per-site Experiments tab (A/B tests + variant results). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org."),experiments_v2_enabled:e().optional().describe("Rebuilt Experiments tab: describe the test in prose and an agent drafts it, plus inline editing and the implement/preview tools that write the split into the site. Off by default — an org without it keeps the table-and-dialog tab, which only records experiment metadata. Requires `experiments_enabled`, which still decides whether the tab exists at all."),monitor_enabled:e().optional().describe("Per-site Monitor tab (CDN Performance + Audience from the stats-lake warehouse). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. Its own deployment-wide switch `MONITOR_GA` opens it to every org at once (independent of the control-plane trio)."),site_create_enabled:e().optional().describe('The "Create a new site" option under New project: generates a GitHub repository from a site template in an account the org connected, and opens it as a project. Off by default, for every org — deco.cx staff included.'),new_blocks_editor:e().optional().describe("Use the redesigned blocks editor for every member of the organization. Off by default — the classic editor stays until an admin opts the org in."),blog_ai_enabled:e().optional().describe("The blog's brand context tab and its agentic generation — campaigns, post drafting and link suggestions. Off by default; with it off the blog is written by hand and every BLOG_* tool refuses, over MCP and in the app alike, so an agent cannot spend the organization's credits on a feature it turned off."),hide_default_blog_blocks:e().optional().describe("Hide the `deco-cms/blog` built-in post blocks everywhere a post is written — the inserter, the format briefs, and generated drafts — so only the site's own `site/sections/Blog/Post/*` blocks are eligible. Off by default. Blocks already present in a post keep rendering; this only governs what can be added.")}),h=new Set(["reviewer_enabled","cheap_reviewer_model","chat_harness_sandbox_only"]);function g(i,n){const r=i?.[n];return h.has(n)?r!==!1:r===!0}function m(i){const n=i?.auto_resolve_conflicts;return typeof n=="boolean"?n:i?.auto_merge===!0}export{h as D,f as G,u as O,b as S,m as a,c as b,g as o};
1
+ import{aF as s,bU as e,aG as o,bV as d,bW as l}from"./index-C4rtGZhj.js";const a=500;s({title:o().max(a),url:o().max(a),icon:o().max(a)});const t=s({keyId:o().max(a),modelId:o().max(a),title:o().max(a).optional()}).nullable();d(["fast","smart","thinking","image","web_search","deep_research"]);d(["fast","smart","thinking"]);const b=s({tiers:s({fast:t,smart:t,thinking:t,image:t,web_search:t,deep_research:t})});s({tiers:s({fast:t.optional(),smart:t.optional(),thinking:t.optional()})});const f=50,c=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/;s({host:o().min(1).max(a).regex(c).describe("Git host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:o().min(1).max(a).describe("Vault secret id holding the PAT used to authenticate this host.")});s({ids:l(o().max(a)).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});const u=s({voice_mode:e().optional(),home_task_intake_enabled:e().optional().describe("Show Task mode on the Home composer and allow reports to start tasks."),demo_mode:e().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),reports_only:e().optional().describe("Curated Deco Score look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),reviewer_enabled:e().optional().describe("Run the Reviewer on a task's pull request when the card reaches In Review — it reviews the code with the repo's stack-appropriate skills, fixes what it finds on the PR's own branch, then exercises the change on the deploy preview and approves or hands the card to a human."),qa_agent_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:e().optional().describe("When a card reaches Ready for Deployment, merge its pull request automatically instead of waiting for someone to press Ship."),auto_resolve_conflicts:e().optional().describe("When a pull request in Ready for Deployment can't be merged because it conflicts with its base branch, hand it back to the Super Agent to resolve the conflict (check out the branch, merge the base, push). Unset, it follows `auto_merge`; set it explicitly to run one without the other."),cheap_reviewer_model:e().optional().describe("Run the Reviewer on a cheaper model than the Super Agent that wrote the code. On by default — turning it off trades cost for some review depth."),coding_agent_org_mcps:e().optional().describe("Give a coding-agent run (the claude-code harness in a sandbox) every MCP connection in the org as its own MCP server, on top of the narrow Studio surface it always gets. Off by default: each connection is one more server the agent connects to at session start, and all of their tools land in its context."),coding_agents_claude_code:e().optional().describe("Run chats on a Code Agent (an agent imported from a GitHub repo) with the claude-code harness inside its sandbox, instead of hosted Decopilot. Off by default: it changes the runtime of every such chat, and claude-code flushes whole turns rather than streaming tokens."),chat_harness_codex:e().optional().describe("Use Codex for new sandbox chats. Off by default; requires hosted sandboxes and a ChatGPT subscription or Responses API provider. Existing chats keep their pinned runtime."),chat_harness_sandbox_only:e().optional().describe("Run every chat with the claude-code harness in its own sandbox instead of hosted Decopilot. On by default (see DEFAULT_ON_FLAGS); a deployment without hosted sandboxes keeps Decopilot regardless."),sandbox_repo_snapshots:e().optional().describe("Keep a Freestyle snapshot of each project repo at its default branch's head, with its dependencies installed and its dev server running, so a new sandbox for that repo starts already serving. Off by default: each push to a default branch costs a snapshot build the next time a sandbox starts."),auto_assign_report_tasks_to_super_agent:e().optional().describe("When a Deco Score import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),hosting_enabled:e().optional().describe("Per-site Hosting tab (deployments, domains, deploy outcomes). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),deco_analytics_enabled:e().optional().describe("Per-site Deco Analytics tab (traffic, realtime, usage & limits). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),e2e_enabled:e().optional().describe("Per-site E2E tab (end-to-end test runs). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),experiments_enabled:e().optional().describe("Per-site Experiments tab (A/B tests + variant results). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org."),experiments_v2_enabled:e().optional().describe("Rebuilt Experiments tab: describe the test in prose and an agent drafts it, plus inline editing and the implement/preview tools that write the split into the site. Off by default — an org without it keeps the table-and-dialog tab, which only records experiment metadata. Requires `experiments_enabled`, which still decides whether the tab exists at all."),monitor_enabled:e().optional().describe("Per-site Monitor tab (CDN Performance + Audience from the stats-lake warehouse). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. Its own deployment-wide switch `MONITOR_GA` opens it to every org at once (independent of the control-plane trio)."),site_create_enabled:e().optional().describe('The "Create a new site" option under New project: generates a GitHub repository from a site template in an account the org connected, and opens it as a project. Off by default, for every org — deco.cx staff included.'),new_blocks_editor:e().optional().describe("Use the redesigned blocks editor for every member of the organization. Off by default — the classic editor stays until an admin opts the org in."),blog_ai_enabled:e().optional().describe("The blog's brand context tab and its agentic generation — campaigns, post drafting and link suggestions. Off by default; with it off the blog is written by hand and every BLOG_* tool refuses, over MCP and in the app alike, so an agent cannot spend the organization's credits on a feature it turned off."),hide_default_blog_blocks:e().optional().describe("Hide the `deco-cms/blog` built-in post blocks everywhere a post is written — the inserter, the format briefs, and generated drafts — so only the site's own `site/sections/Blog/Post/*` blocks are eligible. Off by default. Blocks already present in a post keep rendering; this only governs what can be added.")}),h=new Set(["reviewer_enabled","cheap_reviewer_model","chat_harness_sandbox_only"]);function g(i,n){const r=i?.[n];return h.has(n)?r!==!1:r===!0}function m(i){const n=i?.auto_resolve_conflicts;return typeof n=="boolean"?n:i?.auto_merge===!0}export{h as D,f as G,u as O,b as S,m as a,c as b,g as o};
@@ -1 +1 @@
1
- import{aF as r,cY as p,cW as _,aG as n,bW as o,bV as m}from"./index-BlWeDA0T.js";const f=r({key:n().min(1,"Key is required"),value:n()}),g=r({title:n().min(1,"Name is required"),description:n().nullable().optional(),icon:n().nullable().optional(),ui_type:m(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:n().optional(),connection_token:n().nullable().optional(),npx_package:n().optional(),stdio_command:n().optional(),stdio_args:n().optional(),stdio_cwd:n().optional(),env_vars:o(f).optional(),configuration_scopes:o(n()).nullable().optional(),configuration_state:p(n(),_()).nullable().optional()}).refine(e=>e.ui_type==="NPX"?!!e.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(e=>e.ui_type==="STDIO"?!!e.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(e=>e.ui_type==="HTTP"||e.ui_type==="SSE"||e.ui_type==="Websocket"?!!e.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]}).refine(e=>(e.ui_type==="HTTP"||e.ui_type==="SSE"||e.ui_type==="Websocket")&&e.connection_url?.trim()?n().url().safeParse(e.connection_url.trim()).success:!0,{message:"Enter a valid URL",path:["connection_url"]});function S(e,u,s){const a=i=>{if(i==="*")return!0;const c=i.split("::")[0]??"";let t=s;for(const l of c.split(".")){if(t===null||typeof t!="object")return!1;t=t[l]}return t!=null};return[...new Set([...e,...u.filter(a)])]}export{S as a,g as c};
1
+ import{aF as r,cY as p,cW as _,aG as n,bW as o,bV as m}from"./index-C4rtGZhj.js";const f=r({key:n().min(1,"Key is required"),value:n()}),g=r({title:n().min(1,"Name is required"),description:n().nullable().optional(),icon:n().nullable().optional(),ui_type:m(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:n().optional(),connection_token:n().nullable().optional(),npx_package:n().optional(),stdio_command:n().optional(),stdio_args:n().optional(),stdio_cwd:n().optional(),env_vars:o(f).optional(),configuration_scopes:o(n()).nullable().optional(),configuration_state:p(n(),_()).nullable().optional()}).refine(e=>e.ui_type==="NPX"?!!e.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(e=>e.ui_type==="STDIO"?!!e.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(e=>e.ui_type==="HTTP"||e.ui_type==="SSE"||e.ui_type==="Websocket"?!!e.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]}).refine(e=>(e.ui_type==="HTTP"||e.ui_type==="SSE"||e.ui_type==="Websocket")&&e.connection_url?.trim()?n().url().safeParse(e.connection_url.trim()).success:!0,{message:"Enter a valid URL",path:["connection_url"]});function S(e,u,s){const a=i=>{if(i==="*")return!0;const c=i.split("::")[0]??"";let t=s;for(const l of c.split(".")){if(t===null||typeof t!="object")return!1;t=t[l]}return t!=null};return[...new Set([...e,...u.filter(a)])]}export{S as a,g as c};