polydev-ai 1.8.15 → 1.8.16

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/lib/cliManager.js CHANGED
@@ -942,17 +942,21 @@ This is a known issue with @google/gemini-cli@0.3.4 and older Node.js versions.`
942
942
  }
943
943
  }
944
944
 
945
- // Calculate total tokens
945
+ // Calculate total tokens (excluding cache tokens which are just infrastructure overhead)
946
946
  let totalTokens = 0;
947
+ let cacheTokens = 0;
947
948
  for (const usage of Object.values(modelUsage)) {
948
- totalTokens += (usage.inputTokens || 0) + (usage.outputTokens || 0) +
949
- (usage.cacheReadInputTokens || 0) + (usage.cacheCreationInputTokens || 0);
949
+ // Count actual input/output tokens
950
+ totalTokens += (usage.inputTokens || 0) + (usage.outputTokens || 0);
951
+ // Track cache tokens separately (for cost calculations, but not displayed as "tokens used")
952
+ cacheTokens += (usage.cacheReadInputTokens || 0) + (usage.cacheCreationInputTokens || 0);
950
953
  }
951
954
 
952
955
  return {
953
956
  content,
954
957
  model_used: primaryModel,
955
958
  tokens_used: totalTokens || json.usage?.input_tokens + json.usage?.output_tokens || 0,
959
+ cache_tokens: cacheTokens, // Separate field for cache tokens
956
960
  cost_usd: json.total_cost_usd || 0,
957
961
  model_usage: modelUsage,
958
962
  session_id: json.session_id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polydev-ai",
3
- "version": "1.8.15",
3
+ "version": "1.8.16",
4
4
  "description": "Agentic workflow assistant with CLI integration - get diverse perspectives from multiple LLMs when stuck or need enhanced reasoning",
5
5
  "keywords": [
6
6
  "mcp",
@@ -67,7 +67,7 @@
67
67
  "lucide-react": "^0.542.0",
68
68
  "marked": "^16.2.1",
69
69
  "next": "^15.5.7",
70
- "polydev-ai": "^1.8.9",
70
+ "polydev-ai": "^1.8.15",
71
71
  "posthog-js": "^1.157.2",
72
72
  "prismjs": "^1.30.0",
73
73
  "react": "^18.3.1",