Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ async def compile_and_fix_rust(request: dict):
for filename, content in current_files.items():
output_text += f"[filename: {filename}]\n{content}\n\n"

# Return JSON response instead of plain text
# Replace the existing JSONResponse in the success case with this
return JSONResponse(content={
"status": "success",
"success": True,
"message": "Code fixed and compiled successfully",
"attempts": attempts,
"combined_text": output_text.strip(),
Expand Down Expand Up @@ -281,7 +281,7 @@ async def compile_and_fix_rust(request: dict):

# If we've exhausted all attempts, return error
return JSONResponse(content={
"status": "failed",
"success": False,
"message": f"Failed to fix code after {max_attempts} attempts",
"attempts": attempts,
"combined_text": output_text.strip(),
Expand Down
Loading