import type { Event, WindowState } from 'vscode'; import { URI } from '../../../util/vs/base/common/uri'; export declare enum OperatingSystem { Windows = "Windows", Macintosh = "Mac", Linux = "Linux" } export declare class NameAndVersion { readonly name: string; readonly version: string; constructor(name: string, version: string); format(): string; } export declare const IEnvService: import("../../../util/common/services").ServiceIdentifier; export interface IEnvService { readonly _serviceBrand: undefined; readonly language: string | undefined; readonly sessionId: string; readonly machineId: string; readonly devDeviceId: string; readonly vscodeVersion: string; /** * Whether the current session is considered active * @see vscode.window.state.active */ readonly isActive: boolean; /** * @see vscode.env.remoteName */ readonly remoteName: string | undefined; readonly uiKind: 'desktop' | 'web'; readonly OS: OperatingSystem; readonly uriScheme: string; readonly extensionId: string; readonly appRoot: string; readonly shell: string; /** * @see vscode.window.onDidChangeWindowState */ readonly onDidChangeWindowState: Event; isProduction(): boolean; isPreRelease(): boolean; isSimulation(): boolean; getBuildType(): 'prod' | 'dev'; getVersion(): string; getBuild(): string; getName(): string; getEditorInfo(): NameAndVersion; getEditorPluginInfo(): NameAndVersion; openExternal(target: URI): Promise; } export declare const INativeEnvService: import("../../../util/common/services").ServiceIdentifier; export interface INativeEnvService extends IEnvService { readonly _serviceBrand: undefined; userHome: URI; } export declare abstract class AbstractEnvService implements IEnvService { language: string | undefined; _serviceBrand: undefined; abstract get sessionId(): string; abstract get vscodeVersion(): string; abstract get extensionId(): string; abstract get machineId(): string; abstract get devDeviceId(): string; abstract get remoteName(): string | undefined; abstract get uiKind(): 'desktop' | 'web'; abstract get OS(): OperatingSystem; abstract get uriScheme(): string; abstract get appRoot(): string; abstract get shell(): string; abstract get isActive(): boolean; abstract get onDidChangeWindowState(): Event; /** * @returns true if this is a build for end users. */ isProduction(): boolean; isPreRelease(): boolean; isSimulation(): boolean; getBuildType(): 'prod' | 'dev'; getVersion(): string; getBuild(): string; getName(): string; /** * The name and version of the editor itself. * `{ name : 'vscode', version: '1.63.2' }`. */ abstract getEditorInfo(): NameAndVersion; /** * The name and version of the Copilot chat plugin. * or `{ name: 'copilot-chat', version: '1.7.21' }`. */ abstract getEditorPluginInfo(): NameAndVersion; abstract openExternal(target: URI): Promise; } /** * Builds the editor-related request headers (`Editor-Version` and `Editor-Plugin-Version`) * that identify the host editor and the Copilot plugin to the backend. * * Implemented as a free function taking any {@link IEnvService} so that it works for every * environment (VS Code, the standalone chat-lib/CLI host, tests) - including implementations * that do not extend {@link AbstractEnvService}. */ export declare function getEditorVersionHeaders(envService: IEnvService): { [key: string]: string; }; export declare const isScenarioAutomation: boolean; //# sourceMappingURL=envService.d.ts.map