Skip to content

Commit

Permalink
agent must use pest syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher David committed Dec 1, 2023
1 parent 323d631 commit 9689848
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Services/Patcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion app/Services/Planner.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9689848

Please sign in to comment.