@marimo-team/frontend 0.16.0 → 0.16.2

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 (284) hide show
  1. package/dist/assets/ConnectedDataExplorerComponent-B5cPvWoQ.js +19 -0
  2. package/dist/assets/{ImageComparisonComponent-fTHv1Ih0.js → ImageComparisonComponent-CqR26LSv.js} +1 -1
  3. package/dist/assets/{VegaLite-Bdi-TyfY.js → VegaLite-DvQDATwI.js} +1 -1
  4. package/dist/assets/_baseEach--KDTwKbG.js +1 -0
  5. package/dist/assets/_baseMap-Cu3o-eyO.js +1 -0
  6. package/dist/assets/{_baseUniq-CCgDNtZb.js → _baseUniq-y7ZXnMo1.js} +1 -1
  7. package/dist/assets/{_createAggregator-DcD0kTA5.js → _createAggregator-ZcHkHPNJ.js} +1 -1
  8. package/dist/assets/{agent-panel-Crv430aI.js → agent-panel-B91RoLct.js} +76 -57
  9. package/dist/assets/{any-language-editor-CQh552Wu.js → any-language-editor-CxfHcm5h.js} +1 -1
  10. package/dist/assets/{architectureDiagram-W76B3OCA-BAJeBxzt.js → architectureDiagram-W76B3OCA-BQsvK8uR.js} +1 -1
  11. package/dist/assets/{between-horizontal-start-Boxgxbt_.js → between-horizontal-start-BmYToIaM.js} +1 -1
  12. package/dist/assets/{blockDiagram-QIGZ2CNN-CL-1svEK.js → blockDiagram-QIGZ2CNN-r3HgCj4w.js} +1 -1
  13. package/dist/assets/{c4Diagram-FPNF74CW-BbEqbCTl.js → c4Diagram-FPNF74CW-BJbPNt41.js} +1 -1
  14. package/dist/assets/channel-DFaEx1fu.js +1 -0
  15. package/dist/assets/chat-panel-IoPMv8e2.js +3 -0
  16. package/dist/assets/{chunk-4BX2VUAB-C--8TXeE.js → chunk-4BX2VUAB-Dv4MZ9Hj.js} +1 -1
  17. package/dist/assets/{chunk-55IACEB6-Bj00HDqq.js → chunk-55IACEB6-CM4AHquB.js} +1 -1
  18. package/dist/assets/{chunk-FMBD7UC4-C-lhB6hN.js → chunk-FMBD7UC4-C_Zz0ENB.js} +1 -1
  19. package/dist/assets/{chunk-K7UQS3LO-B-pGTXPt.js → chunk-K7UQS3LO-DYSmiXYq.js} +1 -1
  20. package/dist/assets/{chunk-QN33PNHL-DqUzGhvm.js → chunk-QN33PNHL-QM4OPuQP.js} +1 -1
  21. package/dist/assets/{chunk-QZHKN3VN-TntJHfSk.js → chunk-QZHKN3VN-CfAsGyeB.js} +1 -1
  22. package/dist/assets/{chunk-TVAH2DTR-HUJb1psV.js → chunk-TVAH2DTR-6j_Cpjsi.js} +1 -1
  23. package/dist/assets/{chunk-TZMSLE5B-BK3C__t3.js → chunk-TZMSLE5B-BHslFJQE.js} +1 -1
  24. package/dist/assets/{circle-play-DBLOv1Yu.js → circle-play-CK3UZRYQ.js} +1 -1
  25. package/dist/assets/classDiagram-KNZD7YFC-BsZtvV5O.js +1 -0
  26. package/dist/assets/classDiagram-v2-RKCZMP56-BsZtvV5O.js +1 -0
  27. package/dist/assets/{clear-button-BeoFbEKH.js → clear-button-C4fDVSv8.js} +1 -1
  28. package/dist/assets/clone-YBEvPE-s.js +1 -0
  29. package/dist/assets/command-palette-D7hOfvf6.js +1 -0
  30. package/dist/assets/{common-C7oJcmCT.js → common-D-lbuUwz.js} +1 -1
  31. package/dist/assets/{compile-7L0MwhyI.js → compile-DVQe1Mzk.js} +1 -1
  32. package/dist/assets/{cose-bilkent-S5V4N54A-BMkGLcVC.js → cose-bilkent-S5V4N54A-D-IS7WC8.js} +1 -1
  33. package/dist/assets/{dagre-5GWH7T2D-BJtRienS.js → dagre-5GWH7T2D-lYu-tEWT.js} +1 -1
  34. package/dist/assets/{data-grid-overlay-editor-DBkmGtNs.js → data-grid-overlay-editor-C5peOCit.js} +1 -1
  35. package/dist/assets/datasources-panel-D3NA20uZ.js +1 -0
  36. package/dist/assets/{dependency-graph-panel-DEdOxp2X.js → dependency-graph-panel-BGVYOfkV.js} +1 -1
  37. package/dist/assets/{diagram-N5W7TBWH-CmECY3nb.js → diagram-N5W7TBWH-BnvIuYUp.js} +1 -1
  38. package/dist/assets/{diagram-QEK2KX5R-DMOVSNKD.js → diagram-QEK2KX5R-DemedRK3.js} +1 -1
  39. package/dist/assets/{diagram-S2PKOQOG-BiJ96PNQ.js → diagram-S2PKOQOG-iiY7AuyH.js} +1 -1
  40. package/dist/assets/{documentation-panel-xULhaEv3.js → documentation-panel-C3dSwOSQ.js} +1 -1
  41. package/dist/assets/edit-page-C5TsEeSo.js +129 -0
  42. package/dist/assets/{ellipsis-vertical-BBqXIlc2.js → ellipsis-vertical-CazJl8M7.js} +1 -1
  43. package/dist/assets/{empty-state-B3dA3G5P.js → empty-state-DW308mFO.js} +1 -1
  44. package/dist/assets/{erDiagram-AWTI2OKA-MP1DiFRo.js → erDiagram-AWTI2OKA-6wQ8Ugg0.js} +1 -1
  45. package/dist/assets/{error-panel-Cc1sv-Ag.js → error-panel-D1VnJ1yP.js} +1 -1
  46. package/dist/assets/file-explorer-panel-0oVd4t-D.js +1 -0
  47. package/dist/assets/{flowDiagram-PVAE7QVJ-BX7caPp7.js → flowDiagram-PVAE7QVJ-C55IUWjm.js} +1 -1
  48. package/dist/assets/{ganttDiagram-OWAHRB6G-B462g4Yf.js → ganttDiagram-OWAHRB6G-DmqCM6ME.js} +4 -4
  49. package/dist/assets/{gitGraphDiagram-NY62KEGX-CGgvZ9-9.js → gitGraphDiagram-NY62KEGX-DBvhAeM_.js} +1 -1
  50. package/dist/assets/{glide-data-editor-C0gUFZON.js → glide-data-editor-CHNuHidQ.js} +4 -4
  51. package/dist/assets/{graph-CHRVBzY5.js → graph-CG6BgUWQ.js} +1 -1
  52. package/dist/assets/home-page-dgivXuSR.js +9 -0
  53. package/dist/assets/{index-Clbi_Yaq.js → index-BTGpssVX.js} +1 -1
  54. package/dist/assets/{index-CQDrxQ0j.js → index-BYVZlBF8.js} +1 -1
  55. package/dist/assets/{index-lYa_leQE.js → index-BelfnXwL.js} +1 -1
  56. package/dist/assets/{index-DRMm6SNo.js → index-BneyUujp.js} +1 -1
  57. package/dist/assets/{index-BY93Ejhl.js → index-C02SqeRj.js} +1 -1
  58. package/dist/assets/{index-C-8WADat.js → index-C7dtgr9A.js} +1 -1
  59. package/dist/assets/{index-D9UKkrr2.js → index-CAQvMTzM.js} +1 -1
  60. package/dist/assets/index-CGDMlQfO.css +1 -0
  61. package/dist/assets/index-CelXfcd8.js +580 -0
  62. package/dist/assets/{index-vmICa5KN.js → index-Csd6QrCV.js} +1 -1
  63. package/dist/assets/{index-DoRmcrKM.js → index-CtPksxf0.js} +1 -1
  64. package/dist/assets/{index-C1v_Z9et.js → index-Cxyk7pt-.js} +1 -1
  65. package/dist/assets/{index-CpTPJo4k.js → index-DAZ-9ri2.js} +1 -1
  66. package/dist/assets/{index-DEQvTChO.js → index-DONRrmA2.js} +1 -1
  67. package/dist/assets/{index-C4Tn5NvJ.js → index-Db36XTG_.js} +1 -1
  68. package/dist/assets/{index-z9bohSQJ.js → index-DdIhdEVw.js} +1 -1
  69. package/dist/assets/{index-C-GhZ7ti.js → index-M_pBKDSe.js} +1 -1
  70. package/dist/assets/{index-C77h_TXN.js → index-_luCZMLM.js} +1 -1
  71. package/dist/assets/{index-D1vmG6DS.js → index-mkubqy9-.js} +1 -1
  72. package/dist/assets/{index-BVgAenPd.js → index-sbO9UaUU.js} +1 -1
  73. package/dist/assets/{index-CWMgowgL.js → index-z4krxQ4j.js} +1 -1
  74. package/dist/assets/infoDiagram-STP46IZ2-wTALjfPc.js +2 -0
  75. package/dist/assets/{isEmpty-DU_ogP_D.js → isEmpty-CqX_YTIf.js} +1 -1
  76. package/dist/assets/{journeyDiagram-BIP6EPQ6-C6EgLP_Q.js → journeyDiagram-BIP6EPQ6-Y5w_Tqe_.js} +1 -1
  77. package/dist/assets/{kanban-definition-6OIFK2YF-BXzYO1yj.js → kanban-definition-6OIFK2YF-DbXs5Rxi.js} +1 -1
  78. package/dist/assets/{layout-jihVw5-i.js → layout-BCNPDACj.js} +1 -1
  79. package/dist/assets/{linear-C4blANlC.js → linear-uO6UVhXt.js} +1 -1
  80. package/dist/assets/links-Drv7cJgN.js +7 -0
  81. package/dist/assets/{logs-panel-D401qzZh.js → logs-panel-BEQ1eRUp.js} +1 -1
  82. package/dist/assets/{markdown-renderer-Cd9eYyaL.js → markdown-renderer-Dmzbb00W.js} +20 -20
  83. package/dist/assets/{mermaid-BEVuRz_O.js → mermaid-qRc4MXIj.js} +1 -1
  84. package/dist/assets/{mermaid.core-CaSnaLH0.js → mermaid.core-CvvJtCRj.js} +4 -4
  85. package/dist/assets/min-DYUOb1RR.js +1 -0
  86. package/dist/assets/{mindmap-definition-Q6HEUPPD-BXUM5MT2.js → mindmap-definition-Q6HEUPPD-G5NognM-.js} +1 -1
  87. package/dist/assets/{number-overlay-editor-4uWXGlPG.js → number-overlay-editor-DPr5sHFu.js} +1 -1
  88. package/dist/assets/outline-panel-gxQXvVi4.js +1 -0
  89. package/dist/assets/{packages-panel-CJL0MVlj.js → packages-panel-B1T0VPlg.js} +1 -1
  90. package/dist/assets/{pieDiagram-ADFJNKIX-Dxt5PVNo.js → pieDiagram-ADFJNKIX-DK9SHkfc.js} +1 -1
  91. package/dist/assets/{quadrantDiagram-LMRXKWRM-D4pUaA31.js → quadrantDiagram-LMRXKWRM-D1DdWF8C.js} +1 -1
  92. package/dist/assets/{react-plotly-cJZ0VWBq.js → react-plotly-CTwajqCb.js} +1 -1
  93. package/dist/assets/{requirementDiagram-4UW4RH46-DVRTjgas.js → requirementDiagram-4UW4RH46-DnjDAypr.js} +1 -1
  94. package/dist/assets/{run-page-BUEnMC9w.js → run-page-CQY9im22.js} +1 -1
  95. package/dist/assets/{sankeyDiagram-GR3RE2ED-CVFnD9C-.js → sankeyDiagram-GR3RE2ED-B67Va-ER.js} +1 -1
  96. package/dist/assets/{scratchpad-panel-BIgRENkI.js → scratchpad-panel-DlDfcDtW.js} +1 -1
  97. package/dist/assets/{secrets-panel-xY5-V_BD.js → secrets-panel-BDGyuGZA.js} +1 -1
  98. package/dist/assets/{sequenceDiagram-C3RYC4MD-_lY4ZN_S.js → sequenceDiagram-C3RYC4MD-DiWgZPtN.js} +1 -1
  99. package/dist/assets/{slides-component-DMjQomc3.css → slides-component-C-LoGC1U.css} +1 -1
  100. package/dist/assets/{slides-component-Xjymwj7X.js → slides-component-DhpPRtQp.js} +1 -1
  101. package/dist/assets/snippets-panel-CLkBXhJ2.js +1 -0
  102. package/dist/assets/sortBy-D4OG7w4O.js +1 -0
  103. package/dist/assets/{state-C4NiC9tO.js → state-Dz_3JyED.js} +1 -1
  104. package/dist/assets/{stateDiagram-KXAO66HF-Da0JQWCn.js → stateDiagram-KXAO66HF-ByF2AULw.js} +1 -1
  105. package/dist/assets/stateDiagram-v2-UMBNRL4Z-CtBJqosP.js +1 -0
  106. package/dist/assets/storage-Dr0CC44z.js +26 -0
  107. package/dist/assets/{terminal-BPwTkXae.js → terminal-BtdissBf.js} +1 -1
  108. package/dist/assets/{time-Dv5_Ouz_.js → time-DKdOTnQg.js} +1 -1
  109. package/dist/assets/{timeline-definition-XQNQX7LJ-Dxh5Zu2e.js → timeline-definition-XQNQX7LJ-DzER9bf6.js} +1 -1
  110. package/dist/assets/tracing-Dpx5M-u3.js +2 -0
  111. package/dist/assets/{tracing-panel-DAzrzNmm.js → tracing-panel-hCjBkSER.js} +2 -2
  112. package/dist/assets/{trash-Dc6DSjz_.js → trash-C6Ko-g5q.js} +1 -1
  113. package/dist/assets/{tree-jheoerAX.js → tree-BHN2gcCF.js} +6 -6
  114. package/dist/assets/{treemap-75Q7IDZK-IgpxeGaf.js → treemap-75Q7IDZK-DR79Mhzt.js} +27 -27
  115. package/dist/assets/variable-panel-PFBCFz36.js +1 -0
  116. package/dist/assets/{vega-component-BpfpiPKI.js → vega-component-Db6-uY4C.js} +1 -1
  117. package/dist/assets/worker-fHbtoWvT.js +1 -0
  118. package/dist/assets/{xychartDiagram-6GGTOJPD-CmNigJ31.js → xychartDiagram-6GGTOJPD-DWzBP3tZ.js} +1 -1
  119. package/dist/index.html +2 -2
  120. package/package.json +5 -4
  121. package/src/__mocks__/requests.ts +1 -0
  122. package/src/components/app-config/user-config-form.tsx +46 -1
  123. package/src/components/chat/acp/__tests__/__snapshots__/prompt.test.ts.snap +62 -43
  124. package/src/components/chat/acp/__tests__/atoms.test.ts +1 -1
  125. package/src/components/chat/acp/__tests__/state.test.ts +36 -36
  126. package/src/components/chat/acp/agent-panel.tsx +24 -27
  127. package/src/components/chat/acp/blocks.tsx +6 -6
  128. package/src/components/chat/acp/prompt.ts +62 -43
  129. package/src/components/chat/chat-panel.tsx +5 -1
  130. package/src/components/chat/markdown-renderer.tsx +6 -10
  131. package/src/components/chat/tool-call-accordion.tsx +52 -20
  132. package/src/components/data-table/SearchBar.tsx +8 -7
  133. package/src/components/data-table/__tests__/column_formatting.test.ts +50 -35
  134. package/src/components/data-table/__tests__/columns.test.tsx +38 -0
  135. package/src/components/data-table/__tests__/data-table.test.tsx +39 -1
  136. package/src/components/data-table/cell-hover-template/feature.ts +14 -0
  137. package/src/components/data-table/cell-hover-template/types.ts +11 -0
  138. package/src/components/data-table/charts/components/form-fields.tsx +41 -37
  139. package/src/components/data-table/charts/forms/common-chart.tsx +2 -2
  140. package/src/components/data-table/column-explorer-panel/column-explorer.tsx +5 -2
  141. package/src/components/data-table/column-formatting/feature.ts +62 -29
  142. package/src/components/data-table/column-formatting/types.ts +1 -0
  143. package/src/components/data-table/column-header.tsx +3 -1
  144. package/src/components/data-table/column-summary/chart-spec-model.tsx +24 -7
  145. package/src/components/data-table/column-summary/column-summary.tsx +18 -9
  146. package/src/components/data-table/columns.tsx +63 -20
  147. package/src/components/data-table/data-table.tsx +10 -2
  148. package/src/components/data-table/date-popover.tsx +85 -75
  149. package/src/components/data-table/filter-pills.tsx +14 -9
  150. package/src/components/data-table/header-items.tsx +5 -1
  151. package/src/components/data-table/pagination.tsx +20 -13
  152. package/src/components/data-table/renderers.tsx +36 -0
  153. package/src/components/data-table/row-viewer-panel/row-viewer.tsx +10 -8
  154. package/src/components/data-table/schemas.ts +16 -0
  155. package/src/components/datasources/column-preview.tsx +6 -2
  156. package/src/components/datasources/datasources.tsx +8 -12
  157. package/src/components/editor/Cell.tsx +2 -0
  158. package/src/components/editor/ai/transport/chat-transport.tsx +4 -1
  159. package/src/components/editor/cell/CellStatus.tsx +23 -20
  160. package/src/components/editor/cell/CreateCellButton.tsx +3 -4
  161. package/src/components/editor/cell/code/language-toggle.tsx +3 -4
  162. package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +39 -28
  163. package/src/components/editor/controls/notebook-menu-dropdown.tsx +4 -2
  164. package/src/components/editor/errors/sql-validation-errors.tsx +34 -0
  165. package/src/components/editor/file-tree/requesting-tree.tsx +14 -8
  166. package/src/components/editor/output/ConsoleOutput.tsx +13 -1
  167. package/src/components/editor/output/MarimoErrorOutput.tsx +60 -1
  168. package/src/components/editor/renderers/CellArray.tsx +3 -4
  169. package/src/components/editor/renderers/slides-layout/slides-layout.tsx +3 -3
  170. package/src/components/editor/renderers/slides-layout/types.ts +1 -0
  171. package/src/components/pages/home-page.tsx +4 -1
  172. package/src/components/slides/slides-component.tsx +1 -1
  173. package/src/components/slides/slides.css +6 -0
  174. package/src/components/terminal/theme.tsx +1 -0
  175. package/src/components/tracing/tracing-spec.ts +5 -4
  176. package/src/components/ui/range-slider.tsx +4 -2
  177. package/src/components/ui/slider.tsx +3 -1
  178. package/src/components/variables/variables-table.tsx +3 -0
  179. package/src/core/MarimoApp.tsx +9 -6
  180. package/src/core/ai/context/__tests__/registry.test.ts +6 -4
  181. package/src/core/ai/context/providers/cell-output.ts +4 -20
  182. package/src/core/ai/context/providers/error.ts +3 -1
  183. package/src/core/ai/context/providers/file.ts +7 -2
  184. package/src/core/ai/context/providers/tables.ts +3 -2
  185. package/src/core/ai/context/providers/variable.ts +6 -4
  186. package/src/core/ai/staged-cells.ts +34 -1
  187. package/src/core/cells/__tests__/add-missing-import.test.ts +67 -22
  188. package/src/core/cells/add-missing-import.ts +24 -7
  189. package/src/core/cells/cells.ts +26 -27
  190. package/src/core/cells/logs.ts +1 -1
  191. package/src/core/codemirror/find-replace/search-highlight.ts +3 -1
  192. package/src/core/codemirror/language/LanguageAdapters.ts +9 -3
  193. package/src/core/codemirror/language/__tests__/extension.test.ts +24 -0
  194. package/src/core/codemirror/language/__tests__/sql-validation.test.ts +133 -0
  195. package/src/core/codemirror/language/languages/sql/sql-mode.ts +20 -0
  196. package/src/core/codemirror/language/languages/sql/sql.ts +90 -3
  197. package/src/core/codemirror/language/languages/sql/validation-errors.ts +79 -0
  198. package/src/core/codemirror/language/panel/panel.tsx +8 -2
  199. package/src/core/codemirror/language/panel/sql.tsx +81 -4
  200. package/src/core/codemirror/lsp/notebook-lsp.ts +8 -2
  201. package/src/core/codemirror/readonly/__tests__/extension.test.ts +1 -1
  202. package/src/core/codemirror/rtc/loro/awareness.ts +52 -17
  203. package/src/core/codemirror/rtc/loro/sync.ts +12 -4
  204. package/src/core/config/config-schema.ts +1 -0
  205. package/src/core/config/config.ts +4 -0
  206. package/src/core/config/feature-flag.tsx +3 -1
  207. package/src/core/datasets/request-registry.ts +17 -1
  208. package/src/core/hotkeys/hotkeys.ts +8 -4
  209. package/src/core/i18n/__tests__/locale-provider.test.tsx +176 -0
  210. package/src/core/i18n/locale-provider.tsx +35 -0
  211. package/src/core/i18n/with-locale.tsx +12 -0
  212. package/src/core/islands/bridge.ts +1 -0
  213. package/src/core/islands/components/web-components.tsx +13 -10
  214. package/src/core/islands/main.ts +1 -0
  215. package/src/core/kernel/RuntimeState.ts +4 -1
  216. package/src/core/kernel/messages.ts +3 -2
  217. package/src/core/network/DeferredRequestRegistry.ts +16 -4
  218. package/src/core/network/requests-network.ts +7 -0
  219. package/src/core/network/requests-static.ts +1 -0
  220. package/src/core/network/requests-toasting.ts +1 -0
  221. package/src/core/network/types.ts +2 -0
  222. package/src/core/runtime/runtime.ts +5 -4
  223. package/src/core/wasm/bridge.ts +10 -1
  224. package/src/core/wasm/store.ts +4 -1
  225. package/src/core/wasm/worker/message-buffer.ts +3 -2
  226. package/src/core/websocket/types.ts +22 -16
  227. package/src/core/websocket/useMarimoWebSocket.tsx +4 -0
  228. package/src/hooks/useFormatting.ts +97 -0
  229. package/src/hooks/useTimer.ts +8 -5
  230. package/src/plugins/core/registerReactComponent.tsx +39 -29
  231. package/src/plugins/impl/DataTablePlugin.tsx +15 -4
  232. package/src/plugins/impl/RangeSliderPlugin.tsx +5 -3
  233. package/src/plugins/impl/SliderPlugin.tsx +3 -1
  234. package/src/plugins/impl/anywidget/model.ts +16 -5
  235. package/src/plugins/impl/data-editor/types.ts +7 -5
  236. package/src/plugins/impl/data-explorer/components/column-summary.tsx +20 -13
  237. package/src/plugins/impl/data-frames/DataFramePlugin.tsx +17 -5
  238. package/src/plugins/impl/panel/utils.ts +6 -4
  239. package/src/plugins/layout/OutlinePlugin.tsx +69 -0
  240. package/src/plugins/layout/StatPlugin.tsx +4 -1
  241. package/src/plugins/plugins.ts +2 -0
  242. package/src/stories/dataframe.stories.tsx +2 -0
  243. package/src/utils/__tests__/dates.test.ts +45 -24
  244. package/src/utils/__tests__/dom.test.ts +167 -0
  245. package/src/utils/__tests__/numbers.test.ts +42 -30
  246. package/src/utils/__tests__/once.test.ts +187 -0
  247. package/src/utils/dates.ts +15 -10
  248. package/src/utils/dom.ts +55 -0
  249. package/src/utils/edit-distance.ts +8 -6
  250. package/src/utils/errors.ts +1 -1
  251. package/src/utils/id-tree.tsx +21 -10
  252. package/src/utils/localStorage.ts +13 -4
  253. package/src/utils/numbers.ts +11 -11
  254. package/src/utils/once.ts +32 -0
  255. package/src/utils/paths.ts +4 -1
  256. package/src/utils/pluralize.ts +12 -5
  257. package/src/utils/python-poet/poet.ts +30 -15
  258. package/src/utils/time.ts +5 -1
  259. package/dist/assets/ConnectedDataExplorerComponent-BErMbWvG.js +0 -19
  260. package/dist/assets/_baseEach-CNBxBxvS.js +0 -1
  261. package/dist/assets/_baseMap-D1WHjKrd.js +0 -1
  262. package/dist/assets/channel-_2eNSz0n.js +0 -1
  263. package/dist/assets/chat-panel-CXh5Wl6C.js +0 -3
  264. package/dist/assets/classDiagram-KNZD7YFC-BGmh9POF.js +0 -1
  265. package/dist/assets/classDiagram-v2-RKCZMP56-BGmh9POF.js +0 -1
  266. package/dist/assets/clone-BFDSPAj3.js +0 -1
  267. package/dist/assets/command-palette-CXZiSv0I.js +0 -1
  268. package/dist/assets/datasources-panel-B7FbYLiy.js +0 -1
  269. package/dist/assets/edit-page-BrYda9VE.js +0 -129
  270. package/dist/assets/file-explorer-panel-Bw59Kva1.js +0 -1
  271. package/dist/assets/home-page-Fb2osjys.js +0 -9
  272. package/dist/assets/index-Cx0bsY1w.css +0 -1
  273. package/dist/assets/index-DKEudB02.js +0 -578
  274. package/dist/assets/infoDiagram-STP46IZ2-CVyrdLc8.js +0 -2
  275. package/dist/assets/links-D59GIweI.js +0 -7
  276. package/dist/assets/min-DUMu_zeK.js +0 -1
  277. package/dist/assets/outline-panel-DIzkvm2I.js +0 -1
  278. package/dist/assets/snippets-panel-CTPYW41n.js +0 -1
  279. package/dist/assets/sortBy-BNZKwiq_.js +0 -1
  280. package/dist/assets/stateDiagram-v2-UMBNRL4Z-D5lYZOOt.js +0 -1
  281. package/dist/assets/storage-CMdLzB_c.js +0 -26
  282. package/dist/assets/tracing-BCIurUfa.js +0 -2
  283. package/dist/assets/variable-panel-DYAiLBmF.js +0 -1
  284. package/dist/assets/worker-X5rxzQGQ.js +0 -1
@@ -52,7 +52,7 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
52
52
  ## Best Practices
53
53
 
54
54
  <data_handling>
55
- - Use pandas for data manipulation
55
+ - Use polars for data manipulation
56
56
  - Implement proper data validation
57
57
  - Handle missing values appropriately
58
58
  - Use efficient data structures
@@ -62,7 +62,7 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
62
62
  <visualization>
63
63
  - For matplotlib: use plt.gca() as the last expression instead of plt.show()
64
64
  - For plotly: return the figure object directly
65
- - For altair: return the chart object directly
65
+ - For altair: return the chart object directly. Add tooltips where appropriate. You can pass polars dataframes directly to altair.
66
66
  - Include proper labels, titles, and color schemes
67
67
  - Make visualizations interactive where appropriate
68
68
  </visualization>
@@ -76,7 +76,7 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
76
76
  </ui_elements>
77
77
 
78
78
  <sql>
79
- - When writing duckdb, prefer using marimo's SQL cells, which start with _df = mo.sql(query)
79
+ - When writing duckdb, prefer using marimo's SQL cells, which start with df = mo.sql(f"""<your query>""") for DuckDB, or df = mo.sql(f"""<your query>""", engine=engine) for other SQL engines.
80
80
  - See the SQL with duckdb example for an example on how to do this
81
81
  - Don't add comments in cells that use mo.sql()
82
82
  - Consider using \`vega_datasets\` for common example datasets
@@ -146,7 +146,8 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
146
146
  @app.cell
147
147
  def _():
148
148
  import marimo as mo
149
- import matplotlib.pyplot as plt
149
+ import altair as alt
150
+ import polars as pl
150
151
  import numpy as np
151
152
  return
152
153
 
@@ -161,12 +162,18 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
161
162
  x = np.random.rand(n_points.value)
162
163
  y = np.random.rand(n_points.value)
163
164
 
164
- plt.figure(figsize=(8, 6))
165
- plt.scatter(x, y, alpha=0.7)
166
- plt.title(f"Scatter plot with {n_points.value} points")
167
- plt.xlabel("X axis")
168
- plt.ylabel("Y axis")
169
- plt.gca()
165
+ df = pl.DataFrame({"x": x, "y": y})
166
+
167
+ chart = alt.Chart(df).mark_circle(opacity=0.7).encode(
168
+ x=alt.X('x', title='X axis'),
169
+ y=alt.Y('y', title='Y axis')
170
+ ).properties(
171
+ title=f"Scatter plot with {n_points.value} points",
172
+ width=400,
173
+ height=300
174
+ )
175
+
176
+ chart
170
177
  return
171
178
 
172
179
  </example>
@@ -176,13 +183,13 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
176
183
  @app.cell
177
184
  def _():
178
185
  import marimo as mo
179
- import pandas as pd
186
+ import polars as pl
180
187
  from vega_datasets import data
181
188
  return
182
189
 
183
190
  @app.cell
184
191
  def _():
185
- cars_df = data.cars()
192
+ cars_df = pl.DataFrame(data.cars())
186
193
  mo.ui.data_explorer(cars_df)
187
194
  return
188
195
 
@@ -193,49 +200,50 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
193
200
  @app.cell
194
201
  def _():
195
202
  import marimo as mo
196
- import pandas as pd
197
- import matplotlib.pyplot as plt
198
- import seaborn as sns
203
+ import polars as pl
204
+ import altair as alt
199
205
  return
200
206
 
201
207
  @app.cell
202
208
  def _():
203
- iris = sns.load_dataset('iris')
209
+ iris = pl.read_csv("hf://datasets/scikit-learn/iris/Iris.csv")
204
210
  return
205
211
 
206
212
  @app.cell
207
213
  def _():
208
214
  species_selector = mo.ui.dropdown(
209
- options=["All"] + iris["species"].unique().tolist(),
215
+ options=["All"] + iris["Species"].unique().to_list(),
210
216
  value="All",
211
- label="Species"
217
+ label="Species",
212
218
  )
213
219
  x_feature = mo.ui.dropdown(
214
- options=iris.select_dtypes('number').columns.tolist(),
215
- value="sepal_length",
216
- label="X Feature"
220
+ options=iris.select(pl.col(pl.Float64, pl.Int64)).columns,
221
+ value="SepalLengthCm",
222
+ label="X Feature",
217
223
  )
218
224
  y_feature = mo.ui.dropdown(
219
- options=iris.select_dtypes('number').columns.tolist(),
220
- value="sepal_width",
221
- label="Y Feature"
225
+ options=iris.select(pl.col(pl.Float64, pl.Int64)).columns,
226
+ value="SepalWidthCm",
227
+ label="Y Feature",
222
228
  )
223
229
  mo.hstack([species_selector, x_feature, y_feature])
224
230
  return
225
231
 
226
232
  @app.cell
227
233
  def _():
228
- filtered_data = iris if species_selector.value == "All" else iris[iris["species"] == species_selector.value]
229
-
230
- plt.figure(figsize=(10, 6))
231
- sns.scatterplot(
232
- data=filtered_data,
233
- x=x_feature.value,
234
- y=y_feature.value,
235
- hue="species"
234
+ filtered_data = iris if species_selector.value == "All" else iris.filter(pl.col("Species") == species_selector.value)
235
+
236
+ chart = alt.Chart(filtered_data).mark_circle().encode(
237
+ x=alt.X(x_feature.value, title=x_feature.value),
238
+ y=alt.Y(y_feature.value, title=y_feature.value),
239
+ color='Species'
240
+ ).properties(
241
+ title=f"{y_feature.value} vs {x_feature.value}",
242
+ width=500,
243
+ height=400
236
244
  )
237
- plt.title(f"{y_feature.value} vs {x_feature.value}")
238
- plt.gca()
245
+
246
+ chart
239
247
  return
240
248
 
241
249
  </example>
@@ -260,17 +268,24 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
260
268
  def _():
261
269
  import marimo as mo
262
270
  import altair as alt
263
- import pandas as pd
271
+ import polars as pl
264
272
  return
265
273
 
266
274
  @app.cell
267
275
  def _():
268
276
  # Load dataset
269
- cars_df = pd.read_csv('<https://raw.githubusercontent.com/vega/vega-datasets/master/data/cars.json>')
270
- _chart = alt.Chart(cars_df).mark_point().encode(
271
- x='Horsepower',
272
- y='Miles_per_Gallon',
273
- color='Origin',
277
+ weather = pl.read_csv("https://raw.githubusercontent.com/vega/vega-datasets/refs/heads/main/data/weather.csv")
278
+ weather_dates = weather.with_columns(
279
+ pl.col("date").str.strptime(pl.Date, format="%Y-%m-%d")
280
+ )
281
+ _chart = (
282
+ alt.Chart(weather_dates)
283
+ .mark_point()
284
+ .encode(
285
+ x="date:T",
286
+ y="temp_max",
287
+ color="location",
288
+ )
274
289
  )
275
290
  return
276
291
 
@@ -319,17 +334,21 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
319
334
  @app.cell
320
335
  def _():
321
336
  import marimo as mo
322
- import pandas as pd
337
+ import polars as pl
323
338
  return
324
339
 
325
340
  @app.cell
326
341
  def _():
327
- cars_df = pd.read_csv('<https://raw.githubusercontent.com/vega/vega-datasets/master/data/cars.json>')
342
+ weather = pl.read_csv('https://raw.githubusercontent.com/vega/vega-datasets/refs/heads/main/data/weather.csv')
328
343
  return
329
344
 
330
345
  @app.cell
331
346
  def _():
332
- _df = mo.sql("SELECT * from cars_df WHERE Miles_per_Gallon > 20")
347
+ seattle_weather_df = mo.sql(
348
+ f"""
349
+ SELECT * FROM weather WHERE location = 'Seattle';
350
+ """
351
+ )
333
352
  return
334
353
 
335
354
  </example>"
@@ -1,4 +1,4 @@
1
- /* Copyright 2025 Marimo. All rights reserved. */
1
+ /* Copyright 2024 Marimo. All rights reserved. */
2
2
 
3
3
  import { createStore } from "jotai";
4
4
  import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
@@ -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
  ];
@@ -383,31 +383,29 @@ const PromptArea = memo<PromptAreaProps>(
383
383
  <AtSignIcon className="h-3.5 w-3.5" />
384
384
  </Button>
385
385
  </Tooltip>
386
- <>
387
- <Tooltip content="Attach a file">
388
- <Button
389
- variant="text"
390
- size="icon"
391
- className="cursor-pointer"
392
- onClick={() => fileInputRef.current?.click()}
393
- title="Attach a file"
394
- >
395
- <PaperclipIcon className="h-3.5 w-3.5" />
396
- </Button>
397
- </Tooltip>
398
- <Input
399
- ref={fileInputRef}
400
- type="file"
401
- multiple={true}
402
- hidden={true}
403
- onChange={(event) => {
404
- if (event.target.files) {
405
- onAddFiles([...event.target.files]);
406
- }
407
- }}
408
- accept={SUPPORTED_ATTACHMENT_TYPES.join(",")}
409
- />
410
- </>
386
+ <Tooltip content="Attach a file">
387
+ <Button
388
+ variant="text"
389
+ size="icon"
390
+ className="cursor-pointer"
391
+ onClick={() => fileInputRef.current?.click()}
392
+ title="Attach a file"
393
+ >
394
+ <PaperclipIcon className="h-3.5 w-3.5" />
395
+ </Button>
396
+ </Tooltip>
397
+ <Input
398
+ ref={fileInputRef}
399
+ type="file"
400
+ multiple={true}
401
+ hidden={true}
402
+ onChange={(event) => {
403
+ if (event.target.files) {
404
+ onAddFiles([...event.target.files]);
405
+ }
406
+ }}
407
+ accept={SUPPORTED_ATTACHMENT_TYPES.join(",")}
408
+ />
411
409
  <Tooltip content={isLoading ? "Stop" : "Submit"}>
412
410
  <Button
413
411
  variant="text"
@@ -844,8 +842,7 @@ const AgentPanel: React.FC = () => {
844
842
  // Parse context from the prompt
845
843
  const { contextBlocks, attachmentBlocks } =
846
844
  await parseContextFromPrompt(prompt);
847
- promptBlocks.push(...contextBlocks);
848
- promptBlocks.push(...attachmentBlocks);
845
+ promptBlocks.push(...contextBlocks, ...attachmentBlocks);
849
846
 
850
847
  // Add manually uploaded files as resource links
851
848
  if (files && files.length > 0) {
@@ -501,11 +501,9 @@ export const SessionNotificationsBlock = <
501
501
  }
502
502
  if (kind === "current_mode_update") {
503
503
  const lastItem = items.at(-1);
504
- if (lastItem?.sessionUpdate !== "current_mode_update") {
505
- return null;
506
- } else {
507
- return <CurrentModeBlock data={lastItem} />;
508
- }
504
+ return lastItem?.sessionUpdate === "current_mode_update" ? (
505
+ <CurrentModeBlock data={lastItem} />
506
+ ) : null;
509
507
  }
510
508
 
511
509
  return (
@@ -673,7 +671,9 @@ export const ToolBodyBlock = (props: {
673
671
  );
674
672
  }
675
673
 
676
- if (content?.length && hasLocations) {
674
+ const noContent = !textContent || textContent.length === 0;
675
+ const noDiffs = !diffs || diffs.length === 0;
676
+ if (noContent && noDiffs && hasLocations) {
677
677
  return (
678
678
  <div className="flex flex-col gap-2 pr-2">
679
679
  <span className="text-xs text-muted-foreground">