@marimo-team/frontend 0.15.4 → 0.16.0-dev96986

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 (325) hide show
  1. package/dist/assets/ConnectedDataExplorerComponent-CNLoZkWr.js +19 -0
  2. package/dist/assets/{ImageComparisonComponent-CEXMKKA4.js → ImageComparisonComponent-SX7fDaTK.js} +1 -1
  3. package/dist/assets/{VegaLite-Bt14Ds9k.js → VegaLite-MJUW3b7C.js} +6 -6
  4. package/dist/assets/_baseEach-9_logFrf.js +1 -0
  5. package/dist/assets/_baseMap-NzEbKt5c.js +1 -0
  6. package/dist/assets/_baseUniq-C5LFcyNC.js +1 -0
  7. package/dist/assets/_createAggregator-ZRm2b6Zm.js +1 -0
  8. package/dist/assets/agent-panel-BBd11wNX.js +287 -0
  9. package/dist/assets/agent-panel-D92Mfy1i.css +1 -0
  10. package/dist/assets/{any-language-editor-DiwNT6zp.js → any-language-editor-DwAaEQfS.js} +1 -1
  11. package/dist/assets/architectureDiagram-W76B3OCA-BJmVXUoW.js +36 -0
  12. package/dist/assets/{between-horizontal-start-FyewyCGn.js → between-horizontal-start-KiwU-a3C.js} +1 -1
  13. package/dist/assets/{blockDiagram-QIGZ2CNN-BrOkAf_c.js → blockDiagram-QIGZ2CNN-DzxZjE7B.js} +1 -1
  14. package/dist/assets/{c4Diagram-FPNF74CW-BHPzDxE2.js → c4Diagram-FPNF74CW-DjmldG_J.js} +5 -5
  15. package/dist/assets/channel-DHcKBVM4.js +1 -0
  16. package/dist/assets/chat-panel-DgJZr0eS.js +3 -0
  17. package/dist/assets/{chunk-4BX2VUAB-DLxaCNYh.js → chunk-4BX2VUAB-EUTQThiZ.js} +1 -1
  18. package/dist/assets/{chunk-55IACEB6-DdzvO3HR.js → chunk-55IACEB6-DZAiDJxy.js} +1 -1
  19. package/dist/assets/{chunk-FMBD7UC4-R5o-nSiG.js → chunk-FMBD7UC4-Bd0Czs-J.js} +1 -1
  20. package/dist/assets/{chunk-K7UQS3LO-DxaMrGgG.js → chunk-K7UQS3LO-DEKMIknX.js} +1 -1
  21. package/dist/assets/{chunk-QN33PNHL-DqS9-FYm.js → chunk-QN33PNHL-E0jwHU_n.js} +1 -1
  22. package/dist/assets/{chunk-QZHKN3VN-BZ-TzajS.js → chunk-QZHKN3VN-BzaIHJbq.js} +1 -1
  23. package/dist/assets/{chunk-TVAH2DTR-BsgP2dyv.js → chunk-TVAH2DTR-CZFYvqnm.js} +1 -1
  24. package/dist/assets/{chunk-TZMSLE5B-D-h3ahXI.js → chunk-TZMSLE5B-BNqnFjtv.js} +1 -1
  25. package/dist/assets/{circle-play-CQtRZ-rT.js → circle-play-D3J_mYrF.js} +1 -1
  26. package/dist/assets/classDiagram-KNZD7YFC-D-xwLnlX.js +1 -0
  27. package/dist/assets/classDiagram-v2-RKCZMP56-D-xwLnlX.js +1 -0
  28. package/dist/assets/{clear-button-BY6Z_ViL.js → clear-button-ifzRuAR3.js} +1 -1
  29. package/dist/assets/clone-CSxIll62.js +1 -0
  30. package/dist/assets/command-palette-D2fdVSET.js +1 -0
  31. package/dist/assets/common-Ku-cF_2J.js +1 -0
  32. package/dist/assets/{compile-Ct_jzdKr.js → compile-BgZlHW1c.js} +1 -1
  33. package/dist/assets/cose-bilkent-S5V4N54A-CVM83SqK.js +1 -0
  34. package/dist/assets/dagre-5GWH7T2D-ouQPkxT3.js +4 -0
  35. package/dist/assets/{data-grid-overlay-editor-BN_wulc3.js → data-grid-overlay-editor-B47j5GJJ.js} +1 -1
  36. package/dist/assets/datasources-panel-Bt41Zir-.js +1 -0
  37. package/dist/assets/{dependency-graph-panel-BOmSCZf7.js → dependency-graph-panel-CZC_B7pK.js} +4 -4
  38. package/dist/assets/diagram-N5W7TBWH-CQ817ZdR.js +24 -0
  39. package/dist/assets/diagram-QEK2KX5R-DOK_psUO.js +43 -0
  40. package/dist/assets/diagram-S2PKOQOG-CVljmOW8.js +24 -0
  41. package/dist/assets/{documentation-panel-BxjJO_Gw.js → documentation-panel-C7yIvGg1.js} +1 -1
  42. package/dist/assets/edit-page-CyTMQV2u.js +129 -0
  43. package/dist/assets/{ellipsis-vertical-UHbmjI2n.js → ellipsis-vertical-C7FjlUsY.js} +1 -1
  44. package/dist/assets/{empty-state-BIBXzY_0.js → empty-state-DIOGM_CU.js} +1 -1
  45. package/dist/assets/{erDiagram-AWTI2OKA-E84mAle_.js → erDiagram-AWTI2OKA-DYu8cEdc.js} +1 -1
  46. package/dist/assets/{error-panel-MEvQ6K7h.js → error-panel-Ddb8RkFG.js} +1 -1
  47. package/dist/assets/file-explorer-panel-Oy9DbyFP.js +1 -0
  48. package/dist/assets/{flowDiagram-PVAE7QVJ-DfbIRSAW.js → flowDiagram-PVAE7QVJ-CmvW5iTb.js} +1 -1
  49. package/dist/assets/{ganttDiagram-OWAHRB6G-DR4HZ1z_.js → ganttDiagram-OWAHRB6G-BaKQlCaT.js} +4 -4
  50. package/dist/assets/gitGraphDiagram-NY62KEGX-CWO24eP6.js +65 -0
  51. package/dist/assets/{glide-data-editor-nNmo1lPq.js → glide-data-editor-CNDLEJ9a.js} +11 -11
  52. package/dist/assets/graph-BZKTtxsc.js +1 -0
  53. package/dist/assets/home-page-Bvwppn9N.js +9 -0
  54. package/dist/assets/{index-VPWqq2Pg.js → index-0XOUPdwT.js} +1 -1
  55. package/dist/assets/{index-uacyUula.js → index-BH7f3aiU.js} +1 -1
  56. package/dist/assets/{index-Dt9UWeWn.js → index-BJVyzkx5.js} +1 -1
  57. package/dist/assets/{index-BAH034Ue.js → index-B_d_JZGI.js} +1 -1
  58. package/dist/assets/{index-CB2pnVQG.js → index-BgXbBA39.js} +1 -1
  59. package/dist/assets/{index-B8llrTSo.js → index-Brf2DwUM.js} +1 -1
  60. package/dist/assets/{index-BLu5CX6z.js → index-CXrWwFX6.js} +1 -1
  61. package/dist/assets/{index-DyLSuOH1.js → index-CZaurnA9.js} +1 -1
  62. package/dist/assets/{index-BFSnz7iM.js → index-CerjupfZ.js} +1 -1
  63. package/dist/assets/{index-B7yXbrLa.js → index-D-tZfElD.js} +1 -1
  64. package/dist/assets/{index-c6If577Q.js → index-D3PqGupX.js} +1 -1
  65. package/dist/assets/{index-CSgxTUzD.js → index-DCkzth56.js} +1 -1
  66. package/dist/assets/{index-DWOaniGT.js → index-DFrGFNW1.js} +1 -1
  67. package/dist/assets/{index-CPN7TRA1.js → index-DZhOPkOB.js} +1 -1
  68. package/dist/assets/index-DadI618h.css +1 -0
  69. package/dist/assets/{index-DqzMPAC8.js → index-DkntzpX4.js} +2 -2
  70. package/dist/assets/{index-B1_GXGaP.js → index-DmgwT3sx.js} +1 -1
  71. package/dist/assets/index-PmY0x4Zd.js +578 -0
  72. package/dist/assets/{index-Bq516OmX.js → index-WXJFkQHg.js} +1 -1
  73. package/dist/assets/{index-DSU75csX.js → index-qE8lHQ-N.js} +1 -1
  74. package/dist/assets/{index-DMomwMcN.js → index-zrSUQXha.js} +1 -1
  75. package/dist/assets/infoDiagram-STP46IZ2-CAuVVehw.js +2 -0
  76. package/dist/assets/isEmpty-D1t7Gran.js +1 -0
  77. package/dist/assets/{journeyDiagram-BIP6EPQ6-BBiFyygf.js → journeyDiagram-BIP6EPQ6-D4Rp6H_h.js} +1 -1
  78. package/dist/assets/{kanban-definition-6OIFK2YF-DhgA6Nt6.js → kanban-definition-6OIFK2YF-DFt9DftA.js} +4 -4
  79. package/dist/assets/layout-D8WXi2_g.js +1 -0
  80. package/dist/assets/linear-BwY8e5hA.js +1 -0
  81. package/dist/assets/links-4B6ldZ5P.js +7 -0
  82. package/dist/assets/{logs-panel-B9SmTZAW.js → logs-panel-Dxiyt7dO.js} +1 -1
  83. package/dist/assets/{agent-panel-DpQ6muj-.css → markdown-renderer-ClyzDMmG.css} +1 -1
  84. package/dist/assets/markdown-renderer-VDu-NBKB.js +263 -0
  85. package/dist/assets/mermaid-B-O-Puyi.js +1 -0
  86. package/dist/assets/{mermaid.core-4nVOEVX3.js → mermaid.core-BFFCqfOn.js} +41 -41
  87. package/dist/assets/min-DtVSfYKl.js +1 -0
  88. package/dist/assets/{mindmap-definition-Q6HEUPPD-CVLQNn1q.js → mindmap-definition-Q6HEUPPD-kyvIY8Dg.js} +2 -2
  89. package/dist/assets/{number-overlay-editor-CzRzXLcd.js → number-overlay-editor-GjLB2UK4.js} +1 -1
  90. package/dist/assets/outline-panel-CMJjOoN7.js +1 -0
  91. package/dist/assets/packages-panel-nfXB-bKW.js +1 -0
  92. package/dist/assets/{pieDiagram-ADFJNKIX-C5IQ5DBZ.js → pieDiagram-ADFJNKIX-D8JFQcWR.js} +3 -3
  93. package/dist/assets/{quadrantDiagram-LMRXKWRM-CFXFnQxx.js → quadrantDiagram-LMRXKWRM-Nf8GzxXG.js} +1 -1
  94. package/dist/assets/{react-plotly-mzdv02_Y.js → react-plotly-CnW9p7ZA.js} +1 -1
  95. package/dist/assets/{requirementDiagram-4UW4RH46-D9bPC89T.js → requirementDiagram-4UW4RH46-CCUxF8BZ.js} +1 -1
  96. package/dist/assets/run-page-Bl4p3AbZ.js +1 -0
  97. package/dist/assets/sankeyDiagram-GR3RE2ED-Sr8kDwP1.js +10 -0
  98. package/dist/assets/scratchpad-panel-Ja1Mu-W3.js +1 -0
  99. package/dist/assets/secrets-panel-B-3fcSyP.js +1 -0
  100. package/dist/assets/{sequenceDiagram-C3RYC4MD-6N7_hY4k.js → sequenceDiagram-C3RYC4MD-CBJ152Q3.js} +4 -4
  101. package/dist/assets/{slides-component-DMjQomc3.css → slides-component-C-LoGC1U.css} +1 -1
  102. package/dist/assets/{slides-component-EcjC8sDK.js → slides-component-DGtsVP5o.js} +1 -1
  103. package/dist/assets/snippets-panel-ClNnwKBM.js +1 -0
  104. package/dist/assets/sortBy-D47H6Vyl.js +1 -0
  105. package/dist/assets/state-B_RCHTH5.js +1 -0
  106. package/dist/assets/stateDiagram-KXAO66HF-BlBFSAZr.js +1 -0
  107. package/dist/assets/stateDiagram-v2-UMBNRL4Z-DbA-iToo.js +1 -0
  108. package/dist/assets/storage-BNcWOH3-.js +26 -0
  109. package/dist/assets/terminal-CATzv5Hd.js +10 -0
  110. package/dist/assets/time-CsYqILfB.js +1 -0
  111. package/dist/assets/{timeline-definition-XQNQX7LJ-BEaynAiY.js → timeline-definition-XQNQX7LJ-CGrhjuAs.js} +1 -1
  112. package/dist/assets/tracing-DUbJtOyq.js +2 -0
  113. package/dist/assets/{tracing-panel-BmuHLPrY.js → tracing-panel-DmzqPUtc.js} +2 -2
  114. package/dist/assets/{trash-UBqfK4mR.js → trash-rxdjLzkf.js} +1 -1
  115. package/dist/assets/{tree-XiEycetl.js → tree-C2Ul1h1C.js} +1 -1
  116. package/dist/assets/{treemap-75Q7IDZK-CnuVFbBG.js → treemap-75Q7IDZK-N9hyUpyj.js} +20 -20
  117. package/dist/assets/{ts-tags-CloPe9IY.js → ts-tags-DxCDHihD.js} +1 -1
  118. package/dist/assets/variable-panel-BbgupOdG.js +1 -0
  119. package/dist/assets/{vega-component-DsTH4tuX.js → vega-component-CR_MHOBT.js} +1 -1
  120. package/dist/assets/worker-fHbtoWvT.js +1 -0
  121. package/dist/assets/{xychartDiagram-6GGTOJPD-Dcz3O-A3.js → xychartDiagram-6GGTOJPD-jdLZsMb2.js} +1 -1
  122. package/dist/index.html +2 -2
  123. package/package.json +10 -5
  124. package/src/__tests__/mocks.ts +43 -0
  125. package/src/components/app-config/user-config-form.tsx +78 -1
  126. package/src/components/chat/acp/__tests__/__snapshots__/prompt.test.ts.snap +116 -65
  127. package/src/components/chat/acp/__tests__/atoms.test.ts +1 -1
  128. package/src/components/chat/acp/__tests__/context-utils.test.ts +222 -0
  129. package/src/components/chat/acp/__tests__/prompt.test.ts +1 -1
  130. package/src/components/chat/acp/__tests__/state.test.ts +38 -42
  131. package/src/components/chat/acp/agent-docs.tsx +33 -6
  132. package/src/components/chat/acp/agent-panel.css +0 -18
  133. package/src/components/chat/acp/agent-panel.tsx +394 -72
  134. package/src/components/chat/acp/agent-selector.tsx +7 -1
  135. package/src/components/chat/acp/blocks.tsx +40 -10
  136. package/src/components/chat/acp/common.tsx +10 -2
  137. package/src/components/chat/acp/context-utils.ts +127 -0
  138. package/src/components/chat/acp/prompt.ts +96 -53
  139. package/src/components/chat/acp/state.ts +1 -1
  140. package/src/components/chat/acp/types.ts +8 -0
  141. package/src/components/chat/chat-panel.tsx +28 -89
  142. package/src/components/chat/chat-utils.ts +127 -1
  143. package/src/components/chat/markdown-renderer.css +39 -0
  144. package/src/components/chat/markdown-renderer.tsx +12 -47
  145. package/src/components/chat/tool-call-accordion.tsx +148 -26
  146. package/src/components/data-table/SearchBar.tsx +8 -7
  147. package/src/components/data-table/__tests__/column_formatting.test.ts +50 -35
  148. package/src/components/data-table/__tests__/data-table.test.tsx +39 -1
  149. package/src/components/data-table/cell-hover-template/feature.ts +14 -0
  150. package/src/components/data-table/cell-hover-template/types.ts +11 -0
  151. package/src/components/data-table/charts/components/form-fields.tsx +41 -37
  152. package/src/components/data-table/charts/forms/common-chart.tsx +2 -2
  153. package/src/components/data-table/column-explorer-panel/column-explorer.tsx +5 -2
  154. package/src/components/data-table/column-formatting/feature.ts +62 -29
  155. package/src/components/data-table/column-formatting/types.ts +1 -0
  156. package/src/components/data-table/column-header.tsx +3 -1
  157. package/src/components/data-table/column-summary/chart-spec-model.tsx +24 -7
  158. package/src/components/data-table/column-summary/column-summary.tsx +18 -9
  159. package/src/components/data-table/columns.tsx +42 -18
  160. package/src/components/data-table/data-table.tsx +10 -2
  161. package/src/components/data-table/date-popover.tsx +85 -75
  162. package/src/components/data-table/filter-pills.tsx +14 -9
  163. package/src/components/data-table/header-items.tsx +5 -1
  164. package/src/components/data-table/pagination.tsx +20 -13
  165. package/src/components/data-table/renderers.tsx +28 -0
  166. package/src/components/data-table/row-viewer-panel/row-viewer.tsx +10 -8
  167. package/src/components/datasources/column-preview.tsx +6 -2
  168. package/src/components/datasources/datasources.tsx +8 -12
  169. package/src/components/editor/Cell.tsx +6 -0
  170. package/src/components/editor/actions/name-cell-input.tsx +6 -1
  171. package/src/components/editor/actions/useCellActionButton.tsx +3 -1
  172. package/src/components/editor/ai/__tests__/completion-utils.test.ts +178 -1
  173. package/src/components/editor/ai/add-cell-with-ai.tsx +68 -66
  174. package/src/components/editor/ai/ai-completion-editor.tsx +29 -26
  175. package/src/components/editor/ai/completion-handlers.tsx +44 -6
  176. package/src/components/editor/ai/completion-utils.ts +92 -0
  177. package/src/components/editor/ai/transport/chat-transport.tsx +39 -0
  178. package/src/components/editor/cell/CellStatus.tsx +23 -20
  179. package/src/components/editor/cell/CreateCellButton.tsx +3 -4
  180. package/src/components/editor/cell/StagedAICell.tsx +51 -0
  181. package/src/components/editor/cell/cell-actions.tsx +2 -1
  182. package/src/components/editor/cell/code/language-toggle.tsx +3 -4
  183. package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +39 -28
  184. package/src/components/editor/controls/notebook-menu-dropdown.tsx +4 -2
  185. package/src/components/editor/file-tree/requesting-tree.tsx +14 -8
  186. package/src/components/editor/renderers/CellArray.tsx +3 -4
  187. package/src/components/editor/renderers/slides-layout/slides-layout.tsx +3 -3
  188. package/src/components/editor/renderers/slides-layout/types.ts +1 -0
  189. package/src/components/pages/home-page.tsx +4 -1
  190. package/src/components/slides/slides-component.tsx +1 -1
  191. package/src/components/slides/slides.css +6 -0
  192. package/src/components/terminal/__tests__/state.test.ts +207 -0
  193. package/src/components/terminal/hooks.ts +41 -0
  194. package/src/components/terminal/state.ts +75 -0
  195. package/src/components/terminal/terminal.tsx +334 -13
  196. package/src/components/terminal/theme.tsx +57 -0
  197. package/src/components/tracing/tracing-spec.ts +5 -4
  198. package/src/components/ui/range-slider.tsx +4 -2
  199. package/src/components/ui/slider.tsx +3 -1
  200. package/src/components/variables/variables-table.tsx +3 -0
  201. package/src/core/MarimoApp.tsx +9 -6
  202. package/src/core/ai/__tests__/staged-cells.test.ts +356 -0
  203. package/src/core/ai/context/__tests__/registry.test.ts +6 -4
  204. package/src/core/ai/context/providers/cell-output.ts +3 -2
  205. package/src/core/ai/context/providers/error.ts +3 -1
  206. package/src/core/ai/context/providers/file.ts +7 -2
  207. package/src/core/ai/context/providers/tables.ts +3 -2
  208. package/src/core/ai/context/providers/variable.ts +6 -4
  209. package/src/core/ai/staged-cells.ts +208 -0
  210. package/src/core/cells/cells.ts +1 -1
  211. package/src/core/cells/logs.ts +1 -1
  212. package/src/core/codemirror/find-replace/search-highlight.ts +3 -1
  213. package/src/core/codemirror/language/LanguageAdapters.ts +9 -3
  214. package/src/core/codemirror/lsp/federated-lsp.ts +1 -1
  215. package/src/core/codemirror/lsp/notebook-lsp.ts +8 -2
  216. package/src/core/codemirror/readonly/__tests__/extension.test.ts +1 -1
  217. package/src/core/codemirror/rtc/loro/awareness.ts +52 -17
  218. package/src/core/codemirror/rtc/loro/sync.ts +12 -4
  219. package/src/core/config/config-schema.ts +1 -0
  220. package/src/core/config/config.ts +4 -0
  221. package/src/core/hotkeys/hotkeys.ts +8 -4
  222. package/src/core/i18n/__tests__/locale-provider.test.tsx +176 -0
  223. package/src/core/i18n/locale-provider.tsx +35 -0
  224. package/src/core/i18n/with-locale.tsx +12 -0
  225. package/src/core/islands/components/web-components.tsx +13 -10
  226. package/src/core/islands/main.ts +2 -2
  227. package/src/core/kernel/RuntimeState.ts +4 -1
  228. package/src/core/kernel/messages.ts +8 -12
  229. package/src/core/network/DeferredRequestRegistry.ts +16 -4
  230. package/src/core/runtime/runtime.ts +5 -4
  231. package/src/core/saving/__tests__/filename.test.ts +37 -0
  232. package/src/core/static/__tests__/download-html.test.ts +43 -1
  233. package/src/core/wasm/bridge.ts +5 -1
  234. package/src/core/wasm/store.ts +4 -1
  235. package/src/core/wasm/worker/message-buffer.ts +3 -2
  236. package/src/core/websocket/types.ts +22 -16
  237. package/src/core/websocket/useMarimoWebSocket.tsx +2 -2
  238. package/src/css/app/Cell.css +11 -0
  239. package/src/hooks/useFormatting.ts +97 -0
  240. package/src/hooks/useTimer.ts +8 -5
  241. package/src/plugins/core/RenderHTML.tsx +36 -2
  242. package/src/plugins/core/__test__/RenderHTML.test.ts +72 -0
  243. package/src/plugins/core/registerReactComponent.tsx +44 -10
  244. package/src/plugins/impl/DataTablePlugin.tsx +4 -0
  245. package/src/plugins/impl/FileBrowserPlugin.tsx +8 -2
  246. package/src/plugins/impl/RangeSliderPlugin.tsx +5 -3
  247. package/src/plugins/impl/SliderPlugin.tsx +3 -1
  248. package/src/plugins/impl/anywidget/model.ts +16 -5
  249. package/src/plugins/impl/data-editor/types.ts +7 -5
  250. package/src/plugins/impl/data-explorer/components/column-summary.tsx +20 -13
  251. package/src/plugins/impl/panel/utils.ts +6 -4
  252. package/src/plugins/layout/OutlinePlugin.tsx +69 -0
  253. package/src/plugins/layout/StatPlugin.tsx +4 -1
  254. package/src/plugins/plugins.ts +2 -0
  255. package/src/stories/cell.stories.tsx +1 -1
  256. package/src/stories/layout/vertical/one-column.stories.tsx +1 -1
  257. package/src/utils/__tests__/cell-urls.test.ts +29 -0
  258. package/src/utils/__tests__/dates.test.ts +45 -24
  259. package/src/utils/__tests__/filenames.test.ts +18 -0
  260. package/src/utils/__tests__/numbers.test.ts +42 -30
  261. package/src/utils/__tests__/once.test.ts +187 -0
  262. package/src/utils/__tests__/path.test.ts +38 -0
  263. package/src/utils/__tests__/urls.test.ts +56 -1
  264. package/src/utils/dates.ts +15 -10
  265. package/src/utils/edit-distance.ts +8 -6
  266. package/src/utils/errors.ts +9 -0
  267. package/src/utils/id-tree.tsx +21 -10
  268. package/src/utils/localStorage.ts +13 -4
  269. package/src/utils/numbers.ts +11 -11
  270. package/src/utils/once.ts +32 -0
  271. package/src/utils/paths.ts +4 -1
  272. package/src/utils/pluralize.ts +12 -5
  273. package/src/utils/python-poet/poet.ts +30 -15
  274. package/src/utils/time.ts +5 -1
  275. package/dist/assets/ConnectedDataExplorerComponent-Cn5-l2X1.js +0 -19
  276. package/dist/assets/_baseEach-C1FLm7WW.js +0 -1
  277. package/dist/assets/_baseMap-DBVArUYD.js +0 -1
  278. package/dist/assets/_baseUniq-Dk7ZPJ3N.js +0 -1
  279. package/dist/assets/_createAggregator-Bn38fDd3.js +0 -1
  280. package/dist/assets/agent-panel-COUYnuIK.js +0 -475
  281. package/dist/assets/architectureDiagram-W76B3OCA-DBzWQKKu.js +0 -36
  282. package/dist/assets/channel-CjhbjOv4.js +0 -1
  283. package/dist/assets/chat-panel-BPXKoTnZ.js +0 -7
  284. package/dist/assets/chat-panel-Brrs_eeH.css +0 -1
  285. package/dist/assets/classDiagram-KNZD7YFC-DHs5cFzy.js +0 -1
  286. package/dist/assets/classDiagram-v2-RKCZMP56-DHs5cFzy.js +0 -1
  287. package/dist/assets/clone-DM1YNjEn.js +0 -1
  288. package/dist/assets/command-palette-S0bzQp7v.js +0 -1
  289. package/dist/assets/common-B8U9k2Ly.js +0 -1
  290. package/dist/assets/cose-bilkent-S5V4N54A-wz1Sfx7j.js +0 -1
  291. package/dist/assets/dagre-5GWH7T2D-BfpcVBgq.js +0 -4
  292. package/dist/assets/datasources-panel-DfuURLJw.js +0 -1
  293. package/dist/assets/diagram-N5W7TBWH-Bf0oqqQh.js +0 -24
  294. package/dist/assets/diagram-QEK2KX5R-ZTc3qikh.js +0 -43
  295. package/dist/assets/diagram-S2PKOQOG-tLScBy7Z.js +0 -24
  296. package/dist/assets/edit-page-DJ8kJZ9w.js +0 -129
  297. package/dist/assets/file-explorer-panel-CzNUJ63G.js +0 -1
  298. package/dist/assets/gitGraphDiagram-NY62KEGX-C1t6QtVa.js +0 -65
  299. package/dist/assets/graph-CssCVWIq.js +0 -1
  300. package/dist/assets/home-page-9eW6qida.js +0 -9
  301. package/dist/assets/index-CknhX2Vy.css +0 -1
  302. package/dist/assets/index-DcCIe7np.js +0 -28
  303. package/dist/assets/index-OC46250R.js +0 -570
  304. package/dist/assets/infoDiagram-STP46IZ2-CwiAoz9f.js +0 -2
  305. package/dist/assets/layout-DpQrxGW-.js +0 -1
  306. package/dist/assets/linear-NsreOeBF.js +0 -1
  307. package/dist/assets/links-CbvGxbsJ.js +0 -7
  308. package/dist/assets/mermaid-DSt0r6IQ.js +0 -1
  309. package/dist/assets/min-D259kI3t.js +0 -1
  310. package/dist/assets/outline-panel-uvsS-YEQ.js +0 -1
  311. package/dist/assets/packages-panel-xMz9W2hW.js +0 -1
  312. package/dist/assets/run-page-Bb68qdhQ.js +0 -1
  313. package/dist/assets/sankeyDiagram-GR3RE2ED-BSJOau8E.js +0 -10
  314. package/dist/assets/scratchpad-panel-BF4BO-U4.js +0 -1
  315. package/dist/assets/secrets-panel-CdIX44dQ.js +0 -1
  316. package/dist/assets/snippets-panel-Dco9h0rb.js +0 -1
  317. package/dist/assets/sortBy-aLGA-PGK.js +0 -1
  318. package/dist/assets/stateDiagram-KXAO66HF-Bd68WT3b.js +0 -1
  319. package/dist/assets/stateDiagram-v2-UMBNRL4Z-BXz_GSwb.js +0 -1
  320. package/dist/assets/storage-CGlP4lCF.js +0 -26
  321. package/dist/assets/terminal-CxkHubcu.js +0 -9
  322. package/dist/assets/time-D2nr1UgQ.js +0 -1
  323. package/dist/assets/tracing-kTqHxa7q.js +0 -2
  324. package/dist/assets/variable-panel-noTnH-AQ.js +0 -1
  325. package/dist/assets/worker-X5rxzQGQ.js +0 -1
@@ -0,0 +1,222 @@
1
+ /* Copyright 2024 Marimo. All rights reserved. */
2
+
3
+ import { beforeEach, describe, expect, it, type Mocked, vi } from "vitest";
4
+ import {
5
+ convertFilesToResourceLinks,
6
+ parseContextFromPrompt,
7
+ } from "../context-utils";
8
+
9
+ // Mock dependencies
10
+ vi.mock("@/utils/fileToBase64", () => ({
11
+ blobToString: vi.fn(),
12
+ }));
13
+
14
+ vi.mock("@/core/ai/context/context", () => ({
15
+ getAIContextRegistry: vi.fn(),
16
+ }));
17
+
18
+ vi.mock("@/core/state/jotai", () => ({
19
+ store: {},
20
+ }));
21
+
22
+ vi.mock("@/utils/Logger", () => ({
23
+ Logger: {
24
+ error: vi.fn(),
25
+ debug: vi.fn(),
26
+ },
27
+ }));
28
+
29
+ import { getAIContextRegistry } from "@/core/ai/context/context";
30
+ import type {
31
+ AIContextItem,
32
+ AIContextRegistry,
33
+ ContextLocatorId,
34
+ } from "@/core/ai/context/registry";
35
+ import { blobToString } from "@/utils/fileToBase64";
36
+
37
+ const CONTEXT_ID = "context1" as ContextLocatorId;
38
+
39
+ describe("convertFilesToResourceLinks", () => {
40
+ beforeEach(() => {
41
+ vi.clearAllMocks();
42
+ });
43
+
44
+ it("should convert files to resource links", async () => {
45
+ const mockFile = new File(["content"], "test.txt", { type: "text/plain" });
46
+ vi.mocked(blobToString).mockResolvedValue(
47
+ "data:text/plain;base64,Y29udGVudA==",
48
+ );
49
+
50
+ const result = await convertFilesToResourceLinks([mockFile]);
51
+
52
+ expect(result).toEqual([
53
+ {
54
+ type: "resource_link",
55
+ uri: "data:text/plain;base64,Y29udGVudA==",
56
+ mimeType: "text/plain",
57
+ name: "test.txt",
58
+ },
59
+ ]);
60
+ });
61
+
62
+ it("should handle empty file array", async () => {
63
+ const result = await convertFilesToResourceLinks([]);
64
+ expect(result).toEqual([]);
65
+ });
66
+
67
+ it("should handle file conversion errors gracefully", async () => {
68
+ const mockFile = new File(["content"], "test.txt", { type: "text/plain" });
69
+ vi.mocked(blobToString).mockRejectedValue(new Error("Conversion failed"));
70
+
71
+ const result = await convertFilesToResourceLinks([mockFile]);
72
+
73
+ expect(result).toEqual([]);
74
+ });
75
+
76
+ it("should process multiple files", async () => {
77
+ const file1 = new File(["content1"], "test1.txt", { type: "text/plain" });
78
+ const file2 = new File(["content2"], "test2.txt", { type: "text/plain" });
79
+
80
+ vi.mocked(blobToString)
81
+ .mockResolvedValueOnce("data:text/plain;base64,Y29udGVudDE=")
82
+ .mockResolvedValueOnce("data:text/plain;base64,Y29udGVudDI=");
83
+
84
+ const result = await convertFilesToResourceLinks([file1, file2]);
85
+
86
+ expect(result).toHaveLength(2);
87
+ expect((result[0] as { name: string }).name).toBe("test1.txt");
88
+ expect((result[1] as { name: string }).name).toBe("test2.txt");
89
+ });
90
+ });
91
+
92
+ describe("parseContextFromPrompt", () => {
93
+ const mockRegistry = {
94
+ parseAllContextIds: vi.fn(),
95
+ formatContextForAI: vi.fn(),
96
+ getAttachmentsForContext: vi.fn(),
97
+ } as unknown as Mocked<AIContextRegistry<AIContextItem>>;
98
+
99
+ beforeEach(() => {
100
+ vi.clearAllMocks();
101
+ vi.mocked(getAIContextRegistry).mockReturnValue(mockRegistry);
102
+ });
103
+
104
+ it("should return empty blocks when no @ symbol in prompt", async () => {
105
+ const result = await parseContextFromPrompt("simple prompt");
106
+
107
+ expect(result).toEqual({
108
+ contextBlocks: [],
109
+ attachmentBlocks: [],
110
+ });
111
+ });
112
+
113
+ it("should return empty blocks when no context IDs found", async () => {
114
+ mockRegistry.parseAllContextIds.mockReturnValue([]);
115
+
116
+ const result = await parseContextFromPrompt("prompt with @ but no context");
117
+
118
+ expect(result).toEqual({
119
+ contextBlocks: [],
120
+ attachmentBlocks: [],
121
+ });
122
+ });
123
+
124
+ it("should create context blocks when context IDs are found", async () => {
125
+ mockRegistry.parseAllContextIds.mockReturnValue([CONTEXT_ID]);
126
+ mockRegistry.formatContextForAI.mockReturnValue("formatted context");
127
+ mockRegistry.getAttachmentsForContext.mockResolvedValue([]);
128
+
129
+ const result = await parseContextFromPrompt("prompt with @context1");
130
+
131
+ expect(result.contextBlocks).toHaveLength(1);
132
+ expect(result.contextBlocks[0]).toEqual({
133
+ type: "resource",
134
+ resource: {
135
+ uri: "context.md",
136
+ mimeType: "text/markdown",
137
+ text: "formatted context",
138
+ },
139
+ });
140
+ expect(result.attachmentBlocks).toHaveLength(0);
141
+ });
142
+
143
+ it("should create attachment blocks when attachments are found", async () => {
144
+ mockRegistry.parseAllContextIds.mockReturnValue([CONTEXT_ID]);
145
+ mockRegistry.formatContextForAI.mockReturnValue("formatted context");
146
+ mockRegistry.getAttachmentsForContext.mockResolvedValue([
147
+ {
148
+ type: "file",
149
+ url: "http://example.com/file.pdf",
150
+ mediaType: "application/pdf",
151
+ filename: "file.pdf",
152
+ },
153
+ ]);
154
+
155
+ const result = await parseContextFromPrompt("prompt with @context1");
156
+
157
+ expect(result.contextBlocks).toHaveLength(1);
158
+ expect(result.attachmentBlocks).toHaveLength(1);
159
+ expect(result.attachmentBlocks[0]).toEqual({
160
+ type: "resource_link",
161
+ uri: "http://example.com/file.pdf",
162
+ mimeType: "application/pdf",
163
+ name: "file.pdf",
164
+ });
165
+ });
166
+
167
+ it("should handle empty context string gracefully", async () => {
168
+ mockRegistry.parseAllContextIds.mockReturnValue([CONTEXT_ID]);
169
+ mockRegistry.formatContextForAI.mockReturnValue(" ");
170
+ mockRegistry.getAttachmentsForContext.mockResolvedValue([]);
171
+
172
+ const result = await parseContextFromPrompt("prompt with @context1");
173
+
174
+ expect(result.contextBlocks).toHaveLength(0);
175
+ expect(result.attachmentBlocks).toHaveLength(0);
176
+ });
177
+
178
+ it("should handle registry errors gracefully", async () => {
179
+ vi.mocked(getAIContextRegistry).mockImplementation(() => {
180
+ throw new Error("Registry error");
181
+ });
182
+
183
+ const result = await parseContextFromPrompt("prompt with @context1");
184
+
185
+ expect(result).toEqual({
186
+ contextBlocks: [],
187
+ attachmentBlocks: [],
188
+ });
189
+ });
190
+
191
+ it("should handle attachment errors gracefully", async () => {
192
+ mockRegistry.parseAllContextIds.mockReturnValue([CONTEXT_ID]);
193
+ mockRegistry.formatContextForAI.mockReturnValue("formatted context");
194
+ mockRegistry.getAttachmentsForContext.mockRejectedValue(
195
+ new Error("Attachment error"),
196
+ );
197
+
198
+ const result = await parseContextFromPrompt("prompt with @context1");
199
+
200
+ expect(result.contextBlocks).toHaveLength(1);
201
+ expect(result.attachmentBlocks).toHaveLength(0);
202
+ });
203
+
204
+ it("should use url as name when filename is not provided", async () => {
205
+ mockRegistry.parseAllContextIds.mockReturnValue([CONTEXT_ID]);
206
+ mockRegistry.formatContextForAI.mockReturnValue("formatted context");
207
+ mockRegistry.getAttachmentsForContext.mockResolvedValue([
208
+ {
209
+ type: "file",
210
+ url: "http://example.com/file.pdf",
211
+ mediaType: "application/pdf",
212
+ filename: undefined,
213
+ },
214
+ ]);
215
+
216
+ const result = await parseContextFromPrompt("prompt with @context1");
217
+
218
+ expect((result.attachmentBlocks[0] as { name: string }).name).toBe(
219
+ "http://example.com/file.pdf",
220
+ );
221
+ });
222
+ });
@@ -1,4 +1,4 @@
1
- /* Copyright 2025 Marimo. All rights reserved. */
1
+ /* Copyright 2024 Marimo. All rights reserved. */
2
2
 
3
3
  import { describe, expect, it } from "vitest";
4
4
  import { getAgentPrompt } from "../prompt";
@@ -1,4 +1,4 @@
1
- /* Copyright 2025 Marimo. All rights reserved. */
1
+ /* Copyright 2024 Marimo. All rights reserved. */
2
2
 
3
3
  import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
4
4
  import {
@@ -100,8 +100,8 @@ describe("state utility functions", () => {
100
100
  agentId: "gemini",
101
101
  tabId: "tab_existing" as TabId,
102
102
  title: "Existing gemini session",
103
- createdAt: 1735689600000,
104
- lastUsedAt: 1735689600000,
103
+ createdAt: 1_735_689_600_000,
104
+ lastUsedAt: 1_735_689_600_000,
105
105
  externalAgentSessionId: null,
106
106
  };
107
107
  const initialState: AgentSessionState = {
@@ -139,8 +139,8 @@ describe("state utility functions", () => {
139
139
  agentId: "claude",
140
140
  tabId: "tab_existing" as TabId,
141
141
  title: "Existing claude session",
142
- createdAt: 1735689600000,
143
- lastUsedAt: 1735689600000,
142
+ createdAt: 1_735_689_600_000,
143
+ lastUsedAt: 1_735_689_600_000,
144
144
  externalAgentSessionId: null,
145
145
  };
146
146
  const initialState: AgentSessionState = {
@@ -194,24 +194,24 @@ describe("state utility functions", () => {
194
194
  agentId: "claude",
195
195
  tabId: "tab_1" as TabId,
196
196
  title: "Claude session 1",
197
- createdAt: 1735689600000,
198
- lastUsedAt: 1735689600000,
197
+ createdAt: 1_735_689_600_000,
198
+ lastUsedAt: 1_735_689_600_000,
199
199
  externalAgentSessionId: null,
200
200
  },
201
201
  {
202
202
  agentId: "gemini",
203
203
  tabId: "tab_2" as TabId,
204
204
  title: "Gemini session",
205
- createdAt: 1735689600000,
206
- lastUsedAt: 1735689600000,
205
+ createdAt: 1_735_689_600_000,
206
+ lastUsedAt: 1_735_689_600_000,
207
207
  externalAgentSessionId: null,
208
208
  },
209
209
  {
210
210
  agentId: "claude",
211
211
  tabId: "tab_3" as TabId,
212
212
  title: "Claude session 2",
213
- createdAt: 1735689600000,
214
- lastUsedAt: 1735689600000,
213
+ createdAt: 1_735_689_600_000,
214
+ lastUsedAt: 1_735_689_600_000,
215
215
  externalAgentSessionId: null,
216
216
  },
217
217
  ];
@@ -264,8 +264,8 @@ describe("state utility functions", () => {
264
264
  agentId: "claude",
265
265
  tabId: "tab_single" as TabId,
266
266
  title: "Single session",
267
- createdAt: 1735689600000,
268
- lastUsedAt: 1735689600000,
267
+ createdAt: 1_735_689_600_000,
268
+ lastUsedAt: 1_735_689_600_000,
269
269
  externalAgentSessionId: null,
270
270
  };
271
271
  const singleSessionState: AgentSessionState = {
@@ -297,16 +297,16 @@ describe("state utility functions", () => {
297
297
  agentId: "claude",
298
298
  tabId: "tab_1" as TabId,
299
299
  title: "Original title",
300
- createdAt: 1735689600000,
301
- lastUsedAt: 1735689600000,
300
+ createdAt: 1_735_689_600_000,
301
+ lastUsedAt: 1_735_689_600_000,
302
302
  externalAgentSessionId: null,
303
303
  },
304
304
  {
305
305
  agentId: "gemini",
306
306
  tabId: "tab_2" as TabId,
307
307
  title: "Another title",
308
- createdAt: 1735689600000,
309
- lastUsedAt: 1735689600000,
308
+ createdAt: 1_735_689_600_000,
309
+ lastUsedAt: 1_735_689_600_000,
310
310
  externalAgentSessionId: null,
311
311
  },
312
312
  ];
@@ -361,16 +361,16 @@ describe("state utility functions", () => {
361
361
  agentId: "claude",
362
362
  tabId: "tab_1" as TabId,
363
363
  title: "Claude session",
364
- createdAt: 1735689600000,
365
- lastUsedAt: 1735689600000,
364
+ createdAt: 1_735_689_600_000,
365
+ lastUsedAt: 1_735_689_600_000,
366
366
  externalAgentSessionId: null,
367
367
  },
368
368
  {
369
369
  agentId: "gemini",
370
370
  tabId: "tab_2" as TabId,
371
371
  title: "Gemini session",
372
- createdAt: 1735689600000,
373
- lastUsedAt: 1735689600000,
372
+ createdAt: 1_735_689_600_000,
373
+ lastUsedAt: 1_735_689_600_000,
374
374
  externalAgentSessionId: null,
375
375
  },
376
376
  ];
@@ -384,7 +384,7 @@ describe("state utility functions", () => {
384
384
  const originalTimestamp = sessions[0].lastUsedAt;
385
385
 
386
386
  // Advance time by 1 hour
387
- vi.advanceTimersByTime(3600000);
387
+ vi.advanceTimersByTime(3_600_000);
388
388
 
389
389
  const newState = updateSessionLastUsed(state, sessions[0].tabId);
390
390
 
@@ -405,7 +405,7 @@ describe("state utility functions", () => {
405
405
  const fakeId = "fake_session_id" as TabId;
406
406
  const originalTimestamp = sessions[0].lastUsedAt;
407
407
 
408
- vi.advanceTimersByTime(3600000);
408
+ vi.advanceTimersByTime(3_600_000);
409
409
 
410
410
  const newState = updateSessionLastUsed(state, fakeId);
411
411
 
@@ -424,16 +424,16 @@ describe("state utility functions", () => {
424
424
  agentId: "claude",
425
425
  tabId: "tab_1" as TabId,
426
426
  title: "Claude session",
427
- createdAt: 1735689600000,
428
- lastUsedAt: 1735689600000,
427
+ createdAt: 1_735_689_600_000,
428
+ lastUsedAt: 1_735_689_600_000,
429
429
  externalAgentSessionId: null,
430
430
  },
431
431
  {
432
432
  agentId: "gemini",
433
433
  tabId: "tab_2" as TabId,
434
434
  title: "Gemini session",
435
- createdAt: 1735689600000,
436
- lastUsedAt: 1735689600000,
435
+ createdAt: 1_735_689_600_000,
436
+ lastUsedAt: 1_735_689_600_000,
437
437
  externalAgentSessionId: null,
438
438
  },
439
439
  ];
@@ -448,7 +448,7 @@ describe("state utility functions", () => {
448
448
  const agentSessionId = "agent_session_123" as ExternalAgentSessionId;
449
449
 
450
450
  // Advance time by 1 hour
451
- vi.advanceTimersByTime(3600000);
451
+ vi.advanceTimersByTime(3_600_000);
452
452
 
453
453
  const newState = updateSessionExternalAgentSessionId(
454
454
  state,
@@ -498,32 +498,32 @@ describe("state utility functions", () => {
498
498
  agentId: "claude",
499
499
  tabId: "tab_1" as TabId,
500
500
  title: "First claude",
501
- createdAt: 1735689600000, // 2025-01-01T00:00:00Z
502
- lastUsedAt: 1735689600000,
501
+ createdAt: 1_735_689_600_000, // 2025-01-01T00:00:00Z
502
+ lastUsedAt: 1_735_689_600_000,
503
503
  externalAgentSessionId: null,
504
504
  },
505
505
  {
506
506
  agentId: "gemini",
507
507
  tabId: "tab_2" as TabId,
508
508
  title: "First gemini",
509
- createdAt: 1735693200000, // 2025-01-01T01:00:00Z
510
- lastUsedAt: 1735693200000,
509
+ createdAt: 1_735_693_200_000, // 2025-01-01T01:00:00Z
510
+ lastUsedAt: 1_735_693_200_000,
511
511
  externalAgentSessionId: null,
512
512
  },
513
513
  {
514
514
  agentId: "claude",
515
515
  tabId: "tab_3" as TabId,
516
516
  title: "Second claude",
517
- createdAt: 1735696800000, // 2025-01-01T02:00:00Z
518
- lastUsedAt: 1735696800000,
517
+ createdAt: 1_735_696_800_000, // 2025-01-01T02:00:00Z
518
+ lastUsedAt: 1_735_696_800_000,
519
519
  externalAgentSessionId: null,
520
520
  },
521
521
  {
522
522
  agentId: "claude",
523
523
  tabId: "tab_4" as TabId,
524
524
  title: "Third claude",
525
- createdAt: 1735700400000, // 2025-01-01T03:00:00Z
526
- lastUsedAt: 1735700400000,
525
+ createdAt: 1_735_700_400_000, // 2025-01-01T03:00:00Z
526
+ lastUsedAt: 1_735_700_400_000,
527
527
  externalAgentSessionId: null,
528
528
  },
529
529
  ];
@@ -604,17 +604,13 @@ describe("state utility functions", () => {
604
604
  describe("getAgentConnectionCommand", () => {
605
605
  it("should return correct command for claude", () => {
606
606
  expect(getAgentConnectionCommand("claude")).toMatchInlineSnapshot(`
607
- "npx supergateway --stdio\\
608
- "npx @zed-industries/claude-code-acp" \\
609
- --outputTransport ws --port 3017 "
607
+ "npx stdio-to-ws "npx @zed-industries/claude-code-acp" --port 3017"
610
608
  `);
611
609
  });
612
610
 
613
611
  it("should return correct command for gemini", () => {
614
612
  expect(getAgentConnectionCommand("gemini")).toMatchInlineSnapshot(`
615
- "npx supergateway --stdio\\
616
- "npx @google/gemini-cli --experimental-acp" \\
617
- --outputTransport ws --port 3019 "
613
+ "npx stdio-to-ws "npx @google/gemini-cli --experimental-acp" --port 3019"
618
614
  `);
619
615
  });
620
616
  });
@@ -1,9 +1,14 @@
1
1
  /* Copyright 2024 Marimo. All rights reserved. */
2
2
 
3
- import { TerminalIcon } from "lucide-react";
3
+ import { useAtomValue } from "jotai";
4
+ import { TerminalIcon, TerminalSquareIcon } from "lucide-react";
4
5
  import { memo } from "react";
5
6
  import { AiProviderIcon } from "@/components/ai/ai-provider-icon";
6
7
  import { CopyClipboardIcon } from "@/components/icons/copy-icon";
8
+ import { useTerminalCommands } from "@/components/terminal/hooks";
9
+ import { Button } from "@/components/ui/button";
10
+ import { Tooltip } from "@/components/ui/tooltip";
11
+ import { capabilitiesAtom } from "@/core/config/capabilities";
7
12
  import { cn } from "@/utils/cn";
8
13
  import {
9
14
  type ExternalAgentId,
@@ -22,6 +27,12 @@ const AgentDocItem = memo<AgentDocItemProps>(
22
27
  ({ agentId, showCopy = true, className }) => {
23
28
  const command = getAgentConnectionCommand(agentId);
24
29
  const displayName = getAgentDisplayName(agentId);
30
+ const capabilities = useAtomValue(capabilitiesAtom);
31
+ const { sendCommand } = useTerminalCommands();
32
+
33
+ const handleSendToTerminal = () => {
34
+ sendCommand(command);
35
+ };
25
36
 
26
37
  return (
27
38
  <div className={cn("space-y-2", className)}>
@@ -32,12 +43,28 @@ const AgentDocItem = memo<AgentDocItemProps>(
32
43
  <div className="bg-muted/50 rounded-md p-2 border">
33
44
  <div className="flex items-start gap-2 text-xs">
34
45
  <TerminalIcon className="h-4 w-4 mt-0.5 text-muted-foreground flex-shrink-0" />
35
- <code className="text-xs font-mono break-all flex-1 whitespace-pre-wrap">
46
+ <code className="text-xs font-mono break-words flex-1 whitespace-pre-wrap">
36
47
  {command}
37
48
  </code>
38
- {showCopy && (
39
- <CopyClipboardIcon value={command} className="h-3 w-3" />
40
- )}
49
+ <div className="flex items-center gap-1 flex-shrink-0">
50
+ {showCopy && (
51
+ <Button size="xs" variant="outline" className="border">
52
+ <CopyClipboardIcon value={command} className="h-3 w-3" />
53
+ </Button>
54
+ )}
55
+ {capabilities.terminal && (
56
+ <Tooltip content="Run in terminal" delayDuration={100}>
57
+ <Button
58
+ onClick={handleSendToTerminal}
59
+ title="Send to terminal"
60
+ size="xs"
61
+ variant="outline"
62
+ >
63
+ <TerminalSquareIcon className="h-3 w-3" />
64
+ </Button>
65
+ </Tooltip>
66
+ )}
67
+ </div>
41
68
  </div>
42
69
  </div>
43
70
  </div>
@@ -48,7 +75,7 @@ AgentDocItem.displayName = "AgentDocItem";
48
75
 
49
76
  interface AgentDocsProps {
50
77
  title?: string;
51
- description?: string;
78
+ description?: React.ReactNode;
52
79
  agents?: ExternalAgentId[];
53
80
  showCopy?: boolean;
54
81
  className?: string;
@@ -1,23 +1,5 @@
1
- @source "../node_modules/streamdown/dist/index.js";
2
-
3
1
  .mo-agent-panel {
4
- /* Make headers a bit smaller */
5
- --text-2xl: 1rem;
6
- --text-3xl: 1rem;
7
-
8
2
  pre {
9
3
  width: 100%;
10
4
  }
11
-
12
- [data-code-block-container="true"] {
13
- margin-top: 0 !important;
14
- }
15
-
16
- [data-code-block-header="true"] {
17
- padding: 4px !important;
18
- }
19
-
20
- code {
21
- font-size: inherit !important;
22
- }
23
5
  }