diff --git a/pr_agent/settings/configuration.toml b/pr_agent/settings/configuration.toml index 04466c72..e5428fee 100644 --- a/pr_agent/settings/configuration.toml +++ b/pr_agent/settings/configuration.toml @@ -51,7 +51,6 @@ keep_original_user_title=false use_bullet_points=true extra_instructions = "" enable_pr_type=true -enable_file_walkthrough=false enable_semantic_files_types=true final_update_message = true diff --git a/pr_agent/settings/pr_description_prompts.toml b/pr_agent/settings/pr_description_prompts.toml index 38c53e48..be4f70a0 100644 --- a/pr_agent/settings/pr_description_prompts.toml +++ b/pr_agent/settings/pr_description_prompts.toml @@ -35,12 +35,6 @@ class PRType(str, Enum): {%- endif %} -{%- if enable_file_walkthrough %} -class FileWalkthrough(BaseModel): - filename: str = Field(description="the relevant file full path") - changes_in_file: str = Field(description="minimal and concise summary of the changes in the relevant file") -{%- endif %} - {%- if enable_semantic_files_types %} Class FileDescription(BaseModel): diff --git a/pr_agent/tools/pr_description.py b/pr_agent/tools/pr_description.py index d79c2d50..85fd89a4 100644 --- a/pr_agent/tools/pr_description.py +++ b/pr_agent/tools/pr_description.py @@ -52,7 +52,6 @@ class PRDescription: "commit_messages_str": self.git_provider.get_commit_messages(), "enable_custom_labels": get_settings().config.enable_custom_labels, "custom_labels_class": "", # will be filled if necessary in 'set_custom_labels' function - "enable_file_walkthrough": get_settings().pr_description.enable_file_walkthrough, "enable_semantic_files_types": get_settings().pr_description.enable_semantic_files_types, } @@ -248,12 +247,12 @@ class PRDescription: body = body.replace('pr_agent:summary', summary) if not re.search(r'', body): - ai_walkthrough = self.data.get('PR Main Files Walkthrough') + ai_walkthrough = self.data.get('PR changes walkthrough') if ai_walkthrough: walkthrough = str(ai_header) for file in ai_walkthrough: filename = file['filename'].replace("'", "`") - description = file['changes in file'].replace("'", "`") + description = file['changes_summary'].replace("'", "`") walkthrough += f'- `{filename}`: {description}\n' body = body.replace('pr_agent:walkthrough', walkthrough) @@ -329,7 +328,7 @@ class PRDescription: try: filename = file['filename'].replace("'", "`").replace('"', '`') changes_summary = file['changes_summary'] - label = file['label'] + 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))