diff --git a/app/MindWork AI Studio/Chat/FileAttachment.cs b/app/MindWork AI Studio/Chat/FileAttachment.cs index 7f70ace3..320f21c4 100644 --- a/app/MindWork AI Studio/Chat/FileAttachment.cs +++ b/app/MindWork AI Studio/Chat/FileAttachment.cs @@ -8,10 +8,20 @@ namespace AIStudio.Chat; public readonly record struct FileAttachment(FileAttachmentType Type, string FileName, string FilePath, long FileSizeBytes) { /// - /// Gets a value indicating whether the file still exists on the file system.` + /// Gets a value indicating whether the file still exists on the file system. /// public bool Exists => File.Exists(this.FilePath); + /// + /// Gets a value indicating whether the file type is forbidden and should not be attached. + /// + public bool IsForbidden => this.Type == FileAttachmentType.FORBIDDEN; + + /// + /// Gets a value indicating whether the file type is valid and allowed to be attached. + /// + public bool IsValid => this.Type != FileAttachmentType.FORBIDDEN; + /// /// Creates a FileAttachment from a file path by automatically determining the type, /// extracting the filename, and reading the file size.