/****************************************************************************** * Copyright 2024 - 2025 TypeFox GmbH * This program and the accompanying materials are made available under the * terms of the MIT License, which is available in the project root. ******************************************************************************/ /** * Base Langium DSL validator (taps into Langium's validator messages to provide better results) */ import { type LangiumDocument } from 'langium'; import { Diagnostic } from 'vscode-languageserver-types'; import type { LangiumServicesLike } from '../types.js'; import { AbstractDocumentEvaluator, type EvaluationContext, type FailureAwarenessData } from './document-evaluator.js'; import { type EvaluatorResult } from './evaluator.js'; /** * Langium-specific evaluator result data */ export interface LangiumEvaluatorResultData extends FailureAwarenessData { /** * Number of errors */ errors: number; /** * Number of warnings */ warnings: number; /** * Number of infos */ infos: number; /** * Number of hints */ hints: number; /** * Number of unassigned diagnostics */ unassigned: number; /** * Length of the response in chars */ responseLength: number; /** * Raw diagnostic data, same which is used to compute the other values above */ diagnostics: Diagnostic[]; } export declare class LangiumEvaluator extends AbstractDocumentEvaluator { /** * Validate an agent response as if it's a langium program. If we can parse it, we attempt to validate it. */ evaluateDocument(doc: LangiumDocument, ctx: EvaluationContext): EvaluatorResult; protected createEmptyResultData(): LangiumEvaluatorResultData; } //# sourceMappingURL=langium-evaluator.d.ts.map