handle errors correctly in the edit tool

This commit is contained in:
Kujtim Hoxha
2025-04-14 11:08:17 +02:00
parent 38d8e6a649
commit e17d587bdc
4 changed files with 78 additions and 82 deletions
+1 -1
View File
@@ -183,7 +183,7 @@ func (w *writeTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error
result := fmt.Sprintf("File successfully written: %s", filePath)
result = fmt.Sprintf("<result>\n%s\n</result>", result)
result += appendDiagnostics(filePath, w.lspClients)
result += getDiagnostics(filePath, w.lspClients)
return WithResponseMetadata(NewTextResponse(result),
WriteResponseMetadata{
Additions: stats.Additions,