feat: support Gemini CLI v1internal quota

This commit is contained in:
Mas0nShi
2026-05-21 15:38:10 +08:00
parent b84e4a96e2
commit e53d5f07e8
67 changed files with 1898 additions and 79 deletions
@@ -781,6 +781,18 @@ fn admin_pool_build_grok_account_quota_from_snapshot(
fn admin_pool_build_gemini_cli_account_quota_from_snapshot(
quota_snapshot: &serde_json::Map<String, serde_json::Value>,
) -> Option<String> {
if let Some(credits) = quota_snapshot
.get("credits")
.and_then(serde_json::Value::as_object)
{
if let Some(remaining) = admin_pool_json_to_f64(credits.get("remaining")) {
return Some(format!(
"AI Credits 剩余 {}",
admin_pool_format_quota_value(remaining)
));
}
}
let now = chrono::Utc::now().timestamp();
let mut active = admin_pool_quota_windows(quota_snapshot)
.into_iter()