MCPcopy
hub / github.com/codeaashu/claude-code / getFastModeState

Function getFastModeState

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

Source from the content-addressed store, hash-verified

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