@querypanel/node-sdk 1.0.45 → 1.0.47

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/README.md CHANGED
@@ -145,6 +145,7 @@ if (response.chart.vegaLiteSpec) {
145
145
  // 2. Save the chart (only stores SQL + metadata, no data)
146
146
  const savedChart = await qp.createChart({
147
147
  title: "Revenue by Country",
148
+ prompt: "Show revenue by country",
148
149
  sql: response.sql,
149
150
  sql_params: response.params,
150
151
  vega_lite_spec: response.chart.vegaLiteSpec,
@@ -162,6 +163,9 @@ if (response.chart.vegaLiteSpec) {
162
163
  const charts = await qp.listCharts({ tenantId: "tenant_123" });
163
164
  ```
164
165
 
166
+ Saved charts now include the original `prompt` so you can show the question
167
+ alongside chart history or reuse it in follow-up workflows.
168
+
165
169
  ## Modifying Charts
166
170
 
167
171
  The `modifyChart()` method allows you to edit SQL and/or visualization settings, then re-execute and regenerate charts. It works with both fresh `ask()` responses and saved charts.
@@ -280,7 +284,7 @@ const savedChart = await qp.getChart("chart_id_123", {
280
284
  // Modify it
281
285
  const modified = await qp.modifyChart({
282
286
  sql: savedChart.sql,
283
- question: "original question", // Store this when saving charts
287
+ question: savedChart.prompt ?? "original question",
284
288
  database: savedChart.target_db ?? "analytics",
285
289
  params: savedChart.sql_params as Record<string, unknown>,
286
290
  vizModifications: {