diff options
Diffstat (limited to 'packages/cli/src/tools/write-file.tool.ts')
| -rw-r--r-- | packages/cli/src/tools/write-file.tool.ts | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/packages/cli/src/tools/write-file.tool.ts b/packages/cli/src/tools/write-file.tool.ts index c7dc8641..cc0d5511 100644 --- a/packages/cli/src/tools/write-file.tool.ts +++ b/packages/cli/src/tools/write-file.tool.ts @@ -26,16 +26,11 @@ export interface WriteFileToolParams { } /** - * Standardized result from the WriteFile tool - */ -export interface WriteFileToolResult extends ToolResult {} - -/** * Implementation of the WriteFile tool that writes files to the filesystem */ export class WriteFileTool extends BaseTool< WriteFileToolParams, - WriteFileToolResult + ToolResult > { static readonly Name: string = 'write_file'; private shouldAlwaysWrite = false; @@ -143,7 +138,7 @@ export class WriteFileTool extends BaseTool< let currentContent = ''; try { currentContent = fs.readFileSync(params.file_path, 'utf8'); - } catch (error) { + } catch { // File may not exist, which is fine } @@ -184,7 +179,7 @@ export class WriteFileTool extends BaseTool< * @param params Parameters for the file writing * @returns Result of the file writing operation */ - async execute(params: WriteFileToolParams): Promise<WriteFileToolResult> { + async execute(params: WriteFileToolParams): Promise<ToolResult> { const validationError = this.validateToolParams(params); if (validationError) { return { |
