feat: generate multiple charts per query in VegaLiteAgent#1927
Open
ghostiee-11 wants to merge 6 commits into
Open
feat: generate multiple charts per query in VegaLiteAgent#1927ghostiee-11 wants to merge 6 commits into
ghostiee-11 wants to merge 6 commits into
Conversation
VegaLiteAgent previously produced only a single plot; it now returns one or more charts. - The declarative (VegaLiteSpec) and Altair (AltairSpec) response models take a list of chart specifications instead of a single spec or code block. - Each chart becomes its own editable VegaLiteEditor, which the UI renders as a tab with the vega-lite code beside the plot. For multiple charts a view-only "All" overview that stacks every plot is appended last. - A chart whose spec fails to parse is skipped so one malformed spec does not discard the charts that parsed; if none parse, generation retries. - Add MultiChartEditor, a small display-only editor mirroring DocumentEditor.
Document that VegaLiteAgent can produce more than one chart from a single request, each in its own editable tab alongside an "All" overview.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1927 +/- ##
==========================================
+ Coverage 71.22% 71.37% +0.14%
==========================================
Files 198 198
Lines 34645 34745 +100
==========================================
+ Hits 24677 24798 +121
+ Misses 9968 9947 -21 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The "All" overview rendered each chart from a one-off snapshot, so editing a chart in its own tab (or the polish pass) left the overview stale. Render each overview plot from its editor's component so it updates with the chart.
When a chart's specification fails to parse it is skipped so the rest still render, but the drop was only logged. Note it in the step output so the user knows a chart was left out.
Drive a SQL + VegaLite plan that returns two charts and assert the exploration tabs: an editable tab per chart plus a view-only "All" overview placed last and opened by default (no code-editor split, unlike the chart tabs).
get_block_names decoded the template with the platform default codec, which fails on Windows for templates with non-ASCII characters (e.g. the VegaLite prompt). Decode as UTF-8, matching extract_block_source just below it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1916.
VegaLiteAgentcould only ever produce a single plot. It now returns one or more charts from a single request: each chart opens in its own editable tab (vega-lite code beside the plot), plus a view-only "All" tab that stacks every plot when there are several. A chart whose spec fails to parse is skipped, so the others still render.Screen.Recording.2026-07-19.at.9.58.11.AM.mp4