Terminal profile contribution feedback

Part of #120369
This commit is contained in:
Daniel Imms
2021-06-09 07:36:00 -07:00
parent 2a9a7701b0
commit b3d93459d7
2 changed files with 21 additions and 7 deletions

View File

@@ -598,18 +598,18 @@ export abstract class BaseExtHostTerminalService extends Disposable implements I
public async $createContributedProfileTerminal(id: string, isSplitTerminal: boolean): Promise<void> {
const token = new CancellationTokenSource().token;
const options = await this._profileProviders.get(id)?.provideProfileOptions(token);
const profile = await this._profileProviders.get(id)?.provideTerminalProfile(token);
if (token.isCancellationRequested) {
return;
}
if (!options) {
if (!profile) {
throw new Error(`No terminal profile options provided for id "${id}"`);
}
if ('pty' in options) {
this.createExtensionTerminal(options, { isSplitTerminal });
if ('pty' in profile.options) {
this.createExtensionTerminal(profile.options, { isSplitTerminal });
return;
}
this.createTerminalFromOptions(options, { isSplitTerminal });
this.createTerminalFromOptions(profile.options, { isSplitTerminal });
}
public async $provideLinks(terminalId: number, line: string): Promise<ITerminalLinkDto[]> {