Skip to content

Commit 42c2851

Browse files
committed
Get all agents when configuring SSH
1 parent 8b7c049 commit 42c2851

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/kotlin/com/coder/gateway/CoderGatewayConnectionProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class CoderGatewayConnectionProvider : GatewayConnectionProvider {
100100
cli.login(client.token)
101101

102102
indicator.text = "Configuring Coder CLI..."
103-
cli.configSsh(workspaces.flatMap { it.toAgentModels() }, settings.headerCommand)
103+
cli.configSsh(client.agents(workspaces), settings.headerCommand)
104104

105105
// TODO: Ask for these if missing. Maybe we can reuse the second
106106
// step of the wizard? Could also be nice if we automatically used

src/main/kotlin/com/coder/gateway/views/steps/CoderWorkspacesStepView.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,8 @@ class CoderWorkspacesStepView(val setNextButtonEnabled: (Boolean) -> Unit) : Cod
620620
poller?.cancel()
621621

622622
logger.info("Configuring Coder CLI...")
623-
cli.configSsh(tableOfWorkspaces.items, settings.headerCommand)
623+
val workspaces = clientService.client.workspaces()
624+
cli.configSsh(clientService.client.agents(workspaces), settings.headerCommand)
624625

625626
// The config directory can be used to pull the URL and token in
626627
// order to query this workspace's status in other flows, for

0 commit comments

Comments
 (0)