mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-02 11:50:37 +08:00
docs: Add "Improve Component" tool documentation and update related guides
This commit is contained in:
24
docs/docs/tools/improve_component.md
Normal file
24
docs/docs/tools/improve_component.md
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
## Overview
|
||||||
|
The `improve_component` tool generates code suggestions for a specific code component that changed in the PR.
|
||||||
|
it can be invoked manually by commenting on any PR:
|
||||||
|
```
|
||||||
|
/improve_component component_name
|
||||||
|
```
|
||||||
|
|
||||||
|
To get a list of the components that changed in the PR and choose the relevant component interactively, use the [`analyze`](./analyze.md) tool.
|
||||||
|
|
||||||
|
|
||||||
|
Example result:
|
||||||
|
|
||||||
|
{width=768}
|
||||||
|
|
||||||
|
{width=768}
|
||||||
|
|
||||||
|
**Notes**
|
||||||
|
- Language that are currently supported by the tool: Python, Java, C++, JavaScript, TypeScript.
|
||||||
|
|
||||||
|
## Configuration options
|
||||||
|
- `num_code_suggestions`: number of code suggestions to provide. Default is 4
|
||||||
|
- `extra_instructions`: Optional extra instructions to the tool. For example: "focus on ...".
|
||||||
|
- `file`: in case there are several components with the same name, you can specify the relevant file.
|
||||||
|
- `class_name`: in case there are several methods with the same name in the same file, you can specify the relevant class name.
|
@ -2,19 +2,20 @@
|
|||||||
|
|
||||||
Here is a list of PR-Agent tools, each with a dedicated page that explains how to use it:
|
Here is a list of PR-Agent tools, each with a dedicated page that explains how to use it:
|
||||||
|
|
||||||
| Tool | Description |
|
| Tool | Description |
|
||||||
|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
|
|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| **[PR Description (`/describe`](./describe.md))** | Automatically generating PR description - title, type, summary, code walkthrough and labels |
|
| **[PR Description (`/describe`](./describe.md))** | Automatically generating PR description - title, type, summary, code walkthrough and labels |
|
||||||
| **[PR Review (`/review`](./review.md))** | Adjustable feedback about the PR, possible issues, security concerns, review effort and more |
|
| **[PR Review (`/review`](./review.md))** | Adjustable feedback about the PR, possible issues, security concerns, review effort and more |
|
||||||
| **[Code Suggestions (`/improve`](./improve.md))** | Code suggestions for improving the PR |
|
| **[Code Suggestions (`/improve`](./improve.md))** | Code suggestions for improving the PR |
|
||||||
| **[Question Answering (`/ask ...`](./ask.md))** | Answering free-text questions about the PR, or on specific code lines |
|
| **[Question Answering (`/ask ...`](./ask.md))** | Answering free-text questions about the PR, or on specific code lines |
|
||||||
| **[Update Changelog (`/update_changelog`](./update_changelog.md))** | Automatically updating the CHANGELOG.md file with the PR changes |
|
| **[Update Changelog (`/update_changelog`](./update_changelog.md))** | Automatically updating the CHANGELOG.md file with the PR changes |
|
||||||
| **[Find Similar Issue (`/similar_issue`](./similar_issues.md))** | Automatically retrieves and presents similar issues |
|
| **[Find Similar Issue (`/similar_issue`](./similar_issues.md))** | Automatically retrieves and presents similar issues |
|
||||||
| **💎 [Add Documentation (`/add_docs`](./documentation.md))** | Generates documentation to methods/functions/classes that changed in the PR |
|
| **💎 [Add Documentation (`/add_docs`](./documentation.md))** | Generates documentation to methods/functions/classes that changed in the PR |
|
||||||
| **💎 [Generate Custom Labels (`/generate_labels`](./custom_labels.md))** | Generates custom labels for the PR, based on specific guidelines defined by the user |
|
| **💎 [Generate Custom Labels (`/generate_labels`](./custom_labels.md))** | Generates custom labels for the PR, based on specific guidelines defined by the user |
|
||||||
| **💎 [Analyze (`/analyze`](./analyze.md))** | Identify code components that changed in the PR, and enables to interactively generate tests, docs, and code suggestions for each component |
|
| **💎 [Analyze (`/analyze`](./analyze.md))** | Identify code components that changed in the PR, and enables to interactively generate tests, docs, and code suggestions for each component |
|
||||||
| **💎 [Custom Suggestions (`/custom_suggestions`](./custom_suggestions.md))** | Automatically generates custom suggestions for improving the PR code, based on specific guidelines defined by the user |
|
| **💎 [Custom Suggestions (`/custom_suggestions`](./custom_suggestions.md))** | Automatically generates custom suggestions for improving the PR code, based on specific guidelines defined by the user |
|
||||||
| **💎 [Generate Tests (`/test component_name`](./test.md))** | Automatically generates unit tests for a selected component, based on the PR code changes |
|
| **💎 [Generate Tests (`/test component_name`](./test.md))** | Automatically generates unit tests for a selected component, based on the PR code changes |
|
||||||
| **💎 [CI Feedback (`/checks ci_job`](./ci_feedback.md))** | Automatically generates feedback and analysis for a failed CI job |
|
| **💎 [Improve Component (`/improve_component component_name`](./improve_component.md))** | Generates code suggestions for a specific code component that changed in the PR |
|
||||||
|
| **💎 [CI Feedback (`/checks ci_job`](./ci_feedback.md))** | Automatically generates feedback and analysis for a failed CI job |
|
||||||
|
|
||||||
Note that the tools marked with 💎 are available only for PR-Agent Pro users.
|
Note that the tools marked with 💎 are available only for PR-Agent Pro users.
|
@ -5,7 +5,7 @@ It can be invoked manually by commenting on any PR:
|
|||||||
/test component_name
|
/test component_name
|
||||||
```
|
```
|
||||||
where 'component_name' is the name of a specific component in the PR.
|
where 'component_name' is the name of a specific component in the PR.
|
||||||
To get a list of the components that changed in the PR, use the [`analyze`](./analyze.md) tool.
|
To get a list of the components that changed in the PR and choose the relevant component interactively, use the [`analyze`](./analyze.md) tool.
|
||||||
|
|
||||||
|
|
||||||
An example [result](https://github.com/Codium-ai/pr-agent/pull/598#issuecomment-1913679429):
|
An example [result](https://github.com/Codium-ai/pr-agent/pull/598#issuecomment-1913679429):
|
||||||
|
@ -27,6 +27,7 @@ nav:
|
|||||||
- Similar Issues: 'tools/similar_issues.md'
|
- Similar Issues: 'tools/similar_issues.md'
|
||||||
- 💎 Analyze: 'tools/analyze.md'
|
- 💎 Analyze: 'tools/analyze.md'
|
||||||
- 💎 Test: 'tools/test.md'
|
- 💎 Test: 'tools/test.md'
|
||||||
|
- 💎 Improve Component: 'tools/improve_component.md'
|
||||||
- 💎 Documentation: 'tools/documentation.md'
|
- 💎 Documentation: 'tools/documentation.md'
|
||||||
- 💎 Custom Labels: 'tools/custom_labels.md'
|
- 💎 Custom Labels: 'tools/custom_labels.md'
|
||||||
- 💎 Custom Suggestions: 'tools/custom_suggestions.md'
|
- 💎 Custom Suggestions: 'tools/custom_suggestions.md'
|
||||||
|
@ -110,6 +110,11 @@ file = "" # in case there are several components with the same name
|
|||||||
class_name = "" # in case there are several methods with the same name in the same file, you can specify the relevant class name
|
class_name = "" # in case there are several methods with the same name in the same file, you can specify the relevant class name
|
||||||
enable_help_text=true
|
enable_help_text=true
|
||||||
|
|
||||||
|
[pr_improve_component] # /improve_component #
|
||||||
|
num_code_suggestions=4
|
||||||
|
extra_instructions = ""
|
||||||
|
file = "" # in case there are several components with the same name, you can specify the relevant file
|
||||||
|
class_name = ""
|
||||||
|
|
||||||
[checks] # /checks (pro feature) #
|
[checks] # /checks (pro feature) #
|
||||||
enable_auto_checks_feedback=true
|
enable_auto_checks_feedback=true
|
||||||
|
Reference in New Issue
Block a user