getaimeter 0.1.8 → 0.1.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 +5 -2
- package/watcher.js +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "getaimeter",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Track your Claude AI usage across CLI, VS Code, and Desktop App. One command to start.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"aimeter": "cli.js"
|
|
@@ -38,5 +38,8 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://getaimeter.com",
|
|
40
40
|
"author": "Alejandro Ceja",
|
|
41
|
-
"preferGlobal": true
|
|
41
|
+
"preferGlobal": true,
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"systray2": "^2.1.4"
|
|
44
|
+
}
|
|
42
45
|
}
|
package/watcher.js
CHANGED
|
@@ -85,6 +85,9 @@ function extractNewUsage(filePath) {
|
|
|
85
85
|
|
|
86
86
|
if (obj.type !== 'assistant' || !obj.message || !obj.message.usage) continue;
|
|
87
87
|
|
|
88
|
+
// Skip synthetic/internal messages
|
|
89
|
+
if (obj.message.model === '<synthetic>') continue;
|
|
90
|
+
|
|
88
91
|
// Check for thinking content blocks (appear in streaming progress messages)
|
|
89
92
|
const contentBlocks = obj.message.content || [];
|
|
90
93
|
for (const block of contentBlocks) {
|
|
@@ -93,9 +96,8 @@ function extractNewUsage(filePath) {
|
|
|
93
96
|
}
|
|
94
97
|
}
|
|
95
98
|
|
|
96
|
-
// Skip streaming progress messages (stop_reason: null = not yet complete)
|
|
97
|
-
|
|
98
|
-
if (obj.message.stop_reason === null || obj.message.stop_reason === undefined) continue;
|
|
99
|
+
// Skip streaming progress messages (stop_reason: null/undefined/missing = not yet complete)
|
|
100
|
+
if (!obj.message.stop_reason) continue;
|
|
99
101
|
|
|
100
102
|
const u = obj.message.usage;
|
|
101
103
|
const model = obj.message.model || 'unknown';
|