import { Event , Terminal , Uri } from 'vscode' ; export enum TerminalShellType { powershell = 'powershell' , powershellCore = 'powershellCore' , commandPrompt = 'commandPrompt' , gitbash = 'gitbash' , bash = 'bash' , zsh = 'zsh' , ksh = 'ksh' , fish = 'fish' , cshell = 'cshell' , tcshell = 'tshell' , wsl = 'wsl' , other = 'other' } export interface ITerminalService { readonly onDidCloseTerminal : Event < void > ; sendCommand ( command , args ) : Promise < void > ; sendText ( text ) : Promise < void > ; show ( preserveFocus ? ) : Promise < void > ; } export const ITerminalServiceFactory = Symbol ( 'ITerminalServiceFactory' ) ; export interface ITerminalServiceFactory { param { Uri } resource param { string } title returns { ITerminalService } memberof getTerminalService ( resource ? , title ? ) : ITerminalService ; createTerminalService ( resource ? , title ? ) : ITerminalService ; } export const ITerminalHelper = Symbol ( 'ITerminalHelper' ) ; export interface ITerminalHelper { createTerminal ( title ? ) : Terminal ; identifyTerminalShell ( shellPath ) : TerminalShellType ; getTerminalShellPath ( ) : string ; buildCommandForTerminal ( terminalShellType , command , args ) : string ; } export const ITerminalActivationCommandProvider = Symbol ( 'ITerminalActivationCommandProvider' ) ; export interface ITerminalActivationCommandProvider { isShellSupported ( targetShell ) : boolean ; getActivationCommands ( resource , targetShell ) : Promise < string [ ] | undefined > ; }