Summary
Add an option to make the Query Data section (SQL query and results) collapsible by default, showing only the AI's natural language answer with a toggle to expand/collapse the technical details.
Problem Statement
Currently, when users interact with querychat, the query details (generated SQL and raw results) are always visible and expanded. For end users who primarily care about the AI's answer rather than the technical implementation, this creates visual clutter and makes the interface less user-friendly.
Current Behavior
When a user submits a query:
- The generated SQL query is displayed
- The raw query results are displayed
- The AI's natural language answer is displayed below
All sections are visible simultaneously, requiring users to scroll through technical details even when they only need the answer.
Desired Behavior
Provide an option or parameter to set the default to collapsed, showing only the AI answer, with query details collapsed.
Proposed API
querychat_init(
data_source = my_data,
collapse_query = TRUE, # New parameter
# ...other parameters
)
Summary
Add an option to make the Query Data section (SQL query and results) collapsible by default, showing only the AI's natural language answer with a toggle to expand/collapse the technical details.
Problem Statement
Currently, when users interact with querychat, the query details (generated SQL and raw results) are always visible and expanded. For end users who primarily care about the AI's answer rather than the technical implementation, this creates visual clutter and makes the interface less user-friendly.
Current Behavior
When a user submits a query:
All sections are visible simultaneously, requiring users to scroll through technical details even when they only need the answer.
Desired Behavior
Provide an option or parameter to set the default to collapsed, showing only the AI answer, with query details collapsed.
Proposed API