claude-token-saver 2.8.1 → 2.8.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-token-saver",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
4
4
  "description": "Save tokens on Claude Code — spike diagnosis, 1M-context detection, TTL countdown, statusline. (formerly claude-cache-monitor)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -394,5 +394,12 @@ export function formatReport(data, { color = true, verbose = false, timer = true
394
394
  // timeframe footer.
395
395
  if (want('saved')) segs.push(saveSeg);
396
396
  if (want('period')) segs.push(periodSeg);
397
- return segs.join(' · ');
397
+ // Trailing erase-to-end-of-line so any leftover characters from a previous
398
+ // (longer) statusline render don't bleed into ours. Some terminals + the
399
+ // Claude Code statusline integration don't fully clear the line on rewrite,
400
+ // which surfaced as "Cache expires 4:574" or "Cache expires 43550" — old
401
+ // digits from a prior frame leaking past the new shorter timer text.
402
+ // \x1b[K is the standard "erase from cursor to EOL" CSI; safe on any
403
+ // ANSI-compatible terminal and a no-op when stdout isn't a TTY.
404
+ return segs.join(' · ') + '\x1b[K';
398
405
  }