I learned from the article(copilot-explorer) that the Copilot VS Code plugin places the SimilarFile in the prompt. Why is this done?
Prefix computation: Now, a “Prompt Wishlist” is created for computing the prefix part of the prompt. Here, different “elements” along with their priorities are added. E.g., an element can be something like the “Compare this snippet from ”, or local import context, or the language ID and/or path of each file. This happens in getPrompt(fs, curFile, promptOpts = {}, relevantDocs = []). There are 6 different types of “elements” – BeforeCursor, AfterCursor, SimilarFile, ImportedFile, LanguageMarker, PathMarker.
I have gone through the code logic of the plugin and it does indeed place the SimilarFile in the prompt. However, I cannot see any benefits of doing this. Can someone help me explain this?