diff --git a/src/main/kotlin/com/coder/gateway/settings/CoderSettings.kt b/src/main/kotlin/com/coder/gateway/settings/CoderSettings.kt index b21b6766..1ae4af77 100644 --- a/src/main/kotlin/com/coder/gateway/settings/CoderSettings.kt +++ b/src/main/kotlin/com/coder/gateway/settings/CoderSettings.kt @@ -33,14 +33,14 @@ enum class Source { /** * Return a description of the source. */ - fun description(name: String, url: URL): String = when (this) { + fun description(name: String): String = when (this) { CONFIG -> "This $name was pulled from your global CLI config." - DEPLOYMENT_CONFIG -> "This $name was pulled from your CLI config for ${url.host}." - LAST_USED -> "The last used $name for ${url.host}." - QUERY -> "This $name was pulled from the Gateway link from ${url.host}." - USER -> "The last used $name for ${url.host}." + DEPLOYMENT_CONFIG -> "This $name was pulled from your deployment's CLI config." + LAST_USED -> "This $name was the last used $name." + QUERY -> "This $name was pulled from the Gateway link." + USER -> "The $name was the last used $name." ENVIRONMENT -> "This $name was pulled from an environment variable." - SETTINGS -> "This $name was pulled from your settings for Coder Gateway." + SETTINGS -> "This $name was pulled from your settings." } } diff --git a/src/main/kotlin/com/coder/gateway/util/Dialogs.kt b/src/main/kotlin/com/coder/gateway/util/Dialogs.kt index 111f3a74..72c1e530 100644 --- a/src/main/kotlin/com/coder/gateway/util/Dialogs.kt +++ b/src/main/kotlin/com/coder/gateway/util/Dialogs.kt @@ -210,7 +210,7 @@ class DialogUi( ask( title = "Session Token", description = error - ?: token?.second?.description("token", url) + ?: token?.second?.description("token") ?: "No existing token for ${url.host} found.", placeholder = token?.first, link = Pair("Session Token:", getTokenUrl.toString()),