File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -179,12 +179,16 @@ text_str = to_text(tree)
179179md_str = to_markdown(tree)
180180
181181# Diff context mode
182- from treemapper import build_diff_context
182+ from pathlib import Path
183+ from treemapper import build_diff_context, to_yaml
183184
184185ctx = build_diff_context(
185- root_dir, # Path to repository root
186- diff_range, # e.g. "HEAD~1..HEAD", "main..feature"
187- budget_tokens=None, # token limit (None = convergence-based)
186+ Path("."), # repository root
187+ "HEAD~1..HEAD", # diff range; also accepts "main..feature"
188+ budget_tokens=None, # None = convergence-based (default)
189+ # 0 = diff only, no expansion (recall floor)
190+ # <0 = unlimited (10M-token soft ceiling)
191+ # >0 = explicit token cap
188192 alpha=0.6, # PPR damping factor
189193 tau=0.08, # stopping threshold
190194 full=False, # skip smart selection
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ struct Cli {
2323 #[ arg( long, default_value = "yaml" ) ]
2424 format : String ,
2525
26- #[ arg( long) ]
26+ #[ arg( long = "diff" ) ]
2727 diff_ref : Option < String > ,
2828
2929 #[ arg( long, default_value_t = DEFAULT_PPR_ALPHA ) ]
Original file line number Diff line number Diff line change @@ -977,6 +977,7 @@ fn find_lang_config(path: &str) -> Option<&'static LangConfig> {
977977}
978978
979979static LANGUAGE_CACHE : Lazy < FxHashMap < & ' static str , Language > > = Lazy :: new ( || {
980+ #[ allow( unused_mut) ]
980981 let mut m: FxHashMap < & ' static str , Language > = FxHashMap :: default ( ) ;
981982
982983 #[ cfg( feature = "tree-sitter-python" ) ]
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ optional-dependencies.full = [
102102 " treemapper[tree-sitter]" ,
103103]
104104optional-dependencies.mcp = [
105+ " anyio>=4.5,<5.0" ,
105106 " mcp>=1.27,<2.0" ,
106107]
107108optional-dependencies.nlp = [
You can’t perform that action at this time.
0 commit comments