Skip to content

Commit 07fdae4

Browse files
committed
Refresh Copilot Chat content
1 parent c6d3d53 commit 07fdae4

16 files changed

+60
-54
lines changed

docs/copilot/copilot-chat.md

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Copilot Chat might use syntax highlighting, indentation, and other formatting fe
1616

1717
Copilot Chat integrates in your developer flow and gives you assistance where you need it:
1818

19-
* Start an **inline chat** conversation directly from the editor or the terminal for help while you're coding
19+
* Start an **Inline Chat** conversation directly from the editor or the terminal for help while you're coding
2020
* Use the **Chat view** to have an AI assistant on the side to help you at any time
2121
* Launch **Quick Chat** to ask a quick question and get back into what you're doing
2222

@@ -38,31 +38,31 @@ You can use Copilot Chat in various scenarios, such as:
3838

3939
Follow these steps to [set up GitHub Copilot in VS Code](/docs/copilot/setup.md) by signing up for a subscription and installing the Copilot extension in VS Code.
4040

41-
## Inline chat
41+
## Inline Chat
4242

43-
A key functionality of Copilot is answering questions inline, while you're coding in the editor or entering commands in the terminal. With Copilot inline chat, you can ask questions about code, get explanations, and even generate code snippets without leaving the context of your work. In any file, press `kb(inlinechat.start)` on your keyboard to bring up Copilot inline chat.
43+
A key functionality of Copilot is answering questions inline, while you're coding in the editor or entering commands in the terminal. With Copilot Inline Chat, you can ask questions about code, get explanations, and even generate code snippets without leaving the context of your work. In any file, press `kb(inlinechat.start)` on your keyboard to bring up Copilot Inline Chat.
4444

4545
You can ask Copilot questions that emerge as you write and iterate on code, such as "Explain this piece of code", or "How do I add functionality to do X?".
4646

47-
![Copilot inline chat asking information about the used sorting algorithm](images/copilot-chat/inline-chat-question-example.png)
47+
![Copilot Inline Chat asking information about the used sorting algorithm](images/copilot-chat/inline-chat-question-example.png)
4848

4949
If you have a block of code selected in the editor, Copilot scopes your question to the selection.
5050

5151
Depending on your question, Copilot can also suggest code modifications or refactorings. Copilot gives a preview of the updates, which you can then accept (`kb(inlineChat.acceptChanges)`) or discard (`kb(inlineChat.discard)`). Optionally, you can generate a new code suggestion.
5252

53-
![Copilot inline chat asking to convert a sort alogrithm to use bubble sort](images/copilot-chat/inline-chat-convert-sort.png)
53+
![Copilot Inline Chat asking to convert a sort alogrithm to use bubble sort](images/copilot-chat/inline-chat-convert-sort.png)
5454

55-
With the `setting(inlineChat.mode)` setting, you can configure how inline chat shows updates in the editor. The default setting value is `live`, which means that the updates are applied directly in the editor, and you can compare the changes by using the inline diff viewer. If you prefer to preview the changes side-by-side, you configure the setting to `preview`.
55+
With the `setting(inlineChat.mode)` setting, you can configure how Inline Chat shows updates in the editor. The default setting value is `live`, which means that the updates are applied directly in the editor, and you can compare the changes by using the inline diff viewer. If you prefer to preview the changes side-by-side, you configure the setting to `preview`.
5656

57-
The following example shows the `preview` mode for inline chat.
57+
The following example shows the `preview` mode for Inline Chat.
5858

59-
![Copilot inline chat preview mode, showing the code changes side-by-side](images/copilot-chat/inline-chat-preview-mode.png)
59+
![Copilot Inline Chat preview mode, showing the code changes side-by-side](images/copilot-chat/inline-chat-preview-mode.png)
6060

61-
## Terminal inline chat
61+
## Terminal Inline Chat
6262

63-
Similar to inline chat in the editor, you can bring up Copilot inline chat in the terminal to help you answer questions related to the terminal and shell commands. The terminal inline chat uses the `@terminal` chat participant, which has context about the integrated terminal's shell and its contents. For example, you can ask questions such as "how to instal npm packages", or "list the top 5 largest files in the src directory".
63+
Similar to Inline Chat in the editor, you can bring up Copilot Inline Chat in the terminal to help you answer questions related to the terminal and shell commands. The terminal Inline Chat uses the `@terminal` chat participant, which has context about the integrated terminal's shell and its contents. For example, you can ask questions such as "how to instal npm packages", or "list the top 5 largest files in the src directory".
6464

65-
To start inline chat in the terminal, press the `kb(inlinechat.start)` keyboard shortcut.
65+
To start Inline Chat in the terminal, press the `kb(inlinechat.start)` keyboard shortcut.
6666

6767
![Screenshot showing that you can ask complex questions like "list the top 5 largest files in the src dir"](images/copilot-chat/terminal-chat-2.png)
6868

@@ -96,14 +96,12 @@ As you keep the conversation going, Copilot maintains the history of your chat m
9696

9797
Depending on your question, Copilot Chat might return source code in a code block. Depending on the language extension, the code block in the chat response might support IntelliSense, which enables you get information about methods and symbols by hovering over them, or to go to their definition.
9898

99-
![A Copilot Chat code block with JSON to change the color of comments in VS Code](images/copilot-chat/copy-code-block.png)
99+
![A Copilot Chat code block response.](images/copilot-chat/copilot-chat-view-code-block-actions.png)
100100

101-
Hovering over the code block presents options to **Copy** and **Insert at Cursor** (`kb(workbench.action.chat.insertCodeBlock)`).
101+
Hovering over the code block presents options to **Apply in Editor**, **Insert at Cursor**, and **Copy**.
102102

103103
The **More Actions** (`...`) button gives options to **Insert Into New File** and **Insert into Terminal** (`kb(workbench.action.chat.runInTerminal)`).
104104

105-
![Copilot Chat code block with More Actions button expanded](images/copilot-chat/more-actions-code-block.png)
106-
107105
If Copilot Chat detects that a code block contains a command, you can run it directly in the integrated terminal with **Insert into Terminal** (`kb(workbench.action.chat.runInTerminal)`). This option creates or opens the active terminal and inserts the command text, ready for you to run.
108106

109107
![Copilot Chat code block to list files with Insert into Terminal option visible](images/copilot-chat/run-in-terminal.png)
@@ -119,7 +117,7 @@ You can control the font for code blocks in chat with the following settings:
119117
120118
## Quick chat
121119

122-
If you want to ask Copilot a quick question and don't want to start a full Chat view session or open inline chat in your editor, you can use the Quick Chat dropdown. To open Quick Chat, run **Chat: Open Quick Chat** in the Command Palette, or use the `kb(workbench.action.quickchat.toggle)` keyboard shortcut.
120+
If you want to ask Copilot a quick question and don't want to start a full Chat view session or open Inline Chat in your editor, you can use the Quick Chat dropdown. To open Quick Chat, run **Chat: Open Quick Chat** in the Command Palette, or use the `kb(workbench.action.quickchat.toggle)` keyboard shortcut.
123121

124122
![Quick Chat dropdown](images/copilot-chat/quick-chat-dropdown.png)
125123

@@ -131,7 +129,7 @@ You can type questions, scope your questions with [chat participants](#chat-part
131129

132130
When you ask a question in Copilot Chat, you aren't stuck with the first response. Keep the chat conversation open and continue to iterate and prompt Copilot to improve the suggested solution. Copilot has both the context of the generated code and your current conversation history. As you keep asking additional questions, Copilot further refines the response according to your requirements.
133131

134-
Here's an example using inline chat to create a function to calculate Fibonacci numbers:
132+
Here's an example using Inline Chat to create a function to calculate Fibonacci numbers:
135133

136134
![First response from Copilot for a function to calculate Fibonacci numbers](images/prompt-crafting/fibonacci-first.png)
137135

@@ -147,15 +145,15 @@ To make it easier to use Copilot Chat features, smart actions are integrated in
147145

148146
Access the smart actions by selecting a block of code, right-clicking, and choosing **Copilot**. The smart actions are context-aware and can help you with common tasks, such as generating documentation, fixing code, or explaining code.
149147

150-
![Editor context menu with the Copilot menu group expanded](images/copilot-chat/editor-copilot-menu.png)
148+
![Editor context menu with the Copilot menu group expanded](images/copilot-chat/copilot-smart-action-menu.png)
151149

152150
The most powerful smart action is `/fix`. Here is a relatively simple TypeScript calculator with an error noting that "Argument of type 'string' is not assignable to parameter of type 'number'". Select the *sparkle* icon, and then choose **Fix using Copilot**.
153151

154152
![Quick fix a type mismatch error by using the Copilot smart action](images/copilot-chat/smart-action-fix-with-copilot.png)
155153

156154
Similar to `/fix`, the `/doc` smart action is popular with users. To use `/doc`, select a block of code, right-click, and choose **Copilot** > **Generate Docs**. Copilot will generate a documentation comment for your code.
157155

158-
![Inline chat /doc results adding JSDoc comment for a TypeScript function](images/copilot-chat/generate-docs-example.png)
156+
![Inline Chat /doc results adding JSDoc comment for a TypeScript function](images/copilot-chat/generate-docs-example.png)
159157

160158
## Chat participants
161159

@@ -216,18 +214,21 @@ For example, we can infer that "Create a new workspace with Node.js Express Pug
216214

217215
Once the intent is clear, `@workspace` has a better chance of addressing your needs, despite the inherent ambiguity of natural language. The @workspace chat participant can propose a directory structure and users can select the proposed files to preview them. There is a **Create Workspace** button that generates these files in a new folder.
218216

219-
Examples of built-in commands:
217+
Examples of built-in commands - type `@` or select the <i class="codicon codicon-mention"></i> icon.
220218

221-
* `/help`: get help about using GitHub Copilot
222-
* `/doc`: generate code documentation
223219
* `/clear`: start a new chat session
220+
* `/help`: get help about using GitHub Copilot
221+
* `/doc`: generate code documentation (Inline Chat)
224222
* `@workspace /explain` (or `/explain`): explain how the selected code works
225223
* `@workspace /fix` (or `/fix`): propose a fix for the problems in the selected code
224+
* `@workspace /fixTestFailure` (preview): propose a fix for failing tests
225+
* `@workspace /setupTests`: configure a testing framework for your workspace
226226
* `@workspace /tests` (or `/tests`): generate unit tests for the selected code
227227
* `@workspace /new` (or `/new`): scaffold code for a new workspace or new file
228228
* `@workspace /newNotebook` (or `/newNotebook`): create a new Jupyter Notebook
229-
* `@vscode /search` (or `/search`): generate query parameters for the Search view
230229
* `@vscode /runCommand`: search or run a VS Code command
230+
* `@vscode /search` (or `/search`): generate query parameters for the Search view
231+
* `@vscode /startDebugging` (experimental): generate `launch.json` file to set up debugging configuration and start debugging
231232
* `@terminal /explain`: explain terminal functionality or shell commands
232233

233234
## Chat context
@@ -250,6 +251,8 @@ Instead of using the `#` symbol, you can also add context to your chat message b
250251

251252
![Screenshot of VS Code Copilot Chat view, showing the Attach context button and context Quick Pick.](./images/copilot-chat/copilot-chat-view-attach-context.png)
252253

254+
To add files as context for your chat prompt, you can drag and drop files from the Explorer view onto the chat input field to add them as context. You can also drag and drop an editor tab onto the chat input field to add the file as context.
255+
253256
## Improve the performance of Copilot Chat
254257

255258
Copilot works best when it has sufficient context to know what you're doing and what you want help with. Just as you would provide a colleague with the context when asking for help with a specific programming task, you can do the same with Copilot.
@@ -278,9 +281,9 @@ You can delete a prompt and the corresponding response from the chat history by
278281

279282
You can export all prompts and responses for a chat session in a JSON file with the **Chat: Export Session...** command (`workbench.action.chat.export`) in the Command Palette.
280283

281-
### Context in inline chat
284+
### Context in Inline Chat
282285

283-
If you're using inline chat, and you have code selected in the editor, Copilot scopes your question to the selection.
286+
If you're using Inline Chat, and you have code selected in the editor, Copilot scopes your question to the selection.
284287

285288
### Ignore files
286289

@@ -300,9 +303,9 @@ Learn more about how to [use voice interactions in VS Code](/docs/editor/voice.m
300303

301304
We emphasize responsible usage of AI, especially when it comes to source code. The `setting(inlineChat.acceptedOrDiscardBeforeSave)` setting, which is enabled by default, asks you for confirmation before saving code that was generated by Copilot.
302305

303-
When the setting is enabled, a file save operation waits for you to accept or discard any pending inline chat session. This also applies when Auto Save is enabled, which will be temporarily disabled until inline chat has ended.
306+
When the setting is enabled, a file save operation waits for you to accept or discard any pending Inline Chat session. This also applies when Auto Save is enabled, which will be temporarily disabled until Inline Chat has ended.
304307

305-
![Inline chat save consent message.](images/copilot-chat/inline-chat-save-consent.png)
308+
![Inline Chat save consent message.](images/copilot-chat/inline-chat-save-consent.png)
306309

307310
To enable more workspace search features for private repositories, we require additional permissions. If we detect that we don't have these permissions already, we will ask for them at startup. Once granted, we'll securely store the session for the future.
308311

Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

docs/copilot/images/copilot-chat/editor-copilot-menu.png

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)