@marimo-team/frontend 0.16.0-dev96986 → 0.16.0
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.
- package/dist/assets/ConnectedDataExplorerComponent-BErMbWvG.js +19 -0
- package/dist/assets/{ImageComparisonComponent-SX7fDaTK.js → ImageComparisonComponent-fTHv1Ih0.js} +1 -1
- package/dist/assets/{VegaLite-MJUW3b7C.js → VegaLite-Bdi-TyfY.js} +1 -1
- package/dist/assets/_baseEach-CNBxBxvS.js +1 -0
- package/dist/assets/_baseMap-D1WHjKrd.js +1 -0
- package/dist/assets/_baseUniq-CCgDNtZb.js +1 -0
- package/dist/assets/{_createAggregator-ZRm2b6Zm.js → _createAggregator-DcD0kTA5.js} +1 -1
- package/dist/assets/{agent-panel-BBd11wNX.js → agent-panel-Crv430aI.js} +57 -76
- package/dist/assets/{any-language-editor-DwAaEQfS.js → any-language-editor-CQh552Wu.js} +1 -1
- package/dist/assets/{architectureDiagram-W76B3OCA-BJmVXUoW.js → architectureDiagram-W76B3OCA-BAJeBxzt.js} +1 -1
- package/dist/assets/{between-horizontal-start-KiwU-a3C.js → between-horizontal-start-Boxgxbt_.js} +1 -1
- package/dist/assets/{blockDiagram-QIGZ2CNN-DzxZjE7B.js → blockDiagram-QIGZ2CNN-CL-1svEK.js} +1 -1
- package/dist/assets/{c4Diagram-FPNF74CW-DjmldG_J.js → c4Diagram-FPNF74CW-BbEqbCTl.js} +1 -1
- package/dist/assets/channel-_2eNSz0n.js +1 -0
- package/dist/assets/chat-panel-CXh5Wl6C.js +3 -0
- package/dist/assets/{chunk-4BX2VUAB-EUTQThiZ.js → chunk-4BX2VUAB-C--8TXeE.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-DZAiDJxy.js → chunk-55IACEB6-Bj00HDqq.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-Bd0Czs-J.js → chunk-FMBD7UC4-C-lhB6hN.js} +1 -1
- package/dist/assets/{chunk-K7UQS3LO-DEKMIknX.js → chunk-K7UQS3LO-B-pGTXPt.js} +1 -1
- package/dist/assets/{chunk-QN33PNHL-E0jwHU_n.js → chunk-QN33PNHL-DqUzGhvm.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-BzaIHJbq.js → chunk-QZHKN3VN-TntJHfSk.js} +1 -1
- package/dist/assets/{chunk-TVAH2DTR-CZFYvqnm.js → chunk-TVAH2DTR-HUJb1psV.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-BNqnFjtv.js → chunk-TZMSLE5B-BK3C__t3.js} +1 -1
- package/dist/assets/{circle-play-D3J_mYrF.js → circle-play-DBLOv1Yu.js} +1 -1
- package/dist/assets/classDiagram-KNZD7YFC-BGmh9POF.js +1 -0
- package/dist/assets/classDiagram-v2-RKCZMP56-BGmh9POF.js +1 -0
- package/dist/assets/{clear-button-ifzRuAR3.js → clear-button-BeoFbEKH.js} +1 -1
- package/dist/assets/clone-BFDSPAj3.js +1 -0
- package/dist/assets/{command-palette-D2fdVSET.js → command-palette-CXZiSv0I.js} +1 -1
- package/dist/assets/{common-Ku-cF_2J.js → common-C7oJcmCT.js} +1 -1
- package/dist/assets/{compile-BgZlHW1c.js → compile-7L0MwhyI.js} +1 -1
- package/dist/assets/{cose-bilkent-S5V4N54A-CVM83SqK.js → cose-bilkent-S5V4N54A-BMkGLcVC.js} +1 -1
- package/dist/assets/{dagre-5GWH7T2D-ouQPkxT3.js → dagre-5GWH7T2D-BJtRienS.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-B47j5GJJ.js → data-grid-overlay-editor-DBkmGtNs.js} +1 -1
- package/dist/assets/datasources-panel-B7FbYLiy.js +1 -0
- package/dist/assets/{dependency-graph-panel-CZC_B7pK.js → dependency-graph-panel-DEdOxp2X.js} +1 -1
- package/dist/assets/{diagram-N5W7TBWH-CQ817ZdR.js → diagram-N5W7TBWH-CmECY3nb.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-DOK_psUO.js → diagram-QEK2KX5R-DMOVSNKD.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-CVljmOW8.js → diagram-S2PKOQOG-BiJ96PNQ.js} +1 -1
- package/dist/assets/{documentation-panel-C7yIvGg1.js → documentation-panel-xULhaEv3.js} +1 -1
- package/dist/assets/edit-page-BrYda9VE.js +129 -0
- package/dist/assets/{ellipsis-vertical-C7FjlUsY.js → ellipsis-vertical-BBqXIlc2.js} +1 -1
- package/dist/assets/{empty-state-DIOGM_CU.js → empty-state-B3dA3G5P.js} +1 -1
- package/dist/assets/{erDiagram-AWTI2OKA-DYu8cEdc.js → erDiagram-AWTI2OKA-MP1DiFRo.js} +1 -1
- package/dist/assets/{error-panel-Ddb8RkFG.js → error-panel-Cc1sv-Ag.js} +1 -1
- package/dist/assets/file-explorer-panel-Bw59Kva1.js +1 -0
- package/dist/assets/{flowDiagram-PVAE7QVJ-CmvW5iTb.js → flowDiagram-PVAE7QVJ-BX7caPp7.js} +1 -1
- package/dist/assets/{ganttDiagram-OWAHRB6G-BaKQlCaT.js → ganttDiagram-OWAHRB6G-B462g4Yf.js} +4 -4
- package/dist/assets/{gitGraphDiagram-NY62KEGX-CWO24eP6.js → gitGraphDiagram-NY62KEGX-CGgvZ9-9.js} +1 -1
- package/dist/assets/{glide-data-editor-CNDLEJ9a.js → glide-data-editor-C0gUFZON.js} +11 -11
- package/dist/assets/{graph-BZKTtxsc.js → graph-CHRVBzY5.js} +1 -1
- package/dist/assets/home-page-Fb2osjys.js +9 -0
- package/dist/assets/{index-zrSUQXha.js → index-BVgAenPd.js} +1 -1
- package/dist/assets/{index-Brf2DwUM.js → index-BY93Ejhl.js} +1 -1
- package/dist/assets/{index-CerjupfZ.js → index-C-8WADat.js} +1 -1
- package/dist/assets/{index-DZhOPkOB.js → index-C-GhZ7ti.js} +1 -1
- package/dist/assets/{index-CZaurnA9.js → index-C1v_Z9et.js} +1 -1
- package/dist/assets/{index-0XOUPdwT.js → index-C4Tn5NvJ.js} +1 -1
- package/dist/assets/{index-B_d_JZGI.js → index-C77h_TXN.js} +1 -1
- package/dist/assets/{index-BJVyzkx5.js → index-CQDrxQ0j.js} +1 -1
- package/dist/assets/{index-DFrGFNW1.js → index-CWMgowgL.js} +1 -1
- package/dist/assets/{index-DmgwT3sx.js → index-Clbi_Yaq.js} +1 -1
- package/dist/assets/{index-D-tZfElD.js → index-CpTPJo4k.js} +1 -1
- package/dist/assets/index-Cx0bsY1w.css +1 -0
- package/dist/assets/{index-DkntzpX4.js → index-D1vmG6DS.js} +1 -1
- package/dist/assets/{index-D3PqGupX.js → index-D9UKkrr2.js} +1 -1
- package/dist/assets/{index-BgXbBA39.js → index-DEQvTChO.js} +1 -1
- package/dist/assets/index-DKEudB02.js +578 -0
- package/dist/assets/{index-DCkzth56.js → index-DRMm6SNo.js} +1 -1
- package/dist/assets/{index-WXJFkQHg.js → index-DoRmcrKM.js} +1 -1
- package/dist/assets/{index-qE8lHQ-N.js → index-lYa_leQE.js} +1 -1
- package/dist/assets/{index-CXrWwFX6.js → index-vmICa5KN.js} +1 -1
- package/dist/assets/{index-BH7f3aiU.js → index-z9bohSQJ.js} +1 -1
- package/dist/assets/infoDiagram-STP46IZ2-CVyrdLc8.js +2 -0
- package/dist/assets/{isEmpty-D1t7Gran.js → isEmpty-DU_ogP_D.js} +1 -1
- package/dist/assets/{journeyDiagram-BIP6EPQ6-D4Rp6H_h.js → journeyDiagram-BIP6EPQ6-C6EgLP_Q.js} +1 -1
- package/dist/assets/{kanban-definition-6OIFK2YF-DFt9DftA.js → kanban-definition-6OIFK2YF-BXzYO1yj.js} +1 -1
- package/dist/assets/{layout-D8WXi2_g.js → layout-jihVw5-i.js} +1 -1
- package/dist/assets/{linear-BwY8e5hA.js → linear-C4blANlC.js} +1 -1
- package/dist/assets/links-D59GIweI.js +7 -0
- package/dist/assets/{logs-panel-Dxiyt7dO.js → logs-panel-D401qzZh.js} +1 -1
- package/dist/assets/{markdown-renderer-VDu-NBKB.js → markdown-renderer-Cd9eYyaL.js} +20 -20
- package/dist/assets/{mermaid-B-O-Puyi.js → mermaid-BEVuRz_O.js} +1 -1
- package/dist/assets/{mermaid.core-BFFCqfOn.js → mermaid.core-CaSnaLH0.js} +4 -4
- package/dist/assets/min-DUMu_zeK.js +1 -0
- package/dist/assets/{mindmap-definition-Q6HEUPPD-kyvIY8Dg.js → mindmap-definition-Q6HEUPPD-BXUM5MT2.js} +1 -1
- package/dist/assets/{number-overlay-editor-GjLB2UK4.js → number-overlay-editor-4uWXGlPG.js} +1 -1
- package/dist/assets/outline-panel-DIzkvm2I.js +1 -0
- package/dist/assets/{packages-panel-nfXB-bKW.js → packages-panel-CJL0MVlj.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-D8JFQcWR.js → pieDiagram-ADFJNKIX-Dxt5PVNo.js} +1 -1
- package/dist/assets/{quadrantDiagram-LMRXKWRM-Nf8GzxXG.js → quadrantDiagram-LMRXKWRM-D4pUaA31.js} +1 -1
- package/dist/assets/{react-plotly-CnW9p7ZA.js → react-plotly-cJZ0VWBq.js} +1 -1
- package/dist/assets/{requirementDiagram-4UW4RH46-CCUxF8BZ.js → requirementDiagram-4UW4RH46-DVRTjgas.js} +1 -1
- package/dist/assets/{run-page-Bl4p3AbZ.js → run-page-BUEnMC9w.js} +1 -1
- package/dist/assets/{sankeyDiagram-GR3RE2ED-Sr8kDwP1.js → sankeyDiagram-GR3RE2ED-CVFnD9C-.js} +1 -1
- package/dist/assets/{scratchpad-panel-Ja1Mu-W3.js → scratchpad-panel-BIgRENkI.js} +1 -1
- package/dist/assets/{secrets-panel-B-3fcSyP.js → secrets-panel-xY5-V_BD.js} +1 -1
- package/dist/assets/{sequenceDiagram-C3RYC4MD-CBJ152Q3.js → sequenceDiagram-C3RYC4MD-_lY4ZN_S.js} +1 -1
- package/dist/assets/{slides-component-C-LoGC1U.css → slides-component-DMjQomc3.css} +1 -1
- package/dist/assets/{slides-component-DGtsVP5o.js → slides-component-Xjymwj7X.js} +1 -1
- package/dist/assets/snippets-panel-CTPYW41n.js +1 -0
- package/dist/assets/sortBy-BNZKwiq_.js +1 -0
- package/dist/assets/{state-B_RCHTH5.js → state-C4NiC9tO.js} +1 -1
- package/dist/assets/{stateDiagram-KXAO66HF-BlBFSAZr.js → stateDiagram-KXAO66HF-Da0JQWCn.js} +1 -1
- package/dist/assets/stateDiagram-v2-UMBNRL4Z-D5lYZOOt.js +1 -0
- package/dist/assets/storage-CMdLzB_c.js +26 -0
- package/dist/assets/{terminal-CATzv5Hd.js → terminal-BPwTkXae.js} +1 -1
- package/dist/assets/{time-CsYqILfB.js → time-Dv5_Ouz_.js} +1 -1
- package/dist/assets/{timeline-definition-XQNQX7LJ-CGrhjuAs.js → timeline-definition-XQNQX7LJ-Dxh5Zu2e.js} +1 -1
- package/dist/assets/tracing-BCIurUfa.js +2 -0
- package/dist/assets/{tracing-panel-DmzqPUtc.js → tracing-panel-DAzrzNmm.js} +2 -2
- package/dist/assets/{trash-rxdjLzkf.js → trash-Dc6DSjz_.js} +1 -1
- package/dist/assets/{tree-C2Ul1h1C.js → tree-jheoerAX.js} +1 -1
- package/dist/assets/{treemap-75Q7IDZK-N9hyUpyj.js → treemap-75Q7IDZK-IgpxeGaf.js} +27 -27
- package/dist/assets/variable-panel-DYAiLBmF.js +1 -0
- package/dist/assets/{vega-component-CR_MHOBT.js → vega-component-BpfpiPKI.js} +1 -1
- package/dist/assets/worker-X5rxzQGQ.js +1 -0
- package/dist/assets/{xychartDiagram-6GGTOJPD-jdLZsMb2.js → xychartDiagram-6GGTOJPD-CmNigJ31.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +2 -3
- package/src/components/app-config/user-config-form.tsx +1 -46
- package/src/components/chat/acp/__tests__/__snapshots__/prompt.test.ts.snap +43 -62
- package/src/components/chat/acp/__tests__/atoms.test.ts +1 -1
- package/src/components/chat/acp/__tests__/state.test.ts +36 -36
- package/src/components/chat/acp/agent-panel.tsx +27 -24
- package/src/components/chat/acp/blocks.tsx +6 -6
- package/src/components/chat/acp/prompt.ts +43 -62
- package/src/components/chat/chat-panel.tsx +1 -5
- package/src/components/chat/markdown-renderer.tsx +10 -6
- package/src/components/chat/tool-call-accordion.tsx +20 -52
- package/src/components/data-table/SearchBar.tsx +7 -8
- package/src/components/data-table/__tests__/column_formatting.test.ts +35 -50
- package/src/components/data-table/__tests__/data-table.test.tsx +1 -39
- package/src/components/data-table/charts/components/form-fields.tsx +37 -41
- package/src/components/data-table/charts/forms/common-chart.tsx +2 -2
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +2 -5
- package/src/components/data-table/column-formatting/feature.ts +29 -62
- package/src/components/data-table/column-formatting/types.ts +0 -1
- package/src/components/data-table/column-header.tsx +1 -3
- package/src/components/data-table/column-summary/chart-spec-model.tsx +7 -24
- package/src/components/data-table/column-summary/column-summary.tsx +9 -18
- package/src/components/data-table/columns.tsx +18 -42
- package/src/components/data-table/data-table.tsx +2 -10
- package/src/components/data-table/date-popover.tsx +75 -85
- package/src/components/data-table/filter-pills.tsx +9 -14
- package/src/components/data-table/header-items.tsx +1 -5
- package/src/components/data-table/pagination.tsx +13 -20
- package/src/components/data-table/renderers.tsx +0 -28
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +8 -10
- package/src/components/datasources/column-preview.tsx +2 -6
- package/src/components/datasources/datasources.tsx +12 -8
- package/src/components/editor/ai/transport/chat-transport.tsx +1 -4
- package/src/components/editor/cell/CellStatus.tsx +20 -23
- package/src/components/editor/cell/CreateCellButton.tsx +4 -3
- package/src/components/editor/cell/code/language-toggle.tsx +4 -3
- package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +28 -39
- package/src/components/editor/controls/notebook-menu-dropdown.tsx +2 -4
- package/src/components/editor/file-tree/requesting-tree.tsx +8 -14
- package/src/components/editor/renderers/CellArray.tsx +4 -3
- package/src/components/editor/renderers/slides-layout/slides-layout.tsx +3 -3
- package/src/components/editor/renderers/slides-layout/types.ts +0 -1
- package/src/components/pages/home-page.tsx +1 -4
- package/src/components/slides/slides-component.tsx +1 -1
- package/src/components/slides/slides.css +0 -6
- package/src/components/terminal/theme.tsx +0 -1
- package/src/components/tracing/tracing-spec.ts +4 -5
- package/src/components/ui/range-slider.tsx +2 -4
- package/src/components/ui/slider.tsx +1 -3
- package/src/components/variables/variables-table.tsx +0 -3
- package/src/core/MarimoApp.tsx +6 -9
- package/src/core/ai/context/__tests__/registry.test.ts +4 -6
- package/src/core/ai/context/providers/cell-output.ts +2 -3
- package/src/core/ai/context/providers/error.ts +1 -3
- package/src/core/ai/context/providers/file.ts +2 -7
- package/src/core/ai/context/providers/tables.ts +2 -3
- package/src/core/ai/context/providers/variable.ts +4 -6
- package/src/core/cells/logs.ts +1 -1
- package/src/core/codemirror/find-replace/search-highlight.ts +1 -3
- package/src/core/codemirror/language/LanguageAdapters.ts +3 -9
- package/src/core/codemirror/lsp/notebook-lsp.ts +2 -8
- package/src/core/codemirror/readonly/__tests__/extension.test.ts +1 -1
- package/src/core/codemirror/rtc/loro/awareness.ts +17 -52
- package/src/core/codemirror/rtc/loro/sync.ts +4 -12
- package/src/core/config/config-schema.ts +0 -1
- package/src/core/config/config.ts +0 -4
- package/src/core/hotkeys/hotkeys.ts +4 -8
- package/src/core/islands/components/web-components.tsx +10 -13
- package/src/core/kernel/RuntimeState.ts +1 -4
- package/src/core/kernel/messages.ts +2 -2
- package/src/core/network/DeferredRequestRegistry.ts +4 -16
- package/src/core/runtime/runtime.ts +4 -5
- package/src/core/wasm/bridge.ts +1 -5
- package/src/core/wasm/store.ts +1 -4
- package/src/core/wasm/worker/message-buffer.ts +2 -3
- package/src/core/websocket/types.ts +16 -22
- package/src/hooks/useTimer.ts +5 -8
- package/src/plugins/core/registerReactComponent.tsx +10 -16
- package/src/plugins/impl/DataTablePlugin.tsx +0 -4
- package/src/plugins/impl/RangeSliderPlugin.tsx +3 -5
- package/src/plugins/impl/SliderPlugin.tsx +1 -3
- package/src/plugins/impl/anywidget/model.ts +5 -16
- package/src/plugins/impl/data-editor/types.ts +5 -7
- package/src/plugins/impl/data-explorer/components/column-summary.tsx +13 -20
- package/src/plugins/impl/panel/utils.ts +4 -6
- package/src/plugins/layout/StatPlugin.tsx +1 -4
- package/src/plugins/plugins.ts +0 -2
- package/src/utils/__tests__/dates.test.ts +24 -45
- package/src/utils/__tests__/numbers.test.ts +30 -42
- package/src/utils/dates.ts +10 -15
- package/src/utils/edit-distance.ts +6 -8
- package/src/utils/errors.ts +1 -1
- package/src/utils/id-tree.tsx +10 -21
- package/src/utils/localStorage.ts +4 -13
- package/src/utils/numbers.ts +11 -11
- package/src/utils/once.ts +0 -32
- package/src/utils/paths.ts +1 -4
- package/src/utils/pluralize.ts +5 -12
- package/src/utils/python-poet/poet.ts +15 -30
- package/src/utils/time.ts +1 -5
- package/dist/assets/ConnectedDataExplorerComponent-CNLoZkWr.js +0 -19
- package/dist/assets/_baseEach-9_logFrf.js +0 -1
- package/dist/assets/_baseMap-NzEbKt5c.js +0 -1
- package/dist/assets/_baseUniq-C5LFcyNC.js +0 -1
- package/dist/assets/channel-DHcKBVM4.js +0 -1
- package/dist/assets/chat-panel-DgJZr0eS.js +0 -3
- package/dist/assets/classDiagram-KNZD7YFC-D-xwLnlX.js +0 -1
- package/dist/assets/classDiagram-v2-RKCZMP56-D-xwLnlX.js +0 -1
- package/dist/assets/clone-CSxIll62.js +0 -1
- package/dist/assets/datasources-panel-Bt41Zir-.js +0 -1
- package/dist/assets/edit-page-CyTMQV2u.js +0 -129
- package/dist/assets/file-explorer-panel-Oy9DbyFP.js +0 -1
- package/dist/assets/home-page-Bvwppn9N.js +0 -9
- package/dist/assets/index-DadI618h.css +0 -1
- package/dist/assets/index-PmY0x4Zd.js +0 -578
- package/dist/assets/infoDiagram-STP46IZ2-CAuVVehw.js +0 -2
- package/dist/assets/links-4B6ldZ5P.js +0 -7
- package/dist/assets/min-DtVSfYKl.js +0 -1
- package/dist/assets/outline-panel-CMJjOoN7.js +0 -1
- package/dist/assets/snippets-panel-ClNnwKBM.js +0 -1
- package/dist/assets/sortBy-D47H6Vyl.js +0 -1
- package/dist/assets/stateDiagram-v2-UMBNRL4Z-DbA-iToo.js +0 -1
- package/dist/assets/storage-BNcWOH3-.js +0 -26
- package/dist/assets/tracing-DUbJtOyq.js +0 -2
- package/dist/assets/variable-panel-BbgupOdG.js +0 -1
- package/dist/assets/worker-fHbtoWvT.js +0 -1
- package/src/components/data-table/cell-hover-template/feature.ts +0 -14
- package/src/components/data-table/cell-hover-template/types.ts +0 -11
- package/src/core/i18n/__tests__/locale-provider.test.tsx +0 -176
- package/src/core/i18n/locale-provider.tsx +0 -35
- package/src/core/i18n/with-locale.tsx +0 -12
- package/src/hooks/useFormatting.ts +0 -97
- package/src/plugins/layout/OutlinePlugin.tsx +0 -69
- package/src/utils/__tests__/once.test.ts +0 -187
|
@@ -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
|
|
55
|
+
- Use pandas 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
|
|
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
|
|
79
|
+
- When writing duckdb, prefer using marimo's SQL cells, which start with _df = mo.sql(query)
|
|
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,8 +146,7 @@ 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
|
|
150
|
-
import polars as pl
|
|
149
|
+
import matplotlib.pyplot as plt
|
|
151
150
|
import numpy as np
|
|
152
151
|
return
|
|
153
152
|
|
|
@@ -162,18 +161,12 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
|
|
|
162
161
|
x = np.random.rand(n_points.value)
|
|
163
162
|
y = np.random.rand(n_points.value)
|
|
164
163
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
title=f"Scatter plot with {n_points.value} points",
|
|
172
|
-
width=400,
|
|
173
|
-
height=300
|
|
174
|
-
)
|
|
175
|
-
|
|
176
|
-
chart
|
|
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()
|
|
177
170
|
return
|
|
178
171
|
|
|
179
172
|
</example>
|
|
@@ -183,13 +176,13 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
|
|
|
183
176
|
@app.cell
|
|
184
177
|
def _():
|
|
185
178
|
import marimo as mo
|
|
186
|
-
import
|
|
179
|
+
import pandas as pd
|
|
187
180
|
from vega_datasets import data
|
|
188
181
|
return
|
|
189
182
|
|
|
190
183
|
@app.cell
|
|
191
184
|
def _():
|
|
192
|
-
cars_df =
|
|
185
|
+
cars_df = data.cars()
|
|
193
186
|
mo.ui.data_explorer(cars_df)
|
|
194
187
|
return
|
|
195
188
|
|
|
@@ -200,50 +193,49 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
|
|
|
200
193
|
@app.cell
|
|
201
194
|
def _():
|
|
202
195
|
import marimo as mo
|
|
203
|
-
import
|
|
204
|
-
import
|
|
196
|
+
import pandas as pd
|
|
197
|
+
import matplotlib.pyplot as plt
|
|
198
|
+
import seaborn as sns
|
|
205
199
|
return
|
|
206
200
|
|
|
207
201
|
@app.cell
|
|
208
202
|
def _():
|
|
209
|
-
iris =
|
|
203
|
+
iris = sns.load_dataset('iris')
|
|
210
204
|
return
|
|
211
205
|
|
|
212
206
|
@app.cell
|
|
213
207
|
def _():
|
|
214
208
|
species_selector = mo.ui.dropdown(
|
|
215
|
-
options=["All"] + iris["
|
|
209
|
+
options=["All"] + iris["species"].unique().tolist(),
|
|
216
210
|
value="All",
|
|
217
|
-
label="Species"
|
|
211
|
+
label="Species"
|
|
218
212
|
)
|
|
219
213
|
x_feature = mo.ui.dropdown(
|
|
220
|
-
options=iris.
|
|
221
|
-
value="
|
|
222
|
-
label="X Feature"
|
|
214
|
+
options=iris.select_dtypes('number').columns.tolist(),
|
|
215
|
+
value="sepal_length",
|
|
216
|
+
label="X Feature"
|
|
223
217
|
)
|
|
224
218
|
y_feature = mo.ui.dropdown(
|
|
225
|
-
options=iris.
|
|
226
|
-
value="
|
|
227
|
-
label="Y Feature"
|
|
219
|
+
options=iris.select_dtypes('number').columns.tolist(),
|
|
220
|
+
value="sepal_width",
|
|
221
|
+
label="Y Feature"
|
|
228
222
|
)
|
|
229
223
|
mo.hstack([species_selector, x_feature, y_feature])
|
|
230
224
|
return
|
|
231
225
|
|
|
232
226
|
@app.cell
|
|
233
227
|
def _():
|
|
234
|
-
filtered_data = iris if species_selector.value == "All" else iris
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
width=500,
|
|
243
|
-
height=400
|
|
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"
|
|
244
236
|
)
|
|
245
|
-
|
|
246
|
-
|
|
237
|
+
plt.title(f"{y_feature.value} vs {x_feature.value}")
|
|
238
|
+
plt.gca()
|
|
247
239
|
return
|
|
248
240
|
|
|
249
241
|
</example>
|
|
@@ -268,24 +260,17 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
|
|
|
268
260
|
def _():
|
|
269
261
|
import marimo as mo
|
|
270
262
|
import altair as alt
|
|
271
|
-
import
|
|
263
|
+
import pandas as pd
|
|
272
264
|
return
|
|
273
265
|
|
|
274
266
|
@app.cell
|
|
275
267
|
def _():
|
|
276
268
|
# Load dataset
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
alt.Chart(weather_dates)
|
|
283
|
-
.mark_point()
|
|
284
|
-
.encode(
|
|
285
|
-
x="date:T",
|
|
286
|
-
y="temp_max",
|
|
287
|
-
color="location",
|
|
288
|
-
)
|
|
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',
|
|
289
274
|
)
|
|
290
275
|
return
|
|
291
276
|
|
|
@@ -334,21 +319,17 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
|
|
|
334
319
|
@app.cell
|
|
335
320
|
def _():
|
|
336
321
|
import marimo as mo
|
|
337
|
-
|
|
322
|
+
import pandas as pd
|
|
338
323
|
return
|
|
339
324
|
|
|
340
325
|
@app.cell
|
|
341
326
|
def _():
|
|
342
|
-
|
|
327
|
+
cars_df = pd.read_csv('<https://raw.githubusercontent.com/vega/vega-datasets/master/data/cars.json>')
|
|
343
328
|
return
|
|
344
329
|
|
|
345
330
|
@app.cell
|
|
346
331
|
def _():
|
|
347
|
-
|
|
348
|
-
f"""
|
|
349
|
-
SELECT * FROM weather WHERE location = 'Seattle';
|
|
350
|
-
"""
|
|
351
|
-
)
|
|
332
|
+
_df = mo.sql("SELECT * from cars_df WHERE Miles_per_Gallon > 20")
|
|
352
333
|
return
|
|
353
334
|
|
|
354
335
|
</example>"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Copyright
|
|
1
|
+
/* Copyright 2025 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:
|
|
104
|
-
lastUsedAt:
|
|
103
|
+
createdAt: 1735689600000,
|
|
104
|
+
lastUsedAt: 1735689600000,
|
|
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:
|
|
143
|
-
lastUsedAt:
|
|
142
|
+
createdAt: 1735689600000,
|
|
143
|
+
lastUsedAt: 1735689600000,
|
|
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:
|
|
198
|
-
lastUsedAt:
|
|
197
|
+
createdAt: 1735689600000,
|
|
198
|
+
lastUsedAt: 1735689600000,
|
|
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:
|
|
206
|
-
lastUsedAt:
|
|
205
|
+
createdAt: 1735689600000,
|
|
206
|
+
lastUsedAt: 1735689600000,
|
|
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:
|
|
214
|
-
lastUsedAt:
|
|
213
|
+
createdAt: 1735689600000,
|
|
214
|
+
lastUsedAt: 1735689600000,
|
|
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:
|
|
268
|
-
lastUsedAt:
|
|
267
|
+
createdAt: 1735689600000,
|
|
268
|
+
lastUsedAt: 1735689600000,
|
|
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:
|
|
301
|
-
lastUsedAt:
|
|
300
|
+
createdAt: 1735689600000,
|
|
301
|
+
lastUsedAt: 1735689600000,
|
|
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:
|
|
309
|
-
lastUsedAt:
|
|
308
|
+
createdAt: 1735689600000,
|
|
309
|
+
lastUsedAt: 1735689600000,
|
|
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:
|
|
365
|
-
lastUsedAt:
|
|
364
|
+
createdAt: 1735689600000,
|
|
365
|
+
lastUsedAt: 1735689600000,
|
|
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:
|
|
373
|
-
lastUsedAt:
|
|
372
|
+
createdAt: 1735689600000,
|
|
373
|
+
lastUsedAt: 1735689600000,
|
|
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(
|
|
387
|
+
vi.advanceTimersByTime(3600000);
|
|
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(
|
|
408
|
+
vi.advanceTimersByTime(3600000);
|
|
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:
|
|
428
|
-
lastUsedAt:
|
|
427
|
+
createdAt: 1735689600000,
|
|
428
|
+
lastUsedAt: 1735689600000,
|
|
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:
|
|
436
|
-
lastUsedAt:
|
|
435
|
+
createdAt: 1735689600000,
|
|
436
|
+
lastUsedAt: 1735689600000,
|
|
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(
|
|
451
|
+
vi.advanceTimersByTime(3600000);
|
|
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:
|
|
502
|
-
lastUsedAt:
|
|
501
|
+
createdAt: 1735689600000, // 2025-01-01T00:00:00Z
|
|
502
|
+
lastUsedAt: 1735689600000,
|
|
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:
|
|
510
|
-
lastUsedAt:
|
|
509
|
+
createdAt: 1735693200000, // 2025-01-01T01:00:00Z
|
|
510
|
+
lastUsedAt: 1735693200000,
|
|
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:
|
|
518
|
-
lastUsedAt:
|
|
517
|
+
createdAt: 1735696800000, // 2025-01-01T02:00:00Z
|
|
518
|
+
lastUsedAt: 1735696800000,
|
|
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:
|
|
526
|
-
lastUsedAt:
|
|
525
|
+
createdAt: 1735700400000, // 2025-01-01T03:00:00Z
|
|
526
|
+
lastUsedAt: 1735700400000,
|
|
527
527
|
externalAgentSessionId: null,
|
|
528
528
|
},
|
|
529
529
|
];
|
|
@@ -383,29 +383,31 @@ const PromptArea = memo<PromptAreaProps>(
|
|
|
383
383
|
<AtSignIcon className="h-3.5 w-3.5" />
|
|
384
384
|
</Button>
|
|
385
385
|
</Tooltip>
|
|
386
|
-
|
|
387
|
-
<
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
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
|
+
</>
|
|
409
411
|
<Tooltip content={isLoading ? "Stop" : "Submit"}>
|
|
410
412
|
<Button
|
|
411
413
|
variant="text"
|
|
@@ -842,7 +844,8 @@ const AgentPanel: React.FC = () => {
|
|
|
842
844
|
// Parse context from the prompt
|
|
843
845
|
const { contextBlocks, attachmentBlocks } =
|
|
844
846
|
await parseContextFromPrompt(prompt);
|
|
845
|
-
promptBlocks.push(...contextBlocks
|
|
847
|
+
promptBlocks.push(...contextBlocks);
|
|
848
|
+
promptBlocks.push(...attachmentBlocks);
|
|
846
849
|
|
|
847
850
|
// Add manually uploaded files as resource links
|
|
848
851
|
if (files && files.length > 0) {
|
|
@@ -501,9 +501,11 @@ export const SessionNotificationsBlock = <
|
|
|
501
501
|
}
|
|
502
502
|
if (kind === "current_mode_update") {
|
|
503
503
|
const lastItem = items.at(-1);
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
504
|
+
if (lastItem?.sessionUpdate !== "current_mode_update") {
|
|
505
|
+
return null;
|
|
506
|
+
} else {
|
|
507
|
+
return <CurrentModeBlock data={lastItem} />;
|
|
508
|
+
}
|
|
507
509
|
}
|
|
508
510
|
|
|
509
511
|
return (
|
|
@@ -671,9 +673,7 @@ export const ToolBodyBlock = (props: {
|
|
|
671
673
|
);
|
|
672
674
|
}
|
|
673
675
|
|
|
674
|
-
|
|
675
|
-
const noDiffs = !diffs || diffs.length === 0;
|
|
676
|
-
if (noContent && noDiffs && hasLocations) {
|
|
676
|
+
if (content?.length && hasLocations) {
|
|
677
677
|
return (
|
|
678
678
|
<div className="flex flex-col gap-2 pr-2">
|
|
679
679
|
<span className="text-xs text-muted-foreground">
|