systemprompt_logging/services/cli/
startup.rs1#![allow(clippy::print_stdout)]
2
3use crate::services::cli::theme::BrandColors;
4
5pub fn render_startup_banner(subtitle: Option<&str>) {
6 println!();
7 println!(
8 "{}{}{}{}{}",
9 BrandColors::primary_bold("</"),
10 BrandColors::white_bold("SYSTEMPROMPT"),
11 BrandColors::primary_bold("."),
12 BrandColors::white("io"),
13 BrandColors::primary_bold(">")
14 );
15 if let Some(text) = subtitle {
16 println!("{}", BrandColors::dim(text));
17 }
18 println!();
19}
20
21pub fn render_phase_header(name: &str) {
22 println!(
23 "\n{} {}",
24 BrandColors::primary("▸"),
25 BrandColors::white_bold(name)
26 );
27}
28
29pub fn render_phase_item(icon: &str, message: &str, detail: Option<&str>) {
30 match detail {
31 Some(d) => println!(
32 " {} {} {}",
33 icon,
34 message,
35 BrandColors::dim(format!("({})", d))
36 ),
37 None => println!(" {} {}", icon, message),
38 }
39}
40
41pub fn render_phase_success(message: &str, detail: Option<&str>) {
42 render_phase_item(&format!("{}", BrandColors::running("✓")), message, detail);
43}
44
45pub fn render_phase_info(message: &str, detail: Option<&str>) {
46 render_phase_item(&format!("{}", BrandColors::highlight("ℹ")), message, detail);
47}
48
49pub fn render_phase_warning(message: &str, detail: Option<&str>) {
50 render_phase_item(&format!("{}", BrandColors::starting("⚠")), message, detail);
51}