{"id":151492,"date":"2024-04-10T13:37:25","date_gmt":"2024-04-10T17:37:25","guid":{"rendered":"http:\/\/www.bu.edu\/tech\/?page_id=151492"},"modified":"2024-04-25T11:50:50","modified_gmt":"2024-04-25T15:50:50","slug":"vscode","status":"publish","type":"page","link":"https:\/\/www.bu.edu\/tech\/support\/research\/software-and-programming\/generative-ai\/vscode\/","title":{"rendered":"GenAI in VS Code"},"content":{"rendered":"<p><a name=\"top\"><\/a><\/p>\n<style>\n  p { text-align: justify; }\n  .image-container { float: right; width: 20%; margin-left: 10px; }\n<\/style>\n<div style=\"width:100%;\">\n<div class=\"image-container\">\n    <img loading=\"lazy\" src=\"\/tech\/files\/2024\/04\/vscode-e1713107740508.png\" alt=\"\" width=\"300\" height=\"300\" class=\"alignnone size-full wp-image-151565\" \/>\n  <\/div>\n<p>Visual Studio Code is a lightweight yet powerful source code development IDE provided by Microsoft. It has built in support for JavaScript, TypeScript, and Node.js, and is also extensible to other languages and runtimes, such as C++, C#, python, .NET, etc. It has fully integrated GitHub Copilot including both inline and chat extensions. Reference to the official <a href=\"https:\/\/code.visualstudio.com\/docs\/copilot\/overview\">Visual Studio documentation<\/a> for full implementation instructions.<\/p>\n<p>    <strong>Sections<\/strong><\/p>\n<ul>\n<li><a href=\"#install\">Install GitHub Copilot<\/a><\/li>\n<\/ul>\n<div class=\"highlight-yellow\"><strong>Note<\/strong>: GitHub Copilot is not supported in the OnDemand Code Server App. It can only be installed and used via the <code>vscode<\/code> module in an Interactive Desktop session.<\/span><\/div>\n<p>&nbsp;<br \/>\n    <a name=\"install\"><\/a><\/p>\n<h2>Install GitHub Copilot<\/h2>\n<ol>\n<li>In an interactive desktop session, load a <code><span class=\"command\">vscode<\/span><\/code> module and launch the IDE with <code><span class=\"command\">code<\/span><\/code>. Then, in the extension menu, search for and install GitHub Copilot.<br \/>\n        <div style=\"width: 1920px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-151492-1\" width=\"1920\" height=\"1080\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"\/tech\/files\/2024\/04\/vscode_p1.mp4?_=1\" \/><a href=\"\/tech\/files\/2024\/04\/vscode_p1.mp4\">\/tech\/files\/2024\/04\/vscode_p1.mp4<\/a><\/video><\/div>\n        <\/li>\n<p>&nbsp;<\/p>\n<li>In the bottom right corner, select <b>Sign into GitHub<\/b>. A Firefox browser will open where you will authenticate your account. Close the browser when signed in.<br \/>\n        <div style=\"width: 1920px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-151492-2\" width=\"1920\" height=\"1080\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"\/tech\/files\/2024\/04\/vscode_p2.mp4?_=2\" \/><a href=\"\/tech\/files\/2024\/04\/vscode_p2.mp4\">\/tech\/files\/2024\/04\/vscode_p2.mp4<\/a><\/video><\/div>\n        <\/li>\n<p>&nbsp;<\/p>\n<li>In the bottom right corner, select <b>Cancel<\/b> and then <b>Yes<\/b> to use the authentication just previously setup. A new Firefox browser will launch confirming you are signed in. Now you&#8217;re all set! If an OS keyring window pop-ups just hit the <b>Esc<\/b> key to ignore.<br \/>\n        <div style=\"width: 1920px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-151492-3\" width=\"1920\" height=\"1080\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"\/tech\/files\/2024\/04\/vscode_p3.mp4?_=3\" \/><a href=\"\/tech\/files\/2024\/04\/vscode_p3.mp4\">\/tech\/files\/2024\/04\/vscode_p3.mp4<\/a><\/video><\/div>\n       <\/li>\n<\/ol>\n<p>    &nbsp;<\/p>\n<div style=\"float: right;\">\n<p id=\"last-modified-timestamp\" style=\"margin: 0;\">Last updated: Loading&#8230;<\/p>\n<\/div>\n<p><script>\r\ndocument.addEventListener('DOMContentLoaded', function() {\r\n    \/\/ Get the content of the meta tag\r\n    var lastUpdatedContent = document.querySelector('meta[name=\"last-updated\"]').content;\r\n    \r\n    \/\/ Parse the content into a Date object\r\n    var lastUpdatedDate = new Date(lastUpdatedContent);\r\n    \r\n    \/\/ Format the date\r\n    var formattedDate = lastUpdatedDate.toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' });\r\n    \r\n    \/\/ Update the HTML element with the formatted date\r\n    document.getElementById('last-modified-timestamp').innerHTML = 'Last updated: ' + formattedDate;\r\n});\r\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio Code is a lightweight yet powerful source code development IDE provided by Microsoft. It has built in support for JavaScript, TypeScript, and Node.js, and is also extensible to other languages and runtimes, such as C++, C#, python, .NET, etc. It has fully integrated GitHub Copilot including both inline and chat extensions. Reference to&#8230;<\/p>\n","protected":false},"author":1692,"featured_media":0,"parent":151490,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/151492"}],"collection":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/users\/1692"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/comments?post=151492"}],"version-history":[{"count":21,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/151492\/revisions"}],"predecessor-version":[{"id":159318,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/151492\/revisions\/159318"}],"up":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/151490"}],"wp:attachment":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/media?parent=151492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}