Add ContainsImages extension method for List<FileAttachment> to check for image attachments

This commit is contained in:
Thorsten Sommer 2025-12-29 17:34:12 +01:00
parent 4c181ea924
commit 447ec9f31a
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -0,0 +1,6 @@
namespace AIStudio.Chat;
public static class ListFileAttachmentExtensions
{
public static bool ContainsImages(this List<FileAttachment> attachments) => attachments.Any(attachment => attachment.IsImage);
}