use crate::color; use crate::section::{RenderContext, SectionOutput}; pub fn render(ctx: &RenderContext) -> Option { if !ctx.config.sections.cost_velocity.enabled { return None; } ctx.input.cost.as_ref()?; let velocity = ctx.metrics.cost_velocity.unwrap_or(0.0); let raw = format!("${velocity:.2}/min"); let ansi = if ctx.color_enabled { format!("{}{raw}{}", color::DIM, color::RESET) } else { raw.clone() }; Some(SectionOutput { raw, ansi }) }