diff --git a/docs/docs/tools/improve.md b/docs/docs/tools/improve.md index 40945775..b62fd649 100644 --- a/docs/docs/tools/improve.md +++ b/docs/docs/tools/improve.md @@ -72,7 +72,7 @@ To edit [configurations](https://github.com/Codium-ai/pr-agent/blob/main/pr_agen Examples for extra instructions: ``` [pr_code_suggestions] # /improve # - extra_instructions=""" + extra_instructions="""\ Emphasize the following aspects: - Does the code logic cover relevant edge cases? - Is the code logic clear and easy to understand? diff --git a/docs/docs/tools/review.md b/docs/docs/tools/review.md index 41ef75ed..c5681bb4 100644 --- a/docs/docs/tools/review.md +++ b/docs/docs/tools/review.md @@ -124,8 +124,8 @@ The tool will first ask the author questions about the PR, and will guide the re Examples for extra instructions: ``` - [pr_reviewer] # /review # - extra_instructions=""" + [pr_reviewer] + extra_instructions="""\ In the code feedback section, emphasize the following: - Does the code logic cover relevant edge cases? - Is the code logic clear and easy to understand? diff --git a/docs/docs/usage-guide/configuration_options.md b/docs/docs/usage-guide/configuration_options.md index 1d56baa2..ee908b76 100644 --- a/docs/docs/usage-guide/configuration_options.md +++ b/docs/docs/usage-guide/configuration_options.md @@ -22,7 +22,7 @@ Click [here](https://codium.ai/images/pr_agent/wiki_configuration_pr_agent.mp4) An example content: ``` -[pr_description] # /describe # +[pr_description] keep_original_user_title=false ``` diff --git a/pr_agent/algo/utils.py b/pr_agent/algo/utils.py index b017f0aa..5a1e332d 100644 --- a/pr_agent/algo/utils.py +++ b/pr_agent/algo/utils.py @@ -575,7 +575,7 @@ def clip_tokens(text: str, max_tokens: int, add_three_dots=True) -> str: num_output_chars = int(chars_per_token * max_tokens) clipped_text = text[:num_output_chars] if add_three_dots: - clipped_text += "...(truncated)" + clipped_text += " ...(truncated)" return clipped_text except Exception as e: get_logger().warning(f"Failed to clip tokens: {e}") diff --git a/pr_agent/servers/help.py b/pr_agent/servers/help.py index 364088ec..9e85887d 100644 --- a/pr_agent/servers/help.py +++ b/pr_agent/servers/help.py @@ -128,7 +128,7 @@ Be specific, clear, and concise in the instructions. With extra instructions, yo Examples for extra instructions: ``` [pr_description] -extra_instructions=""" +extra_instructions="""\ - The PR title should be in the format: ': ' - The title should be short and concise (up to 10 words) - ... diff --git a/tests/unittest/test_clip_tokens.py b/tests/unittest/test_clip_tokens.py index cc52ab7e..2405a06b 100644 --- a/tests/unittest/test_clip_tokens.py +++ b/tests/unittest/test_clip_tokens.py @@ -15,5 +15,5 @@ class TestClipTokens: max_tokens = 10 result = clip_tokens(text, max_tokens) - expected_results = 'line1\nline2\nline3\nli...(truncated)' + expected_results = 'line1\nline2\nline3\nli ...(truncated)' assert result == expected_results