-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Improve diagnostics fetching after file edits #3243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
| // Get diagnostics before editing the file, we'll compare to diagnostics | ||
| // after editing to see if Roo needs to fix anything. | ||
| this.preDiagnostics = vscode.languages.getDiagnostics() | ||
| console.log(`preDiagnostics: ${JSON.stringify(this.preDiagnostics)}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider replacing console.log with structured logging for consistency and production-readiness.
| console.log(`preDiagnostics: ${JSON.stringify(this.preDiagnostics)}`) | |
| logger.info(`preDiagnostics: ${JSON.stringify(this.preDiagnostics)}`) |
This comment was generated because it violated a code review rule: mrule_OR1S8PRRHcvbdFib.
| const problems = fileDiagnostics.filter((d) => severities.includes(d.severity)) | ||
|
|
||
| if (problems.length > 0) { | ||
| result += `\n\n${path.relative(cwd, uri.fsPath).toPosix()}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling .toPosix() on a string is non‐standard. Consider using path.posix.relative or a dedicated utility for POSIX path conversion.
| result += `\n\n${path.relative(cwd, uri.fsPath).toPosix()}` | |
| result += `\n\n${path.posix.relative(cwd, uri.fsPath)}` |
* added posthog remote config * changeset * add feature flags constant * move init outside function to keep from potentially re-running --------- Co-authored-by: Elephant Lumps <[email protected]>
|
stale |
Context
I noticed that the latency in language servers can cause false positives when reporting diagnostics to the LLM. Let's wait for them to stabilize before returning after editing files.
Important
Improved diagnostics handling in
DiffViewProviderby polling for stabilization and updatedsetup.shfor cleaner repository management.DiffViewProvider.ts, addedpollDiagnosticsUntilStabilized()to poll diagnostics until they stabilize, replacing the previous fixed delay approach.saveChanges()to use the new polling method for diagnostics.setup.shand directly clone the repository.git cleancommand insetup.shto ensure a clean state before pulling updates.index.tsandDiffViewProvider.tsfor consistency.index.tsfor clarity.This description was created by
for 468413d. You can customize this summary. It will automatically update as commits are pushed.