Merge pull request #600 from Codium-ai/tr/improve_usage_guide

readme updates
This commit is contained in:
Hussam Lawen
2024-01-17 15:55:42 +02:00
committed by GitHub
4 changed files with 28 additions and 3 deletions

View File

@ -19,6 +19,29 @@ Making pull requests less painful with an AI agent
<img alt="GitHub" src="https://img.shields.io/github/last-commit/Codium-ai/pr-agent/main?style=for-the-badge" height="20">
</a>
</div>
## 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
<div style="text-align:left;">
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:

View File

@ -28,7 +28,8 @@ ___
<kbd><img src=https://codium.ai/images/pr_agent/improve.png width="768"></kbd>
---
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

View File

@ -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:

View File

@ -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