MCPcopy Index your code
hub / github.com/codeaashu/claude-code / fetchFastModeStatus

Function fetchFastModeStatus

src/utils/fastMode.ts:367–381  ·  view source on GitHub ↗
(
  auth: { accessToken: string } | { apiKey: string },
)

Source from the content-addressed store, hash-verified

365}
366
367async function fetchFastModeStatus(
368 auth: { accessToken: string } | { apiKey: string },
369): Promise<FastModeResponse> {
370 const endpoint = `${getOauthConfig().BASE_API_URL}/api/claude_code_penguin_mode`
371 const headers: Record<string, string> =
372 'accessToken' in auth
373 ? {
374 Authorization: `Bearer ${auth.accessToken}`,
375 'anthropic-beta': OAUTH_BETA_HEADER,
376 }
377 : { 'x-api-key': auth.apiKey }
378
379 const response = await axios.get<FastModeResponse>(endpoint, { headers })
380 return response.data
381}
382
383const PREFETCH_MIN_INTERVAL_MS = 30_000
384let lastPrefetchAt = 0

Callers 1

fetchWithCurrentAuthFunction · 0.85

Calls 1

getOauthConfigFunction · 0.85

Tested by

no test coverage detected