AI-Studio/app/MindWork AI Studio/Components/ChatTemplateSelection.razor

27 lines
1.1 KiB
Plaintext
Raw Normal View History

2025-05-24 10:27:00 +00:00
@using AIStudio.Settings
@inherits MSGComponentBase
2025-05-24 17:11:28 +00:00
<MudTooltip Placement="Placement.Top" Text="@T("Start a new chat with a chat template")">
2025-05-24 10:27:00 +00:00
<MudMenu AnchorOrigin="Origin.TopLeft" TransformOrigin="@Origin.BottomLeft" Class="@this.MarginClass">
<ActivatorContent>
2025-05-24 17:11:28 +00:00
@if (this.CurrentChatTemplate != ChatTemplate.NO_CHAT_TEMPLATE)
{
<MudButton IconSize="Size.Large" StartIcon="@Icons.Material.Filled.RateReview" IconColor="Color.Default">
@this.CurrentChatTemplate.Name
</MudButton>
}
else
{
<MudIconButton Icon="@Icons.Material.Filled.RateReview" />
}
2025-05-24 10:27:00 +00:00
</ActivatorContent>
<ChildContent>
@foreach (var chatTemplate in this.SettingsManager.ConfigurationData.ChatTemplates.GetAllChatTemplates())
{
<MudMenuItem OnClick="() => this.SelectionChanged(chatTemplate)">
@chatTemplate.Name
</MudMenuItem>
}
</ChildContent>
</MudMenu>
</MudTooltip>