Skip to content

Commit 612a3be

Browse files
committed
Add combined_text field to compile_and_fix response for complete project context
1 parent a2cc7a3 commit 612a3be

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/main.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,13 @@ async def compile_and_fix(request: CompileAndFixRequest):
175175
max_attempts=max_attempts
176176
)
177177

178+
# Add combined_text field with the entire project in flat text format
179+
combined_text = ""
180+
for filename, content in result["final_files"].items():
181+
combined_text += f"[filename: {filename}]\n{content}\n\n"
182+
183+
result["combined_text"] = combined_text.strip()
184+
178185
return result
179186

180187
@app.post("/compile-and-fix")

0 commit comments

Comments
 (0)