import { useRef, useEffect } from 'react';
import { Cpu, Activity } from 'lucide-react';
export default function ReasoningSidebar({ logs, status }) {
const bottomRef = useRef(null);
useEffect(() => {
bottomRef.current?.scrollIntoView({ behavior: 'smooth' });
}, [logs]);
return (
<>
{/* Header */}
GEMINI 3 FLASH
{status.toUpperCase()}
{/* Log Stream */}
{(!logs || logs.length === 0) && (
Waiting for agent thoughts...
)}
{logs && [...logs].reverse().map((log, i) => (
{log.action}
0.7 ? 'confidence-bar-high' : 'confidence-bar-low'}`}
style={{ width: `${log.confidence * 100}%` }}
/>
{(log.confidence * 100).toFixed(0)}%
{log.reasoning}
{new Date(log.timestamp).toLocaleTimeString()}
GEMINI-2.0-FLASH
))}
{/* Footer */}
Live connection established
>
);
}