Removed an unused field from the document manager

This commit is contained in:
Thorsten Sommer 2026-08-10 19:48:12 +02:00
parent cbed9d5417
commit ea5efca69d
Signed by untrusted user who does not match committer: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -8,7 +8,6 @@ namespace AIStudio.Tools;
/// </summary> /// </summary>
public sealed class DocumentManager public sealed class DocumentManager
{ {
private int currentPageNumber;
private StringBuilder? currentPageContent; private StringBuilder? currentPageContent;
public string? AddPage(ContentStreamDocumentMetadata metadata, string? content, bool extractImages) public string? AddPage(ContentStreamDocumentMetadata metadata, string? content, bool extractImages)
@ -21,7 +20,6 @@ public sealed class DocumentManager
if (image is null) if (image is null)
{ {
var completedPage = this.Flush(); var completedPage = this.Flush();
this.currentPageNumber = pageNumber;
this.currentPageContent = new StringBuilder(); this.currentPageContent = new StringBuilder();
this.currentPageContent.AppendLine($"# Page {pageNumber}"); this.currentPageContent.AppendLine($"# Page {pageNumber}");
this.currentPageContent.Append(content); this.currentPageContent.Append(content);
@ -52,7 +50,6 @@ public sealed class DocumentManager
var result = this.currentPageContent.ToString(); var result = this.currentPageContent.ToString();
this.currentPageContent = null; this.currentPageContent = null;
this.currentPageNumber = 0;
return string.IsNullOrWhiteSpace(result) ? null : result; return string.IsNullOrWhiteSpace(result) ? null : result;
} }
} }