Changesets · Branches · Tags · Compare
| Changeset | 697275a3e3a722f0bbe3c3b9139e30ea95d6f440ed1c190d588fbeb403f07a09 |
|---|---|
| Author | chezsmithy <chezsmithy@me.com> · 2025-07-12 16:44 -07:00 |
| Committer | chezsmithy <chezsmithy@me.com> · 2025-07-12 17:05 -07:00 |
| Parents | 562ef8278dce |
4 files changed
modified core/tools/definitions/searchAndReplaceInFile.ts +1 −1
| @@ -88,4 +88,4 @@ | ||
| 88 | 88 | }, |
| 89 | 89 | }, |
| 90 | 90 | }, |
| 91 | -}; | |
| No newline at the end of the file | ||
| 91 | +}; |
modified gui/src/pages/gui/ToolCallDiv/FunctionSpecificToolCallDiv.tsx +1 −1
| @@ -55,4 +55,4 @@ | ||
| 55 | 55 | } |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | -export default FunctionSpecificToolCallDiv; | |
| No newline at the end of the file | ||
| 58 | +export default FunctionSpecificToolCallDiv; |
modified gui/src/util/clientTools/searchReplaceImpl.test.ts +13 −4
| @@ -87,7 +87,10 @@ | ||
| 87 | 87 | |
| 88 | 88 | await expect( |
| 89 | 89 | searchReplaceToolImpl( |
| 90 | - { filepath: "test.txt", diffs: ["valid diff", "invalid diff content"] }, | |
| 90 | + { | |
| 91 | + filepath: "test.txt", | |
| 92 | + diffs: ["valid diff", "invalid diff content"], | |
| 93 | + }, | |
| 91 | 94 | "tool-call-id", |
| 92 | 95 | mockExtras, |
| 93 | 96 | ), |
| @@ -392,8 +395,14 @@ | ||
| 392 | 395 | |
| 393 | 396 | // Verify parseAllSearchReplaceBlocks was called for each diff |
| 394 | 397 | expect(mockParseAllSearchReplaceBlocks).toHaveBeenCalledTimes(2); |
| 395 | - expect(mockParseAllSearchReplaceBlocks).toHaveBeenNthCalledWith(1, "first diff"); | |
| 396 | - expect(mockParseAllSearchReplaceBlocks).toHaveBeenNthCalledWith(2, "second diff"); | |
| 398 | + expect(mockParseAllSearchReplaceBlocks).toHaveBeenNthCalledWith( | |
| 399 | + 1, | |
| 400 | + "first diff", | |
| 401 | + ); | |
| 402 | + expect(mockParseAllSearchReplaceBlocks).toHaveBeenNthCalledWith( | |
| 403 | + 2, | |
| 404 | + "second diff", | |
| 405 | + ); | |
| 397 | 406 | |
| 398 | 407 | // Verify final applyToFile call |
| 399 | 408 | expect(mockIdeMessenger.request).toHaveBeenCalledWith("applyToFile", { |
| @@ -719,4 +728,4 @@ | ||
| 719 | 728 | }); |
| 720 | 729 | }); |
| 721 | 730 | }); |
| 722 | -}); | |
| No newline at the end of the file | ||
| 731 | +}); |
modified gui/src/util/clientTools/searchReplaceImpl.ts +4 −2
| @@ -31,7 +31,9 @@ | ||
| 31 | 31 | for (let diffIndex = 0; diffIndex < diffs.length; diffIndex++) { |
| 32 | 32 | const blocks = parseAllSearchReplaceBlocks(diffs[diffIndex]); |
| 33 | 33 | if (blocks.length === 0) { |
| 34 | - throw new Error(`No complete search/replace blocks found in diff ${diffIndex + 1}`); | |
| 34 | + throw new Error( | |
| 35 | + `No complete search/replace blocks found in diff ${diffIndex + 1}`, | |
| 36 | + ); | |
| 35 | 37 | } |
| 36 | 38 | allBlocks.push(...blocks); |
| 37 | 39 | } |
| @@ -98,4 +100,4 @@ | ||
| 98 | 100 | `Failed to apply search and replace: ${error instanceof Error ? error.message : String(error)}`, |
| 99 | 101 | ); |
| 100 | 102 | } |
| 101 | -}; | |
| No newline at the end of the file | ||
| 103 | +}; |