mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-26 17:09:28 +08:00
feat(panel): add experimental quota reservation estimator, violet bar indicator, and clipboard log export
This commit is contained in:
@@ -556,6 +556,20 @@ export function normalizeContextAgentMode(raw) {
|
||||
return val === 'auto' ? 'auto' : 'main';
|
||||
}
|
||||
|
||||
/**
|
||||
* 归一化实验性配额预占估算开关(默认 `false`)。
|
||||
*
|
||||
* @param {unknown} val
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function normalizeExperimentalQuotaReservation(val) {
|
||||
if (typeof val === 'string') {
|
||||
const lower = val.trim().toLowerCase();
|
||||
return lower === 'true' || lower === '1' || lower === 'on';
|
||||
}
|
||||
return Boolean(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* 归一化旧版实验性新 UI 字段(保留兼容,缺省返回 `false`)。
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user