chore: refine system prompt and small update to eval#1940
Conversation
Bug Report
Comments? Email us. |
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
WalkthroughThis update overhauls the AI assistant’s system prompts for email workflows, expanding guidance on tool usage, safety protocols, and workflow examples in both client and server prompt definitions. It also modularizes and enhances test case builders for AI chat evaluations, shifting from fixed numeric limits to relevance-based approaches and enforcing stricter validation. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant AI Assistant
participant Tooling Layer
User->>AI Assistant: User request (e.g., "Show all emails from Alice")
AI Assistant->>Tooling Layer: Invoke appropriate tool (e.g., inboxRag, getThread)
Tooling Layer-->>AI Assistant: Return results
AI Assistant->>User: Respond with results (no manual instructions)
User->>AI Assistant: Bulk action request (e.g., "Delete all spam")
AI Assistant->>Tooling Layer: Prepare preview, enforce safety protocols
Tooling Layer-->>AI Assistant: Return preview/sample
AI Assistant->>User: Ask for explicit confirmation, show consequences
User->>AI Assistant: Confirm action
AI Assistant->>Tooling Layer: Execute bulk operation
Tooling Layer-->>AI Assistant: Operation complete
AI Assistant->>User: Confirm completion, provide undo guidance
Estimated code review effort🎯 4 (Complex) | ⏱️ ~40 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🧰 Additional context used📓 Path-based instructions (4)**/*.{js,jsx,ts,tsx}📄 CodeRabbit Inference Engine (AGENT.md)
Files:
**/*.{js,jsx,ts,tsx,css,scss}📄 CodeRabbit Inference Engine (AGENT.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit Inference Engine (AGENT.md)
Files:
**/*.{css,js,ts,jsx,tsx,mdx}📄 CodeRabbit Inference Engine (.cursor/rules/tailwind-css-v4.mdc)
Files:
🧠 Learnings (5)📓 Common learnings📚 Learning: in apps/server/src/lib/driver/google.ts, the normalization of "draft" to "drafts" in the count() met...Applied to files:
📚 Learning: in the threadlabels prompt system, existing labels should not be automatically preserved. the ai age...Applied to files:
📚 Learning: in apps/mail/lib/hotkeys/mail-list-hotkeys.tsx, the switchcategorybyindex function using hardcoded i...Applied to files:
📚 Learning: in the prompt management system, users should be allowed to save empty prompts as this gives them th...Applied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (12)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
cubic analysis
No issues found across 3 files. Review in cubic
Summary by cubic
Refined the system prompt for the email assistant to clarify tool usage, safety protocols, and response guidelines. Updated eval test case builders for more realistic coverage and improved test data generation.
Prompt Improvements
Eval Updates
Summary by CodeRabbit
New Features
Refactor
Style