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 +28 -0
- package/README.md +22 -24
- package/dist/tui.js +1294 -489
- package/docs/USAGE.md +40 -21
- package/package.json +1 -1
- package/src/core/actions.ts +1 -0
- package/src/core/consumers.ts +55 -13
- package/src/core/decision.ts +62 -0
- package/src/core/lanes.ts +166 -5
- package/src/core/navigation.ts +39 -10
- package/src/core/tokens.ts +22 -4
- package/src/core/tree.ts +98 -5
- package/src/tui/actions.ts +131 -11
- package/src/tui/index.tsx +14 -6
- package/src/tui/route.tsx +544 -180
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
|
|
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`
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|

|
|
81
79
|
|
|
82
|
-
|
|
83
|
-
|
|
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
|
-

|
|
86
84
|
|
|
87
|
-
|
|
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
|
-

|
|
91
88
|
|
|
92
|
-
|
|
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
|
-

|
|
95
93
|
|
|
96
|
-
`
|
|
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
|
-
|  |  |
|
|
101
100
|
|  |  |
|
|
102
101
|
|
|
103
|
-

|
|
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
|
-
|
|
114
|
-
`
|
|
115
|
-
|
|
116
|
-
`
|
|
117
|
-
|
|
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
|
|