@rho-workspace/rho 0.5.6 → 0.5.7

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 (211) hide show
  1. package/dist/agent-connect.d.ts +36 -2
  2. package/dist/agent-connect.js +64 -11
  3. package/dist/answer-board.js +3 -3
  4. package/dist/bridge.js +6 -1
  5. package/dist/browser-access.d.ts +1 -0
  6. package/dist/browser-access.js +5 -3
  7. package/dist/capabilities.d.ts +21 -5
  8. package/dist/capabilities.js +6 -4
  9. package/dist/cli.js +76 -11
  10. package/dist/composition.d.ts +1 -1
  11. package/dist/composition.js +13 -3
  12. package/dist/connect-cli.d.ts +50 -0
  13. package/dist/connect-cli.js +128 -0
  14. package/dist/contract.generated.d.ts +1191 -278
  15. package/dist/contract.generated.js +1 -1
  16. package/dist/contracts/owners.generated.js +845 -47
  17. package/dist/conversation-presentation.d.ts +9 -2
  18. package/dist/conversation-presentation.js +3 -1
  19. package/dist/conversations.d.ts +154 -8
  20. package/dist/conversations.js +147 -24
  21. package/dist/discovery.js +2 -2
  22. package/dist/extension-contract.d.ts +19 -0
  23. package/dist/extension-contract.js +15 -6
  24. package/dist/extension-markets.d.ts +74 -0
  25. package/dist/extension-markets.js +166 -0
  26. package/dist/extensions.d.ts +29 -1
  27. package/dist/extensions.js +13 -4
  28. package/dist/external-work.d.ts +22 -0
  29. package/dist/external-work.js +91 -0
  30. package/dist/plugin-cli.js +75 -3
  31. package/dist/plugin-inventory.d.ts +56 -0
  32. package/dist/plugin-inventory.js +41 -0
  33. package/dist/plugin-inventory.json +1581 -102
  34. package/dist/plugin-presentation.d.ts +105 -2
  35. package/dist/plugin-presentation.js +59 -5
  36. package/dist/plugins.d.ts +14 -3
  37. package/dist/plugins.js +12 -6
  38. package/dist/project-notes.js +1 -1
  39. package/dist/protocol.d.ts +6 -0
  40. package/dist/protocol.js +30 -12
  41. package/dist/replay.js +4 -0
  42. package/dist/response-contracts.js +26 -11
  43. package/dist/running.d.ts +10 -0
  44. package/dist/running.js +45 -0
  45. package/dist/server.d.ts +2 -0
  46. package/dist/server.js +71 -8
  47. package/dist/state.d.ts +8 -0
  48. package/dist/state.js +8 -0
  49. package/dist/studio-layout.js +3 -3
  50. package/dist/task-frame.d.ts +1 -1
  51. package/dist/timeline-events.d.ts +1 -0
  52. package/dist/timeline-events.js +8 -1
  53. package/dist/ui-context.d.ts +73 -0
  54. package/dist/ui-context.js +98 -0
  55. package/dist/ui-contract.d.ts +23 -0
  56. package/dist/web/.vite/manifest.json +133 -74
  57. package/dist/web/assets/answer-board-CeYS8k8y.js +1 -0
  58. package/dist/web/assets/choices-D8vGwsl2.js +1 -0
  59. package/dist/web/assets/{console-Trqc0swD.js → console-Dyuo1q4N.js} +4 -4
  60. package/dist/web/assets/{dist-pF902jHA.js → dist-CSiCyBml.js} +1 -1
  61. package/dist/web/assets/{dist-DpIHRk3B.js → dist-D9FLb9Hm.js} +1 -1
  62. package/dist/web/assets/{dist-eMx6b8N1.js → dist-FXbTBwML.js} +1 -1
  63. package/dist/web/assets/{dist-DZmszrjG.js → dist-l3DUhbw5.js} +1 -1
  64. package/dist/web/assets/{explore-in-BCHqjJ7B.js → explore-in-BfSFGRh2.js} +1 -1
  65. package/dist/web/assets/graph-BU2_o5uA.js +2 -0
  66. package/dist/web/assets/index-C16mXVvk.css +1 -0
  67. package/dist/web/assets/index-CWg9XYXx.js +952 -0
  68. package/dist/web/assets/markdown.reader-Ct2-e2Zt.png +0 -0
  69. package/dist/web/assets/{notes-meaning-DcVGUBBY.js → notes-meaning-T2m5zQfv.js} +1 -1
  70. package/dist/web/assets/overview-PzfLJCo-.js +6 -0
  71. package/dist/web/assets/preview-BguEdsza.js +1 -0
  72. package/dist/web/assets/previews-pWNik-2g.js +3 -0
  73. package/dist/web/assets/{review-DYP0aCXb.js → review-Dy_85lcH.js} +1 -1
  74. package/dist/web/assets/rho.editor-CCJeyHma.png +0 -0
  75. package/dist/web/assets/rho.flow-WkMj6fRS.png +0 -0
  76. package/dist/web/assets/rho.media-Cc6amodO.png +0 -0
  77. package/dist/web/assets/rho.notebook-6vsZKGDq.png +0 -0
  78. package/dist/web/assets/rho.object-BGoeXjte.png +0 -0
  79. package/dist/web/assets/rho.plots-yIiISCkb.png +0 -0
  80. package/dist/web/assets/rho.scatter-DwHxesCs.png +0 -0
  81. package/dist/web/assets/rho.servers-DKf_mnNq.png +0 -0
  82. package/dist/web/assets/rho.table-DWOGaWDa.png +0 -0
  83. package/dist/web/assets/rho.variables-CKcWczhQ.png +0 -0
  84. package/dist/web/assets/{skills-1ec0Z-jx.js → skills-Dyz7mBlc.js} +1 -1
  85. package/dist/web/assets/{skills-work-DNexV4OJ.js → skills-work-BEGqlCkx.js} +1 -1
  86. package/dist/web/assets/studio-process-D-ykbC4D.js +2 -0
  87. package/dist/web/assets/timeline-events-DKTho9fU.js +1 -0
  88. package/dist/web/assets/work-turns-DSabCogR.js +1 -0
  89. package/dist/web/assets/{workspace-COmCbGV3.js → workspace-DfjBL--r.js} +2 -2
  90. package/dist/web/composition.json +138 -83
  91. package/dist/web/index.html +3 -3
  92. package/dist/web/renderer.json +1 -1
  93. package/dist/web-assets.js +2 -2
  94. package/dist/work-graph.d.ts +11 -1
  95. package/dist/work-graph.js +16 -5
  96. package/dist/workspace.d.ts +2 -2
  97. package/dist/workspace.js +8 -7
  98. package/docs/FRONTEND.md +53 -11
  99. package/docs/HEADLESS.md +104 -11
  100. package/docs/THIRD-PARTY-PLUGINS.md +75 -3
  101. package/node_modules/@rho-workspace/plugin-agent/README.md +5 -0
  102. package/node_modules/@rho-workspace/plugin-agent/dist/acp-command.d.ts +31 -0
  103. package/node_modules/@rho-workspace/plugin-agent/dist/acp-command.js +45 -10
  104. package/node_modules/@rho-workspace/plugin-agent/dist/acp-conversation.js +19 -3
  105. package/node_modules/@rho-workspace/plugin-agent/dist/external-session-contract.js +3 -2
  106. package/node_modules/@rho-workspace/plugin-agent/dist/external-session.d.ts +1 -1
  107. package/node_modules/@rho-workspace/plugin-agent/dist/index.d.ts +8 -0
  108. package/node_modules/@rho-workspace/plugin-agent/dist/index.js +3 -2
  109. package/node_modules/@rho-workspace/plugin-agent/dist/mcp-entry.d.ts +13 -0
  110. package/node_modules/@rho-workspace/plugin-agent/dist/mcp-entry.js +13 -0
  111. package/node_modules/@rho-workspace/plugin-agent/dist/mcp.js +16 -8
  112. package/node_modules/@rho-workspace/plugin-agent/dist/native-sessions.d.ts +1 -1
  113. package/node_modules/@rho-workspace/plugin-agent/package.json +1 -1
  114. package/node_modules/@rho-workspace/plugin-figures/LICENSE +661 -0
  115. package/node_modules/@rho-workspace/plugin-figures/README.md +191 -0
  116. package/node_modules/@rho-workspace/plugin-figures/dist/index.d.ts +236 -0
  117. package/node_modules/@rho-workspace/plugin-figures/dist/index.js +165 -0
  118. package/node_modules/@rho-workspace/plugin-figures/dist/operations.d.ts +44 -0
  119. package/node_modules/@rho-workspace/plugin-figures/dist/operations.js +39 -0
  120. package/node_modules/@rho-workspace/plugin-figures/dist/presentation.d.ts +19 -0
  121. package/node_modules/@rho-workspace/plugin-figures/dist/presentation.js +26 -0
  122. package/node_modules/@rho-workspace/plugin-figures/dist/record.d.ts +188 -0
  123. package/node_modules/@rho-workspace/plugin-figures/dist/record.js +143 -0
  124. package/node_modules/@rho-workspace/plugin-figures/dist/ui-styles.d.ts +1 -0
  125. package/node_modules/@rho-workspace/plugin-figures/dist/ui-styles.js +68 -0
  126. package/node_modules/@rho-workspace/plugin-figures/dist/ui.d.ts +56 -0
  127. package/node_modules/@rho-workspace/plugin-figures/dist/ui.js +363 -0
  128. package/node_modules/@rho-workspace/plugin-figures/package.json +41 -0
  129. package/node_modules/@rho-workspace/plugin-figures/py/figures.py +856 -0
  130. package/node_modules/@rho-workspace/plugin-figures/r/figures.R +775 -0
  131. package/node_modules/@rho-workspace/plugin-kernel/README.md +27 -3
  132. package/node_modules/@rho-workspace/plugin-kernel/dist/contract.d.ts +12 -0
  133. package/node_modules/@rho-workspace/plugin-kernel/dist/contract.js +8 -1
  134. package/node_modules/@rho-workspace/plugin-kernel/dist/index.d.ts +61 -0
  135. package/node_modules/@rho-workspace/plugin-kernel/dist/index.js +125 -9
  136. package/node_modules/@rho-workspace/plugin-kernel/dist/session-scope.d.ts +14 -0
  137. package/node_modules/@rho-workspace/plugin-kernel/dist/session-scope.js +9 -0
  138. package/node_modules/@rho-workspace/plugin-kernel/dist/ui-base.d.ts +23 -5
  139. package/node_modules/@rho-workspace/plugin-kernel/dist/ui-notebook-work.js +1 -1
  140. package/node_modules/@rho-workspace/plugin-kernel/dist/ui-notebook.d.ts +6 -4
  141. package/node_modules/@rho-workspace/plugin-kernel/dist/ui-notebook.js +44 -17
  142. package/node_modules/@rho-workspace/plugin-kernel/dist/ui-styles.js +6 -0
  143. package/node_modules/@rho-workspace/plugin-kernel/package.json +1 -1
  144. package/node_modules/@rho-workspace/plugin-kernel/runners/runner.R +144 -4
  145. package/node_modules/@rho-workspace/plugin-kernel/runners/runner.py +106 -1
  146. package/node_modules/@rho-workspace/plugin-tables/README.md +5 -0
  147. package/node_modules/@rho-workspace/plugin-tables/dist/index.d.ts +1 -0
  148. package/node_modules/@rho-workspace/plugin-tables/dist/index.js +19 -3
  149. package/node_modules/@rho-workspace/plugin-tables/dist/ui.js +1 -1
  150. package/node_modules/@rho-workspace/plugin-tables/package.json +1 -1
  151. package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +3 -2
  152. package/node_modules/jose/dist/webapi/jwks/remote.js +1 -1
  153. package/node_modules/jose/dist/webapi/jws/general/verify.js +2 -8
  154. package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +11 -8
  155. package/node_modules/jose/dist/webapi/lib/key_management.js +0 -1
  156. package/node_modules/jose/package.json +1 -1
  157. package/package.json +6 -4
  158. package/protocol/index.json +91 -55
  159. package/protocol/operations/agent.sessions.list.json +13 -5
  160. package/protocol/operations/agent.sessions.read.json +13 -5
  161. package/protocol/operations/capability.list.json +382 -6
  162. package/protocol/operations/composition.apply.json +10 -2
  163. package/protocol/operations/composition.delete.json +845 -0
  164. package/protocol/operations/composition.read.json +10 -2
  165. package/protocol/operations/composition.undo.json +10 -2
  166. package/protocol/operations/conversation.agents.add.json +346 -0
  167. package/protocol/operations/conversation.agents.remove.json +340 -0
  168. package/protocol/operations/conversation.decide.json +196 -0
  169. package/protocol/operations/conversation.permission.json +196 -0
  170. package/protocol/operations/conversation.read.json +196 -0
  171. package/protocol/operations/conversation.send.json +265 -0
  172. package/protocol/operations/conversation.settings.check.json +213 -495
  173. package/protocol/operations/conversation.settings.read.json +211 -490
  174. package/protocol/operations/conversation.settings.update.json +235 -554
  175. package/protocol/operations/conversation.start.json +267 -5
  176. package/protocol/operations/conversation.stop.json +196 -0
  177. package/protocol/operations/extension.describe.json +39 -0
  178. package/protocol/operations/extension.install.json +62 -0
  179. package/protocol/operations/extension.list.json +164 -1
  180. package/protocol/operations/extension.market.change.json +210 -0
  181. package/protocol/operations/figure.read.json +265 -0
  182. package/protocol/operations/figure.select.json +157 -0
  183. package/protocol/operations/kernel.interrupt.json +119 -0
  184. package/protocol/operations/kernel.read.json +119 -0
  185. package/protocol/operations/kernel.run.json +119 -0
  186. package/protocol/operations/observation.snapshot.json +416 -8
  187. package/protocol/operations/project.openFile.json +10 -2
  188. package/protocol/operations/session.grant.json +4 -0
  189. package/protocol/operations/shared.json +1 -0
  190. package/protocol/operations/view.close.json +10 -2
  191. package/protocol/operations/view.protection.set.json +10 -2
  192. package/vendor/composition.json +177 -112
  193. package/vendor/rho-workspace-plugin-agent-0.4.33.tgz +0 -0
  194. package/vendor/rho-workspace-plugin-figures-0.5.1.tgz +0 -0
  195. package/vendor/rho-workspace-plugin-kernel-0.5.13.tgz +0 -0
  196. package/vendor/rho-workspace-plugin-tables-0.5.2.tgz +0 -0
  197. package/web/theme.css +5 -0
  198. package/dist/web/assets/answer-board-CBkGbSLD.js +0 -1
  199. package/dist/web/assets/canvas-D8rDdfDz.js +0 -1
  200. package/dist/web/assets/choices-D-YfnFP6.js +0 -1
  201. package/dist/web/assets/graph-lENgfQNH.js +0 -2
  202. package/dist/web/assets/index-B3_OVy91.css +0 -1
  203. package/dist/web/assets/index-BpL_Kl_s.js +0 -892
  204. package/dist/web/assets/overview-CDnVKlOt.js +0 -6
  205. package/dist/web/assets/preview-BEC1E9MK.js +0 -1
  206. package/dist/web/assets/studio-process-EYQgikxq.js +0 -2
  207. package/dist/web/assets/timeline-events-Chj2Gbx7.js +0 -1
  208. package/dist/web/assets/work-turns-CT9RVcWY.js +0 -1
  209. package/vendor/rho-workspace-plugin-agent-0.4.30.tgz +0 -0
  210. package/vendor/rho-workspace-plugin-kernel-0.5.5.tgz +0 -0
  211. package/vendor/rho-workspace-plugin-tables-0.5.0.tgz +0 -0
@@ -94,6 +94,29 @@ export interface ShellServices {
94
94
  code: string;
95
95
  purpose: string;
96
96
  }): Promise<void>;
97
+ figure?(slot: {
98
+ client: {
99
+ call(method: string, input: any, signal?: AbortSignal): Promise<any>;
100
+ };
101
+ projectId: string;
102
+ cellId?: string;
103
+ plot?: number;
104
+ file?: {
105
+ path?: string;
106
+ sha256: string;
107
+ };
108
+ width?: number;
109
+ height?: number;
110
+ label: string;
111
+ name?: string;
112
+ fit?: boolean;
113
+ cursor?: number;
114
+ fallback: ReactNode;
115
+ author?: (by: string) => {
116
+ name: string;
117
+ mine: boolean;
118
+ };
119
+ }): ReactNode;
97
120
  }
98
121
  export interface UiContribution {
99
122
  entryVersion: '0.1-draft';
@@ -253,7 +253,7 @@
253
253
  ]
254
254
  },
255
255
  "../node_modules/@codemirror/lang-markdown/dist/index.js": {
256
- "file": "assets/dist-DZmszrjG.js",
256
+ "file": "assets/dist-l3DUhbw5.js",
257
257
  "name": "dist",
258
258
  "src": "../node_modules/@codemirror/lang-markdown/dist/index.js",
259
259
  "isDynamicEntry": true,
@@ -261,22 +261,22 @@
261
261
  "index.html",
262
262
  "_dist-DCtcCJPs.js",
263
263
  "../node_modules/@codemirror/language/dist/index.js",
264
- "_dist-DpIHRk3B.js"
264
+ "_dist-D9FLb9Hm.js"
265
265
  ]
266
266
  },
267
267
  "../node_modules/@codemirror/lang-python/dist/index.js": {
268
- "file": "assets/dist-eMx6b8N1.js",
268
+ "file": "assets/dist-FXbTBwML.js",
269
269
  "name": "dist",
270
270
  "src": "../node_modules/@codemirror/lang-python/dist/index.js",
271
271
  "isDynamicEntry": true,
272
272
  "imports": [
273
273
  "_dist-DCtcCJPs.js",
274
274
  "../node_modules/@codemirror/language/dist/index.js",
275
- "_dist-DpIHRk3B.js"
275
+ "_dist-D9FLb9Hm.js"
276
276
  ]
277
277
  },
278
278
  "../node_modules/@codemirror/language/dist/index.js": {
279
- "file": "assets/dist-pF902jHA.js",
279
+ "file": "assets/dist-CSiCyBml.js",
280
280
  "name": "dist",
281
281
  "src": "../node_modules/@codemirror/language/dist/index.js",
282
282
  "isDynamicEntry": true,
@@ -291,29 +291,20 @@
291
291
  "src": "../node_modules/@codemirror/legacy-modes/mode/r.js",
292
292
  "isDynamicEntry": true
293
293
  },
294
- "_answer-board-CBkGbSLD.js": {
295
- "file": "assets/answer-board-CBkGbSLD.js",
294
+ "_answer-board-CeYS8k8y.js": {
295
+ "file": "assets/answer-board-CeYS8k8y.js",
296
296
  "name": "answer-board"
297
297
  },
298
- "_canvas-D8rDdfDz.js": {
299
- "file": "assets/canvas-D8rDdfDz.js",
300
- "name": "canvas",
301
- "imports": [
302
- "_rolldown-runtime-XKyaHtl9.js",
303
- "_react-Dss-ouuy.js",
304
- "_home-CCbP6kS-.js"
305
- ]
306
- },
307
- "_choices-D-YfnFP6.js": {
308
- "file": "assets/choices-D-YfnFP6.js",
298
+ "_choices-D8vGwsl2.js": {
299
+ "file": "assets/choices-D8vGwsl2.js",
309
300
  "name": "choices",
310
301
  "imports": [
311
302
  "_rolldown-runtime-XKyaHtl9.js",
312
303
  "_react-Dss-ouuy.js",
313
304
  "_markdown-0ngRuTpW.js",
314
- "_canvas-D8rDdfDz.js",
305
+ "_previews-pWNik-2g.js",
315
306
  "index.html",
316
- "_notes-meaning-DcVGUBBY.js"
307
+ "_notes-meaning-T2m5zQfv.js"
317
308
  ],
318
309
  "css": [
319
310
  "assets/choices-DLah50GC.css"
@@ -327,41 +318,41 @@
327
318
  "file": "assets/console-By4Mvn1y.css",
328
319
  "src": "_console-By4Mvn1y.css"
329
320
  },
330
- "_console-Trqc0swD.js": {
331
- "file": "assets/console-Trqc0swD.js",
321
+ "_console-Dyuo1q4N.js": {
322
+ "file": "assets/console-Dyuo1q4N.js",
332
323
  "name": "console",
333
324
  "imports": [
334
325
  "_rolldown-runtime-XKyaHtl9.js",
335
326
  "_react-Dss-ouuy.js",
336
327
  "_home-CCbP6kS-.js",
337
328
  "_markdown-0ngRuTpW.js",
338
- "_canvas-D8rDdfDz.js",
329
+ "_previews-pWNik-2g.js",
339
330
  "index.html",
340
331
  "_facts-BMO6V3-3.js",
341
- "_work-turns-CT9RVcWY.js"
332
+ "_work-turns-DSabCogR.js"
342
333
  ],
343
334
  "css": [
344
335
  "assets/console-By4Mvn1y.css"
345
336
  ]
346
337
  },
347
- "_dist-DCtcCJPs.js": {
348
- "file": "assets/dist-DCtcCJPs.js",
338
+ "_dist-D9FLb9Hm.js": {
339
+ "file": "assets/dist-D9FLb9Hm.js",
349
340
  "name": "dist",
350
341
  "imports": [
351
- "_rolldown-runtime-XKyaHtl9.js"
342
+ "index.html",
343
+ "_dist-DCtcCJPs.js",
344
+ "../node_modules/@codemirror/language/dist/index.js"
352
345
  ]
353
346
  },
354
- "_dist-DpIHRk3B.js": {
355
- "file": "assets/dist-DpIHRk3B.js",
347
+ "_dist-DCtcCJPs.js": {
348
+ "file": "assets/dist-DCtcCJPs.js",
356
349
  "name": "dist",
357
350
  "imports": [
358
- "index.html",
359
- "_dist-DCtcCJPs.js",
360
- "../node_modules/@codemirror/language/dist/index.js"
351
+ "_rolldown-runtime-XKyaHtl9.js"
361
352
  ]
362
353
  },
363
- "_explore-in-BCHqjJ7B.js": {
364
- "file": "assets/explore-in-BCHqjJ7B.js",
354
+ "_explore-in-BfSFGRh2.js": {
355
+ "file": "assets/explore-in-BfSFGRh2.js",
365
356
  "name": "explore-in",
366
357
  "imports": [
367
358
  "_react-Dss-ouuy.js",
@@ -402,13 +393,23 @@
402
393
  "_react-Dss-ouuy.js"
403
394
  ]
404
395
  },
405
- "_notes-meaning-DcVGUBBY.js": {
406
- "file": "assets/notes-meaning-DcVGUBBY.js",
396
+ "_notes-meaning-T2m5zQfv.js": {
397
+ "file": "assets/notes-meaning-T2m5zQfv.js",
407
398
  "name": "notes-meaning",
408
399
  "imports": [
409
400
  "index.html"
410
401
  ]
411
402
  },
403
+ "_previews-pWNik-2g.js": {
404
+ "file": "assets/previews-pWNik-2g.js",
405
+ "name": "previews",
406
+ "imports": [
407
+ "_rolldown-runtime-XKyaHtl9.js",
408
+ "_react-Dss-ouuy.js",
409
+ "_home-CCbP6kS-.js",
410
+ "_markdown-0ngRuTpW.js"
411
+ ]
412
+ },
412
413
  "_react-Dss-ouuy.js": {
413
414
  "file": "assets/react-Dss-ouuy.js",
414
415
  "name": "react",
@@ -420,8 +421,8 @@
420
421
  "file": "assets/rolldown-runtime-XKyaHtl9.js",
421
422
  "name": "rolldown-runtime"
422
423
  },
423
- "_skills-work-DNexV4OJ.js": {
424
- "file": "assets/skills-work-DNexV4OJ.js",
424
+ "_skills-work-BEGqlCkx.js": {
425
+ "file": "assets/skills-work-BEGqlCkx.js",
425
426
  "name": "skills-work",
426
427
  "imports": [
427
428
  "_rolldown-runtime-XKyaHtl9.js",
@@ -439,8 +440,8 @@
439
440
  "_react-Dss-ouuy.js"
440
441
  ]
441
442
  },
442
- "_timeline-events-Chj2Gbx7.js": {
443
- "file": "assets/timeline-events-Chj2Gbx7.js",
443
+ "_timeline-events-DKTho9fU.js": {
444
+ "file": "assets/timeline-events-DKTho9fU.js",
444
445
  "name": "timeline-events",
445
446
  "imports": [
446
447
  "_rolldown-runtime-XKyaHtl9.js",
@@ -448,8 +449,8 @@
448
449
  "index.html"
449
450
  ]
450
451
  },
451
- "_work-turns-CT9RVcWY.js": {
452
- "file": "assets/work-turns-CT9RVcWY.js",
452
+ "_work-turns-DSabCogR.js": {
453
+ "file": "assets/work-turns-DSabCogR.js",
453
454
  "name": "work-turns",
454
455
  "imports": [
455
456
  "_rolldown-runtime-XKyaHtl9.js",
@@ -458,7 +459,7 @@
458
459
  ]
459
460
  },
460
461
  "graph.tsx": {
461
- "file": "assets/graph-lENgfQNH.js",
462
+ "file": "assets/graph-BU2_o5uA.js",
462
463
  "name": "graph",
463
464
  "src": "graph.tsx",
464
465
  "isDynamicEntry": true,
@@ -466,19 +467,19 @@
466
467
  "_rolldown-runtime-XKyaHtl9.js",
467
468
  "_react-Dss-ouuy.js",
468
469
  "_markdown-0ngRuTpW.js",
469
- "_canvas-D8rDdfDz.js",
470
+ "_previews-pWNik-2g.js",
470
471
  "index.html",
471
- "_work-turns-CT9RVcWY.js",
472
+ "_work-turns-DSabCogR.js",
472
473
  "_snapshot-CAxBYPvV.js",
473
- "_timeline-events-Chj2Gbx7.js",
474
- "_choices-D-YfnFP6.js"
474
+ "_timeline-events-DKTho9fU.js",
475
+ "_choices-D8vGwsl2.js"
475
476
  ],
476
477
  "css": [
477
478
  "assets/graph-BYKN84J3.css"
478
479
  ]
479
480
  },
480
481
  "index.html": {
481
- "file": "assets/index-BpL_Kl_s.js",
482
+ "file": "assets/index-CWg9XYXx.js",
482
483
  "name": "index",
483
484
  "src": "index.html",
484
485
  "isEntry": true,
@@ -487,7 +488,7 @@
487
488
  "_react-Dss-ouuy.js",
488
489
  "_home-CCbP6kS-.js",
489
490
  "_markdown-0ngRuTpW.js",
490
- "_canvas-D8rDdfDz.js"
491
+ "_previews-pWNik-2g.js"
491
492
  ],
492
493
  "dynamicImports": [
493
494
  "_dist-DCtcCJPs.js",
@@ -501,17 +502,30 @@
501
502
  "overview.tsx",
502
503
  "preview.tsx",
503
504
  "graph.tsx",
504
- "_console-Trqc0swD.js",
505
+ "_console-Dyuo1q4N.js",
505
506
  "index.html",
506
507
  "skills.tsx",
507
508
  "studio-process.tsx"
508
509
  ],
509
510
  "css": [
510
- "assets/index-B3_OVy91.css"
511
+ "assets/index-C16mXVvk.css"
512
+ ],
513
+ "assets": [
514
+ "assets/markdown.reader-Ct2-e2Zt.png",
515
+ "assets/rho.editor-CCJeyHma.png",
516
+ "assets/rho.flow-WkMj6fRS.png",
517
+ "assets/rho.media-Cc6amodO.png",
518
+ "assets/rho.notebook-6vsZKGDq.png",
519
+ "assets/rho.object-BGoeXjte.png",
520
+ "assets/rho.plots-yIiISCkb.png",
521
+ "assets/rho.scatter-DwHxesCs.png",
522
+ "assets/rho.servers-DKf_mnNq.png",
523
+ "assets/rho.table-DWOGaWDa.png",
524
+ "assets/rho.variables-CKcWczhQ.png"
511
525
  ]
512
526
  },
513
527
  "overview.tsx": {
514
- "file": "assets/overview-CDnVKlOt.js",
528
+ "file": "assets/overview-PzfLJCo-.js",
515
529
  "name": "overview",
516
530
  "src": "overview.tsx",
517
531
  "isDynamicEntry": true,
@@ -520,14 +534,14 @@
520
534
  "_react-Dss-ouuy.js",
521
535
  "_home-CCbP6kS-.js",
522
536
  "_markdown-0ngRuTpW.js",
523
- "_canvas-D8rDdfDz.js",
537
+ "_previews-pWNik-2g.js",
524
538
  "index.html",
525
539
  "_facts-BMO6V3-3.js",
526
- "_work-turns-CT9RVcWY.js",
527
- "_choices-D-YfnFP6.js",
528
- "_skills-work-DNexV4OJ.js",
529
- "_explore-in-BCHqjJ7B.js",
530
- "_answer-board-CBkGbSLD.js"
540
+ "_work-turns-DSabCogR.js",
541
+ "_choices-D8vGwsl2.js",
542
+ "_skills-work-BEGqlCkx.js",
543
+ "_explore-in-BfSFGRh2.js",
544
+ "_answer-board-CeYS8k8y.js"
531
545
  ],
532
546
  "dynamicImports": [
533
547
  "graph.tsx"
@@ -537,7 +551,7 @@
537
551
  ]
538
552
  },
539
553
  "preview.tsx": {
540
- "file": "assets/preview-BEC1E9MK.js",
554
+ "file": "assets/preview-BguEdsza.js",
541
555
  "name": "preview",
542
556
  "src": "preview.tsx",
543
557
  "isDynamicEntry": true,
@@ -545,13 +559,57 @@
545
559
  "_rolldown-runtime-XKyaHtl9.js",
546
560
  "_react-Dss-ouuy.js",
547
561
  "_markdown-0ngRuTpW.js",
548
- "_canvas-D8rDdfDz.js",
562
+ "_previews-pWNik-2g.js",
549
563
  "index.html",
550
- "_explore-in-BCHqjJ7B.js"
564
+ "_explore-in-BfSFGRh2.js"
551
565
  ]
552
566
  },
567
+ "previews/markdown.reader.png": {
568
+ "file": "assets/markdown.reader-Ct2-e2Zt.png",
569
+ "src": "previews/markdown.reader.png"
570
+ },
571
+ "previews/rho.editor.png": {
572
+ "file": "assets/rho.editor-CCJeyHma.png",
573
+ "src": "previews/rho.editor.png"
574
+ },
575
+ "previews/rho.flow.png": {
576
+ "file": "assets/rho.flow-WkMj6fRS.png",
577
+ "src": "previews/rho.flow.png"
578
+ },
579
+ "previews/rho.media.png": {
580
+ "file": "assets/rho.media-Cc6amodO.png",
581
+ "src": "previews/rho.media.png"
582
+ },
583
+ "previews/rho.notebook.png": {
584
+ "file": "assets/rho.notebook-6vsZKGDq.png",
585
+ "src": "previews/rho.notebook.png"
586
+ },
587
+ "previews/rho.object.png": {
588
+ "file": "assets/rho.object-BGoeXjte.png",
589
+ "src": "previews/rho.object.png"
590
+ },
591
+ "previews/rho.plots.png": {
592
+ "file": "assets/rho.plots-yIiISCkb.png",
593
+ "src": "previews/rho.plots.png"
594
+ },
595
+ "previews/rho.scatter.png": {
596
+ "file": "assets/rho.scatter-DwHxesCs.png",
597
+ "src": "previews/rho.scatter.png"
598
+ },
599
+ "previews/rho.servers.png": {
600
+ "file": "assets/rho.servers-DKf_mnNq.png",
601
+ "src": "previews/rho.servers.png"
602
+ },
603
+ "previews/rho.table.png": {
604
+ "file": "assets/rho.table-DWOGaWDa.png",
605
+ "src": "previews/rho.table.png"
606
+ },
607
+ "previews/rho.variables.png": {
608
+ "file": "assets/rho.variables-CKcWczhQ.png",
609
+ "src": "previews/rho.variables.png"
610
+ },
553
611
  "review.tsx": {
554
- "file": "assets/review-DYP0aCXb.js",
612
+ "file": "assets/review-Dy_85lcH.js",
555
613
  "name": "review",
556
614
  "src": "review.tsx",
557
615
  "isDynamicEntry": true,
@@ -564,7 +622,7 @@
564
622
  ]
565
623
  },
566
624
  "shell/workspace.tsx": {
567
- "file": "assets/workspace-COmCbGV3.js",
625
+ "file": "assets/workspace-DfjBL--r.js",
568
626
  "name": "workspace",
569
627
  "src": "shell/workspace.tsx",
570
628
  "isDynamicEntry": true,
@@ -572,16 +630,16 @@
572
630
  "_rolldown-runtime-XKyaHtl9.js",
573
631
  "_react-Dss-ouuy.js",
574
632
  "_markdown-0ngRuTpW.js",
575
- "_canvas-D8rDdfDz.js",
633
+ "_previews-pWNik-2g.js",
576
634
  "index.html",
577
- "_console-Trqc0swD.js",
635
+ "_console-Dyuo1q4N.js",
578
636
  "_facts-BMO6V3-3.js",
579
637
  "_snapshot-CAxBYPvV.js",
580
- "_explore-in-BCHqjJ7B.js"
638
+ "_explore-in-BfSFGRh2.js"
581
639
  ]
582
640
  },
583
641
  "skills.tsx": {
584
- "file": "assets/skills-1ec0Z-jx.js",
642
+ "file": "assets/skills-Dyz7mBlc.js",
585
643
  "name": "skills",
586
644
  "src": "skills.tsx",
587
645
  "isDynamicEntry": true,
@@ -591,14 +649,14 @@
591
649
  "_home-CCbP6kS-.js",
592
650
  "_markdown-0ngRuTpW.js",
593
651
  "index.html",
594
- "_skills-work-DNexV4OJ.js"
652
+ "_skills-work-BEGqlCkx.js"
595
653
  ],
596
654
  "css": [
597
655
  "assets/skills-WkE0KCzn.css"
598
656
  ]
599
657
  },
600
658
  "studio-process.tsx": {
601
- "file": "assets/studio-process-EYQgikxq.js",
659
+ "file": "assets/studio-process-D-ykbC4D.js",
602
660
  "name": "studio-process",
603
661
  "src": "studio-process.tsx",
604
662
  "isDynamicEntry": true,
@@ -606,12 +664,13 @@
606
664
  "_rolldown-runtime-XKyaHtl9.js",
607
665
  "_react-Dss-ouuy.js",
608
666
  "_markdown-0ngRuTpW.js",
609
- "_canvas-D8rDdfDz.js",
667
+ "_previews-pWNik-2g.js",
610
668
  "index.html",
611
- "_console-Trqc0swD.js",
612
- "_timeline-events-Chj2Gbx7.js",
613
- "_notes-meaning-DcVGUBBY.js",
614
- "_answer-board-CBkGbSLD.js",
669
+ "_console-Dyuo1q4N.js",
670
+ "_work-turns-DSabCogR.js",
671
+ "_timeline-events-DKTho9fU.js",
672
+ "_notes-meaning-T2m5zQfv.js",
673
+ "_answer-board-CeYS8k8y.js",
615
674
  "shell/workspace.tsx"
616
675
  ],
617
676
  "css": [
@@ -0,0 +1 @@
1
+ var e={supporting:4,method:2,run:2,input:4,report:2};function t(e){let t=e.replace(/\s+/g,` `).trim().split(/\s*(?:;|&&|\|\||\|)\s*/).filter(Boolean),n=t.find(e=>!/^(?:cd|export|source|set|\.)\s/.test(e))??t[0]??``,r=/<<-?\s*['"]?\w+/.test(n),i=n.replace(/\s*\d?>>?\s*&?\S+/g,``).replace(/\s*<<-?\s*['"]?\w+['"]?.*$/,``).replace(/\s+-$/,``).trim();return(r?i+` (inline script)`:i)||e.trim()}var n=(e,n=48)=>{let r=t(e);return"`"+(r.length>n?r.slice(0,n-1).trimEnd()+`…`:r)+"`"},r=e=>e.category===`figures`||e.category===`results`||e.category===`data`;function i(t,i,a=e){let o=t.nodes.find(e=>e.id===`q:`+i);if(!o)return null;let s=new Map(t.nodes.map(e=>[e.id,e])),c=t.edges.filter(e=>e.turn===i),l=(o.answer??``).toLowerCase(),u=e=>!!e.path&&l.includes((e.path.split(`/`).at(-1)??``).toLowerCase()),d=new Map,f=new Map;for(let e of c){let t=s.get(e.from),n=s.get(e.to);if(!t||!n||n.kind!==`file`||!(t.kind===`question`&&(e.label===`wrote`||e.label===`edited`||e.label===`changed meanwhile`||e.label===`reported result`)||t.kind===`run`&&e.label===`changed while it ran`)||!n.category)continue;let r=f.get(n.id);(!r||t.kind===`run`&&r.edge.from===o.id)&&f.set(n.id,{node:n,edge:e}),t.kind===`run`&&d.set(t.id,t)}let p=[],m={},h=(e,t)=>{let n=e===`primary`?1:a[e];for(let{node:r,why:i}of t.slice(0,n))p.push({node:r,role:e,why:i,mentioned:u(r)});t.length>n&&e!==`primary`&&(m[e]=t.length-n)},g=e=>{let t=s.get(e.edge.from);return t.kind===`run`?`Changed while `+n(t.command??t.title)+` ran`:e.edge.label===`reported result`?`Reported in the Agent’s answer`:e.edge.label===`changed meanwhile`?`Changed on disk during this message`:e.edge.label===`edited`?`Edited by the Agent`:`Written by the Agent`},_=[...f.values()].filter(e=>r(e.node)).sort((e,t)=>Number(u(t.node))-Number(u(e.node))||Number(t.node.category===`figures`)-Number(e.node.category===`figures`)||t.node.at-e.node.at),v=_.find(e=>e.node.category===`figures`&&u(e.node))??_.find(e=>u(e.node))??_.find(e=>e.node.category===`figures`)??_[0];v&&h(`primary`,[{node:v.node,why:g(v)}]),h(`supporting`,_.filter(e=>e!==v).sort((e,t)=>Number(u(t.node))-Number(u(e.node))||e.node.at-t.node.at).map(e=>({node:e.node,why:g(e)}))),h(`report`,[...f.values()].filter(e=>e.node.category===`notes`).map(e=>({node:e.node,why:g(e)})));let y=e=>c.filter(t=>t.from===e.id&&t.label===`runs`).map(e=>s.get(e.to)).filter(e=>!!e&&d.has(e.id));h(`method`,t.nodes.filter(e=>e.kind===`file`&&e.category===`code`&&(y(e).length>0||f.has(e.id))).sort((e,t)=>y(t).length-y(e).length||e.at-t.at).map(e=>{let t=y(e)[0],r=e.events.filter(e=>e.turn===i&&(e.action===`edit`||e.action===`write`)).length,a=e.versions?.length??0;return{node:e,why:[t?`Run by `+n(t.command??t.title):``,r?r===1?`Written in this message`:`Written and edited `+r+` times in this message`:``,a>1?a+` versions kept`:``].filter(Boolean).join(` · `)}})),h(`run`,[...d.values()].sort((e,t)=>e.at-t.at).map(e=>{let t=c.filter(t=>t.from===e.id&&t.label===`changed while it ran`).length;return{node:e,why:t+(t===1?` file changed while it ran`:` files changed while it ran`)}}));let b=new Map;for(let e of c){let t=s.get(e.from);t&&t.kind===`file`&&!f.has(t.id)&&t.category!==`code`&&(e.to===o.id&&e.label===`read`?b.set(t.id,{node:t,why:`Read by the Agent`}):e.label===`named`&&(d.has(e.to)||c.some(e=>e.label===`reported result`)&&s.get(e.to)?.kind===`run`)&&!b.has(t.id)&&b.set(t.id,{node:t,why:`Named by `+n(s.get(e.to).command??``)}))}return h(`input`,[...b.values()].sort((e,t)=>Number(t.node.category===`data`)-Number(e.node.category===`data`)||e.node.at-t.node.at)),{turn:i,question:o,items:p,otherCommands:t.nodes.filter(e=>e.kind===`run`&&e.turn===i&&!d.has(e.id)).reduce((e,t)=>e+(t.commands?.length??1),0),omitted:m}}function a(e){let t=[...e.turns].sort((e,t)=>t.start-e.start),n=new Map(t.map(t=>[t.id,i(e,t.id)])),r=e=>!!n.get(e)?.items.some(e=>e.role===`primary`||e.role===`supporting`),a=t.filter(e=>r(e.id));return(a.length?a:t).map(e=>{let i=t.filter(t=>t.conversationId===e.conversationId&&t.start>e.start).sort((e,t)=>e.start-t.start),o=i.findIndex(e=>r(e.id));return{turn:e,board:n.get(e.id),followUps:a.length?o<0?i:i.slice(0,o):[]}}).filter(e=>e.board)}export{a as n,t as r,i as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./react-Dss-ouuy.js";import{r}from"./markdown-0ngRuTpW.js";import{W as i,t as a}from"./previews-pWNik-2g.js";import{J as o,K as s,mt as c,pt as l}from"./index-CWg9XYXx.js";import{a as u,i as d,n as f,o as p,r as m,t as h}from"./notes-meaning-T2m5zQfv.js";var g=e(n(),1),_=(e,t)=>e.length>t?e.slice(0,t-1).trimEnd()+`…`:e;function v(e){let{process:t,meanings:n,traces:r}=e,i=new Map(e.files.map(e=>[e.path,e])),a=f(n),s=e.described??new Map,l=new Map,u=new Map,d=new Map,p=[],m=(e,t,n,r,i,a,o)=>{let s=t+`>`+n+`:`+r;e.has(s)||e.set(s,{id:s,from:t,to:n,label:r,basis:i,at:a,turn:o})},h=e=>t.nodes.filter(t=>t.kind===`file`&&t.path===e).flatMap(e=>e.versions??(e.resource?[{resource:e.resource,capturedAt:e.capturedAt??e.at}]:[])).sort((e,t)=>e.capturedAt-t.capturedAt),g=(e,n)=>t.nodes.find(t=>t.kind===`file`&&t.path===e&&(!n||t.resource?.version===n||t.versions?.some(e=>e.resource.version===n))),v=(t,n,o,u)=>{let d=`m:f:`+t,f=l.get(d);if(!f){let p=i.get(t),m=u?.files.find(e=>e.path===t)?.kept??null,g=h(t).at(-1),_=m??(g?{resource:g.resource,at:g.capturedAt}:null),v=c(t,a,s),y=a.get(t);f={id:d,kind:`file`,title:t.split(`/`).at(-1)??t,path:t,at:o,category:p?.category??e.kindOf(t),exists:!!p,bytes:p?.bytes,modifiedAt:p?.modifiedAt,..._?{resource:_.resource,capturedAt:_.at}:{gap:`No version of this file was kept in the Agent's record.`},events:[{key:d,at:o,node:d,turn:n,action:`write`,label:`Named in the notes`}],meaning:{session:``,conversationId:null,...v?{description:{...v,...v.source===`notes`&&y?{trace:r.get(y.statement)}:{}}}:{}}},l.set(d,f)}return f};n.forEach(n=>{let a=n.statements;if(!a.length)return;let o=`m:`+(n.conversationId??`notes-`+n.line),s=t.turns.find(e=>e.conversationId===n.conversationId),c=a.map(e=>r.get(e)?.written?.at).filter(e=>e!==void 0),f=c.length?Math.min(...c):s?.start??0;p.push({id:o,conversationId:n.conversationId??``,title:n.title,agent:s?.agent??`Notes`,start:f,end:Math.max(f,...c),running:!1});let h=e=>r.get(e)?.written?.at??f,g=e=>({session:n.title,conversationId:n.conversationId,...e?{statement:e,trace:r.get(e)}:{}}),y=a.filter(e=>e.kind===`todo`),b=a.find(e=>e.kind===`question`),C={id:`q:`+o,kind:`question`,title:_(b?.text||n.title,160),text:b?.text||n.title,at:b?h(b):f,turn:o,conversationId:n.conversationId??void 0,agent:s?.agent,events:[],meaning:{...g(b),...y.length?{todos:{done:y.filter(e=>e.done).length,total:y.length}}:{}}};l.set(C.id,C);let w=new Map;a.forEach((e,i)=>{if(e.kind!==`finding`&&e.kind!==`choice`)return;let a={id:`m:s:`+o+`:`+e.line,kind:e.kind,title:_(e.text,220),text:e.text,at:h(e),turn:o,conversationId:n.conversationId??void 0,events:[{key:`m:s:`+o+`:`+e.line,at:h(e),node:`m:s:`+o+`:`+e.line,turn:o,action:`write`,label:`Written in the notes`}],meaning:g(e)};l.set(a.id,a),w.set(i,a),m(u,C.id,a.id,e.kind===`finding`?`found`:`chose`,`declared`,h(e),o);for(let t of e.links)m(u,a.id,v(t,o,h(e),r.get(e)).id,e.kind===`finding`?`rests on`:`gives`,`declared`,h(e),o);for(let t of e.alternatives??[])for(let n of t.links)m(u,a.id,v(n,o,h(e),r.get(e)).id,`instead gives`,`declared`,h(e),o);let s=r.get(e)?.written;s&&t.nodes.some(e=>e.id===`q:`+s.turn)&&m(d,a.id,`q:`+s.turn,`written in`,`observed`,s.at,o)}),a.forEach(e=>{if(e.kind!==`figure`)return;let t=e.of===void 0?void 0:w.get(e.of);for(let n of e.links)m(u,(t??C).id,v(n,o,h(e),r.get(e)).id,t?`shown in`:`shows`,`declared`,h(e),o)});let T=()=>new Set([...u.values()].map(e=>e.to));for(let e of a)if(e.kind===`file`)for(let t of e.links){let n=v(t,o,h(e),r.get(e));!T().has(n.id)&&n.category!==`code`&&n.category!==`data`&&m(u,C.id,n.id,`made`,`declared`,h(e),o)}let E=a.filter(e=>e.kind===`method`||e.kind===`file`);for(let t of E){let n=t.links.filter(t=>(i.get(t)?.category??e.kindOf(t))===`code`),a=t.links.filter(t=>(i.get(t)?.category??e.kindOf(t))===`data`);for(let e of n)for(let n of a)m(u,v(e,o,h(t),r.get(t)).id,v(n,o,h(t),r.get(t)).id,`reads`,`declared`,h(t),o)}n.conversationId&&x(o,C,n.conversationId),S(o,n.conversationId);for(let e of E)for(let t of e.links){let n=v(t,o,h(e),r.get(e));T().has(n.id)||m(u,C.id,n.id,n.category===`data`?`uses data`:`uses`,`declared`,h(e),o)}});let y=new Set(n.map(e=>e.conversationId));for(let e of new Set([...s.values()].map(e=>e.conversationId))){if(y.has(e)||!b(e).length)continue;let n=`m:`+e,r=t.turns.find(t=>t.conversationId===e),i=t.nodes.find(t=>t.kind===`question`&&t.conversationId===e),a=b(e).map(e=>Date.parse(e.observedAt)),o=r?.start??Math.min(...a);p.push({id:n,conversationId:e,title:r?.title??`Conversation`,agent:r?.agent??`Agent`,start:o,end:Math.max(o,...a),running:!1});let s={id:`q:`+n,kind:`question`,title:_(i?.text??r?.title??`Conversation`,160),text:i?.text??r?.title??``,at:o,turn:n,conversationId:e,agent:r?.agent,events:[],meaning:{session:r?.title??`Conversation`,conversationId:e,...i?{message:{id:i.id,at:i.at}}:{}}};l.set(s.id,s),x(n,s,e),S(n,e)}function b(t){return[...s.values()].filter(n=>n.conversationId===t&&[`results`,`figures`].includes(i.get(n.path)?.category??e.kindOf(n.path)??``))}function x(e,t,n){for(let r of b(n)){if(l.has(`m:f:`+r.path))continue;let n=Date.parse(r.observedAt),i=v(r.path,e,n);m(u,t.id,i.id,`made`,`observed`,n,e)}}function S(e,n){let r=e=>!n||e.turn.startsWith(n+`/`),i=new Map(t.nodes.map(e=>[e.id,e])),a=!0;for(;a;){a=!1;for(let n of[...l.values()])if(n.kind===`file`&&n.path&&n.events[0]?.turn===e){for(let o of t.edges.filter(e=>r(e)&&i.get(e.to)?.path===n.path)){let r=i.get(o.from);if(r?.kind===`run`)for(let s of t.edges.filter(e=>e.to===r.id&&(e.label===`runs`||e.label===`named`))){let t=i.get(s.from);if(!t?.path||t.path===n.path)continue;let r=l.size,c=v(t.path,e,s.at);m(u,n.id,c.id,s.label===`runs`?`made by`:`named with`,o.basis,o.at,e),l.size>r&&(a=!0)}}if(n.category===`code`)for(let o of t.edges.filter(e=>r(e)&&e.label===`runs`&&i.get(e.from)?.path===n.path))for(let r of t.edges.filter(e=>e.to===o.to&&e.label===`named`)){let t=i.get(r.from);if(!t?.path||t.path===n.path)continue;let o=l.size;m(u,n.id,v(t.path,e,r.at).id,`reads`,`named`,r.at,e),l.size>o&&(a=!0)}}}}for(let e of l.values()){if(e.kind!==`file`||!e.path)continue;let t=g(e.path,e.resource?.version)??g(e.path);t&&m(d,e.id,t.id,`kept as`,`observed`,e.capturedAt??e.at,e.events[0].turn)}let C=`m:f:`+o,w=e=>e.from!==C&&e.to!==C;return{nodes:[...l.values()].filter(e=>e.id!==C),edges:[...u.values()].filter(w),turns:p,traces:[...d.values()].filter(w)}}function y(e,t,n){return n===`process`||!t||!t.nodes.length?e:n===`meaning`?{...e,nodes:t.nodes,edges:t.edges,turns:t.turns,events:[],live:null,omittedNodes:0}:{...e,nodes:[...t.nodes,...e.nodes],edges:[...t.edges,...t.traces,...e.edges],turns:[...t.turns,...e.turns]}}var b={versions:24},x=new Map;function S(e,t,n,r,o,d=[]){let p=t.project.id,h=(0,g.useMemo)(()=>n.nodes.filter(e=>e.kind===`file`&&e.path===`project-notes.md`).flatMap(e=>(e.versions??(e.resource?[{resource:e.resource,capturedAt:e.capturedAt??e.at}]:[])).map(t=>({...t,turn:e.events.find(e=>e.action===`capture`&&e.key.endsWith(`:`+t.resource.id))?.turn??e.events[0]?.turn??``}))).sort((e,t)=>e.capturedAt-t.capturedAt).slice(-b.versions),[n]),_=h.map(e=>e.resource.version).join(`,`),[y,S]=(0,g.useState)([]);return(0,g.useEffect)(()=>{let t=!0;return Promise.all(h.map(t=>{let n=p+`:`+t.resource.id+`@`+t.resource.version;return x.has(n)||x.set(n,a(e,p,t.resource,s.maxTitleBytes).then(e=>new TextDecoder().decode(e)).catch(()=>(x.delete(n),``))),x.get(n).then(e=>({text:e,at:t.capturedAt,turn:t.turn,conversationId:t.turn.split(`/`)[0]??``,resource:t.resource}))})).then(e=>{t&&S(e.filter(e=>e.text))}),()=>{t=!1}},[e,p,_]),(0,g.useMemo)(()=>{let e=m(o.length>s.maxTitleBytes?``:o),t=e=>n.nodes.filter(t=>t.kind===`file`&&t.path===e).flatMap(e=>e.versions??(e.resource?[{resource:e.resource,capturedAt:e.capturedAt??e.at}]:[])).map(e=>({at:e.capturedAt,resource:e.resource})),a=e=>{let t=r.find(t=>t.path===e);return t?.modifiedAt?Date.parse(t.modifiedAt):null},p=new Map;for(let n of e)for(let e of n.statements)p.set(e,u(e,y,t,a));let g=l(d),_=f(e);return{meanings:e,traces:p,layer:v({process:n,meanings:e,traces:p,files:r,kindOf:e=>i(e),described:g}),descriptions:_,versions:{read:y.length,kept:h.length},holds:e=>c(e,_,g)}},[o,y,n,r,d])}var C=t();function w({statement:e,trace:t,conversationId:n,client:i,projectId:a,onPath:o,onSent:s}){let[c,l]=(0,g.useState)(null),u=e=>t?.files.find(t=>t.path===e)?.later,f=e=>e.map(e=>(0,C.jsxs)(`button`,{className:`work-file`,title:e+(u(e)===`kept`?` · a newer version was kept since this was written`:u(e)===`written`?` · written again since this was written`:``),onClick:()=>o(e),children:[(0,C.jsx)(r,{name:/\.(png|jpe?g|svg)$/i.test(e)?`image`:/\.(csv|tsv)$/i.test(e)?`table`:`file`,size:13}),(0,C.jsx)(`span`,{children:e.split(`/`).at(-1)}),u(e)&&(0,C.jsx)(`small`,{children:`changed since`})]},e)),{topic:m,rest:_}=d(p(e.text,e.links)),v=e.alternatives??[];return(0,C.jsx)(`div`,{className:`choice`+(m?``:` untitled`),children:(0,C.jsxs)(`div`,{className:`choice-grid`,children:[m&&(0,C.jsx)(`p`,{className:`choice-topic`,children:m}),(0,C.jsxs)(`div`,{className:`choice-body`,children:[(0,C.jsx)(`p`,{className:`choice-taken`,children:_}),e.links.length>0&&(0,C.jsx)(`div`,{className:`choice-foot`,children:f(e.links)}),v.map((t,r)=>(0,C.jsxs)(`div`,{className:`choice-other`,children:[(0,C.jsxs)(`p`,{children:[(0,C.jsx)(`span`,{className:`choice-other-label`,children:`Other option`}),h(p(t.text,t.links))]}),t.links.length>0&&(0,C.jsx)(`div`,{className:`choice-foot`,children:f(t.links)}),n&&c!==r&&(0,C.jsx)(`button`,{className:`text-button choice-instead`,onClick:()=>l(r),children:`Use this instead…`}),n&&c===r&&(0,C.jsx)(T,{conversationId:n,client:i,projectId:a,taken:e.text,option:t.text,onCancel:()=>l(null),onSent:e=>{l(null),s?.(e)}})]},r))]})]})})}function T({conversationId:e,client:t,projectId:n,taken:r,option:i,onCancel:a,onSent:o}){let[s,c]=(0,g.useState)(`Use this option instead: “${i}” (in place of “${r}”). Redo what depends on it and update the notes.`),[l,u]=(0,g.useState)(!1),[d,f]=(0,g.useState)(``),p=(0,g.useRef)(null);async function m(){if(s.trim()&&!l){p.current?.text!==s&&(p.current={text:s,changeId:`choice-`+crypto.randomUUID()}),u(!0),f(``);try{await t.call(`conversation.send`,{projectId:n,conversationId:e,changeId:p.current.changeId,text:s}),p.current=null,o(e)}catch(e){f(e instanceof Error?e.message:`The message could not be sent.`)}finally{u(!1)}}}return(0,C.jsxs)(`form`,{className:`choice-send`,onSubmit:e=>{e.preventDefault(),m()},onKeyDown:e=>{e.key===`Escape`&&a()},children:[(0,C.jsx)(`textarea`,{rows:3,value:s,"aria-label":`Message to the Agent`,onChange:e=>c(e.target.value),autoFocus:!0}),d&&(0,C.jsx)(`p`,{className:`inline-error`,role:`alert`,children:d}),(0,C.jsxs)(`div`,{className:`choice-send-actions`,children:[(0,C.jsx)(`button`,{type:`button`,onClick:a,children:`Cancel`}),(0,C.jsx)(`button`,{type:`submit`,className:`primary`,disabled:l||!s.trim(),children:l?`Sending…`:`Send to the Agent`})]})]})}export{S as n,y as r,w as t};
@@ -1,4 +1,4 @@
1
- import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{n,t as r}from"./react-Dss-ouuy.js";import{a as i}from"./home-CCbP6kS-.js";import{r as a}from"./markdown-0ngRuTpW.js";import{N as o,i as s}from"./canvas-D8rDdfDz.js";import{At as c,Gt as l,Ht as u,Nt as d,Ut as f,Wt as p,kt as m}from"./index-BpL_Kl_s.js";import{c as h,l as g,t as _}from"./facts-BMO6V3-3.js";import{t as v}from"./work-turns-CT9RVcWY.js";var y=n(),b=t(r(),1),x={shownBytes:262144,pollMs:700,listed:50},S=e=>e instanceof Error?e.message:`The Console could not be reached.`,C=e=>[`unavailable`,`unauthorized`].includes(e?.error?.kind??``),w=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hourCycle:`h23`});function T(e){if(e<1e4)return(Math.max(e,100)/1e3).toFixed(1)+` s`;if(e<6e4)return Math.round(e/1e3)+` s`;let t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return t+` min`+(n?` `+n+` s`:``)}function E(e,t,n){N();let[r,i]=(0,b.useState)(null),[a,o]=(0,b.useState)({off:!1,problem:``}),s=(0,b.useCallback)(()=>e.call(`console.list`,{projectId:t,limit:x.listed}).then(e=>{i(e.commands),o({off:!1,problem:``})},e=>o({off:C(e),problem:S(e)})),[e,t]);return(0,b.useEffect)(()=>{s()},[s,n]),{commands:r,...a,read:s}}function D(e,t,{onRan:n,center:r=!1}={}){let[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(``),[c,l]=(0,b.useState)(!1),[u,d]=(0,b.useState)(``),f=(0,b.useRef)(null),p=(0,b.useRef)(null);async function m(r){if(r.trim()&&!c){f.current?.command!==r&&(f.current={command:r,changeId:`console-`+crypto.randomUUID()}),l(!0),d(``);try{await e.call(`console.run`,{projectId:t,command:r,changeId:f.current.changeId}),f.current=null,a(``),s(``),n?.()}catch(e){d(S(e))}finally{l(!1)}}}async function h(r){try{await e.call(`console.stop`,{projectId:t,commandId:r.commandId,changeId:`stop-`+r.commandId}),n?.()}catch(e){d(S(e))}}function g(e,t){a(e),s(`From `+t+`. Check it, then press Run.`),d(``),r&&p.current?.scrollIntoView({block:`center`}),p.current?.focus()}return{draft:i,setDraft:e=>{a(e),e||s(``)},note:o,busy:c,problem:u,input:p,start:m,stop:h,prepare:g}}function O({folder:e,line:t,problem:n}){N();let{draft:r,setDraft:i,note:a,busy:o,input:s}=t,c=Math.min(8,r.split(`
1
+ import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{n,t as r}from"./react-Dss-ouuy.js";import{a as i}from"./home-CCbP6kS-.js";import{r as a}from"./markdown-0ngRuTpW.js";import{W as o,g as s}from"./previews-pWNik-2g.js";import{Dt as c,It as l,Lt as u,Rt as d,St as f,xt as p,zt as m}from"./index-CWg9XYXx.js";import{c as h,l as g,t as _}from"./facts-BMO6V3-3.js";import{t as v}from"./work-turns-DSabCogR.js";var y=n(),b=t(r(),1),x={shownBytes:262144,pollMs:700,listed:50},S=e=>e instanceof Error?e.message:`The Console could not be reached.`,C=e=>[`unavailable`,`unauthorized`].includes(e?.error?.kind??``),w=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hourCycle:`h23`});function T(e){if(e<1e4)return(Math.max(e,100)/1e3).toFixed(1)+` s`;if(e<6e4)return Math.round(e/1e3)+` s`;let t=Math.floor(e/6e4),n=Math.round(e%6e4/1e3);return t+` min`+(n?` `+n+` s`:``)}function E(e,t,n){N();let[r,i]=(0,b.useState)(null),[a,o]=(0,b.useState)({off:!1,problem:``}),s=(0,b.useCallback)(()=>e.call(`console.list`,{projectId:t,limit:x.listed}).then(e=>{i(e.commands),o({off:!1,problem:``})},e=>o({off:C(e),problem:S(e)})),[e,t]);return(0,b.useEffect)(()=>{s()},[s,n]),{commands:r,...a,read:s}}function D(e,t,{onRan:n,center:r=!1}={}){let[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(``),[c,l]=(0,b.useState)(!1),[u,d]=(0,b.useState)(``),f=(0,b.useRef)(null),p=(0,b.useRef)(null);async function m(r){if(r.trim()&&!c){f.current?.command!==r&&(f.current={command:r,changeId:`console-`+crypto.randomUUID()}),l(!0),d(``);try{await e.call(`console.run`,{projectId:t,command:r,changeId:f.current.changeId}),f.current=null,a(``),s(``),n?.()}catch(e){d(S(e))}finally{l(!1)}}}async function h(r){try{await e.call(`console.stop`,{projectId:t,commandId:r.commandId,changeId:`stop-`+r.commandId}),n?.()}catch(e){d(S(e))}}function g(e,t){a(e),s(`From `+t+`. Check it, then press Run.`),d(``),r&&p.current?.scrollIntoView({block:`center`}),p.current?.focus()}return{draft:i,setDraft:e=>{a(e),e||s(``)},note:o,busy:c,problem:u,input:p,start:m,stop:h,prepare:g}}function O({folder:e,line:t,problem:n}){N();let{draft:r,setDraft:i,note:a,busy:o,input:s}=t,c=Math.min(8,r.split(`
2
2
  `).length),l=(0,b.useId)(),u=t.problem||n;return(0,y.jsxs)(`form`,{className:`console-prompt`,onSubmit:e=>{e.preventDefault(),t.start(r)},children:[(0,y.jsxs)(`label`,{htmlFor:l,className:`console-prompt-label`,children:[`Run a command in `,(0,y.jsx)(`strong`,{children:e})]}),(0,y.jsxs)(`div`,{className:`console-line`,children:[(0,y.jsx)(`span`,{"aria-hidden":`true`,children:`$`}),(0,y.jsx)(`textarea`,{id:l,ref:s,rows:c,value:r,spellCheck:!1,autoComplete:`off`,autoCapitalize:`off`,placeholder:`python3 analysis.py`,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),t.start(r))}}),(0,y.jsx)(`button`,{type:`submit`,className:`primary`,disabled:o||!r.trim(),children:o?`Starting…`:`Run`})]}),a&&(0,y.jsx)(`p`,{className:`console-note`,children:a}),u&&(0,y.jsx)(`p`,{className:`inline-error`,role:`alert`,children:u})]})}function k(e,t,n,r){let[i,a]=(0,b.useState)({text:``,more:!1,problem:``}),o=(0,b.useRef)(0);return(0,b.useEffect)(()=>{if(!r)return;let i=!0,s,c=async()=>{try{for(;;){if(o.current>=x.shownBytes){a(e=>({...e,more:!0}));return}let r=await e.call(`console.output`,{projectId:t,commandId:n.commandId,offset:o.current,maxBytes:65536});if(!i)return;if(o.current=r.nextOffset,a(e=>({text:e.text+r.text,more:!1,problem:``})),!r.more)break}}catch(e){i&&a(t=>({...t,problem:S(e)}))}i&&n.state===`running`&&(s=setTimeout(c,x.pollMs))};return c(),()=>{i=!1,clearTimeout(s)}},[e,t,n.commandId,n.state,r]),i}var A=e=>e.state===`running`?`Running`:e.state===`stopped`?`Stopped`:e.state===`continuing`?`Still running outside Rho`:e.state===`unknown`?`Outcome unknown`:e.state===`not-started`?`Did not start`:e.exit?.signal?`Ended by `+e.exit.signal:`Exit `+(e.exit?.code??`?`);function j({record:e,client:t,projectId:n,made:r,after:i,onRunAgain:a,onStop:o}){N();let[s,c]=(0,b.useState)(e.state===`running`),[l,u]=(0,b.useState)(Date.now()),d=k(t,n,e,s),f=e.state===`running`;(0,b.useEffect)(()=>{if(!f)return;let e=setInterval(()=>u(Date.now()),1e3);return()=>clearInterval(e)},[f]);let p=(e.endedAt?Date.parse(e.endedAt):l)-Date.parse(e.startedAt),m=e.state===`exited`&&e.exit?.code===0,h=[m?``:A(e),p>=1e3?T(p):``].filter(Boolean).join(` · `);return(0,y.jsxs)(`li`,{className:`console-command mine`+(r||f?` made`:``)+(!m&&!f?` problem`:``),children:[(0,y.jsxs)(`details`,{open:s,onToggle:e=>c(e.currentTarget.open),children:[(0,y.jsxs)(`summary`,{children:[(0,y.jsx)(`span`,{className:`console-time`,children:w(Date.parse(e.startedAt))}),(0,y.jsx)(`span`,{className:`console-what`,title:e.command,children:(0,y.jsx)(`code`,{className:`alone`,children:e.command})}),(0,y.jsx)(`span`,{className:`console-end`+(f?` running`:m?``:` problem`),children:h})]}),(0,y.jsxs)(`div`,{className:`console-detail`,children:[e.cwd&&(0,y.jsxs)(`p`,{className:`console-note`,children:[`In `,e.cwd,`/`]}),d.text?(0,y.jsx)(`pre`,{className:`console-output`,ref:e=>{e&&f&&(e.scrollTop=e.scrollHeight)},children:d.text}):(0,y.jsx)(`p`,{className:`console-note`,children:f?`Waiting for output…`:d.problem?``:`It printed nothing.`}),d.more&&(0,y.jsxs)(`p`,{className:`console-note`,children:[`Showing the first `,(x.shownBytes/1024).toFixed(0),` KiB of `,e.kept.toLocaleString(`en-US`),` kept bytes.`]}),e.cut&&!f&&(0,y.jsxs)(`p`,{className:`console-note`,children:[`It printed `,e.bytes.toLocaleString(`en-US`),` bytes; the middle was not kept.`]}),e.problem&&(0,y.jsx)(`p`,{className:`console-note`,children:e.problem}),d.problem&&(0,y.jsx)(`p`,{className:`inline-error`,role:`alert`,children:d.problem}),!f&&e.state!==`continuing`&&(0,y.jsx)(`div`,{className:`console-actions`,children:(0,y.jsx)(`button`,{className:`text-button console-again`,onClick:()=>a(e),children:`Run again`})})]})]}),i,f&&(0,y.jsx)(`div`,{className:`console-actions`,children:(0,y.jsx)(`button`,{className:`text-button console-again`,disabled:!!e.stop,onClick:()=>o(e),children:e.stop?`Stopping…`:`Stop`})})]})}var M=`.console-command { border-top: 1px solid var(--color-divider); }
3
3
  .console-command summary { display: grid; grid-template-columns: 4.6em minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 8px 6px; margin: 0 -6px; border-radius: 6px; cursor: pointer; list-style: none; }
4
4
  .console-command summary:hover { background: var(--color-hover); }
@@ -30,6 +30,6 @@ import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{n,t as r}from".
30
30
  .console-time { display: none; }
31
31
  .console-detail, .console-command > .console-actions { margin-left: 0; }
32
32
  }
33
- `;function N(){if(typeof document>`u`||document.querySelector(`style[data-owner="rho-plugins.console"]`))return;let e=document.createElement(`style`);e.dataset.owner=`rho-plugins.console`,e.textContent=M,document.head.append(e)}var P=(0,b.createContext)(null),F=e=>`studio-`+s(e).slice(5,17),I=()=>(0,b.useContext)(P),L=e({CommandPane:()=>X,ConsolePage:()=>J}),R=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hourCycle:`h23`}),z=e=>e.outcome===`returned`&&(!e.end||/^exit 0\b/i.test(e.end)),B=e=>e.outcome===`failed`||e.outcome===`rejected`||e.outcome===`unknown`||/^exit [1-9]/i.test(e.end??``),V=e=>!/<<-?\s*['"]?\w+['"]?\s*$/.test(e.trim());function H({runs:e,root:t,onPath:n,onRunAgain:r}){let i=e.flatMap(e=>e.purpose?[e.purpose]:u(p(e.command,t)).split(` → `)).filter((e,t,n)=>n.indexOf(e)===t),a=e.reduce((e,t)=>e+(t.durationMs??0),0);return(0,y.jsx)(`li`,{className:`console-command console-quiet-row`,children:(0,y.jsxs)(`details`,{children:[(0,y.jsxs)(`summary`,{children:[(0,y.jsx)(`span`,{className:`console-time`,children:R(e[0].at)}),(0,y.jsx)(`span`,{className:`console-what`,children:(0,y.jsx)(`span`,{className:`console-purpose`,children:i.join(` · `)})}),(0,y.jsxs)(`span`,{className:`console-end`,children:[e.length,` commands`,a?` · `+f(a):``]})]}),(0,y.jsx)(`ol`,{className:`console-list`,children:e.map(e=>(0,y.jsx)(K,{node:e,changed:[],root:t,onPath:n,onRunAgain:r},e.id))})]})})}function U(e,t){let n=new Map(e.nodes.map(e=>[e.id,e])),r=[];for(let i of[...t].sort((e,t)=>e.at-t.at)){let t=e.edges.filter(e=>e.from===i.id&&e.label===`changed while it ran`).map(e=>n.get(e.to)).filter(e=>!!e&&!!e.category);if(!t.length&&i.outcome!==`requested`&&z(i)){let e=r.at(-1);if(e?.quiet){e.quiet.push(i);continue}r.push({at:i.at,key:`quiet-`+i.id,quiet:[i]})}else r.push({at:i.at,key:i.id,agent:i,changed:t})}return r}function W({item:e,root:t,onPath:n,onRunAgain:r}){if(e.quiet&&e.quiet.length>1)return(0,y.jsx)(H,{runs:e.quiet,root:t,onPath:n,onRunAgain:r});let i=e.quiet?.[0]??e.agent;return(0,y.jsx)(K,{node:i,changed:e.changed??[],root:t,onPath:n,open:i.outcome===`requested`,onRunAgain:r})}var G=({files:e,onPath:t})=>e.length>0?(0,y.jsxs)(`div`,{className:`console-changed`,children:[(0,y.jsx)(`span`,{children:`Changed while it ran`}),e.map(e=>(0,y.jsxs)(`button`,{className:`work-file`,title:e.path,onClick:()=>t(e.path),children:[(0,y.jsx)(a,{name:c(e.path),size:13,stroke:1.7}),(0,y.jsx)(`span`,{children:e.name})]},e.path))]}):null;function K({node:e,changed:t,root:n,onPath:r,open:i,onRunAgain:a}){let o=e.ran??e.command,s=p(e.command,n),c=e.outcome===`requested`,d=B(e),m=c?`Running`:e.outcome===`rejected`?`Refused`:e.outcome===`unknown`?`Outcome unknown`:d?e.end??`Failed`:null,h=e.durationMs?f(e.durationMs):``,g=a&&!c&&(V(o)?(0,y.jsx)(`button`,{className:`text-button console-again`,onClick:()=>a(o,`the Agent's command at `+R(e.at)),children:`Run again`}):(0,y.jsx)(`span`,{className:`console-note`,children:`Only its first line was recorded, so it cannot run again from here.`}));return(0,y.jsxs)(`li`,{className:`console-command`+(t.length?` made`:``)+(d?` problem`:``),children:[(0,y.jsxs)(`details`,{open:i,children:[(0,y.jsxs)(`summary`,{children:[(0,y.jsx)(`span`,{className:`console-time`,children:R(e.at)}),(0,y.jsx)(`span`,{className:`console-what`,title:o,children:e.purpose?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`span`,{className:`console-purpose`,children:e.purpose}),(0,y.jsx)(`code`,{children:s})]}):l(s)?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`code`,{className:`alone`,children:u(s)}),(0,y.jsx)(`code`,{children:s})]}):(0,y.jsx)(`code`,{className:`alone`,children:s})}),(0,y.jsx)(`span`,{className:`console-end`+(c?` running`:d?` problem`:``),children:[m,h].filter(Boolean).join(` · `)})]}),(0,y.jsxs)(`div`,{className:`console-detail`,children:[(s.includes(`
34
- `)||s.length>90||o!==e.command)&&(0,y.jsx)(`pre`,{className:`console-ran`,children:p(o,n)}),e.output?.text?(0,y.jsxs)(`pre`,{className:`console-output`,ref:e=>{e&&c&&(e.scrollTop=e.scrollHeight)},children:[e.output.text,e.output.cut?`
35
- …`:``]}):(0,y.jsx)(`p`,{className:`console-note`,children:c?`Running…`:`No output was reported.`}),g&&(0,y.jsx)(`div`,{className:`console-actions`,children:g})]})]}),(0,y.jsx)(G,{files:t.map(e=>({path:e.path,name:e.title})),onPath:r})]})}function q({graph:e,turn:t,root:n,onPath:r,onConversation:i,focused:a,onRunAgain:o}){let s=e.nodes.find(e=>e.id===`q:`+t.id),c=e.nodes.filter(e=>e.kind===`run`&&e.turn===t.id),l=U(e,c),u=new Set(l.flatMap(e=>(e.changed??[]).map(e=>e.path))),d=c.filter(B).length,f=(0,b.useRef)(null);return(0,b.useEffect)(()=>{a&&f.current?.scrollIntoView({block:`start`})},[a]),c.length?(0,y.jsxs)(`section`,{ref:f,className:`console-message`+(a?` focused`:``),"aria-label":s?.title??`A message`,children:[(0,y.jsxs)(`header`,{children:[(0,y.jsx)(`button`,{className:`text-button console-ask`,title:s?.text,onClick:()=>i(t.conversationId),children:s?.title??`A message`}),(0,y.jsxs)(`small`,{children:[t.agent,` · `,m(new Date(t.start).toISOString()),` · `,c.length,` `,c.length===1?`command`:`commands`,u.size?` · ${u.size} ${u.size===1?`file`:`files`} changed`:``,d?` · ${d} did not end cleanly`:``,t.running?` · working`:``]})]}),(0,y.jsx)(`ol`,{className:`console-list`,children:l.map(e=>(0,y.jsx)(W,{item:e,root:n,onPath:r,onRunAgain:o},e.key))})]}):null}function J({client:e,snapshot:t,files:n,focusTurn:r,onPath:s,onConversation:c,children:l}){let u=t.project.id,{turns:f,loading:p,problem:x,omitted:S}=v(e,t),C=(0,b.useMemo)(()=>d({turns:f,files:n.files.map(e=>({path:e.path,bytes:e.bytes,modifiedAt:e.modifiedAt,category:e.category})),project:t.project,kindOf:o,now:Date.now()}),[f,n.files,t.project]),{runs:w,problem:T,readAgain:k}=h(e,u,t.cursor),{commands:A,off:j,problem:M,read:N}=E(e,u,t.cursor),P=D(e,u,{onRan:()=>void N(),center:!0}),[F,I]=(0,b.useState)(null),L=(0,b.useRef)(null);(0,b.useEffect)(()=>{F&&!L.current?.open&&L.current?.showModal()},[F]);let R=(A??[]).filter(e=>e.state!==`running`).length;(0,b.useEffect)(()=>{A&&n.refresh()},[R]);let z=e=>{let t=Date.parse(e.startedAt),r=e.endedAt?Date.parse(e.endedAt)+1e3:Date.now();return n.files.filter(e=>e.category&&e.modifiedAt&&Date.parse(e.modifiedAt)>=t-1e3&&Date.parse(e.modifiedAt)<=r).slice(0,8)},B=[...C.turns].sort((e,t)=>t.start-e.start).filter(e=>C.nodes.some(t=>t.kind===`run`&&t.turn===e.id)),V=[];for(let e of[...B.map(e=>({at:e.start,turn:e})),...(A??[]).map(e=>({at:Date.parse(e.startedAt),record:e}))].sort((e,t)=>t.at-e.at))if(`turn`in e)V.push({kind:`message`,at:e.at,turn:e.turn});else{let t=V.at(-1);t?.kind===`mine`?t.records.push(e.record):V.push({kind:`mine`,at:e.at,records:[e.record]})}let H=[...w??[]].sort((e,t)=>t.acceptedAt.localeCompare(e.acceptedAt)),U=!p&&!V.length&&!H.length;return(0,y.jsxs)(`div`,{className:`console-page`,children:[l,!j&&(0,y.jsx)(O,{folder:i(t.project),line:P}),j&&(0,y.jsx)(`p`,{className:`console-note`,children:`Running commands here needs the Console plugin, which is off for this project.`}),M&&!j&&(0,y.jsx)(`p`,{className:`inline-error`,role:`alert`,children:M}),x&&(0,y.jsx)(`p`,{className:`inline-error`,role:`alert`,children:x}),p&&(0,y.jsx)(`p`,{className:`muted`,role:`status`,children:`Reading the conversations…`}),U&&(0,y.jsx)(`div`,{className:`empty-state compact`,children:(0,y.jsx)(`p`,{children:`No commands yet. The commands the Agent runs here, and the ones you run, appear in this list.`})}),V.map(n=>n.kind===`message`?(0,y.jsx)(q,{graph:C,turn:n.turn,root:t.project.root,onPath:s,onConversation:c,focused:r===n.turn.id,onRunAgain:j?void 0:P.prepare},n.turn.id):(0,y.jsxs)(`section`,{className:`console-message mine`,"aria-label":`Your commands`,children:[(0,y.jsxs)(`header`,{children:[(0,y.jsx)(`strong`,{children:`You ran`}),(0,y.jsxs)(`small`,{children:[m(n.records.at(-1).startedAt),` · `,n.records.length,` `,n.records.length===1?`command`:`commands`,n.records.some(e=>e.state===`running`)?` · running`:``]})]}),(0,y.jsx)(`ol`,{className:`console-list`,children:n.records.map(t=>(0,y.jsx)(Y,{record:t,client:e,projectId:u,changed:z(t),onPath:s,line:P},t.commandId))})]},n.records[0].commandId)),S>0&&(0,y.jsxs)(`p`,{className:`console-note`,children:[S,` earlier `,S===1?`message is`:`messages are`,` not read here.`]}),(H.length>0||T)&&(0,y.jsxs)(`section`,{className:`console-message`,"aria-label":`Managed runs`,children:[(0,y.jsxs)(`header`,{children:[(0,y.jsx)(`strong`,{children:`Managed runs`}),(0,y.jsx)(`small`,{children:`Runs Rho submitted to Core, with their retained request and output`})]}),T&&(0,y.jsx)(`p`,{className:`inline-error`,role:`alert`,children:T}),(0,y.jsx)(`ol`,{className:`console-list`,children:H.map(e=>(0,y.jsx)(`li`,{className:`console-command made`,children:(0,y.jsxs)(`button`,{className:`console-managed`,onClick:()=>I(e.operationId),children:[(0,y.jsx)(`span`,{className:`console-time`,children:new Date(e.acceptedAt).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`})}),(0,y.jsx)(`code`,{children:e.script??e.action}),(0,y.jsxs)(`span`,{className:`console-end `+e.execution,children:[g(e.execution),` · `,e.operationId]})]})},e.operationId))})]}),F&&(0,y.jsxs)(`dialog`,{ref:L,className:`run-dialog`,"aria-label":F,onClose:()=>I(null),onClick:e=>{e.target===e.currentTarget&&e.currentTarget.close()},children:[(0,y.jsx)(`button`,{className:`icon-button run-dialog-close`,"aria-label":`Close`,onClick:()=>L.current?.close(),children:(0,y.jsx)(a,{name:`close`,size:18})}),(0,y.jsx)(_,{snapshot:t,client:e,operationId:F,runs:w,readRuns:k,onOpenRun:I,opener:()=>null},F)]})]})}function Y({record:e,client:t,projectId:n,changed:r,onPath:i,line:a}){return(0,y.jsx)(j,{record:e,client:t,projectId:n,made:r.length>0,after:(0,y.jsx)(G,{files:r,onPath:i}),onRunAgain:e=>void a.start(e.command),onStop:e=>void a.stop(e)})}function X({client:e,snapshot:t}){let n=I(),r=t.project.id,{commands:a,off:o,problem:s,read:c}=E(e,r,t.cursor),l=(0,b.useRef)(null),u=(0,b.useRef)(!0),d=D(e,r,{onRan:()=>{u.current=!0,c()}}),f=n?.graph,p=n?.at??null,m=(0,b.useMemo)(()=>{if(!f||!n)return[];let e=f.turns.filter(e=>e.conversationId===n.conversationId),t=Math.min(...e.map(e=>e.start)),r=U(f,f.nodes.filter(t=>t.kind===`run`&&e.some(e=>e.id===t.turn)));for(let e of a??[]){let n=Date.parse(e.startedAt);n>=t&&(p===null||n<=p)&&r.push({at:n,key:e.commandId,mine:e})}return r.sort((e,t)=>e.at-t.at)},[f,a,p,n?.conversationId]);(0,b.useEffect)(()=>{let e=l.current;e&&u.current&&(e.scrollTop=e.scrollHeight)},[m]);let h=(a??[]).filter(e=>e.state!==`running`).length;(0,b.useEffect)(()=>{a&&c()},[h]);let g=e=>n?.showPath(e),_=e=>{let t=Date.parse(e.startedAt),r=e.endedAt?Date.parse(e.endedAt)+1e3:Date.now();return(n?.files??[]).filter(e=>e.versions.some(e=>e.at>=t-1e3&&e.at<=r)).map(e=>({path:e.path,name:e.title}))};return n?(0,y.jsxs)(`div`,{className:`command-pane`,children:[(0,y.jsxs)(`ol`,{ref:l,className:`console-list command-pane-list`,onScroll:e=>{let t=e.currentTarget;u.current=t.scrollHeight-t.scrollTop-t.clientHeight<24},children:[!m.length&&(0,y.jsx)(`li`,{className:`console-note`,children:`No commands yet. The commands the Agent runs in this conversation appear here, and you can run your own below.`}),m.map(n=>n.mine?(0,y.jsx)(Y,{record:n.mine,client:e,projectId:r,changed:_(n.mine),onPath:g,line:d},n.key):(0,y.jsx)(W,{item:n,root:t.project.root,onPath:g,onRunAgain:p===null&&!o?d.prepare:void 0},n.key))]}),p===null?o?(0,y.jsx)(`p`,{className:`console-note`,children:`Running commands here needs the Console plugin, which is off for this project.`}):(0,y.jsx)(O,{folder:i(t.project),line:d,problem:s}):(0,y.jsx)(`p`,{className:`console-note command-pane-replay`,children:`Replaying · commands run from here use the project as it is now.`})]}):(0,y.jsx)(`p`,{className:`console-note`,children:`Commands show in a conversation's Studio.`})}export{I as a,F as i,L as n,P as r,X as t};
33
+ `;function N(){if(typeof document>`u`||document.querySelector(`style[data-owner="rho-plugins.console"]`))return;let e=document.createElement(`style`);e.dataset.owner=`rho-plugins.console`,e.textContent=M,document.head.append(e)}var P=(0,b.createContext)(null),F=e=>`studio-`+s(e).slice(5,17),I=()=>(0,b.useContext)(P),L=e({CommandPane:()=>X,ConsolePage:()=>J}),R=e=>new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hourCycle:`h23`}),z=e=>e.outcome===`returned`&&(!e.end||/^exit 0\b/i.test(e.end)),B=e=>e.outcome===`failed`||e.outcome===`rejected`||e.outcome===`unknown`||/^exit [1-9]/i.test(e.end??``),V=e=>!/<<-?\s*['"]?\w+['"]?\s*$/.test(e.trim());function H({runs:e,root:t,onPath:n,onRunAgain:r}){let i=e.flatMap(e=>e.purpose?[e.purpose]:l(d(e.command,t)).split(` → `)).filter((e,t,n)=>n.indexOf(e)===t),a=e.reduce((e,t)=>e+(t.durationMs??0),0);return(0,y.jsx)(`li`,{className:`console-command console-quiet-row`,children:(0,y.jsxs)(`details`,{children:[(0,y.jsxs)(`summary`,{children:[(0,y.jsx)(`span`,{className:`console-time`,children:R(e[0].at)}),(0,y.jsx)(`span`,{className:`console-what`,children:(0,y.jsx)(`span`,{className:`console-purpose`,children:i.join(` · `)})}),(0,y.jsxs)(`span`,{className:`console-end`,children:[e.length,` commands`,a?` · `+u(a):``]})]}),(0,y.jsx)(`ol`,{className:`console-list`,children:e.map(e=>(0,y.jsx)(K,{node:e,changed:[],root:t,onPath:n,onRunAgain:r},e.id))})]})})}function U(e,t){let n=new Map(e.nodes.map(e=>[e.id,e])),r=[];for(let i of[...t].sort((e,t)=>e.at-t.at)){let t=e.edges.filter(e=>e.from===i.id&&e.label===`changed while it ran`).map(e=>n.get(e.to)).filter(e=>!!e&&!!e.category);if(!t.length&&i.outcome!==`requested`&&z(i)){let e=r.at(-1);if(e?.quiet){e.quiet.push(i);continue}r.push({at:i.at,key:`quiet-`+i.id,quiet:[i]})}else r.push({at:i.at,key:i.id,agent:i,changed:t})}return r}function W({item:e,root:t,onPath:n,onRunAgain:r}){if(e.quiet&&e.quiet.length>1)return(0,y.jsx)(H,{runs:e.quiet,root:t,onPath:n,onRunAgain:r});let i=e.quiet?.[0]??e.agent;return(0,y.jsx)(K,{node:i,changed:e.changed??[],root:t,onPath:n,open:i.outcome===`requested`,onRunAgain:r})}var G=({files:e,onPath:t})=>e.length>0?(0,y.jsxs)(`div`,{className:`console-changed`,children:[(0,y.jsx)(`span`,{children:`Changed while it ran`}),e.map(e=>(0,y.jsxs)(`button`,{className:`work-file`,title:e.path,onClick:()=>t(e.path),children:[(0,y.jsx)(a,{name:f(e.path),size:13,stroke:1.7}),(0,y.jsx)(`span`,{children:e.name})]},e.path))]}):null;function K({node:e,changed:t,root:n,onPath:r,open:i,onRunAgain:a}){let o=e.ran??e.command,s=d(e.command,n),c=e.outcome===`requested`,f=B(e),p=c?`Running`:e.outcome===`rejected`?`Refused`:e.outcome===`unknown`?`Outcome unknown`:f?e.end??`Failed`:null,h=e.durationMs?u(e.durationMs):``,g=a&&!c&&(V(o)?(0,y.jsx)(`button`,{className:`text-button console-again`,onClick:()=>a(o,`the Agent's command at `+R(e.at)),children:`Run again`}):(0,y.jsx)(`span`,{className:`console-note`,children:`Only its first line was recorded, so it cannot run again from here.`}));return(0,y.jsxs)(`li`,{className:`console-command`+(t.length?` made`:``)+(f?` problem`:``),children:[(0,y.jsxs)(`details`,{open:i,children:[(0,y.jsxs)(`summary`,{children:[(0,y.jsx)(`span`,{className:`console-time`,children:R(e.at)}),(0,y.jsx)(`span`,{className:`console-what`,title:o,children:e.purpose?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`span`,{className:`console-purpose`,children:e.purpose}),(0,y.jsx)(`code`,{children:s})]}):m(s)?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`code`,{className:`alone`,children:l(s)}),(0,y.jsx)(`code`,{children:s})]}):(0,y.jsx)(`code`,{className:`alone`,children:s})}),(0,y.jsx)(`span`,{className:`console-end`+(c?` running`:f?` problem`:``),children:[p,h].filter(Boolean).join(` · `)})]}),(0,y.jsxs)(`div`,{className:`console-detail`,children:[(s.includes(`
34
+ `)||s.length>90||o!==e.command)&&(0,y.jsx)(`pre`,{className:`console-ran`,children:d(o,n)}),e.output?.text?(0,y.jsxs)(`pre`,{className:`console-output`,ref:e=>{e&&c&&(e.scrollTop=e.scrollHeight)},children:[e.output.text,e.output.cut?`
35
+ …`:``]}):(0,y.jsx)(`p`,{className:`console-note`,children:c?`Running…`:`No output was reported.`}),g&&(0,y.jsx)(`div`,{className:`console-actions`,children:g})]})]}),(0,y.jsx)(G,{files:t.map(e=>({path:e.path,name:e.title})),onPath:r})]})}function q({graph:e,turn:t,root:n,onPath:r,onConversation:i,focused:a,onRunAgain:o}){let s=e.nodes.find(e=>e.id===`q:`+t.id),c=e.nodes.filter(e=>e.kind===`run`&&e.turn===t.id),l=U(e,c),u=new Set(l.flatMap(e=>(e.changed??[]).map(e=>e.path))),d=c.filter(B).length,f=(0,b.useRef)(null);return(0,b.useEffect)(()=>{a&&f.current?.scrollIntoView({block:`start`})},[a]),c.length?(0,y.jsxs)(`section`,{ref:f,className:`console-message`+(a?` focused`:``),"aria-label":s?.title??`A message`,children:[(0,y.jsxs)(`header`,{children:[(0,y.jsx)(`button`,{className:`text-button console-ask`,title:s?.text,onClick:()=>i(t.conversationId),children:s?.title??`A message`}),(0,y.jsxs)(`small`,{children:[t.agent,` · `,p(new Date(t.start).toISOString()),` · `,c.length,` `,c.length===1?`command`:`commands`,u.size?` · ${u.size} ${u.size===1?`file`:`files`} changed`:``,d?` · ${d} did not end cleanly`:``,t.running?` · working`:``]})]}),(0,y.jsx)(`ol`,{className:`console-list`,children:l.map(e=>(0,y.jsx)(W,{item:e,root:n,onPath:r,onRunAgain:o},e.key))})]}):null}function J({client:e,snapshot:t,files:n,focusTurn:r,onPath:s,onConversation:l,children:u}){let d=t.project.id,{turns:f,loading:m,problem:x,omitted:S}=v(e,t),C=(0,b.useMemo)(()=>c({turns:f,files:n.files.map(e=>({path:e.path,bytes:e.bytes,modifiedAt:e.modifiedAt,category:e.category})),project:t.project,kindOf:o,now:Date.now()}),[f,n.files,t.project]),{runs:w,problem:T,readAgain:k}=h(e,d,t.cursor),{commands:A,off:j,problem:M,read:N}=E(e,d,t.cursor),P=D(e,d,{onRan:()=>void N(),center:!0}),[F,I]=(0,b.useState)(null),L=(0,b.useRef)(null);(0,b.useEffect)(()=>{F&&!L.current?.open&&L.current?.showModal()},[F]);let R=(A??[]).filter(e=>e.state!==`running`).length;(0,b.useEffect)(()=>{A&&n.refresh()},[R]);let z=e=>{let t=Date.parse(e.startedAt),r=e.endedAt?Date.parse(e.endedAt)+1e3:Date.now();return n.files.filter(e=>e.category&&e.modifiedAt&&Date.parse(e.modifiedAt)>=t-1e3&&Date.parse(e.modifiedAt)<=r).slice(0,8)},B=[...C.turns].sort((e,t)=>t.start-e.start).filter(e=>C.nodes.some(t=>t.kind===`run`&&t.turn===e.id)),V=[];for(let e of[...B.map(e=>({at:e.start,turn:e})),...(A??[]).map(e=>({at:Date.parse(e.startedAt),record:e}))].sort((e,t)=>t.at-e.at))if(`turn`in e)V.push({kind:`message`,at:e.at,turn:e.turn});else{let t=V.at(-1);t?.kind===`mine`?t.records.push(e.record):V.push({kind:`mine`,at:e.at,records:[e.record]})}let H=[...w??[]].sort((e,t)=>t.acceptedAt.localeCompare(e.acceptedAt)),U=!m&&!x&&!T&&!M&&!V.length&&!H.length;return(0,y.jsxs)(`div`,{className:`console-page`,children:[u,!j&&(0,y.jsx)(O,{folder:i(t.project),line:P}),j&&(0,y.jsx)(`p`,{className:`console-note`,children:`Running commands here needs the Console plugin, which is off for this project.`}),M&&!j&&(0,y.jsx)(`p`,{className:`inline-error`,role:`alert`,children:M}),x&&(0,y.jsx)(`p`,{className:`inline-error`,role:`alert`,children:x}),m&&(0,y.jsx)(`p`,{className:`muted`,role:`status`,children:`Reading the conversations…`}),U&&(0,y.jsx)(`div`,{className:`empty-state compact`,children:(0,y.jsx)(`p`,{children:`No shell commands recorded. R and Python cells run through the shared sessions are kept in Notebook.`})}),V.map(n=>n.kind===`message`?(0,y.jsx)(q,{graph:C,turn:n.turn,root:t.project.root,onPath:s,onConversation:l,focused:r===n.turn.id,onRunAgain:j?void 0:P.prepare},n.turn.id):(0,y.jsxs)(`section`,{className:`console-message mine`,"aria-label":`Your commands`,children:[(0,y.jsxs)(`header`,{children:[(0,y.jsx)(`strong`,{children:`You ran`}),(0,y.jsxs)(`small`,{children:[p(n.records.at(-1).startedAt),` · `,n.records.length,` `,n.records.length===1?`command`:`commands`,n.records.some(e=>e.state===`running`)?` · running`:``]})]}),(0,y.jsx)(`ol`,{className:`console-list`,children:n.records.map(t=>(0,y.jsx)(Y,{record:t,client:e,projectId:d,changed:z(t),onPath:s,line:P},t.commandId))})]},n.records[0].commandId)),S>0&&(0,y.jsxs)(`p`,{className:`console-note`,children:[S,` earlier `,S===1?`message is`:`messages are`,` not read here.`]}),(H.length>0||T)&&(0,y.jsxs)(`section`,{className:`console-message`,"aria-label":`Managed runs`,children:[(0,y.jsxs)(`header`,{children:[(0,y.jsx)(`strong`,{children:`Managed runs`}),(0,y.jsx)(`small`,{children:`Runs Rho submitted to Core, with their retained request and output`})]}),T&&(0,y.jsx)(`p`,{className:`inline-error`,role:`alert`,children:T}),(0,y.jsx)(`ol`,{className:`console-list`,children:H.map(e=>(0,y.jsx)(`li`,{className:`console-command made`,children:(0,y.jsxs)(`button`,{className:`console-managed`,onClick:()=>I(e.operationId),children:[(0,y.jsx)(`span`,{className:`console-time`,children:new Date(e.acceptedAt).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`})}),(0,y.jsx)(`code`,{children:e.script??e.action}),(0,y.jsxs)(`span`,{className:`console-end `+e.execution,children:[g(e.execution),` · `,e.operationId]})]})},e.operationId))})]}),F&&(0,y.jsxs)(`dialog`,{ref:L,className:`run-dialog`,"aria-label":F,onClose:()=>I(null),onClick:e=>{e.target===e.currentTarget&&e.currentTarget.close()},children:[(0,y.jsx)(`button`,{className:`icon-button run-dialog-close`,"aria-label":`Close`,onClick:()=>L.current?.close(),children:(0,y.jsx)(a,{name:`close`,size:18})}),(0,y.jsx)(_,{snapshot:t,client:e,operationId:F,runs:w,readRuns:k,onOpenRun:I,opener:()=>null},F)]})]})}function Y({record:e,client:t,projectId:n,changed:r,onPath:i,line:a}){return(0,y.jsx)(j,{record:e,client:t,projectId:n,made:r.length>0,after:(0,y.jsx)(G,{files:r,onPath:i}),onRunAgain:e=>void a.start(e.command),onStop:e=>void a.stop(e)})}function X({client:e,snapshot:t}){let n=I(),r=t.project.id,{commands:a,off:o,problem:s,read:c}=E(e,r,t.cursor),l=(0,b.useRef)(null),u=(0,b.useRef)(!0),d=D(e,r,{onRan:()=>{u.current=!0,c()}}),f=n?.graph,p=n?.at??null,m=(0,b.useMemo)(()=>{if(!f||!n)return[];let e=f.turns.filter(e=>e.conversationId===n.conversationId),t=Math.min(...e.map(e=>e.start)),r=U(f,f.nodes.filter(t=>t.kind===`run`&&e.some(e=>e.id===t.turn)));for(let e of a??[]){let n=Date.parse(e.startedAt);n>=t&&(p===null||n<=p)&&r.push({at:n,key:e.commandId,mine:e})}return r.sort((e,t)=>e.at-t.at)},[f,a,p,n?.conversationId]);(0,b.useEffect)(()=>{let e=l.current;e&&u.current&&(e.scrollTop=e.scrollHeight)},[m]);let h=(a??[]).filter(e=>e.state!==`running`).length;(0,b.useEffect)(()=>{a&&c()},[h]);let g=e=>n?.showPath(e),_=e=>{let t=Date.parse(e.startedAt),r=e.endedAt?Date.parse(e.endedAt)+1e3:Date.now();return(n?.files??[]).filter(e=>e.versions.some(e=>e.at>=t-1e3&&e.at<=r)).map(e=>({path:e.path,name:e.title}))};return n?(0,y.jsxs)(`div`,{className:`command-pane`,children:[(0,y.jsxs)(`ol`,{ref:l,className:`console-list command-pane-list`,onScroll:e=>{let t=e.currentTarget;u.current=t.scrollHeight-t.scrollTop-t.clientHeight<24},children:[!m.length&&(0,y.jsx)(`li`,{className:`console-note`,children:`No commands yet. The commands the Agent runs in this conversation appear here, and you can run your own below.`}),m.map(n=>n.mine?(0,y.jsx)(Y,{record:n.mine,client:e,projectId:r,changed:_(n.mine),onPath:g,line:d},n.key):(0,y.jsx)(W,{item:n,root:t.project.root,onPath:g,onRunAgain:p===null&&!o?d.prepare:void 0},n.key))]}),p===null?o?(0,y.jsx)(`p`,{className:`console-note`,children:`Running commands here needs the Console plugin, which is off for this project.`}):(0,y.jsx)(O,{folder:i(t.project),line:d,problem:s}):(0,y.jsx)(`p`,{className:`console-note command-pane-replay`,children:`Replaying · commands run from here use the project as it is now.`})]}):(0,y.jsx)(`p`,{className:`console-note`,children:`Commands show in a conversation's Studio.`})}export{I as a,F as i,L as n,P as r,X as t};