```tsx
import {createAiChat, MessageSentCallback, MessageSentEventDetails} from '@nlux/core';

const messageSentCallback: MessageSentCallback = (event: MessageSentEventDetails) => {
    console.log('Message sent:', event.message);
};
```

```tsx
// Registering the messageSentCallback when creating the AiChat instance
const aiChat = createAiChat().withAdapter(adapter).on('messageSent', messageSentCallback);
```

```tsx
// Add listener
// Registering the messageSentCallback after creating the AiChat instance
aiChat.on('messageSent', callback);
```

```tsx
// Removing messageSentCallback
aiChat.removeEventListener('messageSent', callback);
```
