mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-07-03 20:02:57 +00:00
28 lines
804 B
C#
28 lines
804 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_CHAT_TEMPLATE;
|
|
|
|
[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);
|
|
}
|
|
} |