claude-scope 0.8.32 → 0.8.33

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.
@@ -2752,13 +2752,16 @@ var init_cache_metrics_widget = __esm({
2752
2752
  }
2753
2753
  this.lastSessionId = data.session_id;
2754
2754
  const usage = data.context_window?.current_usage;
2755
- if (usage && usage.input_tokens > 0 && !sessionChanged) {
2756
- this.cacheManager.setCachedUsage(data.session_id, {
2757
- input_tokens: usage.input_tokens,
2758
- output_tokens: usage.output_tokens,
2759
- cache_creation_input_tokens: usage.cache_creation_input_tokens,
2760
- cache_read_input_tokens: usage.cache_read_input_tokens
2761
- });
2755
+ if (usage && !sessionChanged) {
2756
+ const hasAnyTokens = (usage.input_tokens ?? 0) > 0 || (usage.output_tokens ?? 0) > 0 || (usage.cache_creation_input_tokens ?? 0) > 0 || (usage.cache_read_input_tokens ?? 0) > 0;
2757
+ if (hasAnyTokens) {
2758
+ this.cacheManager.setCachedUsage(data.session_id, {
2759
+ input_tokens: usage.input_tokens,
2760
+ output_tokens: usage.output_tokens,
2761
+ cache_creation_input_tokens: usage.cache_creation_input_tokens,
2762
+ cache_read_input_tokens: usage.cache_read_input_tokens
2763
+ });
2764
+ }
2762
2765
  }
2763
2766
  const metrics = this.calculateMetrics(data);
2764
2767
  this.renderData = metrics ?? void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-scope",
3
- "version": "0.8.32",
3
+ "version": "0.8.33",
4
4
  "description": "Claude Code plugin for session status and analytics",
5
5
  "license": "MIT",
6
6
  "type": "module",