I am running into a brick wall setting up Gitlab Duo in VSCode. In the settings for the GitLab Workflow extension there is the following input field:
“Ai Assisted Code Suggestions: Preferred Account”
What the h*ll is my “preferred account”!?
I have tried entering a personal access token I specifically created for VSCode…
I have tried entering my Gitlab username…
I have tried entering the url to my profile…
Nothing seems to work. Every option I try I get the same error when I attempt to start a duo chat.
“AI features are not enabled or resource is not permitted to be sent.”
Now I know AI features are enabled becuase of two reasons
I enabled Code Suggestions on my profile preferences on GitLab.com
The preferred account setting helps when you have multiple accounts configured in your VS Code settings (for example, one account for GitLab.com SaaS, and a second account for your self-managed instance URL). If there is just one account, the extension will use this account. In my VS Code setup, the preferred account setting is left blank.
Next to enabling Code Suggestions in your account, the top-level group also needs Code Suggestions enabled (group owners can do so). Code Suggestions on GitLab SaaS | GitLab
Please also check whether the workflow extension is the latest release, at the time of writing this, v3.89.0. I used Code Suggestions in VS Code today.
Maybe it helps - these are all my settings in VS Code for the GitLab Workflow Extension.