2025-04-24 11:50:14 +00:00
|
|
|
using AIStudio.Components;
|
2024-04-19 19:25:44 +00:00
|
|
|
using AIStudio.Settings;
|
2024-07-24 13:17:45 +00:00
|
|
|
|
2024-04-19 19:25:44 +00:00
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
2024-08-21 06:30:01 +00:00
|
|
|
namespace AIStudio.Pages;
|
2024-04-19 19:25:44 +00:00
|
|
|
|
2025-04-24 11:50:14 +00:00
|
|
|
public partial class Settings : MSGComponentBase
|
2024-04-19 19:25:44 +00:00
|
|
|
{
|
2025-01-05 14:11:15 +00:00
|
|
|
private List<ConfigurationSelectData<string>> availableLLMProviders = new();
|
|
|
|
private List<ConfigurationSelectData<string>> availableEmbeddingProviders = new();
|
2024-07-28 09:20:00 +00:00
|
|
|
|
|
|
|
#region Overrides of ComponentBase
|
|
|
|
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
|
|
{
|
2025-04-24 11:50:14 +00:00
|
|
|
this.ApplyFilters([], [ Event.CONFIGURATION_CHANGED ]);
|
2024-07-28 09:20:00 +00:00
|
|
|
|
|
|
|
await base.OnInitializedAsync();
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
2025-04-24 11:50:14 +00:00
|
|
|
#region Overrides of MSGComponentBase
|
2025-01-21 14:36:22 +00:00
|
|
|
|
2025-04-24 11:50:14 +00:00
|
|
|
protected override Task ProcessIncomingMessage<T>(ComponentBase? sendingComponent, Event triggeredEvent, T? data) where T : default
|
2024-07-28 09:20:00 +00:00
|
|
|
{
|
|
|
|
switch (triggeredEvent)
|
|
|
|
{
|
|
|
|
case Event.CONFIGURATION_CHANGED:
|
|
|
|
this.StateHasChanged();
|
|
|
|
break;
|
|
|
|
}
|
2025-04-24 11:50:14 +00:00
|
|
|
|
2024-07-28 09:20:00 +00:00
|
|
|
return Task.CompletedTask;
|
|
|
|
}
|
|
|
|
|
2024-05-04 08:55:00 +00:00
|
|
|
#endregion
|
2024-04-19 19:25:44 +00:00
|
|
|
}
|