From b51abe9af754cd91af9430d860cf436a682143e0 Mon Sep 17 00:00:00 2001 From: KennyDizi Date: Sun, 14 Jul 2024 12:01:33 +0700 Subject: [PATCH] Use full file path instead of complete file path --- pr_agent/settings/pr_add_docs.toml | 2 +- pr_agent/settings/pr_code_suggestions_prompts.toml | 4 ++-- pr_agent/settings/pr_description_prompts.toml | 2 +- pr_agent/settings/pr_reviewer_prompts.toml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pr_agent/settings/pr_add_docs.toml b/pr_agent/settings/pr_add_docs.toml index 477b0855..c8ddd77c 100644 --- a/pr_agent/settings/pr_add_docs.toml +++ b/pr_agent/settings/pr_add_docs.toml @@ -56,7 +56,7 @@ Code Documentation: items: relevant file: type: string - description: The complete file path of the relevant file. + description: The full file path of the relevant file. relevant line: type: integer description: |- diff --git a/pr_agent/settings/pr_code_suggestions_prompts.toml b/pr_agent/settings/pr_code_suggestions_prompts.toml index fde51f5a..4d68ad7b 100644 --- a/pr_agent/settings/pr_code_suggestions_prompts.toml +++ b/pr_agent/settings/pr_code_suggestions_prompts.toml @@ -57,7 +57,7 @@ Extra instructions from the user, that should be taken into account with high pr The output must be a YAML object equivalent to type $PRCodeSuggestions, according to the following Pydantic definitions: ===== class CodeSuggestion(BaseModel): - relevant_file: str = Field(description="The complete file path of the relevant file.") + relevant_file: str = Field(description="The full file path of the relevant file.") language: str = Field(description="The programming language of the relevant file.") suggestion_content: str = Field(description="an actionable suggestion for meaningfully improving the new code introduced in the PR") existing_code: str = Field(description="a short code snippet, demonstrating the relevant code lines from a '__new hunk__' section. It must be without line numbers. Use abbreviations if needed") @@ -171,7 +171,7 @@ Extra instructions from the user, that should be taken into account with high pr The output must be a YAML object equivalent to type $PRCodeSuggestions, according to the following Pydantic definitions: ===== class CodeSuggestion(BaseModel): - relevant_file: str = Field(description="The complete file path of the relevant file.") + relevant_file: str = Field(description="The full file path of the relevant file.") language: str = Field(description="The programming language of the relevant file.") suggestion_content: str = Field(description="an actionable suggestion for meaningfully improving the new code introduced in the PR. Don't present here actual code snippets, just the suggestion. Be short and concise ") existing_code: str = Field(description="a short code snippet, demonstrating the relevant code lines from a '__new hunk__' section. It must be without line numbers. Use abbreviations ("...") if needed") diff --git a/pr_agent/settings/pr_description_prompts.toml b/pr_agent/settings/pr_description_prompts.toml index 40b68bad..0ad9de87 100644 --- a/pr_agent/settings/pr_description_prompts.toml +++ b/pr_agent/settings/pr_description_prompts.toml @@ -38,7 +38,7 @@ class PRType(str, Enum): {%- if enable_semantic_files_types %} class FileDescription(BaseModel): - filename: str = Field(description="The complete file path of the relevant file.") + filename: str = Field(description="The full file path of the relevant file.") language: str = Field(description="The programming language of 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).") diff --git a/pr_agent/settings/pr_reviewer_prompts.toml b/pr_agent/settings/pr_reviewer_prompts.toml index 91efeff0..7f2dddb8 100644 --- a/pr_agent/settings/pr_reviewer_prompts.toml +++ b/pr_agent/settings/pr_reviewer_prompts.toml @@ -78,7 +78,7 @@ class Review(BaseModel): {%- if num_code_suggestions > 0 %} class CodeSuggestion(BaseModel): - relevant_file: str = Field(description="The complete file path of the relevant file.") + relevant_file: str = Field(description="The full file path of the relevant file.") language: str = Field(description="The programming language of the relevant file.") suggestion: str = Field(description="a concrete suggestion for meaningfully improving the new PR code. Also describe how, specifically, the suggestion can be applied to new PR code. Add tags with importance measure that matches each suggestion ('important' or 'medium'). Do not make suggestions for updating or adding docstrings, renaming PR title and description, or linter like.") relevant_line: str = Field(description="a single code line taken from the relevant file, to which the suggestion applies. The code line should start with a '+'. Make sure to output the line exactly as it appears in the relevant file")