MCPcopy
hub / github.com/claude-code-best/claude-code / fetchFastModeStatus

Function fetchFastModeStatus

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

Source from the content-addressed store, hash-verified

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

Callers 1

fetchWithCurrentAuthFunction · 0.85

Calls 1

getOauthConfigFunction · 0.85

Tested by

no test coverage detected