mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 17:48:56 +01:00
Pass object instead of unwrapped args for term create
This commit is contained in:
@@ -3,9 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { withNullAsUndefined } from 'vs/base/common/types';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { TerminalLaunchConfig } from 'vs/workbench/api/common/extHost.protocol';
|
||||
import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService';
|
||||
import { BaseExtHostTerminalService, ExtHostTerminal, ITerminalInternalOptions } from 'vs/workbench/api/common/extHostTerminalService';
|
||||
import type * as vscode from 'vscode';
|
||||
@@ -25,22 +23,7 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
|
||||
public createTerminalFromOptions(options: vscode.TerminalOptions, internalOptions?: ITerminalInternalOptions): vscode.Terminal {
|
||||
const terminal = new ExtHostTerminal(this._proxy, generateUuid(), options, options.name);
|
||||
this._terminals.push(terminal);
|
||||
// TODO: Pass in options instead of individual props
|
||||
terminal.create(
|
||||
withNullAsUndefined(options.shellPath),
|
||||
withNullAsUndefined(options.shellArgs),
|
||||
withNullAsUndefined(options.cwd),
|
||||
withNullAsUndefined(options.env),
|
||||
withNullAsUndefined(options.iconPath),
|
||||
withNullAsUndefined(options.message),
|
||||
/*options.waitOnExit*/ undefined,
|
||||
withNullAsUndefined(options.strictEnv),
|
||||
withNullAsUndefined(options.hideFromUser),
|
||||
withNullAsUndefined(internalOptions?.isFeatureTerminal),
|
||||
true,
|
||||
withNullAsUndefined(internalOptions?.useShellEnvironment),
|
||||
withNullAsUndefined(internalOptions?.isSplitTerminal)
|
||||
);
|
||||
terminal.create(options, internalOptions);
|
||||
return terminal.value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user