GitHub Copilot Certification — Question 44
What is used by GitHub Copilot in the IDE to determine the prompt context?
Answer options
- A. All the code in the current repository and any git submodules.
- B. All the code visible in the current IDE.
- C. The open tabs in the IDE and the current folder of the terminal.
- D. Information from the IDE like open tabs, cursor location, selected code.
Correct answer: D
Explanation
The correct answer is D because GitHub Copilot relies on contextual information such as open tabs, where the cursor is positioned, and any highlighted code to generate relevant suggestions. Options A and B are too broad, as they do not precisely reflect the immediate context that Copilot considers. Option C is also incorrect because it includes the terminal's current folder, which is not used by Copilot for prompt context.