@@ -86,6 +86,7 @@ def prep(self, shared):
86
86
project_name = shared ["project_name" ] # Get project name
87
87
language = shared .get ("language" , "english" ) # Get language
88
88
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
89
90
90
91
# Helper to create context from files, respecting limits (basic example)
91
92
def create_llm_context (files_data ):
@@ -110,7 +111,8 @@ def create_llm_context(files_data):
110
111
project_name ,
111
112
language ,
112
113
use_cache ,
113
- ) # Return use_cache
114
+ max_abstraction_num ,
115
+ ) # Return all parameters
114
116
115
117
def exec (self , prep_res ):
116
118
(
@@ -120,7 +122,8 @@ def exec(self, prep_res):
120
122
project_name ,
121
123
language ,
122
124
use_cache ,
123
- ) = prep_res # Unpack use_cache
125
+ max_abstraction_num ,
126
+ ) = prep_res # Unpack all parameters
124
127
print (f"Identifying abstractions using LLM..." )
125
128
126
129
# Add language instruction and hints only if not English
@@ -140,7 +143,7 @@ def exec(self, prep_res):
140
143
{ context }
141
144
142
145
{ 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.
144
147
145
148
For each abstraction, provide:
146
149
1. A concise `name`{ name_lang_hint } .
@@ -167,7 +170,7 @@ def exec(self, prep_res):
167
170
Another core concept, similar to a blueprint for objects.{ desc_lang_hint }
168
171
file_indices:
169
172
- 5 # path/to/another.js
170
- # ... up to 20 abstractions
173
+ # ... up to { max_abstraction_num } abstractions
171
174
```"""
172
175
response = call_llm (prompt , use_cache = use_cache ) # Pass use_cache parameter
173
176
0 commit comments