diff --git a/core/tools/definitions/searchAndReplaceInFile.ts b/core/tools/definitions/searchAndReplaceInFile.ts index 5dd546315..b84d4c084 100644 --- a/core/tools/definitions/searchAndReplaceInFile.ts +++ b/core/tools/definitions/searchAndReplaceInFile.ts @@ -88,4 +88,4 @@ Each string in the diffs array can contain multiple SEARCH/REPLACE blocks, and a }, }, }, -}; \ No newline at end of file +}; diff --git a/gui/src/pages/gui/ToolCallDiv/FunctionSpecificToolCallDiv.tsx b/gui/src/pages/gui/ToolCallDiv/FunctionSpecificToolCallDiv.tsx index e3d9a0d8a..e89138db6 100644 --- a/gui/src/pages/gui/ToolCallDiv/FunctionSpecificToolCallDiv.tsx +++ b/gui/src/pages/gui/ToolCallDiv/FunctionSpecificToolCallDiv.tsx @@ -55,4 +55,4 @@ function FunctionSpecificToolCallDiv({ } } -export default FunctionSpecificToolCallDiv; \ No newline at end of file +export default FunctionSpecificToolCallDiv; diff --git a/gui/src/util/clientTools/searchReplaceImpl.test.ts b/gui/src/util/clientTools/searchReplaceImpl.test.ts index 0ecb07c8f..a8eb74d77 100644 --- a/gui/src/util/clientTools/searchReplaceImpl.test.ts +++ b/gui/src/util/clientTools/searchReplaceImpl.test.ts @@ -87,7 +87,10 @@ describe("searchReplaceToolImpl", () => { await expect( searchReplaceToolImpl( - { filepath: "test.txt", diffs: ["valid diff", "invalid diff content"] }, + { + filepath: "test.txt", + diffs: ["valid diff", "invalid diff content"], + }, "tool-call-id", mockExtras, ), @@ -392,8 +395,14 @@ const c = 3;`; // Verify parseAllSearchReplaceBlocks was called for each diff expect(mockParseAllSearchReplaceBlocks).toHaveBeenCalledTimes(2); - expect(mockParseAllSearchReplaceBlocks).toHaveBeenNthCalledWith(1, "first diff"); - expect(mockParseAllSearchReplaceBlocks).toHaveBeenNthCalledWith(2, "second diff"); + expect(mockParseAllSearchReplaceBlocks).toHaveBeenNthCalledWith( + 1, + "first diff", + ); + expect(mockParseAllSearchReplaceBlocks).toHaveBeenNthCalledWith( + 2, + "second diff", + ); // Verify final applyToFile call expect(mockIdeMessenger.request).toHaveBeenCalledWith("applyToFile", { @@ -719,4 +728,4 @@ keep this too`; }); }); }); -}); \ No newline at end of file +}); diff --git a/gui/src/util/clientTools/searchReplaceImpl.ts b/gui/src/util/clientTools/searchReplaceImpl.ts index 91448173a..1fcf649e5 100644 --- a/gui/src/util/clientTools/searchReplaceImpl.ts +++ b/gui/src/util/clientTools/searchReplaceImpl.ts @@ -31,7 +31,9 @@ export const searchReplaceToolImpl: ClientToolImpl = async ( for (let diffIndex = 0; diffIndex < diffs.length; diffIndex++) { const blocks = parseAllSearchReplaceBlocks(diffs[diffIndex]); if (blocks.length === 0) { - throw new Error(`No complete search/replace blocks found in diff ${diffIndex + 1}`); + throw new Error( + `No complete search/replace blocks found in diff ${diffIndex + 1}`, + ); } allBlocks.push(...blocks); } @@ -98,4 +100,4 @@ export const searchReplaceToolImpl: ClientToolImpl = async ( `Failed to apply search and replace: ${error instanceof Error ? error.message : String(error)}`, ); } -}; \ No newline at end of file +};