mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-10 22:41:14 +00: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:
parent
6d68edef3e
commit
0d004b5c77
1 changed files with 2 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue