Skip to content

Conversation

Subash-Mohan
Copy link
Contributor

@Subash-Mohan Subash-Mohan commented Sep 28, 2025

Description

Fixed chat issues; added instructions to the citation prompt.

How Has This Been Tested?

Tested by sending messages.

Additional Options

  • [Optional] Override Linear Check

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.

  • Bug Fixes
    • Append project_instructions to the citations system prompt to carry project context into chat.
    • Change FileDescriptor.user_file_id from UUID to string and return string in to_file_descriptor to match frontend usage.
    • Replace Eye icon with OpenInNewIcon in FilePicker/FilesList; adjust Recent Files dialog padding and list spacing.

@Subash-Mohan Subash-Mohan requested a review from a team as a code owner September 28, 2025 09:29
Copy link

vercel bot commented Sep 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
internal-search Ready Ready Preview Comment Sep 29, 2025 6:26am

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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
Loading

5 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a 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.

@Subash-Mohan Subash-Mohan merged commit 4cb39bc into main Sep 29, 2025
54 of 57 checks passed
@Subash-Mohan Subash-Mohan deleted the fix/projects-issues branch September 29, 2025 06:58
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.

2 participants