reduce LSP verbosity
This commit is contained in:
@@ -107,14 +107,12 @@ export const EditTool = Tool.define("edit", {
|
|||||||
for (const [file, issues] of Object.entries(diagnostics)) {
|
for (const [file, issues] of Object.entries(diagnostics)) {
|
||||||
if (issues.length === 0) continue
|
if (issues.length === 0) continue
|
||||||
if (file === filePath) {
|
if (file === filePath) {
|
||||||
output += `\nThis file has errors, please fix\n<file_diagnostics>\n${issues.map(LSP.Diagnostic.pretty).join("\n")}\n</file_diagnostics>\n`
|
output += `\nThis file has errors, please fix\n<file_diagnostics>\n${issues
|
||||||
|
.filter((item) => item.severity === 1)
|
||||||
|
.map(LSP.Diagnostic.pretty)
|
||||||
|
.join("\n")}\n</file_diagnostics>\n`
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
output += `\n<project_diagnostics>\n${file}\n${issues
|
|
||||||
// TODO: may want to make more leniant for eslint
|
|
||||||
.filter((item) => item.severity === 1)
|
|
||||||
.map(LSP.Diagnostic.pretty)
|
|
||||||
.join("\n")}\n</project_diagnostics>\n`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user