mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 04:47:03 -06:00
style(android): satisfy compact token ktlint
This commit is contained in:
@@ -13035,7 +13035,7 @@
|
||||
},
|
||||
{
|
||||
"kind": "ui-call",
|
||||
"line": 252,
|
||||
"line": 253,
|
||||
"path": "apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatTurnRecap.kt",
|
||||
"source": "${decimal(count / 1_000_000.0)}M",
|
||||
"surface": "android",
|
||||
@@ -13043,7 +13043,7 @@
|
||||
},
|
||||
{
|
||||
"kind": "ui-call",
|
||||
"line": 259,
|
||||
"line": 260,
|
||||
"path": "apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatTurnRecap.kt",
|
||||
"source": "${thousands}k",
|
||||
"surface": "android",
|
||||
|
||||
@@ -247,6 +247,7 @@ internal fun turnRecapTokenFormat(count: Long): TurnRecapTokenFormat = TurnRecap
|
||||
|
||||
internal fun formatCompactTokenCount(count: Long): String {
|
||||
fun decimal(value: Double): String = String.format(Locale.US, "%.1f", value).removeSuffix(".0")
|
||||
|
||||
fun millions(): String {
|
||||
val value = decimal(count / 1_000_000.0)
|
||||
return nativeString("\${decimal(count / 1_000_000.0)}M", value)
|
||||
|
||||
Reference in New Issue
Block a user