Skip to content

Commit fc2ef92

Browse files
committed
Fix remote storage patch for current VS Code
1 parent d45b53d commit fc2ef92

1 file changed

Lines changed: 5 additions & 12 deletions

File tree

patches/remote-storage.diff

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -927,21 +927,15 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/web.main.ts
927927
import { IStorageService } from '../../platform/storage/common/storage.js';
928928
import { toLocalISOString } from '../../base/common/date.js';
929929
import { isWorkspaceToOpen, isFolderToOpen } from '../../platform/window/common/window.js';
930-
@@ -384,7 +384,7 @@ export class BrowserMain extends Disposa
931-
return service;
932-
}),
933-
930+
@@ -475,1 +475,1 @@
934931
- this.createStorageService(workspace, logService, userDataProfileService).then(service => {
935932
+ this.createStorageService(workspace, logService, userDataProfileService, remoteAgentService).then(service => {
936-
937-
// Storage
938-
serviceCollection.set(IStorageService, service);
939-
@@ -558,7 +558,28 @@ export class BrowserMain extends Disposa
933+
@@ -597,7 +597,28 @@
940934
}));
941935
}
942936

943-
- private async createStorageService(workspace: IAnyWorkspaceIdentifier, logService: ILogService, userDataProfileService: IUserDataProfileService): Promise<IStorageService> {
944-
+ private async createStorageService(workspace: IAnyWorkspaceIdentifier, logService: ILogService, userDataProfileService: IUserDataProfileService, remoteAgentService: IRemoteAgentService): Promise<IStorageService> {
937+
- protected async createStorageService(workspace: IAnyWorkspaceIdentifier, logService: ILogService, userDataProfileService: IUserDataProfileService): Promise<IStorageService> {
938+
+ protected async createStorageService(workspace: IAnyWorkspaceIdentifier, logService: ILogService, userDataProfileService: IUserDataProfileService, remoteAgentService: IRemoteAgentService): Promise<IStorageService> {
945939
+ // Use remote storage if enabled and connected to a remote server
946940
+ const connection = remoteAgentService.getConnection();
947941
+ if (this.configuration.remoteStorageEnabled && connection) {
@@ -970,13 +964,12 @@ Index: code-server/lib/vscode/src/vs/workbench/services/storage/browser/storageS
970964
===================================================================
971965
--- code-server.orig/lib/vscode/src/vs/workbench/services/storage/browser/storageService.ts
972966
+++ code-server/lib/vscode/src/vs/workbench/services/storage/browser/storageService.ts
973-
@@ -18,6 +18,8 @@ import { AbstractStorageService, isProfi
967+
@@ -18,5 +18,7 @@ import { AbstractStorageService, isProfi
974968
import { isUserDataProfile, IUserDataProfile } from '../../../../platform/userDataProfile/common/userDataProfile.js';
975969
import { IAnyWorkspaceIdentifier } from '../../../../platform/workspace/common/workspace.js';
976970
import { IUserDataProfileService } from '../../userDataProfile/common/userDataProfile.js';
977971
+import { ApplicationStorageDatabaseClient, ProfileStorageDatabaseClient, WorkspaceStorageDatabaseClient } from '../../../../platform/storage/common/storageIpc.js';
978972
+import { IRemoteAgentConnection } from '../../remote/common/remoteAgentService.js';
979-
import { hash } from '../../../../base/common/hash.js';
980973

981974
export class BrowserStorageService extends AbstractStorageService {
982975
@@ -460,3 +462,188 @@ export class IndexedDBStorageDatabase ex

0 commit comments

Comments
 (0)