VSCode 2.0 Adds Native AI Refactoring Features
Microsoft launched Visual Studio Code 2.0 with a deep overhaul of its extension system and native integration of artificial intelligence tools focused on code refactoring. The version marks the largest update to the platform since the adoption of the LSP (Language Server Protocol) in 2016 and consolidates VS Code as the most widely used development environment in the world, with over 73 million monthly active users.
AI-Assisted Refactoring: How It Works
The most anticipated feature is the AI Refactor Engine, which analyzes the semantic context of a selected piece of code and suggests structural transformations: function extraction, consistent renaming at broad scope, conversion of synchronous patterns to asynchronous, and elimination of duplicate code. Unlike Copilot, which is based on line suggestions, the AI Refactor understands the intent of the code and proposes architectural changes, not just syntactic ones.
The system works with offline support for the smaller models, processed locally via CPU, with the option to send to Microsoft's server for more complex models. Refactorings are presented with a visual diff and the option to partially accept, discarding only the changes the developer disagrees with. Automatic unit test generation for refactored functions is also included in the standard flow.
Other VS Code 2.0 Highlights
Beyond the AI tools, VS Code 2.0 brings a new workspace profile system that persists extension configurations, snippets, and keybindings per project, eliminating the need for manual configuration files. The integrated terminal gained support for multiple sessions with a customizable layout, and the real-time collaboration mode was rewritten to support sessions with up to 20 simultaneous participants with lower latency. Migration from the previous version is transparent — all existing extensions continue to work without updating.