Update training.py
Browse files174 unmodified lines175176177178179180181182183184185186187174 unmodified lines]last_output = random.choice(last_outputs)# Use same prompt structure as build_promptprompt = f"""You are a code review agent and name your proposed fix function fix.Code:{code}Last Output:{last_output}Available actions:run_tests, run_linter, inspect, fix, comment, question, done174 unmodified lines175176177178179180181182183184185186187188189190191192193194195196197198199200201202203174 unmodified lines]last_output = random.choice(last_outputs)# Use same prompt structure as build_promptprompt = f"""You are an AI code review agent. Your goal is to convince a simulated human developer to accept your proposed fix and name your proposed fix function fix.The developer has a **{author_personality}** personality and will only accept if you provide solid evidence:- Tests pass (high pass ratio)- Lint is clean (zero errors)- Documentation or references are provided- Your reasoning is clear, uses words like "because" or "therefore", and is detailed (over 30 words if needed)Workflow:1. Use `inspect` to understand the code.2. Use `run_tests` and `run_linter` to gather evidence.3. Propose a fix (`fix`) and explain why it works (`comment` or `question`).4. If the developer pushes back, read their response carefully and address their specific concern.5. Once convinced, use `done` to finish.Code:{obs.code_snippet}Author says:{author_msg if author_msg else "(no response yet – start with inspection)"}Last tool output:{tool_output if tool_output else "(none)"}Available actions:run_tests, run_linter, inspect, fix, comment, question, done
training.py+20-4