Checks for diff changes before displaying the code snippet (#751)

This commit is contained in:
anj-s
2025-06-05 06:48:03 -07:00
committed by GitHub
parent aa386d135b
commit 78b2a28fb6
4 changed files with 61 additions and 4 deletions

View File

@@ -379,6 +379,9 @@ Expectation for required parameters:
params.new_string.split('\n')[0].substring(0, 30) +
(params.new_string.length > 30 ? '...' : '');
if (params.old_string === params.new_string) {
return `No file changes to ${shortenPath(relativePath)}`;
}
return `${shortenPath(relativePath)}: ${oldStringSnippet} => ${newStringSnippet}`;
}