Fixed issues with stored paths in chat templates (#727)

This commit is contained in:
Paul Koudelka authored and GitHub committed 2026-04-09 16:01:47 +02:00
1 parent e49973497c
commit c325ba0787
5 files changed
+23 -8

No files matched your search

@@ -53,6 +53,11 @@ public record FileAttachment(FileAttachmentType Type, string FileName, string Fi
/// </remarks>
public bool Exists => File.Exists(this.FilePath);
/// <summary>
/// Rebuilds the attachment from its current file path so file type detection uses the latest rules.
/// </summary>
public FileAttachment Normalize() => FromPath(this.FilePath);
/// <summary>
/// Creates a FileAttachment from a file path by automatically determining the type,
/// extracting the filename, and reading the file size.