diffctx 1.12.1

Selects the minimum code an LLM needs to review a git diff: walks the dependency graph outward from changed lines and stops when extra context stops paying for itself
Documentation
use once_cell::sync::Lazy;

pub struct Bm25Config {
    pub k1: f64,
    pub b: f64,
    pub idf_smoothing: f64,
    pub min_query_token_length: usize,
}

impl Default for Bm25Config {
    fn default() -> Self {
        Self {
            k1: 2.5,
            b: 0.75,
            idf_smoothing: 0.5,
            min_query_token_length: 3,
        }
    }
}

pub static BM25: Lazy<Bm25Config> = Lazy::new(Bm25Config::default);