Skip to main content

strip_type_prefix

Function strip_type_prefix 

Source
pub fn strip_type_prefix(
    summary: &str,
    commit_type: &str,
    scope: Option<&str>,
) -> String
Expand description

Strip conventional commit type prefix if LLM included it in summary.

Some models return the full format feat(scope): summary instead of just summary. This function removes the prefix to normalize the response.