Skip to content

Copilot Inline Chat Does Not Respect Highlighted Code Block #252073

Open
@nscimerical

Description

@nscimerical

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.101.1
  • OS Version: Windows 11 24H2

Editor Inline Chat does not seem to take selected text as context. As documented here, you can limit the scope of the Inline Chat by selecting a block of code in the editor.

Steps to Reproduce:

  1. In a C# class, highlight a number of fields but not all. Open Inline Chat by Ctrl + I, prompt it "Write getter properties" and press Enter.
  2. Resulting code includes fields that were not highlighted.

I've tested this multiple times and it happens every time. For reference, the Chat sidebar and Quick Chat versions do work correctly and take the selected code block into account

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions