import { useStore } from "../store/useStore";
import { ChevronDown, LokiMark } from "./Icon";
import { ModelSelector } from "./ModelSelector";
/** Barre supérieure sombre : logo, fil d'Ariane, statut Ollama, sélecteur. */
export function TopBar() {
const status = useStore((s) => s.status);
const stats = useStore((s) => s.systemStats);
const connected = status?.connected ?? false;
return (
Nouvelle session
{/* Stats système temps réel : CPU, RAM, GPU/VRAM */}
{stats && (
CPU {stats.cpu_pct.toFixed(0)}%
·
RAM {stats.ram_pct.toFixed(0)}%
{stats.gpu && (
<>
·
GPU {stats.gpu.util_pct.toFixed(0)}%
VRAM {(stats.gpu.vram_used_mb / 1024).toFixed(1)}/
{(stats.gpu.vram_total_mb / 1024).toFixed(1)}G
>
)}
)}
{/* Statut Ollama */}
Ollama
{connected ? status?.host.replace(/^https?:\/\//, "") : "déconnecté"}
);
}