history - introduce a localHistoryHome environment

This commit is contained in:
Benjamin Pasero
2022-03-09 10:15:49 +01:00
parent 79771ed7ff
commit 2dc2290ba9
6 changed files with 15 additions and 4 deletions

View File

@@ -59,6 +59,7 @@ export interface IEnvironmentService {
untitledWorkspacesHome: URI;
globalStorageHome: URI;
workspaceStorageHome: URI;
localHistoryHome: URI;
cacheHome: URI;
// --- settings sync

View File

@@ -87,10 +87,13 @@ export abstract class AbstractNativeEnvironmentService implements INativeEnviron
get machineSettingsResource(): URI { return joinPath(URI.file(join(this.userDataPath, 'Machine')), 'settings.json'); }
@memoize
get globalStorageHome(): URI { return URI.joinPath(this.appSettingsHome, 'globalStorage'); }
get globalStorageHome(): URI { return joinPath(this.appSettingsHome, 'globalStorage'); }
@memoize
get workspaceStorageHome(): URI { return URI.joinPath(this.appSettingsHome, 'workspaceStorage'); }
get workspaceStorageHome(): URI { return joinPath(this.appSettingsHome, 'workspaceStorage'); }
@memoize
get localHistoryHome(): URI { return joinPath(this.appSettingsHome, 'History'); }
@memoize
get keybindingsResource(): URI { return joinPath(this.userRoamingDataHome, 'keybindings.json'); }

View File

@@ -17,6 +17,7 @@ export interface IRemoteAgentEnvironment {
extensionHostLogsPath: URI;
globalStorageHome: URI;
workspaceStorageHome: URI;
localHistoryHome: URI;
userHome: URI;
os: OperatingSystem;
arch: string;

View File

@@ -325,6 +325,7 @@ export class RemoteAgentEnvironmentChannel implements IServerChannel {
extensionHostLogsPath: URI.file(join(this.environmentService.logsPath, `exthost${RemoteAgentEnvironmentChannel._namePool++}`)),
globalStorageHome: this.environmentService.globalStorageHome,
workspaceStorageHome: this.environmentService.workspaceStorageHome,
localHistoryHome: this.environmentService.localHistoryHome,
userHome: this.environmentService.userHome,
os: platform.OS,
arch: process.arch,

View File

@@ -67,10 +67,13 @@ export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvi
get cacheHome(): URI { return joinPath(this.userRoamingDataHome, 'caches'); }
@memoize
get globalStorageHome(): URI { return URI.joinPath(this.userRoamingDataHome, 'globalStorage'); }
get globalStorageHome(): URI { return joinPath(this.userRoamingDataHome, 'globalStorage'); }
@memoize
get workspaceStorageHome(): URI { return URI.joinPath(this.userRoamingDataHome, 'workspaceStorage'); }
get workspaceStorageHome(): URI { return joinPath(this.userRoamingDataHome, 'workspaceStorage'); }
@memoize
get localHistoryHome(): URI { return joinPath(this.userRoamingDataHome, 'History'); }
/**
* In Web every workspace can potentially have scoped user-data

View File

@@ -40,6 +40,7 @@ export interface IRemoteAgentEnvironmentDTO {
extensionHostLogsPath: UriComponents;
globalStorageHome: UriComponents;
workspaceStorageHome: UriComponents;
localHistoryHome: UriComponents;
userHome: UriComponents;
os: platform.OperatingSystem;
arch: string;
@@ -66,6 +67,7 @@ export class RemoteExtensionEnvironmentChannelClient {
extensionHostLogsPath: URI.revive(data.extensionHostLogsPath),
globalStorageHome: URI.revive(data.globalStorageHome),
workspaceStorageHome: URI.revive(data.workspaceStorageHome),
localHistoryHome: URI.revive(data.localHistoryHome),
userHome: URI.revive(data.userHome),
os: data.os,
arch: data.arch,