mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-20 22:32:56 +00:00
Handle non-text content in ChatTemplateDialog gracefully
This commit is contained in:
parent
b2ee1ce9f2
commit
8bb515042d
@ -123,7 +123,19 @@
|
||||
}
|
||||
</MudSelect>
|
||||
</MudTd>
|
||||
<MudTextField AutoGrow="true" @bind-Value="context.Content.As<ContentText>()!.Text" Label="@T("Your message")" Required />
|
||||
<MudTd>
|
||||
@switch(context.Content)
|
||||
{
|
||||
case ContentText textContent:
|
||||
<MudTextField AutoGrow="true" @bind-Value="@textContent.Text" Label="@T("The message")" Required="true" Placeholder="@T("Enter a message")"/>
|
||||
break;
|
||||
|
||||
default:
|
||||
<MudText Typo="Typo.body2">
|
||||
@T("Only text content is supported in the editing mode yet.")
|
||||
</MudText>
|
||||
break;
|
||||
}
|
||||
</MudTd>
|
||||
</RowEditingTemplate>
|
||||
<PagerContent>
|
||||
|
Loading…
Reference in New Issue
Block a user