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

@@ -891,6 +891,10 @@ data class UsageSnapshot(
val setup: String,
/** That machine's current label. */
val setupName: String,
/** Provider-specific billing pool, such as Codex's regular or Luna Reserve pool. */
val limitId: String?,
/** Provider-specific human-facing pool name, when supplied. */
val limitName: String?,
/**
* What came back: "ok", "notLoggedIn", "unreachable" or "failed".
*
@@ -912,6 +916,8 @@ fun fetchUsage(settings: ServerSettings): List<UsageSnapshot> =
provider = snapshot.getString("provider"),
setup = snapshot.optString("setup"),
setupName = snapshot.optString("setupName"),
limitId = snapshot.optString("limitId").ifEmpty { null },
limitName = snapshot.optString("limitName").ifEmpty { null },
// Unknown to an older backend, and unknown is not "fine": defaulting to "ok" would
// draw an empty card as a healthy one.
state = snapshot.optString("state").ifEmpty { "failed" },