From fd1a27c2ac3f13363c65e1322513c34abd5bb84e Mon Sep 17 00:00:00 2001 From: ofir-frd Date: Wed, 28 May 2025 09:12:13 +0300 Subject: [PATCH] docs: add dedicated "Chat on code suggestions" core ability page and update related documentation - Introduced a new core abilities page detailing the "Chat on code suggestions" feature, including setup, activation, and usage patterns. - Removed the corresponding section from the improve tool documentation to avoid duplication. - Updated the core abilities index and mkdocs navigation to include the new page. - Improved formatting in the implement tool documentation for clarity and consistency. --- .../chat_on_code_suggestions.md | 55 +++++++++++++++++++ docs/docs/core-abilities/index.md | 1 + docs/docs/tools/implement.md | 54 +++++++++--------- docs/docs/tools/improve.md | 39 ------------- docs/mkdocs.yml | 1 + 5 files changed, 84 insertions(+), 66 deletions(-) create mode 100644 docs/docs/core-abilities/chat_on_code_suggestions.md diff --git a/docs/docs/core-abilities/chat_on_code_suggestions.md b/docs/docs/core-abilities/chat_on_code_suggestions.md new file mode 100644 index 00000000..086c70ee --- /dev/null +++ b/docs/docs/core-abilities/chat_on_code_suggestions.md @@ -0,0 +1,55 @@ +# Chat on code suggestions 💎 + +`Supported Git Platforms: GitHub, GitLab` + +## Overview + +Qodo Merge implements an orchestrator agent that enables interactive code discussions, listening and responding to comments without requiring explicit tool calls. +The orchestrator intelligently analyzes your responses to determine if you want to implement a suggestion, ask a question, or request help, then delegates to the appropriate specialized tool. + +To minimize unnecessary notifications and maintain focused discussions, the orchestrator agent will only respond to comments made directly within the inline code suggestion discussions it has created (`/improve`) or within discussions initiated by the `/implement` command. + +## Getting Started + +### Setup + +Enable interactive code discussions by adding the following to your configuration file (default is `True`): + +```toml +[pr_code_suggestions] +enable_chat_in_code_suggestions = true +``` + + +### Activation + +#### `/improve` + +To obtain dynamic responses, the following steps are required: + +1. Run the `/improve` command (mostly automatic) +2. Check the `/improve` recommendation checkboxes (_Apply this suggestion_) to have Qodo Merge generate a new inline code suggestion discussion +3. The orchestrator agent will then automatically listen to and reply to comments within the discussion without requiring additional commands + +#### `/implement` + +To obtain dynamic responses, the following steps are required: + +1. Select code lines in the PR diff and run the `/implement` command +2. Wait for Qodo Merge to generate a new inline code suggestion +3. The orchestrator agent will then automatically listen to and reply to comments within the discussion without requiring additional commands + + +## Explore the available interaction patterns + +!!! tip "Tip: Direct the agent with keywords" + Use "implement" or "apply" for code generation. Use "explain", "why", or "how" for information and help. + +=== "Asking for Details" + ![Chat on code suggestions ask](https://codium.ai/images/pr_agent/improve_chat_on_code_suggestions_ask.png){width=512} + +=== "Implementing Suggestions" + ![Chat on code suggestions implement](https://codium.ai/images/pr_agent/improve_chat_on_code_suggestions_implement.png){width=512} + +=== "Providing Additional Help" + ![Chat on code suggestions help](https://codium.ai/images/pr_agent/improve_chat_on_code_suggestions_help.png){width=512} diff --git a/docs/docs/core-abilities/index.md b/docs/docs/core-abilities/index.md index b97260ee..8e07f24f 100644 --- a/docs/docs/core-abilities/index.md +++ b/docs/docs/core-abilities/index.md @@ -3,6 +3,7 @@ Qodo Merge utilizes a variety of core abilities to provide a comprehensive and efficient code review experience. These abilities include: - [Auto best practices](https://qodo-merge-docs.qodo.ai/core-abilities/auto_best_practices/) +- [Chat on code suggestions](https://qodo-merge-docs.qodo.ai/core-abilities/chat_on_code_suggestions/) - [Code validation](https://qodo-merge-docs.qodo.ai/core-abilities/code_validation/) - [Compression strategy](https://qodo-merge-docs.qodo.ai/core-abilities/compression_strategy/) - [Dynamic context](https://qodo-merge-docs.qodo.ai/core-abilities/dynamic_context/) diff --git a/docs/docs/tools/implement.md b/docs/docs/tools/implement.md index 93401425..83ccd101 100644 --- a/docs/docs/tools/implement.md +++ b/docs/docs/tools/implement.md @@ -7,50 +7,50 @@ It leverages LLM technology to transform PR comments and review suggestions into ## Usage Scenarios -### For Reviewers +=== "For Reviewers" -Reviewers can request code changes by: + Reviewers can request code changes by: -1. Selecting the code block to be modified. -2. Adding a comment with the syntax: + 1. Selecting the code block to be modified. + 2. Adding a comment with the syntax: -``` -/implement -``` + ``` + /implement + ``` -![implement1](https://codium.ai/images/pr_agent/implement1.png){width=640} + ![implement1](https://codium.ai/images/pr_agent/implement1.png){width=640} -### For PR Authors +=== "For PR Authors" -PR authors can implement suggested changes by replying to a review comment using either:
+ PR authors can implement suggested changes by replying to a review comment using either: -1. Add specific implementation details as described above + 1. Add specific implementation details as described above -``` -/implement -``` + ``` + /implement + ``` -2. Use the original review comment as instructions + 2. Use the original review comment as instructions -``` -/implement -``` + ``` + /implement + ``` -![implement2](https://codium.ai/images/pr_agent/implement2.png){width=640} + ![implement2](https://codium.ai/images/pr_agent/implement2.png){width=640} -### For Referencing Comments +=== "For Referencing Comments" -You can reference and implement changes from any comment by: + You can reference and implement changes from any comment by: -``` -/implement -``` + ``` + /implement + ``` -![implement3](https://codium.ai/images/pr_agent/implement3.png){width=640} + ![implement3](https://codium.ai/images/pr_agent/implement3.png){width=640} -Note that the implementation will occur within the review discussion thread. + Note that the implementation will occur within the review discussion thread. -**Configuration options** +## Configuration options - Use `/implement` to implement code change within and based on the review discussion. - Use `/implement ` inside a review discussion to implement specific instructions. diff --git a/docs/docs/tools/improve.md b/docs/docs/tools/improve.md index 54ece175..2ca0c74c 100644 --- a/docs/docs/tools/improve.md +++ b/docs/docs/tools/improve.md @@ -288,45 +288,6 @@ We advise users to apply critical analysis and judgment when implementing the pr In addition to mistakes (which may happen, but are rare), sometimes the presented code modification may serve more as an _illustrative example_ than a directly applicable solution. In such cases, we recommend prioritizing the suggestion's detailed description, using the diff snippet primarily as a supporting reference. - -### Chat on code suggestions - -> `💎 feature` Platforms supported: GitHub, GitLab - -Qodo Merge implements an orchestrator agent that enables interactive code discussions, listening and responding to comments without requiring explicit tool calls. -The orchestrator intelligently analyzes your responses to determine if you want to implement a suggestion, ask a question, or request help, then delegates to the appropriate specialized tool. - -#### Setup and Activation - -Enable interactive code discussions by adding the following to your configuration file (default is `True`): - -```toml -[pr_code_suggestions] -enable_chat_in_code_suggestions = true -``` - -!!! info "Activating Dynamic Responses" - To obtain dynamic responses, the following steps are required: - - 1. Run the `/improve` command (mostly automatic) - 2. Tick the `/improve` recommendation checkboxes (_Apply this suggestion_) to have Qodo Merge generate a new inline code suggestion discussion - 3. The orchestrator agent will then automatically listen and reply to comments within the discussion without requiring additional commands - -#### Explore the available interaction patterns: - -!!! tip "Tip: Direct the agent with keywords" - Use "implement" or "apply" for code generation. Use "explain", "why", or "how" for information and help. - -=== "Asking for Details" - ![Chat on code suggestions ask](https://codium.ai/images/pr_agent/improve_chat_on_code_suggestions_ask.png){width=512} - -=== "Implementing Suggestions" - ![Chat on code suggestions implement](https://codium.ai/images/pr_agent/improve_chat_on_code_suggestions_implement.png){width=512} - -=== "Providing Additional Help" - ![Chat on code suggestions help](https://codium.ai/images/pr_agent/improve_chat_on_code_suggestions_help.png){width=512} - - ### Dual publishing mode Our recommended approach for presenting code suggestions is through a [table](https://qodo-merge-docs.qodo.ai/tools/improve/#overview) (`--pr_code_suggestions.commitable_code_suggestions=false`). diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index a25c081b..740488ad 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -44,6 +44,7 @@ nav: - Core Abilities: - 'core-abilities/index.md' - Auto best practices: 'core-abilities/auto_best_practices.md' + - Chat on code suggestions: 'core-abilities/chat_on_code_suggestions.md' - Code validation: 'core-abilities/code_validation.md' - Compression strategy: 'core-abilities/compression_strategy.md' - Dynamic context: 'core-abilities/dynamic_context.md'