Skip to main content

opencode_ralph_loop_cli/output/
text.rs

1use crate::output::{FileEntry, Report, Summary};
2
3pub fn print_entry(entry: &FileEntry) {
4    println!("{} {}", entry.action.as_str(), entry.path);
5}
6
7pub fn print_summary(summary: &Summary) {
8    println!(
9        "\nSummary: {} created, {} updated, {} skipped, {} modified, {} missing, {} removed",
10        summary.created,
11        summary.updated,
12        summary.skipped,
13        summary.modified,
14        summary.missing,
15        summary.removed,
16    );
17}
18
19pub fn print_report(report: &Report) {
20    for entry in &report.files {
21        print_entry(entry);
22    }
23    print_summary(&report.summary);
24}
25
26pub fn print_install_hint(opencode_dir: &std::path::Path) {
27    let path_display = opencode_dir.display();
28    println!("\nNext steps:");
29    println!("  cd {path_display} && bun install");
30    println!("  # or: cd {path_display} && npm install");
31}