Added the BeyondFacts Lab as a prototype (#1175)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-08 19:49:46 +01:00
1 parent db8dae1cf6
commit b6c3fbb5db
90 files changed
+5936 -209

No files matched your search

@@ -0,0 +1,27 @@
using AIStudio.Settings;
using ComponentKind = AIStudio.Tools.Components;
namespace AIStudio.Assistants.BeyondFactsLab;
/// <summary>
/// Decides whether the BeyondFacts Lab may be opened.
/// </summary>
/// <remarks>
/// The lab is a prototype behind its own preview feature, and an organization can hide it like any other
/// assistant. The tile asks the same question through its required preview feature; the page asks here,
/// because somebody might reach its address without the tile, e.g., from a link or the browser history.
/// </remarks>
public static class BflAccess
{
/// <summary>
/// Checks whether the BeyondFacts Lab may be opened with the given settings.
/// </summary>
/// <param name="settingsManager">The settings to check.</param>
/// <param name="assistantName">The name of the lab for the log; without one, nothing gets logged.</param>
/// <returns>True, when the preview feature is switched on and no configuration hides the lab.</returns>
public static bool CanOpen(SettingsManager settingsManager, string assistantName = "") => settingsManager.IsAssistantVisible(
ComponentKind.BEYOND_FACTS_LAB_ASSISTANT,
assistantName: assistantName,
requiredPreviewFeature: ComponentKind.BEYOND_FACTS_LAB_ASSISTANT.RequiredPreviewFeature);
}