fix: Update AI enable setting with correct config target
Description
This MR fixes a problem where the gitlab.aiAssistedCodeSuggestions.enabled
will get written to the workspace settings upon toggling the status bar. This can sully the git status.
To fix this problem, we introduce a helper getConfigurationTargetForKey
, which can detect the best place to override a settings value.
Screenshots
- When there's a
.vscode/settings.json
present, it will update that value. - Otherwise, it will update the user setting.
References
Edited by Paul Slaughter