-
Notifications
You must be signed in to change notification settings - Fork 563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Eyes Reaction to Comments #182
Conversation
/describe |
PR Analysis
PR Feedback
How to use
|
/ask Is this PR complete? |
Question: is this pr complete? Answer:
The changes have been made across multiple files to ensure the functionality is implemented correctly and consistently. The PR also includes error handling for potential issues that might arise during the execution of these new features. However, it's important to note that the actual implementation of the 'add_eyes_reaction' and 'remove_reaction' methods for Bitbucket and GitLab in the respective provider files are placeholders returning True, and do not actually perform the intended actions. This might be a point to consider for further development. |
@@ -80,8 +81,12 @@ async def handle_request(body: Dict[str, Any]): | |||
return {} | |||
pull_request = body["issue"]["pull_request"] | |||
api_url = pull_request.get("url") | |||
comment_id = body.get("comment", {}).get("id") | |||
provider = get_git_provider()(pr_url=api_url) | |||
provider.add_eyes_reaction(comment_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@okotek won't that add the reaction to every comment? Even if it's not even directed towards the PRAgent? Maybe this can move to PRAgent.handle_request
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
test |
/improve |
@CodiumAI-Agent /review |
PR Analysis
PR Feedback
How to use
|
PR Analysis
PR Feedback
|
Add Eyes Reaction to Comments and Configure AI Timeout
PR Type:
Enhancement
PR Description:
This pull request introduces two main enhancements. Firstly, it adds the ability to add and remove an 'eyes' reaction to comments in GitHub, Bitbucket, and GitLab. This is done through the addition of two new methods in the GitProvider class and its subclasses: 'add_eyes_reaction' and 'remove_reaction'. Secondly, it makes the AI timeout configurable, with a default value of 180 seconds. This is achieved by adding a new 'ai_timeout' configuration option in the 'configuration.toml' file and using this value when calling the 'chat_completion' method in the 'AiHandler' class.
PR Main Files Walkthrough:
-
pr_agent/algo/ai_handler.py
: Updated the 'chat_completion' method to use the new 'ai_timeout' configuration option.-
pr_agent/git_providers/git_provider.py
: Added the 'add_eyes_reaction' and 'remove_reaction' abstract methods.-
pr_agent/git_providers/github_provider.py
: Implemented the 'add_eyes_reaction' and 'remove_reaction' methods for GitHub.-
pr_agent/git_providers/bitbucket_provider.py
andpr_agent/git_providers/gitlab_provider.py
: Implemented the 'add_eyes_reaction' and 'remove_reaction' methods for Bitbucket and GitLab, respectively.-
pr_agent/servers/github_action_runner.py
,pr_agent/servers/github_app.py
, andpr_agent/servers/github_polling.py
: Updated to add an 'eyes' reaction to a comment when it is processed and remove it afterwards.-
pr_agent/settings/configuration.toml
: Added the 'ai_timeout' configuration option.