Merge pull request #844 from Codium-ai/tr/readme

readme
This commit is contained in:
Tal
2024-04-07 17:05:09 +03:00
committed by GitHub
6 changed files with 7 additions and 7 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -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: '<PR type>: <title>'
- The title should be short and concise (up to 10 words)
- ...

View File

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