Skip to content

Commit f9f7e69

Browse files
committed
Hide navigate to workspace commands when not connected to a deployment
1 parent 117f90f commit f9f7e69

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,11 @@
288288
},
289289
{
290290
"command": "coder.navigateToWorkspace",
291-
"when": "coder.authenticated"
291+
"when": "coder.workspace.connected"
292292
},
293293
{
294294
"command": "coder.navigateToWorkspaceSettings",
295-
"when": "coder.authenticated"
295+
"when": "coder.workspace.connected"
296296
},
297297
{
298298
"command": "coder.workspace.update",

src/core/contextManager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const CONTEXT_DEFAULTS = {
44
"coder.authenticated": false,
55
"coder.isOwner": false,
66
"coder.loaded": false,
7+
"coder.workspace.connected": false,
78
"coder.workspace.updatable": false,
89
} as const;
910

src/remote/remote.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ export class Remote {
556556
throw ex;
557557
}
558558

559+
this.contextManager.set("coder.workspace.connected", true);
559560
this.logger.info("Remote setup complete");
560561

561562
// Returning the URL and token allows the plugin to authenticate its own

0 commit comments

Comments
 (0)