Gitlab code suggestions not working in VS Code

Code suggestions is not working in VS Code. I have been assigned a seat by the administrator in our orgranization and in the process of evaluation of Code suggestions. However, there is no sign of life after i type a comment. Eg: // Implement Hello world.

I have authenticated and validated my account in VS Code command, and see that Code suggestions is enabled in Duo settings. However there is no Code suggestions coming up.

Problem to solve

Describe your question in as much detail as possible:

  • What are you seeing, and how does that differ from what you expect to see?
  • Consider including screenshots, error messages, and/or other helpful visuals

Steps to reproduce

Which troubleshooting steps have you already taken? Can you link to any docs or other resources so we know where you have been?

Configuration

Provide screenshots from the GitLab UI showing relevant configuration, if applicable.
If applicable, provide IDE configuration settings.

Versions

Please select whether options apply, and add the version information.

  • Self-managed
  • GitLab.com SaaS
  • Which GitLab Duo feature is involved:

Versions

  • GitLab (Web: /help or self-managed system information sudo gitlab-rake gitlab:env:info):
  • IDE and GitLab Duo Workflow extensions, if applicable:
    • VS Code: <1.94.1, GitLab Workflow version v5.15.0>
    • JetBrains <IDE name>: <version, Duo plugin version>
    • MS Visual Studio: <version, Duo extension version>

Helpful resources

  1. Check the FAQ for helpful documentation, issues/bugs/feature proposals, and troubleshooting tips.
  2. Before opening a new topic, make sure to search for keywords in the forum search
  3. Check the GitLab project for existing issues. If you encounter a bug, please create a bug report issue.
  4. Review existing troubleshooting docs.

Thanks for taking the time to be thorough in your request, it really helps! :blush:

Please help fill in the template questions, especially the versions involved.

Edited and filled the versions

Thanks. Looking at your code example, I assume it might be TypeScript/JavaScript, but could also be Go / C++.

I’m using the same VS Code versions, and GitLab.com SaaS where Code Suggestions work for TypeScript. The indicator at the bottom will tell whether Code Suggestions are enabled.

image

To troubleshoot the IDE side:

  1. The file extension is important for VS Code and Duo to detect the language.
  2. Check that the language is supported. You can also configure additional languages.

If the IDE looks good, the problem may be on the server-side. Which self-managed GitLab version are you using?

Your administrator also needs to make sure that the Duo subscription is synced to the self-managed instance. The steps are explained in the troubleshooting docs, including a health check. Control GitLab Duo availability | GitLab