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
@@ -27,6 +27,20 @@ public class ClipboardImageTempStoreTests : IDisposable
Assert.Equal(".png", Path.GetExtension(a));
}
[Fact]
public void NewPngFileName_IsUniquePasteNameWithoutDirectory()
{
var now = new DateTime(2026, 9, 16, 10, 30, 0, 123, DateTimeKind.Utc);
var a = ClipboardImageTempStore.NewPngFileName(now);
var b = ClipboardImageTempStore.NewPngFileName(now);
Assert.NotEqual(a, b);
Assert.StartsWith("paste-20260916-103000123-", a);
Assert.EndsWith(".png", a);
Assert.Equal(a, Path.GetFileName(a));
}
[Fact]
public void DeleteOlderThan_RemovesOnlyFilesPastTheMaxAge()
{