Skip to content

Commit 55b9ffc

Browse files
authored
Refactor chat docs (#8982)
* Refactor chat tools * Restructure content * Edit pass * Edit heading * Add chat modes article * Edit pass and why section * Rename file * Update title * Update structure and add customization * Restructure content * Add chat checkpoints article * Add article for reviewing changes * Add chat sessions article * Move images * Add chat debug view article * Add chat CLI options * Add private repositories * Update chat overview * Add prompt examples article * Add voice input * Update dateApproved * Move builtin chat modes to chat overview * Move chat faq * Update structure * Edit heading * Remove tips * Update section order * Move prompt engineering guide * Update links * Fix bookmarks * Remove dedicated articles for chat modes * Remove unused images * Clarify applyTo glob pattern * Edit pass
1 parent 6ed856e commit 55b9ffc

File tree

75 files changed

+1106
-1370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1106
-1370
lines changed

api/extension-guides/ai/mcp.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,16 @@ MetaDescription: A comprehensive guide for developers building MCP servers that
1111

1212
Model Context Protocol (MCP) is an open standard that enables AI models to interact with external tools and services through a unified interface. Visual Studio Code implements the full MCP specification, enabling you to create MCP servers that provide tools, prompts, and resources for extending the capabilities of AI agents in VS Code.
1313

14+
MCP servers provide one of three types of tools available in VS Code, alongside built-in tools and extension-contributed tools. Learn more about [tool types](/docs/copilot/chat/chat-tools.md#types-of-tools).
15+
1416
This guide covers everything you need to know to build MCP servers that work seamlessly with VS Code and other MCP clients.
1517

1618
> [!IMPORTANT]
1719
> MCP support in VS Code is currently in preview.
1820
21+
> [!TIP]
22+
> For information about using MCP servers as an end user, see [Use MCP servers in VS Code](/docs/copilot/customization/mcp-servers.md).
23+
1924
## Why use MCP servers?
2025

2126
Implementing an MCP server to extend chat in VS Code with language model tools has the following benefits:

api/extension-guides/ai/tools.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ MetaDescription: A guide to creating a language model tool and how to implement
1010
# Language Model Tool API
1111

1212
Language model tools enable you to extend the functionality of a large language model (LLM) in chat with domain-specific capabilities. To process a user's chat prompt, [agent mode](/docs/copilot/chat/chat-agent-mode) in VS Code can automatically invoke these tools to perform specialized tasks as part of the conversation.
13-
By contributing a language model tool in your VS Code extension, you can extend the agentic coding workflow while also providing deep integration with the editor.
13+
14+
By contributing a language model tool in your VS Code extension, you can extend the agentic coding workflow while also providing deep integration with the editor. Extension tools are one of three types of tools available in VS Code, alongside [built-in tools and MCP tools](/docs/copilot/chat/chat-tools.md#types-of-tools).
1415

1516
In this extension guide, you learn how to create a language model tool by using the Language Model Tools API and how to implement tool calling in a chat extension.
1617

1718
You can also extend the chat experience with specialized tools by contributing an [MCP server](/api/extension-guides/ai/mcp). See the [AI Extensibility Overview](/api/extension-guides/ai/ai-extensibility-overview) for details on the different options and how to decide which approach to use.
1819

20+
> [!TIP]
21+
> For information about using tools as an end user, see [Use tools in chat](/docs/copilot/chat/chat-tools.md).
22+
1923
## What is tool calling in an LLM?
2024

2125
A language model tool is a function that can be invoked as part of a language model request. For example, you might have a function that retrieves information from a database, performs some calculation, or calls an online API. When you contribute a tool in a VS Code extension, agent mode can then invoke the tool based on the context of the conversation.
@@ -32,7 +36,7 @@ Read more about [function calling](https://platform.openai.com/docs/guides/funct
3236

3337
Implementing a language model tool in your extension has several benefits:
3438

35-
- **Extend agent mode** with specialized, domain-specific, tools that are automatically invoked as part of responding to a user prompt. For example, enable database scaffolding and querying to dynamically provide the LLM with relevant context.
39+
- **Extend agent mode** with specialized, domain-specific tools that are automatically invoked as part of responding to a user prompt. For example, enable database scaffolding and querying to dynamically provide the LLM with relevant context.
3640
- **Deeply integrate with VS Code** by using the broad set of extension APIs. For example, use the [debug APIs](/api/extension-guides/debugger-extension) to get the current debugging context and use it as part of the tool's functionality.
3741
- **Distribute and deploy** tools via the Visual Studio Marketplace, providing a reliable and seamless experience for users. Users don't need a separate installation and update process for your tool.
3842

@@ -43,6 +47,8 @@ You might consider implementing a language model tool with an [MCP server](/api/
4347
- Your tool is hosted remotely as a service.
4448
- You don't need access to VS Code APIs.
4549

50+
Learn more about the [differences between tool types](/docs/copilot/chat/chat-tools.md#types-of-tools).
51+
4652
## Create a language model tool
4753

4854
Implementing a language model tool consists of two main parts:
@@ -67,7 +73,7 @@ The first step to define a language model tool in your extension is to define it
6773

6874
1. If the tool can be used in [agent mode](/docs/copilot/chat/chat-agent-mode) or referenced in a chat prompt with `#`, add the following properties:
6975

70-
Users can enable or disable the tool in the Chat view, similar to how this is done for [Model Context Protocol (MCP) tools](/docs/copilot/chat/mcp-servers).
76+
Users can enable or disable the tool in the Chat view, similar to how this is done for [Model Context Protocol (MCP) tools](/docs/copilot/chat/chat-tools.md#mcp-tools).
7177

7278
| Property | Description |
7379
| -------- | ----------- |

build/sitemap.xml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -356,32 +356,37 @@
356356
<priority>0.8</priority>
357357
</url>
358358
<url>
359-
<loc>https://code.visualstudio.com/docs/copilot/chat/chat-agent-mode</loc>
359+
<loc>https://code.visualstudio.com/docs/copilot/chat/chat-checkpoints</loc>
360360
<changefreq>weekly</changefreq>
361361
<priority>0.8</priority>
362362
</url>
363363
<url>
364-
<loc>https://code.visualstudio.com/docs/copilot/chat/chat-ask-mode</loc>
364+
<loc>https://code.visualstudio.com/docs/copilot/chat/chat-sessions</loc>
365365
<changefreq>weekly</changefreq>
366366
<priority>0.8</priority>
367367
</url>
368368
<url>
369-
<loc>https://code.visualstudio.com/docs/copilot/chat/copilot-chat-context</loc>
369+
<loc>https://code.visualstudio.com/docs/copilot/chat/chat-debug-view</loc>
370370
<changefreq>weekly</changefreq>
371371
<priority>0.8</priority>
372372
</url>
373373
<url>
374-
<loc>https://code.visualstudio.com/docs/copilot/chat/copilot-chat</loc>
374+
<loc>https://code.visualstudio.com/docs/copilot/chat/chat-tools</loc>
375+
<changefreq>weekly</changefreq>
376+
<priority>0.8</priority>
377+
</url>
378+
<url>
379+
<loc>https://code.visualstudio.com/docs/copilot/chat/review-code-edits</loc>
375380
<changefreq>weekly</changefreq>
376381
<priority>0.8</priority>
377382
</url>
378383
<url>
379-
<loc>https://code.visualstudio.com/docs/copilot/chat/copilot-edits</loc>
384+
<loc>https://code.visualstudio.com/docs/copilot/chat/copilot-chat-context</loc>
380385
<changefreq>weekly</changefreq>
381386
<priority>0.8</priority>
382387
</url>
383388
<url>
384-
<loc>https://code.visualstudio.com/docs/copilot/chat/getting-started-chat</loc>
389+
<loc>https://code.visualstudio.com/docs/copilot/chat/copilot-chat</loc>
385390
<changefreq>weekly</changefreq>
386391
<priority>0.8</priority>
387392
</url>
@@ -391,7 +396,12 @@
391396
<priority>0.8</priority>
392397
</url>
393398
<url>
394-
<loc>https://code.visualstudio.com/docs/copilot/chat/prompt-crafting</loc>
399+
<loc>https://code.visualstudio.com/docs/copilot/guides/prompt-engineering-guide</loc>
400+
<changefreq>weekly</changefreq>
401+
<priority>0.8</priority>
402+
</url>
403+
<url>
404+
<loc>https://code.visualstudio.com/docs/copilot/chat/prompt-examples</loc>
395405
<changefreq>weekly</changefreq>
396406
<priority>0.8</priority>
397407
</url>

docs/configure/command-line.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,30 @@ Argument|Description
9393

9494
![install extension](images/command-line/install-extension.png)
9595

96+
## Start chat from the command line
97+
98+
You can start a chat session directly from the command line by using the `chat` subcommand in the VS Code CLI. This enables you to open a chat session in your current working directory with a prompt you provide.
99+
100+
For example, the following command opens chat for the current directory and asks "Find and fix all untyped variables":
101+
102+
```bash
103+
code chat Find and fix all untyped variables
104+
```
105+
106+
The `chat` subcommand has the following command-line options:
107+
108+
* `-m`, `--mode <mode>`: The chat mode to use for the chat session. Available options: `ask`, `edit`, `agent`, or the identifier of a custom mode. Defaults to `agent`.
109+
* `-a`, `--add-file <path>`: Add files as context to the chat session.
110+
* `--maximize`: Maximize the chat session view.
111+
* `-r`, `--reuse-window`: Use the last active window for the chat session.
112+
* `-n`, `--new-window`: Open an empty window for the chat session.
113+
114+
The `chat` subcommand also supports piping input from `stdin` by passing `-` at the end of the command. For example:
115+
116+
```bash
117+
python app.py | code chat why does it fail -
118+
```
119+
96120
## Advanced CLI options
97121

98122
There are several CLI options that help with reproducing errors and advanced setup.

0 commit comments

Comments
 (0)