Migrate Duo enabled project check to the LS

Description

This MR should be checked together with the LS counterpart gitlab-org/editor-extensions/gitlab-lsp!672 (merged)

It migrates the Duo enabled for project check to the languages server and ideally should work as before.

Related Issues

Part of the migration gitlab-org/editor-extensions/gitlab-lsp#177 (closed)

How has this been tested?

  1. Link the LS MR to this one and run extension
  2. Open the project that has Duo enabled - the Status icon should be enabled (or display a different status - no project disabled)
  3. Enable the setting, set "gitlab.duo.enabledWithoutGitlabProject": true (true is default value though) Screenshot_2024-08-20_at_17.37.09
  4. Open a GitLab project and see that suggestions still work
  5. Open a project that's not versioned on GitLab and see that the Duo features work
  6. Now disable the setting, set "gitlab.duo.enabledWithoutGitlabProject": false
  7. Open a GitLab project and see that suggestions still work
  8. Open a project that's not versioned on GitLab and see that the Duo features don't work and the status icon shows "Code suggestions are disabled for this project"
  9. When in the Project disabled state - make sure Duo chat is also disabled
  10. Try to toggle the CS or document language to make sure the Project Duo check has the priority before the language check

What CHANGELOG entry will this MR create?

  • fix: Bug fix fixes - a user-facing issue in production - included in changelog
  • feature: New feature - a user-facing change which adds functionality - included in changelog
  • BREAKING CHANGE: (fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog
  • None - other non-user-facing changes
Edited by Tomas Vik (OOO back on 2026-01-05)

Merge request reports

Loading