mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
web - fix service cycle
This commit is contained in:
@@ -6,23 +6,17 @@
|
||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
|
||||
import { IPathService, AbstractPathService } from 'vs/workbench/services/path/common/pathService';
|
||||
import { IHistoryService } from 'vs/workbench/services/history/common/history';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
|
||||
export class BrowserPathService extends AbstractPathService {
|
||||
|
||||
private static fallbackUserHome(historyService: IHistoryService, environmentService: IWorkbenchEnvironmentService): URI {
|
||||
return historyService.getLastActiveWorkspaceRoot() || URI.from({ scheme: Schemas.vscodeRemote, authority: environmentService.configuration.remoteAuthority, path: '/' });
|
||||
}
|
||||
|
||||
constructor(
|
||||
@IRemoteAgentService remoteAgentService: IRemoteAgentService,
|
||||
@IHistoryService historyService: IHistoryService,
|
||||
@IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService
|
||||
) {
|
||||
super(() => BrowserPathService.fallbackUserHome(historyService, environmentService), remoteAgentService);
|
||||
super(() => URI.from({ scheme: Schemas.vscodeRemote, authority: environmentService.configuration.remoteAuthority, path: '/' }), remoteAgentService);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user