mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-20 16:52:57 +00:00
Inline availableRoles in ChatTemplateDialog for simplicity
This commit is contained in:
parent
15e3c56875
commit
93c5db8f98
@ -113,8 +113,9 @@
|
||||
</MudTd>
|
||||
</RowTemplate>
|
||||
<RowEditingTemplate>
|
||||
<MudSelect Label="Role" @bind-Value="context.Role" Required>
|
||||
@foreach (var role in availableRoles)
|
||||
<MudTd>
|
||||
<MudSelect Label="@T("Role")" @bind-Value="@context.Role" Required="true">
|
||||
@foreach (var role in ChatRoles.ChatTemplateRoles())
|
||||
{
|
||||
<MudSelectItem Value="@role">@role.ToChatTemplateName()</MudSelectItem>
|
||||
}
|
||||
|
@ -63,7 +63,6 @@ public partial class ChatTemplateDialog : MSGComponentBase
|
||||
private bool isInlineEditOnGoing;
|
||||
|
||||
private ContentBlock messageEntryBeforeEdit;
|
||||
private readonly IEnumerable<ChatRole> availableRoles = ChatRoles.ChatTemplateRoles().ToArray();
|
||||
|
||||
// We get the form reference from Blazor code to validate it manually:
|
||||
private MudForm form = null!;
|
||||
|
Loading…
Reference in New Issue
Block a user