Skip to content

Commit 1c1b3e5

Browse files
committed
💄
1 parent a924760 commit 1c1b3e5

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
},
6767
"gitpod.remote.syncExtensions": {
6868
"type": "boolean",
69-
"description": "Automatically install sync extensions from Gitpod Sync Server on the remote machine.",
69+
"description": "Automatically install sync extensions from Gitpod Sync Server on the remote workspace.",
7070
"default": true,
7171
"scope": "application"
7272
}

src/remoteConnector.ts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -929,16 +929,22 @@ export default class RemoteConnector extends Disposable {
929929
syncData = await this.settingsSync.readResource(SyncResource.Extensions);
930930
} catch (e) {
931931
if (e instanceof NoSyncStoreError) {
932-
const action = 'Settings Sync: Enable Sign In with Gitpod';
933-
const result = await vscode.window.showInformationMessage(`Couldn't initialize remote extensions, Settings Sync with Gitpod is required.`, action);
934-
if (result === action) {
932+
const addSyncProvider = 'Settings Sync: Enable Sign In with Gitpod';
933+
const config = 'Configure';
934+
const action = await vscode.window.showInformationMessage(`Couldn't install user sync extensions on remote workspace, Settings Sync with Gitpod is required.`, addSyncProvider, config);
935+
if (action === addSyncProvider) {
935936
vscode.commands.executeCommand('gitpod.syncProvider.add');
937+
} else if(action === config) {
938+
vscode.commands.executeCommand('workbench.action.openSettings',`@ext:${this.context.extension.id} sync extensions`);
936939
}
937940
} else if (e instanceof NoSettingsSyncSession) {
938-
const action = 'Enable Settings Sync';
939-
const result = await vscode.window.showInformationMessage(`Couldn't initialize remote extensions, please enable Settings Sync.`, action);
940-
if (result === action) {
941+
const enableSettingsSync = 'Enable Settings Sync';
942+
const config = 'Configure';
943+
const action = await vscode.window.showInformationMessage(`Couldn't install user sync extensions on remote workspace, please enable Settings Sync.`, enableSettingsSync, config);
944+
if (action === enableSettingsSync) {
941945
vscode.commands.executeCommand('workbench.userDataSync.actions.turnOn');
946+
} else if(action === config) {
947+
vscode.commands.executeCommand('workbench.action.openSettings',`@ext:${this.context.extension.id} sync extensions`);
942948
}
943949
} else {
944950
this.logger.error('Error while fetching settings sync extension data:', e);
@@ -973,11 +979,11 @@ export default class RemoteConnector extends Disposable {
973979

974980
try {
975981
await vscode.window.withProgress<void>({
976-
title: 'Installing extensions on remote',
982+
title: 'Installing sync extensions on remote',
977983
location: vscode.ProgressLocation.Notification
978984
}, async () => {
979985
try {
980-
this.logger.trace(`Installing extensions on remote: `, extensions.map(e => e.identifier.id).join('\n'));
986+
this.logger.trace(`Installing sync extensions on remote: `, extensions.map(e => e.identifier.id).join('\n'));
981987
await retry(async () => {
982988
await vscode.commands.executeCommand('__gitpod.initializeRemoteExtensions', extensions);
983989
}, 3000, 15);
@@ -988,7 +994,7 @@ export default class RemoteConnector extends Disposable {
988994
});
989995
} catch {
990996
const seeLogs = 'See Logs';
991-
const action = await vscode.window.showErrorMessage(`Error while installing extensions on remote.`, seeLogs);
997+
const action = await vscode.window.showErrorMessage(`Error while installing sync extensions on remote.`, seeLogs);
992998
if (action === seeLogs) {
993999
this.logger.show();
9941000
}

0 commit comments

Comments
 (0)