Skip to content

Commit 3023aea

Browse files
committed
fix: compiler errors (2)
- due to new API for SSH environment view
1 parent aa24f03 commit 3023aea

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/kotlin/com/coder/toolbox/views/EnvironmentView.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import com.coder.toolbox.sdk.v2.models.WorkspaceAgent
66
import com.jetbrains.toolbox.api.remoteDev.environments.SshEnvironmentContentsView
77
import com.jetbrains.toolbox.api.remoteDev.ssh.SshConnectionInfo
88
import java.net.URL
9-
import java.util.concurrent.CompletableFuture
109

1110
/**
1211
* A view for a single environment. It displays the projects and IDEs.
@@ -21,20 +20,21 @@ class EnvironmentView(
2120
private val workspace: Workspace,
2221
private val agent: WorkspaceAgent,
2322
) : SshEnvironmentContentsView {
24-
override fun getConnectionInfo(): CompletableFuture<SshConnectionInfo> = CompletableFuture.completedFuture(object : SshConnectionInfo {
23+
override suspend fun getConnectionInfo(): SshConnectionInfo = object : SshConnectionInfo {
2524
/**
2625
* The host name generated by the cli manager for this workspace.
2726
*/
28-
override fun getHost() = CoderCLIManager.getHostName(url, "${workspace.name}.${agent.name}")
27+
override val host: String = CoderCLIManager.getHostName(url, "${workspace.name}.${agent.name}")
2928

3029
/**
3130
* The port is ignored by the Coder proxy command.
3231
*/
33-
override fun getPort() = 22
32+
override val port: Int = 22
3433

3534
/**
3635
* The username is ignored by the Coder proxy command.
3736
*/
38-
override fun getUserName() = "coder"
39-
})
37+
override val userName: String? = "coder"
38+
39+
}
4040
}

0 commit comments

Comments
 (0)