fix(usage): refresh work status quotas automatically
This commit is contained in:
@@ -1260,18 +1260,9 @@ const sanitizeWebSettings = (payload: unknown): DesktopSettings | null => {
|
||||
if (typeof candidate.maxLastMessageLength === 'number' && Number.isFinite(candidate.maxLastMessageLength)) {
|
||||
result.maxLastMessageLength = Math.max(10, Math.round(candidate.maxLastMessageLength));
|
||||
}
|
||||
if (typeof candidate.usageAutoRefresh === 'boolean') {
|
||||
result.usageAutoRefresh = candidate.usageAutoRefresh;
|
||||
}
|
||||
if (typeof candidate.usageRefreshIntervalMs === 'number' && Number.isFinite(candidate.usageRefreshIntervalMs)) {
|
||||
result.usageRefreshIntervalMs = candidate.usageRefreshIntervalMs;
|
||||
}
|
||||
if (candidate.usageDisplayMode === 'usage' || candidate.usageDisplayMode === 'remaining') {
|
||||
result.usageDisplayMode = candidate.usageDisplayMode;
|
||||
}
|
||||
if (typeof candidate.usageShowPredValues === 'boolean') {
|
||||
result.usageShowPredValues = candidate.usageShowPredValues;
|
||||
}
|
||||
if (Array.isArray(candidate.usageDropdownProviders)) {
|
||||
result.usageDropdownProviders = candidate.usageDropdownProviders.filter(
|
||||
(entry): entry is string => typeof entry === 'string' && entry.length > 0
|
||||
|
||||
Reference in New Issue
Block a user