Add edit last message functionality to chat messages (#9)
### TL;DR
Adds the ability for users to edit their last message in a chat, which re-submits the conversation and streams a new assistant response.
### What changed?
- Added a new `POST /:id/messages/edit-last` API endpoint that updates the last user message and streams a regenerated assistant response.
- Added a `useEditLastMessage` hook that handles optimistic updates, streams the new assistant response chunk-by-chunk into the query cache, and invalidates relevant queries on completion.
- Introduced `ChatMessageBubble` and `ChatMessageEditForm` as dedicated components, extracted from `ChatMessage` to support the inline editing UI.
- Added an `EditMessageButton` component with a pencil icon that appears alongside the copy and regenerate actions on the last editable user message.
- `ChatMessages` now tracks which message is being edited via `editingMessageId` state, determines the last editable user message, and wires up edit/cancel/save handlers.
- Edit and regenerate actions are mutually disabled while either operation is pending.
- `CopyButton` and `RegenerateMessageButton` updated to use `icon-sm` size.
### How to test?
1. Start a chat and send at least one message to receive an assistant reply.
2. Hover over your last user message — an edit (pencil) icon should appear alongside the copy button.
3. Click the edit icon to open the inline edit form with your original message pre-filled.
4. Modify the text and click **Save** (or press Enter). The user message should update and the assistant response should stream in fresh.
5. Alternatively, click **Cancel** to discard changes and return to the original message.
6. Verify that the edit button is disabled while a regeneration is in progress, and vice versa.
### Why make this change?
Users previously had no way to correct or revise a message after sending it. This feature allows iterating on a conversation without starting over, improving the overall chat experience.
authored by