Skip to content

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

TypeScript
503 B
Raw Blame
import type Turns from '../../turns'
import type { HeaderTotals } from '../header-totals'

/**
 * A turn's header counts: its files and their summed lines; nothing falls
 * past a cap.
 *
 * @param turn the turn
 * @returns the counts
 */
export const turnTotalsOf = (turn: Turns.TurnDiff): HeaderTotals => ({
  filesCount: turn.files.length,
  linesAdded: turn.files.reduce((sum, file) => sum + file.added, 0),
  linesRemoved: turn.files.reduce((sum, file) => sum + file.removed, 0),
  notShown: 0,
})