From 8db7151bf013696312d124e313660e0503fdc902 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Sun, 27 Oct 2024 15:49:10 +0200 Subject: [PATCH] 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 85d9bbe0..b88bca79 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 60858b01..6d1f0cee 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 = """\