ccstatusline-usage 2.1.14 → 2.1.15

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,6 +64,10 @@ Session: [████░░░░░░░░░░░] 27.0% | Weekly: [██
64
64
 
65
65
  ## 🆕 Recent Updates
66
66
 
67
+ ### [v2.1.15](https://github.com/pcvelz/ccstatusline-usage/releases/tag/v2.1.15) - Show extra usage balance on 1M context models
68
+
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%
70
+
67
71
  ### [v2.1.14](https://github.com/pcvelz/ccstatusline-usage/releases/tag/v2.1.14) - Reduce API polling frequency to prevent rate limiting
68
72
 
69
73
  - [pcvelz/ccstatusline-usage](https://github.com/pcvelz/ccstatusline-usage): **Reduced polling** — API cache extended from 3 to 10 minutes (~6 calls/hr instead of ~20), verified over 6 hours with zero 429 rate limit errors
@@ -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.14";
51476
+ var PACKAGE_VERSION = "2.1.15";
51477
51477
  function getPackageVersion() {
51478
51478
  if (/^\d+\.\d+\.\d+/.test(PACKAGE_VERSION)) {
51479
51479
  return PACKAGE_VERSION;
@@ -55000,7 +55000,11 @@ class ResetTimerWidget {
55000
55000
  const data = fetchApiData();
55001
55001
  if (data.error)
55002
55002
  return getErrorMessage(data.error);
55003
- if (data.extraUsageEnabled && data.weeklyUsage !== undefined && data.weeklyUsage >= 100 && data.extraUsageUsed !== undefined && data.extraUsageLimit !== undefined) {
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) {
55004
55008
  const used = formatCents(data.extraUsageUsed);
55005
55009
  const displayLimit = settings.extraUsageBalance ?? data.extraUsageLimit;
55006
55010
  const limit = formatCents(displayLimit);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccstatusline-usage",
3
- "version": "2.1.14",
3
+ "version": "2.1.15",
4
4
  "description": "A customizable status line formatter for Claude Code CLI",
5
5
  "module": "src/ccstatusline.ts",
6
6
  "type": "module",