import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { IWorkspaceFolder } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace"; import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service"; import { IConfigurationResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/configurationResolver/common/configurationResolver.service"; import { IShellLaunchConfig, ITerminalBackend, ITerminalEnvironment, TerminalShellType } from "@codingame/monaco-vscode-api/vscode/vs/platform/terminal/common/terminal"; import { IProcessEnvironment, OperatingSystem } from "@codingame/monaco-vscode-api/vscode/vs/base/common/platform"; import { IHistoryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/history/common/history.service"; import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; export declare function mergeEnvironments(parent: IProcessEnvironment, other: ITerminalEnvironment | undefined): void; export declare function addTerminalEnvironmentKeys(env: IProcessEnvironment, version: string | undefined, locale: string | undefined, detectLocale: "auto" | "off" | "on"): void; export declare function shouldSetLangEnvVariable(env: IProcessEnvironment, detectLocale: "auto" | "off" | "on"): boolean; export declare function getLangEnvVariable(locale?: string): string; export declare function getCwd(shell: IShellLaunchConfig, userHome: string | undefined, variableResolver: VariableResolver | undefined, root: URI | undefined, customCwd: string | undefined, logService?: ILogService): Promise; export type VariableResolver = (str: string) => Promise; export declare function createVariableResolver(lastActiveWorkspace: IWorkspaceFolder | undefined, env: IProcessEnvironment, configurationResolverService: IConfigurationResolverService | undefined): VariableResolver | undefined; export declare function createTerminalEnvironment(shellLaunchConfig: IShellLaunchConfig, envFromConfig: ITerminalEnvironment | undefined, variableResolver: VariableResolver | undefined, version: string | undefined, detectLocale: "auto" | "off" | "on", baseEnv: IProcessEnvironment): Promise; /** * Takes a path and returns the properly escaped path to send to a given shell. On Windows, this * included trying to prepare the path for WSL if needed. * * @param originalPath The path to be escaped and formatted. * @param executable The executable off the shellLaunchConfig. * @param title The terminal's title. * @param shellType The type of shell the path is being sent to. * @param backend The backend for the terminal. * @param isWindowsFrontend Whether the frontend is Windows, this is only exposed for injection via * tests. * @returns An escaped version of the path to be executed in the terminal. */ export declare function preparePathForShell(resource: string | URI, executable: string | undefined, title: string, shellType: TerminalShellType | undefined, backend: Pick | undefined, os: OperatingSystem | undefined, isWindowsFrontend?: boolean): Promise; export declare function getWorkspaceForTerminal(cwd: URI | string | undefined, workspaceContextService: IWorkspaceContextService, historyService: IHistoryService): IWorkspaceFolder | undefined; export declare function getUriLabelForShell(uri: URI | string, backend: Pick, shellType?: TerminalShellType, os?: OperatingSystem, isWindowsFrontend?: boolean): Promise; /** * Gets the unified duration to wait for shell integration after the terminal launches before * declaring the terminal lacks shell integration. */ export declare function getShellIntegrationTimeout(configurationService: IConfigurationService, siInjectionEnabled: boolean, isRemote: boolean, processReadyTimestamp?: number): number;