mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-06 04:51:36 +00:00
Added whole documents to the Translation, Grammar & Spelling, and Rewrite & Improve assistants (#1179)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
f7666861f1
commit
918572c158
150 files changed
+12850
-302
No files matched your search
@@ -0,0 +1,42 @@
|
||||
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);
|
||||
}
|
||||
Reference in new issue
Block a user