Check for message category presence (#114)

This commit is contained in:
Brian Hackett 2025-05-06 11:22:45 -10:00 committed by GitHub
parent e90b0bbff9
commit 8cb28b5651
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -84,7 +84,7 @@ export const Messages = React.forwardRef<HTMLDivElement, MessagesProps>((props:
const isFirst = index === 0;
const isLast = index === messages.length - 1;
if (!isUserMessage && message.category !== 'UserResponse') {
if (!isUserMessage && message.category && message.category !== 'UserResponse') {
const lastUserResponse = getLastUserResponse(index);
if (!lastUserResponse) {
return null;