Update system prompt and environment details to only focus on relevant errors rather than addressing all workspace warnings

This commit is contained in:
Saoud Rizwan
2024-09-16 06:51:16 -04:00
parent afa399e3d7
commit 328b09d65d
2 changed files with 12 additions and 15 deletions

View File

@@ -61,14 +61,11 @@ class DiagnosticsMonitor {
let timeout = 300
// if diagnostics contain existing errors (since the check above didn't trigger) then it's likely claude just did something that should have fixed the error, so we'll give a longer grace period for diagnostics to catch up
const hasErrorsOrWarnings = currentDiagnostics.some(([_, diagnostics]) =>
diagnostics.some(
(d) =>
d.severity === vscode.DiagnosticSeverity.Error || d.severity === vscode.DiagnosticSeverity.Warning
)
const hasErrors = currentDiagnostics.some(([_, diagnostics]) =>
diagnostics.some((d) => d.severity === vscode.DiagnosticSeverity.Error)
)
if (hasErrorsOrWarnings) {
console.log("Existing errors or warnings detected, extending timeout", currentDiagnostics)
if (hasErrors) {
console.log("Existing errors detected, extending timeout", currentDiagnostics)
timeout = 5_000
}