feat: add spinning favicon during processing and implement rate limiting for Gemini API requests

- Introduced a new hook `useSpinningFavicon` to animate the favicon when processing is ongoing.
- Updated the `Header` component to utilize the new spinning favicon feature.
- Added a rate limit delay of 100ms between requests to the Gemini API in `GeminiAgent`.
This commit is contained in:
Alex Newman
2025-12-25 19:03:29 -05:00
parent 954157e9e0
commit b2b14a1b95
5 changed files with 108 additions and 9 deletions
+3
View File
@@ -264,6 +264,9 @@ export class GeminiAgent {
const url = `${GEMINI_API_URL}/${model}:generateContent?key=${apiKey}`;
// Rate limit delay - Gemini API requires spacing between requests
await new Promise(resolve => setTimeout(resolve, 100));
const response = await fetch(url, {
method: 'POST',
headers: {