Added initial logic for jumping between assistant and settings. Currently, it only jumps to the settings page and nothing is expanded.

This commit is contained in:
Peer Schütt committed 2025-03-07 19:18:23 +01:00
1 parent 4c1e3afb71
commit bd4c9f7173
47 files changed
+188 -37

No files matched your search

+2 -2
View File
@@ -24,7 +24,7 @@
@if (PreviewFeatures.PRE_RAG_2024.IsEnabled(this.SettingsManager))
{
<SettingsPanelERIServer AvailableLLMProvidersFunc="() => this.availableLLMProviders"/>
<SettingsPanelERIServer AvailableLLMProvidersFunc="() => this.availableLLMProviders" />
}
<SettingsPanelTextSummarizer AvailableLLMProvidersFunc="() => this.availableLLMProviders" />
@@ -44,7 +44,7 @@
<SettingsPanelAgentRetrievalContextValidation AvailableLLMProvidersFunc="() => this.availableLLMProviders"/>
}
<SettingsPanelAgentContentCleaner AvailableLLMProvidersFunc="() => this.availableLLMProviders" />
<SettingsPanelAgentContentCleaner AvailableLLMProvidersFunc="() => this.availableLLMProviders" />
</MudExpansionPanels>
</InnerScrolling>
</div>
@@ -1,3 +1,4 @@
using AIStudio.Components.Settings;
using AIStudio.Settings;
using Microsoft.AspNetCore.Components;
@@ -15,6 +16,7 @@ public partial class Settings : ComponentBase, IMessageBusReceiver, IDisposable
private List<ConfigurationSelectData<string>> availableLLMProviders = new();
private List<ConfigurationSelectData<string>> availableEmbeddingProviders = new();
private List<ConfigurationSelectData<string>> availableDataSources = new();
private SettingsPanel chosenSettingsPanel;
#region Overrides of ComponentBase
@@ -24,6 +26,18 @@ public partial class Settings : ComponentBase, IMessageBusReceiver, IDisposable
this.MessageBus.RegisterComponent(this);
this.MessageBus.ApplyFilters(this, [], [ Event.CONFIGURATION_CHANGED ]);
this.chosenSettingsPanel = MessageBus.INSTANCE.CheckDeferredMessages<SettingsPanel>(Event.SWITCH_TO_SETTINGS_PANEL).FirstOrDefault();
// var deferredContent = MessageBus.INSTANCE.CheckDeferredMessages<SettingsPanel>(Event.SWITCH_TO_SETTINGS_PANEL).FirstOrDefault();
//if (deferredContent != default)
//{
//switch (deferredContent)
//{
// case SettingsPanel -am besten nicht alle individuell
//}
//}
//chosenSettingsPanel = deferredContent;
await base.OnInitializedAsync();
}