From b8cfcdbc120146ce5813e247d01f651b462097b0 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Sun, 27 Oct 2024 14:58:21 +0200 Subject: [PATCH 1/4] Improve markdown header sanitization in PR help message tool --- pr_agent/tools/pr_help_message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pr_agent/tools/pr_help_message.py b/pr_agent/tools/pr_help_message.py index f35b81734..09845f814 100644 --- a/pr_agent/tools/pr_help_message.py +++ b/pr_agent/tools/pr_help_message.py @@ -138,7 +138,7 @@ async def run(self): for section in relevant_sections: file = section.get('file_name').strip().removesuffix('.md') if str(section['relevant_section_header_string']).strip(): - markdown_header = section['relevant_section_header_string'].strip().strip('#').strip().lower().replace(' ', '-') + markdown_header = section['relevant_section_header_string'].strip().strip('#').strip().lower().replace(' ', '-').replace("'", '').replace('(', '').replace(')', '').replace(',', '').replace('.', '').replace('?', '').replace('!', '') answer_str += f"> - {base_path}{file}#{markdown_header}\n" else: answer_str += f"> - {base_path}{file}\n" From 8db7151bf013696312d124e313660e0503fdc902 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Sun, 27 Oct 2024 15:49:10 +0200 Subject: [PATCH 2/4] Add suggestion tracking feature with wiki documentation support --- docs/docs/tools/improve.md | 29 ++++++++++++++++++++++++++++ pr_agent/settings/configuration.toml | 3 ++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/docs/docs/tools/improve.md b/docs/docs/tools/improve.md index 85d9bbe05..b88bca796 100644 --- a/docs/docs/tools/improve.md +++ b/docs/docs/tools/improve.md @@ -67,6 +67,31 @@ In post-process, Qodo Merge counts the number of suggestions that were implement ![code_suggestions_asses_impact_stats_2](https://codium.ai/images/pr_agent/code_suggestions_asses_impact_stats_2.png){width=512} +## Suggestion tracking 💎 +`Platforms supported: GitHub, GitLab` + +Qodo Merge employs an innovative detection system to automatically [identify](https://qodo-merge-docs.qodo.ai/core-abilities/impact_evaluation/) code suggestions that PR authors have accepted and implemented. + +Accepted suggestions are also automatically documented in a dedicated wiki page called `.pr_agent_accepted_suggestions`, allowing users to track historical changes, assess the tool's effectiveness, and learn from previously implemented recommendations in the repository. +An example [result](https://github.com/Codium-ai/pr-agent/wiki/.pr_agent_accepted_suggestions): + +[![pr_agent_accepted_suggestions1.png](https://qodo.ai/images/pr_agent/pr_agent_accepted_suggestions1.png){width=768}](https://github.com/Codium-ai/pr-agent/wiki/.pr_agent_accepted_suggestions) + +This dedicated wiki page will also serve as a foundation for future AI model improvements, allowing it to learn from historically implemented suggestions and generate more targeted, contextually relevant recommendations. + +This feature is controlled by a boolean configuration parameter: `pr_code_suggestions.wiki_page_accepted_suggestions` (default is true). + +!!! note "Wiki must be enabled" + While the aggregation process is automatic, GitHub repositories require a one-time manual wiki setup. + + To initialize the wiki: navigate to `Wiki`, select `Create the first page`, then click `Save page`. + + ![pr_agent_accepted_suggestions_create_first_page.png](https://qodo.ai/images/pr_agent/pr_agent_accepted_suggestions_create_first_page.png){width=768} + + Once a wiki repo is created, the tool will automatically use this wiki for tracking suggestions. + + + ## Usage Tips @@ -272,6 +297,10 @@ Using a combination of both can help the AI model to provide relevant and tailor enable_chat_text If set to true, the tool will display a reference to the PR chat in the comment. Default is true. + + wiki_page_accepted_suggestions + If set to true, the tool will automatically track accepted suggestions in a dedicated wiki page called `.pr_agent_accepted_suggestions`. Default is true. + ??? example "Params for number of suggestions and AI calls" diff --git a/pr_agent/settings/configuration.toml b/pr_agent/settings/configuration.toml index 60858b010..6d1f0ceeb 100644 --- a/pr_agent/settings/configuration.toml +++ b/pr_agent/settings/configuration.toml @@ -135,8 +135,9 @@ demand_code_suggestions_self_review=false # add a checkbox for the author to sel code_suggestions_self_review_text= "**Author self-review**: I have reviewed the PR code suggestions, and addressed the relevant ones." approve_pr_on_self_review=false # Pro feature. if true, the PR will be auto-approved after the author clicks on the self-review checkbox fold_suggestions_on_self_review=true # Pro feature. if true, the code suggestions will be folded after the author clicks on the self-review checkbox -# Suggestion impact +# Suggestion impact 💎 publish_post_process_suggestion_impact=true +wiki_page_accepted_suggestions=true [pr_custom_prompt] # /custom_prompt # prompt = """\ From 509135a8d4c3f6a25369abe4dd69700ef744265c Mon Sep 17 00:00:00 2001 From: mrT23 Date: Sun, 27 Oct 2024 15:56:26 +0200 Subject: [PATCH 3/4] Add suggestion tracking feature with wiki documentation support --- README.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8f26f56ec..30bb0613b 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,17 @@ CodiumAI PR-Agent aims to help efficiently review and handle pull requests, by p ## News and Updates +### October 27, 2024 + +Qodo Merge PR Agent will now automatically document accepted code suggestions in a dedicated wiki page (`.pr_agent_accepted_suggestions`), enabling users to track historical changes, assess the tool's effectiveness, and learn from previously implemented recommendations in the repository. + +This dedicated wiki page will also serve as a foundation for future AI model improvements, allowing it to learn from historically implemented suggestions and generate more targeted, contextually relevant recommendations. +Read more about this novel feature [here](https://qodo-merge-docs.qodo.ai/tools/improve/#suggestion-tracking). + + + + + ### October 21, 2024 **Disable publishing labels by default:** @@ -71,14 +82,6 @@ New ability for the `review` tool - **ticket compliance feedback**. If the PR co -### September 21, 2024 -Need help with PR-Agent? New feature - simply comment `/help "your question"` in a pull request, and PR-Agent will provide you with the [relevant documentation](https://github.com/Codium-ai/pr-agent/pull/1241#issuecomment-2365259334). - -![image](https://github.com/user-attachments/assets/7c214d9c-e7bb-4028-83b6-9515d7310d19) - - - - ## Overview
From fbfb9e0881c96f44ddd1c87db29b92eaa55fb4ff Mon Sep 17 00:00:00 2001 From: mrT23 Date: Sun, 27 Oct 2024 16:07:07 +0200 Subject: [PATCH 4/4] Add suggestion tracking feature with wiki documentation support --- docs/docs/tools/improve.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/docs/tools/improve.md b/docs/docs/tools/improve.md index b88bca796..0b1ff8e58 100644 --- a/docs/docs/tools/improve.md +++ b/docs/docs/tools/improve.md @@ -70,7 +70,7 @@ In post-process, Qodo Merge counts the number of suggestions that were implement ## Suggestion tracking 💎 `Platforms supported: GitHub, GitLab` -Qodo Merge employs an innovative detection system to automatically [identify](https://qodo-merge-docs.qodo.ai/core-abilities/impact_evaluation/) code suggestions that PR authors have accepted and implemented. +Qodo Merge employs an novel detection system to automatically [identify](https://qodo-merge-docs.qodo.ai/core-abilities/impact_evaluation/) AI code suggestions that PR authors have accepted and implemented. Accepted suggestions are also automatically documented in a dedicated wiki page called `.pr_agent_accepted_suggestions`, allowing users to track historical changes, assess the tool's effectiveness, and learn from previously implemented recommendations in the repository. An example [result](https://github.com/Codium-ai/pr-agent/wiki/.pr_agent_accepted_suggestions): @@ -90,8 +90,10 @@ This feature is controlled by a boolean configuration parameter: `pr_code_sugges Once a wiki repo is created, the tool will automatically use this wiki for tracking suggestions. +!!! note "Why a wiki page?" + Your code belongs to you, and we respect your privacy. Hence, we won't store any code suggestions in an external database. - + Instead, we leverage a dedicated private page, within your repository wiki, to track suggestions. This approach offers convenient secure suggestion tracking while avoiding pull requests or any noise to the main repository. ## Usage Tips