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

Function fetchFastModeStatus

source code/utils/fastMode.ts:369–383  ·  view source on GitHub ↗
(
  auth: { accessToken: string } | { apiKey: string },
)

Source from the content-addressed store, hash-verified

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

Callers 1

fetchWithCurrentAuthFunction · 0.85

Calls 1

getOauthConfigFunction · 0.85

Tested by

no test coverage detected