fix(usage): refresh work status quotas automatically
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user