{"id":34409,"date":"2024-08-07T09:00:57","date_gmt":"2024-08-07T09:00:57","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=34409"},"modified":"2024-08-06T22:26:56","modified_gmt":"2024-08-06T22:26:56","slug":"github-copilot-extensions-for-c-developers-and-beyond-now-available-in-vs-code","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/github-copilot-extensions-for-c-developers-and-beyond-now-available-in-vs-code\/","title":{"rendered":"GitHub Copilot Extensions for C++ developers and beyond now available in VS Code"},"content":{"rendered":"<p>GitHub Copilot is now more extensible than ever for extension authors in VS Code.<\/p>\n<p>At the Microsoft Build conference, we announced that VS Code extensions can now leverage APIs for Copilot to build custom <strong>chat participants<\/strong> that users can interact with in the GitHub Copilot Chat view in VS Code. To learn more, please watch <a href=\"https:\/\/www.youtube.com\/watch?v=YI7kjWzIiTM\">the Build session on the new extensibility<\/a> and read more on the <a href=\"https:\/\/code.visualstudio.com\/blogs\/2024\/06\/24\/extensions-are-all-you-need\">VS Code blog<\/a>. \u00a0Some notable extensions that have developed chat participants for public consumption include <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=DevCenter.ms-devbox\">Microsoft Dev Box<\/a> and <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ParallelsDesktop.parallels-desktop\">Parallels<\/a>.<\/p>\n<p>Another API that extensions can leverage LLMs with is the <strong>language model API<\/strong>. It enables you to integrate AI-powered features and natural language processing in your Visual Studio Code extension. To learn more about this API, please visit <a href=\"https:\/\/code.visualstudio.com\/api\/extension-guides\/language-model\">our VS Code docs<\/a>.<\/p>\n<h3>What are chat participants?<\/h3>\n<p>You can read more in <a href=\"https:\/\/code.visualstudio.com\/api\/extension-guides\/chat\">the VS Code docs for<\/a> more specifics on how chat participants work. These are specified by the user in the Copilot chat window, with queries using <code>@&lt;participant&gt;<\/code>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/07\/cat-pointers.png\"><img decoding=\"async\" class=\" wp-image-34410 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/07\/cat-pointers.png\" alt=\"@Cat chat participant providing a description of pointers in C++ in cat speak\" width=\"863\" height=\"682\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/07\/cat-pointers.png 1023w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/07\/cat-pointers-300x237.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/07\/cat-pointers-768x607.png 768w\" sizes=\"(max-width: 863px) 100vw, 863px\" \/><\/a><\/p>\n<p>Some existing chat participants available in VS Code Copilot Chat that you may be familiar with include <code>@workspace<\/code> and <code>@vscode<\/code>.<\/p>\n<p>For example, <code>@workspace<\/code> dynamically looks at all the code in your open workspace to provide relevant code snippets as context to Copilot Chat.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/08\/tests-chat.png\"><img decoding=\"async\" class=\"size-full wp-image-34481 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/08\/tests-chat.png\" alt=\"Invoking @workspace to query a codebase for where the tests are located\" width=\"459\" height=\"555\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/08\/tests-chat.png 459w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/08\/tests-chat-248x300.png 248w\" sizes=\"(max-width: 459px) 100vw, 459px\" \/><\/a><\/p>\n<p>On the other hand, <code>@vscode<\/code> dynamically indexes VS Code settings to provide an answer.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/08\/cmake-vscode-copilot.png\"><img decoding=\"async\" class=\"size-full wp-image-34482 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/08\/cmake-vscode-copilot.png\" alt=\"Using @vscode to ask VS code how to specify a specific cmake executable to use in project\" width=\"402\" height=\"446\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/08\/cmake-vscode-copilot.png 402w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/08\/cmake-vscode-copilot-270x300.png 270w\" sizes=\"(max-width: 402px) 100vw, 402px\" \/><\/a><\/p>\n<p>With the latest release, you now have access to build your own chat participant for your VS Code extensions, allowing you to provide domain knowledge to Copilot that would be relevant to your users.<\/p>\n<p>As a consumer, there are some chat participants to look forward to that utilized this API and are in the pipeline. For example, for users who have containerized development, there is <a href=\"https:\/\/www.docker.com\/blog\/preview-docker-extension-for-github-copilot\/\">a Docker Copilot extension that is currently in limited public beta<\/a> that allows users to learn more about containerization with regards to their app.<\/p>\n<h3>What are language models?<\/h3>\n<p>With the <a href=\"https:\/\/code.visualstudio.com\/api\/extension-guides\/language-model\">Language Model API<\/a>, you can directly access and take advantage of LLMs contributed by GitHub Copilot in your own extensions, by specifying prompts, relevant context, and how requests should be sent to the model. You can utilize this API to enhance developer experiences beyond the Copilot Chat view.<\/p>\n<p>For example, one feature that utilizes the Language Model API is AI-powered rename suggestions, that allow you to dynamically rename symbols in your C++ code. These will automatically invoke suggestions when you go to rename a symbol in VS code when you have the Copilot Chat extension installed.<a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/07\/rename-suggestions-vsc.png\"><img decoding=\"async\" class=\"size-full wp-image-34411 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/07\/rename-suggestions-vsc.png\" alt=\"AI-generated rename suggestions for a variable named &quot;property&quot;\" width=\"787\" height=\"339\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/07\/rename-suggestions-vsc.png 787w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/07\/rename-suggestions-vsc-300x129.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/07\/rename-suggestions-vsc-768x331.png 768w\" sizes=\"(max-width: 787px) 100vw, 787px\" \/><\/a><\/p>\n<p>Additionally, the source control view utilizes the Language Model API to prompt how to automatically generate commit messages using AI for users that invoke it, based on the source code changes.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/07\/ai-commit-messages.png\"><img decoding=\"async\" class=\"size-full wp-image-34412 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/07\/ai-commit-messages.png\" alt=\"AI-generated commit message detailing updates to main.cpp in the soure control view in VS Code\" width=\"612\" height=\"392\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/07\/ai-commit-messages.png 612w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2024\/07\/ai-commit-messages-300x192.png 300w\" sizes=\"(max-width: 612px) 100vw, 612px\" \/><\/a><\/p>\n<h3>What&#8217;s next in VS Code Copilot Chat?<\/h3>\n<p>We are committed to enhancing the extensibility, quality, and customizability of Copilot Chat in VS Code. Stay tuned for exciting updates to make your experience with Chat.<\/p>\n<p>Some things coming up to look forward to in VS Code, which can be found in <a href=\"https:\/\/code.visualstudio.com\/blogs\/2024\/06\/24\/extensions-are-all-you-need#_next-steps\">the original blog post announcement from the VS Code team<\/a>, include the <strong>variable resolving API<\/strong>, which allows extensions to contribute chat variables (via # sign) which provide context from the extension\u2019s domain. Additionally, VS Code expects improvements to intent detection, so that these chat participants are automatically invoked, and to provide GPT-4o language model support.<\/p>\n<p>Please file any issues or feedback in the <a href=\"https:\/\/github.com\/microsoft\/vscode-copilot-release\">VS Code Copilot repo<\/a>, try out building your own developments using Copilot for your extensions, or let us know any VS Code extensions you\u2019d like to see leveraging these APIs.<\/p>\n<p>To learn more about using GitHub Copilot in VS Code with C++, watch <a href=\"https:\/\/www.youtube.com\/watch?v=ZfT2CXY5-Dc\">our introduction YouTube video<\/a> and <a href=\"https:\/\/www.youtube.com\/@code\/playlists\">others on the VS Code Channel<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GitHub Copilot is now more extensible than ever for extension authors in VS Code. At the Microsoft Build conference, we announced that VS Code extensions can now leverage APIs for Copilot to build custom chat participants that users can interact with in the GitHub Copilot Chat view in VS Code. To learn more, please watch [&hellip;]<\/p>\n","protected":false},"author":85413,"featured_media":34481,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,266,3940,275],"tags":[],"class_list":["post-34409","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus","category-cmake","category-copilot","category-visual-studio-code"],"acf":[],"blog_post_summary":"<p>GitHub Copilot is now more extensible than ever for extension authors in VS Code. At the Microsoft Build conference, we announced that VS Code extensions can now leverage APIs for Copilot to build custom chat participants that users can interact with in the GitHub Copilot Chat view in VS Code. To learn more, please watch [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/34409","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=34409"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/34409\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/34481"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=34409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=34409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=34409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}