gpt_commit 0.1.2

A tool to make ChatGPT create a commit message based on a `git diff`.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
pub fn get_choices(message: String) -> Vec<String> {
    let lines: Vec<&str> = message.split('\n').collect();
    let mut choices = Vec::new();

    for line in lines {
        if line.chars().next().map_or(false, |c| c.is_digit(10)) {
            let msg = line.split(". ").skip(1).collect::<String>();
            choices.push(msg);
        }
    }
    choices
}