diff --git a/app/MindWork AI Studio/Plugins/configuration/plugin.lua b/app/MindWork AI Studio/Plugins/configuration/plugin.lua index 77797c51..2debb704 100644 --- a/app/MindWork AI Studio/Plugins/configuration/plugin.lua +++ b/app/MindWork AI Studio/Plugins/configuration/plugin.lua @@ -3,6 +3,7 @@ require("icon") -- ------ -- This is an example of a configuration plugin. Please replace -- the placeholders and assign a valid ID. +-- IDs should be lower-case. -- ------ -- The ID for this plugin: @@ -97,9 +98,7 @@ CONFIG["SETTINGS"] = {} -- Configure the preselected profile. -- It must be one of the profile IDs defined in CONFIG["PROFILES"]. --- Be aware that the ID must be using the same casing as defined in the profile. --- When the ID is using upper case letters, but using lower case letters in this --- setting, the preselection will not work. +-- Using an empty string ("") will lock the preselected profile selection, even though no valid preselected profile is found. -- CONFIG["SETTINGS"]["DataApp.PreselectedProfile"] = "00000000-0000-0000-0000-000000000000" -- Example chat templates for this configuration: diff --git a/app/MindWork AI Studio/Settings/SettingsManager.cs b/app/MindWork AI Studio/Settings/SettingsManager.cs index 7bab00cb..04bce7b3 100644 --- a/app/MindWork AI Studio/Settings/SettingsManager.cs +++ b/app/MindWork AI Studio/Settings/SettingsManager.cs @@ -263,7 +263,7 @@ public sealed class SettingsManager if (preselection != Profile.NO_PROFILE) return preselection; - preselection = this.ConfigurationData.Profiles.FirstOrDefault(x => x.Id == this.ConfigurationData.App.PreselectedProfile); + preselection = this.ConfigurationData.Profiles.FirstOrDefault(x => x.Id.Equals(this.ConfigurationData.App.PreselectedProfile, StringComparison.InvariantCultureIgnoreCase)); return preselection ?? Profile.NO_PROFILE; } @@ -273,7 +273,7 @@ public sealed class SettingsManager if (preselection != ChatTemplate.NO_CHAT_TEMPLATE) return preselection; - preselection = this.ConfigurationData.ChatTemplates.FirstOrDefault(x => x.Id == this.ConfigurationData.App.PreselectedChatTemplate); + preselection = this.ConfigurationData.ChatTemplates.FirstOrDefault(x => x.Id.Equals(this.ConfigurationData.App.PreselectedChatTemplate, StringComparison.InvariantCultureIgnoreCase)); return preselection ?? ChatTemplate.NO_CHAT_TEMPLATE; }