query_lens 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9aaf93d111afdef8297ecd5bbd1272351f54a7539e76dd9c995a474861e07c75
4
- data.tar.gz: 3ac00b2450ecd61da67f68995718cdb2f89ba227a4136bdb0d8aac9cae5c66e6
3
+ metadata.gz: 8483ac3f8d86dbaa16242e87fec870d20161b25ccb1e68c6781c77f5043475fb
4
+ data.tar.gz: 0f36bbc48b10e5b9fa933d4b57bd05c846947f67dfc906fbc1e06e09e6152c95
5
5
  SHA512:
6
- metadata.gz: bd7f9d8da037af3eb24f18806137d9e5abc6a19c445b2242ade57153c2f0d36a2b7387e3a9e320cb322e89ade259d3eaeedabece561cb773db272c01d4e6f762
7
- data.tar.gz: 828078b8c9a7a2fb7143e74de58c79f174087c28a8a70b6edfb8e5163891020379384995c4fb7ad81e393963b96d5a3b5f7f63bc517a4dc28ad1942e6ff52c00
6
+ metadata.gz: 45eb9530141266e8de24ee0f6fa437e62eb48887f0d9603ad20451046e860f533697ceab831a474200143b1f6ca103b033fbc95080e527e5cb6e9be0cad46ec3
7
+ data.tar.gz: 1375571e833d3244d091c4b16b70a363c58289a5b522290679b936bcc376befbbe81363a70092399f56c3e23a8a29befe1755058e63101e0e8f9563fea4ebac5
data/README.md CHANGED
@@ -4,9 +4,9 @@ A mountable Rails engine that lets users write natural language questions and ge
4
4
 
5
5
  Powered by [RubyLLM](https://rubyllm.com), QueryLens works with any major AI provider: OpenAI, Anthropic (Claude), Google Gemini, DeepSeek, Mistral, Ollama (local models), and more.
6
6
 
7
- [Watch the demo (90 seconds)](https://www.loom.com/share/595ed0ea3c1f42b28152a345db586c85)
7
+ ![QueryLens Screenshot](docs/screenshot.png)
8
8
 
9
- [![QueryLens Demo](https://cdn.loom.com/sessions/thumbnails/595ed0ea3c1f42b28152a345db586c85-with-play.gif)](https://www.loom.com/share/595ed0ea3c1f42b28152a345db586c85)
9
+ [Watch the demo (90 seconds)](https://www.loom.com/share/595ed0ea3c1f42b28152a345db586c85)
10
10
 
11
11
  **Want to try it without touching your own database?** The [QueryLens Testbed](https://github.com/bryanbeshore/query_lens_testbed) is a ready-to-go Rails app with sample data — clone, run, and start querying in under 2 minutes.
12
12
 
@@ -14,8 +14,9 @@ module QueryLens
14
14
  - Always include an ORDER BY clause when it makes sense (e.g., by date descending, by amount descending).
15
15
 
16
16
  RESPONSE FORMAT:
17
- Respond with a brief explanation of what the query does, then the SQL query wrapped in ```sql code fences.
18
- Keep explanations concise (1-2 sentences).
17
+ - When the user asks for data or wants a new/modified query: respond with a brief explanation (1-2 sentences), then the SQL query wrapped in ```sql code fences.
18
+ - When the user asks about the results, asks what a column means, wants clarification, or is discussing the data: respond conversationally WITHOUT SQL code fences. The existing query and results will remain visible.
19
+ - Only include ```sql code fences when you are providing a new or modified query.
19
20
 
20
21
  DATABASE SCHEMA:
21
22
  %{schema}
@@ -253,9 +253,9 @@
253
253
  }
254
254
 
255
255
  if (data.explanation) addMessage('ai', data.explanation, genTime);
256
+ conversation.push({ role: 'assistant', content: data.raw || data.explanation });
256
257
  if (data.sql) {
257
258
  el.sql.value = data.sql;
258
- conversation.push({ role: 'assistant', content: data.raw || data.explanation });
259
259
  await runQueryWithTrace(trace);
260
260
  } else {
261
261
  addTrace(trace);
@@ -1,3 +1,3 @@
1
1
  module QueryLens
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: query_lens
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Beshore