{shape.props.value ? (
shape.props.value.split('\n').map((message, index) => {
if (!message.trim()) return null;
try {
const parsed = JSON.parse(message);
const isUser = parsed.role === "user";
return (
{parsed.content}
);
} catch {
return null; // Skip invalid JSON
}
})
) : (
"Chat history will appear here..."
)}