Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add "Check for IDE updates" setting #525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add "Check for IDE updates" setting
This setting controls whether the plugin checks for available backend
IDE upgrades (on by default). Turning it off suppresses the prompt to
upgrade to a newer version.
  • Loading branch information
aaronlehmann committed Jan 24, 2025
commit 8c3b7017dd9b4c7565b657ad1d4b1a92832e2b5d
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class CoderRemoteConnectionHandle {
},
true,
)
if (attempt == 1) {
if (settings.checkIDEUpdate && attempt == 1) {
// See if there is a newer (non-EAP) version of the IDE available.
checkUpdate(accessor, parameters, indicator)?.let { update ->
// Store the old IDE to delete later.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@ class CoderSettingsConfigurable : BoundConfigurable("Coder") {
"Example format: CL 2023.3.6 233.15619.8",
)
}
row(CoderGatewayBundle.message("gateway.connector.settings.check-ide-updates.heading")) {
checkBox(CoderGatewayBundle.message("gateway.connector.settings.check-ide-updates.title"))
.bindSelected(state::checkIDEUpdates)
.comment(
CoderGatewayBundle.message("gateway.connector.settings.check-ide-updates.comment"),
)
}.layout(RowLayout.PARENT_GRID)
}
}

Expand Down
8 changes: 8 additions & 0 deletions src/main/kotlin/com/coder/gateway/settings/CoderSettings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ open class CoderSettingsState(
open var workspaceFilter: String = "owner:me",
// Default version of IDE to display in IDE selection dropdown
open var defaultIde: String = "",
// Whether to check for IDE updates.
open var checkIDEUpdates: Boolean = true,
)

/**
Expand Down Expand Up @@ -182,6 +184,12 @@ open class CoderSettings(
val defaultIde: String
get() = state.defaultIde

/**
* Whether to check for IDE updates.
*/
val checkIDEUpdate: Boolean
get() = state.checkIDEUpdates

/**
* Whether to ignore a failed setup command.
*/
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/messages/CoderGatewayBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,9 @@ gateway.connector.settings.workspace-filter.comment=The filter to apply when \
which can be slow with many workspaces, and it adds every agent to the SSH \
config, which can result in a large SSH config with many workspaces.
gateway.connector.settings.default-ide=Default IDE Selection
gateway.connector.settings.check-ide-updates.heading=IDE version check
gateway.connector.settings.check-ide-updates.title=Check for IDE updates
gateway.connector.settings.check-ide-updates.comment=Checking this box will \
cause the plugin to check for available IDE backend updates and prompt \
with an option to upgrade if a newer version is available.

Loading