mirror of
				https://github.com/freeedcom/ai-codereviewer.git
				synced 2025-10-30 21:50:53 +00:00 
			
		
		
		
	Better instruction
This commit is contained in:
		
					parent
					
						
							
								92ff880554
							
						
					
				
			
			
				commit
				
					
						51b69a7b81
					
				
			
		
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -87,12 +87,13 @@ function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string { | |||
|       : `Your review will only ensure the following rules are followed:
 | ||||
| ${rules.replace(/\n/g, "\n- ")}`;
 | ||||
|   const prompt = `Your name is ${botName}. Your task is to review pull requests. ${rulesPrompt} | ||||
| 
 | ||||
| Here are your instructions regarding the format and the style of the review: | ||||
| - Provide the response in following JSON format:  {"reviews": [{"lineNumber":  <line_number>, "reviewComment": "<review comment>"}]} | ||||
| - Do not give positive comments or compliments. | ||||
| - Provide comments and suggestions ONLY if there is something to improve, otherwise "reviews" should be an empty array. | ||||
| - Write the comment in GitHub Markdown format. | ||||
| - You can suggest a fix in a reviewComment if you want to by using a \`\`\`suggestion\`\`\` code block.
 | ||||
| - You can suggest a fix in a reviewComment if you want to by using a \`\`\`suggestion\`\`\` code block (with proper whitespace indentation).
 | ||||
| - Use the given description only for the overall context and only comment the code. | ||||
| - IMPORTANT: NEVER suggest adding comments to the code. | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue