Skip to content

Commit 9948659

Browse files
committed
Review comments
1 parent 9e08d64 commit 9948659

File tree

2 files changed

+3
-31
lines changed

2 files changed

+3
-31
lines changed

src/extension.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -278,76 +278,50 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
278278
"coder.login",
279279
commands.login.bind(commands),
280280
),
281-
);
282-
ctx.subscriptions.push(
283281
vscode.commands.registerCommand(
284282
"coder.logout",
285283
commands.logout.bind(commands),
286284
),
287-
);
288-
ctx.subscriptions.push(
289285
vscode.commands.registerCommand("coder.open", commands.open.bind(commands)),
290-
);
291-
ctx.subscriptions.push(
292286
vscode.commands.registerCommand(
293287
"coder.openDevContainer",
294288
commands.openDevContainer.bind(commands),
295289
),
296-
);
297-
ctx.subscriptions.push(
298290
vscode.commands.registerCommand(
299291
"coder.openFromSidebar",
300292
commands.openFromSidebar.bind(commands),
301293
),
302-
);
303-
ctx.subscriptions.push(
304294
vscode.commands.registerCommand(
305295
"coder.openAppStatus",
306296
commands.openAppStatus.bind(commands),
307297
),
308-
);
309-
ctx.subscriptions.push(
310298
vscode.commands.registerCommand(
311299
"coder.workspace.update",
312300
commands.updateWorkspace.bind(commands),
313301
),
314-
);
315-
ctx.subscriptions.push(
316302
vscode.commands.registerCommand(
317303
"coder.createWorkspace",
318304
commands.createWorkspace.bind(commands),
319305
),
320-
);
321-
ctx.subscriptions.push(
322306
vscode.commands.registerCommand(
323307
"coder.navigateToWorkspace",
324308
commands.navigateToWorkspace.bind(commands),
325309
),
326-
);
327-
ctx.subscriptions.push(
328310
vscode.commands.registerCommand(
329311
"coder.navigateToWorkspaceSettings",
330312
commands.navigateToWorkspaceSettings.bind(commands),
331313
),
332-
);
333-
ctx.subscriptions.push(
334314
vscode.commands.registerCommand("coder.refreshWorkspaces", () => {
335315
myWorkspacesProvider.fetchAndRefresh();
336316
allWorkspacesProvider.fetchAndRefresh();
337317
}),
338-
);
339-
ctx.subscriptions.push(
340318
vscode.commands.registerCommand(
341319
"coder.viewLogs",
342320
commands.viewLogs.bind(commands),
343321
),
344-
);
345-
ctx.subscriptions.push(
346322
vscode.commands.registerCommand("coder.searchMyWorkspaces", async () =>
347323
showTreeViewSearch(MY_WORKSPACES_TREE_ID),
348324
),
349-
);
350-
ctx.subscriptions.push(
351325
vscode.commands.registerCommand("coder.searchAllWorkspaces", async () =>
352326
showTreeViewSearch(ALL_WORKSPACES_TREE_ID),
353327
),

src/remote/remote.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,9 @@ export class Remote {
400400
workspace.owner_name,
401401
workspace.name,
402402
);
403-
disposables.push(labelFormatterDisposable);
403+
disposables.push({
404+
dispose: () => labelFormatterDisposable.dispose(),
405+
});
404406

405407
// If the workspace is not in a running state, try to get it running.
406408
if (workspace.latest_build.status !== "running") {
@@ -637,11 +639,7 @@ export class Remote {
637639
workspace.name,
638640
agent.name,
639641
);
640-
disposables.push(labelFormatterDisposable);
641642
}),
642-
);
643-
644-
disposables.push(
645643
...this.createAgentMetadataStatusBar(agent, workspaceClient),
646644
);
647645
} catch (ex) {

0 commit comments

Comments
 (0)