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: 04-Using-GitHub-Copilot-with-CSharp/README.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -236,6 +236,25 @@ Both tests running should be like these ones:
236
236
237
237
Let's use **Copilot Edits** to start an AI-powered code editing session and iterate quickly on code changes across multiple files by using natural language. Copilot Edits applies the edits directly in the editor, where you can review them in-place, with the full context of the surrounding code.
238
238
239
+
Let's add some new functionality so the user can enter the city they want to search for and call our new API.
240
+
241
+
1. Open the **Edits** mode window in GitHub Copilot Chat
2. Select the **+Add Files...** buttton from the Edits window and add **FetchData.razor** and **WeatherForecastClient.cs**.
246
+
3. Enter into the chat: `Update the user interface to ask the user the city they want the weather for, use the forecast client to call the new endpoint for the city, and update the table to display the city as well.
247
+
4. Select the **Send** button and now Edits will generate an iteration plan for the changes.
248
+
5. Review the edits and hit **Accept** in the edits window to accept all changes to files.
249
+
6. Run the application
250
+
251
+
> Note: If the application doesn't run or it doesn't call the new endpoint, validate the changes in the files changed and ensure the endpoint is being called correctly.
252
+
253
+

254
+
255
+
From here, you can continue to iterate and ask questions about styling or other pieces of functionality to add to the application.
256
+
257
+
239
258
## Legal Notices
240
259
241
260
Microsoft and any contributors grant you a license to the Microsoft documentation and other content
0 commit comments