Terminal profiles (#118790)

* get basics working in current dropdown

* filter profiles based on what we want in the dropdown and other info

* add copywright

* terminal.ts -> terminalProfile.ts

* seperate linux distro code

* improve terminalConfig setting description

* add passing tests and fix #79572

* add test for login args

* add wsl stuff

* fix #77652

* lengthen throttle time to 10s

* shell -> process and fire update profiles so dropdown is updated

* consolidate code in terminalProfile

* change profile selection logic

* change profile config structure

* use <ProfileName, IterminalProfileObject> and get wsl distro names to look normal

* provide terminalConfig to terminalProfiles

* move detection/validation to terminalProfiles

* isWorkspaceShellAllowed

* add quickPickOnly so Select Default Profiles returns all and otherwise filters based on config

* Add logs for errors within terminalProfiles

* change return type

* use sync

* fix bug, get custom generated to work

* workspace shell permissions

* add some comments and clean up

* when ext host ready update profiles

* improve terminalProfileObjectEqual check

* don't use windows powershell unless no other powershell
This commit is contained in:
Megan Rogge
2021-03-16 19:02:59 -05:00
committed by GitHub
parent e5fc49d8af
commit e8e6d64105
15 changed files with 628 additions and 181 deletions

View File

@@ -61,6 +61,7 @@ import { CandidatePort } from 'vs/workbench/services/remote/common/remoteExplore
import { WorkspaceTrustRequest, WorkspaceTrustStateChangeEvent } from 'vs/platform/workspace/common/workspaceTrust';
import { ISerializableEnvironmentVariableCollection } from 'vs/workbench/contrib/terminal/common/environmentVariable';
import { IShellLaunchConfig, ITerminalDimensions, ITerminalLaunchError } from 'vs/platform/terminal/common/terminal';
import { ITerminalProfile } from 'vs/workbench/contrib/terminal/common/terminal';
export interface IEnvironment {
isExtensionDevelopmentDebug: boolean;
@@ -1609,11 +1610,6 @@ export interface IShellLaunchConfigDto {
hideFromUser?: boolean;
}
export interface IShellDefinitionDto {
label: string;
path: string;
}
export interface IShellAndArgsDto {
shell: string;
args: string[] | string | undefined;
@@ -1653,7 +1649,7 @@ export interface ExtHostTerminalServiceShape {
$acceptProcessRequestCwd(id: number): void;
$acceptProcessRequestLatency(id: number): number;
$acceptWorkspacePermissionsChanged(isAllowed: boolean): void;
$getAvailableShells(): Promise<IShellDefinitionDto[]>;
$getAvailableProfiles(quickLaunchOnly: boolean): Promise<ITerminalProfile[]>;
$getDefaultShellAndArgs(useAutomationShell: boolean): Promise<IShellAndArgsDto>;
$provideLinks(id: number, line: string): Promise<ITerminalLinkDto[]>;
$activateLink(id: number, linkId: number): void;