Skip to content

chore: Add 'repository' context type and feature flag

What does this MR do and why?

Adds a new AI additional context type of "repository" to the GraphQL API.

Uses the "include_terminal_context" cloud connector unit primitive.

Closes #536906 (closed)

References

This context type will be used by the Codebase as Chat Context feature. See project blueprint.

How to set up and validate locally

  1. Locally enable the duo_include_context_repository feature flag (e.g. by running gdk rails c and executing Feature.enable(:duo_include_context_repository, User.find_by(email: 'admin@example.com'))

  2. Start gdk

  3. Navigate to http://gdk.test:3000/-/graphql-explorer

  4. Run the following query:

    query userDuoLicenseStatus {
      currentUser {
        id
        username
        duoChatAvailableFeatures
      }
    }
  5. In the response, the duoChatAvailableFeatures array should include "include_repository_context"

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Anna Springfield

Merge request reports

Loading