From a5bdf8f53246d091b2cf7c4383f893a3cc55e6a6 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sun, 13 Sep 2026 19:19:05 +0200 Subject: [PATCH] Copy the sources of an answer along with it --- .../Components/MudCopyClipboardButton.razor.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/MindWork AI Studio/Components/MudCopyClipboardButton.razor.cs b/app/MindWork AI Studio/Components/MudCopyClipboardButton.razor.cs index 86c067ba..689cddc4 100644 --- a/app/MindWork AI Studio/Components/MudCopyClipboardButton.razor.cs +++ b/app/MindWork AI Studio/Components/MudCopyClipboardButton.razor.cs @@ -61,16 +61,20 @@ public partial class MudCopyClipboardButton : ComponentBase /// /// Copy this block's content to the clipboard. /// + /// + /// The user copies what the card shows, and the card shows the answer together with the sources + /// AI Studio collected for it. Pasting the answer into a mail without them would leave the + /// reader with claims nobody is able to check. + /// private async Task CopyToClipboard(IContent? contentToCopy) { if (contentToCopy is null) return; - + switch (this.Type) { - case ContentType.TEXT: - var textContent = (ContentText) contentToCopy; - await this.RustService.CopyText2Clipboard(textContent.Text); + case ContentType.TEXT when contentToCopy.TryGetExportMarkdown(out var markdown): + await this.RustService.CopyText2Clipboard(markdown); break; default: