
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@sqlrooms/vega
Advanced tools
Vega-Lite chart components and AI chart tool integration for SQLRooms.
npm install @sqlrooms/vega @sqlrooms/duckdb @sqlrooms/ui
VegaLiteChart (simple + compound component API)createVegaChartTool() for AI tool workflowsVegaChartToolResultuseVegaChartEditor, useVegaEditorContext)import {VegaLiteChart} from '@sqlrooms/vega';
export function SalesChart() {
return (
<VegaLiteChart
sqlQuery="SELECT category, SUM(amount) AS total FROM sales GROUP BY category"
spec={{
mark: 'bar',
encoding: {
x: {field: 'category', type: 'nominal'},
y: {field: 'total', type: 'quantitative'},
},
}}
aspectRatio={16 / 9}
/>
);
}
import {VegaLiteChart, type VisualizationSpec} from '@sqlrooms/vega';
const initialSpec: VisualizationSpec = {
mark: 'line',
encoding: {
x: {field: 'date', type: 'temporal'},
y: {field: 'value', type: 'quantitative'},
},
};
export function CompoundVegaChart() {
return (
<VegaLiteChart.Container
spec={initialSpec}
sqlQuery="SELECT date, value FROM metrics"
editable
onSpecChange={(spec) => console.log('next spec', spec)}
onSqlChange={(sql) => console.log('next sql', sql)}
>
<VegaLiteChart.Actions />
<VegaLiteChart.Chart />
<VegaLiteChart.SpecEditor />
<VegaLiteChart.SqlEditor />
</VegaLiteChart.Container>
);
}
createVegaChartTool)import {
createAiSlice,
createDefaultAiInstructions,
createDefaultAiTools,
} from '@sqlrooms/ai';
import {createVegaChartTool} from '@sqlrooms/vega';
// inside your createRoomStore composer
createAiSlice({
tools: {
...createDefaultAiTools(store),
chart: createVegaChartTool({
editable: true,
editorMode: 'both',
}),
},
getInstructions: () => createDefaultAiInstructions(store),
})(set, get, store);
createVegaChartTool constructor options:
editable: whether users can edit SQL/spec in the chart UIeditorMode: which editors to render ('none' | 'sql' | 'vega' | 'both')At runtime, the tool call payload is validated by a Zod schema.
These fields are supplied by the LLM when invoking the tool (not passed into
createVegaChartTool(...)):
sqlQuery: SQL used to fetch chart datavegaLiteSpec: Vega-Lite JSON stringreasoning: explanation shown to users for why this chart/spec was chosenFAQs
Vega-Lite chart components and AI chart tool integration for SQLRooms.
The npm package @sqlrooms/vega receives a total of 2,052 weekly downloads. As such, @sqlrooms/vega popularity was classified as popular.
We found that @sqlrooms/vega demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.