From c346d784e394c3a9580a37f7cded10d783fc5b33 Mon Sep 17 00:00:00 2001 From: chilln Date: Sun, 25 May 2025 12:47:09 +0900 Subject: [PATCH 1/3] docs:move sequence diagram section below main explanation of describe --- docs/docs/tools/describe.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/docs/tools/describe.md b/docs/docs/tools/describe.md index 4f4e2232..03cb0c62 100644 --- a/docs/docs/tools/describe.md +++ b/docs/docs/tools/describe.md @@ -1,18 +1,6 @@ ## Overview The `describe` tool scans the PR code changes, and generates a description for the PR - title, type, summary, walkthrough and labels. -### Mermaid Diagram Support -When the `add_diagram` option is enabled in your configuration, the `/describe` tool will include a `Mermaid` sequence diagram in the PR description. - -This diagram represents interactions between components/functions based on the diff content. - -### How to enable - -In your configuration: - -toml -[pr_description] -add_diagram = true The tool can be triggered automatically every time a new PR is [opened](../usage-guide/automations_and_usage.md#github-app-automatic-tools-when-a-new-pr-is-opened), or it can be invoked manually by commenting on any PR: @@ -68,6 +56,19 @@ Everything below this marker is treated as previously auto-generated content and ![Describe comment](https://codium.ai/images/pr_agent/pr_description_user_description.png){width=512} +### Sequence Diagram Support +When the `add_diagram` option is enabled in your configuration, the `/describe` tool will include a `Mermaid` sequence diagram in the PR description. + +This diagram represents interactions between components/functions based on the diff content. + +### How to enable + +In your configuration: + +toml +[pr_description] +add_diagram = true + ## Configuration options !!! example "Possible configurations" From f58c40a6aed7cde8ee4a0032d57223bf91af10d9 Mon Sep 17 00:00:00 2001 From: chilln Date: Sun, 25 May 2025 12:48:13 +0900 Subject: [PATCH 2/3] refactor: replace single quotes with double quotes to match existing code style --- pr_agent/tools/pr_description.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pr_agent/tools/pr_description.py b/pr_agent/tools/pr_description.py index bc8983f4..1f28fb69 100644 --- a/pr_agent/tools/pr_description.py +++ b/pr_agent/tools/pr_description.py @@ -72,7 +72,7 @@ class PRDescription: "enable_semantic_files_types": get_settings().pr_description.enable_semantic_files_types, "related_tickets": "", "include_file_summary_changes": len(self.git_provider.get_diff_files()) <= self.COLLAPSIBLE_FILE_LIST_THRESHOLD, - 'duplicate_prompt_examples': get_settings().config.get('duplicate_prompt_examples', False), + "duplicate_prompt_examples": get_settings().config.get("duplicate_prompt_examples", False), "add_diagram": get_settings().config.get('pr_description.add_diagram', True), } From e57d3101e4ae2edf4164b78efdf88f0351d1e75d Mon Sep 17 00:00:00 2001 From: chilln Date: Sun, 25 May 2025 12:48:29 +0900 Subject: [PATCH 3/3] fix:set parameter default to false to make the feature opt-in by design --- pr_agent/tools/pr_description.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pr_agent/tools/pr_description.py b/pr_agent/tools/pr_description.py index 1f28fb69..84dd2b47 100644 --- a/pr_agent/tools/pr_description.py +++ b/pr_agent/tools/pr_description.py @@ -73,7 +73,7 @@ class PRDescription: "related_tickets": "", "include_file_summary_changes": len(self.git_provider.get_diff_files()) <= self.COLLAPSIBLE_FILE_LIST_THRESHOLD, "duplicate_prompt_examples": get_settings().config.get("duplicate_prompt_examples", False), - "add_diagram": get_settings().config.get('pr_description.add_diagram', True), + "add_diagram": get_settings().config.get('pr_description.add_diagram', False), } self.user_description = self.git_provider.get_user_description()