()
| 54 | * Check if ChatGPT OAuth is currently rate-limited. |
| 55 | */ |
| 56 | export function isChatGptOAuthRateLimited(): boolean { |
| 57 | if (chatGptOAuthRateLimitedUntil === null) { |
| 58 | return false |
| 59 | } |
| 60 | if (Date.now() >= chatGptOAuthRateLimitedUntil) { |
| 61 | chatGptOAuthRateLimitedUntil = null |
| 62 | return false |
| 63 | } |
| 64 | return true |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * Reset the ChatGPT OAuth rate-limit cache. |
no outgoing calls
no test coverage detected