Skip to content

Commit 8f4ddc1

Browse files
authored
Merge pull request #7794 from ntrogh/copilot-docs-1124
Update Copilot docs
2 parents 27a86ad + b9bbcdb commit 8f4ddc1

14 files changed

+149
-139
lines changed

docs/copilot/copilot-chat.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -237,16 +237,18 @@ Similar to `/fix`, the `/doc` smart action is popular with users. To use `/doc`,
237237

238238
## Chat participants
239239

240-
To further help Copilot give you more relevant answers, you can indicate the scope and intent of your question through chat *participants*.
241-
242-
Chat participants are like experts who have a specialty that they can help you with, and you can talk to them in the chat by mentioning them with the `@` symbol. Currently, these are the following built-in chat participants:
240+
*Chat participants* are like experts who have a specialty that they can help you with. You can invoke a chat participant by typing '@' in the chat input field, followed by the participant name. There are several built-in chat participants:
243241

244242
* `@workspace` has context about the code in your workspace and can help you navigate it, finding relevant files or classes.
245243
* `@vscode` knows about commands and features in the VS Code editor itself, and can help you use them.
246244
* `@terminal` has context about the integrated terminal shell and its contents.
247245
* `@github` has knowledge about your GitHub repositories, issues, pull requests, and topics, and can also perform web searches using the Bing API.
248246

249-
Extensions can also contribute chat participants to provide specialized help for their domain.
247+
Extensions can also contribute chat participants to provide specialized help for their domain. To find the list of available chat participants, type `@` in the chat input field.
248+
249+
These are some examples of extensions in the Visual Studio Marketplace that contribute a chat participant to the Chat view in VS Code. Go to the [Marketplace](https://marketplace.visualstudio.com/search?term=tag%3Achat-participant&target=VSCode&category=All%20categories&sortBy=Relevance) or use the integrated [Extensions view](/docs/editor/extension-marketplace.md) and search for more extensions by using the `chat-participant` tag.
250+
251+
<div class="marketplace-extensions-chat"></div>
250252

251253
### @workspace
252254

@@ -311,28 +313,20 @@ Chat participants contributed via a GitHub App do not run on your local machine
311313
312314
## Slash commands
313315

314-
One of the tasks when answering questions is to determine the intent, understanding what you want to do. You can use natural language to describe your intent, but it can be ambiguous. To help with this, you can use *slash commands*. Chat participants can contribute slash commands, which are shortcuts to specific, commonly used functionality provided by that chat participant.
316+
Chat participants can provide shortcuts to specific functionality by using *slash commands*. These commands provide a concise and structured way to interact with chat participants and to give them instructions. You can reference slash commands in your chat prompt by typing the participant, followed by `/` and the command name.
315317

316-
For example, we can infer that "Create a new workspace with Node.js Express Pug TypeScript" means that you want a new project. Instead, you can also use "@workspace /new Node.js Express Pug TypeScript" is explicit, concise, and saves you time typing. In this case, the `/new` slash command is a shortcut to create a new workspace.
318+
For example, the `@workspace` participant has a slash command `/new` to scaffold a new workspace or a new file. Typing `@workspace /new Node.js Express Pug TypeScript` in the chat input field creates a new workspace with a Node.js Express Pug TypeScript project.
317319

318-
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.
319-
320-
Examples of built-in commands - type `@` or select the <i class="codicon codicon-mention"></i> icon.
320+
Some examples of built-in slash commands are:
321321

322322
* `/clear`: start a new chat session
323323
* `/help`: get help about using GitHub Copilot
324-
* `/doc`: generate code documentation (Inline Chat)
325324
* `@workspace /explain` (or `/explain`): explain how the selected code works
326325
* `@workspace /fix` (or `/fix`): propose a fix for the problems in the selected code
327-
* `@workspace /fixTestFailure` (preview): propose a fix for failing tests
328-
* `@workspace /setupTests`: configure a testing framework for your workspace
329-
* `@workspace /tests` (or `/tests`): generate unit tests for the selected code
330326
* `@workspace /new` (or `/new`): scaffold code for a new workspace or new file
331-
* `@workspace /newNotebook` (or `/newNotebook`): create a new Jupyter Notebook
332327
* `@vscode /runCommand`: search or run a VS Code command
333-
* `@vscode /search` (or `/search`): generate query parameters for the Search view
334-
* `@vscode /startDebugging` (experimental): generate `launch.json` file to set up debugging configuration and start debugging
335-
* `@terminal /explain`: explain terminal functionality or shell commands
328+
329+
To view the list of build-in participants and their commands, type `@` in the chat input field or select the <i class="codicon codicon-mention"></i> icon.
336330

337331
## Improve the performance of Copilot Chat
338332

docs/copilot/getting-started-chat.md

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Follow these steps to [set up GitHub Copilot in VS Code](/docs/copilot/setup.md)
2626

2727
Copilot Chat is a chat interface that lets you interact with GitHub Copilot, to ask and receive answers to coding-related questions. The chat interface provides access to coding information and support without requiring you to navigate documentation or search online forums.
2828

29-
In this tutorial, you'll be creating a simple Node.js web application. So, let's get started and ask Copilot to tell us more about web frameworks for Node.js.
29+
In this tutorial, you'll be creating a simple Node.js web application.
3030

3131
1. Open the Chat view from the Command Center chat menu or press `kb(workbench.action.chat.open)`.
3232

@@ -35,40 +35,6 @@ In this tutorial, you'll be creating a simple Node.js web application. So, let's
3535
> [!TIP]
3636
> You can access different Copilot features from the Command Center menu at any time.
3737
38-
1. In the chat input field, enter *give a list of nodejs web server frameworks*, and then press `kb(workbench.action.chat.submit)` to send the request to Copilot.
39-
40-
Copilot returns a list of web frameworks and with some additional information. So, you can search for coding information while you stay in VS Code.
41-
42-
Note that your results might be different from what is shown in the screenshots. AI models are non-deterministic, which means that they can return different responses when asked the same question. This might be due to additional learning and adaption over time, language variation, changes in context, such as your chat history, and more.
43-
44-
![Screenshot of VS Code, showing the Copilot Chat view, showing the chat response and a suggested follow-up question.](./images/getting-started-chat/copilot-chat-view-node-frameworks.png)
45-
46-
Notice that Copilot also suggests relevant follow-up questions, which you can select to directly submit directly to Copilot.
47-
48-
> [!TIP]
49-
> To get help about GitHub Copilot and how to interact with Copilot Chat, you can type `/help` in the chat input field.
50-
51-
1. Let's get more information about Express.js. Enter *how to get started with express* in the chat input field.
52-
53-
The response contains step-by-step instructions for setting up an Express.js app and might also include code blocks with shell commands or implementation code. Code blocks in the chat response support IntelliSense, which enables you get information about methods and symbols by hovering over them, or to go to their definition.
54-
55-
![Screenshot of VS Code Copilot Chat view, showing the chat response with code blocks in the response.](./images/getting-started-chat/copilot-chat-view-express-app.png)
56-
57-
When Copilot returns a code block, you can select the **Apply in Editor** button to let Copilot insert the code in the active editor for you at the appropriate location. Alternatively, you can also insert the code at the cursor position, or copy the code to the clipboard.
58-
59-
![Screenshot of VS Code Copilot Chat view, showing the context menu for code blocks.](./images/getting-started-chat/copilot-chat-view-code-block-actions.png)
60-
61-
When the chat response contains links to a file, you can drag and drop that file from the Chat view to the editor to open it.
62-
63-
> [!TIP]
64-
> Experiment with different questions and see how Copilot responds. For example, you can ask for only code samples ("give me 3 code samples to create an express app"), or ask how to add basic authentication to an Express app ("how to create an express app with basic auth"), and much more!
65-
66-
## Generate a new workspace
67-
68-
Even to create a simple Express.js application involves creating multiple files: a JavaScript file to set up the server, a `package.json`, HTML (template) files, and more. Rather than asking Copilot to generate each individual file, you can instruct it to create an entire workspace for you.
69-
70-
Let's ask Copilot to generate a workspace for an Express.js and Pug application.
71-
7238
1. Enter *@workspace /new express with typescript and pug* in the chat input field, and press `kb(workbench.action.chat.submit)` to send the request.
7339

7440
Notice how this chat prompt is structured to provide clear and concise instructions to Copilot. Let's break it down:
@@ -93,7 +59,7 @@ Congratulations! You've just created a workspace with Copilot Chat by using natu
9359

9460
## Use chat participants
9561

96-
Previously, you already used the `@workspace` chat participant to generate a new workspace, but you can also use it to ask questions about the actual code in the workspace.
62+
Previously, you used the `@workspace` chat participant to generate a new workspace, but you can also use it to ask questions about the actual code in the workspace.
9763

9864
Let's iterate on our generated Express app and add a new page to it.
9965

0 commit comments

Comments
 (0)