diff --git a/README.md b/README.md index 9f32c4b9..c66ec2cd 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ See the [Tools Guide](./docs/TOOLS_GUIDE.md) for a detailed description of the d
-
+
___
-
+
___
### Configuration options
diff --git a/pr_agent/settings/pr_description_prompts.toml b/pr_agent/settings/pr_description_prompts.toml
index 09d1c6e4..b9c5ce39 100644
--- a/pr_agent/settings/pr_description_prompts.toml
+++ b/pr_agent/settings/pr_description_prompts.toml
@@ -39,7 +39,8 @@ class PRType(str, Enum):
Class FileDescription(BaseModel):
filename: str = Field(description="the relevant file full path")
- changes_summary: str = Field(description="minimal and concise summary of the changes in the relevant file")
+ changes_summary: str = Field(description="concise summary of the changes in the relevant file, in bullet points (1-4 bullet points).")
+ changes_title: str = Field(description="an informative title for the changes in the files, describing its main theme (5-10 words).")
label: str = Field(description="a single semantic label that represents a type of code changes that occurred in the File. Possible values (partial list): 'bug fix', 'tests', 'enhancement', 'documentation', 'error handling', 'configuration changes', 'dependencies', 'formatting', 'miscellaneous', ...")
{%- endif %}
@@ -68,6 +69,8 @@ pr_files:
...
changes_summary: |
...
+ changes_title: |
+ ...
label: |
...
...
diff --git a/pr_agent/tools/pr_description.py b/pr_agent/tools/pr_description.py
index e3ec92ff..0cc32b7f 100644
--- a/pr_agent/tools/pr_description.py
+++ b/pr_agent/tools/pr_description.py
@@ -333,10 +333,11 @@ class PRDescription:
try:
filename = file['filename'].replace("'", "`").replace('"', '`')
changes_summary = file['changes_summary']
+ changes_title = file['changes_title'].strip()
label = file.get('label')
if label not in self.file_label_dict:
self.file_label_dict[label] = []
- self.file_label_dict[label].append((filename, changes_summary))
+ self.file_label_dict[label].append((filename, changes_title, changes_summary))
except Exception as e:
get_logger().error(f"Error preparing file label dict {self.pr_id}: {e}")
pass
@@ -357,9 +358,9 @@ class PRDescription:
try:
pr_body += "| {header} | ||
|---|---|---|
| {header} | {len(list_tuples)} files
|