import { CancellationToken, Connection, InitializeParams, InlineCompletionContext, Position, TextDocumentIdentifier } from 'vscode-languageserver'; import { WorkflowAPI } from '@gitlab-lsp/workflow-api'; import { ConfigService, IClientConfig } from './config_service'; import { FeatureFlagService } from './feature_flags'; import { DuoProjectAccessCache } from './services/duo_access'; import { TRACKING_EVENTS } from './tracking/constants'; import { TelemetryTracker, IClientContext } from './tracking/tracking_types'; import { VirtualFileSystemService } from './services/fs/virtual_file_system_service'; export type ChangeConfigOptions = { settings: IClientConfig; }; export type CustomInitializeParams = InitializeParams & { initializationOptions?: IClientContext; }; export declare const WORKFLOW_MESSAGE_NOTIFICATION = "$/gitlab/workflowMessage"; export interface MessageHandlerOptions { telemetryTracker: TelemetryTracker; configService: ConfigService; connection: Connection; featureFlagService: FeatureFlagService; duoProjectAccessCache: DuoProjectAccessCache; workflowAPI: WorkflowAPI | undefined; virtualFileSystemService: VirtualFileSystemService; } export interface ITelemetryNotificationParams { category: 'code_suggestions'; action: TRACKING_EVENTS; context: { trackingId: string; optionId?: number; }; } export interface IStartWorkflowParams { goal: string; image: string; } export declare const waitMs: (msToWait: number) => Promise; export interface CompletionRequest { textDocument: TextDocumentIdentifier; position: Position; token: CancellationToken; inlineCompletionContext?: InlineCompletionContext; } export declare class MessageHandler { #private; constructor({ telemetryTracker, configService, connection, featureFlagService, duoProjectAccessCache, workflowAPI, virtualFileSystemService, }: MessageHandlerOptions); didChangeConfigurationHandler: ({ settings }?: ChangeConfigOptions) => Promise; telemetryNotificationHandler: ({ category, action, context, }: ITelemetryNotificationParams) => Promise; onShutdownHandler: () => void; startWorkflowNotificationHandler: ({ goal, image }: IStartWorkflowParams) => Promise; }