fix: backward compatibility issues on plugin update (fixes #551)

This commit is contained in:
Carl-Robert Linnupuu 2024-05-15 00:09:14 +03:00
parent d817e950a5
commit 65d0993e39
2 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@ import ee.carlrobert.codegpt.settings.service.ollama.OllamaSettings;
import ee.carlrobert.codegpt.settings.service.openai.OpenAISettings;
import org.jetbrains.annotations.NotNull;
@State(name = "CodeGPT_GeneralSettings_210", storages = @Storage("CodeGPT_GeneralSettings_210.xml"))
@State(name = "CodeGPT_GeneralSettings_270", storages = @Storage("CodeGPT_GeneralSettings_270.xml"))
public class GeneralSettings implements PersistentStateComponent<GeneralSettingsState> {
private GeneralSettingsState state = new GeneralSettingsState();

View file

@ -27,10 +27,10 @@ class ServiceConfigurableComponent {
}
fun getSelectedService(): ServiceType {
return serviceComboBox.item
return serviceComboBox.selectedItem as ServiceType
}
fun setSelectedService(serviceType: ServiceType?) {
fun setSelectedService(serviceType: ServiceType) {
serviceComboBox.selectedItem = serviceType
}