-
Notifications
You must be signed in to change notification settings - Fork 2k
fix chat issue and change view icon #5525
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
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Summary
This PR includes two main improvements: fixes chat issues by adding project instructions to citation prompts, and enhances the UI by replacing generic Eye icons with more appropriate OpenInNewIcon components in file picker interfaces.
- Backend: Enhanced citation system prompts to include project instructions when available, improving chat context
- Type Fix: Corrected
user_file_id
type from UUID to string and cleaned up unused import - UI Enhancement: Replaced Eye icons with OpenInNewIcon throughout file picker components for better visual clarity
- Icon Addition: Added properly typed OpenInNewIcon component with accessibility features
- Spacing Improvements: Refined dialog and component spacing for better UX
Confidence Score: 5/5
- This PR is safe to merge with minimal risk
- All changes are well-structured improvements: backend chat enhancement is straightforward with proper imports, type corrections are clean, and UI changes follow established patterns with proper TypeScript typing
- No files require special attention
Important Files Changed
File Analysis
Filename | Score | Overview |
---|---|---|
backend/onyx/agents/agent_search/dr/nodes/dr_a0_clarification.py | 4/5 | Added project instructions to citations system prompt - straightforward improvement to chat functionality |
backend/onyx/file_store/models.py | 5/5 | Changed user_file_id type from UUID to str, removed unused UUID import - clean type correction |
web/src/app/chat/components/files/FilePicker.tsx | 5/5 | Replaced Eye icon with OpenInNewIcon and improved dialog spacing - UI enhancement |
web/src/app/chat/components/files/FilesList.tsx | 5/5 | Replaced Eye icon with OpenInNewIcon and improved spacing - consistent UI update |
web/src/components/icons/CustomIcons.tsx | 5/5 | Added new OpenInNewIcon component with proper TypeScript typing and accessibility |
Sequence Diagram
sequenceDiagram
participant User
participant Frontend as Web Frontend
participant Backend as Backend API
participant Agent as DR Agent
User->>Frontend: Interact with chat interface
Frontend->>Frontend: Show file picker with OpenInNewIcon
User->>Frontend: Select/view files
Frontend->>Backend: Send chat request with files
Backend->>Agent: Process chat with agent search
Agent->>Agent: Build citations system message
Agent->>Agent: Add project instructions to system prompt
Agent->>Backend: Return processed response
Backend->>Frontend: Return chat response
Frontend->>User: Display chat results with citations
5 files reviewed, no comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 5 files
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="backend/onyx/file_store/models.py">
<violation number="1" location="backend/onyx/file_store/models.py:60">
Returning user_file_id as a string in to_file_descriptor is inconsistent with consumers that expect UUIDs; convert to UUID or keep type aligned to avoid downstream failures.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai
to give feedback, ask questions, or re-run the review.
5bc9b41
to
79eb271
Compare
Description
Fixed chat issues; added instructions to the citation prompt.
How Has This Been Tested?
Tested by sending messages.
Additional Options
Summary by cubic
Fixes chat prompt handling by appending project instructions and corrects file ID typing. Updates the file preview button to an “Open in new” icon with minor dialog spacing tweaks.