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: articles/github-copilot-azure/get-started.md
+72-72
Original file line number
Diff line number
Diff line change
@@ -60,125 +60,125 @@ You may need to enable agent mode.
60
60
61
61
1. In Visual Studio Code, open **Settings** using the **Manage** icon (gear).
62
62
63
-
:::image type="content" source="media/get-started/vscode-settings.png" alt-text="Screenshot that shows the VSCode settings menu by selecting the Manage button.":::
63
+
:::image type="content" source="media/get-started/vscode-settings.png" alt-text="Screenshot that shows the VSCode settings menu by selecting the Manage button.":::
64
64
65
65
66
66
1. In the Settings' Search bar, search for `chat.agent.enabled`.
67
67
1. Check the box next to **Chat > Agent: Enabled**.
68
68
69
-
:::image type="content" source="media/get-started/chat-agent-enabled.png" alt-text="Screenshot that shows the settings dialog with settings filtered to chat.agent.enabled.":::
69
+
:::image type="content" source="media/get-started/chat-agent-enabled.png" alt-text="Screenshot that shows the settings dialog with settings filtered to chat.agent.enabled.":::
70
70
71
71
### Use agent mode
72
72
73
73
There are three modes: ask (default), edit and agent. To use agent mode, you must select it in the chat pane.
74
74
75
75
1. If the Chat window is not already open, make sure it's open by either selecting the **Toggle Chat** button in the menu bar, or select the dropdown next to the **Toggle Chat** button and select **Open Chat (Ctrl+Alt+I)**.
76
76
77
-
:::image type="content" source="media/get-started/open-chat.png" alt-text="Screenshot that shows the Toggle Chat menu open and selecting the the Open Chat menu option.":::
77
+
:::image type="content" source="media/get-started/open-chat.png" alt-text="Screenshot that shows the Toggle Chat menu open and selecting the the Open Chat menu option.":::
78
78
79
79
1. In the chat pane, in the chat prompt, select the mode dropdown and choose **Agent**.
80
80
81
-
:::image type="content" source="media/get-started/mode-agent.png" alt-text="Screenshot that shows the pop-up menu in the Chat box with Agent selected.":::
81
+
:::image type="content" source="media/get-started/mode-agent.png" alt-text="Screenshot that shows the pop-up menu in the Chat box with Agent selected.":::
82
82
83
83
1. The chat pane will confirm that you are currently in agent mode.
84
84
85
-
:::image type="content" source="media/get-started/agent-mode-confirmation.png" alt-text="Screenshot that shows the chat pane confirming you are now in agent mode.":::
85
+
:::image type="content" source="media/get-started/agent-mode-confirmation.png" alt-text="Screenshot that shows the chat pane confirming you are now in agent mode.":::
86
86
87
87
1. To see agent mode working, use the following prompt:
88
88
89
-
```
90
-
What are your tools?
91
-
```
89
+
```
90
+
What are your tools?
91
+
```
92
92
93
93
The completion response will display a list of GitHub Copilot for Azure specific tools available to GitHub Copilot. The response provides a good overview of the kinds of functionality now available to you:
94
94
95
-
```
96
-
I can assist you with various tasks using a range of tools. Here are the main tools I have available:
97
-
98
-
1. Search and Navigation
99
-
- Semantic search for code or documentation
100
-
- File search using glob patterns
101
-
- Text search (grep)
102
-
- List directory contents
103
-
- Read file contents
104
-
- List code usages/references
105
-
106
-
2. Code Editing and Analysis
107
-
- Insert edits into files
108
-
- Get errors in code files
109
-
- Test search (find test files)
110
-
111
-
3. Terminal and Git Operations
112
-
- Run commands in terminal
113
-
- Get terminal output
114
-
- Get Git diffs and changed files
115
-
116
-
4. Project Creation
117
-
- Create new workspaces
118
-
- Get project setup information
119
-
- Install VS Code extensions
120
-
- Create new Jupyter Notebooks
121
-
122
-
5. Web and API Tools
123
-
- Fetch webpage content
124
-
- Get VS Code API references
95
+
```
96
+
I can assist you with various tasks using a range of tools. Here are the main tools I have available:
97
+
98
+
1. Search and Navigation
99
+
- Semantic search for code or documentation
100
+
- File search using glob patterns
101
+
- Text search (grep)
102
+
- List directory contents
103
+
- Read file contents
104
+
- List code usages/references
105
+
106
+
2. Code Editing and Analysis
107
+
- Insert edits into files
108
+
- Get errors in code files
109
+
- Test search (find test files)
110
+
111
+
3. Terminal and Git Operations
112
+
- Run commands in terminal
113
+
- Get terminal output
114
+
- Get Git diffs and changed files
115
+
116
+
4. Project Creation
117
+
- Create new workspaces
118
+
- Get project setup information
119
+
- Install VS Code extensions
120
+
- Create new Jupyter Notebooks
121
+
122
+
5. Web and API Tools
123
+
- Fetch webpage content
124
+
- Get VS Code API references
125
125
126
-
6. Azure Tools
127
-
- Azure development best practices
128
-
- Microsoft Learn documentation
129
-
- Azure resource management
130
-
- Azure authentication tools
131
-
- AI model deployment and management
132
-
- Azure Bicep schemas
133
-
- Service configuration and deployment
134
-
- Azure Developer CLI tools
126
+
6. Azure Tools
127
+
- Azure development best practices
128
+
- Microsoft Learn documentation
129
+
- Azure resource management
130
+
- Azure authentication tools
131
+
- AI model deployment and management
132
+
- Azure Bicep schemas
133
+
- Service configuration and deployment
134
+
- Azure Developer CLI tools
135
+
136
+
Would you like me to explain any specific tool in more detail or help you with a particular task?
135
137
136
-
Would you like me to explain any specific tool in more detail or help you with a particular task?
137
-
138
-
```
138
+
```
139
139
140
140
141
141
1. The last entry, `Azure Developer CLI tools`, could be employed with the following prompt:
142
142
143
-
```
144
-
What is the az command to list all my storage accounts ordered by location?
145
-
```
143
+
```
144
+
What is the az command to list all my storage accounts ordered by location?
145
+
```
146
146
147
-
The completion to that prompt might generate:
147
+
The completion to that prompt might generate:
148
148
149
-
```
149
+
```
150
150
151
-
I'll help you generate the Azure CLI command to list all your storage accounts ordered by location. Let me use the Azure CLI generator tool to get the correct syntax for this command.
151
+
I'll help you generate the Azure CLI command to list all your storage accounts ordered by location. Let me use the Azure CLI generator tool to get the correct syntax for this command.
152
152
153
-
To list all your storage accounts ordered by location in Azure, you can use the following Azure CLI command:
153
+
To list all your storage accounts ordered by location in Azure, you can use the following Azure CLI command:
154
154
155
-
az storage account list --query "sort_by(@, &location)"
155
+
az storage account list --query "sort_by(@, &location)"
156
156
157
-
This command will:
157
+
This command will:
158
158
159
-
1. Retrieve all storage accounts you have access to in your Azure subscription
160
-
2. Sort the results based on the location (Azure region) of each storage account
161
-
3. Display the full details of each storage account in the sorted order
159
+
1. Retrieve all storage accounts you have access to in your Azure subscription
160
+
2. Sort the results based on the location (Azure region) of each storage account
161
+
3. Display the full details of each storage account in the sorted order
162
162
163
-
If you'd prefer a more concise output focusing on specific fields, you could modify the query. For example, to show only the name and location in a table format:
163
+
If you'd prefer a more concise output focusing on specific fields, you could modify the query. For example, to show only the name and location in a table format:
164
164
165
-
az storage account list --query "sort_by(@, &location)[].[name,location]" -o table
165
+
az storage account list --query "sort_by(@, &location)[].[name,location]" -o table
166
166
167
-
Make sure you're logged into the Azure CLI before running this command. If you're not logged in yet, you can do so with az login.
167
+
Make sure you're logged into the Azure CLI before running this command. If you're not logged in yet, you can do so with az login.
168
168
169
-
```
169
+
```
170
170
171
171
### Enable and disable tools in agent mode
172
172
173
173
You may want to disable or re-enable certain tools available by GitHub Copilot for Azure.
174
174
175
175
1. Select the tool icon in the chat pane.
176
176
177
-
:::image type="content" source="media/get-started/tool-icon.png" alt-text="Screenshot of chat pane with highlight around the tool icon.":::
177
+
:::image type="content" source="media/get-started/tool-icon.png" alt-text="Screenshot of chat pane with highlight around the tool icon.":::
178
178
179
179
1. Use the checkbox next to the list of tools to enable / disable tools (or groups of tools).
180
180
181
-
:::image type="content" source="media/get-started/tool-list.png" alt-text="Screenshot of the list of tools in Visual Studio Code.":::
181
+
:::image type="content" source="media/get-started/tool-list.png" alt-text="Screenshot of the list of tools in Visual Studio Code.":::
182
182
183
183
184
184
### Best practices for working in agent mode
@@ -187,7 +187,7 @@ To get better agentic results, consider the following best practices.
187
187
188
188
-**When prompted, add the `copilot-instructions.md` file to your workspace.**
189
189
190
-
:::image type="content" source="media/get-started/copilot-instructions.png" alt-text="Screenshot of the Visual Studio Code notification to add the copilot instructions file to the workspace.":::
190
+
:::image type="content" source="media/get-started/copilot-instructions.png" alt-text="Screenshot of the Visual Studio Code notification to add the copilot instructions file to the workspace.":::
191
191
192
192
-**Keep your prompts as granular as possible.** Instead of a prompt like `Generate a Python web application and deploy it to Azure`, you should break that up into a dozen or so smaller prompts each with a smaller scope of responsibility.
193
193
@@ -197,9 +197,9 @@ To get better agentic results, consider the following best practices.
197
197
198
198
-**Express your preferences.** If GitHub Copilot wants to perform an action and you would prefer it to take a *different* action, you can instruct it to do it your preferred way. For example, if it wants to create a folder to contain bicep files called `\.azure`, you could intervene and ask it to use a different folder with a prompt such as:
199
199
200
-
```
201
-
Instead of naming the folder `.azure`, please name it `infra`
202
-
```
200
+
```
201
+
Instead of naming the folder `.azure`, please name it `infra`
0 commit comments