mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 06:15:51 +00:00
feat: 添加 cacheWarningEnabled 配置项,支持在 /config 面板关闭缓存率警告
This commit is contained in:
@@ -133,6 +133,7 @@ import { getAPIProvider } from './utils/model/providers.js'
|
||||
import {
|
||||
createCacheWarningMessage,
|
||||
getCacheThreshold,
|
||||
isCacheWarningEnabled,
|
||||
shouldShowCacheWarning,
|
||||
} from './utils/cacheWarning.js'
|
||||
|
||||
@@ -1256,7 +1257,7 @@ async function* queryLoop(
|
||||
cache_read_input_tokens: number
|
||||
}
|
||||
| undefined
|
||||
if (usage) {
|
||||
if (usage && isCacheWarningEnabled()) {
|
||||
const warningInfo = shouldShowCacheWarning(
|
||||
usage,
|
||||
querySource,
|
||||
|
||||
Reference in New Issue
Block a user