File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -516,6 +516,11 @@ async def generate_project_sync(request: ProjectRequest):
516516 "build_output" : output ,
517517 "run_output" : run_output if run_success else "Failed to run project"
518518 })
519+
520+ # Return all files as text with build success marker
521+ all_files_content = "\n " .join ([f"[filename: { f } ]\n { open (os .path .join (temp_dir , f )).read ()} \n " for f in file_paths ])
522+ all_files_content += "\n # Build succeeded\n "
523+ return PlainTextResponse (content = all_files_content )
519524 else :
520525 status .update ({
521526 "status" : "failed" ,
@@ -524,9 +529,5 @@ async def generate_project_sync(request: ProjectRequest):
524529 })
525530
526531 save_status (temp_dir , status )
527-
528- # Return all files as text
529- all_files_content = "\n " .join ([f"[filename: { f } ]\n { open (os .path .join (temp_dir , f )).read ()} \n " for f in file_paths ])
530- return PlainTextResponse (content = all_files_content )
531532 except Exception as e :
532533 raise HTTPException (status_code = 500 , detail = f"Error generating project: { str (e )} " )
You can’t perform that action at this time.
0 commit comments