summaryrefslogtreecommitdiffhomepage
path: root/internal/llm/tools/edit.go
diff options
context:
space:
mode:
authoradamdottv <[email protected]>2025-05-09 13:37:13 -0500
committeradamdottv <[email protected]>2025-05-09 13:37:13 -0500
commitf1007771997bd0401516eda87a7e0ac92f269680 (patch)
treed26198d031516eaebcc885870b470925492d8775 /internal/llm/tools/edit.go
parentf41b7bbd0a0cc731fd7c471b7ee8b26f14a21755 (diff)
downloadopencode-f1007771997bd0401516eda87a7e0ac92f269680.tar.gz
opencode-f1007771997bd0401516eda87a7e0ac92f269680.zip
wip: logging improvements
Diffstat (limited to 'internal/llm/tools/edit.go')
-rw-r--r--internal/llm/tools/edit.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/llm/tools/edit.go b/internal/llm/tools/edit.go
index a5f0687cb..44787f525 100644
--- a/internal/llm/tools/edit.go
+++ b/internal/llm/tools/edit.go
@@ -12,9 +12,9 @@ import (
"github.com/opencode-ai/opencode/internal/config"
"github.com/opencode-ai/opencode/internal/diff"
"github.com/opencode-ai/opencode/internal/history"
- "github.com/opencode-ai/opencode/internal/logging"
"github.com/opencode-ai/opencode/internal/lsp"
"github.com/opencode-ai/opencode/internal/permission"
+ "log/slog"
)
type EditParams struct {
@@ -234,7 +234,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
- logging.Debug("Error creating file history version", "error", err)
+ slog.Debug("Error creating file history version", "error", err)
}
recordFileWrite(filePath)
@@ -347,13 +347,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 {
- logging.Debug("Error creating file history version", "error", err)
+ slog.Debug("Error creating file history version", "error", err)
}
}
// Store the new version
_, err = e.files.CreateVersion(ctx, sessionID, filePath, "")
if err != nil {
- logging.Debug("Error creating file history version", "error", err)
+ slog.Debug("Error creating file history version", "error", err)
}
recordFileWrite(filePath)
@@ -467,13 +467,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 {
- logging.Debug("Error creating file history version", "error", err)
+ slog.Debug("Error creating file history version", "error", err)
}
}
// Store the new version
_, err = e.files.CreateVersion(ctx, sessionID, filePath, newContent)
if err != nil {
- logging.Debug("Error creating file history version", "error", err)
+ slog.Debug("Error creating file history version", "error", err)
}
recordFileWrite(filePath)