-
Book Overview & Buying
-
Table Of Contents
Supercharged Coding with GenAI
By :
In Chapter 3, we noted that GitHub Copilot does not include the entire code base in the prompt. This is due to context window limitations, potential cost, and the fact that much of the content may not be relevant to the specific task.
However, this does not prevent GenAI from helping us understand the code bases we are working with. Rather than relying blindly on Large Language Models (LLMs) to identify key components, we will explore how to request explanations for both simple elements and more complex scenarios.
GitHub Copilot includes several slash commands, among them the /explain command, which is available in both the inline chat and the chat window. Unlike code completion tasks, the output of this prompt is explanatory text covering arguments, data transformations, and return values.
The command can be used alone or with extra instructions. For example, in PyCharm, we can ask Copilot to...