src/vs/workbench/contrib/terminal/electron-sandbox/terminalRemote.ts/CreateNewLocalTerminalAction/run
class CreateNewLocalTerminalAction:	override async run(): Promise<any> {
		let cwd: URI | undefined;
		try {
			const activeWorkspaceRootUri = this._historyService.getLastActiveWorkspaceRoot(Schemas.vscodeRemote);
			if (activeWorkspaceRootUri) {
				const canonicalUri = await this._remoteAuthorityResolverService.getCanonicalURI(activeWorkspaceRootUri);
				if (canonicalUri.scheme === Schemas.file) {
					cwd = canonicalUri;
				}
			}
		} catch { }
		if (!cwd) {
			cwd = this._nativeEnvironmentService.userHome;
		}
		const instance = await this._terminalService.createTerminal({ cwd });
		if (!instance) {
			return Promise.resolve(undefined);
		}

		this._terminalService.setActiveInstance(instance);
		return this._terminalGroupService.showPanel(true);
	}