Skip to main content

git_context

Function git_context 

Source
pub fn git_context(project_root: &Path) -> Option<String>
Expand description

Compact git context for injection into the system prompt.

Returns None if not in a git repo. Includes:

  • Current branch name
  • Staged diff stat (truncated)
  • Unstaged diff stat (truncated)
  • Last N commit subjects