Skip to content

add rename chat option feature and add limits for chat messages and uploads for user and guest#1428

Open
hamzaMissewi wants to merge 2 commits intovercel:mainfrom
hamzaMissewi:main
Open

add rename chat option feature and add limits for chat messages and uploads for user and guest#1428
hamzaMissewi wants to merge 2 commits intovercel:mainfrom
hamzaMissewi:main

Conversation

@hamzaMissewi
Copy link

Added chat renaming functionality to the sidebar menu, allowing users to easily rename their chat conversations for better organization and personalization.

Changes Made

Frontend Components

  • Sidebar History Item: Added "Update" option in dropdown menu with Edit icon
  • Sidebar History: Integrated rename handler with toast notifications
  • User Experience: Simple prompt-based renaming with immediate feedback

Backend API

  • New Endpoint: Created /api/rename-chat PATCH endpoint
  • Database Integration: Added [updateChatTitleById] query function
  • Authentication: Secured endpoint with session validation
  • Error Handling: Comprehensive error responses for edge cases

Technical Implementation

  • Added onRenameChat prop to sidebar history items
  • Implemented async rename handler with proper error boundaries
  • Used existing database schema for title updates
  • Maintained consistent UI patterns with other sidebar actions

- Added button of rename a chat in the chat sidebar

- Filter inappropriate uploads (TODO)
-limits the number of messages usage for user and guest

Database Schema Updates:
- Added quota tracking with guestMessageQuota and userMessageQuota
-
- Added imagesUsed tracking to quota systems

User Experience:
- Chat renaming via sidebar dropdown menu
- Real-time quota enforcement
- Clear error messages for content violations
- Toast notifications for successful operations

This ensures a safer, more controlled environment while maintaining
good user experience with proper content moderation and usage limits.
@vercel
Copy link
Contributor

vercel bot commented Feb 27, 2026

@hamzaMissewi is attempting to deploy a commit to the Esteban Team on Vercel.

A member of the Team first needs to authorize it.

@hamzaMissewi
Copy link
Author

Please let me know if you need any informations related to my pull request

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.

1 participant