News

GitHub Copilot Makes Nice with Visual Studio IntelliSense

After a years-long problematic relationship, AI-powered coding assistant tools from Microsoft and GitHub are working together better.

Specifically, Microsoft this month announced "Visual Studio's IntelliSense list can now steer GitHub Copilot code completions."

"GitHub Copilot and Visual Studio's built-in AI assistance features are now better together," Microsoft said. "With the latest version of GitHub Copilot, changing your selection in Visual Studio's IntelliSense list steers the GitHub Copilot with additional context about your code, so you can easily explore the single and multi-line code completions to get just the code you need."

[Click on image for larger view.] Choosing a Different IntelliSense Option (left) Changes Copilot Suggestions (right) (source: Microsoft).

Getting just the code you need proved to be difficult if not impossible for joint users of Visual Studio 2022's built-in IntelliSense and the external Copilot "AI pair programmer" extension from Microsoft-owned GitHub.

It wasn't long after GitHub Copilot debuted in June 2021 that problems between the two AI constructs were reported, as detailed in the February article, "Devs Cite Problems with GitHub Copilot and IntelliSense Working Together." The article revealed that even though the IntelliSense/Copilot interactivity problem had been known for years, it was still being reported by various developers, even in other IDEs.

[Click on image for larger view.] Just Some of the Reported Issues (source: Microsoft).

While a raft of problems of many different kinds were reported, the basic gist of many complaints was that the autocomplete functionality of the two tools clashed with one another.

GitHub provided a response about the issues to Visual Studio Magazine that in part said: "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."

Microsoft this month explained how the two tools work better together as of GitHub Copilot 1.84.

"Copilot predictions are not only visible when the IntelliSense list when the IntelliSense is open, but your IntelliSense selection also steers the prediction offered by Copilot," the company said. "This helps you explore and get just the code completion you're looking for. It's particularly helpful in combination with the starred completions that Visual Studio's build-in IntelliCode AI provides with member ranking in the IntelliSense list.

"Prior to this release, users of Copilot in Visual Studio had to choose between accepting a Copilot completion or opening the IntelliSense list, at which point the Copilot prediction would no longer show."

So developers can now press the Left CTRL key to hide the IntelliSense list or accept the prediction to understand the code with syntax highlighting/IntelliSense. Before deciding whether or not to accept a prediction, developers can preview it in two ways:

  1. Press the Left CTRL button to hide the IntelliSense menu if they want to peek at a multi-line prediction
  2. Accept the prediction to understand the proposed code with the help of syntax highlighting and tooltip that appears when hovering on a symbol

Developers, specifically those using Copilot 1.77 or earlier versions, might need to update their tool manually as automatic updates to v1.84 reportedly won't work.

A short YouTube video demonstrates how a developer typing in code brings up IntelliSense code-completion options along with Copilot suggestions. When a different IntelliSense option is selected, the corresponding Copilot suggestion list changes also, which is what Microsoft refers to as IntelliSense "steering" the Copilot suggestions.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube