Skip to content

Commit eafb6a5

Browse files
authored
Merge pull request #194 from microsoft/csharp-visuals
fix: remove image dimensions from README.md for better responsiveness
2 parents b3f120b + f80f5e6 commit eafb6a5

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ To get started:
5757
1. Click the Copilot Chat icon in the top-right corner of the Codespace window:
5858

5959
<div align="left">
60-
<img src="./images/001-chat.jpg" alt="Open GitHub Copilot Chat" width="500" height="300">
60+
<img src="./images/001-chat.jpg" alt="Open GitHub Copilot Chat">
6161
</div>
6262

6363
2. Instead of manually exploring the BackEnd and Front folders, try asking Copilot for an overview. In the chat pane, type '/' to view available slash commands — these offer quick, structured ways to interact with Copilot.
@@ -73,13 +73,13 @@ To get started:
7373
3. In lieu of using natural language, type `/explain` into the chat pane. The output from GitHub Copilot will go into details of how the project is structured, including further information of the Frontend and Backend details.
7474

7575
<div align="left">
76-
<img src="./images/002explainoutput.gif" alt="Output of /Explain" width="500" height="300">
76+
<img src="./images/002explainoutput.gif" alt="Output of /Explain">
7777
</div>
7878

7979
4. As a visual learner, you can ask GitHub Copilot to 'create a diagram of the workflow of the application'. This could be saved into a README for further documentation.
8080

8181
<div align="left">
82-
<img src="./images/movingdiagram.gif" alt="Output of application diagram" width="500" height="300">
82+
<img src="./images/movingdiagram.gif" alt="Output of application diagram">
8383
</div>
8484

8585
In the above exercises we achieved the following:
@@ -91,13 +91,13 @@ In the above exercises we achieved the following:
9191
1. Ask GitHub Copilot in the chat pane to "run and debug" the backend project (you can also do this from the 'run and debug' panel in the editor). Start Debugging the selected project.
9292

9393
<div align="left">
94-
<img src="./images/003RunBackEndProject.jpg" alt="Run and Debug in the Panel" width="300" height="300">
94+
<img src="./images/003RunBackEndProject.jpg" alt="Run and Debug in the Panel">
9595
</div>
9696

9797
2. The BackEnd project for our Weather API will now be running in port 8080. If you used Copilot to Run and Debug, it will output the URL for you in the chat pane. Simply click the text and it will open a new tab with the published URL. Ensure that `/weatherforecast` is in the published URL.
9898

9999
<div align="left">
100-
<img src="./images/004rundebugURL.jpg" alt="Run and Debug Output" width="300" height="500">
100+
<img src="./images/004rundebugURL.jpg" alt="Run and Debug Output">
101101
</div>
102102

103103
If the URL is not loading properly, check the format and use the below format for the final URL:
@@ -109,7 +109,7 @@ https://< your url>.app.github.dev/weatherforecast
109109
**NOTE:** If you chose to run and debug the application from the run and debug panel, you will see the URL for the website in the _Ports_ tab in the editor:
110110

111111
<div align="left">
112-
<img src="./images/005ports.jpg" alt="port view in the editor" width="500" height="300">
112+
<img src="./images/005ports.jpg" alt="port view in the editor">
113113
</div>
114114

115115
1. In this next step we want to refactor some code and generate a new record for our Weather API. The goal is to add a new record that includes the name of the city. We are going to achieve this by asking Copilot directly from the file using code comments. From the file pane, navigate to the following path `SampleApp\BackEnd\Program.cs` and open `Program.cs`. Navigate to the end of the file and type in (or copy):
@@ -121,13 +121,13 @@ https://< your url>.app.github.dev/weatherforecast
121121
The output should be similar to this:
122122

123123
<div align="left">
124-
<img src="./images/006internalrecord.jpg" alt="changes to existing record" width="500" height="300">
124+
<img src="./images/006internalrecord.jpg" alt="changes to existing record">
125125
</div>
126126

127127
4. Now we want to use the inline feature of Copilot. Using the inline feature we can focus on the code in front of us and make progressive changes as needed in our code base. Next, we will create a new C# class by creating a new file under the `Backend` folder: `SampleApp\BackEnd\Customer.cs`.
128128

129129
<div align="left">
130-
<img src="./images/007customerfile.png" alt="New file customer.cs" width="500" height="300">
130+
<img src="./images/007customerfile.png" alt="New file customer.cs">
131131
</div>
132132

133133
From the top of the editor, press `CTRL + I` to open the inline chat and type (or copy) in:
@@ -144,7 +144,7 @@ From the top of the editor, press `CTRL + I` to open the inline chat and type (o
144144
Review the suggestions from Copilot and verify the output. **Note:** It is important to always verify the output from Copilot.
145145

146146
<div align="left">
147-
<img src="./images/008regexvalid.jpg" alt="Validate Regex" width="500" height="300">
147+
<img src="./images/008regexvalid.jpg" alt="Validate Regex">
148148
</div>
149149

150150
6. You can further highlight the method and ask inline (or select `CTRL + Shift + I`) to open chat and ask Copilot 'Explain what IsValidEmail() does'. This provides another way to interact with Copilot, verify it's output and to further understand the code that is written.
@@ -154,7 +154,7 @@ Review the suggestions from Copilot and verify the output. **Note:** It is impor
154154
**Note:** In the case that you do not see [Next Edit Suggestions](https://code.visualstudio.com/blogs/2025/02/12/next-edit-suggestions) appear in your editor, check that they are enabled in your editor.
155155
156156
<div align="left">
157-
<img src="./images/NextEdit.gif" alt="Output of /Explain" width="500" height="300">
157+
<img src="./images/NextEdit.gif" alt="Output of /Explain">
158158
</div>
159159

160160
In the above exercises we achieved the following:
@@ -174,7 +174,7 @@ In the above exercises we achieved the following:
174174
1. Open GitHub Copilot Chat. Notice in the text box you can 'add context', which allows you to attach files, folders and other items to the context of Copilot so that it can better understand your codebase. Agent mode should be selected by default. You have the capability to choose your model as well. Also note, the open tab `Program.cs` is being referenced for context.
175175

176176
<div align="left">
177-
<img src="./images/009agentview.jpg" alt="Output of /Explain" width="500" height="300">
177+
<img src="./images/009agentview.jpg" alt="Output of /Explain">
178178
</div>
179179

180180
2. Give Agent mode a detailed prompt. For this example we are going to ask Copilot to make several improvements to our project. Copy and paste the prompt below into the Chat window.
@@ -191,19 +191,19 @@ In the above exercises we achieved the following:
191191
When executing in Agent mode, Copilot will take a bit longer to work through all of the tasks. It will first parse your intent from the prompt above. It will plan and execute the various tasks.
192192

193193
<div align="left">
194-
<img src="./images/010agentbackimplement.jpg" alt="Output Agent Mode Implementation" width="500" height="300">
194+
<img src="./images/010agentbackimplement.jpg" alt="Output Agent Mode Implementation">
195195
</div>
196196

197197
But where Agent mode really shines is that it will iterate on its own output until it resolves errors and reaches a working solution. As agent mode is running, we can see it is running tests to check and verify its own code:
198198

199199
<div align="left">
200-
<img src="./images/agentmodetests.gif" alt="Output Agent Mode Implementation" width="500" height="300">
200+
<img src="./images/agentmodetests.gif" alt="Output Agent Mode Implementation">
201201
</div>
202202

203203
While Agent Mode is working, we can also view that it has created documentation per our requirements outlined in the tasks that it was given:
204204

205205
<div align="left">
206-
<img src="./images/011agentmodedocs.jpg" alt="Output Agent Mode Implementation" width="500" height="300">
206+
<img src="./images/011agentmodedocs.jpg" alt="Output Agent Mode Implementation">
207207
</div>
208208

209209
For this step in the workshop, agent mode should have taken several minutes to complete your tasks. Review the various changes and confirm that they have achieved all of the given output. With Agent mode, it also outputs what changes were made. The following summary of changes that were made are summarized below:

0 commit comments

Comments
 (0)