getaimeter 0.1.9 → 0.2.0
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/watcher.js +4 -1
package/package.json
CHANGED
package/watcher.js
CHANGED
|
@@ -88,6 +88,10 @@ function extractNewUsage(filePath) {
|
|
|
88
88
|
// Skip synthetic/internal messages
|
|
89
89
|
if (obj.message.model === '<synthetic>') continue;
|
|
90
90
|
|
|
91
|
+
// Skip internal Claude Code background calls (compaction, routing, etc.)
|
|
92
|
+
const model = obj.message.model || '';
|
|
93
|
+
if (model.includes('haiku')) continue;
|
|
94
|
+
|
|
91
95
|
// Check for thinking content blocks (appear in streaming progress messages)
|
|
92
96
|
const contentBlocks = obj.message.content || [];
|
|
93
97
|
for (const block of contentBlocks) {
|
|
@@ -100,7 +104,6 @@ function extractNewUsage(filePath) {
|
|
|
100
104
|
if (!obj.message.stop_reason) continue;
|
|
101
105
|
|
|
102
106
|
const u = obj.message.usage;
|
|
103
|
-
const model = obj.message.model || 'unknown';
|
|
104
107
|
|
|
105
108
|
// Estimate thinking tokens: ~4 chars per token (conservative estimate)
|
|
106
109
|
// The API doesn't separate thinking_tokens in the JSONL usage field
|