elph 0.0.11

Minimalist AI agent companion for coding
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use clap::CommandFactory;
use colored::Colorize;

use crate::runtime::{EXIT_ERROR, EXIT_SUCCESS, ExitCode};

pub fn print_subcommand_help<T: CommandFactory>() -> ExitCode {
    let mut cmd = T::command();
    if cmd.print_help().is_err() {
        return EXIT_ERROR;
    }
    println!();
    EXIT_SUCCESS
}

pub fn unimplemented(message: &str) {
    eprintln!("{}", message.yellow());
}