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
@@ -2,6 +2,7 @@ import React from 'react';
import { ThemeToggle } from './ThemeToggle';
import { ThemePreference } from '../hooks/useTheme';
import { GitHubStarsButton } from './GitHubStarsButton';
import { useSpinningFavicon } from '../hooks/useSpinningFavicon';
interface HeaderProps {
isConnected: boolean;
@@ -26,6 +27,8 @@ export function Header({
onThemeChange,
onContextPreviewToggle
}: HeaderProps) {
useSpinningFavicon(isProcessing);
return (
<div className="header">
<h1>