diff --git a/app/MindWork AI Studio/Settings/ManagedConfiguration.Parsing.cs b/app/MindWork AI Studio/Settings/ManagedConfiguration.Parsing.cs index d96fee51..e5088e38 100644 --- a/app/MindWork AI Studio/Settings/ManagedConfiguration.Parsing.cs +++ b/app/MindWork AI Studio/Settings/ManagedConfiguration.Parsing.cs @@ -155,31 +155,10 @@ public static partial class ManagedConfiguration LuaTable settings, bool dryRun) { - // - // Handle configured string values - // - - // Check if that configuration was registered: - if(!TryGet(configSelection, propertyExpression, out var configMeta)) - return false; - - var successful = false; - var configuredValue = configMeta.Default; - - // Step 1 -- try to read the Lua value out of the Lua table: - if(settings.TryGetValue(SettingsManager.ToSettingName(propertyExpression), out var configuredTextValue)) - { - // Step 2 -- try to read the Lua value as a string: - if(configuredTextValue.TryRead(out var configuredText)) - { - configuredValue = configuredText; - successful = true; - } - } - - return HandleParsedValue(configPluginId, dryRun, successful, configMeta, configuredValue); + return TryProcessConfiguration(configSelection, propertyExpression, string.Empty, configPluginId, settings, + dryRun); } - + /// /// Attempts to process the configuration settings from a Lua table for string values. /// @@ -188,12 +167,14 @@ public static partial class ManagedConfiguration /// Furthermore, it locks the managed state of the configuration metadata to the provided configuration plugin ID. /// The setting's value is set to the configured value. /// + /// Parameter type of the configuration entry. /// The ID of the related configuration plugin. /// The Lua table containing the settings to process. /// The expression to select the configuration class. /// The expression to select the property within the configuration class. /// When true, the method will not apply any changes, but only check if the configuration can be read. /// The type of the configuration class. + /// The data type of the configuration. /// True when the configuration was successfully processed, otherwise false. public static bool TryProcessConfiguration( Expression> configSelection,