(resetAt?: Date)
| 44 | * and use Codebuff backend until the reset time. |
| 45 | */ |
| 46 | export function markChatGptOAuthRateLimited(resetAt?: Date): void { |
| 47 | const fiveMinutesFromNow = Date.now() + 5 * 60 * 1000 |
| 48 | chatGptOAuthRateLimitedUntil = resetAt |
| 49 | ? resetAt.getTime() |
| 50 | : fiveMinutesFromNow |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * Check if ChatGPT OAuth is currently rate-limited. |
no outgoing calls
no test coverage detected