@i18n-agent/cli 1.0.1 → 1.0.2
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/package.json +1 -1
- package/src/commands/credits.js +1 -1
package/package.json
CHANGED
package/src/commands/credits.js
CHANGED
|
@@ -14,7 +14,7 @@ export async function creditsAction(opts) {
|
|
|
14
14
|
const credits = data.credits ?? data.remainingCredits ?? data;
|
|
15
15
|
if (typeof credits === 'object') {
|
|
16
16
|
const remaining = credits.remaining ?? credits.balance ?? 'unknown';
|
|
17
|
-
const wordsRemaining = credits.wordsRemaining ?? (typeof remaining === 'number' ? Math.floor(remaining
|
|
17
|
+
const wordsRemaining = credits.wordsRemaining ?? (typeof remaining === 'number' ? Math.floor(remaining) : 'unknown');
|
|
18
18
|
return `Credits remaining: ${remaining}\nEstimated words: ${typeof wordsRemaining === 'number' ? wordsRemaining.toLocaleString() : wordsRemaining}\n\nTop up at: https://app.i18nagent.ai`;
|
|
19
19
|
}
|
|
20
20
|
return `Credits: ${JSON.stringify(credits)}`;
|