Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions apps/web/src/components/chat/InlineDiffBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -328,6 +326,10 @@ export const InlineDiffBlock = memo(function InlineDiffBlock(props: {
}
}, [highlightedLines, languageId, diffThemeName]);

if (allLines.length === 0) {
return null;
}

return (
<div className="overflow-hidden rounded-xl border border-border/70">
{/* File header */}
Expand Down
Loading