Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/gadgets/EditFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ Removed 3 lines (lines 2-4).
if (matches.length === 0) {
// No match found - throw with helpful suggestions
const failure = getMatchFailure(content, search);
throw new Error(this.formatFailure(filePath, search, failure, content));
throw new Error(this.formatFailure(filePath, search, failure));
}

// Store original content for before/after display
Expand Down Expand Up @@ -713,12 +713,9 @@ Removed 3 lines (lines 2-4).
}>;
nearbyContext: string;
},
fileContent: string,
): string {
const lines: string[] = [
`path=${filePath} status=failed`,
'',
`Error: ${failure.reason}`,
`ERROR: Search content NOT FOUND in file ${filePath}`,
'',
'SEARCH CONTENT:',
'```',
Expand All @@ -744,8 +741,6 @@ Removed 3 lines (lines 2-4).
}
}

lines.push('', 'CURRENT FILE CONTENT:', '```', fileContent, '```');

return lines.join('\n');
}

Expand Down