Skip to content

Commit

Permalink
fixing prompt issue
Browse files Browse the repository at this point in the history
  • Loading branch information
suitedaces committed Dec 24, 2023
1 parent fe2ab08 commit 71e9a5b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { File, Chunk, PRMetadata } from "./types";
export function createPrompt(file: File, chunk: Chunk, prDetails: PRMetadata): string {
// Instructions for AI Review Process
const instructions = `Respond in JSON format: {"reviews": [{"lineNumber": <line_number>, "reviewComment": "<review comment>"}]}.
DO NOT return a lineNumber that's blank in the diff, instead choose the line number that's closest to the code that needs to be reviewed.
Provide only constructive feedback in the reviewComment after reviewing the code for security vulnerabilities and adherence to coding best practices for the given language.
Make recommendations to make code more secure,faster easier to maintain, reduce redundancy.
If no improvements are necessary, keep the "reviews" array empty.
Expand Down

0 comments on commit 71e9a5b

Please sign in to comment.