ccstatusline-usage 2.3.13 → 2.3.14
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 +4 -0
- package/dist/ccstatusline.js +9 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -67,6 +67,10 @@ Session: [████░░░░░░░░░░░] 27.0% | Weekly: [██
|
|
|
67
67
|
|
|
68
68
|
## 🆕 Recent Updates
|
|
69
69
|
|
|
70
|
+
### [v2.3.14](https://github.com/pcvelz/ccstatusline-usage/releases/tag/v2.3.14) - Drop extraUsageBalance setting
|
|
71
|
+
|
|
72
|
+
- [pcvelz/ccstatusline-usage](https://github.com/pcvelz/ccstatusline-usage): Removed the `extraUsageBalance` setting introduced in v2.3.12. `Extra: €X/€Y` now uses the API's monthly limit directly — stable, no config, no drift.
|
|
73
|
+
|
|
70
74
|
### [v2.3.13](https://github.com/pcvelz/ccstatusline-usage/releases/tag/v2.3.13) - Fix timer color regression from v2.3.12
|
|
71
75
|
|
|
72
76
|
- [pcvelz/ccstatusline-usage](https://github.com/pcvelz/ccstatusline-usage): **Fix timer color** — In v2.3.12, the Reset Timer widget color setting was applied to both the `Extra: €X/€Y` output and the countdown timer (e.g. `4:28 hr`), causing the timer to appear red. The dark red is now applied inline only to the `Extra:` path; the countdown timer respects the widget's configured color as before.
|
package/dist/ccstatusline.js
CHANGED
|
@@ -52459,7 +52459,6 @@ var init_Settings = __esm(() => {
|
|
|
52459
52459
|
autoAlign: false,
|
|
52460
52460
|
continueThemeAcrossLines: false
|
|
52461
52461
|
}),
|
|
52462
|
-
extraUsageBalance: exports_external.number().optional(),
|
|
52463
52462
|
updatemessage: exports_external.object({
|
|
52464
52463
|
message: exports_external.string().nullable().optional(),
|
|
52465
52464
|
remaining: exports_external.number().nullable().optional()
|
|
@@ -55593,7 +55592,7 @@ function getTerminalWidth() {
|
|
|
55593
55592
|
function canDetectTerminalWidth() {
|
|
55594
55593
|
return probeTerminalWidth() !== null;
|
|
55595
55594
|
}
|
|
55596
|
-
var __dirname = "/Users/peter/Documents/Code/ccstatusline-usage/src/utils", PACKAGE_VERSION = "2.3.
|
|
55595
|
+
var __dirname = "/Users/peter/Documents/Code/ccstatusline-usage/src/utils", PACKAGE_VERSION = "2.3.14";
|
|
55597
55596
|
var init_terminal = () => {};
|
|
55598
55597
|
|
|
55599
55598
|
// src/utils/renderer.ts
|
|
@@ -63162,14 +63161,8 @@ function formatSplitUsageBar(label, shortLabel, extraPercent, size2) {
|
|
|
63162
63161
|
const bar = makeSplitUsageBar(extraPercent, getBarWidth(size2));
|
|
63163
63162
|
return `${size2 === "mobile" ? shortLabel : label}: ${bar} 100.0%`;
|
|
63164
63163
|
}
|
|
63165
|
-
function
|
|
63166
|
-
|
|
63167
|
-
return extraLimit;
|
|
63168
|
-
return Math.min(ceiling, extraLimit);
|
|
63169
|
-
}
|
|
63170
|
-
function computeExtraPercent(extraUsed, extraLimit, ceiling) {
|
|
63171
|
-
const denominator = computeEffectiveTotal(extraUsed, extraLimit, ceiling);
|
|
63172
|
-
return denominator > 0 ? extraUsed / denominator * 100 : 0;
|
|
63164
|
+
function computeExtraPercent(extraUsed, extraLimit) {
|
|
63165
|
+
return extraLimit > 0 ? extraUsed / extraLimit * 100 : 0;
|
|
63173
63166
|
}
|
|
63174
63167
|
function getCurrencySymbol() {
|
|
63175
63168
|
try {
|
|
@@ -63200,7 +63193,7 @@ class SessionUsageWidget {
|
|
|
63200
63193
|
getEditorDisplay(_item) {
|
|
63201
63194
|
return { displayText: this.getDisplayName() };
|
|
63202
63195
|
}
|
|
63203
|
-
render(_item, context,
|
|
63196
|
+
render(_item, context, _settings) {
|
|
63204
63197
|
if (context.isPreview)
|
|
63205
63198
|
return "Session: [███░░░░░░░░░░░░] 20%";
|
|
63206
63199
|
const data = context.usageData ?? {};
|
|
@@ -63212,7 +63205,7 @@ class SessionUsageWidget {
|
|
|
63212
63205
|
const extraUsed = data.extraUsageUsed;
|
|
63213
63206
|
const extraLimit = data.extraUsageLimit;
|
|
63214
63207
|
if (size2 !== "mobile" && data.extraUsageEnabled === true && extraUsed !== undefined && extraLimit !== undefined && data.sessionUsage >= 100 && (data.weeklyUsage === undefined || data.weeklyUsage < 100)) {
|
|
63215
|
-
const extraPercent = computeExtraPercent(extraUsed, extraLimit
|
|
63208
|
+
const extraPercent = computeExtraPercent(extraUsed, extraLimit);
|
|
63216
63209
|
return formatSplitUsageBar("Session", "S", extraPercent, size2);
|
|
63217
63210
|
}
|
|
63218
63211
|
return formatUsageBar("Session", "S", data.sessionUsage, size2);
|
|
@@ -63241,7 +63234,7 @@ class WeeklyUsageWidget {
|
|
|
63241
63234
|
getEditorDisplay(_item) {
|
|
63242
63235
|
return { displayText: this.getDisplayName() };
|
|
63243
63236
|
}
|
|
63244
|
-
render(_item, context,
|
|
63237
|
+
render(_item, context, _settings) {
|
|
63245
63238
|
if (context.isPreview)
|
|
63246
63239
|
return "Weekly: [██░░░░░░░░░░░░░] 12%";
|
|
63247
63240
|
const data = context.usageData ?? {};
|
|
@@ -63253,7 +63246,7 @@ class WeeklyUsageWidget {
|
|
|
63253
63246
|
const extraUsed = data.extraUsageUsed;
|
|
63254
63247
|
const extraLimit = data.extraUsageLimit;
|
|
63255
63248
|
if (size2 !== "mobile" && data.extraUsageEnabled === true && extraUsed !== undefined && extraLimit !== undefined && data.weeklyUsage >= 100) {
|
|
63256
|
-
const extraPercent = computeExtraPercent(extraUsed, extraLimit
|
|
63249
|
+
const extraPercent = computeExtraPercent(extraUsed, extraLimit);
|
|
63257
63250
|
return formatSplitUsageBar("Weekly", "W", extraPercent, size2);
|
|
63258
63251
|
}
|
|
63259
63252
|
return formatUsageBar("Weekly", "W", data.weeklyUsage, size2);
|
|
@@ -63282,7 +63275,7 @@ class ResetTimerWidget {
|
|
|
63282
63275
|
getEditorDisplay(_item) {
|
|
63283
63276
|
return { displayText: this.getDisplayName() };
|
|
63284
63277
|
}
|
|
63285
|
-
render(_item, context,
|
|
63278
|
+
render(_item, context, _settings) {
|
|
63286
63279
|
if (context.isPreview)
|
|
63287
63280
|
return "4:30 hr";
|
|
63288
63281
|
const data = context.usageData ?? {};
|
|
@@ -63295,8 +63288,7 @@ class ResetTimerWidget {
|
|
|
63295
63288
|
const isChargedModel = is1mModel && !isOpus;
|
|
63296
63289
|
if (data.extraUsageEnabled && data.extraUsageUsed !== undefined && data.extraUsageLimit !== undefined && (data.weeklyUsage !== undefined && data.weeklyUsage >= 100 || data.sessionUsage !== undefined && data.sessionUsage >= 100 || isChargedModel)) {
|
|
63297
63290
|
const used = formatCents(data.extraUsageUsed);
|
|
63298
|
-
const
|
|
63299
|
-
const limit = formatCents(effectiveTotal);
|
|
63291
|
+
const limit = formatCents(data.extraUsageLimit);
|
|
63300
63292
|
return `${DARK_RED_OPEN2}Extra: ${used}/${limit}${DARK_RED_CLOSE2}`;
|
|
63301
63293
|
}
|
|
63302
63294
|
if (!data.sessionResetAt)
|