Skip to main content

clean_commit_message

Function clean_commit_message 

Source
pub fn clean_commit_message(raw: &str) -> String
Expand description

Strip common LLM artifacts from the raw response so only the commit message remains.

Handles:

  • Markdown code fences (orcommit / ```text / etc.)
  • Leading label lines (“Here is your commit message:”, “Commit message:”, etc.)
  • Surrounding quotation marks