Minor fixes

This commit is contained in:
Saoud Rizwan
2024-09-14 14:23:25 -04:00
parent b58d3dd622
commit b82f2b7691
2 changed files with 3 additions and 3 deletions

View File

@@ -1850,7 +1850,7 @@ ${this.customInstructions.trim()}
const busyTerminals = this.terminalManager.getTerminals(true) const busyTerminals = this.terminalManager.getTerminals(true)
if (busyTerminals.length > 0 || this.didEditFile) { if (busyTerminals.length > 0 || this.didEditFile) {
await delay(500) // delay after saving file to let terminals/diagnostics catch up await delay(300) // delay after saving file to let terminals/diagnostics catch up
} }
if (busyTerminals.length > 0) { if (busyTerminals.length > 0) {
@@ -1870,7 +1870,7 @@ ${this.customInstructions.trim()}
d.severity === vscode.DiagnosticSeverity.Error || d.severity === vscode.DiagnosticSeverity.Warning d.severity === vscode.DiagnosticSeverity.Error || d.severity === vscode.DiagnosticSeverity.Warning
) )
if (problems.length > 0) { if (problems.length > 0) {
diagnosticsDetails += `\n## ${path.relative(cwd, uri.fsPath)}:` diagnosticsDetails += `\n## ${path.relative(cwd, uri.fsPath)}`
for (const diagnostic of problems) { for (const diagnostic of problems) {
let severity = diagnostic.severity === vscode.DiagnosticSeverity.Error ? "Error" : "Warning" let severity = diagnostic.severity === vscode.DiagnosticSeverity.Error ? "Error" : "Warning"
const line = diagnostic.range.start.line + 1 // VSCode lines are 0-indexed const line = diagnostic.range.start.line + 1 // VSCode lines are 0-indexed

View File

@@ -61,7 +61,7 @@ class DiagnosticsMonitor {
return this.waitForUpdatedDiagnostics() return this.waitForUpdatedDiagnostics()
} }
private async waitForUpdatedDiagnostics(timeout: number = 500): Promise<FileDiagnostics> { private async waitForUpdatedDiagnostics(timeout: number = 300): Promise<FileDiagnostics> {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const timer = setTimeout(() => { const timer = setTimeout(() => {
cleanup() cleanup()