on main help sign in
chore: swap error related logs to use error log level (#1505)
a34a8a3Adam Stringer
internal/agent/tools/edit.go+4−4
@@ -163,7 +163,7 @@ func createNewFile(edit editContext, filePath, content string, call fantasy.Tool
163 _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, content)
163 _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, content)
164 if err != nil {
164 if err != nil {
165 // Log error but don't fail the operation
165 // Log error but don't fail the operation
166− slog.Debug("Error creating file history version", "error", err)
166+ slog.Error("Error creating file history version", "error", err)
167 }
167 }
168
168
169 recordFileWrite(filePath)
169 recordFileWrite(filePath)
@@ -290,13 +290,13 @@ func deleteContent(edit editContext, filePath, oldString string, replaceAll bool
290 // User Manually changed the content store an intermediate version
290 // User Manually changed the content store an intermediate version
291 _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, oldContent)
291 _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, oldContent)
292 if err != nil {
292 if err != nil {
293− slog.Debug("Error creating file history version", "error", err)
293+ slog.Error("Error creating file history version", "error", err)
294 }
294 }
295 }
295 }
296 // Store the new version
296 // Store the new version
297 _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, "")
297 _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, "")
298 if err != nil {
298 if err != nil {
299− slog.Debug("Error creating file history version", "error", err)
299+ slog.Error("Error creating file history version", "error", err)
300 }
300 }
301
301
302 recordFileWrite(filePath)
302 recordFileWrite(filePath)
@@ -431,7 +431,7 @@ func replaceContent(edit editContext, filePath, oldString, newString string, rep
431 // Store the new version
431 // Store the new version
432 _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, newContent)
432 _, err = edit.files.CreateVersion(edit.ctx, sessionID, filePath, newContent)
433 if err != nil {
433 if err != nil {
434− slog.Debug("Error creating file history version", "error", err)
434+ slog.Error("Error creating file history version", "error", err)
435 }
435 }
436
436
437 recordFileWrite(filePath)
437 recordFileWrite(filePath)
internal/agent/tools/multiedit.go+3−3
@@ -196,7 +196,7 @@ func processMultiEditWithCreation(edit editContext, params MultiEditParams, call
196
196
197 _, err = edit.files.CreateVersion(edit.ctx, sessionID, params.FilePath, currentContent)
197 _, err = edit.files.CreateVersion(edit.ctx, sessionID, params.FilePath, currentContent)
198 if err != nil {
198 if err != nil {
199− slog.Debug("Error creating file history version", "error", err)
199+ slog.Error("Error creating file history version", "error", err)
200 }
200 }
201
201
202 recordFileWrite(params.FilePath)
202 recordFileWrite(params.FilePath)
@@ -338,14 +338,14 @@ func processMultiEditExistingFile(edit editContext, params MultiEditParams, call
338 // User manually changed the content, store an intermediate version
338 // User manually changed the content, store an intermediate version
339 _, err = edit.files.CreateVersion(edit.ctx, sessionID, params.FilePath, oldContent)
339 _, err = edit.files.CreateVersion(edit.ctx, sessionID, params.FilePath, oldContent)
340 if err != nil {
340 if err != nil {
341− slog.Debug("Error creating file history version", "error", err)
341+ slog.Error("Error creating file history version", "error", err)
342 }
342 }
343 }
343 }
344
344
345 // Store the new version
345 // Store the new version
346 _, err = edit.files.CreateVersion(edit.ctx, sessionID, params.FilePath, currentContent)
346 _, err = edit.files.CreateVersion(edit.ctx, sessionID, params.FilePath, currentContent)
347 if err != nil {
347 if err != nil {
348− slog.Debug("Error creating file history version", "error", err)
348+ slog.Error("Error creating file history version", "error", err)
349 }
349 }
350
350
351 recordFileWrite(params.FilePath)
351 recordFileWrite(params.FilePath)
internal/agent/tools/write.go+2−2
@@ -147,13 +147,13 @@ func NewWriteTool(lspClients *csync.Map[string, *lsp.Client], permissions permis
147 // User Manually changed the content store an intermediate version
147 // User Manually changed the content store an intermediate version
148 _, err = files.CreateVersion(ctx, sessionID, filePath, oldContent)
148 _, err = files.CreateVersion(ctx, sessionID, filePath, oldContent)
149 if err != nil {
149 if err != nil {
150− slog.Debug("Error creating file history version", "error", err)
150+ slog.Error("Error creating file history version", "error", err)
151 }
151 }
152 }
152 }
153 // Store the new version
153 // Store the new version
154 _, err = files.CreateVersion(ctx, sessionID, filePath, params.Content)
154 _, err = files.CreateVersion(ctx, sessionID, filePath, params.Content)
155 if err != nil {
155 if err != nil {
156− slog.Debug("Error creating file history version", "error", err)
156+ slog.Error("Error creating file history version", "error", err)
157 }
157 }
158
158
159 recordFileWrite(filePath)
159 recordFileWrite(filePath)
internal/lsp/client.go+1−1
@@ -417,7 +417,7 @@ func (c *Client) openKeyConfigFiles(ctx context.Context) {
417 if _, err := os.Stat(file); err == nil {
417 if _, err := os.Stat(file); err == nil {
418 // File exists, try to open it
418 // File exists, try to open it
419 if err := c.OpenFile(ctx, file); err != nil {
419 if err := c.OpenFile(ctx, file); err != nil {
420− slog.Debug("Failed to open key config file", "file", file, "error", err)
420+ slog.Error("Failed to open key config file", "file", file, "error", err)
421 } else {
421 } else {
422 slog.Debug("Opened key config file for initialization", "file", file)
422 slog.Debug("Opened key config file for initialization", "file", file)
423 }
423 }