The GitLab VSCode extension is responsible for code auto-completion at a given user's prompt. Depending on the prompt, the extension provides entire code snippets like generating functions or completes the current line. And by simply pressing the tab key you accept the suggestions. The extension provides code completions in a target file without analyzing file extensions and other files in the repo.
GitLab is currently running aCLOSED BETAaccess program for this feature for select Ultimate customers and for Gitlab Internal User. Following the below steps will NOT work without a feature flag enabled for your account on GitLab.com for external customers.Fill out this form to be considered for early access.
Internal GitLab users don't need to fill out the form follow the steps and happy testing.
This issue was automatically tagged with the label groupcode review by TanukiStan, a machine learning classification model, with a probability of 1.
If this label is incorrect, please tag this issue with the correct group label as well as automation:ml wrong to help TanukiStan learn from its mistakes.
If you do not feel the purpose of this issue matches one of the types, you may apply the typeignore label to exclude it from type tracking metrics and future prompts.
Congratulations for getting this ready to be tried out. I gave it a testrun on my current work on the gitlab project.
My first impressions:
It's really hard to know if the Assist is doing something at the moment or not, as there is lag with suggestions its never clear if there is more coming or not
In already existing files it feels that the Assist is going rampage from time to time and started suggesting more out of the blue and in a lot of cases simply functions from the file next to it or a couple of lines above without being asked
It seems to act on existing comments, which would be also my first question? how do you distinguish just comments versus ai asks?
Which can even become very disruptive as tab suddenly injects random code
We are making UX/UI improvements to help make this a seamless experience. Adding more options like Enable/Disable code suggestions, Code recommendations, and code fillers, will also help improve the quality of suggestions.
It seems to act on existing comments, which would be also my first question? how do you distinguish just comments versus ai asks?
I`ll take this with the team to explore, how to better distinguish comments, docstrings, and doc blocks.
@stanhu Reading the instructions, this is configured per user locally in their locally installed VS Code IDE vs something we can enable ourselves in the cloud. Can you confirm @mray2020 ?
@wayne I configured my VS Code IDE, but as I understand it a feature flag has to be enabled for specific users for this to work. I had to request access in a separate form.
Got it @stanhu . @a_akgun Can we update the feature flag to include all GitLab team members to remove this manual step on a per team member basis? cc @mray2020
@stanhu sorry for the delayed response, Gitlab internal team members can use code suggestions in VS Code extension without access request. You just need to install the GitLab workflow extension to get started.
@stanhu , there are no forms for internal team members. We have it gated for external customers behind feature flag.
For the current set up once you have enabled Gitlab Workflow ( VS code plugin ) , one should be able enable Code Suggestions.
For the future , it will be part of Web IDE and VS code.
cc @wayne , @nkhalwadekar
Ok, thanks for the clarification. I got thrown off by the banner:
GitLab is currently running a CLOSED BETA access program for this feature for select Ultimate customers. Following the below steps will NOT work without a feature flag enabled for your account on GitLab.com. Fill out this form to be considered for early access.
Is there an issue to follow about updates/changes to code suggestions during the beta? So I know when certain things might be fixed.
I needed to turn it off yesterday as it was way too often "messing" at the positions I was currently working on in the gitlab code base. As written above e.g. suggested in mid of line suddenly another catch while I just wrote a catch, which meant while typing suddenly injected as I was typing breaking code. That happened multiple times.
@nkhalwadekar Hi, I have a GitLab Ultimate customer who has registered interest in this programme, do you know how long it takes for them to be approved or accepted to participate?
Ruby is not listed as something supported in the beta in the highest confidence. What is the confidence level (moderate, low)? The non-high confidence in Ruby may be one of the reasons why we have seen low usage / dogfooding by GitLab team members.
The existing model we serve at prod, unfortunately, does not support Ruby (was not trained for Ruby by Salesforce), making it difficult for GitLab team members to dogfood. I would say that the model confidence now is extremely low.
We are now actively working on adding Ruby support as well as the other 12 languages to the fine-tuned version of FauxPilot/Codegen, which we plan to release by the end of April.
Some technical information you may be interested in (ref - preprocessed-dataset table):
we collected 3,089,847 files to fine-tune the model for Ruby
@nkhalwadekar Is there a way to see if the plugin is working or thrown an error? I followed the setup steps, created a new Python file, and copied the test prompt from the video and nothing happens. I tried several other prompts and didn't get any generated text there either.
Another question is if Javascript is listed as a supported language, are Vue files supported?
@stkerr , let me get back to you on your error, just checking did you try it in a gitlab project? As it currently doesnt work for non-gitlab project. Just checking!
It does not support Vue for now, but would love to get feedback on it as well!
@nkhalwadekar@mray2020 I was able to get it working and wrote a short hello world program with it.
I do find it difficult to know what's going on since there isn't a "spinner wheel" or some way to know if the AI is thinking or if it's not going to do anything with my prompt. Communicating to the user in some way that the plugin is set up correctly / is processing / is idle could help with this. Perhaps an entry on the bottom status bar?
@stkerr, we intend to add this in the next iteration to indicate that code suggestions are set up, enabled, and disabled when not needed. We are actively working on UX improvements. Thank you for your feedback.
Disclaimer: I am a JetBrains IDE user, not a VS Code user so I may have missed some configuration which could have helped improve my experience (more on that below)
I tried this out briefly, working on Ruby code in the GitLab monolith codebase
The suggestions were good, and better than I expected if I'm being honest! They were generally accurate/correct/useful for the context, and seemed generally comparable to CoPilot single-line completions.
However, I don't know how to test out multiple different multi-line completions from a sidebar/selection like I can for CoPilot. I know I've seen some UI mockups for this, but I don't know if its available yet, or if so, how to enable/use it. This is where the power of CoPilot really shows, when it provides complete alternative multi-line block algorithm implementations to choose from.
CoPilot is also very useful when writing documentation (Markdown docs). I know from the description that this isn't supported yet, but it's another of the important things I like about CoPilot.
It does, however, attempt to complete comments within code, which is nice!
The one annoyance I had was that the "built in" autocompletion/dropdown suggestions (the ones that start with a small-font abc and a completed variable name) interfered with the AI completion. I was only able to get the AI completion to work after I had completed a variable/expression and typed a trailing space on the line. I have no idea where these suggestions come from (built-in or a Ruby plugin I installed) or how to disable them.
That's the only feedback I have based on playing around. As I said, I'm a JetBrains IDE user, and I find the lack of code awareness and automated code navigation support in VS Code frustrating and cripplingly inefficient when trying to get actual productive coding work done, therefore I don't want to really use VS Code for any extended real coding work (as my time is valuable and I don't like being frustrated).
If this worked for Markdown, I could use VS Code for writing documentation and test it more in that context, as I think VS Code's markdown support is pretty good, and probably better than JetBrain's (which is fairly poor compared to their code support).
As soon as this is available in JetBrains IDEs, though, I can beta test it more extensively in real-world coding usage.
The one annoyance I had was that the "built in" autocompletion/dropdown suggestions (the ones that start with a small-font abc and a completed variable name) interfered with the AI completion. I was only able to get the AI completion to work after I had completed a variable/expression and typed a trailing space on the line. I have no idea where these suggestions come from (built-in or a Ruby plugin I installed) or how to disable them.
Update on this: If you hit "escape", the dropdown goes away, and then the AI suggestion will appear after a second or so.
This is the same behavior as CoPilot under Jetbrains, which IMO is acceptable once you know about it. I just didn't think to try that under VS Code, even though I do it regularly in JetBrains.
The suggestions were good, and better than I expected if I'm being honest! They were generally accurate/correct/useful for the context, and seemed generally comparable to CoPilot single-line completions.
When writing commit messages, the suggestions I get seem to be the same as if I would be writing actual code, which does not make sense in this context:
First impression when using with JS: Usable suggestions!
I found one issue when using vim-mode: I get suggestions even when I am not in "insert" mode and in the middle of navigating over a token.
For example, when I start typing export default and decide to change this, I would exit "insert" mode and navigate backward. In that case, I would not expect any suggestions, but instead, I get one that actually overrides the existing code:
code
header
This behavior can be distracting when dealing with larger pieces of code.
@dpisek issue opened here: gitlab-vscode-extension#755 (closed) feel free to expand further details there to raise awareness, namely how popular the vim emulation extension is. Thanks!
When a suggestion is being proposed in the middle of a line, it destroys the syntax highlighting for the rest of the line, which is severely impacting my ability to quickly figure out what part is my current code, what is the suggestion, and where does my other code start again.
The problem is that all previous styling gets removed, and I have to orient myself completely new again.
Thanks for the feedback @mvanremmerden . This might be quite tricky to make better due to the interactions between various functions we do and don't control. Thoughts on this @andr3 ?
I have used the code suggestions over the last week, while working on a design change about 1-2 hours each day, and it felt like the code suggestion are getting more in the way than they are helping me.
Not only did the suggestions not make sense for me most of the time, but instead most often they actually conflicted with the existing code I had already written, and if I applied the first suggestion, it just stopped even though it inserted invalid code for me.
@mvanremmerden This is excellent feedback, and please keep them coming. Would you be available for a quick sync, @katiemacoy and I would love to dig a lil more into your feedback.