refactor: change how we represnt disabled in settings
Description
This refactoring makes the CodeSuggestionsStateManager
a thicker class (with more business logic). We'll move all business logic related to managing state into it so that we can reuse it for the Language Server.
Related Issues
Part of #1052 (closed)
How has this been tested?
-
Disable code suggestions in your settings and make sure you use the non-LS implementation
{ "gitlab.aiAssistedCodeSuggestions.enabled": false, "gitlab.featureFlags.languageServer":false, }
-
See that suggestions are disabled in the status bar
-
Click the status bar icon
-
Click the status bar icon again
-
Click again to enable
-
Go to a JSON file
-
Go to JS file and type something in
- see that the icon changes when the extension loads new suggestions
Screenshots (if appropriate):
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)