traduce al español:

0.27 (2025-05-07)
GitHub Copilot updates from April 2025:

Chat
Prompt and instructions files
You can tailor your AI experience in VS Code to your specific coding practices and technology stack by using Markdown-based instructions and prompt files. We've aligned the implementation and usage of these two related concepts, however they each have distinct purposes.

Instructions files
Setting: chat.instructionsFilesLocations

Instructions files (also known as custom instructions or rules) provide a way to describe common guidelines and context for the AI model in a Markdown file, such as code style rules, or which frameworks to use. Instructions files are not standalone chat requests, but rather provide context that you can apply to a chat request.

Instructions files use the .instructions.md file suffix. They can be located in your user data folder or in the workspace. The chat.instructionsFilesLocations setting lists the folders that contain instruction files.

You can manually attach instructions to a specific chat request, or they can be automatically added:

To add them manually, use the Add Context button in the Chat view, and then select Instructions.... Alternatively use the Chat: Attach Instructions... command from the Command Palette. This brings up a picker that lets you select existing instructions files or create a new one to attach.

To automatically add instructions to a prompt, add the applyTo Front Matter header to the instructions file to indicate which files the instructions apply to. If a chat request contains a file that matches the given glob pattern, the instructions file is automatically attached.

The following example provides instructions for TypeScript files (applyTo: '**/*.ts'):

---
applyTo: '**/*.ts'
---
Place curly braces on separate lines for multi-line blocks:
if (condition)
{
  doSomething();
}
else
{
  doSomethingElse();
}

You can create instruction files with the Chat: New Instructions File... command. Moreover, the files created in the user data folder can be automatically synchronized across multiple user machines through the Settings Sync service. Make sure to check the Prompts and Instructions option in the Backup and Sync Settings... dialog.

Learn more about instruction files in our documentation.

Prompt files
Setting: chat.promptFilesLocations

Prompt files describe a standalone, complete chat request, including the prompt text, chat mode, and tools to use. Prompt files are useful for creating reusable chat requests for common tasks. For example, you can add a prompt file for creating a front-end component, or to perform a security review.

Prompt files use the .prompt.md file suffix. They can be located in your user data folder or in the workspace. The chat.promptFilesLocations setting lists the folder where prompt files are looked for.

There are several ways to run a prompt file:

Type / in the chat input field, followed by the prompt file name. Screenshot that shows running a prompt in the Chat view with a slash command.

Open the prompt file in an editor and press the 'Play' button in the editor tool bar. This enables you to quickly iterate on the prompt and run it without having to switch back to the Chat view. Screenshot that shows running a prompt by using the play button in the editor.

Use the Chat: Run Prompt File... command from the Command Palette.

Prompt files can have the following Front Matter metadata headers to indicate how they should be run:

mode: the chat mode to use when invoking the prompt (ask, edit, or agent mode).
tools: if the mode is agent, the list of tools that are available for the prompt.
The following example shows a prompt file for generating release notes, that runs in agent mode, and can use a set of tools:

---
mode: 'agent'
tools: ['getCurrentMilestone', 'getReleaseFeatures', 'file_search', 'semantic_search', 'read_file', 'insert_edit_into_file', 'create_file', 'replace_string_in_file', 'fetch_webpage', 'vscode_search_extensions_internal']
---
Generate release notes for the features I worked in the current release and update them in the release notes file. Use [release notes writing instructions file](https://github.com/microsoft/vscode-copilot-release/blob/HEAD/.github/instructions/release-notes-writing.instructions.md) as a guide.

To create a prompt file, use the Chat: New Prompt File... command from the Command Palette.

Learn more about prompt files in our documentation.

Improvements and notes
Instructions and prompt files now have their own language IDs, configurable in the language mode dialog for any file open document ("Prompt" and "Instructions" respectively). This allows, for instance, using untitled documents as temporary prompt files before saving them as files to disk.
We renamed the Chat: Use Prompt command to Chat: Run Prompt. Furthermore, the command now runs the selected prompt immediately, as opposed to attaching it as chat context as it did before.
Both file types now also support the description metadata in their headers, providing a common place for short and user-friendly prompt summaries. In the future, this header is planned to be used along with the applyTo header as the rule that determines if the file needs to be auto-included with chat requests (for example, description: 'Code style rules for front-end components written in TypeScript.')
Faster agent mode edits with GPT 4.1
We've implemented support for OpenAI's apply patch editing format when using GPT 4.1 and o4-mini in agent mode. This means that you benefit from significantly faster edits, especially in large files. The tool is enabled by default in VS Code Insiders and will be progressively rolled out in VS Code Stable.

Use GPT 4.1 as the base model
When you're using chat in VS Code, the base model is now updated to GPT-4.1. You can still use the model switcher in the Chat view to change to another model.

Search code of a GitHub repository with the #githubRepo tool
Imagine you need to ask a question about a GitHub repository, but you don't have it open in your editor. You can now use the #githubRepo tool to search for code snippets in any GitHub repository that you have access to. This tool takes a USER/REPO and is a great way to quickly ask about a project you don't currently have open in VS Code.

You can also use custom instructions to hint to Copilot when and how to use this tool:

---
applyTo: '**'
---
Use the `#githubRepo` tool with `microsoft/vscode` to find relevant code snippets in the VS Code codebase.
Use the `#githubRepo` tool with `microsoft/typescript` to answer questions about how TypeScript is implemented.

Screenshot showing using the #githubRepo tool in agent mode with hints from instructions files.

If you want to ask about the repo you are currently working on, you can just use the #codebase tool.

Also, the #githubRepo tool is only for searching for relevant code snippets. The GitHub MCP server provides tools for working with GitHub issues and pull requests. Learn more about adding MCP servers in VS Code.

Find Marketplace extensions with the extensions tool
Use #extensions tool to find extensions from the Marketplace. This tool is available in both chat and agent mode and is picked up automatically but you can also reference it explicitly via #extensions with your query. The tool returns a list of extensions that match your query, and you can install them directly from the results.


Improvements to the web page fetch tool
Last month, we introduced the #fetch tool, which allows you to fetch the contents of a web page right from chat to include as context for your prompt. If you missed that release note, check out the initial release of the fetch tool release note and examples.

This iteration, we have made several big changes to the tool including:

Entire page as context: We now add the entire page as context, rather than a subset. With larger context windows, we have the ability to give the model the entire page. For example, it's now possible to ask summarization questions that require as much of the page as possible. If you do manage to fill up the context window, the fetch tool is smart enough to exclude the less relevant sections of the page. That way, you don't exceed the context window limit, while still keeping the important parts.
A standardized page format (Markdown): Previously, we formatted fetched webpages in a custom hierarchical format that did the job, but was sometimes hard to reason with because of its custom nature. We now convert fetched webpages into Markdown, a standardized language. This improves the reliability of the relevancy detection and is a format that most language models know deeply, so they can reason with it more easily.
We'd love to hear how you use the fetch tool and if there are any capabilities you'd like to see from it!

Chat input improvements
We have made several improvements to the chat input box:

Attachments: when you reference context in the prompt text with #, they now also appear as an attachment pill. This makes it simpler to understand what's being sent to the language model.
Context picker: we streamlined the context picker to make it simpler to pick files, folders, and other attachment types.
Done button: we heard your feedback about the "Done"-button and we removed it! No more confusion about unexpected session endings. Now, we only start a new session when you create a new chat (Ctrl+L).
Chat mode keyboard shortcuts
The keyboard shortcut Ctrl+Alt+I still just opens the Chat view, but the Ctrl+Shift+I shortcut now opens the Chat view and switches to agent mode. If you'd like to set up keyboard shortcuts for other chat modes, there is a command for each mode:

workbench.action.chat.openAgent
workbench.action.chat.openEdit
workbench.action.chat.openAsk
Autofix diagnostics from agent mode edits
Setting: github.copilot.chat.agent.autoFix

If a file edit in agent mode introduces new errors, agent mode can now detect them, and automatically propose a follow-up edit. You can disable this behavior with github.copilot.chat.agent.autoFix.

Handling of undo and manual edits in agent mode
Previously, making manual edits during an agent mode session could confuse the model. Now, the agent is prompted about your changes, and should re-read files when necessary before editing files that might have changed.

Conversation history summarized and optimized for prompt caching
We've made some changes to how our agent mode prompt is built to optimize for prompt caching. Prompt caching is a way to speed up model responses by maintaining a stable prefix for the prompt. The next request is able to resume from that prefix, and the result is that each request should be a bit faster. This is especially effective in a repetitive series of requests with large context, like you typically have in agent mode.

When your conversation gets long, or your context gets very large, you might see a "Summarized conversation history" message in your agent mode session:

Screenshot showing a summarized conversation message in the Chat view.

Instead of keeping the whole conversation as a FIFO, breaking the cache, we compress the conversation so far into a summary of the most important information and the current state of your task. This keeps the prompt prefix stable, and your responses fast.

MCP support for Streamable HTTP
This release adds support for the new Streamable HTTP transport for Model Context Protocol servers. Streamable HTTP servers are configured just like existing SSE servers, and our implementation is backwards-compatible with SSE servers:

{
  "servers": {
    "my-mcp-server": {
      "url": "http://localhost:3000/mcp"
    }
  }
}

Learn more about MCP support in VS Code.

MCP support for image output
We now support MCP servers that generate images as part of their tool output.

Note that not all language models support reading images from tool output. For example, although GPT-4.1 has vision capability, it does not currently support reading images from tools.

Enhanced input, output, and progress from MCP servers
We have enhanced the UI that shows MCP server tool input and output, and have also added support for MCP's new progress messages.

 Theme: Codesong (preview on vscode.dev)

MCP config generation uses inputs
To help keep your secrets secure, AI-assisted configurations generated by the MCP: Add Server command now generate inputs for any secrets, rather than inlining them into the resulting configuration.

Inline chat V2 (Preview)
Setting: chat.inlineChat.enableV2:true

We have been working on a revamped version of inline chat Ctrl+I. Its theme is still "bringing chat into code", but behind the scenes it uses the same logic as chat edits. This means better use of the available context and a better code-editing strategy. You can enable inline chat v2 via chat.inlineChat.enableV2:true

Further, there is now a more lightweight UX that can optionally be enabled. With the chat.inlineChat.hideOnRequest:true setting, inline chat hides as soon as a request is made. It then minimizes into the chat-editing overlay, which enables accepting or discarding changes, or restoring the inline chat control.


Select and attach UI elements to chat (Experimental)
Setting: chat.sendElementsToChat.enabled

While you're developing a web application, you might want to ask chat about specific UI elements of a web page. You can now use the built-in Simple Browser to attach UI elements as context to chat.

After opening any locally-hosted site via the built-in Simple Browser (launch it with the Simple Browser: Show command), a new toolbar is now shown where you can select Start to select any element in the site that you want. This attaches a screenshot of the selected element, and the HTML and CSS of the element.


Configure what is attached to chat with:

chat.sendElementsToChat.attachCSS: enable or disable attaching the associated CSS
chat.sendElementsToChat.attachImages: enable or disable attaching the screenshot of the selected element
This experimental feature is enabled by default for all Simple Browsers, but can be disabled with chat.sendElementsToChat.enabled.

Create and launch tasks in agent mode (Experimental)
Setting: chat.newWorkspaceCreation.enabled

In the previous release, we introduced the chat.newWorkspaceCreation.enabled (Experimental) setting to enable workspace creation with agent mode.

Now, at the end of this creation flow, you are prompted to create and run a task for launching your app or project. This streamlines the project launch process and enables easy task reuse.

Configure VS Code
Prevent installation of Copilot Chat pre-release versions in VS Code stable
VS Code now prevents the installation of the pre-release version of the Copilot Chat extension in VS Code Stable. This helps avoid situations where you inadvertently install the Copilot Chat pre-release version and get stuck in a broken state. This means that you can only install the Copilot Chat extension pre-release version in the Insiders build of VS Code.

Semantic text search with keyword suggestions (Experimental)
Setting: chat.search.keywordSuggestions:true

Semantic text search now supports AI-powered keyword suggestions. By enabling this feature, you will start seeing relevant references or definitions that might help you find the code you are looking for.


Code Editing
New Next Edit Suggestions (NES) model
Setting: github.copilot.nextEditSuggestions.enabled

We're excited to introduce a new model powering NES, designed to provide faster and more contextually relevant code recommendations. This updated model offers improved performance, delivering suggestions with reduced latency, and offering suggestions that are less intrusive and align more closely with your recent edits. This update is part of our ongoing commitment to refining AI-assisted development tools within Visual Studio Code.

Import suggestions
Setting: github.copilot.nextEditSuggestions.fixes:true

Next Edit Suggestions (NES) can now automatically suggest adding missing import statements in JavaScript and TypeScript files. Enable this feature by setting github.copilot.nextEditSuggestions.fixes:true. We plan to further enhance this capability by supporting imports from additional languages in future updates.

Screenshot showing NES suggesting an import statement.

Generate alt text in HTML or Markdown
You can now generate or update existing alt text in HTML and Markdown files. Navigate to any line containing an embedded image and trigger the quick fix via Ctrl+. or by selecting the lightbulb icon.

Screenshot that shows generating alt text for an image html element.

Notebooks
Drag and drop cell outputs to chat
To enhance existing support for cell output usage within chat, outputs are now able to be dragged into the Chat view for a seamless attachment experience. Currently, only image and textual outputs are supported. Outputs with an image mime type are directly draggable, however to avoid clashing with text selection, textual outputs require holding the Alt modifier key to enable dragging. We are exploring UX improvements in the coming releases.


Notebook tools for agent mode
Run cell
Chat now has an LLM tool to run notebook cells, which allows the agent to perform updates based on cell run results or perform its own data exploration as it builds out a notebook.


Get kernel state
The agent can find out which cells have been executed in the current kernel session, and read the active variables by using the Kernel State tool.

List/Install packages
The Jupyter extension contributes tools for listing and installing packages into the environment that's being used as the notebook's kernel. The operation is delegated to the Python Environments extension if available; otherwise, it attempts to use the pip package manager