Support contributed profiles in dropdown

This commit is contained in:
Daniel Imms
2021-05-27 12:27:57 -07:00
parent 5eddbd9d20
commit 14a013e7f3
4 changed files with 23 additions and 9 deletions

View File

@@ -598,8 +598,11 @@ export abstract class BaseExtHostTerminalService extends Disposable implements I
}
public async $createContributedProfileTerminal(id: string, isSplitTerminal: boolean): Promise<void> {
// TODO: Use cancellation token
const options = await this._profileProviders.get(id)?.provideProfileOptions(new CancellationTokenSource().token);
const token = new CancellationTokenSource().token;
const options = await this._profileProviders.get(id)?.provideProfileOptions(token);
if (token.isCancellationRequested) {
return;
}
if (!options) {
throw new Error(`No terminal profile options provided for id "${id}"`);
}