extra_instructions | @@ -335,5 +335,5 @@ Using a combination of both can help the AI model to provide relevant and tailor - Only if the `Category` header is relevant, the user should move to the summarized suggestion description - Only if the summarized suggestion description is relevant, the user should click on the collapsible, to read the full suggestion description with a code preview example. -- In addition, we recommend to use the [`extra_instructions`](https://qodo-merge-docs.qodo.ai/tools/improve/#extra-instructions-and-best-practices) field to guide the model to suggestions that are more relevant to the specific needs of the project. +- In addition, we recommend to use the [`extra_instructions`](https://qodo-merge-docs.qodo.ai/tools/improve/#extra-instructions-and-best-practices) field to guide the model to suggestions that are more relevant to the specific needs of the project. - The interactive [PR chat](https://qodo-merge-docs.qodo.ai/chrome-extension/) also provides an easy way to get more tailored suggestions and feedback from the AI model. diff --git a/docs/docs/tools/improve_component.md b/docs/docs/tools/improve_component.md index 4e0c88902..b3aac5392 100644 --- a/docs/docs/tools/improve_component.md +++ b/docs/docs/tools/improve_component.md @@ -26,4 +26,4 @@ The tool will generate code suggestions for the selected component (if no compon - `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. \ No newline at end of file +- `class_name`: in case there are several methods with the same name in the same file, you can specify the relevant class name. diff --git a/docs/docs/tools/index.md b/docs/docs/tools/index.md index 394bdbabf..9b856e23d 100644 --- a/docs/docs/tools/index.md +++ b/docs/docs/tools/index.md @@ -19,4 +19,4 @@ Here is a list of Qodo Merge tools, each with a dedicated page that explains how | **💎 [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 Qodo Merge Pro users. \ No newline at end of file +Note that the tools marked with 💎 are available only for Qodo Merge Pro users. diff --git a/docs/docs/tools/review.md b/docs/docs/tools/review.md index 5c7400237..98f529287 100644 --- a/docs/docs/tools/review.md +++ b/docs/docs/tools/review.md @@ -180,10 +180,10 @@ If enabled, the `review` tool can approve a PR when a specific comment, `/review The `review` tool provides a collection of configurable feedbacks about a PR. It is recommended to review the [Configuration options](#configuration-options) section, and choose the relevant options for your use case. - - Some of the features that are disabled by default are quite useful, and should be considered for enabling. For example: + + Some of the features that are disabled by default are quite useful, and should be considered for enabling. For example: `require_score_review`, and more. - + On the other hand, if you find one of the enabled features to be irrelevant for your use case, disable it. No default configuration can fit all use cases. !!! tip "Automation" @@ -197,19 +197,19 @@ If enabled, the `review` tool can approve a PR when a specific comment, `/review !!! tip "Possible labels from the review tool" The `review` tool can auto-generate two specific types of labels for a PR: - + - a `possible security issue` label that detects if a possible [security issue](https://github.com/Codium-ai/pr-agent/blob/tr/user_description/pr_agent/settings/pr_reviewer_prompts.toml#L136) exists in the PR code (`enable_review_labels_security` flag) - a `Review effort [1-5]: x` label, where x is the estimated effort to review the PR (`enable_review_labels_effort` flag) - + Both modes are useful, and we recommended to enable them. !!! tip "Extra instructions" Extra instructions are important. The `review` tool can be configured with extra instructions, which can be used to guide the model to a feedback tailored to the needs of your project. - + Be specific, clear, and concise in the instructions. With extra instructions, you are the prompter. Specify the relevant sub-tool, and the relevant aspects of the PR that you want to emphasize. - + Examples of extra instructions: ``` [pr_reviewer] @@ -227,22 +227,22 @@ If enabled, the `review` tool can approve a PR when a specific comment, `/review !!! tip "Auto-approval" Qodo Merge can approve a PR when a specific comment is invoked. - + To ensure safety, the auto-approval feature is disabled by default. To enable auto-approval, you need to actively set in a pre-defined configuration file the following: ``` [pr_reviewer] enable_auto_approval = true ``` (this specific flag cannot be set with a command line argument, only in the configuration file, committed to the repository) - - + + After enabling, by commenting on a PR: ``` /review auto_approve ``` Qodo Merge will automatically approve the PR, and add a comment with the approval. - - + + You can also enable auto-approval only if the PR meets certain requirements, such as that the `estimated_review_effort` label is equal or below a certain threshold, by adjusting the flag: ``` [pr_reviewer] @@ -258,4 +258,3 @@ If enabled, the `review` tool can approve a PR when a specific comment, `/review [//]: # ( Notice If you are interested **only** in the code suggestions, it is recommended to use the [`improve`](./improve.md) feature instead, since it is a dedicated only to code suggestions, and usually gives better results.) [//]: # ( Use the `review` tool if you want to get more comprehensive feedback, which includes code suggestions as well.) - diff --git a/docs/docs/tools/similar_code.md b/docs/docs/tools/similar_code.md index c992a2627..11de3a0cd 100644 --- a/docs/docs/tools/similar_code.md +++ b/docs/docs/tools/similar_code.md @@ -51,7 +51,7 @@ It can be invoked automatically from the analyze table, can be accessed by: Choose the components you want to find similar code for, and click on the `similar` checkbox. ![analyze similar](https://codium.ai/images/pr_agent/analyze_similar.png){width=768} -If you are looking to search for similar code in the organization's codebase, you can click on the `Organization` checkbox, and it will invoke a new search command just for the organization's codebase. +If you are looking to search for similar code in the organization's codebase, you can click on the `Organization` checkbox, and it will invoke a new search command just for the organization's codebase. ![similar code global](https://codium.ai/images/pr_agent/similar_code_global.png){width=768} diff --git a/docs/docs/tools/similar_issues.md b/docs/docs/tools/similar_issues.md index 4f0351e0d..d701c1c68 100644 --- a/docs/docs/tools/similar_issues.md +++ b/docs/docs/tools/similar_issues.md @@ -17,7 +17,7 @@ It can be invoked manually by commenting on any PR: Note that to perform retrieval, the `similar_issue` tool indexes all the repo previous issues (once). -**Select VectorDBs** by changing `pr_similar_issue` parameter in `configuration.toml` file +**Select VectorDBs** by changing `pr_similar_issue` parameter in `configuration.toml` file 2 VectorDBs are available to switch in 1. LanceDB @@ -40,4 +40,4 @@ These parameters can be obtained by registering to [Pinecone](https://app.pineco - To invoke the 'similar' issue tool via online usage, [comment](https://github.com/Codium-ai/pr-agent/issues/178#issuecomment-1716934893) on a PR: `/similar_issue` -- You can also enable the 'similar issue' tool to run automatically when a new issue is opened, by adding it to the [pr_commands list in the github_app section](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L66) \ No newline at end of file +- You can also enable the 'similar issue' tool to run automatically when a new issue is opened, by adding it to the [pr_commands list in the github_app section](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L66) diff --git a/docs/docs/tools/test.md b/docs/docs/tools/test.md index b5a143f06..f3cc39103 100644 --- a/docs/docs/tools/test.md +++ b/docs/docs/tools/test.md @@ -29,4 +29,4 @@ The tool will generate tests for the selected component (if no component is stat - `extra_instructions`: Optional extra instructions to the tool. For example: "use the following mock injection scheme: ...". - `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. -- `enable_help_text`: if set to true, the tool will add a help text to the PR comment. Default is true. \ No newline at end of file +- `enable_help_text`: if set to true, the tool will add a help text to the PR comment. Default is true. diff --git a/docs/docs/tools/update_changelog.md b/docs/docs/tools/update_changelog.md index 0c1bfda55..9f880ccdf 100644 --- a/docs/docs/tools/update_changelog.md +++ b/docs/docs/tools/update_changelog.md @@ -16,4 +16,4 @@ It can be invoked manually by commenting on any PR: Under the section `pr_update_changelog`, the [configuration file](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L50) contains options to customize the 'update changelog' tool: - `push_changelog_changes`: whether to push the changes to CHANGELOG.md, or just print them. Default is false (print only). -- `extra_instructions`: Optional extra instructions to the tool. For example: "focus on the changes in the file X. Ignore change in ... \ No newline at end of file +- `extra_instructions`: Optional extra instructions to the tool. For example: "focus on the changes in the file X. Ignore change in ... diff --git a/docs/docs/usage-guide/EXAMPLE_BEST_PRACTICE.md b/docs/docs/usage-guide/EXAMPLE_BEST_PRACTICE.md index 0ec886a65..e9de20d8f 100644 --- a/docs/docs/usage-guide/EXAMPLE_BEST_PRACTICE.md +++ b/docs/docs/usage-guide/EXAMPLE_BEST_PRACTICE.md @@ -186,4 +186,4 @@ Do not rely on the atomicity of built-in types. While Python’s built-in data types such as dictionaries appear to have atomic operations, there are corner cases where they aren’t atomic (e.g. if `__hash__` or `__eq__` are implemented as Python methods) and their atomicity should not be relied upon. Neither should you rely on atomic variable assignment (since this in turn depends on dictionaries). -Use the `queue` module’s `Queue` data type as the preferred way to communicate data between threads. Otherwise, use the `threading` module and its locking primitives. Prefer condition variables and `threading.Condition` instead of using lower-level locks. \ No newline at end of file +Use the `queue` module’s `Queue` data type as the preferred way to communicate data between threads. Otherwise, use the `threading` module and its locking primitives. Prefer condition variables and `threading.Condition` instead of using lower-level locks. diff --git a/docs/docs/usage-guide/automations_and_usage.md b/docs/docs/usage-guide/automations_and_usage.md index 11354503f..007f5bf27 100644 --- a/docs/docs/usage-guide/automations_and_usage.md +++ b/docs/docs/usage-guide/automations_and_usage.md @@ -66,7 +66,7 @@ Any configuration value in [configuration file](https://github.com/Codium-ai/pr- ### GitHub app automatic tools when a new PR is opened -The [github_app](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L108) section defines GitHub app specific configurations. +The [github_app](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L108) section defines GitHub app specific configurations. The configuration parameter `pr_commands` defines the list of tools that will be **run automatically** when a new PR is opened. ``` @@ -77,10 +77,11 @@ pr_commands = [ "/improve --pr_code_suggestions.suggestions_score_threshold=5", ] ``` + This means that when a new PR is opened/reopened or marked as ready for review, Qodo Merge will run the `describe`, `review` and `improve` tools. For the `improve` tool, for example, the `suggestions_score_threshold` parameter will be set to 5 (suggestions below a score of 5 won't be presented) -You can override the default tool parameters by using one the three options for a [configuration file](https://qodo-merge-docs.qodo.ai/usage-guide/configuration_options/): **wiki**, **local**, or **global**. +You can override the default tool parameters by using one the three options for a [configuration file](https://qodo-merge-docs.qodo.ai/usage-guide/configuration_options/): **wiki**, **local**, or **global**. For example, if your local `.pr_agent.toml` file contains: ``` [pr_description] @@ -98,7 +99,7 @@ pr_commands = [] In addition to running automatic tools when a PR is opened, the GitHub app can also respond to new code that is pushed to an open PR. -The configuration toggle `handle_push_trigger` can be used to enable this feature. +The configuration toggle `handle_push_trigger` can be used to enable this feature. The configuration parameter `push_commands` defines the list of tools that will be **run automatically** when new code is pushed to the PR. ``` [github_app] @@ -112,7 +113,7 @@ This means that when new code is pushed to the PR, the Qodo Merge will run the ` ## GitHub Action `GitHub Action` is a different way to trigger Qodo Merge tools, and uses a different configuration mechanism than `GitHub App`.
{diff_plus_minus}{delta_nbsp} | - + """ if use_collapsible_file_list: pr_body += """