Skip to content

Commit 7af1677

Browse files
bamurtaughBrigit Murtaughntrogh
authored
Remote + AI (custom instructions, agent mode) (#8346)
* Add initial info across docs * Feedback * Phrasing * Update docs/copilot/chat/chat-agent-mode.md --------- Co-authored-by: Brigit Murtaugh <brmurtau@microsoft.com> Co-authored-by: Nick Trogh <1908215+ntrogh@users.noreply.github.com>
1 parent d9d65b9 commit 7af1677

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

docs/copilot/chat/chat-agent-mode.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ You can reset the tool confirmations by using the **Chat: Reset Tool Confirmatio
107107

108108
In case you want to auto-approve _all_ tools, you can now use the experimental `setting(chat.tools.autoApprove)` setting. This will automatically approve all tool invocations, and VS Code will not ask for confirmation when a language model wishes to run tools. Bear in mind that with this setting enabled, you will not have the opportunity to cancel potentially destructive actions a model wants to take.
109109

110+
As an enhanced boundary, you might choose to set `setting(chat.tools.autoApprove)` only when connected to a [remote environment](/docs/remote/remote-overview.md). You'll want to set this as a remote, rather than user-level, setting. Note that remote environments that are part of your local machine (like dev containers) or that have access to your credentials will still pose different levels of risk.
111+
110112
## Accept or discard edits
111113

112114
Copilot lists the files that were edited in the list of the changed files in the Chat view. Files with pending edits also have an indicator in the Explorer view and editor tabs.

docs/devcontainers/tips-and-tricks.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ You can use Docker with the Dev Containers extension in a few ways, including:
2222

2323
You can learn more in the [alternative Docker options doc](/remote/advancedcontainers/docker-options.md).
2424

25+
## Customize AI Chat Responses
26+
27+
[Custom instructions](/docs/copilot/copilot-customization.md) enable you to describe common guidelines or rules to get responses that match your specific coding practices and tech stack.
28+
29+
You can use custom instructions with dev containers to give Copilot more information about the type of dev container you're connected to (like what kind of languages or toolchains are installed). You can achieve this in a few ways:
30+
* Add `"github.copilot.chat.codeGeneration.instructions"` directly in your `devcontainer.json`
31+
* We publish dev container resources (like [images](https://github.com/devcontainers/images) and [Features](https://github.com/devcontainers/features)) to make the process of creating and connecting to dev containers even easier, and we now include custom instructions in these files.
32+
* [Here](https://github.com/devcontainers/features/blob/main/src/python/devcontainer-feature.json#L80) is an example of custom instructions in the Python Feature.
33+
* Use a `copilot-instructions.md` file just as you would locally
34+
2535
## Docker Desktop for Windows tips
2636

2737
[Docker Desktop](https://www.docker.com/products/docker-desktop) for Windows works well in most setups, but there are a few "gotchas" that can cause problems. Here are some tips on avoiding them:

docs/remote/troubleshooting.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ For tips and questions about [GitHub Codespaces](https://github.com/features/cod
1717

1818
SSH is powerful and flexible, but this also adds some setup complexity. This section includes some tips and tricks for getting the Remote - SSH extension up and running in different environments.
1919

20+
## Customize AI Chat Responses
21+
22+
[Custom instructions](/docs/copilot/copilot-customization.md) enable you to describe common guidelines or rules to get responses that match your specific coding practices and tech stack.
23+
24+
You can use custom instructions to give Copilot more information about the type of remote environment you're connected to (like what kind of languages or toolchains are installed). You can use a `copilot-instructions.md` file just as you would locally. There are [additional instruction configuration steps](/docs/devcontainers/tips-and-tricks.md#customize-ai-chat-responses) you can take when using a dev container too.
25+
2026
### Configuring the $EDITOR variable
2127

2228
For macOS / linux remote hosts, add this snippet to your shell configuration file (like `.bashrc` or `.zshrc`)

0 commit comments

Comments
 (0)