Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/images/activities-dict-highlighted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/images/activity-card-with-participants.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/images/agent-mode-dropdown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/images/ask-mode-selection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed .github/images/edit-mode-dropdown.png
Binary file not shown.
Binary file removed .github/images/edit-navigation-panel.png
Binary file not shown.
Binary file modified .github/images/files-added-to-context.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/inline-chat-highlight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/plan-mode-dropdown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/review-changes-buttons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/shadow-text.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/images/tools-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 8 additions & 9 deletions .github/steps/1-preparing.md → .github/steps/1-step.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ GitHub Copilot has been proven to increase developer productivity and accelerate

As you work in your IDE, you'll most often interact with GitHub Copilot in the following ways:

| Interaction Mode | 📝 Description | 🎯 Best For |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| **⚡ Inline suggestions** | AI-powered code suggestions that appear as you type, offering context-aware completions from single lines to entire functions. | Completion of the current line, sometimes a whole new block of code |
| **💬 Ask Mode** | Optimized for answering questions about your codebase, coding, and general technology concepts. | Understanding how code works, brainstorming ideas, asking questions |
| **✏️ Edit Mode** | Optimized for making code edits across multiple files in your project. VS Code directly applies the code changes in the editor for in-place review. | Coding tasks when you have a good understanding of the changes you want to make and which files you want to edit |
| **🤖 Agent Mode** | Optimized for making autonomous edits across multiple files in your project. | Coding tasks when you have a less well-defined task that might also require running terminal commands and tools |
| **💭 Inline Chat** | Interactive chat scoped to your current file or selection. Ask questions about specific code blocks. | Code explanations, debugging specific functions, targeted improvements |
| Interaction Mode | 📝 Description | 🎯 Best For |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- |
| **⚡ Inline suggestions** | AI-powered code suggestions that appear as you type, offering context-aware completions from single lines to entire functions. | Completion of the current line, sometimes a whole new block of code |
| **💭 Inline Chat** | Interactive chat scoped to your current file or selection. Ask questions about specific code blocks. | Code explanations, debugging specific functions, targeted improvements |
| **💬 Ask Mode** | Optimized for answering questions about your codebase, coding, and general technology concepts. | Understanding how code works, brainstorming ideas, asking questions |
| **🤖 Agent Mode** | Recommended default mode for most coding tasks: autonomous edits, tool use, and follow-through until the task is done. | Daily coding tasks, from scoped fixes to larger multi-file implementation work |
| **🧭 Plan Agent** | Optimized for drafting a plan and asking clarifying questions before any code changes are made. | When you want a reviewed plan first, then hand off to implementation |

As you work, you'll find GitHub Copilot can help out in several places across the `github.com` website and in your favorite coding environments such as VS Code, Jet Brains, and Xcode!

Expand All @@ -40,7 +40,6 @@ Let's start up our development environment, use copilot to learn a bit about the
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/{{full_repo_name}}?quickstart=1)

1. Confirm the **Repository** field is your copy of the exercise, not the original, then click the green **Create Codespace** button.

- ✅ Your copy: `/{{full_repo_name}}`
- ❌ Original: `/skills/getting-started-with-github-copilot`

Expand All @@ -60,8 +59,8 @@ Let's start up our development environment, use copilot to learn a bit about the

1. Make sure you are in **Ask Mode** for our first interaction


<img width="350" alt="screenshot showing Ask Mode selection in Copilot Chat" src="../images/ask-mode-selection.png" />

1. Enter the below prompt to ask Copilot to introduce you to the project.

> ![Static Badge](https://img.shields.io/badge/-Prompt-text?style=social&logo=github%20copilot)
Expand Down
25 changes: 18 additions & 7 deletions .github/steps/2-first-introduction.md → .github/steps/2-step.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,24 @@ In short, you can think of Copilot like a very specialized coworker. To be effec
> ```

1. Now that we know the issue is in the `src/app.py` file and the `signup_for_activity` method, let's follow Copilot's recommendation and go fix it (semi-manually). We'll start with a comment and let Copilot finish the correction.
1. Open the `src/app.py` file.

1. In VS Code, select the file **Explorer tab** to show the project files and open the `src/app.py` file.
> 💡 **Tip:** If Copilot mentioned `src/app.py` in chat, you can click the file directly in the chat view to open it.

1. Scroll near the bottom of the file and find the `signup_for_activity` method.
1. Near the bottom of the file, find the `signup_for_activity` function.

1. Find the comment line that describes adding a student. Above this is where it seems logical to do our registration check.

1. Enter the below comment and press enter to go to the next line. After a moment, temporary shadow text will appear with a suggestion from Copilot! Nice! :tada:

Comment:

```python
# Validate student is not already signed up
```

<img width="700" alt="Copilot shadow text suggestion in the editor" src="../images/shadow-text.gif" />

1. Press `Tab` to accept Copilot's suggestion and convert the shadow text to code.

<details>
Expand Down Expand Up @@ -84,11 +89,16 @@ In new project developments, it's often helpful to have some realistic looking f

1. Near the top of the `src/app.py` file (about line 23), find the `activities` variable, where our example extracurricular activities are configured.

1. Click on any of the related lines and bring up Copilot inline chat by using the keyboard command `Ctrl + I` (windows) or `Cmd + I` (mac).
1. Highlight the entire `activities` dictionary by clicking and dragging your mouse from the top to the bottom of the dictionary. This will help provide context to Copilot for our next prompt.

<img width="700" alt="Highlighted activities dictionary before opening inline chat" src="../images/activities-dict-highlighted.png" />


> 💡 **Tip:** Another way to bring up Copilot inline chat is: `right click` on any of the selected lines -> `Copilot` -> `Editor Inline Chat`.
1. Bring up Copilot inline chat by using the keyboard command `Ctrl + I` (windows) or `Cmd + I` (mac).

1. Enter the following prompt text and press enter or the **Send and Dispatch** button.
> 💡 **Tip:** Another way to bring up Copilot inline chat is: `right click` on any of the selected lines -> `Open Inline Chat`.

1. Enter the following prompt text and press enter or the **Send** button on the right.

> ![Static Badge](https://img.shields.io/badge/-Prompt-text?style=social&logo=github%20copilot)
>
Expand All @@ -97,7 +107,7 @@ In new project developments, it's often helpful to have some realistic looking f
> activities, and 2 more intellectual activities.
> ```

1. After a moment, Copilot will directly start making changes to the code. The changes will be stylized differently to make any additions and removals easy to identify. Take a moment to inspect and then press the **Accept** button.
1. After a moment, Copilot will directly start making changes to the code. The changes will be stylized differently to make any additions and removals easy to identify. Take a moment to inspect and verify the changes, and then press the **Keep** button.

<details>
<summary>Example Results</summary><br/>
Expand Down Expand Up @@ -166,6 +176,8 @@ In new project developments, it's often helpful to have some realistic looking f

</details>

1. You can now go to your website and verify that the new activities are visible.

### :keyboard: Activity: Use Copilot to describe our work 💬

Nice work fixing that bug and expanding the example activities! Now let's get our work committed and pushed to GitHub, again with the help of Copilot!
Expand All @@ -179,7 +191,6 @@ Nice work fixing that bug and expanding the example activities! Now let's get ou
![image](../images/staging-changes-icon.png)

1. Above the list of staged changes, find the **Message** text box, but **don't enter anything** for now.

- Typically, you would write a short description of the changes here, but now we have Copilot to help out!

1. To the right of the **Message** text box, find and click the **Generate Commit Message** button (sparkles icon).
Expand Down
103 changes: 0 additions & 103 deletions .github/steps/3-copilot-edits.md

This file was deleted.

Loading
Loading