Native node: VRAM-tila TUI:ssa (ollama ps)
- fetch_ps(): hakee /api/ps ja palauttaa ModelVramStatus - ModelVramStatus: size vs size_vram → 100% GPU / osittainen / CPU - TUI: uusi "VRAM: ✓ qwen3:32b (20.1 GB) — 100% GPU" -rivi - Taustapäivitys 30s välein - Tuore linux-x86_64 binääri
This commit is contained in:
@@ -36,6 +36,8 @@ pub struct DashboardState {
|
||||
pub last_tokens_sec: f64,
|
||||
pub network_active_nodes: usize,
|
||||
pub network_total_tasks: u64,
|
||||
// VRAM-tila (ollama ps)
|
||||
pub vram_status: String,
|
||||
// Mallivalikko
|
||||
pub model_picker_open: bool,
|
||||
pub model_picker_items: Vec<String>,
|
||||
@@ -56,6 +58,7 @@ impl DashboardState {
|
||||
last_tokens_sec: 0.0,
|
||||
network_active_nodes: 1, // oletetaan itsemme
|
||||
network_total_tasks: 0,
|
||||
vram_status: "Haetaan...".to_string(),
|
||||
model_picker_open: false,
|
||||
model_picker_items: Vec::new(),
|
||||
model_picker_idx: 0,
|
||||
@@ -182,7 +185,7 @@ fn ui(f: &mut ratatui::Frame, st: &DashboardState) {
|
||||
let body_chunks = Layout::default()
|
||||
.direction(Direction::Vertical)
|
||||
.constraints([
|
||||
Constraint::Length(7), // Yläosan info ja tehtävä
|
||||
Constraint::Length(8), // Yläosan info ja tehtävä
|
||||
Constraint::Min(0), // Lokit / Chat alas
|
||||
].as_ref())
|
||||
.split(chunks[1]);
|
||||
@@ -197,8 +200,8 @@ fn ui(f: &mut ratatui::Frame, st: &DashboardState) {
|
||||
|
||||
// Vasen paneeli: Laitteisto, Malli & Verkosto
|
||||
let info_text = format!(
|
||||
"🚀 Malli: {}\n💻 Järjestelmä: {}\n📊 Tehdyt: {} | Nopeus: {} t/s\n🌐 Verkosto: {} solmua | {} tehtävää",
|
||||
st.model_name, st.sys_info, st.tasks_completed, st.last_tokens_sec, st.network_active_nodes, st.network_total_tasks
|
||||
"🚀 Malli: {}\n🎮 VRAM: {}\n💻 Järjestelmä: {}\n📊 Tehdyt: {} | Nopeus: {} t/s\n🌐 Verkosto: {} solmua | {} tehtävää",
|
||||
st.model_name, st.vram_status, st.sys_info, st.tasks_completed, st.last_tokens_sec, st.network_active_nodes, st.network_total_tasks
|
||||
);
|
||||
let left_panel = Paragraph::new(info_text)
|
||||
.block(Block::default().title(" Laitteisto ja AI ").borders(Borders::ALL))
|
||||
|
||||
Reference in New Issue
Block a user