Contextual inline code embedding in Copilot Chat

Open
#322,946 0 comments 0 reactions 1 assignee View on GitHub

@justschen is already working on this.

Since Jun 25, 2026.

Assessment

This issue has not been assessed yet.

Description

Problem:
The current "Add Selection to Chat" feature attaches the selected code as a file attachment, which shows as an icon/file reference in the chat input. When working with multiple files (e.g., referencing file A while modifying file B), it's impossible to distinguish which attachment corresponds to which file, forcing the user to add lengthy textual explanations.

Requested Improvement:
When a user selects code and adds it to chat, the code should be inserted inline into the chat text area, such as @Backend\mes\basis\controller\MachineController.cs:L22-35

Dominant language
TypeScript
Stars
193k
Forks
42.9k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode

All issues in microsoft/vscode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.