claude-blip 1.0.5 → 1.1.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/statusline.js +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-blip",
3
- "version": "1.0.5",
3
+ "version": "1.1.0",
4
4
  "description": "A minimal statusline for Claude Code",
5
5
  "license": "MIT",
6
6
  "author": "davebream",
package/statusline.js CHANGED
@@ -39,6 +39,7 @@ const stripAnsi = (s) => s.replace(/\x1b\[[0-9;]*m/g, "");
39
39
  * Format token count (e.g., 12400 → "12.4K")
40
40
  */
41
41
  function formatTokens(n) {
42
+ if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(n % 1_000_000 === 0 ? 0 : 1)}M`;
42
43
  if (n >= 1000) return `${(n / 1000).toFixed(n >= 10000 ? 0 : 1)}K`;
43
44
  return n.toString();
44
45
  }
@@ -108,7 +109,8 @@ function buildStatusline(input) {
108
109
  if (model) {
109
110
  // Extract tier name: "Opus 4.6" → "opus", "Sonnet 4.5" → "sonnet"
110
111
  const tier = model.split(/\s/)[0].toLowerCase();
111
- parts.push(dim(tier));
112
+ const is1M = (data.context_window?.context_window_size || 0) >= 1_000_000;
113
+ parts.push(dim(is1M ? `${tier} 1m` : tier));
112
114
  }
113
115
 
114
116
  // 4. Context window (bar + token count)