Closed HyunggyuJang closed 1 year ago
CodeRabbit
Walkthrough:
This PR primarily addresses the issue of incorrect token calculation in the review process. It enhances code readability and efficiency by reusing instantiated prompts and simplifying token count checks. Files exceeding the token limit are now appropriately handled.
Changes:
File | Summary |
---|---|
src/review.ts |
The token calculation has been corrected for accuracy. An instantiated prompt is now reused to improve code readability and efficiency. The check for tokens has been simplified, only verifying if the token count exceeds the limit. Files that exceed the token limit are skipped and added to the summariesFailed array. |
Previously, the
tokens
calculation was incorrect. With this PR, now it is correctly calculated & reuse the instantiated prompt for readability and efficiency.Summary by CodeRabbit