From d85d2aa3aa40a2c9f18c73111d53de40121e1847 Mon Sep 17 00:00:00 2001 From: hart_s3 Date: Tue, 5 May 2026 13:11:33 +0200 Subject: [PATCH 1/2] Fix:missing attachment on rework --- .../Components/ChatComponent.razor.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/MindWork AI Studio/Components/ChatComponent.razor.cs b/app/MindWork AI Studio/Components/ChatComponent.razor.cs index 4c604753..71337e9e 100644 --- a/app/MindWork AI Studio/Components/ChatComponent.razor.cs +++ b/app/MindWork AI Studio/Components/ChatComponent.razor.cs @@ -939,7 +939,7 @@ private Task EditLastUserBlock(IContent block) if(lastBlockContent is null) return Task.CompletedTask; - this.userInput = textBlock.Text; + this.RestoreComposerFromTextBlock(textBlock); this.ChatThread.Remove(block); this.ChatThread.Remove(lastBlockContent); this.hasUnsavedChanges = true; @@ -956,13 +956,22 @@ private Task EditLastBlock(IContent block) if (block is not ContentText textBlock) return Task.CompletedTask; - this.userInput = textBlock.Text; + this.RestoreComposerFromTextBlock(textBlock); this.ChatThread.Remove(block); this.hasUnsavedChanges = true; this.StateHasChanged(); return Task.CompletedTask; } + + private void RestoreComposerFromTextBlock(ContentText textBlock) + { + this.userInput = textBlock.Text; + this.chatDocumentPaths.Clear(); + + foreach (var attachment in textBlock.FileAttachments) + this.chatDocumentPaths.Add(attachment.Normalize()); + } #region Overrides of MSGComponentBase From af697a6a8c64c6b8c7bb24d8c67d155b42fc89ff Mon Sep 17 00:00:00 2001 From: hart_s3 Date: Tue, 5 May 2026 14:28:32 +0200 Subject: [PATCH 2/2] Updated changelog --- app/MindWork AI Studio/wwwroot/changelog/v26.4.1.md | 1 + 1 file changed, 1 insertion(+) diff --git a/app/MindWork AI Studio/wwwroot/changelog/v26.4.1.md b/app/MindWork AI Studio/wwwroot/changelog/v26.4.1.md index 3ff00c6a..cd26232e 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v26.4.1.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v26.4.1.md @@ -37,6 +37,7 @@ - Fixed an issue where file and folder selection dialogs could open more than once on Windows. Thanks to Bernhard for reporting this bug. - Fixed an issue where exporting to Word could fail when the message contained certain formatting. - Fixed security issues in the native app runtime by strengthening how AI Studio creates and protects the secret values used for its internal secure connection. +- Fixed an issue where documents were detached when editing a previous prompt. They now remain attached. - Updated several security-sensitive Rust dependencies in the native runtime to address known vulnerabilities. - Updated .NET to v9.0.15 - Updated dependencies \ No newline at end of file