Skip to content

Commit f60156c

Browse files
authored
Merge pull request #24 from github/docs/recover-pr22-updates
docs: recover PR #22 updates (rewind, allow-all, rename)
2 parents f594477 + a71d799 commit f60156c

File tree

2 files changed

+31
-19
lines changed

2 files changed

+31
-19
lines changed

01-setup-and-first-steps/README.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,11 @@ These commands work in interactive mode. **Start with just these six** - they co
361361

362362
| Command | What It Does | When to Use |
363363
|---------|--------------|-------------|
364-
| `/help` | Show all available commands | When you forget a command |
365364
| `/clear` | Clear conversation and start fresh | When switching topics |
365+
| `/help` | Show all available commands | When you forget a command |
366+
| `/model` | Show or switch AI model | When you want to change the AI model |
366367
| `/plan` | Plan your work out before coding | For more complex features |
367368
| `/research` | Deep research using GitHub and web sources | When you need to investigate a topic before coding |
368-
| `/model` | Show or switch AI model | When you want to change the AI model |
369369
| `/exit` | End the session | When you're done |
370370

371371
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
381381

382382
| Command | What It Does |
383383
|---------|--------------|
384-
| `/init` | Initialize Copilot instructions for your repository |
385384
| `/agent` | Browse and select from available agents |
386-
| `/skills` | Manage skills for enhanced capabilities |
385+
| `/init` | Initialize Copilot instructions for your repository |
387386
| `/mcp` | Manage MCP server configuration |
387+
| `/skills` | Manage skills for enhanced capabilities |
388388

389389
> 💡 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).
390390
391391
### Models and Subagents
392392

393393
| Command | What It Does |
394394
|---------|--------------|
395-
| `/model` | Show or switch AI model |
396395
| `/delegate` | Hand off task to Copilot coding agent on GitHub (agent in the cloud) |
397396
| `/fleet` | Split a complex task into parallel subtasks for faster completion |
397+
| `/model` | Show or switch AI model |
398398
| `/tasks` | View background subagents and detached shell sessions |
399399

400400
### Code
@@ -403,40 +403,43 @@ That's it for getting started! As you become comfortable, you can explore additi
403403
|---------|--------------|
404404
| `/diff` | Review the changes made in the current directory |
405405
| `/pr` | Operate on pull requests for the current branch |
406-
| `/review` | Run the code-review agent to analyze changes |
407406
| `/research` | Run deep research investigation using GitHub and web sources |
407+
| `/review` | Run the code-review agent to analyze changes |
408408
| `/terminal-setup` | Enable multiline input support (shift+enter and ctrl+enter) |
409409

410410
### Permissions
411411

412412
| Command | What It Does |
413413
|---------|--------------|
414-
| `/allow-all` | Auto-approve all permission prompts for this session |
415414
| `/add-dir <directory>` | Add a directory to allowed list |
416-
| `/list-dirs` | Show all allowed directories |
415+
| `/allow-all [on|off|show]` | Auto-approve all permission prompts; use `on` to enable, `off` to disable, `show` to check current status |
417416
| `/cwd`, `/cd [directory]` | View or change working directory |
417+
| `/list-dirs` | Show all allowed directories |
418418

419419
> ⚠️ **Use with caution**: `/allow-all` skips confirmation prompts. Great for trusted projects, but be careful with untrusted code.
420420
421421
### Session
422422

423423
| Command | What It Does |
424424
|---------|--------------|
425-
| `/resume` | Switch to a different session (optionally specify session ID) |
426-
| `/rename` | Rename the current session |
425+
| `/clear` | Abandons the current session (no history saved) and starts a fresh conversation |
426+
| `/compact` | Summarize conversation to reduce context usage |
427427
| `/context` | Show context window token usage and visualization |
428+
| `/new` | Ends the current session (saving it to history for search/resume) and starts a fresh conversation. |
429+
| `/resume` | Switch to a different session (optionally specify session ID) |
430+
| `/rename` | Rename the current session (omit the name to auto-generate one) |
431+
| `/rewind` | Open a timeline picker to roll back to any earlier point in the conversation |
428432
| `/usage` | Display session usage metrics and statistics |
429433
| `/session` | Show session info and workspace summary |
430-
| `/compact` | Summarize conversation to reduce context usage |
431434
| `/share` | Export session as markdown file or GitHub gist |
432435

433436
### Help and Feedback
434437

435438
| Command | What It Does |
436439
|---------|--------------|
437-
| `/help` | Show all available commands |
438440
| `/changelog` | Display changelog for CLI versions |
439441
| `/feedback` | Submit feedback to GitHub |
442+
| `/help` | Show all available commands |
440443
| `/theme` | View or set terminal theme |
441444

442445
### Quick Shell Commands

02-context-conversations/README.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -330,19 +330,27 @@ copilot
330330
331331
### Check and Manage Context
332332
333-
As you add files and conversation, Copilot CLI's [context window](../GLOSSARY.md#context-window) fills up. Two commands help you stay in control:
333+
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:
334334
335335
```bash
336336
copilot
337337
338338
> /context
339-
Context usage: 45,000 / 128,000 tokens (35%)
339+
Context usage: 62k/200k tokens (31%)
340340
341341
> /clear
342-
# Wipes context and starts fresh. Use when switching topics
342+
# Abandons the current session (no history saved) and starts a fresh conversation
343+
344+
> /new
345+
# Ends the current session (saving it to history for search/resume) and starts a fresh conversation
346+
347+
> /rewind
348+
# Opens a timeline picker allowing you to roll back to an earlier point in your conversation
343349
```
344350
345-
> 💡 **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.
351+
> 💡 **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.
352+
353+
> 💡 **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.
346354
347355
---
348356
@@ -559,15 +567,16 @@ copilot
559567
| Situation | Action | Why |
560568
|-----------|--------|-----|
561569
| Starting new topic | `/clear` | Removes irrelevant context |
570+
| Went down wrong path | `/rewind` | Roll back to any earlier point |
562571
| Long conversation | `/compact` | Summarizes history, frees tokens |
563572
| Need specific file | `@file.py` not `@folder/` | Loads only what you need |
564-
| Hitting limits | Start new session | Fresh 128K context |
573+
| Hitting limits | `/new` or `/clear` | Fresh context |
565574
| Multiple topics | Use `/rename` per topic | Easy to resume right session |
566575
567576
#### Best Practices for Large Codebases
568577
569578
1. **Be specific**: `@samples/book-app-project/books.py` instead of `@samples/book-app-project/`
570-
2. **Clear between topics**: Use `/clear` when switching focus
579+
2. **Clear context between topics**: Use `/new` or `/clear` when switching focus
571580
3. **Use `/compact`**: Summarize conversation to free up context
572581
4. **Use multiple sessions**: One session per feature or topic
573582
@@ -846,7 +855,7 @@ copilot --add-dir /path/to/directory
846855
1. **`@` syntax** gives Copilot CLI context about files, directories, and images
847856
2. **Multi-turn conversations** build on each other as context accumulates
848857
3. **Sessions auto-save**: use `--continue` or `--resume` to pick up where you left off
849-
4. **Context windows** have limits: manage them with `/context`, `/clear`, and `/compact`
858+
4. **Context windows** have limits: manage them with `/clear`, `/compact`, `/context`, `/new`, and `/rewind`
850859
5. **Permission flags** (`--add-dir`, `--allow-all`) control multi-directory access. Use them wisely!
851860
6. **Image references** (`@screenshot.png`) help debug UI issues visually
852861

0 commit comments

Comments
 (0)