• Implemented update method in MessageModel to allow message updates by ID.
  • Added deleteAfter method to remove messages in a conversation created after a specified message.
  • Introduced new API routes for updating messages and deleting subsequent messages.
  • Enhanced frontend components to support message editing and deletion, including a new EditableMessage component for inline editing.
  • Updated types to include UpdateMessage schema for message updates.

This enhances the chat functionality by allowing users to modify their messages and manage conversation history more effectively.

Fixes #1282 /claim #1282


[!NOTE] Adds PATCH/DELETE message APIs and integrates inline message editing that can prune subsequent messages and regenerate replies.

  • Backend:
    • Message model: add findById, update(id, data), and deleteAfter(conversationId, messageId); use and, gt filters.
    • Routes: add PATCH /api/chat/messages/:id (updates message) and DELETE /api/chat/messages/:id/after (deletes later messages) with org ownership checks; wire schemas SelectMessageSchema, UpdateMessageSchema.
    • Access Control: add route IDs updateChatMessage and deleteChatMessagesAfter.
  • Types:
    • Add UpdateMessageSchema and UpdateMessage type; export SelectMessageSchema for responses.
  • Frontend:
    • ChatMessages: support editing via new props (conversationId, sendMessage, onMessageEdit); hide messages below while editing; on save, calls update API and optionally deletes later messages then resubmits user message.
    • New component: EditableMessage for inline editing (save/cancel, keyboard shortcuts).
    • Queries: add hooks useUpdateMessage and useDeleteMessagesAfter.
    • Chat page: passes new props and updates local state after edits.

Written by Cursor Bugbot for commit 893c9ff08b960fbfcc8a74b13565b6fd6629e620. This will update automatically on new commits. Configure here.

Claim

Total prize pool $50
Total paid $0
Status Pending
Submitted December 04, 2025
Last updated December 04, 2025

Contributors

PR

Pranjal Negi

@Pranjal6955

100%

Sponsors

AR

Archestra

@archestra-ai

$50