FrederickSundeep commited on
Commit
5290248
·
1 Parent(s): 2cd899d

issue fixed 006

Browse files
Files changed (1) hide show
  1. app.py +17 -17
app.py CHANGED
@@ -371,24 +371,24 @@ def chat_stream_doc():
371
  for match in matches:
372
  raw_filename = match.group(1).strip().rstrip("`")
373
  code = match.group(2).strip()
374
- folder = determine_folder(raw_filename)
375
- full_path = f"{folder}/{raw_filename}"
376
- zipf.writestr(full_path, code)
377
- file_list.append(full_path)
378
  file_count += 1
379
 
380
  # ✅ Add a README.md
381
- readme = (
382
- "# Project Scaffold\n"
383
- f"**Frontend:** {frontend}\n"
384
- f"**Backend:** {backend}\n"
385
- f"**Database:** {database}\n\n"
386
- f"**Generated on:** {datetime.datetime.now().isoformat()}\n"
387
- f"**Files:** {file_count}\n\n"
388
- "This project was auto-generated using AI from a requirement document.\n"
389
- )
390
- zipf.writestr("README.md", readme)
391
- file_list.append("README.md")
392
 
393
  if file_count == 0:
394
  return jsonify({"error": "No files found in generated output."}), 500
@@ -401,9 +401,9 @@ def chat_stream_doc():
401
  )
402
 
403
  # Optional: attach log
404
- response.headers["X-Generated-Files"] = ", ".join(file_list)
405
 
406
- return response
407
 
408
 
409
  # ✅ Warm-up
 
371
  for match in matches:
372
  raw_filename = match.group(1).strip().rstrip("`")
373
  code = match.group(2).strip()
374
+ # folder = determine_folder(raw_filename)
375
+ # full_path = f"{folder}/{raw_filename}"
376
+ zipf.writestr(raw_filename, code)
377
+ # file_list.append(full_path)
378
  file_count += 1
379
 
380
  # ✅ Add a README.md
381
+ # readme = (
382
+ # "# Project Scaffold\n"
383
+ # f"**Frontend:** {frontend}\n"
384
+ # f"**Backend:** {backend}\n"
385
+ # f"**Database:** {database}\n\n"
386
+ # f"**Generated on:** {datetime.datetime.now().isoformat()}\n"
387
+ # f"**Files:** {file_count}\n\n"
388
+ # "This project was auto-generated using AI from a requirement document.\n"
389
+ # )
390
+ # zipf.writestr("README.md", readme)
391
+ # file_list.append("README.md")
392
 
393
  if file_count == 0:
394
  return jsonify({"error": "No files found in generated output."}), 500
 
401
  )
402
 
403
  # Optional: attach log
404
+ # response.headers["X-Generated-Files"] = ", ".join(file_list)
405
 
406
+ # return response
407
 
408
 
409
  # ✅ Warm-up