feat(code suggestions): show license status
Description
This MR uses the new GraphQL endpoint (gitlab!141617 (merged)) to show the user whether they have a code suggestion license.
Related Issues
Resolves #1232 (closed)
How has this been tested?
-
Add the feature flag to your
settings.json
"gitlab.featureFlags.codeSuggestionsLicensePolicy": true,
-
Check what is your license status:
- https://gitlab.com/-/graphql-explorer
-
query aiAccess { currentUser { duoCodeSuggestionsAvailable } }
-
If the GraphQL endpoint returns
true
then you have a license- If you have a license, use a different user (I have a private test user)
- For this user, generate access token with
api
scope https://gitlab.com/-/user_settings/personal_access_tokens - Remove existing users from VS Code
GitLab: Remove Account
command - Add the new user to VS Code
GitLab: Add Account
command
-
Go to a supported source file (e.g. TypeScript) and see the status bar tell you that you don't have a license
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms) -
Test gap
Edited by Tomas Vik