Skip to content
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

feat: Add emojis to console output #4

Merged
merged 1 commit into from
Jan 17, 2024
Merged

Conversation

kmesiab
Copy link
Owner

@kmesiab kmesiab commented Jan 17, 2024

  • Update the GPT model to gpt-4-1106-preview

Summary by CodeRabbit

  • Documentation
    • Updated README with a screenshot for better visualization of the command-line interface.
  • New Features
    • Introduced a greeting message upon starting the application.
  • Enhancements
    • Improved progress updates with more detailed messages during operations.
  • Bug Fixes
    • Streamlined output by removing redundant save confirmation messages.

* Update the GPT model to gpt-4-1106-preview
Copy link

coderabbitai bot commented Jan 17, 2024

Walkthrough

The updates include a more interactive command-line interface experience, with the introduction of a greeting, ongoing progress updates, and a more nuanced processing message for diff files. The README has been enhanced with a screenshot for better visual guidance. However, the save confirmation after file writing has been removed, streamlining the output.

Changes

File Path Change Summary
README.md Added a screenshot for the cadre CLI.
main.go Introduced printGreeting and more detailed progress updates; updated getCodeReviews messaging; removed save confirmation in saveReviewToFile.

🐇✨
To the sound of keystrokes, a greeting blooms,
Progress whispers, as the coder assumes.
With each line crafted, a story unfolds,
In the dance of code, a new chapter told. 🌟
🐰💻

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@kmesiab kmesiab merged commit 428a2d0 into main Jan 17, 2024
5 checks passed
@kmesiab kmesiab deleted the feat/emojis-and-latest-model branch January 17, 2024 04:42
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 2

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 73064f4 and 90a8b92.
Files ignored due to path filters (2)
  • assets/cadre-cli-screenshot.png is excluded by: !**/*.png
  • go.sum is excluded by: !**/*.sum
Files selected for processing (2)
  • README.md (1 hunks)
  • main.go (6 hunks)
Files skipped from review due to trivial changes (1)
  • README.md
Additional comments: 6
main.go (6)
  • 32-33: The addition of printGreeting at the start of the main function is a good way to set a friendly tone for the user experience.
  • 45-45: Adding an emoji to the "Getting pull request from GitHub..." message enhances the visual appeal of the output, aligning with the PR's objective to make the console output more engaging.
  • 53-53: The message indicating the number of diff files being processed with an emoji is informative and provides a clear indication of the process that is taking place.
  • 76-76: The error message for a failed save operation is clear and includes the filename. This is consistent with the error handling for review retrieval.
  • 87-87: The final print statement indicating completion is a good user experience practice, providing a clear end to the process.
  • 98-98: The print statement added to the getCodeReviews function provides real-time feedback to the user, which is beneficial for long-running processes.

if err != nil {
return err
}

for _, review := range reviews {

if review.Error != nil {
fmt.Printf("ERROR: couldn't get the review for %s: %s\n",
fmt.Printf("⚠️ couldn't get the review for %s: %s\n",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message for a failed review retrieval is clear and includes the filename, which is helpful for debugging purposes. However, consider logging the full path for more clarity in cases where filenames might be duplicated in different directories.

- fmt.Printf("⚠️ couldn't get the review for %s:  %s\n",
+ fmt.Printf("⚠️ couldn't get the review for %s:  %s\n",
  path.Base(review.Diff.FilePathNew),
  review.Error,
)

Committable suggestion

IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
fmt.Printf("⚠️ couldn't get the review for %s: %s\n",
fmt.Printf("⚠️ couldn't get the review for %s: %s\n",
path.Base(review.Diff.FilePathNew),
review.Error,
)

Comment on lines +186 to +196
func printGreeting() {
fmt.Println(`
_____ ___ ____________ _____
/ __ \ / _ \| _ \ ___ \ ___|
| / \// /_\ \ | | | |_/ / |__
| | | _ | | | | /| __|
| \__/\| | | | |/ /| |\ \| |___
\____/\_| |_/___/ \_| \_\____/

`)
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The printGreeting function prints a stylized greeting banner. This is a nice touch for the user interface, but ensure that the output is well-formatted on all terminal sizes to avoid visual clutter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant