opencode-system-metrics-tui 0.1.0 → 0.1.1

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 +21 -0
  2. package/dist/tui.js +2 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -18,6 +18,7 @@ The README is available in **Español**, **English**, and **Português**.
18
18
  - Actualización cada 2 segundos.
19
19
  - Colores compatibles con el tema activo de OpenCode.
20
20
  - Iconos Hack Nerd Font con fallback Unicode.
21
+ - En Windows usa iconos Unicode visibles de forma predeterminada, porque OpenCode no puede detectar la fuente activa de la terminal.
21
22
  - Soporte para Linux, macOS y Windows cuando el sistema expone las métricas.
22
23
 
23
24
  ### Requisitos
@@ -73,6 +74,12 @@ opencode plugin opencode-system-metrics-tui
73
74
 
74
75
  El instalador de OpenCode configura el plugin TUI automáticamente. Reinicia OpenCode después de instalarlo.
75
76
 
77
+ Publicar en npm e instalar en OpenCode son pasos distintos:
78
+
79
+ - `npm publish --access public` publica el paquete en npm.
80
+ - `opencode plugin opencode-system-metrics-tui` lo instala solo en el proyecto actual.
81
+ - `opencode plugin -g opencode-system-metrics-tui` lo instala globalmente para todos los proyectos.
82
+
76
83
  ### Verificación
77
84
 
78
85
  ```bash
@@ -95,6 +102,7 @@ npm run build
95
102
  - Refreshes every 2 seconds.
96
103
  - Uses the active OpenCode theme colors.
97
104
  - Hack Nerd Font icons with Unicode fallback.
105
+ - On Windows, visible Unicode icons are used by default because OpenCode cannot detect the terminal's active font.
98
106
  - Supports Linux, macOS, and Windows when the operating system exposes the metrics.
99
107
 
100
108
  ### Requirements
@@ -150,6 +158,12 @@ opencode plugin opencode-system-metrics-tui
150
158
 
151
159
  The OpenCode installer configures the TUI plugin automatically. Restart OpenCode after installation.
152
160
 
161
+ Publishing to npm and installing in OpenCode are separate steps:
162
+
163
+ - `npm publish --access public` publishes the package to npm.
164
+ - `opencode plugin opencode-system-metrics-tui` installs it for the current project only.
165
+ - `opencode plugin -g opencode-system-metrics-tui` installs it globally for all projects.
166
+
153
167
  ### Verification
154
168
 
155
169
  ```bash
@@ -172,6 +186,7 @@ npm run build
172
186
  - Atualização a cada 2 segundos.
173
187
  - Usa as cores do tema ativo do OpenCode.
174
188
  - Ícones Hack Nerd Font com fallback Unicode.
189
+ - No Windows, ícones Unicode visíveis são usados por padrão porque o OpenCode não consegue detectar a fonte ativa do terminal.
175
190
  - Suporte para Linux, macOS e Windows quando o sistema disponibiliza as métricas.
176
191
 
177
192
  ### Requisitos
@@ -227,6 +242,12 @@ opencode plugin opencode-system-metrics-tui
227
242
 
228
243
  O instalador do OpenCode configura o plugin TUI automaticamente. Reinicie o OpenCode após a instalação.
229
244
 
245
+ Publicar no npm e instalar no OpenCode são etapas diferentes:
246
+
247
+ - `npm publish --access public` publica o pacote no npm.
248
+ - `opencode plugin opencode-system-metrics-tui` instala o plugin apenas no projeto atual.
249
+ - `opencode plugin -g opencode-system-metrics-tui` instala o plugin globalmente para todos os projetos.
250
+
230
251
  ### Verificação
231
252
 
232
253
  ```bash
package/dist/tui.js CHANGED
@@ -194,8 +194,8 @@ function getMetricIcons(useNerdFont) {
194
194
  }
195
195
 
196
196
  // src/tui.tsx
197
- var REFRESH_INTERVAL_MS = 2000;
198
- var icons = getMetricIcons(hasHackNerdFont());
197
+ var REFRESH_INTERVAL_MS = process.platform === "win32" ? 5000 : 2000;
198
+ var icons = getMetricIcons(process.platform !== "win32" && hasHackNerdFont());
199
199
  function systemMetricsTitle() {
200
200
  const locale = process.env.LC_ALL ?? process.env.LANGUAGE?.split(":")[0] ?? process.env.LANG ?? Intl.DateTimeFormat().resolvedOptions().locale;
201
201
  const language = locale.split(/[-_.]/)[0].toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-system-metrics-tui",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "OpenCode TUI sidebar plugin for live system metrics",
5
5
  "license": "MIT",
6
6
  "type": "module",