fix(deepseek): USD-only balance display, drop CNY/¥

Launcher and statusline show only USD from balance_infos; ¥ removed.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Виталий Никитенко
2026-08-21 15:41:55 +03:00
parent 4331ebb675
commit 9448212a26
3 changed files with 11 additions and 13 deletions

View File

@@ -6,7 +6,7 @@ The custom statusline script renders **only ASCII-safe characters and ANSI color
- ASCII brackets `[ ]` for git branch and effort level
- ANSI 256-color escape sequences for model names, effort levels, and rate-limit percentages
- The `¥` symbol (U+00A5) for CNY balance in DeepSeek output
- The `$` symbol for the DeepSeek balance (USD only)
It does **not** use Nerd Font glyphs, powerline separators, or emoji.

View File

@@ -171,13 +171,12 @@ if [[ "$model_id" == *deepseek* ]]; then
import sys, json
d = json.load(sys.stdin)
infos = d.get('balance_infos', [])
symbols = {'USD': '\$', 'CNY': '\u00a5'}
parts = []
for info in infos:
curr = info.get('currency', '')
if info.get('currency', '').upper() != 'USD':
continue
total = info.get('total_balance', '0')
sym = symbols.get(curr, curr)
parts.append(f'{sym}{total}')
parts.append(f'\${total}')
if parts:
print(' '.join(parts))
" 2>/dev/null)