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

Function fetchWithCurrentAuth

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

Source from the content-addressed store, hash-verified

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

Callers 1

doFetchFunction · 0.85

Calls 2

fetchFastModeStatusFunction · 0.85
hasProfileScopeFunction · 0.70

Tested by

no test coverage detected