-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[bot] Add /rewind timeline picker and update /allow-all subcommands documentation #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
983b913
75a88f7
58d6d7d
ee3d7c3
ee3a819
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -361,11 +361,11 @@ These commands work in interactive mode. **Start with just these six** - they co | |||||
|
|
||||||
| | Command | What It Does | When to Use | | ||||||
| |---------|--------------|-------------| | ||||||
| | `/help` | Show all available commands | When you forget a command | | ||||||
| | `/clear` | Clear conversation and start fresh | When switching topics | | ||||||
| | `/help` | Show all available commands | When you forget a command | | ||||||
| | `/model` | Show or switch AI model | When you want to change the AI model | | ||||||
| | `/plan` | Plan your work out before coding | For more complex features | | ||||||
| | `/research` | Deep research using GitHub and web sources | When you need to investigate a topic before coding | | ||||||
| | `/model` | Show or switch AI model | When you want to change the AI model | | ||||||
| | `/exit` | End the session | When you're done | | ||||||
|
|
||||||
| That's it for getting started! As you become comfortable, you can explore additional commands. | ||||||
|
|
@@ -381,20 +381,20 @@ That's it for getting started! As you become comfortable, you can explore additi | |||||
|
|
||||||
| | Command | What It Does | | ||||||
| |---------|--------------| | ||||||
| | `/init` | Initialize Copilot instructions for your repository | | ||||||
| | `/agent` | Browse and select from available agents | | ||||||
| | `/skills` | Manage skills for enhanced capabilities | | ||||||
| | `/init` | Initialize Copilot instructions for your repository | | ||||||
| | `/mcp` | Manage MCP server configuration | | ||||||
| | `/skills` | Manage skills for enhanced capabilities | | ||||||
|
|
||||||
| > 💡 Agents are covered in [Chapter 04](../04-agents-custom-instructions/README.md), skills are covered in [Chapter 05](../05-skills/README.md), and MCP servers are covered in [Chapter 06](../06-mcp-servers/README.md). | ||||||
|
|
||||||
| ### Models and Subagents | ||||||
|
|
||||||
| | Command | What It Does | | ||||||
| |---------|--------------| | ||||||
| | `/model` | Show or switch AI model | | ||||||
| | `/delegate` | Hand off task to Copilot coding agent on GitHub (agent in the cloud) | | ||||||
| | `/fleet` | Split a complex task into parallel subtasks for faster completion | | ||||||
| | `/model` | Show or switch AI model | | ||||||
| | `/tasks` | View background subagents and detached shell sessions | | ||||||
|
|
||||||
| ### Code | ||||||
|
|
@@ -403,40 +403,43 @@ That's it for getting started! As you become comfortable, you can explore additi | |||||
| |---------|--------------| | ||||||
| | `/diff` | Review the changes made in the current directory | | ||||||
| | `/pr` | Operate on pull requests for the current branch | | ||||||
| | `/review` | Run the code-review agent to analyze changes | | ||||||
| | `/research` | Run deep research investigation using GitHub and web sources | | ||||||
| | `/review` | Run the code-review agent to analyze changes | | ||||||
| | `/terminal-setup` | Enable multiline input support (shift+enter and ctrl+enter) | | ||||||
|
|
||||||
| ### Permissions | ||||||
|
|
||||||
| | Command | What It Does | | ||||||
| |---------|--------------| | ||||||
| | `/allow-all` | Auto-approve all permission prompts for this session | | ||||||
| | `/add-dir <directory>` | Add a directory to allowed list | | ||||||
| | `/list-dirs` | Show all allowed directories | | ||||||
| | `/allow-all [on\|off\|show]` | Auto-approve all permission prompts; use `on` to enable, `off` to disable, `show` to check current status | | ||||||
| | `/cwd`, `/cd [directory]` | View or change working directory | | ||||||
| | `/list-dirs` | Show all allowed directories | | ||||||
|
|
||||||
| > ⚠️ **Use with caution**: `/allow-all` skips confirmation prompts. Great for trusted projects, but be careful with untrusted code. | ||||||
|
|
||||||
| ### Session | ||||||
|
|
||||||
| | Command | What It Does | | ||||||
| |---------|--------------| | ||||||
| | `/resume` | Switch to a different session (optionally specify session ID) | | ||||||
| | `/rename` | Rename the current session | | ||||||
| | `/clear` | Abandons the current session (no history saved) and starts a fresh conversation | | ||||||
| | `/compact` | Summarize conversation to reduce context usage | | ||||||
| | `/context` | Show context window token usage and visualization | | ||||||
| | `/new` | Ends the current session (saving it to history for search/resume) and starts a fresh conversation. | | ||||||
|
||||||
| | `/new` | Ends the current session (saving it to history for search/resume) and starts a fresh conversation. | | |
| | `/new` | Ends the current session (saving it to history for search/resume) and starts a fresh conversation | |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -330,19 +330,27 @@ copilot | |||||
|
|
||||||
| ### Check and Manage Context | ||||||
|
|
||||||
| As you add files and conversation, Copilot CLI's [context window](../GLOSSARY.md#context-window) fills up. Two commands help you stay in control: | ||||||
| As you add files and conversation, Copilot CLI's [context window](../GLOSSARY.md#context-window) fills up. Several commands are available to help you stay in control: | ||||||
|
|
||||||
| ```bash | ||||||
| copilot | ||||||
|
|
||||||
| > /context | ||||||
| Context usage: 45,000 / 128,000 tokens (35%) | ||||||
| Context usage: 62k/200k tokens (31%) | ||||||
|
|
||||||
|
Comment on lines
338
to
340
|
||||||
| > /clear | ||||||
| # Wipes context and starts fresh. Use when switching topics | ||||||
| # Abandons the current session (no history saved) and starts a fresh conversation | ||||||
|
|
||||||
| > /new | ||||||
| # Ends the current session (saving it to history for search/resume) and starts a fresh conversation | ||||||
|
|
||||||
| > /rewind | ||||||
| # Opens a timeline picker allowing you to roll back to an earlier point in your conversation | ||||||
| ``` | ||||||
|
|
||||||
| > 💡 **When to use `/clear`**: If you've been reviewing `books.py` and want to switch to discussing `utils.py`, run `/clear` first. Otherwise stale context from the old topic may confuse responses. | ||||||
| > 💡 **When to use `/clear` or `/new`**: If you've been reviewing books.py and want to switch to discussing utils.py, run /new first (or /clear if you don't need the session history). Otherwise stale context from the old topic may confuse responses. | ||||||
|
||||||
| > 💡 **When to use `/clear` or `/new`**: If you've been reviewing books.py and want to switch to discussing utils.py, run /new first (or /clear if you don't need the session history). Otherwise stale context from the old topic may confuse responses. | |
| > 💡 **When to use `/clear` or `/new`**: If you've been reviewing `books.py` and want to switch to discussing `utils.py`, run `/new` first (or `/clear` if you don't need the session history). Otherwise stale context from the old topic may confuse responses. |
Copilot
AI
Mar 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Key Takeaways lists commands for managing context limits but omits /new, which is introduced earlier in this chapter as a primary way to start fresh (and is referenced in the Context Efficiency Tips table). Consider adding /new here or adjusting the wording so the summary matches the commands recommended above.
| 4. **Context windows** have limits: manage them with `/context`, `/clear`, `/rewind`, and `/compact` | |
| 4. **Context windows** have limits: manage them with `/context`, `/clear`, `/new`, `/rewind`, and `/compact` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/clearis described here as "Clear conversation and start fresh", but later in the same chapter it’s described more specifically as abandoning the session with no history saved. Consider aligning these descriptions (e.g., add the "no history saved" detail here, or simplify the later one) so beginners don’t get conflicting guidance about what/cleardoes.This issue also appears on line 425 of the same file.