Rename ResumeSessionPicker to StandaloneSessionPicker and add documentation

This commit is contained in:
Alexander Farber
2025-12-13 13:33:44 +01:00
parent 56a62bcb2a
commit 4504c7a0ac
6 changed files with 87 additions and 3 deletions

View File

@@ -93,6 +93,16 @@ Slash commands provide meta-level control over the CLI itself.
- **Usage:** `/restore [tool_call_id]`
- **Note:** Only available if the CLI is invoked with the `--checkpointing` option or configured via [settings](./configuration.md). See [Checkpointing documentation](../checkpointing.md) for more details.
- **`/resume`**
- **Description:** Resume a previous conversation session. Opens a session picker dialog to browse and select from saved sessions.
- **Usage:** `/resume`
- **Features:**
- Browse all saved sessions for the current project
- Filter sessions by git branch with the **B** key
- Sessions show first prompt, message count, and timestamp
- Navigate with arrow keys or **j/k**, select with **Enter**
- **Note:** For command-line session resumption, see `--resume` and `--continue` flags. For more details, see [Session Resume](../features/session-resume.md).
- **`/settings`**
- **Description:** Open the settings editor to view and modify Qwen Code settings.
- **Details:** This command provides a user-friendly interface for changing settings that control the behavior and appearance of Qwen Code. It is equivalent to manually editing the `.qwen/settings.json` file, but with validation and guidance to prevent errors.

View File

@@ -0,0 +1,74 @@
# Session Resume
Qwen Code automatically saves your conversation history, allowing you to resume previous sessions at any time.
## Overview
Sessions are saved automatically as you work. You can resume them either from the command line when starting Qwen Code, or from within an active session using the `/resume` command.
## How Sessions Are Stored
Sessions are stored as JSONL files (one JSON record per line) at:
```
~/.qwen/tmp/<project_hash>/chats/<sessionId>.jsonl
```
Each session captures:
- User messages and assistant responses
- Tool calls and their results
- Metadata: timestamps, git branch, working directory, model used
## Resuming Sessions
### From the Command Line
**Resume most recent session:**
```bash
qwen --continue
```
**Show session picker:**
```bash
qwen --resume
```
**Resume specific session by ID:**
```bash
qwen --resume <sessionId>
```
### From Within the App
Use the `/resume` slash command to open a session picker dialog:
```
/resume
```
### Session Picker Controls
- **Arrow keys** or **j/k**: Navigate between sessions
- **Enter**: Select and resume the highlighted session
- **B**: Toggle branch filter (show only sessions from current git branch)
- **Escape**: Cancel and return to current session
## Session List Display
Each session shows:
- First prompt text (truncated if long)
- Number of messages
- Last modified timestamp
- Git branch name (if available)
Sessions are sorted by last modified time, with most recent first.
## Related Features
- [Welcome Back](./welcome-back.md) - Automatic session context restoration
- [/summary command](../cli/commands.md) - Generate project summaries for future reference