openpond 0.2.72 → 0.2.74

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 (276) hide show
  1. package/dist/app-server.js +1 -1
  2. package/dist/chunks/{acp-7A2UPCG5.js → acp-TBDNUDTR.js} +1 -1
  3. package/dist/chunks/{acp-agent-AGALGR6V.js → acp-agent-4PKMX52I.js} +1 -1
  4. package/dist/chunks/{app-layer-DUCNCJ2X.js → app-layer-4YIA53WX.js} +1 -1
  5. package/dist/chunks/{app-server-evaluations-SNWXULKD.js → app-server-evaluations-5JVNCET7.js} +1 -1
  6. package/dist/chunks/{app-server-harness-services-YNMGMKPK.js → app-server-harness-services-4E236TXE.js} +1 -1
  7. package/dist/chunks/{app-server-runtime-BKJ7L6JZ.js → app-server-runtime-CI2NTKX7.js} +1 -1
  8. package/dist/chunks/{apps-2OWE23BH.js → apps-APEPLFYU.js} +1 -1
  9. package/dist/chunks/chunk-2IECLXB2.js +2 -0
  10. package/dist/chunks/{chunk-V4VM2R6D.js → chunk-2IIVBBF5.js} +1 -1
  11. package/dist/chunks/{chunk-ENY24ZBB.js → chunk-3BIB6KKL.js} +1 -1
  12. package/dist/chunks/{chunk-DFSQ5HZ7.js → chunk-3V2XAYYA.js} +1 -1
  13. package/dist/chunks/{chunk-CHRED2FK.js → chunk-3XNUG4FO.js} +1 -1
  14. package/dist/chunks/{chunk-BUMCJHQP.js → chunk-4KG7GJ5O.js} +1 -1
  15. package/dist/chunks/chunk-5AV2EWFX.js +2 -0
  16. package/dist/chunks/{chunk-KTQWWCP2.js → chunk-5SVBY7NP.js} +6 -6
  17. package/dist/chunks/{chunk-MLLMLXKG.js → chunk-5VQK3CCJ.js} +1 -1
  18. package/dist/chunks/{chunk-4JKWCLTQ.js → chunk-645T6LH7.js} +1 -1
  19. package/dist/chunks/{chunk-X7ZMUWJO.js → chunk-6IKIGVJF.js} +1 -1
  20. package/dist/chunks/{chunk-X2MJFTLS.js → chunk-6KKWSUEW.js} +1 -1
  21. package/dist/chunks/{chunk-MQMMJKOZ.js → chunk-A4HLKWQD.js} +1 -1
  22. package/dist/chunks/{chunk-ZSWATWK2.js → chunk-AWUSAHXG.js} +1 -1
  23. package/dist/chunks/{chunk-T6ML5SCD.js → chunk-E5HDJCKK.js} +1 -1
  24. package/dist/chunks/{chunk-WMJEQK4G.js → chunk-E7SQBMYW.js} +1 -1
  25. package/dist/chunks/{chunk-VXFGSFIE.js → chunk-EAW5FHU4.js} +2 -2
  26. package/dist/chunks/{chunk-GPGXBKXU.js → chunk-EZ435RGA.js} +1 -1
  27. package/dist/chunks/{chunk-AITV76GO.js → chunk-F64TR23C.js} +1 -1
  28. package/dist/chunks/{chunk-FOAM3YZQ.js → chunk-FA3GXQYA.js} +1 -1
  29. package/dist/chunks/{chunk-2THZ6GZY.js → chunk-FCC24XUI.js} +1 -1
  30. package/dist/chunks/{chunk-L5L3H6CI.js → chunk-FDYWGE2Y.js} +1 -1
  31. package/dist/chunks/{chunk-CAYKEJJY.js → chunk-FRQYH4QD.js} +1 -1
  32. package/dist/chunks/{chunk-TR5UC5AF.js → chunk-G2P2PYEO.js} +1 -1
  33. package/dist/chunks/{chunk-MPXOPL7R.js → chunk-H2YQ4AA2.js} +1 -1
  34. package/dist/chunks/{chunk-KRJZ5CW3.js → chunk-H5EHSILL.js} +1 -1
  35. package/dist/chunks/{chunk-N5FT6PTI.js → chunk-HIPKU57Y.js} +1 -1
  36. package/dist/chunks/{chunk-JSDGOQ5U.js → chunk-IXMY4EKS.js} +1 -1
  37. package/dist/chunks/{chunk-ATI52WMB.js → chunk-JAIFVT3D.js} +1 -1
  38. package/dist/chunks/{chunk-HBGTHOOB.js → chunk-JG6JA7YT.js} +1 -1
  39. package/dist/chunks/{chunk-F3IEAU7O.js → chunk-KE5PYRJ6.js} +1 -1
  40. package/dist/chunks/{chunk-UZE3C2SF.js → chunk-KH42V27F.js} +1 -1
  41. package/dist/chunks/{chunk-KUEVP7WM.js → chunk-KOC74O7R.js} +1 -1
  42. package/dist/chunks/{chunk-VMBWCIGG.js → chunk-KOLVSUOS.js} +1 -1
  43. package/dist/chunks/{chunk-5TPJ5ECJ.js → chunk-KQ7RFPG5.js} +1 -1
  44. package/dist/chunks/{chunk-EHMA5XS7.js → chunk-LWF5MQJ4.js} +1 -1
  45. package/dist/chunks/{chunk-CQRA5TXF.js → chunk-MHSSPMLB.js} +1 -1
  46. package/dist/chunks/{chunk-TD5YYA5Z.js → chunk-MXDSB2C5.js} +1 -1
  47. package/dist/chunks/{chunk-W4JBPYGW.js → chunk-O6L4NO3M.js} +1 -1
  48. package/dist/chunks/{chunk-QKBMXL4D.js → chunk-OBMMO5NC.js} +3 -3
  49. package/dist/chunks/{chunk-MWPMYCYB.js → chunk-ODH5XGE6.js} +1 -1
  50. package/dist/chunks/{chunk-CX4U32VO.js → chunk-ONR2AKRI.js} +4 -4
  51. package/dist/chunks/{chunk-RWBP2H4M.js → chunk-OUOOKEU3.js} +1 -1
  52. package/dist/chunks/{chunk-6OD2FKUS.js → chunk-OVEQAEKR.js} +1 -1
  53. package/dist/chunks/{chunk-RIFWD5XM.js → chunk-OXUS4QOT.js} +1 -1
  54. package/dist/chunks/{chunk-LHTRQAPZ.js → chunk-SUILNZQJ.js} +1 -1
  55. package/dist/chunks/{chunk-SRK4WX7D.js → chunk-TP222CV2.js} +1 -1
  56. package/dist/chunks/{chunk-5WFKBZCU.js → chunk-TRXOE7TT.js} +1 -1
  57. package/dist/chunks/{chunk-5TTQCT3G.js → chunk-U73T66FP.js} +1 -1
  58. package/dist/chunks/{chunk-IA6CTX7A.js → chunk-WAWVFSIQ.js} +1 -1
  59. package/dist/chunks/{chunk-KOIXRLZZ.js → chunk-WBV6A6NS.js} +1 -1
  60. package/dist/chunks/{chunk-UCPD526R.js → chunk-WOYBWRRV.js} +1 -1
  61. package/dist/chunks/{chunk-S5ACNR5Y.js → chunk-X4CN3FIN.js} +1 -1
  62. package/dist/chunks/{chunk-PYPXP5R3.js → chunk-XN5BXPAT.js} +1 -1
  63. package/dist/chunks/{chunk-JALL5NPH.js → chunk-XSDWRRZP.js} +1 -1
  64. package/dist/chunks/{chunk-HA762QYM.js → chunk-YIZE3M5S.js} +1 -1
  65. package/dist/chunks/{cli-KXU5DNVV.js → cli-NHRYN2G3.js} +1 -1
  66. package/dist/chunks/{command-X35I53H3.js → command-54MMVWS2.js} +3 -3
  67. package/dist/chunks/{configuration-command-VJUK34UQ.js → configuration-command-SAGJMI3I.js} +1 -1
  68. package/dist/chunks/{connected-app-executor-JBFJF2H5.js → connected-app-executor-WJEDXUA4.js} +1 -1
  69. package/dist/chunks/{connected-evidence-CQ533AML.js → connected-evidence-EVZTMVHV.js} +1 -1
  70. package/dist/chunks/{connected-starting-assets-RL5X6LZ7.js → connected-starting-assets-F2DBUHV5.js} +1 -1
  71. package/dist/chunks/{continual-PHGIZFF6.js → continual-C2YWPEJZ.js} +1 -1
  72. package/dist/chunks/{core-commands-5DYMDWXY.js → core-commands-Z27A5ZPQ.js} +1 -1
  73. package/dist/chunks/{dataset-preparation-authoring-UDSX33YK.js → dataset-preparation-authoring-CH6Z4NE6.js} +1 -1
  74. package/dist/chunks/{datasets-BW4JFUUU.js → datasets-RZBRILIN.js} +1 -1
  75. package/dist/chunks/{desktop-test-RIG4CB2Z.js → desktop-test-UXOA4EON.js} +1 -1
  76. package/dist/chunks/{evaluation-coordination-6QJ6XTUX.js → evaluation-coordination-43DTVJFD.js} +1 -1
  77. package/dist/chunks/{experiment-improvements-2XF63AQ4.js → experiment-improvements-JBYCVRYR.js} +1 -1
  78. package/dist/chunks/{experiments-3S2BVNK6.js → experiments-5QAMBNB6.js} +1 -1
  79. package/dist/chunks/{experiments-signal-IRBHGGW5.js → experiments-signal-OIDQ5SNH.js} +1 -1
  80. package/dist/chunks/{help-Q2VMJVTR.js → help-ESZC6NHQ.js} +1 -1
  81. package/dist/chunks/{host-profile-evaluation-tools-5LZQHA32.js → host-profile-evaluation-tools-XMGGHVH3.js} +1 -1
  82. package/dist/chunks/{hosted-app-server-composition-AYZM2HY6.js → hosted-app-server-composition-U7WGMN5B.js} +1 -1
  83. package/dist/chunks/{hosted-experiment-improvement-SMZJYRJ7.js → hosted-experiment-improvement-VQN6PJKR.js} +1 -1
  84. package/dist/chunks/{hosted-harness-runtime-QWIFAITG.js → hosted-harness-runtime-O6E5LCGN.js} +1 -1
  85. package/dist/chunks/{hosted-profile-candidate-WOMWAE5N.js → hosted-profile-candidate-HQ544PNP.js} +1 -1
  86. package/dist/chunks/{hosted-profile-compiler-NZ2BXN32.js → hosted-profile-compiler-K4OACT7S.js} +1 -1
  87. package/dist/chunks/{hosted-profile-evaluation-control-3ECFFM7E.js → hosted-profile-evaluation-control-TKYM73YY.js} +1 -1
  88. package/dist/chunks/{hosted-profile-evaluation-inspection-TM7RKONG.js → hosted-profile-evaluation-inspection-HFCFUYQ4.js} +1 -1
  89. package/dist/chunks/{hosted-profile-evaluation-preparation-2MZIRT75.js → hosted-profile-evaluation-preparation-OJ6AR5P5.js} +1 -1
  90. package/dist/chunks/{human-review-PG4WWVWV.js → human-review-HTHWLUNA.js} +1 -1
  91. package/dist/chunks/{import-FAZAVZBF.js → import-IWDEDLM3.js} +1 -1
  92. package/dist/chunks/{local-harness-improvement-runtime-OYLTKMJU.js → local-harness-improvement-runtime-BWZBMOGL.js} +1 -1
  93. package/dist/chunks/{local-harness-taskset-review-I7YU4RZI.js → local-harness-taskset-review-JL2XNXML.js} +1 -1
  94. package/dist/chunks/{opchat-TCZA6373.js → opchat-RJINPBFB.js} +1 -1
  95. package/dist/chunks/{opchat-bounded-chat-GMYDXLWB.js → opchat-bounded-chat-WRXN7S52.js} +1 -1
  96. package/dist/chunks/{organizations-PYKGA2P2.js → organizations-AWMQ46PJ.js} +1 -1
  97. package/dist/chunks/{profile-GYYI555I.js → profile-VJDML6I7.js} +1 -1
  98. package/dist/chunks/{project-action-payload-FE6M2OXJ.js → project-action-payload-65MTQMQW.js} +1 -1
  99. package/dist/chunks/{project-agent-4ISJFMJD.js → project-agent-NI4EGNDI.js} +1 -1
  100. package/dist/chunks/{published-experiment-source-E2YAJCLM.js → published-experiment-source-L7BER6AE.js} +1 -1
  101. package/dist/chunks/{refiner-profile-service-LKGXD5WJ.js → refiner-profile-service-56776J7B.js} +1 -1
  102. package/dist/chunks/{runtime-UDLOZD4Y.js → runtime-GN2H2R7L.js} +2 -2
  103. package/dist/chunks/{sandbox-command-4J6DAY7T.js → sandbox-command-763SZPJ4.js} +1 -1
  104. package/dist/chunks/{sandbox-template-TSXWJMWG.js → sandbox-template-AVTZNKFZ.js} +1 -1
  105. package/dist/chunks/{saved-work-QTEBKVUB.js → saved-work-OMBDT3ZR.js} +1 -1
  106. package/dist/chunks/{send-turn-4MH4WMLW.js → send-turn-VQRLIHOE.js} +1 -1
  107. package/dist/chunks/{setup-IVT2FQSE.js → setup-C6673TJK.js} +1 -1
  108. package/dist/chunks/{src-TOSQX36I.js → src-HHFJIPL5.js} +1 -1
  109. package/dist/chunks/{src-DC7N2H7A.js → src-UHNSXT34.js} +2 -2
  110. package/dist/chunks/{store-chat-resources-QLXKKYYC.js → store-chat-resources-TYR7D2UP.js} +1 -1
  111. package/dist/chunks/{store-continual-support-reviews-4F2BOG3H.js → store-continual-support-reviews-63YCKG3P.js} +1 -1
  112. package/dist/chunks/{store-conversation-serving-EUD47W6X.js → store-conversation-serving-PDSBGL3E.js} +1 -1
  113. package/dist/chunks/{store-create-improve-QUOTNNIM.js → store-create-improve-RYASTT56.js} +1 -1
  114. package/dist/chunks/{store-datasets-ZUC7CNVO.js → store-datasets-PELTRO4A.js} +1 -1
  115. package/dist/chunks/{store-evaluation-results-LHHPHESK.js → store-evaluation-results-OUTNEMAY.js} +1 -1
  116. package/dist/chunks/{store-human-review-7WZWRJ6X.js → store-human-review-GIMAXCJQ.js} +1 -1
  117. package/dist/chunks/{store-learned-preference-migration-validation-MVNKBR4X.js → store-learned-preference-migration-validation-DHOSHA6C.js} +1 -1
  118. package/dist/chunks/{store-local-experiments-HB53QFLL.js → store-local-experiments-AH4Z6RWX.js} +1 -1
  119. package/dist/chunks/{store-model-batch-review-O3I6GIAA.js → store-model-batch-review-UUW6ZLDH.js} +1 -1
  120. package/dist/chunks/{store-model-configuration-CDIGNU6Q.js → store-model-configuration-4U5A6DU7.js} +1 -1
  121. package/dist/chunks/{store-model-project-preparation-QMQ2HMJV.js → store-model-project-preparation-MYHO43VH.js} +1 -1
  122. package/dist/chunks/{store-modification-recordings-W4VEZKKQ.js → store-modification-recordings-OZBLFYCT.js} +1 -1
  123. package/dist/chunks/{store-sidebar-file-bookmarks-KAEDHVVF.js → store-sidebar-file-bookmarks-NQ3ZLTGZ.js} +1 -1
  124. package/dist/chunks/{store-sidebar-preferences-QPBLTHY6.js → store-sidebar-preferences-L6J7J5WC.js} +1 -1
  125. package/dist/chunks/{store-subagents-ZELQP3MX.js → store-subagents-6FHGHQ6V.js} +1 -1
  126. package/dist/chunks/{store-task-inbox-4ZDQR2E7.js → store-task-inbox-M7YZNCRF.js} +1 -1
  127. package/dist/chunks/{store-task-inventory-CTIJDLYE.js → store-task-inventory-TTJQAM3T.js} +1 -1
  128. package/dist/chunks/{store-taskset-drafts-FRPBYLTW.js → store-taskset-drafts-4GVHDLJJ.js} +1 -1
  129. package/dist/chunks/{store-training-WQAYUT7B.js → store-training-MGGTGTV2.js} +1 -1
  130. package/dist/chunks/{store-training-jobs-O5EHGTH7.js → store-training-jobs-XKDUX4SV.js} +1 -1
  131. package/dist/chunks/{store-training-models-YSZMC66T.js → store-training-models-4S4ZT3BL.js} +1 -1
  132. package/dist/chunks/{taskset-OVYM4QMS.js → taskset-SLQSCYJI.js} +1 -1
  133. package/dist/chunks/{teams-bot-U2M3ORWR.js → teams-bot-PX7HUAQQ.js} +1 -1
  134. package/dist/chunks/{tool-learning-NXVR4YPA.js → tool-learning-25Z2JOBS.js} +1 -1
  135. package/dist/chunks/{training-EQ7G5FDY.js → training-2LUQ2IZM.js} +1 -1
  136. package/dist/chunks/{training-LQUAL4Y4.js → training-JA5ZQABE.js} +1 -1
  137. package/dist/chunks/{training-PEZYJ2SN.js → training-NL5GYZKU.js} +1 -1
  138. package/dist/chunks/training-hosted-NLXMISNL.js +2 -0
  139. package/dist/chunks/{training-hosted-alphaedit-VCOEYLKK.js → training-hosted-alphaedit-WGMJ3L2D.js} +1 -1
  140. package/dist/chunks/{training-hosted-decision-IKWWXA56.js → training-hosted-decision-66EUMUIW.js} +1 -1
  141. package/dist/chunks/{training-hosted-engram-3TOPPVSW.js → training-hosted-engram-QDXSJ77I.js} +1 -1
  142. package/dist/chunks/{training-hosted-modification-comparison-C6S4JFHW.js → training-hosted-modification-comparison-2MH5FZMZ.js} +1 -1
  143. package/dist/chunks/{training-hosted-neuron-training-EP2U4PHG.js → training-hosted-neuron-training-3QXKIEKT.js} +1 -1
  144. package/dist/chunks/{training-hosted-serving-report-KJMRZJLQ.js → training-hosted-serving-report-ZG75ACZK.js} +1 -1
  145. package/dist/chunks/{training-hosted-steering-I27DV6A2.js → training-hosted-steering-KFMTKCTX.js} +1 -1
  146. package/dist/chunks/{training-model-start-NWXNGRDC.js → training-model-start-NMQ55UHZ.js} +1 -1
  147. package/dist/chunks/{workspaces-FVQYJPOS.js → workspaces-ROFG76XK.js} +1 -1
  148. package/dist/cli.js +1 -1
  149. package/dist/skills/manifest.json +1 -1
  150. package/dist/web/assets/{App-QM6Y2Eod.js → App-CV1p0_Zy.js} +4 -4
  151. package/dist/web/assets/{AppDialog-C8um481a.js → AppDialog-DdGt7aU1.js} +1 -1
  152. package/dist/web/assets/{AppTerminalPanel-OwNr-bp6.js → AppTerminalPanel-B2p_tYh5.js} +2 -2
  153. package/dist/web/assets/{AppToastContext-BQ4iRFif.js → AppToastContext-D7z0w1PS.js} +1 -1
  154. package/dist/web/assets/{AppsView-mk8m_Cra.js → AppsView-B-Ts-M_V.js} +1 -1
  155. package/dist/web/assets/{AttachmentTypeIcon-SITPqTtF.js → AttachmentTypeIcon-BJ5i12im.js} +1 -1
  156. package/dist/web/assets/{BrowserSidebar-BghdIKTB.js → BrowserSidebar-BVHthjXU.js} +1 -1
  157. package/dist/web/assets/{CartesianChart-BdRx7q_O.js → CartesianChart-BuJ1wFS7.js} +1 -1
  158. package/dist/web/assets/{ChatTimelineEntry-BBOnAzJB.js → ChatTimelineEntry-CfiiTrK4.js} +1 -1
  159. package/dist/web/assets/{CollaborationTabs-Beja-9s5.js → CollaborationTabs-1t9zAhDC.js} +1 -1
  160. package/dist/web/assets/{CommandMenu-CQtrSUpu.js → CommandMenu-DTB6xjGG.js} +1 -1
  161. package/dist/web/assets/{CommunityView-LPTAakS-.js → CommunityView-BjeZ56id.js} +1 -1
  162. package/dist/web/assets/{ComposerAttachments-DI-Gr7Zw.js → ComposerAttachments-C_K_05H9.js} +1 -1
  163. package/dist/web/assets/{ComposerCreateImproveStrip-CY5Uw1yc.js → ComposerCreateImproveStrip-A38jnNGd.js} +1 -1
  164. package/dist/web/assets/{ConversationImportsSettings-DFwhKERw.js → ConversationImportsSettings-jwaoKQZt.js} +1 -1
  165. package/dist/web/assets/{DatasetReviewImport-C9xraQk7.js → DatasetReviewImport-DZA1s3XG.js} +1 -1
  166. package/dist/web/assets/{ExperimentTrainingDataWorkspace-Cx58S6R_.js → ExperimentTrainingDataWorkspace-DowPuAXk.js} +2 -2
  167. package/dist/web/assets/{FilePagePreview-dlbmR8s8.js → FilePagePreview-11ZNRtdT.js} +2 -2
  168. package/dist/web/assets/{GetStartedView-BkTV_shK.js → GetStartedView-bLVKmjqg.js} +1 -1
  169. package/dist/web/assets/{GettingStartedDialog-DulDLYnr.js → GettingStartedDialog-BeimFLZh.js} +1 -1
  170. package/dist/web/assets/{HostedModelLearningReview--fXJEOfI.js → HostedModelLearningReview-DiFVb3WK.js} +1 -1
  171. package/dist/web/assets/{HostedModelLearningSettings-BEb7B_PC.js → HostedModelLearningSettings-DtUF5ejq.js} +1 -1
  172. package/dist/web/assets/{HtmlVisual-BS61T2qR.js → HtmlVisual-CgVTWr64.js} +1 -1
  173. package/dist/web/assets/{LabModelVersionDetailPage-CmzUIDbR.js → LabModelVersionDetailPage-BvinwnBN.js} +1 -1
  174. package/dist/web/assets/{LabModelWorkspace-DoAnQKWk.js → LabModelWorkspace-Q5DG2mLP.js} +1 -1
  175. package/dist/web/assets/{LabSkillSidebar-DJTm7ZQs.js → LabSkillSidebar-cmhZzr4f.js} +1 -1
  176. package/dist/web/assets/{LabsRoute-DNtBot4a.js → LabsRoute-DS_mlprv.js} +4 -4
  177. package/dist/web/assets/{LearningBatchesPage-C_oQjciE.js → LearningBatchesPage-Cm-btgWc.js} +1 -1
  178. package/dist/web/assets/{MainChatThread-D9e-to8e.js → MainChatThread-DbTn4Bag.js} +2 -2
  179. package/dist/web/assets/{MainPane-mWeD0M-f.js → MainPane-BtzUF6O_.js} +6 -6
  180. package/dist/web/assets/{ModelProjectPageHeader-BecKU_2p.js → ModelProjectPageHeader-C4mgVJGx.js} +1 -1
  181. package/dist/web/assets/{NativeSetupTerminal-DO0DN4fH.js → NativeSetupTerminal-bJpDkKk1.js} +2 -2
  182. package/dist/web/assets/{NativeSkillSidebar-jnxgQASC.js → NativeSkillSidebar-BuToZvK-.js} +1 -1
  183. package/dist/web/assets/{NewProjectDialog-ByHR4vMf.js → NewProjectDialog-F0BPQy0S.js} +1 -1
  184. package/dist/web/assets/{OutputsPage-DZY4BUCy.js → OutputsPage-DC4g59_8.js} +1 -1
  185. package/dist/web/assets/{PageChrome-DjPuwWsn.js → PageChrome-ufq2jePD.js} +1 -1
  186. package/dist/web/assets/{ProjectsPage-DKbwhIM4.js → ProjectsPage-7mbOvMfO.js} +1 -1
  187. package/dist/web/assets/{RightChatPanelStack-BARH0XuL.js → RightChatPanelStack-sR9xN3RP.js} +1 -1
  188. package/dist/web/assets/RightSidebarHomePanel-joZavyR9.js +1 -0
  189. package/dist/web/assets/{ScheduledWorkPage-CElrmRz9.js → ScheduledWorkPage-s9CN6nR_.js} +1 -1
  190. package/dist/web/assets/{SettingsView-CsFSjE9s.js → SettingsView-CZNWYK-D.js} +3 -3
  191. package/dist/web/assets/{TasksetDraftEditorPrimitives-DJoYkvWq.js → TasksetDraftEditorPrimitives-BnMqzE-T.js} +1 -1
  192. package/dist/web/assets/{TeamChatView-D9Y4e98Y.js → TeamChatView-XthM6n4S.js} +1 -1
  193. package/dist/web/assets/{TerminalOverlay-CUO8yZjy.js → TerminalOverlay--HCFZaQW.js} +1 -1
  194. package/dist/web/assets/{TrainingCreationPanel-_mnLQ1HA.js → TrainingCreationPanel-D2F6kPg_.js} +1 -1
  195. package/dist/web/assets/{TrainingDraftPanel-CCqQTHo5.js → TrainingDraftPanel-BurWPp9F.js} +1 -1
  196. package/dist/web/assets/{UsageSettingsSection-CdWq5oYC.js → UsageSettingsSection-D7jdscDm.js} +1 -1
  197. package/dist/web/assets/WorkSidebarPanel-CmdXCmrZ.js +1 -0
  198. package/dist/web/assets/{WorkspaceDiffPanel-CdHr8bX6.js → WorkspaceDiffPanel-CPaCC1_p.js} +3 -3
  199. package/dist/web/assets/{WorkspaceEnvironmentMenu-BnUh4dg9.js → WorkspaceEnvironmentMenu-BZxu6mUS.js} +1 -1
  200. package/dist/web/assets/{WorkspaceFileLocation-VzrSq_Ki.js → WorkspaceFileLocation-C4K_D_yh.js} +1 -1
  201. package/dist/web/assets/{WorkspaceGitDialogs-nwvQOm9r.js → WorkspaceGitDialogs-C0Yf29V0.js} +1 -1
  202. package/dist/web/assets/{WorkspaceMonacoEditor-m3bCIpZe.js → WorkspaceMonacoEditor-BRPLaFZS.js} +3 -3
  203. package/dist/web/assets/{WorkspacePdfPreview-u6Iv0qr0.js → WorkspacePdfPreview-9wypyV6H.js} +2 -2
  204. package/dist/web/assets/{WorkspacePresentationPreview-CjvTjhUO.js → WorkspacePresentationPreview-C-Cn-9pj.js} +1 -1
  205. package/dist/web/assets/{bot-DiDSZBLn.js → bot-BuaAVlz6.js} +1 -1
  206. package/dist/web/assets/{chat-resources-CmBtWC5V.js → chat-resources-DMPHClhQ.js} +1 -1
  207. package/dist/web/assets/chevron-down-CkifKd_O.js +1 -0
  208. package/dist/web/assets/chevron-right-LsMXJ5SB.js +1 -0
  209. package/dist/web/assets/chevron-up-Dt5T2Sf5.js +1 -0
  210. package/dist/web/assets/{chunk-C3TS766N-DSA4vs-Y.js → chunk-C3TS766N-BXUEjt7d.js} +1 -1
  211. package/dist/web/assets/{client-_uDCFdg5.js → client-C-ZuakZR.js} +1 -1
  212. package/dist/web/assets/{client-choice-storage-CRKZpilL.js → client-choice-storage-DWIA0Vou.js} +1 -1
  213. package/dist/web/assets/{cloud-upload-CWamjPts.js → cloud-upload-B5LqiNCG.js} +1 -1
  214. package/dist/web/assets/{copy-B56YjDkW.js → copy-BYIypHbq.js} +1 -1
  215. package/dist/web/assets/{cssMode-BuC9qQvo.js → cssMode-ByypIqUN.js} +1 -1
  216. package/dist/web/assets/{external-link-BSn21e-y.js → external-link-Cv7TDVPT.js} +1 -1
  217. package/dist/web/assets/{folder-open-CaJGWSr2.js → folder-open-DlIP3g5o.js} +1 -1
  218. package/dist/web/assets/{folder-plus-eTUep-az.js → folder-plus-CXwFJqcY.js} +1 -1
  219. package/dist/web/assets/{git-commit-horizontal-Buk_hy6T.js → git-commit-horizontal-DMh_-WxU.js} +1 -1
  220. package/dist/web/assets/{htmlMode-D7kF2kDL.js → htmlMode-CQGeb-h5.js} +1 -1
  221. package/dist/web/assets/{icons-B4B5eUyR.js → icons-CYvTltSH.js} +1 -1
  222. package/dist/web/assets/{image--4h1aK2l.js → image-Ci1JxTQX.js} +1 -1
  223. package/dist/web/assets/{index-CCaTs7xt.js → index-CDtTBysF.js} +2 -2
  224. package/dist/web/assets/{info-DjMTH4sJ.js → info-EjyMkVzV.js} +1 -1
  225. package/dist/web/assets/{jsonMode-BVX_7KjE.js → jsonMode-Dm6YK6Dw.js} +1 -1
  226. package/dist/web/assets/loader-circle-AjP2mDJA.js +1 -0
  227. package/dist/web/assets/{lspLanguageFeatures-RBOb-3wX.js → lspLanguageFeatures-BjtOz-Ln.js} +1 -1
  228. package/dist/web/assets/{maximize-2-Cjg-f1xT.js → maximize-2-CvvoALtI.js} +1 -1
  229. package/dist/web/assets/{message-square-oIMQDMc3.js → message-square-CPtIPRtf.js} +1 -1
  230. package/dist/web/assets/{monaco.contribution-CIwt2mTE.js → monaco.contribution-ClH8Tmjq.js} +2 -2
  231. package/dist/web/assets/{monaco.contribution-CIbGU5-C.js → monaco.contribution-VSFFgrfZ.js} +2 -2
  232. package/dist/web/assets/{monaco.contribution-KRLNg324.js → monaco.contribution-e5DNaEix.js} +2 -2
  233. package/dist/web/assets/{monaco.contribution-Dd1cPdSS.js → monaco.contribution-wpC0-Kxw.js} +2 -2
  234. package/dist/web/assets/{monitor-BWaitd6I.js → monitor-BroZpIvk.js} +1 -1
  235. package/dist/web/assets/{paperclip-FYK6OySO.js → paperclip-DYZEL_Gi.js} +1 -1
  236. package/dist/web/assets/{pdf-DbwlsqZP.js → pdf-DkU37Bi0.js} +1 -1
  237. package/dist/web/assets/play-BrvX67t1.js +1 -0
  238. package/dist/web/assets/plus-DFjCZeRE.js +1 -0
  239. package/dist/web/assets/{presentation-B6MaAPC7.js → presentation-CddfsTzp.js} +1 -1
  240. package/dist/web/assets/{python-DRYJxjiM.js → python-CMdyfF2B.js} +1 -1
  241. package/dist/web/assets/{refresh-cw-DOVpqCfJ.js → refresh-cw-Cx_7Zlbl.js} +1 -1
  242. package/dist/web/assets/{save-BuyyyR4Q.js → save-BaeHeBBw.js} +1 -1
  243. package/dist/web/assets/{settings-lists-BeAdxSjx.js → settings-lists-CVg9h-5z.js} +1 -1
  244. package/dist/web/assets/square-Di5JBnVr.js +1 -0
  245. package/dist/web/assets/{square-terminal-DTOIZy6_.js → square-terminal-CBlQtWQw.js} +1 -1
  246. package/dist/web/assets/{submit-issue-command-V--K9lVQ.js → submit-issue-command-L5--gt9i.js} +1 -1
  247. package/dist/web/assets/{toggleHighContrast-nNzCoE0h.js → toggleHighContrast-hftC_Rxs.js} +1 -1
  248. package/dist/web/assets/{training-DZgfVcI-.js → training-CGYukv2L.js} +1 -1
  249. package/dist/web/assets/{training-model-data-CWoTokkb.js → training-model-data-vvvphDlO.js} +1 -1
  250. package/dist/web/assets/{tsMode-BfVi5_FZ.js → tsMode-B0sZU1HD.js} +1 -1
  251. package/dist/web/assets/{upload-C2MnlWjj.js → upload-Bzt1ooBz.js} +1 -1
  252. package/dist/web/assets/{useAccountSettings-QwRbZIKu.js → useAccountSettings-BnxwetkP.js} +1 -1
  253. package/dist/web/assets/{useAgentInventory-B7xEgMCA.js → useAgentInventory-D_qS4ols.js} +1 -1
  254. package/dist/web/assets/{useChatContextSelection-O6wo4EqD.js → useChatContextSelection-D8aSVtCm.js} +1 -1
  255. package/dist/web/assets/{useLocalAgentSchedules-DpHnOGoV.js → useLocalAgentSchedules-CUQ1MW4l.js} +1 -1
  256. package/dist/web/assets/{useQuery-CvZ8bzdW.js → useQuery-9SCnxwmR.js} +1 -1
  257. package/dist/web/assets/{wifi-off-B8d12Alh.js → wifi-off-DWtVm7W7.js} +1 -1
  258. package/dist/web/assets/{workers-sIVKxb8c.js → workers-B3jA6AOv.js} +1 -1
  259. package/dist/web/assets/x-EG07vYCF.js +1 -0
  260. package/dist/web/assets/{yaml-8-aLM3zj.js → yaml-BEUL30-5.js} +1 -1
  261. package/dist/web/index.html +1 -1
  262. package/docs/command-reference.md +4 -1
  263. package/package.json +1 -1
  264. package/dist/chunks/chunk-2Q2AWPP2.js +0 -2
  265. package/dist/chunks/chunk-AWD72O3G.js +0 -2
  266. package/dist/chunks/training-hosted-XKSUTMLQ.js +0 -2
  267. package/dist/web/assets/RightSidebarHomePanel-qKL8dZrN.js +0 -1
  268. package/dist/web/assets/WorkSidebarPanel-DRXaK-E6.js +0 -1
  269. package/dist/web/assets/chevron-down-CqxKXYPf.js +0 -1
  270. package/dist/web/assets/chevron-right-ClP6ukIq.js +0 -1
  271. package/dist/web/assets/chevron-up-DY7wpdJ1.js +0 -1
  272. package/dist/web/assets/loader-circle-DNHvEoaP.js +0 -1
  273. package/dist/web/assets/play-DieChKfF.js +0 -1
  274. package/dist/web/assets/plus-DkfcQyma.js +0 -1
  275. package/dist/web/assets/square-D0YnIVh6.js +0 -1
  276. package/dist/web/assets/x-BvVvVB-j.js +0 -1
@@ -1,7 +1,7 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FilePagePreview-dlbmR8s8.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/index-CCaTs7xt.js","assets/index-g7UqJhnX.css","assets/icons-B4B5eUyR.js","assets/App-QM6Y2Eod.js","assets/useQuery-CvZ8bzdW.js","assets/schemas-Brv9Vmnk.js","assets/common-BWVSBnpX.js","assets/settings-BC-bzgk6.js","assets/client-choice-storage-CRKZpilL.js","assets/api-client-DJRVOFzS.js","assets/requests-DmeUYik4.js","assets/create-pipeline-DsZzNkt9.js","assets/profile-ref-D8lxL7dW.js","assets/chunk-H3JZ3P5T-DolwEJXo.js","assets/work-outputs-D_8TovAK.js","assets/chunk-GS5HEE4M-C0RLeIsy.js","assets/chunk-GCUWJUUM-Dy6oUNJ6.js","assets/reward-checks-DJJZYgf8.js","assets/intake-contracts-B8JZKYwb.js","assets/training-DZgfVcI-.js","assets/chunk-Q4RGCEOI-Cr-dg4Nk.js","assets/ponder-desktop-Ca-9KggQ.js","assets/chat-resources-CmBtWC5V.js","assets/app-models-BUdzQbXo.js","assets/model-display-zPvC4L2B.js","assets/submit-issue-command-V--K9lVQ.js","assets/connected-app-mentions-D3wRZLwI.js","assets/profile-agent-labels-Duh96b8x.js","assets/browser-sidebar-links-PVPCrsDJ.js","assets/browser-url-LACq2Ngu.js","assets/query-scope-BRpcgljO.js","assets/bot-DiDSZBLn.js","assets/chevron-down-CqxKXYPf.js","assets/chevron-right-ClP6ukIq.js","assets/copy-B56YjDkW.js","assets/external-link-BSn21e-y.js","assets/loader-circle-DNHvEoaP.js","assets/maximize-2-Cjg-f1xT.js","assets/message-square-oIMQDMc3.js","assets/plus-DkfcQyma.js","assets/refresh-cw-DOVpqCfJ.js","assets/square-terminal-DTOIZy6_.js","assets/x-BvVvVB-j.js","assets/AppToastContext-BQ4iRFif.js","assets/NativeSetupTerminal-DO0DN4fH.js","assets/AppDialog-C8um481a.js","assets/PageChrome-DjPuwWsn.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-u6Iv0qr0.js","assets/WorkspaceMonacoEditor-m3bCIpZe.js","assets/WorkspaceMonacoEditor-C5uazxST.css","assets/WorkspacePresentationPreview-CjvTjhUO.js","assets/WorkspaceFileLocation-VzrSq_Ki.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-CCaTs7xt.js";import{t as a}from"./useQuery-CvZ8bzdW.js";import{a as o,m as s,o as c,p as l,r as u,v as d}from"./schemas-Brv9Vmnk.js";import{n as f,o as p}from"./client-choice-storage-CRKZpilL.js";import{n as m}from"./create-pipeline-DsZzNkt9.js";import{n as ee}from"./app-models-BUdzQbXo.js";import{t as h}from"./query-scope-BRpcgljO.js";import{t as g}from"./icons-B4B5eUyR.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-CWoTokkb.js";import{t as be}from"./chevron-up-DY7wpdJ1.js";import{t as w}from"./folder-open-CaJGWSr2.js";import{t as xe}from"./info-DjMTH4sJ.js";import{t as T}from"./loader-circle-DNHvEoaP.js";import{t as Se}from"./maximize-2-Cjg-f1xT.js";import{t as Ce}from"./message-square-oIMQDMc3.js";import{t as we}from"./plus-DkfcQyma.js";import{t as E}from"./refresh-cw-DOVpqCfJ.js";import{t as Te}from"./save-BuyyyR4Q.js";import{t as Ee}from"./x-BvVvVB-j.js";import{n as D,r as De}from"./AppToastContext-BQ4iRFif.js";import{$t as O,B as Oe,G as ke,Gt as Ae,H as je,J as Me,K as Ne,L as Pe,O as Fe,R as Ie,Sn as Le,Tn as k,U as A,V as Re,W as ze,Xt as Be,an as j,bn as M,dn as N,en as Ve,gn as He,gr as Ue,hn as P,hr as We,ln as F,mn as Ge,nn as Ke,q as qe,un as I,xn as Je}from"./App-QM6Y2Eod.js";import{n as L,t as R}from"./WorkspaceFileLocation-VzrSq_Ki.js";var Ye=u([`local`,`sandbox`]),Xe=u([`pinned`,`saved_for_later`]),Ze=s({id:d().min(1),workspaceKind:Ye,workspaceId:d().min(1),workspaceName:d().min(1),path:d().min(1),status:Xe,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(Ze)}),s({workspaceKind:Ye,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 Qe(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 $e(e){return[`sidebar-file`,e.workspaceKind,encodeURIComponent(e.workspaceId),encodeURIComponent(Qe(e.path))].join(`:`)}var et=g(`text-align-start`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]]),tt=g(`chevrons-up`,[[`path`,{d:`m17 11-5-5-5 5`,key:`e8nh98`}],[`path`,{d:`m17 18-5-5-5 5`,key:`2avn1x`}]]),nt=g(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),rt=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`}]]),it=g(`panel-top`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),at=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`}]]),ot=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`}]]),st=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`}]]),z=e(n(),1),B=r();function ct({createRuntime:e,goalRuntime:t,subagentRuntime:n=null,onRunSubagentLifecycleAction:r}){let i=e?`Create/Improve Details`:`Goal Details`,a=e?U(e.run.state):n?.activeCount?n.label:t?.actionLabel??`No active goal`;return(0,B.jsxs)(`div`,{className:`goal-details-view`,"aria-label":i,children:[(0,B.jsxs)(`div`,{className:`goal-details-header`,children:[(0,B.jsxs)(`div`,{className:`goal-details-title`,children:[(0,B.jsx)(I,{size:15,"aria-hidden":`true`}),(0,B.jsx)(`span`,{children:i})]}),(0,B.jsx)(`span`,{className:`goal-details-state ${Pt(e?.run.state??null)}`,children:a})]}),(0,B.jsx)(`div`,{className:`goal-details-body`,children:e?(0,B.jsx)(lt,{runtime:e}):t||n?(0,B.jsx)(dt,{goalRuntime:t,subagentRuntime:n,onRunSubagentLifecycleAction:r}):(0,B.jsx)(kt,{})})]})}function lt({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,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(H,{title:`Current Work`,children:(0,B.jsx)(At,{rows:[[`State`,U(c)],[`Operation`,t.operation],[`Target`,U(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`,U(t.adapter.kind)],[`Run`,t.id],[`Revision`,String(t.revision)]]})}),(0,B.jsx)(H,{title:`Plan`,children:n?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`p`,{className:`goal-details-summary`,children:n.summary}),(0,B.jsx)(At,{rows:[[`Objective`,n.objective],[`Context`,n.capturedContextSummary],[`Status`,U(n.status)],[`Plan ID`,n.id],[`Run ID`,n.runId],[`Approval`,n.approvalId??`Pending`],[`Approved`,n.approvedAt??`Not approved`]]})]}):a.length?(0,B.jsx)(`p`,{className:`goal-details-summary`,children:`Waiting for answers before the model finalizes the Create plan.`}):(0,B.jsx)(`p`,{className:`goal-details-summary`,children:`The model is preparing the Create plan.`})}),r?(0,B.jsxs)(H,{title:`Action Shape`,children:[(0,B.jsx)(At,{rows:[[`Mode`,r.label],[`Default action`,r.defaultActionKey??`None`],[`Direct action`,r.directActionHint??`None planned`],[`Artifacts`,r.artifactPolicy]]}),(0,B.jsx)(`p`,{className:`goal-details-note`,children:r.detail})]}):null,i.length?(0,B.jsx)(H,{title:`Questions`,children:(0,B.jsx)(`div`,{className:`goal-details-list`,children:i.map(e=>(0,B.jsxs)(`article`,{className:`goal-details-list-item`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`strong`,{children:e.title}),(0,B.jsx)(`span`,{className:`goal-details-inline-state ${e.status}`,children:U(e.status)})]}),(0,B.jsx)(`p`,{children:e.prompt}),e.answer?(0,B.jsxs)(`small`,{children:[`Answer: `,e.answer.label??e.answer.value]}):e.options.length?(0,B.jsxs)(`small`,{children:[`Options: `,e.options.map(e=>e.label).join(`, `)]}):null]},e.id))})}):null,n?.requirements.length?(0,B.jsx)(H,{title:`Setup Requirements`,children:(0,B.jsx)(`div`,{className:`goal-details-list`,children:n.requirements.map(e=>(0,B.jsxs)(`article`,{className:`goal-details-list-item`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`strong`,{children:e.name}),(0,B.jsx)(`span`,{className:`goal-details-inline-state ${e.status}`,children:U(e.status)})]}),(0,B.jsxs)(`small`,{children:[U(e.kind),e.detail?`: ${e.detail}`:``]})]},`${e.kind}:${e.name}`))})}):null,n?.sourcePlan.length?(0,B.jsx)(H,{title:`Source Plan`,children:(0,B.jsx)(jt,{refs:n.sourcePlan.map(e=>({id:`${e.operation}:${e.path}`,primary:e.path,secondary:`${U(e.operation)}: ${e.reason}`}))})}):null,n?.checks.length?(0,B.jsx)(H,{title:`Checks`,children:(0,B.jsx)(jt,{refs:n.checks.map(e=>({id:e.name,primary:e.name,secondary:`${e.required?`Required`:`Optional`}: ${e.command}`}))})}):null,o.length||s.length?(0,B.jsx)(H,{title:`Run Refs`,children:(0,B.jsx)(jt,{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,B.jsx)(ut,{run:t}),t.blockedReason?(0,B.jsx)(H,{title:`Blocked`,children:(0,B.jsxs)(`div`,{className:`goal-details-alert`,children:[(0,B.jsx)(Ge,{size:15}),(0,B.jsx)(`span`,{children:t.blockedReason})]})}):null,(0,B.jsx)(H,{title:`Raw State`,children:(0,B.jsxs)(`details`,{className:`goal-details-raw`,children:[(0,B.jsx)(`summary`,{children:`Show structured payload`}),(0,B.jsx)(`pre`,{children:JSON.stringify(t,null,2)})]})})]})}function ut({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,B.jsx)(H,{title:`Context`,children:(0,B.jsx)(jt,{refs:[...t,...r]})})}function dt({goalRuntime:e,subagentRuntime:t,onRunSubagentLifecycleAction:n}){return(0,B.jsxs)(B.Fragment,{children:[e?(0,B.jsxs)(H,{title:`Goal`,children:[(0,B.jsx)(`p`,{className:`goal-details-summary`,children:e.objective}),(0,B.jsx)(At,{rows:[[`Status`,e.actionLabel],[`Runtime`,e.timeLabel],[`Detail`,e.detail]]})]}):null,t?(0,B.jsx)(ft,{runtime:t,onRunSubagentLifecycleAction:n}):null,(0,B.jsx)(H,{title:`Raw State`,children:(0,B.jsxs)(`details`,{className:`goal-details-raw`,children:[(0,B.jsx)(`summary`,{children:`Show structured payload`}),(0,B.jsx)(`pre`,{children:JSON.stringify({goalRuntime:e,subagentRuntime:t},null,2)})]})})]})}function ft({runtime:e,onRunSubagentLifecycleAction:t}){let[n,r]=(0,z.useState)(null),[i,a]=(0,z.useState)(null);De(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,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(H,{title:`Subagents`,children:[(0,B.jsx)(At,{rows:[[`Latest update`,yt(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`,bt(e.usage.totalTokens,e.usage.requestCount)],[`Evidence`,String(e.evidenceRefs.length)],[`Checks`,String(e.testsRunCount)]]}),e.blockers.length>0?(0,B.jsx)(`ul`,{className:`goal-details-list compact`,children:e.blockers.slice(0,4).map(e=>(0,B.jsxs)(`li`,{className:`goal-details-list-item`,children:[(0,B.jsx)(`span`,{className:`goal-details-inline-state ${e.status}`,children:e.status}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`strong`,{children:xt(e.roleId)}),(0,B.jsx)(`p`,{children:e.message})]})]},`${e.runId}:${e.message}`))}):null,(0,B.jsx)(`ul`,{className:`goal-details-list`,children:e.runs.slice(0,8).map(e=>(0,B.jsxs)(`li`,{className:`goal-details-list-item`,children:[(0,B.jsx)(`span`,{className:`goal-details-inline-state ${e.status}`,children:e.status}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`strong`,{children:xt(e.roleId)}),(0,B.jsx)(`p`,{children:e.objective}),e.report?.summary?(0,B.jsx)(`small`,{children:e.report.summary}):null,t?(0,B.jsx)(mt,{pendingAction:n,run:e,onRun:o}):null]})]},e.id))})]}),e.finalResults.length>0?(0,B.jsx)(pt,{results:e.finalResults}):null]})}function pt({results:e}){return(0,B.jsx)(H,{title:`Child Results`,children:(0,B.jsx)(`ol`,{className:`goal-details-task-graph`,children:e.slice(0,6).map(e=>(0,B.jsxs)(`li`,{className:`goal-details-task-node`,children:[(0,B.jsxs)(`div`,{className:`goal-details-task-node-header`,children:[(0,B.jsx)(`span`,{className:`goal-details-inline-state ${e.status}`,children:e.status}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`strong`,{children:xt(e.roleId)}),(0,B.jsx)(`small`,{children:e.objective})]})]}),(0,B.jsx)(`p`,{children:e.summary}),(0,B.jsxs)(`div`,{className:`goal-details-task-node-meta`,children:[(0,B.jsxs)(`span`,{children:[e.refs.length,` refs`]}),(0,B.jsxs)(`span`,{children:[e.testsRun.length+e.validationAttempts.length,` checks`]}),(0,B.jsxs)(`span`,{children:[e.blockers.length,` blockers`]}),(0,B.jsx)(`span`,{children:e.confidence?`${U(e.confidence)} confidence`:`Confidence unknown`})]}),e.findings.length>0?(0,B.jsxs)(`small`,{children:[`Findings: `,Tt(e.findings,3)]}):null,e.changedFiles.length>0?(0,B.jsxs)(`small`,{children:[`Files: `,Tt(e.changedFiles,4)]}):null,e.testsRun.length>0?(0,B.jsxs)(`small`,{children:[`Tests: `,Tt(e.testsRun,3)]}):null,e.validationAttempts.length>0?(0,B.jsxs)(`small`,{children:[`Validation: `,Tt(e.validationAttempts,2)]}):null,e.refs.length>0?(0,B.jsxs)(`small`,{children:[`Refs: `,Tt(e.refs.map(St),4)]}):null,e.blockers.length>0?(0,B.jsxs)(`small`,{children:[`Blockers: `,Tt(e.blockers,3)]}):null,e.workspaceRetention?(0,B.jsxs)(`small`,{children:[`Workspace: `,wt(e.workspaceRetention)]}):null,e.importantMessages.length>0?(0,B.jsxs)(`small`,{children:[`Messages: `,Tt(e.importantMessages.map(Ct),2)]}):null]},e.runId))})})}function mt({pendingAction:e,run:t,onRun:n}){let r=ht(t);return r.length===0?null:(0,B.jsx)(`div`,{className:`goal-details-actions`,children:r.map(r=>{let i=e===`${t.id}:${r}`;return(0,B.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(!V(e))return!1;let t=Mt(e.metadata);if(!t?.subagentWorkspace&&!t?.workspaceHandoff)return!1;let n=Nt(Mt(Mt(t.lifecycleCleanup)?.workspaceCleanup)?.status);return n!==`removed`&&n!==`deleted`&&n!==`retained`&&n!==`skipped`}function vt(e){if(!e.childSessionId||!V(e))return!1;let t=Nt(Mt(Mt(e.metadata)?.childSessionArchive)?.status);return t!==`archived`&&t!==`already_archived`}function V(e){return e.status===`completed`||e.status===`failed`||e.status===`cancelled`}function yt(e){let t=e.latestMeaningfulUpdate;return t?`${xt(t.roleId)} ${t.status}: ${t.message}`:`No structured update`}function bt(e,t){if(e<=0&&t<=0)return`0 tokens`;let n=`${t} ${t===1?`request`:`requests`}`;return`${Et(e)} tokens · ${n}`}function xt(e){return e.slice(0,1).toUpperCase()+e.slice(1).replace(/[-_]+/g,` `)}function St(e){return`${e.kind}: ${e.label}`}function Ct(e){return`${U(e.kind)}: ${e.body}`}function wt(e){return`retained ${e.expiresAt?`until ${Dt(e.expiresAt)}`:`for inspection`}${e.trigger?` · ${U(e.trigger)}`:``}`}function Tt(e,t){let n=e.slice(0,t),r=e.length-n.length;return r>0?`${n.join(`, `)} +${r}`:n.join(`, `)}function Et(e){if(e<1e3)return String(e);if(e>=1e6){let t=e/1e6;return`${Ot(t,t<10?2:1)}M`}let t=e/1e3;return`${Ot(t,+(t<10))}k`}function Dt(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString([],{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`})}function Ot(e,t){return e.toFixed(t).replace(/\.0+$/,``).replace(/(\.\d*?)0+$/,`$1`)}function kt(){return(0,B.jsxs)(`div`,{className:`goal-details-empty`,children:[(0,B.jsx)(I,{size:18}),(0,B.jsx)(`span`,{children:`No active Goal or Create workflow.`})]})}function H({children:e,title:t}){return(0,B.jsxs)(`section`,{className:`goal-details-section`,children:[(0,B.jsx)(`h2`,{children:t}),e]})}function At({rows:e}){return(0,B.jsx)(`dl`,{className:`goal-details-grid`,children:e.map(([e,t])=>(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:e}),(0,B.jsx)(`dd`,{children:t})]},e))})}function jt({refs:e}){return(0,B.jsx)(`ul`,{className:`goal-details-ref-list`,children:e.map(e=>(0,B.jsxs)(`li`,{children:[(0,B.jsx)(`code`,{title:e.primary,children:e.primary}),(0,B.jsx)(`span`,{children:e.secondary})]},e.id))})}function Mt(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:null}function Nt(e){return typeof e==`string`&&e.trim()?e.trim():null}function U(e){return e.split(/[_-]/g).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function Pt(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 Ft({sandboxId:e,connection:t}){let[n,r]=(0,z.useState)(null),[i,a]=(0,z.useState)([]),[o,s]=(0,z.useState)(null),[c,l]=(0,z.useState)(null),[u,d]=(0,z.useState)(null),[f,p]=(0,z.useState)(null);De(u,{prefix:`Sandbox`}),De(f,{prefix:`Sandbox integrations`});let m=n?.integrationLeases??[],ee=(0,z.useMemo)(()=>i.filter(e=>e.status===`active`),[i]),h=(0,z.useMemo)(()=>Rt(n),[n]),g=(0,z.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 k.sandbox(t,e),i=await k.integrationConnections(t,It(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,z.useCallback)(async()=>{if(t&&n){l(`load`),p(null);try{let[e,i]=await Promise.all([k.integrationConnections(t,It(n)),k.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,z.useCallback)(async e=>{if(!t||!n)return;let i=Ue(e.provider),a=i?We(i):null,o=a?.leasePolicy.allowedCapabilityIds??[];if(!i||!a?.leasePolicy.leaseable||o.length===0)p(`${W(e.provider)} cannot be attached to this sandbox.`);else{l(`attach:${e.id}`),p(null);try{let i=await k.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,z.useCallback)(async e=>{if(t&&n){l(`remove:${e}`),p(null);try{let i=await k.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,z.useEffect)(()=>{g()},[g]),e?(0,B.jsxs)(`div`,{className:`sandbox-summary-tab`,children:[(0,B.jsxs)(`section`,{className:`sandbox-workspace-section`,children:[(0,B.jsxs)(`div`,{className:`sandbox-workspace-heading`,children:[(0,B.jsx)(`h3`,{children:`Sandbox`}),(0,B.jsxs)(`div`,{className:`sandbox-workspace-heading-actions`,children:[n?(0,B.jsx)(`span`,{children:n.state}):null,(0,B.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,B.jsx)(T,{className:`spinning`,size:14}):(0,B.jsx)(E,{size:14})})]})]}),n?(0,B.jsxs)(`dl`,{className:`sandbox-workspace-kv`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:`Sandbox`}),(0,B.jsx)(`dd`,{children:Wt(n.id)})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:`Spend`}),(0,B.jsxs)(`dd`,{children:[Kt(n.reservation.capturedUsd),` / `,Kt(n.budget.maxUsd)]})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:`Reservation`}),(0,B.jsx)(`dd`,{children:n.reservation.status})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:`Idle cleanup`}),(0,B.jsx)(`dd`,{children:n.quotas?.idleTimeoutSeconds?`${Math.round(n.quotas.idleTimeoutSeconds/60)} min`:`-`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:`Updated`}),(0,B.jsx)(`dd`,{children:Gt(n.updatedAt)})]}),h?(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:`Receipt`}),(0,B.jsxs)(`dd`,{children:[Wt(h.id),` / `,Kt(h.totalUsd)]})]}):null]}):(0,B.jsxs)(`div`,{className:`sandbox-workspace-loading`,children:[o===`summary`?(0,B.jsx)(T,{className:`spinning`,size:16}):null,(0,B.jsx)(`span`,{children:o===`summary`?`Loading sandbox`:`Sandbox unavailable`})]})]}),(0,B.jsxs)(`section`,{className:`sandbox-workspace-section`,children:[(0,B.jsxs)(`div`,{className:`sandbox-workspace-heading`,children:[(0,B.jsx)(`h3`,{children:`Integrations`}),(0,B.jsxs)(`div`,{className:`sandbox-workspace-heading-actions`,children:[(0,B.jsx)(`span`,{children:m.length}),(0,B.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,B.jsx)(T,{className:`spinning`,size:14}):(0,B.jsx)(E,{size:14})})]})]}),m.length>0?(0,B.jsx)(`div`,{className:`sandbox-workspace-integration-list`,children:m.map(e=>(0,B.jsxs)(`div`,{className:`sandbox-workspace-integration-row`,children:[(0,B.jsxs)(`div`,{className:`sandbox-workspace-integration-main`,children:[(0,B.jsx)(`span`,{children:W(e.provider)}),(0,B.jsxs)(`small`,{children:[e.required?`required`:`optional`,` / `,Vt(e),` / `,Lt(e)]})]}),(0,B.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Revoke ${W(e.provider)} lease`,"aria-label":`Revoke ${W(e.provider)} lease`,disabled:c!==null,onClick:()=>void ne(e.leaseId),children:c===`remove:${e.leaseId}`?(0,B.jsx)(T,{className:`spinning`,size:14}):(0,B.jsx)(re,{size:14})}),(0,B.jsxs)(`div`,{className:`sandbox-workspace-chip-row`,children:[e.capabilities.slice(0,5).map(t=>(0,B.jsx)(`span`,{children:Bt(e.provider,t)},t)),e.capabilities.length>5?(0,B.jsxs)(`span`,{children:[`+`,e.capabilities.length-5]}):null]})]},e.leaseId))}):(0,B.jsx)(`p`,{className:`sandbox-workspace-empty`,children:`No active integration leases.`}),ee.length>0?(0,B.jsx)(`div`,{className:`sandbox-workspace-integration-list`,children:ee.map(e=>{let t=m.some(t=>t.provider===e.provider),n=zt(e)?.leasePolicy.allowedCapabilityIds.length??0;return(0,B.jsxs)(`div`,{className:`sandbox-workspace-integration-row compact`,children:[(0,B.jsxs)(`div`,{className:`sandbox-workspace-integration-main`,children:[(0,B.jsx)(`span`,{children:Ht(e)}),(0,B.jsx)(`small`,{children:Ut(e,n)})]}),(0,B.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:t?`${W(e.provider)} already attached`:`Attach ${W(e.provider)}`,"aria-label":t?`${W(e.provider)} already attached`:`Attach ${W(e.provider)}`,disabled:t||c!==null||n===0,onClick:()=>void te(e),children:c===`attach:${e.id}`?(0,B.jsx)(T,{className:`spinning`,size:14}):(0,B.jsx)(at,{size:14})})]},e.id)})}):(0,B.jsx)(`p`,{className:`sandbox-workspace-empty`,children:`No connected accounts available.`})]})]}):(0,B.jsx)(`div`,{className:`sandbox-summary-tab`,children:(0,B.jsx)(`p`,{className:`sandbox-workspace-empty`,children:`No sandbox is attached yet.`})})}function It(e){return{status:`active`}}function Lt(e){return e.proxyUrl?`runtime proxy available`:`metadata only, no runtime proxy`}function Rt(e){return e?.receipts?.at(-1)??null}function zt(e){let t=Ue(e.provider);return t?We(t):null}function W(e){let t=Ue(e),n=t?We(t):null;return n?n.label:e===`microsoft_teams`?`Microsoft Teams`:e?e.replace(/_/g,` `):`Integration`}function Bt(e,t){let n=Ue(e);return(n?We(n):null)?.capabilities.find(e=>e.id===t)?.label??t}function Vt(e){return e.expiresAt?`expires ${Gt(e.expiresAt)}`:`active`}function Ht(e){let t=e.providerAccountName?.trim();return t?`${W(e.provider)} / ${t}`:W(e.provider)}function Ut(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 Wt(e){return e.length>10?`${e.slice(0,8)}...`:e}function Gt(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 Kt(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 qt({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,B.jsxs)(`div`,{className:`training-sidebar-summary`,children:[(0,B.jsxs)(`header`,{children:[(0,B.jsx)(`h2`,{children:oe(e.taskset.name,t)}),(0,B.jsx)(`span`,{children:e.job?pe(e.job.status):e.taskset.readiness?.ready?`Ready to train`:`Needs review`})]}),(0,B.jsxs)(`section`,{children:[(0,B.jsx)(`h3`,{children:`Run`}),(0,B.jsxs)(`dl`,{children:[(0,B.jsx)(G,{label:`Primary recommendation`,value:t.toUpperCase()}),(0,B.jsx)(G,{label:`Training stage`,value:a}),(0,B.jsx)(G,{label:`Base model`,value:i?.baseModel.id??`Not selected`}),(0,B.jsx)(G,{label:`Compute`,value:e.plan?ge(e.plan.destinationId):`Not selected`}),(0,B.jsx)(G,{label:`Started`,value:fe(e.job?.startedAt??null)}),(0,B.jsx)(G,{label:`Duration`,value:me(e.job?.startedAt??null,o)})]})]}),(0,B.jsxs)(`section`,{children:[(0,B.jsx)(`h3`,{children:`Data`}),(0,B.jsxs)(`dl`,{children:[(0,B.jsx)(G,{label:`Training examples`,value:String(n)}),(0,B.jsx)(G,{label:`Test examples`,value:String(r)}),(0,B.jsx)(G,{label:`Dataset sources`,value:String(e.taskset.sourceRefs.length)})]})]}),i?(0,B.jsxs)(`section`,{children:[(0,B.jsx)(`h3`,{children:`Recipe`}),(0,B.jsxs)(`dl`,{children:[i.method===`grpo`?(0,B.jsx)(G,{label:`RL loss`,value:i.loss.method===`gspo-token`?`GSPO-token`:i.loss.method.toUpperCase()}):null,(0,B.jsx)(G,{label:`LoRA rank`,value:String(i.lora.rank)}),(0,B.jsx)(G,{label:`Learning rate`,value:String(i.optimizer.learningRate)}),(0,B.jsx)(G,{label:`Optimizer steps`,value:String(i.optimizer.maxSteps)}),(0,B.jsx)(G,{label:i.method===`grpo`?`Prompt length`:`Sequence length`,value:String(i.method===`grpo`?i.dataset.maxPromptTokens:i.dataset.maxSequenceLength)})]})]}):null,(0,B.jsxs)(`section`,{children:[(0,B.jsx)(`h3`,{children:`Result`}),(0,B.jsxs)(`dl`,{children:[(0,B.jsx)(G,{label:`Adapter`,value:e.lineage?`${a} ready`:`Not created`}),(0,B.jsx)(G,{label:`Evaluation`,value:e.lineage?.frozenEvaluationArtifactId?`Completed`:`Not completed`}),(0,B.jsx)(G,{label:`Artifacts`,value:String(e.artifacts.length)})]})]})]})}function G({label:e,value:t}){return(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:e}),(0,B.jsx)(`dd`,{children:t})]})}function Jt(e){let t=Yt(``,``,`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=Yt(n,a,o),i.childMap.set(s,c),i.children.push(c)),i=c}}return Xt(t.children)}function Yt(e,t,n){return{name:e,path:t,type:n,children:[],childMap:new Map}}function Xt(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:Xt(e.children)}))}function Zt({className:e,currentStatus:t,onSetStatus:n}){let r=t===`pinned`,i=t===`saved_for_later`;return(0,B.jsxs)(`span`,{className:`workspace-file-bookmark-actions ${e??`workspace-file-heading-actions`}`,children:[(0,B.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,B.jsx)(O,{size:14}):(0,B.jsx)(Ve,{size:14})}),(0,B.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,B.jsx)(Je,{size:14}):(0,B.jsx)(Le,{size:14})})]})}function Qt({changedByPath:e,expandedFolderPaths:t,rootPath:n,repoFiles:r,selectedPath:i,getFileBookmarkStatus:a,onOpenFile:o,onSetFileBookmarkStatus:s,onToggleFolder:c}){let l=(0,z.useMemo)(()=>Jt(r),[r]);return(0,B.jsxs)(`div`,{className:`workspace-file-tree-view`,children:[(0,B.jsxs)(`div`,{className:`workspace-file-tree-header`,children:[(0,B.jsx)(w,{size:14}),(0,B.jsx)(`strong`,{title:n??void 0,children:n?n.split(`/`).at(-1):`Files`}),(0,B.jsx)(`span`,{children:r.length})]}),(0,B.jsx)(`div`,{className:`workspace-file-tree`,children:l.map(r=>(0,B.jsx)(K,{changedByPath:e,expandedFolderPaths:t,node:r,rootPath:n,selectedPath:i,getFileBookmarkStatus:a,onOpenFile:o,onSetFileBookmarkStatus:s,onToggleFolder:c},`${r.type}:${r.path}`))})]})}function K({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,B.jsxs)(`div`,{className:`workspace-file-tree-node`,children:[(0,B.jsxs)(`button`,{type:`button`,className:`workspace-file-tree-row folder`,"aria-expanded":d,style:{paddingLeft:p},onClick:()=>l(u),children:[d?(0,B.jsx)(w,{size:14}):(0,B.jsx)(F,{size:14}),(0,B.jsx)(`span`,{children:r.name})]}),d&&r.children.map(r=>(0,B.jsx)(K,{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,B.jsxs)(`div`,{className:`workspace-file-tree-row file ${f?`changed`:``} ${a===u?`selected`:``}`,style:{paddingLeft:p},children:[(0,B.jsxs)(`button`,{type:`button`,className:`workspace-file-tree-row-main`,title:u,onClick:()=>s(u),children:[(0,B.jsx)(b,{size:13}),(0,B.jsx)(`span`,{children:r.name}),f&&(0,B.jsxs)(`small`,{children:[(0,B.jsxs)(`span`,{className:`diff-addition`,children:[`+`,f.additions]}),(0,B.jsxs)(`span`,{className:`diff-deletion`,children:[`-`,f.deletions]})]})]}),/\.html?$/i.test(u)&&(0,B.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,B.jsx)(Zt,{className:`workspace-file-tree-bookmark-actions`,currentStatus:o?.(u)??null,onSetStatus:e=>c(u,e)}):null]})}function $t({diff:e,expandedFolderPaths:t,rootPath:n,repoFiles:r,selectedPath:i,getFileBookmarkStatus:a,onOpenFile:o,onSetFileBookmarkStatus:s,onToggleFolder:c}){let l=e?.files??[],u=(0,z.useMemo)(()=>new Map(l.map(e=>[e.path,e])),[l]),d=n?.replace(/^\/+|\/+$/g,``)||null,f=(0,z.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,B.jsx)(`div`,{className:`workspace-diff-files-view`,children:(0,B.jsx)(Qt,{changedByPath:u,expandedFolderPaths:t,rootPath:d,repoFiles:f,selectedPath:i,getFileBookmarkStatus:a,onOpenFile:o,onSetFileBookmarkStatus:s,onToggleFolder:c})})}function en({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,B.jsxs)(`div`,{className:`workspace-diff-options-menu`,role:`menu`,children:[(0,B.jsx)(q,{icon:(0,B.jsx)(E,{size:14}),label:`Refresh`,onClick:l,onClose:s}),(0,B.jsx)(q,{checked:o,icon:(0,B.jsx)(ie,{size:14}),label:`Enable word wrap`,onClick:h,onClose:s}),(0,B.jsx)(q,{checked:e,icon:(0,B.jsx)(tt,{size:14}),label:`Collapse all diffs`,onClick:u,onClose:s}),(0,B.jsx)(`div`,{className:`workspace-diff-menu-divider`}),(0,B.jsx)(q,{checked:t,icon:(0,B.jsx)(it,{size:14}),label:`Show editor controls`,onClick:d,onClose:s}),(0,B.jsx)(q,{checked:i,icon:(0,B.jsx)(M,{size:14}),label:`Render Markdown`,onClick:m,onClose:s}),(0,B.jsx)(q,{checked:!r,icon:(0,B.jsx)(I,{size:14}),label:`Show diffs first`,onClick:p,onClose:s}),(0,B.jsx)(q,{checked:a,icon:(0,B.jsx)(et,{size:14}),label:`Enable word diffs`,onClick:ee,onClose:s}),(0,B.jsx)(q,{checked:n,icon:(0,B.jsx)(rt,{size:14}),label:`Hide white space`,onClick:f,onClose:s}),(0,B.jsx)(q,{icon:(0,B.jsx)(te,{size:14}),label:`Copy git apply command`,onClick:c,onClose:s})]})}function q({checked:e,icon:t,label:n,onClick:r,onClose:i}){return(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{r?.(),i()},children:[t,(0,B.jsx)(`span`,{children:n}),e&&(0,B.jsx)(He,{size:14})]})}function tn({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,z.useRef)(null),T=(0,z.useRef)(null);(0,z.useEffect)(()=>{T.current?.querySelector(`button[role="tab"][aria-selected="true"]`)?.scrollIntoView({block:`nearest`,inline:`nearest`})},[re,i.length,c,p]),(0,z.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 E(e){e.key===`Escape`?S():e.key===`Enter`&&(n[0]||s.trim())&&se(n[0]||s.trim())}function Te(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[ze(r,n.length,e.key)];if(!i)return;i.focus(),i.click();let a=i.id;a&&window.requestAnimationFrame(()=>document.getElementById(a)?.focus())}let D=[...te.map(e=>(0,B.jsxs)(`div`,{className:`workspace-diff-tab file ${p===`outputs`&&re===e?`active`:``}`,children:[(0,B.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,B.jsx)(I,{className:`workspace-diff-tab-icon`,size:14}),(0,B.jsx)(`span`,{children:e===-2?`Agents`:e===-1?ne:`New tab`})]}),(0,B.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,B.jsx)(Ee,{size:12})})]},`overview-${e}`)),a?(0,B.jsxs)(`button`,{type:`button`,className:`workspace-diff-tab ${p===`goal`?`active`:``}`,role:`tab`,"aria-selected":p===`goal`,onClick:he,children:[(0,B.jsx)(I,{size:14}),(0,B.jsx)(`span`,{children:`Goal`})]},`goal`):null,u&&ge?(0,B.jsxs)(`button`,{type:`button`,className:`workspace-diff-tab ${p===`summary`?`active`:``}`,role:`tab`,"aria-selected":p===`summary`,onClick:ge,children:[(0,B.jsx)(xe,{size:14}),(0,B.jsx)(`span`,{children:`Summary`})]},`summary`):null,g?(0,B.jsxs)(`div`,{className:`workspace-diff-tab file ${p===`files`?`active`:``}`,children:[(0,B.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,B.jsx)(w,{className:`workspace-diff-tab-icon`,size:14}),(0,B.jsx)(`span`,{children:`Files`})]}),_?(0,B.jsx)(`button`,{type:`button`,className:`workspace-diff-tab-close`,"aria-label":`Close files tab`,onClick:_,children:(0,B.jsx)(Ee,{size:12})}):null]},`files`):null,...i.map(e=>(0,B.jsxs)(`div`,{className:`workspace-diff-tab file ${p===`file`&&c===e.path?`active`:``}`,children:[(0,B.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,B.jsx)(I,{className:`workspace-diff-tab-icon`,size:13}),r.has(e.path)&&(0,B.jsx)(`span`,{className:`workspace-diff-tab-dirty`,"aria-hidden":`true`}),(0,B.jsx)(`span`,{children:L(e.path)})]}),de?(0,B.jsx)(Zt,{className:`workspace-diff-tab-bookmark-actions`,currentStatus:ie?.(e.path)??null,onSetStatus:t=>de(e.path,t)}):null,(0,B.jsx)(`button`,{type:`button`,className:`workspace-diff-tab-close`,title:`Close ${e.path}`,onClick:t=>ae(e.path,t),children:(0,B.jsx)(Ee,{size:12})})]},e.path)),...l.map(e=>(0,B.jsxs)(`div`,{className:`workspace-diff-tab right-chat-tab`,children:[(0,B.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,B.jsx)(`span`,{className:`right-chat-status-dot`,"aria-label":`Running`}):null,(0,B.jsx)(`span`,{children:e.title})]}),oe?(0,B.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,B.jsx)(Ee,{size:12})}):null]},e.id))].filter(e=>e!==null),De=new Map(h.map((e,t)=>[e,t]));return D.sort((e,t)=>(De.get(String(e.key))??h.length)-(De.get(String(t.key))??h.length)),(0,B.jsxs)(`div`,{className:`workspace-diff-topbar`,children:[(0,B.jsxs)(`div`,{className:`workspace-diff-tabs`,role:`tablist`,"aria-label":`Right sidebar views`,ref:T,onKeyDown:Te,children:[D,ee]}),(0,B.jsxs)(`div`,{className:`workspace-diff-add-anchor`,ref:be,children:[(0,B.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,B.jsx)(we,{size:15})}),e&&(0,B.jsxs)(`div`,{className:`workspace-diff-add-menu`,role:`menu`,children:[me?(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:me,children:[(0,B.jsx)(I,{size:14}),(0,B.jsx)(`span`,{children:`Training`}),(0,B.jsx)(`kbd`,{})]}):null,le?(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:le,children:[(0,B.jsx)(Ce,{size:14}),(0,B.jsx)(`span`,{children:`New task`}),(0,B.jsx)(`kbd`,{})]}):null,(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:pe,children:[(0,B.jsx)(w,{size:14}),(0,B.jsx)(`span`,{children:`Files`}),(0,B.jsx)(`kbd`,{})]}),u&&ge?(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:ge,children:[(0,B.jsx)(xe,{size:14}),(0,B.jsx)(`span`,{children:`Summary`}),(0,B.jsx)(`kbd`,{})]}):null,(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:ce,children:[(0,B.jsx)(Be,{size:14}),(0,B.jsx)(`span`,{children:`Open file`}),(0,B.jsx)(`kbd`,{children:`Ctrl+P`})]}),C?(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:C,children:[(0,B.jsx)(j,{size:14}),(0,B.jsx)(`span`,{children:`Browser`}),(0,B.jsx)(`kbd`,{children:`Ctrl+I`})]}):null]}),o&&(0,B.jsxs)(`div`,{className:`workspace-file-search-popover`,children:[(0,B.jsx)(`input`,{autoFocus:!0,placeholder:`Search files`,value:s,onChange:e=>ue(e.target.value),onKeyDown:E}),(0,B.jsx)(`span`,{children:`Files`}),(0,B.jsx)(`div`,{className:`workspace-file-search-results`,children:n.length===0?(0,B.jsx)(`small`,{children:`Type to search for files`}):n.map(e=>(0,B.jsx)(`button`,{type:`button`,onClick:()=>se(e),children:e},e))})]})]}),p!==`outputs`&&(f||d)?(0,B.jsxs)(`div`,{className:`workspace-diff-source-bar`,"aria-label":`Workspace source`,children:[f?(0,B.jsx)(`div`,{className:`workspace-diff-source-toggle`,role:`group`,"aria-label":`File source`,children:f.options.map(e=>(0,B.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,B.jsx)(`span`,{className:`workspace-diff-source-status ${d.tone}`,children:d.label}):null]}):null,m,(0,B.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,B.jsx)(v,{size:14}):(0,B.jsx)(Se,{size:14})})]})}function nn({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,B.jsx)(`div`,{className:`workspace-diff-toolbar ${e?`inline`:``}`,children:(0,B.jsxs)(`div`,{className:`workspace-diff-toolbar-actions`,children:[(0,B.jsxs)(`div`,{className:`workspace-diff-menu-anchor`,children:[(0,B.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Diff options`,"aria-haspopup":`menu`,"aria-expanded":l,onClick:()=>ie(),children:(0,B.jsx)(Ke,{size:15})}),l&&(0,B.jsx)(en,{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,B.jsxs)(`div`,{className:`workspace-editor-command-bar`,"aria-label":`Editor controls`,children:[(0,B.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Save file`,"aria-label":`Save file`,disabled:!n,onClick:te,children:(0,B.jsx)(Te,{size:14})}),(0,B.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Undo`,"aria-label":`Undo`,onClick:ne,children:(0,B.jsx)(st,{size:14})}),(0,B.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Redo`,"aria-label":`Redo`,onClick:_,children:(0,B.jsx)(ot,{size:14})}),(0,B.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Check file`,"aria-label":`Check file`,disabled:!t,onClick:g,children:o?(0,B.jsx)(T,{className:`spinning`,size:14}):(0,B.jsx)(P,{size:14})}),a&&(0,B.jsxs)(`span`,{className:`workspace-editor-diagnostic-chip ${a.severity}`,children:[a.severity===`error`||a.severity===`warning`||a.severity===`unavailable`?(0,B.jsx)(Ge,{size:13}):(0,B.jsx)(P,{size:13}),(0,B.jsx)(`span`,{children:a.label})]})]}),f&&(0,B.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,B.jsx)(M,{size:14})}),(0,B.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,B.jsx)(nt,{size:14})})]})})}var rn=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 an({connection:e,workspaceId:t,sandboxId:n,file:r,dirty:i,onReload:o}){let s=S(r.path)||t,c=D(),[l,u]=(0,z.useState)(!1),[d,f]=(0,z.useState)(!1),p=(0,z.useRef)(!0);(0,z.useEffect)(()=>(p.current=!0,()=>{p.current=!1}),[]);let[m,ee]=(0,z.useState)(r.readVersion),g=(0,z.useRef)(null),_=a({queryKey:[`open-file-version`,h(e),n??s,r.path],enabled:!!(e&&(n||s)),queryFn:async()=>{if(!n)return k.workspaceFileVersion(e,s,r.path);let t=r.path.includes(`/`)?r.path.slice(0,r.path.lastIndexOf(`/`))||`/`:`.`,{files:i}=await k.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,z.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,z.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&&Fe(r.path)){let n=/^(?:[~/\\]|[A-Za-z]:)/.test(r.path)?await k.signLocalImageUrl(e,{path:r.path}):await k.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 k.workspaceFile(e,s,r.path);if(!p.current)return;o(i,Fe(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,B.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,B.jsx)(E,{size:14,className:l?`spinning`:void 0}),(0,B.jsx)(`span`,{children:l?`Reloading…`:`Reload`})]})}var on={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 sn(e){let t=e.split(`/`).pop()?.toLowerCase()??``;return t===`dockerfile`?`shell`:t===`readme`||t===`readme.md`?`markdown`:on[t.includes(`.`)?t.split(`.`).pop()??``:``]??`text`}function cn(e,t){return e?t===`markdown`?ln(e):t===`json`?J(e,/("(?:\\.|[^"\\])*"(?=\s*:)|"(?:\\.|[^"\\])*"|[-]?\b\d+(?:\.\d+)?\b|\btrue\b|\bfalse\b|\bnull\b|[{}[\]:,])/g):t===`css`?J(e,/(\/\*.*?\*\/|#[\da-fA-F]{3,8}\b|--[\w-]+|[.#]?[\w-]+(?=\s*:)|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\b\d+(?:\.\d+)?(?:px|rem|em|%|vh|vw)?\b|[{}():;,])/g):t===`html`?J(e,/(<!--.*?-->|<\/?[\w-]+|[\w:-]+(?==)|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[<>/=])/g):t===`shell`?J(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`?J(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):J(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 ln(e){return/^\s{0,3}#{1,6}\s/.test(e)?[{text:e,kind:`keyword`}]:/^\s*[-*+]\s/.test(e)?[{text:e,kind:`property`}]:J(e,/(`[^`]+`|\*\*[^*]+\*\*|\[[^\]]+\]\([^)]+\)|https?:\/\/\S+)/g)}function un(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 J(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:un(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 Y({language:e,text:t}){return(0,B.jsx)(B.Fragment,{children:cn(t,e).map((e,t)=>(0,B.jsx)(`span`,{className:`syntax-token ${e.kind}`,children:e.text},`${t}-${e.text}`))})}var dn=(0,z.lazy)(()=>i(()=>import(`./FilePagePreview-dlbmR8s8.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]))),X=(0,z.lazy)(()=>i(()=>import(`./WorkspacePdfPreview-u6Iv0qr0.js`),__vite__mapDeps([54,1,2,3,45,53])));function Z({path:e,contentBase64:t}){let n=L(e),r=(0,z.useMemo)(()=>{try{let n=atob(t.replace(/\s/g,``)),r=Uint8Array.from(n,e=>e.charCodeAt(0));return new Blob([r],{type:fn(e)})}catch{return null}},[t,e]),[i,a]=(0,z.useState)(null);(0,z.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,B.jsxs)(`div`,{className:`workspace-document-preview`,children:[(0,B.jsxs)(`div`,{className:`workspace-document-preview-card`,children:[(0,B.jsx)(R,{path:e}),(0,B.jsxs)(`div`,{className:`workspace-document-preview-actions`,children:[(0,B.jsx)(`span`,{children:/\.pdf$/i.test(e)?`PDF`:`Word`}),(0,B.jsx)(`a`,{href:o,download:n,"aria-label":`Download document`,title:`Download document`,children:(0,B.jsx)(N,{size:16,"aria-hidden":`true`})})]})]}),/\.docx$/i.test(e)?(0,B.jsx)(z.Suspense,{fallback:(0,B.jsx)(`div`,{role:`status`,children:`Loading document…`}),children:(0,B.jsx)(dn,{thumbnail:!1,file:{path:e,content:t,contentEncoding:`base64`,status:``,additions:0,deletions:0,patch:``}})}):(0,B.jsx)(z.Suspense,{fallback:(0,B.jsx)(`div`,{role:`status`,children:`Loading document…`}),children:(0,B.jsx)(X,{contentBase64:t})})]}):(0,B.jsx)(`div`,{className:`workspace-diff-code-empty`,role:`status`,children:`Loading document…`}):(0,B.jsx)(`div`,{className:`workspace-diff-code-empty`,children:`Document preview unavailable.`})}function fn(e){return/\.pdf$/i.test(e)?`application/pdf`:/\.docx$/i.test(e)?`application/vnd.openxmlformats-officedocument.wordprocessingml.document`:`application/msword`}var pn=`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FilePagePreview-11ZNRtdT.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/index-CDtTBysF.js","assets/index-g7UqJhnX.css","assets/icons-CYvTltSH.js","assets/App-CV1p0_Zy.js","assets/useQuery-9SCnxwmR.js","assets/schemas-Brv9Vmnk.js","assets/common-BWVSBnpX.js","assets/settings-BC-bzgk6.js","assets/client-choice-storage-DWIA0Vou.js","assets/api-client-DJRVOFzS.js","assets/requests-DmeUYik4.js","assets/create-pipeline-DsZzNkt9.js","assets/profile-ref-D8lxL7dW.js","assets/chunk-H3JZ3P5T-DolwEJXo.js","assets/work-outputs-D_8TovAK.js","assets/chunk-GS5HEE4M-C0RLeIsy.js","assets/chunk-GCUWJUUM-Dy6oUNJ6.js","assets/reward-checks-DJJZYgf8.js","assets/intake-contracts-B8JZKYwb.js","assets/training-CGYukv2L.js","assets/chunk-Q4RGCEOI-Cr-dg4Nk.js","assets/ponder-desktop-Ca-9KggQ.js","assets/chat-resources-DMPHClhQ.js","assets/app-models-BUdzQbXo.js","assets/model-display-zPvC4L2B.js","assets/submit-issue-command-L5--gt9i.js","assets/connected-app-mentions-D3wRZLwI.js","assets/profile-agent-labels-Duh96b8x.js","assets/browser-sidebar-links-PVPCrsDJ.js","assets/browser-url-LACq2Ngu.js","assets/query-scope-BRpcgljO.js","assets/bot-BuaAVlz6.js","assets/chevron-down-CkifKd_O.js","assets/chevron-right-LsMXJ5SB.js","assets/copy-BYIypHbq.js","assets/external-link-Cv7TDVPT.js","assets/loader-circle-AjP2mDJA.js","assets/maximize-2-CvvoALtI.js","assets/message-square-CPtIPRtf.js","assets/plus-DFjCZeRE.js","assets/refresh-cw-Cx_7Zlbl.js","assets/square-terminal-CBlQtWQw.js","assets/x-EG07vYCF.js","assets/AppToastContext-D7z0w1PS.js","assets/NativeSetupTerminal-bJpDkKk1.js","assets/AppDialog-DdGt7aU1.js","assets/PageChrome-ufq2jePD.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-9wypyV6H.js","assets/WorkspaceMonacoEditor-BRPLaFZS.js","assets/WorkspaceMonacoEditor-C5uazxST.css","assets/WorkspacePresentationPreview-C-Cn-9pj.js","assets/WorkspaceFileLocation-C4K_D_yh.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-CDtTBysF.js";import{t as a}from"./useQuery-9SCnxwmR.js";import{a as o,m as s,o as c,p as l,r as u,v as d}from"./schemas-Brv9Vmnk.js";import{n as f,o as p}from"./client-choice-storage-DWIA0Vou.js";import{n as m}from"./create-pipeline-DsZzNkt9.js";import{n as ee}from"./app-models-BUdzQbXo.js";import{t as h}from"./query-scope-BRpcgljO.js";import{t as g}from"./icons-CYvTltSH.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-vvvphDlO.js";import{t as be}from"./chevron-up-Dt5T2Sf5.js";import{t as w}from"./folder-open-DlIP3g5o.js";import{t as xe}from"./info-EjyMkVzV.js";import{t as T}from"./loader-circle-AjP2mDJA.js";import{t as Se}from"./maximize-2-CvvoALtI.js";import{t as Ce}from"./message-square-CPtIPRtf.js";import{t as we}from"./plus-DFjCZeRE.js";import{t as E}from"./refresh-cw-Cx_7Zlbl.js";import{t as Te}from"./save-BaeHeBBw.js";import{t as Ee}from"./x-EG07vYCF.js";import{n as D,r as De}from"./AppToastContext-D7z0w1PS.js";import{$t as O,B as Oe,G as ke,Gt as Ae,H as je,J as Me,K as Ne,L as Pe,O as Fe,R as Ie,Sn as Le,Tn as k,U as A,V as Re,W as ze,Xt as Be,an as j,bn as M,dn as N,en as Ve,gn as He,gr as Ue,hn as P,hr as We,ln as F,mn as Ge,nn as Ke,q as qe,un as I,xn as Je}from"./App-CV1p0_Zy.js";import{n as L,t as R}from"./WorkspaceFileLocation-C4K_D_yh.js";var Ye=u([`local`,`sandbox`]),Xe=u([`pinned`,`saved_for_later`]),Ze=s({id:d().min(1),workspaceKind:Ye,workspaceId:d().min(1),workspaceName:d().min(1),path:d().min(1),status:Xe,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(Ze)}),s({workspaceKind:Ye,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 Qe(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 $e(e){return[`sidebar-file`,e.workspaceKind,encodeURIComponent(e.workspaceId),encodeURIComponent(Qe(e.path))].join(`:`)}var et=g(`text-align-start`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]]),tt=g(`chevrons-up`,[[`path`,{d:`m17 11-5-5-5 5`,key:`e8nh98`}],[`path`,{d:`m17 18-5-5-5 5`,key:`2avn1x`}]]),nt=g(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),rt=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`}]]),it=g(`panel-top`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),at=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`}]]),ot=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`}]]),st=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`}]]),z=e(n(),1),B=r();function ct({createRuntime:e,goalRuntime:t,subagentRuntime:n=null,onRunSubagentLifecycleAction:r}){let i=e?`Create/Improve Details`:`Goal Details`,a=e?U(e.run.state):n?.activeCount?n.label:t?.actionLabel??`No active goal`;return(0,B.jsxs)(`div`,{className:`goal-details-view`,"aria-label":i,children:[(0,B.jsxs)(`div`,{className:`goal-details-header`,children:[(0,B.jsxs)(`div`,{className:`goal-details-title`,children:[(0,B.jsx)(I,{size:15,"aria-hidden":`true`}),(0,B.jsx)(`span`,{children:i})]}),(0,B.jsx)(`span`,{className:`goal-details-state ${Pt(e?.run.state??null)}`,children:a})]}),(0,B.jsx)(`div`,{className:`goal-details-body`,children:e?(0,B.jsx)(lt,{runtime:e}):t||n?(0,B.jsx)(dt,{goalRuntime:t,subagentRuntime:n,onRunSubagentLifecycleAction:r}):(0,B.jsx)(kt,{})})]})}function lt({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,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(H,{title:`Current Work`,children:(0,B.jsx)(At,{rows:[[`State`,U(c)],[`Operation`,t.operation],[`Target`,U(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`,U(t.adapter.kind)],[`Run`,t.id],[`Revision`,String(t.revision)]]})}),(0,B.jsx)(H,{title:`Plan`,children:n?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`p`,{className:`goal-details-summary`,children:n.summary}),(0,B.jsx)(At,{rows:[[`Objective`,n.objective],[`Context`,n.capturedContextSummary],[`Status`,U(n.status)],[`Plan ID`,n.id],[`Run ID`,n.runId],[`Approval`,n.approvalId??`Pending`],[`Approved`,n.approvedAt??`Not approved`]]})]}):a.length?(0,B.jsx)(`p`,{className:`goal-details-summary`,children:`Waiting for answers before the model finalizes the Create plan.`}):(0,B.jsx)(`p`,{className:`goal-details-summary`,children:`The model is preparing the Create plan.`})}),r?(0,B.jsxs)(H,{title:`Action Shape`,children:[(0,B.jsx)(At,{rows:[[`Mode`,r.label],[`Default action`,r.defaultActionKey??`None`],[`Direct action`,r.directActionHint??`None planned`],[`Artifacts`,r.artifactPolicy]]}),(0,B.jsx)(`p`,{className:`goal-details-note`,children:r.detail})]}):null,i.length?(0,B.jsx)(H,{title:`Questions`,children:(0,B.jsx)(`div`,{className:`goal-details-list`,children:i.map(e=>(0,B.jsxs)(`article`,{className:`goal-details-list-item`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`strong`,{children:e.title}),(0,B.jsx)(`span`,{className:`goal-details-inline-state ${e.status}`,children:U(e.status)})]}),(0,B.jsx)(`p`,{children:e.prompt}),e.answer?(0,B.jsxs)(`small`,{children:[`Answer: `,e.answer.label??e.answer.value]}):e.options.length?(0,B.jsxs)(`small`,{children:[`Options: `,e.options.map(e=>e.label).join(`, `)]}):null]},e.id))})}):null,n?.requirements.length?(0,B.jsx)(H,{title:`Setup Requirements`,children:(0,B.jsx)(`div`,{className:`goal-details-list`,children:n.requirements.map(e=>(0,B.jsxs)(`article`,{className:`goal-details-list-item`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`strong`,{children:e.name}),(0,B.jsx)(`span`,{className:`goal-details-inline-state ${e.status}`,children:U(e.status)})]}),(0,B.jsxs)(`small`,{children:[U(e.kind),e.detail?`: ${e.detail}`:``]})]},`${e.kind}:${e.name}`))})}):null,n?.sourcePlan.length?(0,B.jsx)(H,{title:`Source Plan`,children:(0,B.jsx)(jt,{refs:n.sourcePlan.map(e=>({id:`${e.operation}:${e.path}`,primary:e.path,secondary:`${U(e.operation)}: ${e.reason}`}))})}):null,n?.checks.length?(0,B.jsx)(H,{title:`Checks`,children:(0,B.jsx)(jt,{refs:n.checks.map(e=>({id:e.name,primary:e.name,secondary:`${e.required?`Required`:`Optional`}: ${e.command}`}))})}):null,o.length||s.length?(0,B.jsx)(H,{title:`Run Refs`,children:(0,B.jsx)(jt,{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,B.jsx)(ut,{run:t}),t.blockedReason?(0,B.jsx)(H,{title:`Blocked`,children:(0,B.jsxs)(`div`,{className:`goal-details-alert`,children:[(0,B.jsx)(Ge,{size:15}),(0,B.jsx)(`span`,{children:t.blockedReason})]})}):null,(0,B.jsx)(H,{title:`Raw State`,children:(0,B.jsxs)(`details`,{className:`goal-details-raw`,children:[(0,B.jsx)(`summary`,{children:`Show structured payload`}),(0,B.jsx)(`pre`,{children:JSON.stringify(t,null,2)})]})})]})}function ut({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,B.jsx)(H,{title:`Context`,children:(0,B.jsx)(jt,{refs:[...t,...r]})})}function dt({goalRuntime:e,subagentRuntime:t,onRunSubagentLifecycleAction:n}){return(0,B.jsxs)(B.Fragment,{children:[e?(0,B.jsxs)(H,{title:`Goal`,children:[(0,B.jsx)(`p`,{className:`goal-details-summary`,children:e.objective}),(0,B.jsx)(At,{rows:[[`Status`,e.actionLabel],[`Runtime`,e.timeLabel],[`Detail`,e.detail]]})]}):null,t?(0,B.jsx)(ft,{runtime:t,onRunSubagentLifecycleAction:n}):null,(0,B.jsx)(H,{title:`Raw State`,children:(0,B.jsxs)(`details`,{className:`goal-details-raw`,children:[(0,B.jsx)(`summary`,{children:`Show structured payload`}),(0,B.jsx)(`pre`,{children:JSON.stringify({goalRuntime:e,subagentRuntime:t},null,2)})]})})]})}function ft({runtime:e,onRunSubagentLifecycleAction:t}){let[n,r]=(0,z.useState)(null),[i,a]=(0,z.useState)(null);De(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,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(H,{title:`Subagents`,children:[(0,B.jsx)(At,{rows:[[`Latest update`,yt(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`,bt(e.usage.totalTokens,e.usage.requestCount)],[`Evidence`,String(e.evidenceRefs.length)],[`Checks`,String(e.testsRunCount)]]}),e.blockers.length>0?(0,B.jsx)(`ul`,{className:`goal-details-list compact`,children:e.blockers.slice(0,4).map(e=>(0,B.jsxs)(`li`,{className:`goal-details-list-item`,children:[(0,B.jsx)(`span`,{className:`goal-details-inline-state ${e.status}`,children:e.status}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`strong`,{children:xt(e.roleId)}),(0,B.jsx)(`p`,{children:e.message})]})]},`${e.runId}:${e.message}`))}):null,(0,B.jsx)(`ul`,{className:`goal-details-list`,children:e.runs.slice(0,8).map(e=>(0,B.jsxs)(`li`,{className:`goal-details-list-item`,children:[(0,B.jsx)(`span`,{className:`goal-details-inline-state ${e.status}`,children:e.status}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`strong`,{children:xt(e.roleId)}),(0,B.jsx)(`p`,{children:e.objective}),e.report?.summary?(0,B.jsx)(`small`,{children:e.report.summary}):null,t?(0,B.jsx)(mt,{pendingAction:n,run:e,onRun:o}):null]})]},e.id))})]}),e.finalResults.length>0?(0,B.jsx)(pt,{results:e.finalResults}):null]})}function pt({results:e}){return(0,B.jsx)(H,{title:`Child Results`,children:(0,B.jsx)(`ol`,{className:`goal-details-task-graph`,children:e.slice(0,6).map(e=>(0,B.jsxs)(`li`,{className:`goal-details-task-node`,children:[(0,B.jsxs)(`div`,{className:`goal-details-task-node-header`,children:[(0,B.jsx)(`span`,{className:`goal-details-inline-state ${e.status}`,children:e.status}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`strong`,{children:xt(e.roleId)}),(0,B.jsx)(`small`,{children:e.objective})]})]}),(0,B.jsx)(`p`,{children:e.summary}),(0,B.jsxs)(`div`,{className:`goal-details-task-node-meta`,children:[(0,B.jsxs)(`span`,{children:[e.refs.length,` refs`]}),(0,B.jsxs)(`span`,{children:[e.testsRun.length+e.validationAttempts.length,` checks`]}),(0,B.jsxs)(`span`,{children:[e.blockers.length,` blockers`]}),(0,B.jsx)(`span`,{children:e.confidence?`${U(e.confidence)} confidence`:`Confidence unknown`})]}),e.findings.length>0?(0,B.jsxs)(`small`,{children:[`Findings: `,Tt(e.findings,3)]}):null,e.changedFiles.length>0?(0,B.jsxs)(`small`,{children:[`Files: `,Tt(e.changedFiles,4)]}):null,e.testsRun.length>0?(0,B.jsxs)(`small`,{children:[`Tests: `,Tt(e.testsRun,3)]}):null,e.validationAttempts.length>0?(0,B.jsxs)(`small`,{children:[`Validation: `,Tt(e.validationAttempts,2)]}):null,e.refs.length>0?(0,B.jsxs)(`small`,{children:[`Refs: `,Tt(e.refs.map(St),4)]}):null,e.blockers.length>0?(0,B.jsxs)(`small`,{children:[`Blockers: `,Tt(e.blockers,3)]}):null,e.workspaceRetention?(0,B.jsxs)(`small`,{children:[`Workspace: `,wt(e.workspaceRetention)]}):null,e.importantMessages.length>0?(0,B.jsxs)(`small`,{children:[`Messages: `,Tt(e.importantMessages.map(Ct),2)]}):null]},e.runId))})})}function mt({pendingAction:e,run:t,onRun:n}){let r=ht(t);return r.length===0?null:(0,B.jsx)(`div`,{className:`goal-details-actions`,children:r.map(r=>{let i=e===`${t.id}:${r}`;return(0,B.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(!V(e))return!1;let t=Mt(e.metadata);if(!t?.subagentWorkspace&&!t?.workspaceHandoff)return!1;let n=Nt(Mt(Mt(t.lifecycleCleanup)?.workspaceCleanup)?.status);return n!==`removed`&&n!==`deleted`&&n!==`retained`&&n!==`skipped`}function vt(e){if(!e.childSessionId||!V(e))return!1;let t=Nt(Mt(Mt(e.metadata)?.childSessionArchive)?.status);return t!==`archived`&&t!==`already_archived`}function V(e){return e.status===`completed`||e.status===`failed`||e.status===`cancelled`}function yt(e){let t=e.latestMeaningfulUpdate;return t?`${xt(t.roleId)} ${t.status}: ${t.message}`:`No structured update`}function bt(e,t){if(e<=0&&t<=0)return`0 tokens`;let n=`${t} ${t===1?`request`:`requests`}`;return`${Et(e)} tokens · ${n}`}function xt(e){return e.slice(0,1).toUpperCase()+e.slice(1).replace(/[-_]+/g,` `)}function St(e){return`${e.kind}: ${e.label}`}function Ct(e){return`${U(e.kind)}: ${e.body}`}function wt(e){return`retained ${e.expiresAt?`until ${Dt(e.expiresAt)}`:`for inspection`}${e.trigger?` · ${U(e.trigger)}`:``}`}function Tt(e,t){let n=e.slice(0,t),r=e.length-n.length;return r>0?`${n.join(`, `)} +${r}`:n.join(`, `)}function Et(e){if(e<1e3)return String(e);if(e>=1e6){let t=e/1e6;return`${Ot(t,t<10?2:1)}M`}let t=e/1e3;return`${Ot(t,+(t<10))}k`}function Dt(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString([],{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`})}function Ot(e,t){return e.toFixed(t).replace(/\.0+$/,``).replace(/(\.\d*?)0+$/,`$1`)}function kt(){return(0,B.jsxs)(`div`,{className:`goal-details-empty`,children:[(0,B.jsx)(I,{size:18}),(0,B.jsx)(`span`,{children:`No active Goal or Create workflow.`})]})}function H({children:e,title:t}){return(0,B.jsxs)(`section`,{className:`goal-details-section`,children:[(0,B.jsx)(`h2`,{children:t}),e]})}function At({rows:e}){return(0,B.jsx)(`dl`,{className:`goal-details-grid`,children:e.map(([e,t])=>(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:e}),(0,B.jsx)(`dd`,{children:t})]},e))})}function jt({refs:e}){return(0,B.jsx)(`ul`,{className:`goal-details-ref-list`,children:e.map(e=>(0,B.jsxs)(`li`,{children:[(0,B.jsx)(`code`,{title:e.primary,children:e.primary}),(0,B.jsx)(`span`,{children:e.secondary})]},e.id))})}function Mt(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:null}function Nt(e){return typeof e==`string`&&e.trim()?e.trim():null}function U(e){return e.split(/[_-]/g).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function Pt(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 Ft({sandboxId:e,connection:t}){let[n,r]=(0,z.useState)(null),[i,a]=(0,z.useState)([]),[o,s]=(0,z.useState)(null),[c,l]=(0,z.useState)(null),[u,d]=(0,z.useState)(null),[f,p]=(0,z.useState)(null);De(u,{prefix:`Sandbox`}),De(f,{prefix:`Sandbox integrations`});let m=n?.integrationLeases??[],ee=(0,z.useMemo)(()=>i.filter(e=>e.status===`active`),[i]),h=(0,z.useMemo)(()=>Rt(n),[n]),g=(0,z.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 k.sandbox(t,e),i=await k.integrationConnections(t,It(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,z.useCallback)(async()=>{if(t&&n){l(`load`),p(null);try{let[e,i]=await Promise.all([k.integrationConnections(t,It(n)),k.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,z.useCallback)(async e=>{if(!t||!n)return;let i=Ue(e.provider),a=i?We(i):null,o=a?.leasePolicy.allowedCapabilityIds??[];if(!i||!a?.leasePolicy.leaseable||o.length===0)p(`${W(e.provider)} cannot be attached to this sandbox.`);else{l(`attach:${e.id}`),p(null);try{let i=await k.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,z.useCallback)(async e=>{if(t&&n){l(`remove:${e}`),p(null);try{let i=await k.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,z.useEffect)(()=>{g()},[g]),e?(0,B.jsxs)(`div`,{className:`sandbox-summary-tab`,children:[(0,B.jsxs)(`section`,{className:`sandbox-workspace-section`,children:[(0,B.jsxs)(`div`,{className:`sandbox-workspace-heading`,children:[(0,B.jsx)(`h3`,{children:`Sandbox`}),(0,B.jsxs)(`div`,{className:`sandbox-workspace-heading-actions`,children:[n?(0,B.jsx)(`span`,{children:n.state}):null,(0,B.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,B.jsx)(T,{className:`spinning`,size:14}):(0,B.jsx)(E,{size:14})})]})]}),n?(0,B.jsxs)(`dl`,{className:`sandbox-workspace-kv`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:`Sandbox`}),(0,B.jsx)(`dd`,{children:Wt(n.id)})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:`Spend`}),(0,B.jsxs)(`dd`,{children:[Kt(n.reservation.capturedUsd),` / `,Kt(n.budget.maxUsd)]})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:`Reservation`}),(0,B.jsx)(`dd`,{children:n.reservation.status})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:`Idle cleanup`}),(0,B.jsx)(`dd`,{children:n.quotas?.idleTimeoutSeconds?`${Math.round(n.quotas.idleTimeoutSeconds/60)} min`:`-`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:`Updated`}),(0,B.jsx)(`dd`,{children:Gt(n.updatedAt)})]}),h?(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:`Receipt`}),(0,B.jsxs)(`dd`,{children:[Wt(h.id),` / `,Kt(h.totalUsd)]})]}):null]}):(0,B.jsxs)(`div`,{className:`sandbox-workspace-loading`,children:[o===`summary`?(0,B.jsx)(T,{className:`spinning`,size:16}):null,(0,B.jsx)(`span`,{children:o===`summary`?`Loading sandbox`:`Sandbox unavailable`})]})]}),(0,B.jsxs)(`section`,{className:`sandbox-workspace-section`,children:[(0,B.jsxs)(`div`,{className:`sandbox-workspace-heading`,children:[(0,B.jsx)(`h3`,{children:`Integrations`}),(0,B.jsxs)(`div`,{className:`sandbox-workspace-heading-actions`,children:[(0,B.jsx)(`span`,{children:m.length}),(0,B.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,B.jsx)(T,{className:`spinning`,size:14}):(0,B.jsx)(E,{size:14})})]})]}),m.length>0?(0,B.jsx)(`div`,{className:`sandbox-workspace-integration-list`,children:m.map(e=>(0,B.jsxs)(`div`,{className:`sandbox-workspace-integration-row`,children:[(0,B.jsxs)(`div`,{className:`sandbox-workspace-integration-main`,children:[(0,B.jsx)(`span`,{children:W(e.provider)}),(0,B.jsxs)(`small`,{children:[e.required?`required`:`optional`,` / `,Vt(e),` / `,Lt(e)]})]}),(0,B.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Revoke ${W(e.provider)} lease`,"aria-label":`Revoke ${W(e.provider)} lease`,disabled:c!==null,onClick:()=>void ne(e.leaseId),children:c===`remove:${e.leaseId}`?(0,B.jsx)(T,{className:`spinning`,size:14}):(0,B.jsx)(re,{size:14})}),(0,B.jsxs)(`div`,{className:`sandbox-workspace-chip-row`,children:[e.capabilities.slice(0,5).map(t=>(0,B.jsx)(`span`,{children:Bt(e.provider,t)},t)),e.capabilities.length>5?(0,B.jsxs)(`span`,{children:[`+`,e.capabilities.length-5]}):null]})]},e.leaseId))}):(0,B.jsx)(`p`,{className:`sandbox-workspace-empty`,children:`No active integration leases.`}),ee.length>0?(0,B.jsx)(`div`,{className:`sandbox-workspace-integration-list`,children:ee.map(e=>{let t=m.some(t=>t.provider===e.provider),n=zt(e)?.leasePolicy.allowedCapabilityIds.length??0;return(0,B.jsxs)(`div`,{className:`sandbox-workspace-integration-row compact`,children:[(0,B.jsxs)(`div`,{className:`sandbox-workspace-integration-main`,children:[(0,B.jsx)(`span`,{children:Ht(e)}),(0,B.jsx)(`small`,{children:Ut(e,n)})]}),(0,B.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:t?`${W(e.provider)} already attached`:`Attach ${W(e.provider)}`,"aria-label":t?`${W(e.provider)} already attached`:`Attach ${W(e.provider)}`,disabled:t||c!==null||n===0,onClick:()=>void te(e),children:c===`attach:${e.id}`?(0,B.jsx)(T,{className:`spinning`,size:14}):(0,B.jsx)(at,{size:14})})]},e.id)})}):(0,B.jsx)(`p`,{className:`sandbox-workspace-empty`,children:`No connected accounts available.`})]})]}):(0,B.jsx)(`div`,{className:`sandbox-summary-tab`,children:(0,B.jsx)(`p`,{className:`sandbox-workspace-empty`,children:`No sandbox is attached yet.`})})}function It(e){return{status:`active`}}function Lt(e){return e.proxyUrl?`runtime proxy available`:`metadata only, no runtime proxy`}function Rt(e){return e?.receipts?.at(-1)??null}function zt(e){let t=Ue(e.provider);return t?We(t):null}function W(e){let t=Ue(e),n=t?We(t):null;return n?n.label:e===`microsoft_teams`?`Microsoft Teams`:e?e.replace(/_/g,` `):`Integration`}function Bt(e,t){let n=Ue(e);return(n?We(n):null)?.capabilities.find(e=>e.id===t)?.label??t}function Vt(e){return e.expiresAt?`expires ${Gt(e.expiresAt)}`:`active`}function Ht(e){let t=e.providerAccountName?.trim();return t?`${W(e.provider)} / ${t}`:W(e.provider)}function Ut(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 Wt(e){return e.length>10?`${e.slice(0,8)}...`:e}function Gt(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 Kt(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 qt({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,B.jsxs)(`div`,{className:`training-sidebar-summary`,children:[(0,B.jsxs)(`header`,{children:[(0,B.jsx)(`h2`,{children:oe(e.taskset.name,t)}),(0,B.jsx)(`span`,{children:e.job?pe(e.job.status):e.taskset.readiness?.ready?`Ready to train`:`Needs review`})]}),(0,B.jsxs)(`section`,{children:[(0,B.jsx)(`h3`,{children:`Run`}),(0,B.jsxs)(`dl`,{children:[(0,B.jsx)(G,{label:`Primary recommendation`,value:t.toUpperCase()}),(0,B.jsx)(G,{label:`Training stage`,value:a}),(0,B.jsx)(G,{label:`Base model`,value:i?.baseModel.id??`Not selected`}),(0,B.jsx)(G,{label:`Compute`,value:e.plan?ge(e.plan.destinationId):`Not selected`}),(0,B.jsx)(G,{label:`Started`,value:fe(e.job?.startedAt??null)}),(0,B.jsx)(G,{label:`Duration`,value:me(e.job?.startedAt??null,o)})]})]}),(0,B.jsxs)(`section`,{children:[(0,B.jsx)(`h3`,{children:`Data`}),(0,B.jsxs)(`dl`,{children:[(0,B.jsx)(G,{label:`Training examples`,value:String(n)}),(0,B.jsx)(G,{label:`Test examples`,value:String(r)}),(0,B.jsx)(G,{label:`Dataset sources`,value:String(e.taskset.sourceRefs.length)})]})]}),i?(0,B.jsxs)(`section`,{children:[(0,B.jsx)(`h3`,{children:`Recipe`}),(0,B.jsxs)(`dl`,{children:[i.method===`grpo`?(0,B.jsx)(G,{label:`RL loss`,value:i.loss.method===`gspo-token`?`GSPO-token`:i.loss.method.toUpperCase()}):null,(0,B.jsx)(G,{label:`LoRA rank`,value:String(i.lora.rank)}),(0,B.jsx)(G,{label:`Learning rate`,value:String(i.optimizer.learningRate)}),(0,B.jsx)(G,{label:`Optimizer steps`,value:String(i.optimizer.maxSteps)}),(0,B.jsx)(G,{label:i.method===`grpo`?`Prompt length`:`Sequence length`,value:String(i.method===`grpo`?i.dataset.maxPromptTokens:i.dataset.maxSequenceLength)})]})]}):null,(0,B.jsxs)(`section`,{children:[(0,B.jsx)(`h3`,{children:`Result`}),(0,B.jsxs)(`dl`,{children:[(0,B.jsx)(G,{label:`Adapter`,value:e.lineage?`${a} ready`:`Not created`}),(0,B.jsx)(G,{label:`Evaluation`,value:e.lineage?.frozenEvaluationArtifactId?`Completed`:`Not completed`}),(0,B.jsx)(G,{label:`Artifacts`,value:String(e.artifacts.length)})]})]})]})}function G({label:e,value:t}){return(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`dt`,{children:e}),(0,B.jsx)(`dd`,{children:t})]})}function Jt(e){let t=Yt(``,``,`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=Yt(n,a,o),i.childMap.set(s,c),i.children.push(c)),i=c}}return Xt(t.children)}function Yt(e,t,n){return{name:e,path:t,type:n,children:[],childMap:new Map}}function Xt(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:Xt(e.children)}))}function Zt({className:e,currentStatus:t,onSetStatus:n}){let r=t===`pinned`,i=t===`saved_for_later`;return(0,B.jsxs)(`span`,{className:`workspace-file-bookmark-actions ${e??`workspace-file-heading-actions`}`,children:[(0,B.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,B.jsx)(O,{size:14}):(0,B.jsx)(Ve,{size:14})}),(0,B.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,B.jsx)(Je,{size:14}):(0,B.jsx)(Le,{size:14})})]})}function Qt({changedByPath:e,expandedFolderPaths:t,rootPath:n,repoFiles:r,selectedPath:i,getFileBookmarkStatus:a,onOpenFile:o,onSetFileBookmarkStatus:s,onToggleFolder:c}){let l=(0,z.useMemo)(()=>Jt(r),[r]);return(0,B.jsxs)(`div`,{className:`workspace-file-tree-view`,children:[(0,B.jsxs)(`div`,{className:`workspace-file-tree-header`,children:[(0,B.jsx)(w,{size:14}),(0,B.jsx)(`strong`,{title:n??void 0,children:n?n.split(`/`).at(-1):`Files`}),(0,B.jsx)(`span`,{children:r.length})]}),(0,B.jsx)(`div`,{className:`workspace-file-tree`,children:l.map(r=>(0,B.jsx)(K,{changedByPath:e,expandedFolderPaths:t,node:r,rootPath:n,selectedPath:i,getFileBookmarkStatus:a,onOpenFile:o,onSetFileBookmarkStatus:s,onToggleFolder:c},`${r.type}:${r.path}`))})]})}function K({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,B.jsxs)(`div`,{className:`workspace-file-tree-node`,children:[(0,B.jsxs)(`button`,{type:`button`,className:`workspace-file-tree-row folder`,"aria-expanded":d,style:{paddingLeft:p},onClick:()=>l(u),children:[d?(0,B.jsx)(w,{size:14}):(0,B.jsx)(F,{size:14}),(0,B.jsx)(`span`,{children:r.name})]}),d&&r.children.map(r=>(0,B.jsx)(K,{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,B.jsxs)(`div`,{className:`workspace-file-tree-row file ${f?`changed`:``} ${a===u?`selected`:``}`,style:{paddingLeft:p},children:[(0,B.jsxs)(`button`,{type:`button`,className:`workspace-file-tree-row-main`,title:u,onClick:()=>s(u),children:[(0,B.jsx)(b,{size:13}),(0,B.jsx)(`span`,{children:r.name}),f&&(0,B.jsxs)(`small`,{children:[(0,B.jsxs)(`span`,{className:`diff-addition`,children:[`+`,f.additions]}),(0,B.jsxs)(`span`,{className:`diff-deletion`,children:[`-`,f.deletions]})]})]}),/\.html?$/i.test(u)&&(0,B.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,B.jsx)(Zt,{className:`workspace-file-tree-bookmark-actions`,currentStatus:o?.(u)??null,onSetStatus:e=>c(u,e)}):null]})}function $t({diff:e,expandedFolderPaths:t,rootPath:n,repoFiles:r,selectedPath:i,getFileBookmarkStatus:a,onOpenFile:o,onSetFileBookmarkStatus:s,onToggleFolder:c}){let l=e?.files??[],u=(0,z.useMemo)(()=>new Map(l.map(e=>[e.path,e])),[l]),d=n?.replace(/^\/+|\/+$/g,``)||null,f=(0,z.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,B.jsx)(`div`,{className:`workspace-diff-files-view`,children:(0,B.jsx)(Qt,{changedByPath:u,expandedFolderPaths:t,rootPath:d,repoFiles:f,selectedPath:i,getFileBookmarkStatus:a,onOpenFile:o,onSetFileBookmarkStatus:s,onToggleFolder:c})})}function en({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,B.jsxs)(`div`,{className:`workspace-diff-options-menu`,role:`menu`,children:[(0,B.jsx)(q,{icon:(0,B.jsx)(E,{size:14}),label:`Refresh`,onClick:l,onClose:s}),(0,B.jsx)(q,{checked:o,icon:(0,B.jsx)(ie,{size:14}),label:`Enable word wrap`,onClick:h,onClose:s}),(0,B.jsx)(q,{checked:e,icon:(0,B.jsx)(tt,{size:14}),label:`Collapse all diffs`,onClick:u,onClose:s}),(0,B.jsx)(`div`,{className:`workspace-diff-menu-divider`}),(0,B.jsx)(q,{checked:t,icon:(0,B.jsx)(it,{size:14}),label:`Show editor controls`,onClick:d,onClose:s}),(0,B.jsx)(q,{checked:i,icon:(0,B.jsx)(M,{size:14}),label:`Render Markdown`,onClick:m,onClose:s}),(0,B.jsx)(q,{checked:!r,icon:(0,B.jsx)(I,{size:14}),label:`Show diffs first`,onClick:p,onClose:s}),(0,B.jsx)(q,{checked:a,icon:(0,B.jsx)(et,{size:14}),label:`Enable word diffs`,onClick:ee,onClose:s}),(0,B.jsx)(q,{checked:n,icon:(0,B.jsx)(rt,{size:14}),label:`Hide white space`,onClick:f,onClose:s}),(0,B.jsx)(q,{icon:(0,B.jsx)(te,{size:14}),label:`Copy git apply command`,onClick:c,onClose:s})]})}function q({checked:e,icon:t,label:n,onClick:r,onClose:i}){return(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:()=>{r?.(),i()},children:[t,(0,B.jsx)(`span`,{children:n}),e&&(0,B.jsx)(He,{size:14})]})}function tn({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,z.useRef)(null),T=(0,z.useRef)(null);(0,z.useEffect)(()=>{T.current?.querySelector(`button[role="tab"][aria-selected="true"]`)?.scrollIntoView({block:`nearest`,inline:`nearest`})},[re,i.length,c,p]),(0,z.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 E(e){e.key===`Escape`?S():e.key===`Enter`&&(n[0]||s.trim())&&se(n[0]||s.trim())}function Te(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[ze(r,n.length,e.key)];if(!i)return;i.focus(),i.click();let a=i.id;a&&window.requestAnimationFrame(()=>document.getElementById(a)?.focus())}let D=[...te.map(e=>(0,B.jsxs)(`div`,{className:`workspace-diff-tab file ${p===`outputs`&&re===e?`active`:``}`,children:[(0,B.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,B.jsx)(I,{className:`workspace-diff-tab-icon`,size:14}),(0,B.jsx)(`span`,{children:e===-2?`Agents`:e===-1?ne:`New tab`})]}),(0,B.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,B.jsx)(Ee,{size:12})})]},`overview-${e}`)),a?(0,B.jsxs)(`button`,{type:`button`,className:`workspace-diff-tab ${p===`goal`?`active`:``}`,role:`tab`,"aria-selected":p===`goal`,onClick:he,children:[(0,B.jsx)(I,{size:14}),(0,B.jsx)(`span`,{children:`Goal`})]},`goal`):null,u&&ge?(0,B.jsxs)(`button`,{type:`button`,className:`workspace-diff-tab ${p===`summary`?`active`:``}`,role:`tab`,"aria-selected":p===`summary`,onClick:ge,children:[(0,B.jsx)(xe,{size:14}),(0,B.jsx)(`span`,{children:`Summary`})]},`summary`):null,g?(0,B.jsxs)(`div`,{className:`workspace-diff-tab file ${p===`files`?`active`:``}`,children:[(0,B.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,B.jsx)(w,{className:`workspace-diff-tab-icon`,size:14}),(0,B.jsx)(`span`,{children:`Files`})]}),_?(0,B.jsx)(`button`,{type:`button`,className:`workspace-diff-tab-close`,"aria-label":`Close files tab`,onClick:_,children:(0,B.jsx)(Ee,{size:12})}):null]},`files`):null,...i.map(e=>(0,B.jsxs)(`div`,{className:`workspace-diff-tab file ${p===`file`&&c===e.path?`active`:``}`,children:[(0,B.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,B.jsx)(I,{className:`workspace-diff-tab-icon`,size:13}),r.has(e.path)&&(0,B.jsx)(`span`,{className:`workspace-diff-tab-dirty`,"aria-hidden":`true`}),(0,B.jsx)(`span`,{children:L(e.path)})]}),de?(0,B.jsx)(Zt,{className:`workspace-diff-tab-bookmark-actions`,currentStatus:ie?.(e.path)??null,onSetStatus:t=>de(e.path,t)}):null,(0,B.jsx)(`button`,{type:`button`,className:`workspace-diff-tab-close`,title:`Close ${e.path}`,onClick:t=>ae(e.path,t),children:(0,B.jsx)(Ee,{size:12})})]},e.path)),...l.map(e=>(0,B.jsxs)(`div`,{className:`workspace-diff-tab right-chat-tab`,children:[(0,B.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,B.jsx)(`span`,{className:`right-chat-status-dot`,"aria-label":`Running`}):null,(0,B.jsx)(`span`,{children:e.title})]}),oe?(0,B.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,B.jsx)(Ee,{size:12})}):null]},e.id))].filter(e=>e!==null),De=new Map(h.map((e,t)=>[e,t]));return D.sort((e,t)=>(De.get(String(e.key))??h.length)-(De.get(String(t.key))??h.length)),(0,B.jsxs)(`div`,{className:`workspace-diff-topbar`,children:[(0,B.jsxs)(`div`,{className:`workspace-diff-tabs`,role:`tablist`,"aria-label":`Right sidebar views`,ref:T,onKeyDown:Te,children:[D,ee]}),(0,B.jsxs)(`div`,{className:`workspace-diff-add-anchor`,ref:be,children:[(0,B.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,B.jsx)(we,{size:15})}),e&&(0,B.jsxs)(`div`,{className:`workspace-diff-add-menu`,role:`menu`,children:[me?(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:me,children:[(0,B.jsx)(I,{size:14}),(0,B.jsx)(`span`,{children:`Training`}),(0,B.jsx)(`kbd`,{})]}):null,le?(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:le,children:[(0,B.jsx)(Ce,{size:14}),(0,B.jsx)(`span`,{children:`New task`}),(0,B.jsx)(`kbd`,{})]}):null,(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:pe,children:[(0,B.jsx)(w,{size:14}),(0,B.jsx)(`span`,{children:`Files`}),(0,B.jsx)(`kbd`,{})]}),u&&ge?(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:ge,children:[(0,B.jsx)(xe,{size:14}),(0,B.jsx)(`span`,{children:`Summary`}),(0,B.jsx)(`kbd`,{})]}):null,(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:ce,children:[(0,B.jsx)(Be,{size:14}),(0,B.jsx)(`span`,{children:`Open file`}),(0,B.jsx)(`kbd`,{children:`Ctrl+P`})]}),C?(0,B.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:C,children:[(0,B.jsx)(j,{size:14}),(0,B.jsx)(`span`,{children:`Browser`}),(0,B.jsx)(`kbd`,{children:`Ctrl+I`})]}):null]}),o&&(0,B.jsxs)(`div`,{className:`workspace-file-search-popover`,children:[(0,B.jsx)(`input`,{autoFocus:!0,placeholder:`Search files`,value:s,onChange:e=>ue(e.target.value),onKeyDown:E}),(0,B.jsx)(`span`,{children:`Files`}),(0,B.jsx)(`div`,{className:`workspace-file-search-results`,children:n.length===0?(0,B.jsx)(`small`,{children:`Type to search for files`}):n.map(e=>(0,B.jsx)(`button`,{type:`button`,onClick:()=>se(e),children:e},e))})]})]}),p!==`outputs`&&(f||d)?(0,B.jsxs)(`div`,{className:`workspace-diff-source-bar`,"aria-label":`Workspace source`,children:[f?(0,B.jsx)(`div`,{className:`workspace-diff-source-toggle`,role:`group`,"aria-label":`File source`,children:f.options.map(e=>(0,B.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,B.jsx)(`span`,{className:`workspace-diff-source-status ${d.tone}`,children:d.label}):null]}):null,m,(0,B.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,B.jsx)(v,{size:14}):(0,B.jsx)(Se,{size:14})})]})}function nn({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,B.jsx)(`div`,{className:`workspace-diff-toolbar ${e?`inline`:``}`,children:(0,B.jsxs)(`div`,{className:`workspace-diff-toolbar-actions`,children:[(0,B.jsxs)(`div`,{className:`workspace-diff-menu-anchor`,children:[(0,B.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Diff options`,"aria-haspopup":`menu`,"aria-expanded":l,onClick:()=>ie(),children:(0,B.jsx)(Ke,{size:15})}),l&&(0,B.jsx)(en,{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,B.jsxs)(`div`,{className:`workspace-editor-command-bar`,"aria-label":`Editor controls`,children:[(0,B.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Save file`,"aria-label":`Save file`,disabled:!n,onClick:te,children:(0,B.jsx)(Te,{size:14})}),(0,B.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Undo`,"aria-label":`Undo`,onClick:ne,children:(0,B.jsx)(st,{size:14})}),(0,B.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Redo`,"aria-label":`Redo`,onClick:_,children:(0,B.jsx)(ot,{size:14})}),(0,B.jsx)(`button`,{type:`button`,className:`diff-icon-button`,title:`Check file`,"aria-label":`Check file`,disabled:!t,onClick:g,children:o?(0,B.jsx)(T,{className:`spinning`,size:14}):(0,B.jsx)(P,{size:14})}),a&&(0,B.jsxs)(`span`,{className:`workspace-editor-diagnostic-chip ${a.severity}`,children:[a.severity===`error`||a.severity===`warning`||a.severity===`unavailable`?(0,B.jsx)(Ge,{size:13}):(0,B.jsx)(P,{size:13}),(0,B.jsx)(`span`,{children:a.label})]})]}),f&&(0,B.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,B.jsx)(M,{size:14})}),(0,B.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,B.jsx)(nt,{size:14})})]})})}var rn=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 an({connection:e,workspaceId:t,sandboxId:n,file:r,dirty:i,onReload:o}){let s=S(r.path)||t,c=D(),[l,u]=(0,z.useState)(!1),[d,f]=(0,z.useState)(!1),p=(0,z.useRef)(!0);(0,z.useEffect)(()=>(p.current=!0,()=>{p.current=!1}),[]);let[m,ee]=(0,z.useState)(r.readVersion),g=(0,z.useRef)(null),_=a({queryKey:[`open-file-version`,h(e),n??s,r.path],enabled:!!(e&&(n||s)),queryFn:async()=>{if(!n)return k.workspaceFileVersion(e,s,r.path);let t=r.path.includes(`/`)?r.path.slice(0,r.path.lastIndexOf(`/`))||`/`:`.`,{files:i}=await k.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,z.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,z.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&&Fe(r.path)){let n=/^(?:[~/\\]|[A-Za-z]:)/.test(r.path)?await k.signLocalImageUrl(e,{path:r.path}):await k.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 k.workspaceFile(e,s,r.path);if(!p.current)return;o(i,Fe(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,B.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,B.jsx)(E,{size:14,className:l?`spinning`:void 0}),(0,B.jsx)(`span`,{children:l?`Reloading…`:`Reload`})]})}var on={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 sn(e){let t=e.split(`/`).pop()?.toLowerCase()??``;return t===`dockerfile`?`shell`:t===`readme`||t===`readme.md`?`markdown`:on[t.includes(`.`)?t.split(`.`).pop()??``:``]??`text`}function cn(e,t){return e?t===`markdown`?ln(e):t===`json`?J(e,/("(?:\\.|[^"\\])*"(?=\s*:)|"(?:\\.|[^"\\])*"|[-]?\b\d+(?:\.\d+)?\b|\btrue\b|\bfalse\b|\bnull\b|[{}[\]:,])/g):t===`css`?J(e,/(\/\*.*?\*\/|#[\da-fA-F]{3,8}\b|--[\w-]+|[.#]?[\w-]+(?=\s*:)|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\b\d+(?:\.\d+)?(?:px|rem|em|%|vh|vw)?\b|[{}():;,])/g):t===`html`?J(e,/(<!--.*?-->|<\/?[\w-]+|[\w:-]+(?==)|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[<>/=])/g):t===`shell`?J(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`?J(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):J(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 ln(e){return/^\s{0,3}#{1,6}\s/.test(e)?[{text:e,kind:`keyword`}]:/^\s*[-*+]\s/.test(e)?[{text:e,kind:`property`}]:J(e,/(`[^`]+`|\*\*[^*]+\*\*|\[[^\]]+\]\([^)]+\)|https?:\/\/\S+)/g)}function un(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 J(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:un(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 Y({language:e,text:t}){return(0,B.jsx)(B.Fragment,{children:cn(t,e).map((e,t)=>(0,B.jsx)(`span`,{className:`syntax-token ${e.kind}`,children:e.text},`${t}-${e.text}`))})}var dn=(0,z.lazy)(()=>i(()=>import(`./FilePagePreview-11ZNRtdT.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]))),X=(0,z.lazy)(()=>i(()=>import(`./WorkspacePdfPreview-9wypyV6H.js`),__vite__mapDeps([54,1,2,3,45,53])));function Z({path:e,contentBase64:t}){let n=L(e),r=(0,z.useMemo)(()=>{try{let n=atob(t.replace(/\s/g,``)),r=Uint8Array.from(n,e=>e.charCodeAt(0));return new Blob([r],{type:fn(e)})}catch{return null}},[t,e]),[i,a]=(0,z.useState)(null);(0,z.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,B.jsxs)(`div`,{className:`workspace-document-preview`,children:[(0,B.jsxs)(`div`,{className:`workspace-document-preview-card`,children:[(0,B.jsx)(R,{path:e}),(0,B.jsxs)(`div`,{className:`workspace-document-preview-actions`,children:[(0,B.jsx)(`span`,{children:/\.pdf$/i.test(e)?`PDF`:`Word`}),(0,B.jsx)(`a`,{href:o,download:n,"aria-label":`Download document`,title:`Download document`,children:(0,B.jsx)(N,{size:16,"aria-hidden":`true`})})]})]}),/\.docx$/i.test(e)?(0,B.jsx)(z.Suspense,{fallback:(0,B.jsx)(`div`,{role:`status`,children:`Loading document…`}),children:(0,B.jsx)(dn,{thumbnail:!1,file:{path:e,content:t,contentEncoding:`base64`,status:``,additions:0,deletions:0,patch:``}})}):(0,B.jsx)(z.Suspense,{fallback:(0,B.jsx)(`div`,{role:`status`,children:`Loading document…`}),children:(0,B.jsx)(X,{contentBase64:t})})]}):(0,B.jsx)(`div`,{className:`workspace-diff-code-empty`,role:`status`,children:`Loading document…`}):(0,B.jsx)(`div`,{className:`workspace-diff-code-empty`,children:`Document preview unavailable.`})}function fn(e){return/\.pdf$/i.test(e)?`application/pdf`:/\.docx$/i.test(e)?`application/vnd.openxmlformats-officedocument.wordprocessingml.document`:`application/msword`}var pn=`
3
3
 
4
- [file truncated]`,mn=(0,z.lazy)(()=>i(()=>import(`./WorkspaceMonacoEditor-m3bCIpZe.js`).then(e=>e.t),__vite__mapDeps([55,1,2,3,56]))),hn=(0,z.lazy)(()=>i(()=>import(`./WorkspacePresentationPreview-CjvTjhUO.js`),__vite__mapDeps([57,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,58,59,60]))),gn=6,_n=18,vn=22,yn=160,bn=12;function xn({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}){De(a,{prefix:`File preview`}),De(_,{prefix:`Save failed`});let x=o.contentEncoding===`base64`?o.content??``:n??o.content??``,ie=(0,z.useMemo)(()=>x.split(`
4
+ [file truncated]`,mn=(0,z.lazy)(()=>i(()=>import(`./WorkspaceMonacoEditor-BRPLaFZS.js`).then(e=>e.t),__vite__mapDeps([55,1,2,3,56]))),hn=(0,z.lazy)(()=>i(()=>import(`./WorkspacePresentationPreview-C-Cn-9pj.js`),__vite__mapDeps([57,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,58,59,60]))),gn=6,_n=18,vn=22,yn=160,bn=12;function xn({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}){De(a,{prefix:`File preview`}),De(_,{prefix:`Save failed`});let x=o.contentEncoding===`base64`?o.content??``:n??o.content??``,ie=(0,z.useMemo)(()=>x.split(`
5
5
  `).slice(0,800),[x]),ae=sn(o.path),oe=n!=null||o.content!=null,S=x.endsWith(pn),se=g&&oe&&je(o.path),C=A(o),ce=oe&&(o.contentEncoding===`base64`||Re(o.path))&&wn(x);return l?(0,B.jsxs)(`div`,{className:`workspace-file-preview`,children:[(0,B.jsxs)(`div`,{className:`workspace-diff-file-heading`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(R,{path:o.path,workspaceName:y,workspaceRootPath:b,onSelectPath:p}),(0,B.jsxs)(`span`,{className:`diff-addition`,children:[`+`,o.additions]}),(0,B.jsxs)(`span`,{className:`diff-deletion`,children:[`-`,o.deletions]})]}),c]}),(0,B.jsx)(`div`,{className:`workspace-file-image-stage`,children:(0,B.jsx)(`button`,{type:`button`,className:`workspace-file-image-button`,"aria-label":`Open image preview for ${o.path}`,onClick:f,children:(0,B.jsx)(`img`,{alt:o.path,decoding:`async`,src:l})})})]}):!d&&o.patch||!oe&&o.patch?ne?(0,B.jsx)(Cn,{collapsed:e,file:o,hideWhiteSpace:s,onSelectBreadcrumbPath:p,wordDiffs:re,wordWrap:v,headerActions:c,workspaceName:y,workspaceRootPath:b}):(0,B.jsx)(Sn,{collapsed:e,file:o,hideWhiteSpace:s,wordWrap:v,workspaceName:y,workspaceRootPath:b,onSelectBreadcrumbPath:p,headerActions:c}):(0,B.jsxs)(`div`,{className:`workspace-file-preview ${v?`wrap`:``} ${ce?`document-only`:``}`,children:[ce?null:(0,B.jsxs)(`div`,{className:`workspace-diff-file-heading`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(R,{path:o.path,workspaceName:y,workspaceRootPath:b,onSelectPath:p}),(0,B.jsxs)(`span`,{className:`diff-addition`,children:[`+`,o.additions]}),(0,B.jsxs)(`span`,{className:`diff-deletion`,children:[`-`,o.deletions]})]}),(0,B.jsxs)(`span`,{className:`workspace-file-heading-end`,children:[te?(0,B.jsx)(`span`,{className:`workspace-file-save-state`,children:`Saving`}):null,c]})]}),oe?se?(0,B.jsx)(`div`,{className:`workspace-markdown-preview`,children:(0,B.jsx)(ve,{content:x})}):C&&ce?(0,B.jsx)(z.Suspense,{fallback:(0,B.jsx)(`div`,{className:`workspace-diff-code-empty`,role:`status`,children:`Loading presentation…`}),children:(0,B.jsx)(hn,{path:o.path,contentBase64:x})}):ce?(0,B.jsx)(Z,{path:o.path,contentBase64:x}):r&&!S?(0,B.jsx)(z.Suspense,{fallback:(0,B.jsx)(`div`,{className:`workspace-diff-code-empty`,children:`Loading editor`}),children:(0,B.jsx)(mn,{diagnostics:t,filePath:o.path,onChange:e=>m?.(e),onLspAction:ee,onSave:()=>h?.(),ref:i,value:x,wordWrap:v})}):(0,B.jsx)(`div`,{className:`workspace-file-code`,children:ie.map((e,t)=>(0,B.jsxs)(`div`,{className:`workspace-file-code-row`,children:[(0,B.jsx)(`span`,{children:t+1}),(0,B.jsx)(`code`,{children:(0,B.jsx)(Y,{language:ae,text:e||` `})})]},`${t}-${e}`))}):(0,B.jsx)(`div`,{className:`workspace-diff-code-empty`,children:u?`Loading file content…`:`No file content available.`})]})}function Sn({collapsed:e=!1,file:t,hideWhiteSpace:n=!1,wordWrap:r,workspaceName:i,workspaceRootPath:a,onSelectBreadcrumbPath:o,headerActions:s}){let c=(0,z.useMemo)(()=>Dn(t.patch,n),[t.patch,n]),l=sn(t.path);return(0,B.jsxs)(`div`,{className:`workspace-diff-preview ${r?`wrap`:``}`,children:[(0,B.jsxs)(`div`,{className:`workspace-diff-file-heading`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(R,{path:t.path,workspaceName:i??null,workspaceRootPath:a,onSelectPath:o}),(0,B.jsxs)(`span`,{className:`diff-addition`,children:[`+`,t.additions]}),(0,B.jsxs)(`span`,{className:`diff-deletion`,children:[`-`,t.deletions]})]}),s]}),e?(0,B.jsx)(`div`,{className:`workspace-diff-code-empty`,children:`Diff collapsed`}):(0,B.jsx)(Tn,{ariaLabel:`${t.path} diff`,className:`workspace-diff-code`,emptyMessage:`No patch available.`,rows:c,renderRow:(e,t)=>e.kind===`spacer`?(0,B.jsx)(`div`,{className:`workspace-diff-spacer`,role:`row`,children:e.label},`${e.label}-${t}`):(0,B.jsxs)(`div`,{className:`workspace-diff-code-row ${e.kind}`,role:`row`,children:[(0,B.jsx)(`span`,{className:`workspace-diff-line-number`,role:`cell`,children:e.newLine||e.oldLine}),(0,B.jsx)(`code`,{role:`cell`,children:(0,B.jsx)(Y,{language:l,text:e.newContent||e.oldContent||` `})})]},`${e.oldLine}-${e.newLine}-${t}`),wordWrap:r})]})}function Cn({collapsed:e,file:t,hideWhiteSpace:n,wordDiffs:r,wordWrap:i,workspaceName:a,workspaceRootPath:o,onSelectBreadcrumbPath:s,headerActions:c}){let l=(0,z.useMemo)(()=>Dn(t.patch,n),[t.patch,n]),u=sn(t.path);return(0,B.jsxs)(`div`,{className:`workspace-diff-preview split ${i?`wrap`:``} ${r?`word-diffs`:``}`,children:[(0,B.jsxs)(`div`,{className:`workspace-diff-file-heading`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(R,{path:t.path,workspaceName:a,workspaceRootPath:o,onSelectPath:s}),(0,B.jsxs)(`span`,{className:`diff-addition`,children:[`+`,t.additions]}),(0,B.jsxs)(`span`,{className:`diff-deletion`,children:[`-`,t.deletions]})]}),(0,B.jsxs)(`span`,{className:`workspace-file-heading-end`,children:[c,(0,B.jsx)(be,{size:14})]})]}),e?(0,B.jsx)(`div`,{className:`workspace-diff-code-empty`,children:`Diff collapsed`}):(0,B.jsx)(Tn,{ariaLabel:`${t.path} split diff`,className:`workspace-split-code`,emptyMessage:`No patch available.`,rows:l,renderRow:(e,t)=>e.kind===`spacer`?(0,B.jsx)(`div`,{className:`workspace-diff-spacer split`,role:`row`,children:e.label},`${e.label}-${t}`):(0,B.jsxs)(`div`,{className:`workspace-split-row ${e.kind}`,role:`row`,children:[(0,B.jsx)(`span`,{className:`workspace-diff-line-number old`,role:`cell`,children:e.oldLine}),(0,B.jsx)(`code`,{className:`old`,role:`cell`,children:(0,B.jsx)(Y,{language:u,text:e.oldContent||` `})}),(0,B.jsx)(`span`,{className:`workspace-diff-line-number new`,role:`cell`,children:e.newLine}),(0,B.jsx)(`code`,{className:`new`,role:`cell`,children:(0,B.jsx)(Y,{language:u,text:e.newContent||` `})})]},`${e.oldLine}-${e.newLine}-${t}`),wordWrap:i})]})}function wn(e){return e.length>0&&/^[A-Za-z0-9+/=\s]+$/.test(e)}function Tn({ariaLabel:e,className:t,emptyMessage:n,rows:r,renderRow:i,wordWrap:a}){let o=!a&&r.length>yn,{endIndex:s,offsetTop:c,scrollRef:l,startIndex:u,totalHeight:d}=En(r.length,o);return r.length===0?(0,B.jsx)(`div`,{className:t,role:`table`,"aria-label":e,children:(0,B.jsx)(`div`,{className:`workspace-diff-code-empty`,children:n})}):o?(0,B.jsx)(`div`,{className:`${t} virtualized`,ref:l,role:`table`,"aria-label":e,"aria-rowcount":r.length,children:(0,B.jsx)(`div`,{className:`workspace-diff-virtual-spacer`,style:{height:d},children:(0,B.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,B.jsx)(`div`,{className:t,role:`table`,"aria-label":e,children:r.map(i)})}function En(e,t){let n=(0,z.useRef)(null),[r,i]=(0,z.useState)({height:968,scrollTop:0}),a=(0,z.useCallback)(()=>{let e=n.current;e&&i({height:e.clientHeight||968,scrollTop:e.scrollTop})},[]);if((0,z.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*vn};let o=Math.ceil(r.height/vn),s=Math.max(0,Math.floor(r.scrollTop/vn)-bn);return{endIndex:Math.min(e,s+o+24),offsetTop:s*vn,scrollRef:n,startIndex:s,totalHeight:e*vn}}function Dn(e,t){if(!e.trim())return[];let n=[],r=0,i=0,a=null,o=null,s=!1,c=[];function l(){n.push(...On(c)),c=[]}function u(){s&&=(l(),a=r,o=i,!1)}for(let d of e.split(`
6
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:kn(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 On(e){if(e.length<_n)return e;let t=e.length-12;return t<=0?e:[...e.slice(0,gn),{kind:`spacer`,label:kn(t)},...e.slice(-6)]}function kn(e){return`${e} unmodified ${e===1?`line`:`lines`}`}var An=`openpond.workspace.editorControlsVisible`;function jn(){try{return f.getItem(An)===`true`}catch{return!1}}function Mn(e){try{f.setItem(An,String(e))}catch{}}function Nn({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 Pn=t({WorkspaceDiffPanel:()=>zn}),Fn=3e3,In=2e3,Ln=[],Rn=[];function zn({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,B.jsx)(Gn,{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 Bn(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&&Vn(t)?t:e&&Vn(e)?e:t&&Vn(t)?t:e??t??n??qe(r)}function Vn(e){return!!(e.patch||e.content!=null)}function Hn({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 Un(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 Wn(e){let t=e.split(`/`).filter(Boolean);return t.map((e,n)=>t.slice(0,n+1).join(`/`))}function Gn({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:T,sidebarFileBookmarks:Se,sidebarFileSourceSessionId:Ce,onSetSidebarFileStatus:we}){let E=se??Ie(),[Te,Ee]=(0,z.useState)(!b||v?.tab===`files`||E.filesTabOpen),[D,O]=(0,z.useState)(E.overviewTabs),[Le,A]=(0,z.useState)(E.activeOverviewId),ze=(0,z.useRef)(Math.max(0,...E.overviewTabs)+1),[Be,j]=(0,z.useState)(E.tabOrder),[M,N]=(0,z.useState)(v?.tab??E.activeTab),[Ve,He]=(0,z.useState)(!1),[Ue,P]=(0,z.useState)(!1),[We,F]=(0,z.useState)(!1),[Ge,Ke]=(0,z.useState)(``),[I,Je]=(0,z.useState)(()=>[...E.openFilePaths]),[L,R]=(0,z.useState)(E.selectedPath),[Ye,Xe]=(0,z.useState)(!1),[Ze,et]=(0,z.useState)(!1),[tt,nt]=(0,z.useState)(!1),[rt,it]=(0,z.useState)(!0),[at,ot]=(0,z.useState)(jn);p(()=>ot(jn()));let[st,lt]=(0,z.useState)(!1),[ut,dt]=(0,z.useState)(!1),[ft,pt]=(0,z.useState)(!1),[mt,ht]=(0,z.useState)({}),gt=(0,z.useRef)(new rn),[_t,vt]=(0,z.useState)({}),[V,yt]=(0,z.useState)(()=>new Set),[bt,xt]=(0,z.useState)({}),[St,Ct]=(0,z.useState)({}),[wt,Tt]=(0,z.useState)(()=>new Set),[Et,Dt]=(0,z.useState)(null),[Ot,kt]=(0,z.useState)(!1),[H,At]=(0,z.useState)(null),[jt,Mt]=(0,z.useState)({}),[Nt,U]=(0,z.useState)({}),[Pt,It]=(0,z.useState)(null),[Lt,Rt]=(0,z.useState)(null),[zt,W]=(0,z.useState)(null),[Bt,Vt]=(0,z.useState)(null);De(u,{prefix:`Workspace`}),De(H,{prefix:`Sandbox files`});let[Ht,Ut]=(0,z.useState)(null),[Wt,Gt]=(0,z.useState)({}),[Kt,G]=(0,z.useState)(null),[Jt,Yt]=(0,z.useState)(null),[Xt,Qt]=(0,z.useState)(null),K=o??ee.editor,en=(0,z.useRef)(mt),q=(0,z.useRef)(Pe(E)),on=(0,z.useRef)(Pe(E)),sn=(0,z.useRef)(null),cn=(0,z.useRef)(C),ln=(0,z.useRef)(!1),un=(0,z.useRef)(null),J=(0,z.useRef)(0),Y=(0,z.useRef)(null),dn=(0,z.useRef)(null),X=xe?.sandboxId?.trim()||null,Z=!!xe,fn=!!T||Z&&!!X,pn=Z?`sandbox:${X??`pending`}`:`workspace:${e??`none`}`,mn=Z?!!X:!!(e||r&&h&&S(h.path)),hn=(0,z.useRef)(pn),gn=!!(w?.createRuntime||w?.goalRuntime||w?.subagentRuntime),_n=(0,z.useCallback)(async(e={})=>{if(Z){if(!r)Dt(null),At(`OpenPond App server is not connected.`);else if(!X)Dt(null),At(null);else{e.silent||kt(!0);try{let[e,t,n]=await Promise.allSettled([k.sandboxFiles(r,X,{recursive:!0,maxEntries:In}),k.sandboxGitStatus(r,X),k.sandboxGitDiff(r,X,{})]);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);Dt({appId:X,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()}),At(null)}catch(e){Dt(null),At(e instanceof Error?e.message:String(e))}finally{e.silent||kt(!1)}}}},[r,X,Z]),vn=(0,z.useMemo)(()=>ae(i,X),[i,X]),yn=!!(Et&&((Et.files?.length??0)>0||(Et.repoFiles?.length??0)>0)),bn=Z&&!yn&&!!vn,Sn=Z?yn?Et:vn??Et:a,Cn=Sn?.repoPath??null,wn=(0,z.useMemo)(()=>Un(i,X),[i,X]),Tn=Sn?.files??Ln,En=Sn?.files??Ln,Dn=(0,z.useMemo)(()=>new Map(En.map(e=>[e.path,e])),[En]),On=(0,z.useMemo)(()=>new Map(Tn.map(e=>[e.path,e])),[Tn]),kn=Sn?.repoFiles??(Tn.length>0?Tn.map(e=>e.path):Rn),An=(0,z.useMemo)(()=>Tn.filter(e=>!Oe(e,kn)),[kn,Tn]),Pn=(0,z.useMemo)(()=>Xt&&!kn.includes(Xt)?[Xt,...kn]:kn,[kn,Xt]),zn=(0,z.useMemo)(()=>I.map(e=>Dn.get(e)??mt[e]??On.get(e)??qe(e)),[Dn,On,mt,I]),Vn=(0,z.useMemo)(()=>{let e={};for(let t of I){if(Fe(t)||Re(t))continue;let n=Bn(Dn.get(t),mt[t],On.get(t),t);n.content!=null&&n.contentEncoding!==`base64`&&(e[t]=n.content)}return e},[Dn,On,mt,I]),Gn=(0,z.useMemo)(()=>{let e=new Set;for(let[t,n]of Object.entries(St))n.content!==n.savedContent&&e.add(t);return e},[St]),Kn=(0,z.useMemo)(()=>{let e=Ge.trim().toLowerCase(),t=Pn;return e?t.filter(t=>t.toLowerCase().includes(e)):t},[Pn,Ge]),qn=(0,z.useMemo)(()=>({activeTab:M,openFilePaths:I,selectedPath:L,filesTabOpen:Te,overviewTabs:D,activeOverviewId:Le,tabOrder:Be}),[M,I,L,Te,D,Le,Be]);(0,z.useEffect)(()=>{en.current=mt},[mt]),(0,z.useEffect)(()=>{un.current=Kt},[Kt]),(0,z.useEffect)(()=>{Ct(e=>{let t=!1,n={...e},r=new Set(I),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(Vn)){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,Vn,I]),(0,z.useEffect)(()=>{cn.current=C},[C]),(0,z.useEffect)(()=>{if(!se)return;let e=ke(se,Cn);V.size>0?q.current=e:Me(q.current,e)||(q.current=e,on.current=e,N(t=>v?.tab===`outputs`&&t===`outputs`?t:e.activeTab),Je(e.openFilePaths),R(e.selectedPath),Ee(!b||e.filesTabOpen),O(e.overviewTabs),A(e.activeOverviewId),j(e.tabOrder),ze.current=Math.max(0,...e.overviewTabs)+1)},[se,Cn,v?.tab,V]),(0,z.useEffect)(()=>{if(V.size>0||Me(on.current,qn))return;let e=Pe(qn);on.current=e,q.current=e,ge?.(e)},[qn,ge,V]),(0,z.useEffect)(()=>{g||Z||!r||!e||!l||a||u||ln.current||(ln.current=!0,Promise.resolve(cn.current({silent:!0})).catch(()=>{}).finally(()=>{ln.current=!1}))},[e,r,a,g,Z,u,l]),(0,z.useEffect)(()=>{if(hn.current!==pn){hn.current=pn,Y.current?.abort(Error(`lsp_diagnostics_source_changed`)),Y.current=null;let e=new Set([...V].filter(e=>S(e)&&_t[e]===null));Je(t=>t.filter(t=>e.has(t))),R(t=>t&&e.has(t)?t:null),ht(t=>Object.fromEntries(Object.entries(t).filter(([t])=>e.has(t)))),yt(e),vt(t=>Object.fromEntries(Object.entries(t).filter(([t])=>e.has(t)))),gt.current.retain(e),xt(t=>Object.fromEntries(Object.entries(t).filter(([t])=>e.has(t)))),Ct({}),Tt(new Set),Dt(null),At(null),kt(!1),Mt({}),U({}),It(null),Rt(t=>t&&e.has(t)?t:null),Vt(null),Ut(null),Gt({}),G(null),Yt(null),Qt(null)}return()=>{Y.current?.abort(Error(`lsp_diagnostics_unmounted`)),Y.current=null}},[pn]),(0,z.useEffect)(()=>{h&&sn.current!==h.id&&(h.file||mn)&&(sn.current=h.id,h.file?Zn(h.file,h.imageUrl,h.source,h):Xn(h.path,{source:h.source}))},[mn,h]),(0,z.useEffect)(()=>{if(!Z||(_n(),!r||!X))return;let e=!1;async function t(){if(!(e||ln.current)&&(typeof document>`u`||document.visibilityState!==`hidden`)){ln.current=!0;try{await _n({silent:!0})}finally{ln.current=!1}}}let n=window.setInterval(()=>{t()},Fn),i=()=>{t()};return window.addEventListener(`focus`,i),()=>{e=!0,window.clearInterval(n),window.removeEventListener(`focus`,i)}},[r,_n,X,Z]),(0,z.useEffect)(()=>{if(g||Z||!r||!e||!l)return;let t=!1;async function n(){if(!(t||ln.current)&&(typeof document>`u`||document.visibilityState!==`hidden`)){ln.current=!0;try{await cn.current({silent:!0})}catch{}finally{ln.current=!1}}}let i=window.setInterval(()=>{n()},Fn),a=()=>{n()};return window.addEventListener(`focus`,a),()=>{t=!0,window.clearInterval(i),window.removeEventListener(`focus`,a)}},[e,r,g,Z,l]),(0,z.useEffect)(()=>{if(Z||!r||!e||n===`local_project`){Qt(null);return}let t=!1;return k.workspaceTemplateConfig(r,e).then(e=>{t||Qt(e.exists?e.configPath??`openpond.config.json`:null)}).catch(()=>{t||Qt(null)}),()=>{t=!0}},[e,r,Z,n]),(0,z.useEffect)(()=>{!L||Pn.includes(L)||I.includes(L)||R(An[0]?.path??null)},[An,I,Pn,L]),(0,z.useEffect)(()=>{w?.active&&gn&&N(`goal`)},[w?.active,gn]),(0,z.useEffect)(()=>{if(v){if(v.tab===`files`&&mr(),v.tab===`outputs`){if(v.overview===`agents`)O(e=>e.includes(-2)?e:[...e,-2]),A(-2),j(e=>e.includes(`overview--2`)?e:[...e,`overview--2`]);else if(v.overview===`experiments`)O(e=>e.includes(-1)?e:[...e,-1]),A(-1),j(e=>e.includes(`overview--1`)?e:[...e,`overview--1`]);else if(v.overview===`new`){let e=D.find(e=>e>=0)??ze.current++;O(t=>t.includes(e)?t:[...t,e]),A(e),j(t=>t.includes(`overview-${e}`)?t:[...t,`overview-${e}`])}}N(v.tab)}},[v]),(0,z.useEffect)(()=>{!gn&&M===`goal`&&N(`files`)},[M,gn]),(0,z.useEffect)(()=>{!fn&&M===`summary`&&N(`files`)},[M,fn]);let Q=M===`file`||m&&M===`files`?L:null;(0,z.useEffect)(()=>{if(!r||!Q||V.has(Q))return;if(Fe(Q)){Vt(null),Rt(e=>e===Q?null:e);return}let t=Ht?.path===Q,n=$n(Q);if(g&&(n?.content!=null||n?.patch)||!t&&(n?.content!=null||n?.patch&&!tt)){Vt(null),Rt(e=>e===Q?null:e);return}let a=!1,o=en.current[Q];o?.content==null&&(tt||!o?.patch)&&Rt(Q),Vt(null);let s=e||S(Q);return(Z?X?de(r,X,Q,i):Promise.reject(Error(xe?.emptyMessage??`No sandbox filesystem is available.`)):s?k.workspaceFile(r,s,Q):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||Vt(e instanceof Error?e.message:String(e))}).finally(()=>{a||(Rt(e=>e===Q?null:e),Ut(e=>e&&e.id===Ht?.id&&e.path===Q?null:e))}),()=>{a=!0}},[M,e,r,Ht,tt,g,i,xe?.emptyMessage,X,Z,Q,V]);function Jn(e){let t=M===`outputs`||b&&M===`files`&&!Te?`overview-${Le}`:null;t&&O(e=>e.filter(e=>e!==Le)),j(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 Yn(){if(D.some(e=>e>=0))A(D.filter(e=>e>=0).at(-1));else{let e=ze.current++;O([e]),A(e),j(t=>[...t,`overview-${e}`])}N(`outputs`)}function Xn(t,n){W(null);let i=Z?X:e;if(y(t)&&!n?.source&&r&&i){ue(r,i,t,Z?`sandbox`:`local`).then(he).catch(e=>W(e instanceof Error?e.message:`Could not open HTML preview.`));return}let a=Ne(t,Cn);a&&(gt.current.close(a),vt(e=>{if(!Object.hasOwn(e,a))return e;let t={...e};return delete t[a],t}),Jn(m?`files`:a),m&&Ee(!0),yt(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}),xt(e=>{if(!(a in e))return e;let t={...e};return delete t[a],t}),Ut({id:Date.now(),path:a}),m||Je(e=>e.includes(a)?e:[...e,a]),R(a),N(m?`files`:`file`),!Z&&r&&e&&Fe(a)&&Yt(a),P(!1),F(!1),Ke(``))}function Zn(e,t,n=!1,i){if(y(e.path)&&e.content!=null&&!n&&r){_(r,e.path,e.content).then(he).catch(e=>W(e instanceof Error?e.message:`Could not open HTML preview.`));return}let a=S(e.path)?e.path:Ne(e.path,Cn);if(!a)return;let o=gt.current.receive(a,i);if(o===`ignore`)return;let s=o===`complete`;if(s&&!m&&!I.includes(a))return;s||(Jn(m?`files`:a),m&&Ee(!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}),yt(e=>{let t=new Set(e);return t.add(a),t}),xt(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?(L===a&&Vt(i?.error??null),Rt(e=>e===a?null:e)):(Ut(null),Vt(i?.error??null),Rt(i?.loading?a:null),m||Je(e=>e.includes(a)?e:[...e,a]),R(a),N(m?`files`:`file`),P(!1),F(!1),Ke(``))}let Qn=(0,z.useCallback)(()=>{ot(e=>{let t=!e;return Mn(t),t})},[]),$n=e=>Bn(Dn.get(e),mt[e],On.get(e),e),er=(0,z.useCallback)((e,t)=>{Ct(n=>{let r=n[e],i=r?.savedContent??Vn[e]??$n(e).content??``;return{...n,[e]:{content:t,savedContent:i,savedAt:r?.savedAt}}}),Gt(t=>{if(!(e in t))return t;let n={...t};return delete n[e],n})},[Dn,On,mt,Vn]),tr=(0,z.useCallback)(async(t,n={})=>{if(Z||!r||!e||Fe(t))return;let i=$n(t),a=n.content??St[t]?.content??i.content??void 0;if(a?.endsWith(`
7
7
 
@@ -1,4 +1,4 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-CCaTs7xt.js";import{S as r,a as i,d as a,g as o,m as s,o as c,p as l,r as u,v as d}from"./schemas-Brv9Vmnk.js";import{t as f}from"./icons-B4B5eUyR.js";import{t as p}from"./chevron-down-CqxKXYPf.js";import{t as m}from"./external-link-BSn21e-y.js";import{t as h}from"./git-commit-horizontal-Buk_hy6T.js";import{t as g}from"./info-DjMTH4sJ.js";import{t as _}from"./monitor-BWaitd6I.js";import{t as v}from"./play-DieChKfF.js";import{t as y}from"./refresh-cw-DOVpqCfJ.js";import{t as b}from"./square-D0YnIVh6.js";import{t as x}from"./square-terminal-DTOIZy6_.js";import{t as S}from"./upload-C2MnlWjj.js";import{t as C}from"./x-BvVvVB-j.js";import{r as w}from"./AppToastContext-BQ4iRFif.js";import{r as T}from"./organization-types-PP-yuR2J.js";import{n as E}from"./ui-theme.generated-D-mc26qt.js";import{Jt as D,Tn as O,Xt as ee,a as k,cn as A,dn as te,gn as ne,gt as j,hn as M,o as re,on as N,sn as P,tn as ie,wn as ae,yn as oe}from"./App-QM6Y2Eod.js";var F={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},se;se||={};function ce(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var I={},L={},R={},z;function B(){if(z)return R;z=1;function e(e){return e==null}function t(e){return typeof e==`object`&&!!e}function n(t){return Array.isArray(t)?t:e(t)?[]:[t]}function r(e,t){if(t){let n=Object.keys(t);for(let r=0,i=n.length;r<i;r+=1){let i=n[r];e[i]=t[i]}}return e}function i(e,t){let n=``;for(let r=0;r<t;r+=1)n+=e;return n}function a(e){return e===0&&1/e==-1/0}return R.isNothing=e,R.isObject=t,R.toArray=n,R.repeat=i,R.isNegativeZero=a,R.extend=r,R}var le,V;function H(){if(V)return le;V=1;function e(e,t){let n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{g as t,m as n}from"./index-CDtTBysF.js";import{S as r,a as i,d as a,g as o,m as s,o as c,p as l,r as u,v as d}from"./schemas-Brv9Vmnk.js";import{t as f}from"./icons-CYvTltSH.js";import{t as p}from"./chevron-down-CkifKd_O.js";import{t as m}from"./external-link-Cv7TDVPT.js";import{t as h}from"./git-commit-horizontal-DMh_-WxU.js";import{t as g}from"./info-EjyMkVzV.js";import{t as _}from"./monitor-BroZpIvk.js";import{t as v}from"./play-BrvX67t1.js";import{t as y}from"./refresh-cw-Cx_7Zlbl.js";import{t as b}from"./square-Di5JBnVr.js";import{t as x}from"./square-terminal-CBlQtWQw.js";import{t as S}from"./upload-Bzt1ooBz.js";import{t as C}from"./x-EG07vYCF.js";import{r as w}from"./AppToastContext-D7z0w1PS.js";import{r as T}from"./organization-types-PP-yuR2J.js";import{n as E}from"./ui-theme.generated-D-mc26qt.js";import{Jt as D,Tn as O,Xt as ee,a as k,cn as A,dn as te,gn as ne,gt as j,hn as M,o as re,on as N,sn as P,tn as ie,wn as ae,yn as oe}from"./App-CV1p0_Zy.js";var F={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},se;se||={};function ce(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var I={},L={},R={},z;function B(){if(z)return R;z=1;function e(e){return e==null}function t(e){return typeof e==`object`&&!!e}function n(t){return Array.isArray(t)?t:e(t)?[]:[t]}function r(e,t){if(t){let n=Object.keys(t);for(let r=0,i=n.length;r<i;r+=1){let i=n[r];e[i]=t[i]}}return e}function i(e,t){let n=``;for(let r=0;r<t;r+=1)n+=e;return n}function a(e){return e===0&&1/e==-1/0}return R.isNothing=e,R.isObject=t,R.toArray=n,R.repeat=i,R.isNegativeZero=a,R.extend=r,R}var le,V;function H(){if(V)return le;V=1;function e(e,t){let n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
2
2
 
3
3
  `+e.mark.snippet),r+` `+n):r}function t(t,n){Error.call(this),this.name=`YAMLException`,this.reason=t,this.mark=n,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=function(t){return this.name+`: `+e(this,t)},le=t,le}var U,ue;function de(){if(ue)return U;ue=1;let e=B();function t(e,t,n,r,i){let a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}function n(t,n){return e.repeat(` `,n-t.length)+t}function r(r,i){if(i=Object.create(i||null),!r.buffer)return null;i.maxLength||(i.maxLength=79),typeof i.indent!=`number`&&(i.indent=1),typeof i.linesBefore!=`number`&&(i.linesBefore=3),typeof i.linesAfter!=`number`&&(i.linesAfter=2);let a=/\r?\n|\r|\0/g,o=[0],s=[],c,l=-1;for(;c=a.exec(r.buffer);)s.push(c.index),o.push(c.index+c[0].length),r.position<=c.index&&l<0&&(l=o.length-2);l<0&&(l=o.length-1);let u=``,d=Math.min(r.line+i.linesAfter,s.length).toString().length,f=i.maxLength-(i.indent+d+3);for(let a=1;a<=i.linesBefore&&!(l-a<0);a++){let c=t(r.buffer,o[l-a],s[l-a],r.position-(o[l]-o[l-a]),f);u=e.repeat(` `,i.indent)+n((r.line-a+1).toString(),d)+` | `+c.str+`
4
4
  `+u}let p=t(r.buffer,o[l],s[l],r.position,f);u+=e.repeat(` `,i.indent)+n((r.line+1).toString(),d)+` | `+p.str+`
@@ -1 +1 @@
1
- import{m as e}from"./index-CCaTs7xt.js";import"./icons-B4B5eUyR.js";import{t}from"./chevron-right-ClP6ukIq.js";import{K as n,z as r}from"./App-QM6Y2Eod.js";var i=e();function a(e){return(e.replace(/\\/g,`/`).split(`/`).pop()||`File`).replace(/^\d{3}-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}-/i,``)}function o({path:e,workspaceName:o=null,workspaceRootPath:c,onSelectPath:l}){let u=n(e,c),d=r(u),f=d?s(u):o?.trim()||`Workspace`,p=(d&&f!==`/`&&u.startsWith(`${f}/`)?u.slice(f.length+1):u).split(`/`).filter(Boolean),m=!(!l||d);return(0,i.jsxs)(`details`,{className:`workspace-file-location`,children:[(0,i.jsx)(`summary`,{title:e,"aria-label":`File path: ${a(e)}`,children:a(e)}),(0,i.jsxs)(`div`,{className:`workspace-file-path-popover`,children:[(0,i.jsxs)(`span`,{className:`workspace-file-breadcrumbs`,children:[l&&!d?(0,i.jsx)(`button`,{type:`button`,onClick:()=>l(null),children:f}):(0,i.jsx)(`span`,{children:f}),p.map((e,n)=>{let r=n===p.length-1,a=p.slice(0,n+1).join(`/`);return(0,i.jsxs)(`span`,{className:`workspace-file-breadcrumb-segment`,children:[(0,i.jsx)(t,{size:13}),l&&m&&!r?(0,i.jsx)(`button`,{type:`button`,onClick:()=>l(a),children:e}):(0,i.jsx)(`span`,{children:e})]},`${n}-${e}`)})]}),(0,i.jsx)(`code`,{children:e})]})]},e)}function s(e){let t=/^[A-Za-z]:\//.exec(e);return t?t[0].slice(0,-1):`/`}export{a as n,o as t};
1
+ import{m as e}from"./index-CDtTBysF.js";import"./icons-CYvTltSH.js";import{t}from"./chevron-right-LsMXJ5SB.js";import{K as n,z as r}from"./App-CV1p0_Zy.js";var i=e();function a(e){return(e.replace(/\\/g,`/`).split(`/`).pop()||`File`).replace(/^\d{3}-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}-/i,``)}function o({path:e,workspaceName:o=null,workspaceRootPath:c,onSelectPath:l}){let u=n(e,c),d=r(u),f=d?s(u):o?.trim()||`Workspace`,p=(d&&f!==`/`&&u.startsWith(`${f}/`)?u.slice(f.length+1):u).split(`/`).filter(Boolean),m=!(!l||d);return(0,i.jsxs)(`details`,{className:`workspace-file-location`,children:[(0,i.jsx)(`summary`,{title:e,"aria-label":`File path: ${a(e)}`,children:a(e)}),(0,i.jsxs)(`div`,{className:`workspace-file-path-popover`,children:[(0,i.jsxs)(`span`,{className:`workspace-file-breadcrumbs`,children:[l&&!d?(0,i.jsx)(`button`,{type:`button`,onClick:()=>l(null),children:f}):(0,i.jsx)(`span`,{children:f}),p.map((e,n)=>{let r=n===p.length-1,a=p.slice(0,n+1).join(`/`);return(0,i.jsxs)(`span`,{className:`workspace-file-breadcrumb-segment`,children:[(0,i.jsx)(t,{size:13}),l&&m&&!r?(0,i.jsx)(`button`,{type:`button`,onClick:()=>l(a),children:e}):(0,i.jsx)(`span`,{children:e})]},`${n}-${e}`)})]}),(0,i.jsx)(`code`,{children:e})]})]},e)}function s(e){let t=/^[A-Za-z]:\//.exec(e);return t?t[0].slice(0,-1):`/`}export{a as n,o as t};
@@ -1 +1 @@
1
- import{m as e}from"./index-CCaTs7xt.js";import"./icons-B4B5eUyR.js";import{t}from"./cloud-upload-CWamjPts.js";import{t as n}from"./git-commit-horizontal-Buk_hy6T.js";import{t as r}from"./upload-C2MnlWjj.js";import{t as i}from"./x-BvVvVB-j.js";import{on as a,sn as o}from"./App-QM6Y2Eod.js";var s=e();function c({open:e,branch:i,filesChanged:c,additions:l,deletions:f,message:p,includeUnstaged:m,nextStep:h,draft:g,busy:_,canPush:v,canPublish:y,onMessageChange:b,onIncludeUnstagedChange:x,onNextStepChange:S,onDraftChange:C,onClose:w,onSubmit:T}){return e?(0,s.jsx)(`div`,{className:`git-dialog-backdrop`,role:`presentation`,children:(0,s.jsxs)(`form`,{className:`git-dialog commit-dialog`,"aria-label":`Commit changes`,onSubmit:e=>{e.preventDefault(),T()},children:[(0,s.jsx)(d,{disabled:_,onClose:w}),(0,s.jsx)(`div`,{className:`git-dialog-icon`,children:(0,s.jsx)(n,{size:18})}),(0,s.jsx)(`h2`,{children:`Commit your changes`}),(0,s.jsxs)(`div`,{className:`git-dialog-row`,children:[(0,s.jsx)(`span`,{children:`Branch`}),(0,s.jsxs)(`strong`,{children:[(0,s.jsx)(o,{size:14}),i??`No branch`]})]}),(0,s.jsxs)(`div`,{className:`git-dialog-row`,children:[(0,s.jsx)(`span`,{children:`Changes`}),(0,s.jsxs)(`strong`,{children:[c,` `,c===1?`file`:`files`,(0,s.jsxs)(`span`,{className:`git-dialog-additions`,children:[`+`,l]}),(0,s.jsxs)(`span`,{className:`git-dialog-deletions`,children:[`-`,f]})]})]}),(0,s.jsxs)(`label`,{className:`git-dialog-toggle`,children:[(0,s.jsx)(`input`,{checked:m,disabled:_,type:`checkbox`,onChange:e=>x(e.target.checked)}),(0,s.jsx)(`span`,{}),`Include unstaged`]}),(0,s.jsxs)(`label`,{className:`git-dialog-field`,children:[(0,s.jsxs)(`span`,{children:[`Commit message`,(0,s.jsx)(`small`,{children:`Leave blank to use an autogenerated message`})]}),(0,s.jsx)(`textarea`,{value:p,disabled:_,placeholder:`Update workspace`,onChange:e=>b(e.target.value)})]}),(0,s.jsxs)(`fieldset`,{className:`git-dialog-next`,children:[(0,s.jsx)(`legend`,{children:`Next steps`}),(0,s.jsx)(u,{active:h===`commit`,icon:(0,s.jsx)(n,{size:14}),label:`Commit`,disabled:_,onSelect:()=>S(`commit`)}),(0,s.jsx)(u,{active:h===`commit_push`,icon:(0,s.jsx)(r,{size:14}),label:`Commit & push`,disabled:_||!v,onSelect:()=>S(`commit_push`)}),y&&(0,s.jsx)(u,{active:h===`commit_publish`,icon:(0,s.jsx)(t,{size:14}),label:`Commit & publish`,disabled:_,onSelect:()=>S(`commit_publish`)}),(0,s.jsx)(u,{active:h===`commit_pr`,icon:(0,s.jsx)(a,{size:14}),label:`Commit & create PR`,disabled:!0,onSelect:()=>S(`commit_pr`)})]}),(0,s.jsxs)(`div`,{className:`git-dialog-footer`,children:[(0,s.jsxs)(`label`,{className:`git-dialog-toggle draft-toggle`,children:[(0,s.jsx)(`input`,{checked:g,disabled:_||h!==`commit_pr`,type:`checkbox`,onChange:e=>C(e.target.checked)}),(0,s.jsx)(`span`,{}),`Draft`]}),(0,s.jsx)(`button`,{className:`git-dialog-primary`,disabled:_||c===0,type:`submit`,children:`Continue`})]})]})}):null}function l({open:e,branchName:t,busy:n,onBranchNameChange:r,onSetPrefix:i,onClose:a,onSubmit:c}){return e?(0,s.jsx)(`div`,{className:`git-dialog-backdrop`,role:`presentation`,children:(0,s.jsxs)(`form`,{className:`git-dialog branch-dialog`,"aria-label":`Create branch`,onSubmit:e=>{e.preventDefault(),c()},children:[(0,s.jsx)(d,{disabled:n,onClose:a}),(0,s.jsx)(`div`,{className:`git-dialog-icon`,children:(0,s.jsx)(o,{size:18})}),(0,s.jsx)(`h2`,{children:`Work here`}),(0,s.jsx)(`p`,{children:`Create a branch to commit changes, push, and create a PR from this worktree.`}),(0,s.jsxs)(`label`,{className:`git-dialog-field`,children:[(0,s.jsxs)(`span`,{children:[`Branch name`,(0,s.jsx)(`button`,{className:`git-dialog-inline-action`,disabled:n,type:`button`,onClick:i,children:`Set prefix`})]}),(0,s.jsx)(`input`,{autoFocus:!0,disabled:n,value:t,onChange:e=>r(e.target.value)})]}),(0,s.jsx)(`button`,{className:`git-dialog-primary full`,disabled:n||!t.trim(),type:`submit`,children:`Create`})]})}):null}function u({active:e,icon:t,label:n,disabled:r,onSelect:i}){return(0,s.jsxs)(`button`,{"aria-pressed":e,className:e?`active`:``,disabled:r,type:`button`,onClick:i,children:[t,(0,s.jsx)(`span`,{children:n}),e&&(0,s.jsx)(`span`,{className:`git-dialog-check`,children:`✓`})]})}function d({disabled:e,onClose:t}){return(0,s.jsx)(`button`,{className:`git-dialog-close`,disabled:e,type:`button`,onClick:t,children:(0,s.jsx)(i,{size:16})})}export{l as BranchDialog,c as CommitDialog};
1
+ import{m as e}from"./index-CDtTBysF.js";import"./icons-CYvTltSH.js";import{t}from"./cloud-upload-B5LqiNCG.js";import{t as n}from"./git-commit-horizontal-DMh_-WxU.js";import{t as r}from"./upload-Bzt1ooBz.js";import{t as i}from"./x-EG07vYCF.js";import{on as a,sn as o}from"./App-CV1p0_Zy.js";var s=e();function c({open:e,branch:i,filesChanged:c,additions:l,deletions:f,message:p,includeUnstaged:m,nextStep:h,draft:g,busy:_,canPush:v,canPublish:y,onMessageChange:b,onIncludeUnstagedChange:x,onNextStepChange:S,onDraftChange:C,onClose:w,onSubmit:T}){return e?(0,s.jsx)(`div`,{className:`git-dialog-backdrop`,role:`presentation`,children:(0,s.jsxs)(`form`,{className:`git-dialog commit-dialog`,"aria-label":`Commit changes`,onSubmit:e=>{e.preventDefault(),T()},children:[(0,s.jsx)(d,{disabled:_,onClose:w}),(0,s.jsx)(`div`,{className:`git-dialog-icon`,children:(0,s.jsx)(n,{size:18})}),(0,s.jsx)(`h2`,{children:`Commit your changes`}),(0,s.jsxs)(`div`,{className:`git-dialog-row`,children:[(0,s.jsx)(`span`,{children:`Branch`}),(0,s.jsxs)(`strong`,{children:[(0,s.jsx)(o,{size:14}),i??`No branch`]})]}),(0,s.jsxs)(`div`,{className:`git-dialog-row`,children:[(0,s.jsx)(`span`,{children:`Changes`}),(0,s.jsxs)(`strong`,{children:[c,` `,c===1?`file`:`files`,(0,s.jsxs)(`span`,{className:`git-dialog-additions`,children:[`+`,l]}),(0,s.jsxs)(`span`,{className:`git-dialog-deletions`,children:[`-`,f]})]})]}),(0,s.jsxs)(`label`,{className:`git-dialog-toggle`,children:[(0,s.jsx)(`input`,{checked:m,disabled:_,type:`checkbox`,onChange:e=>x(e.target.checked)}),(0,s.jsx)(`span`,{}),`Include unstaged`]}),(0,s.jsxs)(`label`,{className:`git-dialog-field`,children:[(0,s.jsxs)(`span`,{children:[`Commit message`,(0,s.jsx)(`small`,{children:`Leave blank to use an autogenerated message`})]}),(0,s.jsx)(`textarea`,{value:p,disabled:_,placeholder:`Update workspace`,onChange:e=>b(e.target.value)})]}),(0,s.jsxs)(`fieldset`,{className:`git-dialog-next`,children:[(0,s.jsx)(`legend`,{children:`Next steps`}),(0,s.jsx)(u,{active:h===`commit`,icon:(0,s.jsx)(n,{size:14}),label:`Commit`,disabled:_,onSelect:()=>S(`commit`)}),(0,s.jsx)(u,{active:h===`commit_push`,icon:(0,s.jsx)(r,{size:14}),label:`Commit & push`,disabled:_||!v,onSelect:()=>S(`commit_push`)}),y&&(0,s.jsx)(u,{active:h===`commit_publish`,icon:(0,s.jsx)(t,{size:14}),label:`Commit & publish`,disabled:_,onSelect:()=>S(`commit_publish`)}),(0,s.jsx)(u,{active:h===`commit_pr`,icon:(0,s.jsx)(a,{size:14}),label:`Commit & create PR`,disabled:!0,onSelect:()=>S(`commit_pr`)})]}),(0,s.jsxs)(`div`,{className:`git-dialog-footer`,children:[(0,s.jsxs)(`label`,{className:`git-dialog-toggle draft-toggle`,children:[(0,s.jsx)(`input`,{checked:g,disabled:_||h!==`commit_pr`,type:`checkbox`,onChange:e=>C(e.target.checked)}),(0,s.jsx)(`span`,{}),`Draft`]}),(0,s.jsx)(`button`,{className:`git-dialog-primary`,disabled:_||c===0,type:`submit`,children:`Continue`})]})]})}):null}function l({open:e,branchName:t,busy:n,onBranchNameChange:r,onSetPrefix:i,onClose:a,onSubmit:c}){return e?(0,s.jsx)(`div`,{className:`git-dialog-backdrop`,role:`presentation`,children:(0,s.jsxs)(`form`,{className:`git-dialog branch-dialog`,"aria-label":`Create branch`,onSubmit:e=>{e.preventDefault(),c()},children:[(0,s.jsx)(d,{disabled:n,onClose:a}),(0,s.jsx)(`div`,{className:`git-dialog-icon`,children:(0,s.jsx)(o,{size:18})}),(0,s.jsx)(`h2`,{children:`Work here`}),(0,s.jsx)(`p`,{children:`Create a branch to commit changes, push, and create a PR from this worktree.`}),(0,s.jsxs)(`label`,{className:`git-dialog-field`,children:[(0,s.jsxs)(`span`,{children:[`Branch name`,(0,s.jsx)(`button`,{className:`git-dialog-inline-action`,disabled:n,type:`button`,onClick:i,children:`Set prefix`})]}),(0,s.jsx)(`input`,{autoFocus:!0,disabled:n,value:t,onChange:e=>r(e.target.value)})]}),(0,s.jsx)(`button`,{className:`git-dialog-primary full`,disabled:n||!t.trim(),type:`submit`,children:`Create`})]})}):null}function u({active:e,icon:t,label:n,disabled:r,onSelect:i}){return(0,s.jsxs)(`button`,{"aria-pressed":e,className:e?`active`:``,disabled:r,type:`button`,onClick:i,children:[t,(0,s.jsx)(`span`,{children:n}),e&&(0,s.jsx)(`span`,{className:`git-dialog-check`,children:`✓`})]})}function d({disabled:e,onClose:t}){return(0,s.jsx)(`button`,{className:`git-dialog-close`,disabled:e,type:`button`,onClick:t,children:(0,s.jsx)(i,{size:16})})}export{l as BranchDialog,c as CommitDialog};