Show separate Codex usage pools

This commit is contained in:
iris committed 2026-09-08 00:41:06 -04:00
1 parent 7ee88dfd9c
commit 00538cc19b
4 files changed
+119 -28

No files matched your search

@@ -108,7 +108,7 @@ private fun UsageBody(state: LoadState<List<UsageSnapshot>>) {
// read as a section of their own. Small and quiet, because the numbers
// below are what somebody opened this to see.
Text(
"${snapshot.setupName.ifEmpty { snapshot.setup }} · ${snapshot.provider}",
usageSectionTitle(snapshot),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
@@ -127,6 +127,20 @@ private fun UsageBody(state: LoadState<List<UsageSnapshot>>) {
}
}
private fun usageSectionTitle(snapshot: UsageSnapshot): String {
val machine = snapshot.setupName.ifEmpty { snapshot.setup }
val provider = snapshot.provider
val pool =
if (provider == "codex" && snapshot.limitId != "codex") {
when (snapshot.limitName) {
"gpt-reserve" -> "Luna Reserve"
null -> snapshot.limitId
else -> snapshot.limitName
}
} else null
return listOfNotNull(machine, provider, pool).joinToString(" · ")
}
/**
* Anything other than numbers: why this machine has none.
*