diff --git a/webview-ui/src/components/file-changes/FilesChangedOverview.tsx b/webview-ui/src/components/file-changes/FilesChangedOverview.tsx index 8091a15443..3ec434cc10 100644 --- a/webview-ui/src/components/file-changes/FilesChangedOverview.tsx +++ b/webview-ui/src/components/file-changes/FilesChangedOverview.tsx @@ -179,29 +179,19 @@ const FilesChangedOverview: React.FC = () => { }, [filesChangedEnabled]) /** - * Formats line change counts for display based on file type + * Formats line change counts for display - shows only plus/minus numbers * @param file - The file change to format - * @returns Formatted string describing the changes + * @returns Formatted string with just the line change counts */ const formatLineChanges = (file: FileChange): string => { const added = file.linesAdded || 0 const removed = file.linesRemoved || 0 - if (file.type === "create") { - return t("file-changes:line_changes.added", { count: added }) - } else if (file.type === "delete") { - return t("file-changes:line_changes.deleted") - } else { - if (added > 0 && removed > 0) { - return t("file-changes:line_changes.added_removed", { added, removed }) - } else if (added > 0) { - return t("file-changes:line_changes.added", { count: added }) - } else if (removed > 0) { - return t("file-changes:line_changes.removed", { count: removed }) - } else { - return t("file-changes:line_changes.modified") - } - } + const parts = [] + if (added > 0) parts.push(`+${added}`) + if (removed > 0) parts.push(`-${removed}`) + + return parts.length > 0 ? parts.join(", ") : "" } // Memoize expensive total calculations @@ -222,11 +212,29 @@ const FilesChangedOverview: React.FC = () => { return (