mirror of
				https://github.com/MindWorkAI/AI-Studio.git
				synced 2025-11-04 05:20:21 +00:00 
			
		
		
		
	Remove unused ComponentName overrides across the codebase.
This commit is contained in:
		
							parent
							
								
									46e1e7030e
								
							
						
					
					
						commit
						c5360ebede
					
				@ -839,8 +839,6 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable
 | 
			
		||||
    
 | 
			
		||||
    #region Overrides of MSGComponentBase
 | 
			
		||||
    
 | 
			
		||||
    public override string ComponentName => nameof(ChatComponent);
 | 
			
		||||
 | 
			
		||||
    protected override async Task ProcessIncomingMessage<T>(ComponentBase? sendingComponent, Event triggeredEvent, T? data) where T : default
 | 
			
		||||
    {
 | 
			
		||||
        switch (triggeredEvent)
 | 
			
		||||
 | 
			
		||||
@ -45,8 +45,6 @@ public partial class InnerScrolling : MSGComponentBase
 | 
			
		||||
 | 
			
		||||
    #region Overrides of MSGComponentBase
 | 
			
		||||
    
 | 
			
		||||
    public override string ComponentName => nameof(InnerScrolling);
 | 
			
		||||
 | 
			
		||||
    protected override Task ProcessIncomingMessage<T>(ComponentBase? sendingComponent, Event triggeredEvent, T? data) where T : default
 | 
			
		||||
    {
 | 
			
		||||
        switch (triggeredEvent)
 | 
			
		||||
 | 
			
		||||
@ -3,8 +3,6 @@ using AIStudio.Tools.PluginSystem;
 | 
			
		||||
 | 
			
		||||
using Microsoft.AspNetCore.Components;
 | 
			
		||||
 | 
			
		||||
using SharedTools;
 | 
			
		||||
 | 
			
		||||
namespace AIStudio.Components;
 | 
			
		||||
 | 
			
		||||
public abstract class MSGComponentBase : ComponentBase, IDisposable, IMessageBusReceiver, ILang
 | 
			
		||||
@ -41,8 +39,6 @@ public abstract class MSGComponentBase : ComponentBase, IDisposable, IMessageBus
 | 
			
		||||
 | 
			
		||||
    #region Implementation of IMessageBusReceiver
 | 
			
		||||
 | 
			
		||||
    public abstract string ComponentName { get; }
 | 
			
		||||
 | 
			
		||||
    public async Task ProcessMessage<T>(ComponentBase? sendingComponent, Event triggeredEvent, T? data)
 | 
			
		||||
    {
 | 
			
		||||
        switch (triggeredEvent)
 | 
			
		||||
 | 
			
		||||
@ -60,12 +60,6 @@ public partial class About : MSGComponentBase
 | 
			
		||||
 | 
			
		||||
    #endregion
 | 
			
		||||
    
 | 
			
		||||
    #region Overrides of MSGComponentBase
 | 
			
		||||
 | 
			
		||||
    public override string ComponentName => nameof(About);
 | 
			
		||||
 | 
			
		||||
    #endregion
 | 
			
		||||
    
 | 
			
		||||
    private const string LICENSE = """
 | 
			
		||||
        # Functional Source License, Version 1.1, MIT Future License
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,11 +2,4 @@ using AIStudio.Components;
 | 
			
		||||
 | 
			
		||||
namespace AIStudio.Pages;
 | 
			
		||||
 | 
			
		||||
public partial class Assistants : MSGComponentBase
 | 
			
		||||
{
 | 
			
		||||
    #region Overrides of MSGComponentBase
 | 
			
		||||
 | 
			
		||||
    public override string ComponentName => nameof(Assistants);
 | 
			
		||||
 | 
			
		||||
    #endregion
 | 
			
		||||
}
 | 
			
		||||
public partial class Assistants : MSGComponentBase;
 | 
			
		||||
@ -82,8 +82,6 @@ public partial class Chat : MSGComponentBase
 | 
			
		||||
 | 
			
		||||
    #region Overrides of MSGComponentBase
 | 
			
		||||
 | 
			
		||||
    public override string ComponentName => nameof(Chat);
 | 
			
		||||
 | 
			
		||||
    protected override Task ProcessIncomingMessage<T>(ComponentBase? sendingComponent, Event triggeredEvent, T? data) where T : default
 | 
			
		||||
    {
 | 
			
		||||
        switch (triggeredEvent)
 | 
			
		||||
 | 
			
		||||
@ -38,12 +38,6 @@ public partial class Home : MSGComponentBase
 | 
			
		||||
 | 
			
		||||
    #endregion
 | 
			
		||||
 | 
			
		||||
    #region Overrides of MSGComponentBase
 | 
			
		||||
 | 
			
		||||
    public override string ComponentName => nameof(Home);
 | 
			
		||||
 | 
			
		||||
    #endregion
 | 
			
		||||
 | 
			
		||||
    private async Task ReadLastChangeAsync()
 | 
			
		||||
    {
 | 
			
		||||
        var latest = Changelog.LOGS.MaxBy(n => n.Build);
 | 
			
		||||
 | 
			
		||||
@ -38,12 +38,6 @@ public partial class Plugins : MSGComponentBase
 | 
			
		||||
 | 
			
		||||
    #endregion
 | 
			
		||||
 | 
			
		||||
    #region Overrides of MSGComponentBase
 | 
			
		||||
 | 
			
		||||
    public override string ComponentName => nameof(Plugins);
 | 
			
		||||
 | 
			
		||||
    #endregion
 | 
			
		||||
 | 
			
		||||
    private async Task PluginActivationStateChanged(IPluginMetadata pluginMeta)
 | 
			
		||||
    {
 | 
			
		||||
        if (this.SettingsManager.IsPluginEnabled(pluginMeta))
 | 
			
		||||
 | 
			
		||||
@ -23,8 +23,6 @@ public partial class Settings : MSGComponentBase
 | 
			
		||||
 | 
			
		||||
    #region Overrides of MSGComponentBase
 | 
			
		||||
    
 | 
			
		||||
    public override string ComponentName => nameof(Settings);
 | 
			
		||||
 | 
			
		||||
    protected override Task ProcessIncomingMessage<T>(ComponentBase? sendingComponent, Event triggeredEvent, T? data) where T : default
 | 
			
		||||
    {
 | 
			
		||||
        switch (triggeredEvent)
 | 
			
		||||
 | 
			
		||||
@ -4,11 +4,4 @@ using Microsoft.AspNetCore.Components;
 | 
			
		||||
 | 
			
		||||
namespace AIStudio.Pages;
 | 
			
		||||
 | 
			
		||||
public partial class Supporters : MSGComponentBase
 | 
			
		||||
{
 | 
			
		||||
    #region Overrides of MSGComponentBase
 | 
			
		||||
 | 
			
		||||
    public override string ComponentName => nameof(Supporters);
 | 
			
		||||
 | 
			
		||||
    #endregion
 | 
			
		||||
}
 | 
			
		||||
public partial class Supporters : MSGComponentBase;
 | 
			
		||||
@ -38,12 +38,6 @@ public partial class Writer : MSGComponentBase
 | 
			
		||||
 | 
			
		||||
    #endregion
 | 
			
		||||
    
 | 
			
		||||
    #region Overrides of MSGComponentBase
 | 
			
		||||
 | 
			
		||||
    public override string ComponentName => nameof(Writer);
 | 
			
		||||
    
 | 
			
		||||
    #endregion
 | 
			
		||||
    
 | 
			
		||||
    private bool IsProviderSelected => this.providerSettings.UsedLLMProvider != LLMProviders.NONE;
 | 
			
		||||
    
 | 
			
		||||
    private async Task InputKeyEvent(KeyboardEventArgs keyEvent)
 | 
			
		||||
 | 
			
		||||
@ -4,8 +4,6 @@ namespace AIStudio.Tools;
 | 
			
		||||
 | 
			
		||||
public interface IMessageBusReceiver
 | 
			
		||||
{
 | 
			
		||||
    public string ComponentName { get; }
 | 
			
		||||
    
 | 
			
		||||
    public Task ProcessMessage<T>(ComponentBase? sendingComponent, Event triggeredEvent, T? data);
 | 
			
		||||
    
 | 
			
		||||
    public Task<TResult?> ProcessMessageWithResult<TPayload, TResult>(ComponentBase? sendingComponent, Event triggeredEvent, TPayload? data);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user