wip: desktop work

This commit is contained in:
Adam 2025-10-31 11:54:27 -05:00
commit ffc889b99e
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
9 changed files with 174 additions and 175 deletions

View file

@ -16,16 +16,6 @@ export function DiffChanges(props: { diff: FileDiff | FileDiff[]; variant?: "def
)
const total = createMemo(() => (additions() ?? 0) + (deletions() ?? 0))
const countLines = (text: string) => {
if (!text) return 0
return text.split("\n").length
}
const totalBeforeLines = createMemo(() => {
if (!Array.isArray(props.diff)) return countLines(props.diff.before || "")
return props.diff.reduce((acc, diff) => acc + countLines(diff.before || ""), 0)
})
const blockCounts = createMemo(() => {
const TOTAL_BLOCKS = 5