using System.Linq.Expressions; using AIStudio.Provider; namespace AIStudio.Settings.DataModel; public sealed class DataAgentDataSourceSelection(Expression>? configSelection = null) { /// /// The default constructor for the JSON deserializer. /// public DataAgentDataSourceSelection() : this(null) { } /// /// Preselect any data source selection options? /// public bool PreselectAgentOptions { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectAgentOptions, false); /// /// Preselect a data source selection provider? /// public string PreselectedAgentProvider { get; set; } = ManagedConfiguration.Register(configSelection, n => n.PreselectedAgentProvider, string.Empty); /// /// The minimum confidence level of the provider which selects the data sources. /// /// /// It applies only while PreselectAgentOptions is on, and then to every provider which selects them, the fallbacks included. /// public ConfidenceLevel MinimumProviderConfidence { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumProviderConfidence, ConfidenceLevel.NONE); }