fix(usage): refresh work status quotas automatically

This commit is contained in:
Bohdan Triapitsyn
2026-08-11 12:58:36 +03:00
parent 99e254acf3
commit b55152db6f
31 changed files with 130 additions and 625 deletions
@@ -326,20 +326,6 @@ export const persistSettings = async (changes: Record<string, unknown>, ctx?: Br
}
}
if (typeof restChanges.usageAutoRefresh !== 'boolean') {
delete restChanges.usageAutoRefresh;
}
if (typeof restChanges.usageShowPredValues !== 'boolean') {
delete restChanges.usageShowPredValues;
}
if (typeof restChanges.usageRefreshIntervalMs === 'number' && Number.isFinite(restChanges.usageRefreshIntervalMs)) {
restChanges.usageRefreshIntervalMs = Math.max(30000, Math.min(300000, Math.round(restChanges.usageRefreshIntervalMs)));
} else {
delete restChanges.usageRefreshIntervalMs;
}
if (typeof restChanges.opencodeBinary === 'string') {
restChanges.opencodeBinary = restChanges.opencodeBinary.trim();
}