From 77c59f2e801f25c2f5c170310ad049426f85d661 Mon Sep 17 00:00:00 2001 From: Mathew Pareles Date: Mon, 14 Apr 2025 14:41:48 -0700 Subject: [PATCH] lint error severity must be warning or error --- src/vs/workbench/contrib/void/browser/toolsService.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/toolsService.ts b/src/vs/workbench/contrib/void/browser/toolsService.ts index 9bc53227..53a33daf 100644 --- a/src/vs/workbench/contrib/void/browser/toolsService.ts +++ b/src/vs/workbench/contrib/void/browser/toolsService.ts @@ -14,7 +14,7 @@ import { EndOfLinePreference } from '../../../../editor/common/model.js' import { basename } from '../../../../base/common/path.js' import { IVoidCommandBarService } from './voidCommandBarService.js' import { computeDirectoryTree1Deep, IDirectoryStrService, stringifyDirectoryTree1Deep } from './directoryStrService.js' -import { IMarkerService } from '../../../../platform/markers/common/markers.js' +import { IMarkerService, MarkerSeverity } from '../../../../platform/markers/common/markers.js' import { timeout } from '../../../../base/common/async.js' import { RawToolParamsObj } from '../common/sendLLMMessageTypes.js' import { ToolName } from '../common/prompt/prompts.js' @@ -471,9 +471,10 @@ export class ToolsService implements IToolsService { private _getLintErrors(uri: URI): { lintErrors: LintErrorItem[] | null } { const lintErrors = this.markerService .read({ resource: uri }) + .filter(l => l.severity === MarkerSeverity.Error || l.severity === MarkerSeverity.Warning) .map(l => ({ code: typeof l.code === 'string' ? l.code : l.code?.value || '', - message: l.message, + message: (l.severity === MarkerSeverity.Error ? '(error) ' : '(warning) ') + l.message, startLineNumber: l.startLineNumber, endLineNumber: l.endLineNumber, } satisfies LintErrorItem))