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, /// or in the BeyondFacts Lab. /// /// /// Create it with InWorkspace or InLab. /// /// The workspace of a chat outside the lab, Guid.Empty for a temporary chat. /// Where a chat of the lab belongs, or null for any other chat. public readonly record struct StoredChatLocation(Guid WorkspaceId, BflThreadLocation? LabThread) { /// /// 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); }