{"id":33531,"date":"2024-02-06T19:42:28","date_gmt":"2024-02-06T19:42:28","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=33531"},"modified":"2024-02-23T22:02:13","modified_gmt":"2024-02-23T22:02:13","slug":"quick-tips-for-using-copilot-chat-with-c-in-visual-studio","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/quick-tips-for-using-copilot-chat-with-c-in-visual-studio\/","title":{"rendered":"Quick Tips for using Copilot Chat with C++ in Visual Studio"},"content":{"rendered":"<p>GitHub Copilot Chat is now available in both <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=VisualStudioExptTeam.VSGitHubCopilot\">Visual Studio<\/a> and <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=GitHub.copilot-chat\">Visual Studio Cod<\/a><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=GitHub.copilot-chat\">e<\/a> when you have an active subscription to the service. Copilot Chat is your AI pair-programmer that allows you to speak in plain text through the chat interface to accomplish programming tasks such as understanding sections of code, generating test cases, and generating code.<\/p>\n<p>This blog post will focus on tips for using Copilot Chat functionality with C++ in Visual Studio, but the same functionality is available in Visual Studio Code and will be covered in future blog posts. Additionally, in future posts, we will dive into various C++ scenarios as reported by our customers.<\/p>\n<p>You can learn more about the Copilot Chat extension through the <a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/ide\/visual-studio-github-copilot-chat?view=vs-2022\">Visual Studio documentation<\/a>.<\/p>\n<hr \/>\n<h4 style=\"text-align: center;\"><strong>Download GitHub Copilot Chat<\/strong><\/h4>\n<p>To learn more about accessing GitHub Copilot Chat in Visual Studio, please view <a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/ide\/visual-studio-github-copilot-chat?view=vs-2022\">these instructions<\/a>. You will need a <a href=\"https:\/\/docs.github.com\/en\/billing\/managing-billing-for-github-copilot\/about-billing-for-github-copilot\">subscription<\/a> to GitHub Copilot for Individuals or GitHub Copilot for Business. You will also need both the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=GitHub.copilot\">Copilot<\/a> and <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=GitHub.copilot-chat\">Copilot Chat<\/a> extensions installed for autocomplete-style suggestions and the chat-based features respectively.<\/p>\n<hr \/>\n<h3>Introduction to Copilot Chat in Visual Studio<\/h3>\n<p>You can use the new Copilot Chat functionality to work with your existing C++ code. \u00a0To open the chat window, navigate to <em>View &gt; GitHub Copilot Chat <\/em>or right-click anywhere in your code and select <strong>Ask Copilot<\/strong>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/copilot-chat-VS.png\"><img decoding=\"async\" class=\"size-large wp-image-33540 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/copilot-chat-VS-1024x846.png\" alt=\"An image of the Copilot Chat pane in Visual Studio\" width=\"640\" height=\"529\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/copilot-chat-VS-1024x846.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/copilot-chat-VS-300x248.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/copilot-chat-VS-768x635.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/copilot-chat-VS.png 1188w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<h5>Performing actions via \/ commands<\/h5>\n<p>In the chat window, you can use the <strong>\/<\/strong> symbol to list out commands to perform on the codebase. The full list of available commands can be found <a href=\"https:\/\/learn.microsoft.com\/en-us\/visualstudio\/ide\/copilot-chat-context?view=vs-2022\">here<\/a>, or the list of commands will automatically populate the available commands when you type <strong>\/<\/strong> in the chat window.<a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/slash-commands.png\"><img decoding=\"async\" class=\" wp-image-33541 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/slash-commands-1024x429.png\" alt=\"A list of all the slash commands available in Visual Studio once pressed, such as the \/askvs command highlighted and a brief explanation to the right.\" width=\"704\" height=\"295\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/slash-commands-1024x429.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/slash-commands-300x126.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/slash-commands-768x322.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/slash-commands.png 1192w\" sizes=\"(max-width: 704px) 100vw, 704px\" \/><\/a><\/p>\n<p>For example, you can use <strong>\/explain<\/strong> to get code explanations on a desired function or file. You can also use <strong>\/generate <\/strong>to ask Copilot Chat to generate a specific snippet of code.<\/p>\n<h5>Adding file context via # sign<\/h5>\n<p>Large language models (LLMs) are trained on public repository data at a point in time and do not know anything about your current codebase. You can use the <strong>#<\/strong> commands to specify the context you want Copilot Chat to include and help Copilot Chat provide contextually relevant answers. For example, you can specify <strong>#file:FIleName.cpp<\/strong> in-line in your prompt to Copilot Chat so that it looks at the specified file. Once you type the\u00a0<strong>#\u00a0<\/strong>sign, all file names or selections will populate to select.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/file-context-copilot.png\"><img decoding=\"async\" class=\"size-large wp-image-33542 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/file-context-copilot-1024x429.png\" alt=\"Pressing the # sign in Copilot Chat populates all the documents available to specify to Copilot Chat.\" width=\"640\" height=\"268\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/file-context-copilot-1024x429.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/file-context-copilot-300x126.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/file-context-copilot-768x322.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/file-context-copilot.png 1197w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>By selecting a specific context, you can provide more information to Copilot Chat without having to copy\/paste code and ensure you receive the most relevant answers when applicable. Copilot Chat will always indicate which files were included as context under <strong>References<\/strong> under your prompt. For example, by default, there are no references sent from my code upon no file specification.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/no-references-copilot.png\"><img decoding=\"async\" class=\"size-full wp-image-33543 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/no-references-copilot.png\" alt=\"Copilot Chat References displaying no references were sent to the model when no file context is provided.\" width=\"694\" height=\"265\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/no-references-copilot.png 694w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/no-references-copilot-300x115.png 300w\" sizes=\"(max-width: 694px) 100vw, 694px\" \/><\/a><\/p>\n<p>Then, once some file is specified, you can see the code references in the <strong>References<\/strong> flyout.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/references-nousername.png\"><img decoding=\"async\" class=\"size-large wp-image-33582 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/references-nousername-1024x286.png\" alt=\"Image references nousername\" width=\"640\" height=\"179\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/references-nousername-1024x286.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/references-nousername-300x84.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/references-nousername-768x214.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/references-nousername.png 1461w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>As you&#8217;ll see, Copilot Chat can empower you as a C++ developer to focus more on the task at hand by being a true AI pair programmer through help with asks such as:<\/p>\n<ul>\n<li>Making code more readable<\/li>\n<li>Generating functions<\/li>\n<li>Generating test cases<\/li>\n<li>Understanding what a snippet of code does.<\/li>\n<\/ul>\n<p><div class=\"alert alert-primary\">Please keep in mind that while GitHub Copilot Chat is a great tool for software developers to get started across a multitude of different tasks, it is powered by AI and surprises and mistakes are possible. Make sure to verify any generated code or suggestions provided in your scenarios.<\/div><\/p>\n<h3>Making code more readable<\/h3>\n<p>Copilot Chat can improve your existing C++ code, as you can ask it prompts like to make your code more readable or simplify your existing code.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/calculator-cpp.png\"><img decoding=\"async\" class=\"size-large wp-image-33549 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/calculator-cpp-1024x732.png\" alt=\"Some C++ code showcasing a Calculator class with functions such as add, subtract, multiply, and divide\" width=\"640\" height=\"458\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/calculator-cpp-1024x732.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/calculator-cpp-300x215.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/calculator-cpp-768x549.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/calculator-cpp.png 1116w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Here, there is some C++ code (starting repo linked <a href=\"https:\/\/github.com\/sinemakinci1\/basic-cpp-copilot-example\/\">here<\/a>) that creates a Calculator class and has operations to add, subtract, multiply, and divide. This code is not as simple as it could be and creates some excessive variables. You can highlight the section and right-click to Ask Copilot to simplify this code for you. Copilot Chat will take the context in the highlighted section to propose better C++ code for your project. Since Copilot Chat operates as a pair programmer, Visual Studio will provide a diff view to allow you to accept, modify, or cancel the proposed changes from Copilot Chat.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/New-simplify.gif\"><img decoding=\"async\" class=\"aligncenter wp-image-33550 size-full\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/New-simplify.gif\" alt=\"Copilot Chat simplifying some code as shown in a GIF.\" width=\"1920\" height=\"938\" \/><\/a><\/p>\n<p>Copilot Chat can also help you fix functions. For example, there are a few issues with this C++ code. Firstly, dividing by zero returns zero, which is not quite accurate. Instead, you may want it to return an error such as Not-A-Number (NaN). Therefore, you can ask Copilot Chat to rewrite the code such that it returns NaN and insert it into the file.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/Nan-copilot-1.png\"><img decoding=\"async\" class=\" wp-image-33569 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/Nan-copilot-1.png\" alt=\"Asking Copilot to rewrite the divide function such that it returns NaN instead of 0.\" width=\"727\" height=\"697\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/Nan-copilot-1.png 705w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/Nan-copilot-1-300x288.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/Nan-copilot-1-24x24.png 24w\" sizes=\"(max-width: 727px) 100vw, 727px\" \/><\/a><\/p>\n<p>Additionally, these functions in the calculator do not change the Calculator state, so you can have Copilot Chat fix this issue at large by appending static modifiers to member functions that do not change the Calculator state. Copilot Chat will even provide helpful commentary on static functions.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/copilot-chat-static.png\"><img decoding=\"async\" class=\" wp-image-33554 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/copilot-chat-static.png\" alt=\"Asking Copilot Chat to make member functions static\" width=\"656\" height=\"1012\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/copilot-chat-static.png 586w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/copilot-chat-static-194x300.png 194w\" sizes=\"(max-width: 656px) 100vw, 656px\" \/><\/a><\/p>\n<h3>Generate new C++ code<\/h3>\n<p>Copilot Chat can also help generate new code for you.<\/p>\n<p>You can generate code by asking Copilot Chat in the chat window using the <strong>\/generate<\/strong> command and specifying the specific file to generate code for. In this case, you can ask it to create a new function that calculates if two numbers are equal, and it will even use your existing coding conventions to generate a new function in your class.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/generate-code.png\"><img decoding=\"async\" class=\"size-full wp-image-33555 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/generate-code.png\" alt=\"Asking copilot to generate a new function that checks if two numbers are equal and copilot chat generated code\" width=\"907\" height=\"787\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/generate-code.png 907w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/generate-code-300x260.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/generate-code-768x666.png 768w\" sizes=\"(max-width: 907px) 100vw, 907px\" \/><\/a><\/p>\n<h3>Create tests for your code<\/h3>\n<p>Now that there are a few functions written for the calculator, you can ask Copilot Chat to create tests for this. Specifically, you can ask by using the <strong>\/tests<\/strong> command in the Copilot Chat window to write out tests for my code. In this case, the output was GTests that follow the mathematical conventions expected and included the appropriate header functions.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/gtest-copilot.png\"><img decoding=\"async\" class=\" wp-image-33557 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/gtest-copilot-1024x996.png\" alt=\"Asking copilot chat to create tests for your code creates GTest unit tests\" width=\"848\" height=\"825\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/gtest-copilot-1024x996.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/gtest-copilot-300x292.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/gtest-copilot-768x747.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/gtest-copilot-24x24.png 24w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/gtest-copilot-48x48.png 48w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/gtest-copilot.png 1117w\" sizes=\"(max-width: 848px) 100vw, 848px\" \/><\/a><\/p>\n<p>Giving Copilot Chat additional context on your desired needs can yield better responses tailored to you. For example, if you did not want it to generate tests using the GTest framework, but instead wanted to use Catch2, you should explain that in your prompt. You can always add other relevant additional project contexts to Copilot Chat based on your desired results, such as desired package manager, language standard, and testing framework.<\/p>\n<h3><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/catch2-copilot.png\"><img decoding=\"async\" class=\" wp-image-33558 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/catch2-copilot-1024x997.png\" alt=\"A prompt asking for Catch2 framework to create unit tests in main.cpp with Copilot giving the right response.\" width=\"966\" height=\"941\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/catch2-copilot-1024x997.png 1024w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/catch2-copilot-300x292.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/catch2-copilot-768x748.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/catch2-copilot-24x24.png 24w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/catch2-copilot-48x48.png 48w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/catch2-copilot.png 1113w\" sizes=\"(max-width: 966px) 100vw, 966px\" \/><\/a>Explain a section of code<\/h3>\n<p>Copilot Chat can also help explain C++ code in plain text while referencing the applicable symbols. For example, you can ask Copilot what a highlighted section of the new test code does, and it will explain it all to you in plain language to make it easier for you to digest.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/add-test-explain.png\"><img decoding=\"async\" class=\"alignnone wp-image-33559 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/add-test-explain.png\" alt=\"Copilot Chat explaining what a section of my test code does.\" width=\"732\" height=\"511\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/add-test-explain.png 675w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/add-test-explain-300x209.png 300w\" sizes=\"(max-width: 732px) 100vw, 732px\" \/><\/a><\/p>\n<p>Copilot Chat will even suggest follow-up questions to the snippet of code at the bottom with easy, thought-provoking access.<\/p>\n<h3><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/add-test-explain-2-highlight.png\"><img decoding=\"async\" class=\" wp-image-33561 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/add-test-explain-2-highlight.png\" alt=\"Copilot Chat will automatically suggest follow-up questions to ask. In this case, it asked follow up questions about running my Google Tests\" width=\"724\" height=\"490\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/add-test-explain-2-highlight.png 643w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/02\/add-test-explain-2-highlight-300x203.png 300w\" sizes=\"(max-width: 724px) 100vw, 724px\" \/><\/a>What do you think?<\/h3>\n<p>Copilot Chat can help you achieve new levels of productivity in your C++ workflows. We are working hard on integrating it even further with Visual Studio, so please let us know any suggestions you\u2019d like to see to improve your workflows. Additionally, let us know what other types of content you\u2019d like to see regarding use cases or additional information about Copilot Chat. We welcome all types of feedback on your experience with the product. The comments below are open, or you can find us via email at <a href=\"mailto:visualcpp@microsoft.com\">visualcpp@microsoft.com<\/a> or via Twitter at <a href=\"https:\/\/twitter.com\/visualc\">@VisualC<\/a>. To open a bug, please see <a href=\"https:\/\/developercommunity.visualstudio.com\/report?space=8&amp;entry=problem\">Visual Studio feedback<\/a>. You can also always upvote or downvote the provided suggestion in Copilot Chat to provide feedback to the model itself.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GitHub Copilot Chat is now available in both Visual Studio and Visual Studio Code when you have an active subscription to the service. Copilot Chat is your AI pair-programmer that allows you to speak in plain text through the chat interface to accomplish programming tasks such as understanding sections of code, generating test cases, and [&hellip;]<\/p>\n","protected":false},"author":85413,"featured_media":33540,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,3940],"tags":[],"class_list":["post-33531","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus","category-copilot"],"acf":[],"blog_post_summary":"<p>GitHub Copilot Chat is now available in both Visual Studio and Visual Studio Code when you have an active subscription to the service. Copilot Chat is your AI pair-programmer that allows you to speak in plain text through the chat interface to accomplish programming tasks such as understanding sections of code, generating test cases, and [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/33531","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/85413"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=33531"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/33531\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/33540"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=33531"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=33531"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=33531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}