From afefc651a542b8e952b29efc369822d07f197c7b Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sat, 16 Aug 2025 10:10:34 +0200 Subject: [PATCH] Made ChatTemplate a reference type --- app/MindWork AI Studio/Settings/ChatTemplate.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/MindWork AI Studio/Settings/ChatTemplate.cs b/app/MindWork AI Studio/Settings/ChatTemplate.cs index 02e0061c..cd25794d 100644 --- a/app/MindWork AI Studio/Settings/ChatTemplate.cs +++ b/app/MindWork AI Studio/Settings/ChatTemplate.cs @@ -3,8 +3,12 @@ using AIStudio.Tools.PluginSystem; namespace AIStudio.Settings; -public readonly record struct ChatTemplate(uint Num, string Id, string Name, string SystemPrompt, string PredefinedUserPrompt, List ExampleConversation, bool AllowProfileUsage) +public record ChatTemplate(uint Num, string Id, string Name, string SystemPrompt, string PredefinedUserPrompt, List ExampleConversation, bool AllowProfileUsage) { + public ChatTemplate() : this(0, Guid.Empty.ToString(), string.Empty, string.Empty, string.Empty, [], false) + { + } + private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(ChatTemplate).Namespace, nameof(ChatTemplate)); public static readonly ChatTemplate NO_CHAT_TEMPLATE = new()