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
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ Your most common interactions will likely be:
25
25
26
26
### How can I use GitHub Copilot?
27
27
28
-
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).
28
+
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 pre-configured development environment known as [Codespace](https://github.com/features/codespaces).
29
29
30
30
### :keyboard: Activity: Get a project intro from Copilot Chat
31
31
@@ -63,7 +63,12 @@ Let's start up our development environment, use copilot to learn a bit about the
63
63
> What should I do to run it?
64
64
> ```
65
65
66
-
> **Note**: It is not necesesary to follow Copilot's recommended instructions. We have already prepared the environment for you.
66
+
> **Note**: It is not necessary to follow Copilot's recommended instructions. We have already prepared the environment for you.
67
+
68
+
<details>
69
+
<summary>What is @workspace?</summary>
70
+
Nice job noticing the details, but let's just use it for now. 🤓 We promise to explain in the next step.
71
+
</details>
67
72
68
73
1. Now that we know a bit more about the project, let's actually try running it! In the left sidebar, select the `Run and Debug` tab and then press the **Start Debugging** icon.
Copy file name to clipboardExpand all lines: .github/steps/2-first-introduction.md
+76-66Lines changed: 76 additions & 66 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,14 +10,17 @@ But before we do that, let's learn a bit more about Copilot! 🧑🚀
10
10
11
11
### How does Copilot work?
12
12
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).
13
+
In short, you can think of Copilot like a very specialized 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
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
+
> [!TIP]
22
+
> There several other ways to supplement Copilot's knowledge and capabilities like [chat participants](https://docs.github.com/en/copilot/using-github-copilot/copilot-chat/github-copilot-chat-cheat-sheet?tool=vscode#chat-participants), [chat variables](https://docs.github.com/en/copilot/using-github-copilot/copilot-chat/github-copilot-chat-cheat-sheet?tool=vscode#chat-variables), [slash commands](https://docs.github.com/en/copilot/using-github-copilot/copilot-chat/github-copilot-chat-cheat-sheet?tool=vscode#slash-commands-1), and [MCP tools](https://code.visualstudio.com/docs/copilot/chat/mcp-servers).
23
+
21
24
### :keyboard: Activity: Use Copilot to fix our registration bug :bug:
22
25
23
26
1. Let's ask Copilot to suggest where our bug might be coming from. Open the **Copilot Chat** panel and ask the following.
@@ -29,6 +32,13 @@ In short, you can think of Copilot like a very focused coworker. To be effective
29
32
> Where could this bug be coming from?
30
33
> ```
31
34
35
+
<details>
36
+
<summary>What is @workspace?</summary>
37
+
38
+
Great question! This is a specialized [chat participant](https://docs.github.com/en/copilot/using-github-copilot/copilot-chat/github-copilot-chat-cheat-sheet?tool=vscode#chat-participants) that will explore the project repository and try to include relevant additional context.
39
+
40
+
</details>
41
+
32
42
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.
33
43
34
44
1. In VS Code, select the file **Explorer tab** to show the project files and open the `src/app.py` file.
@@ -82,7 +92,7 @@ In new project developments, it's often helpful to have some realistic looking f
82
92
83
93
1. If not already open, open the `src/app.py` file.
84
94
85
-
1. Near the top (about line 23), find the `activities` variable, where our example extracurricular activies are configured.
95
+
1. Near the top (about line 23), find the `activities` variable, where our example extracurricular activities are configured.
86
96
87
97
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).
88
98
@@ -99,72 +109,72 @@ In new project developments, it's often helpful to have some realistic looking f
99
109
100
110
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.
101
111
102
-
<details>
103
-
<summary>Example Results</summary><br/>
104
-
105
-
Copilot is growing every day and may not always produce the same results. If you are unhappy with the suggestions, here is an example result we produced during the making of this exercise. You can use it to continue forward, if having trouble.
106
-
107
-
```python
108
-
# In-memory activity database
109
-
activities = {
110
-
"Chess Club": {
111
-
"description": "Learn strategies and compete in chess tournaments",
"description": "Competitive basketball training and games",
130
-
"schedule": "Tuesdays and Thursdays, 4:00 PM - 6:00 PM",
131
-
"max_participants": 15,
132
-
"participants": []
133
-
},
134
-
"Swimming Club": {
135
-
"description": "Swimming training and water sports",
136
-
"schedule": "Mondays and Wednesdays, 3:30 PM - 5:00 PM",
137
-
"max_participants": 20,
138
-
"participants": []
139
-
},
140
-
"Art Studio": {
141
-
"description": "Express creativity through painting and drawing",
142
-
"schedule": "Wednesdays, 3:30 PM - 5:00 PM",
143
-
"max_participants": 15,
144
-
"participants": []
145
-
},
146
-
"Drama Club": {
147
-
"description": "Theater arts and performance training",
148
-
"schedule": "Tuesdays, 4:00 PM - 6:00 PM",
149
-
"max_participants": 25,
150
-
"participants": []
151
-
},
152
-
"Debate Team": {
153
-
"description": "Learn public speaking and argumentation skills",
154
-
"schedule": "Thursdays, 3:30 PM - 5:00 PM",
155
-
"max_participants": 16,
156
-
"participants": []
157
-
},
158
-
"Science Club": {
159
-
"description": "Hands-on experiments and scientific exploration",
160
-
"schedule": "Fridays, 3:30 PM - 5:00 PM",
161
-
"max_participants": 20,
162
-
"participants": []
112
+
<details>
113
+
<summary>Example Results</summary><br/>
114
+
115
+
Copilot is growing every day and may not always produce the same results. If you are unhappy with the suggestions, here is an example result we produced during the making of this exercise. You can use it to continue forward, if having trouble.
116
+
117
+
```python
118
+
# In-memory activity database
119
+
activities = {
120
+
"Chess Club": {
121
+
"description": "Learn strategies and compete in chess tournaments",
Copy file name to clipboardExpand all lines: .github/steps/3b-copilot-agent-mode.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ That's just a brief intro and there is much more to learn, but that's for a dedi
14
14
15
15
Now, let's give **Agent** mode a try! 👩🚀
16
16
17
-
### :keyboard: Activity: Use Agent mode to add functional "unregister" buttons
17
+
### :keyboard: Activity: Use Agent mode to add functional "unregister" buttons
18
18
19
19
Let's experiment with some more open-ended requests that will add more functionality to our web application. Remember, AI assistants often produce different results, even if the same prompt is provided. If you don't get the desired results, you can try other models or provided followup feedback to refine the results.
20
20
@@ -31,7 +31,7 @@ Let's experiment with some more open-ended requests that will add more functiona
31
31
> When clicked, it will unregister that participant from the activity.
32
32
> ```
33
33
34
-
- If you try this prompt in **Edit** mode, you will propbably find that the changes to the frontend and backend were made in a theoretical way. Although no syntax or runtime errors occurred, the changes were not compatible and didn't achieve the goal.
34
+
- If you try this prompt in **Edit** mode, you will probably find that the changes to the frontend and backend were made in a theoretical way. Although no syntax or runtime errors occurred, the changes were not compatible and didn't achieve the goal.
35
35
- In **Agent** mode, Copilot reviewed its own work and refined it to ensure all changes were error free and coordinated together.
36
36
37
37
1. When Copilot is finished, restart the debugger and inspect the results. If you like the results, press the **Keep** button. If not, try providing Copilot some feedback to refined the results.
@@ -71,7 +71,7 @@ Just for fun, let's try something even more difficult and open-ended to see what
71
71
> Do not modify our program yet.
72
72
> ```
73
73
74
-
- We purposly made the default development environment not ready for installing a local MongoDB server.
74
+
- We purposely made the default development environment not ready for installing a local MongoDB server.
75
75
- You will see Copilot make mistakes, analyze the error messages, and ask to run various extra commands to make the environment suitable. Nice!
76
76
77
77
1. Ask Copilot to change our app to use the database service. 🤯
@@ -82,7 +82,7 @@ Just for fun, let's try something even more difficult and open-ended to see what
82
82
> #codebase I don't like that we are storing the data in memory.
83
83
> Let's switch to using mongodb.
84
84
> For now use the local development instance.
85
-
> Please prepopulate the database with the existing hardcoded json activities, keeping the activity name as the key.
85
+
> Please pre-populate the database with the existing hardcoded json activities, keeping the activity name as the key.
86
86
> ```
87
87
88
88
1. That's your preview for now. We hope it was fun and please check back soon on the [Skills page](https://skills.github.com) for a dedicated exercise to explore even more of Agent Mode! 🧑🚀 🚀
Copy file name to clipboardExpand all lines: .github/steps/4-copilot-on-github.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Typically, you would review your notes and commit messages then summarize them f
11
11
12
12
#### Copilot Review
13
13
14
-
More eyes on our work is always useful so let's ask Copilot to do a first pass before we do a normal peer review process. Copilot is great at catching common mistakes that can are fixed by simple adjustment, but please remember to use it responsibily.
14
+
More eyes on our work is always useful so let's ask Copilot to do a first pass before we do a normal peer review process. Copilot is great at catching common mistakes that can are fixed by simple adjustment, but please remember to use it responsibly.
15
15
16
16
> [!NOTE]
17
17
> This is in **Public Preview** for organizations. [[docs]](https://docs.github.com/en/copilot/using-github-copilot/code-review/using-copilot-code-review)
0 commit comments