From 8fb9b8ed3e81ea3c24819d7392385042c506c650 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Fri, 23 Aug 2024 11:22:55 +0300 Subject: [PATCH 1/2] Update PR code suggestions prompts to avoid repeating changes already present in the PR --- pr_agent/settings/pr_code_suggestions_prompts.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pr_agent/settings/pr_code_suggestions_prompts.toml b/pr_agent/settings/pr_code_suggestions_prompts.toml index 4bd5f7fb..bcbc6618 100644 --- a/pr_agent/settings/pr_code_suggestions_prompts.toml +++ b/pr_agent/settings/pr_code_suggestions_prompts.toml @@ -36,9 +36,9 @@ __old hunk__ Specific instructions for generating code suggestions: -- Provide in total up to {{ num_code_suggestions }} code suggestions. The suggestions should be diverse and insightful. -- The suggestions should focus on improving only the new code introduced the PR, meaning lines from '__new hunk__' sections, starting with '+' (after the line numbers). The '__old hunk__' sections code is for context and reference only. -- Prioritize suggestions that address possible issues, major problems, and bugs in the PR code. +- 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. - Don't suggest to add docstring, type hints, or comments, or to remove unused imports. - Suggestions should not repeat code already present in the '__new hunk__' sections. - Provide the exact line numbers range (inclusive) for each suggestion. Use the line numbers from the '__new hunk__' sections. @@ -153,9 +153,9 @@ __old hunk__ Specific instructions for generating code suggestions: -- Provide in total up to {{ num_code_suggestions }} code suggestions. The suggestions should be diverse and insightful. -- The suggestions 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. +- 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. - Don't suggest to add docstring, type hints, or comments, or to remove unused imports. - Provide the exact line numbers range (inclusive) for each suggestion. Use the line numbers from the '__new hunk__' sections. - Every time you cite variables or names from the code, use backticks ('`'). For example: 'ensure that `variable_name` is ...' From 415f44d763692561a8768145d077f7b0cb49b8a9 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Fri, 23 Aug 2024 11:27:50 +0300 Subject: [PATCH 2/2] type --- pr_agent/settings/pr_code_suggestions_prompts.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pr_agent/settings/pr_code_suggestions_prompts.toml b/pr_agent/settings/pr_code_suggestions_prompts.toml index bcbc6618..8cca3fe8 100644 --- a/pr_agent/settings/pr_code_suggestions_prompts.toml +++ b/pr_agent/settings/pr_code_suggestions_prompts.toml @@ -37,7 +37,7 @@ __old hunk__ Specific instructions for generating code suggestions: - 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). +- 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). - 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. - Don't suggest to add docstring, type hints, or comments, or to remove unused imports. - Suggestions should not repeat code already present in the '__new hunk__' sections. @@ -154,7 +154,7 @@ __old hunk__ Specific instructions for generating code suggestions: - 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). +- 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). - 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. - Don't suggest to add docstring, type hints, or comments, or to remove unused imports. - Provide the exact line numbers range (inclusive) for each suggestion. Use the line numbers from the '__new hunk__' sections.