mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-09-13 17:53:37 +00:00
19 lines
551 B
C#
19 lines
551 B
C#
|
|
namespace AIStudio.Tools.Services;
|
||
|
|
|
||
|
|
public sealed class FileEnumerationResult
|
||
|
|
{
|
||
|
|
public List<FileInfo> Files { get; } = [];
|
||
|
|
|
||
|
|
public List<DataSourceEmbeddingFailure> Failures { get; } = [];
|
||
|
|
|
||
|
|
public int FailedFiles { get; set; }
|
||
|
|
|
||
|
|
public string LastError { get; set; } = string.Empty;
|
||
|
|
|
||
|
|
public void AddFailure(string filePath, string reason)
|
||
|
|
{
|
||
|
|
this.Failures.Add(new DataSourceEmbeddingFailure(filePath, reason, DateTimeOffset.UtcNow));
|
||
|
|
this.FailedFiles = this.Failures.Count;
|
||
|
|
this.LastError = reason;
|
||
|
|
}
|
||
|
|
}
|