The AskVS command in GitHub Copilot for Visual Studio
GitHub Copilot is a coding assistant powered by Artificial Intelligence (AI), which can run in various environments and help you be more efficient in your daily coding tasks. In this new series of content, we will show you how GitHub Copilot works in Visual Studio specifically and how it helps you being more productive.
The new short video I just published concentrates on one specific command you can use in GitHub Copilot for Visual Studio: The AskVS command. As for the 3 previous videos in this series, my colleague Bruno Capuano is showing you how this works.
The AskVS command
In the example, Bruno selected a piece of code and then typed the following command in the GitHub Copilot Chat window:
At this point, some auto-replace is happening: The / command opens the Slash command menu, in which Bruno selected the AskVS command. Then typing the # character opens another menu in which Bruno can select the lines that he selected in the file. Note that in this menu, he could also select another context, for example another code file.
Continuing to type the command, we now have:
This instructs Copilot to refactor the lines 25-32 in the CustomChatCompletionService.cs file.
The result
As a result, Copilot will propose the new code in a dialog with a preview button, like we saw a few times in previous videos. It will also propose code showing how to call the newly created function.
Getting more information from AskVS
The AskVS command can also be used to get more information about Visual Studio functionalities and settings. In the video. Bruno uses this to ask Copilot how to change from light theme to dark theme. As a result, Copilot lists all the steps, and even provides hyperlinks leading directly to the dialogs in Visual Studio that are used to perform the change.
More information
More slash commands are available as we saw in the previous videos. You can see the full length video here. For more information, check our collection with resources here. Stay tuned to this blog for more content posted regularly. And of course you can also subscribe to our YouTube channel to get more video content!
Published on:
Learn moreRelated posts
This Month in Azure Static Web Apps | 09/2024
We are back with another edition of the Azure Static Web Apps Community! :party_popper: September was yet another month ...
GitHub Copilot for Azure: 6 Must-Try Features
As developers, we are constantly seeking tools that streamline our workflows and boost productivity. … Enter GitHub Copilot for Azure, now in ...
Responsible AI Mitigation Layers
Generative AI is increasingly being used in various kinds of systems to augment humans and infuse intelligent behavior into existing and new a...
Streamline Your Azure Workflow: Introducing GitHub Copilot for Azure in VS Code
I'm excited to announce the public preview of GitHub Copilot for Azure - a new addition to your toolkit that seamlessly integrates with G...
Build Intelligent Apps Code-First with Prompty and Azure AI
Building Generative AI applications can feel daunting for traditional app developers. What does the end-to-end applicati...
Certificación AI-900 (Fundamentos de IA) con Chicas en IA
La inteligencia artificial ha llegado para quedarse, ¡y más aún con la revolucionaria IA generativa! Para ayudar a los profesionales a especia...
Get certified with Learn Live GitHub series!
GitHub Universe is coming, and Microsoft and GitHub are partnering to offer a new special Learn Live series in Brazilian Portuguese, English a...
Certifícate con Learn Live GitHub en Español
Microsoft y GitHub se han unido para ofrecer una nueva serie especial de Learn Live en inglés y español: GitHub 2024. Del 10 al 24 de Octubre,...
Evaluating generative AI: Best practices for developers
As a developer working with generative AI, you've likely marveled at the impressive outputs your models can produce. But how do you ensure the...
Introducing Azure Product Retirement Livestreams
The Azure Retirements team, in collaboration with key partner groups, is excited t...