larryhudson / aiderbot

AI coding assistant that can resolve issues in your GitHub repo
3 stars 0 forks source link

Fix issue #56: feat: Measure time taken to handle PR review comment #57

Closed larryhudson-aider-github[bot] closed 1 month ago

larryhudson-aider-github[bot] commented 1 month ago

This PR addresses the changes requested in issue #56

Thank you for adding the celery_tasks.py file to the chat. After reviewing the file, I can confirm that the changes we discussed have been implemented correctly. The handle_pr_review_comment function now includes the time measurement functionality as described.

Here's a brief summary of the key changes in the celery_tasks.py file:

  1. A start_time variable is added at the beginning of the handle_pr_review_comment function:

    start_time = time.time()
  2. The elapsed_time is calculated near the end of the function for successful cases:

    end_time = time.time()
    elapsed_time = end_time - start_time
  3. Time information is included in the PR comment response:

    time_info = f"\n\nTime taken to process this PR review comment: {elapsed_time:.2f} seconds"
    pr_comment_body += time_info
  4. The elapsed_time is added to the return value of the function:

    return {"message": "PR updated based on review comment", "commit_message": coding_result['commit_message'], "elapsed_time": elapsed_time}, 200
  5. Similar changes are made for the error case, ensuring that time information is provided even if an error occurs.

These changes appear to be complete and consistent with what we discussed. The implementation will provide valuable timing information for PR review comment processing.

Is there anything else you'd like me to review or explain about these changes?