Drop threshold.

This commit is contained in:
Christian Gunderman
2026-02-18 06:26:19 +00:00
parent 7091cef045
commit a7457b0156
2 changed files with 4 additions and 4 deletions

View File

@@ -332,10 +332,10 @@ class GrepToolInvocation extends BaseToolInvocation<
for (const match of fileMatches) {
if (fileLines) {
const startLine = Math.max(0, match.lineNumber - 1 - 50);
const startLine = Math.max(0, match.lineNumber - 1 - 15);
const endLine = Math.min(
fileLines.length,
match.lineNumber - 1 + 50 + 1,
match.lineNumber - 1 + 15 + 1,
);
const contextLines = fileLines.slice(startLine, endLine);

View File

@@ -340,10 +340,10 @@ class GrepToolInvocation extends BaseToolInvocation<
const newFileMatches: GrepMatch[] = [];
const seenLines = new Set<number>();
for (const match of fileMatches) {
const startLine = Math.max(0, match.lineNumber - 1 - 50);
const startLine = Math.max(0, match.lineNumber - 1 - 15);
const endLine = Math.min(
fileLines.length,
match.lineNumber - 1 + 50 + 1,
match.lineNumber - 1 + 15 + 1,
);
for (let i = startLine; i < endLine; i++) {
if (!seenLines.has(i + 1)) {