kubeagent 0.1.24 → 0.1.25
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/dist/cli.js +6 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -457,8 +457,12 @@ program
|
|
|
457
457
|
const resetDate = new Date(balance.resetsAt).toLocaleDateString(undefined, { month: "short", day: "numeric", year: "numeric" });
|
|
458
458
|
console.log(` Resets: ${resetDate}`);
|
|
459
459
|
}
|
|
460
|
-
//
|
|
461
|
-
if (balance.
|
|
460
|
+
// Exhausted balance warning
|
|
461
|
+
if (balance.totalRemaining === 0) {
|
|
462
|
+
console.log("\n" + chalk.red(" Balance exhausted.") + " Upgrade or buy credits at " + chalk.cyan(upgradeUrl));
|
|
463
|
+
// Low-balance warning: < 20% of monthly allocation remaining
|
|
464
|
+
}
|
|
465
|
+
else if (balance.monthlyTotal > 0 && balance.monthlyRemaining < balance.monthlyTotal * 0.2) {
|
|
462
466
|
const pct = Math.round((balance.monthlyRemaining / balance.monthlyTotal) * 100);
|
|
463
467
|
console.log("\n" + chalk.yellow(` ⚠ Low balance: ${pct}% of monthly tokens remaining.`));
|
|
464
468
|
console.log(chalk.dim(` Upgrade or buy extra credits: `) + chalk.cyan(upgradeUrl));
|