@@ -12,6 +12,7 @@ import (
1212 "github.com/kujtimiihoxha/opencode/internal/config"
1313 "github.com/kujtimiihoxha/opencode/internal/diff"
1414 "github.com/kujtimiihoxha/opencode/internal/history"
15+ "github.com/kujtimiihoxha/opencode/internal/logging"
1516 "github.com/kujtimiihoxha/opencode/internal/lsp"
1617 "github.com/kujtimiihoxha/opencode/internal/permission"
1718)
@@ -227,7 +228,7 @@ func (e *editTool) createNewFile(ctx context.Context, filePath, content string)
227228 _ , err = e .files .CreateVersion (ctx , sessionID , filePath , content )
228229 if err != nil {
229230 // Log error but don't fail the operation
230- fmt . Printf ("Error creating file history version: %v \n " , err )
231+ logging . Debug ("Error creating file history version" , "error " , err )
231232 }
232233
233234 recordFileWrite (filePath )
@@ -334,13 +335,13 @@ func (e *editTool) deleteContent(ctx context.Context, filePath, oldString string
334335 // User Manually changed the content store an intermediate version
335336 _ , err = e .files .CreateVersion (ctx , sessionID , filePath , oldContent )
336337 if err != nil {
337- fmt . Printf ("Error creating file history version: %v \n " , err )
338+ logging . Debug ("Error creating file history version" , "error " , err )
338339 }
339340 }
340341 // Store the new version
341342 _ , err = e .files .CreateVersion (ctx , sessionID , filePath , "" )
342343 if err != nil {
343- fmt . Printf ("Error creating file history version: %v \n " , err )
344+ logging . Debug ("Error creating file history version" , "error " , err )
344345 }
345346
346347 recordFileWrite (filePath )
@@ -448,13 +449,13 @@ func (e *editTool) replaceContent(ctx context.Context, filePath, oldString, newS
448449 // User Manually changed the content store an intermediate version
449450 _ , err = e .files .CreateVersion (ctx , sessionID , filePath , oldContent )
450451 if err != nil {
451- fmt . Printf ("Error creating file history version: %v \n " , err )
452+ logging . Debug ("Error creating file history version" , "error " , err )
452453 }
453454 }
454455 // Store the new version
455456 _ , err = e .files .CreateVersion (ctx , sessionID , filePath , newContent )
456457 if err != nil {
457- fmt . Printf ("Error creating file history version: %v \n " , err )
458+ logging . Debug ("Error creating file history version" , "error " , err )
458459 }
459460
460461 recordFileWrite (filePath )
0 commit comments