From 040c300c29c143562290b6df866f3a79b7e7fb53 Mon Sep 17 00:00:00 2001 From: Haileyesus Date: Fri, 27 Feb 2026 22:47:51 +0300 Subject: [PATCH] refactor: remove unused GeminiStatus component --- src/components/GeminiStatus.jsx | 90 --------------------------------- 1 file changed, 90 deletions(-) delete mode 100644 src/components/GeminiStatus.jsx diff --git a/src/components/GeminiStatus.jsx b/src/components/GeminiStatus.jsx deleted file mode 100644 index b5a10e7f..00000000 --- a/src/components/GeminiStatus.jsx +++ /dev/null @@ -1,90 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import { cn } from '../lib/utils'; - -function GeminiStatus({ status, onAbort, isLoading }) { - const [elapsedTime, setElapsedTime] = useState(0); - const [animationPhase, setAnimationPhase] = useState(0); - - // Update elapsed time every second - useEffect(() => { - if (!isLoading) { - setElapsedTime(0); - return; - } - - const startTime = Date.now(); - const timer = setInterval(() => { - const elapsed = Math.floor((Date.now() - startTime) / 1000); - setElapsedTime(elapsed); - }, 1000); - - return () => clearInterval(timer); - }, [isLoading]); - - // Animate the status indicator - useEffect(() => { - if (!isLoading) return; - - const timer = setInterval(() => { - setAnimationPhase(prev => (prev + 1) % 4); - }, 500); - - return () => clearInterval(timer); - }, [isLoading]); - - if (!isLoading) return null; - - // Clever action words that cycle - const actionWords = ['Thinking', 'Processing', 'Analyzing', 'Working', 'Computing', 'Reasoning']; - const actionIndex = Math.floor(elapsedTime / 3) % actionWords.length; - - // Parse status data - const statusText = status?.text || actionWords[actionIndex]; - const canInterrupt = status?.can_interrupt !== false; - - // Animation characters - const spinners = ['✻', '✹', '✸', '✶']; - const currentSpinner = spinners[animationPhase]; - - return ( -
-
-
-
- {/* Animated spinner */} - - {currentSpinner} - - - {/* Status text - first line */} -
-
- {statusText}... - ({elapsedTime}s) -
-
-
-
- - {/* Interrupt button */} - {canInterrupt && onAbort && ( - - )} -
-
- ); -} - -export default GeminiStatus; \ No newline at end of file