mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-13 11:22:27 +00:00
Allow the provider selection component to be disabled
This commit is contained in:
parent
7c1e023fb2
commit
791f20df15
@ -1,6 +1,6 @@
|
||||
@using AIStudio.Settings
|
||||
@inherits MSGComponentBase
|
||||
<MudSelect T="Provider" Value="@this.ProviderSettings" ValueChanged="@this.SelectionChanged" Validation="@this.ValidateProvider" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Apps" Margin="Margin.Dense" Label="@T("Provider")" Class="mb-3 rounded-lg" OuterClass="flex-grow-0" Variant="Variant.Outlined">
|
||||
<MudSelect T="Provider" Value="@this.ProviderSettings" ValueChanged="@this.SelectionChanged" Validation="@this.ValidateProvider" Adornment="Adornment.Start" AdornmentIcon="@Icons.Material.Filled.Apps" Margin="Margin.Dense" Label="@T("Provider")" Class="mb-3 rounded-lg" OuterClass="flex-grow-0" Variant="Variant.Outlined" Disabled="@this.Disabled">
|
||||
@foreach (var provider in this.GetAvailableProviders())
|
||||
{
|
||||
<MudSelectItem Value="@provider"/>
|
||||
|
||||
@ -20,6 +20,12 @@ public partial class ProviderSelection : MSGComponentBase
|
||||
[Parameter]
|
||||
public Func<AIStudio.Settings.Provider, string?> ValidateProvider { get; set; } = _ => null;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether provider selection is disabled.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public bool Disabled { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public ConfidenceLevel ExplicitMinimumConfidence { get; set; } = ConfidenceLevel.UNKNOWN;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user