Skip to content

Commit 5e4e795

Browse files
committed
comment
1 parent ea4b179 commit 5e4e795

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/commands.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -572,9 +572,14 @@ export class Commands {
572572
) {
573573
let remoteAuthority = toRemoteAuthority(baseUrl, workspaceOwner, workspaceName, workspaceAgent)
574574

575-
// When called from `openFromSidebar`, the workspaceAgent will only not be set
576-
// if the workspace is stopped, in which case we can't use Coder Connect
577-
// When called from `open`, the workspaceAgent will always be set.
575+
// We can't connect using Coder Connect straightaway if `workspaceAgent`
576+
// is undefined. This happens when:
577+
// 1. The workspace is stopped
578+
// 2. A `vscode://coder.coder-remote` URI does not include the agent as a
579+
// query parameter.
580+
//
581+
// For 1. `Remote.setup` will migrate us to Coder Connect once the workspace is built.
582+
// For 2. `Remote.setup` will call `maybeAskAgent` and then migrate us to Coder Connect
578583
if (workspaceAgent) {
579584
let sshConfig
580585
try {

0 commit comments

Comments
 (0)