Skip to content

Commit

Permalink
Merge pull request #1417 from ofir-frd/add-implement-documentation-
Browse files Browse the repository at this point in the history
Add documentation for `/implement` tool and enhance `/test` tool references
  • Loading branch information
mrT23 authored Jan 2, 2025
2 parents aa95d5f + 71e477a commit 5bf5f63
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 29 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ dist/
*.egg-info/
build/
.DS_Store
docs/.cache/
docs/.cache/
.qodo
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,17 @@ ___
\
**Analyze 💎 ([`/analyze`](https://pr-agent-docs.codium.ai/tools/analyze/))**: Identify code components that changed in the PR, and enables to interactively generate tests, docs, and code suggestions for each component.
\
**Test 💎 ([`/test`](https://pr-agent-docs.codium.ai/tools/test/))**: Generate tests for a selected component, based on the PR code changes.
\
**Custom Prompt 💎 ([`/custom_prompt`](https://pr-agent-docs.codium.ai/tools/custom_prompt/))**: Automatically generates custom suggestions for improving the PR code, based on specific guidelines defined by the user.
\
**Generate Tests 💎 ([`/test component_name`](https://pr-agent-docs.codium.ai/tools/test/))**: Generates unit tests for a selected component, based on the PR code changes.
\
**CI Feedback 💎 ([`/checks ci_job`](https://pr-agent-docs.codium.ai/tools/ci_feedback/))**: Automatically generates feedback and analysis for a failed CI job.
\
**Similar Code 💎 ([`/find_similar_component`](https://pr-agent-docs.codium.ai/tools/similar_code/))**: Retrieves the most similar code components from inside the organization's codebase, or from open-source code.
\
**Implement 💎 ([`/implement`](https://pr-agent-docs.codium.ai/tools/implement/))**: Generates implementation code from review suggestions.
___

## Example results
Expand Down
1 change: 1 addition & 0 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Qodo Merge offers extensive pull request functionalities across various git prov
| | [Similar Code](https://pr-agent-docs.codium.ai/tools/similar_code/) 💎 || | | |
| | [Custom Prompt](https://pr-agent-docs.codium.ai/tools/custom_prompt/) 💎 |||| |
| | [Test](https://pr-agent-docs.codium.ai/tools/test/) 💎 ||| | |
| | [Implement](https://pr-agent-docs.codium.ai/tools/implement/) 💎 || | | |
| | | | | | |
| USAGE | [CLI](https://qodo-merge-docs.qodo.ai/usage-guide/automations_and_usage/#local-repo-cli) |||||
| | [App / webhook](https://qodo-merge-docs.qodo.ai/usage-guide/automations_and_usage/#github-app) |||||
Expand Down
6 changes: 4 additions & 2 deletions docs/docs/overview/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Qodo Merge offers extensive pull request functionalities across various git prov
| | [Add PR Documentation](./tools/documentation.md){:target="_blank"} 💎 ||| ||
| | [Generate Custom Labels](./tools/describe.md#handle-custom-labels-from-the-repos-labels-page-💎){:target="_blank"} 💎 ||| ||
| | [Analyze PR Components](./tools/analyze.md){:target="_blank"} 💎 ||| ||
| | [Test](https://pr-agent-docs.codium.ai/tools/test/) 💎 ||| | |
| | [Implement](https://pr-agent-docs.codium.ai/tools/implement/) 💎 || | | |
| | | | | ||
| USAGE | CLI |||||
| | App / webhook |||||
Expand All @@ -51,8 +53,8 @@ Qodo Merge offers extensive pull request functionalities across various git prov
| | Adaptive and token-aware file patch fitting |||||
| | Multiple models support |||||
| | Incremental PR review || | | |
| | [Static code analysis](./tools/analyze.md/){:target="_blank"} 💎 || |||
| | [Multiple configuration options](./usage-guide/configuration_options.md){:target="_blank"} 💎 || |||
| | [Static code analysis](./tools/analyze.md/){:target="_blank"} 💎 |||||
| | [Multiple configuration options](./usage-guide/configuration_options.md){:target="_blank"} 💎 |||||

💎 marks a feature available only in [Qodo Merge Pro](https://www.codium.ai/pricing/){:target="_blank"}

Expand Down
15 changes: 8 additions & 7 deletions docs/docs/overview/pr_agent_pro.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ Here are some of the additional features and capabilities that Qodo Merge Pro of

Here are additional tools that are available only for Qodo Merge Pro users:

| Feature | Description |
|---------|-------------|
| Feature | Description |
|---------------------------------------------------------------------------------------|-------------|
| [**Custom Prompt Suggestions**](https://qodo-merge-docs.qodo.ai/tools/custom_prompt/) | Generate code suggestions based on custom prompts from the user |
| [**Analyze PR components**](https://qodo-merge-docs.qodo.ai/tools/analyze/) | Identify the components that changed in the PR, and enable to interactively apply different tools to them |
| [**Tests**](https://qodo-merge-docs.qodo.ai/tools/test/) | Generate tests for code components that changed in the PR |
| [**PR documentation**](https://qodo-merge-docs.qodo.ai/tools/documentation/) | Generate docstring for code components that changed in the PR |
| [**Improve Component**](https://qodo-merge-docs.qodo.ai/tools/improve_component/) | Generate code suggestions for code components that changed in the PR |
| [**Similar code search**](https://qodo-merge-docs.qodo.ai/tools/similar_code/) | Search for similar code in the repository, organization, or entire GitHub |
| [**Analyze PR components**](https://qodo-merge-docs.qodo.ai/tools/analyze/) | Identify the components that changed in the PR, and enable to interactively apply different tools to them |
| [**Tests**](https://qodo-merge-docs.qodo.ai/tools/test/) | Generate tests for code components that changed in the PR |
| [**PR documentation**](https://qodo-merge-docs.qodo.ai/tools/documentation/) | Generate docstring for code components that changed in the PR |
| [**Improve Component**](https://qodo-merge-docs.qodo.ai/tools/improve_component/) | Generate code suggestions for code components that changed in the PR |
| [**Similar code search**](https://qodo-merge-docs.qodo.ai/tools/similar_code/) | Search for similar code in the repository, organization, or entire GitHub |
| [**Code implementation**](https://qodo-merge-docs.qodo.ai/tools/implement/) | Generates implementation code from review suggestions |


### Supported languages
Expand Down
56 changes: 56 additions & 0 deletions docs/docs/tools/implement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
## Overview

The `implement` tool automatically generates implementation code based on PR review suggestions.
It combines LLM capabilities with static code analysis to help developers implement code changes quickly and with confidence.


## Usage Scenarios


### 1. For Reviewers

Reviewers can request code changes by: <br>
1. Selecting the code block to be modified. <br>
2. Adding a comment with the syntax:
```
/implement <code-change-description>
```

![implement1](https://codium.ai/images/pr_agent/implement1.png){width=768}


### 2. For PR Authors

PR authors can implement suggested changes by replying to a review comment using either: <br>
1. Add specific implementation details as described above
```
/implement <code-change-description>
```
2. Use the original review comment as instructions
```
/implement
```

![implement2](https://codium.ai/images/pr_agent/implement2.png){width=768}


### 3. For Referencing Comments

You can reference and implement changes from any comment by:
```
/implement <link-to-review-comment>
```

![implement3](https://codium.ai/images/pr_agent/implement3.png){width=768}

Note that the implementation will occur within the review discussion thread.
Invoke the tool manually by commenting `/implement` on any PR review discussion.


**Configuration options** <br>
- Use `/implement` to implement code change within and based on the review discussion. <br>
- Use `/implement <code-change-description>` inside a review discussion to implement specific instructions. <br>
- Use `/implement <link-to-review-comment>` to indirectly call the tool from any comment. <br>

**Notes** <br>
- The following languages are currently supported: Python, Java, C++, JavaScript, TypeScript, C#.
35 changes: 18 additions & 17 deletions docs/docs/tools/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@

Here is a list of Qodo Merge tools, each with a dedicated page that explains how to use it:

| Tool | Description |
|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| **[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 |
| **[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 |
| **[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 |
| **[Help (`/help`](./help.md))** | Provides a list of all the available tools. Also enables to trigger them interactively (💎) |
| **💎 [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 |
| **💎 [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 Prompt (`/custom_prompt`](./custom_prompt.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 |
| **💎 [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 |

| Tool | Description |
|------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
| **[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 |
| **[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 |
| **[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 |
| **[Help (`/help`](./help.md))** | Provides a list of all the available tools. Also enables to trigger them interactively (💎) |
| **💎 [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 |
| **💎 [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|
| **💎 [Test (`/test`](./test.md))** | generate tests for a selected component, based on the PR code changes |
| **💎 [Custom Prompt (`/custom_prompt`](./custom_prompt.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 |
| **💎 [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 |
| **💎 [Implement (`/implement`](./implement.md))** | Generates implementation code from review suggestions |
Note that the tools marked with 💎 are available only for Qodo Merge Pro users.
4 changes: 2 additions & 2 deletions docs/docs/tools/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ The tool will generate tests for the selected component (if no component is stat

(Example taken from [here](https://github.com/Codium-ai/pr-agent/pull/598#issuecomment-1913679429)):

**Notes**
- Language that are currently supported by the tool: Python, Java, C++, JavaScript, TypeScript, C#.
**Notes** <br>
- The following languages are currently supported: Python, Java, C++, JavaScript, TypeScript, C#. <br>
- This tool can also be triggered interactively by using the [`analyze`](./analyze.md) tool.


Expand Down
1 change: 1 addition & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ nav:
- 💎 Custom Prompt: 'tools/custom_prompt.md'
- 💎 CI Feedback: 'tools/ci_feedback.md'
- 💎 Similar Code: 'tools/similar_code.md'
- 💎 Implement: 'tools/implement.md'
- Core Abilities:
- 'core-abilities/index.md'
- Fetching ticket context: 'core-abilities/fetching_ticket_context.md'
Expand Down

0 comments on commit 5bf5f63

Please sign in to comment.