Added the guided chat to the BeyondFacts Lab (#1177)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-09 09:55:01 +01:00
1 parent e77645f44c
commit 79e0c80031
55 files changed
+3481 -72

No files matched your search

@@ -0,0 +1,38 @@
using AIStudio.Chat;
namespace AIStudio.Assistants.BeyondFactsLab;
/// <summary>
/// The chat of a step of the BeyondFacts Lab, as BflConversationService keeps it while the app runs.
/// </summary>
/// <remarks>
/// The service keeps it beyond the page, so that an answer goes on while the person looks at another page, and the
/// page shows it again when it comes back.
/// </remarks>
public sealed class BflConversation
{
/// <summary>
/// Gets the step of the preparation the chat belongs to.
/// </summary>
public required BflThreadLocation Location { get; init; }
/// <summary>
/// Gets or sets the chat, or null when this version cannot open the stored one.
/// </summary>
public ChatThread? Thread { get; set; }
/// <summary>
/// Gets or sets whether the model answers right now.
/// </summary>
public bool IsRunning { get; set; }
/// <summary>
/// Gets whether the chat can be shown and continued.
/// </summary>
public bool IsAvailable => this.Thread is not null;
/// <summary>
/// Gets whether the chat has a message the person sees.
/// </summary>
public bool HasVisibleMessages => this.Thread?.Blocks.Any(block => !block.HideFromUser) ?? false;
}