Various spelling improvements (#3497)

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: Sandy Tao <sandytao520@icloud.com>
This commit is contained in:
Josh Soref
2025-07-21 17:54:44 -04:00
committed by GitHub
parent 8be5f8038a
commit dc2ac144b7
48 changed files with 91 additions and 91 deletions

View File

@@ -209,7 +209,7 @@ Expectation for required parameters:
// Creating a new file
isNewFile = true;
} else if (!fileExists) {
// Trying to edit a non-existent file (and old_string is not empty)
// Trying to edit a nonexistent file (and old_string is not empty)
error = {
display: `File not found. Cannot apply edit. Use an empty old_string to create a new file.`,
raw: `File not found: ${params.file_path}`,
@@ -239,12 +239,12 @@ Expectation for required parameters:
raw: `Failed to edit, 0 occurrences found for old_string in ${params.file_path}. No edits made. The exact text in old_string was not found. Ensure you're not escaping content incorrectly and check whitespace, indentation, and context. Use ${ReadFileTool.Name} tool to verify.`,
};
} else if (occurrences !== expectedReplacements) {
const occurenceTerm =
const occurrenceTerm =
expectedReplacements === 1 ? 'occurrence' : 'occurrences';
error = {
display: `Failed to edit, expected ${expectedReplacements} ${occurenceTerm} but found ${occurrences}.`,
raw: `Failed to edit, Expected ${expectedReplacements} ${occurenceTerm} but found ${occurrences} for old_string in file: ${params.file_path}`,
display: `Failed to edit, expected ${expectedReplacements} ${occurrenceTerm} but found ${occurrences}.`,
raw: `Failed to edit, Expected ${expectedReplacements} ${occurrenceTerm} but found ${occurrences} for old_string in file: ${params.file_path}`,
};
} else if (finalOldString === finalNewString) {
error = {

View File

@@ -17,7 +17,7 @@ vi.mock('child_process', () => ({
on: (event: string, cb: (...args: unknown[]) => void) => {
if (event === 'error' || event === 'close') {
// Simulate command not found or error for git grep and system grep
// to force fallback to JS implementation.
// to force it to fall back to JS implementation.
setTimeout(() => cb(1), 0); // cb(1) for error/close
}
},

View File

@@ -272,7 +272,7 @@ describe('ReadManyFilesTool', () => {
);
});
it('should handle non-existent specific files gracefully', async () => {
it('should handle nonexistent specific files gracefully', async () => {
const params = { paths: ['nonexistent-file.txt'] };
const result = await tool.execute(params, new AbortController().signal);
expect(result.llmContent).toEqual([