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>
|
2025-05-25 08:33:13 +00:00
|
|
|
<MudMenuItem Icon="@Icons.Material.Filled.Settings" Label="@T("Manage your templates")" OnClick="async () => await this.OpenSettingsDialog()" />
|
|
|
|
<MudDivider/>
|
2025-05-24 10:27:00 +00:00
|
|
|
@foreach (var chatTemplate in this.SettingsManager.ConfigurationData.ChatTemplates.GetAllChatTemplates())
|
|
|
|
{
|
2025-05-25 08:33:13 +00:00
|
|
|
<MudMenuItem Icon="@Icons.Material.Filled.RateReview" OnClick="async () => await this.SelectionChanged(chatTemplate)">
|
2025-05-24 10:27:00 +00:00
|
|
|
@chatTemplate.Name
|
|
|
|
</MudMenuItem>
|
|
|
|
}
|
|
|
|
</ChildContent>
|
|
|
|
</MudMenu>
|
|
|
|
</MudTooltip>
|