[FEATURE]: Use K/M compact notation instead of locale myriad units (e.g. "67万") for token counts in Desktop/Web UI

オープン 初心者向け
#68,437 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript

調査の方向性

packages/gui-plugins/src/context/indicator.tsx(67~71行目)とpackages/app/src/providers/models/details.tsx(157~161行目)の簡潔な書式を読み、packages/tui/src/feature-plugins/system/stats-data.tsと比較してください。トークン数とコンテキスト上限に、すべてのロケールでK/M表記を使用するようUIの書式を更新してください。完了条件は、中国語、日本語、韓国語の各ロケールで、UIの両方の箇所に一貫してK/M形式の値が表示されることです。

索引モデルが issue の本文から書いたものです。

説明

area/desktop type/feature version/v2
Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request

In the Desktop / Web UI, when the language is set to Chinese (zh-CN, and similarly zh-TW / ja / ko), compact token counts in the header context indicator are formatted with locale myriad units—e.g. 359,427 tokens shows as 36万 instead of 360k / 359K.

The header context indicator:
image

Total Tokens:
image

In LLM and developer contexts, CJK users universally expect K / M notation for token counts and context windows (128K, 200K, 330K, 1M), matching model specs and other AI coding tools. Seeing 67万 forces a mental ×10 conversion every time and loses precision at 10k boundaries (e.g. 128,000 becomes 12万).

This happens because Intl.NumberFormat passes the UI locale with notation: "compact":

  • packages/gui-plugins/src/context/indicator.tsx (lines 67–71)
  • packages/app/src/providers/models/details.tsx (lines 157–161)

Using "en-US" (as already done in packages/tui/src/feature-plugins/system/stats-data.ts) for compact token / context-limit formatting would keep K / M consistent across all locales.

主要言語
TypeScript
スター
230k
フォーク
31.3k
平均マージ
5時間 44分
マージ済み PR(30日)
529

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

anomalyco/opencode のほかの issue

anomalyco/opencode の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。