ayushm98 commited on
Commit
85641be
·
1 Parent(s): b269653

v3.3.3: Simplify Coder - only receives task + plan (no exploration context)

Browse files
Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
  # HuggingFace Spaces Dockerfile for CodePilot
2
- # BUILD_VERSION: 11 (v3.3.2 full paths in plan, minimal coder tools)
3
  FROM python:3.11-slim
4
 
5
  # Set working directory
 
1
  # HuggingFace Spaces Dockerfile for CodePilot
2
+ # BUILD_VERSION: 12 (v3.3.3 simple coder - only task + plan)
3
  FROM python:3.11-slim
4
 
5
  # Set working directory
chainlit_app.py CHANGED
@@ -20,8 +20,8 @@ from concurrent.futures import ThreadPoolExecutor
20
  # ============================================================
21
  # STARTUP VERSION CHECK - Change this to detect if rebuild worked
22
  # ============================================================
23
- APP_VERSION = "3.3.2-full-paths"
24
- BUILD_ID = "2024-12-19-v10"
25
  print("=" * 60)
26
  print(f"[STARTUP] CodePilot Chainlit App")
27
  print(f"[STARTUP] APP_VERSION: {APP_VERSION}")
 
20
  # ============================================================
21
  # STARTUP VERSION CHECK - Change this to detect if rebuild worked
22
  # ============================================================
23
+ APP_VERSION = "3.3.3-simple-coder"
24
+ BUILD_ID = "2024-12-19-v11"
25
  print("=" * 60)
26
  print(f"[STARTUP] CodePilot Chainlit App")
27
  print(f"[STARTUP] APP_VERSION: {APP_VERSION}")
codepilot/agents/coder_agent.py CHANGED
@@ -112,19 +112,12 @@ class CoderAgent:
112
  # Add system prompt
113
  self.conversation.add_message("system", CODER_SYSTEM_PROMPT)
114
 
115
- # Build user prompt with exploration context, task, plan
116
- user_prompt = f"""=== ORIGINAL TASK ===
 
117
  {task}
118
 
119
- """
120
- # Add exploration context if available
121
- if exploration_context:
122
- user_prompt += f"""=== EXPLORATION RESULTS (from Explorer agent) ===
123
- {exploration_context}
124
-
125
- """
126
-
127
- user_prompt += f"""=== IMPLEMENTATION PLAN (from Planner agent) ===
128
  {plan}
129
 
130
  """
@@ -134,12 +127,10 @@ class CoderAgent:
134
  user_prompt += f"""=== REVIEWER FEEDBACK (CODE WAS REJECTED) ===
135
  {review_feedback}
136
 
137
- Please fix the issues mentioned by the Reviewer and resubmit the code."""
138
  else:
139
- user_prompt += """Please implement this plan step by step.
140
- Use the exploration results to understand the codebase structure.
141
- Write clean, well-structured code that follows the plan.
142
- Test your code in the sandbox before finishing."""
143
 
144
  self.conversation.add_message("user", user_prompt)
145
 
 
112
  # Add system prompt
113
  self.conversation.add_message("system", CODER_SYSTEM_PROMPT)
114
 
115
+ # Build user prompt - ONLY the plan (keep it simple!)
116
+ # v3.3.2: Removed exploration context - it was confusing the Coder
117
+ user_prompt = f"""=== TASK ===
118
  {task}
119
 
120
+ === IMPLEMENTATION PLAN ===
 
 
 
 
 
 
 
 
121
  {plan}
122
 
123
  """
 
127
  user_prompt += f"""=== REVIEWER FEEDBACK (CODE WAS REJECTED) ===
128
  {review_feedback}
129
 
130
+ Fix the issues and use write_file to update the code."""
131
  else:
132
+ user_prompt += """The plan has FULL file paths. Use write_file with those exact paths.
133
+ Do NOT explore. Just write the code now."""
 
 
134
 
135
  self.conversation.add_message("user", user_prompt)
136
 
codepilot/agents/orchestrator.py CHANGED
@@ -9,7 +9,7 @@ The orchestrator is the "brain" that:
9
  """
10
 
11
  # VERSION CHECK - If you see this, new code is running!
12
- ORCHESTRATOR_VERSION = "3.3.2-full-paths"
13
  print(f"[ORCHESTRATOR] ========== LOADING VERSION {ORCHESTRATOR_VERSION} ==========")
14
 
15
  from enum import Enum
 
9
  """
10
 
11
  # VERSION CHECK - If you see this, new code is running!
12
+ ORCHESTRATOR_VERSION = "3.3.3-simple-coder"
13
  print(f"[ORCHESTRATOR] ========== LOADING VERSION {ORCHESTRATOR_VERSION} ==========")
14
 
15
  from enum import Enum