diff --git a/app/Services/Patcher.php b/app/Services/Patcher.php index 965463c60..03e7f8ea8 100644 --- a/app/Services/Patcher.php +++ b/app/Services/Patcher.php @@ -37,7 +37,7 @@ private function determinePatchForRemoteFile($filePath, $fileContent, $issue) while (true) { print_r("Trying code block for {$filePath}, attempt #{$retryCount}\n"); // Construct the prompt for getting the 'Before' and 'After' contents - $actionPrompt2 = "Identify which code block needs to be changed (mark it up with \"Before:\") and output the change (mark it up with \"After:\"). Make your change match the coding style of the original file."; + $actionPrompt2 = "Identify which code block needs to be changed (mark it up with \"Before:\") and output the change (mark it up with \"After:\"). Make your change match the coding style of the original file. When writing tests, use Pest syntax not bare PHPUnit."; // print_r($prompt . $actionPrompt2 . "\n"); $change = $this->complete($prompt . $actionPrompt2); // print_r($change); diff --git a/app/Services/Planner.php b/app/Services/Planner.php index deafa1638..a9246bea7 100644 --- a/app/Services/Planner.php +++ b/app/Services/Planner.php @@ -22,7 +22,7 @@ public function createPlan(array $messages): string } - $prompt = "Based on the following conversation, please respond with a step-by-step plan for our junior developer to follow. Be extremely specific about code needs to be added, what files need to be edited, what tests need to be written, and the expected outcome. But do not write any of the code! You are just providing instructions to the junior developer. Do not give any general advice. Only give specific tasks that can be completed with code. \n\n-----\n\n" . $plan; + $prompt = "Based on the following conversation, please respond with a step-by-step plan for our junior developer to follow. Be extremely specific about code needs to be added, what files need to be edited, what tests need to be written, and the expected outcome. But do not write any of the code! You are just providing instructions to the junior developer. Do not give any general advice. Only give specific tasks that can be completed with code. And when writing tests, the developer must use Pest syntax not bare PHPUnit. \n\n-----\n\n" . $plan; $plan = $this->complete($prompt); return $plan;