coderabbitai / ai-pr-reviewer

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

update prompt #405

Closed harjotgill closed 11 months ago

harjotgill commented 11 months ago

Summary by CodeRabbit

- **New Feature**: Added `Mobile` struct in `mobile.go` to simulate a mobile device's operations.
- **Refactor**: Updated `format_error` function in `src/prompts.ts` to include line numbers in error messages for better debugging.

🎉 With every line of code, we strive,

In mobile.go, a new Mobile comes alive! 📱

And in prompts.ts, no more guess and dive,

For format_error now tells where the issue lies! 🐞🔍

github-actions[bot] commented 11 months ago

Image description CodeRabbit

Walkthrough

This pull request introduces changes to error handling in src/prompts.ts by including line numbers in error messages, and adds a new Mobile struct in mobile.go with methods for simulating mobile device usage. The PR also updates the review guidelines and instructions.

Changes

File Summary
src/prompts.ts The format_error function now includes a line_number parameter and modifies the error message to include this line number. This change enhances error tracking and debugging. The review guidelines have been updated to trust developers' use of newer APIs and methods.
mobile.go Introduced a Mobile struct representing a mobile device, with methods to turn on/off the device, simulate usage, and charge the battery. The main function demonstrates these functionalities.

Notes ### Chat with Image description CodeRabbit Bot (`@coderabbitai`) - Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file. - Invite the bot into a review comment chain by tagging `@coderabbitai` in a reply. ### Code suggestions - The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned. - You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off. ### Ignoring further reviews - Type `@coderabbitai: ignore` anywhere in the PR description to ignore further reviews from the bot.