@sqlrooms/vega 0.16.3 → 0.17.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.
Files changed (2) hide show
  1. package/README.md +26 -28
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -123,34 +123,32 @@ A tool for creating Vega-Lite charts in AI-assisted workflows, designed to work
123
123
  ```tsx
124
124
  import {createVegaChartTool} from '@sqlrooms/vega';
125
125
  import {createAiSlice} from '@sqlrooms/ai';
126
- import {createProjectStore} from '@sqlrooms/project-builder';
127
-
128
- // Create a project store with the VegaChartTool configured
129
- export const {projectStore, useProjectStore} = createProjectStore(
130
- (set, get, store) => ({
131
- // Other slices and state...
132
-
133
- // AI slice with custom tools
134
- ...createAiSlice({
135
- getApiKey: (modelProvider: string) => {
136
- return get()?.apiKeys[modelProvider] || '';
137
- },
138
- // Configure custom tools at store creation time
139
- customTools: {
140
- // Add the VegaChart tool
141
- chart: createVegaChartTool({
142
- // Optional custom description
143
- description:
144
- 'Create data visualizations using Vega-Lite and SQL queries',
145
- }),
146
-
147
- // Other custom tools...
148
- },
149
- })(set, get, store),
150
-
151
- // Other state and methods...
152
- }),
153
- );
126
+ import {createRoomStore} from '@sqlrooms/room-shell';
127
+
128
+ // Create a room store with the VegaChartTool configured
129
+ export const {roomStore, useRoomStore} = createRoomStore((set, get, store) => ({
130
+ // Other slices and state...
131
+
132
+ // AI slice with custom tools
133
+ ...createAiSlice({
134
+ getApiKey: (modelProvider: string) => {
135
+ return get()?.apiKeys[modelProvider] || '';
136
+ },
137
+ // Configure custom tools at store creation time
138
+ customTools: {
139
+ // Add the VegaChart tool
140
+ chart: createVegaChartTool({
141
+ // Optional custom description
142
+ description:
143
+ 'Create data visualizations using Vega-Lite and SQL queries',
144
+ }),
145
+
146
+ // Other custom tools...
147
+ },
148
+ })(set, get, store),
149
+
150
+ // Other state and methods...
151
+ }));
154
152
  ```
155
153
 
156
154
  #### Tool Parameters
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sqlrooms/vega",
3
- "version": "0.16.3",
3
+ "version": "0.17.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/index.js",
@@ -18,10 +18,10 @@
18
18
  "access": "public"
19
19
  },
20
20
  "dependencies": {
21
- "@sqlrooms/ai": "0.16.3",
22
- "@sqlrooms/duckdb": "0.16.3",
23
- "@sqlrooms/ui": "0.16.3",
24
- "@sqlrooms/utils": "0.16.3",
21
+ "@sqlrooms/ai": "0.17.0",
22
+ "@sqlrooms/duckdb": "0.17.0",
23
+ "@sqlrooms/ui": "0.17.0",
24
+ "@sqlrooms/utils": "0.17.0",
25
25
  "react-vega": "^7.6.0",
26
26
  "vega": "^5.33.0",
27
27
  "vega-lite": "^5.23.0",
@@ -38,5 +38,5 @@
38
38
  "typecheck": "tsc --noEmit",
39
39
  "typedoc": "typedoc"
40
40
  },
41
- "gitHead": "4f1982b5942627e64d8e251f78f5b07ff6317288"
41
+ "gitHead": "1f2a306da771481e2c89d8bfbd0507772167b1b5"
42
42
  }