()
| 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 { |
no test coverage detected