From ebdf3cf451ecd0e6bd54ea73acf98ab3907ba9a9 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Thu, 30 Apr 2026 12:33:02 +0200 Subject: [PATCH] Adjusts #3955, better error message --- packages/coding-agent/src/core/tools/edit-diff.ts | 2 +- packages/coding-agent/src/core/tools/edit.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/coding-agent/src/core/tools/edit-diff.ts b/packages/coding-agent/src/core/tools/edit-diff.ts index a7d4bb70..d8c4c003 100644 --- a/packages/coding-agent/src/core/tools/edit-diff.ts +++ b/packages/coding-agent/src/core/tools/edit-diff.ts @@ -414,7 +414,7 @@ export async function computeEditsDiff( await access(absolutePath, constants.R_OK); } catch (error: unknown) { const errorMessage = error instanceof Error && "code" in error ? `Error code: ${error.code}` : String(error); - return { error: `Could not write file: ${path}. ${errorMessage}.` }; + return { error: `Could not edit file: ${path}. ${errorMessage}.` }; } // Read the file diff --git a/packages/coding-agent/src/core/tools/edit.ts b/packages/coding-agent/src/core/tools/edit.ts index 567c593a..7e360cf7 100644 --- a/packages/coding-agent/src/core/tools/edit.ts +++ b/packages/coding-agent/src/core/tools/edit.ts @@ -347,7 +347,7 @@ export function createEditToolDefinition( if (signal) { signal.removeEventListener("abort", onAbort); } - reject(new Error(`Could not write file: ${path}. ${errorMessage}.`)); + reject(new Error(`Could not edit file: ${path}. ${errorMessage}.`)); return; }