sussudio
Version:
An unofficial VS Code Internal API
35 lines (34 loc) • 1.96 kB
text/typescript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { IProcessEnvironment } from "../../../base/common/platform.mjs";
import { ILogService } from "../../log/common/log.mjs";
import { IProductService } from "../../product/common/productService.mjs";
import { IShellLaunchConfig, ITerminalEnvironment, ITerminalProcessOptions } from "../common/terminal.mjs";
export declare function getWindowsBuildNumber(): number;
export declare function findExecutable(command: string, cwd?: string, paths?: string[], env?: IProcessEnvironment, exists?: (path: string) => Promise<boolean>): Promise<string | undefined>;
export interface IShellIntegrationConfigInjection {
/**
* A new set of arguments to use.
*/
newArgs: string[] | undefined;
/**
* An optional environment to mixing to the real environment.
*/
envMixin?: IProcessEnvironment;
/**
* An optional array of files to copy from `source` to `dest`.
*/
filesToCopy?: {
source: string;
dest: string;
}[];
}
/**
* For a given shell launch config, returns arguments to replace and an optional environment to
* mixin to the SLC's environment to enable shell integration. This must be run within the context
* that creates the process to ensure accuracy. Returns undefined if shell integration cannot be
* enabled.
*/
export declare function getShellIntegrationInjection(shellLaunchConfig: IShellLaunchConfig, options: Pick<ITerminalProcessOptions, 'shellIntegration' | 'windowsEnableConpty'>, env: ITerminalEnvironment | undefined, logService: ILogService, productService: IProductService): IShellIntegrationConfigInjection | undefined;