diff --git a/internal/agent/tools/edit.go b/internal/agent/tools/edit.go index 7012afc8f525a39c2c431ec7327a9fb2d378ef42..0ade26b7500ed70a231b14f325086e6c096f6cfd 100644 --- a/internal/agent/tools/edit.go +++ b/internal/agent/tools/edit.go @@ -163,7 +163,7 @@ func createNewFile(edit editContext, filePath, content string, call fantasy.Tool _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, content) if err != nil { // Log error but don't fail the operation - slog.Debug("Error creating file history version", "error", err) + slog.Error("Error creating file history version", "error", err) } recordFileWrite(filePath) @@ -290,13 +290,13 @@ func deleteContent(edit editContext, filePath, oldString string, replaceAll bool // User Manually changed the content store an intermediate version _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, oldContent) if err != nil { - slog.Debug("Error creating file history version", "error", err) + slog.Error("Error creating file history version", "error", err) } } // Store the new version _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, "") if err != nil { - slog.Debug("Error creating file history version", "error", err) + slog.Error("Error creating file history version", "error", err) } recordFileWrite(filePath) @@ -431,7 +431,7 @@ func replaceContent(edit editContext, filePath, oldString, newString string, rep // Store the new version _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, newContent) if err != nil { - slog.Debug("Error creating file history version", "error", err) + slog.Error("Error creating file history version", "error", err) } recordFileWrite(filePath) diff --git a/internal/agent/tools/multiedit.go b/internal/agent/tools/multiedit.go index 72b7583afe0e43a84a13629ae58644b795fc0755..1956653f49ea49194e8435f668339fb0b6e7dbac 100644 --- a/internal/agent/tools/multiedit.go +++ b/internal/agent/tools/multiedit.go @@ -196,7 +196,7 @@ func processMultiEditWithCreation(edit editContext, params MultiEditParams, call _, err = edit.files.CreateVersion(edit.ctx, sessionID, params.FilePath, currentContent) if err != nil { - slog.Debug("Error creating file history version", "error", err) + slog.Error("Error creating file history version", "error", err) } recordFileWrite(params.FilePath) @@ -338,14 +338,14 @@ func processMultiEditExistingFile(edit editContext, params MultiEditParams, call // User manually changed the content, store an intermediate version _, err = edit.files.CreateVersion(edit.ctx, sessionID, params.FilePath, oldContent) if err != nil { - slog.Debug("Error creating file history version", "error", err) + slog.Error("Error creating file history version", "error", err) } } // Store the new version _, err = edit.files.CreateVersion(edit.ctx, sessionID, params.FilePath, currentContent) if err != nil { - slog.Debug("Error creating file history version", "error", err) + slog.Error("Error creating file history version", "error", err) } recordFileWrite(params.FilePath) diff --git a/internal/agent/tools/write.go b/internal/agent/tools/write.go index 0868b9f62306e7b43b1c7218ff68a6a7aae140eb..82684001372ee45b1d71fa34384e6e6c7a92db25 100644 --- a/internal/agent/tools/write.go +++ b/internal/agent/tools/write.go @@ -147,13 +147,13 @@ func NewWriteTool(lspClients *csync.Map[string, *lsp.Client], permissions permis // User Manually changed the content store an intermediate version _, err = files.CreateVersion(ctx, sessionID, filePath, oldContent) if err != nil { - slog.Debug("Error creating file history version", "error", err) + slog.Error("Error creating file history version", "error", err) } } // Store the new version _, err = files.CreateVersion(ctx, sessionID, filePath, params.Content) if err != nil { - slog.Debug("Error creating file history version", "error", err) + slog.Error("Error creating file history version", "error", err) } recordFileWrite(filePath) diff --git a/internal/lsp/client.go b/internal/lsp/client.go index afbe95cc2deb1c37b64c9e9b68fb705a4a0a59f9..7d914d9a52ce75f621715273e8f6b9588aa912b7 100644 --- a/internal/lsp/client.go +++ b/internal/lsp/client.go @@ -417,7 +417,7 @@ func (c *Client) openKeyConfigFiles(ctx context.Context) { if _, err := os.Stat(file); err == nil { // File exists, try to open it if err := c.OpenFile(ctx, file); err != nil { - slog.Debug("Failed to open key config file", "file", file, "error", err) + slog.Error("Failed to open key config file", "file", file, "error", err) } else { slog.Debug("Opened key config file for initialization", "file", file) }