Merge pull request #6 from OSSCA-2025-Egg-Benedict/jihan

refactor: reorder and clarify describe tool docs, enforce opt-in default for add_diagram
This commit is contained in:
Yoon Seonwoong
2025-05-25 14:30:00 +09:00
committed by GitHub
2 changed files with 15 additions and 14 deletions

View File

@ -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"

View File

@ -72,8 +72,8 @@ 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),
"add_diagram": get_settings().config.get('pr_description.add_diagram', True),
"duplicate_prompt_examples": get_settings().config.get("duplicate_prompt_examples", False),
"add_diagram": get_settings().config.get('pr_description.add_diagram', False),
}
self.user_description = self.git_provider.get_user_description()