MCPcopy Create free account
hub / github.com/anthropics/claude-code / diffStat

Function diffStat

mods/diff/hooks/views/sections/diff-stat/diff-stat.tsx:17–32  ·  view source on GitHub ↗
(
  kit: Kit,
  added: number,
  removed: number,
)

Source from the content-addressed store, hash-verified

15 * @returns the inline element
16 */
17export function diffStat(
18 kit: Kit,
19 added: number,
20 removed: number,
21): RenderElement {
22 const { Text } = kit.ui
23 const hasBoth = added > 0 && removed > 0
24
25 return (
26 <Text>
27 {added > 0 ? <Text color="diffAddedWord">{`+${added}`}</Text> : ''}
28 {hasBoth ? ' ' : ''}
29 {removed > 0 ? <Text color="diffRemovedWord">{`-${removed}`}</Text> : ''}
30 </Text>
31 )
32}

Callers 4

countOfFunction · 0.90
legendRowFunction · 0.90
fileRowFunction · 0.90
dialogFileRowFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected