MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getFastModeState

Function getFastModeState

source code/utils/fastMode.ts:321–337  ·  view source on GitHub ↗
(
  model: ModelSetting,
  fastModeUserEnabled: boolean | undefined,
)

Source from the content-addressed store, hash-verified

319}
320
321export function getFastModeState(
322 model: ModelSetting,
323 fastModeUserEnabled: boolean | undefined,
324): 'off' | 'cooldown' | 'on' {
325 const enabled =
326 isFastModeEnabled() &&
327 isFastModeAvailable() &&
328 !!fastModeUserEnabled &&
329 isFastModeSupportedByModel(model)
330 if (enabled && isFastModeCooldown()) {
331 return 'cooldown'
332 }
333 if (enabled) {
334 return 'on'
335 }
336 return 'off'
337}
338
339// Disabled reason returned by the API. The API is the canonical source for why
340// 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