opencode-statboard 1.0.0 → 1.0.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 (2) hide show
  1. package/package.json +8 -2
  2. package/server.js +5 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-statboard",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Real-time dashboard for opencode token usage and cost statistics",
5
5
  "main": "server.js",
6
6
  "bin": {
@@ -9,7 +9,13 @@
9
9
  "scripts": {
10
10
  "start": "node server.js"
11
11
  },
12
- "keywords": ["opencode", "dashboard", "tokens", "usage", "statistics"],
12
+ "keywords": [
13
+ "opencode",
14
+ "dashboard",
15
+ "tokens",
16
+ "usage",
17
+ "statistics"
18
+ ],
13
19
  "author": "thumb2086",
14
20
  "license": "MIT",
15
21
  "repository": {
package/server.js CHANGED
@@ -355,7 +355,11 @@ setInterval(() => {
355
355
  }, CACHE_CLEANUP_MS);
356
356
 
357
357
  (async () => {
358
- console.log('Loading initial stats...');
358
+ server.listen(PORT, '127.0.0.1', () => {
359
+ console.log(`opencode stats dashboard: http://127.0.0.1:${PORT}`);
360
+ });
361
+ setInterval(refresh, REFRESH_MS);
362
+ setInterval(refreshModels, 60000);
359
363
  await refresh();
360
364
  await refreshModels();
361
365
  for (const d of [1, 7, 30]) {
@@ -366,9 +370,4 @@ setInterval(() => {
366
370
  const t = await generateTrend(d);
367
371
  if (t) trendCache[String(d)] = t;
368
372
  }
369
- setInterval(refresh, REFRESH_MS);
370
- setInterval(refreshModels, 60000);
371
- server.listen(PORT, '127.0.0.1', () => {
372
- console.log(`opencode stats dashboard: http://127.0.0.1:${PORT}`);
373
- });
374
373
  })();