Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 449aea4

Browse files
Add edits and chat
1 parent 2188e42 commit 449aea4

File tree

1 file changed

+19
-0
lines changed
  • 04-Using-GitHub-Copilot-with-CSharp

1 file changed

+19
-0
lines changed

‎04-Using-GitHub-Copilot-with-CSharp/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,25 @@ Both tests running should be like these ones:
236236

237237
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.
238238

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
242+
243+
![Selecing **Edits** mode](./images/OpenEditsWindows.png)
244+
245+
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+
![Image of the weather page with city entry](./images/WeatherWithEdits.png)
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+
239258
## Legal Notices
240259

241260
Microsoft and any contributors grant you a license to the Microsoft documentation and other content

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /