diff --git a/apps/web/src/components/chat/InlineDiffBlock.tsx b/apps/web/src/components/chat/InlineDiffBlock.tsx index e21973ebe..f1ffa3482 100644 --- a/apps/web/src/components/chat/InlineDiffBlock.tsx +++ b/apps/web/src/components/chat/InlineDiffBlock.tsx @@ -267,8 +267,6 @@ export const InlineDiffBlock = memo(function InlineDiffBlock(props: { }); }, [allLines]); - if (allLines.length === 0) return null; - const needsTruncation = allLines.length > MAX_VISIBLE_LINES; const visibleLines = needsTruncation && !isExpanded ? keyedLines.slice(0, MAX_VISIBLE_LINES) : keyedLines; @@ -328,6 +326,10 @@ export const InlineDiffBlock = memo(function InlineDiffBlock(props: { } }, [highlightedLines, languageId, diffThemeName]); + if (allLines.length === 0) { + return null; + } + return (