News
Copilot AI Boosts Abound in New VS Code v1.96
Microsoft improved on its new "Copilot Edit" functionality in the latest v1.96 release of Visual Studio Code, its open-source based code editor that has become the most popular in the world according to many surveys.
This feature was introduced last month (see "Blitz of New VS Code AI Improvements Include 'Copilot Edits'"). It helps developers 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.
In the latest release for November 2024, that functionality has been improved. Devs can now more clearly see its progress as edits stream in. And with the editor overlay controls, you can easily cycle through all changes and accept or discard them.
Copilot Chat Edits Changing a File
In the new release, some of the other Copilot newness listed by the dev team includes:
- Move chat session to Copilot Edits: Developers can now transfer an entire chat session from the Chat view to Copilot Edits, allowing them to apply all suggested changes from the session in one step instead of handling individual code blocks.
- Working set suggested files: In Copilot Edits, suggestions for files to include in the working set are now smarter. For Git repositories, Copilot Edits will propose additional files based on files you've already added, prioritizing those that are commonly modified together.
- Restore Edit sessions after restart: Edit sessions are now preserved after restarting VS Code. This includes the working set, the acceptance state, and the file states from all previous editing steps.
- Add to working set from Explorer, Search, and editor: You can add files to the Copilot Edits working set using a new context menu option in the Search view, Explorer view, or directly from the editor. Text selections can also be attached to Copilot Edits using the editor context menu.
- Debugging with Copilot: A new copilot-debug terminal command simplifies the debugging process. Prefixing your usual command with copilot-debug starts a debugging session. For example, instead of running python foo.py, you can now use copilot-debug python foo.py.
- Copilot usage graph: Developers can now view a graph of Copilot usage for VS Code extensions in the Runtime Status view. The graph displays the number of chat requests made by the extension over the past 30 days.
- Custom instructions for commit message generation: When generating commit messages, Copilot now supports custom instructions. Developers can specify formatting or structure requirements, ensuring commit messages align with project guidelines.
- Inline Chat: The Inline Chat experience has been refined with more subtle progress indicators. While changes are being streamed, squiggles are temporarily disabled, and commands are displayed in a cleaner, more readable way.
- Terminal Chat: Terminal Inline Chat has been updated to better match the look and feel of the editor's Inline Chat, creating a more consistent experience.
Non-Copilot Functionality
Outside of AI, other tweaks, improvements and fixes in the new release include:
- Overtype mode -- Switch between overwrite or insert mode in the editor: Developers can now switch between insert and overwrite modes in the text editor, allowing more precise text manipulation. The feature can be toggled through a new editor setting, providing flexibility in text entry.
- Add imports on paste -- Automatically add missing TS/JS imports when pasting code: A new paste functionality automatically adds missing TypeScript and JavaScript imports when code is inserted. This reduces manual import management and streamlines code integration.
- Test coverage -- Quickly filter which code is covered by a specific test: The test coverage view now includes enhanced filtering capabilities, enabling developers to quickly identify which code segments are covered by specific tests.
- Move views - Easily move views between the Primary and Secondary Side Bar: Users can now move views between the Primary and Secondary Side Bars, offering more flexible workspace configuration.
- Terminal ligatures -- Use ligatures in the terminal: Terminal now supports ligatures, improving readability of code and command-line interfaces.
- Extension allow list -- Configure which extensions can be installed in your organization: Organizations can now configure an allow list of approved extensions, providing greater control over development environment configurations.
About the Author
David Ramel is an editor and writer at Converge 360.