coderabbitai / ai-pr-reviewer

AI-based Pull Request Summarizer and Reviewer with Chat Capabilities.
https://coderabbit.ai
MIT License
1.56k stars 297 forks source link

remove some prompts from config #226

Closed harjotgill closed 1 year ago

harjotgill commented 1 year ago

Summary by OpenAI

Release Notes

"Codebase refactored with care, Classes moved with great flair, Unused prompts no longer there, Modularity and maintainability now a pair."

github-actions[bot] commented 1 year ago

:robot: OpenAI

High-level Summary

The changes in this pull request involve refactoring the codebase to improve modularity, maintainability, and consistency. The Prompts class is moved to a separate file, and some unused prompts are removed from the main.ts file. A new class Inputs is added with default values for various inputs and a method render to replace placeholders in a string with actual values. A new class TokenLimits is added with a constructor that sets the values of max_tokens, request_tokens, and response_tokens based on the input model. The OpenAIOptions class is moved to a new file along with the TokenLimits class. Some prompts related to code review and commenting are removed from the codebase. Overall, these changes improve the code quality and make it easier to maintain and extend.

Files Summary

File Summary
action.yml Removes some prompts from the action.yml file. There are no modifications to the logic or functionality of the code.
src/inputs.ts Adds a class Inputs with default values for various inputs and a method render to replace placeholders in a string with actual values.
src/limits.ts Adds a new class TokenLimits with a constructor that sets the values of max_tokens, request_tokens, and response_tokens based on the input model. A string() method is also added to return a string representation of the object.
src/main.ts Moves the Prompts class to a separate file, and removes some unused prompts from the main.ts file.
src/options.ts Removes the Prompts and Inputs classes, and imports TokenLimits from a new file. The OpenAIOptions class is also moved to this file.
src/prompts.ts Removes prompts related to code review and commenting.
src/review-comment.ts Adds a single line that adds file diff cannot be provided to the file.
src/review.ts Removes a prompt from the review.ts file and moves it to a new prompts.ts file. The changes do not affect the code logic or functionality, and only involve minor modifications to the code structure.

Chat with 🤖 OpenAI Bot (@openai)

Code suggestions

Ignoring further reviews


Files ignored due to filter (1) ### Ignored files * dist/index.js
Files not reviewed due to simple changes (6) ### Skipped review * action.yml * src/inputs.ts * src/limits.ts * src/main.ts * src/review-comment.ts * src/review.ts