From 983b9136f3c38183d0450a73c3e387e30f20dae4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 16:57:01 +0000 Subject: [PATCH 1/5] docs: add /rewind timeline picker and update /allow-all subcommands - Add /rewind command to Chapter 01 Session commands reference table - Update /rename description to mention auto-generate option (no argument) - Update /allow-all to document on/off/show subcommands (v1.0.12) - Add /rewind to Chapter 02 context management section with explanation - Add /rewind to Context Efficiency Tips table in Chapter 02 - Update Chapter 02 Key Takeaways to include /rewind Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- 01-setup-and-first-steps/README.md | 5 +++-- 02-context-conversations/README.md | 10 ++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/01-setup-and-first-steps/README.md b/01-setup-and-first-steps/README.md index 628f674..c15e5c2 100644 --- a/01-setup-and-first-steps/README.md +++ b/01-setup-and-first-steps/README.md @@ -411,7 +411,7 @@ That's it for getting started! As you become comfortable, you can explore additi | Command | What It Does | |---------|--------------| -| `/allow-all` | Auto-approve all permission prompts for this session | +| `/allow-all [on\|off\|show]` | Auto-approve all permission prompts; use `on` to enable, `off` to disable, `show` to check current status | | `/add-dir ` | Add a directory to allowed list | | `/list-dirs` | Show all allowed directories | | `/cwd`, `/cd [directory]` | View or change working directory | @@ -423,7 +423,8 @@ That's it for getting started! As you become comfortable, you can explore additi | Command | What It Does | |---------|--------------| | `/resume` | Switch to a different session (optionally specify session ID) | -| `/rename` | Rename the current session | +| `/rename` | Rename the current session (omit the name to auto-generate one) | +| `/rewind` | Open a timeline picker to roll back to any earlier point in the conversation | | `/context` | Show context window token usage and visualization | | `/usage` | Display session usage metrics and statistics | | `/session` | Show session info and workspace summary | diff --git a/02-context-conversations/README.md b/02-context-conversations/README.md index 8aa5023..7445dc4 100644 --- a/02-context-conversations/README.md +++ b/02-context-conversations/README.md @@ -330,7 +330,7 @@ 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. Three commands help you stay in control: ```bash copilot @@ -340,10 +340,15 @@ Context usage: 45,000 / 128,000 tokens (35%) > /clear # Wipes context and starts fresh. Use when switching topics + +> /rewind +# Opens a timeline picker — roll back to any 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. +> 💡 **Made a mistake or want to try a different approach?** Use `/rewind` (or press Esc twice) to open a **timeline picker** that lets you roll back to any earlier point in your conversation — not just the most recent one. This is handy when you went down the wrong path and want to backtrack without starting over entirely. + --- ### Pick Up Where You Left Off @@ -559,6 +564,7 @@ copilot | Situation | Action | Why | |-----------|--------|-----| | Starting new topic | `/clear` | Removes irrelevant context | +| Went down wrong path | `/rewind` | Roll back to any earlier point | | Long conversation | `/compact` | Summarizes history, frees tokens | | Need specific file | `@file.py` not `@folder/` | Loads only what you need | | Hitting limits | Start new session | Fresh 128K context | @@ -846,7 +852,7 @@ copilot --add-dir /path/to/directory 1. **`@` syntax** gives Copilot CLI context about files, directories, and images 2. **Multi-turn conversations** build on each other as context accumulates 3. **Sessions auto-save**: use `--continue` or `--resume` to pick up where you left off -4. **Context windows** have limits: manage them with `/context`, `/clear`, and `/compact` +4. **Context windows** have limits: manage them with `/context`, `/clear`, `/rewind`, and `/compact` 5. **Permission flags** (`--add-dir`, `--allow-all`) control multi-directory access. Use them wisely! 6. **Image references** (`@screenshot.png`) help debug UI issues visually From 75a88f707e523d258898b1bbfb9a497c9d3289b8 Mon Sep 17 00:00:00 2001 From: Dan Wahlin Date: Tue, 31 Mar 2026 10:10:27 -0700 Subject: [PATCH 2/5] Update README for context management commands --- 02-context-conversations/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/02-context-conversations/README.md b/02-context-conversations/README.md index 7445dc4..1d2ebc5 100644 --- a/02-context-conversations/README.md +++ b/02-context-conversations/README.md @@ -330,7 +330,7 @@ copilot ### Check and Manage Context -As you add files and conversation, Copilot CLI's [context window](../GLOSSARY.md#context-window) fills up. Three 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 From 58d6d7d2a5e1106124ac18dbbf484b113150ea0d Mon Sep 17 00:00:00 2001 From: Dan Wahlin Date: Tue, 31 Mar 2026 10:28:25 -0700 Subject: [PATCH 3/5] Update README with command descriptions and fixes --- 01-setup-and-first-steps/README.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/01-setup-and-first-steps/README.md b/01-setup-and-first-steps/README.md index c15e5c2..c3c47d0 100644 --- a/01-setup-and-first-steps/README.md +++ b/01-setup-and-first-steps/README.md @@ -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,10 +381,10 @@ 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). @@ -392,9 +392,9 @@ That's it for getting started! As you become comfortable, you can explore additi | 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,18 +403,18 @@ 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 [on\|off\|show]` | Auto-approve all permission prompts; use `on` to enable, `off` to disable, `show` to check current status | | `/add-dir ` | 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. @@ -422,22 +422,24 @@ That's it for getting started! As you become comfortable, you can explore additi | Command | What It Does | |---------|--------------| +| `/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. | | `/resume` | Switch to a different session (optionally specify session ID) | | `/rename` | Rename the current session (omit the name to auto-generate one) | | `/rewind` | Open a timeline picker to roll back to any earlier point in the conversation | -| `/context` | Show context window token usage and visualization | | `/usage` | Display session usage metrics and statistics | | `/session` | Show session info and workspace summary | -| `/compact` | Summarize conversation to reduce context usage | | `/share` | Export session as markdown file or GitHub gist | ### Help and Feedback | Command | What It Does | |---------|--------------| -| `/help` | Show all available commands | | `/changelog` | Display changelog for CLI versions | | `/feedback` | Submit feedback to GitHub | +| `/help` | Show all available commands | | `/theme` | View or set terminal theme | ### Quick Shell Commands From ee3d7c365406dfb4ad601891cce0ec0159ed4705 Mon Sep 17 00:00:00 2001 From: Dan Wahlin Date: Tue, 31 Mar 2026 11:31:52 -0700 Subject: [PATCH 4/5] Refine README context command explanations Updated context usage descriptions and usage instructions for commands. --- 02-context-conversations/README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/02-context-conversations/README.md b/02-context-conversations/README.md index 1d2ebc5..c658b44 100644 --- a/02-context-conversations/README.md +++ b/02-context-conversations/README.md @@ -336,18 +336,21 @@ As you add files and conversation, Copilot CLI's [context window](../GLOSSARY.md copilot > /context -Context usage: 45,000 / 128,000 tokens (35%) +Context usage: 62k/200k tokens (31%) > /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 — roll back to any earlier point in your conversation +# 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. -> 💡 **Made a mistake or want to try a different approach?** Use `/rewind` (or press Esc twice) to open a **timeline picker** that lets you roll back to any earlier point in your conversation — not just the most recent one. This is handy when you went down the wrong path and want to backtrack without starting over entirely. +> 💡 **Made a mistake or want to try a different approach?** Use `/rewind` (or press Esc twice) to open a **timeline picker** that lets you roll back to any earlier point in your conversation, not just the most recent one. This is useful when you went down the wrong path and want to backtrack without starting over entirely. --- From ee3a81928e4d16a55497888f4e905437e5b511af Mon Sep 17 00:00:00 2001 From: Dan Wahlin Date: Tue, 31 Mar 2026 11:37:54 -0700 Subject: [PATCH 5/5] Update commands for managing conversation context --- 02-context-conversations/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/02-context-conversations/README.md b/02-context-conversations/README.md index c658b44..bcb30b1 100644 --- a/02-context-conversations/README.md +++ b/02-context-conversations/README.md @@ -570,13 +570,13 @@ copilot | Went down wrong path | `/rewind` | Roll back to any earlier point | | Long conversation | `/compact` | Summarizes history, frees tokens | | Need specific file | `@file.py` not `@folder/` | Loads only what you need | -| Hitting limits | Start new session | Fresh 128K context | +| Hitting limits | `/new` or `/clear` | Fresh context | | Multiple topics | Use `/rename` per topic | Easy to resume right session | #### Best Practices for Large Codebases 1. **Be specific**: `@samples/book-app-project/books.py` instead of `@samples/book-app-project/` -2. **Clear between topics**: Use `/clear` when switching focus +2. **Clear context between topics**: Use `/new` or `/clear` when switching focus 3. **Use `/compact`**: Summarize conversation to free up context 4. **Use multiple sessions**: One session per feature or topic