Added simulated participants to the BeyondFacts Lab (#1208)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-16 14:07:28 +01:00
1 parent 92d0ff68f4
commit ef059ffd15
46 files changed
+1871 -71

No files matched your search

@@ -171,6 +171,13 @@ public partial class EmbeddedChat : MSGComponentBase
[Parameter]
public string ExportFileName { get; set; } = string.Empty;
/// <summary>
/// Gets or sets a message the user sends with one click once the model has answered, such as asking for the
/// evaluation at the end of an exercise; null for none.
/// </summary>
[Parameter]
public EmbeddedChatQuickMessage? QuickMessage { get; set; }
[Inject]
private EmbeddedChatService ChatService { get; init; } = null!;
@@ -425,6 +432,18 @@ public partial class EmbeddedChat : MSGComponentBase
await this.ChatService.SendAsync(this.ChatId, this.RequestOf(message));
}
/// <summary>
/// Sends the message of the button, see QuickMessage, as if the user had written it. What the user typed meanwhile
/// stays in the field.
/// </summary>
private async Task SendQuickMessageAsync()
{
if (this.QuickMessage is not { } quickMessage || !this.CanSend)
return;
await this.ChatService.SendAsync(this.ChatId, this.RequestOf(new ContentText { Text = quickMessage.Message }));
}
/// <summary>
/// Lets the model open the conversation, see StartRequest.
/// </summary>