ccstatusline-usage 2.1.15 → 2.1.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/README.md CHANGED
@@ -64,9 +64,14 @@ Session: [████░░░░░░░░░░░] 27.0% | Weekly: [██
64
64
 
65
65
  ## 🆕 Recent Updates
66
66
 
67
+ ### [v2.1.16](https://github.com/pcvelz/ccstatusline-usage/releases/tag/v2.1.16) - Show [1m] suffix on model widget for 1M context models
68
+
69
+ - [pcvelz/ccstatusline-usage](https://github.com/pcvelz/ccstatusline-usage): **1M context indicator** — Model widget now appends `[1m]` when a 1M context model is active, both in full (`Model: claude-sonnet-4-6 [1m]`) and compact (`M: s4.6[1m]`) display modes
70
+ - [pcvelz/ccstatusline-usage](https://github.com/pcvelz/ccstatusline-usage): **Revert extra usage on 1M** — Removed the v2.1.15 trigger that showed extra usage spending on 1M models. 1M context is not included in Max without extra usage — the `[1m]` suffix on the Model widget now makes this visible, so the Reset Timer no longer needs to duplicate that awareness
71
+
67
72
  ### [v2.1.15](https://github.com/pcvelz/ccstatusline-usage/releases/tag/v2.1.15) - Show extra usage balance on 1M context models
68
73
 
69
- - [pcvelz/ccstatusline-usage](https://github.com/pcvelz/ccstatusline-usage): **Extra usage on 1M models** — Reset Timer widget now shows extra usage spending (`Extra: €X.XX/€Y.YY`) whenever a 1M context model is active (Opus/Sonnet with 1M context window), in addition to the existing trigger when weekly limit reaches 100%
74
+ - [pcvelz/ccstatusline-usage](https://github.com/pcvelz/ccstatusline-usage): **Extra usage on 1M models** — Reset Timer widget now shows extra usage spending (`Extra: €X.XX/€Y.YY`) whenever a 1M context model is active (Opus/Sonnet with 1M context window), in addition to the existing trigger when weekly limit reaches 100%. *Reverted in v2.1.16.*
70
75
 
71
76
  ### [v2.1.14](https://github.com/pcvelz/ccstatusline-usage/releases/tag/v2.1.14) - Reduce API polling frequency to prevent rate limiting
72
77
 
@@ -51473,7 +51473,7 @@ import { execSync as execSync3 } from "child_process";
51473
51473
  import * as fs5 from "fs";
51474
51474
  import * as path4 from "path";
51475
51475
  var __dirname = "/Users/peter/Documents/Code/ccstatusline-usage/src/utils";
51476
- var PACKAGE_VERSION = "2.1.15";
51476
+ var PACKAGE_VERSION = "2.1.16";
51477
51477
  function getPackageVersion() {
51478
51478
  if (/^\d+\.\d+\.\d+/.test(PACKAGE_VERSION)) {
51479
51479
  return PACKAGE_VERSION;
@@ -52359,11 +52359,15 @@ class ModelWidget {
52359
52359
  const modelDisplayName = typeof model === "string" ? model : model?.display_name ?? model?.id;
52360
52360
  if (!modelDisplayName)
52361
52361
  return null;
52362
+ const is1m = modelId?.includes("[1m]") ?? false;
52363
+ const suffix = is1m ? "[1m]" : "";
52364
+ const cleanDisplayName = modelDisplayName.replace(/\[1m\]/gi, "").trim();
52362
52365
  const mobile = (context.terminalWidth ?? 0) > 0 && (context.terminalWidth ?? 0) < MOBILE_THRESHOLD;
52363
52366
  if (mobile && modelId) {
52364
- return `M: ${compactModelName(modelId)}`;
52367
+ return `M: ${compactModelName(modelId)}${suffix}`;
52365
52368
  }
52366
- return item.rawValue ? modelDisplayName : `Model: ${modelDisplayName}`;
52369
+ const display = suffix ? `${cleanDisplayName} ${suffix}` : cleanDisplayName;
52370
+ return item.rawValue ? display : `Model: ${display}`;
52367
52371
  }
52368
52372
  supportsRawValue() {
52369
52373
  return true;
@@ -55000,11 +55004,7 @@ class ResetTimerWidget {
55000
55004
  const data = fetchApiData();
55001
55005
  if (data.error)
55002
55006
  return getErrorMessage(data.error);
55003
- const model = context.data?.model;
55004
- const modelId = typeof model === "string" ? model : model?.id ?? "";
55005
- const contextWindowSize = context.data?.context_window?.context_window_size;
55006
- const is1mModel = modelId.includes("[1m]") || contextWindowSize !== null && contextWindowSize !== undefined && contextWindowSize >= 1e6;
55007
- if (data.extraUsageEnabled && (is1mModel || data.weeklyUsage !== undefined && data.weeklyUsage >= 100) && data.extraUsageUsed !== undefined && data.extraUsageLimit !== undefined) {
55007
+ if (data.extraUsageEnabled && data.weeklyUsage !== undefined && data.weeklyUsage >= 100 && data.extraUsageUsed !== undefined && data.extraUsageLimit !== undefined) {
55008
55008
  const used = formatCents(data.extraUsageUsed);
55009
55009
  const displayLimit = settings.extraUsageBalance ?? data.extraUsageLimit;
55010
55010
  const limit = formatCents(displayLimit);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccstatusline-usage",
3
- "version": "2.1.15",
3
+ "version": "2.1.16",
4
4
  "description": "A customizable status line formatter for Claude Code CLI",
5
5
  "module": "src/ccstatusline.ts",
6
6
  "type": "module",