News

New VS Code Release Polishes Experimental GitHub Copilot Agent Mode

Since Microsoft-owned GitHub introduced the experimental Agent Mode for GitHub Copilot, the original "AI pair programmer" description of the tool advanced to "autonomous peer programmer" en route to the possible end goal of simply, "AI programmer." The tech has been polished in the latest update to Visual Studio Code, the February update taking it to v1.98.

When GitHub announced Agent Mode and other advanced GenAI tech, CEO Thomas Dohmke said: "Developer teams will soon be joined by teams of intelligent, increasingly advanced AI agents that act as peer-programmers for everyday tasks." Agent Mode was introduced to Microsoft's Visual Studio Code editor last month in an Insiders early-access build, part of several cutting-edge AI initiatives (see "Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds"), including:
  • Next Edit Suggestions (NES): This feature enhances AI-powered code completions by predicting and suggesting the next edits a developer might want to make in existing code. As code is modified, NES anticipates subsequent changes, allowing devs to navigate and accept suggestions using the Tab key. An arrow in the gutter indicates available edit suggestions, streamlining the editing process.
  • Agent Mode: Agent Mode offers an autonomous editing experience where Copilot plans and executes tasks to fulfill requests. It determines relevant files, applies code changes, suggests terminal commands, and iterates to resolve issues, all while keeping users in control to review and confirm actions.
  • Vision: This enables Copilot to generate code based on visual inputs like screenshots or markup. By analyzing visual data, Copilot can create corresponding user interfaces or provide descriptive alt text for images, bridging the gap between visual design and code implementation.

Those are all advancing VS Code to the point where foreseeably a human can just describe a project and let Copilot do all that pesky coding, barely supervised by a human (see "VS Code Copilot Gets Closer to Tab, Tab, Tab Coding").

In announcing VS Code 1.98 this week, Microsoft polished Next Edit Suggestions and Agent Mode, both now marked as previews, along with other Copilot functionality for editing notebooks, code search and more.

Since AI is clearly the future for coding in VS Code and everywhere else, here are summaries of the AI work done in the new release.

  • Next Edit Suggestions (Preview)
    • Collapsed Mode Added -- A new collapsed mode hides code suggestions until manually expanded. In this mode, only a suggestion indicator appears in the editor gutter, and the full suggestion is revealed upon interaction (for example, pressing Tab).
    • Toggling Collapsed Mode -- Disabled by default, but can be enabled via editor.inlineSuggest.edits.showCollapsed or toggled from the NES gutter indicator menu.
  • Agent Mode (Preview)
    • Inline Terminal Commands -- Suggested terminal commands are now displayed inline within the Copilot chat conversation, providing better visibility of executed commands.
    • Editable Command Suggestions -- Users can modify suggested terminal commands before executing them, offering greater control over AI-driven actions.
    • Quick Command Confirmation -- Commands can be executed quickly with Ctrl+Enter (Windows/Linux) or ⌘+Enter (Mac).
    • Visible Search Results -- Copilot autonomously searches the codebase for relevant context and now displays an expandable list of search results for better transparency.
    • Granular Undo/Redo -- Undo and redo actions now apply specifically to the last edit made by Copilot, rather than undoing the entire response.
    • Automated Task Running -- Copilot can now autonomously run build tasks when necessary. This behavior can be toggled via github.copilot.chat.agent.runTasks.

    Here's a video to see agent mode in action.

  • Copilot Edits for Notebooks
    • Notebook Support (Preview) -- Initial support for Jupyter-style notebooks, enabling AI-assisted editing in notebook environments (currently in Insiders preview).
    • AI-Powered Notebook Editing -- Copilot can now create, modify, insert, delete, and change the type of cells in notebooks using natural-language commands.
    • Seamless Notebook Experience -- Live updates ensure a smooth workflow for data science and documentation tasks, mirroring the experience of coding with Copilot.
  • Code Search
    • #codebase Chat Search -- Using the #codebase tag in a Copilot Chat query allows AI to automatically search the entire workspace for relevant code snippets.
    • Multi-Strategy Searching -- Copilot now combines semantic search, keyword-based text search, file name search, Git-modified files, project structure analysis, and workspace symbol search to deliver more precise results.
Otherwise, in non-Copilot enhancements, the new release includes:
  • Terminal IntelliSense (Preview) -- Provides rich completion support within the terminal. This enhancement integrates IntelliSense features directly into the terminal, offering suggestions for commands, paths, and more, thereby improving the command-line experience.
  • Drag & Drop References -- Allows quick opening of peek references in a new editor via drag and drop. Users can now drag references from the peek window and drop them into the editor area, facilitating seamless navigation and code exploration.
  • Linux Custom Title Bar -- Enables custom title bar support for Linux by default. This update allows Linux users to customize the VS Code title bar, aligning the interface more closely with their desktop environment and personal preferences.
  • Unresolved Diagnostics (Preview) -- Prompts users when committing with unresolved diagnostics. This feature alerts developers to issues such as errors or warnings before committing code, helping maintain code quality and reducing potential bugs.
  • Soft-Delete in Source Control -- Moves untracked files to trash instead of permanently deleting them. This change provides a safety net by allowing recovery of untracked files that are accidentally deleted, enhancing version control practices.
  • Custom Instructions General Availability -- Allows users to tailor Copilot to their specific needs using custom instructions. This feature enables developers to customize AI behavior, ensuring that Copilot's suggestions align more closely with individual coding styles and project requirements.

Read the lengthy post for more details on enhancements ranging from proposed APIs to tweaks for remote development and enterprise support, along with notable fixes and more.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

Subscribe on YouTube