feat: 添加 cacheWarningEnabled 配置项,支持在 /config 面板关闭缓存率警告

This commit is contained in:
claude-code-best
2026-06-06 10:15:24 +08:00
parent 9947ae75da
commit a972ed795c
4 changed files with 34 additions and 1 deletions

View File

@@ -331,6 +331,24 @@ export function Config({
});
},
},
{
id: 'cacheWarningEnabled',
label: 'Cache warnings',
value: settingsData?.cacheWarningEnabled ?? true,
type: 'boolean' as const,
onChange(cacheWarningEnabled: boolean) {
updateSettingsForSource('localSettings', {
cacheWarningEnabled,
});
setSettingsData(prev => ({
...prev,
cacheWarningEnabled,
}));
logEvent('tengu_cache_warning_setting_changed', {
enabled: cacheWarningEnabled,
});
},
},
{
id: 'prefersReducedMotion',
label: 'Reduce motion',