From 4e833c0c28b77bc711b3fde9c517597785b34e0d Mon Sep 17 00:00:00 2001 From: mrT23 Date: Wed, 17 Jan 2024 15:43:01 +0200 Subject: [PATCH 1/2] s --- README.md | 23 +++++++++++++++++++++++ docs/IMPROVE.md | 3 ++- pr_agent/settings/configuration.toml | 3 ++- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a5fd0ad3..e7626c47 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,29 @@ Making pull requests less painful with an AI agent GitHub + +## News and Updates +### Jan 18, 2024 +We are very happy to share our new paper: +**"Code Generation with AlphaCodium: From Prompt Engineering to Flow Engineering".** + +Go checkout our official implementation [here](https://github.com/Codium-ai/AlphaCodium) + +### Jan 17, 2024 +- The `improve` tool now can present suggestion in a nice collapsible format, which significantly reduces the PR footprint. See [here](https://github.com/Codium-ai/pr-agent/blob/main/docs/IMPROVE.md#summarized-vs-commitable-code-suggestions) for more details. +- To accompany the improved interface of the `improve` tool, we change the [default automation settings](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L116) of our GithupApp to: +``` +pr_commands = [ + "/describe --pr_description.add_original_user_description=true --pr_description.keep_original_user_title=true", + "/review --pr_reviewer.num_code_suggestions=0", + "/improve --pr_code_suggestions.summarize=true", +] +``` +meaning that by default, for each PR the `describe`, `review`, and `improve` tools will be triggered automatically, and the `improve` tool will present the suggestions in a single comment. +You can of course overwrite these defaults by adding a `.pr_agent.toml` file to your repo. See [here](https://github.com/Codium-ai/pr-agent/blob/main/Usage.md#working-with-github-app). + + +## Overview
CodiumAI PR-Agent is an open-source tool to help efficiently review and handle pull requests. It automatically analyzes the pull request and can provide several types of commands: diff --git a/docs/IMPROVE.md b/docs/IMPROVE.md index b9b389f0..60a01de3 100644 --- a/docs/IMPROVE.md +++ b/docs/IMPROVE.md @@ -28,7 +28,8 @@ ___ --- -Note that a single comment has a significantly smaller PR footprint. We recommend this mode for most cases. +Note that a single comment has a significantly smaller PR footprint. We recommend this mode for most cases. +Also note that collapsible are not supported in _Bitbucket_. Hence, the suggestions are presented there as code comments. ### Extended mode diff --git a/pr_agent/settings/configuration.toml b/pr_agent/settings/configuration.toml index 5188ef4c..5b74d0a3 100644 --- a/pr_agent/settings/configuration.toml +++ b/pr_agent/settings/configuration.toml @@ -115,7 +115,8 @@ duplicate_requests_cache_ttl = 60 # in seconds handle_pr_actions = ['opened', 'reopened', 'ready_for_review', 'review_requested'] pr_commands = [ "/describe --pr_description.add_original_user_description=true --pr_description.keep_original_user_title=true", - "/review", + "/review --pr_reviewer.num_code_suggestions=0", + "/improve --pr_code_suggestions.summarize=true", ] # settings for "pull_request" event with "synchronize" action - used to detect and handle push triggers for new commits handle_push_trigger = false From e4af0b22ad6d47ac4f84479e9d7c2ea52cdb6ce6 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Wed, 17 Jan 2024 15:51:42 +0200 Subject: [PATCH 2/2] s --- pr_agent/servers/help.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pr_agent/servers/help.py b/pr_agent/servers/help.py index d7a78e6e..d1759c53 100644 --- a/pr_agent/servers/help.py +++ b/pr_agent/servers/help.py @@ -236,7 +236,7 @@ Note that the tool does not have "memory" of previous questions, and answers eac @staticmethod def get_improve_usage_guide(): output = "**Overview:**\n" - output += "The improve tool scans the PR code changes, and automatically generates suggestions for improving the PR code. " + output += "The `improve` tool scans the PR code changes, and automatically generates suggestions for improving the PR code. " output += "The tool can be triggered [automatically](https://github.com/Codium-ai/pr-agent/blob/main/Usage.md#github-app-automatic-tools) every time a new PR is opened, or can be invoked manually by commenting on a PR.\n" output += """\ When commenting, to edit [configurations](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L69) related to the improve tool (`pr_code_suggestions` section), use the following template: