@@ -30,6 +30,7 @@ import { useTheme } from "../hooks/useTheme";
3030import {
3131 buildFileDiffRenderKey ,
3232 getDiffCollapseIconClassName ,
33+ getDiffLineStat ,
3334 getRenderablePatch ,
3435 resolveDiffThemeName ,
3536 resolveFileDiffPath ,
@@ -41,6 +42,7 @@ import { resolveThreadRouteRef } from "../threadRoutes";
4142import { useClientSettings } from "../hooks/useSettings" ;
4243import { formatShortTimestamp } from "../timestampFormat" ;
4344import { DiffPanelLoadingState , DiffPanelShell , type DiffPanelMode } from "./DiffPanelShell" ;
45+ import { DiffStatLabel } from "./chat/DiffStatLabel" ;
4446import { AnnotatableCodeView , type AnnotatableCodeViewHandle } from "./diffs/AnnotatableCodeView" ;
4547import { Button } from "./ui/button" ;
4648import { ToggleGroup , Toggle } from "./ui/toggle-group" ;
@@ -452,6 +454,7 @@ export default function DiffPanel({
452454 ) ;
453455 const diffFileKeys = useMemo ( ( ) => codeViewFiles . map ( ( file ) => file . fileKey ) , [ codeViewFiles ] ) ;
454456 const allDiffFilesCollapsed = areAllDiffFilesCollapsed ( diffFileKeys , collapsedDiffFileKeys ) ;
457+ const diffLineStat = useMemo ( ( ) => getDiffLineStat ( renderableFiles ) , [ renderableFiles ] ) ;
455458
456459 useEffect ( ( ) => {
457460 if ( ! selectedFilePath ) return ;
@@ -713,6 +716,14 @@ export default function DiffPanel({
713716 ) }
714717 </ div >
715718 < div className = "flex shrink-0 items-center gap-1 [-webkit-app-region:no-drag]" >
719+ { codeViewFiles . length > 0 && (
720+ < DiffStatLabel
721+ additions = { diffLineStat . additions }
722+ deletions = { diffLineStat . deletions }
723+ className = "mr-1 text-[11px]"
724+ layout = "inline"
725+ />
726+ ) }
716727 { codeViewFiles . length > 0 && (
717728 < Tooltip >
718729 < TooltipTrigger
0 commit comments