opencode-extended-sidebar 0.2.90 → 0.2.91
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/.oesignore +17 -17
- package/CHANGELOG.md +96 -95
- package/LICENSE +21 -21
- package/README.md +150 -235
- package/oes.json +13 -11
- package/package.json +100 -100
- package/scripts/install-git-hooks.mjs +29 -29
- package/src/pware.oc.core/constants/index.ts +18 -18
- package/src/pware.oc.core/constants/pware.oc.core.constants.eventKind.ts +29 -29
- package/src/pware.oc.core/constants/pware.oc.core.constants.eventName.ts +15 -13
- package/src/pware.oc.core/constants/pware.oc.core.constants.eventType.ts +241 -241
- package/src/pware.oc.core/constants/pware.oc.core.constants.myWork.ts +55 -55
- package/src/pware.oc.core/constants/pware.oc.core.constants.partType.ts +65 -65
- package/src/pware.oc.core/constants/pware.oc.core.constants.phase.ts +58 -58
- package/src/pware.oc.core/constants/pware.oc.core.constants.pulse.ts +63 -63
- package/src/pware.oc.core/constants/pware.oc.core.constants.rowKind.ts +34 -34
- package/src/pware.oc.core/constants/pware.oc.core.constants.status.ts +74 -74
- package/src/pware.oc.core/constants/pware.oc.core.constants.toolName.ts +69 -69
- package/src/pware.oc.core/git/index.ts +7 -7
- package/src/pware.oc.core/git/pware.oc.core.git.ts +237 -237
- package/src/pware.oc.core/git/pware.oc.core.gitignore.ts +87 -87
- package/src/pware.oc.core/index.ts +19 -18
- package/src/pware.oc.core/pware.oc.core.bus.ts +42 -42
- package/src/pware.oc.core/pware.oc.core.cache.ts +48 -48
- package/src/pware.oc.core/pware.oc.core.clipboard.ts +97 -97
- package/src/pware.oc.core/pware.oc.core.debug.ts +280 -280
- package/src/pware.oc.core/pware.oc.core.events.ts +79 -79
- package/src/pware.oc.core/pware.oc.core.glyph.ts +135 -135
- package/src/pware.oc.core/pware.oc.core.layout.ts +234 -234
- package/src/pware.oc.core/pware.oc.core.oes.ts +99 -89
- package/src/pware.oc.core/pware.oc.core.paths.ts +240 -240
- package/src/pware.oc.core/pware.oc.core.preview.ts +74 -74
- package/src/pware.oc.core/pware.oc.core.pulse.ts +726 -726
- package/src/pware.oc.core/pware.oc.core.runtimeConfig.ts +41 -0
- package/src/pware.oc.core/pware.oc.core.sqlite.ts +164 -175
- package/src/pware.oc.core/pware.oc.core.sqliteGateway.ts +89 -0
- package/src/pware.oc.core/pware.oc.core.status.ts +214 -214
- package/src/pware.oc.core/pware.oc.core.timing.ts +63 -63
- package/src/pware.oc.core/pware.oc.core.width.ts +215 -215
- package/src/pware.oc.omo/constants/index.ts +15 -15
- package/src/pware.oc.omo/constants/pware.oc.omo.constants.backgroundTask.ts +18 -18
- package/src/pware.oc.omo/constants/pware.oc.omo.constants.boulderStatus.ts +49 -49
- package/src/pware.oc.omo/constants/pware.oc.omo.constants.docKind.ts +29 -29
- package/src/pware.oc.omo/constants/pware.oc.omo.constants.eventName.ts +11 -11
- package/src/pware.oc.omo/constants/pware.oc.omo.constants.planStatus.ts +60 -60
- package/src/pware.oc.omo/constants/pware.oc.omo.constants.reviewStatus.ts +49 -49
- package/src/pware.oc.omo/constants/pware.oc.omo.constants.startWork.ts +25 -25
- package/src/pware.oc.omo/constants/pware.oc.omo.constants.verdict.ts +38 -38
- package/src/pware.oc.omo/index.ts +7 -7
- package/src/pware.oc.omo/resolver/index.ts +19 -19
- package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.approval.ts +179 -179
- package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.approvalGroup.ts +116 -116
- package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.approvalState.ts +34 -34
- package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.boulder.ts +503 -503
- package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.config.ts +40 -40
- package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.doc.ts +269 -269
- package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.draftFile.ts +18 -18
- package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.notepadsFile.ts +18 -18
- package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.plan.ts +155 -155
- package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.planFile.ts +363 -361
- package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.proofFile.ts +18 -18
- package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.rulesFile.ts +11 -11
- package/src/pware.oc.omo/resolver/pware.oc.omo.resolver.runContinuationFile.ts +14 -14
- package/src/pware.oc.opencode/constants/index.ts +10 -10
- package/src/pware.oc.opencode/constants/pware.oc.opencode.constants.eventName.ts +15 -15
- package/src/pware.oc.opencode/constants/pware.oc.opencode.constants.fileTouch.ts +18 -18
- package/src/pware.oc.opencode/constants/pware.oc.opencode.constants.questionKind.ts +45 -45
- package/src/pware.oc.opencode/constants/pware.oc.opencode.constants.sessionStatus.ts +58 -58
- package/src/pware.oc.opencode/index.ts +8 -8
- package/src/pware.oc.opencode/pware.oc.opencode.events.ts +182 -182
- package/src/pware.oc.opencode/pware.oc.opencode.files.ts +399 -399
- package/src/pware.oc.opencode/resolver/index.ts +223 -170
- package/src/pware.oc.opencode/resolver/pware.oc.opencode.resolver.file.ts +150 -162
- package/src/pware.oc.opencode/resolver/pware.oc.opencode.resolver.question.ts +149 -185
- package/src/pware.oc.opencode/resolver/pware.oc.opencode.resolver.session.ts +248 -211
- package/src/pware.oc.opencode/resolver/pware.oc.opencode.resolver.todo.ts +22 -26
- package/src/pware.oc.opencode/resolver/pware.oc.opencode.resolver.tool.ts +224 -236
- package/src/pware.oc.perf/index.ts +14 -14
- package/src/pware.oc.perf/pware.oc.perf.asciichart.d.ts +15 -15
- package/src/pware.oc.perf/pware.oc.perf.charts.ts +284 -284
- package/src/pware.oc.perf/pware.oc.perf.reader.ts +962 -927
- package/src/pware.oc.perf/pware.oc.perf.realtime.ts +88 -88
- package/src/pware.oc.perf/pware.oc.perf.realtimeBlock.ts +118 -118
- package/src/pware.oc.perf/pware.oc.perf.realtimeCpuRam.ts +79 -79
- package/src/pware.oc.perf/pware.oc.perf.realtimeSampler.ts +71 -71
- package/src/pware.oc.perf/pware.oc.perf.realtimeTimeline.ts +214 -214
- package/src/pware.oc.perf/pware.oc.perf.self.ts +179 -179
- package/src/pware.oc.perf/pware.oc.perf.view.tsx +463 -462
- package/src/pware.oc.runtime/index.ts +13 -13
- package/src/pware.oc.runtime/pware.oc.runtime.monitor.ts +142 -142
- package/src/pware.oc.runtime/pware.oc.runtime.mywork-enrich.ts +87 -79
- package/src/pware.oc.runtime/pware.oc.runtime.mywork.ts +282 -253
- package/src/pware.oc.runtime/pware.oc.runtime.omoRead.ts +37 -0
- package/src/pware.oc.runtime/pware.oc.runtime.questions.ts +83 -95
- package/src/pware.oc.runtime/pware.oc.runtime.snapshotClient.ts +130 -129
- package/src/pware.oc.runtime/pware.oc.runtime.source.ts +105 -105
- package/src/pware.oc.runtime/pware.oc.runtime.worker.ts +44 -43
- package/src/pware.oc.runtime/resolver/index.ts +268 -224
- package/src/pware.oc.runtime/resolver/pware.oc.runtime.resolver.delegate.ts +146 -146
- package/src/pware.oc.ui/index.ts +12 -12
- package/src/pware.oc.ui/pware.oc.ui.chrome.tsx +381 -339
- package/src/pware.oc.ui/pware.oc.ui.glyphs.tsx +144 -144
- package/src/pware.oc.ui/pware.oc.ui.host.tsx +111 -111
- package/src/pware.oc.ui/pware.oc.ui.live.tsx +82 -82
- package/src/pware.oc.ui/pware.oc.ui.menudialogs.tsx +843 -843
- package/src/pware.oc.ui/pware.oc.ui.sections.tsx +552 -526
- package/src/pware.oc.ui/pware.oc.ui.sidebar.tsx +1718 -1629
- package/src/pware.oc.ui.tsx +98 -98
package/README.md
CHANGED
|
@@ -1,235 +1,150 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
##
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
|
114
|
-
|
|
|
115
|
-
|
|
|
116
|
-
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
2. `~/.config/opencode/oes.json` (respects `XDG_CONFIG_HOME`)
|
|
152
|
-
3. `<project>/oes.json`
|
|
153
|
-
|
|
154
|
-
```json
|
|
155
|
-
{
|
|
156
|
-
"fileRows": 8,
|
|
157
|
-
"perfHistory": 3,
|
|
158
|
-
"perfRows": 5,
|
|
159
|
-
"perfTurns": 120,
|
|
160
|
-
"questionReconcileSec": 15,
|
|
161
|
-
"sessionFetch": 20,
|
|
162
|
-
"skipGitignore": false,
|
|
163
|
-
"toolRows": 5,
|
|
164
|
-
"toolFetch": 20
|
|
165
|
-
}
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
| Key | Default | What it controls |
|
|
169
|
-
| ------------------------ | -------------------------------- | ----------------------------------------------------- |
|
|
170
|
-
| `fileRows` | `8` | most file rows shown |
|
|
171
|
-
| `perfHistory` | `3` | sessions under Perf → History; `0` hides it |
|
|
172
|
-
| `perfRows` | `5` | rows per Perf section |
|
|
173
|
-
| `perfTurns` | `120` | recent turns Perf measures |
|
|
174
|
-
| `questionReconcileSec` | `15` | seconds between full open-question rescans when no live hint arrives |
|
|
175
|
-
| `sessionFetch` | `20` | recent sessions fetched for the My work `Sessions` group |
|
|
176
|
-
| `skipGitignore` | `false` | also honour the project's root `.gitignore` (`.oesignore` is always honoured) |
|
|
177
|
-
| `toolRows` | `5` | most tool-call rows shown; the `… +N more` control reveals another `toolRows` per click |
|
|
178
|
-
| `toolFetch` | `20` | tool-call history kept behind the `… +N more` revealer; distinct from `toolRows` |
|
|
179
|
-
|
|
180
|
-
Row counts are ceilings: a short terminal trims below them. Changes apply on the next refresh — no restart.
|
|
181
|
-
|
|
182
|
-
Ignored files come from `.oesignore` and, when enabled, `.gitignore` — both at the project root, both in gitignore format. The plugin ships a default `.oesignore`.
|
|
183
|
-
|
|
184
|
-
## Debug
|
|
185
|
-
|
|
186
|
-
Set `OES_DEBUG_OPENCODE` in the environment **before** starting OpenCode, then restart the TUI. While either logger is active the sidebar shows the muted `self` cost line with a yellow flag row above it — `debug mode` and/or `profile` — plus a second muted row that prints the **resolved log directory** (`logs <path>`) so you can see exactly where files are being written. Below everything the panel then also draws a read-only **debug console**: short event labels (`db open`, …) newest first, only 5 visible rows over a 200-line in-memory ring that wheel-scrolls to older events. The console is fed only while a logger is on — with no logger active the `self` line, its measurement, and the console are off entirely.
|
|
187
|
-
|
|
188
|
-
```bash
|
|
189
|
-
# writes to <plugin>/logs/oes-debug-YYYY-MM-DD.log
|
|
190
|
-
OES_DEBUG_OPENCODE=1 opencode
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
```powershell
|
|
194
|
-
$env:OES_DEBUG_OPENCODE = "1"
|
|
195
|
-
opencode
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
`1`, `true`, `yes`, or `on` use the plugin's `logs/` directory. Any other non-empty value is treated as a directory path. `0`, `false`, `no`, or `off` turns it off. Lines are JSON (`ts`, `tag`, `msg`, optional `data`) — path resolution, monitor emits, Perf reads, and the `self` tag logs the plugin's own measured latencies. Logging never crashes the panel.
|
|
199
|
-
|
|
200
|
-
SQLite reads fail fast: `busy_timeout` is 100 ms, so a transient WAL lock no longer freezes the panel — the previous snapshot is kept on screen and a `sql.busy` debug line (with the SQL in `data.q`) is appended so lock contention is visible in the log.
|
|
201
|
-
|
|
202
|
-
The same semantics power `OES_DEBUG_PROFILE`, which times **every plugin entry point and hotspot** and writes one line per call to `<plugin>/logs/oes-profile-YYYY-MM-DD.log`: `{ ts, tag, ms, data? }`. In this local repo checkout, `<plugin>/logs` means `./logs` at the repository root (not `./src/logs`). Tags: `event` (per event type), `tick`, `render` (the re-render trigger), `requestRender`, `row` (per row built), `scan`, `monitor.emit` (fingerprint + snapshot), `db.snapshot` / `db.feed` / `db.questions` / `perf.read`, `sql` (every query, with its SQL in `data.q`), `omo.read` / `omo.stamp` / `omo.config` / `omo.approvals` / `omo.docs`, `mywork.approvals` (the per-approval session lookup), `files.decorate` (git marks), `git`, `remount`, `hydrate`, and the async host calls `rpc.diff` / `rpc.selectSession` / `rpc.startWork` / `rpc.approve`. When the panel unmounts, one `summary` line with per-tag `{ n, total, avg, max }` is appended — the whole wall-clock split in a single line.
|
|
203
|
-
|
|
204
|
-
## How it works
|
|
205
|
-
|
|
206
|
-
The panel is a read-only view of data OpenCode already stores.
|
|
207
|
-
|
|
208
|
-
| Source | Path | Used for |
|
|
209
|
-
| --------------- | ------------------------------------------------------------- | -------------------------------- |
|
|
210
|
-
| OpenCode SQLite | `~/.local/share/opencode/opencode.db` (or `OPENCODE_DB`) | sessions, tools, files, timings |
|
|
211
|
-
| OMO | `<project>/.omo/` | plan approvals (My work) — optional |
|
|
212
|
-
| `oes.json` | plugin / user config / project | display limits |
|
|
213
|
-
| ignore files | `<project>/.oesignore` (always) · `.gitignore` (with `skipGitignore`) | files hidden from the panel |
|
|
214
|
-
|
|
215
|
-
It refreshes from database stamps, file watches, and OpenCode events. The always-on runtime snapshot is read off the TUI main thread in a Bun worker (with a synchronous fallback if the worker is unavailable), so SQLite reads never block the UI. Cost is shown only when the provider reports it. The `self` line measures the plugin's own runtime with `performance.now()` and the TUI renderer's native frame stats — no extra data source — and it runs only while a debug or profile logger is active.
|
|
216
|
-
|
|
217
|
-
## Contributing
|
|
218
|
-
|
|
219
|
-
Issues and pull requests are welcome. Constraints: read-only OpenCode data, no prompts or tool I/O in the UI, every row must survive a narrow terminal.
|
|
220
|
-
|
|
221
|
-
Every commit patch-bumps `package.json` and prepends one English sentence to [CHANGELOG.md](CHANGELOG.md). Write that sentence as the first line of the commit message. A green CI run on `main` publishes that version to npm.
|
|
222
|
-
|
|
223
|
-
`bun test` runs unit and fixture tests. `bun run typecheck` checks types with `tsc --noEmit`. `bun run bench` times the 5k-part scan.
|
|
224
|
-
|
|
225
|
-
## License
|
|
226
|
-
|
|
227
|
-
MIT. Copyright © 2026 [pleware](https://github.com/pleware).
|
|
228
|
-
|
|
229
|
-
<p>
|
|
230
|
-
<a href="https://github.com/pleware"><img src="https://raw.githubusercontent.com/pleware/opencode-extended-sidebar/main/assets/branding.pware.png" alt="pware" width="72" /></a>
|
|
231
|
-
</p>
|
|
232
|
-
|
|
233
|
-
## Acknowledgements
|
|
234
|
-
|
|
235
|
-
This plugin started as a TUI take on the same idea as [Phrouros](https://github.com/disaeye/phrouros) — a live view of OpenCode agents, delegates and session activity, only inside the sidebar instead of a browser. Thank you to [disaeye](https://github.com/disaeye) for Phrouros.
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# OpenCode Extended Sidebar | TUI Plugin
|
|
4
|
+
|
|
5
|
+
**Mission control for your OpenCode agents — right inside the TUI.**
|
|
6
|
+
|
|
7
|
+
Switch sessions, watch tools run live, see which files changed, and where the time went. No browser, no dashboard, four tiny dependencies.
|
|
8
|
+
|
|
9
|
+
      
|
|
10
|
+
|
|
11
|
+
OpenCode shows one conversation at a time. This panel puts the rest of the work on screen. It reads OpenCode's own database — nothing to sync, no daemon.
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
| Feature | What you get |
|
|
17
|
+
| ------------------- | ----------------------------------------------------------------------------------------- |
|
|
18
|
+
| **My work** | Questions, recent sessions, and (with OMO) plan queues waiting on you |
|
|
19
|
+
| **Sessions** | Title, age, live mark, `[C]` current. Header `switch` / `new`; palette `nw` / slash `/nw` |
|
|
20
|
+
| **Live pulse** | State + direction glyphs (working, queued, failed, streaming, waiting) |
|
|
21
|
+
| **Tool calls** | Named rows with duration; click for metadata — never args or output |
|
|
22
|
+
| **Files** | `+N −M` and git letters; Markdown preview; `view all` picker |
|
|
23
|
+
| **Delegates** | Tokens, status, pulse; click to jump |
|
|
24
|
+
| **Stats** | Wait / think / stream / tools, plus a tok/s bar and charts popup (`C`) |
|
|
25
|
+
| **Privacy** | Read-only database. No prompts, tool I/O, patches, or absolute paths |
|
|
26
|
+
| **Fits the window** | `oes.json` counts are ceilings; lists end in `… +N more` |
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
Four tabs: **My work** · **Session** · **Project** · **Stats**. Glyphs, colours, and per-row behaviour: [docs/panel.md](docs/panel.md).
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
| Tab | Shows |
|
|
33
|
+
| ----------- | ---------------------------------------------------------------------------------------------------- |
|
|
34
|
+
| **My work** | Open questions, recent sessions (`switch` / `new`), OMO plan queues, `Draft docs` + `Plans` archives |
|
|
35
|
+
| **Session** | This agent, its delegates, tools, files, and (with OMO) drafts it wrote |
|
|
36
|
+
| **Project** | Tools and files every recent session touched |
|
|
37
|
+
| **Stats** | Timing |
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
OMO (Oh My OpenAgent) is optional. Without `.omo/` the plan groups are gone; questions and sessions still work.
|
|
41
|
+
|
|
42
|
+
## Install
|
|
43
|
+
|
|
44
|
+
This is a TUI plugin. It belongs in `tui.json`, not `opencode.json`.
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
opencode plugin opencode-extended-sidebar --global
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Or add the npm name in `~/.config/opencode/tui.json`:
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"$schema": "https://opencode.ai/tui.json",
|
|
55
|
+
"plugin": ["opencode-extended-sidebar"]
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Restart the OpenCode TUI. OpenCode installs the package from npm. For local development, point `plugin` at a `file:///` path to this checkout.
|
|
60
|
+
|
|
61
|
+
## Configuration
|
|
62
|
+
|
|
63
|
+
Later files win: plugin defaults → `~/.config/opencode/oes.json` → `<project>/oes.json`.
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"fileRows": 8,
|
|
68
|
+
"perfHistory": 3,
|
|
69
|
+
"perfRows": 5,
|
|
70
|
+
"perfTurns": 120,
|
|
71
|
+
"questionReconcileSec": 15,
|
|
72
|
+
"sessionDimHours": 48,
|
|
73
|
+
"sessionFetch": 10,
|
|
74
|
+
"sessionVisibleHours": 72,
|
|
75
|
+
"skipGitignore": false,
|
|
76
|
+
"toolRows": 5,
|
|
77
|
+
"toolFetch": 20
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
| Key | Default | What it controls |
|
|
83
|
+
| ---------------------- | ------- | --------------------------------------------------- |
|
|
84
|
+
| `fileRows` | `8` | most file rows shown |
|
|
85
|
+
| `perfHistory` | `3` | sessions under Perf → History; `0` hides it |
|
|
86
|
+
| `perfRows` | `5` | rows per Perf section |
|
|
87
|
+
| `perfTurns` | `120` | recent turns Perf measures |
|
|
88
|
+
| `questionReconcileSec` | `15` | seconds between full open-question rescans |
|
|
89
|
+
| `sessionDimHours` | `48` | hours after which a still-visible session is dimmed |
|
|
90
|
+
| `sessionFetch` | `10` | recent sessions in the My work `Sessions` group |
|
|
91
|
+
| `sessionVisibleHours` | `72` | hours a session stays visible after its last update |
|
|
92
|
+
| `skipGitignore` | `false` | also honour the project's root `.gitignore` |
|
|
93
|
+
| `toolRows` | `5` | most tool-call rows shown |
|
|
94
|
+
| `toolFetch` | `20` | tool-call history behind `… +N more` |
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
Row counts are ceilings. Changes apply on the next refresh. Hidden files come from `.oesignore` (always) and, when enabled, `.gitignore`.
|
|
98
|
+
|
|
99
|
+
## Debug
|
|
100
|
+
|
|
101
|
+
Set the variable **before** starting OpenCode, then restart the TUI.
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
OES_DEBUG_OPENCODE=1 opencode
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
```powershell
|
|
108
|
+
$env:OES_DEBUG_OPENCODE = "1"
|
|
109
|
+
opencode
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
| Variable | Role |
|
|
114
|
+
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
115
|
+
| `OES_DEBUG_OPENCODE` | `1` / `true` / `yes` / `on` writes to the plugin `logs/` directory. Any other non-empty value is a path. `0` / `false` / `no` / `off` turns it off |
|
|
116
|
+
| `OES_DEBUG_PROFILE` | Times plugin entry points; writes `oes-profile-YYYY-MM-DD.log` |
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
While a logger is on, the sidebar shows a `self` cost line and a short debug console. Logging never crashes the panel.
|
|
120
|
+
|
|
121
|
+
## How it works
|
|
122
|
+
|
|
123
|
+
A read-only view of data OpenCode already stores.
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
| Source | Path | Used for |
|
|
127
|
+
| --------------- | ------------------------------------------------------------ | ----------------------------------- |
|
|
128
|
+
| OpenCode SQLite | `~/.local/share/opencode/opencode.db` (or `OPENCODE_DB`) | sessions, tools, files, timings |
|
|
129
|
+
| OMO | `<project>/.omo/` | plan approvals (My work) — optional |
|
|
130
|
+
| `oes.json` | plugin / user config / project | display limits |
|
|
131
|
+
| ignore files | `<project>/.oesignore` · `.gitignore` (with `skipGitignore`) | files hidden from the panel |
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
Runtime snapshot runs in a Bun worker so SQLite reads do not block the UI. Four runtime packages — `[ignore](https://www.npmjs.com/package/ignore)`, `[asciichart](https://www.npmjs.com/package/asciichart)`, `[simple-statistics](https://www.npmjs.com/package/simple-statistics)`, `[@crafter/charts](https://www.npmjs.com/package/@crafter/charts)` — each with zero transitive dependencies. Everything else is an OpenCode peer.
|
|
135
|
+
|
|
136
|
+
## Contributing
|
|
137
|
+
|
|
138
|
+
Issues and pull requests are welcome. Constraints: read-only OpenCode data, no prompts or tool I/O in the UI, every row must survive a narrow terminal.
|
|
139
|
+
|
|
140
|
+
Every commit patch-bumps `package.json` and prepends one English sentence to [CHANGELOG.md](CHANGELOG.md). Write that sentence as the first line of the commit message. A green CI run on `main` publishes that version to npm.
|
|
141
|
+
|
|
142
|
+
`bun test` runs unit and fixture tests. `bun run typecheck` checks types. `bun run bench` times the 5k-part scan.
|
|
143
|
+
|
|
144
|
+
## License
|
|
145
|
+
|
|
146
|
+
MIT. Copyright © 2026 [pleware](https://github.com/pleware) | pware.ai
|
|
147
|
+
|
|
148
|
+
## Acknowledgements
|
|
149
|
+
|
|
150
|
+
This plugin started as a TUI take on the same idea as [Phrouros](https://github.com/disaeye/phrouros). Thank you to [disaeye](https://github.com/disaeye).
|
package/oes.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"fileRows": 8,
|
|
3
|
-
"perfHistory": 3,
|
|
4
|
-
"perfRows": 5,
|
|
5
|
-
"perfTurns": 120,
|
|
6
|
-
"questionReconcileSec": 15,
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
1
|
+
{
|
|
2
|
+
"fileRows": 8,
|
|
3
|
+
"perfHistory": 3,
|
|
4
|
+
"perfRows": 5,
|
|
5
|
+
"perfTurns": 120,
|
|
6
|
+
"questionReconcileSec": 15,
|
|
7
|
+
"sessionDimHours": 48,
|
|
8
|
+
"sessionFetch": 10,
|
|
9
|
+
"sessionVisibleHours": 72,
|
|
10
|
+
"skipGitignore": false,
|
|
11
|
+
"toolRows": 5,
|
|
12
|
+
"toolFetch": 20
|
|
13
|
+
}
|