using AIStudio.Assistants.BeyondFactsLab;
namespace AIStudio.Tools.Services;
///
/// Where the cleanup of the provenance store at the start finds a chat: in a workspace, among the temporary chats,
/// in the BeyondFacts Lab, or in a comparison series of the Model Comparison assistant.
///
///
/// Create it with InWorkspace, InLab, or InComparisonSeries.
///
/// The workspace of a chat in a workspace, Guid.Empty for a temporary chat or a chat of an assistant.
/// Where a chat of the lab belongs, or null for any other chat.
/// The comparison series of a chat of the Model Comparison assistant, or null for any other chat.
public readonly record struct StoredChatLocation(Guid WorkspaceId, BflThreadLocation? LabThread, Guid? ComparisonSeriesId = null)
{
///
/// Gets the place of a chat in a workspace or among the temporary chats.
///
/// The workspace, Guid.Empty for a temporary chat.
public static StoredChatLocation InWorkspace(Guid workspaceId) => new(workspaceId, null);
///
/// Gets the place of a chat of the BeyondFacts Lab.
///
/// Where the chat belongs in the lab.
public static StoredChatLocation InLab(BflThreadLocation thread) => new(Guid.Empty, thread);
///
/// Gets the place of a chat of a comparison series of the Model Comparison assistant.
///
/// The ID of the series.
public static StoredChatLocation InComparisonSeries(Guid seriesId) => new(Guid.Empty, null, seriesId);
}