generalbots/src/ui/stream.rs
Rodrigo Rodriguez (Pragmatismo) d07e1fd279 fix: add PostgreSQL auto-start and silence unused variable warnings
Added a check in `BootstrapManager` to detect if PostgreSQL is running and attempt to start the "tables" component automatically if not. Also prefixed unused variables and struct fields with underscores in compiler, session, and model modules to suppress warnings and improve code clarity.
2025-11-07 09:37:45 -03:00

26 lines
627 B
Rust

use ratatui::{
style::{Color, Style},
widgets::{Block, Borders, Gauge},
};
pub struct StreamProgress {
pub progress: f64,
pub status: String,
}
pub fn render_progress_bar(progress: &StreamProgress) -> Gauge {
let color = if progress.progress >= 1.0 {
Color::Green
} else {
Color::Blue
};
Gauge::default()
.block(
Block::default()
.title(format!("Stream Progress: {}", progress.status))
.borders(Borders::ALL),
)
.gauge_style(Style::default().fg(color))
.percent((progress.progress * 100.0) as u16)
}