handle errors correctly in the edit tool

This commit is contained in:
Kujtim Hoxha
2025-04-14 11:08:17 +02:00
parent 9ae05fea12
commit 921f5ee5bd
4 changed files with 78 additions and 82 deletions

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,