File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export async function writeToFileTool(
2626 let newContent : string | undefined = block . params . content
2727 let predictedLineCount : number | undefined = parseInt ( block . params . line_count ?? "0" )
2828
29- if ( ! relPath || ! newContent ) {
29+ if ( ! relPath || newContent === undefined ) {
3030 // checking for newContent ensure relPath is complete
3131 // wait so we can determine if it's a new file or editing an existing file
3232 return
@@ -104,15 +104,15 @@ export async function writeToFileTool(
104104 return
105105 }
106106
107- if ( ! newContent ) {
107+ if ( newContent === undefined ) {
108108 cline . consecutiveMistakeCount ++
109109 cline . recordToolError ( "write_to_file" )
110110 pushToolResult ( await cline . sayAndCreateMissingParamError ( "write_to_file" , "content" ) )
111111 await cline . diffViewProvider . reset ( )
112112 return
113113 }
114114
115- if ( ! predictedLineCount ) {
115+ if ( predictedLineCount === undefined ) {
116116 cline . consecutiveMistakeCount ++
117117 cline . recordToolError ( "write_to_file" )
118118
You can’t perform that action at this time.
0 commit comments