discourse/plugins/discourse-data-explorer/spec/lib
Natalie Tay 81942bf4b2
DEV: Switch DE agent to use tools for structure and accuracy (#40315)
Previously, Data Explorer AI query generation used structured output for
the final query payload, which conflicted with tool usage and could
return SQL that had not been validated.

This commit gets the required `name`, `description`, and `sql` through a
final `submit_query` tool, requiring the exact SQL to pass `run_sql` before it
is returned. It also gives `run_sql` representative values for declared
params, including `current_user_id`, and returns a targeted error when
SQL uses params that were not declared in a `-- [params]` block.
2026-06-03 22:08:44 +08:00
..
data_explorer FEATURE: discourse-workflows (#40374) 2026-05-28 19:44:50 +02:00
discourse_data_explorer UX: Interleave dashboard report providers alphabetically (#40483) 2026-06-03 02:51:55 +03:00
tools DEV: Switch DE agent to use tools for structure and accuracy (#40315) 2026-06-03 22:08:44 +08:00
ai_query_generator_spec.rb DEV: Switch DE agent to use tools for structure and accuracy (#40315) 2026-06-03 22:08:44 +08:00
ai_query_params_spec.rb DEV: Switch DE agent to use tools for structure and accuracy (#40315) 2026-06-03 22:08:44 +08:00
parameter_spec.rb FEATURE: Add current_user_id parameter type to Data Explorer (#36655) 2025-12-12 16:40:14 +01:00
query_result_cache_spec.rb FEATURE: Cache data explorer responses by query and param for quick results (#39118) 2026-04-07 11:57:33 +08:00
query_result_downloader_spec.rb FEATURE: Cache data explorer responses by query and param for quick results (#39118) 2026-04-07 11:57:33 +08:00
query_runner_spec.rb FEATURE: Cache data explorer responses by query and param for quick results (#39118) 2026-04-07 11:57:33 +08:00