opencode-system-metrics-tui 0.1.7 → 0.1.8

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.
Files changed (3) hide show
  1. package/README.md +14 -10
  2. package/dist/tui.js +114 -31
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  ## Install globally in OpenCode
4
4
 
5
5
  ```powershell
6
- opencode plugin -g opencode-system-metrics-tui@0.1.7 --force
6
+ opencode plugin -g opencode-system-metrics-tui@0.1.8 --force
7
7
  ```
8
8
 
9
9
  This is the primary installation path. The version must match `package.json`; `--force` asks OpenCode to refresh its package cache. The helper below skips OpenCode when the expected artifact is already current. Verify the actual installed artifact afterward:
@@ -31,12 +31,14 @@ The README is available in **Español**, **English**, and **Português**.
31
31
  - RAM: memoria usada, total y porcentaje.
32
32
  - GPU: utilización y temperatura.
33
33
  - GPU VRAM: memoria usada, total y porcentaje.
34
+ - En Apple Silicon, la fila se muestra como **Unified Memory**; no se presenta la memoria total del sistema como VRAM usada porque no existe una fuente fiable de uso dinámico.
34
35
  - Red: velocidad de descarga y subida en tiempo real.
35
36
  - CPU, RAM y red se consultan con una cadencia general de 2 segundos; GPU, VRAM y temperaturas usan una caché expirable de 10 segundos para reducir el coste sin congelar los sensores.
36
37
  - Colores compatibles con el tema activo de OpenCode.
37
38
  - Iconos Unicode por defecto en Windows (la detección de fuentes instaladas no cambia la selección); Linux/macOS usan Nerd Font solo si está instalada y mantienen fallback Unicode.
38
39
  - En Windows usa iconos Unicode visibles de forma predeterminada, porque OpenCode no puede detectar la fuente activa de la terminal.
39
40
  - Soporte para Linux, macOS y Windows cuando el sistema expone las métricas.
41
+ - En macOS, la utilización de GPU usa `ioreg` y las temperaturas usan el helper de Stats si está instalado; si cualquiera de ellos falta, esa métrica queda como no disponible sin interrumpir el plugin. En Intel se conserva el fallback de GPU discreta de `systeminformation`.
40
42
  - En Windows, la temperatura de CPU requiere LibreHardwareMonitor ejecutándose como administrador con **Remote Web Server** activo en `http://127.0.0.1:8085`.
41
43
  - En Windows, la velocidad de red usa PowerShell y `Get-NetAdapterStatistics`; no agrega una dependencia npm.
42
44
  - Las lecturas opcionales de Windows se hacen bajo demanda, con timeout y caché; no hay timers globales de PowerShell.
@@ -91,7 +93,7 @@ npm publish --access public
91
93
  En otro equipo:
92
94
 
93
95
  ```bash
94
- opencode plugin opencode-system-metrics-tui@0.1.7
96
+ opencode plugin opencode-system-metrics-tui@0.1.8
95
97
  ```
96
98
 
97
99
  El paquete exporta tanto la raíz (`opencode-system-metrics-tui`) como `./tui`; ambas rutas cargan el mismo bundle TUI.
@@ -101,8 +103,8 @@ El instalador de OpenCode configura el plugin TUI automáticamente. Reinicia Ope
101
103
  Publicar en npm e instalar en OpenCode son pasos distintos:
102
104
 
103
105
  - `npm publish --access public` publica el paquete en npm.
104
- - `opencode plugin opencode-system-metrics-tui@0.1.7` lo instala solo en el proyecto actual.
105
- - `opencode plugin -g opencode-system-metrics-tui@0.1.7 --force` lo instala globalmente para todos los proyectos.
106
+ - `opencode plugin opencode-system-metrics-tui@0.1.8` lo instala solo en el proyecto actual.
107
+ - `opencode plugin -g opencode-system-metrics-tui@0.1.8 --force` lo instala globalmente para todos los proyectos.
106
108
 
107
109
  ### Verificación
108
110
 
@@ -124,12 +126,14 @@ npm run build
124
126
  - RAM: used memory, total memory, and percentage.
125
127
  - GPU: utilization and temperature.
126
128
  - GPU VRAM: used memory, total memory, and percentage.
129
+ - On Apple Silicon, the row is labeled **Unified Memory**; total system memory is never presented as live VRAM usage because no reliable dynamic source is available.
127
130
  - Network: live download and upload speeds.
128
131
  - CPU, RAM, and network use the 2-second general cadence; GPU, VRAM, and temperatures use an expiring 10-second cache to reduce cost without freezing sensors.
129
132
  - Uses the active OpenCode theme colors.
130
133
  - Windows uses Unicode icons by default (installed-font detection does not change selection); Linux/macOS use Nerd Font only when installed and retain Unicode fallback.
131
134
  - On Windows, visible Unicode icons are used by default because OpenCode cannot detect the terminal's active font.
132
135
  - Supports Linux, macOS, and Windows when the operating system exposes the metrics.
136
+ - On macOS, GPU utilization uses `ioreg` and temperatures use the Stats helper when installed; missing helpers leave only that metric unavailable without interrupting the plugin. Intel retains the discrete-GPU `systeminformation` fallback.
133
137
  - On Windows, CPU temperature requires LibreHardwareMonitor running as administrator with **Remote Web Server** enabled at `http://127.0.0.1:8085`.
134
138
  - On Windows, network speed uses PowerShell and `Get-NetAdapterStatistics`; it adds no npm dependency.
135
139
  - Optional Windows reads are on demand, timeout-bounded, and cached; no global PowerShell timers are used.
@@ -184,7 +188,7 @@ npm publish --access public
184
188
  On another machine:
185
189
 
186
190
  ```bash
187
- opencode plugin opencode-system-metrics-tui@0.1.7
191
+ opencode plugin opencode-system-metrics-tui@0.1.8
188
192
  ```
189
193
 
190
194
  The package exports both the root (`opencode-system-metrics-tui`) and `./tui`; both paths load the same TUI bundle.
@@ -194,8 +198,8 @@ The OpenCode installer configures the TUI plugin automatically. Restart OpenCode
194
198
  Publishing to npm and installing in OpenCode are separate steps:
195
199
 
196
200
  - `npm publish --access public` publishes the package to npm.
197
- - `opencode plugin opencode-system-metrics-tui@0.1.7` installs it for the current project only.
198
- - `opencode plugin -g opencode-system-metrics-tui@0.1.7 --force` installs it globally for all projects.
201
+ - `opencode plugin opencode-system-metrics-tui@0.1.8` installs it for the current project only.
202
+ - `opencode plugin -g opencode-system-metrics-tui@0.1.8 --force` installs it globally for all projects.
199
203
 
200
204
  ### Verification
201
205
 
@@ -277,7 +281,7 @@ npm publish --access public
277
281
  Em outro computador:
278
282
 
279
283
  ```bash
280
- opencode plugin opencode-system-metrics-tui@0.1.7
284
+ opencode plugin opencode-system-metrics-tui@0.1.8
281
285
  ```
282
286
 
283
287
  O pacote exporta tanto a raiz (`opencode-system-metrics-tui`) quanto `./tui`; os dois caminhos carregam o mesmo bundle TUI.
@@ -287,8 +291,8 @@ O instalador do OpenCode configura o plugin TUI automaticamente. Reinicie o Open
287
291
  Publicar no npm e instalar no OpenCode são etapas diferentes:
288
292
 
289
293
  - `npm publish --access public` publica o pacote no npm.
290
- - `opencode plugin opencode-system-metrics-tui@0.1.7` instala o plugin apenas no projeto atual.
291
- - `opencode plugin -g opencode-system-metrics-tui@0.1.7 --force` instala o plugin globalmente para todos os projetos.
294
+ - `opencode plugin opencode-system-metrics-tui@0.1.8` instala o plugin apenas no projeto atual.
295
+ - `opencode plugin -g opencode-system-metrics-tui@0.1.8 --force` instala o plugin globalmente para todos os projetos.
292
296
 
293
297
  ### Verificação
294
298
 
package/dist/tui.js CHANGED
@@ -44,12 +44,67 @@ var DEFAULT_METRIC_TIMEOUT_MS = 1500;
44
44
  var WINDOWS_MEMORY_TIMEOUT_MS = 5000;
45
45
  var WINDOWS_NETWORK_PROCESS_TIMEOUT_MS = 4000;
46
46
  var WINDOWS_NETWORK_OUTER_TIMEOUT_MS = 4500;
47
+ var MAC_METRIC_TIMEOUT_MS = 1500;
48
+ var MAC_STATS_HELPER = "/Applications/Stats.app/Contents/Resources/smc";
49
+ var runCommand = async (command, args, timeoutMs) => {
50
+ const { stdout } = await execFileAsync(command, args, { timeout: timeoutMs, maxBuffer: 1024 * 1024 });
51
+ return stdout;
52
+ };
53
+ async function detectMacHardwareArchitecture(runner = runCommand, processArchitecture = process.arch) {
54
+ try {
55
+ const output = (await runner("sysctl", ["-in", "hw.optional.arm64"], MAC_METRIC_TIMEOUT_MS)).trim();
56
+ if (output === "1")
57
+ return "arm64";
58
+ if (output === "0")
59
+ return "x86_64";
60
+ } catch {}
61
+ return processArchitecture === "arm64" ? "arm64" : "x86_64";
62
+ }
63
+ function gpuMemoryLabel(architecture, platform = process.platform) {
64
+ if (platform !== "darwin")
65
+ return "GPU VRAM";
66
+ if (architecture === "arm64")
67
+ return "Unified Memory";
68
+ if (architecture === "x86_64")
69
+ return "GPU VRAM";
70
+ return "Memory";
71
+ }
47
72
  function parseMonitorTemperature(value) {
48
73
  if (value === undefined)
49
74
  return;
50
75
  const parsed = Number(value.replace(",", ".").replace(/[^\d.-]/g, ""));
51
76
  return Number.isFinite(parsed) ? parsed : undefined;
52
77
  }
78
+ function parseMacGpuUtilization(stdout) {
79
+ const match = stdout.match(/"Device Utilization %"\s*=\s*([\d]+(?:\.\d+)?)/);
80
+ if (match === null)
81
+ return;
82
+ const value = Number(match[1]);
83
+ return Number.isFinite(value) && value >= 0 && value <= 100 ? value : undefined;
84
+ }
85
+ function parseMacStatsTemperature(stdout, sensorPrefix) {
86
+ let maximum;
87
+ for (const line of stdout.split(/\r?\n/)) {
88
+ const fields = line.trim().split(/\s+/);
89
+ if (fields.length < 2 || !new RegExp(`^\\[${sensorPrefix}`).test(fields[0]))
90
+ continue;
91
+ const value = Number(fields[1].replace(",", ".").replace(/[°cC]/g, ""));
92
+ if (Number.isFinite(value) && value > 0 && (maximum === undefined || value > maximum))
93
+ maximum = value;
94
+ }
95
+ return maximum;
96
+ }
97
+ async function readMacMetrics(runner = runCommand) {
98
+ const [gpuOutput, temperatureOutput] = await Promise.all([
99
+ runner("ioreg", ["-r", "-d", "1", "-c", "IOAccelerator"], MAC_METRIC_TIMEOUT_MS).catch(() => ""),
100
+ runner(MAC_STATS_HELPER, ["list", "-t"], MAC_METRIC_TIMEOUT_MS).catch(() => "")
101
+ ]);
102
+ return {
103
+ gpuPercent: parseMacGpuUtilization(gpuOutput) ?? null,
104
+ cpuTemperatureCelsius: parseMacStatsTemperature(temperatureOutput, "Tp") ?? null,
105
+ gpuTemperatureCelsius: parseMacStatsTemperature(temperatureOutput, "Tg") ?? null
106
+ };
107
+ }
53
108
  async function readLibreHardwareMonitorTemperature() {
54
109
  const response = await fetch("http://127.0.0.1:8085/data.json", { signal: AbortSignal.timeout(2000) });
55
110
  if (!response.ok)
@@ -105,6 +160,7 @@ var unavailable = {
105
160
  gpuMemoryUsedBytes: null,
106
161
  gpuMemoryTotalBytes: null,
107
162
  gpuMemoryPercent: null,
163
+ gpuMemoryIsUnified: null,
108
164
  downloadBytesPerSecond: null,
109
165
  uploadBytesPerSecond: null
110
166
  };
@@ -129,7 +185,15 @@ var SLOW_METRIC_CACHE_MS = 1e4;
129
185
  var TEMPERATURE_CACHE_MS = 1e4;
130
186
  var OPTIONAL_SOURCE_BACKOFF_MS = 30000;
131
187
  var isWindows = process.platform === "win32";
188
+ var isMac = process.platform === "darwin";
132
189
  var NETWORK_CACHE_MS = 2000;
190
+ var macHardwareArchitecture;
191
+ function readMacHardwareArchitecture() {
192
+ if (!isMac)
193
+ return Promise.resolve("x86_64");
194
+ macHardwareArchitecture ??= detectMacHardwareArchitecture();
195
+ return macHardwareArchitecture;
196
+ }
133
197
  function selectGpuMetrics(graphics) {
134
198
  const empty = {
135
199
  gpuPercent: null,
@@ -211,6 +275,11 @@ var cachedGraphics = {
211
275
  lastAttemptAt: 0,
212
276
  inFlight: undefined
213
277
  };
278
+ var cachedMacMetrics = {
279
+ value: undefined,
280
+ lastAttemptAt: 0,
281
+ inFlight: undefined
282
+ };
214
283
  var cachedNetwork = {
215
284
  value: undefined,
216
285
  lastAttemptAt: 0,
@@ -252,14 +321,16 @@ async function readWindowsCpuTemperature() {
252
321
  return value === undefined ? undefined : { main: value };
253
322
  }
254
323
  async function readMetrics() {
255
- const [load, memory] = await Promise.allSettled([
324
+ const [load, memory, hardwareArchitecture] = await Promise.allSettled([
256
325
  withTimeout(si.currentLoad(), DEFAULT_METRIC_TIMEOUT_MS),
257
- withTimeout(si.mem(), isWindows ? WINDOWS_MEMORY_TIMEOUT_MS : DEFAULT_METRIC_TIMEOUT_MS)
326
+ withTimeout(si.mem(), isWindows ? WINDOWS_MEMORY_TIMEOUT_MS : DEFAULT_METRIC_TIMEOUT_MS),
327
+ readMacHardwareArchitecture()
258
328
  ]);
259
- const [temperature, graphics, network] = await Promise.allSettled([
329
+ const [temperature, graphics, network, mac] = await Promise.allSettled([
260
330
  readCachedMetric(cachedCpuTemperature, isWindows ? readWindowsCpuTemperature : () => si.cpuTemperature(), TEMPERATURE_CACHE_MS, Date.now(), TEMPERATURE_CACHE_MS, 2500),
261
331
  readCachedMetric(cachedGraphics, () => si.graphics(), SLOW_METRIC_CACHE_MS, Date.now(), SLOW_METRIC_CACHE_MS, 2500),
262
- readCachedMetric(cachedNetwork, isWindows ? readWindowsNetworkMetrics : () => si.networkStats("*"), isWindows ? NETWORK_CACHE_MS : 2000, Date.now(), OPTIONAL_SOURCE_BACKOFF_MS, isWindows ? WINDOWS_NETWORK_OUTER_TIMEOUT_MS : DEFAULT_METRIC_TIMEOUT_MS)
332
+ readCachedMetric(cachedNetwork, isWindows ? readWindowsNetworkMetrics : () => si.networkStats("*"), isWindows ? NETWORK_CACHE_MS : 2000, Date.now(), OPTIONAL_SOURCE_BACKOFF_MS, isWindows ? WINDOWS_NETWORK_OUTER_TIMEOUT_MS : DEFAULT_METRIC_TIMEOUT_MS),
333
+ isMac ? readCachedMetric(cachedMacMetrics, () => readMacMetrics(), SLOW_METRIC_CACHE_MS, Date.now(), OPTIONAL_SOURCE_BACKOFF_MS, MAC_METRIC_TIMEOUT_MS) : Promise.resolve(undefined)
263
334
  ]);
264
335
  const cpuPercent = load.status === "fulfilled" ? finite(load.value.currentLoad) : null;
265
336
  const memoryTotalBytes = memory.status === "fulfilled" ? finite(memory.value.total) : null;
@@ -267,6 +338,14 @@ async function readMetrics() {
267
338
  const memoryUsedBytes = memoryTotalBytes !== null && memoryAvailableBytes !== null ? Math.max(0, memoryTotalBytes - memoryAvailableBytes) : memory.status === "fulfilled" ? finite(memory.value.used) : null;
268
339
  const memoryPercent = memoryUsedBytes !== null && memoryTotalBytes !== null && memoryTotalBytes > 0 ? memoryUsedBytes / memoryTotalBytes * 100 : null;
269
340
  const gpu = selectGpuMetrics(graphics.status === "fulfilled" ? graphics.value : undefined);
341
+ const macMetrics = mac.status === "fulfilled" ? mac.value : undefined;
342
+ const architecture = hardwareArchitecture.status === "fulfilled" ? hardwareArchitecture.value : undefined;
343
+ const isAppleSilicon = isMac && architecture === "arm64";
344
+ if (isAppleSilicon) {
345
+ gpu.gpuMemoryUsedBytes = null;
346
+ gpu.gpuMemoryTotalBytes = null;
347
+ gpu.gpuMemoryPercent = null;
348
+ }
270
349
  let downloadBytesPerSecond = null;
271
350
  let uploadBytesPerSecond = null;
272
351
  if (network.status === "fulfilled" && network.value !== undefined) {
@@ -293,12 +372,13 @@ async function readMetrics() {
293
372
  memoryUsedBytes,
294
373
  memoryTotalBytes,
295
374
  memoryPercent,
296
- gpuPercent: gpu.gpuPercent,
297
- cpuTemperatureCelsius: temperature.status === "fulfilled" && temperature.value !== undefined ? finite(temperature.value.main) ?? ("max" in temperature.value ? finite(temperature.value.max) : null) : null,
298
- gpuTemperatureCelsius: gpu.gpuTemperatureCelsius,
375
+ gpuPercent: macMetrics?.gpuPercent ?? gpu.gpuPercent,
376
+ cpuTemperatureCelsius: macMetrics?.cpuTemperatureCelsius ?? (temperature.status === "fulfilled" && temperature.value !== undefined ? finite(temperature.value.main) ?? ("max" in temperature.value ? finite(temperature.value.max) : null) : null),
377
+ gpuTemperatureCelsius: macMetrics?.gpuTemperatureCelsius ?? gpu.gpuTemperatureCelsius,
299
378
  gpuMemoryUsedBytes: gpu.gpuMemoryUsedBytes,
300
379
  gpuMemoryTotalBytes: gpu.gpuMemoryTotalBytes,
301
380
  gpuMemoryPercent: gpu.gpuMemoryPercent,
381
+ gpuMemoryIsUnified: isAppleSilicon ? true : isMac && architecture === "x86_64" ? false : null,
302
382
  downloadBytesPerSecond,
303
383
  uploadBytesPerSecond
304
384
  };
@@ -379,6 +459,7 @@ var initialMetrics = {
379
459
  gpuMemoryUsedBytes: null,
380
460
  gpuMemoryTotalBytes: null,
381
461
  gpuMemoryPercent: null,
462
+ gpuMemoryIsUnified: null,
382
463
  downloadBytesPerSecond: null,
383
464
  uploadBytesPerSecond: null
384
465
  };
@@ -435,13 +516,13 @@ function MetricsPanel(props) {
435
516
  onMount(startMetricsPolling);
436
517
  onCleanup(stopMetricsPolling);
437
518
  return (() => {
438
- var _el$ = _$createElement("box"), _el$2 = _$createElement("text"), _el$3 = _$createTextNode(` `), _el$4 = _$createElement("box"), _el$5 = _$createElement("text"), _el$6 = _$createElement("text"), _el$8 = _$createElement("text"), _el$9 = _$createTextNode(` · `), _el$0 = _$createTextNode(` `), _el$1 = _$createElement("box"), _el$10 = _$createElement("text"), _el$11 = _$createElement("text"), _el$13 = _$createElement("text"), _el$14 = _$createTextNode(` / `), _el$15 = _$createTextNode(` (`), _el$16 = _$createTextNode(`)`), _el$17 = _$createElement("box"), _el$18 = _$createElement("text"), _el$19 = _$createElement("text"), _el$21 = _$createElement("text"), _el$22 = _$createTextNode(` · `), _el$23 = _$createTextNode(` `), _el$24 = _$createElement("box"), _el$25 = _$createElement("text"), _el$26 = _$createElement("text"), _el$28 = _$createElement("text"), _el$29 = _$createTextNode(` / `), _el$30 = _$createTextNode(` (`), _el$31 = _$createTextNode(`)`), _el$32 = _$createElement("box"), _el$33 = _$createElement("text"), _el$34 = _$createElement("text"), _el$36 = _$createElement("text"), _el$37 = _$createTextNode(`↓ `), _el$38 = _$createTextNode(` ↑ `);
519
+ var _el$ = _$createElement("box"), _el$2 = _$createElement("text"), _el$3 = _$createTextNode(` `), _el$4 = _$createElement("box"), _el$5 = _$createElement("text"), _el$6 = _$createElement("text"), _el$8 = _$createElement("text"), _el$9 = _$createTextNode(` · `), _el$0 = _$createTextNode(` `), _el$1 = _$createElement("box"), _el$10 = _$createElement("text"), _el$11 = _$createElement("text"), _el$13 = _$createElement("text"), _el$14 = _$createTextNode(` / `), _el$15 = _$createTextNode(` (`), _el$16 = _$createTextNode(`)`), _el$17 = _$createElement("box"), _el$18 = _$createElement("text"), _el$19 = _$createElement("text"), _el$21 = _$createElement("text"), _el$22 = _$createTextNode(` · `), _el$23 = _$createTextNode(` `), _el$24 = _$createElement("box"), _el$25 = _$createElement("text"), _el$26 = _$createElement("text"), _el$27 = _$createTextNode(` `), _el$28 = _$createTextNode(` `), _el$29 = _$createElement("text"), _el$30 = _$createTextNode(` / `), _el$31 = _$createTextNode(` (`), _el$32 = _$createTextNode(`)`), _el$33 = _$createElement("box"), _el$34 = _$createElement("text"), _el$35 = _$createElement("text"), _el$37 = _$createElement("text"), _el$38 = _$createTextNode(`↓ `), _el$39 = _$createTextNode(` ↑ `);
439
520
  _$insertNode(_el$, _el$2);
440
521
  _$insertNode(_el$, _el$4);
441
522
  _$insertNode(_el$, _el$1);
442
523
  _$insertNode(_el$, _el$17);
443
524
  _$insertNode(_el$, _el$24);
444
- _$insertNode(_el$, _el$32);
525
+ _$insertNode(_el$, _el$33);
445
526
  _$setProp(_el$, "flexDirection", "column");
446
527
  _$setProp(_el$, "paddingLeft", 0);
447
528
  _$setProp(_el$, "paddingRight", 0);
@@ -484,26 +565,28 @@ function MetricsPanel(props) {
484
565
  _$insert(_el$21, () => formatTemperature(metricsState.sharedMetrics().gpuTemperatureCelsius), null);
485
566
  _$insertNode(_el$24, _el$25);
486
567
  _$insertNode(_el$24, _el$26);
487
- _$insertNode(_el$24, _el$28);
568
+ _$insertNode(_el$24, _el$29);
488
569
  _$setProp(_el$24, "flexDirection", "row");
489
570
  _$insert(_el$25, () => icons.vram);
490
- _$insertNode(_el$26, _$createTextNode(` GPU VRAM `));
491
- _$insertNode(_el$28, _el$29);
492
- _$insertNode(_el$28, _el$30);
493
- _$insertNode(_el$28, _el$31);
494
- _$insert(_el$28, () => formatGiB(metricsState.sharedMetrics().gpuMemoryUsedBytes), _el$29);
495
- _$insert(_el$28, () => formatGiB(metricsState.sharedMetrics().gpuMemoryTotalBytes), _el$30);
496
- _$insert(_el$28, () => formatPercent(metricsState.sharedMetrics().gpuMemoryPercent), _el$31);
497
- _$insertNode(_el$32, _el$33);
498
- _$insertNode(_el$32, _el$34);
499
- _$insertNode(_el$32, _el$36);
500
- _$setProp(_el$32, "flexDirection", "row");
501
- _$insert(_el$33, () => icons.network);
502
- _$insertNode(_el$34, _$createTextNode(` NET `));
503
- _$insertNode(_el$36, _el$37);
504
- _$insertNode(_el$36, _el$38);
505
- _$insert(_el$36, () => formatRate(metricsState.sharedMetrics().downloadBytesPerSecond), _el$38);
506
- _$insert(_el$36, () => formatRate(metricsState.sharedMetrics().uploadBytesPerSecond), null);
571
+ _$insertNode(_el$26, _el$27);
572
+ _$insertNode(_el$26, _el$28);
573
+ _$insert(_el$26, () => gpuMemoryLabel(metricsState.sharedMetrics().gpuMemoryIsUnified === true ? "arm64" : metricsState.sharedMetrics().gpuMemoryIsUnified === false ? "x86_64" : undefined), _el$28);
574
+ _$insertNode(_el$29, _el$30);
575
+ _$insertNode(_el$29, _el$31);
576
+ _$insertNode(_el$29, _el$32);
577
+ _$insert(_el$29, () => formatGiB(metricsState.sharedMetrics().gpuMemoryUsedBytes), _el$30);
578
+ _$insert(_el$29, () => formatGiB(metricsState.sharedMetrics().gpuMemoryTotalBytes), _el$31);
579
+ _$insert(_el$29, () => formatPercent(metricsState.sharedMetrics().gpuMemoryPercent), _el$32);
580
+ _$insertNode(_el$33, _el$34);
581
+ _$insertNode(_el$33, _el$35);
582
+ _$insertNode(_el$33, _el$37);
583
+ _$setProp(_el$33, "flexDirection", "row");
584
+ _$insert(_el$34, () => icons.network);
585
+ _$insertNode(_el$35, _$createTextNode(` NET `));
586
+ _$insertNode(_el$37, _el$38);
587
+ _$insertNode(_el$37, _el$39);
588
+ _$insert(_el$37, () => formatRate(metricsState.sharedMetrics().downloadBytesPerSecond), _el$39);
589
+ _$insert(_el$37, () => formatRate(metricsState.sharedMetrics().uploadBytesPerSecond), null);
507
590
  _$effect((_p$) => {
508
591
  var _v$ = props.theme.text, _v$2 = TextAttributes.BOLD, _v$3 = props.theme.success, _v$4 = props.theme.text, _v$5 = props.theme.textMuted, _v$6 = props.theme.success, _v$7 = props.theme.text, _v$8 = props.theme.textMuted, _v$9 = props.theme.success, _v$0 = props.theme.text, _v$1 = props.theme.textMuted, _v$10 = props.theme.success, _v$11 = props.theme.text, _v$12 = props.theme.textMuted, _v$13 = props.theme.success, _v$14 = props.theme.text, _v$15 = props.theme.textMuted;
509
592
  _v$ !== _p$.e && (_p$.e = _$setProp(_el$2, "fg", _v$, _p$.e));
@@ -519,10 +602,10 @@ function MetricsPanel(props) {
519
602
  _v$1 !== _p$.l && (_p$.l = _$setProp(_el$21, "fg", _v$1, _p$.l));
520
603
  _v$10 !== _p$.u && (_p$.u = _$setProp(_el$25, "fg", _v$10, _p$.u));
521
604
  _v$11 !== _p$.c && (_p$.c = _$setProp(_el$26, "fg", _v$11, _p$.c));
522
- _v$12 !== _p$.w && (_p$.w = _$setProp(_el$28, "fg", _v$12, _p$.w));
523
- _v$13 !== _p$.m && (_p$.m = _$setProp(_el$33, "fg", _v$13, _p$.m));
524
- _v$14 !== _p$.f && (_p$.f = _$setProp(_el$34, "fg", _v$14, _p$.f));
525
- _v$15 !== _p$.y && (_p$.y = _$setProp(_el$36, "fg", _v$15, _p$.y));
605
+ _v$12 !== _p$.w && (_p$.w = _$setProp(_el$29, "fg", _v$12, _p$.w));
606
+ _v$13 !== _p$.m && (_p$.m = _$setProp(_el$34, "fg", _v$13, _p$.m));
607
+ _v$14 !== _p$.f && (_p$.f = _$setProp(_el$35, "fg", _v$14, _p$.f));
608
+ _v$15 !== _p$.y && (_p$.y = _$setProp(_el$37, "fg", _v$15, _p$.y));
526
609
  return _p$;
527
610
  }, {
528
611
  e: undefined,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-system-metrics-tui",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "OpenCode TUI sidebar plugin for live system metrics",
5
5
  "license": "MIT",
6
6
  "type": "module",