Add npm tools

This commit is contained in:
Alex Gleason committed 2025-07-25 03:01:14 -05:00
1 parent 52ce8e5d0b
commit ae6c83dc70
8 files changed
+758 -5

No files matched your search

+2 -2
View File
@@ -74,7 +74,7 @@ export class TextEditorStrReplaceTool implements Tool<TextEditorStrReplaceParams
try {
const absolutePath = join(this.cwd, path);
const content = await this.fs.readFile(absolutePath, "utf-8");
const content = await this.fs.readFile(absolutePath, "utf8");
// Helper function to normalize whitespace
const normalizeWhitespace = (str: string): string => {
@@ -177,7 +177,7 @@ export class TextEditorStrReplaceTool implements Tool<TextEditorStrReplaceParams
newContent = content.replace(old_str, new_str);
}
await this.fs.writeFile(absolutePath, newContent, "utf-8");
await this.fs.writeFile(absolutePath, newContent, "utf8");
let successMessage = `String successfully replaced in ${path}`;
if (occurrences > 1) {