@@ -86,6 +86,7 @@ def prep(self, shared):
8686 project_name = shared ["project_name" ] # Get project name
8787 language = shared .get ("language" , "english" ) # Get language
8888 use_cache = shared .get ("use_cache" , True ) # Get use_cache flag, default to True
89+ max_abstraction_num = shared .get ("max_abstraction_num" , 10 ) # Get max_abstraction_num, default to 20
8990
9091 # Helper to create context from files, respecting limits (basic example)
9192 def create_llm_context (files_data ):
@@ -110,7 +111,8 @@ def create_llm_context(files_data):
110111 project_name ,
111112 language ,
112113 use_cache ,
113- ) # Return use_cache
114+ max_abstraction_num ,
115+ ) # Return all parameters
114116
115117 def exec (self , prep_res ):
116118 (
@@ -120,7 +122,8 @@ def exec(self, prep_res):
120122 project_name ,
121123 language ,
122124 use_cache ,
123- ) = prep_res # Unpack use_cache
125+ max_abstraction_num ,
126+ ) = prep_res # Unpack all parameters
124127 print (f"Identifying abstractions using LLM..." )
125128
126129 # Add language instruction and hints only if not English
@@ -140,7 +143,7 @@ def exec(self, prep_res):
140143{ context }
141144
142145{ language_instruction } Analyze the codebase context.
143- Identify the top 5-20 core most important abstractions to help those new to the codebase.
146+ Identify the top 5-{ max_abstraction_num } core most important abstractions to help those new to the codebase.
144147
145148For each abstraction, provide:
1461491. A concise `name`{ name_lang_hint } .
@@ -167,7 +170,7 @@ def exec(self, prep_res):
167170 Another core concept, similar to a blueprint for objects.{ desc_lang_hint }
168171 file_indices:
169172 - 5 # path/to/another.js
170- # ... up to 20 abstractions
173+ # ... up to { max_abstraction_num } abstractions
171174```"""
172175 response = call_llm (prompt , use_cache = use_cache ) # Pass use_cache parameter
173176
0 commit comments