How to include current opened file to the chat view automatically? #162823
-
Select Topic AreaQuestion Copilot Feature AreaGeneral BodyIn the recent GitHub Copilot update, the previous behavior where GitHub Copilot automatically loaded the currently opened file in the editor as context in the Chat View has been changed, and it no longer adds them by default. Is there a setting to adjust so that the currently open files can be added to the Chat View? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 3 replies
-
|
n the recent GitHub Copilot update for Visual Studio Code, the behavior of automatically including the currently open file as context in the Chat View has been changed, and it no longer does so by default. To include the currently open file as context, you need to explicitly reference it. There are a few ways to achieve this: Use the #editor Reference: You can include the currently open file's visible content as context by adding #editor to your chat prompt. This tells Copilot to use the content from the active editor window. For example, type #editor followed by your question in the Chat View to ensure the open file is considered. |
Beta Was this translation helpful? Give feedback.
-
|
#editor is not showing up in in Edit Mode |
Beta Was this translation helpful? Give feedback.
-
|
The box showing the file in the editor is actually hashed and blurred in the chat, if you click on it then it get added to the chat and the file name changes. |
Beta Was this translation helpful? Give feedback.
-
|
I now have to manually click the file in the chat, I primarily use my keyboard. This is an incredibly bad developer experience. We need a preference to turn this back on, this makes copilot a lot less useful for me. |
Beta Was this translation helpful? Give feedback.
-
|
Copilot no longer searches for relevant files in Ask or Edit mode. Only agent mode now traverses my repo as it needs to. I used to rely on this in all chat modes. |
Beta Was this translation helpful? Give feedback.
-
|
I'm also very frustrated by this functionality. Can you at least make the context persistent in the chat ? If ask something with a specific context and the answer is bad then I need to set the context back again so he does not start an infinite loop. IMHO "use open editor" should be a persistent option as per "ask, agent" etc. So that I set this up once when I open the chat and never again I touch it during my coding session. |
Beta Was this translation helpful? Give feedback.
-
|
Yeah, that change confused me too it used to make workflow smoother. I haven’t seen an official toggle yet, but some users on Luck pub Game mentioned a workaround using custom context settings in Copilot Labs. |
Beta Was this translation helpful? Give feedback.
n the recent GitHub Copilot update for Visual Studio Code, the behavior of automatically including the currently open file as context in the Chat View has been changed, and it no longer does so by default. To include the currently open file as context, you need to explicitly reference it. There are a few ways to achieve this:
Use the #editor Reference: You can include the currently open file's visible content as context by adding #editor to your chat prompt. This tells Copilot to use the content from the active editor window. For example, type #editor followed by your question in the Chat View to ensure the open file is considered.
Manually Reference Files: You can explicitly reference sp…