Skip to content

Commit 801cbeb

Browse files
committed
Added new featuers
1 parent 7dbba7a commit 801cbeb

25 files changed

Lines changed: 3036 additions & 223 deletions

Cargo.lock

Lines changed: 62 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ocmux-rs"
3-
version = "0.2.1"
3+
version = "0.3.0"
44
edition = "2024"
55
description = "A terminal multiplexer for managing OpenCode sessions"
66
license = "Apache-2.0"
@@ -28,6 +28,7 @@ serde_json = "1"
2828
libc = "0.2"
2929
pulldown-cmark = "0.12"
3030
syntect = { version = "5", default-features = false, features = ["default-fancy"] }
31+
nucleo = "0.5"
3132
thiserror = "2"
3233
tokio = { version = "1", features = ["macros", "rt-multi-thread", "sync", "time"] }
3334

README.md

Lines changed: 53 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -43,48 +43,74 @@ Run `ocmux` in your terminal. The sidebar lists active OpenCode sessions sorted
4343

4444
| Key | Action |
4545
|----------|---------------------------|
46-
| `j` | Move down |
47-
| `k` | Move up |
46+
| `j` / `Down` | Move down |
47+
| `k` / `Up` | Move up |
4848
| `Enter` | Attach to session |
4949
| `Tab` | Expand/collapse children |
5050
| `s` | Toggle sidebar collapse |
51+
| `Ctrl-h` | Hide/show sidebar panel |
5152
| `/` | Search and attach session |
5253
| `r` | Refresh active session |
5354
| `?` | Show help overlay |
54-
| `q` | Quit |
55+
| `q` | Quit (confirm with `y`) |
5556
| `Ctrl-4` | Toggle focus sidebar/main |
5657

5758
### Session actions
5859

59-
| Key | Action |
60-
|-----|---------------------------------|
61-
| `n` | Spawn new session |
62-
| `t` | Create git worktree + spawn |
63-
| `v` | Open read-only conversation view |
64-
| `f` | Show files modified by session |
65-
| `!` | Drop into shell in session directory |
66-
| `c` | Commit/push modified files |
60+
| Key | Action |
61+
|-----|---------------------------------------|
62+
| `n` | Spawn new session |
63+
| `t` | Create git worktree + spawn |
64+
| `v` | Open read-only conversation view |
65+
| `d` | Open diff view for session |
66+
| `f` | Show files modified by session |
67+
| `!` | Drop into shell in session directory |
68+
| `c` | Commit/push modified files |
6769
| `x` | Kill session (`y` confirm, `n`/`Esc` cancel) |
6870

6971
### Conversation view
7072

7173
Press `v` from the sidebar to open a read-only view of the session's conversation history. The view polls the opencode database and renders messages, markdown, syntax-highlighted code blocks, and tool call status.
7274

73-
| Key | Action |
74-
|----------|-----------------------|
75-
| `j` | Scroll down |
76-
| `k` | Scroll up |
77-
| `G` | Jump to end |
78-
| `g` | Jump to top |
79-
| `Ctrl-u` | Page up |
80-
| `Ctrl-d` | Page down |
81-
| `v` | Close conversation view |
82-
| `Esc` | Close conversation view |
75+
| Key | Action |
76+
|----------|---------------------------|
77+
| `j` / `Down` | Scroll down |
78+
| `k` / `Up` | Scroll up |
79+
| `G` | Jump to end |
80+
| `g` | Jump to top |
81+
| `Ctrl-u` | Page up |
82+
| `Ctrl-d` | Page down |
83+
| `/` | Search conversation |
84+
| `n` | Next search match |
85+
| `N` | Previous search match |
86+
| `q` / `v` / `Esc` | Close view |
87+
88+
Mouse scroll is supported in the conversation view. Search is incremental — type to filter and `Enter` to confirm.
89+
90+
### Diff view
91+
92+
Press `d` from the sidebar to open a read-only view of the session's git diff. The view shows both tracked and untracked changes, preferring the opencode serve API when available and falling back to `git diff` otherwise.
93+
94+
| Key | Action |
95+
|----------|---------------------------|
96+
| `j` / `Down` | Scroll down |
97+
| `k` / `Up` | Scroll up |
98+
| `G` | Jump to end |
99+
| `g` | Jump to top |
100+
| `Ctrl-u` | Page up |
101+
| `Ctrl-d` | Page down |
102+
| `/` | Search diff |
103+
| `n` | Next search match |
104+
| `N` | Previous search match |
105+
| `q` / `d` / `Esc` | Close view |
106+
107+
Mouse scroll is supported in the diff view. Search is incremental — type to filter and `Enter` to confirm.
83108

84109
## Advanced workflows
85110

86111
- **Inspect conversation output** — press `v` on any session (including child sessions) to watch the agent's progress in real-time without attaching to the PTY
87-
- **Inspect changed files** — press `f` to see which files a session has created or modified
112+
- **Inspect changed files** — press `d` to open a diff view of all changes made by a session (tracked and untracked)
113+
- **Inspect changed files (list)** — press `f` to see which files a session has created or modified
88114
- **Drop into a shell** — press `!` to open a shell in the selected session's working directory
89115
- **Commit session changes** — press `c` to review and commit/push all files modified by the session
90116
- **Search and attach** — press `/` to search across all opencode sessions and attach to one
@@ -105,16 +131,19 @@ Keybindings and sidebar width are configurable via `~/.config/ocmux/config.json`
105131
"worktree": "t",
106132
"quit": "q",
107133
"view": "v",
108-
"files": "f"
134+
"files": "f",
135+
"diff": "d"
109136
}
110137
}
111138
```
112139

113-
Keybinding values are single characters. Default `sidebar_width` is `30`. Only the keys listed above are configurable; other bindings (`Enter`, `Tab`, `/`, `s`, `r`, `!`, `c`, `Ctrl-4`, arrows) are fixed.
140+
Keybinding values are single characters. Default `sidebar_width` is `30`. Only the keys listed above are configurable; other bindings (`Enter`, `Tab`, `/`, `s`, `Ctrl-h`, `r`, `!`, `c`, `Ctrl-4`, arrows) are fixed.
114141

115142
## Notes
116143

117144
- `Ctrl-4` is the actual focus toggle binding (hold `Ctrl` and press `4`)
145+
- `s` collapses the sidebar to a narrow width; `Ctrl-h` hides it entirely for maximum terminal space
146+
- `q` prompts for confirmation before quitting (`y` confirm, `n`/`Esc` cancel)
118147
- Child sessions are expandable and selectable in the sidebar, but `Enter` attach is not yet supported for child rows — use `v` to view their conversation instead
119148
- `c` and `!` operate on top-level sessions only
120149
- `c` prompts for a commit message and then commits and pushes immediately

0 commit comments

Comments
 (0)