Skip to content

Conversation

Akanksha256742
Copy link

screen_recording_2025-09-22_at_2.35.57___pm.1.mp4

Summary

This PR introduces a comprehensive Canvas feature that enables collaborative document editing with AI assistance within LibreChat. The Canvas provides a rich text editing environment powered by ProseMirror, allowing users to create, edit, and collaborate on documents with real-time AI-powered assistance.

Key Features Implemented:

  • Rich Text Editor: ProseMirror-based editor with markdown support
  • AI-Powered Editing: Context-aware AI assistance for text selection and editing
  • Real-time Collaboration: Foundation for multi-user collaborative editing
  • State Management: Recoil-based state management for canvas visibility and content
  • Agent Integration: Canvas capability integrated into agent configuration
  • Responsive UI: Modern, accessible interface with proper keyboard navigation
  • Comprehensive Testing: Full test coverage for all Canvas components

Change Type

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update
    Please delete any irrelevant options.
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Translation update

Testing

Please describe your test process and include instructions so that we can reproduce your test. If there are any important variables for your testing configuration, list them here.

Test Configuration:

Checklist

Please delete any irrelevant options.

  • [ ✅ ] My code adheres to this project's style guidelines
  • [ ✅ ] I have performed a self-review of my own code
  • [ ✅ ] I have commented in any complex areas of my code
  • [ ✅ ] I have made pertinent documentation changes
  • [ ✅ ] My changes do not introduce new warnings
  • [ ✅ ] I have written tests demonstrating that my changes are effective or that my feature works
  • [ ✅ ] Local unit tests pass with my changes
  • [ ✅ ] Any changes dependent on mine have been merged and published in downstream modules.
  • A pull request for updating the documentation has been submitted.

- Added a new Canvas component to facilitate collaborative document editing within the application.
- Implemented Canvas prompts and state management to support real-time collaboration.
- Updated various components and hooks to integrate Canvas functionality, including user interface elements for toggling Canvas visibility.
- Enhanced localization with new keys related to Canvas features.
- Updated package dependencies to include necessary libraries for Canvas functionality.

This commit significantly enhances the user experience by allowing users to create and edit documents collaboratively, improving overall interaction within the application.
@Akanksha256742 Akanksha256742 marked this pull request as ready for review September 24, 2025 09:44
Copy link
Contributor

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

ESLint found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

- Standardized string quotes from double to single across multiple files for consistency.
- Removed unnecessary line breaks and whitespace in various sections to improve readability.
- Updated comments and documentation to reflect the changes in formatting.
- Ensured that all functions and parameters maintain a consistent style for better maintainability.

These changes enhance the overall code quality and maintainability of the project.
@Akanksha256742
Copy link
Author

@danny-avila I have fixed the ESLint issues and resolved the frontend build failures. Please run the checks again to verify.

@XHyperDEVX
Copy link
Contributor

Thank you for your PR, it looks really great! I especially love the option of "Ask Librechat" when you highlight a text. Do you think you can transfer this to the normal chat, even if you have Canvas off?

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