This commit is contained in:
Thorsten Sommer 2025-05-24 18:34:12 +02:00
parent 935b5c3417
commit 22749c1e69
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -132,9 +132,7 @@ public partial class ChatTemplateDialog : MSGComponentBase
private void AddMessageBelow(ContentBlock currentItem) private void AddMessageBelow(ContentBlock currentItem)
{ {
var insertedEntry = new ContentBlock
// Create new entry with a valid role
var newEntry = new ContentBlock
{ {
Role = this.dataExampleConversation.Count is 0 ? ChatRole.USER : this.dataExampleConversation.Last().Role.SelectNextRoleForTemplate(), Role = this.dataExampleConversation.Count is 0 ? ChatRole.USER : this.dataExampleConversation.Last().Role.SelectNextRoleForTemplate(),
Content = new ContentText(), Content = new ContentText(),