mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-06 22:00:40 +08:00
Merge pull request #807 from Codium-ai/tr/persistent_improve
Add persistent improve
This commit is contained in:
@ -53,16 +53,17 @@ To edit [configurations](https://github.com/Codium-ai/pr-agent/blob/main/pr_agen
|
||||
|
||||
!!! example "General options"
|
||||
|
||||
- `num_code_suggestions`: number of code suggestions provided by the 'improve' tool. Default is 4.
|
||||
- `num_code_suggestions`: number of code suggestions provided by the 'improve' tool. Default is 4 for CLI, 0 for auto tools.
|
||||
- `extra_instructions`: Optional extra instructions to the tool. For example: "focus on the changes in the file X. Ignore change in ...".
|
||||
- `rank_suggestions`: if set to true, the tool will rank the suggestions, based on importance. Default is false.
|
||||
- `summarize`: if set to true, the tool will display the suggestions in a single comment. Default is false.
|
||||
- `summarize`: if set to true, the tool will display the suggestions in a single comment. Default is true.
|
||||
- `persistent_comment`: if set to true, the improve comment will be persistent, meaning that every new improve request will edit the previous one. Default is false.
|
||||
- `enable_help_text`: if set to true, the tool will display a help text in the comment. Default is true.
|
||||
|
||||
!!! example "params for '/improve --extended' mode"
|
||||
|
||||
- `auto_extended_mode`: enable extended mode automatically (no need for the `--extended` option). Default is true.
|
||||
- `num_code_suggestions_per_chunk`: number of code suggestions provided by the 'improve' tool, per chunk. Default is 8.
|
||||
- `num_code_suggestions_per_chunk`: number of code suggestions provided by the 'improve' tool, per chunk. Default is 5.
|
||||
- `rank_extended_suggestions`: if set to true, the tool will rank the suggestions, based on importance. Default is true.
|
||||
- `max_number_of_calls`: maximum number of chunks. Default is 5.
|
||||
- `final_clip_factor`: factor to remove suggestions with low confidence. Default is 0.9.
|
||||
|
@ -82,6 +82,7 @@ summarize = true
|
||||
extra_instructions = ""
|
||||
rank_suggestions = false
|
||||
enable_help_text=true
|
||||
persistent_comment=false
|
||||
# params for '/improve --extended' mode
|
||||
auto_extended_mode=true
|
||||
num_code_suggestions_per_chunk=5
|
||||
|
@ -117,6 +117,16 @@ class PRCodeSuggestions:
|
||||
pr_body += HelpMessage.get_improve_usage_guide()
|
||||
pr_body += "\n</details>\n"
|
||||
|
||||
if get_settings().pr_code_suggestions.persistent_comment:
|
||||
final_update_message = False
|
||||
self.git_provider.publish_persistent_comment(pr_body,
|
||||
initial_header="## PR Code Suggestions",
|
||||
update_header=True,
|
||||
final_update_message=final_update_message, )
|
||||
if self.progress_response:
|
||||
self.progress_response.delete()
|
||||
else:
|
||||
|
||||
if self.progress_response:
|
||||
self.git_provider.edit_comment(self.progress_response, body=pr_body)
|
||||
else:
|
||||
|
Reference in New Issue
Block a user