Added the Model Comparison assistant for blind comparisons of two models (#1009)

Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
Dominic NeuburgandThorsten Sommer authored and GitHub committed 2026-11-14 14:11:34 +01:00
1 parent 12f26445ba
commit b7255694cd
221 files changed
+19989 -90

No files matched your search

@@ -33,8 +33,27 @@ public partial class ConfigurationProviderSelection : MSGComponentBase
[Parameter]
public Func<bool> IsLocked { get; set; } = () => false;
/// <summary>
/// The label of the option, or null for "Preselected provider".
/// </summary>
[Parameter]
public string? OptionDescription { get; set; }
/// <summary>
/// The text of an entry which preselects no provider at all, or null to offer no such entry.
/// </summary>
/// <remarks>
/// The entry stands before "Use app default" and selects the ID of Provider.NONE, because an empty text already
/// means the provider of the whole app.
/// </remarks>
[Parameter]
public string? NoPreselectionText { get; set; }
private IEnumerable<ConfigurationSelectData<string>> FilteredData()
{
if (this.NoPreselectionText is not null)
yield return new(this.NoPreselectionText, AIStudio.Settings.Provider.NONE.Id);
if(this.Component is not Tools.Components.NONE and not Tools.Components.APP_SETTINGS)
yield return new(T("Use app default"), string.Empty);
@@ -70,6 +89,10 @@ public partial class ConfigurationProviderSelection : MSGComponentBase
if(string.IsNullOrWhiteSpace(this.SelectedValue()))
break;
// Preselecting no provider stays valid, whichever providers exist:
if (this.NoPreselectionText is not null && this.SelectedValue() == AIStudio.Settings.Provider.NONE.Id)
break;
// Check if the selected value is still valid:
if (this.Data.All(x => x.Value != this.SelectedValue()))