fix(hashline-edit): limit diff context to 3 lines to prevent oversized hunks

Closes #2051
This commit is contained in:
YeonGyu-Kim
2026-02-26 20:57:47 +09:00
parent 2b7ed4bbb4
commit a43d8b3bcc
2 changed files with 18 additions and 1 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ export function toHashlineContent(content: string): string {
}
export function generateUnifiedDiff(oldContent: string, newContent: string, filePath: string): string {
return createTwoFilesPatch(filePath, filePath, oldContent, newContent)
return createTwoFilesPatch(filePath, filePath, oldContent, newContent, undefined, undefined, { context: 3 })
}
export function countLineDiffs(oldContent: string, newContent: string): { additions: number; deletions: number } {