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:
Sabrina-devopsandThorsten Sommer authored and GitHub committed 2026-11-28 20:27:23 +01:00
1 parent f7666861f1
commit 918572c158
150 files changed
+12850 -302

No files matched your search

@@ -0,0 +1,24 @@
namespace AIStudio.Tools.DocumentSegments;
/// <summary>
/// The text of a document is larger than its format reads on this computer, see IDocumentSegmentFormat.MaxTextSize.
/// </summary>
/// <remarks>
/// The format would hold the text in memory many times over while reading and writing it, so it refuses the document
/// before reading its text.
/// </remarks>
/// <param name="path">The document.</param>
/// <param name="textSize">The size of the text of the document, in bytes, see IDocumentSegmentFormat.TextSizeOf.</param>
/// <param name="maxTextSize">The size of the largest text the format reads, in bytes.</param>
public sealed class DocumentTooLargeException(string path, long textSize, long maxTextSize) : Exception($"The text of the document '{path}' takes {textSize} bytes, more than the {maxTextSize} bytes its format reads.")
{
/// <summary>
/// The size of the text of the document, in bytes.
/// </summary>
public long TextSize => textSize;
/// <summary>
/// The size of the largest text the format reads, in bytes.
/// </summary>
public long MaxTextSize => maxTextSize;
}