oc-metricboard 0.1.14 → 0.1.16
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/dist/tui-v2.js +9 -0
- package/package.json +8 -5
- package/src/tui-v2.tsx +9 -0
package/dist/tui-v2.js
CHANGED
|
@@ -175,6 +175,15 @@ function v1ThemeFromV2(theme) {
|
|
|
175
175
|
// V2 setup
|
|
176
176
|
// ---------------------------------------------------------------------------
|
|
177
177
|
export function setupTuiV2(ctx) {
|
|
178
|
+
// The V2 host may invoke this module's `setup` in a server-side loading
|
|
179
|
+
// context (capability probing), where there is no TUI surface: `ctx.ui`
|
|
180
|
+
// is undefined. Bail out silently instead of throwing — the real TUI
|
|
181
|
+
// setup runs where `ctx.ui.slot` exists. (The sidebar already renders;
|
|
182
|
+
// this path is only the server-side probe.)
|
|
183
|
+
if (!ctx || !ctx.ui || typeof ctx.ui.slot !== "function") {
|
|
184
|
+
log("opencode-metrics v2 entry: no ui.slot in this context, skipping");
|
|
185
|
+
return () => { };
|
|
186
|
+
}
|
|
178
187
|
const config = getConfig();
|
|
179
188
|
log("opencode-metrics v2 entry initialized");
|
|
180
189
|
const seedRoot = readTuiPreferencesFileSync();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oc-metricboard",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "OpenCode TUI sidebar plugin showing real-time LLM metrics (TPS, TTFT, tokens) with sub-agent × model breakdown",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"opencode",
|
|
@@ -78,15 +78,18 @@
|
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@opencode-ai/plugin": "1.18.4",
|
|
80
80
|
"@opencode-ai/sdk": "1.18.4",
|
|
81
|
-
"@opentui/core": "
|
|
82
|
-
"@opentui/solid": "
|
|
83
|
-
"solid-js": "
|
|
81
|
+
"@opentui/core": "0.5.11",
|
|
82
|
+
"@opentui/solid": "0.5.11",
|
|
83
|
+
"solid-js": "1.9.12",
|
|
84
84
|
"@types/bun": "latest",
|
|
85
85
|
"tsup": "^8.0.0",
|
|
86
86
|
"typescript": "^5.0.0"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"
|
|
89
|
+
"@opentui/core": "0.5.11",
|
|
90
|
+
"@opentui/solid": "0.5.11",
|
|
91
|
+
"comment-json": "^5.0.0",
|
|
92
|
+
"solid-js": "1.9.12"
|
|
90
93
|
},
|
|
91
94
|
"peerDependencies": {
|
|
92
95
|
"@opencode-ai/plugin": "*",
|
package/src/tui-v2.tsx
CHANGED
|
@@ -245,6 +245,15 @@ function v1ThemeFromV2(theme: V2Theme | undefined): V1FlatTheme {
|
|
|
245
245
|
// ---------------------------------------------------------------------------
|
|
246
246
|
|
|
247
247
|
export function setupTuiV2(ctx: V2Context): V2Cleanup {
|
|
248
|
+
// The V2 host may invoke this module's `setup` in a server-side loading
|
|
249
|
+
// context (capability probing), where there is no TUI surface: `ctx.ui`
|
|
250
|
+
// is undefined. Bail out silently instead of throwing — the real TUI
|
|
251
|
+
// setup runs where `ctx.ui.slot` exists. (The sidebar already renders;
|
|
252
|
+
// this path is only the server-side probe.)
|
|
253
|
+
if (!ctx || !ctx.ui || typeof ctx.ui.slot !== "function") {
|
|
254
|
+
log("opencode-metrics v2 entry: no ui.slot in this context, skipping")
|
|
255
|
+
return () => {}
|
|
256
|
+
}
|
|
248
257
|
const config = getConfig()
|
|
249
258
|
log("opencode-metrics v2 entry initialized")
|
|
250
259
|
|