mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-07-04 03:42:56 +00:00
28 lines
803 B
C#
28 lines
803 B
C#
|
using AIStudio.Settings;
|
||
|
|
||
|
using Microsoft.AspNetCore.Components;
|
||
|
|
||
|
namespace AIStudio.Components;
|
||
|
|
||
|
public partial class ChatTemplateSelection : MSGComponentBase
|
||
|
{
|
||
|
[Parameter]
|
||
|
public ChatTemplate CurrentChatTemplate { get; set; } = ChatTemplate.NO_CHATTEMPLATE;
|
||
|
|
||
|
[Parameter]
|
||
|
public EventCallback<ChatTemplate> CurrentChatTemplateChanged { get; set; }
|
||
|
|
||
|
[Parameter]
|
||
|
public string MarginLeft { get; set; } = "ml-1";
|
||
|
|
||
|
[Parameter]
|
||
|
public string MarginRight { get; set; } = string.Empty;
|
||
|
|
||
|
private string MarginClass => $"{this.MarginLeft} {this.MarginRight}";
|
||
|
|
||
|
private async Task SelectionChanged(ChatTemplate chatTemplate)
|
||
|
{
|
||
|
this.CurrentChatTemplate = chatTemplate;
|
||
|
await this.CurrentChatTemplateChanged.InvokeAsync(chatTemplate);
|
||
|
}
|
||
|
}
|