mirror of
				https://github.com/MindWorkAI/AI-Studio.git
				synced 2025-11-04 12:20:21 +00:00 
			
		
		
		
	Added more options for showing / hiding footer actions
This commit is contained in:
		
							parent
							
								
									c910d1d78b
								
							
						
					
					
						commit
						0e2fe757a8
					
				@ -48,17 +48,20 @@
 | 
				
			|||||||
            
 | 
					            
 | 
				
			||||||
            @if (!this.FooterButtons.Any(x => x.Type is ButtonTypes.SEND_TO))
 | 
					            @if (!this.FooterButtons.Any(x => x.Type is ButtonTypes.SEND_TO))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                <MudMenu StartIcon="@Icons.Material.Filled.Apps" EndIcon="@Icons.Material.Filled.KeyboardArrowDown" Label="Send to ..." Variant="Variant.Filled" Style="@this.GetSendToColor()" Class="rounded">
 | 
					                @if (this.ShowSendTo)
 | 
				
			||||||
                    @foreach (var assistant in Enum.GetValues<Components>().OrderBy(n => n.Name().Length))
 | 
					                {
 | 
				
			||||||
                    {
 | 
					                    <MudMenu StartIcon="@Icons.Material.Filled.Apps" EndIcon="@Icons.Material.Filled.KeyboardArrowDown" Label="Send to ..." Variant="Variant.Filled" Style="@this.GetSendToColor()" Class="rounded">
 | 
				
			||||||
                        if (assistant is Components.NONE || this.Component == assistant)
 | 
					                        @foreach (var assistant in Enum.GetValues<Components>().OrderBy(n => n.Name().Length))
 | 
				
			||||||
                            continue;
 | 
					                        {
 | 
				
			||||||
 | 
					                            if (assistant is Components.NONE || this.Component == assistant)
 | 
				
			||||||
 | 
					                                continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        <MudMenuItem OnClick="() => this.SendToAssistant(assistant, new())">
 | 
					                            <MudMenuItem OnClick="() => this.SendToAssistant(assistant, new())">
 | 
				
			||||||
                            @assistant.Name()
 | 
					                                @assistant.Name()
 | 
				
			||||||
                        </MudMenuItem>
 | 
					                            </MudMenuItem>
 | 
				
			||||||
                    }
 | 
					                        }
 | 
				
			||||||
                </MudMenu>
 | 
					                    </MudMenu>
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            @foreach (var button in this.FooterButtons)
 | 
					            @foreach (var button in this.FooterButtons)
 | 
				
			||||||
@ -95,13 +98,19 @@
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            
 | 
					            
 | 
				
			||||||
            <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.ContentCopy" OnClick="() => this.CopyToClipboard()">
 | 
					            @if (this.ShowCopyResult)
 | 
				
			||||||
                Copy result
 | 
					            {
 | 
				
			||||||
            </MudButton>
 | 
					                <MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.ContentCopy" OnClick="() => this.CopyToClipboard()">
 | 
				
			||||||
 | 
					                    Copy result
 | 
				
			||||||
 | 
					                </MudButton>
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <MudButton Variant="Variant.Filled" Style="@this.GetResetColor()" StartIcon="@Icons.Material.Filled.Refresh" OnClick="() => this.InnerResetForm()">
 | 
					            @if (this.ShowReset)
 | 
				
			||||||
                Reset
 | 
					            {
 | 
				
			||||||
            </MudButton>
 | 
					                <MudButton Variant="Variant.Filled" Style="@this.GetResetColor()" StartIcon="@Icons.Material.Filled.Refresh" OnClick="() => this.InnerResetForm()">
 | 
				
			||||||
 | 
					                    Reset
 | 
				
			||||||
 | 
					                </MudButton>
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            @if (this.SettingsManager.ConfigurationData.LLMProviders.ShowProviderConfidence)
 | 
					            @if (this.SettingsManager.ConfigurationData.LLMProviders.ShowProviderConfidence)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
 | 
				
			|||||||
@ -75,6 +75,12 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    protected virtual bool ShowDedicatedProgress => false;
 | 
					    protected virtual bool ShowDedicatedProgress => false;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					    protected virtual bool ShowSendTo => true;
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    protected virtual bool ShowCopyResult => true;
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    protected virtual bool ShowReset => true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected virtual ChatThread ConvertToChatThread => this.chatThread ?? new();
 | 
					    protected virtual ChatThread ConvertToChatThread => this.chatThread ?? new();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    protected virtual IReadOnlyList<IButtonData> FooterButtons => [];
 | 
					    protected virtual IReadOnlyList<IButtonData> FooterButtons => [];
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user