Skip to content

Commit

Permalink
fix: Fix expandRange behavior for costOptimized reviewType (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
ziXiong committed Nov 23, 2023
1 parent 1e0502f commit 8ada50e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,10 @@ export const createPromptFiles = (
maxSurroundingLines
);

// Expand the range and create the prompt content
({ start, end } = expandRange(start, end, contentLines, remainingSpace));
// Expand the range and create the prompt content, only if maxSurroundingLines is defined
if (!maxSurroundingLines) {
({ start, end } = expandRange(start, end, contentLines, remainingSpace));
}
const promptContent = createPromptContent(
start,
end,
Expand Down

0 comments on commit 8ada50e

Please sign in to comment.