handle errors correctly in the edit tool

This commit is contained in:
Kujtim Hoxha
2025-04-21 13:41:27 +02:00
parent 9ae05fea12
commit 921f5ee5bd
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,