mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-09 22:31:08 +00:00
fix: remove incorrect removeClosingTag usage on file paths in WriteToFileTool
The removeClosingTag function was incorrectly being called on file paths in the execute method. This function is meant to clean up partial XML tags during streaming, not process actual parameter values. This was causing file path corruption, particularly for paths after the first file creation. Fixes #9533
This commit is contained in:
parent
becdb1ac1c
commit
893f0d7e54
1 changed files with 2 additions and 2 deletions
|
|
@ -91,12 +91,12 @@ export class WriteToFileTool extends BaseTool<"write_to_file"> {
|
|||
newContent = unescapeHtmlEntities(newContent)
|
||||
}
|
||||
|
||||
const fullPath = relPath ? path.resolve(task.cwd, removeClosingTag("path", relPath)) : ""
|
||||
const fullPath = relPath ? path.resolve(task.cwd, relPath) : ""
|
||||
const isOutsideWorkspace = isPathOutsideWorkspace(fullPath)
|
||||
|
||||
const sharedMessageProps: ClineSayTool = {
|
||||
tool: fileExists ? "editedExistingFile" : "newFileCreated",
|
||||
path: getReadablePath(task.cwd, removeClosingTag("path", relPath)),
|
||||
path: getReadablePath(task.cwd, relPath),
|
||||
content: newContent,
|
||||
isOutsideWorkspace,
|
||||
isProtected: isWriteProtected,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue