Skip to content

Refactor AiActionsDropdown

What does this MR do and why?

This MR refactors AiActionsDropdown.vue to support more AI actions via props. Right now it only supports a single hard coded action.

It also externalizes Apollo API out of the component and adds support for abstract actions that don't rely on Apollo. This is necessary for Engineering: Summarize my merge request review (#407364 - closed) because I plan to use this component to add another action that doesn't reply on Apollo and GraphQL.

Timeout functionality has been removed because that should be handled on:

  1. Transport level for the GraphQL query (HTTP requests timeout by default)
  2. API level for the WebSockets updates

Lastly, it changes GlCollapsibleListbox to GlDisclosureDropdown because it better represents the component UI logic.

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Upgrade to Ultimate GitLab license
  2. Enable necessary feature flags
    Feature.enable(:openai_experimentation)
    Feature.enable(:summarize_comments)
    Feature.enable(:summarize_notes)
  3. Open any issue and scroll to the reply form
Edited by Stanislav Lashmanov

Merge request reports

Loading