mirror of
https://github.com/sst/opencode.git
synced 2025-07-24 16:23:43 +00:00
only include severity 1 diagnostics from lsp in edit tool output
This commit is contained in:
parent
f7dd48e60d
commit
dd34556e9c
1 changed files with 4 additions and 1 deletions
|
@ -86,7 +86,10 @@ export const EditTool = Tool.define({
|
|||
output += `\nThis file has errors, please fix\n<file_diagnostics>\n${issues.map(LSP.Diagnostic.pretty).join("\n")}\n</file_diagnostics>\n`
|
||||
continue
|
||||
}
|
||||
output += `\n<project_diagnostics>\n${file}\n${issues.map(LSP.Diagnostic.pretty).join("\n")}\n</project_diagnostics>\n`
|
||||
output += `\n<project_diagnostics>\n${file}\n${issues
|
||||
.filter((item) => item.severity === 1)
|
||||
.map(LSP.Diagnostic.pretty)
|
||||
.join("\n")}\n</project_diagnostics>\n`
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue