mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 15:38:00 +00:00
Show only On and Off for Brave Mode
This commit is contained in:
1 parent
672abb4082
commit
465497592b
6 files changed
+29
-5
No files matched your search
@@ -58,7 +58,7 @@
|
||||
if (fieldOptions.Count > 0)
|
||||
{
|
||||
<MudSelect T="string" Label="@this.GetFieldLabel(fieldName, field)" Value="@this.GetValue(fieldName)" ValueChanged="@(value => this.UpdateValue(fieldName, value))" Variant="Variant.Outlined" Margin="Margin.Dense" HelperText="@this.GetFieldDescription(fieldName, field)" Placeholder="@this.GetFieldPlaceholder(fieldName, field)" Class="mb-3" Disabled="@this.IsFieldDisabled(fieldName)">
|
||||
@if (!this.toolDefinition.SettingsSchema.Required.Contains(fieldName))
|
||||
@if (!this.toolDefinition.SettingsSchema.Required.Contains(fieldName) && string.IsNullOrEmpty(field.DefaultValue))
|
||||
{
|
||||
<MudSelectItem T="string" Value="@string.Empty">@T("Not set")</MudSelectItem>
|
||||
}
|
||||
|
||||
@@ -29,6 +29,11 @@ public partial class ToolSettingsDialog : SettingsDialogBase
|
||||
{
|
||||
this.implementation = this.ToolRegistry.GetImplementation(this.toolDefinition.ImplementationKey);
|
||||
this.values = await this.ToolSettingsService.GetSettingsAsync(this.toolDefinition);
|
||||
foreach (var (fieldName, field) in this.toolDefinition.SettingsSchema.Properties)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(field.DefaultValue) && string.IsNullOrEmpty(this.GetValue(fieldName)))
|
||||
this.values[fieldName] = field.DefaultValue;
|
||||
}
|
||||
this.fieldGroups = BuildFieldGroups(this.toolDefinition);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user