mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-11 19:52:10 +00:00
Removed an unused field from the document manager
This commit is contained in:
parent
cbed9d5417
commit
ea5efca69d
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user