getaimeter 0.1.6 → 0.1.7

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 +1 -1
  2. package/watcher.js +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "getaimeter",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
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"
package/watcher.js CHANGED
@@ -84,6 +84,10 @@ function extractNewUsage(filePath) {
84
84
 
85
85
  if (obj.type !== 'assistant' || !obj.message || !obj.message.usage) continue;
86
86
 
87
+ // Skip streaming progress messages (stop_reason: null = not yet complete)
88
+ // Only count final responses with a real stop_reason
89
+ if (obj.message.stop_reason === null || obj.message.stop_reason === undefined) continue;
90
+
87
91
  const u = obj.message.usage;
88
92
  const model = obj.message.model || 'unknown';
89
93