News

VS Code Update Improves Testing with GitHub Copilot AI

Microsoft improved testing with the GitHub Copilot Chat extension for Visual Studio Code as part of the regular monthly update to the super-popular code editor.

Still in preview, the tool basically weds the tech of the original Copilot "AI pair programmer" coding assistant with ChatGPT, the groundbreaking chatbot from Microsoft partner OpenAI. Devs working in VS Code can query the advanced generative AI construct to get coding help in various ways, such as explaining code, providing real-time guidance and tips, troubleshooting and more, including testing.

The new testing functionality for the GitHub Copilot Chat tool was announced as part of the regular monthly update to the open source-based, cross-platform VS Code editor, now advanced to version 1.83 in the September 2023 update.

[Click on image for larger view.] GitHub Copilot Chat (source: GitHub/Microsoft).

Less than three weeks ago, GitHub announced the beta program for GitHub Copilot Chat was opened up to individuals, having previously been limited to teams/business users.

The new testing functionality was detailed in the just-published VS Code v1.83 release.

"We have improved /tests for the Chat view and inline chat available with the GitHub Copilot Chat extension. The /test slash command is now better at detecting the testing framework you are using and will generate new tests in the same style. Also, it should be much better with suggesting names for new test files, like test_foo.py for foo.py and bar.test.js for bar.js."

The post also noted that inline chat gained multi-turn functionality, stating, "Inline chat now keeps all prompts of the current session, which allows you to refer to previous messages and to reply to questions."

[Click on image for larger, animated GIF view.] GitHub Copilot Chat in Animated Action (source: GitHub).

The dev team also shipped a new similar commands feature now available in the Command Palette of the editor, also benefitting Chat users. It helps them find the command they are looking for in the Command Palette by showing a list of commands that are similar to the typed-in query, based on keywords, synonyms and intent.

Users can type a query in the Command Palette and see a section called "similar commands" below the fuzzy results. The similar commands are ordered by relevance and can be selected with the arrow keys or mouse.

"Copilot Chat users get an even better similar commands experience because we can use Copilot AI to determine similarity," the VS Code team said. "These smarts help with synonyms and intent, and in our testing, Copilot was able to handle similarity across spoken languages as well. Finding the exact command you're looking for in the Command Palette has never been easier!"

Speaking of the Command Palette, other Copilot work involved the team tweaking its recently introduced "Ask GitHub Copilot" option, based on community feedback. It was introduced to help devs take a query in the Command Palette and open it in a Copilot chat window if the Command Palette didn't provide a useful answer.

"We gathered feedback on the preferred experience Ask GitHub Copilot should open: the Chat view in the side bar or Quick Chat. In an effort to make the first time experience more familiar, we chose the Chat view," the team said. Devs can change a setting to change that behavior and make it open in Quick Chat.

The Chat extension in the VS Code marketplace has been installed more than 3 million times as of this writing, serving as a companion to the primary GitHub Copilot extension, boasting more than 9.5 million installs.

Along with the Copilot Chat work, other highlights of VS Code v1.83 as presented by Microsoft, with links for more information on each, include:

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

Subscribe on YouTube