|
| 1 | +# Setting up and using GitHub Copilot with this repository |
| 2 | + |
| 3 | +This repository has been designed to work seamlessly with GitHub Copilot, an AI-powered code companion tool that can help you learn and write code faster. |
| 4 | + |
| 5 | +GitHub Copilot [can be used for FREE](https://github.blog/news-insights/product-news/github-copilot-in-vscode-free/) in VS Code, Visual Studio and Codespaces, follow the instructions below to get started. |
| 6 | + |
| 7 | +> [!TIP] |
| 8 | +> In addition to Copilot Free tier, students, educators, and open source maintainers also can have a free access to unlimited Copilot Pro. |
| 9 | +
|
| 10 | +## Setup |
| 11 | + |
| 12 | +Go to this [GitHub Copilot page](https://github.com/features/copilot) and click on the "Get started for free" button to enable GitHub Copilot for your account. |
| 13 | + |
| 14 | +Once you have enabled GitHub Copilot, you need to login to GitHub Copilot in your IDE: |
| 15 | + |
| 16 | +- **VS Code**: Install the [GitHub Copilot extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) from the VS Code marketplace. After installing the extension, you will be prompted to sign in to GitHub and authorize the extension to access your account. |
| 17 | +- **Visual Studio**: Follow the instructions in this [GitHub Copilot for Visual Studio documentation](https://learn.microsoft.com/visualstudio/ide/copilot-free-plan?view=vs-2022). |
| 18 | +- **Codespaces**: GitHub Copilot is pre-installed in Codespaces. You just need to sign in to your GitHub account when prompted. |
| 19 | + |
| 20 | +## Using GitHub Copilot |
| 21 | + |
| 22 | +Once you have set up GitHub Copilot, you can start using it to assist you with learning and coding tasks in this repository. |
| 23 | + |
| 24 | +First, open the repository in your IDE, and open a Copilot chat window. In VS Code, you use `⌃⌘I` on Mac or `Ctrl+Alt+I` on Windows/Linux to open the chat. |
| 25 | + |
| 26 | +From there, you attach files or folders from the repository to the chat context, and you can start asking questions about the codebase, such as: |
| 27 | + |
| 28 | +- "Explain me like I'm five what Agent API does, under 100 words." |
| 29 | + |
| 30 | +### Using the different chat modes |
| 31 | + |
| 32 | +Copilot chat supports different chat modes that can help you get more specific answers or actions based on your needs. You can switch between chat modes by clicking on the mode selector in the chat window. |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | +Copilot comes with some built-in chat modes, such as: |
| 37 | + |
| 38 | +- **Agent mode (default)**: Agent mode is optimized for making autonomous edits across multiple files in your project. |
| 39 | +- **Ask mode**: Ask mode is optimized for answering questions about your codebase, coding, and general technology concepts. |
| 40 | + |
| 41 | +### Codebase Explorer chat mode |
| 42 | + |
| 43 | +In addition to the built-in chat modes, you can also create custom chat modes to tailor the experience to your specific needs. For example, we have created a custom chat mode called **"Codebase Explorer"** that is optimized for exploring and understanding the codebase of this repository. This modes may also first ask you some questions to better understand your skill level and adapt the answers accordingly. |
| 44 | + |
| 45 | +Try selecting the "Codebase Explorer" chat mode from the chat modes selector, and then ask questions like: |
| 46 | + |
| 47 | +- "How does the agent-webapp service communicate with the agent-api service?" |
| 48 | + |
| 49 | +## Advanced usage |
| 50 | + |
| 51 | +Once you're more familiar with Copilot, you can explore more advanced features, such as customizing prompts, instructions or creating your own chat modes to suit your specific needs. |
| 52 | + |
| 53 | +You can also explore the [Awesome Copilot repository](https://github.com/github/awesome-copilot) for community-created reusable prompts, chat modes, and other resources to enhance your Copilot experience. |
| 54 | + |
| 55 | +## Resources |
| 56 | + |
| 57 | +- [GitHub Copilot documentation](https://docs.github.com/copilot) |
| 58 | +- [Use chat modes in VS Code](https://code.visualstudio.com/docs/copilot/customization/custom-chat-modes) |
| 59 | +- [Tutorial: Getting started with GitHub Copilot](https://github.com/skills/getting-started-with-github-copilot) |
0 commit comments