feat(details): attach clipboard image on Ctrl+V in the task description

Extracts the clipboard bitmap read into a shared ClipboardBitmap helper
(also used by the terminal view); the description TextBox now routes an
image paste through AddFilesAsync as a unique paste-*.png attachment.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mika kuns
2026-10-02 10:31:47 +02:00
co-authored by Claude Sonnet 5.5
parent d8f78056c1
commit 393e59460d
6 changed files with 84 additions and 18 deletions
@@ -22,8 +22,11 @@ public static class ClipboardImageTempStore
/// <summary>Test seam for <see cref="NewPngPath(DateTime)"/> — takes the target dir explicitly
/// instead of the real app data root.</summary>
internal static string NewPngPath(string dir, DateTime utcNow) =>
Path.Combine(dir, $"paste-{utcNow:yyyyMMdd-HHmmssfff}-{Guid.NewGuid():N}.png");
internal static string NewPngPath(string dir, DateTime utcNow) => Path.Combine(dir, NewPngFileName(utcNow));
/// <summary>A fresh, collision-free <c>paste-….png</c> file name (also used as an attachment name).</summary>
public static string NewPngFileName(DateTime utcNow) =>
$"paste-{utcNow:yyyyMMdd-HHmmssfff}-{Guid.NewGuid():N}.png";
/// <summary>Test seam for <see cref="DeleteOlderThan(TimeSpan,DateTime)"/> — takes the target dir
/// explicitly instead of the real app data root.</summary>