vibeusage 0.2.8 → 0.2.9
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/package.json +1 -1
- package/src/commands/init.js +6 -6
- package/src/lib/opencode-config.js +3 -1
- package/src/lib/rollout.js +1 -1
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -42,12 +42,12 @@ const {
|
|
|
42
42
|
const { renderLocalReport, renderAuthTransition, renderSuccessBox } = require('../lib/init-flow');
|
|
43
43
|
|
|
44
44
|
const ASCII_LOGO = [
|
|
45
|
-
'██╗ ██╗██╗██████╗
|
|
46
|
-
'██║
|
|
47
|
-
'██║ ██║██║██████╔╝█████╗
|
|
48
|
-
'╚██╗ ██╔╝██║██╔══██╗██╔══╝
|
|
49
|
-
' ╚████╔╝
|
|
50
|
-
' ╚═══╝ ╚═╝╚═════╝
|
|
45
|
+
'██╗ ██╗██╗██████╗ ███████╗██╗ ██╗███████╗ █████╗ ██████╗ ███████╗',
|
|
46
|
+
'██║ ██║██║██╔══██╗██╔════╝██║ ██║██╔════╝██╔══██╗██╔════╝ ██╔════╝',
|
|
47
|
+
'██║ ██║██║██████╔╝█████╗ ██║ ██║███████╗███████║██║ ███╗█████╗',
|
|
48
|
+
'╚██╗ ██╔╝██║██╔══██╗██╔══╝ ██║ ██║╚════██║██╔══██║██║ ██║██╔══╝',
|
|
49
|
+
' ╚████╔╝ ██║██████╔╝███████╗╚██████╔╝███████║██║ ██║╚██████╔╝███████╗',
|
|
50
|
+
' ╚═══╝ ╚═╝╚═════╝ ╚══════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝'
|
|
51
51
|
].join('\n');
|
|
52
52
|
|
|
53
53
|
const DIVIDER = '----------------------------------------------';
|
|
@@ -6,7 +6,7 @@ const { ensureDir } = require('./fs');
|
|
|
6
6
|
|
|
7
7
|
const DEFAULT_PLUGIN_NAME = 'vibeusage-tracker.js';
|
|
8
8
|
const PLUGIN_MARKER = 'VIBEUSAGE_TRACKER_PLUGIN';
|
|
9
|
-
const DEFAULT_EVENT = 'session.
|
|
9
|
+
const DEFAULT_EVENT = 'session.updated';
|
|
10
10
|
|
|
11
11
|
function resolveOpencodeConfigDir({ home = os.homedir(), env = process.env } = {}) {
|
|
12
12
|
const explicit = typeof env.OPENCODE_CONFIG_DIR === 'string' ? env.OPENCODE_CONFIG_DIR.trim() : '';
|
|
@@ -88,7 +88,9 @@ function hasPluginMarker(text) {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
module.exports = {
|
|
91
|
+
DEFAULT_EVENT,
|
|
91
92
|
DEFAULT_PLUGIN_NAME,
|
|
93
|
+
PLUGIN_MARKER,
|
|
92
94
|
resolveOpencodeConfigDir,
|
|
93
95
|
resolveOpencodePluginDir,
|
|
94
96
|
buildOpencodePlugin,
|
package/src/lib/rollout.js
CHANGED
|
@@ -574,7 +574,7 @@ async function parseOpencodeMessageFile({ filePath, lastTotals, hourlyState, tou
|
|
|
574
574
|
const bucketStart = toUtcHalfHourStart(tsIso);
|
|
575
575
|
if (!bucketStart) return { lastTotals, eventsAggregated: 0 };
|
|
576
576
|
|
|
577
|
-
const model = normalizeModelInput(msg?.modelID) || DEFAULT_MODEL;
|
|
577
|
+
const model = normalizeModelInput(msg?.modelID || msg?.model || msg?.modelId) || DEFAULT_MODEL;
|
|
578
578
|
const bucket = getHourlyBucket(hourlyState, source, model, bucketStart);
|
|
579
579
|
addTotals(bucket.totals, delta);
|
|
580
580
|
touchedBuckets.add(bucketKey(source, model, bucketStart));
|