What Copilot Sees

You have now used the Chat view a couple of times. The first time was a tour of the project. The second was a focused look at game-store.ts with a #file: mention.

Prompts and Context

When you press Enter in the Chat view, Copilot receives a prompt (the text you typed) together with a set of context Copilot can use to answer. The set automatically includes:

  • The active file in your editor (and your selection if any)
  • Anything you attached with a #-mention
  • The chat history so far in this thread
  • A view of the workspace structure (folder and file names)

That is what is automatically in scope before Copilot starts generating an answer.

But Copilot can also retrieve more information on its own. In the tour prompt from the previous section, Copilot read files like package.json, README.md, and several files under src/ even though you did not attach any of them. When the prompt asks for something Copilot cannot answer from what is already in scope, it can retrieve what it needs — read another file, search the workspace, even run a terminal command (with your permission).

So there are two kinds of context, and it helps to keep them separate:

  • Context attached up front (automatic, immediate, bounded)
  • Context Copilot fetches on its own (decided by Copilot based on what your prompt seems to need)

The first kind is the one you control directly. Copilot decides the second kind. If your prompt says clearly what to look at, Copilot has to guess less, and it will pull in less irrelevant context.

Each Chat Starts Blank

Up at the top of the Chat view there is a + button. Clicking it starts a new chat. The old one is not deleted. You can find it under the history dropdown. But the new one starts blank. It has no memory of the previous conversation, none of your #-mentions, and none of the files Copilot fetched along the way. No context carries over to the new chat.

That has two practical consequences:

  • When you change topics, start a new chat. Old context from a different problem can steer the answer in the wrong direction. Starting a new chat is easier than removing unwanted context from an existing one.
  • When you want to continue a line of reasoning, stay in the same chat. The thread is the only memory Copilot has.