Summary
In this chapter, we took our first steps with the GitHub Copilot by setting up subscriptions and enabling Copilot in our IDE. Through three labs, we explored its three interaction modes: chat, completion, and analysis.
After implementing a basic code completion program in Chapter 2, we were able to better understand how GitHub Copilot is designed. Copilot enhances the code to be completed with contextual information, such as recent edits, coding preferences, and Git logs. This information is processed into user and system prompts, which are then fed to an LLM. The model’s output is further processed before being presented to the user.
Throughout the three labs, we utilized the three interaction modes to implement and refine several calculators of the geometric mean. We saw how a function signatures can be used as a prompt to Copilot. We also experimented with various completion options using keyboard shortcuts. While mastering these techniques requires some...