mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 05:27:21 +00:00
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:
1 parent
4c1e3afb71
commit
bd4c9f7173
47 files changed
+188
-37
No files matched your search
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelAgenda : SettingsPanelBase;
|
||||
public partial class SettingsPanelAgenda : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type { get; }
|
||||
}
|
||||
+4
-1
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelAgentContentCleaner : SettingsPanelBase;
|
||||
public partial class SettingsPanelAgentContentCleaner : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type => SettingsPanel.AGENT_CONTENT_CLEANER_PANEL;
|
||||
}
|
||||
+4
-1
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelAgentDataSourceSelection : SettingsPanelBase;
|
||||
public partial class SettingsPanelAgentDataSourceSelection : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type => SettingsPanel.AGENT_DATA_SOURCE_SELECTION_PANEL;
|
||||
}
|
||||
+4
-1
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelAgentRetrievalContextValidation : SettingsPanelBase;
|
||||
public partial class SettingsPanelAgentRetrievalContextValidation : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type => SettingsPanel.AGENT_RETRIEVAL_CONTEXT_VALIDATION_PANEL;
|
||||
}
|
||||
@@ -9,4 +9,6 @@ public partial class SettingsPanelApp : SettingsPanelBase
|
||||
this.SettingsManager.ConfigurationData.App.PreviewVisibility = previewVisibility;
|
||||
this.SettingsManager.ConfigurationData.App.EnabledPreviewFeatures = previewVisibility.FilterPreviewFeatures(this.SettingsManager.ConfigurationData.App.EnabledPreviewFeatures);
|
||||
}
|
||||
|
||||
protected override SettingsPanel Type => SettingsPanel.APP_PANEL;
|
||||
}
|
||||
@@ -24,4 +24,6 @@ public partial class SettingsPanelAssistantBias : SettingsPanelBase
|
||||
|
||||
await this.MessageBus.SendMessage<bool>(this, Event.CONFIGURATION_CHANGED);
|
||||
}
|
||||
|
||||
protected override SettingsPanel Type => SettingsPanel.ASSISTANT_BIAS_OF_THE_DAY_PANEL;
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using AIStudio.Settings;
|
||||
using AIStudio.Tools.Services;
|
||||
|
||||
@@ -10,6 +11,11 @@ public abstract class SettingsPanelBase : ComponentBase
|
||||
[Parameter]
|
||||
public Func<IReadOnlyList<ConfigurationSelectData<string>>> AvailableLLMProvidersFunc { get; set; } = () => [];
|
||||
|
||||
[Parameter]
|
||||
public SettingsPanel ChosenPanel { get; set; }
|
||||
|
||||
protected abstract SettingsPanel Type { get; }
|
||||
|
||||
[Inject]
|
||||
protected SettingsManager SettingsManager { get; init; } = null!;
|
||||
|
||||
@@ -21,4 +27,6 @@ public abstract class SettingsPanelBase : ComponentBase
|
||||
|
||||
[Inject]
|
||||
protected RustService RustService { get; init; } = null!;
|
||||
|
||||
protected bool IsExtended() => this.Type == this.ChosenPanel;
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelChat : SettingsPanelBase;
|
||||
public partial class SettingsPanelChat : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type => SettingsPanel.CHAT_PANEL;
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelCoding : SettingsPanelBase;
|
||||
public partial class SettingsPanelCoding : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type => SettingsPanel.ASSISTANT_CODING_PANEL;
|
||||
}
|
||||
@@ -256,4 +256,6 @@ public partial class SettingsPanelDataSources : SettingsPanelBase
|
||||
|
||||
await this.AvailableDataSourcesChanged.InvokeAsync(this.AvailableDataSources);
|
||||
}
|
||||
|
||||
protected override SettingsPanel Type => SettingsPanel.DATA_SOURCES_PANEL;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
@using AIStudio.Settings
|
||||
@inherits SettingsPanelBase
|
||||
|
||||
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.PrivateConnectivity" HeaderText="Assistant: ERI Server Options">
|
||||
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.PrivateConnectivity" HeaderText="Assistant: ERI Server Options" IsExpanded="@this.IsExtended()">
|
||||
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
|
||||
<ConfigurationOption OptionDescription="Preselect ERI server options?" LabelOn="ERI server options are preselected" LabelOff="No ERI server options are preselected" State="@(() => this.SettingsManager.ConfigurationData.ERI.PreselectOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.ERI.PreselectOptions = updatedState)" OptionHelp="When enabled, you can preselect some ERI server options."/>
|
||||
<ConfigurationMinConfidenceSelection Disabled="@(() => !this.SettingsManager.ConfigurationData.ERI.PreselectOptions)" RestrictToGlobalMinimumConfidence="@true" SelectedValue="@(() => this.SettingsManager.ConfigurationData.ERI.MinimumProviderConfidence)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.ERI.MinimumProviderConfidence = selectedValue)"/>
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelERIServer : SettingsPanelBase;
|
||||
public partial class SettingsPanelERIServer : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type => SettingsPanel.ASSISTANT_ERI_SERVER_PANEL;
|
||||
}
|
||||
@@ -119,4 +119,6 @@ public partial class SettingsPanelEmbeddings : SettingsPanelBase
|
||||
|
||||
await this.AvailableEmbeddingProvidersChanged.InvokeAsync(this.AvailableEmbeddingProviders);
|
||||
}
|
||||
|
||||
protected override SettingsPanel Type => SettingsPanel.EMBEDDINGS_PANEL;
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelGrammarSpelling : SettingsPanelBase;
|
||||
public partial class SettingsPanelGrammarSpelling : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type => SettingsPanel.ASSISTANT_GRAMMAR_SPELLING_PANEL;
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelIconFinder : SettingsPanelBase;
|
||||
public partial class SettingsPanelIconFinder : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type => SettingsPanel.ASSISTANT_ICON_FINDER_PANEL;
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelJobPostings : SettingsPanelBase;
|
||||
public partial class SettingsPanelJobPostings : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type => SettingsPanel.ASSISTANT_JOB_POSTING_PANEL;
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelLegalCheck : SettingsPanelBase;
|
||||
public partial class SettingsPanelLegalCheck : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type => SettingsPanel.ASSISTANT_LEGAL_CHECK_PANEL;
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelMyTasks : SettingsPanelBase;
|
||||
public partial class SettingsPanelMyTasks : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type => SettingsPanel.ASSISTANT_MY_TASKS_PANEL;
|
||||
}
|
||||
@@ -69,4 +69,6 @@ public partial class SettingsPanelProfiles : SettingsPanelBase
|
||||
|
||||
await this.MessageBus.SendMessage<bool>(this, Event.CONFIGURATION_CHANGED);
|
||||
}
|
||||
|
||||
protected override SettingsPanel Type => SettingsPanel.PROFILES_PANEL;
|
||||
}
|
||||
@@ -148,4 +148,6 @@ public partial class SettingsPanelProviders : SettingsPanelBase
|
||||
this.SettingsManager.ConfigurationData.LLMProviders.CustomConfidenceScheme[llmProvider] = level;
|
||||
await this.SettingsManager.StoreSettings();
|
||||
}
|
||||
|
||||
protected override SettingsPanel Type => SettingsPanel.PROVIDER_PANEL;
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelRewrite : SettingsPanelBase;
|
||||
public partial class SettingsPanelRewrite : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type => SettingsPanel.ASSISTANT_REWRITE_PANEL;
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelSynonyms : SettingsPanelBase;
|
||||
public partial class SettingsPanelSynonyms : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type => SettingsPanel.ASSISTANT_SYNONYMS_PANEL;
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelTextSummarizer : SettingsPanelBase;
|
||||
public partial class SettingsPanelTextSummarizer : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type => SettingsPanel.ASSISTANT_TEXT_SUMMARIZER_PANEL;
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelTranslation : SettingsPanelBase;
|
||||
public partial class SettingsPanelTranslation : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type => SettingsPanel.ASSISTANT_TRANSLATION_PANEL;
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelWorkspaces : SettingsPanelBase;
|
||||
public partial class SettingsPanelWorkspaces : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type => SettingsPanel.WORKSPACE_PANEL;
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
namespace AIStudio.Components.Settings;
|
||||
|
||||
public partial class SettingsPanelWritingEMails : SettingsPanelBase;
|
||||
public partial class SettingsPanelWritingEMails : SettingsPanelBase
|
||||
{
|
||||
protected override SettingsPanel Type => SettingsPanel.ASSISTANT_EMAIL_PANEL;
|
||||
}
|
||||
Reference in new issue
Block a user