llmtop 0.1.0

Realtime TUI monitor for local LLM servers (ollama, llama.cpp). The only GPU monitor that knows what model is running and how much each token costs you in energy and dollar-equivalent.
mod footer;
mod sparkline;
mod table;

use ratatui::{
    Frame,
    layout::{Constraint, Direction, Layout},
};

use crate::app::App;

pub fn draw(f: &mut Frame, app: &App) {
    let area = f.area();
    let chunks = Layout::default()
        .direction(Direction::Vertical)
        .constraints([
            Constraint::Min(6),     // models table
            Constraint::Length(11), // charts (side-by-side, taller)
            Constraint::Length(3),  // session footer
        ])
        .split(area);

    table::draw(f, chunks[0], app);
    sparkline::draw(f, chunks[1], app);
    footer::draw(f, chunks[2], app);
}