Added file patterns and exclusions to folder data sources (#1057)

Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
Paul KoudelkaandThorsten Sommer authored and GitHub committed 2026-10-17 19:12:43 +02:00
1 parent 249fc778a2
commit 031874cebf
75 files changed
+4808 -589

No files matched your search

@@ -96,8 +96,8 @@ public record FileAttachment(FileAttachmentType Type, string FileName, [property
}
/// <summary>
/// Determines the file attachment type based on the file extension.
/// Uses centrally defined file type filters from <see cref="FileTypes"/>.
/// Determines the file attachment type based on the file extension or, for readable text, on
/// the content. Uses the centrally defined file type filters from FileTypes.
/// </summary>
/// <param name="filePath">The file path to analyze.</param>
/// <returns>The corresponding FileAttachmentType.</returns>
@@ -115,7 +115,11 @@ public record FileAttachment(FileAttachmentType Type, string FileName, [property
if (FileTypes.IsAllowedPath(filePath, FileTypes.AUDIO))
return FileAttachmentType.AUDIO;
// Check if it's an allowed document file (PDF, Text, LaTeX, or Office):
//
// Check if it's an allowed document file (PDF, Text, LaTeX, or Office). Text includes
// READABLE_TEXT, so any readable text file is accepted, whatever its name, e.g., main.tf.
// For a file of an unknown type, this reads up to the first 8 KB:
//
if (FileTypes.IsAllowedPath(filePath, FileTypes.DOCUMENT))
return FileAttachmentType.DOCUMENT;