Introduced a base class for settings panels

This commit is contained in:
Thorsten Sommer 2025-01-05 13:17:28 +01:00
parent 1b3d8d3c08
commit c77753f1f5
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
3 changed files with 23 additions and 12 deletions

View File

@ -1,3 +1,5 @@
@inherits SettingsPanelBase
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.TextFields" HeaderText="Agent: Text Content Cleaner Options">
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
<MudText Typo="Typo.body1" Class="mb-3">

View File

@ -1,14 +1,3 @@
using AIStudio.Settings;
using Microsoft.AspNetCore.Components;
namespace AIStudio.Components.Settings;
public partial class SettingsPanelAgentContentCleaner : ComponentBase
{
[Parameter]
public Func<IReadOnlyList<ConfigurationSelectData<string>>> AvailableLLMProvidersFunc { get; set; } = () => [];
[Inject]
private SettingsManager SettingsManager { get; init; } = null!;
}
public partial class SettingsPanelAgentContentCleaner : SettingsPanelBase;

View File

@ -0,0 +1,20 @@
using AIStudio.Settings;
using Microsoft.AspNetCore.Components;
namespace AIStudio.Components.Settings;
public abstract class SettingsPanelBase : ComponentBase
{
[Parameter]
public Func<IReadOnlyList<ConfigurationSelectData<string>>> AvailableLLMProvidersFunc { get; set; } = () => [];
[Inject]
protected SettingsManager SettingsManager { get; init; } = null!;
[Inject]
protected IDialogService DialogService { get; init; } = null!;
[Inject]
protected MessageBus MessageBus { get; init; } = null!;
}