summaryrefslogtreecommitdiffhomepage
path: root/internal/llm/tools/diagnostics.go
diff options
context:
space:
mode:
authorKujtim Hoxha <[email protected]>2025-04-14 11:08:17 +0200
committerKujtim Hoxha <[email protected]>2025-04-21 13:41:27 +0200
commit921f5ee5bd74837ff4566fc2d1e45051c87d9c38 (patch)
tree4d8e20f5b1ee8fc2c99adbcedb400d6657e8f1ef /internal/llm/tools/diagnostics.go
parent9ae05fea12ad05ea356a057f67afdde46d548843 (diff)
downloadopencode-921f5ee5bd74837ff4566fc2d1e45051c87d9c38.tar.gz
opencode-921f5ee5bd74837ff4566fc2d1e45051c87d9c38.zip
handle errors correctly in the edit tool
Diffstat (limited to 'internal/llm/tools/diagnostics.go')
-rw-r--r--internal/llm/tools/diagnostics.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/llm/tools/diagnostics.go b/internal/llm/tools/diagnostics.go
index 1bb02098e..b7b2bb8ba 100644
--- a/internal/llm/tools/diagnostics.go
+++ b/internal/llm/tools/diagnostics.go
@@ -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{}