Hi, Claude. I'd like to make a simple frontend for my Rust backend. My `Request` type is as follows:

```Rust
/// Request from client to the server.
#[cfg_attr(feature = "client", derive(Serialize))]
#[cfg_attr(feature = "server", derive(Deserialize))]
pub enum Request {
    /// Log out.
    Logout,
    /// Update user preferences.
    UpdatePreferences(user::Preferences),
    /// Delete a chat.
    DeleteChat(chat::Id),
    /// Send a message.
    Message(chat::Id, Message),
}
```

And my `Response` type:

```Rust
/// Response from the server to the client.
#[cfg_attr(feature = "client", derive(Deserialize))]
#[cfg_attr(feature = "server", derive(Serialize))]
pub enum Response {
    /// Stream Connected. This is not sent from the server but generated by the
    /// client to indicate that the stream is connected.
    Connected,
    /// Logout response.
    Logout,
    /// Preferences updated.
    Preferences(user::Preferences),
    /// Chat deleted.
    ChatDeleted(chat::Id),
    /// Message response.
    Message(chat::Id, Message),
}
```

The `Response` is provided as SSE at a `/stream` endpoint. Don't worry about error handling for now. Please use clean code and be as concise as possible. You have 4000 tokens to accomplish this task.