mirror of
				https://github.com/MindWorkAI/AI-Studio.git
				synced 2025-11-04 00:20:20 +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:
		
							parent
							
								
									4c1e3afb71
								
							
						
					
					
						commit
						bd4c9f7173
					
				@ -1,6 +1,7 @@
 | 
				
			|||||||
using System.Text;
 | 
					using System.Text;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
 | 
					using AIStudio.Components.Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Assistants.Agenda;
 | 
					namespace AIStudio.Assistants.Agenda;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -101,6 +102,8 @@ public partial class AssistantAgenda : AssistantBaseCore
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    protected override Func<Task> SubmitAction => this.CreateAgenda;
 | 
					    protected override Func<Task> SubmitAction => this.CreateAgenda;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    protected override SettingsPanel SettingsPanel => SettingsPanel.ASSISTANT_AGENDA_PANEL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
					    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        SystemPrompt = SystemPrompts.DEFAULT,
 | 
					        SystemPrompt = SystemPrompts.DEFAULT,
 | 
				
			||||||
 | 
				
			|||||||
@ -12,15 +12,13 @@
 | 
				
			|||||||
        <ChildContent>
 | 
					        <ChildContent>
 | 
				
			||||||
            <MudForm @ref="@(this.form)" @bind-IsValid="@(this.inputIsValid)" @bind-Errors="@(this.inputIssues)" FieldChanged="@this.TriggerFormChange" Class="pr-2">
 | 
					            <MudForm @ref="@(this.form)" @bind-IsValid="@(this.inputIsValid)" @bind-Errors="@(this.inputIssues)" FieldChanged="@this.TriggerFormChange" Class="pr-2">
 | 
				
			||||||
                <MudGrid Class="mb-2">
 | 
					                <MudGrid Class="mb-2">
 | 
				
			||||||
                    <MudItem xs="9">
 | 
					                    <MudItem xs="10">
 | 
				
			||||||
                        <MudText Typo="Typo.body1" Align="Align.Justify">
 | 
					                        <MudText Typo="Typo.body1" Align="Align.Justify">
 | 
				
			||||||
                            @this.Description
 | 
					                            @this.Description
 | 
				
			||||||
                        </MudText>
 | 
					                        </MudText>
 | 
				
			||||||
                    </MudItem>
 | 
					                    </MudItem>
 | 
				
			||||||
                    <MudItem xs="3" Class="d-flex justify-end align-start">
 | 
					                    <MudItem xs="2" Class="d-flex justify-end align-start">
 | 
				
			||||||
                        <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Settings">
 | 
					                        <MudIconButton Variant="Variant.Filled" Icon="@Icons.Material.Filled.Settings" OnClick="() => this.NavigateToSettings()"/>
 | 
				
			||||||
                            Settings
 | 
					 | 
				
			||||||
                        </MudButton>
 | 
					 | 
				
			||||||
                    </MudItem>
 | 
					                    </MudItem>
 | 
				
			||||||
                </MudGrid>
 | 
					                </MudGrid>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,5 @@
 | 
				
			|||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
 | 
					using AIStudio.Components.Settings;
 | 
				
			||||||
using AIStudio.Provider;
 | 
					using AIStudio.Provider;
 | 
				
			||||||
using AIStudio.Settings;
 | 
					using AIStudio.Settings;
 | 
				
			||||||
using AIStudio.Tools.Services;
 | 
					using AIStudio.Tools.Services;
 | 
				
			||||||
@ -68,6 +69,8 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
 | 
				
			|||||||
    protected abstract string SubmitText { get; }
 | 
					    protected abstract string SubmitText { get; }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    protected abstract Func<Task> SubmitAction { get; }
 | 
					    protected abstract Func<Task> SubmitAction { get; }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    protected abstract SettingsPanel SettingsPanel { get; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected virtual bool SubmitDisabled => false;
 | 
					    protected virtual bool SubmitDisabled => false;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
@ -317,6 +320,12 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
 | 
				
			|||||||
        return icon;
 | 
					        return icon;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					    protected void NavigateToSettings()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        MessageBus.INSTANCE.DeferMessage(this, Event.SWITCH_TO_SETTINGS_PANEL, this.SettingsPanel);
 | 
				
			||||||
 | 
					        this.NavigationManager.NavigateTo(Routes.SETTINGS);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    protected Task SendToAssistant(Tools.Components destination, SendToButton sendToButton)
 | 
					    protected Task SendToAssistant(Tools.Components destination, SendToButton sendToButton)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        if (!destination.AllowSendTo())
 | 
					        if (!destination.AllowSendTo())
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,7 @@
 | 
				
			|||||||
using System.Text;
 | 
					using System.Text;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
 | 
					using AIStudio.Components.Settings;
 | 
				
			||||||
using AIStudio.Settings.DataModel;
 | 
					using AIStudio.Settings.DataModel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Assistants.BiasDay;
 | 
					namespace AIStudio.Assistants.BiasDay;
 | 
				
			||||||
@ -44,6 +45,8 @@ public partial class BiasOfTheDayAssistant : AssistantBaseCore
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    protected override Func<Task> SubmitAction => this.TellBias;
 | 
					    protected override Func<Task> SubmitAction => this.TellBias;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    protected override SettingsPanel SettingsPanel => SettingsPanel.ASSISTANT_BIAS_OF_THE_DAY_PANEL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override bool ShowSendTo => false;
 | 
					    protected override bool ShowSendTo => false;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    protected override bool ShowCopyResult => false;
 | 
					    protected override bool ShowCopyResult => false;
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,5 @@
 | 
				
			|||||||
using System.Text;
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using AIStudio.Components.Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Assistants.Coding;
 | 
					namespace AIStudio.Assistants.Coding;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -31,7 +32,9 @@ public partial class AssistantCoding : AssistantBaseCore
 | 
				
			|||||||
    protected override string SubmitText => "Get Support";
 | 
					    protected override string SubmitText => "Get Support";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override Func<Task> SubmitAction => this.GetSupport;
 | 
					    protected override Func<Task> SubmitAction => this.GetSupport;
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
 | 
					    protected override SettingsPanel SettingsPanel => SettingsPanel.ASSISTANT_CODING_PANEL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override void ResetForm()
 | 
					    protected override void ResetForm()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        this.codingContexts.Clear();
 | 
					        this.codingContexts.Clear();
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,7 @@
 | 
				
			|||||||
using System.Text;
 | 
					using System.Text;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
 | 
					using AIStudio.Components.Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Assistants.EMail;
 | 
					namespace AIStudio.Assistants.EMail;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -27,7 +28,9 @@ public partial class AssistantEMail : AssistantBaseCore
 | 
				
			|||||||
    protected override string SubmitText => "Create email";
 | 
					    protected override string SubmitText => "Create email";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override Func<Task> SubmitAction => this.CreateMail;
 | 
					    protected override Func<Task> SubmitAction => this.CreateMail;
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
 | 
					    protected override SettingsPanel SettingsPanel => SettingsPanel.ASSISTANT_EMAIL_PANEL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
					    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        SystemPrompt = SystemPrompts.DEFAULT,
 | 
					        SystemPrompt = SystemPrompts.DEFAULT,
 | 
				
			||||||
 | 
				
			|||||||
@ -2,6 +2,7 @@ using System.Text;
 | 
				
			|||||||
using System.Text.RegularExpressions;
 | 
					using System.Text.RegularExpressions;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
 | 
					using AIStudio.Components.Settings;
 | 
				
			||||||
using AIStudio.Dialogs;
 | 
					using AIStudio.Dialogs;
 | 
				
			||||||
using AIStudio.Settings.DataModel;
 | 
					using AIStudio.Settings.DataModel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -306,6 +307,8 @@ public partial class AssistantERI : AssistantBaseCore
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    protected override Func<Task> SubmitAction => this.GenerateServer;
 | 
					    protected override Func<Task> SubmitAction => this.GenerateServer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    protected override SettingsPanel SettingsPanel => SettingsPanel.ASSISTANT_ERI_SERVER_PANEL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override bool SubmitDisabled => this.IsNoneERIServerSelected;
 | 
					    protected override bool SubmitDisabled => this.IsNoneERIServerSelected;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
					    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,5 @@
 | 
				
			|||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
 | 
					using AIStudio.Components.Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Assistants.GrammarSpelling;
 | 
					namespace AIStudio.Assistants.GrammarSpelling;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -42,7 +43,9 @@ public partial class AssistantGrammarSpelling : AssistantBaseCore
 | 
				
			|||||||
    protected override string SubmitText => "Proofread";
 | 
					    protected override string SubmitText => "Proofread";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override Func<Task> SubmitAction => this.ProofreadText;
 | 
					    protected override Func<Task> SubmitAction => this.ProofreadText;
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
 | 
					    protected override SettingsPanel SettingsPanel => SettingsPanel.ASSISTANT_GRAMMAR_SPELLING_PANEL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
					    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        SystemPrompt = SystemPrompts.DEFAULT,
 | 
					        SystemPrompt = SystemPrompts.DEFAULT,
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,5 @@
 | 
				
			|||||||
 | 
					using AIStudio.Components.Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Assistants.IconFinder;
 | 
					namespace AIStudio.Assistants.IconFinder;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class AssistantIconFinder : AssistantBaseCore
 | 
					public partial class AssistantIconFinder : AssistantBaseCore
 | 
				
			||||||
@ -33,6 +35,8 @@ public partial class AssistantIconFinder : AssistantBaseCore
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    protected override Func<Task> SubmitAction => this.FindIcon;
 | 
					    protected override Func<Task> SubmitAction => this.FindIcon;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					    protected override SettingsPanel SettingsPanel => SettingsPanel.ASSISTANT_ICON_FINDER_PANEL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override void ResetForm()
 | 
					    protected override void ResetForm()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        this.inputContext = string.Empty;
 | 
					        this.inputContext = string.Empty;
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,5 @@
 | 
				
			|||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
 | 
					using AIStudio.Components.Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Assistants.JobPosting;
 | 
					namespace AIStudio.Assistants.JobPosting;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -50,6 +51,8 @@ public partial class AssistantJobPostings : AssistantBaseCore
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    protected override Func<Task> SubmitAction => this.CreateJobPosting;
 | 
					    protected override Func<Task> SubmitAction => this.CreateJobPosting;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    protected override SettingsPanel SettingsPanel => SettingsPanel.ASSISTANT_JOB_POSTING_PANEL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override bool SubmitDisabled => false;
 | 
					    protected override bool SubmitDisabled => false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override bool AllowProfiles => false;
 | 
					    protected override bool AllowProfiles => false;
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,5 @@
 | 
				
			|||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
 | 
					using AIStudio.Components.Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Assistants.LegalCheck;
 | 
					namespace AIStudio.Assistants.LegalCheck;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -29,7 +30,9 @@ public partial class AssistantLegalCheck : AssistantBaseCore
 | 
				
			|||||||
    protected override string SubmitText => "Ask your questions";
 | 
					    protected override string SubmitText => "Ask your questions";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override Func<Task> SubmitAction => this.AksQuestions;
 | 
					    protected override Func<Task> SubmitAction => this.AksQuestions;
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
 | 
					    protected override SettingsPanel SettingsPanel => SettingsPanel.ASSISTANT_LEGAL_CHECK_PANEL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override bool SubmitDisabled => this.isAgentRunning;
 | 
					    protected override bool SubmitDisabled => this.isAgentRunning;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
					    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,5 @@
 | 
				
			|||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
 | 
					using AIStudio.Components.Settings;
 | 
				
			||||||
using AIStudio.Settings;
 | 
					using AIStudio.Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Assistants.MyTasks;
 | 
					namespace AIStudio.Assistants.MyTasks;
 | 
				
			||||||
@ -34,6 +35,8 @@ public partial class AssistantMyTasks : AssistantBaseCore
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    protected override Func<Task> SubmitAction => this.AnalyzeText;
 | 
					    protected override Func<Task> SubmitAction => this.AnalyzeText;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    protected override SettingsPanel SettingsPanel => SettingsPanel.ASSISTANT_MY_TASKS_PANEL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override bool ShowProfileSelection => false;
 | 
					    protected override bool ShowProfileSelection => false;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
					    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,5 @@
 | 
				
			|||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
 | 
					using AIStudio.Components.Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Assistants.RewriteImprove;
 | 
					namespace AIStudio.Assistants.RewriteImprove;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -43,7 +44,9 @@ public partial class AssistantRewriteImprove : AssistantBaseCore
 | 
				
			|||||||
    protected override string SubmitText => "Improve";
 | 
					    protected override string SubmitText => "Improve";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override Func<Task> SubmitAction => this.RewriteText;
 | 
					    protected override Func<Task> SubmitAction => this.RewriteText;
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
 | 
					    protected override SettingsPanel SettingsPanel => SettingsPanel.ASSISTANT_REWRITE_PANEL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
					    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        SystemPrompt = SystemPrompts.DEFAULT,
 | 
					        SystemPrompt = SystemPrompts.DEFAULT,
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,5 @@
 | 
				
			|||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
 | 
					using AIStudio.Components.Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Assistants.Synonym;
 | 
					namespace AIStudio.Assistants.Synonym;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -54,7 +55,9 @@ public partial class AssistantSynonyms : AssistantBaseCore
 | 
				
			|||||||
    protected override string SubmitText => "Find synonyms";
 | 
					    protected override string SubmitText => "Find synonyms";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override Func<Task> SubmitAction => this.FindSynonyms;
 | 
					    protected override Func<Task> SubmitAction => this.FindSynonyms;
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
 | 
					    protected override SettingsPanel SettingsPanel => SettingsPanel.ASSISTANT_SYNONYMS_PANEL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
					    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        SystemPrompt = SystemPrompts.DEFAULT,
 | 
					        SystemPrompt = SystemPrompts.DEFAULT,
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,5 @@
 | 
				
			|||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
 | 
					using AIStudio.Components.Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Assistants.TextSummarizer;
 | 
					namespace AIStudio.Assistants.TextSummarizer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -32,7 +33,9 @@ public partial class AssistantTextSummarizer : AssistantBaseCore
 | 
				
			|||||||
    protected override string SubmitText => "Summarize";
 | 
					    protected override string SubmitText => "Summarize";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override Func<Task> SubmitAction => this.SummarizeText;
 | 
					    protected override Func<Task> SubmitAction => this.SummarizeText;
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
 | 
					    protected override SettingsPanel SettingsPanel => SettingsPanel.ASSISTANT_TEXT_SUMMARIZER_PANEL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override bool SubmitDisabled => this.isAgentRunning;
 | 
					    protected override bool SubmitDisabled => this.isAgentRunning;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
					    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,5 @@
 | 
				
			|||||||
using AIStudio.Chat;
 | 
					using AIStudio.Chat;
 | 
				
			||||||
 | 
					using AIStudio.Components.Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace AIStudio.Assistants.Translation;
 | 
					namespace AIStudio.Assistants.Translation;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -28,7 +29,9 @@ public partial class AssistantTranslation : AssistantBaseCore
 | 
				
			|||||||
    protected override string SubmitText => "Translate";
 | 
					    protected override string SubmitText => "Translate";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override Func<Task> SubmitAction => () => this.TranslateText(true);
 | 
					    protected override Func<Task> SubmitAction => () => this.TranslateText(true);
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
 | 
					    protected override SettingsPanel SettingsPanel => SettingsPanel.ASSISTANT_TRANSLATION_PANEL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected override bool SubmitDisabled => this.isAgentRunning;
 | 
					    protected override bool SubmitDisabled => this.isAgentRunning;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
					    protected override ChatThread ConvertToChatThread => (this.chatThread ?? new()) with
 | 
				
			||||||
 | 
				
			|||||||
@ -17,8 +17,15 @@
 | 
				
			|||||||
        </MudStack>
 | 
					        </MudStack>
 | 
				
			||||||
    </MudCardContent>
 | 
					    </MudCardContent>
 | 
				
			||||||
    <MudCardActions>
 | 
					    <MudCardActions>
 | 
				
			||||||
        <MudButton Size="Size.Large" Variant="Variant.Filled" StartIcon="@this.Icon" Color="Color.Default" Href="@this.Link">
 | 
					        <MudGrid Class="mb-1">
 | 
				
			||||||
            @this.ButtonText
 | 
					            <MudItem xs="9">
 | 
				
			||||||
        </MudButton>
 | 
					                <MudButton Size="Size.Large" Variant="Variant.Filled" StartIcon="@this.Icon" Color="Color.Default" Href="@this.Link">
 | 
				
			||||||
 | 
					                    @this.ButtonText
 | 
				
			||||||
 | 
					                </MudButton>
 | 
				
			||||||
 | 
					            </MudItem>
 | 
				
			||||||
 | 
					            <MudItem xs="3">
 | 
				
			||||||
 | 
					                <MudIconButton Size="Size.Large" Variant="Variant.Filled" Icon="@Icons.Material.Filled.Settings" Color="Color.Default" Href="@this.Link"/>
 | 
				
			||||||
 | 
					            </MudItem>
 | 
				
			||||||
 | 
					        </MudGrid>
 | 
				
			||||||
    </MudCardActions>
 | 
					    </MudCardActions>
 | 
				
			||||||
</MudCard>
 | 
					</MudCard>
 | 
				
			||||||
@ -1,3 +1,6 @@
 | 
				
			|||||||
namespace AIStudio.Components.Settings;
 | 
					namespace AIStudio.Components.Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class SettingsPanelAgenda : SettingsPanelBase;
 | 
					public partial class SettingsPanelAgenda : SettingsPanelBase
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    protected override SettingsPanel Type { get; }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -1,3 +1,6 @@
 | 
				
			|||||||
namespace AIStudio.Components.Settings;
 | 
					namespace AIStudio.Components.Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class SettingsPanelAgentContentCleaner : SettingsPanelBase;
 | 
					public partial class SettingsPanelAgentContentCleaner : SettingsPanelBase
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    protected override SettingsPanel Type => SettingsPanel.AGENT_CONTENT_CLEANER_PANEL;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -1,3 +1,6 @@
 | 
				
			|||||||
namespace AIStudio.Components.Settings;
 | 
					namespace AIStudio.Components.Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class SettingsPanelAgentDataSourceSelection : SettingsPanelBase;
 | 
					public partial class SettingsPanelAgentDataSourceSelection : SettingsPanelBase
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    protected override SettingsPanel Type => SettingsPanel.AGENT_DATA_SOURCE_SELECTION_PANEL;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -1,3 +1,6 @@
 | 
				
			|||||||
namespace AIStudio.Components.Settings;
 | 
					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.PreviewVisibility = previewVisibility;
 | 
				
			||||||
        this.SettingsManager.ConfigurationData.App.EnabledPreviewFeatures = previewVisibility.FilterPreviewFeatures(this.SettingsManager.ConfigurationData.App.EnabledPreviewFeatures);
 | 
					        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);
 | 
					        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.Settings;
 | 
				
			||||||
using AIStudio.Tools.Services;
 | 
					using AIStudio.Tools.Services;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -10,6 +11,11 @@ public abstract class SettingsPanelBase : ComponentBase
 | 
				
			|||||||
    [Parameter]
 | 
					    [Parameter]
 | 
				
			||||||
    public Func<IReadOnlyList<ConfigurationSelectData<string>>> AvailableLLMProvidersFunc { get; set; } = () => [];
 | 
					    public Func<IReadOnlyList<ConfigurationSelectData<string>>> AvailableLLMProvidersFunc { get; set; } = () => [];
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					    [Parameter]
 | 
				
			||||||
 | 
					    public SettingsPanel ChosenPanel { get; set; }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    protected abstract SettingsPanel Type { get; }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    [Inject]
 | 
					    [Inject]
 | 
				
			||||||
    protected SettingsManager SettingsManager { get; init; } = null!;
 | 
					    protected SettingsManager SettingsManager { get; init; } = null!;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
@ -21,4 +27,6 @@ public abstract class SettingsPanelBase : ComponentBase
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    [Inject]
 | 
					    [Inject]
 | 
				
			||||||
    protected RustService RustService { get; init; } = null!;
 | 
					    protected RustService RustService { get; init; } = null!;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    protected bool IsExtended() => this.Type == this.ChosenPanel;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -1,3 +1,6 @@
 | 
				
			|||||||
namespace AIStudio.Components.Settings;
 | 
					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;
 | 
					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);
 | 
					        await this.AvailableDataSourcesChanged.InvokeAsync(this.AvailableDataSources);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    protected override SettingsPanel Type => SettingsPanel.DATA_SOURCES_PANEL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
@using AIStudio.Settings
 | 
					@using AIStudio.Settings
 | 
				
			||||||
@inherits SettingsPanelBase
 | 
					@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">
 | 
					    <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."/>
 | 
					        <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)"/>
 | 
					        <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;
 | 
					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);
 | 
					        await this.AvailableEmbeddingProvidersChanged.InvokeAsync(this.AvailableEmbeddingProviders);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    protected override SettingsPanel Type => SettingsPanel.EMBEDDINGS_PANEL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -1,3 +1,6 @@
 | 
				
			|||||||
namespace AIStudio.Components.Settings;
 | 
					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;
 | 
					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;
 | 
					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;
 | 
					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;
 | 
					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);
 | 
					        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;
 | 
					        this.SettingsManager.ConfigurationData.LLMProviders.CustomConfidenceScheme[llmProvider] = level;
 | 
				
			||||||
        await this.SettingsManager.StoreSettings();
 | 
					        await this.SettingsManager.StoreSettings();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    protected override SettingsPanel Type => SettingsPanel.PROVIDER_PANEL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -1,3 +1,6 @@
 | 
				
			|||||||
namespace AIStudio.Components.Settings;
 | 
					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;
 | 
					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;
 | 
					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;
 | 
					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;
 | 
					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;
 | 
					namespace AIStudio.Components.Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public partial class SettingsPanelWritingEMails : SettingsPanelBase;
 | 
					public partial class SettingsPanelWritingEMails : SettingsPanelBase
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    protected override SettingsPanel Type => SettingsPanel.ASSISTANT_EMAIL_PANEL;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -24,7 +24,7 @@
 | 
				
			|||||||
            
 | 
					            
 | 
				
			||||||
            @if (PreviewFeatures.PRE_RAG_2024.IsEnabled(this.SettingsManager))
 | 
					            @if (PreviewFeatures.PRE_RAG_2024.IsEnabled(this.SettingsManager))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                <SettingsPanelERIServer AvailableLLMProvidersFunc="() => this.availableLLMProviders"/>
 | 
					                <SettingsPanelERIServer AvailableLLMProvidersFunc="() => this.availableLLMProviders" />
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            <SettingsPanelTextSummarizer AvailableLLMProvidersFunc="() => this.availableLLMProviders" />
 | 
					            <SettingsPanelTextSummarizer AvailableLLMProvidersFunc="() => this.availableLLMProviders" />
 | 
				
			||||||
@ -44,7 +44,7 @@
 | 
				
			|||||||
                <SettingsPanelAgentRetrievalContextValidation AvailableLLMProvidersFunc="() => this.availableLLMProviders"/>
 | 
					                <SettingsPanelAgentRetrievalContextValidation AvailableLLMProvidersFunc="() => this.availableLLMProviders"/>
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            <SettingsPanelAgentContentCleaner AvailableLLMProvidersFunc="() => this.availableLLMProviders" />
 | 
					            <SettingsPanelAgentContentCleaner AvailableLLMProvidersFunc="() => this.availableLLMProviders" /> 
 | 
				
			||||||
        </MudExpansionPanels>
 | 
					        </MudExpansionPanels>
 | 
				
			||||||
    </InnerScrolling>
 | 
					    </InnerScrolling>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
@ -1,3 +1,4 @@
 | 
				
			|||||||
 | 
					using AIStudio.Components.Settings;
 | 
				
			||||||
using AIStudio.Settings;
 | 
					using AIStudio.Settings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using Microsoft.AspNetCore.Components;
 | 
					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>> availableLLMProviders = new();
 | 
				
			||||||
    private List<ConfigurationSelectData<string>> availableEmbeddingProviders = new();
 | 
					    private List<ConfigurationSelectData<string>> availableEmbeddingProviders = new();
 | 
				
			||||||
    private List<ConfigurationSelectData<string>> availableDataSources = new();
 | 
					    private List<ConfigurationSelectData<string>> availableDataSources = new();
 | 
				
			||||||
 | 
					    private SettingsPanel chosenSettingsPanel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #region Overrides of ComponentBase
 | 
					    #region Overrides of ComponentBase
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -24,6 +26,18 @@ public partial class Settings : ComponentBase, IMessageBusReceiver, IDisposable
 | 
				
			|||||||
        this.MessageBus.RegisterComponent(this);
 | 
					        this.MessageBus.RegisterComponent(this);
 | 
				
			||||||
        this.MessageBus.ApplyFilters(this, [], [ Event.CONFIGURATION_CHANGED ]);
 | 
					        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();
 | 
					        await base.OnInitializedAsync();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -26,4 +26,7 @@ public sealed partial class Routes
 | 
				
			|||||||
    public const string ASSISTANT_BIAS = "/assistant/bias-of-the-day";
 | 
					    public const string ASSISTANT_BIAS = "/assistant/bias-of-the-day";
 | 
				
			||||||
    public const string ASSISTANT_ERI = "/assistant/eri";
 | 
					    public const string ASSISTANT_ERI = "/assistant/eri";
 | 
				
			||||||
    // ReSharper restore InconsistentNaming
 | 
					    // ReSharper restore InconsistentNaming
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    public const string SETTINGS_ICON_FINDER = "/settings/icons";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -40,4 +40,7 @@ public enum Event
 | 
				
			|||||||
    SEND_TO_SYNONYMS_ASSISTANT,
 | 
					    SEND_TO_SYNONYMS_ASSISTANT,
 | 
				
			||||||
    SEND_TO_MY_TASKS_ASSISTANT,
 | 
					    SEND_TO_MY_TASKS_ASSISTANT,
 | 
				
			||||||
    SEND_TO_JOB_POSTING_ASSISTANT,
 | 
					    SEND_TO_JOB_POSTING_ASSISTANT,
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    // Setting events:
 | 
				
			||||||
 | 
					    SWITCH_TO_SETTINGS_PANEL,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user