You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: add diagnostics settings to global state (#2379)
- Add includeDiagnostics, maxDiagnosticsCount, and diagnosticsFilter to global settings
- Create DiagnosticsSettings component for UI configuration
- Update ClineProvider to handle diagnostics settings messages
- Modify diagnosticsToProblemsString to accept options parameter
- Update ExtensionState type and related components
- Add proper defaults: includeDiagnostics=false, maxDiagnosticsCount=5, diagnosticsFilter=['error','warning']
This allows users to configure diagnostics settings that persist across sessions
instead of being reset to defaults on each restart.
result+=`\n... (${diagnostics.reduce((sum,[,diags])=>sum+diags.filter((d)=>severities.includes(d.severity)).length,0)-totalDiagnosticsCount} more diagnostics omitted)`
130
+
returnresult.trim()
131
+
}
132
+
88
133
letlabel: string
89
134
switch(diagnostic.severity){
90
135
casevscode.DiagnosticSeverity.Error:
@@ -121,6 +166,8 @@ export async function diagnosticsToProblemsString(
"settings.includeDiagnostics.description": "Include diagnostics (errors/warnings) in API requests. Disable this when creating multi-file features to avoid temporary errors distracting the AI.",
35
+
"settings.maxDiagnosticsCount.description": "Maximum number of diagnostics to include in API requests (0 for unlimited). Helps control token usage.",
36
+
"settings.diagnosticsFilter.description": "Filter diagnostics by code or source. Add diagnostic codes (e.g., 'dart Error', 'eslint/no-unused-vars') to exclude specific types."
0 commit comments