New Contextual Tools for GitHub Copilot in Visual Studio

Table of Contents
Using @workspace Command
Visual Studio 2022 17.11 now allows passing the entire workspace or specific classes and functions as context for GitHub Copilot Chat. By using the @workspace command, you can refer to your entire C++ project and ask specific questions for tailored responses. An example showcases identifying where the ship’s turning logic is handled in the OSS Pioneer project with detailed insights directly pointing to relevant code sections.
Referencing Classes and Functions with Copilot Chat
In addition to @workspace, you can now reference specific classes and functions with GitHub Copilot Chat. This feature enables Copilot to access relevant code segments directly and provide answers that apply to the code in your project. For instance, asking about common issues when working with the #StarSystem demonstrates utilizing this capability.
Feedback and Contact
To access these features, ensure you have the latest Visual Studio version and an active GitHub Copilot subscription. Share your thoughts and feedback on these new updates by commenting below, reaching out to the Developer Community, emailing visualcpp@microsoft.com, or connecting via @VisualC.