3 ms·
I stumbled upon this repo by accident a few days ago when its source code appeared to contain the only usage the term "GH_COPILOT_TOKEN" in any repo on Github:
by gavinray 4y ago
I stumbled upon this repo by accident a few days ago when its source code appeared to contain the only usage the term "GH_COPILOT_TOKEN" in any repo on Github:
https://github.com/search?q=GH_COPILOT_TOKEN&type=code 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 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#discussioncomment-3473154 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."
- thakkarparth007 4y agoHey Gavin, that's consistent with what I said in the blog post. Header files (.h) and (.c) files are classified as having the same language (C). As a result, if you have the header file open in a tab (or in the workspace -- I'm not sure if unaccessed files from workspace are used), then it'll be considered for the prompt.