You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Combine multiple instructions into a single, more concise instruction to improve readability and reduce redundancy
Consider combining the three separate instructions into a single, more concise instruction. This can improve readability and reduce redundancy in the prompt.
-- Provide up to {{ num_code_suggestions }} code suggestions.-- The suggestions should be diverse and insightful. They should focus on improving only the new code introduced the PR, meaning lines from '__new hunk__' sections, starting with '+' (after the line numbers).-- Prioritize suggestions that address possible issues, major problems, and bugs in the PR code. Don't repeat changes already present in the PR. If there are no relevant suggestions for the PR, return an empty list.+- Provide up to {{ num_code_suggestions }} diverse and insightful code suggestions, focusing on improving new code (lines starting with '+' in '__new hunk__' sections). Prioritize addressing possible issues, major problems, and bugs. Don't repeat existing changes. If no relevant suggestions, return an empty list.
Apply this suggestion
Suggestion importance[1-10]: 8
Why: The suggestion effectively consolidates three separate instructions into one concise statement, improving readability and reducing redundancy without losing important information.
8
Clarify the purpose of '__old hunk__' sections in the instructions to provide better context for code reviewers
Consider adding a clarification about the purpose of the 'old hunk' sections to provide better context for the code reviewer.
-- The suggestions should be diverse and insightful. They should focus on improving only the new code introduced the PR, meaning lines from '__new hunk__' sections, starting with '+' (after the line numbers).+- The suggestions should be diverse and insightful. They should focus on improving only the new code introduced in the PR, meaning lines from '__new hunk__' sections, starting with '+' (after the line numbers). The '__old hunk__' sections are provided for context and should not be the focus of suggestions.
Apply this suggestion
Suggestion importance[1-10]: 7
Why: This suggestion adds valuable context about the purpose of 'old hunk' sections, which can help code reviewers better understand the structure of the diff.
7
Best practice
Add a note about maintaining consistency with the existing codebase style and conventions in suggestions
Consider adding a note about maintaining consistency with the existing codebase style and conventions when making suggestions.
-- Take into account that you are recieving as an input only a PR code diff. The entire codebase is not available for you as context. Hence, avoid suggestions that might conflict with unseen parts of the codebase, like imports, global variables, etc.+- Take into account that you are receiving as an input only a PR code diff. The entire codebase is not available for you as context. Hence, avoid suggestions that might conflict with unseen parts of the codebase, like imports, global variables, etc. When making suggestions, try to maintain consistency with the visible code style and conventions.
Apply this suggestion
Suggestion importance[1-10]: 6
Why: The suggestion adds a useful reminder about maintaining code consistency, but it's a minor improvement to an already comprehensive instruction.
Hey @mrT23 I will try this out but im not sure this will prevent the small PR issues. I had one PR I was testing with and it was giving back relevent suggestions but it was not a great solution since the change was so small. Did you see an improvement with the PR you were testing with?
Hey @mrT23 I will try this out but im not sure this will prevent the small PR issues. I had one PR I was testing with and it was giving back relevent suggestions but it was not a great solution since the change was so small. Did you see an improvement with the PR you were testing with?
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
Enhancement
Description
Changes walkthrough 📝
pr_code_suggestions_prompts.toml
Refine code suggestion generation instructions
pr_agent/settings/pr_code_suggestions_prompts.toml
changes