Skip to content

Commit 293597e

Browse files
committed
Reverts commits:
- 67977bb - 80e6162 - 12940df - 42ecf1f
1 parent 67977bb commit 293597e

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
}
3333
},
3434
"activationEvents": [
35-
"onResolveRemoteAuthority:ssh-remote",
3635
"onCommand:gitpod.syncProvider.add",
3736
"onCommand:gitpod.syncProvider.remove",
3837
"onCommand:gitpod.exportLogs",

src/publicApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class GitpodPublicApi extends Disposable {
4444
private _onWorkspaceStatusUpdate = this._register(new vscode.EventEmitter<WorkspaceStatus>);
4545
public readonly onWorkspaceStatusUpdate = this._onWorkspaceStatusUpdate.event;
4646

47-
constructor(accessToken: string, readonly gitpodHost: string, private logger: vscode.LogOutputChannel) {
47+
constructor(accessToken: string, gitpodHost: string, private logger: vscode.LogOutputChannel) {
4848
super();
4949

5050
const serviceUrl = new URL(gitpodHost);

src/remoteConnector.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,17 +158,14 @@ export default class RemoteConnector extends Disposable {
158158
}
159159

160160
private async initPublicApi(session: vscode.AuthenticationSession, gitpodHost: string) {
161-
if (this.publicApi?.gitpodHost === gitpodHost) {
161+
if (this.publicApi) {
162162
return;
163163
}
164164

165-
this.publicApi?.dispose();
166-
this.publicApi = undefined;
167-
168165
const usePublicApi = await this.experiments.getRaw<boolean>('gitpod_experimental_publicApi', session.account.id, { gitpodHost });
169166
this.logger.info(`Going to use ${usePublicApi ? 'public' : 'server'} API`);
170167
if (usePublicApi) {
171-
this.publicApi = new GitpodPublicApi(session.accessToken, gitpodHost, this.logger);
168+
this.publicApi = this._register(new GitpodPublicApi(session.accessToken, gitpodHost, this.logger));
172169
}
173170
}
174171

@@ -1078,6 +1075,10 @@ export default class RemoteConnector extends Disposable {
10781075
this.initializeRemoteExtensions({ ...syncExtFlow, quiet: false, flowId: uuid() });
10791076
}));
10801077

1078+
this._register(vscode.commands.registerCommand('__gitpod.workspaceShutdown', () => {
1079+
this.logger.warn('__gitpod.workspaceShutdown command executed');
1080+
}));
1081+
10811082
vscode.commands.executeCommand('setContext', 'gitpod.inWorkspace', true);
10821083
}
10831084

@@ -1118,9 +1119,8 @@ export default class RemoteConnector extends Disposable {
11181119
}
11191120

11201121
public override async dispose(): Promise<void> {
1121-
this.publicApi?.dispose();
1122-
this.workspaceState?.dispose();
11231122
await this.heartbeatManager?.dispose();
1123+
this.workspaceState?.dispose();
11241124
super.dispose();
11251125
}
11261126
}

src/workspaceState.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,9 @@ export class WorkspaceState extends Disposable {
5757
this._onWorkspaceStatusChanged.fire();
5858
}
5959
}
60+
61+
public override async dispose(): Promise<void> {
62+
super.dispose();
63+
}
64+
6065
}

0 commit comments

Comments
 (0)