claude-scope 0.8.30 → 0.8.32

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.
@@ -2704,7 +2704,7 @@ var init_cache_metrics_widget = __esm({
2704
2704
  }
2705
2705
  /**
2706
2706
  * Calculate cache metrics from context usage data
2707
- * Returns null if no usage data is available (current or cached)
2707
+ * Returns zero metrics if no usage data is available (widget should always be visible)
2708
2708
  */
2709
2709
  calculateMetrics(data) {
2710
2710
  let usage = data.context_window?.current_usage;
@@ -2715,7 +2715,13 @@ var init_cache_metrics_widget = __esm({
2715
2715
  }
2716
2716
  }
2717
2717
  if (!usage) {
2718
- return null;
2718
+ return {
2719
+ cacheRead: 0,
2720
+ cacheWrite: 0,
2721
+ totalTokens: 0,
2722
+ hitRate: 0,
2723
+ savings: 0
2724
+ };
2719
2725
  }
2720
2726
  const cacheRead = usage.cache_read_input_tokens ?? 0;
2721
2727
  const cacheWrite = usage.cache_creation_input_tokens ?? 0;
@@ -2771,10 +2777,10 @@ var init_cache_metrics_widget = __esm({
2771
2777
  return styleFn(this.renderData, this.theme);
2772
2778
  }
2773
2779
  /**
2774
- * Widget is enabled when we have cache metrics data
2780
+ * Widget is always enabled (shows zeros when no data)
2775
2781
  */
2776
2782
  isEnabled() {
2777
- return this.renderData !== void 0;
2783
+ return true;
2778
2784
  }
2779
2785
  };
2780
2786
  }
@@ -3315,7 +3321,14 @@ var init_context_widget = __esm({
3315
3321
  usage = cached.usage;
3316
3322
  }
3317
3323
  }
3318
- if (!usage) return null;
3324
+ if (!usage) {
3325
+ const renderData2 = {
3326
+ used: 0,
3327
+ contextWindowSize: context_window_size,
3328
+ percent: 0
3329
+ };
3330
+ return this.styleFn(renderData2, this.colors.context);
3331
+ }
3319
3332
  const used = usage.input_tokens + usage.cache_creation_input_tokens + usage.cache_read_input_tokens + usage.output_tokens;
3320
3333
  const percent = Math.round(used / context_window_size * 100);
3321
3334
  const renderData = {
@@ -3414,6 +3427,7 @@ var init_cost_widget = __esm({
3414
3427
  }
3415
3428
  renderWithData(data, _context) {
3416
3429
  if (!data.cost || data.cost.total_cost_usd === void 0) return null;
3430
+ if (data.cost.total_cost_usd === 0) return null;
3417
3431
  const renderData = {
3418
3432
  costUsd: data.cost.total_cost_usd
3419
3433
  };
@@ -4026,6 +4040,7 @@ var init_duration_widget = __esm({
4026
4040
  }
4027
4041
  renderWithData(data, _context) {
4028
4042
  if (!data.cost || data.cost.total_duration_ms === void 0) return null;
4043
+ if (data.cost.total_duration_ms === 0) return null;
4029
4044
  const renderData = {
4030
4045
  durationMs: data.cost.total_duration_ms
4031
4046
  };
@@ -4509,6 +4524,7 @@ var init_lines_widget = __esm({
4509
4524
  renderWithData(data, _context) {
4510
4525
  const added = data.cost?.total_lines_added ?? 0;
4511
4526
  const removed = data.cost?.total_lines_removed ?? 0;
4527
+ if (added === 0 && removed === 0) return null;
4512
4528
  const renderData = { added, removed };
4513
4529
  return this.styleFn(renderData, this.colors.lines);
4514
4530
  }
@@ -7096,7 +7112,7 @@ var init_mjs = __esm({
7096
7112
  "node_modules/signal-exit/dist/mjs/index.js"() {
7097
7113
  init_signals();
7098
7114
  processOk = (process4) => !!process4 && typeof process4 === "object" && typeof process4.removeListener === "function" && typeof process4.emit === "function" && typeof process4.reallyExit === "function" && typeof process4.listeners === "function" && typeof process4.kill === "function" && typeof process4.pid === "number" && typeof process4.on === "function";
7099
- kExitEmitter = Symbol.for("signal-exit emitter");
7115
+ kExitEmitter = /* @__PURE__ */ Symbol.for("signal-exit emitter");
7100
7116
  global = globalThis;
7101
7117
  ObjectDefineProperty = Object.defineProperty.bind(Object);
7102
7118
  Emitter = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-scope",
3
- "version": "0.8.30",
3
+ "version": "0.8.32",
4
4
  "description": "Claude Code plugin for session status and analytics",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -35,7 +35,7 @@
35
35
  "@types/node": "^22.10.2",
36
36
  "c8": "^10.1.3",
37
37
  "chai": "^6.2.2",
38
- "esbuild": "^0.24.2",
38
+ "esbuild": "^0.27.2",
39
39
  "husky": "^9.1.7",
40
40
  "lint-staged": "^16.2.7",
41
41
  "rimraf": "^6.1.2",