Add regenerate message button to chat messages (#8)
### TL;DR
Adds the ability to regenerate the last assistant message in a chat.
### What changed?
- Added a `POST /:id/messages/regenerate` API endpoint that streams a regenerated response for the last assistant message in a chat, replacing its content in the database once streaming completes.
- Added a `RegenerateMessageButton` component (using a `RotateCcwIcon`) that appears in the message actions row for the last assistant message.
- Added a `useRegenerateLastMessage` hook that handles optimistically clearing the last assistant message text, streaming the new response chunk-by-chunk into the query cache, and invalidating relevant queries on completion or error.
- The regenerate button is only shown on the most recent assistant message that has non-empty text, and is disabled while a regeneration is in progress.
### How to test?
1. Open an existing chat that has at least one assistant response.
2. Hover over the last assistant message to reveal the action buttons.
3. Click the regenerate (↺) button and confirm the message clears and streams a new response.
4. Verify the regenerated content persists after the stream completes.
5. Confirm the button is disabled while regeneration is in progress and re-enables afterward.
### Why make this change?
Users may want to get a different response from the assistant without having to resend their message. This feature provides a straightforward way to retry the last assistant message in a chat.
authored by