MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / getFastModeState

Function getFastModeState

src/utils/fastMode.ts:322–338  ·  view source on GitHub ↗
(
  model: ModelSetting,
  fastModeUserEnabled: boolean | undefined,
)

Source from the content-addressed store, hash-verified

320}
321
322export function getFastModeState(
323 model: ModelSetting,
324 fastModeUserEnabled: boolean | undefined,
325): 'off' | 'cooldown' | 'on' {
326 const enabled =
327 isFastModeEnabled() &&
328 isFastModeAvailable() &&
329 !!fastModeUserEnabled &&
330 isFastModeSupportedByModel(model)
331 if (enabled && isFastModeCooldown()) {
332 return 'cooldown'
333 }
334 if (enabled) {
335 return 'on'
336 }
337 return 'off'
338}
339
340// Disabled reason returned by the API. The API is the canonical source for why
341// fast mode is disabled (free account, admin preference, extra usage not enabled).

Callers 3

submitMessageMethod · 0.85
buildSystemInitMessageFunction · 0.85
handleInitializeRequestFunction · 0.85

Calls 4

isFastModeEnabledFunction · 0.85
isFastModeAvailableFunction · 0.85
isFastModeCooldownFunction · 0.85

Tested by

no test coverage detected