Finalize terminal color API (#130123)

* fix #128228

* Update src/vs/vscode.d.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* Update src/vs/vscode.d.ts

Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>

* redo commit

* remove from proposed api

* improve description

Co-authored-by: Megan Rogge <meganrogge@Megans-MBP.lan>
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
This commit is contained in:
Megan Rogge 2021-08-10 11:59:29 -04:00 committed by GitHub
parent 24dbdb2c5f
commit 72190f7c69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 19 deletions

14
src/vs/vscode.d.ts vendored
View file

@ -9484,6 +9484,13 @@ declare module 'vscode' {
* The icon path or {@link ThemeIcon} for the terminal.
*/
iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
/**
* The icon {@link ThemeColor} for the terminal.
* The `terminal.ansi*` theme keys are
* recommended for the best contrast and consistency across themes.
*/
color?: ThemeColor;
}
/**
@ -9505,6 +9512,13 @@ declare module 'vscode' {
* The icon path or {@link ThemeIcon} for the terminal.
*/
iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
/**
* The icon {@link ThemeColor} for the terminal.
* The standard `terminal.ansi*` theme keys are
* recommended for the best contrast and consistency across themes.
*/
color?: ThemeColor;
}
/**

View file

@ -911,22 +911,6 @@ declare module 'vscode' {
//#endregion
//#region Terminal color support https://github.com/microsoft/vscode/issues/128228
export interface TerminalOptions {
/**
* Supports all ThemeColor keys, terminal.ansi* is recommended for contrast/consistency
*/
color?: ThemeColor;
}
export interface ExtensionTerminalOptions {
/**
* Supports all ThemeColor keys, terminal.ansi* is recommended for contrast/consistency
*/
color?: ThemeColor;
}
//#endregion
// eslint-disable-next-line vscode-dts-region-comments
//#region @jrieken -> exclusive document filters

View file

@ -642,9 +642,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
},
createTerminal(nameOrOptions?: vscode.TerminalOptions | vscode.ExtensionTerminalOptions | string, shellPath?: string, shellArgs?: string[] | string): vscode.Terminal {
if (typeof nameOrOptions === 'object') {
if (nameOrOptions.color) {
checkProposedApiEnabled(extension);
}
if ('pty' in nameOrOptions) {
return extHostTerminalService.createExtensionTerminal(nameOrOptions);
}