Skip to content

feat: suggestions status manager handles missing account

Description

This MR adds additional state NO_ACCOUNT to the code suggestions status manager.

This state is displayed as the visible state in case no accounts supporting Code Suggestions are available.

image

account-state-management

Related Issues

Resolves #1052 (closed)

How has this been tested?

See screencast with this testing above.

  1. This change affects both LS and non-LS implementations so test with FF on and off
{
  "gitlab.featureFlags.languageServer": false/true,
  "gitlab.aiAssistedCodeSuggestions.enabled": true,
}
  1. See that the suggestions are working when an account is present
  2. remove GitLab account GitLab: Remove Account from VS Code
  3. See that suggestions stopped working and status bar shows message on hover saying there is no account
  4. Add account GitLab: Authenticate to GitLab.com
  5. See that suggestions are working and status bar shows they are enabled

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 (OOO back on 2024-06-18)

Merge request reports