News
Blitz of New VS Code AI Improvements Include 'Copilot Edits'
Microsoft's October 2024 release of Visual Studio Code (v1.95) focuses on enhancing the AI-driven development experience through GitHub Copilot. AI-related updates affect large code edits, multi-account support, and a more accessible Copilot Chat.
The VS Code dev team has been heavily focusing on Copilot functionality in recent releases. According to Microsoft's latest announcement, Copilot features might go through different early access stages, which are typically enabled and configured through settings.
- Experimental - view the experimental features (
@tag:experimental
). This setting controls a new feature that is actively being developed and may be unstable. It is subject to change or removal.
- Preview - view the preview features (
@tag:preview)
. This setting controls a new feature that is still under refinement yet ready to use. Feedback is welcome.
It's the latter preview stage where Copilot Edits now resides, helping developers to initiate AI-driven code-editing sessions to quickly iterate on large changes across multiple files. By using prompts, Copilot suggests and applies modifications directly within the editor, allowing for immediate in-context review. Integrated with Copilot Chat and Inline Chat, Copilot Edits provides a conversational flow for refining code, making it ideal for implementing multi-file changes efficiently. The feature is currently in preview, accessible via the Chat menu or a specific shortcut, and can be customized for targeted files in a workspace.
Copilot Edits in Action
Speaking of Copilot Chat, it has been moved to the Secondary Side Bar, making it accessible at all times without taking up primary workspace. This layout provides a streamlined multitasking experience, where developers can consult Copilot without disrupting their main view.
Further on the Copilot front, developers can now request AI-driven feedback on uncommitted changes, using Copilot to perform quick reviews directly in the editor. This preview feature allows for on-the-spot feedback, including actionable suggestions, helping improve code quality before pushing changes.
VS Code now supports simultaneous login to multiple GitHub accounts, a useful feature for developers juggling multiple projects or roles. This allows smooth transitions between repositories and services tied to different accounts.
Additional Improvements in v1.95
Alongside the Copilot updates, v1.95 also introduces several enhancements to streamline the VS Code experience. Non-Copilot improvements include support for simultaneous logins to multiple GitHub accounts, a useful feature for developers juggling multiple projects or roles. This allows smooth transitions between repositories and services tied to different accounts. Here's a summary.
-
Workbench:
- Multiple GitHub Accounts: You can now log in to and manage multiple GitHub accounts simultaneously within VS Code.
- Settings Editor Indicator: The Settings editor now displays indicators next to experimental and preview settings for easier identification.
- More Profile Icons: A wider range of icons are available for profile customization.
- View Icons in Panel: Views in the Panel area can now be displayed as icons instead of labels to conserve horizontal space, especially on smaller screens.
-
Editor:
- Occurrences Highlight Delay: You can now control the delay before occurrences are highlighted in the editor for a more responsive experience with semantic highlighting.
-
VS Code for the Web:
- VS Code for the Web supports local file events: When using Chrome or Edge version 129 or later, opening a local folder in VS Code for the Web now reflects file changes made outside the browser.
-
Extension Authoring:
- Tools for Language Models: A finalized LanguageModelTool API allows chat extensions to connect language models to external data sources or take actions.
-
Extensions:
- Native REPL Variables view: The Native Python REPL now displays up-to-date variables in the built-in Variables view.
- Generate docstrings with Pylance: Pylance now offers docstring template generation for classes or methods.
- Fold all docstrings: You can now easily fold docstrings within the editor to focus on the code itself.
- Improved import suggestions: Pylance can now control whether to include alias symbols from user files in auto-import suggestions.
- Experimental AI Code Action: Implement Abstract Classes: A new experimental code action leverages both Pylance and Copilot to implement abstract classes.
About the Author
David Ramel is an editor and writer at Converge 360.