mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 20:39:48 +00:00
33 lines
940 B
C#
33 lines
940 B
C#
|
using System.Runtime.CompilerServices;
|
||
|
using AIStudio.Settings;
|
||
|
using AIStudio.Tools.Services;
|
||
|
|
||
|
using Microsoft.AspNetCore.Components;
|
||
|
|
||
|
namespace AIStudio.Dialogs.Settings;
|
||
|
|
||
|
public abstract class SettingsDialogBase : ComponentBase
|
||
|
{
|
||
|
[CascadingParameter]
|
||
|
protected MudDialogInstance MudDialog { get; set; } = null!;
|
||
|
|
||
|
[CascadingParameter]
|
||
|
public Pages.Settings Settings { get; set; } = null!;
|
||
|
|
||
|
[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!;
|
||
|
|
||
|
[Inject]
|
||
|
protected RustService RustService { get; init; } = null!;
|
||
|
|
||
|
protected void Close() => this.MudDialog.Cancel();
|
||
|
}
|