Fix number of lines being reported in rewind confirmation dialog (#18675)

This commit is contained in:
Adib234
2026-02-09 18:11:53 -05:00
committed by GitHub
parent 14219bb57d
commit 80057c5208
4 changed files with 17 additions and 17 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ import {
coreEvents,
debugLogger,
getFileDiffFromResultDisplay,
computeAddedAndRemovedLines,
computeModelAddedAndRemovedLines,
} from '@google/gemini-cli-core';
export interface FileChangeDetail {
@@ -61,7 +61,7 @@ export function calculateTurnStats(
if (fileDiff) {
hasEdits = true;
const stats = fileDiff.diffStat;
const calculations = computeAddedAndRemovedLines(stats);
const calculations = computeModelAddedAndRemovedLines(stats);
addedLines += calculations.addedLines;
removedLines += calculations.removedLines;
@@ -112,7 +112,7 @@ export function calculateRewindImpact(
if (fileDiff) {
hasEdits = true;
const stats = fileDiff.diffStat;
const calculations = computeAddedAndRemovedLines(stats);
const calculations = computeModelAddedAndRemovedLines(stats);
addedLines += calculations.addedLines;
removedLines += calculations.removedLines;
files.add(fileDiff.fileName);