mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
* Implement message editing functionality in AIAssistant
* add functionality to delete messages in AI Assistant chat in assistant state
* remove duplicated `text-xs` class
* add a 'group' class for improved styling and refining action button visibility on hover
* Refine action button visibility in AIAssistantPanel to show only for user messages on hover, improving user experience.
* remove `"` from the message to edit
* Enhance editing message display in AIAssistantPanel by updating styling for improved visibility and user experience.
* Refactor AIAssistantPanel state management by simplifying original message content initialization and clarifying comments for better code readability.
* clean up action button rendering in AIAssistantPanel message component
* adjust the chat message layout (space)
* simplify the editing mode message
* show the edit button even when user is already in the edit mode
* Update AssistantChatForm styling for editing mode, positioning the editing message above the input field without changing the layout
* use `ButtonTooltip` for edit button to show tooltip
* simplify the condiiton to show the edit buton
* delete unnecessary `originalMessageContent` state variable
* delete `confirmEdit` and move its logic into `sendMessageToAssistant`
* add `strokeWidth={1.5}` to `Pencil` icon
* add `opacity-50` to any messages that are after the message being edited, and it cancels the edit when those messages are clicked
* add a pulse animation to the user’s message being edited
* add more space between mesages and `AssistantChatForm`
* add framer-motion animation to `Editing message` element
* cancel editing when a user clicks the edit button again or the edit button in subsequent messages
* add Pencil icon to AIAssistantPanel component and fixed duplicated tailwind class
* Update AIAssistantPanel to use the Pencil icon
* Refactor AIAssistant to set editing message content from text parts
* Minor changes
* nit
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>