mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-25 03:34:22 +01:00
wip: desktop work
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user