This repository has been archived by the owner on Mar 6, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix tokens calculation & cleanup the file summary prompt logic (#426)
Previously, the `tokens` calculation was incorrect. With this PR, now it is correctly calculated & reuse the instantiated prompt for readability and efficiency. <!-- This is an auto-generated comment: release notes by OSS CodeRabbit --> ### Summary by CodeRabbit ``` **Bug fix:** - Fixed the incorrect calculation of `tokens` in `src/review.ts`. - Improved code readability and efficiency by reusing instantiated prompt. - Removed diff tokens check, now only checking if token count exceeds limit. - Files exceeding token limit are now skipped and logged in `summariesFailed`. > 🎉 Code's been tweaked, bugs have been fixed, 🐛 > Efficiency improved, with no tricks. 🎩✨ > Tokens counted right, no more plight, 🧮 > Celebrate this PR, it's quite a sight! 🥳🎊 ``` <!-- end of auto-generated comment: release notes by OSS CodeRabbit --> Co-authored-by: Harjot Gill <[email protected]>
- Loading branch information