summaryrefslogtreecommitdiffhomepage
path: root/internal/llm/tools/edit.go
diff options
context:
space:
mode:
authorKujtim Hoxha <[email protected]>2025-04-21 13:46:32 +0200
committerKujtim Hoxha <[email protected]>2025-04-21 13:46:32 +0200
commit9ae6af8856ca6a13d575ec6a8989a5f6ee4297b1 (patch)
tree0b5a898f1be2d39c60175dd264737bc7219037a8 /internal/llm/tools/edit.go
parente7bb99baab5e6968ce0351d6ad219ed21ceec4df (diff)
downloadopencode-9ae6af8856ca6a13d575ec6a8989a5f6ee4297b1.tar.gz
opencode-9ae6af8856ca6a13d575ec6a8989a5f6ee4297b1.zip
remove old logs
Diffstat (limited to 'internal/llm/tools/edit.go')
-rw-r--r--internal/llm/tools/edit.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/internal/llm/tools/edit.go b/internal/llm/tools/edit.go
index 83cec5dba..b7b813ca7 100644
--- a/internal/llm/tools/edit.go
+++ b/internal/llm/tools/edit.go
@@ -12,6 +12,7 @@ import (
"github.com/kujtimiihoxha/opencode/internal/config"
"github.com/kujtimiihoxha/opencode/internal/diff"
"github.com/kujtimiihoxha/opencode/internal/history"
+ "github.com/kujtimiihoxha/opencode/internal/logging"
"github.com/kujtimiihoxha/opencode/internal/lsp"
"github.com/kujtimiihoxha/opencode/internal/permission"
)
@@ -227,7 +228,7 @@ func (e *editTool) createNewFile(ctx context.Context, filePath, content string)
_, err = e.files.CreateVersion(ctx, sessionID, filePath, content)
if err != nil {
// Log error but don't fail the operation
- fmt.Printf("Error creating file history version: %v\n", err)
+ logging.Debug("Error creating file history version", "error", err)
}
recordFileWrite(filePath)
@@ -334,13 +335,13 @@ func (e *editTool) deleteContent(ctx context.Context, filePath, oldString string
// User Manually changed the content store an intermediate version
_, err = e.files.CreateVersion(ctx, sessionID, filePath, oldContent)
if err != nil {
- fmt.Printf("Error creating file history version: %v\n", err)
+ logging.Debug("Error creating file history version", "error", err)
}
}
// Store the new version
_, err = e.files.CreateVersion(ctx, sessionID, filePath, "")
if err != nil {
- fmt.Printf("Error creating file history version: %v\n", err)
+ logging.Debug("Error creating file history version", "error", err)
}
recordFileWrite(filePath)
@@ -448,13 +449,13 @@ func (e *editTool) replaceContent(ctx context.Context, filePath, oldString, newS
// User Manually changed the content store an intermediate version
_, err = e.files.CreateVersion(ctx, sessionID, filePath, oldContent)
if err != nil {
- fmt.Printf("Error creating file history version: %v\n", err)
+ logging.Debug("Error creating file history version", "error", err)
}
}
// Store the new version
_, err = e.files.CreateVersion(ctx, sessionID, filePath, newContent)
if err != nil {
- fmt.Printf("Error creating file history version: %v\n", err)
+ logging.Debug("Error creating file history version", "error", err)
}
recordFileWrite(filePath)