({
beforeContent,
afterContent,
filePath,
diffType,
contextLines,
workspaceDir,
}: CreateDiffArgs)
| 23 | } |
| 24 | |
| 25 | export const createDiff = ({ |
| 26 | beforeContent, |
| 27 | afterContent, |
| 28 | filePath, |
| 29 | diffType, |
| 30 | contextLines, |
| 31 | workspaceDir, |
| 32 | }: CreateDiffArgs) => { |
| 33 | switch (diffType) { |
| 34 | case DiffFormatType.Unified: |
| 35 | return createUnifiedDiff( |
| 36 | beforeContent, |
| 37 | afterContent, |
| 38 | filePath, |
| 39 | contextLines, |
| 40 | workspaceDir, |
| 41 | ); |
| 42 | case DiffFormatType.TokenLineDiff: |
| 43 | return createTokenLineDiff(beforeContent, afterContent, filePath); |
| 44 | } |
| 45 | return ""; |
| 46 | }; |
| 47 | |
| 48 | const createUnifiedDiff = ( |
| 49 | beforeContent: string, |
no test coverage detected