https://github.com/search?q=GH_COPILOT_TOKEN&type=code
(My Copilot was broken and this was in the error output I was seeing, see: https://github.com/community/community/discussions/41878)
What I found there was some truly impressive reverse-engineering work by a single individual. I really like the "JOURNAL" daily-diary they kept of progress and random thoughts so you could see the progression day-by-day.
--------
One thing I found interesting: The author says that it queries only the 20 recently most opened files of the same language.
But in an AMA, I asked about how much "context" Copilot has available, and one of the devs says it can, for example, read header files that pair with C/C++ files that are open in separate tabs:
https://github.com/orgs/community/discussions/29932#discussi...
> "I assume Copilot uses the contents of the current project (IE, all files) as contextual information to offer suggestions. Is this the case?"
> "Yes, copilot looks at what we call "related tabs", for example .c files are often paired with .h files, so copilot considers the contents of other tabs open in the editor to try to feed a more complete prompt to the model."