From the course: AI-Powered Development: GitHub Copilot in Visual Studio

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Refactor code with Copilot agent

Refactor code with Copilot agent

- [Instructor] Let's take a moment to review what Copilot agent did across this project, including updates to the classes in the project. We'll hold off in examining the UI changes until later. The process took about three minutes to run. During that time, the agent made a series of updates, and I captured the entire interaction in the chat window so we can walk through it. So here at the top is the chat window, and here is the prompt that I provided. So I wanted it to propagate the new customer property across the project and to update the Customer Repository, the data transfer objects, mappings, validations, and any pages or forms that read or write this field. Now it did all of this, and as I said, we will look at the pages and forms in the next video. It started off by creating a checkpoint. You can see it right here. Now remember, this is the second prompt in this agent thread, and so this allows us to go back to the…

Contents