mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 04:11:10 -05:00
refactor: increase context lines in NewUnifiedDiffStrategy
- Updated the maximum context lines from 3 to 6 in the parseUnifiedDiff method to provide more context around changes.
This commit is contained in:
@@ -5,7 +5,7 @@ import { DiffResult, DiffStrategy } from "../../types"
|
||||
|
||||
export class NewUnifiedDiffStrategy implements DiffStrategy {
|
||||
private parseUnifiedDiff(diff: string): Diff {
|
||||
const MAX_CONTEXT_LINES = 3; // Number of context lines to keep before/after changes
|
||||
const MAX_CONTEXT_LINES = 6; // Number of context lines to keep before/after changes
|
||||
const lines = diff.split('\n');
|
||||
const hunks: Hunk[] = [];
|
||||
let currentHunk: Hunk | null = null;
|
||||
@@ -49,9 +49,7 @@ export class NewUnifiedDiffStrategy implements DiffStrategy {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!currentHunk) {
|
||||
continue;
|
||||
}
|
||||
if (!currentHunk) {continue};
|
||||
|
||||
// Extract the complete indentation for each line
|
||||
const content = line.slice(1); // Remove the diff marker
|
||||
|
||||
Reference in New Issue
Block a user