Files
AI-Studio/app/MindWork AI Studio/Assistants/DocumentAssistantStateKeys.cs
T

42 lines
1.8 KiB
C#

using AIStudio.Tools.AssistantSessions;
using AIStudio.Tools.DocumentSegments;
namespace AIStudio.Assistants;
/// <summary>
/// The keys under which an assistant which works on documents as well as on texts keeps its own state in its session.
/// </summary>
/// <remarks>
/// They live outside of the generic DocumentAssistantBase, as the keys of AssistantBase live in AssistantLowerBase:
/// a static field of a generic type would exist once per assistant.
/// </remarks>
internal static class DocumentAssistantStateKeys
{
/// <summary>
/// What the assistant works on, as the user chose it.
/// </summary>
/// <remarks>
/// Kept out of drafts, so that the assistant starts as its settings say whenever the user comes back, e.g., asks
/// again what to work on. A run brings its mode along, or its progress and its result would stay hidden.
/// </remarks>
public static readonly AssistantSessionStateKey<AssistantContentMode> MODE = new("Mode", isKeptOutOfDrafts: true);
/// <summary>
/// The document the user chose.
/// </summary>
public static readonly AssistantSessionStateKey<string> DOCUMENT_PATH = new("DocumentPath");
/// <summary>
/// The result of the last run on a document, which the user may still save.
/// </summary>
public static readonly AssistantSessionStateKey<EditedDocument?> EDITED_DOCUMENT = new("EditedDocument");
/// <summary>
/// How far a run on a document got.
/// </summary>
/// <remarks>
/// Kept out of drafts, like other work in progress: a draft is stored only while no run goes on, and its
/// progress would mean nothing then.
/// </remarks>
public static readonly AssistantSessionStateKey<SegmentProgress?> DOCUMENT_PROGRESS = new("DocumentProgress", isKeptOutOfDrafts: true);
}