| @@ -1,14 +1,15 @@ | ||
| 1 | 1 | import { decodeEntities } from '@wordpress/html-entities'; |
| 2 | 2 | |
| 3 | 3 | export const UserMessage = ({ message }) => { |
| 4 | - const { content, role } = message.details; | |
| 4 | + const { content, role, hidden } = message.details; | |
| 5 | + if (hidden) return null; | |
| 5 | 6 | return ( |
| 6 | 7 | <div |
| 7 | 8 | data-agent-message-role={role} |
| 8 | 9 | className="flex w-full flex-col items-end p-2" |
| 9 | 10 | > |
| 10 | - <div className="max-w-[80%] rounded-xl bg-gray-100 p-1.5 px-2.5 text-gray-900"> | |
| 11 | + <div className="max-w-[80%] break-words rounded-xl bg-gray-100 p-1.5 px-2.5 text-gray-900"> | |
| 11 | 12 | {decodeEntities(content)} |
| 12 | 13 | </div> |
| 13 | 14 | </div> |
| 14 | 15 | ); |