Skip to content

Commit 0542140

Browse files
authored
Copilot CLI December Updates (#59158)
1 parent a67296e commit 0542140

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

content/copilot/concepts/agents/about-copilot-cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ You can customize {% data variables.copilot.copilot_cli %} in a number of ways:
148148

149149
* **Custom instructions**: Custom instructions allow you to give {% data variables.product.prodname_copilot_short %} additional context on your project and how to build, test and validate its changes. For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/use-copilot-cli#use-custom-instructions).
150150
* **Model Context Protocol (MCP) servers**: MCP servers allow you to give {% data variables.product.prodname_copilot_short %} access to different data sources and tools. For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/use-copilot-cli#add-an-mcp-server).
151-
* **{% data variables.copilot.custom_agents_caps_short %}**: {% data variables.copilot.custom_agents_caps_short %} allow you to create different specialized versions of {% data variables.product.prodname_copilot_short %} for different tasks. For example, you could customize {% data variables.product.prodname_copilot_short %} to be an expert frontend engineer following your team's guidelines. For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/use-copilot-cli#use-custom-agents).
151+
* **{% data variables.copilot.custom_agents_caps_short %}**: {% data variables.copilot.custom_agents_caps_short %} allow you to create different specialized versions of {% data variables.product.prodname_copilot_short %} for different tasks. For example, you could customize {% data variables.product.prodname_copilot_short %} to be an expert frontend engineer following your team's guidelines. {% data variables.copilot.copilot_cli %} includes specialized {% data variables.copilot.custom_agents_short %} that it automatically delegates common tasks to. For more information, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/use-copilot-cli#use-custom-agents).
152152
* **Skills**: Skills allow you to enhance the ability of {% data variables.product.prodname_copilot_short %} to perform specialized tasks with instructions, scripts, and resources. For more information, see [AUTOTITLE](/copilot/concepts/agents/about-agent-skills).
153153

154154
## Security considerations

content/copilot/how-tos/use-copilot-agents/use-copilot-cli.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ You can delegate a task using the slash command, followed by a prompt:
162162

163163
### Resume an interactive session
164164

165-
You can return to a previous interactive session, and continue your conversation with {% data variables.product.prodname_copilot_short %}, by using the `--resume` command line option, then choosing the session you want to resume from the list that's displayed. You can quickly resume the most recently closed session by using the `--continue` command line option.
165+
You can use the `--resume` command line option to cycle through and resume local and remote interactive sessions, allowing you to pick up right where you left off with your existing context. You can kick off a {% data variables.copilot.copilot_coding_agent %} session on {% data variables.product.github %}, and then use {% data variables.copilot.copilot_cli %} to bring that session to your local environment.
166+
167+
You can quickly resume the most recently closed local session by using the `--continue` command line option.
166168

167169
### Use custom instructions
168170

@@ -176,11 +178,20 @@ You can enhance {% data variables.product.prodname_copilot_short %}’s performa
176178

177179
For more information, see [AUTOTITLE](/copilot/how-tos/configure-custom-instructions/add-repository-instructions).
178180

179-
### Use custom agents
181+
### Use {% data variables.copilot.custom_agents_short %}
180182

181183
{% data variables.copilot.custom_agents_caps_short %} are specialized versions of {% data variables.copilot.copilot_coding_agent %} that you can tailor to your unique workflows, coding conventions, and use cases. {% data variables.copilot.custom_agents_caps_short %} are defined using Markdown files, called {% data variables.copilot.agent_profiles %}, that specify prompts, tools, and MCP servers.
182184

183-
{% data variables.copilot.copilot_cli_short %} supports loading {% data variables.copilot.custom_agents_short %} from the following locations:
185+
{% data variables.copilot.copilot_cli %} includes a default group of {% data variables.copilot.custom_agents_short %} for common tasks:
186+
187+
| Agent | Description |
188+
| --- | --- |
189+
| Explore | Performs quick codebase analysis, allowing you to ask questions about your code without adding to your main context. |
190+
| Task | Executes commands such as tests and builds, providing brief summaries on success and full output on failure. |
191+
| Plan | Analyzes dependencies and structure to create implementation plans, helping you to understand how to approach a complex feature or refactoring task before making changes. |
192+
| Code-review | Reviews changes with a focus on surfacing only genuine issues, minimizing noise. |
193+
194+
When creating your own {% data variables.copilot.custom_agents_short %}, {% data variables.copilot.copilot_cli_short %} supports loading {% data variables.copilot.custom_agents_short %} from the following locations:
184195

185196
| Type | Location | Scope |
186197
| --- | --- | --- |
@@ -237,9 +248,20 @@ To extend the functionality available to you in {% data variables.copilot.copilo
237248

238249
Details of your configured MCP servers are stored in the `mcp-config.json` file, which is located, by default, in the `~/.copilot` directory. This location can be changed by setting the `XDG_CONFIG_HOME` environment variable. For information about the JSON structure of a server definition, see [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/extend-coding-agent-with-mcp#writing-a-json-configuration-for-mcp-servers).
239250

240-
### View context and usage statistics for the current session
251+
### Context management
252+
253+
{% data variables.copilot.copilot_cli_short %} provides several slash commands to help you monitor and manage your context window:
254+
255+
* `/usage`: Lets you view your session statistics, including:
256+
* The amount of premium requests used in the current session
257+
* The session duration
258+
* The total lines of code edited
259+
* A breakdown of token usage per model
260+
261+
* `/context`: Provides a visual overview of your current token usage
262+
* `/compact`: Manually compresses your conversation history to free up context space
241263

242-
You can use the `/usage` slash command to view how many premium requests you've used in the current session, the duration of the session, how many lines of code have been edited, and the breakdown of token usage per model. When you have less than 20% of a model's token limit remaining, {% data variables.copilot.copilot_cli_short %} will display a warning that the context will be truncated when the token limit is reached.
264+
{% data variables.copilot.copilot_cli %} automatically compresses your history when approaching 95% of the token limit. When you have less than 20% of a model's token limit remaining, a warning will be displayed indicating the context will be truncated when the limit is reached.
243265

244266
## Find out more
245267

0 commit comments

Comments
 (0)