Skip to content

Commit

Permalink
fix: rangesFromDiffHunk error
Browse files Browse the repository at this point in the history
  • Loading branch information
ensorrow committed Mar 8, 2025
1 parent 43f1cea commit 1cef521
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ai-native/src/browser/mcp/base-apply.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,8 @@ export abstract class BaseApplyService extends WithEventBus {
.split('\n')
.map((line) => {
if (line.startsWith('@@')) {
const [, , , start, end] = line.match(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/)!;
return new Range(parseInt(start, 10), 0, parseInt(end, 10), 0);
const [, , , start, lineCount] = line.match(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/)!;
return new Range(parseInt(start, 10), 0, parseInt(start, 10) + parseInt(lineCount, 10), 0);
}
return null;
})
Expand Down

0 comments on commit 1cef521

Please sign in to comment.