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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user