[COMPASS-7106] Navigate aggregations generated from the query bar ai Created: 10/Aug/23  Updated: 29/Oct/23  Resolved: 04/Sep/23

Status: Closed
Project: Compass
Component/s: Aggregation pipeline, GAI, Query Bar, UI / UX
Affects Version/s: None
Fix Version/s: 1.39.4

Type: Task Priority: Major - P3
Reporter: Rhys Howell Assignee: Sergey Petushkov
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on COMPASS-7105 Add aggregations ai input ui Closed
Epic Link: COMPASS-6866
Story Points: 5
Documentation Changes: Not Needed
Sprint: Iteration Iguanodon, Iteration Juravenator

 Description   

The ai model can't represent everything the user types in the query ai input with a simple find/project/etc, in those cases we've seen it's already trying to pass aggregation stages like $group or $count. This ticket involves updating the query generation prompt and response handling so that in those instances we navigate the user to the aggregations page and use the aggregation generated.
Designs: https://www.figma.com/file/Ip4CPowv3Uxxhu3klyXA0e/Generative-AI-in-Compass-MVP?type=design&node-id=1487%3A15745&mode=dev 



 Comments   
Comment by Githook User [ 05/Sep/23 ]

Author:

{'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}

Message: feat: navigate aggregations generated from the query bar ai COMPASS-7106 (#4759)

  • feat: navigate aggregations generated from the query bar ai COMPASS-7106
  • refactor: clean up
  • refactor: address pr comments
  • refactor: combine actions
  • refactor: spacing
  • test: mock atlasService.on after rebase from main
  • refactor: fix typo
  • chore: clean up component interface; clean up redux connect; update tests to use userEvent

---------

Co-authored-by: Sergey Petushkov <petushkov.sergey@gmail.com>
Branch: ga-releases
https://github.com/mongodb-js/compass/commit/249bfc7ad5963a0ad38185e378115864bc2d409c

Comment by Githook User [ 04/Sep/23 ]

Author:

{'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}

Message: feat: navigate aggregations generated from the query bar ai COMPASS-7106 (#4759)

  • feat: navigate aggregations generated from the query bar ai COMPASS-7106
  • refactor: clean up
  • refactor: address pr comments
  • refactor: combine actions
  • refactor: spacing
  • test: mock atlasService.on after rebase from main
  • refactor: fix typo
  • chore: clean up component interface; clean up redux connect; update tests to use userEvent

---------

Co-authored-by: Sergey Petushkov <petushkov.sergey@gmail.com>
Branch: beta-releases
https://github.com/mongodb-js/compass/commit/249bfc7ad5963a0ad38185e378115864bc2d409c

Comment by Githook User [ 30/Aug/23 ]

Author:

{'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}

Message: feat: navigate aggregations generated from the query bar ai COMPASS-7106 (#4759)

  • feat: navigate aggregations generated from the query bar ai COMPASS-7106
  • refactor: clean up
  • refactor: address pr comments
  • refactor: combine actions
  • refactor: spacing
  • test: mock atlasService.on after rebase from main
  • refactor: fix typo
  • chore: clean up component interface; clean up redux connect; update tests to use userEvent

---------

Co-authored-by: Sergey Petushkov <petushkov.sergey@gmail.com>
Branch: COMPASS-7073-align-storages
https://github.com/mongodb-js/compass/commit/249bfc7ad5963a0ad38185e378115864bc2d409c

Comment by Githook User [ 29/Aug/23 ]

Author:

{'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}

Message: feat: navigate aggregations generated from the query bar ai COMPASS-7106 (#4759)

  • feat: navigate aggregations generated from the query bar ai COMPASS-7106
  • refactor: clean up
  • refactor: address pr comments
  • refactor: combine actions
  • refactor: spacing
  • test: mock atlasService.on after rebase from main
  • refactor: fix typo
  • chore: clean up component interface; clean up redux connect; update tests to use userEvent

---------

Co-authored-by: Sergey Petushkov <petushkov.sergey@gmail.com>
Branch: use-zod
https://github.com/mongodb-js/compass/commit/249bfc7ad5963a0ad38185e378115864bc2d409c

Comment by Githook User [ 29/Aug/23 ]

Author:

{'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}

Message: feat: navigate aggregations generated from the query bar ai COMPASS-7106 (#4759)

  • feat: navigate aggregations generated from the query bar ai COMPASS-7106
  • refactor: clean up
  • refactor: address pr comments
  • refactor: combine actions
  • refactor: spacing
  • test: mock atlasService.on after rebase from main
  • refactor: fix typo
  • chore: clean up component interface; clean up redux connect; update tests to use userEvent

---------

Co-authored-by: Sergey Petushkov <petushkov.sergey@gmail.com>
Branch: main
https://github.com/mongodb-js/compass/commit/249bfc7ad5963a0ad38185e378115864bc2d409c

Comment by Githook User [ 25/Aug/23 ]

Author:

{'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}

Message: Merge remote-tracking branch 'origin/main' into COMPASS-7106-create-aggregation-from-query

  1. Conflicts:
  2. packages/compass-aggregations/src/modules/pipeline-builder/pipeline-ai.ts
    Branch: COMPASS-7106-create-aggregation-from-query
    https://github.com/mongodb-js/compass/commit/90a425ad5ab48e8d2708671bb78458422f3e027d
Comment by Githook User [ 25/Aug/23 ]

Author:

{'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}

Message: Merge remote-tracking branch 'origin/main' into COMPASS-7106-create-aggregation-from-query
Branch: COMPASS-7106-create-aggregation-from-query
https://github.com/mongodb-js/compass/commit/331da9ea9b706bd637c33f796003f85a14371354

Comment by Githook User [ 24/Aug/23 ]

Author:

{'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}

Message: Merge remote-tracking branch 'origin/main' into COMPASS-7106-create-aggregation-from-query

  1. Conflicts:
  2. packages/compass-aggregations/src/components/pipeline-toolbar/index.tsx
  3. packages/compass-aggregations/src/modules/pipeline-builder/pipeline-ai.ts
  4. packages/compass-components/src/components/generative-ai/generative-ai-input.spec.tsx
  5. packages/compass-components/src/components/generative-ai/generative-ai-input.tsx
  6. packages/compass-query-bar/src/stores/ai-query-reducer.ts
    Branch: COMPASS-7106-create-aggregation-from-query
    https://github.com/mongodb-js/compass/commit/2b9fab5633381da90eaf35ffd566c919060de7ab
Comment by Githook User [ 24/Aug/23 ]

Author:

{'name': 'Alena Khineika', 'email': 'alena.khineika@gmail.com', 'username': 'alenakhineika'}

Message: feat: navigate aggregations generated from the query bar ai COMPASS-7106
Branch: COMPASS-7106-create-aggregation-from-query
https://github.com/mongodb-js/compass/commit/9a26cb848d11cdf96b098a607592be7af778adc5

Generated at Wed Feb 07 22:45:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.