Reorder output: Progress → Plan → Code → Result
Browse filesNew display order:
1. Agent Progress (live updates)
2. Implementation Plan
3. Generated Code (copyable)
4. Result table (pass/fail)
- Dockerfile +1 -1
- chainlit_app.py +12 -12
Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# HuggingFace Spaces Dockerfile for CodePilot
|
| 2 |
-
# BUILD_VERSION:
|
| 3 |
FROM python:3.11-slim
|
| 4 |
|
| 5 |
# Set working directory
|
|
|
|
| 1 |
# HuggingFace Spaces Dockerfile for CodePilot
|
| 2 |
+
# BUILD_VERSION: 19 (v3.4.2 reorder - Progress → Plan → Code → Result)
|
| 3 |
FROM python:3.11-slim
|
| 4 |
|
| 5 |
# Set working directory
|
chainlit_app.py
CHANGED
|
@@ -22,8 +22,8 @@ from concurrent.futures import ThreadPoolExecutor
|
|
| 22 |
# ============================================================
|
| 23 |
# STARTUP VERSION CHECK - Change this to detect if rebuild worked
|
| 24 |
# ============================================================
|
| 25 |
-
APP_VERSION = "3.4.
|
| 26 |
-
BUILD_ID = "2024-12-20-
|
| 27 |
print("=" * 60)
|
| 28 |
print(f"[STARTUP] CodePilot Chainlit App")
|
| 29 |
print(f"[STARTUP] APP_VERSION: {APP_VERSION}")
|
|
@@ -382,16 +382,16 @@ async def main(message: cl.Message):
|
|
| 382 |
result, total_cost = await run_workflow(orchestrator, user_answers, is_resume=True)
|
| 383 |
|
| 384 |
if result:
|
| 385 |
-
# Show
|
| 386 |
-
await cl.Message(content=format_final_result(result, total_cost)).send()
|
| 387 |
-
|
| 388 |
-
# Show plan first
|
| 389 |
if result.get('plan'):
|
| 390 |
await cl.Message(content=format_plan_display(result['plan'])).send()
|
| 391 |
|
| 392 |
-
# Then show code
|
| 393 |
if result.get('code_changes'):
|
| 394 |
await cl.Message(content="## Generated Code\n\n" + format_code_output(result['code_changes'])).send()
|
|
|
|
|
|
|
|
|
|
| 395 |
return
|
| 396 |
|
| 397 |
# New task - reset orchestrator
|
|
@@ -481,17 +481,17 @@ AVAILABLE TOOLS:
|
|
| 481 |
).send()
|
| 482 |
return
|
| 483 |
|
| 484 |
-
# Show
|
| 485 |
-
await cl.Message(content=format_final_result(result, total_cost)).send()
|
| 486 |
-
|
| 487 |
-
# Show plan first
|
| 488 |
if result.get('plan'):
|
| 489 |
await cl.Message(content=format_plan_display(result['plan'])).send()
|
| 490 |
|
| 491 |
-
# Then show generated code
|
| 492 |
if result.get('code_changes'):
|
| 493 |
await cl.Message(content="## Generated Code\n\n" + format_code_output(result['code_changes'])).send()
|
| 494 |
|
|
|
|
|
|
|
|
|
|
| 495 |
|
| 496 |
if __name__ == "__main__":
|
| 497 |
sys.exit("Run with: chainlit run chainlit_app.py")
|
|
|
|
| 22 |
# ============================================================
|
| 23 |
# STARTUP VERSION CHECK - Change this to detect if rebuild worked
|
| 24 |
# ============================================================
|
| 25 |
+
APP_VERSION = "3.4.2-reorder"
|
| 26 |
+
BUILD_ID = "2024-12-20-v3"
|
| 27 |
print("=" * 60)
|
| 28 |
print(f"[STARTUP] CodePilot Chainlit App")
|
| 29 |
print(f"[STARTUP] APP_VERSION: {APP_VERSION}")
|
|
|
|
| 382 |
result, total_cost = await run_workflow(orchestrator, user_answers, is_resume=True)
|
| 383 |
|
| 384 |
if result:
|
| 385 |
+
# 1. Show plan first
|
|
|
|
|
|
|
|
|
|
| 386 |
if result.get('plan'):
|
| 387 |
await cl.Message(content=format_plan_display(result['plan'])).send()
|
| 388 |
|
| 389 |
+
# 2. Then show code
|
| 390 |
if result.get('code_changes'):
|
| 391 |
await cl.Message(content="## Generated Code\n\n" + format_code_output(result['code_changes'])).send()
|
| 392 |
+
|
| 393 |
+
# 3. Finally show result table
|
| 394 |
+
await cl.Message(content=format_final_result(result, total_cost)).send()
|
| 395 |
return
|
| 396 |
|
| 397 |
# New task - reset orchestrator
|
|
|
|
| 481 |
).send()
|
| 482 |
return
|
| 483 |
|
| 484 |
+
# 1. Show plan first
|
|
|
|
|
|
|
|
|
|
| 485 |
if result.get('plan'):
|
| 486 |
await cl.Message(content=format_plan_display(result['plan'])).send()
|
| 487 |
|
| 488 |
+
# 2. Then show generated code
|
| 489 |
if result.get('code_changes'):
|
| 490 |
await cl.Message(content="## Generated Code\n\n" + format_code_output(result['code_changes'])).send()
|
| 491 |
|
| 492 |
+
# 3. Finally show result table
|
| 493 |
+
await cl.Message(content=format_final_result(result, total_cost)).send()
|
| 494 |
+
|
| 495 |
|
| 496 |
if __name__ == "__main__":
|
| 497 |
sys.exit("Run with: chainlit run chainlit_app.py")
|