storing credits (#6858)

Expand the rate-limit cache/TUI: store credit snapshots alongside
primary and secondary windows, render “Credits” when the backend reports
they exist (unlimited vs rounded integer balances)
This commit is contained in:
zhao-oai
2025-11-19 10:49:35 -08:00
committed by GitHub
parent b3d320433f
commit 72af589398
15 changed files with 548 additions and 41 deletions

View File

@@ -1121,7 +1121,8 @@ async fn token_count_includes_rate_limits_snapshot() {
"used_percent": 40.0,
"window_minutes": 60,
"resets_at": 1704074400
}
},
"credits": null
}
})
);
@@ -1168,7 +1169,8 @@ async fn token_count_includes_rate_limits_snapshot() {
"used_percent": 40.0,
"window_minutes": 60,
"resets_at": 1704074400
}
},
"credits": null
}
})
);
@@ -1238,7 +1240,8 @@ async fn usage_limit_error_emits_rate_limit_event() -> anyhow::Result<()> {
"used_percent": 87.5,
"window_minutes": 60,
"resets_at": null
}
},
"credits": null
});
let submission_id = codex