```tsx
import {AiChat, MessageSentCallback, MessageSentEventDetails} from '@nlux/react';
import {useCallback} from 'react';

const messageSentCallback = useCallback<MessageSentCallback>((event: MessageSentEventDetails) => {
    console.log('Message sent:', event.message);
}, [/* Callback dependencies */]);
```

```tsx
// Provide the messageSentCallback callback as part of the events prop
<AiChat events={{messageSent: messageSentCallback}} adapter={adapter} />
```
