Skip to content

Commit d69fb2a

Browse files
committed
docs: define resume picker behavior
1 parent 442c62f commit d69fb2a

3 files changed

Lines changed: 42 additions & 3 deletions

File tree

docs/RESUME_BEHAVIOR.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# `/resume` behavior
2+
3+
`/resume`, `/session`, and `/sessions` open the interactive session picker. They are local UI commands and must not be sent as chat prompts.
4+
5+
## Default action
6+
7+
- `Enter` resumes the highlighted session in the current terminal.
8+
- `Ctrl+Enter` opens the highlighted session in a new terminal.
9+
- `Esc`, `q`, or `Ctrl+C` closes the picker without changing sessions.
10+
11+
The default is controlled by:
12+
13+
```toml
14+
[keybindings]
15+
session_picker_enter = "current-terminal"
16+
```
17+
18+
Set `session_picker_enter = "new-terminal"` to swap `Enter` and `Ctrl+Enter`.
19+
20+
## Current-terminal resume
21+
22+
When resuming in the current terminal:
23+
24+
- Jcode sessions switch the current workspace/client to that session.
25+
- Importable external sessions are first converted to a Jcode session, then resumed in place.
26+
- If multiple sessions are selected, only the first selected target is resumed in place and the UI tells the user this.
27+
- The picker closes after queueing the in-place resume.
28+
29+
## New-terminal resume
30+
31+
When opening in a new terminal:
32+
33+
- Each selected target opens in its own terminal when possible.
34+
- If terminal launch is unavailable, the UI prints manual `jcode --resume <id>` commands.
35+
- The picker remains open after launching and clears the current multi-selection so more sessions can be opened.
36+
37+
## Saved sessions
38+
39+
`/save [label]` bookmarks the current session so it appears in the saved section of the picker. `/unsave` removes that bookmark.

src/config/default_file.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ workspace_down = "alt+j"
5656
workspace_up = "alt+k"
5757
workspace_right = "alt+l"
5858
59-
# /resume picker behavior. Options: "current-terminal" or "new-terminal".
60-
# Ctrl+Enter performs the alternate action.
59+
# /resume picker Enter behavior. Options: "current-terminal" or "new-terminal".
60+
# By default Enter resumes in this terminal; Ctrl+Enter performs the alternate action.
6161
session_picker_enter = "current-terminal"
6262
6363
[dictation]

src/tui/app/input_help.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl App {
125125
"`/split`\nSplit the current session into a new window. Clones the full conversation history so both sessions continue from the same point."
126126
}
127127
"resume" | "sessions" => {
128-
"`/resume`\nOpen the interactive session picker. Browse and search all sessions, preview conversation history, and open any session in a new terminal window.\n\nPress `Esc` to return to your current session."
128+
"`/resume`\nOpen the interactive session picker. Browse and search all sessions, preview conversation history, and resume the highlighted session. By default, `Enter` resumes in the current terminal and `Ctrl+Enter` opens a new terminal; `keybindings.session_picker_enter` can swap those actions.\n\nPress `Esc` to return to your current session."
129129
}
130130
"info" => "`/info`\nShow session metadata and token usage.",
131131
"context" => {

0 commit comments

Comments
 (0)