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

Function fetchWithCurrentAuth

src/utils/fastMode.ts:450–462  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

448 lastPrefetchAt = now
449
450 const fetchWithCurrentAuth = async (): Promise<FastModeResponse> => {
451 const currentTokens = getClaudeAIOAuthTokens()
452 const auth =
453 currentTokens?.accessToken && hasProfileScope()
454 ? { accessToken: currentTokens.accessToken }
455 : apiKey
456 ? { apiKey }
457 : null
458 if (!auth) {
459 throw new Error('No auth available')
460 }
461 return fetchFastModeStatus(auth)
462 }
463
464 async function doFetch(): Promise<void> {
465 try {

Callers 1

doFetchFunction · 0.85

Calls 2

fetchFastModeStatusFunction · 0.85
hasProfileScopeFunction · 0.70

Tested by

no test coverage detected