Skip to content

Conversation

gagik
Copy link
Contributor

@gagik gagik commented Sep 18, 2025

Will now distinguish between queries and aggregations in explain plan prompting.

@gagik gagik requested a review from a team as a code owner September 18, 2025 10:29
@gagik gagik requested review from Anemy and Copilot September 18, 2025 10:29
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds the ability to differentiate between queries and aggregations when generating explain plan prompts for the compass assistant. The change allows the system to provide more contextually appropriate AI-generated explanations by knowing whether the explain plan originated from a query or an aggregation operation.

  • Adds operationType field to track whether an explain plan is for a 'query' or 'aggregation'
  • Updates prompt generation to use appropriate terminology based on operation type
  • Includes comprehensive test coverage for the new functionality

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/compass-explain-plan/src/stores/explain-plan-modal-store.ts Adds operationType field to state and actions, determines type based on event properties
packages/compass-explain-plan/src/stores/explain-plan-modal-store.spec.ts Adds tests to verify operationType is correctly set for queries and aggregations
packages/compass-explain-plan/src/components/explain-plan-modal.tsx Passes operationType to assistant actions and connects it to component props
packages/compass-assistant/src/prompts.ts Updates prompt generation to use dynamic terminology based on operation type
packages/compass-assistant/src/prompts.spec.ts Adds tests to verify prompt content differs between query and aggregation types
packages/compass-assistant/src/compass-assistant-provider.tsx Updates type definition to include operationType parameter

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@gagik gagik merged commit 434e00a into main Sep 19, 2025
60 checks passed
@gagik gagik deleted the gagik/explain-difference branch September 19, 2025 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants