diff --git a/client/src/components/Chat/Messages/Content/Part.tsx b/client/src/components/Chat/Messages/Content/Part.tsx index 457e79b9d1..9a8c226a7f 100644 --- a/client/src/components/Chat/Messages/Content/Part.tsx +++ b/client/src/components/Chat/Messages/Content/Part.tsx @@ -31,10 +31,14 @@ const Part = memo(({ part, isSubmitting, showCursor, messageId, isCreatedByUser if (part.type === ContentTypes.ERROR) { return ; } else if (part.type === ContentTypes.TEXT) { - const text = typeof part.text === 'string' ? part.text : part.text.value; + const text = typeof part.text === 'string' ? part.text : (part.text as { value: string }).value; + if (typeof text !== 'string') { return null; } + if (part.tool_call_ids != null && !text) { + return null; + } return (