Skip to content

Commit 17c2fc9

Browse files
authored
feat: Add tip about chat participants, chat variables, slash commands, and MCP tools (skills#36)
1 parent b7a5c6c commit 17c2fc9

File tree

5 files changed

+89
-74
lines changed

5 files changed

+89
-74
lines changed

.github/steps/1-preparing.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Your most common interactions will likely be:
2525
2626
### How can I use GitHub Copilot?
2727

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).
2929

3030
### :keyboard: Activity: Get a project intro from Copilot Chat
3131

@@ -63,7 +63,12 @@ Let's start up our development environment, use copilot to learn a bit about the
6363
> What should I do to run it?
6464
> ```
6565
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>
6772
6873
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.
6974

.github/steps/2-first-introduction.md

Lines changed: 76 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,17 @@ But before we do that, let's learn a bit more about Copilot! 🧑‍🚀
1010

1111
### How does Copilot work?
1212

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).
1414

1515
- **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.
1616

1717
- **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! 🤖
1818

1919
- **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.
2020

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+
2124
### :keyboard: Activity: Use Copilot to fix our registration bug :bug:
2225

2326
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
2932
> Where could this bug be coming from?
3033
> ```
3134
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+
3242
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.
3343
3444
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
8292

8393
1. If not already open, open the `src/app.py` file.
8494

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.
8696

8797
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).
8898

@@ -99,72 +109,72 @@ In new project developments, it's often helpful to have some realistic looking f
99109
100110
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.
101111
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",
112-
"schedule": "Fridays, 3:30 PM - 5:00 PM",
113-
"max_participants": 12,
114-
"participants": ["[email protected]", "[email protected]"]
115-
},
116-
"Programming Class": {
117-
"description": "Learn programming fundamentals and build software projects",
118-
"schedule": "Tuesdays and Thursdays, 3:30 PM - 4:30 PM",
119-
"max_participants": 20,
120-
"participants": ["[email protected]", "[email protected]"]
121-
},
122-
"Gym Class": {
123-
"description": "Physical education and sports activities",
124-
"schedule": "Mondays, Wednesdays, Fridays, 2:00 PM - 3:00 PM",
125-
"max_participants": 30,
126-
"participants": ["[email protected]", "[email protected]"]
127-
},
128-
"Basketball Team": {
129-
"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",
122+
"schedule": "Fridays, 3:30 PM - 5:00 PM",
123+
"max_participants": 12,
124+
"participants": ["[email protected]", "[email protected]"]
125+
},
126+
"Programming Class": {
127+
"description": "Learn programming fundamentals and build software projects",
128+
"schedule": "Tuesdays and Thursdays, 3:30 PM - 4:30 PM",
129+
"max_participants": 20,
130+
"participants": ["[email protected]", "[email protected]"]
131+
},
132+
"Gym Class": {
133+
"description": "Physical education and sports activities",
134+
"schedule": "Mondays, Wednesdays, Fridays, 2:00 PM - 3:00 PM",
135+
"max_participants": 30,
136+
"participants": ["[email protected]", "[email protected]"]
137+
},
138+
"Basketball Team": {
139+
"description": "Competitive basketball training and games",
140+
"schedule": "Tuesdays and Thursdays, 4:00 PM - 6:00 PM",
141+
"max_participants": 15,
142+
"participants": []
143+
},
144+
"Swimming Club": {
145+
"description": "Swimming training and water sports",
146+
"schedule": "Mondays and Wednesdays, 3:30 PM - 5:00 PM",
147+
"max_participants": 20,
148+
"participants": []
149+
},
150+
"Art Studio": {
151+
"description": "Express creativity through painting and drawing",
152+
"schedule": "Wednesdays, 3:30 PM - 5:00 PM",
153+
"max_participants": 15,
154+
"participants": []
155+
},
156+
"Drama Club": {
157+
"description": "Theater arts and performance training",
158+
"schedule": "Tuesdays, 4:00 PM - 6:00 PM",
159+
"max_participants": 25,
160+
"participants": []
161+
},
162+
"Debate Team": {
163+
"description": "Learn public speaking and argumentation skills",
164+
"schedule": "Thursdays, 3:30 PM - 5:00 PM",
165+
"max_participants": 16,
166+
"participants": []
167+
},
168+
"Science Club": {
169+
"description": "Hands-on experiments and scientific exploration",
170+
"schedule": "Fridays, 3:30 PM - 5:00 PM",
171+
"max_participants": 20,
172+
"participants": []
173+
}
163174
}
164-
}
165-
```
175+
```
166176
167-
</details>
177+
</details>
168178

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

.github/steps/3-copilot-edits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ In our previous steps, we used features of Copilot that require more hands-on gu
9090
9191
If you don't get feedback, here are some things to check:
9292
93-
- Make sure your commite the changes in the `src/static/` directory to the branch `accelerate-with-copilot` and pushed/synchronized to GitHub.
93+
- Make sure your commit the changes in the `src/static/` directory to the branch `accelerate-with-copilot` and pushed/synchronized to GitHub.
9494
- If Mona found a mistake, simply make a correction and push your changes again. Mona will check your work as many times as needed.
9595
9696
</details>

.github/steps/3b-copilot-agent-mode.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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
1414

1515
Now, let's give **Agent** mode a try! 👩‍🚀
1616

17-
### :keyboard: Activity: Use Agent mode to add functional "unregister" buttons
17+
### :keyboard: Activity: Use Agent mode to add functional "unregister" buttons
1818

1919
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.
2020

@@ -31,7 +31,7 @@ Let's experiment with some more open-ended requests that will add more functiona
3131
> When clicked, it will unregister that participant from the activity.
3232
> ```
3333
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.
3535
- In **Agent** mode, Copilot reviewed its own work and refined it to ensure all changes were error free and coordinated together.
3636
3737
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
7171
> Do not modify our program yet.
7272
> ```
7373
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.
7575
- You will see Copilot make mistakes, analyze the error messages, and ask to run various extra commands to make the environment suitable. Nice!
7676
7777
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
8282
> #codebase I don't like that we are storing the data in memory.
8383
> Let's switch to using mongodb.
8484
> 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.
8686
> ```
8787
8888
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! 🧑‍🚀 🚀

.github/steps/4-copilot-on-github.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Typically, you would review your notes and commit messages then summarize them f
1111
1212
#### Copilot Review
1313

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.
1515

1616
> [!NOTE]
1717
> 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

Comments
 (0)