openpond 0.2.67 → 0.2.68

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 (564) hide show
  1. package/dist/app-server.d.ts +668 -1
  2. package/dist/app-server.js +1 -1
  3. package/dist/chunks/{account-context-TIJOM22A.js → account-context-MWB6HN6I.js} +1 -1
  4. package/dist/chunks/{acp-NASAJV5E.js → acp-2OIXATRY.js} +1 -1
  5. package/dist/chunks/{acp-agent-C3CRF6DT.js → acp-agent-PAGX2B47.js} +1 -1
  6. package/dist/chunks/actions-command-2VE6YI4W.js +2 -0
  7. package/dist/chunks/{app-layer-XIEZ6ALX.js → app-layer-YNEUEOEP.js} +1 -1
  8. package/dist/chunks/{app-server-connected-apps-IB6M35NS.js → app-server-connected-apps-TZOAUOYR.js} +1 -1
  9. package/dist/chunks/app-server-evaluations-RRLYWLPK.js +2 -0
  10. package/dist/chunks/app-server-harness-services-XXM336NU.js +2 -0
  11. package/dist/chunks/app-server-runtime-GBX65JJ7.js +2 -0
  12. package/dist/chunks/apps-RSFEJOQN.js +2 -0
  13. package/dist/chunks/chunk-2PXKSAG6.js +2 -0
  14. package/dist/chunks/{chunk-XEU4J4GJ.js → chunk-2TGHZXJE.js} +2 -2
  15. package/dist/chunks/{chunk-AXO6OHJB.js → chunk-3A2Y7UK3.js} +1 -1
  16. package/dist/chunks/chunk-3Z4VM2LF.js +4 -0
  17. package/dist/chunks/{chunk-V3T2OJBZ.js → chunk-4BUM6JEC.js} +2 -2
  18. package/dist/chunks/chunk-4G3GTEVS.js +23 -0
  19. package/dist/chunks/{chunk-43QYVOYA.js → chunk-4KNPCJR4.js} +1 -1
  20. package/dist/chunks/chunk-4KTGYHCE.js +2 -0
  21. package/dist/chunks/chunk-4PUOWSDE.js +13 -0
  22. package/dist/chunks/chunk-55YD4UTW.js +2 -0
  23. package/dist/chunks/chunk-5G7BQAUA.js +2 -0
  24. package/dist/chunks/chunk-65FJWWXG.js +2 -0
  25. package/dist/chunks/{chunk-4EZI4KCT.js → chunk-65WRWLUD.js} +1 -1
  26. package/dist/chunks/chunk-6D3FI2XT.js +2 -0
  27. package/dist/chunks/chunk-73TW6BKK.js +6 -0
  28. package/dist/chunks/{chunk-5TPYBXWM.js → chunk-7NCM6GBN.js} +1 -1
  29. package/dist/chunks/chunk-7OFD6TFD.js +2 -0
  30. package/dist/chunks/chunk-7OKZCJHS.js +3 -0
  31. package/dist/chunks/{chunk-ADOCQA4D.js → chunk-7PKDJHT6.js} +1 -1
  32. package/dist/chunks/chunk-7RJOCGQ6.js +2 -0
  33. package/dist/chunks/{chunk-YR5URT73.js → chunk-7RSQOC5M.js} +3 -3
  34. package/dist/chunks/{chunk-FVK4W27G.js → chunk-AFH462DO.js} +1 -1
  35. package/dist/chunks/{chunk-GUG2SWRZ.js → chunk-AFKFN25T.js} +1 -1
  36. package/dist/chunks/chunk-AFYYIJ6K.js +2 -0
  37. package/dist/chunks/{chunk-U3MVH2YT.js → chunk-APKXXAUF.js} +1 -1
  38. package/dist/chunks/chunk-AQUZCWM3.js +2 -0
  39. package/dist/chunks/chunk-AUO5DCEU.js +2 -0
  40. package/dist/chunks/chunk-AYOMVI7J.js +2 -0
  41. package/dist/chunks/{chunk-RWRKUO5D.js → chunk-B66QCXH2.js} +1 -1
  42. package/dist/chunks/{chunk-SODAOLAP.js → chunk-BHKXPWFB.js} +1 -1
  43. package/dist/chunks/chunk-BU6MW65V.js +10 -0
  44. package/dist/chunks/{chunk-P6NQYXN6.js → chunk-CCZ276IA.js} +1 -1
  45. package/dist/chunks/{chunk-YONDU5TN.js → chunk-CIZI6Z7D.js} +1 -1
  46. package/dist/chunks/{chunk-ATFV2NA4.js → chunk-CO23RRN7.js} +1 -1
  47. package/dist/chunks/{chunk-QAFXQHHG.js → chunk-D6L6UNUQ.js} +2 -2
  48. package/dist/chunks/chunk-DDOIPTOM.js +2 -0
  49. package/dist/chunks/{chunk-CSU7RDA5.js → chunk-DKOVZ6R2.js} +3 -3
  50. package/dist/chunks/chunk-DRLP7GIU.js +2 -0
  51. package/dist/chunks/{chunk-DAEUVT2I.js → chunk-DRTHKWHK.js} +1 -1
  52. package/dist/chunks/{chunk-XDFXKRTI.js → chunk-DWF3FCY4.js} +1 -1
  53. package/dist/chunks/{chunk-W3ZILZUL.js → chunk-DWM5G7BU.js} +1 -1
  54. package/dist/chunks/chunk-DXJC3QW7.js +2 -0
  55. package/dist/chunks/{chunk-IDILAYCW.js → chunk-E2JB5OCO.js} +1 -1
  56. package/dist/chunks/{chunk-GI7LTJV3.js → chunk-EDYCSW22.js} +1 -1
  57. package/dist/chunks/{chunk-4JYTFEND.js → chunk-EFP75UEX.js} +1 -1
  58. package/dist/chunks/{chunk-CX7HKSQ4.js → chunk-EGP6DF34.js} +2 -2
  59. package/dist/chunks/{chunk-D5OFN47Z.js → chunk-ESYPMD7Q.js} +1 -1
  60. package/dist/chunks/{chunk-PWKJ5KLZ.js → chunk-EXYSD45J.js} +1 -1
  61. package/dist/chunks/{chunk-R6VI7MX5.js → chunk-EYTTZ5H4.js} +1 -1
  62. package/dist/chunks/chunk-FKUWCJ73.js +161 -0
  63. package/dist/chunks/{chunk-WD6ANOLL.js → chunk-FNGZ4UDZ.js} +1 -1
  64. package/dist/chunks/{chunk-JFZ6USNQ.js → chunk-G7X73SBG.js} +1 -1
  65. package/dist/chunks/{chunk-36FNNR5N.js → chunk-GEYZVOGD.js} +1 -1
  66. package/dist/chunks/{chunk-ULJZ7NUF.js → chunk-GY7YSD6J.js} +1 -1
  67. package/dist/chunks/{chunk-CWAQOFLP.js → chunk-GYYJ47GX.js} +1 -1
  68. package/dist/chunks/chunk-HG2YFMVU.js +4 -0
  69. package/dist/chunks/{chunk-YQBL5P6R.js → chunk-HKVFU3B3.js} +1 -1
  70. package/dist/chunks/{chunk-VEXJV5H5.js → chunk-IIT66347.js} +4 -4
  71. package/dist/chunks/{chunk-B2K5WQZE.js → chunk-IO5DZUKL.js} +1 -1
  72. package/dist/chunks/chunk-J256AEEE.js +2 -0
  73. package/dist/chunks/{chunk-CRDKBFRN.js → chunk-JEMECEQH.js} +1 -1
  74. package/dist/chunks/{chunk-7P5SH3CI.js → chunk-JPUSTFZC.js} +1 -1
  75. package/dist/chunks/{chunk-YMCF5GR2.js → chunk-JQOVC35K.js} +1 -1
  76. package/dist/chunks/{chunk-6LFTQBXP.js → chunk-JT5YQ52I.js} +1 -1
  77. package/dist/chunks/chunk-JVMSN7LH.js +2 -0
  78. package/dist/chunks/{chunk-HORMGT2Q.js → chunk-JXYJQT5Q.js} +1 -1
  79. package/dist/chunks/{chunk-WDKZMXIU.js → chunk-K7KBFM2T.js} +1 -1
  80. package/dist/chunks/{chunk-UBTP3QWI.js → chunk-KCLMA2IH.js} +1 -1
  81. package/dist/chunks/chunk-KDER7R45.js +2 -0
  82. package/dist/chunks/{chunk-IXZ5ZGIL.js → chunk-KOC3YJEU.js} +2 -2
  83. package/dist/chunks/{chunk-R6MMWEH4.js → chunk-KP2MYTP5.js} +1 -1
  84. package/dist/chunks/{chunk-TV2LE2BD.js → chunk-KU4TPDPH.js} +2 -2
  85. package/dist/chunks/{chunk-WJSJXK2N.js → chunk-KUE46HTH.js} +1 -1
  86. package/dist/chunks/chunk-LVXL7T5O.js +2 -0
  87. package/dist/chunks/{chunk-TSQ2I6XV.js → chunk-M4A7G4S5.js} +2 -2
  88. package/dist/chunks/{chunk-MX7KV5DA.js → chunk-M4ZHFDRJ.js} +1 -1
  89. package/dist/chunks/{chunk-26ID6A5C.js → chunk-MEJLWNRS.js} +1 -1
  90. package/dist/chunks/{chunk-XT5WUQGT.js → chunk-MIFVX5PK.js} +1 -1
  91. package/dist/chunks/{chunk-4VZJQRQI.js → chunk-MOXIGLN2.js} +1 -1
  92. package/dist/chunks/{chunk-UKSSFB4Q.js → chunk-N5EAVX4G.js} +1 -1
  93. package/dist/chunks/{chunk-4B7EGNYX.js → chunk-NMMHXYDJ.js} +1 -1
  94. package/dist/chunks/{chunk-EBOTNBUS.js → chunk-NRYC4NH6.js} +1 -1
  95. package/dist/chunks/chunk-NSSZ2ZIU.js +2 -0
  96. package/dist/chunks/{chunk-4TTXNVCE.js → chunk-OFJPOTES.js} +1 -1
  97. package/dist/chunks/chunk-OIH2LPIT.js +2 -0
  98. package/dist/chunks/chunk-OUJ63LMU.js +2 -0
  99. package/dist/chunks/{chunk-SD2XDZQW.js → chunk-P4QM63L3.js} +1 -1
  100. package/dist/chunks/chunk-PACLKDTN.js +2 -0
  101. package/dist/chunks/{chunk-VPAEFG7X.js → chunk-PAYFJHPO.js} +1 -1
  102. package/dist/chunks/{chunk-OPTJYDZN.js → chunk-PHZZBXDO.js} +1 -1
  103. package/dist/chunks/{chunk-HPTEJBP4.js → chunk-PKJHN666.js} +1 -1
  104. package/dist/chunks/{chunk-HNDAGZCF.js → chunk-PLROXHG2.js} +1 -1
  105. package/dist/chunks/{chunk-UNE52L3Y.js → chunk-PNPV2LDE.js} +1 -1
  106. package/dist/chunks/{chunk-2RSGVLZT.js → chunk-PSY6IRJE.js} +8 -8
  107. package/dist/chunks/{chunk-SVNEPXU3.js → chunk-Q73RKX7I.js} +1 -1
  108. package/dist/chunks/{chunk-IF5A3XWP.js → chunk-Q7FBVLLB.js} +1 -1
  109. package/dist/chunks/{chunk-V5AOM5MZ.js → chunk-Q7P34B2O.js} +1 -1
  110. package/dist/chunks/{chunk-375PADDM.js → chunk-QLGP2OAQ.js} +1 -1
  111. package/dist/chunks/{chunk-QQLS5FB7.js → chunk-QUNQM2E3.js} +1 -1
  112. package/dist/chunks/chunk-R2FYCJL6.js +2 -0
  113. package/dist/chunks/{chunk-6HQUIKC5.js → chunk-R4EEGWXB.js} +1 -1
  114. package/dist/chunks/chunk-RBTDSI4L.js +11 -0
  115. package/dist/chunks/chunk-RCQYEHHD.js +2 -0
  116. package/dist/chunks/{chunk-TGULVWPV.js → chunk-RFQD6B44.js} +1 -1
  117. package/dist/chunks/{chunk-3WJQ4IGK.js → chunk-RPM4FDRX.js} +1 -1
  118. package/dist/chunks/{chunk-MCBRB5D6.js → chunk-RY46UPBO.js} +4 -4
  119. package/dist/chunks/{chunk-K3LS5SK7.js → chunk-SDHG6CKU.js} +1 -1
  120. package/dist/chunks/{chunk-XKZ4PFMQ.js → chunk-SO4GMSNP.js} +1 -1
  121. package/dist/chunks/{chunk-O6ZYDHEJ.js → chunk-SSHE6B7Z.js} +1 -1
  122. package/dist/chunks/{chunk-SH7POUVX.js → chunk-SV7ZBEK2.js} +6 -6
  123. package/dist/chunks/{chunk-BJXPQIVD.js → chunk-U7D6Q744.js} +1 -1
  124. package/dist/chunks/chunk-U7X5ZLAL.js +2 -0
  125. package/dist/chunks/{chunk-N54CPLVD.js → chunk-UANH7U3Y.js} +1 -1
  126. package/dist/chunks/{chunk-BUZ7CBJC.js → chunk-UGFSAG4U.js} +1 -1
  127. package/dist/chunks/chunk-ULTV6INR.js +2 -0
  128. package/dist/chunks/{chunk-V3ILZQER.js → chunk-UMAVVMXL.js} +7 -7
  129. package/dist/chunks/chunk-V24VHT76.js +2 -0
  130. package/dist/chunks/chunk-VEBW7NKD.js +2 -0
  131. package/dist/chunks/chunk-VJR2GNRY.js +2 -0
  132. package/dist/chunks/{chunk-JD76ANPN.js → chunk-VJYOKU3C.js} +1 -1
  133. package/dist/chunks/{chunk-H2XG5N7D.js → chunk-VWWKWYSQ.js} +1 -1
  134. package/dist/chunks/chunk-WCNPGKST.js +2 -0
  135. package/dist/chunks/chunk-WD4KAKEX.js +2 -0
  136. package/dist/chunks/chunk-WGQ3FMRF.js +2 -0
  137. package/dist/chunks/{chunk-6C3CXME7.js → chunk-WNXUSELC.js} +1 -1
  138. package/dist/chunks/{chunk-RS526BG7.js → chunk-WZ35ICTE.js} +3 -3
  139. package/dist/chunks/chunk-XHACK2KR.js +2 -0
  140. package/dist/chunks/chunk-XOPHFUUY.js +2 -0
  141. package/dist/chunks/{chunk-YKTJPCYZ.js → chunk-XQAUHXL4.js} +4 -4
  142. package/dist/chunks/{chunk-ZVMQLIRA.js → chunk-XT4CSKHM.js} +1 -1
  143. package/dist/chunks/{chunk-KQD36SBJ.js → chunk-XY7HFXLH.js} +1 -1
  144. package/dist/chunks/{chunk-UXO33ST5.js → chunk-XYZV3FKD.js} +1 -1
  145. package/dist/chunks/{chunk-GC6RJBRZ.js → chunk-Y2WNZWT2.js} +1 -1
  146. package/dist/chunks/chunk-Y4I6CFZJ.js +2 -0
  147. package/dist/chunks/chunk-YDZBX4XQ.js +2 -0
  148. package/dist/chunks/chunk-YI6ME6PU.js +22 -0
  149. package/dist/chunks/{chunk-H42UW6IF.js → chunk-YXMYK5P7.js} +1 -1
  150. package/dist/chunks/{chunk-QFL2VQKX.js → chunk-Z33RVGP6.js} +1 -1
  151. package/dist/chunks/{chunk-OY4B7Y3T.js → chunk-ZDEIVUUI.js} +1 -1
  152. package/dist/chunks/{chunk-XGJG2ZKE.js → chunk-ZIQJDTQB.js} +1 -1
  153. package/dist/chunks/{chunk-IR2Y2VQY.js → chunk-ZYLLPRPU.js} +1 -1
  154. package/dist/chunks/cli-R7TAP6Z2.js +2 -0
  155. package/dist/chunks/{command-NWOZXU57.js → command-LNOVZQSK.js} +3 -3
  156. package/dist/chunks/{configuration-command-ZEIBQKB3.js → configuration-command-CNITTZRP.js} +1 -1
  157. package/dist/chunks/connected-app-executor-FGWCLOJO.js +2 -0
  158. package/dist/chunks/connected-evidence-5VZBYNWN.js +2 -0
  159. package/dist/chunks/{connected-starting-assets-66Y46ZPM.js → connected-starting-assets-KWOFEIE4.js} +1 -1
  160. package/dist/chunks/{connection-GDWPMHPC.js → connection-VMBXW5PD.js} +1 -1
  161. package/dist/chunks/{continual-TNPTWTKK.js → continual-FVOLGGOE.js} +1 -1
  162. package/dist/chunks/core-commands-BPYXVT7O.js +2 -0
  163. package/dist/chunks/dataset-preparation-authoring-UUYFWWCT.js +4 -0
  164. package/dist/chunks/datasets-E5TXSVIY.js +2 -0
  165. package/dist/chunks/desktop-test-FX7DTY4N.js +3 -0
  166. package/dist/chunks/dist-2MKJC6HN.js +2 -0
  167. package/dist/chunks/{dist-GR56E3QK.js → dist-DKE7RJZN.js} +1 -1
  168. package/dist/chunks/evaluation-coordination-KUTZEEPB.js +2 -0
  169. package/dist/chunks/experiment-improvements-PQNR5YHN.js +2 -0
  170. package/dist/chunks/experiments-Z4BJWT3Y.js +2 -0
  171. package/dist/chunks/experiments-signal-3GCLKUWZ.js +2 -0
  172. package/dist/chunks/{extension-UH34ZF7N.js → extension-3EKIT6BB.js} +1 -1
  173. package/dist/chunks/{help-O53DTZGN.js → help-K6YLZ3KL.js} +1 -1
  174. package/dist/chunks/host-profile-evaluation-tools-UF4ATIUF.js +2 -0
  175. package/dist/chunks/host-profile-external-dataset-KSEPXY2S.js +2 -0
  176. package/dist/chunks/hosted-app-server-composition-LA3BZ4SE.js +2 -0
  177. package/dist/chunks/hosted-experiment-improvement-VG2WE7XZ.js +3 -0
  178. package/dist/chunks/hosted-harness-runtime-MMTLCL23.js +2 -0
  179. package/dist/chunks/hosted-profile-candidate-PTGQLPZO.js +3 -0
  180. package/dist/chunks/hosted-profile-compiler-FS5R6CHJ.js +2 -0
  181. package/dist/chunks/hosted-profile-evaluation-control-UUEZEMXU.js +2 -0
  182. package/dist/chunks/hosted-profile-evaluation-inspection-4F7OEF4T.js +3 -0
  183. package/dist/chunks/hosted-profile-evaluation-preparation-LIJJZDHQ.js +3 -0
  184. package/dist/chunks/hosted-tasksets-NXVF4AQA.js +2 -0
  185. package/dist/chunks/human-review-2ZOB7CJZ.js +2 -0
  186. package/dist/chunks/{import-OBAKUJPM.js → import-YHYKZ6JN.js} +2 -2
  187. package/dist/chunks/{learning-CRR6NRPN.js → learning-LAXMGWSQ.js} +1 -1
  188. package/dist/chunks/learning-Y3UKNUGE.js +2 -0
  189. package/dist/chunks/local-harness-improvement-runtime-3YJQRYXC.js +2 -0
  190. package/dist/chunks/local-harness-taskset-review-XQHQ6JCR.js +2 -0
  191. package/dist/chunks/{model-projects-HP4DELCP.js → model-projects-6YWVD2TS.js} +1 -1
  192. package/dist/chunks/opchat-XXI2ZM53.js +3 -0
  193. package/dist/chunks/opchat-bounded-chat-3MZGCRLY.js +2 -0
  194. package/dist/chunks/organizations-W7HI2JA4.js +2 -0
  195. package/dist/chunks/{profile-3WZJ65CT.js → profile-P2SJPBOJ.js} +1 -1
  196. package/dist/chunks/project-action-payload-LTIQBX77.js +2 -0
  197. package/dist/chunks/project-agent-XRIXMXQK.js +2 -0
  198. package/dist/chunks/published-experiment-source-SDXUVPE7.js +2 -0
  199. package/dist/chunks/refiner-profile-service-56VYLZQJ.js +2 -0
  200. package/dist/chunks/{runtime-XP4DEGR3.js → runtime-Q7JUJO4D.js} +2 -2
  201. package/dist/chunks/sandbox-command-HVA5FJU4.js +2 -0
  202. package/dist/chunks/{sandbox-template-YFMHEMUQ.js → sandbox-template-U536EEWY.js} +1 -1
  203. package/dist/chunks/saved-work-KSIQPXC2.js +2 -0
  204. package/dist/chunks/{send-turn-D3GTSSHI.js → send-turn-YLY3YNEQ.js} +1 -1
  205. package/dist/chunks/setup-RMZ2BHLM.js +2 -0
  206. package/dist/chunks/{src-GQPWOPYA.js → src-C3ZUESMK.js} +1 -1
  207. package/dist/chunks/src-SGQYVBNQ.js +424 -0
  208. package/dist/chunks/standalone-experiment-turn-owner-TW5MTWIO.js +2 -0
  209. package/dist/chunks/store-chat-resources-IRHBW2EC.js +2 -0
  210. package/dist/chunks/{store-continual-support-reviews-VVRQO2JK.js → store-continual-support-reviews-3KK42L4I.js} +1 -1
  211. package/dist/chunks/store-conversation-serving-IVURK52V.js +2 -0
  212. package/dist/chunks/{store-create-improve-2XI36AET.js → store-create-improve-UTCLBXF2.js} +1 -1
  213. package/dist/chunks/{store-datasets-UFY422NG.js → store-datasets-4AQOVAQY.js} +1 -1
  214. package/dist/chunks/store-evaluation-results-PK2P3IMH.js +7 -0
  215. package/dist/chunks/{store-harness-workspaces-SGUEYDO2.js → store-harness-workspaces-YEXB4IRV.js} +1 -1
  216. package/dist/chunks/store-human-review-O4BVHP25.js +7 -0
  217. package/dist/chunks/store-learned-preference-migration-validation-44SVX6YB.js +2 -0
  218. package/dist/chunks/{store-learning-BFOT4QVT.js → store-learning-SIUQIY5C.js} +1 -1
  219. package/dist/chunks/{store-learning-credentials-DYTMWQTC.js → store-learning-credentials-BUHR7SN6.js} +1 -1
  220. package/dist/chunks/store-local-experiments-BHVTKPPE.js +97 -0
  221. package/dist/chunks/store-model-batch-review-RVAYUVK2.js +2 -0
  222. package/dist/chunks/{store-model-configuration-NJFWSYSA.js → store-model-configuration-6L3OYXF4.js} +1 -1
  223. package/dist/chunks/store-model-project-preparation-AAEKCF6V.js +2 -0
  224. package/dist/chunks/store-modification-recordings-LCPK6K2T.js +9 -0
  225. package/dist/chunks/{store-preference-comparison-MZAYONCK.js → store-preference-comparison-5YVIQNVB.js} +1 -1
  226. package/dist/chunks/{store-sidebar-file-bookmarks-J3JEVAYR.js → store-sidebar-file-bookmarks-WLMYDA4E.js} +1 -1
  227. package/dist/chunks/{store-sidebar-preferences-2JHTFXJK.js → store-sidebar-preferences-AFMYIDWT.js} +1 -1
  228. package/dist/chunks/{store-subagents-PUBQVWSU.js → store-subagents-KFPVSTRO.js} +1 -1
  229. package/dist/chunks/{store-task-inbox-3BREANOX.js → store-task-inbox-L6IQTY26.js} +1 -1
  230. package/dist/chunks/{store-task-inventory-5HRZCDUT.js → store-task-inventory-QWS2C656.js} +1 -1
  231. package/dist/chunks/store-taskset-drafts-FRFL6ITK.js +9 -0
  232. package/dist/chunks/{store-training-S3FXWLT6.js → store-training-FYXZU2FE.js} +1 -1
  233. package/dist/chunks/{store-training-jobs-2LCXPA7G.js → store-training-jobs-3N3VKPIY.js} +1 -1
  234. package/dist/chunks/{store-training-models-7AMKS7ZW.js → store-training-models-VOFVGPZR.js} +1 -1
  235. package/dist/chunks/{taskset-PLKWRT4X.js → taskset-UDDLFYKV.js} +1 -1
  236. package/dist/chunks/taskset-catalog-RZYEBCRQ.js +2 -0
  237. package/dist/chunks/taskset-packages-T6B6HYKZ.js +2 -0
  238. package/dist/chunks/taskset-packages-WMG5DUBN.js +2 -0
  239. package/dist/chunks/{teams-bot-VQXUA7U4.js → teams-bot-MPWL2PP4.js} +1 -1
  240. package/dist/chunks/tool-learning-ZQ6NSJ5K.js +2 -0
  241. package/dist/chunks/training-5NT2YB2L.js +2 -0
  242. package/dist/chunks/training-5UMT45UL.js +2 -0
  243. package/dist/chunks/training-UY6KRG4M.js +2 -0
  244. package/dist/chunks/{training-error-LQKCOQDJ.js → training-error-WF463UNZ.js} +1 -1
  245. package/dist/chunks/{training-hardware-ESXRWUIK.js → training-hardware-UWQCRDMV.js} +1 -1
  246. package/dist/chunks/training-hosted-CKSDRVL6.js +2 -0
  247. package/dist/chunks/training-hosted-alphaedit-HSMRDJTD.js +2 -0
  248. package/dist/chunks/training-hosted-decision-7JALOU6O.js +2 -0
  249. package/dist/chunks/training-hosted-engram-SXO75MFG.js +2 -0
  250. package/dist/chunks/{training-hosted-learning-WQ2IP5FP.js → training-hosted-learning-E2N32YU5.js} +1 -1
  251. package/dist/chunks/training-hosted-modification-comparison-TXFDJFTG.js +2 -0
  252. package/dist/chunks/training-hosted-neuron-training-J42WK4EH.js +2 -0
  253. package/dist/chunks/training-hosted-serving-report-BAEABGJH.js +2 -0
  254. package/dist/chunks/training-hosted-steering-T556BUBG.js +2 -0
  255. package/dist/chunks/training-model-start-P3PXDWNT.js +2 -0
  256. package/dist/chunks/web-search-ZEKJHZW4.js +2 -0
  257. package/dist/chunks/{workspaces-MCS2AQX6.js → workspaces-EK62ANTB.js} +1 -1
  258. package/dist/cli.js +1 -1
  259. package/dist/index.js +1 -1
  260. package/dist/sandbox/types/billing.d.ts +87 -6
  261. package/dist/sandbox/types/io.d.ts +3 -0
  262. package/dist/sandbox-template/manifest.js +1 -1
  263. package/dist/skills/manifest.json +3 -3
  264. package/dist/skills/openpond-cli/references/experiments-and-training.md +461 -1
  265. package/dist/web/assets/App-CCuh99JW.js +54 -0
  266. package/dist/web/assets/{AppDialog-BvskhHE9.js → AppDialog-CxjDHVk9.js} +1 -1
  267. package/dist/web/assets/AppTerminalPanel-CKJIVpKa.js +2 -0
  268. package/dist/web/assets/{AppToastContext-D2788RqX.js → AppToastContext-EpiT1dHs.js} +1 -1
  269. package/dist/web/assets/AppsView-BsMyPX_3.js +1 -0
  270. package/dist/web/assets/{AttachmentTypeIcon-DVluUHuc.js → AttachmentTypeIcon-BXvZy5gB.js} +1 -1
  271. package/dist/web/assets/BrowserSidebar-BIIV4aq4.js +1 -0
  272. package/dist/web/assets/{CartesianChart-DdBZ69lI.js → CartesianChart-brqLBqnF.js} +1 -1
  273. package/dist/web/assets/ChatTimelineEntry-CwZbn16X.js +8 -0
  274. package/dist/web/assets/{CollaborationTabs-ba6WupeJ.js → CollaborationTabs-BU4uc4tZ.js} +1 -1
  275. package/dist/web/assets/{CommandMenu-D7wTaEgl.js → CommandMenu-DkWpXR55.js} +1 -1
  276. package/dist/web/assets/CommunityView-CsSxJZGn.js +1 -0
  277. package/dist/web/assets/{ComposerAttachments-aO90qXYz.js → ComposerAttachments-BdJGCYzI.js} +1 -1
  278. package/dist/web/assets/{ComposerCreateImproveStrip-BPUJBSyS.js → ComposerCreateImproveStrip-CWy0j1vv.js} +1 -1
  279. package/dist/web/assets/{ConversationImportsSettings-Bo836wKJ.js → ConversationImportsSettings-DCmiakbZ.js} +1 -1
  280. package/dist/web/assets/DatasetReviewImport-DEnF_pGu.js +1 -0
  281. package/dist/web/assets/ExperimentTrainingDataWorkspace-WhwQ0QBi.js +2 -0
  282. package/dist/web/assets/{FilePagePreview-C6wIp6uX.js → FilePagePreview-BRhhz99q.js} +2 -2
  283. package/dist/web/assets/{GetStartedView-CxMv8q-h.js → GetStartedView-CLVD-qEi.js} +1 -1
  284. package/dist/web/assets/{GettingStartedDialog-CEb0cS-o.js → GettingStartedDialog-CMxaAMg-.js} +1 -1
  285. package/dist/web/assets/HostedModelLearningReview-Cn-j-rDo.js +1 -0
  286. package/dist/web/assets/HostedModelLearningSettings-VNBvf38S.js +1 -0
  287. package/dist/web/assets/{HtmlVisual-CCuUkYT8.js → HtmlVisual-D5y2WG9L.js} +10 -10
  288. package/dist/web/assets/LabModelVersionDetailPage-BxRmYD6h.js +1 -0
  289. package/dist/web/assets/{TrainingRunLineage-PXzWR65d.css → LabModelWorkspace-DOrgCk9Z.css} +1 -1
  290. package/dist/web/assets/LabModelWorkspace-u2Ulm_z4.js +1 -0
  291. package/dist/web/assets/{LabSkillSidebar-CFROlATQ.js → LabSkillSidebar-C7IceJTJ.js} +1 -1
  292. package/dist/web/assets/LabsRoute-C9Y0GU34.css +1 -0
  293. package/dist/web/assets/LabsRoute-CbztQaEf.js +74 -0
  294. package/dist/web/assets/LearningBatchesPage-B1NZTBSv.css +1 -0
  295. package/dist/web/assets/LearningBatchesPage-CJqgZNvM.js +26 -0
  296. package/dist/web/assets/MainChatThread-DNMfrrRq.js +2 -0
  297. package/dist/web/assets/{MainPane-BOWkynGB.css → MainPane-BZlNLfTM.css} +1 -1
  298. package/dist/web/assets/MainPane-CQQxSDPS.js +13 -0
  299. package/dist/web/assets/ModelProjectPageHeader-Dge19aE1.js +1 -0
  300. package/dist/web/assets/NativeSetupTerminal-D4JnbpyD.js +2 -0
  301. package/dist/web/assets/{NativeSkillSidebar-MAJWS4mL.js → NativeSkillSidebar-Jzx1BeKV.js} +1 -1
  302. package/dist/web/assets/{NewProjectDialog-MQiUBVx3.js → NewProjectDialog-DcnGzEd9.js} +1 -1
  303. package/dist/web/assets/{OutputsPage-DpF-aRTu.js → OutputsPage-Cmk15Vt_.js} +1 -1
  304. package/dist/web/assets/{PageChrome-8gH2hyDb.js → PageChrome-Cz_fCqtn.js} +1 -1
  305. package/dist/web/assets/{ProjectsPage-BQ98oGyu.js → ProjectsPage-BZ3Eo3Mz.js} +1 -1
  306. package/dist/web/assets/RightChatPanelStack-C6H2vU9N.js +1 -0
  307. package/dist/web/assets/RightSidebarHomePanel-BfMMVkM1.js +1 -0
  308. package/dist/web/assets/{ScheduledWorkPage-CGCqZz_H.js → ScheduledWorkPage-CAkSwM0T.js} +1 -1
  309. package/dist/web/assets/{SettingsView-CqpMFLxy.js → SettingsView-DvQXGw3_.js} +3 -3
  310. package/dist/web/assets/{TasksetDraftEditorPrimitives-DJvIvzBb.js → TasksetDraftEditorPrimitives-JuU1k8vr.js} +1 -1
  311. package/dist/web/assets/TeamChatView-DmHjr8W9.js +1 -0
  312. package/dist/web/assets/{TerminalOverlay-D--M876l.js → TerminalOverlay-DlaM9d8F.js} +1 -1
  313. package/dist/web/assets/{TrainingCreationPanel-DDUoHQHU.js → TrainingCreationPanel-ClpylNsr.js} +1 -1
  314. package/dist/web/assets/{TrainingDraftPanel-CwLXn3Z7.js → TrainingDraftPanel-6tH2xSDj.js} +1 -1
  315. package/dist/web/assets/{UsageSettingsSection-CGwPregx.js → UsageSettingsSection-CzDqxOYM.js} +2 -2
  316. package/dist/web/assets/WorkSidebarPanel-CY-AHZ4-.js +1 -0
  317. package/dist/web/assets/WorkspaceDiffPanel-B4e0lyF7.js +11 -0
  318. package/dist/web/assets/WorkspaceEnvironmentMenu-D01ZkZZF.js +35 -0
  319. package/dist/web/assets/{WorkspaceFileLocation-D-ctFM4d.js → WorkspaceFileLocation-C5s_njZb.js} +1 -1
  320. package/dist/web/assets/{WorkspaceGitDialogs-CQ28j3R7.js → WorkspaceGitDialogs-DjPZ6KIh.js} +1 -1
  321. package/dist/web/assets/{WorkspaceMonacoEditor-BrZs6-EW.js → WorkspaceMonacoEditor-CC4sfOiU.js} +3 -3
  322. package/dist/web/assets/{WorkspacePdfPreview-CU6PSjjN.js → WorkspacePdfPreview-vszQqFa4.js} +2 -2
  323. package/dist/web/assets/{WorkspacePresentationPreview-IjXVXpIy.js → WorkspacePresentationPreview-DQTvhaRD.js} +1 -1
  324. package/dist/web/assets/api-client-DJRVOFzS.js +1 -0
  325. package/dist/web/assets/{app-models-CKXrDTEU.js → app-models-BUdzQbXo.js} +1 -1
  326. package/dist/web/assets/bot-Doyx3T4j.js +1 -0
  327. package/dist/web/assets/{browser-sidebar-links-D9v2cyJa.js → browser-sidebar-links-PVPCrsDJ.js} +1 -1
  328. package/dist/web/assets/chat-resources-Beh5lB36.js +1 -0
  329. package/dist/web/assets/chevron-down-DX1hzujj.js +1 -0
  330. package/dist/web/assets/chevron-right-DHN0y3KC.js +1 -0
  331. package/dist/web/assets/chevron-up-_QrW88NF.js +1 -0
  332. package/dist/web/assets/{chunk-TLSP5JKG-BrrVo5rJ.js → chunk-3BYFS4RO-ztZjcMmt.js} +1 -1
  333. package/dist/web/assets/chunk-AG6UJ3DI-D9KZjTYP.js +1 -0
  334. package/dist/web/assets/chunk-C3TS766N-ppRhs95p.js +1 -0
  335. package/dist/web/assets/chunk-GCUWJUUM-Dy6oUNJ6.js +9 -0
  336. package/dist/web/assets/chunk-GS5HEE4M-C0RLeIsy.js +1 -0
  337. package/dist/web/assets/{chunk-H3JZ3P5T-CzpTARDY.js → chunk-H3JZ3P5T-DolwEJXo.js} +2 -2
  338. package/dist/web/assets/chunk-Q4RGCEOI-Cr-dg4Nk.js +1 -0
  339. package/dist/web/assets/client-DwZ92xtu.js +1 -0
  340. package/dist/web/assets/{client-choice-storage-DUWsS4X0.js → client-choice-storage-DitqKiIT.js} +1 -1
  341. package/dist/web/assets/cloud-upload-HdzNTgr2.js +1 -0
  342. package/dist/web/assets/common-BWVSBnpX.js +1 -0
  343. package/dist/web/assets/copy-DTQhoBNg.js +1 -0
  344. package/dist/web/assets/create-pipeline-DsZzNkt9.js +1 -0
  345. package/dist/web/assets/{cssMode-SclUkqPt.js → cssMode-BRTtfXxU.js} +1 -1
  346. package/dist/web/assets/dataset-workspaces-BTPi71mz.js +1 -0
  347. package/dist/web/assets/external-link-H1629UU6.js +1 -0
  348. package/dist/web/assets/folder-open-CAGdWOrr.js +1 -0
  349. package/dist/web/assets/folder-plus-C14cs2mE.js +1 -0
  350. package/dist/web/assets/git-commit-horizontal-DFUfuVvF.js +1 -0
  351. package/dist/web/assets/{htmlMode-X3mQtOeh.js → htmlMode-BVaCcL76.js} +1 -1
  352. package/dist/web/assets/icons-Bk2b68aC.js +1 -0
  353. package/dist/web/assets/image-0DPVY6Ev.js +1 -0
  354. package/dist/web/assets/{index-LXNhSUEL.js → index-B6XX_0h3.js} +2 -2
  355. package/dist/web/assets/info-C8b_tafZ.js +1 -0
  356. package/dist/web/assets/{intake-contracts-wCkD2ErR.js → intake-contracts-B8JZKYwb.js} +1 -1
  357. package/dist/web/assets/{jsonMode-BoKiIdHd.js → jsonMode-BCKKQmmV.js} +1 -1
  358. package/dist/web/assets/loader-circle-y-SSPwpk.js +1 -0
  359. package/dist/web/assets/{lspLanguageFeatures-CO2mzpy1.js → lspLanguageFeatures-DozmNUOx.js} +1 -1
  360. package/dist/web/assets/maximize-2-CByk9-zN.js +1 -0
  361. package/dist/web/assets/message-square-C889vRqm.js +1 -0
  362. package/dist/web/assets/{monaco.contribution-wacA5FjV.js → monaco.contribution-B9q6qbbo.js} +2 -2
  363. package/dist/web/assets/{monaco.contribution-CVe3mWSY.js → monaco.contribution-BITdsRbn.js} +2 -2
  364. package/dist/web/assets/{monaco.contribution-hrusiaZi.js → monaco.contribution-BqA-XZ44.js} +2 -2
  365. package/dist/web/assets/{monaco.contribution-C7CAQIKF.js → monaco.contribution-DxAV1oS5.js} +2 -2
  366. package/dist/web/assets/monitor-BtxlcLuI.js +1 -0
  367. package/dist/web/assets/paperclip-BeIdaspf.js +1 -0
  368. package/dist/web/assets/{pdf-Ct3M2mVw.js → pdf-perlzwEB.js} +1 -1
  369. package/dist/web/assets/play-CHXXdkuO.js +1 -0
  370. package/dist/web/assets/plus-DFFWjhPw.js +1 -0
  371. package/dist/web/assets/{ponder-desktop-D-zB6X4L.js → ponder-desktop-Ca-9KggQ.js} +1 -1
  372. package/dist/web/assets/presentation-0bzvu6_u.js +1 -0
  373. package/dist/web/assets/{profile-ref-CCxrOCio.js → profile-ref-D8lxL7dW.js} +1 -1
  374. package/dist/web/assets/{python-C0-pUUAU.js → python-B9hOnkOI.js} +1 -1
  375. package/dist/web/assets/refresh-cw-D61-Ozk3.js +1 -0
  376. package/dist/web/assets/{requests-DjSt-duM.js → requests-DmeUYik4.js} +1 -1
  377. package/dist/web/assets/reward-checks-DJJZYgf8.js +7 -0
  378. package/dist/web/assets/save-iEMNZoPe.js +1 -0
  379. package/dist/web/assets/schemas-Brv9Vmnk.js +64 -0
  380. package/dist/web/assets/settings-BC-bzgk6.js +21 -0
  381. package/dist/web/assets/settings-lists-C84qxFmP.js +5 -0
  382. package/dist/web/assets/square-BE_4JMR3.js +1 -0
  383. package/dist/web/assets/square-terminal-Djpzo2Qs.js +1 -0
  384. package/dist/web/assets/{submit-issue-command-Gk3RKrY-.js → submit-issue-command-HfKzyxg5.js} +1 -1
  385. package/dist/web/assets/{toggleHighContrast-BnYUBgZB.js → toggleHighContrast-ClsXu39R.js} +1 -1
  386. package/dist/web/assets/training-DWfghwfZ.js +1 -0
  387. package/dist/web/assets/{training-model-data-CxR3xpmK.js → training-model-data-CIysl8wH.js} +4 -4
  388. package/dist/web/assets/{tsMode-BVNyOY8h.js → tsMode-nbmaMc-D.js} +1 -1
  389. package/dist/web/assets/upload-C6ug8RD-.js +1 -0
  390. package/dist/web/assets/{useAccountSettings-4_XfwJQi.js → useAccountSettings-Dr9h4Qz_.js} +1 -1
  391. package/dist/web/assets/{useAgentInventory-CVuamyT3.js → useAgentInventory-ByCk2JAv.js} +1 -1
  392. package/dist/web/assets/useChatContextSelection-C0eMm2g6.js +1 -0
  393. package/dist/web/assets/{useLocalAgentSchedules-CmwN4ohy.js → useLocalAgentSchedules-Do0y_leJ.js} +1 -1
  394. package/dist/web/assets/useQuery-D2MQ7e5U.js +1 -0
  395. package/dist/web/assets/wifi-off-Dr-CapyW.js +1 -0
  396. package/dist/web/assets/work-outputs-D_8TovAK.js +1 -0
  397. package/dist/web/assets/{workers-CjtQ2aBD.js → workers-DKvM2NdM.js} +1 -1
  398. package/dist/web/assets/x-Jx2jlP9u.js +1 -0
  399. package/dist/web/assets/{yaml-N1KUjBZ8.js → yaml-C02vq4ar.js} +1 -1
  400. package/dist/web/index.html +1 -1
  401. package/docs/command-reference.md +93 -3
  402. package/package.json +1 -1
  403. package/dist/chunks/actions-command-BYPLSGZL.js +0 -2
  404. package/dist/chunks/app-server-evaluations-5YZUFXQ2.js +0 -2
  405. package/dist/chunks/app-server-harness-services-N5F5QVZI.js +0 -2
  406. package/dist/chunks/app-server-runtime-HJ2N57DL.js +0 -2
  407. package/dist/chunks/apps-WJTW64NW.js +0 -2
  408. package/dist/chunks/chunk-263WS3TB.js +0 -2
  409. package/dist/chunks/chunk-2UZHLO2V.js +0 -23
  410. package/dist/chunks/chunk-2W22IXHB.js +0 -2
  411. package/dist/chunks/chunk-46RMTR2Z.js +0 -2
  412. package/dist/chunks/chunk-4JJ4RYIB.js +0 -6
  413. package/dist/chunks/chunk-4NN5OLKW.js +0 -161
  414. package/dist/chunks/chunk-543QHE3D.js +0 -2
  415. package/dist/chunks/chunk-5QOFUGYQ.js +0 -2
  416. package/dist/chunks/chunk-5ZNE43XC.js +0 -10
  417. package/dist/chunks/chunk-6IS5OLI5.js +0 -2
  418. package/dist/chunks/chunk-7HAGSE7L.js +0 -2
  419. package/dist/chunks/chunk-AXYAEWWA.js +0 -2
  420. package/dist/chunks/chunk-B7XJBP4U.js +0 -2
  421. package/dist/chunks/chunk-BBIA24GD.js +0 -10
  422. package/dist/chunks/chunk-CJDGLPNX.js +0 -4
  423. package/dist/chunks/chunk-FCXDPVGJ.js +0 -3
  424. package/dist/chunks/chunk-FE2ENE3U.js +0 -2
  425. package/dist/chunks/chunk-H6EUFJJK.js +0 -2
  426. package/dist/chunks/chunk-IOSBGCRT.js +0 -2
  427. package/dist/chunks/chunk-K6DB5QWG.js +0 -2
  428. package/dist/chunks/chunk-LI56PPCN.js +0 -2
  429. package/dist/chunks/chunk-OE2OOWEQ.js +0 -2
  430. package/dist/chunks/chunk-OYIFH2OM.js +0 -2
  431. package/dist/chunks/chunk-QOUOU7FE.js +0 -22
  432. package/dist/chunks/chunk-R5GRESW3.js +0 -2
  433. package/dist/chunks/chunk-TERKCK4I.js +0 -2
  434. package/dist/chunks/chunk-TS5HNRZB.js +0 -2
  435. package/dist/chunks/chunk-V3KEG6MI.js +0 -2
  436. package/dist/chunks/chunk-WGISITX6.js +0 -4
  437. package/dist/chunks/chunk-XD4ZIQZ2.js +0 -2
  438. package/dist/chunks/chunk-XHU4BZQY.js +0 -13
  439. package/dist/chunks/chunk-ZWEY66RT.js +0 -2
  440. package/dist/chunks/cli-HV32F7HD.js +0 -2
  441. package/dist/chunks/connected-app-executor-DFHWNMRM.js +0 -2
  442. package/dist/chunks/connected-evidence-WOM6N5HO.js +0 -2
  443. package/dist/chunks/core-commands-GWRHH53F.js +0 -2
  444. package/dist/chunks/dataset-preparation-authoring-WJ2XEUO7.js +0 -4
  445. package/dist/chunks/datasets-XIMF54QN.js +0 -2
  446. package/dist/chunks/desktop-test-HF42V2EP.js +0 -3
  447. package/dist/chunks/dist-T6ES2TSM.js +0 -2
  448. package/dist/chunks/evaluation-coordination-WZT6FDMS.js +0 -2
  449. package/dist/chunks/experiment-improvements-H35VS6XZ.js +0 -2
  450. package/dist/chunks/experiments-F54C32EE.js +0 -2
  451. package/dist/chunks/experiments-signal-ONIGTGYR.js +0 -2
  452. package/dist/chunks/host-profile-evaluation-tools-LMCJ3MDJ.js +0 -2
  453. package/dist/chunks/host-profile-external-dataset-4HOXANWK.js +0 -2
  454. package/dist/chunks/hosted-app-server-composition-Y64A2A2B.js +0 -2
  455. package/dist/chunks/hosted-experiment-improvement-B2V2WIUI.js +0 -3
  456. package/dist/chunks/hosted-harness-runtime-C7I4KSDK.js +0 -2
  457. package/dist/chunks/hosted-profile-candidate-CXPVEEYQ.js +0 -3
  458. package/dist/chunks/hosted-profile-compiler-FGCI2VRW.js +0 -2
  459. package/dist/chunks/hosted-profile-evaluation-control-INNUYMBD.js +0 -2
  460. package/dist/chunks/hosted-profile-evaluation-inspection-UPTBRYMS.js +0 -3
  461. package/dist/chunks/hosted-profile-evaluation-preparation-TIQSVKLQ.js +0 -3
  462. package/dist/chunks/hosted-tasksets-7VMYOTIO.js +0 -2
  463. package/dist/chunks/human-review-7XC77NQP.js +0 -2
  464. package/dist/chunks/learning-3XDGIYUL.js +0 -2
  465. package/dist/chunks/local-harness-improvement-runtime-UIKQSAMM.js +0 -2
  466. package/dist/chunks/local-harness-taskset-review-6KJN3EQL.js +0 -2
  467. package/dist/chunks/opchat-NWYWWIA7.js +0 -3
  468. package/dist/chunks/opchat-bounded-chat-ICURZM6R.js +0 -2
  469. package/dist/chunks/organizations-7DBQGCCV.js +0 -2
  470. package/dist/chunks/project-action-payload-7DRABTHY.js +0 -2
  471. package/dist/chunks/project-agent-AXJOWXRU.js +0 -2
  472. package/dist/chunks/published-experiment-source-YBBPLNF2.js +0 -2
  473. package/dist/chunks/refiner-profile-service-ATEFPF5O.js +0 -2
  474. package/dist/chunks/sandbox-command-CF2PJCFX.js +0 -2
  475. package/dist/chunks/saved-work-3OAVRBH3.js +0 -2
  476. package/dist/chunks/setup-RHIMFI2Y.js +0 -2
  477. package/dist/chunks/src-V236S6MV.js +0 -424
  478. package/dist/chunks/standalone-experiment-turn-owner-CDRMGLWW.js +0 -2
  479. package/dist/chunks/store-chat-resources-P4EKCLSY.js +0 -2
  480. package/dist/chunks/store-conversation-serving-YFEZYQD3.js +0 -2
  481. package/dist/chunks/store-evaluation-results-VBH4R2U7.js +0 -7
  482. package/dist/chunks/store-human-review-RFCVZ3HP.js +0 -7
  483. package/dist/chunks/store-learned-preference-migration-validation-FNBGGZU6.js +0 -2
  484. package/dist/chunks/store-local-experiments-XPXGYXNM.js +0 -97
  485. package/dist/chunks/store-model-batch-review-J2L5JQV2.js +0 -2
  486. package/dist/chunks/store-model-project-preparation-OCLIFKI2.js +0 -2
  487. package/dist/chunks/store-taskset-drafts-BNKUVHPA.js +0 -9
  488. package/dist/chunks/taskset-packages-SXBLYHSP.js +0 -2
  489. package/dist/chunks/taskset-packages-V5T4V7YN.js +0 -2
  490. package/dist/chunks/tool-learning-47XQKELE.js +0 -2
  491. package/dist/chunks/training-7VQNCOGH.js +0 -2
  492. package/dist/chunks/training-VKLPNCMC.js +0 -2
  493. package/dist/chunks/training-hosted-NNE6BP6S.js +0 -2
  494. package/dist/chunks/training-hosted-serving-report-VZ4SMLMG.js +0 -2
  495. package/dist/chunks/training-model-start-G7YDZ7ZG.js +0 -2
  496. package/dist/chunks/web-search-56QRZGPR.js +0 -2
  497. package/dist/web/assets/App-DmEA-Lia.js +0 -53
  498. package/dist/web/assets/AppTerminalPanel-ScQKJV4z.js +0 -2
  499. package/dist/web/assets/AppsView-B1uNg9IQ.js +0 -1
  500. package/dist/web/assets/BrowserSidebar-DfVQoJHn.js +0 -1
  501. package/dist/web/assets/ChatTimelineEntry-Bbc6HRks.js +0 -8
  502. package/dist/web/assets/CommunityView-mO58f2B0.js +0 -1
  503. package/dist/web/assets/HostedModelLearningReview-BQIS7hkd.js +0 -1
  504. package/dist/web/assets/HostedModelLearningSettings-BQ-YeFMT.js +0 -1
  505. package/dist/web/assets/LabModelVersionDetailPage-BkHeVbAx.js +0 -1
  506. package/dist/web/assets/LabsRoute-CE45yAXJ.css +0 -1
  507. package/dist/web/assets/LabsRoute-YA9YckKj.js +0 -101
  508. package/dist/web/assets/MainChatThread-DpyPgGKW.js +0 -2
  509. package/dist/web/assets/MainPane-WOeodByM.js +0 -10
  510. package/dist/web/assets/NativeSetupTerminal-fmG2c65K.js +0 -2
  511. package/dist/web/assets/RightChatPanelStack-Bs7A4dLs.js +0 -1
  512. package/dist/web/assets/RightSidebarHomePanel-C-D4kba2.js +0 -1
  513. package/dist/web/assets/TeamChatView-DjmIaLO1.js +0 -1
  514. package/dist/web/assets/TrainingRunLineage-CtYe1KGX.js +0 -1
  515. package/dist/web/assets/WorkSidebarPanel-C6wWuo7U.js +0 -1
  516. package/dist/web/assets/WorkspaceDiffPanel-JDOUmrC-.js +0 -11
  517. package/dist/web/assets/WorkspaceEnvironmentMenu-sfL5LZeB.js +0 -35
  518. package/dist/web/assets/api-client-Dgz-fOMl.js +0 -1
  519. package/dist/web/assets/bot-Cd761lRF.js +0 -1
  520. package/dist/web/assets/chat-resources-BUDXdoG0.js +0 -1
  521. package/dist/web/assets/chevron-down-DEbd6Ek-.js +0 -1
  522. package/dist/web/assets/chevron-right-DLYNg_Oq.js +0 -1
  523. package/dist/web/assets/chevron-up-DFJJccDl.js +0 -1
  524. package/dist/web/assets/chunk-GHPCQXG5-DKDBSd8H.js +0 -9
  525. package/dist/web/assets/chunk-GJRXJL6G-luaxRTYI.js +0 -1
  526. package/dist/web/assets/chunk-JDQVAG3R-C0-rh1aR.js +0 -1
  527. package/dist/web/assets/chunk-XMVSQIK4-BBU7r_NH.js +0 -1
  528. package/dist/web/assets/client-BNjO4Xi8.js +0 -1
  529. package/dist/web/assets/cloud-upload-CoM1FGeB.js +0 -1
  530. package/dist/web/assets/common-CFsO2ppZ.js +0 -1
  531. package/dist/web/assets/copy-BGOhV6Pk.js +0 -1
  532. package/dist/web/assets/create-pipeline-DRR0Qeec.js +0 -1
  533. package/dist/web/assets/createLucideIcon-Bv-_eGcE.js +0 -1
  534. package/dist/web/assets/external-link-CVXsNeO3.js +0 -1
  535. package/dist/web/assets/folder-open-MnOmh19D.js +0 -1
  536. package/dist/web/assets/folder-plus-BRddLBtO.js +0 -1
  537. package/dist/web/assets/git-commit-horizontal-Bm4rkXug.js +0 -1
  538. package/dist/web/assets/icons-CZxmQtZs.js +0 -1
  539. package/dist/web/assets/image-BViGUAiq.js +0 -1
  540. package/dist/web/assets/info-DYPIbKKD.js +0 -1
  541. package/dist/web/assets/loader-circle-JFgFNsP5.js +0 -1
  542. package/dist/web/assets/maximize-2-DXZCQO0b.js +0 -1
  543. package/dist/web/assets/message-square-cOCAL8J1.js +0 -1
  544. package/dist/web/assets/models-route-CWcJuOd0.js +0 -1
  545. package/dist/web/assets/monitor-B35XSAvn.js +0 -1
  546. package/dist/web/assets/paperclip-CKgDxioG.js +0 -1
  547. package/dist/web/assets/play-DzqLr7fM.js +0 -1
  548. package/dist/web/assets/plus-Ddp1vXnw.js +0 -1
  549. package/dist/web/assets/presentation-B0S9v7ib.js +0 -1
  550. package/dist/web/assets/refresh-cw-D45mW-vs.js +0 -1
  551. package/dist/web/assets/reward-checks-D139zwha.js +0 -7
  552. package/dist/web/assets/save-Gu4R_82E.js +0 -1
  553. package/dist/web/assets/schemas-C9IwV7NS.js +0 -64
  554. package/dist/web/assets/settings-DdonLCIN.js +0 -21
  555. package/dist/web/assets/settings-lists-CFHFtO0D.js +0 -5
  556. package/dist/web/assets/square-Dqduqyyu.js +0 -1
  557. package/dist/web/assets/square-terminal-DS3zwi6X.js +0 -1
  558. package/dist/web/assets/training-QBuGBGJd.js +0 -2
  559. package/dist/web/assets/upload-ABSJxuUM.js +0 -1
  560. package/dist/web/assets/useQuery-CCjwL8VI.js +0 -1
  561. package/dist/web/assets/wifi-off-DGJH7Pke.js +0 -1
  562. package/dist/web/assets/work-outputs-CnbRtTLg.js +0 -1
  563. package/dist/web/assets/x-B-_zJVOZ.js +0 -1
  564. /package/dist/chunks/{chunk-SFR32TMJ.js → chunk-JXLDEYRW.js} +0 -0
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/TerminalOverlay-D--M876l.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/index-LXNhSUEL.js","assets/index-g7UqJhnX.css","assets/api-client-Dgz-fOMl.js","assets/icons-CZxmQtZs.js","assets/chevron-down-DEbd6Ek-.js","assets/createLucideIcon-Bv-_eGcE.js","assets/plus-Ddp1vXnw.js","assets/x-B-_zJVOZ.js","assets/AppToastContext-D2788RqX.js","assets/ui-theme.generated-D-mc26qt.js","assets/App-DmEA-Lia.js","assets/useQuery-CCjwL8VI.js","assets/schemas-C9IwV7NS.js","assets/common-CFsO2ppZ.js","assets/settings-DdonLCIN.js","assets/client-choice-storage-DUWsS4X0.js","assets/requests-DjSt-duM.js","assets/create-pipeline-DRR0Qeec.js","assets/profile-ref-CCxrOCio.js","assets/chunk-H3JZ3P5T-CzpTARDY.js","assets/work-outputs-CnbRtTLg.js","assets/training-QBuGBGJd.js","assets/chunk-GJRXJL6G-luaxRTYI.js","assets/chunk-GHPCQXG5-DKDBSd8H.js","assets/reward-checks-D139zwha.js","assets/intake-contracts-wCkD2ErR.js","assets/chunk-JDQVAG3R-C0-rh1aR.js","assets/ponder-desktop-D-zB6X4L.js","assets/chat-resources-BUDXdoG0.js","assets/app-models-CKXrDTEU.js","assets/model-display-zPvC4L2B.js","assets/submit-issue-command-Gk3RKrY-.js","assets/connected-app-mentions-D3wRZLwI.js","assets/profile-agent-labels-Duh96b8x.js","assets/browser-sidebar-links-D9v2cyJa.js","assets/browser-url-LACq2Ngu.js","assets/query-scope-BRpcgljO.js","assets/bot-Cd761lRF.js","assets/chevron-right-DLYNg_Oq.js","assets/copy-BGOhV6Pk.js","assets/external-link-CVXsNeO3.js","assets/loader-circle-JFgFNsP5.js","assets/maximize-2-DXZCQO0b.js","assets/message-square-cOCAL8J1.js","assets/refresh-cw-D45mW-vs.js","assets/square-terminal-DS3zwi6X.js","assets/models-route-CWcJuOd0.js","assets/PageChrome-8gH2hyDb.js","assets/AppDialog-BvskhHE9.js","assets/organization-types-PP-yuR2J.js","assets/App-DpFKLxuA.css","assets/TerminalOverlay-DoUFGstN.css"])))=>i.map(i=>d[i]);
2
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,h as n,m as r,t as i}from"./index-LXNhSUEL.js";import{t as a}from"./AppDialog-BvskhHE9.js";var o=e(t(),1),s=n(),c=r(),l=(0,o.lazy)(()=>i(()=>import(`./TerminalOverlay-D--M876l.js`).then(e=>({default:e.TerminalOverlay})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53])));function u({connection:e,command:t,displayCommand:n=`OpenPond setup`,onClose:r,onComplete:i,modal:u=!1}){let[d,f]=(0,o.useState)([]),[p]=(0,o.useState)(()=>({kind:`draft`,id:`native-setup-${crypto.randomUUID()}`})),m=(0,o.useRef)(!1),[h]=(0,o.useState)(()=>({command:t,displayCommand:n}));(0,o.useEffect)(()=>{!m.current&&d.some(e=>e.lastCommand!==null&&e.lastExitCode===0&&e.commandStatus===`success`)&&(m.current=!0,i?.())},[d,i]);let g=(0,c.jsx)(o.Suspense,{fallback:(0,c.jsx)(`p`,{role:`status`,children:`Opening setup terminal…`}),children:(0,c.jsx)(l,{open:!0,disposeOnUnmount:!0,connection:e,scope:p,tabs:d,onTabsChange:f,cwd:null,appId:null,workspaceName:`Agent setup`,queuedCommand:null,setupCommand:h,onClose:r})});return(0,s.createPortal)(u?(0,c.jsx)(a,{ariaLabel:`Agent setup terminal`,backdropClassName:`native-setup-modal-backdrop`,className:`native-setup-terminal`,onClose:r,children:g}):(0,c.jsx)(`div`,{className:`native-setup-terminal`,children:g}),document.body)}export{u as t};
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-LXNhSUEL.js";import{w as r,x as i}from"./submit-issue-command-Gk3RKrY-.js";import{a,l as o,n as s,t as ee}from"./browser-sidebar-links-D9v2cyJa.js";import"./icons-CZxmQtZs.js";import{t as c}from"./folder-open-MnOmh19D.js";import{i as te,n as ne,r as re,t as ie}from"./ChatTimelineEntry-Bbc6HRks.js";import{t as l}from"./message-square-cOCAL8J1.js";import{t as ae}from"./plus-Ddp1vXnw.js";import{t as oe}from"./x-B-_zJVOZ.js";import{$ as u,at as se,i as d,ot as f,rt as p,st as ce}from"./App-DmEA-Lia.js";import{A as le,E as m,H as h,M as g,N as ue,T as de,W as fe,j as pe}from"./MainPane-WOeodByM.js";var _=e(t(),1),v=n();function me({panel:e,runtimeEventStore:t,actionCatalog:n,createImproveActions:r,contextCompaction:i,steerActiveResponses:c,initialScrollState:l,codexPermissionMode:ae,codexReasoningEffort:oe,openPondCommandAccessMode:u,connection:d,connectedAppMentions:p,mentionApps:me,codexPersonalSkills:y,profileSkills:b,profileTarget:x,projectTarget:S,providerSettings:C,accountBaseUrl:w,billingOrganizationSlug:T,billingTeamId:E,showToast:D,workspaceTarget:O,onCodexPermissionModeChange:k,onCodexReasoningEffortChange:A,onOpenPondCommandAccessModeChange:j,onModelChange:M,onOpenAttachmentInSidebar:N,onOpenFileInSidebar:P,onOpenProfileSettings:F,onOpenSession:I,onOpenPonder:L,onProviderChange:R,onProviderSetupOpen:he,onPromptChange:ge,onProfileTargetChange:z,onScrollStateChange:_e,onProjectTargetChange:ve,onResolveApproval:ye,onShowBrowserPanel:B,onStop:V,onSubmit:H,onWorkspaceTargetChange:be}){let U=(0,_.useRef)(null),[W]=(0,_.useState)(()=>new pe),G=(0,_.useRef)(l?.stickyToBottom??!0),K=(0,_.useRef)(!1);ue(t,e.runtimeSource===`live`?e.sessionId:null,P);let q=le(t,e.runtimeSource===`live`?e.sessionId:null),J=(0,_.useMemo)(()=>{if(e.runtimeSource===`history`||!e.sessionId)return e;let t=q.events,n=se(t,[]);return{...e,messages:s(W.project(t),e.pendingUserMessage),createImproveRun:o({events:t}),contextWindowStatus:a({provider:e.provider,snapshot:f(n,e.sessionId),preferences:i}),goalRuntime:ce(n,e.sessionId)}},[W,i,q,e]),Y=J.running&&!J.pendingApproval&&fe(J.messages),X=(0,_.useMemo)(()=>J.createImproveRun?{...r,run:J.createImproveRun}:null,[J.createImproveRun,r]),Z=(0,_.useMemo)(()=>h(J.messages,{showThinkingIndicator:Y}),[J.messages,Y]),xe=te(J.messages,J.sessionId??`draft:${J.id}`),Q=J.messages.at(-1),$=re({connection:d,latestTurnId:Q?.turnId??null,sessionId:J.sessionId,turnRunning:J.running}),Se=[J.id,J.sessionId??`draft`,Z.length,Q?.id??``,Q?.content?.length??0,Q?.timestamp??``,Y?`thinking`:``].join(`:`);(0,_.useLayoutEffect)(()=>{let e=U.current;e&&!K.current&&(K.current=!0,e.scrollTop=l?.stickyToBottom?e.scrollHeight:l?.scrollTop??0)},[l]),g({contentKey:Se,onContentChange:e=>{G.current&&(e.scrollTop=e.scrollHeight)},threadRef:U});let Ce=(0,_.useCallback)((e,t)=>{let n=J.sessionId??`side-chat:${J.id}`;ee({conversationId:n,href:e,explicitFile:t?.explicitFile,newTab:t?.newTab}).then(e=>{e&&B()})},[J.id,J.sessionId,B]),we=(0,_.useCallback)(async(e,t)=>{let n=t.action===`answer`?t.text:`Dismiss this question`;if(!await H([],null,null,{displayPrompt:n,promptOverride:n,turnMetadata:{userQuestionResolution:t}}))throw Error(`The question response could not be sent.`)},[H]);return(0,v.jsxs)(`section`,{"data-thread-session":J.sessionId??void 0,className:`right-chat-pane ${J.pendingApproval?`has-approval`:``}`,id:`right-chat-panel-${J.id}`,role:`tabpanel`,"aria-labelledby":`right-chat-tab-${J.id}`,children:[(0,v.jsx)(`div`,{className:`chat-thread right-chat-thread`,ref:U,onScroll:e=>{let t=e.currentTarget;G.current=t.scrollHeight-t.scrollTop-t.clientHeight<=72,_e({scrollTop:t.scrollTop,stickyToBottom:G.current})},children:Z.map(t=>(0,v.jsx)(ie,{row:t,renderMessage:t=>(0,v.jsx)(ne,{activeWorkspaceAppId:J.activeWorkspaceAppId,accountBaseUrl:w,billingOrganizationSlug:T,billingTeamId:E,connection:d,animateInitialContent:t.message.role===`assistant`&&xe.has(t.message.id),kvCacheSummary:t.showFooter&&t.message.turnId?$.get(t.message.turnId)??null:null,message:t.message,codexRecoveryEnabled:t.message.turnId===Q?.turnId,onOpenBrowserLink:Ce,onOpenAttachmentInSidebar:N,onOpenFileInSidebar:P,onOpenProfileSettings:F,onResolveUserQuestion:we,onOpenSession:I,onOpenPonder:L,userAttachmentDisplay:e.provider===`codex`?`compact`:`full`,workspaceRootPath:J.workspaceRootPath,showFooter:t.showFooter},t.id)},t.id))}),(0,v.jsxs)(`div`,{className:`composer-stack dock right-chat-composer ${J.pendingApproval?`has-approval`:``}`,children:[(0,v.jsx)(de,{connection:d,showToast:D,approval:J.pendingApproval,onResolve:ye}),(0,v.jsx)(m,{mode:`dock`,prompt:e.prompt,mentionApps:me,connectedAppMentions:p,profileSkills:e.provider===`codex`?y:b,profileTarget:e.provider===`codex`?null:x,selectedMentionAppId:null,contextWindowStatus:J.contextWindowStatus,goalRuntime:J.goalRuntime,createImproveRuntime:X,busy:J.running,running:J.running,steerActiveResponses:c,taskSessionId:e.runtimeSource===`live`?e.sessionId:null,goalSessionId:e.sessionId,taskEvents:q.events,submissionScopeKey:J.sessionId??J.id,showProjectFooter:!1,connection:d,providerSettings:C,provider:e.provider,model:e.model,projectTarget:S,actionCatalog:n,workspaceTarget:O,codexPermissionMode:ae,codexReasoningEffort:oe,openPondCommandAccessMode:e.provider===`codex`?u:J.session?.openPondCommandAccessMode??u,onProviderChange:R,onProviderSetupOpen:he,onProjectTargetChange:ve,onWorkspaceTargetChange:be,onModelChange:M,onCodexPermissionModeChange:k,onCodexReasoningEffortChange:A,onOpenPondCommandAccessModeChange:j,onPromptChange:ge,onProfileTargetChange:z,onMentionAppSelect:void 0,showToast:D,onSubmit:H,onStop:V})]})]})}function y({panels:e,runtimeEventStore:t,actionCatalog:n=[],createImproveActions:a,contextCompaction:o,steerActiveResponses:s,busy:ee,codexPermissionMode:te,codexReasoningEffort:ne,openPondCommandAccessMode:re,connection:ie,connectedAppMentions:se,mentionApps:f,codexPersonalSkills:ce,profileSkills:le=[],profileLibrary:m={lastUsed:null,profiles:[]},extensionCatalog:h,projectTarget:g,providerSettings:ue,accountBaseUrl:de,billingOrganizationSlug:fe,billingTeamId:pe,showToast:y,workspaceTarget:b,onAddChat:x,onActivatePanel:S,onClosePanel:C,onCodexPermissionModeChange:w,onCodexReasoningEffortChange:T,onOpenPondCommandAccessModeChange:E,onModelChange:D,onOpenAttachmentInSidebar:O,onOpenFileInSidebar:k,onOpenProfileSettings:A,onOpenSession:j,onOpenPonder:M,onProviderChange:N,onProviderSetupOpen:P,onPromptChange:F,onProfileTargetChange:I,onScrollStateChange:L,onProjectTargetChange:R,onResolveApproval:he,onResizeStart:ge,onSelectFiles:z,onShowBrowserPanel:_e,onStop:ve,onSubmit:ye,onWorkspaceTargetChange:B}){let[V,H]=(0,_.useState)(!1),[be,U]=(0,_.useState)(()=>d(e)?.id??null),W=(0,_.useRef)(null),G=(0,_.useRef)(new Map),K=(0,_.useRef)(new Set(e.map(e=>e.id))),q=(0,_.useRef)(new Map(e.map(e=>[e.id,e.activationVersion]))),J=e.find(e=>e.id===be)??e.at(-1)??null,Y=J?.session?.currentProfile??m.lastUsed,X=p(m,Y),Z=X?u(X,h):le,xe=X?[...n.filter(e=>!r(e)),...i(X)]:n;(0,_.useEffect)(()=>{let t=K.current,n=q.current,r=null,i=null;for(let a of e)t.has(a.id)||(r=a),t.has(a.id)&&a.activationVersion>(n.get(a.id)??0)&&(i=a);K.current=new Set(e.map(e=>e.id)),q.current=new Map(e.map(e=>[e.id,e.activationVersion])),U(t=>i?i.id:r?r.id:t&&e.some(e=>e.id===t)?t:e.at(-1)?.id??null)},[e]),(0,_.useEffect)(()=>{if(!V)return;function e(e){W.current?.contains(e.target)||H(!1)}function t(e){e.key===`Escape`&&H(!1)}return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[V]);let Q=(0,_.useCallback)((e,t=!1)=>{U(e),S(e),t&&window.requestAnimationFrame(()=>G.current.get(e)?.focus())},[S]),$=(0,_.useCallback)((e=!1)=>{z(),e&&window.requestAnimationFrame(()=>{document.getElementById(`right-sidebar-files-tab`)?.focus()})},[z]),Se=(0,_.useCallback)((t,n)=>{let r=e.findIndex(e=>e.id===n);if(r<0)return;let i=r+1,a=null;if(t.key===`ArrowRight`&&(a=(i+1)%(e.length+1)),t.key===`ArrowLeft`&&(a=(i-1+e.length+1)%(e.length+1)),t.key===`Home`&&(a=0),t.key===`End`&&(a=e.length),a===null)return;if(t.preventDefault(),a===0){$(!0);return}let o=e[a-1];o&&Q(o.id,!0)},[e,$,Q]),Ce=(0,_.useCallback)(t=>{if(![`ArrowRight`,`ArrowLeft`,`Home`,`End`].includes(t.key)||(t.preventDefault(),t.key===`Home`))return;let n=t.key===`ArrowLeft`||t.key===`End`?e.at(-1):e[0];n&&Q(n.id,!0)},[e,Q]);return(0,v.jsxs)(`aside`,{className:`workspace-diff-panel right-chat-panel-stack`,"aria-label":`Side chats`,children:[(0,v.jsx)(`div`,{className:`workspace-diff-resize-handle`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize side chat panel`,onPointerDown:ge}),(0,v.jsx)(`div`,{className:`workspace-diff-topbar right-chat-topbar`,children:(0,v.jsxs)(`div`,{className:`workspace-diff-tabs`,role:`tablist`,"aria-label":`Right sidebar views`,children:[(0,v.jsxs)(`button`,{type:`button`,className:`workspace-diff-tab`,role:`tab`,id:`right-sidebar-files-tab`,"aria-controls":`right-sidebar-files-panel`,"aria-selected":!1,tabIndex:-1,onClick:()=>$(!1),onKeyDown:Ce,children:[(0,v.jsx)(c,{size:14}),(0,v.jsx)(`span`,{children:`Files`})]}),e.map(e=>{let t=e.id===J?.id;return(0,v.jsxs)(`div`,{className:`workspace-diff-tab right-chat-tab ${t?`active`:``}`,children:[(0,v.jsxs)(`button`,{type:`button`,className:`workspace-diff-tab-main`,role:`tab`,id:`right-chat-tab-${e.id}`,"aria-controls":`right-chat-panel-${e.id}`,"aria-selected":t,tabIndex:t?0:-1,title:e.title,ref:t=>{t?G.current.set(e.id,t):G.current.delete(e.id)},onClick:()=>Q(e.id),onKeyDown:t=>Se(t,e.id),children:[e.running?(0,v.jsx)(`span`,{className:`right-chat-status-dot`,"aria-label":`Running`}):null,(0,v.jsx)(`span`,{children:e.title})]}),(0,v.jsx)(`button`,{type:`button`,className:`workspace-diff-tab-close`,title:`Close ${e.title}`,"aria-label":`Close ${e.title}`,onClick:t=>{t.stopPropagation(),C(e.id)},children:(0,v.jsx)(oe,{size:12})})]},e.id)}),(0,v.jsxs)(`div`,{className:`workspace-diff-add-anchor`,ref:W,children:[(0,v.jsx)(`button`,{type:`button`,className:`workspace-diff-add-tab ${V?`active`:``}`,title:`Add to right sidebar`,"aria-label":`Add to right sidebar`,"aria-haspopup":`menu`,"aria-expanded":V,onClick:()=>H(e=>!e),children:(0,v.jsx)(ae,{size:15})}),V?(0,v.jsxs)(`div`,{className:`workspace-diff-add-menu right-chat-add-popover`,role:`menu`,children:[(0,v.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{H(!1),x()},children:[(0,v.jsx)(l,{size:13}),(0,v.jsx)(`span`,{children:`New task`})]}),(0,v.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{H(!1),z()},children:[(0,v.jsx)(c,{size:13}),(0,v.jsx)(`span`,{children:`Files`})]})]}):null]})]})}),(0,v.jsx)(`div`,{className:`right-chat-stack-body panes-1`,children:J?(0,v.jsx)(me,{busy:ee,createImproveActions:a,contextCompaction:o,steerActiveResponses:s,codexPermissionMode:te,codexReasoningEffort:ne,openPondCommandAccessMode:re,connection:ie,connectedAppMentions:se,actionCatalog:xe,mentionApps:f,codexPersonalSkills:ce,profileSkills:Z,profileTarget:null,panel:J,runtimeEventStore:t,initialScrollState:{scrollTop:J.scrollTop,stickyToBottom:J.stickyToBottom},projectTarget:g,providerSettings:ue,accountBaseUrl:de,billingOrganizationSlug:fe,billingTeamId:pe,showToast:y,workspaceTarget:b,onCodexPermissionModeChange:w,onCodexReasoningEffortChange:T,onOpenPondCommandAccessModeChange:e=>E(e,J.session),onModelChange:e=>D(J.id,e),onOpenAttachmentInSidebar:O,onOpenFileInSidebar:k,onOpenProfileSettings:A,onOpenSession:j,onOpenPonder:M,onProviderChange:(e,t)=>N(J.id,e,t),onProviderSetupOpen:P,onPromptChange:e=>F(J.id,e),onProfileTargetChange:e=>I(J.sessionId,e),onScrollStateChange:e=>L(J.id,e),onProjectTargetChange:R,onResolveApproval:he,onShowBrowserPanel:_e,onStop:()=>ve(J.sessionId),onSubmit:(e,t,n,r)=>ye(J.id,e,t,n,r),onWorkspaceTargetChange:B},J.id):null})]})}export{y as RightChatPanelStack};
@@ -1 +0,0 @@
1
- export{w as RightSidebarHomePanel}from"./MainPane-WOeodByM.js";
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,h as n,m as r}from"./index-LXNhSUEL.js";import"./icons-CZxmQtZs.js";import{F as i,x as a}from"./training-model-data-CxR3xpmK.js";import{t as o}from"./bot-Cd761lRF.js";import{t as s}from"./message-square-cOCAL8J1.js";import{t as c}from"./refresh-cw-D45mW-vs.js";import{t as l}from"./x-B-_zJVOZ.js";import{r as u}from"./AppToastContext-D2788RqX.js";import{Ht as d,bn as f,d as p,dt as m,f as h,h as g,l as _,m as v,p as y,r as b,u as x,ut as S}from"./App-DmEA-Lia.js";import{E as C,q as w}from"./MainPane-WOeodByM.js";var T=e(t(),1);function E(e,t){let n=new Set(Array.from(e.matchAll(/(?:^|\s)@([a-zA-Z0-9_-]+)/g),e=>(e[1]??``).toLowerCase()));return t.filter(e=>{let t=e.handle?.toLowerCase(),r=e.name.toLowerCase().replace(/[^a-z0-9_-]+/g,`-`);return t&&n.has(t)||n.has(r)}).map(e=>e.userId)}var D=n(),O=r();function k(e){return(0,O.jsxs)(`div`,{className:`team-chat-composer-reply`,role:`status`,children:[(0,O.jsx)(w,{size:15,"aria-hidden":`true`}),(0,O.jsxs)(`button`,{type:`button`,className:`team-chat-composer-reply-target`,"aria-label":`Jump to message from ${e.authorLabel}`,onClick:e.onJump,children:[(0,O.jsxs)(`strong`,{children:[`Replying to `,e.authorLabel]}),(0,O.jsx)(`span`,{children:y(e.target)})]}),(0,O.jsx)(`button`,{type:`button`,className:`team-chat-icon-button`,"aria-label":`Cancel reply`,"data-tooltip":`Cancel reply`,onClick:e.onCancel,children:(0,O.jsx)(l,{size:14})})]})}function A(e){return(0,O.jsxs)(`button`,{type:`button`,className:`team-chat-message-reply-quote`,"aria-label":`Jump to replied message from ${e.authorLabel}`,onClick:e.onJump,children:[(0,O.jsx)(`strong`,{children:e.authorLabel}),(0,O.jsx)(`span`,{children:y(e.target)})]})}function j(e){let t=(0,T.useRef)(null);if((0,T.useEffect)(()=>{if(!e.menu)return;t.current?.focus();let n=()=>e.onClose(),r=e=>{e.key===`Escape`&&n()};return window.addEventListener(`click`,n),window.addEventListener(`blur`,n),window.addEventListener(`keydown`,r),window.addEventListener(`scroll`,n,!0),()=>{window.removeEventListener(`click`,n),window.removeEventListener(`blur`,n),window.removeEventListener(`keydown`,r),window.removeEventListener(`scroll`,n,!0)}},[e.menu,e.onClose]),!e.menu||typeof document>`u`)return null;let n=(0,O.jsx)(`div`,{className:`team-chat-message-context-menu`,role:`menu`,"aria-label":`Message actions`,style:{left:e.menu.x,top:e.menu.y},onClick:e=>e.stopPropagation(),children:(0,O.jsxs)(`button`,{ref:t,type:`button`,role:`menuitem`,onClick:()=>{e.onReply(e.menu.message),e.onClose()},children:[(0,O.jsx)(w,{size:14}),`Reply`]})});return(0,D.createPortal)(n,document.body)}function M(e){let t=e.clientX||e.fallbackX,n=e.clientY||e.fallbackY;return{x:Math.max(8,Math.min(t,e.viewportWidth-150-8)),y:Math.max(8,Math.min(n,e.viewportHeight-42-8))}}function N(e){return`team-chat-message-${encodeURIComponent(e)}`}function P(e){let[t,n]=(0,T.useState)(!1),[r,a]=(0,T.useState)(e.message.body),u=e.message.refs.find(e=>e.refType===`hosted_ai_thread`),f=e.message.refs.find(e=>e.refType===`agent_run`),p=typeof u?.preview.status==`string`?u.preview.status:null,m=typeof e.message.metadata.deliveryStatus==`string`?e.message.metadata.deliveryStatus:null,g=typeof e.message.metadata.uploadProgress==`string`?e.message.metadata.uploadProgress:null,_=!e.message.deletedAt&&!m,y=v(e.message,e.messagesById),b=y?h(y,e.membersById):null;return(0,O.jsxs)(`article`,{id:N(e.message.id),className:`team-chat-message${e.own?` own`:``}`,tabIndex:-1,onContextMenu:t=>{if(!_)return;t.preventDefault();let n=t.currentTarget.getBoundingClientRect();e.onOpenReplyMenu(e.message,{clientX:t.clientX,clientY:t.clientY,fallbackX:n.right-12,fallbackY:n.top+24})},children:[(0,O.jsx)(R,{member:e.author}),(0,O.jsxs)(`div`,{className:`team-chat-message-content`,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsx)(`strong`,{children:e.author?.name??`Team member`}),(0,O.jsx)(`time`,{children:z(e.message.createdAt)}),e.message.editedAt?(0,O.jsx)(`span`,{children:`edited`}):null,m===`sending`?(0,O.jsx)(`span`,{children:`sending`}):null,m===`sending`&&g?(0,O.jsxs)(`span`,{children:[`uploaded `,g]}):null,m===`failed`?(0,O.jsx)(`span`,{className:`failed`,children:`not sent`}):null,m===`failed`?(0,O.jsxs)(`div`,{className:`team-chat-message-actions visible`,children:[(0,O.jsx)(`button`,{type:`button`,"data-tooltip":`Retry message`,"aria-label":`Retry message`,onClick:()=>void e.onRetry(e.message),children:(0,O.jsx)(c,{size:13})}),(0,O.jsx)(`button`,{type:`button`,"data-tooltip":`Remove failed message`,"aria-label":`Remove failed message`,onClick:()=>e.onDismissFailed(e.message),children:(0,O.jsx)(l,{size:13})})]}):_||e.own&&!e.message.deletedAt?(0,O.jsxs)(`div`,{className:`team-chat-message-actions`,children:[_?(0,O.jsx)(`button`,{type:`button`,"data-tooltip":`Reply`,"aria-label":`Reply to message`,onClick:()=>e.onReply(e.message),children:(0,O.jsx)(w,{size:13})}):null,e.own&&!u?(0,O.jsx)(`button`,{type:`button`,"data-tooltip":`Edit message`,"aria-label":`Edit message`,onClick:()=>n(!0),children:(0,O.jsx)(d,{size:13})}):null,e.own?(0,O.jsx)(`button`,{type:`button`,"data-tooltip":`Delete message`,"aria-label":`Delete message`,onClick:()=>void e.onDelete(e.message),children:(0,O.jsx)(i,{size:13})}):null]}):null]}),y&&b?(0,O.jsx)(A,{authorLabel:b,target:y,onJump:()=>e.onJumpToMessage(y.id)}):null,t?(0,O.jsxs)(`form`,{className:`team-chat-message-edit`,onSubmit:t=>{t.preventDefault(),e.onEdit(e.message,r).then(e=>{e&&n(!1)})},children:[(0,O.jsx)(`textarea`,{autoFocus:!0,value:r,onChange:e=>a(e.currentTarget.value),onKeyDown:t=>{t.key===`Escape`&&(t.preventDefault(),n(!1),a(e.message.body))}}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`button`,{type:`button`,onClick:()=>n(!1),children:`Cancel`}),(0,O.jsx)(`button`,{type:`submit`,disabled:!r.trim(),children:`Save`})]})]}):(0,O.jsx)(`div`,{className:e.message.deletedAt?`deleted`:``,children:e.message.deletedAt?`Message deleted`:e.message.body}),!e.message.deletedAt&&e.message.attachments.length>0?(0,O.jsx)(F,{message:e.message,connection:e.connection}):null,u?(0,O.jsxs)(`button`,{type:`button`,className:`team-chat-thread-link`,onClick:()=>void e.onOpenAiThread(u.refId),children:[(0,O.jsx)(s,{size:14}),(0,O.jsx)(`span`,{children:`Thread`}),p&&p!==`completed`?(0,O.jsx)(`small`,{children:L(p)}):null,(0,O.jsx)(`span`,{"aria-hidden":`true`,children:`›`})]}):null,f?(0,O.jsxs)(`button`,{type:`button`,className:`team-chat-thread-link`,onClick:()=>void e.onOpenAgentConversation(f.refId),children:[(0,O.jsx)(o,{size:14}),(0,O.jsx)(`span`,{children:`Agent run`}),(0,O.jsx)(`small`,{children:L(String(f.preview.status??`queued`))}),(0,O.jsx)(`span`,{"aria-hidden":`true`,children:`›`})]}):null]})]})}function F(e){let t=new Map(Array.isArray(e.message.metadata.localAttachmentPreviews)?e.message.metadata.localAttachmentPreviews.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e;return typeof t.id==`string`&&typeof t.url==`string`?[[t.id,t.url]]:[]}):[]);return(0,O.jsx)(`div`,{className:`team-chat-message-images`,children:e.message.attachments.map(n=>(0,O.jsx)(I,{attachmentId:n.id,alt:n.name,teamId:e.message.teamId,connection:e.connection,localUrl:t.get(n.clientAttachmentId)??null},n.id))})}function I(e){let[t,n]=(0,T.useState)(e.localUrl),[r,i]=(0,T.useState)(!1),a=(0,T.useRef)(0);async function o(){if(!e.connection||e.localUrl)e.localUrl||i(!0);else{i(!1);try{let t=await f.teamChatAttachmentDownload(e.connection,e.teamId,e.attachmentId);n(t.url)}catch{n(null),i(!0)}}}return(0,T.useEffect)(()=>{n(e.localUrl),i(!1),a.current=0,e.localUrl||o()},[e.attachmentId,e.connection,e.localUrl,e.teamId]),t?(0,O.jsx)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,"aria-label":`Open ${e.alt}`,children:(0,O.jsx)(`img`,{src:t,alt:e.alt,loading:`lazy`,onError:()=>{!e.localUrl&&a.current<1?(a.current+=1,o()):(n(null),i(!0))}})}):r?(0,O.jsx)(`button`,{type:`button`,className:`team-chat-message-image-retry`,"aria-label":`Retry ${e.alt}`,"data-tooltip":`Retry image`,onClick:()=>{a.current=0,e.localUrl?(i(!1),n(e.localUrl)):o()},children:(0,O.jsx)(c,{size:18})}):(0,O.jsx)(`div`,{className:`team-chat-message-image-loading`,role:`status`,"aria-label":`Loading ${e.alt}`})}function L(e){return e===`pending`?`Starting`:e===`running`?`Responding`:e===`failed`?`Failed`:e===`interrupted`?`Interrupted`:e===`cancelled`?`Cancelled`:e}function R({member:e}){if(e?.image)return(0,O.jsx)(`img`,{className:`team-chat-avatar`,src:e.image,alt:``});let t=(e?.name??`T`).split(/\s+/).slice(0,2).map(e=>e[0]?.toUpperCase()??``).join(``);return(0,O.jsx)(`span`,{className:`team-chat-avatar fallback`,children:t})}function z(e){let t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`}):``}var B={value:`none`,label:`No project`,detail:`Team conversation`,options:[],busy:!1},V={value:`local`,label:`Local`,detail:`Local execution`,options:[],action:{value:`local`,label:`Local`,detail:`Local execution`,disabled:!1},busy:!1},H=new Set([`codex`,`openai`,`xai`,`openrouter`,`deepseek`,`zai`,`moonshot`,`together`,`groq`,`custom-openai-compatible`]);function U(e,t){return!t||e===t?e:e?`${t}\n\n${e}`:t}function W(){return(0,O.jsx)(`section`,{className:`team-chat-view team-chat-pro-view`,"aria-label":`Team Chat`,children:(0,O.jsxs)(`div`,{className:`team-chat-pro-content`,children:[(0,O.jsx)(`span`,{className:`team-chat-pro-icon`,"aria-hidden":`true`,children:(0,O.jsx)(s,{size:22})}),(0,O.jsx)(`h1`,{children:`Team Chat`}),(0,O.jsx)(`p`,{children:`Team Chat is available with Pro mode.`}),(0,O.jsx)(`small`,{children:`Create or join a Pro team to chat with teammates, coordinate work, and share agents.`})]})})}function G(e){u(e.error);let[t,n]=(0,T.useState)(``),[r,i]=(0,T.useState)(!1),[a,o]=(0,T.useState)(null),[s,c]=(0,T.useState)(null),[l,d]=(0,T.useState)(0),f=(0,T.useRef)(null),v=(0,T.useRef)(!0),y=(0,T.useRef)(e.detail?.thread.id??null);y.current=e.detail?.thread.id??null;let{confirmAction:w,confirmDialog:D,resolveConfirmDialog:A}=m(),F=(0,T.useMemo)(()=>new Map(e.members.map(e=>[e.userId,e])),[e.members]),I=(0,T.useMemo)(()=>new Map((e.detail?.messages??[]).map(e=>[e.id,e])),[e.detail?.messages]),L=e.detail?.thread.id??null,R=a?.threadId===L?I.get(a.message.id)??a.message:null,z=R?.deletedAt?null:R,W=z?g(z):null,G=W?h(W,F):null,K=e.detail?b(e.detail.thread,e.currentUserId):`Team`,q=H.has(e.provider)?e.provider:`codex`,J=q===e.provider?e.model:`gpt-5.6-sol`,Y=(0,T.useMemo)(()=>p({hostedActions:e.agents,profile:e.profile,teamId:e.teamId}),[e.agents,e.profile,e.teamId]),X=e.detail?.messages.at(-1)?.sequence??0;(0,T.useEffect)(()=>{if(!v.current)return;let e=f.current;e&&(e.scrollTop=e.scrollHeight)},[X,e.detail?.thread.id]);let Z=(0,T.useCallback)(e=>{e.deletedAt||e.id.startsWith(`pending:`)||typeof e.metadata.deliveryStatus==`string`||(o({threadId:e.threadId,message:e}),i(!1),c(null),d(e=>e+1))},[]),Q=(0,T.useCallback)(()=>c(null),[]),ee=(0,T.useCallback)((e,t)=>{let n=M({...t,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight});c({message:e,...n})},[]),$=(0,T.useCallback)(e=>{let t=document.getElementById(N(e));t&&(t.scrollIntoView({behavior:`smooth`,block:`center`}),t.focus({preventScroll:!0}))},[]);async function te(a=[],s=null){if(a.some(e=>e.kind!==`image`||![`image/png`,`image/jpeg`,`image/webp`,`image/gif`].includes(e.mediaType)))return e.showToast(`Team chat supports PNG, JPEG, WebP, and GIF images.`,`error`),!1;let c=s;if(z&&c)return e.showToast(`Remove the agent action before replying to a message.`,`error`),!1;if(_(c)){let t=x(c);if(!t)throw Error(`The selected profile agent is missing its profile id.`);if(!await w({title:`Publish ${c.label??c.name??`agent`} to Team?`,body:`This will upload the committed agent source to ${e.teamName??`this Team`}, create its hosted runtime, and then send your message.`,confirmLabel:`Publish and send`,tone:`default`}))return!1;c=await e.onPublishProfileAgent(t)}let l=c?.approvalPolicy?.risk,u=null;if(c?.approvalPolicy?.required&&l&&l!==`read`){let e=l===`destructive`;if(!await w({title:e?`Approve destructive action?`:`Approve external write?`,body:`${c.label??c.name??`This agent action`} will use the workspace connection to ${e?`perform a destructive operation`:`write external data`}. Approve this run only?`,confirmLabel:e?`Approve destructive action`:`Approve write`,tone:e?`danger`:`default`}))return!1;u=crypto.randomUUID()}let d=t,f=e.detail?.thread.id??null,p=z,m=()=>{y.current===f&&(n(e=>U(e,d)),p&&o(e=>e??{threadId:p.threadId,message:p}))};n(``),p&&o(null);try{let t=await e.onSendMessage({body:d,useModel:r,providerId:q,modelId:J,mentionUserIds:E(d,e.members),attachments:a,replyToMessage:p,selectedActionKey:c?.id??null,approvalId:u});return t?r&&i(!1):m(),t}catch(e){throw m(),e}}return(0,O.jsxs)(`section`,{className:`team-chat-view`,children:[(0,O.jsxs)(`div`,{className:`team-chat-main conversation-surface-main`,children:[(0,O.jsxs)(`div`,{className:`team-chat-messages conversation-message-scroll`,role:`log`,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-busy":e.loading,"aria-label":K,tabIndex:0,ref:f,onScroll:e=>{let t=e.currentTarget;v.current=t.scrollHeight-t.scrollTop-t.clientHeight<72},children:[e.detail?.hasMoreBefore?(0,O.jsx)(`button`,{type:`button`,className:`team-chat-load-older`,disabled:e.loading,onClick:()=>void e.onLoadMoreMessages(),children:e.loading?`Loading...`:`Load older messages`}):null,e.loading&&!e.detail?(0,O.jsx)(`div`,{className:`team-chat-empty`,children:`Loading messages...`}):e.detail?.messages.length?e.detail.messages.map(t=>(0,O.jsx)(P,{message:t,author:t.authorUserId?F.get(t.authorUserId)??null:null,own:t.authorUserId===e.currentUserId,onOpenAiThread:e.onOpenAiThread,onOpenAgentConversation:e.onOpenAgentConversation,onEdit:e.onEditMessage,onDelete:e.onDeleteMessage,onRetry:e.onRetryMessage,onDismissFailed:e.onDismissFailedMessage,membersById:F,messagesById:I,onReply:Z,onOpenReplyMenu:ee,onJumpToMessage:$,connection:e.connection},t.id)):(0,O.jsx)(`div`,{className:`team-chat-empty`,children:`No messages yet`})]}),(0,O.jsxs)(`div`,{className:`team-chat-composer-shell conversation-composer-shell`,children:[W&&G?(0,O.jsx)(k,{authorLabel:G,target:W,onCancel:()=>o(null),onJump:()=>$(W.id)}):null,(0,O.jsx)(C,{mode:`dock`,surface:`team`,teamUseModel:r,teamUseModelLocked:!!W,teamMentionMembers:e.members.filter(t=>t.userId!==e.currentUserId),actionCatalog:Y,onTeamUseModelChange:i,prompt:t,contextWindowStatus:e.contextWindowStatus,busy:e.busy,running:!1,focusRequestId:l,submissionScopeKey:`team:${e.detail?.thread.id??`none`}`,showProjectFooter:!1,connection:e.connection,providerSettings:e.providerSettings,provider:q,model:J,projectTarget:B,workspaceTarget:V,codexPermissionMode:e.codexPermissionMode,codexReasoningEffort:e.codexReasoningEffort,openPondCommandAccessMode:e.openPondCommandAccessMode,onProviderChange:e.onProviderChange,onProviderSetupOpen:e.onOpenProviderSettings,onProjectTargetChange:()=>void 0,onWorkspaceTargetChange:()=>void 0,onModelChange:e.onModelChange,onCodexPermissionModeChange:e.onCodexPermissionModeChange,onCodexReasoningEffortChange:e.onCodexReasoningEffortChange,onOpenPondCommandAccessModeChange:e.onOpenPondCommandAccessModeChange,onPromptChange:n,showToast:e.showToast,onSubmit:async(e,t)=>te(e??[],t??null),onStop:()=>!1})]})]}),(0,O.jsx)(j,{menu:s,onClose:Q,onReply:Z}),(0,O.jsx)(S,{state:D,onResolve:A})]})}function K(e){let[t,n]=(0,T.useState)(``),r=e.agentConversation,i=(0,T.useRef)(null),s=(0,T.useRef)(null),c=(0,T.useRef)(null),u=r.messages.at(-1)?.sequence??0,d=[`pending`,`queued`,`running`].includes(r.run.status);(0,T.useEffect)(()=>{let e=i.current;e&&(e.scrollTop=e.scrollHeight)},[u,r.run.status]),(0,T.useEffect)(()=>{s.current?.focus();let t=t=>{t.key===`Escape`&&(t.preventDefault(),e.onCloseAgentConversation())};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e.onCloseAgentConversation]);async function f(r){let i=c.current??crypto.randomUUID();c.current=i;let a=await e.onSendAgentTurn({body:r??t,clientRequestId:i});return a&&(c.current=null,n(``)),a}return(0,O.jsxs)(`aside`,{className:`workspace-diff-panel team-ai-thread-panel`,"aria-label":`${r.agent.name} run`,children:[e.onResizeStart?(0,O.jsx)(`div`,{className:`workspace-diff-resize-handle`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize agent run panel`,onPointerDown:e.onResizeStart}):null,(0,O.jsxs)(`header`,{children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(o,{size:15}),(0,O.jsx)(`strong`,{children:r.agent.name}),(0,O.jsx)(`span`,{children:r.run.status})]}),(0,O.jsx)(`button`,{ref:s,type:`button`,className:`team-chat-icon-button`,"aria-label":`Close agent run`,onClick:e.onCloseAgentConversation,children:(0,O.jsx)(l,{size:16})})]}),(0,O.jsxs)(`div`,{className:`team-ai-thread-messages`,ref:i,role:`log`,"aria-live":`polite`,"aria-relevant":`additions text`,tabIndex:0,children:[r.messages.map(t=>(0,O.jsxs)(`article`,{className:`team-ai-message ${t.role}`,children:[(0,O.jsxs)(`div`,{className:`team-ai-message-author`,children:[t.role===`assistant`?(0,O.jsx)(o,{size:14}):null,(0,O.jsx)(`strong`,{children:t.role===`user`?`Team member`:r.agent.name})]}),(0,O.jsx)(a,{connection:e.connection,content:t.body})]},t.id)),r.messages.length===0?(0,O.jsx)(`div`,{className:`team-chat-empty`,children:`The agent run is starting.`}):null]}),(0,O.jsx)(`div`,{className:`team-ai-thread-composer`,children:(0,O.jsx)(C,{mode:`dock`,surface:`team`,teamUseModel:!1,teamUseModelLocked:!0,prompt:t,contextWindowStatus:e.contextWindowStatus,busy:e.busy||d,running:d,submissionScopeKey:`team-agent:${r.conversationId}`,showProjectFooter:!1,connection:e.connection,providerSettings:e.providerSettings,provider:e.provider,model:e.model,projectTarget:B,workspaceTarget:V,codexPermissionMode:e.codexPermissionMode,codexReasoningEffort:e.codexReasoningEffort,openPondCommandAccessMode:e.openPondCommandAccessMode,onProviderChange:e.onProviderChange,onProviderSetupOpen:e.onOpenProviderSettings,onProjectTargetChange:()=>void 0,onWorkspaceTargetChange:()=>void 0,onModelChange:e.onModelChange,onCodexPermissionModeChange:e.onCodexPermissionModeChange,onCodexReasoningEffortChange:e.onCodexReasoningEffortChange,onOpenPondCommandAccessModeChange:e.onOpenPondCommandAccessModeChange,onPromptChange:e=>{c.current=null,n(e)},showToast:e.showToast,onSubmit:async(e,t,n,r)=>f(r?.promptOverride),onStop:()=>!1})})]})}function q(e){let[t,n]=(0,T.useState)(``),r=e.aiThread,i=new Map(e.members.map(e=>[e.userId,e])),c=r.turns.at(-1)??null,u=(0,T.useRef)(null),d=r.messages.at(-1)?.sequence??0,f=(0,T.useRef)(null),p=H.has(e.provider)?e.provider:`codex`,m=p===e.provider?e.model:`gpt-5.6-sol`,h=!(!r.activeTurn||r.activeTurn.status!==`pending`&&r.activeTurn.status!==`running`);(0,T.useEffect)(()=>{let e=u.current;e&&(e.scrollTop=e.scrollHeight)},[d,r.activeTurn?.partialBody]),(0,T.useEffect)(()=>{f.current?.focus();let t=t=>{t.key===`Escape`&&(t.preventDefault(),e.onCloseAiThread())};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e.onCloseAiThread]);async function g(r){let i=await e.onSendAiTurn({body:r??t,providerId:p,modelId:m});return i&&n(``),i}return(0,O.jsxs)(`aside`,{className:`workspace-diff-panel team-ai-thread-panel`,"aria-label":`AI thread`,children:[e.onResizeStart?(0,O.jsx)(`div`,{className:`workspace-diff-resize-handle`,role:`separator`,"aria-label":`Resize AI thread panel`,"aria-orientation":`vertical`,onPointerDown:e.onResizeStart}):null,(0,O.jsxs)(`header`,{children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(s,{size:15}),(0,O.jsx)(`strong`,{children:`AI thread`}),(0,O.jsxs)(`span`,{children:[r.messages.length,` messages`]})]}),(0,O.jsx)(`button`,{ref:f,type:`button`,className:`team-chat-icon-button`,"data-tooltip":`Close thread`,"aria-label":`Close thread`,onClick:e.onCloseAiThread,children:(0,O.jsx)(l,{size:16})})]}),(0,O.jsxs)(`div`,{className:`team-ai-thread-messages`,ref:u,role:`log`,"aria-live":`polite`,"aria-relevant":`additions text`,tabIndex:0,children:[r.messages.map(t=>(0,O.jsxs)(`article`,{className:`team-ai-message ${t.role}`,children:[(0,O.jsxs)(`div`,{className:`team-ai-message-author`,children:[t.role===`assistant`?(0,O.jsx)(o,{size:14}):null,(0,O.jsx)(`strong`,{children:t.role===`assistant`?`Model`:t.createdByUserId?i.get(t.createdByUserId)?.name??`Team member`:`Team member`})]}),(0,O.jsx)(a,{connection:e.connection,content:t.body})]},t.id)),r.activeTurn?.partialBody?(0,O.jsxs)(`article`,{className:`team-ai-message assistant streaming`,children:[(0,O.jsxs)(`div`,{className:`team-ai-message-author`,children:[(0,O.jsx)(o,{size:14}),(0,O.jsx)(`strong`,{children:`Model`}),(0,O.jsx)(`span`,{children:r.activeTurn.status})]}),(0,O.jsx)(a,{connection:e.connection,content:r.activeTurn.partialBody})]}):r.activeTurn?(0,O.jsx)(`div`,{className:`team-ai-running`,children:r.activeTurn.status===`pending`?`Starting model...`:`Model is responding...`}):c&&[`failed`,`interrupted`,`cancelled`].includes(c.status)?(0,O.jsx)(`div`,{className:`team-ai-turn-state ${c.status}`,children:c.status===`failed`?`Model response failed`:c.status===`interrupted`?`Model response was interrupted`:`Model response was cancelled`}):null]}),(0,O.jsx)(`div`,{className:`team-ai-thread-composer`,children:(0,O.jsx)(C,{mode:`dock`,surface:`team`,teamUseModel:!0,teamUseModelLocked:!0,prompt:t,contextWindowStatus:e.contextWindowStatus,busy:h,running:h,submissionScopeKey:`team-ai:${r.conversationId}`,showProjectFooter:!1,connection:e.connection,providerSettings:e.providerSettings,provider:p,model:m,projectTarget:B,workspaceTarget:V,codexPermissionMode:e.codexPermissionMode,codexReasoningEffort:e.codexReasoningEffort,openPondCommandAccessMode:e.openPondCommandAccessMode,onProviderChange:e.onProviderChange,onProviderSetupOpen:e.onOpenProviderSettings,onProjectTargetChange:()=>void 0,onWorkspaceTargetChange:()=>void 0,onModelChange:e.onModelChange,onCodexPermissionModeChange:e.onCodexPermissionModeChange,onCodexReasoningEffortChange:e.onCodexReasoningEffortChange,onOpenPondCommandAccessModeChange:e.onOpenPondCommandAccessModeChange,onPromptChange:n,showToast:e.showToast,onSubmit:async(e,t,n,r)=>g(r?.promptOverride),onStop:e.onStopAiTurn})})]})}export{K as TeamAgentConversationPanel,q as TeamAiThreadPanel,W as TeamChatProView,G as TeamChatView};
@@ -1 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,h as n,m as r}from"./index-LXNhSUEL.js";import{a as i,m as a,o,p as s,r as c,v as l}from"./schemas-C9IwV7NS.js";import"./icons-CZxmQtZs.js";import{t as u}from"./createLucideIcon-Bv-_eGcE.js";import{At as d,Bt as f,C as p,D as m,Dt as h,F as g,Ht as _,It as v,K as y,Mt as b,Ot as x,P as S,Q as ee,R as C,Rt as w,S as T,St as te,T as E,Tt as D,Vt as ne,W as re,X as ie,_ as ae,_t as O,a as oe,at as se,b as k,c as ce,ct as le,d as ue,dt as de,f as fe,ft as pe,g as me,h as he,i as ge,j as _e,l as ve,n as ye,nt as A,o as be,p as xe,q as Se,r as Ce,s as we,t as Te,tt as Ee,u as De,ut as j,v as Oe,w as ke,x as Ae,xt as M,yt as je,zt as Me}from"./CartesianChart-DdBZ69lI.js";import{a as N,i as P}from"./models-route-CWcJuOd0.js";import{Pt as Ne,Rt as Pe,dn as Fe,nn as Ie}from"./App-DmEA-Lia.js";var F=a({label:l().max(200),value:l().max(12e3),severity:c([`info`,`warning`,`error`]).default(`info`)}).strict(),Le=a({kind:c([`trajectory`,`evaluation`]),id:l().min(1).max(240),taskId:l().min(1).max(512).optional()}).strict().refine(e=>e.kind===`evaluation`?!!e.taskId:e.taskId===void 0,{message:`Evaluation feedback requires a task ID; trajectory feedback uses its receipt ID only.`}),I=a({status:l(),score:s().nullable(),passed:o().nullable()}).strict(),Re=a({jobId:l(),kind:c([`trajectory`,`evaluation`]),id:l(),taskId:l().optional(),compositionSha256:l(),training:I,evaluation:I,graders:i(a({graderId:l(),role:c([`training`,`evaluation`]),status:l(),rawScore:s().nullable(),normalizedScore:s().nullable(),passed:o().nullable(),message:l().nullable(),failureClass:l().nullable(),feedback:i(l().max(32768)).max(8)}).strict()).max(32)}).strict(),L=a({sourceJobId:l(),checkpointId:l(),checkpointJobId:l(),groupId:l(),groupIndex:s().int().nonnegative(),optimizerDisposition:c([`applied`,`skipped_no_signal`]),inputPolicyVersion:s().int().nonnegative(),outputPolicyVersion:s().int().nonnegative().optional()}).strict(),R=a({label:l(),state:c([`done`,`active`,`pending`,`missing`,`failed`]),status:l(),detail:l().optional(),diagnostics:i(F).max(100).optional(),feedback:i(Le).max(100).optional(),error:l().optional(),progress:s().min(0).max(1).optional(),inLoop:o().optional()}).strict(),ze=a({jobId:l(),teamId:l(),modelProjectId:l(),state:l(),policyVersion:s().int().nonnegative(),groupsCompleted:s().int().nonnegative(),groupsTarget:s().int().nonnegative(),live:o(),continuation:a({sourceJobId:l(),artifactId:l(),checkpointId:l(),optimizerMode:c([`continue`,`reset`]),materialized:o(),parentRank:s().int().positive().optional(),trainableRank:s().int().positive().optional()}).strict().optional(),recovery:a({sourceJobId:l(),checkpointId:l(),checkpointJobId:l().optional(),policyVersion:s().int().positive(),completedGroups:s().int().positive(),optimizerStateRestored:o(),optimizerUpdatesApplied:s().int().nonnegative().optional(),replayGroups:i(L).max(128).optional(),replayCompleted:o().optional(),undurablePolicyVersion:s().int().positive().optional()}).strict().optional(),nodes:i(R).max(10),inference:R.nullable(),groups:i(a({index:s().int().nonnegative(),optimizerDisposition:c([`applied`,`skipped_no_signal`]).optional(),replay:L.optional(),inherited:a({sourceJobId:l(),checkpointId:l(),checkpointJobId:l(),optimizerDisposition:c([`applied`,`skipped_no_signal`]),inputPolicyVersion:s().int().nonnegative(),outputPolicyVersion:s().int().nonnegative().optional()}).strict().optional(),nodes:i(R).max(5).optional(),state:l(),meanReward:s().nullable(),plannedSlots:s().int().nonnegative(),diagnostics:i(F).max(100).optional(),attempts:i(a({id:l(),slot:s().int().nonnegative(),attempt:s().int().positive(),state:l(),reward:s().nullable(),diagnostics:i(F).max(100).optional(),feedback:i(Le).max(100).optional()}).strict()).max(1e3)}).strict()).max(50),groupCount:s().int().nonnegative(),logs:i(a({id:l(),at:l(),source:l(),message:l(),level:l()}).strict()).max(200)}).strict(),Be=u(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),z=e(t());function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B.apply(null,arguments)}var V=e=>{var t=e.cx,n=e.cy,r=e.r,i=e.className,a=_(`recharts-dot`,i);return x(t)&&x(n)&&x(r)?z.createElement(`circle`,B({},f(e),te(e),{className:a,cx:t,cy:n,r})):null},Ve=[`points`];function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?H(Object(n),!0).forEach(function(t){He(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function He(e,t,n){return(t=Ue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ue(e){var t=We(e,`string`);return typeof t==`symbol`?t:t+``}function We(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},W.apply(null,arguments)}function Ge(e,t){if(e==null)return{};var n,r,i=Ke(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ke(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function qe(e){var t=e.option,n=e.dotProps,r=e.className;if((0,z.isValidElement)(t))return(0,z.cloneElement)(t,n);if(typeof t==`function`)return t(n);var i=_(r,typeof t==`boolean`?``:t.className),a=n??{};a.points;var o=Ge(a,Ve);return z.createElement(V,W({},o,{className:i}))}function Je(e,t){return e==null?!1:t?!0:e.length===1}function Ye(e){var t=e.points,n=e.dot,r=e.className,i=e.dotClassName,a=e.dataKey,o=e.baseProps,s=e.needClip,c=e.clipPathId,l=e.zIndex,u=l===void 0?C.scatter:l;if(!Je(t,n))return null;var d=k(n),f=Me(n),p=t.map((e,r)=>{var s=U(U(U({r:3},o),f),{},{index:r,cx:e.x??void 0,cy:e.y??void 0,dataKey:a,value:e.value,payload:e.payload,points:t});return z.createElement(qe,{key:`dot-${r}`,option:n,dotProps:s,className:i})}),m={};return s&&c!=null&&(m.clipPath=`url(#clipPath-${d?``:`dots-`}${c})`),z.createElement(E,{zIndex:u},z.createElement(v,W({className:r},m),p))}function Xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Xe(Object(n),!0).forEach(function(t){Ze(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ze(e,t,n){return(t=Qe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qe(e){var t=$e(e,`string`);return typeof t==`symbol`?t:t+``}function $e(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var et=e=>{var t=e.point,n=e.childIndex,r=e.mainColor,i=e.activeDot,a=e.dataKey,o=e.clipPath;if(i===!1||t.x==null||t.y==null)return null;var s=G(G(G({},{index:n,dataKey:a,cx:t.x,cy:t.y,r:4,fill:r??`none`,strokeWidth:2,stroke:`#fff`,payload:t.payload,value:t.value}),ne(i)),te(i)),c=(0,z.isValidElement)(i)?(0,z.cloneElement)(i,s):typeof i==`function`?i(s):z.createElement(V,s);return z.createElement(v,{className:`recharts-active-dot`,clipPath:o},c)};function tt(e){var t=e.points,n=e.mainColor,r=e.activeDot,i=e.itemDataKey,a=e.clipPath,o=e.zIndex,s=o===void 0?C.activeDot:o,c=je(m),l=ce();if(t==null||l==null)return null;var u=t.find(e=>l.includes(e.payload));return h(u)?null:z.createElement(E,{zIndex:s},z.createElement(et,{point:u,childIndex:Number(c),mainColor:n,dataKey:i,activeDot:r,clipPath:a}))}var nt=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`visibleLength`,`strokeDasharray`,`connectNulls`];function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},K.apply(null,arguments)}function rt(e,t){if(e==null)return{};var n,r,i=it(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function it(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function at(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function ot(e,t){return`${t}px ${e}px`}function st(e){return e.length%2==0?e:[...e,...e]}function ct(e,t){for(var n=[],r=0;r<t;++r)n.push(...e);return n}function lt(e,t,n){var r=st(n),i=r.reduce((e,t)=>e+t,0);if(!i)return ot(t,e);for(var a=Math.floor(e/i),o=e%i,s=[],c=0,l=0;c<r.length;l+=(u=r[c])??0,++c){var u,d=r[c];if(d!=null&&l+d>o){s=[...r.slice(0,c),o-l];break}}var f=s.length%2==0?[0,t]:[t];return[...ct(r,a),...s,...f].map(e=>`${e}px`).join(`, `)}function ut(e,t,n){return e?lt(n,t,`${e}`.split(/[,\s]+/gim).map(e=>parseFloat(e))):ot(t,n)}function dt(e){e.animationElapsedTime,e.isAnimating,e.isEntrance;var t=e.visibleLength,n=e.strokeDasharray,r=e.connectNulls,i=rt(e,nt),a=r??!1,o;if(t!=null){var s=i.pathRef;o=ut(n,at(s?.current??null),t)}else n!=null&&(o=String(n));return z.createElement(y,K({},i,{connectNulls:a,strokeDasharray:o}))}function ft(e){var t=(0,z.useRef)(0),n=(0,z.useRef)(0),r=(0,z.useRef)(!1),i=(0,z.useRef)(e);return i.current!==e&&(t.current=n.current,i.current=e),(0,z.useCallback)((e,i)=>{if(r.current)return null;var a=Math.min(b(t.current+e*i),i);return e>0&&i>0&&(n.current=Math.max(n.current,a),a>=i)?(r.current=!0,null):a},[])}var pt=(e,t,n,r)=>_e(e,`xAxis`,t,r),mt=(e,t,n,r)=>S(e,`xAxis`,t,r),ht=(e,t,n,r)=>_e(e,`yAxis`,n,r),gt=(e,t,n,r)=>S(e,`yAxis`,n,r),_t=O([ie,pt,ht,mt,gt],(e,t,n,r,i)=>pe(e,`xAxis`)?se(t,r,!1):se(n,i,!1)),vt=(e,t,n,r,i)=>i;function yt(e){return e.type===`line`}var bt=O([g,vt],(e,t)=>e.filter(yt).find(e=>e.id===t)),xt=O([ie,pt,ht,mt,gt,bt,_t,re],(e,t,n,r,i,a,o,s)=>{var c=s.chartData,l=s.dataStartIndex,u=s.dataEndIndex;if(!(a==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||o==null||e!==`horizontal`&&e!==`vertical`)){var d=a.dataKey,f=a.data,p=f!=null&&f.length>0?f:c?.slice(l,u+1);if(p!=null)return Ut({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:o,displayedData:p})}});function St(e){var t=ne(e),n=3,r=2;if(t!=null){var i=t.r,a=t.strokeWidth,o=Number(i),s=Number(a);return(Number.isNaN(o)||o<0)&&(o=n),(Number.isNaN(s)||s<0)&&(s=r),{r:o,strokeWidth:s}}return{r:n,strokeWidth:r}}var Ct=[`id`],wt=[`type`,`layout`,`connectNulls`,`needClip`,`shape`,`strokeDasharray`],Tt=[`activeDot`,`animateNewValues`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`hide`,`isAnimationActive`,`label`,`legendType`,`xAxisId`,`yAxisId`,`id`];function q(){return q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q.apply(null,arguments)}function J(e,t){if(e==null)return{};var n,r,i=Et(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Et(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Dt(Object(n),!0).forEach(function(t){Ot(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ot(e,t,n){return(t=kt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kt(e){var t=At(e,`string`);return typeof t==`symbol`?t:t+``}function At(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function jt(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Mt(e){var t=0,n=0;for(var r of e)r.status===`matched`&&r.prev.x!=null&&r.next.x!=null&&(t+=r.next.x-r.prev.x,n++);return n>0?t/n:0}var X={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationInterpolateFn:(e,t)=>{if(e==null)return[];if(t===1)return e.flatMap(e=>e.status===`removed`?[]:[e.next]);var n=Mt(e),r=[];for(var i of e)if(i.status===`matched`)r.push(Y(Y({},i.next),{},{x:D(i.prev.x,i.next.x,t),y:D(i.prev.y,i.next.y,t)}));else if(i.status===`added`){if(i.next.x!=null){var a=i.next.x-n;r.push(Y(Y({},i.next),{},{x:D(a,i.next.x,t),y:i.next.y}))}else r.push(i.next)}else if(i.status===`removed`&&i.prev.x!=null){var o=i.prev.x+n;r.push(Y(Y({},i.prev),{},{x:D(i.prev.x,o,t),y:i.prev.y}))}return r},animationMatchBy:he,connectNulls:!1,dot:!0,fill:`#fff`,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`line`,shape:dt,stroke:`#3182bd`,strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:C.line,type:`linear`},Nt=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.legendType;return[{inactive:e.hide,dataKey:t,type:i,color:r,value:j(n,t),payload:e}]},Pt=z.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,c=e.unit,l=e.formatter,u=e.tooltipType,f=e.id,p={dataDefinedOnItem:n,getPosition:d,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:j(o,t),hide:s,type:u,color:r,unit:c,formatter:l,graphicalItemId:f}};return z.createElement(ae,{tooltipEntrySettings:p})});function Ft(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.dot,a=r.dataKey,o=r.needClip;r.id;var s=J(r,Ct),c=f(s);return z.createElement(Ye,{points:n,dot:i,className:`recharts-line-dots`,dotClassName:`recharts-line-dot`,dataKey:a,baseProps:c,needClip:o,clipPathId:t})}function It(e){var t=e.showLabels,n=e.children,r=e.points,i=(0,z.useMemo)(()=>r?.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return Y(Y({},t),{},{value:e.value,payload:e.payload,viewBox:t,parentViewBox:void 0,fill:void 0})}),[r]);return z.createElement(Ae,{value:t?i:void 0},n)}function Lt(e){var t=e.clipPathId,n=e.pathRef,r=e.points,i=e.props,a=e.animationElapsedTime,o=e.isAnimating,s=e.isEntrance,c=e.visibleLength,l=i.type,u=i.layout,d=i.connectNulls,f=i.needClip,p=i.shape,m=i.strokeDasharray,h=J(i,wt),g=Y(Y({},w(h)),{},{fill:`none`,className:`recharts-line-curve`,clipPath:f?`url(#clipPath-${t})`:void 0,points:r,type:l,layout:u,connectNulls:d,strokeDasharray:m??i.strokeDasharray,pathRef:n,animationElapsedTime:a,isAnimating:o,isEntrance:i.animateNewValues?s:!1,visibleLength:c});return z.createElement(z.Fragment,null,r?.length>1&&z.createElement(Oe,{option:p,DefaultShape:X.shape,shapeProps:g}),z.createElement(Ft,{points:r,clipPathId:t,props:i}))}function Rt(e){var t=e.clipPathId,n=e.props,r=e.pathRef,i=e.previousPointsRef,a=n.points,o=n.isAnimationActive,s=n.animationBegin,c=n.animationDuration,l=n.animationEasing,u=n.animationMatchBy,d=n.animationInterpolateFn,f=n.layout,p=jt(r.current),m=xe(n.onAnimationStart,n.onAnimationEnd),h=m.isAnimating,g=m.handleAnimationStart,_=m.handleAnimationEnd,v=!h,y=ft(a),b=(0,z.useCallback)(e=>e>0&&p>0,[p]);return z.createElement(It,{points:a,showLabels:v},n.children,z.createElement(fe,{animationInput:a,animationIdPrefix:`recharts-line-`,items:a,previousItemsRef:i,isAnimationActive:o,animationBegin:s,animationDuration:c,animationEasing:l,onAnimationStart:g,onAnimationEnd:_,animationInterpolateFn:d,animationMatchBy:u,shouldUpdatePreviousRef:b,layout:f},(e,i,a)=>{var o=h||i<1,s=o?y(i,p):null;return z.createElement(Lt,{props:n,points:e,clipPathId:t,pathRef:r,animationElapsedTime:i,isAnimating:o,isEntrance:a,visibleLength:s})}),z.createElement(T,{label:n.label}))}function zt(e){var t=e.clipPathId,n=e.props,r=(0,z.useRef)(null),i=(0,z.useRef)(null);return z.createElement(Rt,{props:n,clipPathId:t,previousPointsRef:r,pathRef:i})}var Bt=(e,t)=>({x:e.x??void 0,y:e.y??void 0,value:e.value,errorVal:de(e.payload,t)}),Vt=class extends z.Component{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.xAxisId,o=e.yAxisId,s=e.top,c=e.left,l=e.width,u=e.height,d=e.id,f=e.needClip,p=e.zIndex;if(t)return null;var m=_(`recharts-line`,i),h=d,g=St(n),y=g.r,b=g.strokeWidth,x=k(n),S=y*2+b,ee=f?`url(#clipPath-${x?``:`dots-`}${h})`:void 0;return z.createElement(E,{zIndex:p},z.createElement(v,{className:m},f&&z.createElement(`defs`,null,z.createElement(ge,{clipPathId:h,xAxisId:a,yAxisId:o}),!x&&z.createElement(`clipPath`,{id:`clipPath-dots-${h}`},z.createElement(`rect`,{x:c-S/2,y:s-S/2,width:l+S,height:u+S}))),z.createElement(be,{xAxisId:a,yAxisId:o,data:r,dataPointFormatter:Bt,errorBarOffset:0},z.createElement(zt,{props:this.props,clipPathId:h}))),z.createElement(tt,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:ee}))}};function Ht(e){var t=M(e,X),n=t.activeDot,r=t.animateNewValues,i=t.animationBegin,a=t.animationDuration,o=t.animationEasing,s=t.connectNulls,c=t.dot,l=t.hide,u=t.isAnimationActive,d=t.label,f=t.legendType,p=t.xAxisId,m=t.yAxisId,h=t.id,g=J(t,Tt),_=oe(p,m).needClip,v=ve(),y=ee(),b=A(),x=je(e=>xt(e,p,m,b,h));if(y!==`horizontal`&&y!==`vertical`||x==null||v==null)return null;var S=v.height,C=v.width,w=v.x,T=v.y;return z.createElement(Vt,q({},g,{id:h,connectNulls:s,dot:c,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:u,hide:l,label:d,legendType:f,xAxisId:p,yAxisId:m,points:x,layout:y,height:S,width:C,left:w,top:T,needClip:_}))}function Ut(e){var t=e.layout,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,o=e.dataKey,s=e.bandSize;return e.displayedData.map((e,c)=>{var l=de(e,o);if(t===`horizontal`)return{x:le({axis:n,ticks:i,bandSize:s,entry:e,index:c}),y:(h(l)?null:r.scale.map(l))??null,value:l,payload:e};var u=h(l)?null:n.scale.map(l),d=le({axis:r,ticks:a,bandSize:s,entry:e,index:c});return u==null||d==null?null:{x:u,y:d,value:l,payload:e}}).filter(Boolean)}function Wt(e){var t=M(e,X),n=A();return z.createElement(ue,{id:t.id,type:`line`},e=>z.createElement(z.Fragment,null,z.createElement(me,{legendPayload:Nt(t)}),z.createElement(Pt,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),z.createElement(De,{type:`line`,id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),z.createElement(Ht,q({},t,{id:e}))))}var Z=z.memo(Wt,Se);Z.displayName=`Line`;var Gt=[`axis`],Kt=(0,z.forwardRef)((e,t)=>z.createElement(Te,{chartName:`LineChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:Gt,tooltipPayloadSearcher:ke,categoricalChartProps:e,ref:t})),Q=r(),qt=[{id:`optimizer.reward`,label:`Mean reward`,points:[]},{id:`reward.variance`,label:`Reward variance`,points:[]},{id:`optimizer.kl`,label:`Policy update KL`,points:[]},{id:`optimizer.policy_loss`,label:`Policy loss`,points:[]},{id:`optimizer.learning_rate`,label:`Learning rate`,points:[],format:`scientific`}];function Jt({series:e,loading:t=!1,live:n=!1}){let[r,i]=(0,z.useState)(`raw`),a=(0,z.useMemo)(()=>{let r=e.filter(e=>e.points.length);if(!t&&!n)return r;let i=new Map(r.map(e=>[e.id,e]));for(let e of qt)i.has(e.id)||i.set(e.id,e);return[...i.values()]},[n,t,e]),o=a.some(e=>e.points.length>1);return a.length?(0,Q.jsxs)(`section`,{className:`training-metric-workbench`,"aria-label":`Training metrics`,children:[o?(0,Q.jsx)(`div`,{className:`training-metric-workbench-controls`,children:(0,Q.jsx)(Pe,{compact:!0,floating:!0,label:`Metric display`,value:r,options:[{value:`raw`,label:`Raw values`},{value:`smoothed`,label:`Smoothed trend`}],onChange:e=>i(e)})}):null,(0,Q.jsx)(`div`,{className:`training-metric-chart-grid`,children:a.map(e=>(0,Q.jsx)(Yt,{display:r,loading:t&&!e.points.length,metric:e,pending:n&&!e.points.length},e.id))})]}):(0,Q.jsx)(`div`,{className:`training-run-placeholder`,children:`This run did not report chartable metrics.`})}var Yt=(0,z.memo)(function({metric:e,display:t,loading:n,pending:r}){let i=(0,z.useMemo)(()=>t===`smoothed`?Qt(e.points,3):e.points,[t,e.points]),a=(0,z.useMemo)(()=>e.points.length?$t(e.points.map(e=>e.value)):null,[e.points]),o=t=>en(t,e.format),s=e.xLabel??`training step`;return(0,Q.jsxs)(`article`,{className:`training-metric-chart-card`,children:[(0,Q.jsxs)(`header`,{children:[(0,Q.jsxs)(`div`,{className:`training-metric-chart-title`,children:[(0,Q.jsx)(`h4`,{children:e.label}),(0,Q.jsx)(`span`,{children:e.points.length?`${e.points.length} ${e.points.length===1?`point`:`points`}`:r?`Live`:`No data`})]}),(0,Q.jsx)(`div`,{className:`training-metric-chart-header-actions`,children:a?(0,Q.jsx)(`strong`,{children:o(a.latest)}):null})]}),e.points.length?(0,Q.jsx)(`div`,{className:`training-metric-card-chart`,"aria-label":`${e.label} by ${s}`,children:(0,Q.jsx)(Ee,{height:`100%`,width:`100%`,children:(0,Q.jsxs)(Kt,{data:i,margin:{top:18,right:18,bottom:4,left:0},children:[(0,Q.jsx)(we,{stroke:`var(--border-default)`,strokeDasharray:`3 4`,vertical:!1}),(0,Q.jsx)(Ce,{axisLine:!1,dataKey:`step`,fontSize:10,stroke:`var(--text-muted)`,tickLine:!1}),(0,Q.jsx)(ye,{axisLine:!1,dataKey:`value`,domain:e.bounds??(e.format===`percent`?[0,1]:[`auto`,`auto`]),fontSize:10,stroke:`var(--text-muted)`,tickFormatter:o,tickLine:!1,width:66}),(0,Q.jsx)(p,{content:t=>(0,Q.jsx)(Xt,{active:t.active,format:o,label:e.label,payload:t.payload,xLabel:s}),isAnimationActive:!1}),(0,Q.jsx)(Z,{activeDot:{fill:`var(--accent-primary)`,r:5},dataKey:`value`,dot:{fill:`var(--accent-primary)`,r:2.5},isAnimationActive:!1,stroke:`var(--accent-primary)`,strokeWidth:2,type:`monotone`})]})})}):(0,Q.jsxs)(`div`,{className:n?`training-metric-chart-empty is-loading`:`training-metric-chart-empty`,children:[n?(0,Q.jsxs)(`span`,{className:`sr-only`,children:[`Loading `,e.label]}):null,n?null:(0,Q.jsx)(`span`,{children:r?`Waiting for rollout…`:`No data reported`})]}),a?(0,Q.jsxs)(`dl`,{className:`training-metric-card-stats`,children:[(0,Q.jsx)($,{label:`Mean`,value:o(a.mean)}),(0,Q.jsx)($,{label:`Min`,value:o(a.min)}),(0,Q.jsx)($,{label:`Max`,value:o(a.max)}),(0,Q.jsx)($,{label:`Std. dev.`,value:o(a.standardDeviation)})]}):null]})});function Xt({active:e,payload:t,label:n,format:r,xLabel:i}){if(!e||!t.length)return null;let a=t[0]?.payload;return typeof a?.value==`number`?(0,Q.jsxs)(`div`,{className:`training-chart-tooltip`,children:[(0,Q.jsxs)(`strong`,{children:[Zt(i),` `,String(a.step??`—`)]}),(0,Q.jsx)(`dl`,{children:(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`dt`,{children:n}),(0,Q.jsx)(`dd`,{children:r(a.value)})]})})]}):null}function Zt(e){return e.replace(/^./,e=>e.toUpperCase())}function $({label:e,value:t}){return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`dt`,{children:e}),(0,Q.jsx)(`dd`,{children:t})]})}function Qt(e,t){return e.map((n,r)=>{let i=e.slice(Math.max(0,r-t+1),r+1);return{step:n.step,value:i.reduce((e,t)=>e+t.value,0)/i.length}})}function $t(e){let t=[...e].sort((e,t)=>e-t),n=e.reduce((e,t)=>e+t,0)/e.length,r=e.reduce((e,t)=>e+(t-n)**2,0)/e.length;return{latest:e.at(-1),mean:n,min:t[0],max:t.at(-1),standardDeviation:Math.sqrt(r)}}function en(e,t=`number`){return t===`percent`?`${(e*100).toFixed(2)}%`:t===`scientific`?e.toExponential(2):Math.abs(e)>=1e3?e.toLocaleString(void 0,{maximumFractionDigits:2}):e.toFixed(4)}var tn=n();function nn(e){let t=(0,z.useId)(),[n,r]=(0,z.useState)(null),i=e=>{let t=e.currentTarget.getBoundingClientRect();r({left:Math.max(12,Math.min(t.left,window.innerWidth-292)),top:Math.max(12,Math.min(t.bottom+8,window.innerHeight-168))})};return(0,z.useEffect)(()=>{if(!n)return;let e=()=>r(null),t=t=>{t.key===`Escape`&&e()};return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e),window.removeEventListener(`keydown`,t)}},[n]),{hideTooltip:()=>r(null),triggerProps:{"aria-describedby":n?t:void 0,onPointerEnter:i,onPointerLeave:()=>r(null),onFocus:i,onBlur:()=>r(null)},tooltip:n?(0,tn.createPortal)((0,Q.jsx)(`aside`,{role:`tooltip`,id:t,className:`run-evidence-tooltip`,style:n,children:e}),document.body):null}}function rn({recovery:e,compact:t=!1,sourceJobId:n}){if(!e)return null;let r=P(`runs`,null,{area:`console`,resourceId:`hosted-job:${n??e.sourceJobId}`}),i=P(`runs`,null,{area:`console`,resourceId:`hosted-job:${e.checkpointJobId??e.sourceJobId}`}),a=N(r),o=`${N(i)}#outputs`;return(0,Q.jsxs)(`span`,{className:`training-recovery-lineage${t?` compact`:``}`,children:[(0,Q.jsx)(`span`,{children:`Resumed from`}),(0,Q.jsxs)(`a`,{className:`app-tooltip`,"data-tooltip":`Open source run`,"aria-label":`Open recovery source run ${n??e.sourceJobId}`,href:a,onClick:e=>{e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),Ne(r))},children:[(n??e.sourceJobId).slice(0,6),`…`]}),(0,Q.jsxs)(`a`,{className:`app-tooltip`,"data-tooltip":`Inspect recovery checkpoint in source outputs`,"aria-label":`Inspect recovery checkpoint ${e.checkpointId}`,href:o,children:[e.checkpointId.slice(0,6),`…`]}),e.replayGroups?.length?(0,Q.jsxs)(`span`,{children:[e.replayCompleted?`Replayed`:`Replaying`,` `,e.replayGroups.length===1?`group`:`groups`,` `,e.replayGroups.map(e=>e.groupIndex+1).join(`, `),` after checkpoint restore · Previous update was not saved`]}):null,(0,Q.jsxs)(`span`,{children:[`Checkpoint recovery`,t?``:` · policy v${e.policyVersion} · ${e.completedGroups} inherited groups · ${e.optimizerStateRestored?`optimizer checkpoint restored`:`optimizer checkpoint not restored yet`}`]})]})}function an({continuation:e,recovery:t,compact:n=!1}){if(t)return(0,Q.jsx)(rn,{recovery:t,compact:n});if(!e)return null;let r=N(P(`runs`,null,{area:`console`,resourceId:`hosted-run:${e.sourceJobId}`})),i=e=>`${e.slice(0,6)}…`;return(0,Q.jsxs)(`div`,{className:`training-run-lineage${n?` training-run-lineage-compact`:``}`,children:[n?null:(0,Q.jsx)(`span`,{children:`Continues from`}),(0,Q.jsxs)(`a`,{href:r,"aria-label":`Open parent run ${e.sourceJobId}`,children:[(0,Q.jsx)(Ie,{size:12,"aria-hidden":!0}),i(e.sourceJobId)]}),(0,Q.jsxs)(`a`,{href:`${r}#outputs`,"aria-label":`Inspect checkpoint ${e.checkpointId} in parent run outputs`,children:[(0,Q.jsx)(Be,{size:12,"aria-hidden":!0}),i(e.checkpointId)]})]})}function on({continuation:e}){return e?.optimizerMode===`reset`?(0,Q.jsx)(`span`,{className:`training-optimizer-reset app-tooltip`,"data-tooltip":`Optimizer state reset; parent adapter weights retained`,"aria-label":`Optimizer state reset for this run`,children:`Optimizer reset`}):null}function sn({continuation:e}){return(0,Q.jsxs)(`div`,{className:`training-adapter-stack`,"aria-label":`Continual adapter lineage`,children:[(0,Q.jsxs)(`div`,{className:`training-adapter-parent`,children:[(0,Q.jsx)(`span`,{children:`Frozen parent`}),(0,Q.jsx)(`b`,{children:e.parentRank?`Rank ${e.parentRank}`:`Rank unavailable`})]}),(0,Q.jsxs)(`div`,{className:`training-adapter-current`,children:[(0,Q.jsx)(`strong`,{children:`Continual learning`}),(0,Q.jsx)(`span`,{children:`This update`}),(0,Q.jsx)(`b`,{children:e.trainableRank?`Rank ${e.trainableRank}`:`Rank unavailable`}),(0,Q.jsx)(`small`,{children:e.materialized?`Parent materialized`:`Materialization pending`})]})]})}function cn({enabled:e}){let t=e===void 0?`Continual learning configuration is loading.`:`Continual learning ${e?`is configured`:`is not configured`} for this run. This setting does not indicate current execution.`,{triggerProps:n,tooltip:r}=nn(t);return(0,Q.jsxs)(`span`,{...n,tabIndex:0,className:`training-continual-setting`,"aria-label":t,children:[`Continual learning`,` `,(0,Q.jsxs)(`small`,{className:`training-continual-badge${e===void 0?` pending`:e?``:` off`}`,children:[e?(0,Q.jsx)(Fe,{size:10,"aria-hidden":`true`}):null,e===void 0?`…`:e?`On`:`Off`]}),r]})}export{rn as a,Re as c,an as i,ze as l,on as n,nn as o,sn as r,Jt as s,cn as t};
@@ -1 +0,0 @@
1
- export{_ as WorkSidebarPanel}from"./MainPane-WOeodByM.js";
@@ -1,11 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FilePagePreview-C6wIp6uX.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/index-LXNhSUEL.js","assets/index-g7UqJhnX.css","assets/icons-CZxmQtZs.js","assets/App-DmEA-Lia.js","assets/useQuery-CCjwL8VI.js","assets/schemas-C9IwV7NS.js","assets/common-CFsO2ppZ.js","assets/settings-DdonLCIN.js","assets/client-choice-storage-DUWsS4X0.js","assets/api-client-Dgz-fOMl.js","assets/requests-DjSt-duM.js","assets/create-pipeline-DRR0Qeec.js","assets/profile-ref-CCxrOCio.js","assets/chunk-H3JZ3P5T-CzpTARDY.js","assets/work-outputs-CnbRtTLg.js","assets/training-QBuGBGJd.js","assets/chunk-GJRXJL6G-luaxRTYI.js","assets/chunk-GHPCQXG5-DKDBSd8H.js","assets/reward-checks-D139zwha.js","assets/intake-contracts-wCkD2ErR.js","assets/chunk-JDQVAG3R-C0-rh1aR.js","assets/ponder-desktop-D-zB6X4L.js","assets/chat-resources-BUDXdoG0.js","assets/app-models-CKXrDTEU.js","assets/model-display-zPvC4L2B.js","assets/submit-issue-command-Gk3RKrY-.js","assets/connected-app-mentions-D3wRZLwI.js","assets/profile-agent-labels-Duh96b8x.js","assets/browser-sidebar-links-D9v2cyJa.js","assets/browser-url-LACq2Ngu.js","assets/query-scope-BRpcgljO.js","assets/createLucideIcon-Bv-_eGcE.js","assets/bot-Cd761lRF.js","assets/chevron-down-DEbd6Ek-.js","assets/chevron-right-DLYNg_Oq.js","assets/copy-BGOhV6Pk.js","assets/external-link-CVXsNeO3.js","assets/loader-circle-JFgFNsP5.js","assets/maximize-2-DXZCQO0b.js","assets/message-square-cOCAL8J1.js","assets/plus-Ddp1vXnw.js","assets/refresh-cw-D45mW-vs.js","assets/square-terminal-DS3zwi6X.js","assets/x-B-_zJVOZ.js","assets/AppToastContext-D2788RqX.js","assets/models-route-CWcJuOd0.js","assets/NativeSetupTerminal-fmG2c65K.js","assets/AppDialog-BvskhHE9.js","assets/PageChrome-8gH2hyDb.js","assets/NativeSetupTerminal-3eR9D_R3.css","assets/organization-types-PP-yuR2J.js","assets/ui-theme.generated-D-mc26qt.js","assets/App-DpFKLxuA.css","assets/pdf.worker.min-BrEVksTu.js","assets/WorkspacePdfPreview-CU6PSjjN.js","assets/WorkspaceMonacoEditor-BrZs6-EW.js","assets/WorkspaceMonacoEditor-C5uazxST.css","assets/WorkspacePresentationPreview-IjXVXpIy.js","assets/WorkspaceFileLocation-D-ctFM4d.js","assets/aiden0z-pptx-renderer.es-Bo43EjzT.js","assets/jszip.min-BWcKrrYP.js"])))=>i.map(i=>d[i]);
2
- import{i as e,n as t}from"./rolldown-runtime-Dd_uD5pT.js";import{g as n,m as r,t as i}from"./index-LXNhSUEL.js";import{t as a}from"./useQuery-CCjwL8VI.js";import{a as o,m as s,o as c,p as l,r as u,v as d}from"./schemas-C9IwV7NS.js";import{n as f,o as p}from"./client-choice-storage-DUWsS4X0.js";import{n as m}from"./create-pipeline-DRR0Qeec.js";import{n as ee}from"./app-models-CKXrDTEU.js";import{t as h}from"./query-scope-BRpcgljO.js";import"./icons-CZxmQtZs.js";import{t as g}from"./createLucideIcon-Bv-_eGcE.js";import{A as _,B as te,E as ne,F as re,L as v,M as y,R as b,T as x,V as ie,_ as ae,a as oe,b as S,c as se,f as C,g as ce,h as le,j as ue,m as de,n as fe,o as pe,r as me,s as he,t as ge,v as _e,x as ve,y as ye}from"./training-model-data-CxR3xpmK.js";import{t as be}from"./chevron-up-DFJJccDl.js";import{t as w}from"./folder-open-MnOmh19D.js";import{t as xe}from"./info-DYPIbKKD.js";import{t as Se}from"./loader-circle-JFgFNsP5.js";import{t as Ce}from"./maximize-2-DXZCQO0b.js";import{t as we}from"./message-square-cOCAL8J1.js";import{t as Te}from"./plus-Ddp1vXnw.js";import{t as T}from"./refresh-cw-D45mW-vs.js";import{t as Ee}from"./save-Gu4R_82E.js";import{t as De}from"./x-B-_zJVOZ.js";import{n as E,r as Oe}from"./AppToastContext-D2788RqX.js";import{B as ke,Bt as Ae,Fn as D,G as je,Gt as Me,H as Ne,J as Pe,Jt as O,K as Fe,L as Ie,O as Le,Pn as Re,R as ze,U as Be,V as Ve,W as k,Yt as A,Zt as j,_n as He,an as Ue,bn as M,dn as We,en as N,gn as Ge,hn as P,in as Ke,ln as qe,on as F,q as Je,un as Ye}from"./App-DmEA-Lia.js";import{n as I,t as L}from"./WorkspaceFileLocation-D-ctFM4d.js";var Xe=u([`local`,`sandbox`]),Ze=u([`pinned`,`saved_for_later`]),Qe=s({id:d().min(1),workspaceKind:Xe,workspaceId:d().min(1),workspaceName:d().min(1),path:d().min(1),status:Ze,order:l().int().nonnegative().nullable().default(null),sourceSessionId:d().min(1).nullable().default(null),available:c().default(!0),createdAt:d().min(1),updatedAt:d().min(1)});s({items:o(Qe)}),s({workspaceKind:Xe,workspaceId:d().trim().min(1),workspaceName:d().trim().min(1),path:d().trim().min(1),status:u([`pinned`,`saved_for_later`,`none`]),order:l().int().nonnegative().nullable().optional(),sourceSessionId:d().trim().min(1).nullable().optional()}),u([`pin`,`save_for_later`,`remove`,`list`]);function $e(e){let t=e.trim().replaceAll(`\\`,`/`);if(t=t.replace(/^(?:workspace|sandbox):file:/,``),t=t.replace(/^\/workspace\/app\//,``),t=t.replace(/^\.\//,``),!t||t.startsWith(`/`))throw Error(`File path must be relative to the workspace.`);let n=t.split(`/`).filter(e=>e&&e!==`.`);if(n.some(e=>e===`..`))throw Error(`File path cannot leave the workspace.`);if(n.length===0)throw Error(`File path is required.`);return n.join(`/`)}function et(e){return[`sidebar-file`,e.workspaceKind,encodeURIComponent(e.workspaceId),encodeURIComponent($e(e.path))].join(`:`)}var tt=g(`text-align-start`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]]),nt=g(`chevrons-up`,[[`path`,{d:`m17 11-5-5-5 5`,key:`e8nh98`}],[`path`,{d:`m17 18-5-5-5 5`,key:`2avn1x`}]]),rt=g(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),it=g(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),at=g(`panel-top`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),ot=g(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),st=g(`redo-2`,[[`path`,{d:`m15 14 5-5-5-5`,key:`12vg1m`}],[`path`,{d:`M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13`,key:`6uklza`}]]),ct=g(`undo-2`,[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]),R=e(n(),1),z=r();function lt({createRuntime:e,goalRuntime:t,subagentRuntime:n=null,onRunSubagentLifecycleAction:r}){let i=e?`Create/Improve Details`:`Goal Details`,a=e?H(e.run.state):n?.activeCount?n.label:t?.actionLabel??`No active goal`;return(0,z.jsxs)(`div`,{className:`goal-details-view`,"aria-label":i,children:[(0,z.jsxs)(`div`,{className:`goal-details-header`,children:[(0,z.jsxs)(`div`,{className:`goal-details-title`,children:[(0,z.jsx)(Ue,{size:15,"aria-hidden":`true`}),(0,z.jsx)(`span`,{children:i})]}),(0,z.jsx)(`span`,{className:`goal-details-state ${Ft(e?.run.state??null)}`,children:a})]}),(0,z.jsx)(`div`,{className:`goal-details-body`,children:e?(0,z.jsx)(ut,{runtime:e}):t||n?(0,z.jsx)(ft,{goalRuntime:t,subagentRuntime:n,onRunSubagentLifecycleAction:r}):(0,z.jsx)(At,{})})]})}function ut({runtime:e}){let t=e.run,n=t.plan,r=m(n?.metadata)??m(t.metadata),i=t.questions,a=i.filter(e=>e.status===`pending`),o=t.sourceRefs,s=t.checkRefs,c=t.state,l=t.target.kind===`agent`?t.target.defaultActionKey:null;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(V,{title:`Current Work`,children:(0,z.jsx)(jt,{rows:[[`State`,H(c)],[`Operation`,t.operation],[`Target`,H(t.target.kind)],[`Name`,t.target.displayName??t.target.id??`Pending`],[`Target ID`,t.target.id??`Pending`],[`Default action`,l??n?.defaultChatAction.key??`Pending`],[`Adapter`,H(t.adapter.kind)],[`Run`,t.id],[`Revision`,String(t.revision)]]})}),(0,z.jsx)(V,{title:`Plan`,children:n?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`goal-details-summary`,children:n.summary}),(0,z.jsx)(jt,{rows:[[`Objective`,n.objective],[`Context`,n.capturedContextSummary],[`Status`,H(n.status)],[`Plan ID`,n.id],[`Run ID`,n.runId],[`Approval`,n.approvalId??`Pending`],[`Approved`,n.approvedAt??`Not approved`]]})]}):a.length?(0,z.jsx)(`p`,{className:`goal-details-summary`,children:`Waiting for answers before the model finalizes the Create plan.`}):(0,z.jsx)(`p`,{className:`goal-details-summary`,children:`The model is preparing the Create plan.`})}),r?(0,z.jsxs)(V,{title:`Action Shape`,children:[(0,z.jsx)(jt,{rows:[[`Mode`,r.label],[`Default action`,r.defaultActionKey??`None`],[`Direct action`,r.directActionHint??`None planned`],[`Artifacts`,r.artifactPolicy]]}),(0,z.jsx)(`p`,{className:`goal-details-note`,children:r.detail})]}):null,i.length?(0,z.jsx)(V,{title:`Questions`,children:(0,z.jsx)(`div`,{className:`goal-details-list`,children:i.map(e=>(0,z.jsxs)(`article`,{className:`goal-details-list-item`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`strong`,{children:e.title}),(0,z.jsx)(`span`,{className:`goal-details-inline-state ${e.status}`,children:H(e.status)})]}),(0,z.jsx)(`p`,{children:e.prompt}),e.answer?(0,z.jsxs)(`small`,{children:[`Answer: `,e.answer.label??e.answer.value]}):e.options.length?(0,z.jsxs)(`small`,{children:[`Options: `,e.options.map(e=>e.label).join(`, `)]}):null]},e.id))})}):null,n?.requirements.length?(0,z.jsx)(V,{title:`Setup Requirements`,children:(0,z.jsx)(`div`,{className:`goal-details-list`,children:n.requirements.map(e=>(0,z.jsxs)(`article`,{className:`goal-details-list-item`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`strong`,{children:e.name}),(0,z.jsx)(`span`,{className:`goal-details-inline-state ${e.status}`,children:H(e.status)})]}),(0,z.jsxs)(`small`,{children:[H(e.kind),e.detail?`: ${e.detail}`:``]})]},`${e.kind}:${e.name}`))})}):null,n?.sourcePlan.length?(0,z.jsx)(V,{title:`Source Plan`,children:(0,z.jsx)(Mt,{refs:n.sourcePlan.map(e=>({id:`${e.operation}:${e.path}`,primary:e.path,secondary:`${H(e.operation)}: ${e.reason}`}))})}):null,n?.checks.length?(0,z.jsx)(V,{title:`Checks`,children:(0,z.jsx)(Mt,{refs:n.checks.map(e=>({id:e.name,primary:e.name,secondary:`${e.required?`Required`:`Optional`}: ${e.command}`}))})}):null,o.length||s.length?(0,z.jsx)(V,{title:`Run Refs`,children:(0,z.jsx)(Mt,{refs:[...o.map(e=>({id:`source:${e}`,primary:e,secondary:`Source ref`})),...s.map(e=>({id:`check:${e}`,primary:e,secondary:`Check ref`}))]})}):null,(0,z.jsx)(dt,{run:t}),t.blockedReason?(0,z.jsx)(V,{title:`Blocked`,children:(0,z.jsxs)(`div`,{className:`goal-details-alert`,children:[(0,z.jsx)(qe,{size:15}),(0,z.jsx)(`span`,{children:t.blockedReason})]})}):null,(0,z.jsx)(V,{title:`Raw State`,children:(0,z.jsxs)(`details`,{className:`goal-details-raw`,children:[(0,z.jsx)(`summary`,{children:`Show structured payload`}),(0,z.jsx)(`pre`,{children:JSON.stringify(t,null,2)})]})})]})}function dt({run:e}){let t=[...e.context.attachments.map(e=>({id:`attachment:${e.id??e.name}`,primary:e.name,secondary:e.ref??e.mediaType??`Attachment`})),...e.context.apps.map(e=>({id:`app:${e.id}`,primary:e.name,secondary:e.required?`Required app context`:`Optional app context`})),...e.context.tools.map(e=>({id:`tool:${e.name}`,primary:e.name,secondary:e.outputSummary??e.inputSummary??`Tool context`})),...e.context.targetRepoAssumptions.map(e=>({id:`target:${e}`,primary:e,secondary:`Target assumption`}))],n=e.workflowCapture,r=n?[...n.files.map(e=>({id:`workflow-file:${e}`,primary:e,secondary:`Captured file`})),...n.outputArtifacts.map(e=>({id:`workflow-artifact:${e}`,primary:e,secondary:`Output artifact`})),...n.traceRefs.map(e=>({id:`workflow-trace:${e}`,primary:e,secondary:`Trace`}))]:[];return!t.length&&!r.length?null:(0,z.jsx)(V,{title:`Context`,children:(0,z.jsx)(Mt,{refs:[...t,...r]})})}function ft({goalRuntime:e,subagentRuntime:t,onRunSubagentLifecycleAction:n}){return(0,z.jsxs)(z.Fragment,{children:[e?(0,z.jsxs)(V,{title:`Goal`,children:[(0,z.jsx)(`p`,{className:`goal-details-summary`,children:e.objective}),(0,z.jsx)(jt,{rows:[[`Status`,e.actionLabel],[`Runtime`,e.timeLabel],[`Detail`,e.detail]]})]}):null,t?(0,z.jsx)(pt,{runtime:t,onRunSubagentLifecycleAction:n}):null,(0,z.jsx)(V,{title:`Raw State`,children:(0,z.jsxs)(`details`,{className:`goal-details-raw`,children:[(0,z.jsx)(`summary`,{children:`Show structured payload`}),(0,z.jsx)(`pre`,{children:JSON.stringify({goalRuntime:e,subagentRuntime:t},null,2)})]})})]})}function pt({runtime:e,onRunSubagentLifecycleAction:t}){let[n,r]=(0,R.useState)(null),[i,a]=(0,R.useState)(null);Oe(i);let o=async(e,n)=>{if(!t)return;let i=`${e}:${n}`;r(i),a(null);try{await t({runId:e,action:n})}catch(e){a(e instanceof Error?e.message:String(e))}finally{r(e=>e===i?null:e)}};return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(V,{title:`Subagents`,children:[(0,z.jsx)(jt,{rows:[[`Latest update`,bt(e)],[`Active`,String(e.activeCount)],[`Completed`,String(e.completedCount)],[`Failed`,String(e.failedCount)],[`Cancelled`,String(e.cancelledCount)],[`Paused`,String(e.needsResumeCount)],[`Terminal`,String(e.terminalCount)],[`Usage`,xt(e.usage.totalTokens,e.usage.requestCount)],[`Evidence`,String(e.evidenceRefs.length)],[`Checks`,String(e.testsRunCount)]]}),e.blockers.length>0?(0,z.jsx)(`ul`,{className:`goal-details-list compact`,children:e.blockers.slice(0,4).map(e=>(0,z.jsxs)(`li`,{className:`goal-details-list-item`,children:[(0,z.jsx)(`span`,{className:`goal-details-inline-state ${e.status}`,children:e.status}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`strong`,{children:St(e.roleId)}),(0,z.jsx)(`p`,{children:e.message})]})]},`${e.runId}:${e.message}`))}):null,(0,z.jsx)(`ul`,{className:`goal-details-list`,children:e.runs.slice(0,8).map(e=>(0,z.jsxs)(`li`,{className:`goal-details-list-item`,children:[(0,z.jsx)(`span`,{className:`goal-details-inline-state ${e.status}`,children:e.status}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`strong`,{children:St(e.roleId)}),(0,z.jsx)(`p`,{children:e.objective}),e.report?.summary?(0,z.jsx)(`small`,{children:e.report.summary}):null,t?(0,z.jsx)(B,{pendingAction:n,run:e,onRun:o}):null]})]},e.id))})]}),e.finalResults.length>0?(0,z.jsx)(mt,{results:e.finalResults}):null]})}function mt({results:e}){return(0,z.jsx)(V,{title:`Child Results`,children:(0,z.jsx)(`ol`,{className:`goal-details-task-graph`,children:e.slice(0,6).map(e=>(0,z.jsxs)(`li`,{className:`goal-details-task-node`,children:[(0,z.jsxs)(`div`,{className:`goal-details-task-node-header`,children:[(0,z.jsx)(`span`,{className:`goal-details-inline-state ${e.status}`,children:e.status}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`strong`,{children:St(e.roleId)}),(0,z.jsx)(`small`,{children:e.objective})]})]}),(0,z.jsx)(`p`,{children:e.summary}),(0,z.jsxs)(`div`,{className:`goal-details-task-node-meta`,children:[(0,z.jsxs)(`span`,{children:[e.refs.length,` refs`]}),(0,z.jsxs)(`span`,{children:[e.testsRun.length+e.validationAttempts.length,` checks`]}),(0,z.jsxs)(`span`,{children:[e.blockers.length,` blockers`]}),(0,z.jsx)(`span`,{children:e.confidence?`${H(e.confidence)} confidence`:`Confidence unknown`})]}),e.findings.length>0?(0,z.jsxs)(`small`,{children:[`Findings: `,Et(e.findings,3)]}):null,e.changedFiles.length>0?(0,z.jsxs)(`small`,{children:[`Files: `,Et(e.changedFiles,4)]}):null,e.testsRun.length>0?(0,z.jsxs)(`small`,{children:[`Tests: `,Et(e.testsRun,3)]}):null,e.validationAttempts.length>0?(0,z.jsxs)(`small`,{children:[`Validation: `,Et(e.validationAttempts,2)]}):null,e.refs.length>0?(0,z.jsxs)(`small`,{children:[`Refs: `,Et(e.refs.map(Ct),4)]}):null,e.blockers.length>0?(0,z.jsxs)(`small`,{children:[`Blockers: `,Et(e.blockers,3)]}):null,e.workspaceRetention?(0,z.jsxs)(`small`,{children:[`Workspace: `,Tt(e.workspaceRetention)]}):null,e.importantMessages.length>0?(0,z.jsxs)(`small`,{children:[`Messages: `,Et(e.importantMessages.map(wt),2)]}):null]},e.runId))})})}function B({pendingAction:e,run:t,onRun:n}){let r=ht(t);return r.length===0?null:(0,z.jsx)(`div`,{className:`goal-details-actions`,children:r.map(r=>{let i=e===`${t.id}:${r}`;return(0,z.jsx)(`button`,{type:`button`,disabled:!!e,onClick:()=>void n(t.id,r),children:i?`Working...`:gt(r)},r)})})}function ht(e){let t=[],n=_t(e),r=vt(e);return n&&t.push(`cleanup`),r&&t.push(`archive`),t}function gt(e){return e===`cleanup`?`Clean`:e===`archive`?`Archive`:`Clean + archive`}function _t(e){if(!yt(e))return!1;let t=Nt(e.metadata);if(!t?.subagentWorkspace&&!t?.workspaceHandoff)return!1;let n=Pt(Nt(Nt(t.lifecycleCleanup)?.workspaceCleanup)?.status);return n!==`removed`&&n!==`deleted`&&n!==`retained`&&n!==`skipped`}function vt(e){if(!e.childSessionId||!yt(e))return!1;let t=Pt(Nt(Nt(e.metadata)?.childSessionArchive)?.status);return t!==`archived`&&t!==`already_archived`}function yt(e){return e.status===`completed`||e.status===`failed`||e.status===`cancelled`}function bt(e){let t=e.latestMeaningfulUpdate;return t?`${St(t.roleId)} ${t.status}: ${t.message}`:`No structured update`}function xt(e,t){if(e<=0&&t<=0)return`0 tokens`;let n=`${t} ${t===1?`request`:`requests`}`;return`${Dt(e)} tokens · ${n}`}function St(e){return e.slice(0,1).toUpperCase()+e.slice(1).replace(/[-_]+/g,` `)}function Ct(e){return`${e.kind}: ${e.label}`}function wt(e){return`${H(e.kind)}: ${e.body}`}function Tt(e){return`retained ${e.expiresAt?`until ${Ot(e.expiresAt)}`:`for inspection`}${e.trigger?` · ${H(e.trigger)}`:``}`}function Et(e,t){let n=e.slice(0,t),r=e.length-n.length;return r>0?`${n.join(`, `)} +${r}`:n.join(`, `)}function Dt(e){if(e<1e3)return String(e);if(e>=1e6){let t=e/1e6;return`${kt(t,t<10?2:1)}M`}let t=e/1e3;return`${kt(t,+(t<10))}k`}function Ot(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString([],{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`})}function kt(e,t){return e.toFixed(t).replace(/\.0+$/,``).replace(/(\.\d*?)0+$/,`$1`)}function At(){return(0,z.jsxs)(`div`,{className:`goal-details-empty`,children:[(0,z.jsx)(Ue,{size:18}),(0,z.jsx)(`span`,{children:`No active Goal or Create workflow.`})]})}function V({children:e,title:t}){return(0,z.jsxs)(`section`,{className:`goal-details-section`,children:[(0,z.jsx)(`h2`,{children:t}),e]})}function jt({rows:e}){return(0,z.jsx)(`dl`,{className:`goal-details-grid`,children:e.map(([e,t])=>(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{children:e}),(0,z.jsx)(`dd`,{children:t})]},e))})}function Mt({refs:e}){return(0,z.jsx)(`ul`,{className:`goal-details-ref-list`,children:e.map(e=>(0,z.jsxs)(`li`,{children:[(0,z.jsx)(`code`,{title:e.primary,children:e.primary}),(0,z.jsx)(`span`,{children:e.secondary})]},e.id))})}function Nt(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:null}function Pt(e){return typeof e==`string`&&e.trim()?e.trim():null}function H(e){return e.split(/[_-]/g).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function Ft(e){return e===`ready_local`||e===`published_hosted`?`success`:e===`blocked`||e===`failed`||e===`cancelled`?`danger`:e===`awaiting_questions`||e===`awaiting_plan_approval`?`warning`:`active`}function It({sandboxId:e,connection:t}){let[n,r]=(0,R.useState)(null),[i,a]=(0,R.useState)([]),[o,s]=(0,R.useState)(null),[c,l]=(0,R.useState)(null),[u,d]=(0,R.useState)(null),[f,p]=(0,R.useState)(null);Oe(u,{prefix:`Sandbox`}),Oe(f,{prefix:`Sandbox integrations`});let m=n?.integrationLeases??[],ee=(0,R.useMemo)(()=>i.filter(e=>e.status===`active`),[i]),h=(0,R.useMemo)(()=>zt(n),[n]),g=(0,R.useCallback)(async()=>{if(!t)d(`OpenPond App server is not connected.`);else if(!e)r(null),a([]),d(null);else{s(`summary`),d(null);try{let n=await M.sandbox(t,e),i=await M.integrationConnections(t,Lt(n.sandbox));r(n.sandbox),a(i.connections),p(null)}catch(e){d(e instanceof Error?e.message:String(e))}finally{s(null)}}},[t,e]),_=(0,R.useCallback)(async()=>{if(t&&n){l(`load`),p(null);try{let[e,i]=await Promise.all([M.integrationConnections(t,Lt(n)),M.sandboxIntegrationLeases(t,n.id)]);a(e.connections),r(i.sandbox)}catch(e){p(e instanceof Error?e.message:String(e))}finally{l(null)}}},[t,n]),te=(0,R.useCallback)(async e=>{if(!t||!n)return;let i=D(e.provider),a=i?Re(i):null,o=a?.leasePolicy.allowedCapabilityIds??[];if(!i||!a?.leasePolicy.leaseable||o.length===0)p(`${U(e.provider)} cannot be attached to this sandbox.`);else{l(`attach:${e.id}`),p(null);try{let i=await M.attachSandboxIntegrationConnection(t,n.id,{connectionId:e.id,provider:e.provider,capabilities:o,...e.scopes.length>0?{scopes:e.scopes}:{},...a.leasePolicy.defaultTtlSeconds?{ttlSeconds:a.leasePolicy.defaultTtlSeconds}:{},required:!1});r(i.sandbox)}catch(e){p(e instanceof Error?e.message:String(e))}finally{l(null)}}},[t,n]),ne=(0,R.useCallback)(async e=>{if(t&&n){l(`remove:${e}`),p(null);try{let i=await M.removeSandboxIntegrationLease(t,n.id,e);r(i.sandbox)}catch(e){p(e instanceof Error?e.message:String(e))}finally{l(null)}}},[t,n]);return(0,R.useEffect)(()=>{g()},[g]),e?(0,z.jsxs)(`div`,{className:`sandbox-summary-tab`,children:[(0,z.jsxs)(`section`,{className:`sandbox-workspace-section`,children:[(0,z.jsxs)(`div`,{className:`sandbox-workspace-heading`,children:[(0,z.jsx)(`h3`,{children:`Sandbox`}),(0,z.jsxs)(`div`,{className:`sandbox-workspace-heading-actions`,children:[n?(0,z.jsx)(`span`,{children:n.state}):null,(0,z.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Refresh summary`,"aria-label":`Refresh summary`,disabled:o!==null,onClick:()=>void g(),children:o===`summary`?(0,z.jsx)(Se,{className:`spinning`,size:14}):(0,z.jsx)(T,{size:14})})]})]}),n?(0,z.jsxs)(`dl`,{className:`sandbox-workspace-kv`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{children:`Sandbox`}),(0,z.jsx)(`dd`,{children:Gt(n.id)})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{children:`Spend`}),(0,z.jsxs)(`dd`,{children:[qt(n.reservation.capturedUsd),` / `,qt(n.budget.maxUsd)]})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{children:`Reservation`}),(0,z.jsx)(`dd`,{children:n.reservation.status})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{children:`Idle cleanup`}),(0,z.jsx)(`dd`,{children:n.quotas?.idleTimeoutSeconds?`${Math.round(n.quotas.idleTimeoutSeconds/60)} min`:`-`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{children:`Updated`}),(0,z.jsx)(`dd`,{children:Kt(n.updatedAt)})]}),h?(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{children:`Receipt`}),(0,z.jsxs)(`dd`,{children:[Gt(h.id),` / `,qt(h.totalUsd)]})]}):null]}):(0,z.jsxs)(`div`,{className:`sandbox-workspace-loading`,children:[o===`summary`?(0,z.jsx)(Se,{className:`spinning`,size:16}):null,(0,z.jsx)(`span`,{children:o===`summary`?`Loading sandbox`:`Sandbox unavailable`})]})]}),(0,z.jsxs)(`section`,{className:`sandbox-workspace-section`,children:[(0,z.jsxs)(`div`,{className:`sandbox-workspace-heading`,children:[(0,z.jsx)(`h3`,{children:`Integrations`}),(0,z.jsxs)(`div`,{className:`sandbox-workspace-heading-actions`,children:[(0,z.jsx)(`span`,{children:m.length}),(0,z.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Refresh integrations`,"aria-label":`Refresh integrations`,disabled:c!==null||!n,onClick:()=>void _(),children:c===`load`?(0,z.jsx)(Se,{className:`spinning`,size:14}):(0,z.jsx)(T,{size:14})})]})]}),m.length>0?(0,z.jsx)(`div`,{className:`sandbox-workspace-integration-list`,children:m.map(e=>(0,z.jsxs)(`div`,{className:`sandbox-workspace-integration-row`,children:[(0,z.jsxs)(`div`,{className:`sandbox-workspace-integration-main`,children:[(0,z.jsx)(`span`,{children:U(e.provider)}),(0,z.jsxs)(`small`,{children:[e.required?`required`:`optional`,` / `,Ht(e),` / `,Rt(e)]})]}),(0,z.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Revoke ${U(e.provider)} lease`,"aria-label":`Revoke ${U(e.provider)} lease`,disabled:c!==null,onClick:()=>void ne(e.leaseId),children:c===`remove:${e.leaseId}`?(0,z.jsx)(Se,{className:`spinning`,size:14}):(0,z.jsx)(re,{size:14})}),(0,z.jsxs)(`div`,{className:`sandbox-workspace-chip-row`,children:[e.capabilities.slice(0,5).map(t=>(0,z.jsx)(`span`,{children:Vt(e.provider,t)},t)),e.capabilities.length>5?(0,z.jsxs)(`span`,{children:[`+`,e.capabilities.length-5]}):null]})]},e.leaseId))}):(0,z.jsx)(`p`,{className:`sandbox-workspace-empty`,children:`No active integration leases.`}),ee.length>0?(0,z.jsx)(`div`,{className:`sandbox-workspace-integration-list`,children:ee.map(e=>{let t=m.some(t=>t.provider===e.provider),n=Bt(e)?.leasePolicy.allowedCapabilityIds.length??0;return(0,z.jsxs)(`div`,{className:`sandbox-workspace-integration-row compact`,children:[(0,z.jsxs)(`div`,{className:`sandbox-workspace-integration-main`,children:[(0,z.jsx)(`span`,{children:Ut(e)}),(0,z.jsx)(`small`,{children:Wt(e,n)})]}),(0,z.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:t?`${U(e.provider)} already attached`:`Attach ${U(e.provider)}`,"aria-label":t?`${U(e.provider)} already attached`:`Attach ${U(e.provider)}`,disabled:t||c!==null||n===0,onClick:()=>void te(e),children:c===`attach:${e.id}`?(0,z.jsx)(Se,{className:`spinning`,size:14}):(0,z.jsx)(ot,{size:14})})]},e.id)})}):(0,z.jsx)(`p`,{className:`sandbox-workspace-empty`,children:`No connected accounts available.`})]})]}):(0,z.jsx)(`div`,{className:`sandbox-summary-tab`,children:(0,z.jsx)(`p`,{className:`sandbox-workspace-empty`,children:`No sandbox is attached yet.`})})}function Lt(e){return{status:`active`}}function Rt(e){return e.proxyUrl?`runtime proxy available`:`metadata only, no runtime proxy`}function zt(e){return e?.receipts?.at(-1)??null}function Bt(e){let t=D(e.provider);return t?Re(t):null}function U(e){let t=D(e),n=t?Re(t):null;return n?n.label:e===`microsoft_teams`?`Microsoft Teams`:e?e.replace(/_/g,` `):`Integration`}function Vt(e,t){let n=D(e);return(n?Re(n):null)?.capabilities.find(e=>e.id===t)?.label??t}function Ht(e){return e.expiresAt?`expires ${Kt(e.expiresAt)}`:`active`}function Ut(e){let t=e.providerAccountName?.trim();return t?`${U(e.provider)} / ${t}`:U(e.provider)}function Wt(e,t){let n=[];return e.providerWorkspaceName&&n.push(e.providerWorkspaceName),n.push(`${t} lease ${t===1?`capability`:`capabilities`}`),e.scopes.length>0&&n.push(`${e.scopes.length} ${e.scopes.length===1?`scope`:`scopes`}`),n.join(` / `)}function Gt(e){return e.length>10?`${e.slice(0,8)}...`:e}function Kt(e){if(!e)return`-`;let t=new Date(e);return Number.isNaN(t.valueOf())?`-`:new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}).format(t)}function qt(e){let t=Number(e??0);return new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`,maximumFractionDigits:t>=10?2:4}).format(Number.isFinite(t)?t:0)}function Jt({summary:e}){let t=he(e.taskset),n=e.taskset.learningSignals.demonstrations.filter(e=>e.approved).length,r=e.taskset.tasks.filter(e=>e.split===`frozen_eval`).length,i=e.plan?.recipe.method===`sft`||e.plan?.recipe.method===`grpo`?e.plan.recipe:null,a=C(e.taskset,e.plan),o=e.job?se(e.job.status,e.job.completedAt,e.job.updatedAt):null;return(0,z.jsxs)(`div`,{className:`training-sidebar-summary`,children:[(0,z.jsxs)(`header`,{children:[(0,z.jsx)(`h2`,{children:oe(e.taskset.name,t)}),(0,z.jsx)(`span`,{children:e.job?pe(e.job.status):e.taskset.readiness?.ready?`Ready to train`:`Needs review`})]}),(0,z.jsxs)(`section`,{children:[(0,z.jsx)(`h3`,{children:`Run`}),(0,z.jsxs)(`dl`,{children:[(0,z.jsx)(W,{label:`Primary recommendation`,value:t.toUpperCase()}),(0,z.jsx)(W,{label:`Training stage`,value:a}),(0,z.jsx)(W,{label:`Base model`,value:i?.baseModel.id??`Not selected`}),(0,z.jsx)(W,{label:`Compute`,value:e.plan?ge(e.plan.destinationId):`Not selected`}),(0,z.jsx)(W,{label:`Started`,value:fe(e.job?.startedAt??null)}),(0,z.jsx)(W,{label:`Duration`,value:me(e.job?.startedAt??null,o)})]})]}),(0,z.jsxs)(`section`,{children:[(0,z.jsx)(`h3`,{children:`Data`}),(0,z.jsxs)(`dl`,{children:[(0,z.jsx)(W,{label:`Training examples`,value:String(n)}),(0,z.jsx)(W,{label:`Test examples`,value:String(r)}),(0,z.jsx)(W,{label:`Dataset sources`,value:String(e.taskset.sourceRefs.length)})]})]}),i?(0,z.jsxs)(`section`,{children:[(0,z.jsx)(`h3`,{children:`Recipe`}),(0,z.jsxs)(`dl`,{children:[i.method===`grpo`?(0,z.jsx)(W,{label:`RL loss`,value:i.loss.method===`gspo-token`?`GSPO-token`:i.loss.method.toUpperCase()}):null,(0,z.jsx)(W,{label:`LoRA rank`,value:String(i.lora.rank)}),(0,z.jsx)(W,{label:`Learning rate`,value:String(i.optimizer.learningRate)}),(0,z.jsx)(W,{label:`Optimizer steps`,value:String(i.optimizer.maxSteps)}),(0,z.jsx)(W,{label:i.method===`grpo`?`Prompt length`:`Sequence length`,value:String(i.method===`grpo`?i.dataset.maxPromptTokens:i.dataset.maxSequenceLength)})]})]}):null,(0,z.jsxs)(`section`,{children:[(0,z.jsx)(`h3`,{children:`Result`}),(0,z.jsxs)(`dl`,{children:[(0,z.jsx)(W,{label:`Adapter`,value:e.lineage?`${a} ready`:`Not created`}),(0,z.jsx)(W,{label:`Evaluation`,value:e.lineage?.frozenEvaluationArtifactId?`Completed`:`Not completed`}),(0,z.jsx)(W,{label:`Artifacts`,value:String(e.artifacts.length)})]})]})]})}function W({label:e,value:t}){return(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{children:e}),(0,z.jsx)(`dd`,{children:t})]})}function Yt(e){let t=Xt(``,``,`folder`);for(let n of e){let e=n.endsWith(`/`),r=n.split(`/`).filter(Boolean);if(r.length===0)continue;let i=t,a=``;for(let t=0;t<r.length;t+=1){let n=r[t];a=a?`${a}/${n}`:n;let o=!e&&t===r.length-1?`file`:`folder`,s=`${o}:${n}`,c=i.childMap.get(s);c||(c=Xt(n,a,o),i.childMap.set(s,c),i.children.push(c)),i=c}}return Zt(t.children)}function Xt(e,t,n){return{name:e,path:t,type:n,children:[],childMap:new Map}}function Zt(e){return e.sort((e,t)=>e.type===t.type?e.name.localeCompare(t.name):e.type===`folder`?-1:1).map(e=>({name:e.name,path:e.path,type:e.type,children:Zt(e.children)}))}function Qt({className:e,currentStatus:t,onSetStatus:n}){let r=t===`pinned`,i=t===`saved_for_later`;return(0,z.jsxs)(`span`,{className:`workspace-file-bookmark-actions ${e??`workspace-file-heading-actions`}`,children:[(0,z.jsx)(`button`,{type:`button`,className:r?`active`:void 0,"data-tooltip":r?`Unpin file`:`Pin file`,"aria-label":r?`Unpin file`:`Pin file`,"aria-pressed":r,onClick:()=>n(r?`none`:`pinned`),children:r?(0,z.jsx)(O,{size:14}):(0,z.jsx)(A,{size:14})}),(0,z.jsx)(`button`,{type:`button`,className:i?`active`:void 0,"data-tooltip":i?`Remove from Save for later`:`Save file for later`,"aria-label":i?`Remove from Save for later`:`Save file for later`,"aria-pressed":i,onClick:()=>n(i?`none`:`saved_for_later`),children:i?(0,z.jsx)(Ge,{size:14}):(0,z.jsx)(He,{size:14})})]})}function $t({changedByPath:e,expandedFolderPaths:t,rootPath:n,repoFiles:r,selectedPath:i,getFileBookmarkStatus:a,onOpenFile:o,onSetFileBookmarkStatus:s,onToggleFolder:c}){let l=(0,R.useMemo)(()=>Yt(r),[r]);return(0,z.jsxs)(`div`,{className:`workspace-file-tree-view`,children:[(0,z.jsxs)(`div`,{className:`workspace-file-tree-header`,children:[(0,z.jsx)(w,{size:14}),(0,z.jsx)(`strong`,{title:n??void 0,children:n?n.split(`/`).at(-1):`Files`}),(0,z.jsx)(`span`,{children:r.length})]}),(0,z.jsx)(`div`,{className:`workspace-file-tree`,children:l.map(r=>(0,z.jsx)(G,{changedByPath:e,expandedFolderPaths:t,node:r,rootPath:n,selectedPath:i,getFileBookmarkStatus:a,onOpenFile:o,onSetFileBookmarkStatus:s,onToggleFolder:c},`${r.type}:${r.path}`))})]})}function G({changedByPath:e,depth:t=0,expandedFolderPaths:n,node:r,rootPath:i,selectedPath:a,getFileBookmarkStatus:o,onOpenFile:s,onSetFileBookmarkStatus:c,onToggleFolder:l}){let u=i?`${i}/${r.path}`:r.path,d=r.type===`folder`&&n.has(u),f=e.get(u),p=2+t*11;return r.type===`folder`?(0,z.jsxs)(`div`,{className:`workspace-file-tree-node`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`workspace-file-tree-row folder`,"aria-expanded":d,style:{paddingLeft:p},onClick:()=>l(u),children:[d?(0,z.jsx)(w,{size:14}):(0,z.jsx)(Ke,{size:14}),(0,z.jsx)(`span`,{children:r.name})]}),d&&r.children.map(r=>(0,z.jsx)(G,{changedByPath:e,depth:t+1,expandedFolderPaths:n,node:r,rootPath:i,selectedPath:a,getFileBookmarkStatus:o,onOpenFile:s,onSetFileBookmarkStatus:c,onToggleFolder:l},`${r.type}:${r.path}`))]}):(0,z.jsxs)(`div`,{className:`workspace-file-tree-row file ${f?`changed`:``} ${a===u?`selected`:``}`,style:{paddingLeft:p},children:[(0,z.jsxs)(`button`,{type:`button`,className:`workspace-file-tree-row-main`,title:u,onClick:()=>s(u),children:[(0,z.jsx)(b,{size:13}),(0,z.jsx)(`span`,{children:r.name}),f&&(0,z.jsxs)(`small`,{children:[(0,z.jsxs)(`span`,{className:`diff-addition`,children:[`+`,f.additions]}),(0,z.jsxs)(`span`,{className:`diff-deletion`,children:[`-`,f.deletions]})]})]}),/\.html?$/i.test(u)&&(0,z.jsx)(`button`,{type:`button`,className:`workspace-file-tree-bookmark-actions`,title:`View source`,"aria-label":`View source for ${r.name}`,onClick:()=>s(u,{source:!0}),children:`</>`}),c?(0,z.jsx)(Qt,{className:`workspace-file-tree-bookmark-actions`,currentStatus:o?.(u)??null,onSetStatus:e=>c(u,e)}):null]})}function en({diff:e,expandedFolderPaths:t,rootPath:n,repoFiles:r,selectedPath:i,getFileBookmarkStatus:a,onOpenFile:o,onSetFileBookmarkStatus:s,onToggleFolder:c}){let l=e?.files??[],u=(0,R.useMemo)(()=>new Map(l.map(e=>[e.path,e])),[l]),d=n?.replace(/^\/+|\/+$/g,``)||null,f=(0,R.useMemo)(()=>{if(!d)return r;let e=`${d}/`;return r.filter(t=>t.startsWith(e)).map(t=>t.slice(e.length)).filter(Boolean)},[d,r]);return(0,z.jsx)(`div`,{className:`workspace-diff-files-view`,children:(0,z.jsx)($t,{changedByPath:u,expandedFolderPaths:t,rootPath:d,repoFiles:f,selectedPath:i,getFileBookmarkStatus:a,onOpenFile:o,onSetFileBookmarkStatus:s,onToggleFolder:c})})}function tn({collapsed:e,editorControlsVisible:t,hideWhiteSpace:n,loadFullFiles:r,renderMarkdown:i,wordDiffs:a,wordWrap:o,onClose:s,onCopyGitApply:c,onRefresh:l,onToggleCollapsed:u,onToggleEditorControlsVisible:d,onToggleHideWhiteSpace:f,onToggleLoadFullFiles:p,onToggleRenderMarkdown:m,onToggleWordDiffs:ee,onToggleWordWrap:h}){return(0,z.jsxs)(`div`,{className:`workspace-diff-options-menu`,role:`menu`,children:[(0,z.jsx)(K,{icon:(0,z.jsx)(T,{size:14}),label:`Refresh`,onClick:l,onClose:s}),(0,z.jsx)(K,{checked:o,icon:(0,z.jsx)(ie,{size:14}),label:`Enable word wrap`,onClick:h,onClose:s}),(0,z.jsx)(K,{checked:e,icon:(0,z.jsx)(nt,{size:14}),label:`Collapse all diffs`,onClick:u,onClose:s}),(0,z.jsx)(`div`,{className:`workspace-diff-menu-divider`}),(0,z.jsx)(K,{checked:t,icon:(0,z.jsx)(at,{size:14}),label:`Show editor controls`,onClick:d,onClose:s}),(0,z.jsx)(K,{checked:i,icon:(0,z.jsx)(P,{size:14}),label:`Render Markdown`,onClick:m,onClose:s}),(0,z.jsx)(K,{checked:!r,icon:(0,z.jsx)(Ue,{size:14}),label:`Show diffs first`,onClick:p,onClose:s}),(0,z.jsx)(K,{checked:a,icon:(0,z.jsx)(tt,{size:14}),label:`Enable word diffs`,onClick:ee,onClose:s}),(0,z.jsx)(K,{checked:n,icon:(0,z.jsx)(it,{size:14}),label:`Hide white space`,onClick:f,onClose:s}),(0,z.jsx)(K,{icon:(0,z.jsx)(te,{size:14}),label:`Copy git apply command`,onClick:c,onClose:s})]})}function K({checked:e,icon:t,label:n,onClick:r,onClose:i}){return(0,z.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{r?.(),i()},children:[t,(0,z.jsx)(`span`,{children:n}),e&&(0,z.jsx)(We,{size:14})]})}function nn({addMenuOpen:e,expanded:t,filteredFiles:n,dirtyFilePaths:r,openFiles:i,goalDetailsAvailable:a,searchOpen:o,searchQuery:s,selectedPath:c,sideChatTabs:l=[],summaryAvailable:u,sourceStatus:d,sourceSwitcher:f,visibleTab:p,toolbarActions:m,additionalTabs:ee,tabOrder:h=[],filesTabOpen:g=!0,onCloseFilesTab:_,overviewTabs:te=[],outputsLabel:ne=`Training`,activeOverviewId:re,onNewOverview:y,onSelectOverview:b,onCloseOverview:x,getFileBookmarkStatus:ie,onCloseFileTab:ae,onCloseSideChat:oe,onCloseSearch:S,onOpenFile:se,onOpenBrowser:C,onOpenSearch:ce,onOpenSideChat:le,onSearchQueryChange:ue,onSetFileBookmarkStatus:de,onSelectFile:fe,onSelectFiles:pe,onSelectOutputs:me,onSelectGoal:he,onSelectSummary:ge,onSelectSideChat:_e,onToggleAddMenu:ve,onToggleExpanded:ye}){let be=(0,R.useRef)(null),Se=(0,R.useRef)(null);(0,R.useEffect)(()=>{Se.current?.querySelector(`button[role="tab"][aria-selected="true"]`)?.scrollIntoView({block:`nearest`,inline:`nearest`})},[re,i.length,c,p]),(0,R.useEffect)(()=>{if(!e&&!o)return;function t(){e&&ve(),o&&S()}function n(e){be.current?.contains(e.target)||t()}function r(e){e.key===`Escape`&&t()}return document.addEventListener(`pointerdown`,n),document.addEventListener(`keydown`,r),()=>{document.removeEventListener(`pointerdown`,n),document.removeEventListener(`keydown`,r)}},[e,S,ve,o]);function T(e){e.key===`Escape`?S():e.key===`Enter`&&(n[0]||s.trim())&&se(n[0]||s.trim())}function Ee(e){if(![`ArrowRight`,`ArrowLeft`,`Home`,`End`].includes(e.key))return;let t=e.target;if(!(t instanceof HTMLButtonElement)||t.getAttribute(`role`)!==`tab`)return;let n=Array.from(e.currentTarget.querySelectorAll(`button[role="tab"]`)),r=n.indexOf(t);if(r<0||n.length===0)return;e.preventDefault();let i=n[k(r,n.length,e.key)];if(!i)return;i.focus(),i.click();let a=i.id;a&&window.requestAnimationFrame(()=>document.getElementById(a)?.focus())}let E=[...te.map(e=>(0,z.jsxs)(`div`,{className:`workspace-diff-tab file ${p===`outputs`&&re===e?`active`:``}`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`workspace-diff-tab-main`,role:`tab`,"aria-selected":p===`outputs`&&re===e,tabIndex:p===`outputs`&&re===e?0:-1,onClick:()=>b?.(e),children:[(0,z.jsx)(Ue,{className:`workspace-diff-tab-icon`,size:14}),(0,z.jsx)(`span`,{children:e===-2?`Agents`:e===-1?ne:`New tab`})]}),(0,z.jsx)(`button`,{type:`button`,className:`workspace-diff-tab-close`,"aria-label":e===-2?`Close Agents`:e===-1?`Close ${ne}`:`Close new tab`,onClick:()=>x?.(e),children:(0,z.jsx)(De,{size:12})})]},`overview-${e}`)),a?(0,z.jsxs)(`button`,{type:`button`,className:`workspace-diff-tab ${p===`goal`?`active`:``}`,role:`tab`,"aria-selected":p===`goal`,onClick:he,children:[(0,z.jsx)(Ue,{size:14}),(0,z.jsx)(`span`,{children:`Goal`})]},`goal`):null,u&&ge?(0,z.jsxs)(`button`,{type:`button`,className:`workspace-diff-tab ${p===`summary`?`active`:``}`,role:`tab`,"aria-selected":p===`summary`,onClick:ge,children:[(0,z.jsx)(xe,{size:14}),(0,z.jsx)(`span`,{children:`Summary`})]},`summary`):null,g?(0,z.jsxs)(`div`,{className:`workspace-diff-tab file ${p===`files`?`active`:``}`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`workspace-diff-tab-main`,role:`tab`,id:`right-sidebar-files-tab`,"aria-controls":`right-sidebar-files-panel`,"aria-selected":p===`files`,tabIndex:p===`files`?0:-1,onClick:pe,children:[(0,z.jsx)(w,{className:`workspace-diff-tab-icon`,size:14}),(0,z.jsx)(`span`,{children:`Files`})]}),_?(0,z.jsx)(`button`,{type:`button`,className:`workspace-diff-tab-close`,"aria-label":`Close files tab`,onClick:_,children:(0,z.jsx)(De,{size:12})}):null]},`files`):null,...i.map(e=>(0,z.jsxs)(`div`,{className:`workspace-diff-tab file ${p===`file`&&c===e.path?`active`:``}`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`workspace-diff-tab-main`,role:`tab`,"aria-selected":p===`file`&&c===e.path,title:e.path,onClick:()=>fe(e.path),children:[(0,z.jsx)(Ue,{className:`workspace-diff-tab-icon`,size:13}),r.has(e.path)&&(0,z.jsx)(`span`,{className:`workspace-diff-tab-dirty`,"aria-hidden":`true`}),(0,z.jsx)(`span`,{children:I(e.path)})]}),de?(0,z.jsx)(Qt,{className:`workspace-diff-tab-bookmark-actions`,currentStatus:ie?.(e.path)??null,onSetStatus:t=>de(e.path,t)}):null,(0,z.jsx)(`button`,{type:`button`,className:`workspace-diff-tab-close`,title:`Close ${e.path}`,onClick:t=>ae(e.path,t),children:(0,z.jsx)(De,{size:12})})]},e.path)),...l.map(e=>(0,z.jsxs)(`div`,{className:`workspace-diff-tab right-chat-tab`,children:[(0,z.jsxs)(`button`,{type:`button`,className:`workspace-diff-tab-main`,role:`tab`,id:`right-chat-tab-${e.id}`,"aria-controls":`right-chat-panel-${e.id}`,"aria-selected":!1,tabIndex:-1,title:e.title,onClick:()=>_e?.(e.id),children:[e.running?(0,z.jsx)(`span`,{className:`right-chat-status-dot`,"aria-label":`Running`}):null,(0,z.jsx)(`span`,{children:e.title})]}),oe?(0,z.jsx)(`button`,{type:`button`,className:`workspace-diff-tab-close`,title:`Close ${e.title}`,"aria-label":`Close ${e.title}`,onClick:t=>{t.stopPropagation(),oe(e.id)},children:(0,z.jsx)(De,{size:12})}):null]},e.id))].filter(e=>e!==null),Oe=new Map(h.map((e,t)=>[e,t]));return E.sort((e,t)=>(Oe.get(String(e.key))??h.length)-(Oe.get(String(t.key))??h.length)),(0,z.jsxs)(`div`,{className:`workspace-diff-topbar`,children:[(0,z.jsxs)(`div`,{className:`workspace-diff-tabs`,role:`tablist`,"aria-label":`Right sidebar views`,ref:Se,onKeyDown:Ee,children:[E,ee]}),(0,z.jsxs)(`div`,{className:`workspace-diff-add-anchor`,ref:be,children:[(0,z.jsx)(`button`,{type:`button`,className:`workspace-diff-add-tab ${!y&&(e||o)?`active`:``}`,title:`Add`,"aria-label":y?`New tab`:`Add to right sidebar`,onClick:y??ve,children:(0,z.jsx)(Te,{size:15})}),e&&(0,z.jsxs)(`div`,{className:`workspace-diff-add-menu`,role:`menu`,children:[me?(0,z.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:me,children:[(0,z.jsx)(Ue,{size:14}),(0,z.jsx)(`span`,{children:`Training`}),(0,z.jsx)(`kbd`,{})]}):null,le?(0,z.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:le,children:[(0,z.jsx)(we,{size:14}),(0,z.jsx)(`span`,{children:`New task`}),(0,z.jsx)(`kbd`,{})]}):null,(0,z.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:pe,children:[(0,z.jsx)(w,{size:14}),(0,z.jsx)(`span`,{children:`Files`}),(0,z.jsx)(`kbd`,{})]}),u&&ge?(0,z.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:ge,children:[(0,z.jsx)(xe,{size:14}),(0,z.jsx)(`span`,{children:`Summary`}),(0,z.jsx)(`kbd`,{})]}):null,(0,z.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:ce,children:[(0,z.jsx)(Me,{size:14}),(0,z.jsx)(`span`,{children:`Open file`}),(0,z.jsx)(`kbd`,{children:`Ctrl+P`})]}),C?(0,z.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:C,children:[(0,z.jsx)(N,{size:14}),(0,z.jsx)(`span`,{children:`Browser`}),(0,z.jsx)(`kbd`,{children:`Ctrl+I`})]}):null]}),o&&(0,z.jsxs)(`div`,{className:`workspace-file-search-popover`,children:[(0,z.jsx)(`input`,{autoFocus:!0,placeholder:`Search files`,value:s,onChange:e=>ue(e.target.value),onKeyDown:T}),(0,z.jsx)(`span`,{children:`Files`}),(0,z.jsx)(`div`,{className:`workspace-file-search-results`,children:n.length===0?(0,z.jsx)(`small`,{children:`Type to search for files`}):n.map(e=>(0,z.jsx)(`button`,{type:`button`,onClick:()=>se(e),children:e},e))})]})]}),p!==`outputs`&&(f||d)?(0,z.jsxs)(`div`,{className:`workspace-diff-source-bar`,"aria-label":`Workspace source`,children:[f?(0,z.jsx)(`div`,{className:`workspace-diff-source-toggle`,role:`group`,"aria-label":`File source`,children:f.options.map(e=>(0,z.jsx)(`button`,{type:`button`,className:f.value===e.value?`active`:``,"aria-pressed":f.value===e.value,onClick:()=>f.onChange(e.value),children:e.label},e.value))}):null,d?(0,z.jsx)(`span`,{className:`workspace-diff-source-status ${d.tone}`,children:d.label}):null]}):null,m,(0,z.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:t?`Restore files panel`:`Expand files panel`,"aria-label":t?`Restore files panel`:`Expand files panel`,onClick:ye,children:t?(0,z.jsx)(v,{size:14}):(0,z.jsx)(Ce,{size:14})})]})}function rn({inline:e=!1,canCheckActiveFile:t,canSaveActiveFile:n,collapsed:r,editorControlsVisible:i,editorDiagnosticStatus:a,editorDiagnosticsChecking:o,hideWhiteSpace:s,loadFullFiles:c,menuOpen:l,renderMarkdown:u,showEditorCommandBar:d,showRenderMarkdownToggle:f,splitView:p,wordDiffs:m,wordWrap:ee,onCopyGitApply:h,onEditorCheck:g,onEditorRedo:_,onEditorSave:te,onEditorUndo:ne,onRefresh:re,onToggleCollapsed:v,onToggleEditorControlsVisible:y,onToggleHideWhiteSpace:b,onToggleLoadFullFiles:x,onToggleMenu:ie,onToggleRenderMarkdown:ae,onToggleSplitView:oe,onToggleWordDiffs:S,onToggleWordWrap:se}){return(0,z.jsx)(`div`,{className:`workspace-diff-toolbar ${e?`inline`:``}`,children:(0,z.jsxs)(`div`,{className:`workspace-diff-toolbar-actions`,children:[(0,z.jsxs)(`div`,{className:`workspace-diff-menu-anchor`,children:[(0,z.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Diff options`,"aria-haspopup":`menu`,"aria-expanded":l,onClick:()=>ie(),children:(0,z.jsx)(j,{size:15})}),l&&(0,z.jsx)(tn,{collapsed:r,editorControlsVisible:i,hideWhiteSpace:s,loadFullFiles:c,renderMarkdown:u,wordDiffs:m,wordWrap:ee,onClose:()=>ie(!1),onCopyGitApply:h,onRefresh:re,onToggleCollapsed:v,onToggleEditorControlsVisible:y,onToggleHideWhiteSpace:b,onToggleLoadFullFiles:x,onToggleRenderMarkdown:ae,onToggleWordDiffs:S,onToggleWordWrap:se})]}),d&&(0,z.jsxs)(`div`,{className:`workspace-editor-command-bar`,"aria-label":`Editor controls`,children:[(0,z.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Save file`,"aria-label":`Save file`,disabled:!n,onClick:te,children:(0,z.jsx)(Ee,{size:14})}),(0,z.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Undo`,"aria-label":`Undo`,onClick:ne,children:(0,z.jsx)(ct,{size:14})}),(0,z.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Redo`,"aria-label":`Redo`,onClick:_,children:(0,z.jsx)(st,{size:14})}),(0,z.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Check file`,"aria-label":`Check file`,disabled:!t,onClick:g,children:o?(0,z.jsx)(Se,{className:`spinning`,size:14}):(0,z.jsx)(Ye,{size:14})}),a&&(0,z.jsxs)(`span`,{className:`workspace-editor-diagnostic-chip ${a.severity}`,children:[a.severity===`error`||a.severity===`warning`||a.severity===`unavailable`?(0,z.jsx)(qe,{size:13}):(0,z.jsx)(Ye,{size:13}),(0,z.jsx)(`span`,{children:a.label})]})]}),f&&(0,z.jsx)(`button`,{type:`button`,className:`diff-icon-button ${u?`active`:``}`,title:u?`Show Markdown source`:`Render Markdown`,"aria-label":u?`Show Markdown source`:`Render Markdown`,"aria-pressed":u,onClick:ae,children:(0,z.jsx)(P,{size:14})}),(0,z.jsx)(`button`,{type:`button`,className:`diff-icon-button ${p?`active`:``}`,title:p?`Show unified diff`:`Show split diff`,"aria-label":p?`Show unified diff`:`Show split diff`,"aria-pressed":p,onClick:oe,children:(0,z.jsx)(rt,{size:14})})]})})}var an=class{pending=new Map;cancelled=new Set;receive(e,t){let n=t?.loadId;if(n===void 0)return`open`;let r=this.pending.get(e);return t?.loading?(r!==void 0&&r!==n&&this.cancelled.add(r),this.pending.set(e,n),`open`):this.cancelled.delete(n)||r!==void 0&&r!==n?`ignore`:(this.pending.delete(e),r===void 0?`open`:`complete`)}close(e){let t=this.pending.get(e);t!==void 0&&this.cancelled.add(t),this.pending.delete(e)}retain(e){for(let t of this.pending.keys())e.has(t)||this.close(t)}};function on({connection:e,workspaceId:t,sandboxId:n,file:r,dirty:i,onReload:o}){let s=S(r.path)||t,c=E(),[l,u]=(0,R.useState)(!1),[d,f]=(0,R.useState)(!1),p=(0,R.useRef)(!0);(0,R.useEffect)(()=>(p.current=!0,()=>{p.current=!1}),[]);let[m,ee]=(0,R.useState)(r.readVersion),g=(0,R.useRef)(null),_=a({queryKey:[`open-file-version`,h(e),n??s,r.path],enabled:!!(e&&(n||s)),queryFn:async()=>{if(!n)return M.workspaceFileVersion(e,s,r.path);let t=r.path.includes(`/`)?r.path.slice(0,r.path.lastIndexOf(`/`))||`/`:`.`,{files:i}=await M.sandboxFiles(e,n,{path:t,recursive:!1}),a=i.find(e=>e.path===r.path||e.path.split(`/`).pop()===r.path.split(`/`).pop());if(!a)return{exists:!1,revision:null};let o=`${a.sizeBytes}:${a.updatedAt}`;if(r.readStamp===o)return{exists:!0,revision:r.readVersion??null};if(g.current?.stamp===o)return{exists:!0,revision:g.current.revision??null};let c=await de(e,n,r.path);return g.current={stamp:o,revision:c.readVersion},{exists:!0,revision:c.readVersion??null}},refetchInterval:5e3,refetchOnWindowFocus:!0}),te=_.refetch;(0,R.useEffect)(()=>{let t=!1;return f(!1),(async()=>{let i=r.contentEncoding===`base64`&&r.content?await ye(r.content):r.readVersion;t||(ee(i),e&&(n||s)&&await te(),t||f(!0))})().catch(()=>{t||f(!0)}),()=>{t=!0}},[te,e,r.content,r.contentEncoding,r.readVersion,n,s]),(0,R.useEffect)(()=>{m===void 0&&!r.content&&_.data&&ee(_.data.revision)},[m,r.content,_.data]);let ne=d&&m!==void 0&&!_.isError&&_.data?.exists&&m!==_.data.revision;async function re(){if(e&&(n||s)&&!l&&(!i||window.confirm(`Discard unsaved edits and refresh this file from disk?`))){u(!0);try{let t=await _.refetch();if(t.error)throw t.error;if(!n&&Le(r.path)){let n=/^(?:[~/\\]|[A-Za-z]:)/.test(r.path)?await M.signLocalImageUrl(e,{path:r.path}):await M.signWorkspaceImageUrl(e,{appId:s,path:r.path}),i=new URL(n.url);if(i.searchParams.set(`refresh`,String(Date.now())),!p.current)return;o({...r,readVersion:t.data?.revision},i.href)}else{let i=n?await de(e,n,r.path):await M.workspaceFile(e,s,r.path);if(!p.current)return;o(i,Le(r.path)&&i.contentEncoding===`base64`&&i.content?`data:image/${/\.jpe?g$/i.test(r.path)?`jpeg`:r.path.split(`.`).pop()};base64,${i.content}`:void 0),ee(i.readVersion??t.data?.revision)}_.refetch()}catch(e){p.current&&c?.(e instanceof Error?e.message:`Could not refresh file.`,`error`)}finally{p.current&&u(!1)}}}return!ne&&!l?null:(0,z.jsxs)(`button`,{type:`button`,className:`workspace-file-refresh`,disabled:l||!e||!n&&!s,onClick:()=>void re(),"aria-label":`Reload updated file`,title:ne?`The file changed. Reload to show the latest version.`:`Reload this file from disk`,children:[(0,z.jsx)(T,{size:14,className:l?`spinning`:void 0}),(0,z.jsx)(`span`,{children:l?`Reloading…`:`Reload`})]})}var sn={cjs:`typescript`,css:`css`,html:`html`,js:`typescript`,json:`json`,jsx:`typescript`,md:`markdown`,mjs:`typescript`,py:`python`,sh:`shell`,ts:`typescript`,tsx:`typescript`,yaml:`yaml`,yml:`yaml`};function cn(e){let t=e.split(`/`).pop()?.toLowerCase()??``;return t===`dockerfile`?`shell`:t===`readme`||t===`readme.md`?`markdown`:sn[t.includes(`.`)?t.split(`.`).pop()??``:``]??`text`}function ln(e,t){return e?t===`markdown`?un(e):t===`json`?q(e,/("(?:\\.|[^"\\])*"(?=\s*:)|"(?:\\.|[^"\\])*"|[-]?\b\d+(?:\.\d+)?\b|\btrue\b|\bfalse\b|\bnull\b|[{}[\]:,])/g):t===`css`?q(e,/(\/\*.*?\*\/|#[\da-fA-F]{3,8}\b|--[\w-]+|[.#]?[\w-]+(?=\s*:)|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\b\d+(?:\.\d+)?(?:px|rem|em|%|vh|vw)?\b|[{}():;,])/g):t===`html`?q(e,/(<!--.*?-->|<\/?[\w-]+|[\w:-]+(?==)|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[<>/=])/g):t===`shell`?q(e,/(#.*$|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\b(?:cd|cp|export|git|npm|pnpm|bun|yarn|rm|mkdir|test|if|then|fi|for|do|done|echo)\b|\$[\w_]+|&&|\|\||[|&;=])/g):t===`python`?q(e,/(#.*$|"""[\s\S]*?"""|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\b(?:class|def|return|if|elif|else|for|while|try|except|finally|with|as|import|from|None|True|False|async|await|lambda|yield)\b|\b[A-Z][\w]*\b|\b\d+(?:\.\d+)?\b|[+\-*/%=<>!&|.:,()[\]{}]+)/g):q(e,/(\/\/.*$|\/\*.*?\*\/|`(?:\\.|[^`\\])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\b(?:abstract|as|async|await|boolean|break|case|catch|class|const|continue|default|else|enum|export|extends|false|finally|for|from|function|if|import|in|interface|let|new|null|number|of|return|string|switch|throw|true|try|type|undefined|void|while)\b|\b[A-Z][\w]*\b|\b\d+(?:\.\d+)?\b|[+\-*/%=<>!&|?:.,()[\]{}]+)/g):[{text:` `,kind:`plain`}]}function un(e){return/^\s{0,3}#{1,6}\s/.test(e)?[{text:e,kind:`keyword`}]:/^\s*[-*+]\s/.test(e)?[{text:e,kind:`property`}]:q(e,/(`[^`]+`|\*\*[^*]+\*\*|\[[^\]]+\]\([^)]+\)|https?:\/\/\S+)/g)}function dn(e){return/^(\/\/|#|\/\*|<!--)/.test(e)?`comment`:/^["'`]/.test(e)?`string`:/^[-]?\d/.test(e)||/^#[\da-fA-F]{3,8}\b/.test(e)?`number`:/^\b[A-Z]/.test(e)?`type`:/^[.#]?[\w-]+$/.test(e)&&e.includes(`-`)?`property`:/^(?:[{}()[\],.:;<>/=+\-*&|!?%]+)$/.test(e)?`operator`:/^(?:--|\$)/.test(e)?`property`:`keyword`}function q(e,t){let n=[],r=0;for(let i of e.matchAll(t)){let t=i.index??0;t>r&&n.push({text:e.slice(r,t),kind:`plain`});let a=i[0];if(n.push({text:a,kind:dn(a)}),r=t+a.length,/^(\/\/|#|<!--)/.test(a))break}return r<e.length&&n.push({text:e.slice(r),kind:`plain`}),n.length>0?n:[{text:e,kind:`plain`}]}function J({language:e,text:t}){return(0,z.jsx)(z.Fragment,{children:ln(t,e).map((e,t)=>(0,z.jsx)(`span`,{className:`syntax-token ${e.kind}`,children:e.text},`${t}-${e.text}`))})}var fn=(0,R.lazy)(()=>i(()=>import(`./FilePagePreview-C6wIp6uX.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55]))),Y=(0,R.lazy)(()=>i(()=>import(`./WorkspacePdfPreview-CU6PSjjN.js`),__vite__mapDeps([56,1,2,3,46,55])));function X({path:e,contentBase64:t}){let n=I(e),r=(0,R.useMemo)(()=>{try{let n=atob(t.replace(/\s/g,``)),r=Uint8Array.from(n,e=>e.charCodeAt(0));return new Blob([r],{type:pn(e)})}catch{return null}},[t,e]),[i,a]=(0,R.useState)(null);(0,R.useEffect)(()=>{if(!r)return;let e=URL.createObjectURL(r);return a({blob:r,url:e}),()=>URL.revokeObjectURL(e)},[r]);let o=i?.blob===r?i.url:null;return r?o?(0,z.jsxs)(`div`,{className:`workspace-document-preview`,children:[(0,z.jsxs)(`div`,{className:`workspace-document-preview-card`,children:[(0,z.jsx)(L,{path:e}),(0,z.jsxs)(`div`,{className:`workspace-document-preview-actions`,children:[(0,z.jsx)(`span`,{children:/\.pdf$/i.test(e)?`PDF`:`Word`}),(0,z.jsx)(`a`,{href:o,download:n,"aria-label":`Download document`,title:`Download document`,children:(0,z.jsx)(F,{size:16,"aria-hidden":`true`})})]})]}),/\.docx$/i.test(e)?(0,z.jsx)(R.Suspense,{fallback:(0,z.jsx)(`div`,{role:`status`,children:`Loading document…`}),children:(0,z.jsx)(fn,{thumbnail:!1,file:{path:e,content:t,contentEncoding:`base64`,status:``,additions:0,deletions:0,patch:``}})}):(0,z.jsx)(R.Suspense,{fallback:(0,z.jsx)(`div`,{role:`status`,children:`Loading document…`}),children:(0,z.jsx)(Y,{contentBase64:t})})]}):(0,z.jsx)(`div`,{className:`workspace-diff-code-empty`,role:`status`,children:`Loading document…`}):(0,z.jsx)(`div`,{className:`workspace-diff-code-empty`,children:`Document preview unavailable.`})}function pn(e){return/\.pdf$/i.test(e)?`application/pdf`:/\.docx$/i.test(e)?`application/vnd.openxmlformats-officedocument.wordprocessingml.document`:`application/msword`}var mn=`
3
-
4
- [file truncated]`,hn=(0,R.lazy)(()=>i(()=>import(`./WorkspaceMonacoEditor-BrZs6-EW.js`).then(e=>e.t),__vite__mapDeps([57,1,2,3,58]))),gn=(0,R.lazy)(()=>i(()=>import(`./WorkspacePresentationPreview-IjXVXpIy.js`),__vite__mapDeps([59,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,60,61,62]))),_n=6,vn=18,yn=22,bn=160,xn=12;function Sn({collapsed:e=!1,diagnostics:t=[],draftContent:n,editable:r=!1,editorRef:i,error:a,file:o,hideWhiteSpace:s=!1,headerActions:c,imageSrc:l,loading:u,loadFullFiles:d,onOpenImage:f,onSelectBreadcrumbPath:p,onDraftContentChange:m,onLspAction:ee,onSave:h,renderMarkdown:g,saveError:_,saving:te=!1,splitView:ne=!1,wordDiffs:re=!1,wordWrap:v,workspaceName:y,workspaceRootPath:b}){Oe(a,{prefix:`File preview`}),Oe(_,{prefix:`Save failed`});let x=o.contentEncoding===`base64`?o.content??``:n??o.content??``,ie=(0,R.useMemo)(()=>x.split(`
5
- `).slice(0,800),[x]),ae=cn(o.path),oe=n!=null||o.content!=null,S=x.endsWith(mn),se=g&&oe&&Ne(o.path),C=Be(o),ce=oe&&(o.contentEncoding===`base64`||Ve(o.path))&&Tn(x);return l?(0,z.jsxs)(`div`,{className:`workspace-file-preview`,children:[(0,z.jsxs)(`div`,{className:`workspace-diff-file-heading`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(L,{path:o.path,workspaceName:y,workspaceRootPath:b,onSelectPath:p}),(0,z.jsxs)(`span`,{className:`diff-addition`,children:[`+`,o.additions]}),(0,z.jsxs)(`span`,{className:`diff-deletion`,children:[`-`,o.deletions]})]}),c]}),(0,z.jsx)(`div`,{className:`workspace-file-image-stage`,children:(0,z.jsx)(`button`,{type:`button`,className:`workspace-file-image-button`,"aria-label":`Open image preview for ${o.path}`,onClick:f,children:(0,z.jsx)(`img`,{alt:o.path,decoding:`async`,src:l})})})]}):!d&&o.patch||!oe&&o.patch?ne?(0,z.jsx)(wn,{collapsed:e,file:o,hideWhiteSpace:s,onSelectBreadcrumbPath:p,wordDiffs:re,wordWrap:v,headerActions:c,workspaceName:y,workspaceRootPath:b}):(0,z.jsx)(Cn,{collapsed:e,file:o,hideWhiteSpace:s,wordWrap:v,workspaceName:y,workspaceRootPath:b,onSelectBreadcrumbPath:p,headerActions:c}):(0,z.jsxs)(`div`,{className:`workspace-file-preview ${v?`wrap`:``} ${ce?`document-only`:``}`,children:[ce?null:(0,z.jsxs)(`div`,{className:`workspace-diff-file-heading`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(L,{path:o.path,workspaceName:y,workspaceRootPath:b,onSelectPath:p}),(0,z.jsxs)(`span`,{className:`diff-addition`,children:[`+`,o.additions]}),(0,z.jsxs)(`span`,{className:`diff-deletion`,children:[`-`,o.deletions]})]}),(0,z.jsxs)(`span`,{className:`workspace-file-heading-end`,children:[te?(0,z.jsx)(`span`,{className:`workspace-file-save-state`,children:`Saving`}):null,c]})]}),oe?se?(0,z.jsx)(`div`,{className:`workspace-markdown-preview`,children:(0,z.jsx)(ve,{content:x})}):C&&ce?(0,z.jsx)(R.Suspense,{fallback:(0,z.jsx)(`div`,{className:`workspace-diff-code-empty`,role:`status`,children:`Loading presentation…`}),children:(0,z.jsx)(gn,{path:o.path,contentBase64:x})}):ce?(0,z.jsx)(X,{path:o.path,contentBase64:x}):r&&!S?(0,z.jsx)(R.Suspense,{fallback:(0,z.jsx)(`div`,{className:`workspace-diff-code-empty`,children:`Loading editor`}),children:(0,z.jsx)(hn,{diagnostics:t,filePath:o.path,onChange:e=>m?.(e),onLspAction:ee,onSave:()=>h?.(),ref:i,value:x,wordWrap:v})}):(0,z.jsx)(`div`,{className:`workspace-file-code`,children:ie.map((e,t)=>(0,z.jsxs)(`div`,{className:`workspace-file-code-row`,children:[(0,z.jsx)(`span`,{children:t+1}),(0,z.jsx)(`code`,{children:(0,z.jsx)(J,{language:ae,text:e||` `})})]},`${t}-${e}`))}):(0,z.jsx)(`div`,{className:`workspace-diff-code-empty`,children:u?`Loading file content…`:`No file content available.`})]})}function Cn({collapsed:e=!1,file:t,hideWhiteSpace:n=!1,wordWrap:r,workspaceName:i,workspaceRootPath:a,onSelectBreadcrumbPath:o,headerActions:s}){let c=(0,R.useMemo)(()=>On(t.patch,n),[t.patch,n]),l=cn(t.path);return(0,z.jsxs)(`div`,{className:`workspace-diff-preview ${r?`wrap`:``}`,children:[(0,z.jsxs)(`div`,{className:`workspace-diff-file-heading`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(L,{path:t.path,workspaceName:i??null,workspaceRootPath:a,onSelectPath:o}),(0,z.jsxs)(`span`,{className:`diff-addition`,children:[`+`,t.additions]}),(0,z.jsxs)(`span`,{className:`diff-deletion`,children:[`-`,t.deletions]})]}),s]}),e?(0,z.jsx)(`div`,{className:`workspace-diff-code-empty`,children:`Diff collapsed`}):(0,z.jsx)(En,{ariaLabel:`${t.path} diff`,className:`workspace-diff-code`,emptyMessage:`No patch available.`,rows:c,renderRow:(e,t)=>e.kind===`spacer`?(0,z.jsx)(`div`,{className:`workspace-diff-spacer`,role:`row`,children:e.label},`${e.label}-${t}`):(0,z.jsxs)(`div`,{className:`workspace-diff-code-row ${e.kind}`,role:`row`,children:[(0,z.jsx)(`span`,{className:`workspace-diff-line-number`,role:`cell`,children:e.newLine||e.oldLine}),(0,z.jsx)(`code`,{role:`cell`,children:(0,z.jsx)(J,{language:l,text:e.newContent||e.oldContent||` `})})]},`${e.oldLine}-${e.newLine}-${t}`),wordWrap:r})]})}function wn({collapsed:e,file:t,hideWhiteSpace:n,wordDiffs:r,wordWrap:i,workspaceName:a,workspaceRootPath:o,onSelectBreadcrumbPath:s,headerActions:c}){let l=(0,R.useMemo)(()=>On(t.patch,n),[t.patch,n]),u=cn(t.path);return(0,z.jsxs)(`div`,{className:`workspace-diff-preview split ${i?`wrap`:``} ${r?`word-diffs`:``}`,children:[(0,z.jsxs)(`div`,{className:`workspace-diff-file-heading`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(L,{path:t.path,workspaceName:a,workspaceRootPath:o,onSelectPath:s}),(0,z.jsxs)(`span`,{className:`diff-addition`,children:[`+`,t.additions]}),(0,z.jsxs)(`span`,{className:`diff-deletion`,children:[`-`,t.deletions]})]}),(0,z.jsxs)(`span`,{className:`workspace-file-heading-end`,children:[c,(0,z.jsx)(be,{size:14})]})]}),e?(0,z.jsx)(`div`,{className:`workspace-diff-code-empty`,children:`Diff collapsed`}):(0,z.jsx)(En,{ariaLabel:`${t.path} split diff`,className:`workspace-split-code`,emptyMessage:`No patch available.`,rows:l,renderRow:(e,t)=>e.kind===`spacer`?(0,z.jsx)(`div`,{className:`workspace-diff-spacer split`,role:`row`,children:e.label},`${e.label}-${t}`):(0,z.jsxs)(`div`,{className:`workspace-split-row ${e.kind}`,role:`row`,children:[(0,z.jsx)(`span`,{className:`workspace-diff-line-number old`,role:`cell`,children:e.oldLine}),(0,z.jsx)(`code`,{className:`old`,role:`cell`,children:(0,z.jsx)(J,{language:u,text:e.oldContent||` `})}),(0,z.jsx)(`span`,{className:`workspace-diff-line-number new`,role:`cell`,children:e.newLine}),(0,z.jsx)(`code`,{className:`new`,role:`cell`,children:(0,z.jsx)(J,{language:u,text:e.newContent||` `})})]},`${e.oldLine}-${e.newLine}-${t}`),wordWrap:i})]})}function Tn(e){return e.length>0&&/^[A-Za-z0-9+/=\s]+$/.test(e)}function En({ariaLabel:e,className:t,emptyMessage:n,rows:r,renderRow:i,wordWrap:a}){let o=!a&&r.length>bn,{endIndex:s,offsetTop:c,scrollRef:l,startIndex:u,totalHeight:d}=Dn(r.length,o);return r.length===0?(0,z.jsx)(`div`,{className:t,role:`table`,"aria-label":e,children:(0,z.jsx)(`div`,{className:`workspace-diff-code-empty`,children:n})}):o?(0,z.jsx)(`div`,{className:`${t} virtualized`,ref:l,role:`table`,"aria-label":e,"aria-rowcount":r.length,children:(0,z.jsx)(`div`,{className:`workspace-diff-virtual-spacer`,style:{height:d},children:(0,z.jsx)(`div`,{className:`workspace-diff-virtual-window`,style:{transform:`translateY(${c}px)`},children:r.slice(u,s).map((e,t)=>i(e,u+t))})})}):(0,z.jsx)(`div`,{className:t,role:`table`,"aria-label":e,children:r.map(i)})}function Dn(e,t){let n=(0,R.useRef)(null),[r,i]=(0,R.useState)({height:968,scrollTop:0}),a=(0,R.useCallback)(()=>{let e=n.current;e&&i({height:e.clientHeight||968,scrollTop:e.scrollTop})},[]);if((0,R.useEffect)(()=>{if(!t)return;let e=n.current;if(!e)return;a();let r=0,i=()=>{typeof window>`u`?a():(window.cancelAnimationFrame(r),r=window.requestAnimationFrame(a))};e.addEventListener(`scroll`,i,{passive:!0});let o=typeof ResizeObserver>`u`?null:new ResizeObserver(()=>i());return o?.observe(e),()=>{e.removeEventListener(`scroll`,i),o?.disconnect(),typeof window<`u`&&window.cancelAnimationFrame(r)}},[t,a]),!t)return{endIndex:e,offsetTop:0,scrollRef:n,startIndex:0,totalHeight:e*yn};let o=Math.ceil(r.height/yn),s=Math.max(0,Math.floor(r.scrollTop/yn)-xn);return{endIndex:Math.min(e,s+o+24),offsetTop:s*yn,scrollRef:n,startIndex:s,totalHeight:e*yn}}function On(e,t){if(!e.trim())return[];let n=[],r=0,i=0,a=null,o=null,s=!1,c=[];function l(){n.push(...kn(c)),c=[]}function u(){s&&=(l(),a=r,o=i,!1)}for(let d of e.split(`
6
- `)){let e=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(d);if(e){u();let t=Number(e[1]),c=Number(e[2]);if(a!==null&&o!==null){let e=Math.max(t-a,c-o,0);e>0&&n.push({kind:`spacer`,label:An(e)})}r=t,i=c,s=!0;continue}if(d.startsWith(`diff --git`)||d.startsWith(`index `)||d.startsWith(`--- `)||d.startsWith(`+++ `)||!s||d.startsWith(`\\ No newline`))continue;let f=d.slice(1)||` `;if(t&&!f.trim())continue;if(d.startsWith(`+`)){l(),n.push({kind:`addition`,oldLine:``,newLine:String(i||``),oldContent:``,newContent:f}),i+=1;continue}if(d.startsWith(`-`)){l(),n.push({kind:`deletion`,oldLine:String(r||``),newLine:``,oldContent:f,newContent:``}),r+=1;continue}let p=d.startsWith(` `)?d.slice(1)||` `:d||` `;(!t||p.trim())&&(c.push({kind:`context`,oldLine:String(r||``),newLine:String(i||``),oldContent:p,newContent:p}),r+=1,i+=1)}return u(),n}function kn(e){if(e.length<vn)return e;let t=e.length-12;return t<=0?e:[...e.slice(0,_n),{kind:`spacer`,label:An(t)},...e.slice(-6)]}function An(e){return`${e} unmodified ${e===1?`line`:`lines`}`}var jn=`openpond.workspace.editorControlsVisible`;function Mn(){try{return f.getItem(jn)===`true`}catch{return!1}}function Nn(e){try{f.setItem(jn,String(e))}catch{}}function Pn({activeDiagnostics:e,activeServers:t,editorDiagnosticsChecking:n,editorLspEnabled:r,showEditorCommandBar:i}){if(!i)return null;if(!r)return{label:`LSP off`,severity:`unavailable`};if(n)return{label:`Checking`,severity:`info`};let a=e.filter(e=>e.severity===`error`).length;if(a>0)return{label:`${a} error${a===1?``:`s`}`,severity:`error`};let o=e.filter(e=>e.severity===`warning`).length;if(o>0)return{label:`${o} warning${o===1?``:`s`}`,severity:`warning`};let s=e.length;if(s>0)return{label:`${s} note${s===1?``:`s`}`,severity:`info`};if(!t)return null;let c=t.find(e=>e.status!==`connected`);return c?{label:c.id===`none`?`No LSP`:`${c.id} unavailable`,severity:`unavailable`}:{label:`No issues`,severity:`none`}}var Fn=t({WorkspaceDiffPanel:()=>Bn}),In=3e3,Ln=2e3,Rn=[],zn=[];function Bn({appId:e,workspaceId:t,workspaceKind:n,connection:r,runtimeEvents:i,diff:a,editorPreferences:o,loading:s,workspaceName:c,workspaceInitialized:l,workspaceError:u,expanded:d,fileRootPath:f,filesWithPreview:p=!1,openFileRequest:m,readOnly:ee=!1,sideChatTabs:h,sourceSwitcher:g,tabRequest:_,renderOutputs:te,outputsLabel:ne,additionalTabs:re,viewState:v,onRefresh:y,onResizeStart:b,onToggleExpanded:x,onOpenBrowser:ie,onOpenBrowserUrl:ae,onViewStateChange:oe,onCloseSideChat:S,onOpenSideChat:se,onSelectSideChat:C,goalDetails:ce,sandboxFileSource:le,trainingSummary:ue,sidebarFileBookmarks:de=[],sidebarFileSourceSessionId:fe=null,onSetSidebarFileStatus:pe}){return(0,z.jsx)(Kn,{appId:e,workspaceId:t,workspaceKind:n,connection:r,runtimeEvents:i??[],diff:a,editorPreferences:o??null,loading:s,workspaceName:c,workspaceInitialized:l,workspaceError:u,expanded:d,fileRootPath:f??null,filesWithPreview:p,openFileRequest:m,readOnly:ee,sideChatTabs:h??[],sourceSwitcher:g??null,tabRequest:_??null,additionalTabs:re,renderOutputs:te??null,outputsLabel:ne,viewState:v??null,onRefresh:y,onResizeStart:b,onToggleExpanded:x,onOpenBrowser:ie,onOpenBrowserUrl:ae,onViewStateChange:oe,onCloseSideChat:S,onOpenSideChat:se,onSelectSideChat:C,goalDetails:ce??null,sandboxFileSource:le??null,trainingSummary:ue??null,sidebarFileBookmarks:de,sidebarFileSourceSessionId:fe,onSetSidebarFileStatus:pe})}function Vn(e,t,n,r){return e&&t?.content!=null?{...e,content:t.content,contentType:t.contentType,contentEncoding:t.contentEncoding,readVersion:t.readVersion,readStamp:t.readStamp}:t&&!e&&Hn(t)?t:e&&Hn(e)?e:t&&Hn(t)?t:e??t??n??Je(r)}function Hn(e){return!!(e.patch||e.content!=null)}function Un({changedFiles:e,checkpointStatus:t,dirty:n,error:r,loading:i,preservedReadback:a,sandboxMode:o,sourcePending:s}){if(s)return{label:`sandbox pending`,tone:`loading`};if(i)return{label:`refreshing`,tone:`loading`};if(o&&a&&t)return t;if(r)return{label:`status unavailable`,tone:`error`};if(o&&t?.tone===`error`||o&&t&&!n&&e===0)return t;if(n||e>0){let t=Math.max(1,e),n=t===1?`change`:`changes`;return{label:o?`${t} unpreserved ${n}`:`${t} local ${n}`,tone:`dirty`}}return{label:o?`sandbox clean`:`local clean`,tone:`clean`}}function Wn(e,t){if(!t)return null;for(let n=e.length-1;n>=0;--n){let r=e[n];if(r?.name!==`workspace_action_result`)continue;let i=r.data&&typeof r.data==`object`&&!Array.isArray(r.data)?r.data:null,a=i?.sourcePreservation&&typeof i.sourcePreservation==`object`&&!Array.isArray(i.sourcePreservation)?i.sourcePreservation:null;if(a?.attempted===!0&&a.sandboxId===t)return a.ok===!0?a.preserved===!0?{label:`checkpoint saved`,tone:`clean`}:{label:`checkpoint clean`,tone:`clean`}:{label:`checkpoint failed`,tone:`error`}}return null}function Gn(e){let t=e.split(`/`).filter(Boolean);return t.map((e,n)=>t.slice(0,n+1).join(`/`))}function Kn({appId:e,workspaceId:t,workspaceKind:n,connection:r,runtimeEvents:i,diff:a,editorPreferences:o,loading:s,workspaceName:c,workspaceInitialized:l,workspaceError:u,expanded:d,fileRootPath:f,filesWithPreview:m,openFileRequest:h,readOnly:g,sideChatTabs:te,sourceSwitcher:re,tabRequest:v,renderOutputs:b,outputsLabel:ie,additionalTabs:oe,viewState:se,onRefresh:C,onResizeStart:fe,onToggleExpanded:pe,onOpenBrowser:me,onOpenBrowserUrl:he,onViewStateChange:ge,onCloseSideChat:ve,onOpenSideChat:ye,onSelectSideChat:be,goalDetails:w,sandboxFileSource:xe,trainingSummary:Se,sidebarFileBookmarks:Ce,sidebarFileSourceSessionId:we,onSetSidebarFileStatus:Te}){let T=se??ze(),[Ee,De]=(0,R.useState)(!b||v?.tab===`files`||T.filesTabOpen),[E,D]=(0,R.useState)(T.overviewTabs),[Me,O]=(0,R.useState)(T.activeOverviewId),Re=(0,R.useRef)(Math.max(0,...T.overviewTabs)+1),[Be,k]=(0,R.useState)(T.tabOrder),[A,j]=(0,R.useState)(v?.tab??T.activeTab),[He,Ue]=(0,R.useState)(!1),[We,N]=(0,R.useState)(!1),[Ge,P]=(0,R.useState)(!1),[Ke,qe]=(0,R.useState)(``),[F,Ye]=(0,R.useState)(()=>[...T.openFilePaths]),[I,L]=(0,R.useState)(T.selectedPath),[Xe,Ze]=(0,R.useState)(!1),[Qe,tt]=(0,R.useState)(!1),[nt,rt]=(0,R.useState)(!1),[it,at]=(0,R.useState)(!0),[ot,st]=(0,R.useState)(Mn);p(()=>st(Mn()));let[ct,ut]=(0,R.useState)(!1),[dt,ft]=(0,R.useState)(!1),[pt,mt]=(0,R.useState)(!1),[B,ht]=(0,R.useState)({}),gt=(0,R.useRef)(new an),[_t,vt]=(0,R.useState)({}),[yt,bt]=(0,R.useState)(()=>new Set),[xt,St]=(0,R.useState)({}),[Ct,wt]=(0,R.useState)({}),[Tt,Et]=(0,R.useState)(()=>new Set),[Dt,Ot]=(0,R.useState)(null),[kt,At]=(0,R.useState)(!1),[V,jt]=(0,R.useState)(null),[Mt,Nt]=(0,R.useState)({}),[Pt,H]=(0,R.useState)({}),[Ft,Lt]=(0,R.useState)(null),[Rt,zt]=(0,R.useState)(null),[Bt,U]=(0,R.useState)(null),[Vt,Ht]=(0,R.useState)(null);Oe(u,{prefix:`Workspace`}),Oe(V,{prefix:`Sandbox files`});let[Ut,Wt]=(0,R.useState)(null),[Gt,Kt]=(0,R.useState)({}),[qt,W]=(0,R.useState)(null),[Yt,Xt]=(0,R.useState)(null),[Zt,$t]=(0,R.useState)(null),G=o??ee.editor,tn=(0,R.useRef)(B),K=(0,R.useRef)(Ie(T)),sn=(0,R.useRef)(Ie(T)),cn=(0,R.useRef)(null),ln=(0,R.useRef)(C),un=(0,R.useRef)(!1),dn=(0,R.useRef)(null),q=(0,R.useRef)(0),J=(0,R.useRef)(null),fn=(0,R.useRef)(null),Y=xe?.sandboxId?.trim()||null,X=!!xe,pn=!!Se||X&&!!Y,mn=X?`sandbox:${Y??`pending`}`:`workspace:${e??`none`}`,hn=X?!!Y:!!(e||r&&h&&S(h.path)),gn=(0,R.useRef)(mn),_n=!!(w?.createRuntime||w?.goalRuntime||w?.subagentRuntime),vn=(0,R.useCallback)(async(e={})=>{if(X){if(!r)Ot(null),jt(`OpenPond App server is not connected.`);else if(!Y)Ot(null),jt(null);else{e.silent||At(!0);try{let[e,t,n]=await Promise.allSettled([M.sandboxFiles(r,Y,{recursive:!0,maxEntries:Ln}),M.sandboxGitStatus(r,Y),M.sandboxGitDiff(r,Y,{})]);if(e.status===`rejected`)throw e.reason;let i=ce(e.value.files),a=t.status===`fulfilled`?t.value.status:null,o=n.status===`fulfilled`?n.value.diff:null,s=le(o,a),c=s.reduce((e,t)=>e+t.additions,0),l=s.reduce((e,t)=>e+t.deletions,0);Ot({appId:Y,repoPath:``,initialized:!0,dirty:a?!a.clean:s.length>0,filesChanged:s.length,additions:c,deletions:l,repoFiles:i,files:s,error:null,updatedAt:new Date().toISOString()}),jt(null)}catch(e){Ot(null),jt(e instanceof Error?e.message:String(e))}finally{e.silent||At(!1)}}}},[r,Y,X]),yn=(0,R.useMemo)(()=>ae(i,Y),[i,Y]),bn=!!(Dt&&((Dt.files?.length??0)>0||(Dt.repoFiles?.length??0)>0)),xn=X&&!bn&&!!yn,Cn=X?bn?Dt:yn??Dt:a,wn=Cn?.repoPath??null,Tn=(0,R.useMemo)(()=>Wn(i,Y),[i,Y]),En=Cn?.files??Rn,Dn=Cn?.files??Rn,On=(0,R.useMemo)(()=>new Map(Dn.map(e=>[e.path,e])),[Dn]),kn=(0,R.useMemo)(()=>new Map(En.map(e=>[e.path,e])),[En]),An=Cn?.repoFiles??(En.length>0?En.map(e=>e.path):zn),jn=(0,R.useMemo)(()=>En.filter(e=>!ke(e,An)),[An,En]),Fn=(0,R.useMemo)(()=>Zt&&!An.includes(Zt)?[Zt,...An]:An,[An,Zt]),Bn=(0,R.useMemo)(()=>F.map(e=>On.get(e)??B[e]??kn.get(e)??Je(e)),[On,kn,B,F]),Hn=(0,R.useMemo)(()=>{let e={};for(let t of F){if(Le(t)||Ve(t))continue;let n=Vn(On.get(t),B[t],kn.get(t),t);n.content!=null&&n.contentEncoding!==`base64`&&(e[t]=n.content)}return e},[On,kn,B,F]),Kn=(0,R.useMemo)(()=>{let e=new Set;for(let[t,n]of Object.entries(Ct))n.content!==n.savedContent&&e.add(t);return e},[Ct]),qn=(0,R.useMemo)(()=>{let e=Ke.trim().toLowerCase(),t=Fn;return e?t.filter(t=>t.toLowerCase().includes(e)):t},[Fn,Ke]),Jn=(0,R.useMemo)(()=>({activeTab:A,openFilePaths:F,selectedPath:I,filesTabOpen:Ee,overviewTabs:E,activeOverviewId:Me,tabOrder:Be}),[A,F,I,Ee,E,Me,Be]);(0,R.useEffect)(()=>{tn.current=B},[B]),(0,R.useEffect)(()=>{dn.current=qt},[qt]),(0,R.useEffect)(()=>{wt(e=>{let t=!1,n={...e},r=new Set(F),i=a?.updatedAt?Date.parse(a.updatedAt):null;for(let[e,i]of Object.entries(n))r.has(e)||i.content!==i.savedContent||(delete n[e],t=!0);for(let[e,r]of Object.entries(Hn)){let a=n[e];if(!a)n[e]={content:r,savedContent:r},t=!0;else if(a.content===a.savedContent&&a.savedContent!==r){if(a.savedAt&&(i===null||i<a.savedAt))continue;n[e]={content:r,savedContent:r},t=!0}}return t?n:e})},[a?.updatedAt,Hn,F]),(0,R.useEffect)(()=>{ln.current=C},[C]),(0,R.useEffect)(()=>{if(!se)return;let e=je(se,wn);yt.size>0?K.current=e:Pe(K.current,e)||(K.current=e,sn.current=e,j(t=>v?.tab===`outputs`&&t===`outputs`?t:e.activeTab),Ye(e.openFilePaths),L(e.selectedPath),De(!b||e.filesTabOpen),D(e.overviewTabs),O(e.activeOverviewId),k(e.tabOrder),Re.current=Math.max(0,...e.overviewTabs)+1)},[se,wn,v?.tab,yt]),(0,R.useEffect)(()=>{if(yt.size>0||Pe(sn.current,Jn))return;let e=Ie(Jn);sn.current=e,K.current=e,ge?.(e)},[Jn,ge,yt]),(0,R.useEffect)(()=>{g||X||!r||!e||!l||a||u||un.current||(un.current=!0,Promise.resolve(ln.current({silent:!0})).catch(()=>{}).finally(()=>{un.current=!1}))},[e,r,a,g,X,u,l]),(0,R.useEffect)(()=>{if(gn.current!==mn){gn.current=mn,J.current?.abort(Error(`lsp_diagnostics_source_changed`)),J.current=null;let e=new Set([...yt].filter(e=>S(e)&&_t[e]===null));Ye(t=>t.filter(t=>e.has(t))),L(t=>t&&e.has(t)?t:null),ht(t=>Object.fromEntries(Object.entries(t).filter(([t])=>e.has(t)))),bt(e),vt(t=>Object.fromEntries(Object.entries(t).filter(([t])=>e.has(t)))),gt.current.retain(e),St(t=>Object.fromEntries(Object.entries(t).filter(([t])=>e.has(t)))),wt({}),Et(new Set),Ot(null),jt(null),At(!1),Nt({}),H({}),Lt(null),zt(t=>t&&e.has(t)?t:null),Ht(null),Wt(null),Kt({}),W(null),Xt(null),$t(null)}return()=>{J.current?.abort(Error(`lsp_diagnostics_unmounted`)),J.current=null}},[mn]),(0,R.useEffect)(()=>{h&&cn.current!==h.id&&(h.file||hn)&&(cn.current=h.id,h.file?Qn(h.file,h.imageUrl,h.source,h):Zn(h.path,{source:h.source}))},[hn,h]),(0,R.useEffect)(()=>{if(!X||(vn(),!r||!Y))return;let e=!1;async function t(){if(!(e||un.current)&&(typeof document>`u`||document.visibilityState!==`hidden`)){un.current=!0;try{await vn({silent:!0})}finally{un.current=!1}}}let n=window.setInterval(()=>{t()},In),i=()=>{t()};return window.addEventListener(`focus`,i),()=>{e=!0,window.clearInterval(n),window.removeEventListener(`focus`,i)}},[r,vn,Y,X]),(0,R.useEffect)(()=>{if(g||X||!r||!e||!l)return;let t=!1;async function n(){if(!(t||un.current)&&(typeof document>`u`||document.visibilityState!==`hidden`)){un.current=!0;try{await ln.current({silent:!0})}catch{}finally{un.current=!1}}}let i=window.setInterval(()=>{n()},In),a=()=>{n()};return window.addEventListener(`focus`,a),()=>{t=!0,window.clearInterval(i),window.removeEventListener(`focus`,a)}},[e,r,g,X,l]),(0,R.useEffect)(()=>{if(X||!r||!e||n===`local_project`){$t(null);return}let t=!1;return M.workspaceTemplateConfig(r,e).then(e=>{t||$t(e.exists?e.configPath??`openpond.config.json`:null)}).catch(()=>{t||$t(null)}),()=>{t=!0}},[e,r,X,n]),(0,R.useEffect)(()=>{!I||Fn.includes(I)||F.includes(I)||L(jn[0]?.path??null)},[jn,F,Fn,I]),(0,R.useEffect)(()=>{w?.active&&_n&&j(`goal`)},[w?.active,_n]),(0,R.useEffect)(()=>{if(v){if(v.tab===`files`&&hr(),v.tab===`outputs`){if(v.overview===`agents`)D(e=>e.includes(-2)?e:[...e,-2]),O(-2),k(e=>e.includes(`overview--2`)?e:[...e,`overview--2`]);else if(v.overview===`experiments`)D(e=>e.includes(-1)?e:[...e,-1]),O(-1),k(e=>e.includes(`overview--1`)?e:[...e,`overview--1`]);else if(v.overview===`new`){let e=E.find(e=>e>=0)??Re.current++;D(t=>t.includes(e)?t:[...t,e]),O(e),k(t=>t.includes(`overview-${e}`)?t:[...t,`overview-${e}`])}}j(v.tab)}},[v]),(0,R.useEffect)(()=>{!_n&&A===`goal`&&j(`files`)},[A,_n]),(0,R.useEffect)(()=>{!pn&&A===`summary`&&j(`files`)},[A,pn]);let Z=A===`file`||m&&A===`files`?I:null;(0,R.useEffect)(()=>{if(!r||!Z||yt.has(Z))return;if(Le(Z)){Ht(null),zt(e=>e===Z?null:e);return}let t=Ut?.path===Z,n=er(Z);if(g&&(n?.content!=null||n?.patch)||!t&&(n?.content!=null||n?.patch&&!nt)){Ht(null),zt(e=>e===Z?null:e);return}let a=!1,o=tn.current[Z];o?.content==null&&(nt||!o?.patch)&&zt(Z),Ht(null);let s=e||S(Z);return(X?Y?de(r,Y,Z,i):Promise.reject(Error(xe?.emptyMessage??`No sandbox filesystem is available.`)):s?M.workspaceFile(r,s,Z):Promise.reject(Error(`Workspace files are unavailable.`))).then(e=>{a||ht(t=>{let n=t[e.path];return n?.content===e.content&&n.contentType===e.contentType&&n.contentEncoding===e.contentEncoding&&n.patch===e.patch&&n.status===e.status?t:{...t,[e.path]:e}})}).catch(e=>{a||Ht(e instanceof Error?e.message:String(e))}).finally(()=>{a||(zt(e=>e===Z?null:e),Wt(e=>e&&e.id===Ut?.id&&e.path===Z?null:e))}),()=>{a=!0}},[A,e,r,Ut,nt,g,i,xe?.emptyMessage,Y,X,Z,yt]);function Yn(e){let t=A===`outputs`||b&&A===`files`&&!Ee?`overview-${Me}`:null;t&&D(e=>e.filter(e=>e!==Me)),k(n=>n.includes(e)?t?n.filter(e=>e!==t):n:t&&n.includes(t)?n.map(n=>n===t?e:n):[...n,e])}function Xn(){if(E.some(e=>e>=0))O(E.filter(e=>e>=0).at(-1));else{let e=Re.current++;D([e]),O(e),k(t=>[...t,`overview-${e}`])}j(`outputs`)}function Zn(t,n){U(null);let i=X?Y:e;if(y(t)&&!n?.source&&r&&i){ue(r,i,t,X?`sandbox`:`local`).then(he).catch(e=>U(e instanceof Error?e.message:`Could not open HTML preview.`));return}let a=Fe(t,wn);a&&(gt.current.close(a),vt(e=>{if(!Object.hasOwn(e,a))return e;let t={...e};return delete t[a],t}),Yn(m?`files`:a),m&&De(!0),bt(e=>{if(!e.has(a))return e;let t=new Set(e);return t.delete(a),t}),ht(e=>{if(!(a in e))return e;let t={...e};return delete t[a],t}),St(e=>{if(!(a in e))return e;let t={...e};return delete t[a],t}),Wt({id:Date.now(),path:a}),m||Ye(e=>e.includes(a)?e:[...e,a]),L(a),j(m?`files`:`file`),!X&&r&&e&&Le(a)&&Xt(a),N(!1),P(!1),qe(``))}function Qn(e,t,n=!1,i){if(y(e.path)&&e.content!=null&&!n&&r){_(r,e.path,e.content).then(he).catch(e=>U(e instanceof Error?e.message:`Could not open HTML preview.`));return}let a=S(e.path)?e.path:Fe(e.path,wn);if(!a)return;let o=gt.current.receive(a,i);if(o===`ignore`)return;let s=o===`complete`;if(s&&!m&&!F.includes(a))return;s||(Yn(m?`files`:a),m&&De(!0)),i?.sandboxId!==void 0&&vt(e=>({...e,[a]:i.sandboxId}));let c={...e,path:a};ht(e=>i?.loading&&e[a]?.content!=null?e:{...e,[a]:c}),bt(e=>{let t=new Set(e);return t.add(a),t}),St(e=>{if(!t){if(!(a in e))return e;let t={...e};return delete t[a],t}return e[a]===t?e:{...e,[a]:t}}),s?(I===a&&Ht(i?.error??null),zt(e=>e===a?null:e)):(Wt(null),Ht(i?.error??null),zt(i?.loading?a:null),m||Ye(e=>e.includes(a)?e:[...e,a]),L(a),j(m?`files`:`file`),N(!1),P(!1),qe(``))}let $n=(0,R.useCallback)(()=>{st(e=>{let t=!e;return Nn(t),t})},[]),er=e=>Vn(On.get(e),B[e],kn.get(e),e),tr=(0,R.useCallback)((e,t)=>{wt(n=>{let r=n[e],i=r?.savedContent??Hn[e]??er(e).content??``;return{...n,[e]:{content:t,savedContent:i,savedAt:r?.savedAt}}}),Kt(t=>{if(!(e in t))return t;let n={...t};return delete n[e],n})},[On,kn,B,Hn]),nr=(0,R.useCallback)(async(t,n={})=>{if(X||!r||!e||Le(t))return;let i=er(t),a=n.content??Ct[t]?.content??i.content??void 0;if(a?.endsWith(`
7
-
8
- [file truncated]`))return;let o=q.current+1;q.current=o,J.current?.abort(Error(`lsp_diagnostics_superseded`));let s=new AbortController;J.current=s,Lt(t);try{let i=await M.workspaceLspTouch(r,e,{path:t,content:a,waitForDiagnostics:n.waitForDiagnostics??!0},{signal:s.signal});if(o!==q.current)return;Nt(e=>({...e,[i.path]:i.diagnostics})),H(e=>({...e,[i.path]:i.servers}))}catch(e){if(s.signal.aborted||o!==q.current)return;let n=e instanceof Error?e.message:String(e);Nt(e=>({...e,[t]:[]})),H(e=>({...e,[t]:[{id:`lsp`,root:``,status:`error`,message:n}]}))}finally{J.current===s&&(J.current=null),!s.signal.aborted&&o===q.current&&Lt(e=>e===t?null:e)}},[e,r,On,kn,Ct,B,X]),rr=(0,R.useCallback)(async t=>{if(X||!r||!e)throw Error(`Workspace LSP is unavailable.`);return M.workspaceLspAction(r,e,t)},[e,r,X]),ir=(0,R.useCallback)(async t=>{if(!r||!e&&!Y||dn.current===t)return;let n=Ct[t];if(!n||n.content===n.savedContent)return;let i=n.content,a=Date.now();dn.current=t,W(t),Kt(e=>{if(!(t in e))return e;let n={...e};return delete n[t],n});try{let n=X?await _e(r,Y,t,i):await M.saveWorkspaceFile(r,e,{path:t,content:i});ht(e=>({...e,[n.path]:n})),wt(e=>{let n=e[t];return n?{...e,[t]:{content:n.content,savedContent:i,savedAt:a}}:e}),G.languageServers!==`off`&&G.checkOnSave&&await nr(t,{content:i,waitForDiagnostics:!0}),X?await vn({silent:!0}):await C({silent:!0})}catch(e){Kt(n=>({...n,[t]:e instanceof Error?e.message:String(e)}))}finally{dn.current===t&&(dn.current=null),W(e=>e===t?null:e)}},[G.checkOnSave,G.languageServers,e,r,Ct,C,nr,vn,Y,X]),ar=I?er(I):null,or=!!(I&&yt.has(I)),sr=I?Ct[I]?.content??ar?.content??null:null,cr=!(!ar?.patch||nt),lr=!(g||or||A!==`file`||cr||!I||sr==null||Le(I)||Ve(I)||ar?.contentEncoding===`base64`||it&&Ne(I)||sr.endsWith(`
9
-
10
- [file truncated]`));(0,R.useEffect)(()=>{if(G.languageServers===`off`||!G.diagnosticsWhileEditing||!I||!lr||sr==null)return;let e=window.setTimeout(()=>{nr(I,{content:sr,waitForDiagnostics:!0})},700);return()=>window.clearTimeout(e)},[G.diagnosticsWhileEditing,G.languageServers,nr,sr,lr,I]),(0,R.useEffect)(()=>{function e(e){(e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`s`&&A===`file`&&I&&(e.preventDefault(),Kn.has(I)&&ir(I))}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[A,Kn,ir,I]);let ur=(0,R.useCallback)(()=>{I&&(fn.current?fn.current.save():ir(I))},[ir,I]),dr=(0,R.useCallback)(()=>{fn.current?.undo()},[]),fr=(0,R.useCallback)(()=>{fn.current?.redo()},[]),pr=(0,R.useCallback)(()=>{I&&G.languageServers!==`off`&&nr(I,{content:sr??void 0,waitForDiagnostics:!0})},[G.languageServers,nr,sr,I]);function mr(e,t){if(t.stopPropagation(),(!Kn.has(e)||window.confirm(`Discard unsaved changes to ${e}?`))&&(Kn.has(e)&&(wt(t=>{if(!(e in t))return t;let n={...t};return delete n[e],n}),Kt(t=>{if(!(e in t))return t;let n={...t};return delete n[e],n})),gt.current.close(e),vt(t=>{if(!Object.hasOwn(t,e))return t;let n={...t};return delete n[e],n}),Ye(t=>t.filter(t=>t!==e)),k(t=>t.filter(t=>t!==e)),yt.has(e)&&ht(t=>{if(!(e in t))return t;let n={...t};return delete n[e],n}),St(t=>{if(!(e in t))return t;let n={...t};return delete n[e],n}),bt(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n}),I===e)){let t=Bn.findIndex(t=>t.path===e),n=Bn[t+1]??Bn[t-1]??null;L(n?.path??null),!n&&A===`file`&&(b?Xn():j(`files`))}}function hr(){Yn(`files`),De(!0),j(`files`),N(!1),P(!1)}function gr(e){Et(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function _r(e){Yn(`files`),De(!0),e&&Et(t=>{let n=new Set(t);for(let t of Gn(e))n.add(t);return n}),j(`files`),N(!1),P(!1)}function vr(){let e=`git apply <<'PATCH'\n${jn.map(e=>e.patch).filter(Boolean).join(`
11
- `)}\nPATCH`;navigator.clipboard?.writeText(e)}let yr=jn.length>0,br=Fn.length>0,xr=F.length>0,Sr=_n||pn||yr||br||xr,Q=A===`outputs`&&b?`outputs`:A===`goal`&&_n?`goal`:A===`summary`&&pn?`summary`:A===`file`&&I?`file`:b&&!Ee?`outputs`:`files`;(0,R.useEffect)(()=>{if(Q!==`outputs`||E.length)return;let e=Re.current++;D([e]),O(e),k(t=>[...t,`overview-${e}`]),j(`outputs`)},[E.length,Q]);let Cr=Q===`files`?`No files to show`:`No local changes`,wr=n===`local_project`&&!l&&!u,Tr=X?kt:s,Er=X?V:u,Dr=Un({changedFiles:Cn?.filesChanged??jn.length,checkpointStatus:Tn,dirty:!!Cn?.dirty,error:Er,loading:Tr,preservedReadback:xn,sandboxMode:X,sourcePending:X&&!Y}),Or=Tr?`Loading workspace files`:Er?`Workspace files are unavailable`:X&&!Y?xe?.emptyMessage??`No sandbox filesystem is available.`:wr?`Loading workspace files`:l?Cr:`No local files to show`,kr=I?xt[I]??null:null,Ar=!kr&&!X&&I&&Le(I)?I:null,jr=Yt?xt[Yt]??null:null,Mr=!jr&&!X&&Yt&&Le(Yt)?Yt:null,Nr=ne(r,e,Ar),Pr=ne(r,e,Mr),Fr=kr??Nr,Ir=jr??Pr,Lr=Q===`file`||m&&Q===`files`?I:null,Rr=!!(Lr&&Ne(Lr)),zr=I?Mt[I]??[]:[],Br=I?Pt[I]??null:null,Vr=!!(I&&Ft===I),Hr=ot&&lr,Ur=!g&&!or&&!X&&G.languageServers!==`off`,Wr=(0,R.useMemo)(()=>Pn({activeDiagnostics:zr,activeServers:Br,editorDiagnosticsChecking:Vr,editorLspEnabled:Ur,showEditorCommandBar:Hr}),[zr,Br,Vr,Ur,Hr]),Gr=(0,R.useCallback)(async e=>{if(!r)throw Error(`OpenPond server connection is unavailable.`);await M.runSubagentLifecycleAction(r,e.runId,{action:e.action,reason:`User requested from Goal details.`}),await C({silent:!0})},[r,C]),$=X?`sandbox`:n===`local_project`?`local`:null,Kr=(0,R.useMemo)(()=>{let e=new Map;if(!$)return e;for(let n of Ce)n.workspaceKind===$&&n.workspaceId===(t??($===`local`?S(n.path):null))&&e.set(n.path,n);return e},[Ce,$,t]),qr=(0,R.useCallback)(e=>{try{return Kr.get($e(e))?.status??null}catch{return null}},[Kr]),Jr=(0,R.useCallback)((e,n)=>{let r=t??($===`local`?S(e):null);if(!$||!r||!Te)return;let i;try{i=$e(e)}catch{return}let a=Kr.get(i),o=new Date().toISOString();Te(a??{id:et({workspaceKind:$,workspaceId:r,path:i}),workspaceKind:$,workspaceId:r,workspaceName:c??`Local files`,path:i,status:`pinned`,order:null,sourceSessionId:we,available:!0,createdAt:o,updatedAt:o},n)},[Te,Kr,we,$,t,c]),Yr=!!($&&Te&&(t||$===`local`&&F.some(e=>S(e)))),Xr=I&&Yr&&!or?(0,z.jsx)(Qt,{currentStatus:qr(I),onSetStatus:e=>Jr(I,e)}):null,Zr=I?(0,z.jsxs)(`div`,{className:`workspace-active-file-preview`,children:[(0,z.jsx)(on,{file:er(I),connection:r,workspaceId:e,sandboxId:Object.hasOwn(_t,I)?_t[I]:X?Y:null,dirty:Kn.has(I),onReload:(e,t)=>{ht(t=>({...t,[I]:{...e,path:I}})),wt(e=>{let t={...e};return delete t[I],t}),t&&St(e=>({...e,[I]:t})),Ht(null),!Ve(I)&&!Le(I)&&rt(!0)}},`${mn}:${_t[I]??`local`}:${I}`),(0,z.jsx)(Sn,{diagnostics:Ur?Mt[I]??[]:[],draftContent:Ct[I]?.content,editorRef:fn,editable:lr&&!Fr,error:Vt,file:er(I),collapsed:Qe,hideWhiteSpace:dt,headerActions:Xr,imageSrc:Fr,loading:Rt===I,loadFullFiles:nt,saveError:Gt[I]??null,saving:qt===I,onOpenImage:()=>{Fr&&Xt(I)},onDraftContentChange:e=>tr(I,e),onLspAction:Ur?rr:void 0,onSave:()=>void ir(I),onSelectBreadcrumbPath:_r,renderMarkdown:it,splitView:pt,wordDiffs:ct,wordWrap:Xe,workspaceName:c,workspaceRootPath:wn})]}):null,Qr=(Q===`file`||m&&Q===`files`)&&I&&!Ve(I)&&!Le(I)&&ar?.contentEncoding!==`base64`?(0,z.jsx)(rn,{inline:!0,canSaveActiveFile:!(g||or||!I||!Kn.has(I)||qt===I),canCheckActiveFile:Ur,collapsed:Qe,editorControlsVisible:ot,editorDiagnosticStatus:Wr,editorDiagnosticsChecking:Vr,hideWhiteSpace:dt,loadFullFiles:nt,menuOpen:He,renderMarkdown:it,showEditorCommandBar:Hr,showRenderMarkdownToggle:Rr,splitView:pt,wordDiffs:ct,wordWrap:Xe,onCopyGitApply:vr,onEditorCheck:pr,onEditorRedo:fr,onEditorSave:ur,onEditorUndo:dr,onRefresh:()=>void(X?vn():C()),onToggleCollapsed:()=>tt(e=>!e),onToggleEditorControlsVisible:$n,onToggleHideWhiteSpace:()=>ft(e=>!e),onToggleLoadFullFiles:()=>rt(e=>!e),onToggleMenu:e=>Ue(t=>e??!t),onToggleRenderMarkdown:()=>at(e=>!e),onToggleSplitView:()=>mt(e=>!e),onToggleWordDiffs:()=>ut(e=>!e),onToggleWordWrap:()=>Ze(e=>!e)}):null;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`aside`,{className:`workspace-diff-panel ${Q===`outputs`?`workspace-diff-overview`:``} ${d?`expanded`:``}`,id:`right-sidebar-files-panel`,role:`tabpanel`,"aria-label":`Workspace diffs`,children:[!d&&(0,z.jsx)(`div`,{className:`workspace-diff-resize-handle`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize diff panel`,onPointerDown:fe}),(0,z.jsx)(nn,{addMenuOpen:We,expanded:d,filteredFiles:qn,openFiles:Bn,dirtyFilePaths:Kn,goalDetailsAvailable:_n,searchOpen:Ge,searchQuery:Ke,selectedPath:I,sideChatTabs:te,summaryAvailable:pn,onSelectOutputs:b?()=>{D(e=>e.includes(-1)?e:[...e,-1]),O(-1),k(e=>e.includes(`overview--1`)?e:[...e,`overview--1`]),j(`outputs`),N(!1),P(!1)}:void 0,sourceStatus:Dr,sourceSwitcher:re,visibleTab:Q,additionalTabs:oe,toolbarActions:Qr,tabOrder:Be,filesTabOpen:Ee,onCloseFilesTab:b?()=>{De(!1),k(e=>e.filter(e=>e!==`files`)),A===`files`&&Xn()}:void 0,overviewTabs:b?E:[],outputsLabel:ie,activeOverviewId:Me,onNewOverview:b?()=>{let e=Re.current++;D(t=>[...t,e]),k(t=>[...t,`overview-${e}`]),O(e),j(`outputs`),N(!1),P(!1)}:void 0,onSelectOverview:e=>{O(e),j(`outputs`)},onCloseOverview:e=>{let t=E.filter(t=>t!==e);if(D(t),k(t=>t.filter(t=>t!==`overview-${e}`)),e===Me&&A===`outputs`){if(t.length)O(t[t.length-1]);else if(b){let e=Re.current++;D([e]),O(e),j(`outputs`),k(t=>[...t,`overview-${e}`])}else if(Bn.length&&I)j(`file`);else if(Ee)j(`files`);else{let e=Re.current++;D([e]),k(t=>[...t,`overview-${e}`]),O(e)}}},getFileBookmarkStatus:Yr?qr:void 0,onCloseFileTab:mr,onCloseSideChat:ve,onCloseSearch:()=>P(!1),onOpenFile:Zn,onOpenBrowser:me?()=>{N(!1),P(!1),me()}:void 0,onOpenSearch:()=>{N(!1),P(!0)},onOpenSideChat:ye?()=>{N(!1),P(!1),ye()}:void 0,onSearchQueryChange:qe,onSetFileBookmarkStatus:Yr?Jr:void 0,onSelectFile:e=>{L(e),j(`file`)},onSelectFiles:hr,onSelectGoal:()=>j(`goal`),onSelectSummary:()=>{j(`summary`),N(!1),P(!1)},onSelectSideChat:be,onToggleAddMenu:()=>{N(e=>!e),P(!1)},onToggleExpanded:pe}),Bt&&(0,z.jsx)(Ae,{error:Bt}),b?E.map(e=>(0,z.jsx)(`div`,{className:`workspace-diff-tool-view`,hidden:Q!==`outputs`||Me!==e,inert:Q!==`outputs`||Me!==e,children:b(()=>{P(!0),N(!1)},e)},e)):null,Q===`outputs`&&b?null:Q===`goal`&&_n?(0,z.jsx)(lt,{createRuntime:w?.createRuntime??null,goalRuntime:w?.goalRuntime??null,subagentRuntime:w?.subagentRuntime??null,onRunSubagentLifecycleAction:r?Gr:void 0}):Q===`summary`&&pn?Se?(0,z.jsx)(Jt,{summary:Se}):(0,z.jsx)(It,{sandboxId:Y,connection:r}):Sr?(0,z.jsxs)(z.Fragment,{children:[Q===`files`&&(m?(0,z.jsxs)(`div`,{className:`workspace-diff-files-preview-layout`,children:[(0,z.jsx)(en,{diff:Cn,expandedFolderPaths:Tt,rootPath:f,repoFiles:Fn,selectedPath:I,getFileBookmarkStatus:Yr?qr:void 0,onOpenFile:Zn,onSetFileBookmarkStatus:Yr?Jr:void 0,onToggleFolder:gr}),Zr??(0,z.jsx)(`div`,{className:`workspace-diff-files-preview-empty`,children:`Select a file to review its changes.`})]}):(0,z.jsx)(en,{diff:Cn,expandedFolderPaths:Tt,rootPath:f,repoFiles:Fn,selectedPath:I,getFileBookmarkStatus:Yr?qr:void 0,onOpenFile:Zn,onSetFileBookmarkStatus:Yr?Jr:void 0,onToggleFolder:gr})),Q===`file`&&I&&Zr]}):(0,z.jsx)(`div`,{className:`workspace-diff-empty`,children:(0,z.jsx)(`span`,{children:Or})})]}),(0,z.jsx)(x,{open:!!Ir,src:Ir,title:Yt??``,onClose:()=>Xt(null)})]})}export{Fn as n,rt as r,Bn as t};