Skip to content

Commit 60bebeb

Browse files
committed
Include final files in error response for compile_and_fix_rust function
1 parent 39b0782 commit 60bebeb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,13 @@ async def compile_and_fix_rust(request: dict):
142142
return PlainTextResponse(content=output_text.strip())
143143
else:
144144
# For errors, return the JSON with detailed error information
145+
# Include the combined text in both the combined_text and final_files fields
145146
return JSONResponse(content={
146147
"status": "error",
147148
"message": f"Failed to fix code: {result.get('build_output', '')}",
148149
"attempts": result.get("attempts", []),
149-
"combined_text": output_text.strip()
150+
"combined_text": output_text.strip(),
151+
"final_files": result["final_files"] # Include the individual files in the response
150152
})
151153

152154
async def handle_project_generation(

0 commit comments

Comments
 (0)