MCPcopy Create free account
hub / github.com/Noumena-Network/code / fetchFastModeStatus

Function fetchFastModeStatus

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

Source from the content-addressed store, hash-verified

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

Callers 2

fetchWithCurrentAuthFunction · 0.85
doFetchFunction · 0.85

Calls 1

buildNoumenaPlatformUrlFunction · 0.85

Tested by

no test coverage detected