Devs Cite Problems with GitHub Copilot and IntelliSense Working Together
Developers continue to claim that the "AI pair programmer" GitHub Copilot tool doesn't work well with IntelliSense, which is built in to Visual Studio and Visual Studio Code.
IntelliSense is known for its code-completion functionality, while also providing a variety of code editing features such as parameter info, quick info and member lists, while Copilot is an advanced AI system that goes much further, for example, generating whole code constructs or even entire programs in response to developer prompts.
Even though the IntelliSense/Copilot interactivity problem has been known for years, it's still being reported by various developers, even in other IDEs.
For example, just two days ago, a developer commented on a GitHub community discussion thread started more than a year ago, titled "Copilot doesn't play well with regular autocomplete/Intellisense." The comment said: "Same issue on Visual Studio Code, I use the same solution... I've seen the same issues on IntelliJ."
Another discussion, "Regular IDE autocomplete and Github CoPilot must work together" started Nov. 4, 2021, sums up one developers take on the problem:
Many programmers have already built habits of IDE autocompletions that help to complete things such as variable and function names based on code written in the rest of the file. Github CoPilot should not interfere with that type of autocompletion. At the moment Github CoPilot is almost completely replacing regular IDE autocomplete if you enable tab autocompletion with Github CoPilot.
Here are two cases where this leads to a negative outcome:
After writing the first few characters of a function name, the programmer wants to hit tab to complete the full name, but Github Copilot is suggesting a longer completion which the programmer doesn't want. The programmer has to write the whole function name now by hand.
It seems that Github Copilot autocompletes what seems like real function names but are actually just false predictions. For example the programmer writes the name of an object followed by a "." and expects the regular IDE autocomplete dropdown suggesting possible functions or parameters of that object next. Instead Github CoPilot offers an autocomplete suggestion, but it turns out that this function/parameter does not actually exist in the object.
(I am using Github CoPilot with Visual Studio Code for Python.)
The most recent comment on that thread was posted just last week: "Seems like a pretty big issue, I have disabled copilot for now due to it not working together with "." autocompletion. Had to press ESC then "." 2-3 times before I could toggle VSCODE autocomplete."
The problem was also cited by Visual Studio Magazine reader Mark Patterson in a comment two days ago about the article, "GitHub Copilot AI Tech Upgraded, Already Generates 61% of Java Code." He said: "Nice article but you didn't address whether the improved CoPilot has been enhanced to work WITH Visual Studio Intellisense, rather than against it. I previously purchased and then had to uninstall CoPilot because it was oblivious to Intellisense. I couldn't even use dot notation to inspect members of a class. And often the suggestions CoPilot made were bogus -- entirely illegal and impossible."
Other GitHub discussions/issues about the problem include:
In comments about that latter item, a developer pointed out that the ReSharper IDE from JetBrains includes a checkbox to "Disable ReSharper automatic completion while GitHub Copilot suggestion is shown," as shown in the screenshot above.
There don't seem to be similar problems with IntelliCode, a built-in Visual Studio feature that uses AI to provide functionality that goes beyond IntelliSense's simple code-completion capabilities.
A discussion about How would Github Copilot react along with VS IDE Intellicode? possibly explains why in a screenshot of GitHub documentation that stated: "When GitHub Copilot is active, IntelliCode will not show Whole line completions." While that was presented as a screenshot, the linked URL to the Copilot documentation no longer works.
However, that discussion did generate a response from a member of the Copilot team, who said on Nov. 10, 2021: "It's a good question! We (the Copilot team) are cooperating very closely with the IntelliCode team to deliver the best possible user experience for AI driven suggestions in Visual Studio. Initially at least, it's most likely that IntelliCode will be temporarily disabled in contexts where Copilot is active, to avoid clashes."
It's unclear why that doesn't happen with IntelliSense.
Visual Studio Magazine has reached out to Microsoft and GitHub about the problem, and this article will be updated with any responses.
(And thanks for the tip, Mark 😉)
Update: Here is a response from a GitHub spokesperson:
Crafting excellent developer experiences takes time, experimentation, and incredible attention to detail. That's why we've worked hand-in-hand with the IDEs to ensure Copilot and IntelliSense function well together. We've engaged in joint design and engineering for just about every aspect of the editor experience, including "ghost text" -- the grey italicized suggestions produced by Copilot -- which didn't exist before we worked with the VS and VS Code teams to build native support. In February, we released the feature in VS extension that both IntelliCode and Copilot can work together; we also released one of the most common developer requests through continued partnership with VS Code: word-by-word accepts for suggestions.
One of the great things about modern IDEs is that they are nearly infinitely extensible. Many developers have tens of extensions installed to customize their environment and make their work easier. Because each developer's dev environment contains a different combination of extensions, there's rarely any testing to see how the extensions behave when combined. That means unexpected interoperability issues can sometimes appear. To seek out feedback, we've created Community Forums to engage with developers.
It's early days, and we're committed to working with the community and IDE teams to provide a better, more streamlined experience.
David Ramel is an editor and writer for Converge360.