summaryrefslogtreecommitdiffhomepage
path: root/internal/llm/tools/patch.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/patch.go
parentf41b7bbd0a0cc731fd7c471b7ee8b26f14a21755 (diff)
downloadopencode-f1007771997bd0401516eda87a7e0ac92f269680.tar.gz
opencode-f1007771997bd0401516eda87a7e0ac92f269680.zip
wip: logging improvements
Diffstat (limited to 'internal/llm/tools/patch.go')
-rw-r--r--internal/llm/tools/patch.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/llm/tools/patch.go b/internal/llm/tools/patch.go
index dcd3027b5..e0c0bf5bc 100644
--- a/internal/llm/tools/patch.go
+++ b/internal/llm/tools/patch.go
@@ -11,9 +11,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 PatchParams struct {
@@ -318,7 +318,7 @@ func (p *patchTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error
// If not adding a file, create history entry for existing file
_, err = p.files.Create(ctx, sessionID, absPath, oldContent)
if err != nil {
- logging.Debug("Error creating file history", "error", err)
+ slog.Debug("Error creating file history", "error", err)
}
}
@@ -326,7 +326,7 @@ func (p *patchTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error
// User manually changed content, store intermediate version
_, err = p.files.CreateVersion(ctx, sessionID, absPath, oldContent)
if err != nil {
- logging.Debug("Error creating file history version", "error", err)
+ slog.Debug("Error creating file history version", "error", err)
}
}
@@ -337,7 +337,7 @@ func (p *patchTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error
_, err = p.files.CreateVersion(ctx, sessionID, absPath, newContent)
}
if err != nil {
- logging.Debug("Error creating file history version", "error", err)
+ slog.Debug("Error creating file history version", "error", err)
}
// Record file operations