opencode-context-tree 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0 — 2026-09-03 — UI/UX pass from a four-lens review
4
+
5
+ Findings from reviewers with lazygit/tig, k9s/btop, Helix/fzf and agent-tooling PM backgrounds,
6
+ working from real screenshots.
7
+
8
+ - Context bands are relative to the model window (<25 / 60 / 85 %), with a `▓▓░░░` bar; the
9
+ gauge, tree header and sidebar card show one identical string.
10
+ - Thinking steps fold into their assistant row (`· 9.8s thought`) instead of being half the outline.
11
+ - From inside a branch, trunk rows past the fork point are dimmed under a
12
+ `── not in this branch's context ──` separator: they are not sent to the model.
13
+ - Decision records render as wrapped text (no raw `**`, no mid-word clipping).
14
+ - Per-panel footer and scoped keys: `b`/`m`/`u` no longer fire from the help, decisions or
15
+ consumers panels.
16
+ - `/` filters as you type with match highlighting, an honest zero-result state and a `4/17`
17
+ position; `n`/`N` step through matches.
18
+ - Confirmations: Discard is gated and Esc cancels it; `⏎` names what it will do for the selected
19
+ row and confirms session switches; the merge picker names the trunk with turn and token counts.
20
+ - Consumers show percent of the window, expand into their entries, and crop a tool result in
21
+ place; provider reasoning is labelled as not croppable.
22
+ - Header dedupes the branch title and truncates to fit; crop marks survive mode changes and crop
23
+ mode is exclusive.
24
+ - Keys aligned with vim: `u` undo (`x` kept), `s` consumers, `gg`/`G`, `ctrl+d`/`ctrl+u`,
25
+ `Tab` toggles a fold, `f` opens a filter picker (`F` reverses).
26
+ - Lanes are an event strip like DeepSeek Harness's, not a bar chart: one pill per event on a
27
+ shared axis (Input / Model / Tools), a gap between neighbours, width by duration in Duration
28
+ mode, categorical colours, red for a failed tool call, the selected step inverted, an empty
29
+ lane says so, and nothing is scaled by tokens (the row column already has them).
30
+
3
31
  ## 0.1.1 — 2026-09-03
4
32
 
5
33
  - Install with OpenCode's own `opencode plugin opencode-context-tree [-g]`, which registers
package/README.md CHANGED
@@ -58,7 +58,7 @@ is one content-forward row and branches are drawn at their fork points:
58
58
  │ │ ● user: the bun test is flaky, find the race ~0.4k
59
59
  │ │ ⚙ [bash $ bun test src/foo.test.ts] ⚠ ~4.7k
60
60
  │ ◆ Decision: try-redis · Outcome: switched to a write-through cache… ~0.9k
61
- └ ⏎ go b branch m merge c crop i inspector 1·2·3 lanes x undo ? help q back
61
+ └ ⏎ go b branch m merge c crop u undo s consumers ? help q back
62
62
  ```
63
63
 
64
64
  Every message and tool call is a row; the gutter draws each branch at the message it was forked
@@ -70,38 +70,35 @@ OpenCode's own `/fork` are adopted into the tree automatically.
70
70
 
71
71
  ## Screenshots
72
72
 
73
- Real OpenCode 1.18 TUI, gemma4 via ollama. `/tree` opens as a Pi-style outline of the whole
74
- session tree: one content-forward row per message and tool step (`● user:` / `○ assistant:` /
75
- `⚙ [bash $ …]`), branches drawn at their fork points with `│ ╰` connectors and folded to their
76
- `⎇` header until you open them. Here a trunk about caching a `/users` endpoint has a squashed
77
- `try-redis` branch (its ◆ decision record is the leaf), a rejected `try-lru`, and two native
78
- `/fork` sessions:
73
+ Real OpenCode 1.18 TUI, gemma4 via ollama. `/tree` is a Pi-style outline of the whole session
74
+ tree: one row per message or tool step, thinking folded into its assistant row, branches drawn at
75
+ their fork points and folded to their `⎇` header until opened, the context bar and band in the
76
+ header, and a footer that says what `⏎` will do for the selected row:
79
77
 
80
78
  ![tree from the trunk](docs/screenshots/tree-trunk.png)
81
79
 
82
- The DeepSeek-Harness trajectory is one keystroke away, not gone: `i` opens the inspector and
83
- `1/2/3` bring in the Input/Model/Tools lanes:
80
+ From inside a branch, `← here` marks your step and the trunk rows past the fork point are dimmed
81
+ under `── not in this branch's context ──`: they are not sent to the model.
84
82
 
85
- ![tree with the trajectory panels on](docs/screenshots/tree-trajectory.png)
83
+ ![tree from a branch](docs/screenshots/tree-from-a-branch.png)
86
84
 
87
- From inside a branch, `← here` marks your current step, that branch is expanded, and the rest of
88
- the tree stays visible and folded — you always see the whole tree:
85
+ `/` filters as you type, highlights matches and counts rows; `n`/`N` step through them:
89
86
 
90
- ![tree from a branch](docs/screenshots/tree-from-a-branch.png)
87
+ ![live search](docs/screenshots/search.png)
91
88
 
92
- `→` expands a branch inline (its turns continue the numbering from the fork point):
89
+ The DeepSeek-Harness trajectory is one keystroke away: `1/2/3` bring in the event-strip lanes
90
+ (one pill per event, width by duration, red for a failed tool call) and `i` the inspector:
93
91
 
94
- ![a branch expanded inline](docs/screenshots/tree-expanded.png)
92
+ ![tree with the trajectory lanes on](docs/screenshots/tree-trajectory.png)
95
93
 
96
- `D` decisions · `u` what's filling the context · `?` help · `m` merge · the sidebar card:
94
+ `s` shows what is filling the context, by share of the tree and of the model window, expandable
95
+ into entries you can crop in place; `D` renders the decision records; `?` opens the help pane:
97
96
 
98
97
  | | |
99
98
  |---|---|
100
- | ![decisions](docs/screenshots/decisions.png) | ![consumers](docs/screenshots/consumers.png) |
99
+ | ![consumers](docs/screenshots/consumers.png) | ![decisions](docs/screenshots/decisions.png) |
101
100
  | ![help](docs/screenshots/help.png) | ![merge picker](docs/screenshots/merge-picker.png) |
102
101
 
103
- ![sidebar card](docs/screenshots/sidebar-card.png)
104
-
105
102
  ## Try it from source
106
103
 
107
104
  ```sh
@@ -110,11 +107,12 @@ bun install && bun run build
110
107
  # tui.json → "plugin": ["/abs/path/opencode-tree/dist/tui.js"]
111
108
  ```
112
109
 
113
- The footer inside `/tree` carries six keys `⏎` go, `b` branch, `m` merge, `c` crop,
114
- `x` undo, `q` back and `?` opens a help overlay with the rest: crop mode (`space` mark,
115
- double for protected, `a` auto, `t` result⇄turn, `⏎` apply), `i` inspector, `u` consumers,
116
- `D` decisions (`E` export), `L` label, `←→` fold/unfold, `[ ]` hop branches, `f` filter,
117
- `/` search, `g/G`, and how to read the screen.
110
+ Keys inside `/tree` (vim-aligned): `j k` `ctrl+d ctrl+u` `gg G` move · `[ ]` hop between
111
+ branches · `h l` `Tab` fold/unfold · `⏎` go (the footer says what it will do for the selected row)
112
+ · `b` branch · `m` merge · `c` crop mode (`space` mark, `a` auto, `t` result⇄turn, `⏎` apply) ·
113
+ `u` undo (`x` too) · `/` live search, `n N` next/prev · `f` filter picker · `i` inspector ·
114
+ `1 2 3` lanes, `0` off · `s` what's filling the context · `D` decisions · `L` label · `y` copy ·
115
+ `?` help · `q`.
118
116
 
119
117
  ## Commands
120
118