You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/steps/1-preparing.md
+13-11Lines changed: 13 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -13,17 +13,18 @@ GitHub Copilot has been proven to increase developer productivity and accelerate
13
13
Your most common interactions will likely be:
14
14
15
15
-**Inline suggestions**: As you type, Copilot uses the nearby context to suggest code directly in your editor. This will be a familiar interaction if you have used code completion tools like [Intellisense](https://code.visualstudio.com/docs/editor/intellisense), except that the completions may be entire functions.
16
-
-**Copilot Chat**: A dedicated chat panel that lets you ask coding-related questions. This will be familiar if you have used only AI assistant chats. The big difference however, is that your files can provide automatic context for copilot to provide tailored responses.
16
+
-**Copilot Chat**: A dedicated chat panel that lets you ask coding related questions. This will feel familiar if you have used online AI assistant chats. The big difference however, is that your project files will provide automatic context to provide tailored responses.
17
+
-**Copilot Edits**: Similar to Copilot Chat, but less conversational and more big picture or goal oriented.
17
18
18
19
> [!TIP]
19
20
> You can learn more about current and preview features in the [GitHub Copilot Features](https://docs.github.com/en/copilot/about-github-copilot/github-copilot-features) documentation.
20
21
21
22
> [!TIP]
22
-
> You can also select different [models](https://docs.github.com/en/github-models) and [extensions](https://github.com/features/copilot/extensions), but those are different lessons!
23
+
> You can also select different [models](https://docs.github.com/en/github-models) and [extensions](https://github.com/features/copilot/extensions), but that's for a different lesson!
23
24
24
25
### How can I use GitHub Copilot?
25
26
26
-
As you work, you'll find GitHub Copilot can help out in several places across the website and in your favorite coding environments such as VS Code, Jet Brains, XCode! For today's coding though, we will practice with VS Code in a preconfigured development environment known as [Codespace](https://github.com/features/codespaces).
27
+
As you work, you'll find GitHub Copilot can help out in several places across the website and in your favorite coding environments such as VS Code, Jet Brains, and Xcode! For today's coding though, we will practice with VS Code in a preconfigured development environment known as [Codespace](https://github.com/features/codespaces).
27
28
28
29
### :keyboard: Activity: Get a project intro from Copilot Chat :robot:
29
30
@@ -42,9 +43,10 @@ Let's start up our development environment, use copilot to learn a bit about the
42
43
43
44
1. In the left sidebar, click the extensions tab and verify that the `GitHub Copilot` and `Python` extensions are installed and enabled.
<!-- Change above image to also display the python and python debugger extensions. -->
48
50
49
51
1. At the top of VS Code, locate and click the **Copilot icon** to open a Copilot Chat panel.
50
52
@@ -54,9 +56,9 @@ Let's start up our development environment, use copilot to learn a bit about the
54
56
@workspace Please briefly explain the structure of this project. What should I do to run it?
55
57
```
56
58
57
-
> **Tip**: No need to follow these steps. The environment is already configured.
59
+
> **Tip**: No need to follow Copilot's recommended steps. We already prepared the environment for you.
58
60
59
-
1. Now that we know a bit more about the project, let's actually try runnning it! In the left sidebar, select the `Run and Debug` tab and then press the **Start Debuggin** icon.
61
+
1. Now that we know a bit more about the project, let's actually try runnning it! In the left sidebar, select the `Run and Debug` tab and then press the **Start Debugging** icon.
@@ -70,7 +72,7 @@ Let's start up our development environment, use copilot to learn a bit about the
70
72
71
73
### :keyboard: Activity: Use Copilot to help remember a terminal command :robot:
72
74
73
-
Great work! Now that you are familiar with our app, let's ask copilot for helping starting a branch so we can do some customizing.
75
+
Great work! Now that we are familiar with the app and we know it works, let's ask copilot for help starting a branch so we can do some customizing.
74
76
75
77
1. If not already there, return to VS Code.
76
78
@@ -80,15 +82,15 @@ Great work! Now that you are familiar with our app, let's ask copilot for helpin
80
82
81
83
1. Within the new terminal window, `right click` and select `Copilot` then `Terminal Inline Chat`.
82
84
83
-
> **Pro Tip:** You can also open inline chat with the keyboard shortcut `Ctrl + I` (windows) `Cmd + I` (mac).
85
+
> **Pro Tip:** You can also open inline chat with the keyboard shortcut `Ctrl + I` (windows) or `Cmd + I` (mac).
84
86
85
87
1. Let's ask Copilot to help us remember a command we have forgotten, creating a branch and publishing it.
86
88
87
89
```txt
88
90
Hey copilot, how can I create and publish a new Git branch?
89
91
```
90
92
91
-
> **Tip:** This is a simple example, but Copilot is great at providing more tailored commands that might involve loops, pattern matching, file modification, and more! Don't be afraid to ask Copilot for a suggestion. Just remember it is suggestion and you should always verify it first to be safe.
93
+
> **Tip:** This is a simple example, but Copilot is great at providing more tailored commands that might involve loops, pattern matching, file modification, and more! Don't be afraid to ask Copilot for a suggestion. Just remember it is a suggestion and you should always verify it first to be safe.
92
94
93
95
1. Copilot probably gave us a command like the following. Rather than manually modify it, let's respond back to tell Copilot to use a particular name.
94
96
@@ -101,7 +103,7 @@ Great work! Now that you are familiar with our app, let's ask copilot for helpin
101
103
Awesome! Thanks, Copilot! Let's use the branch name "accelerate-with-copilot".
102
104
```
103
105
104
-
> **Tip:** If something is incorrect in the response, you can always continue explaining what you need. Copilot will remember the conversation history in follow-up responses.
106
+
> **Tip:** If Copilot doesn't give you quite what you want, you can always continue explaining what you need. Copilot will remember the conversation history for follow-up responses.
105
107
106
108
1. Now that we are happy with the command, press the `Run` button to let Copilot run it for us. No need to copy and paste!
Copy file name to clipboardExpand all lines: .github/steps/2-first-introduction.md
+13-37Lines changed: 13 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,24 @@
1
1
## Step 2: Getting work done with Copilot
2
2
3
-
In the previous step, we Copilot was able to help us onboard to the project. That alone is a huge time save, but now let's get some work done!
3
+
In the previous step, we Copilot was able to help us onboard to the project. That alone is a huge time saver, but now let's get some work done!
4
4
5
5
We recently learned there is a bug where students are registering for the same activites twice. That simply isn't acceptable, so let's get it fixed!
6
6
7
-
Unfortunately, we were given little information to solve this problem. Let's enlist Copilot to help find the problem area and get a potential solution made.
7
+
Unfortunately, we were given little information to solve this problem. So, let's enlist Copilot to help find the problem area and get a potential solution made.
8
8
9
-
But before we do that, let's learn a bit more about Copilot.
9
+
But before we do that, let's learn a bit more about Copilot! 🧑🚀
10
10
11
11
### How does Copilot work?
12
12
13
13
In short, you can think of Copilot like a very focused coworker. To be effective with them, you need to provide them background (context) and clear direction (prompts). Additionally, different people are better at different things because of their unique experiences (models).
14
14
15
15
-**How do we provide context?:** In our coding environment, Copilot will automatically consider nearby code and open tabs. If you are using chat, you can also explicitly refer to files.
16
16
17
-
-**What model should we pick?:** For our exercise, it shouldn't matter too much. Experimenting with different models is part of the fun!
17
+
-**What model should we pick?:** For our exercise, it shouldn't matter too much. Experimenting with different models is part of the fun! That's another lesson! 🤖
18
18
19
19
-**How do I make prompts?:** Being explicit and clear helps Copilot do the best job. But unlike some traditional systems, you can always clarify your direction with followup prompts.
20
20
21
-
### :keyboard: Activity: Use Copilot to fix our registration bug :robot:
21
+
### :keyboard: Activity: Use Copilot to fix our registration bug :bug:
22
22
23
23
1. Let's ask Copilot to suggest where our bug might be coming from. Open the Copilot Chat panel and ask the following.
24
24
@@ -73,29 +73,26 @@ In short, you can think of Copilot like a very focused coworker. To be effective
73
73
74
74
### :keyboard: Activity: Let Copilot generate sample data :robot:
75
75
76
-
In new project developments, it's often helpful to have some realistic looking fake data for testing. Copilot is excellent at this task, so let's add some more sample activities and introduce our next interface: **Inline Chat**
76
+
In new project developments, it's often helpful to have some realistic looking fake data for testing. Copilot is excellent at this task, so let's add some more sample activities and introduce another way to interact with Copilot: **Inline Chat**
77
77
78
78
> [!TIP]
79
-
> **Inline Chat** and the **Copilot Chat** panel are very similar tools, but with slightly different automatic context.
80
-
> As such, while Copilot Chat is good at explaining about the project, inline chat might feel more natural for asking about a particular line or function.
79
+
> **Inline Chat** and the **Copilot Chat** panel are very similar tools, but with slightly different automatic context. As such, while Copilot Chat is good at explaining about the project, inline chat might feel more natural for asking about a particular line or function.
81
80
82
-
1. If not already ready, open the `src/app.py` file.
81
+
1. If not already open, open the `src/app.py` file.
83
82
84
83
1. Near the top (about line 23), find the `activities` variable, where our example extracurricular activies are configured.
85
84
86
-
1. Open the inline Copilot chat by Right-clicking on any of the related lines and selecting **Copilt** and **Editor Inline Chat**.
85
+
1. Open Copilot inline chat by right-clicking on any of the related lines and selecting **Copilot** and **Editor Inline Chat**.
87
86
88
87
> **Tip:** You can also use the keyboard command `Ctrl + I` (windows) or `Cmd + I` (mac).
89
88
90
-
1. Enter the following prompt text and press the **Send and Dispatch** button.
89
+
1. Enter the following prompt text and press enter or the **Send and Dispatch** button.
91
90
92
91
```text
93
92
Add 2 more sports related activities, 2 more artistic activities, and 2 more intellectual activities.
94
93
```
95
94
96
-
1. After a moment, Copilot will directly start making changes do 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.
97
-
98
-
<!-- Insert picture of diff view here -->
95
+
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.
99
96
100
97
<details>
101
98
<summary>Example Results</summary><br/>
@@ -164,27 +161,6 @@ activities = {
164
161
165
162
</details>
166
163
167
-
<!-- 1. You can use Copilot Chat inline to stay in the flow. It's often used when you are dealing with problems or want to understand a specific part of the code.
168
-
169
-
Hold down left button of your mouse and select this part of the file.
Copy file name to clipboardExpand all lines: .github/steps/3-copilot-edits.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
## Step 3: Getting work done even _faster_ with Copilot Edits
2
2
3
-
In our previous steps, we used features of Copilot that require more hands-on guidance and produced single isolated results. Now, we will explore a Copilot feature that works more holistically on our repo.
3
+
In our previous steps, we used features of Copilot that require more hands-on guidance and they produced mostly localized results. Now, we will explore Copilot Edits, a feature that allows working more holistically on our repo.
4
4
5
-
[Copilot Edits](https://code.visualstudio.com/docs/copilot/copilot-edits)works is an AI-powered code editing session to make changes across **multiple files** using natural language, and applies the edits directly in the editor, where you can review them in-place, with the full context of the surrounding code.
5
+
[Copilot Edits](https://code.visualstudio.com/docs/copilot/copilot-edits) is an AI-powered code editing session to make changes across **multiple files** using **natural language**, and applies the edits directly in the editor, where you can review them in-place, with the full context of the surrounding code.
6
6
7
7
#### Key features
8
8
@@ -35,13 +35,13 @@ In our previous steps, we used features of Copilot that require more hands-on gu
35
35
36
36
> **Tip:** You can also use the **Attach files...** button to provide other sources of context items, like a GitHub issue, the entire codebase, or the results of a terminal window.
37
37
38
-
1. Ask Copilot to display the current participants. Wait a moment for the suggestions to arrive and be applied.
38
+
1. Ask Copilot to update our project to display the current participants of activities. Wait a moment for the edit suggestions to arrive and be applied.
39
39
40
40
```txt
41
41
Hey Copilot, can you please edit the area where activities are listed on the website to show what participants are already signed up for that activity.
42
42
```
43
43
44
-
- An extra icon has appeared next to the file names and open editor windows indicating they have been temporarily modified.
44
+
- An extra icon has appeared next to the file names and open editor windows indicating they have suggested edits.
45
45
- A suggested edits panel has appeared in the bottom right of the editor window providing controls to jump to the recommended changes.
46
46
47
47
<imgwidth="200"alt="files with icons indicating they have been edited"src="https://github.com/user-attachments/assets/9c7c2e10-cd18-43c5-9947-cffd6dde0473" />
@@ -57,7 +57,7 @@ In our previous steps, we used features of Copilot that require more hands-on gu
57
57
58
58
</details>
59
59
60
-
1. Before we simply accept the changes, please check our website again and verify everything is updated as expected. Here is an example of an updated activity card.
60
+
1. Before we simply accept the changes, please check our website again and verify everything is updated as expected. Here is an example of an updated activity card.**Important:** Your results may look slightly different!
61
61
62
62
<imgwidth="350"alt="Activity card with participant info"src="https://github.com/user-attachments/assets/59fe792e-d587-487d-8525-2548ac0a7adf" />
63
63
@@ -84,7 +84,7 @@ In our previous steps, we used features of Copilot that require more hands-on gu
84
84
85
85
If you don't get feedback, here are some things to check:
86
86
87
-
- Make sure your pushed the changes in the `src/static/` directory to the branch `accelerate-with-copilot`.
88
-
-Make sure you opened a pull request to the `main` branch
87
+
- Make sure your commite the changes in the `src/static/` directory to the branch `accelerate-with-copilot` and pushed/synchronized to GitHub.
88
+
-If Mona found a mistake, simply make a correction and push your changes again. Mona will check your work as many times as needed.
Copy file name to clipboardExpand all lines: .github/steps/4-copilot-on-github.md
+14-4Lines changed: 14 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -14,16 +14,26 @@ Now, let's see how Copilot can help us finish up with during our pull request.
14
14
-**compare:**`accelerate-with-copilot`
15
15
-**title:**`Add registration validation and more activities`
16
16
17
-
1. In the **Add a description** toolbar, click the **Copilot actions** icon and **Summary** action to generate a descriptive summary based on the changes made in the pull request!:memo:
17
+
1.**Use Copilot to add a description** - In the **Add a description** toolbar, click the **Copilot actions** icon and **Summary** action to describe your changes.:memo:
18
18
19
-
1. In the right side information panel, at the top, locate the **Reviewers** section and click the **Request** button next to a Copilot icon.
19
+
1.**Ask Copilot to review your changes** - In the right side information panel at the top, locate the **Reviewers** section and click the **Request** button next to a **Copilot icon**.
20
20
21
21
1. Below the pull request description, press the green **Create pull request** one more time.
22
22
23
-
1. Wait a moment for Copilot to comment on your pull request!
23
+
1. Wait a moment for Copilot to add a review comment to your pull request!
24
24
25
25
- Notice the log entry indicating a Copilot review was requested.
26
26
27
-
1.Back on the exercise issue, wait a moment for Mona to check your work, provide feedback, and post a final review of this lesson!
27
+
1.Wait a moment for Mona to check your work, provide feedback, and post a final review of this lesson!
28
28
29
29
1. At the bottom, press the green **Merge pull request** button. Nice work! You are all done! :tada:
30
+
31
+
<details>
32
+
<summary>Having trouble? 🤷</summary><br/>
33
+
34
+
If you don't get feedback, here are some things to check:
35
+
36
+
- Make sure Copilot generated a description.
37
+
- Make sure Copilot was requested to provide a review.
0 commit comments