{sources.length > 0 && (
)}
{section.message.responseBlocks
.filter(
(block): block is ResearchBlock =>
block.type === 'research' && block.data.subSteps.length > 0,
)
.map((researchBlock) => (
))}
{section.widgets.length > 0 &&
}
{isLast &&
loading &&
!researchEnded &&
!section.message.responseBlocks.some(
(b) => b.type === 'research' && b.data.subSteps.length > 0,
) && (
Brainstorming...
)}
{sources.length > 0 && (
Answer
)}
{hasContent && (
<>
{parsedMessage}
{loading && isLast ? null : (
)}
{isLast &&
section.suggestions &&
section.suggestions.length > 0 &&
hasContent &&
!loading && (
Related
{section.suggestions.map(
(suggestion: string, i: number) => (
),
)}
)}
>
)}