diff --git a/pr_agent/algo/utils.py b/pr_agent/algo/utils.py index 2b030bf2..b7449eb4 100644 --- a/pr_agent/algo/utils.py +++ b/pr_agent/algo/utils.py @@ -102,7 +102,7 @@ def parse_code_suggestion(code_suggestions: dict, i: int = 0, gfm_supported: boo markdown_text += f"{sub_key}{relevant_file}" # continue elif sub_key.lower() == 'suggestion': - markdown_text += f"{sub_key}      {sub_value}" + markdown_text += f"{sub_key}      \n\n{sub_value}" elif sub_key.lower() == 'relevant line': markdown_text += f"relevant line" sub_value_list = sub_value.split('](') diff --git a/pr_agent/settings/pr_code_suggestions_prompts.toml b/pr_agent/settings/pr_code_suggestions_prompts.toml index f07c3fee..001dbb27 100644 --- a/pr_agent/settings/pr_code_suggestions_prompts.toml +++ b/pr_agent/settings/pr_code_suggestions_prompts.toml @@ -36,9 +36,9 @@ Specific instructions: - Don't suggest to add docstring, type hints, or comments. - Suggestions should refer only to code from the '__new hunk__' sections, and focus on new lines of code (lines starting with '+'). - Avoid making suggestions that have already been implemented in the PR code. For example, if you want to add logs, or change a variable to const, or anything else, make sure it isn't already in the '__new hunk__' code. -- For each suggestion, make sure to take into consideration also the context, meaning the lines before and after the relevant code. - Provide the exact line numbers range (inclusive) for each suggestion. - Assume there is additional relevant code, that is not included in the diff. +- When quoting variables or names from the code, use backticks (`) instead of single quote ('). {%- if extra_instructions %} diff --git a/pr_agent/settings/pr_reviewer_prompts.toml b/pr_agent/settings/pr_reviewer_prompts.toml index ce32bfc9..736fb247 100644 --- a/pr_agent/settings/pr_reviewer_prompts.toml +++ b/pr_agent/settings/pr_reviewer_prompts.toml @@ -32,6 +32,7 @@ Code suggestions guidelines: - Avoid making suggestions that have already been implemented in the PR code. For example, if you want to add logs, or change a variable to const, or anything else, make sure it isn't already in the PR code. - Don't suggest to add docstring, type hints, or comments. - Suggestions should focus on the new code added in the PR diff (lines starting with '+') +- When quoting variables or names from the code, use backticks (`) instead of single quote ('). {%- endif %} {%- if extra_instructions %}