Skip to content

Commit 08a6727

Browse files
authored
Merge pull request #101 from tspascoal/update-copilot-editmode
Update the way copilot edit is started
2 parents 04ee608 + 9441cf2 commit 08a6727

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

content/1-hour/4-add-feature.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ Adding the filters to the page will require updating a minimum of two files - th
2525
1. Return to your IDE with your project open.
2626
2. Close any tabs you have open inside your IDE.
2727
3. Enable Auto Save by selecting **File** > **Auto Save**.
28-
4. Open the following files in your IDE (which we'll point Copilot chat to for context):
29-
- **server/app.py**
30-
- **client/src/components/DogList.svelte**
31-
5. Select **Copilot Edits** in the Copilot Chat window.
32-
6. If available, select **Claude 3.5 Sonnet** from the list of available models.
28+
4. Open GitHub Copilot Chat.
29+
5. Switch to edit mode by selecting **Edit** in the chat mode dropdown at the bottom of Chat view (should be currently **Ask**)
30+
6. If available, select **Claude 3.5 Sonnet** from the list of available models
3331
7. Select **Add Context...** in the chat window.
34-
7. Select **Open Editors** from the prompt. This will add all currently open files to the context.
35-
8. Ask Copilot to generate the update you want to the page, which is to add filters for both dog breed and if dogs are available for adoption. Use your own phrasing, ensuring the following requirements are met:
32+
8. Select **server/app.py** and **client/src/components/DogList.svelte** files (you need to select **Add context** for each file)
33+
> [!TIP]
34+
> If you type the file names after clicking **Add context**, they will show up in the filter. You can also drag the files or right click file in explorer and select `Copilot -> Add File to Chat`)
35+
9. Ask Copilot to generate the update you want to the page, which is to add filters for both dog breed and if dogs are available for adoption. Use your own phrasing, ensuring the following requirements are met:
3636
- A dropdown list should be provided with all breeds
3737
- A checkbox should be available to only show available dogs
3838
- The page should automatically refresh whenever a change is made

content/full-day/6-code.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,22 @@ Adding the filters to the page will require updating a minimum of three files -
7878
- **server/app.py**
7979
- **server/test_app.py**
8080
- **client/src/components/DogList.svelte**
81-
2. Select **Copilot Edits** in the Copilot Chat window.
82-
3. Ensure **Claude 3.7 Sonnet** is selected for the model.
83-
4. Select **Add Context...** in the chat window and **Open Editors** from the prompt. This will add all currently open files to the context.
84-
5. Ask Copilot to perform the operation you want, to update the page to add the filters. It should meet the following requirements:
81+
2. Open GitHub Copilot Chat.
82+
3. Switch to edit mode by selecting **Edit** in the chat mode dropdown at the bottom of Chat view (should be currently **Ask**)
83+
4. If available, select **Claude 3.7 Sonnet** for the model.
84+
5. Select **Add Context...** in the chat window.
85+
6. Select **server/app.py**, **client/src/components/DogList.svelte** and **server/test_app.py** files (you need to select **Add context** for each file)
86+
> [!TIP]
87+
> If you type the file names after clicking **Add context**, they will show up in the filter. You can also drag the files or right click file in explorer and select `Copilot -> Add File to Chat`)
88+
7. Ask Copilot to perform the operation you want, to update the page to add the filters. It should meet the following requirements:
8589
- A dropdown list should be provided with all breeds
8690
- A checkbox should be available to only show available dogs
8791
- The page should automatically refresh whenever a change is made
8892
- Tests should be updated for any changes to the endpoint.
89-
6. Review the code suggestions to ensure they behave the way you expect them to, making any necessary changes. Once you're satisfied, you can select **Keep** on the files individually or in Copilot Chat to accept all changes.
90-
7. Open the page at [http://localhost:4321][localhost] to see the updates!
91-
8. Run the Python tests by using `python -m unittest` in the terminal as you did previously.
92-
9. If any changes are needed, explain the required updates to GitHub Copilot and allow it to generate the new code.
93+
8. Review the code suggestions to ensure they behave the way you expect them to, making any necessary changes. Once you're satisfied, you can select **Keep** on the files individually or in Copilot Chat to accept all changes.
94+
9. Open the page at [http://localhost:4321][localhost] to see the updates!
95+
10. Run the Python tests by using `python -m unittest` in the terminal as you did previously.
96+
11. If any changes are needed, explain the required updates to GitHub Copilot and allow it to generate the new code.
9397

9498
> [!IMPORTANT]
9599
> Working iteratively a normal aspect of coding with an AI pair programmer. You can always provide more context to ensure Copilot understands, make additional requests, or rephrase your original prompts.

0 commit comments

Comments
 (0)