(turn: TurnDiff)
| 28 | turn: TurnDiff; |
| 29 | }; |
| 30 | function turnDiffToDiffData(turn: TurnDiff): DiffData { |
| 31 | const files = Array.from(turn.files.values()).map(f => ({ |
| 32 | path: f.filePath, |
| 33 | linesAdded: f.linesAdded, |
| 34 | linesRemoved: f.linesRemoved, |
| 35 | isBinary: false, |
| 36 | isLargeFile: false, |
| 37 | isTruncated: false, |
| 38 | isNewFile: f.isNewFile |
| 39 | })).sort((a, b) => a.path.localeCompare(b.path)); |
| 40 | const hunks = new Map<string, StructuredPatchHunk[]>(); |
| 41 | for (const f of turn.files.values()) { |
| 42 | hunks.set(f.filePath, f.hunks); |
| 43 | } |
| 44 | return { |
| 45 | stats: { |
| 46 | filesCount: turn.stats.filesChanged, |
| 47 | linesAdded: turn.stats.linesAdded, |
| 48 | linesRemoved: turn.stats.linesRemoved |
| 49 | }, |
| 50 | files, |
| 51 | hunks, |
| 52 | loading: false |
| 53 | }; |
| 54 | } |
| 55 | export function DiffDialog(t0) { |
| 56 | const $ = _c(73); |
| 57 | const { |
no test coverage detected