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