@@ -12,6 +12,7 @@ import (
12
12
"github.com/kujtimiihoxha/opencode/internal/config"
13
13
"github.com/kujtimiihoxha/opencode/internal/diff"
14
14
"github.com/kujtimiihoxha/opencode/internal/history"
15
+ "github.com/kujtimiihoxha/opencode/internal/logging"
15
16
"github.com/kujtimiihoxha/opencode/internal/lsp"
16
17
"github.com/kujtimiihoxha/opencode/internal/permission"
17
18
)
@@ -227,7 +228,7 @@ func (e *editTool) createNewFile(ctx context.Context, filePath, content string)
227
228
_ , err = e .files .CreateVersion (ctx , sessionID , filePath , content )
228
229
if err != nil {
229
230
// 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 )
231
232
}
232
233
233
234
recordFileWrite (filePath )
@@ -334,13 +335,13 @@ func (e *editTool) deleteContent(ctx context.Context, filePath, oldString string
334
335
// User Manually changed the content store an intermediate version
335
336
_ , err = e .files .CreateVersion (ctx , sessionID , filePath , oldContent )
336
337
if err != nil {
337
- fmt . Printf ("Error creating file history version: %v \n " , err )
338
+ logging . Debug ("Error creating file history version" , "error " , err )
338
339
}
339
340
}
340
341
// Store the new version
341
342
_ , err = e .files .CreateVersion (ctx , sessionID , filePath , "" )
342
343
if err != nil {
343
- fmt . Printf ("Error creating file history version: %v \n " , err )
344
+ logging . Debug ("Error creating file history version" , "error " , err )
344
345
}
345
346
346
347
recordFileWrite (filePath )
@@ -448,13 +449,13 @@ func (e *editTool) replaceContent(ctx context.Context, filePath, oldString, newS
448
449
// User Manually changed the content store an intermediate version
449
450
_ , err = e .files .CreateVersion (ctx , sessionID , filePath , oldContent )
450
451
if err != nil {
451
- fmt . Printf ("Error creating file history version: %v \n " , err )
452
+ logging . Debug ("Error creating file history version" , "error " , err )
452
453
}
453
454
}
454
455
// Store the new version
455
456
_ , err = e .files .CreateVersion (ctx , sessionID , filePath , newContent )
456
457
if err != nil {
457
- fmt . Printf ("Error creating file history version: %v \n " , err )
458
+ logging . Debug ("Error creating file history version" , "error " , err )
458
459
}
459
460
460
461
recordFileWrite (filePath )
0 commit comments