@@ -111,6 +111,11 @@ def config_group():
111111 type = str ,
112112 help = "Azure OpenAI deployment name"
113113)
114+ @click .option (
115+ "--use-gitignore/--no-gitignore" ,
116+ default = None ,
117+ help = "Apply Git ignore rules during repository analysis (default: enabled)" ,
118+ )
114119def config_set (
115120 api_key : Optional [str ],
116121 base_url : Optional [str ],
@@ -124,7 +129,8 @@ def config_set(
124129 provider : Optional [str ] = None ,
125130 aws_region : Optional [str ] = None ,
126131 api_version : Optional [str ] = None ,
127- azure_deployment : Optional [str ] = None
132+ azure_deployment : Optional [str ] = None ,
133+ use_gitignore : Optional [bool ] = None ,
128134):
129135 """
130136 Set configuration values for CodeWiki.
@@ -170,10 +176,14 @@ def config_set(
170176 \b
171177 # Set max depth for hierarchical decomposition
172178 $ codewiki config set --max-depth 3
179+
180+ \b
181+ # Persistently disable Git ignore filtering
182+ $ codewiki config set --no-gitignore
173183 """
174184 try :
175185 # Check if at least one option is provided
176- if not any ([api_key , base_url , main_model , cluster_model , fallback_model , max_tokens , max_token_per_module , max_token_per_leaf_module , max_depth , provider , aws_region , api_version , azure_deployment ]):
186+ if not any ([api_key , base_url , main_model , cluster_model , fallback_model , max_tokens , max_token_per_module , max_token_per_leaf_module , max_depth , provider , aws_region , api_version , azure_deployment , use_gitignore is not None ]):
177187 click .echo ("No options provided. Use --help for usage information." )
178188 sys .exit (EXIT_CONFIG_ERROR )
179189
@@ -237,6 +247,9 @@ def config_set(
237247 if azure_deployment is not None :
238248 validated_data ['azure_deployment' ] = azure_deployment
239249
250+ if use_gitignore is not None :
251+ validated_data ['use_gitignore' ] = use_gitignore
252+
240253 # Create config manager and save
241254 manager = ConfigManager ()
242255 manager .load () # Load existing config if present
@@ -254,7 +267,8 @@ def config_set(
254267 provider = validated_data .get ('provider' ),
255268 aws_region = validated_data .get ('aws_region' ),
256269 api_version = validated_data .get ('api_version' ),
257- azure_deployment = validated_data .get ('azure_deployment' )
270+ azure_deployment = validated_data .get ('azure_deployment' ),
271+ use_gitignore = validated_data .get ('use_gitignore' ),
258272 )
259273
260274 # Display success messages
@@ -315,6 +329,9 @@ def config_set(
315329 if azure_deployment :
316330 click .secho (f"✓ Azure Deployment: { azure_deployment } " , fg = "green" )
317331
332+ if use_gitignore is not None :
333+ click .secho (f"✓ Use gitignore: { use_gitignore } " , fg = "green" )
334+
318335 click .echo ("\n " + click .style ("Configuration updated successfully." , fg = "green" , bold = True ))
319336
320337 except ConfigurationError as e :
@@ -375,6 +392,7 @@ def config_show(output_json: bool):
375392 "max_token_per_module" : config .max_token_per_module if config else 36369 ,
376393 "max_token_per_leaf_module" : config .max_token_per_leaf_module if config else 16000 ,
377394 "max_depth" : config .max_depth if config else 2 ,
395+ "use_gitignore" : config .use_gitignore if config else True ,
378396 "agent_instructions" : config .agent_instructions .to_dict () if config and config .agent_instructions else {},
379397 "config_file" : str (manager .config_file_path )
380398 }
@@ -435,6 +453,7 @@ def config_show(output_json: bool):
435453 click .secho ("Decomposition Settings" , fg = "cyan" , bold = True )
436454 if config :
437455 click .echo (f" Max Depth: { config .max_depth } " )
456+ click .echo (f" Use Gitignore: { config .use_gitignore } " )
438457
439458 click .echo ()
440459 click .secho ("Agent Instructions" , fg = "cyan" , bold = True )
@@ -859,4 +878,3 @@ def config_agent(
859878 sys .exit (e .exit_code )
860879 except Exception as e :
861880 sys .exit (handle_error (e ))
862-
0 commit comments