mirror of
https://github.com/R0m1k3/Loki.git
synced 2026-10-23 15:08:16 +02:00
Add real-time system stats (CPU/RAM/GPU/VRAM) and fix favicon
Favicon now matches the LokiMark topbar icon instead of an unrelated arrow glyph. New /api/system/stats endpoint (psutil + nvidia-smi) polled every 2s and shown in the topbar next to the Ollama status.
This commit is contained in:
1 parent
b9bccac4ba
commit
ecadf55743
8 files changed
+120
-7
No files matched your search
+11
-5
@@ -10,16 +10,22 @@ import { useStore } from "./store/useStore";
|
||||
|
||||
export default function App() {
|
||||
const [view, setView] = useState<View>("chat");
|
||||
const { refreshStatus, refreshModels, refreshConfig } = useStore();
|
||||
const { refreshStatus, refreshSystemStats, refreshModels, refreshConfig } =
|
||||
useStore();
|
||||
|
||||
// Au démarrage : statut Ollama + modèles + config. Poll du statut.
|
||||
// Au démarrage : statut Ollama + modèles + config. Poll du statut et des stats système.
|
||||
useEffect(() => {
|
||||
refreshStatus();
|
||||
refreshSystemStats();
|
||||
refreshModels();
|
||||
refreshConfig();
|
||||
const id = setInterval(refreshStatus, 10000);
|
||||
return () => clearInterval(id);
|
||||
}, [refreshStatus, refreshModels, refreshConfig]);
|
||||
const statusId = setInterval(refreshStatus, 10000);
|
||||
const statsId = setInterval(refreshSystemStats, 2000);
|
||||
return () => {
|
||||
clearInterval(statusId);
|
||||
clearInterval(statsId);
|
||||
};
|
||||
}, [refreshStatus, refreshSystemStats, refreshModels, refreshConfig]);
|
||||
|
||||
return (
|
||||
<div className="flex h-full flex-col bg-base text-ink">
|
||||
|
||||
Reference in new issue
Block a user