mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-23 02:34:21 +01:00
handle errors correctly in the edit tool
This commit is contained in:
@@ -82,7 +82,7 @@ func (b *diagnosticsTool) Run(ctx context.Context, call ToolCall) (ToolResponse,
|
||||
waitForLspDiagnostics(ctx, params.FilePath, lsps)
|
||||
}
|
||||
|
||||
output := appendDiagnostics(params.FilePath, lsps)
|
||||
output := getDiagnostics(params.FilePath, lsps)
|
||||
|
||||
return NewTextResponse(output), nil
|
||||
}
|
||||
@@ -154,7 +154,7 @@ func hasDiagnosticsChanged(current, original map[protocol.DocumentUri][]protocol
|
||||
return false
|
||||
}
|
||||
|
||||
func appendDiagnostics(filePath string, lsps map[string]*lsp.Client) string {
|
||||
func getDiagnostics(filePath string, lsps map[string]*lsp.Client) string {
|
||||
fileDiagnostics := []string{}
|
||||
projectDiagnostics := []string{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user